diff --git a/repeater/web/html/assets/index-Ceeo6dki.css b/repeater/web/html/assets/index-Ceeo6dki.css new file mode 100644 index 0000000..f58faca --- /dev/null +++ b/repeater/web/html/assets/index-Ceeo6dki.css @@ -0,0 +1 @@ +@tailwind base;@tailwind components;@tailwind utilities;:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}@media (prefers-color-scheme: dark){:root{--color-background: var(--vt-c-black);--color-background-soft: var(--vt-c-black-soft);--color-background-mute: var(--vt-c-black-mute);--color-border: var(--vt-c-divider-dark-2);--color-border-hover: var(--vt-c-divider-dark-1);--color-heading: var(--vt-c-text-dark-1);--color-text: var(--vt-c-text-dark-2)}}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:var(--color-text);background:var(--color-background);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-left-\[92px\]{left:-92px}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.-top-\[79px\]{top:-79px}.-top-\[94px\]{top:-94px}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-5{left:1.25rem}.left-\[246px\]{left:246px}.left-\[575px\]{left:575px}.right-1{right:.25rem}.right-2{right:.5rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[373px\]{top:373px}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[9998\]{z-index:9998}.z-\[999999\]{z-index:999999}.z-\[99999\]{z-index:99999}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.ml-24{margin-left:6rem}.ml-28{margin-left:7rem}.ml-32{margin-left:8rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-80{height:20rem}.h-96{height:24rem}.h-\[30px\]{height:30px}.h-\[35px\]{height:35px}.h-\[512px\]{height:512px}.h-full{height:100%}.h-px{height:1px}.max-h-0{max-height:0px}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-\[600px\]{max-height:600px}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90vh\]{max-height:90vh}.max-h-screen{max-height:100vh}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[196px\]{width:196px}.w-\[285px\]{width:285px}.w-\[35px\]{width:35px}.w-\[705px\]{width:705px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[120px\]{min-width:120px}.min-w-full{min-width:100%}.max-w-20{max-width:5rem}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-\[24\.22deg\]{--tw-rotate: -24.22deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-white\/5>:not([hidden])~:not([hidden]){border-color:#ffffff0d}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-\[15px\]{border-radius:15px}.rounded-\[20px\]{border-radius:20px}.rounded-\[8px\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-accent-green\/20{border-color:#a5e5b633}.border-accent-green\/30{border-color:#a5e5b64d}.border-accent-green\/40{border-color:#a5e5b666}.border-accent-green\/50{border-color:#a5e5b680}.border-accent-green\/60{border-color:#a5e5b699}.border-accent-purple\/50{border-color:#eba0fc80}.border-accent-red\/20{border-color:#fb787b33}.border-accent-red\/30{border-color:#fb787b4d}.border-accent-red\/50{border-color:#fb787b80}.border-blue-500\/30{border-color:#3b82f64d}.border-blue-500\/50{border-color:#3b82f680}.border-cyan-400\/30{border-color:#22d3ee4d}.border-cyan-400\/40{border-color:#22d3ee66}.border-dark-border{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.border-dark-border\/50{border-color:#4b4b4b80}.border-gray-400\/30{border-color:#9ca3af4d}.border-gray-500\/50{border-color:#6b728080}.border-gray-700\/50{border-color:#37415180}.border-green-400\/30{border-color:#4ade804d}.border-green-500\/30{border-color:#22c55e4d}.border-orange-400\/30{border-color:#fb923c4d}.border-orange-400\/40{border-color:#fb923c66}.border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-primary\/20{border-color:#aae8e833}.border-primary\/30{border-color:#aae8e84d}.border-primary\/40{border-color:#aae8e866}.border-primary\/50{border-color:#aae8e880}.border-primary\/60{border-color:#aae8e899}.border-red-500\/50{border-color:#ef444480}.border-secondary{--tw-border-opacity: 1;border-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-secondary\/30{border-color:#ffc2464d}.border-secondary\/40{border-color:#ffc24666}.border-secondary\/50{border-color:#ffc24680}.border-secondary\/70{border-color:#ffc246b3}.border-transparent{border-color:transparent}.border-white\/10{border-color:#ffffff1a}.border-white\/20{border-color:#fff3}.border-white\/30{border-color:#ffffff4d}.border-white\/5{border-color:#ffffff0d}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-yellow-400\/30{border-color:#facc154d}.border-yellow-500\/50{border-color:#eab30880}.border-l-accent-cyan{--tw-border-opacity: 1;border-left-color:rgb(209 230 228 / var(--tw-border-opacity, 1))}.border-l-accent-green{--tw-border-opacity: 1;border-left-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-l-accent-purple{--tw-border-opacity: 1;border-left-color:rgb(235 160 252 / var(--tw-border-opacity, 1))}.border-l-accent-red{--tw-border-opacity: 1;border-left-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.border-l-gray-500{--tw-border-opacity: 1;border-left-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-l-primary{--tw-border-opacity: 1;border-left-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-l-secondary{--tw-border-opacity: 1;border-left-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-t-blue-400{--tw-border-opacity: 1;border-top-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-t-green-400{--tw-border-opacity: 1;border-top-color:rgb(74 222 128 / var(--tw-border-opacity, 1))}.border-t-primary{--tw-border-opacity: 1;border-top-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-t-purple-400{--tw-border-opacity: 1;border-top-color:rgb(192 132 252 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.border-t-white\/70{border-top-color:#ffffffb3}.bg-\[\#0B1014\]{--tw-bg-opacity: 1;background-color:rgb(11 16 20 / var(--tw-bg-opacity, 1))}.bg-\[\#1A1E1F\]{--tw-bg-opacity: 1;background-color:rgb(26 30 31 / var(--tw-bg-opacity, 1))}.bg-\[\#223231\]{--tw-bg-opacity: 1;background-color:rgb(34 50 49 / var(--tw-bg-opacity, 1))}.bg-\[\#588187\]{--tw-bg-opacity: 1;background-color:rgb(88 129 135 / var(--tw-bg-opacity, 1))}.bg-accent-cyan{--tw-bg-opacity: 1;background-color:rgb(209 230 228 / var(--tw-bg-opacity, 1))}.bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.bg-accent-green\/10{background-color:#a5e5b61a}.bg-accent-green\/20{background-color:#a5e5b633}.bg-accent-purple{--tw-bg-opacity: 1;background-color:rgb(235 160 252 / var(--tw-bg-opacity, 1))}.bg-accent-purple\/20{background-color:#eba0fc33}.bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.bg-accent-red\/10{background-color:#fb787b1a}.bg-accent-red\/20{background-color:#fb787b33}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-black\/80{background-color:#000c}.bg-black\/90{background-color:#000000e6}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-current{background-color:currentColor}.bg-cyan-400{--tw-bg-opacity: 1;background-color:rgb(34 211 238 / var(--tw-bg-opacity, 1))}.bg-cyan-400\/20{background-color:#22d3ee33}.bg-dark-bg{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity, 1))}.bg-dark-bg\/30{background-color:#09090b4d}.bg-dark-bg\/50{background-color:#09090b80}.bg-dark-card\/30{background-color:#0000004d}.bg-dark-card\/90{background-color:#000000e6}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-500\/20{background-color:#6b728033}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-gray-900\/20{background-color:#11182733}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-green-500\/20{background-color:#22c55e33}.bg-green-600\/20{background-color:#16a34a33}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-orange-500\/20{background-color:#f9731633}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(170 232 232 / var(--tw-bg-opacity, 1))}.bg-primary\/10{background-color:#aae8e81a}.bg-primary\/20{background-color:#aae8e833}.bg-primary\/5{background-color:#aae8e80d}.bg-primary\/70{background-color:#aae8e8b3}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500\/20{background-color:#ef444433}.bg-red-900\/20{background-color:#7f1d1d33}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(255 194 70 / var(--tw-bg-opacity, 1))}.bg-secondary\/20{background-color:#ffc24633}.bg-secondary\/30{background-color:#ffc2464d}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/20{background-color:#fff3}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/20{background-color:#eab30833}.bg-yellow-900\/20{background-color:#713f1233}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-500\/20{--tw-gradient-from: rgb(59 130 246 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-400\/25{--tw-gradient-from: rgb(34 211 238 / .25) var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/20{--tw-gradient-from: rgb(6 182 212 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500\/20{--tw-gradient-from: rgb(249 115 22 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary{--tw-gradient-from: #AAE8E8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(170 232 232 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-400\/30{--tw-gradient-from: rgb(250 204 21 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 204 21 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-accent-green{--tw-gradient-to: #A5E5B6 var(--tw-gradient-to-position)}.to-cyan-200\/10{--tw-gradient-to: rgb(165 243 252 / .1) var(--tw-gradient-to-position)}.to-cyan-400\/20{--tw-gradient-to: rgb(34 211 238 / .2) var(--tw-gradient-to-position)}.to-cyan-500\/20{--tw-gradient-to: rgb(6 182 212 / .2) var(--tw-gradient-to-position)}.to-orange-400\/30{--tw-gradient-to: rgb(251 146 60 / .3) var(--tw-gradient-to-position)}.to-yellow-500\/20{--tw-gradient-to: rgb(234 179 8 / .2) var(--tw-gradient-to-position)}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[15px\]{padding:15px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-9{padding-left:2.25rem}.pr-4{padding-right:1rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[30px\]{font-size:30px}.text-\[35px\]{font-size:35px}.text-\[8px\]{font-size:8px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.text-\[\#212122\]{--tw-text-opacity: 1;color:rgb(33 33 34 / var(--tw-text-opacity, 1))}.text-\[\#C3C3C3\]{--tw-text-opacity: 1;color:rgb(195 195 195 / var(--tw-text-opacity, 1))}.text-accent-cyan{--tw-text-opacity: 1;color:rgb(209 230 228 / var(--tw-text-opacity, 1))}.text-accent-green{--tw-text-opacity: 1;color:rgb(165 229 182 / var(--tw-text-opacity, 1))}.text-accent-green\/90{color:#a5e5b6e6}.text-accent-purple{--tw-text-opacity: 1;color:rgb(235 160 252 / var(--tw-text-opacity, 1))}.text-accent-red{--tw-text-opacity: 1;color:rgb(251 120 123 / var(--tw-text-opacity, 1))}.text-accent-red\/80{color:#fb787bcc}.text-accent-red\/90{color:#fb787be6}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-400\/60{color:#22d3ee99}.text-dark-bg{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity, 1))}.text-dark-text{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.text-dark-text\/60{color:#adadad99}.text-dark-text\/80{color:#adadadcc}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-400\/60{color:#fb923c99}.text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.text-primary\/80{color:#aae8e8cc}.text-primary\/90{color:#aae8e8e6}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-secondary{--tw-text-opacity: 1;color:rgb(255 194 70 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/30{color:#ffffff4d}.text-white\/40{color:#fff6}.text-white\/50{color:#ffffff80}.text-white\/60{color:#fff9}.text-white\/70{color:#ffffffb3}.text-white\/80{color:#fffc}.text-white\/90{color:#ffffffe6}.text-yellow-200{--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.decoration-green-400\/60{text-decoration-color:#4ade8099}.decoration-white\/30{text-decoration-color:#ffffff4d}.underline-offset-2{text-underline-offset:2px}.placeholder-white\/50::-moz-placeholder{color:#ffffff80}.placeholder-white\/50::placeholder{color:#ffffff80}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.mix-blend-screen{mix-blend-mode:screen}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_6px_0_rgba\(170\,232\,232\,0\.20\)\]{--tw-shadow: 0 0 6px 0 rgba(170,232,232,.2);--tw-shadow-colored: 0 0 6px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-accent-green\/50{--tw-shadow-color: rgb(165 229 182 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary\/30{--tw-shadow-color: rgb(170 232 232 / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-400\/20{--tw-shadow-color: rgb(250 204 21 / .2);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[120px\]{--tw-blur: blur(120px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\[50px\]{--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.glass-card{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:#0006}.glass-card-green{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#2222226e 1.17%,#8787881a 99.82%)}.glass-card-orange{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#fb787b33 1.17%,#fb787b1a 99.82%)}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-dark-border:hover{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.hover\:border-orange-400\/60:hover{border-color:#fb923c99}.hover\:border-primary:hover{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.hover\:border-primary\/50:hover{border-color:#aae8e880}.hover\:border-white\/30:hover{border-color:#ffffff4d}.hover\:bg-\[\#2A2E2F\]:hover{--tw-bg-opacity: 1;background-color:rgb(42 46 47 / var(--tw-bg-opacity, 1))}.hover\:bg-accent-green\/10:hover{background-color:#a5e5b61a}.hover\:bg-accent-green\/20:hover{background-color:#a5e5b633}.hover\:bg-accent-green\/30:hover{background-color:#a5e5b64d}.hover\:bg-accent-purple\/30:hover{background-color:#eba0fc4d}.hover\:bg-accent-red\/10:hover{background-color:#fb787b1a}.hover\:bg-accent-red\/20:hover{background-color:#fb787b33}.hover\:bg-accent-red\/30:hover{background-color:#fb787b4d}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/10:hover{background-color:#aae8e81a}.hover\:bg-primary\/30:hover{background-color:#aae8e84d}.hover\:bg-primary\/5:hover{background-color:#aae8e80d}.hover\:bg-primary\/90:hover{background-color:#aae8e8e6}.hover\:bg-red-500\/30:hover{background-color:#ef44444d}.hover\:bg-secondary\/90:hover{background-color:#ffc246e6}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:from-cyan-500\/30:hover{--tw-gradient-from: rgb(6 182 212 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400\/30:hover{--tw-gradient-to: rgb(34 211 238 / .3) var(--tw-gradient-to-position)}.hover\:text-accent-green\/80:hover{color:#a5e5b6cc}.hover\:text-accent-red\/80:hover{color:#fb787bcc}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.hover\:text-dark-text:hover{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.hover\:text-primary\/80:hover{color:#aae8e8cc}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-white\/80:hover{color:#fffc}.hover\:shadow-primary\/20:hover{--tw-shadow-color: rgb(170 232 232 / .2);--tw-shadow: var(--tw-shadow-colored)}.hover\:shadow-secondary\/20:hover{--tw-shadow-color: rgb(255 194 70 / .2);--tw-shadow: var(--tw-shadow-colored)}.focus\:border-accent-purple\/50:focus{border-color:#eba0fc80}.focus\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary\/20:focus{--tw-ring-color: rgb(170 232 232 / .2)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border-gray-500\/20:disabled{border-color:#6b728033}.disabled\:bg-gray-500\/10:disabled{background-color:#6b72801a}.disabled\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:border-white\/50{border-color:#ffffff80}.group:hover .group-hover\:text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.peer:checked~.peer-checked\:bg-primary\/20{background-color:#aae8e833}.group:has(:checked) .group-has-\[\:checked\]\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green\/50{border-color:#a5e5b680}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red{--tw-border-opacity: 1;border-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red\/50{border-color:#fb787b80}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green\/10{background-color:#a5e5b61a}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red\/10{background-color:#fb787b1a}@media (min-width: 640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:p-\[15px\]{padding:15px}}@keyframes sparkline-draw-ad12b3cb{0%{stroke-dasharray:1000;stroke-dashoffset:1000}to{stroke-dasharray:1000;stroke-dashoffset:0}}.sparkline-animate[data-v-ad12b3cb]{animation:sparkline-draw-ad12b3cb 1s ease-out}.glass-card[data-v-a5eb8c7f]{background:#000000b3;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.1)}@keyframes ping-a5eb8c7f{75%,to{transform:scale(2);opacity:0}}@keyframes ping-fast-a5eb8c7f{0%{transform:scale(1);opacity:1}75%,to{transform:scale(4);opacity:0}}.animate-ping[data-v-a5eb8c7f]{animation:ping-a5eb8c7f cubic-bezier(0,0,.2,1) infinite}.animate-ping-fast[data-v-a5eb8c7f]{animation:ping-fast-a5eb8c7f .8s cubic-bezier(0,0,.2,1) 3}body{background-color:#09090b!important;color:#fff!important;margin:0;padding:0}html{scrollbar-width:thin;scrollbar-color:#374151 #1f2937}html::-webkit-scrollbar{width:8px}html::-webkit-scrollbar-track{background:#1f2937}html::-webkit-scrollbar-thumb{background-color:#374151;border-radius:4px}html::-webkit-scrollbar-thumb:hover{background-color:#4b5563}.sparkline-container[data-v-574bf55e]{background:#0006;border-radius:10px;padding:24px;-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.sparkline-svg[data-v-574bf55e]{transition:all .2s ease-out}.sparkline-path[data-v-574bf55e]{transition:stroke-width .2s ease-out}.sparkline-path.animate-draw[data-v-574bf55e]{stroke-dasharray:1000;stroke-dashoffset:1000;animation:drawPath-574bf55e 1s ease-out forwards}.sparkline-fill[data-v-574bf55e]{transition:opacity .3s ease-out}.sparkline-dot[data-v-574bf55e]{transition:all .2s ease-out}@keyframes drawPath-574bf55e{to{stroke-dashoffset:0}}@keyframes fadeInFill-574bf55e{to{opacity:1}}@keyframes fadeInDot-574bf55e{to{opacity:1}}.sparkline-container:hover .sparkline-path[data-v-574bf55e]{stroke-width:2.5}.sparkline-container:hover .sparkline-dot[data-v-574bf55e]{r:3;animation:pulse-574bf55e 2s infinite}@keyframes pulse-574bf55e{0%,to{opacity:1}50%{opacity:.7}}canvas[data-v-2ece57e8]{width:100%;height:100%}.modal-enter-active[data-v-3b73bfd6]{transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-leave-active[data-v-3b73bfd6]{transition:all .2s ease-in}.modal-enter-from[data-v-3b73bfd6]{opacity:0;transform:scale(.95) translateY(-10px)}.modal-leave-to[data-v-3b73bfd6]{opacity:0;transform:scale(1.05)}.custom-scrollbar[data-v-3b73bfd6]{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-track{background:#ffffff1a;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb:hover{background:#fff6}.glass-card[data-v-3b73bfd6]{-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.packet-list-enter-active[data-v-d363f6a5],.packet-list-leave-active[data-v-d363f6a5],.packet-list-move[data-v-d363f6a5]{transition:all .4s ease-out}.packet-list-enter-from[data-v-d363f6a5]{opacity:0;transform:translateY(-30px) scale(.98)}.packet-list-enter-to[data-v-d363f6a5],.packet-list-leave-from[data-v-d363f6a5]{opacity:1;transform:translateY(0) scale(1)}.packet-list-leave-to[data-v-d363f6a5]{opacity:0;transform:translateY(-20px) scale(.95)}.packet-row[data-v-d363f6a5]{position:relative;transition:all .3s ease}.packet-list-enter-active .packet-row[data-v-d363f6a5]{background:linear-gradient(90deg,rgba(78,201,176,.1) 0%,rgba(78,201,176,.05) 50%,transparent 100%);box-shadow:0 0 20px #4ec9b033;border-left:3px solid rgba(78,201,176,.6);border-radius:8px;padding-left:12px}.packet-row[data-v-d363f6a5]:hover{background:#ffffff05;border-radius:8px;transition:background .2s ease}@media (max-width: 1023px){.grid-cols-12[data-v-d363f6a5]{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-12>div[data-v-d363f6a5]:nth-child(n+7){display:none}.flex.justify-between[data-v-d363f6a5]{flex-direction:column;gap:1rem;align-items:stretch}.flex.items-center.gap-3[data-v-d363f6a5]:last-child{flex-direction:column;gap:1rem}.flex.flex-col[data-v-d363f6a5]{flex-direction:row;align-items:center;gap:.75rem}.flex.flex-col label[data-v-d363f6a5]{margin-bottom:0;min-width:60px}}@media (max-width: 640px){.grid-cols-12[data-v-d363f6a5]{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12>div[data-v-d363f6a5]:nth-child(n+4){display:none}.flex.items-center.gap-3[data-v-d363f6a5]:last-child{flex-direction:column;gap:.75rem}.flex.flex-col[data-v-d363f6a5]{flex-direction:column;align-items:stretch}.flex.flex-col label[data-v-d363f6a5]{margin-bottom:.25rem;min-width:auto}}.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.map-container[data-v-ab4f1a7c]{position:relative;background:transparent;border-radius:15px;overflow:hidden}.leaflet-map-container[data-v-ab4f1a7c]{background:linear-gradient(135deg,#09090bcc,#0009);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.map-legend[data-v-ab4f1a7c]{position:absolute;top:10px;right:10px;background:#0006;border:1px solid rgba(255,255,255,.1);border-radius:15px;padding:12px;font-size:12px;color:#fff;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:1000;min-width:150px;max-width:180px;box-shadow:0 8px 32px #0000004d}.legend-title[data-v-ab4f1a7c]{font-weight:700;margin-bottom:10px;color:#fff;font-size:13px}.legend-section[data-v-ab4f1a7c]{margin-bottom:10px}.legend-section[data-v-ab4f1a7c]:last-of-type{margin-bottom:8px}.legend-subtitle[data-v-ab4f1a7c]{font-weight:600;margin-bottom:6px;color:#fffc;font-size:11px;text-transform:uppercase;letter-spacing:.5px}.legend-footer[data-v-ab4f1a7c]{margin-top:10px;padding-top:8px;border-top:1px solid rgba(255,255,255,.1);color:#fff9;font-size:10px;text-align:center}.legend-items[data-v-ab4f1a7c]{display:flex;flex-direction:column;gap:4px}.legend-item[data-v-ab4f1a7c]{display:flex;align-items:center;gap:6px}.legend-icon[data-v-ab4f1a7c]{width:8px;height:8px;border-radius:50%;border:1px solid rgba(255,255,255,.8);box-shadow:0 1px 2px #0003;flex-shrink:0}.legend-icon.cluster-icon[data-v-ab4f1a7c]{width:16px;height:16px;border-radius:50%;border:1px solid #AAE8E8;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.legend-line[data-v-ab4f1a7c]{width:16px;height:2px;border-radius:1px;flex-shrink:0;position:relative}.legend-line-dashed[data-v-ab4f1a7c]{background-image:repeating-linear-gradient(90deg,currentColor 0px,currentColor 4px,transparent 4px,transparent 8px)!important;background-color:transparent!important}.legend-line-dashed[style*="#FFC246"][data-v-ab4f1a7c]{color:#ffc246!important}.legend-line-dashed[style*="#ea580c"][data-v-ab4f1a7c]{color:#ea580c!important}.marker-highlight{position:relative!important;z-index:1000!important;animation:marker-glow-ab4f1a7c 1s ease-in-out infinite!important;border-radius:50%!important;box-shadow:0 0 0 3px #a5e5b6,0 0 8px #a5e5b6,0 0 16px #a5e5b6!important;transform:scale(1.2)!important}@keyframes marker-glow-ab4f1a7c{0%,to{box-shadow:0 0 0 3px #a5e5b6,0 0 8px #a5e5b6,0 0 16px #a5e5b6;filter:brightness(1)}50%{box-shadow:0 0 0 5px #a5e5b6,0 0 12px #a5e5b6,0 0 24px #a5e5b6;filter:brightness(1.3)}}@keyframes pulse-highlight-ab4f1a7c{0%{box-shadow:0 0 #3b82f6b3}70%{box-shadow:0 0 0 8px #3b82f600}to{box-shadow:0 0 #3b82f600}}.leaflet-popup-content-wrapper{background:#0006!important;color:#fff!important;border-radius:15px!important;box-shadow:0 8px 32px #0000004d!important;border:1px solid rgba(255,255,255,.1)!important;-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important}.leaflet-popup-tip{background:#0006!important;border:1px solid rgba(255,255,255,.1)!important}.leaflet-popup-close-button{color:#fff9!important;font-size:18px!important}.leaflet-popup-close-button:hover{color:#fff!important}.custom-div-icon,.custom-cluster-icon{background:transparent!important;border:none!important}.custom-cluster-icon div{transition:all .3s ease!important;cursor:pointer!important}.custom-cluster-icon:hover div{transform:scale(1.1)!important;box-shadow:0 6px 16px #aae8e880!important}.leaflet-control-zoom{border:1px solid rgba(255,255,255,.1)!important;border-radius:15px!important;overflow:hidden;-webkit-backdrop-filter:blur(20px)!important;backdrop-filter:blur(20px)!important}.leaflet-control-zoom a{background-color:#0006!important;color:#fff!important;border-bottom:1px solid rgba(255,255,255,.1)!important;transition:all .2s ease!important}.leaflet-control-zoom a:hover{background-color:#ffffff1a!important;color:#fff!important}.leaflet-control-attribution{background-color:#1f2937cc!important;color:#9ca3af!important;border-top:1px solid rgba(75,85,99,.3)!important;border-radius:4px!important;padding:4px 8px!important;font-size:11px!important}.leaflet-control-attribution a{color:#60a5fa!important;text-decoration:none}.leaflet-control-attribution a:hover{color:#93c5fd!important;text-decoration:underline}.leaflet-bottom.leaflet-left .leaflet-control-attribution{margin-left:10px!important;margin-bottom:10px!important}.map-attribution[data-v-ab4f1a7c]{position:absolute;bottom:10px;left:10px;background:#0006;color:#fff9;border:1px solid rgba(255,255,255,.1);border-radius:15px;padding:4px 8px;font-size:10px;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:1000}@media (max-width: 640px){.leaflet-control-attribution{display:none!important}}.plotly-chart[data-v-9766a4d1]{background:transparent!important}.ml-0[data-v-4afde13e]{margin-left:0rem}.ml-4[data-v-4afde13e]{margin-left:1rem}.ml-8[data-v-4afde13e]{margin-left:2rem}.ml-12[data-v-4afde13e]{margin-left:3rem}.ml-16[data-v-4afde13e]{margin-left:4rem}.ml-20[data-v-4afde13e]{margin-left:5rem}.ml-24[data-v-4afde13e]{margin-left:6rem}.ml-28[data-v-4afde13e]{margin-left:7rem}.ml-32[data-v-4afde13e]{margin-left:8rem}.glass-card[data-v-854f5f55]{background:#ffffff0d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.1)} diff --git a/repeater/web/html/assets/index-D7gLSH5-.css b/repeater/web/html/assets/index-D7gLSH5-.css deleted file mode 100644 index 1577ef8..0000000 --- a/repeater/web/html/assets/index-D7gLSH5-.css +++ /dev/null @@ -1 +0,0 @@ -@tailwind base;@tailwind components;@tailwind utilities;:root{--vt-c-white: #ffffff;--vt-c-white-soft: #f8f8f8;--vt-c-white-mute: #f2f2f2;--vt-c-black: #181818;--vt-c-black-soft: #222222;--vt-c-black-mute: #282828;--vt-c-indigo: #2c3e50;--vt-c-divider-light-1: rgba(60, 60, 60, .29);--vt-c-divider-light-2: rgba(60, 60, 60, .12);--vt-c-divider-dark-1: rgba(84, 84, 84, .65);--vt-c-divider-dark-2: rgba(84, 84, 84, .48);--vt-c-text-light-1: var(--vt-c-indigo);--vt-c-text-light-2: rgba(60, 60, 60, .66);--vt-c-text-dark-1: var(--vt-c-white);--vt-c-text-dark-2: rgba(235, 235, 235, .64)}:root{--color-background: var(--vt-c-white);--color-background-soft: var(--vt-c-white-soft);--color-background-mute: var(--vt-c-white-mute);--color-border: var(--vt-c-divider-light-2);--color-border-hover: var(--vt-c-divider-light-1);--color-heading: var(--vt-c-text-light-1);--color-text: var(--vt-c-text-light-1);--section-gap: 160px}@media (prefers-color-scheme: dark){:root{--color-background: var(--vt-c-black);--color-background-soft: var(--vt-c-black-soft);--color-background-mute: var(--vt-c-black-mute);--color-border: var(--vt-c-divider-dark-2);--color-border-hover: var(--vt-c-divider-dark-1);--color-heading: var(--vt-c-text-dark-1);--color-text: var(--vt-c-text-dark-2)}}*,*:before,*:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:var(--color-text);background:var(--color-background);transition:color .5s,background-color .5s;line-height:1.6;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-left-\[92px\]{left:-92px}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.-top-\[79px\]{top:-79px}.-top-\[94px\]{top:-94px}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-5{left:1.25rem}.left-\[246px\]{left:246px}.left-\[575px\]{left:575px}.right-1{right:.25rem}.right-2{right:.5rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[373px\]{top:373px}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[9998\]{z-index:9998}.z-\[999999\]{z-index:999999}.z-\[99999\]{z-index:99999}.col-span-1{grid-column:span 1 / span 1}.col-span-2{grid-column:span 2 / span 2}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.ml-24{margin-left:6rem}.ml-28{margin-left:7rem}.ml-32{margin-left:8rem}.ml-4{margin-left:1rem}.ml-8{margin-left:2rem}.ml-auto{margin-left:auto}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-80{height:20rem}.h-96{height:24rem}.h-\[30px\]{height:30px}.h-\[35px\]{height:35px}.h-\[512px\]{height:512px}.h-full{height:100%}.h-px{height:1px}.max-h-0{max-height:0px}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-\[600px\]{max-height:600px}.max-h-\[70vh\]{max-height:70vh}.max-h-\[90vh\]{max-height:90vh}.max-h-screen{max-height:100vh}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[196px\]{width:196px}.w-\[285px\]{width:285px}.w-\[35px\]{width:35px}.w-\[705px\]{width:705px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[120px\]{min-width:120px}.min-w-full{min-width:100%}.max-w-20{max-width:5rem}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-\[24\.22deg\]{--tw-rotate: -24.22deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-white\/5>:not([hidden])~:not([hidden]){border-color:#ffffff0d}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-\[15px\]{border-radius:15px}.rounded-\[20px\]{border-radius:20px}.rounded-\[8px\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-accent-green\/20{border-color:#a5e5b633}.border-accent-green\/30{border-color:#a5e5b64d}.border-accent-green\/40{border-color:#a5e5b666}.border-accent-green\/50{border-color:#a5e5b680}.border-accent-green\/60{border-color:#a5e5b699}.border-accent-purple\/50{border-color:#eba0fc80}.border-accent-red\/20{border-color:#fb787b33}.border-accent-red\/30{border-color:#fb787b4d}.border-accent-red\/50{border-color:#fb787b80}.border-blue-500\/30{border-color:#3b82f64d}.border-blue-500\/50{border-color:#3b82f680}.border-cyan-400\/30{border-color:#22d3ee4d}.border-cyan-400\/40{border-color:#22d3ee66}.border-dark-border{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.border-dark-border\/50{border-color:#4b4b4b80}.border-gray-500\/50{border-color:#6b728080}.border-gray-700\/50{border-color:#37415180}.border-orange-400\/40{border-color:#fb923c66}.border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-primary\/20{border-color:#aae8e833}.border-primary\/30{border-color:#aae8e84d}.border-primary\/40{border-color:#aae8e866}.border-primary\/50{border-color:#aae8e880}.border-primary\/60{border-color:#aae8e899}.border-red-500\/50{border-color:#ef444480}.border-secondary{--tw-border-opacity: 1;border-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-secondary\/30{border-color:#ffc2464d}.border-secondary\/40{border-color:#ffc24666}.border-secondary\/50{border-color:#ffc24680}.border-secondary\/70{border-color:#ffc246b3}.border-transparent{border-color:transparent}.border-white\/10{border-color:#ffffff1a}.border-white\/20{border-color:#fff3}.border-white\/30{border-color:#ffffff4d}.border-white\/5{border-color:#ffffff0d}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-yellow-500\/50{border-color:#eab30880}.border-l-accent-cyan{--tw-border-opacity: 1;border-left-color:rgb(209 230 228 / var(--tw-border-opacity, 1))}.border-l-accent-green{--tw-border-opacity: 1;border-left-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.border-l-accent-purple{--tw-border-opacity: 1;border-left-color:rgb(235 160 252 / var(--tw-border-opacity, 1))}.border-l-accent-red{--tw-border-opacity: 1;border-left-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.border-l-gray-500{--tw-border-opacity: 1;border-left-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-l-primary{--tw-border-opacity: 1;border-left-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-l-secondary{--tw-border-opacity: 1;border-left-color:rgb(255 194 70 / var(--tw-border-opacity, 1))}.border-t-blue-400{--tw-border-opacity: 1;border-top-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-t-green-400{--tw-border-opacity: 1;border-top-color:rgb(74 222 128 / var(--tw-border-opacity, 1))}.border-t-primary{--tw-border-opacity: 1;border-top-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.border-t-purple-400{--tw-border-opacity: 1;border-top-color:rgb(192 132 252 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.border-t-white\/70{border-top-color:#ffffffb3}.bg-\[\#0B1014\]{--tw-bg-opacity: 1;background-color:rgb(11 16 20 / var(--tw-bg-opacity, 1))}.bg-\[\#1A1E1F\]{--tw-bg-opacity: 1;background-color:rgb(26 30 31 / var(--tw-bg-opacity, 1))}.bg-\[\#212122\]{--tw-bg-opacity: 1;background-color:rgb(33 33 34 / var(--tw-bg-opacity, 1))}.bg-\[\#223231\]{--tw-bg-opacity: 1;background-color:rgb(34 50 49 / var(--tw-bg-opacity, 1))}.bg-\[\#588187\]{--tw-bg-opacity: 1;background-color:rgb(88 129 135 / var(--tw-bg-opacity, 1))}.bg-\[\#95F3AE\]{--tw-bg-opacity: 1;background-color:rgb(149 243 174 / var(--tw-bg-opacity, 1))}.bg-accent-cyan{--tw-bg-opacity: 1;background-color:rgb(209 230 228 / var(--tw-bg-opacity, 1))}.bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.bg-accent-green\/10{background-color:#a5e5b61a}.bg-accent-green\/20{background-color:#a5e5b633}.bg-accent-purple{--tw-bg-opacity: 1;background-color:rgb(235 160 252 / var(--tw-bg-opacity, 1))}.bg-accent-purple\/20{background-color:#eba0fc33}.bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.bg-accent-red\/10{background-color:#fb787b1a}.bg-accent-red\/20{background-color:#fb787b33}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-black\/80{background-color:#000c}.bg-black\/90{background-color:#000000e6}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-cyan-400{--tw-bg-opacity: 1;background-color:rgb(34 211 238 / var(--tw-bg-opacity, 1))}.bg-cyan-400\/20{background-color:#22d3ee33}.bg-dark-bg{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity, 1))}.bg-dark-bg\/30{background-color:#09090b4d}.bg-dark-bg\/50{background-color:#09090b80}.bg-dark-card\/30{background-color:#0000004d}.bg-dark-card\/90{background-color:#000000e6}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-500\/20{background-color:#6b728033}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-gray-900\/20{background-color:#11182733}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(170 232 232 / var(--tw-bg-opacity, 1))}.bg-primary\/10{background-color:#aae8e81a}.bg-primary\/20{background-color:#aae8e833}.bg-primary\/5{background-color:#aae8e80d}.bg-primary\/70{background-color:#aae8e8b3}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500\/20{background-color:#ef444433}.bg-red-900\/20{background-color:#7f1d1d33}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(255 194 70 / var(--tw-bg-opacity, 1))}.bg-secondary\/20{background-color:#ffc24633}.bg-secondary\/30{background-color:#ffc2464d}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/20{background-color:#fff3}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/20{background-color:#eab30833}.bg-yellow-900\/20{background-color:#713f1233}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-500\/20{--tw-gradient-from: rgb(59 130 246 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-400\/25{--tw-gradient-from: rgb(34 211 238 / .25) var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/20{--tw-gradient-from: rgb(6 182 212 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500\/20{--tw-gradient-from: rgb(249 115 22 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary{--tw-gradient-from: #AAE8E8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(170 232 232 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-400\/30{--tw-gradient-from: rgb(250 204 21 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(250 204 21 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-accent-green{--tw-gradient-to: #A5E5B6 var(--tw-gradient-to-position)}.to-cyan-200\/10{--tw-gradient-to: rgb(165 243 252 / .1) var(--tw-gradient-to-position)}.to-cyan-400\/20{--tw-gradient-to: rgb(34 211 238 / .2) var(--tw-gradient-to-position)}.to-cyan-500\/20{--tw-gradient-to: rgb(6 182 212 / .2) var(--tw-gradient-to-position)}.to-orange-400\/30{--tw-gradient-to: rgb(251 146 60 / .3) var(--tw-gradient-to-position)}.to-yellow-500\/20{--tw-gradient-to: rgb(234 179 8 / .2) var(--tw-gradient-to-position)}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[15px\]{padding:15px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-9{padding-left:2.25rem}.pr-4{padding-right:1rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Noto Sans,-apple-system,Roboto,Helvetica,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[30px\]{font-size:30px}.text-\[35px\]{font-size:35px}.text-\[8px\]{font-size:8px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.text-\[\#212122\]{--tw-text-opacity: 1;color:rgb(33 33 34 / var(--tw-text-opacity, 1))}.text-\[\#C3C3C3\]{--tw-text-opacity: 1;color:rgb(195 195 195 / var(--tw-text-opacity, 1))}.text-\[\#D9D9D9\]{--tw-text-opacity: 1;color:rgb(217 217 217 / var(--tw-text-opacity, 1))}.text-accent-cyan{--tw-text-opacity: 1;color:rgb(209 230 228 / var(--tw-text-opacity, 1))}.text-accent-green{--tw-text-opacity: 1;color:rgb(165 229 182 / var(--tw-text-opacity, 1))}.text-accent-green\/90{color:#a5e5b6e6}.text-accent-purple{--tw-text-opacity: 1;color:rgb(235 160 252 / var(--tw-text-opacity, 1))}.text-accent-red{--tw-text-opacity: 1;color:rgb(251 120 123 / var(--tw-text-opacity, 1))}.text-accent-red\/80{color:#fb787bcc}.text-accent-red\/90{color:#fb787be6}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-400\/60{color:#22d3ee99}.text-dark-bg{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity, 1))}.text-dark-text{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.text-dark-text\/60{color:#adadad99}.text-dark-text\/80{color:#adadadcc}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-400\/60{color:#fb923c99}.text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.text-primary\/80{color:#aae8e8cc}.text-primary\/90{color:#aae8e8e6}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-secondary{--tw-text-opacity: 1;color:rgb(255 194 70 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/30{color:#ffffff4d}.text-white\/40{color:#fff6}.text-white\/50{color:#ffffff80}.text-white\/60{color:#fff9}.text-white\/70{color:#ffffffb3}.text-white\/80{color:#fffc}.text-white\/90{color:#ffffffe6}.text-yellow-200{--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.placeholder-white\/50::-moz-placeholder{color:#ffffff80}.placeholder-white\/50::placeholder{color:#ffffff80}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.mix-blend-screen{mix-blend-mode:screen}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_6px_0_rgba\(170\,232\,232\,0\.20\)\]{--tw-shadow: 0 0 6px 0 rgba(170,232,232,.2);--tw-shadow-colored: 0 0 6px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-accent-green\/50{--tw-shadow-color: rgb(165 229 182 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary\/30{--tw-shadow-color: rgb(170 232 232 / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-yellow-400\/20{--tw-shadow-color: rgb(250 204 21 / .2);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[120px\]{--tw-blur: blur(120px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\[50px\]{--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.glass-card{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:#0006}.glass-card-green{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#2222226e 1.17%,#8787881a 99.82%)}.glass-card-orange{border-radius:10px;--tw-backdrop-blur: blur(50px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background:linear-gradient(91deg,#fb787b33 1.17%,#fb787b1a 99.82%)}.last\:border-b-0:last-child{border-bottom-width:0px}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-dark-border:hover{--tw-border-opacity: 1;border-color:rgb(75 75 75 / var(--tw-border-opacity, 1))}.hover\:border-orange-400\/60:hover{border-color:#fb923c99}.hover\:border-primary:hover{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.hover\:border-primary\/50:hover{border-color:#aae8e880}.hover\:border-white\/30:hover{border-color:#ffffff4d}.hover\:bg-\[\#2A2E2F\]:hover{--tw-bg-opacity: 1;background-color:rgb(42 46 47 / var(--tw-bg-opacity, 1))}.hover\:bg-accent-green\/10:hover{background-color:#a5e5b61a}.hover\:bg-accent-green\/20:hover{background-color:#a5e5b633}.hover\:bg-accent-green\/30:hover{background-color:#a5e5b64d}.hover\:bg-accent-purple\/30:hover{background-color:#eba0fc4d}.hover\:bg-accent-red\/10:hover{background-color:#fb787b1a}.hover\:bg-accent-red\/20:hover{background-color:#fb787b33}.hover\:bg-accent-red\/30:hover{background-color:#fb787b4d}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/10:hover{background-color:#aae8e81a}.hover\:bg-primary\/30:hover{background-color:#aae8e84d}.hover\:bg-primary\/5:hover{background-color:#aae8e80d}.hover\:bg-primary\/90:hover{background-color:#aae8e8e6}.hover\:bg-red-500\/30:hover{background-color:#ef44444d}.hover\:bg-secondary\/90:hover{background-color:#ffc246e6}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/20:hover{background-color:#fff3}.hover\:bg-white\/5:hover{background-color:#ffffff0d}.hover\:from-cyan-500\/30:hover{--tw-gradient-from: rgb(6 182 212 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400\/30:hover{--tw-gradient-to: rgb(34 211 238 / .3) var(--tw-gradient-to-position)}.hover\:text-accent-green\/80:hover{color:#a5e5b6cc}.hover\:text-accent-red\/80:hover{color:#fb787bcc}.hover\:text-dark-text:hover{--tw-text-opacity: 1;color:rgb(173 173 173 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.hover\:text-primary\/80:hover{color:#aae8e8cc}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-white\/80:hover{color:#fffc}.hover\:shadow-primary\/20:hover{--tw-shadow-color: rgb(170 232 232 / .2);--tw-shadow: var(--tw-shadow-colored)}.hover\:shadow-secondary\/20:hover{--tw-shadow-color: rgb(255 194 70 / .2);--tw-shadow: var(--tw-shadow-colored)}.focus\:border-accent-purple\/50:focus{border-color:#eba0fc80}.focus\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary\/20:focus{--tw-ring-color: rgb(170 232 232 / .2)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border-gray-500\/20:disabled{border-color:#6b728033}.disabled\:bg-gray-500\/10:disabled{background-color:#6b72801a}.disabled\:text-gray-400:disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:border-white\/50{border-color:#ffffff80}.group:hover .group-hover\:text-primary{--tw-text-opacity: 1;color:rgb(170 232 232 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:border-primary{--tw-border-opacity: 1;border-color:rgb(170 232 232 / var(--tw-border-opacity, 1))}.peer:checked~.peer-checked\:bg-primary\/20{background-color:#aae8e833}.group:has(:checked) .group-has-\[\:checked\]\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green{--tw-border-opacity: 1;border-color:rgb(165 229 182 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-green\/50{border-color:#a5e5b680}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red{--tw-border-opacity: 1;border-color:rgb(251 120 123 / var(--tw-border-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:border-accent-red\/50{border-color:#fb787b80}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green{--tw-bg-opacity: 1;background-color:rgb(165 229 182 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-green\/10{background-color:#a5e5b61a}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red{--tw-bg-opacity: 1;background-color:rgb(251 120 123 / var(--tw-bg-opacity, 1))}.group:has(:checked) .group-has-\[\:checked\]\:bg-accent-red\/10{background-color:#fb787b1a}@media (min-width: 640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:p-\[15px\]{padding:15px}}@keyframes sparkline-draw-ad12b3cb{0%{stroke-dasharray:1000;stroke-dashoffset:1000}to{stroke-dasharray:1000;stroke-dashoffset:0}}.sparkline-animate[data-v-ad12b3cb]{animation:sparkline-draw-ad12b3cb 1s ease-out}.glass-card[data-v-a5eb8c7f]{background:#000000b3;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.1)}@keyframes ping-a5eb8c7f{75%,to{transform:scale(2);opacity:0}}@keyframes ping-fast-a5eb8c7f{0%{transform:scale(1);opacity:1}75%,to{transform:scale(4);opacity:0}}.animate-ping[data-v-a5eb8c7f]{animation:ping-a5eb8c7f cubic-bezier(0,0,.2,1) infinite}.animate-ping-fast[data-v-a5eb8c7f]{animation:ping-fast-a5eb8c7f .8s cubic-bezier(0,0,.2,1) 3}body{background-color:#09090b!important;color:#fff!important;margin:0;padding:0}html{scrollbar-width:thin;scrollbar-color:#374151 #1f2937}html::-webkit-scrollbar{width:8px}html::-webkit-scrollbar-track{background:#1f2937}html::-webkit-scrollbar-thumb{background-color:#374151;border-radius:4px}html::-webkit-scrollbar-thumb:hover{background-color:#4b5563}.sparkline-container[data-v-574bf55e]{background:#0006;border-radius:10px;padding:24px;-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.sparkline-svg[data-v-574bf55e]{transition:all .2s ease-out}.sparkline-path[data-v-574bf55e]{transition:stroke-width .2s ease-out}.sparkline-path.animate-draw[data-v-574bf55e]{stroke-dasharray:1000;stroke-dashoffset:1000;animation:drawPath-574bf55e 1s ease-out forwards}.sparkline-fill[data-v-574bf55e]{transition:opacity .3s ease-out}.sparkline-dot[data-v-574bf55e]{transition:all .2s ease-out}@keyframes drawPath-574bf55e{to{stroke-dashoffset:0}}@keyframes fadeInFill-574bf55e{to{opacity:1}}@keyframes fadeInDot-574bf55e{to{opacity:1}}.sparkline-container:hover .sparkline-path[data-v-574bf55e]{stroke-width:2.5}.sparkline-container:hover .sparkline-dot[data-v-574bf55e]{r:3;animation:pulse-574bf55e 2s infinite}@keyframes pulse-574bf55e{0%,to{opacity:1}50%{opacity:.7}}canvas[data-v-2ece57e8]{width:100%;height:100%}.modal-enter-active[data-v-3b73bfd6]{transition:all .3s cubic-bezier(.4,0,.2,1)}.modal-leave-active[data-v-3b73bfd6]{transition:all .2s ease-in}.modal-enter-from[data-v-3b73bfd6]{opacity:0;transform:scale(.95) translateY(-10px)}.modal-leave-to[data-v-3b73bfd6]{opacity:0;transform:scale(1.05)}.custom-scrollbar[data-v-3b73bfd6]{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-track{background:#ffffff1a;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:3px}.custom-scrollbar[data-v-3b73bfd6]::-webkit-scrollbar-thumb:hover{background:#fff6}.glass-card[data-v-3b73bfd6]{-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px)}.packet-list-enter-active[data-v-d363f6a5],.packet-list-leave-active[data-v-d363f6a5],.packet-list-move[data-v-d363f6a5]{transition:all .4s ease-out}.packet-list-enter-from[data-v-d363f6a5]{opacity:0;transform:translateY(-30px) scale(.98)}.packet-list-enter-to[data-v-d363f6a5],.packet-list-leave-from[data-v-d363f6a5]{opacity:1;transform:translateY(0) scale(1)}.packet-list-leave-to[data-v-d363f6a5]{opacity:0;transform:translateY(-20px) scale(.95)}.packet-row[data-v-d363f6a5]{position:relative;transition:all .3s ease}.packet-list-enter-active .packet-row[data-v-d363f6a5]{background:linear-gradient(90deg,rgba(78,201,176,.1) 0%,rgba(78,201,176,.05) 50%,transparent 100%);box-shadow:0 0 20px #4ec9b033;border-left:3px solid rgba(78,201,176,.6);border-radius:8px;padding-left:12px}.packet-row[data-v-d363f6a5]:hover{background:#ffffff05;border-radius:8px;transition:background .2s ease}@media (max-width: 1023px){.grid-cols-12[data-v-d363f6a5]{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-12>div[data-v-d363f6a5]:nth-child(n+7){display:none}.flex.justify-between[data-v-d363f6a5]{flex-direction:column;gap:1rem;align-items:stretch}.flex.items-center.gap-3[data-v-d363f6a5]:last-child{flex-direction:column;gap:1rem}.flex.flex-col[data-v-d363f6a5]{flex-direction:row;align-items:center;gap:.75rem}.flex.flex-col label[data-v-d363f6a5]{margin-bottom:0;min-width:60px}}@media (max-width: 640px){.grid-cols-12[data-v-d363f6a5]{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12>div[data-v-d363f6a5]:nth-child(n+4){display:none}.flex.items-center.gap-3[data-v-d363f6a5]:last-child{flex-direction:column;gap:.75rem}.flex.flex-col[data-v-d363f6a5]{flex-direction:column;align-items:stretch}.flex.flex-col label[data-v-d363f6a5]{margin-bottom:.25rem;min-width:auto}}.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.leaflet-container[data-v-988767ac]{background:#0f1419!important;border-radius:8px}[data-v-988767ac] .leaflet-control-container{font-family:inherit}[data-v-988767ac] .leaflet-control-zoom{background:#2a2a2ae6!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:6px!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}[data-v-988767ac] .leaflet-control-zoom a{background:transparent!important;color:#fff!important;border:none!important;transition:all .3s ease}[data-v-988767ac] .leaflet-control-zoom a:hover{background:#a5e8b633!important;color:#a5e5b6!important}[data-v-988767ac] .leaflet-control-attribution{background:#0f1419cc!important;color:#9ca3af!important;border-radius:6px 0 0!important;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}[data-v-988767ac] .leaflet-control-attribution a{color:#a5e5b6!important}[data-v-988767ac] .leaflet-popup-content-wrapper{background:linear-gradient(135deg,#1f2937,#111827)!important;color:#fff;border-radius:12px!important;border:1px solid rgba(165,232,182,.2)!important;box-shadow:0 10px 25px #00000080!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}[data-v-988767ac] .leaflet-popup-tip{background:#1f2937!important;border:1px solid rgba(165,232,182,.2)!important}[data-v-988767ac] .leaflet-container *,[data-v-988767ac] .leaflet-container{box-sizing:content-box}[data-v-988767ac] .connection-line{transition:all .3s ease}[data-v-988767ac] .animated-line{pointer-events:none}[data-v-988767ac] .leaflet-overlay-pane svg{shape-rendering:geometricPrecision}@keyframes pulse-direct-988767ac{0%,to{opacity:.9;filter:drop-shadow(0 0 3px #A5E5B6)}50%{opacity:1;filter:drop-shadow(0 0 8px #A5E5B6)}}@keyframes marker-glow-988767ac{0%,to{filter:brightness(1) drop-shadow(0 0 8px #A5E5B6) drop-shadow(0 0 8px #A5E5B6)}50%{filter:brightness(2.5) drop-shadow(0 0 25px #A5E5B6) drop-shadow(0 0 25px #A5E5B6) drop-shadow(0 0 35px #A5E5B6)}}@keyframes marker-pulse-988767ac{0%,to{box-shadow:0 0 #a5e8b6cc}50%{box-shadow:0 0 0 20px #a5e8b600}}[data-v-988767ac] .leaflet-marker-icon{transition:all .3s ease}[data-v-988767ac] .marker-highlight{z-index:1000!important;animation:marker-glow-988767ac 1s ease-in-out infinite,marker-pulse-988767ac 1s ease-in-out infinite;border-radius:50%!important;outline:3px solid #A5E5B6!important;outline-offset:2px!important}.plotly-chart[data-v-9766a4d1]{background:transparent!important}.ml-0[data-v-4afde13e]{margin-left:0rem}.ml-4[data-v-4afde13e]{margin-left:1rem}.ml-8[data-v-4afde13e]{margin-left:2rem}.ml-12[data-v-4afde13e]{margin-left:3rem}.ml-16[data-v-4afde13e]{margin-left:4rem}.ml-20[data-v-4afde13e]{margin-left:5rem}.ml-24[data-v-4afde13e]{margin-left:6rem}.ml-28[data-v-4afde13e]{margin-left:7rem}.ml-32[data-v-4afde13e]{margin-left:8rem}.glass-card[data-v-854f5f55]{background:#ffffff0d;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.1)} diff --git a/repeater/web/html/assets/index-CM754kzY.js b/repeater/web/html/assets/index-_Dem5-aE.js similarity index 55% rename from repeater/web/html/assets/index-CM754kzY.js rename to repeater/web/html/assets/index-_Dem5-aE.js index bfab2b3..0ce86fe 100644 --- a/repeater/web/html/assets/index-CM754kzY.js +++ b/repeater/web/html/assets/index-_Dem5-aE.js @@ -1,181 +1,222 @@ -(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const J of document.querySelectorAll('link[rel="modulepreload"]'))j(J);new MutationObserver(J=>{for(const mt of J)if(mt.type==="childList")for(const kt of mt.addedNodes)kt.tagName==="LINK"&&kt.rel==="modulepreload"&&j(kt)}).observe(document,{childList:!0,subtree:!0});function z(J){const mt={};return J.integrity&&(mt.integrity=J.integrity),J.referrerPolicy&&(mt.referrerPolicy=J.referrerPolicy),J.crossOrigin==="use-credentials"?mt.credentials="include":J.crossOrigin==="anonymous"?mt.credentials="omit":mt.credentials="same-origin",mt}function j(J){if(J.ep)return;J.ep=!0;const mt=z(J);fetch(J.href,mt)}})();/** +(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const K of document.querySelectorAll('link[rel="modulepreload"]'))B(K);new MutationObserver(K=>{for(const pt of K)if(pt.type==="childList")for(const _t of pt.addedNodes)_t.tagName==="LINK"&&_t.rel==="modulepreload"&&B(_t)}).observe(document,{childList:!0,subtree:!0});function E(K){const pt={};return K.integrity&&(pt.integrity=K.integrity),K.referrerPolicy&&(pt.referrerPolicy=K.referrerPolicy),K.crossOrigin==="use-credentials"?pt.credentials="include":K.crossOrigin==="anonymous"?pt.credentials="omit":pt.credentials="same-origin",pt}function B(K){if(K.ep)return;K.ep=!0;const pt=E(K);fetch(K.href,pt)}})();/** * @vue/shared v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function SA(d){const l=Object.create(null);for(const z of d.split(","))l[z]=1;return z=>z in l}const mf={},o_=[],hg=()=>{},j$=()=>!1,w4=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&(d.charCodeAt(2)>122||d.charCodeAt(2)<97),EA=d=>d.startsWith("onUpdate:"),up=Object.assign,CA=(d,l)=>{const z=d.indexOf(l);z>-1&&d.splice(z,1)},U$=Object.prototype.hasOwnProperty,Rh=(d,l)=>U$.call(d,l),iu=Array.isArray,s_=d=>Q2(d)==="[object Map]",k4=d=>Q2(d)==="[object Set]",bC=d=>Q2(d)==="[object Date]",Vu=d=>typeof d=="function",cd=d=>typeof d=="string",Lm=d=>typeof d=="symbol",gf=d=>d!==null&&typeof d=="object",dz=d=>(gf(d)||Vu(d))&&Vu(d.then)&&Vu(d.catch),pz=Object.prototype.toString,Q2=d=>pz.call(d),V$=d=>Q2(d).slice(8,-1),mz=d=>Q2(d)==="[object Object]",LA=d=>cd(d)&&d!=="NaN"&&d[0]!=="-"&&""+parseInt(d,10)===d,b2=SA(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),T4=d=>{const l=Object.create(null);return z=>l[z]||(l[z]=d(z))},H$=/-(\w)/g,dm=T4(d=>d.replace(H$,(l,z)=>z?z.toUpperCase():"")),W$=/\B([A-Z])/g,Ly=T4(d=>d.replace(W$,"-$1").toLowerCase()),A4=T4(d=>d.charAt(0).toUpperCase()+d.slice(1)),h8=T4(d=>d?`on${A4(d)}`:""),f1=(d,l)=>!Object.is(d,l),H5=(d,...l)=>{for(let z=0;z{Object.defineProperty(d,l,{configurable:!0,enumerable:!1,writable:j,value:z})},e4=d=>{const l=parseFloat(d);return isNaN(l)?d:l},q$=d=>{const l=cd(d)?Number(d):NaN;return isNaN(l)?d:l};let wC;const M4=()=>wC||(wC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function pg(d){if(iu(d)){const l={};for(let z=0;z{if(z){const j=z.split($$);j.length>1&&(l[j[0].trim()]=j[1].trim())}}),l}function Xs(d){let l="";if(cd(d))l=d;else if(iu(d))for(let z=0;zf_(z,l))}const vz=d=>!!(d&&d.__v_isRef===!0),na=d=>cd(d)?d:d==null?"":iu(d)||gf(d)&&(d.toString===pz||!Vu(d.toString))?vz(d)?na(d.value):JSON.stringify(d,yz,2):String(d),yz=(d,l)=>vz(l)?yz(d,l.value):s_(l)?{[`Map(${l.size})`]:[...l.entries()].reduce((z,[j,J],mt)=>(z[f8(j,mt)+" =>"]=J,z),{})}:k4(l)?{[`Set(${l.size})`]:[...l.values()].map(z=>f8(z))}:Lm(l)?f8(l):gf(l)&&!iu(l)&&!mz(l)?String(l):l,f8=(d,l="")=>{var z;return Lm(d)?`Symbol(${(z=d.description)!=null?z:l})`:d};/** +**//*! #__NO_SIDE_EFFECTS__ */function BA(d){const s=Object.create(null);for(const E of d.split(","))s[E]=1;return E=>E in s}const mf={},s_=[],dg=()=>{},uG=()=>!1,S4=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&(d.charCodeAt(2)>122||d.charCodeAt(2)<97),NA=d=>d.startsWith("onUpdate:"),ap=Object.assign,jA=(d,s)=>{const E=d.indexOf(s);E>-1&&d.splice(E,1)},cG=Object.prototype.hasOwnProperty,Rh=(d,s)=>cG.call(d,s),au=Array.isArray,l_=d=>Q2(d)==="[object Map]",E4=d=>Q2(d)==="[object Set]",zC=d=>Q2(d)==="[object Date]",Vu=d=>typeof d=="function",sd=d=>typeof d=="string",Cm=d=>typeof d=="symbol",gf=d=>d!==null&&typeof d=="object",CI=d=>(gf(d)||Vu(d))&&Vu(d.then)&&Vu(d.catch),LI=Object.prototype.toString,Q2=d=>LI.call(d),hG=d=>Q2(d).slice(8,-1),PI=d=>Q2(d)==="[object Object]",UA=d=>sd(d)&&d!=="NaN"&&d[0]!=="-"&&""+parseInt(d,10)===d,b2=BA(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),C4=d=>{const s=Object.create(null);return E=>s[E]||(s[E]=d(E))},fG=/-(\w)/g,cm=C4(d=>d.replace(fG,(s,E)=>E?E.toUpperCase():"")),dG=/\B([A-Z])/g,Py=C4(d=>d.replace(dG,"-$1").toLowerCase()),L4=C4(d=>d.charAt(0).toUpperCase()+d.slice(1)),y8=C4(d=>d?`on${L4(d)}`:""),p1=(d,s)=>!Object.is(d,s),G5=(d,...s)=>{for(let E=0;E{Object.defineProperty(d,s,{configurable:!0,enumerable:!1,writable:B,value:E})},o4=d=>{const s=parseFloat(d);return isNaN(s)?d:s},pG=d=>{const s=sd(d)?Number(d):NaN;return isNaN(s)?d:s};let OC;const P4=()=>OC||(OC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function hm(d){if(au(d)){const s={};for(let E=0;E{if(E){const B=E.split(gG);B.length>1&&(s[B[0].trim()]=B[1].trim())}}),s}function jo(d){let s="";if(sd(d))s=d;else if(au(d))for(let E=0;Ed_(E,s))}const zI=d=>!!(d&&d.__v_isRef===!0),Qi=d=>sd(d)?d:d==null?"":au(d)||gf(d)&&(d.toString===LI||!Vu(d.toString))?zI(d)?Qi(d.value):JSON.stringify(d,OI,2):String(d),OI=(d,s)=>zI(s)?OI(d,s.value):l_(s)?{[`Map(${s.size})`]:[...s.entries()].reduce((E,[B,K],pt)=>(E[x8(B,pt)+" =>"]=K,E),{})}:E4(s)?{[`Set(${s.size})`]:[...s.values()].map(E=>x8(E))}:Cm(s)?x8(s):gf(s)&&!au(s)&&!PI(s)?String(s):s,x8=(d,s="")=>{var E;return Cm(d)?`Symbol(${(E=d.description)!=null?E:s})`:d};/** * @vue/reactivity v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Yp;class xz{constructor(l=!1){this.detached=l,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Yp,!l&&Yp&&(this.index=(Yp.scopes||(Yp.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let l,z;if(this.scopes)for(l=0,z=this.scopes.length;l0&&--this._on===0&&(Yp=this.prevScope,this.prevScope=void 0)}stop(l){if(this._active){this._active=!1;let z,j;for(z=0,j=this.effects.length;z0)return;if(k2){let l=k2;for(k2=void 0;l;){const z=l.next;l.next=void 0,l.flags&=-9,l=z}}let d;for(;w2;){let l=w2;for(w2=void 0;l;){const z=l.next;if(l.next=void 0,l.flags&=-9,l.flags&1)try{l.trigger()}catch(j){d||(d=j)}l=z}}if(d)throw d}function Az(d){for(let l=d.deps;l;l=l.nextDep)l.version=-1,l.prevActiveLink=l.dep.activeLink,l.dep.activeLink=l}function Mz(d){let l,z=d.depsTail,j=z;for(;j;){const J=j.prevDep;j.version===-1?(j===z&&(z=J),IA(j),eG(j)):l=j,j.dep.activeLink=j.prevActiveLink,j.prevActiveLink=void 0,j=J}d.deps=l,d.depsTail=z}function $8(d){for(let l=d.deps;l;l=l.nextDep)if(l.dep.version!==l.version||l.dep.computed&&(Sz(l.dep.computed)||l.dep.version!==l.version))return!0;return!!d._dirty}function Sz(d){if(d.flags&4&&!(d.flags&16)||(d.flags&=-17,d.globalVersion===D2)||(d.globalVersion=D2,!d.isSSR&&d.flags&128&&(!d.deps&&!d._dirty||!$8(d))))return;d.flags|=2;const l=d.dep,z=Tf,j=Cm;Tf=d,Cm=!0;try{Az(d);const J=d.fn(d._value);(l.version===0||f1(J,d._value))&&(d.flags|=128,d._value=J,l.version++)}catch(J){throw l.version++,J}finally{Tf=z,Cm=j,Mz(d),d.flags&=-3}}function IA(d,l=!1){const{dep:z,prevSub:j,nextSub:J}=d;if(j&&(j.nextSub=J,d.prevSub=void 0),J&&(J.prevSub=j,d.nextSub=void 0),z.subs===d&&(z.subs=j,!j&&z.computed)){z.computed.flags&=-5;for(let mt=z.computed.deps;mt;mt=mt.nextDep)IA(mt,!0)}!l&&!--z.sc&&z.map&&z.map.delete(z.key)}function eG(d){const{prevDep:l,nextDep:z}=d;l&&(l.nextDep=z,d.prevDep=void 0),z&&(z.prevDep=l,d.nextDep=void 0)}let Cm=!0;const Ez=[];function ov(){Ez.push(Cm),Cm=!1}function sv(){const d=Ez.pop();Cm=d===void 0?!0:d}function kC(d){const{cleanup:l}=d;if(d.cleanup=void 0,l){const z=Tf;Tf=void 0;try{l()}finally{Tf=z}}}let D2=0;class rG{constructor(l,z){this.sub=l,this.dep=z,this.version=z.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class OA{constructor(l){this.computed=l,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(l){if(!Tf||!Cm||Tf===this.computed)return;let z=this.activeLink;if(z===void 0||z.sub!==Tf)z=this.activeLink=new rG(Tf,this),Tf.deps?(z.prevDep=Tf.depsTail,Tf.depsTail.nextDep=z,Tf.depsTail=z):Tf.deps=Tf.depsTail=z,Cz(z);else if(z.version===-1&&(z.version=this.version,z.nextDep)){const j=z.nextDep;j.prevDep=z.prevDep,z.prevDep&&(z.prevDep.nextDep=j),z.prevDep=Tf.depsTail,z.nextDep=void 0,Tf.depsTail.nextDep=z,Tf.depsTail=z,Tf.deps===z&&(Tf.deps=j)}return z}trigger(l){this.version++,D2++,this.notify(l)}notify(l){PA();try{for(let z=this.subs;z;z=z.prevSub)z.sub.notify()&&z.sub.dep.notify()}finally{zA()}}}function Cz(d){if(d.dep.sc++,d.sub.flags&4){const l=d.dep.computed;if(l&&!d.dep.subs){l.flags|=20;for(let j=l.deps;j;j=j.nextDep)Cz(j)}const z=d.dep.subs;z!==d&&(d.prevSub=z,z&&(z.nextSub=d)),d.dep.subs=d}}const r4=new WeakMap,by=Symbol(""),G8=Symbol(""),F2=Symbol("");function Kp(d,l,z){if(Cm&&Tf){let j=r4.get(d);j||r4.set(d,j=new Map);let J=j.get(z);J||(j.set(z,J=new OA),J.map=j,J.key=z),J.track()}}function ev(d,l,z,j,J,mt){const kt=r4.get(d);if(!kt){D2++;return}const Dt=$t=>{$t&&$t.trigger()};if(PA(),l==="clear")kt.forEach(Dt);else{const $t=iu(d),ee=$t&&LA(z);if($t&&z==="length"){const pe=Number(j);kt.forEach((Be,ir)=>{(ir==="length"||ir===F2||!Lm(ir)&&ir>=pe)&&Dt(Be)})}else switch((z!==void 0||kt.has(void 0))&&Dt(kt.get(z)),ee&&Dt(kt.get(F2)),l){case"add":$t?ee&&Dt(kt.get("length")):(Dt(kt.get(by)),s_(d)&&Dt(kt.get(G8)));break;case"delete":$t||(Dt(kt.get(by)),s_(d)&&Dt(kt.get(G8)));break;case"set":s_(d)&&Dt(kt.get(by));break}}zA()}function nG(d,l){const z=r4.get(d);return z&&z.get(l)}function Jx(d){const l=Uu(d);return l===d?l:(Kp(l,"iterate",F2),cm(d)?l:l.map(Op))}function S4(d){return Kp(d=Uu(d),"iterate",F2),d}const iG={__proto__:null,[Symbol.iterator](){return p8(this,Symbol.iterator,Op)},concat(...d){return Jx(this).concat(...d.map(l=>iu(l)?Jx(l):l))},entries(){return p8(this,"entries",d=>(d[1]=Op(d[1]),d))},every(d,l){return $g(this,"every",d,l,void 0,arguments)},filter(d,l){return $g(this,"filter",d,l,z=>z.map(Op),arguments)},find(d,l){return $g(this,"find",d,l,Op,arguments)},findIndex(d,l){return $g(this,"findIndex",d,l,void 0,arguments)},findLast(d,l){return $g(this,"findLast",d,l,Op,arguments)},findLastIndex(d,l){return $g(this,"findLastIndex",d,l,void 0,arguments)},forEach(d,l){return $g(this,"forEach",d,l,void 0,arguments)},includes(...d){return m8(this,"includes",d)},indexOf(...d){return m8(this,"indexOf",d)},join(d){return Jx(this).join(d)},lastIndexOf(...d){return m8(this,"lastIndexOf",d)},map(d,l){return $g(this,"map",d,l,void 0,arguments)},pop(){return t2(this,"pop")},push(...d){return t2(this,"push",d)},reduce(d,...l){return TC(this,"reduce",d,l)},reduceRight(d,...l){return TC(this,"reduceRight",d,l)},shift(){return t2(this,"shift")},some(d,l){return $g(this,"some",d,l,void 0,arguments)},splice(...d){return t2(this,"splice",d)},toReversed(){return Jx(this).toReversed()},toSorted(d){return Jx(this).toSorted(d)},toSpliced(...d){return Jx(this).toSpliced(...d)},unshift(...d){return t2(this,"unshift",d)},values(){return p8(this,"values",Op)}};function p8(d,l,z){const j=S4(d),J=j[l]();return j!==d&&!cm(d)&&(J._next=J.next,J.next=()=>{const mt=J._next();return mt.value&&(mt.value=z(mt.value)),mt}),J}const aG=Array.prototype;function $g(d,l,z,j,J,mt){const kt=S4(d),Dt=kt!==d&&!cm(d),$t=kt[l];if($t!==aG[l]){const Be=$t.apply(d,mt);return Dt?Op(Be):Be}let ee=z;kt!==d&&(Dt?ee=function(Be,ir){return z.call(this,Op(Be),ir,d)}:z.length>2&&(ee=function(Be,ir){return z.call(this,Be,ir,d)}));const pe=$t.call(kt,ee,j);return Dt&&J?J(pe):pe}function TC(d,l,z,j){const J=S4(d);let mt=z;return J!==d&&(cm(d)?z.length>3&&(mt=function(kt,Dt,$t){return z.call(this,kt,Dt,$t,d)}):mt=function(kt,Dt,$t){return z.call(this,kt,Op(Dt),$t,d)}),J[l](mt,...j)}function m8(d,l,z){const j=Uu(d);Kp(j,"iterate",F2);const J=j[l](...z);return(J===-1||J===!1)&&RA(z[0])?(z[0]=Uu(z[0]),j[l](...z)):J}function t2(d,l,z=[]){ov(),PA();const j=Uu(d)[l].apply(d,z);return zA(),sv(),j}const oG=SA("__proto__,__v_isRef,__isVue"),Lz=new Set(Object.getOwnPropertyNames(Symbol).filter(d=>d!=="arguments"&&d!=="caller").map(d=>Symbol[d]).filter(Lm));function sG(d){Lm(d)||(d=String(d));const l=Uu(this);return Kp(l,"has",d),l.hasOwnProperty(d)}class Pz{constructor(l=!1,z=!1){this._isReadonly=l,this._isShallow=z}get(l,z,j){if(z==="__v_skip")return l.__v_skip;const J=this._isReadonly,mt=this._isShallow;if(z==="__v_isReactive")return!J;if(z==="__v_isReadonly")return J;if(z==="__v_isShallow")return mt;if(z==="__v_raw")return j===(J?mt?vG:Dz:mt?Oz:Iz).get(l)||Object.getPrototypeOf(l)===Object.getPrototypeOf(j)?l:void 0;const kt=iu(l);if(!J){let $t;if(kt&&($t=iG[z]))return $t;if(z==="hasOwnProperty")return sG}const Dt=Reflect.get(l,z,qd(l)?l:j);return(Lm(z)?Lz.has(z):oG(z))||(J||Kp(l,"get",z),mt)?Dt:qd(Dt)?kt&&LA(z)?Dt:Dt.value:gf(Dt)?J?Rz(Dt):Ay(Dt):Dt}}class zz extends Pz{constructor(l=!1){super(!1,l)}set(l,z,j,J){let mt=l[z];if(!this._isShallow){const $t=m1(mt);if(!cm(j)&&!m1(j)&&(mt=Uu(mt),j=Uu(j)),!iu(l)&&qd(mt)&&!qd(j))return $t?!1:(mt.value=j,!0)}const kt=iu(l)&&LA(z)?Number(z)d,k5=d=>Reflect.getPrototypeOf(d);function fG(d,l,z){return function(...j){const J=this.__v_raw,mt=Uu(J),kt=s_(mt),Dt=d==="entries"||d===Symbol.iterator&&kt,$t=d==="keys"&&kt,ee=J[d](...j),pe=z?Y8:l?n4:Op;return!l&&Kp(mt,"iterate",$t?G8:by),{next(){const{value:Be,done:ir}=ee.next();return ir?{value:Be,done:ir}:{value:Dt?[pe(Be[0]),pe(Be[1])]:pe(Be),done:ir}},[Symbol.iterator](){return this}}}}function T5(d){return function(...l){return d==="delete"?!1:d==="clear"?void 0:this}}function dG(d,l){const z={get(J){const mt=this.__v_raw,kt=Uu(mt),Dt=Uu(J);d||(f1(J,Dt)&&Kp(kt,"get",J),Kp(kt,"get",Dt));const{has:$t}=k5(kt),ee=l?Y8:d?n4:Op;if($t.call(kt,J))return ee(mt.get(J));if($t.call(kt,Dt))return ee(mt.get(Dt));mt!==kt&&mt.get(J)},get size(){const J=this.__v_raw;return!d&&Kp(Uu(J),"iterate",by),Reflect.get(J,"size",J)},has(J){const mt=this.__v_raw,kt=Uu(mt),Dt=Uu(J);return d||(f1(J,Dt)&&Kp(kt,"has",J),Kp(kt,"has",Dt)),J===Dt?mt.has(J):mt.has(J)||mt.has(Dt)},forEach(J,mt){const kt=this,Dt=kt.__v_raw,$t=Uu(Dt),ee=l?Y8:d?n4:Op;return!d&&Kp($t,"iterate",by),Dt.forEach((pe,Be)=>J.call(mt,ee(pe),ee(Be),kt))}};return up(z,d?{add:T5("add"),set:T5("set"),delete:T5("delete"),clear:T5("clear")}:{add(J){!l&&!cm(J)&&!m1(J)&&(J=Uu(J));const mt=Uu(this);return k5(mt).has.call(mt,J)||(mt.add(J),ev(mt,"add",J,J)),this},set(J,mt){!l&&!cm(mt)&&!m1(mt)&&(mt=Uu(mt));const kt=Uu(this),{has:Dt,get:$t}=k5(kt);let ee=Dt.call(kt,J);ee||(J=Uu(J),ee=Dt.call(kt,J));const pe=$t.call(kt,J);return kt.set(J,mt),ee?f1(mt,pe)&&ev(kt,"set",J,mt):ev(kt,"add",J,mt),this},delete(J){const mt=Uu(this),{has:kt,get:Dt}=k5(mt);let $t=kt.call(mt,J);$t||(J=Uu(J),$t=kt.call(mt,J)),Dt&&Dt.call(mt,J);const ee=mt.delete(J);return $t&&ev(mt,"delete",J,void 0),ee},clear(){const J=Uu(this),mt=J.size!==0,kt=J.clear();return mt&&ev(J,"clear",void 0,void 0),kt}}),["keys","values","entries",Symbol.iterator].forEach(J=>{z[J]=fG(J,d,l)}),z}function DA(d,l){const z=dG(d,l);return(j,J,mt)=>J==="__v_isReactive"?!d:J==="__v_isReadonly"?d:J==="__v_raw"?j:Reflect.get(Rh(z,J)&&J in j?z:j,J,mt)}const pG={get:DA(!1,!1)},mG={get:DA(!1,!0)},gG={get:DA(!0,!1)};const Iz=new WeakMap,Oz=new WeakMap,Dz=new WeakMap,vG=new WeakMap;function yG(d){switch(d){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function xG(d){return d.__v_skip||!Object.isExtensible(d)?0:yG(V$(d))}function Ay(d){return m1(d)?d:FA(d,!1,uG,pG,Iz)}function Fz(d){return FA(d,!1,hG,mG,Oz)}function Rz(d){return FA(d,!0,cG,gG,Dz)}function FA(d,l,z,j,J){if(!gf(d)||d.__v_raw&&!(l&&d.__v_isReactive))return d;const mt=xG(d);if(mt===0)return d;const kt=J.get(d);if(kt)return kt;const Dt=new Proxy(d,mt===2?j:z);return J.set(d,Dt),Dt}function d1(d){return m1(d)?d1(d.__v_raw):!!(d&&d.__v_isReactive)}function m1(d){return!!(d&&d.__v_isReadonly)}function cm(d){return!!(d&&d.__v_isShallow)}function RA(d){return d?!!d.__v_raw:!1}function Uu(d){const l=d&&d.__v_raw;return l?Uu(l):d}function BA(d){return!Rh(d,"__v_skip")&&Object.isExtensible(d)&&Z8(d,"__v_skip",!0),d}const Op=d=>gf(d)?Ay(d):d,n4=d=>gf(d)?Rz(d):d;function qd(d){return d?d.__v_isRef===!0:!1}function ro(d){return Bz(d,!1)}function _G(d){return Bz(d,!0)}function Bz(d,l){return qd(d)?d:new bG(d,l)}class bG{constructor(l,z){this.dep=new OA,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=z?l:Uu(l),this._value=z?l:Op(l),this.__v_isShallow=z}get value(){return this.dep.track(),this._value}set value(l){const z=this._rawValue,j=this.__v_isShallow||cm(l)||m1(l);l=j?l:Uu(l),f1(l,z)&&(this._rawValue=l,this._value=j?l:Op(l),this.dep.trigger())}}function Ju(d){return qd(d)?d.value:d}const wG={get:(d,l,z)=>l==="__v_raw"?d:Ju(Reflect.get(d,l,z)),set:(d,l,z,j)=>{const J=d[l];return qd(J)&&!qd(z)?(J.value=z,!0):Reflect.set(d,l,z,j)}};function Nz(d){return d1(d)?d:new Proxy(d,wG)}function kG(d){const l=iu(d)?new Array(d.length):{};for(const z in d)l[z]=AG(d,z);return l}class TG{constructor(l,z,j){this._object=l,this._key=z,this._defaultValue=j,this.__v_isRef=!0,this._value=void 0}get value(){const l=this._object[this._key];return this._value=l===void 0?this._defaultValue:l}set value(l){this._object[this._key]=l}get dep(){return nG(Uu(this._object),this._key)}}function AG(d,l,z){const j=d[l];return qd(j)?j:new TG(d,l,z)}class MG{constructor(l,z,j){this.fn=l,this.setter=z,this._value=void 0,this.dep=new OA(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=D2-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!z,this.isSSR=j}notify(){if(this.flags|=16,!(this.flags&8)&&Tf!==this)return Tz(this,!0),!0}get value(){const l=this.dep.track();return Sz(this),l&&(l.version=this.dep.version),this._value}set value(l){this.setter&&this.setter(l)}}function SG(d,l,z=!1){let j,J;return Vu(d)?j=d:(j=d.get,J=d.set),new MG(j,J,z)}const A5={},i4=new WeakMap;let fy;function EG(d,l=!1,z=fy){if(z){let j=i4.get(z);j||i4.set(z,j=[]),j.push(d)}}function CG(d,l,z=mf){const{immediate:j,deep:J,once:mt,scheduler:kt,augmentJob:Dt,call:$t}=z,ee=ei=>J?ei:cm(ei)||J===!1||J===0?rv(ei,1):rv(ei);let pe,Be,ir,vr,Ir=!1,Pr=!1;if(qd(d)?(Be=()=>d.value,Ir=cm(d)):d1(d)?(Be=()=>ee(d),Ir=!0):iu(d)?(Pr=!0,Ir=d.some(ei=>d1(ei)||cm(ei)),Be=()=>d.map(ei=>{if(qd(ei))return ei.value;if(d1(ei))return ee(ei);if(Vu(ei))return $t?$t(ei,2):ei()})):Vu(d)?l?Be=$t?()=>$t(d,2):d:Be=()=>{if(ir){ov();try{ir()}finally{sv()}}const ei=fy;fy=pe;try{return $t?$t(d,3,[vr]):d(vr)}finally{fy=ei}}:Be=hg,l&&J){const ei=Be,jn=J===!0?1/0:J;Be=()=>rv(ei(),jn)}const Wr=bz(),Tn=()=>{pe.stop(),Wr&&Wr.active&&CA(Wr.effects,pe)};if(mt&&l){const ei=l;l=(...jn)=>{ei(...jn),Tn()}}let Ft=Pr?new Array(d.length).fill(A5):A5;const wn=ei=>{if(!(!(pe.flags&1)||!pe.dirty&&!ei))if(l){const jn=pe.run();if(J||Ir||(Pr?jn.some((ai,Qi)=>f1(ai,Ft[Qi])):f1(jn,Ft))){ir&&ir();const ai=fy;fy=pe;try{const Qi=[jn,Ft===A5?void 0:Pr&&Ft[0]===A5?[]:Ft,vr];Ft=jn,$t?$t(l,3,Qi):l(...Qi)}finally{fy=ai}}}else pe.run()};return Dt&&Dt(wn),pe=new wz(Be),pe.scheduler=kt?()=>kt(wn,!1):wn,vr=ei=>EG(ei,!1,pe),ir=pe.onStop=()=>{const ei=i4.get(pe);if(ei){if($t)$t(ei,4);else for(const jn of ei)jn();i4.delete(pe)}},l?j?wn(!0):Ft=pe.run():kt?kt(wn.bind(null,!0),!0):pe.run(),Tn.pause=pe.pause.bind(pe),Tn.resume=pe.resume.bind(pe),Tn.stop=Tn,Tn}function rv(d,l=1/0,z){if(l<=0||!gf(d)||d.__v_skip||(z=z||new Set,z.has(d)))return d;if(z.add(d),l--,qd(d))rv(d.value,l,z);else if(iu(d))for(let j=0;j{rv(j,l,z)});else if(mz(d)){for(const j in d)rv(d[j],l,z);for(const j of Object.getOwnPropertySymbols(d))Object.prototype.propertyIsEnumerable.call(d,j)&&rv(d[j],l,z)}return d}/** +**/let $p;class DI{constructor(s=!1){this.detached=s,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=$p,!s&&$p&&(this.index=($p.scopes||($p.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let s,E;if(this.scopes)for(s=0,E=this.scopes.length;s0&&--this._on===0&&($p=this.prevScope,this.prevScope=void 0)}stop(s){if(this._active){this._active=!1;let E,B;for(E=0,B=this.effects.length;E0)return;if(k2){let s=k2;for(k2=void 0;s;){const E=s.next;s.next=void 0,s.flags&=-9,s=E}}let d;for(;w2;){let s=w2;for(w2=void 0;s;){const E=s.next;if(s.next=void 0,s.flags&=-9,s.flags&1)try{s.trigger()}catch(B){d||(d=B)}s=E}}if(d)throw d}function UI(d){for(let s=d.deps;s;s=s.nextDep)s.version=-1,s.prevActiveLink=s.dep.activeLink,s.dep.activeLink=s}function VI(d){let s,E=d.depsTail,B=E;for(;B;){const K=B.prevDep;B.version===-1?(B===E&&(E=K),WA(B),TG(B)):s=B,B.dep.activeLink=B.prevActiveLink,B.prevActiveLink=void 0,B=K}d.deps=s,d.depsTail=E}function nA(d){for(let s=d.deps;s;s=s.nextDep)if(s.dep.version!==s.version||s.dep.computed&&(HI(s.dep.computed)||s.dep.version!==s.version))return!0;return!!d._dirty}function HI(d){if(d.flags&4&&!(d.flags&16)||(d.flags&=-17,d.globalVersion===D2)||(d.globalVersion=D2,!d.isSSR&&d.flags&128&&(!d.deps&&!d._dirty||!nA(d))))return;d.flags|=2;const s=d.dep,E=kf,B=Sm;kf=d,Sm=!0;try{UI(d);const K=d.fn(d._value);(s.version===0||p1(K,d._value))&&(d.flags|=128,d._value=K,s.version++)}catch(K){throw s.version++,K}finally{kf=E,Sm=B,VI(d),d.flags&=-3}}function WA(d,s=!1){const{dep:E,prevSub:B,nextSub:K}=d;if(B&&(B.nextSub=K,d.prevSub=void 0),K&&(K.prevSub=B,d.nextSub=void 0),E.subs===d&&(E.subs=B,!B&&E.computed)){E.computed.flags&=-5;for(let pt=E.computed.deps;pt;pt=pt.nextDep)WA(pt,!0)}!s&&!--E.sc&&E.map&&E.map.delete(E.key)}function TG(d){const{prevDep:s,nextDep:E}=d;s&&(s.nextDep=E,d.prevDep=void 0),E&&(E.prevDep=s,d.nextDep=void 0)}let Sm=!0;const WI=[];function av(){WI.push(Sm),Sm=!1}function ov(){const d=WI.pop();Sm=d===void 0?!0:d}function DC(d){const{cleanup:s}=d;if(d.cleanup=void 0,s){const E=kf;kf=void 0;try{s()}finally{kf=E}}}let D2=0;class AG{constructor(s,E){this.sub=s,this.dep=E,this.version=E.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class qA{constructor(s){this.computed=s,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(s){if(!kf||!Sm||kf===this.computed)return;let E=this.activeLink;if(E===void 0||E.sub!==kf)E=this.activeLink=new AG(kf,this),kf.deps?(E.prevDep=kf.depsTail,kf.depsTail.nextDep=E,kf.depsTail=E):kf.deps=kf.depsTail=E,qI(E);else if(E.version===-1&&(E.version=this.version,E.nextDep)){const B=E.nextDep;B.prevDep=E.prevDep,E.prevDep&&(E.prevDep.nextDep=B),E.prevDep=kf.depsTail,E.nextDep=void 0,kf.depsTail.nextDep=E,kf.depsTail=E,kf.deps===E&&(kf.deps=B)}return E}trigger(s){this.version++,D2++,this.notify(s)}notify(s){VA();try{for(let E=this.subs;E;E=E.prevSub)E.sub.notify()&&E.sub.dep.notify()}finally{HA()}}}function qI(d){if(d.dep.sc++,d.sub.flags&4){const s=d.dep.computed;if(s&&!d.dep.subs){s.flags|=20;for(let B=s.deps;B;B=B.nextDep)qI(B)}const E=d.dep.subs;E!==d&&(d.prevSub=E,E&&(E.nextSub=d)),d.dep.subs=d}}const s4=new WeakMap,wy=Symbol(""),iA=Symbol(""),F2=Symbol("");function Zp(d,s,E){if(Sm&&kf){let B=s4.get(d);B||s4.set(d,B=new Map);let K=B.get(E);K||(B.set(E,K=new qA),K.map=B,K.key=E),K.track()}}function tv(d,s,E,B,K,pt){const _t=s4.get(d);if(!_t){D2++;return}const Ot=jt=>{jt&&jt.trigger()};if(VA(),s==="clear")_t.forEach(Ot);else{const jt=au(d),te=jt&&UA(E);if(jt&&E==="length"){const he=Number(B);_t.forEach((De,er)=>{(er==="length"||er===F2||!Cm(er)&&er>=he)&&Ot(De)})}else switch((E!==void 0||_t.has(void 0))&&Ot(_t.get(E)),te&&Ot(_t.get(F2)),s){case"add":jt?te&&Ot(_t.get("length")):(Ot(_t.get(wy)),l_(d)&&Ot(_t.get(iA)));break;case"delete":jt||(Ot(_t.get(wy)),l_(d)&&Ot(_t.get(iA)));break;case"set":l_(d)&&Ot(_t.get(wy));break}}HA()}function MG(d,s){const E=s4.get(d);return E&&E.get(s)}function Qx(d){const s=Uu(d);return s===d?s:(Zp(s,"iterate",F2),lm(d)?s:s.map(zp))}function I4(d){return Zp(d=Uu(d),"iterate",F2),d}const SG={__proto__:null,[Symbol.iterator](){return b8(this,Symbol.iterator,zp)},concat(...d){return Qx(this).concat(...d.map(s=>au(s)?Qx(s):s))},entries(){return b8(this,"entries",d=>(d[1]=zp(d[1]),d))},every(d,s){return Zg(this,"every",d,s,void 0,arguments)},filter(d,s){return Zg(this,"filter",d,s,E=>E.map(zp),arguments)},find(d,s){return Zg(this,"find",d,s,zp,arguments)},findIndex(d,s){return Zg(this,"findIndex",d,s,void 0,arguments)},findLast(d,s){return Zg(this,"findLast",d,s,zp,arguments)},findLastIndex(d,s){return Zg(this,"findLastIndex",d,s,void 0,arguments)},forEach(d,s){return Zg(this,"forEach",d,s,void 0,arguments)},includes(...d){return w8(this,"includes",d)},indexOf(...d){return w8(this,"indexOf",d)},join(d){return Qx(this).join(d)},lastIndexOf(...d){return w8(this,"lastIndexOf",d)},map(d,s){return Zg(this,"map",d,s,void 0,arguments)},pop(){return Jb(this,"pop")},push(...d){return Jb(this,"push",d)},reduce(d,...s){return FC(this,"reduce",d,s)},reduceRight(d,...s){return FC(this,"reduceRight",d,s)},shift(){return Jb(this,"shift")},some(d,s){return Zg(this,"some",d,s,void 0,arguments)},splice(...d){return Jb(this,"splice",d)},toReversed(){return Qx(this).toReversed()},toSorted(d){return Qx(this).toSorted(d)},toSpliced(...d){return Qx(this).toSpliced(...d)},unshift(...d){return Jb(this,"unshift",d)},values(){return b8(this,"values",zp)}};function b8(d,s,E){const B=I4(d),K=B[s]();return B!==d&&!lm(d)&&(K._next=K.next,K.next=()=>{const pt=K._next();return pt.value&&(pt.value=E(pt.value)),pt}),K}const EG=Array.prototype;function Zg(d,s,E,B,K,pt){const _t=I4(d),Ot=_t!==d&&!lm(d),jt=_t[s];if(jt!==EG[s]){const De=jt.apply(d,pt);return Ot?zp(De):De}let te=E;_t!==d&&(Ot?te=function(De,er){return E.call(this,zp(De),er,d)}:E.length>2&&(te=function(De,er){return E.call(this,De,er,d)}));const he=jt.call(_t,te,B);return Ot&&K?K(he):he}function FC(d,s,E,B){const K=I4(d);let pt=E;return K!==d&&(lm(d)?E.length>3&&(pt=function(_t,Ot,jt){return E.call(this,_t,Ot,jt,d)}):pt=function(_t,Ot,jt){return E.call(this,_t,zp(Ot),jt,d)}),K[s](pt,...B)}function w8(d,s,E){const B=Uu(d);Zp(B,"iterate",F2);const K=B[s](...E);return(K===-1||K===!1)&&GA(E[0])?(E[0]=Uu(E[0]),B[s](...E)):K}function Jb(d,s,E=[]){av(),VA();const B=Uu(d)[s].apply(d,E);return HA(),ov(),B}const CG=BA("__proto__,__v_isRef,__isVue"),$I=new Set(Object.getOwnPropertyNames(Symbol).filter(d=>d!=="arguments"&&d!=="caller").map(d=>Symbol[d]).filter(Cm));function LG(d){Cm(d)||(d=String(d));const s=Uu(this);return Zp(s,"has",d),s.hasOwnProperty(d)}class ZI{constructor(s=!1,E=!1){this._isReadonly=s,this._isShallow=E}get(s,E,B){if(E==="__v_skip")return s.__v_skip;const K=this._isReadonly,pt=this._isShallow;if(E==="__v_isReactive")return!K;if(E==="__v_isReadonly")return K;if(E==="__v_isShallow")return pt;if(E==="__v_raw")return B===(K?pt?jG:XI:pt?KI:YI).get(s)||Object.getPrototypeOf(s)===Object.getPrototypeOf(B)?s:void 0;const _t=au(s);if(!K){let jt;if(_t&&(jt=SG[E]))return jt;if(E==="hasOwnProperty")return LG}const Ot=Reflect.get(s,E,jd(s)?s:B);return(Cm(E)?$I.has(E):CG(E))||(K||Zp(s,"get",E),pt)?Ot:jd(Ot)?_t&&UA(E)?Ot:Ot.value:gf(Ot)?K?QI(Ot):My(Ot):Ot}}class GI extends ZI{constructor(s=!1){super(!1,s)}set(s,E,B,K){let pt=s[E];if(!this._isShallow){const jt=v1(pt);if(!lm(B)&&!v1(B)&&(pt=Uu(pt),B=Uu(B)),!au(s)&&jd(pt)&&!jd(B))return jt?!1:(pt.value=B,!0)}const _t=au(s)&&UA(E)?Number(E)d,M5=d=>Reflect.getPrototypeOf(d);function DG(d,s,E){return function(...B){const K=this.__v_raw,pt=Uu(K),_t=l_(pt),Ot=d==="entries"||d===Symbol.iterator&&_t,jt=d==="keys"&&_t,te=K[d](...B),he=E?aA:s?l4:zp;return!s&&Zp(pt,"iterate",jt?iA:wy),{next(){const{value:De,done:er}=te.next();return er?{value:De,done:er}:{value:Ot?[he(De[0]),he(De[1])]:he(De),done:er}},[Symbol.iterator](){return this}}}}function S5(d){return function(...s){return d==="delete"?!1:d==="clear"?void 0:this}}function FG(d,s){const E={get(K){const pt=this.__v_raw,_t=Uu(pt),Ot=Uu(K);d||(p1(K,Ot)&&Zp(_t,"get",K),Zp(_t,"get",Ot));const{has:jt}=M5(_t),te=s?aA:d?l4:zp;if(jt.call(_t,K))return te(pt.get(K));if(jt.call(_t,Ot))return te(pt.get(Ot));pt!==_t&&pt.get(K)},get size(){const K=this.__v_raw;return!d&&Zp(Uu(K),"iterate",wy),Reflect.get(K,"size",K)},has(K){const pt=this.__v_raw,_t=Uu(pt),Ot=Uu(K);return d||(p1(K,Ot)&&Zp(_t,"has",K),Zp(_t,"has",Ot)),K===Ot?pt.has(K):pt.has(K)||pt.has(Ot)},forEach(K,pt){const _t=this,Ot=_t.__v_raw,jt=Uu(Ot),te=s?aA:d?l4:zp;return!d&&Zp(jt,"iterate",wy),Ot.forEach((he,De)=>K.call(pt,te(he),te(De),_t))}};return ap(E,d?{add:S5("add"),set:S5("set"),delete:S5("delete"),clear:S5("clear")}:{add(K){!s&&!lm(K)&&!v1(K)&&(K=Uu(K));const pt=Uu(this);return M5(pt).has.call(pt,K)||(pt.add(K),tv(pt,"add",K,K)),this},set(K,pt){!s&&!lm(pt)&&!v1(pt)&&(pt=Uu(pt));const _t=Uu(this),{has:Ot,get:jt}=M5(_t);let te=Ot.call(_t,K);te||(K=Uu(K),te=Ot.call(_t,K));const he=jt.call(_t,K);return _t.set(K,pt),te?p1(pt,he)&&tv(_t,"set",K,pt):tv(_t,"add",K,pt),this},delete(K){const pt=Uu(this),{has:_t,get:Ot}=M5(pt);let jt=_t.call(pt,K);jt||(K=Uu(K),jt=_t.call(pt,K)),Ot&&Ot.call(pt,K);const te=pt.delete(K);return jt&&tv(pt,"delete",K,void 0),te},clear(){const K=Uu(this),pt=K.size!==0,_t=K.clear();return pt&&tv(K,"clear",void 0,void 0),_t}}),["keys","values","entries",Symbol.iterator].forEach(K=>{E[K]=DG(K,d,s)}),E}function $A(d,s){const E=FG(d,s);return(B,K,pt)=>K==="__v_isReactive"?!d:K==="__v_isReadonly"?d:K==="__v_raw"?B:Reflect.get(Rh(E,K)&&K in B?E:B,K,pt)}const RG={get:$A(!1,!1)},BG={get:$A(!1,!0)},NG={get:$A(!0,!1)};const YI=new WeakMap,KI=new WeakMap,XI=new WeakMap,jG=new WeakMap;function UG(d){switch(d){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function VG(d){return d.__v_skip||!Object.isExtensible(d)?0:UG(hG(d))}function My(d){return v1(d)?d:ZA(d,!1,IG,RG,YI)}function JI(d){return ZA(d,!1,OG,BG,KI)}function QI(d){return ZA(d,!0,zG,NG,XI)}function ZA(d,s,E,B,K){if(!gf(d)||d.__v_raw&&!(s&&d.__v_isReactive))return d;const pt=VG(d);if(pt===0)return d;const _t=K.get(d);if(_t)return _t;const Ot=new Proxy(d,pt===2?B:E);return K.set(d,Ot),Ot}function m1(d){return v1(d)?m1(d.__v_raw):!!(d&&d.__v_isReactive)}function v1(d){return!!(d&&d.__v_isReadonly)}function lm(d){return!!(d&&d.__v_isShallow)}function GA(d){return d?!!d.__v_raw:!1}function Uu(d){const s=d&&d.__v_raw;return s?Uu(s):d}function YA(d){return!Rh(d,"__v_skip")&&Object.isExtensible(d)&&rA(d,"__v_skip",!0),d}const zp=d=>gf(d)?My(d):d,l4=d=>gf(d)?QI(d):d;function jd(d){return d?d.__v_isRef===!0:!1}function Ga(d){return tz(d,!1)}function HG(d){return tz(d,!0)}function tz(d,s){return jd(d)?d:new WG(d,s)}class WG{constructor(s,E){this.dep=new qA,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=E?s:Uu(s),this._value=E?s:zp(s),this.__v_isShallow=E}get value(){return this.dep.track(),this._value}set value(s){const E=this._rawValue,B=this.__v_isShallow||lm(s)||v1(s);s=B?s:Uu(s),p1(s,E)&&(this._rawValue=s,this._value=B?s:zp(s),this.dep.trigger())}}function zl(d){return jd(d)?d.value:d}const qG={get:(d,s,E)=>s==="__v_raw"?d:zl(Reflect.get(d,s,E)),set:(d,s,E,B)=>{const K=d[s];return jd(K)&&!jd(E)?(K.value=E,!0):Reflect.set(d,s,E,B)}};function ez(d){return m1(d)?d:new Proxy(d,qG)}function $G(d){const s=au(d)?new Array(d.length):{};for(const E in d)s[E]=GG(d,E);return s}class ZG{constructor(s,E,B){this._object=s,this._key=E,this._defaultValue=B,this.__v_isRef=!0,this._value=void 0}get value(){const s=this._object[this._key];return this._value=s===void 0?this._defaultValue:s}set value(s){this._object[this._key]=s}get dep(){return MG(Uu(this._object),this._key)}}function GG(d,s,E){const B=d[s];return jd(B)?B:new ZG(d,s,E)}class YG{constructor(s,E,B){this.fn=s,this.setter=E,this._value=void 0,this.dep=new qA(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=D2-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!E,this.isSSR=B}notify(){if(this.flags|=16,!(this.flags&8)&&kf!==this)return jI(this,!0),!0}get value(){const s=this.dep.track();return HI(this),s&&(s.version=this.dep.version),this._value}set value(s){this.setter&&this.setter(s)}}function KG(d,s,E=!1){let B,K;return Vu(d)?B=d:(B=d.get,K=d.set),new YG(B,K,E)}const E5={},u4=new WeakMap;let dy;function XG(d,s=!1,E=dy){if(E){let B=u4.get(E);B||u4.set(E,B=[]),B.push(d)}}function JG(d,s,E=mf){const{immediate:B,deep:K,once:pt,scheduler:_t,augmentJob:Ot,call:jt}=E,te=Jn=>K?Jn:lm(Jn)||K===!1||K===0?ev(Jn,1):ev(Jn);let he,De,er,pr,Mr=!1,Tr=!1;if(jd(d)?(De=()=>d.value,Mr=lm(d)):m1(d)?(De=()=>te(d),Mr=!0):au(d)?(Tr=!0,Mr=d.some(Jn=>m1(Jn)||lm(Jn)),De=()=>d.map(Jn=>{if(jd(Jn))return Jn.value;if(m1(Jn))return te(Jn);if(Vu(Jn))return jt?jt(Jn,2):Jn()})):Vu(d)?s?De=jt?()=>jt(d,2):d:De=()=>{if(er){av();try{er()}finally{ov()}}const Jn=dy;dy=he;try{return jt?jt(d,3,[pr]):d(pr)}finally{dy=Jn}}:De=dg,s&&K){const Jn=De,Bn=K===!0?1/0:K;De=()=>ev(Jn(),Bn)}const Vr=RI(),mn=()=>{he.stop(),Vr&&Vr.active&&jA(Vr.effects,he)};if(pt&&s){const Jn=s;s=(...Bn)=>{Jn(...Bn),mn()}}let Dt=Tr?new Array(d.length).fill(E5):E5;const cn=Jn=>{if(!(!(he.flags&1)||!he.dirty&&!Jn))if(s){const Bn=he.run();if(K||Mr||(Tr?Bn.some((ni,Wi)=>p1(ni,Dt[Wi])):p1(Bn,Dt))){er&&er();const ni=dy;dy=he;try{const Wi=[Bn,Dt===E5?void 0:Tr&&Dt[0]===E5?[]:Dt,pr];Dt=Bn,jt?jt(s,3,Wi):s(...Wi)}finally{dy=ni}}}else he.run()};return Ot&&Ot(cn),he=new BI(De),he.scheduler=_t?()=>_t(cn,!1):cn,pr=Jn=>XG(Jn,!1,he),er=he.onStop=()=>{const Jn=u4.get(he);if(Jn){if(jt)jt(Jn,4);else for(const Bn of Jn)Bn();u4.delete(he)}},s?B?cn(!0):Dt=he.run():_t?_t(cn.bind(null,!0),!0):he.run(),mn.pause=he.pause.bind(he),mn.resume=he.resume.bind(he),mn.stop=mn,mn}function ev(d,s=1/0,E){if(s<=0||!gf(d)||d.__v_skip||(E=E||new Set,E.has(d)))return d;if(E.add(d),s--,jd(d))ev(d.value,s,E);else if(au(d))for(let B=0;B{ev(B,s,E)});else if(PI(d)){for(const B in d)ev(d[B],s,E);for(const B of Object.getOwnPropertySymbols(d))Object.prototype.propertyIsEnumerable.call(d,B)&&ev(d[B],s,E)}return d}/** * @vue/runtime-core v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function tw(d,l,z,j){try{return j?d(...j):d()}catch(J){E4(J,l,z)}}function Pm(d,l,z,j){if(Vu(d)){const J=tw(d,l,z,j);return J&&dz(J)&&J.catch(mt=>{E4(mt,l,z)}),J}if(iu(d)){const J=[];for(let mt=0;mt>>1,J=m0[j],mt=R2(J);mt=R2(z)?m0.push(d):m0.splice(PG(l),0,d),d.flags|=1,Uz()}}function Uz(){a4||(a4=jz.then(Hz))}function zG(d){iu(d)?l_.push(...d):n1&&d.id===-1?n1.splice(n_+1,0,d):d.flags&1||(l_.push(d),d.flags|=1),Uz()}function AC(d,l,z=og+1){for(;zR2(z)-R2(j));if(l_.length=0,n1){n1.push(...l);return}for(n1=l,n_=0;n_d.id==null?d.flags&2?-1:1/0:d.id;function Hz(d){try{for(og=0;og{j._d&&NC(-1);const mt=o4(l);let kt;try{kt=d(...J)}finally{o4(mt),j._d&&NC(1)}return kt};return j._n=!0,j._c=!0,j._d=!0,j}function Xp(d,l){if(Dp===null)return d;const z=O4(Dp),j=d.dirs||(d.dirs=[]);for(let J=0;Jd.__isTeleport,T2=d=>d&&(d.disabled||d.disabled===""),MC=d=>d&&(d.defer||d.defer===""),SC=d=>typeof SVGElement<"u"&&d instanceof SVGElement,EC=d=>typeof MathMLElement=="function"&&d instanceof MathMLElement,K8=(d,l)=>{const z=d&&d.to;return cd(z)?l?l(z):null:z},$z={name:"Teleport",__isTeleport:!0,process(d,l,z,j,J,mt,kt,Dt,$t,ee){const{mc:pe,pc:Be,pbc:ir,o:{insert:vr,querySelector:Ir,createText:Pr,createComment:Wr}}=ee,Tn=T2(l.props);let{shapeFlag:Ft,children:wn,dynamicChildren:ei}=l;if(d==null){const jn=l.el=Pr(""),ai=l.anchor=Pr("");vr(jn,z,j),vr(ai,z,j);const Qi=(En,Fa)=>{Ft&16&&(J&&J.isCE&&(J.ce._teleportTarget=En),pe(wn,En,Fa,J,mt,kt,Dt,$t))},Gi=()=>{const En=l.target=K8(l.props,Ir),Fa=Gz(En,l,Pr,vr);En&&(kt!=="svg"&&SC(En)?kt="svg":kt!=="mathml"&&EC(En)&&(kt="mathml"),Tn||(Qi(En,Fa),W5(l,!1)))};Tn&&(Qi(z,ai),W5(l,!0)),MC(l.props)?(l.el.__isMounted=!1,d0(()=>{Gi(),delete l.el.__isMounted},mt)):Gi()}else{if(MC(l.props)&&d.el.__isMounted===!1){d0(()=>{$z.process(d,l,z,j,J,mt,kt,Dt,$t,ee)},mt);return}l.el=d.el,l.targetStart=d.targetStart;const jn=l.anchor=d.anchor,ai=l.target=d.target,Qi=l.targetAnchor=d.targetAnchor,Gi=T2(d.props),En=Gi?z:ai,Fa=Gi?jn:Qi;if(kt==="svg"||SC(ai)?kt="svg":(kt==="mathml"||EC(ai))&&(kt="mathml"),ei?(ir(d.dynamicChildren,ei,En,J,mt,kt,Dt),qA(d,l,!0)):$t||Be(d,l,En,Fa,J,mt,kt,Dt,!1),Tn)Gi?l.props&&d.props&&l.props.to!==d.props.to&&(l.props.to=d.props.to):M5(l,z,jn,ee,1);else if((l.props&&l.props.to)!==(d.props&&d.props.to)){const Sa=l.target=K8(l.props,Ir);Sa&&M5(l,Sa,null,ee,0)}else Gi&&M5(l,ai,Qi,ee,1);W5(l,Tn)}},remove(d,l,z,{um:j,o:{remove:J}},mt){const{shapeFlag:kt,children:Dt,anchor:$t,targetStart:ee,targetAnchor:pe,target:Be,props:ir}=d;if(Be&&(J(ee),J(pe)),mt&&J($t),kt&16){const vr=mt||!T2(ir);for(let Ir=0;Ir{d.isMounted=!0}),mg(()=>{d.isUnmounting=!0}),d}const sm=[Function,Array],Kz={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:sm,onEnter:sm,onAfterEnter:sm,onEnterCancelled:sm,onBeforeLeave:sm,onLeave:sm,onAfterLeave:sm,onLeaveCancelled:sm,onBeforeAppear:sm,onAppear:sm,onAfterAppear:sm,onAppearCancelled:sm},Xz=d=>{const l=d.subTree;return l.component?Xz(l.component):l},OG={name:"BaseTransition",props:Kz,setup(d,{slots:l}){const z=I4(),j=Yz();return()=>{const J=l.default&&UA(l.default(),!0);if(!J||!J.length)return;const mt=Jz(J),kt=Uu(d),{mode:Dt}=kt;if(j.isLeaving)return g8(mt);const $t=CC(mt);if(!$t)return g8(mt);let ee=B2($t,kt,j,z,Be=>ee=Be);$t.type!==Jp&&My($t,ee);let pe=z.subTree&&CC(z.subTree);if(pe&&pe.type!==Jp&&!gy($t,pe)&&Xz(z).type!==Jp){let Be=B2(pe,kt,j,z);if(My(pe,Be),Dt==="out-in"&&$t.type!==Jp)return j.isLeaving=!0,Be.afterLeave=()=>{j.isLeaving=!1,z.job.flags&8||z.update(),delete Be.afterLeave,pe=void 0},g8(mt);Dt==="in-out"&&$t.type!==Jp?Be.delayLeave=(ir,vr,Ir)=>{const Pr=Qz(j,pe);Pr[String(pe.key)]=pe,ir[i1]=()=>{vr(),ir[i1]=void 0,delete ee.delayedLeave,pe=void 0},ee.delayedLeave=()=>{Ir(),delete ee.delayedLeave,pe=void 0}}:pe=void 0}else pe&&(pe=void 0);return mt}}};function Jz(d){let l=d[0];if(d.length>1){for(const z of d)if(z.type!==Jp){l=z;break}}return l}const DG=OG;function Qz(d,l){const{leavingVNodes:z}=d;let j=z.get(l.type);return j||(j=Object.create(null),z.set(l.type,j)),j}function B2(d,l,z,j,J){const{appear:mt,mode:kt,persisted:Dt=!1,onBeforeEnter:$t,onEnter:ee,onAfterEnter:pe,onEnterCancelled:Be,onBeforeLeave:ir,onLeave:vr,onAfterLeave:Ir,onLeaveCancelled:Pr,onBeforeAppear:Wr,onAppear:Tn,onAfterAppear:Ft,onAppearCancelled:wn}=l,ei=String(d.key),jn=Qz(z,d),ai=(En,Fa)=>{En&&Pm(En,j,9,Fa)},Qi=(En,Fa)=>{const Sa=Fa[1];ai(En,Fa),iu(En)?En.every(Ni=>Ni.length<=1)&&Sa():En.length<=1&&Sa()},Gi={mode:kt,persisted:Dt,beforeEnter(En){let Fa=$t;if(!z.isMounted)if(mt)Fa=Wr||$t;else return;En[i1]&&En[i1](!0);const Sa=jn[ei];Sa&&gy(d,Sa)&&Sa.el[i1]&&Sa.el[i1](),ai(Fa,[En])},enter(En){let Fa=ee,Sa=pe,Ni=Be;if(!z.isMounted)if(mt)Fa=Tn||ee,Sa=Ft||pe,Ni=wn||Be;else return;let zi=!1;const ia=En[S5]=Ua=>{zi||(zi=!0,Ua?ai(Ni,[En]):ai(Sa,[En]),Gi.delayedLeave&&Gi.delayedLeave(),En[S5]=void 0)};Fa?Qi(Fa,[En,ia]):ia()},leave(En,Fa){const Sa=String(d.key);if(En[S5]&&En[S5](!0),z.isUnmounting)return Fa();ai(ir,[En]);let Ni=!1;const zi=En[i1]=ia=>{Ni||(Ni=!0,Fa(),ia?ai(Pr,[En]):ai(Ir,[En]),En[i1]=void 0,jn[Sa]===d&&delete jn[Sa])};jn[Sa]=d,vr?Qi(vr,[En,zi]):zi()},clone(En){const Fa=B2(En,l,z,j,J);return J&&J(Fa),Fa}};return Gi}function g8(d){if(C4(d))return d=g1(d),d.children=null,d}function CC(d){if(!C4(d))return Zz(d.type)&&d.children?Jz(d.children):d;if(d.component)return d.component.subTree;const{shapeFlag:l,children:z}=d;if(z){if(l&16)return z[0];if(l&32&&Vu(z.default))return z.default()}}function My(d,l){d.shapeFlag&6&&d.component?(d.transition=l,My(d.component.subTree,l)):d.shapeFlag&128?(d.ssContent.transition=l.clone(d.ssContent),d.ssFallback.transition=l.clone(d.ssFallback)):d.transition=l}function UA(d,l=!1,z){let j=[],J=0;for(let mt=0;mt1)for(let mt=0;mtA2(Ir,l&&(iu(l)?l[Pr]:l),z,j,J));return}if(u_(j)&&!J){j.shapeFlag&512&&j.type.__asyncResolved&&j.component.subTree.component&&A2(d,l,z,j.component.subTree);return}const mt=j.shapeFlag&4?O4(j.component):j.el,kt=J?null:mt,{i:Dt,r:$t}=d,ee=l&&l.r,pe=Dt.refs===mf?Dt.refs={}:Dt.refs,Be=Dt.setupState,ir=Uu(Be),vr=Be===mf?()=>!1:Ir=>Rh(ir,Ir);if(ee!=null&&ee!==$t&&(cd(ee)?(pe[ee]=null,vr(ee)&&(Be[ee]=null)):qd(ee)&&(ee.value=null)),Vu($t))tw($t,Dt,12,[kt,pe]);else{const Ir=cd($t),Pr=qd($t);if(Ir||Pr){const Wr=()=>{if(d.f){const Tn=Ir?vr($t)?Be[$t]:pe[$t]:$t.value;J?iu(Tn)&&CA(Tn,mt):iu(Tn)?Tn.includes(mt)||Tn.push(mt):Ir?(pe[$t]=[mt],vr($t)&&(Be[$t]=pe[$t])):($t.value=[mt],d.k&&(pe[d.k]=$t.value))}else Ir?(pe[$t]=kt,vr($t)&&(Be[$t]=kt)):Pr&&($t.value=kt,d.k&&(pe[d.k]=kt))};kt?(Wr.id=-1,d0(Wr,z)):Wr()}}}M4().requestIdleCallback;M4().cancelIdleCallback;const u_=d=>!!d.type.__asyncLoader,C4=d=>d.type.__isKeepAlive;function FG(d,l){eI(d,"a",l)}function RG(d,l){eI(d,"da",l)}function eI(d,l,z=Qp){const j=d.__wdc||(d.__wdc=()=>{let J=z;for(;J;){if(J.isDeactivated)return;J=J.parent}return d()});if(L4(l,j,z),z){let J=z.parent;for(;J&&J.parent;)C4(J.parent.vnode)&&BG(j,l,z,J),J=J.parent}}function BG(d,l,z,j){const J=L4(l,d,j,!0);b_(()=>{CA(j[l],J)},z)}function L4(d,l,z=Qp,j=!1){if(z){const J=z[d]||(z[d]=[]),mt=l.__weh||(l.__weh=(...kt)=>{ov();const Dt=rw(z),$t=Pm(l,z,d,kt);return Dt(),sv(),$t});return j?J.unshift(mt):J.push(mt),mt}}const lv=d=>(l,z=Qp)=>{(!U2||d==="sp")&&L4(d,(...j)=>l(...j),z)},NG=lv("bm"),i0=lv("m"),jG=lv("bu"),rI=lv("u"),mg=lv("bum"),b_=lv("um"),UG=lv("sp"),VG=lv("rtg"),HG=lv("rtc");function WG(d,l=Qp){L4("ec",d,l)}const nI="components";function VA(d,l){return aI(nI,d,!0,l)||d}const iI=Symbol.for("v-ndc");function s4(d){return cd(d)?aI(nI,d,!1)||d:d||iI}function aI(d,l,z=!0,j=!1){const J=Dp||Qp;if(J){const mt=J.type;{const Dt=zY(mt,!1);if(Dt&&(Dt===l||Dt===dm(l)||Dt===A4(dm(l))))return mt}const kt=LC(J[d]||mt[d],l)||LC(J.appContext[d],l);return!kt&&j?mt:kt}}function LC(d,l){return d&&(d[l]||d[dm(l)]||d[A4(dm(l))])}function sf(d,l,z,j){let J;const mt=z,kt=iu(d);if(kt||cd(d)){const Dt=kt&&d1(d);let $t=!1,ee=!1;Dt&&($t=!cm(d),ee=m1(d),d=S4(d)),J=new Array(d.length);for(let pe=0,Be=d.length;pel(Dt,$t,void 0,mt));else{const Dt=Object.keys(d);J=new Array(Dt.length);for(let $t=0,ee=Dt.length;$tj2(l)?!(l.type===Jp||l.type===Ou&&!oI(l.children)):!0)?d:null}const X8=d=>d?AI(d)?O4(d):X8(d.parent):null,M2=up(Object.create(null),{$:d=>d,$el:d=>d.vnode.el,$data:d=>d.data,$props:d=>d.props,$attrs:d=>d.attrs,$slots:d=>d.slots,$refs:d=>d.refs,$parent:d=>X8(d.parent),$root:d=>X8(d.root),$host:d=>d.ce,$emit:d=>d.emit,$options:d=>lI(d),$forceUpdate:d=>d.f||(d.f=()=>{NA(d.update)}),$nextTick:d=>d.n||(d.n=C0.bind(d.proxy)),$watch:d=>dY.bind(d)}),v8=(d,l)=>d!==mf&&!d.__isScriptSetup&&Rh(d,l),ZG={get({_:d},l){if(l==="__v_skip")return!0;const{ctx:z,setupState:j,data:J,props:mt,accessCache:kt,type:Dt,appContext:$t}=d;let ee;if(l[0]!=="$"){const vr=kt[l];if(vr!==void 0)switch(vr){case 1:return j[l];case 2:return J[l];case 4:return z[l];case 3:return mt[l]}else{if(v8(j,l))return kt[l]=1,j[l];if(J!==mf&&Rh(J,l))return kt[l]=2,J[l];if((ee=d.propsOptions[0])&&Rh(ee,l))return kt[l]=3,mt[l];if(z!==mf&&Rh(z,l))return kt[l]=4,z[l];J8&&(kt[l]=0)}}const pe=M2[l];let Be,ir;if(pe)return l==="$attrs"&&Kp(d.attrs,"get",""),pe(d);if((Be=Dt.__cssModules)&&(Be=Be[l]))return Be;if(z!==mf&&Rh(z,l))return kt[l]=4,z[l];if(ir=$t.config.globalProperties,Rh(ir,l))return ir[l]},set({_:d},l,z){const{data:j,setupState:J,ctx:mt}=d;return v8(J,l)?(J[l]=z,!0):j!==mf&&Rh(j,l)?(j[l]=z,!0):Rh(d.props,l)||l[0]==="$"&&l.slice(1)in d?!1:(mt[l]=z,!0)},has({_:{data:d,setupState:l,accessCache:z,ctx:j,appContext:J,propsOptions:mt}},kt){let Dt;return!!z[kt]||d!==mf&&Rh(d,kt)||v8(l,kt)||(Dt=mt[0])&&Rh(Dt,kt)||Rh(j,kt)||Rh(M2,kt)||Rh(J.config.globalProperties,kt)},defineProperty(d,l,z){return z.get!=null?d._.accessCache[l]=0:Rh(z,"value")&&this.set(d,l,z.value,null),Reflect.defineProperty(d,l,z)}};function PC(d){return iu(d)?d.reduce((l,z)=>(l[z]=null,l),{}):d}let J8=!0;function $G(d){const l=lI(d),z=d.proxy,j=d.ctx;J8=!1,l.beforeCreate&&zC(l.beforeCreate,d,"bc");const{data:J,computed:mt,methods:kt,watch:Dt,provide:$t,inject:ee,created:pe,beforeMount:Be,mounted:ir,beforeUpdate:vr,updated:Ir,activated:Pr,deactivated:Wr,beforeDestroy:Tn,beforeUnmount:Ft,destroyed:wn,unmounted:ei,render:jn,renderTracked:ai,renderTriggered:Qi,errorCaptured:Gi,serverPrefetch:En,expose:Fa,inheritAttrs:Sa,components:Ni,directives:zi,filters:ia}=l;if(ee&&GG(ee,j,null),kt)for(const Ei in kt){const Va=kt[Ei];Vu(Va)&&(j[Ei]=Va.bind(z))}if(J){const Ei=J.call(z,z);gf(Ei)&&(d.data=Ay(Ei))}if(J8=!0,mt)for(const Ei in mt){const Va=mt[Ei],us=Vu(Va)?Va.bind(z,z):Vu(Va.get)?Va.get.bind(z,z):hg,xo=!Vu(Va)&&Vu(Va.set)?Va.set.bind(z):hg,Mo=Ko({get:us,set:xo});Object.defineProperty(j,Ei,{enumerable:!0,configurable:!0,get:()=>Mo.value,set:co=>Mo.value=co})}if(Dt)for(const Ei in Dt)sI(Dt[Ei],j,z,Ei);if($t){const Ei=Vu($t)?$t.call(z):$t;Reflect.ownKeys(Ei).forEach(Va=>{q5(Va,Ei[Va])})}pe&&zC(pe,d,"c");function qi(Ei,Va){iu(Va)?Va.forEach(us=>Ei(us.bind(z))):Va&&Ei(Va.bind(z))}if(qi(NG,Be),qi(i0,ir),qi(jG,vr),qi(rI,Ir),qi(FG,Pr),qi(RG,Wr),qi(WG,Gi),qi(HG,ai),qi(VG,Qi),qi(mg,Ft),qi(b_,ei),qi(UG,En),iu(Fa))if(Fa.length){const Ei=d.exposed||(d.exposed={});Fa.forEach(Va=>{Object.defineProperty(Ei,Va,{get:()=>z[Va],set:us=>z[Va]=us,enumerable:!0})})}else d.exposed||(d.exposed={});jn&&d.render===hg&&(d.render=jn),Sa!=null&&(d.inheritAttrs=Sa),Ni&&(d.components=Ni),zi&&(d.directives=zi),En&&tI(d)}function GG(d,l,z=hg){iu(d)&&(d=Q8(d));for(const j in d){const J=d[j];let mt;gf(J)?"default"in J?mt=hm(J.from||j,J.default,!0):mt=hm(J.from||j):mt=hm(J),qd(mt)?Object.defineProperty(l,j,{enumerable:!0,configurable:!0,get:()=>mt.value,set:kt=>mt.value=kt}):l[j]=mt}}function zC(d,l,z){Pm(iu(d)?d.map(j=>j.bind(l.proxy)):d.bind(l.proxy),l,z)}function sI(d,l,z,j){let J=j.includes(".")?_I(z,j):()=>z[j];if(cd(d)){const mt=l[d];Vu(mt)&&fm(J,mt)}else if(Vu(d))fm(J,d.bind(z));else if(gf(d))if(iu(d))d.forEach(mt=>sI(mt,l,z,j));else{const mt=Vu(d.handler)?d.handler.bind(z):l[d.handler];Vu(mt)&&fm(J,mt,d)}}function lI(d){const l=d.type,{mixins:z,extends:j}=l,{mixins:J,optionsCache:mt,config:{optionMergeStrategies:kt}}=d.appContext,Dt=mt.get(l);let $t;return Dt?$t=Dt:!J.length&&!z&&!j?$t=l:($t={},J.length&&J.forEach(ee=>l4($t,ee,kt,!0)),l4($t,l,kt)),gf(l)&&mt.set(l,$t),$t}function l4(d,l,z,j=!1){const{mixins:J,extends:mt}=l;mt&&l4(d,mt,z,!0),J&&J.forEach(kt=>l4(d,kt,z,!0));for(const kt in l)if(!(j&&kt==="expose")){const Dt=YG[kt]||z&&z[kt];d[kt]=Dt?Dt(d[kt],l[kt]):l[kt]}return d}const YG={data:IC,props:OC,emits:OC,methods:m2,computed:m2,beforeCreate:f0,created:f0,beforeMount:f0,mounted:f0,beforeUpdate:f0,updated:f0,beforeDestroy:f0,beforeUnmount:f0,destroyed:f0,unmounted:f0,activated:f0,deactivated:f0,errorCaptured:f0,serverPrefetch:f0,components:m2,directives:m2,watch:XG,provide:IC,inject:KG};function IC(d,l){return l?d?function(){return up(Vu(d)?d.call(this,this):d,Vu(l)?l.call(this,this):l)}:l:d}function KG(d,l){return m2(Q8(d),Q8(l))}function Q8(d){if(iu(d)){const l={};for(let z=0;z1)return z&&Vu(l)?l.call(j&&j.proxy):l}}function tY(){return!!(I4()||wy)}const cI={},hI=()=>Object.create(cI),fI=d=>Object.getPrototypeOf(d)===cI;function eY(d,l,z,j=!1){const J={},mt=hI();d.propsDefaults=Object.create(null),dI(d,l,J,mt);for(const kt in d.propsOptions[0])kt in J||(J[kt]=void 0);z?d.props=j?J:Fz(J):d.type.props?d.props=J:d.props=mt,d.attrs=mt}function rY(d,l,z,j){const{props:J,attrs:mt,vnode:{patchFlag:kt}}=d,Dt=Uu(J),[$t]=d.propsOptions;let ee=!1;if((j||kt>0)&&!(kt&16)){if(kt&8){const pe=d.vnode.dynamicProps;for(let Be=0;Be{$t=!0;const[ir,vr]=pI(Be,l,!0);up(kt,ir),vr&&Dt.push(...vr)};!z&&l.mixins.length&&l.mixins.forEach(pe),d.extends&&pe(d.extends),d.mixins&&d.mixins.forEach(pe)}if(!mt&&!$t)return gf(d)&&j.set(d,o_),o_;if(iu(mt))for(let pe=0;ped==="_"||d==="__"||d==="_ctx"||d==="$stable",WA=d=>iu(d)?d.map(lg):[lg(d)],iY=(d,l,z)=>{if(l._n)return l;const j=ew((...J)=>WA(l(...J)),z);return j._c=!1,j},mI=(d,l,z)=>{const j=d._ctx;for(const J in d){if(HA(J))continue;const mt=d[J];if(Vu(mt))l[J]=iY(J,mt,j);else if(mt!=null){const kt=WA(mt);l[J]=()=>kt}}},gI=(d,l)=>{const z=WA(l);d.slots.default=()=>z},vI=(d,l,z)=>{for(const j in l)(z||!HA(j))&&(d[j]=l[j])},aY=(d,l,z)=>{const j=d.slots=hI();if(d.vnode.shapeFlag&32){const J=l.__;J&&Z8(j,"__",J,!0);const mt=l._;mt?(vI(j,l,z),z&&Z8(j,"_",mt,!0)):mI(l,j)}else l&&gI(d,l)},oY=(d,l,z)=>{const{vnode:j,slots:J}=d;let mt=!0,kt=mf;if(j.shapeFlag&32){const Dt=l._;Dt?z&&Dt===1?mt=!1:vI(J,l,z):(mt=!l.$stable,mI(l,J)),kt=l}else l&&(gI(d,l),kt={default:1});if(mt)for(const Dt in J)!HA(Dt)&&kt[Dt]==null&&delete J[Dt]},d0=_Y;function sY(d){return lY(d)}function lY(d,l){const z=M4();z.__VUE__=!0;const{insert:j,remove:J,patchProp:mt,createElement:kt,createText:Dt,createComment:$t,setText:ee,setElementText:pe,parentNode:Be,nextSibling:ir,setScopeId:vr=hg,insertStaticContent:Ir}=d,Pr=(vi,yi,ui,ao=null,So=null,ko=null,gs=void 0,jo=null,es=!!yi.dynamicChildren)=>{if(vi===yi)return;vi&&!gy(vi,yi)&&(ao=ka(vi),co(vi,So,ko,!0),vi=null),yi.patchFlag===-2&&(es=!1,yi.dynamicChildren=null);const{type:Uo,ref:El,shapeFlag:Is}=yi;switch(Uo){case z4:Wr(vi,yi,ui,ao);break;case Jp:Tn(vi,yi,ui,ao);break;case Z5:vi==null&&Ft(yi,ui,ao,gs);break;case Ou:Ni(vi,yi,ui,ao,So,ko,gs,jo,es);break;default:Is&1?jn(vi,yi,ui,ao,So,ko,gs,jo,es):Is&6?zi(vi,yi,ui,ao,So,ko,gs,jo,es):(Is&64||Is&128)&&Uo.process(vi,yi,ui,ao,So,ko,gs,jo,es,Ss)}El!=null&&So?A2(El,vi&&vi.ref,ko,yi||vi,!yi):El==null&&vi&&vi.ref!=null&&A2(vi.ref,null,ko,vi,!0)},Wr=(vi,yi,ui,ao)=>{if(vi==null)j(yi.el=Dt(yi.children),ui,ao);else{const So=yi.el=vi.el;yi.children!==vi.children&&ee(So,yi.children)}},Tn=(vi,yi,ui,ao)=>{vi==null?j(yi.el=$t(yi.children||""),ui,ao):yi.el=vi.el},Ft=(vi,yi,ui,ao)=>{[vi.el,vi.anchor]=Ir(vi.children,yi,ui,ao,vi.el,vi.anchor)},wn=({el:vi,anchor:yi},ui,ao)=>{let So;for(;vi&&vi!==yi;)So=ir(vi),j(vi,ui,ao),vi=So;j(yi,ui,ao)},ei=({el:vi,anchor:yi})=>{let ui;for(;vi&&vi!==yi;)ui=ir(vi),J(vi),vi=ui;J(yi)},jn=(vi,yi,ui,ao,So,ko,gs,jo,es)=>{yi.type==="svg"?gs="svg":yi.type==="math"&&(gs="mathml"),vi==null?ai(yi,ui,ao,So,ko,gs,jo,es):En(vi,yi,So,ko,gs,jo,es)},ai=(vi,yi,ui,ao,So,ko,gs,jo)=>{let es,Uo;const{props:El,shapeFlag:Is,transition:Cl,dirs:Zl}=vi;if(es=vi.el=kt(vi.type,ko,El&&El.is,El),Is&8?pe(es,vi.children):Is&16&&Gi(vi.children,es,null,ao,So,y8(vi,ko),gs,jo),Zl&&ay(vi,null,ao,"created"),Qi(es,vi,vi.scopeId,gs,ao),El){for(const kc in El)kc!=="value"&&!b2(kc)&&mt(es,kc,null,El[kc],ko,ao);"value"in El&&mt(es,"value",null,El.value,ko),(Uo=El.onVnodeBeforeMount)&&eg(Uo,ao,vi)}Zl&&ay(vi,null,ao,"beforeMount");const Du=uY(So,Cl);Du&&Cl.beforeEnter(es),j(es,yi,ui),((Uo=El&&El.onVnodeMounted)||Du||Zl)&&d0(()=>{Uo&&eg(Uo,ao,vi),Du&&Cl.enter(es),Zl&&ay(vi,null,ao,"mounted")},So)},Qi=(vi,yi,ui,ao,So)=>{if(ui&&vr(vi,ui),ao)for(let ko=0;ko{for(let Uo=es;Uo{const jo=yi.el=vi.el;let{patchFlag:es,dynamicChildren:Uo,dirs:El}=yi;es|=vi.patchFlag&16;const Is=vi.props||mf,Cl=yi.props||mf;let Zl;if(ui&&oy(ui,!1),(Zl=Cl.onVnodeBeforeUpdate)&&eg(Zl,ui,yi,vi),El&&ay(yi,vi,ui,"beforeUpdate"),ui&&oy(ui,!0),(Is.innerHTML&&Cl.innerHTML==null||Is.textContent&&Cl.textContent==null)&&pe(jo,""),Uo?Fa(vi.dynamicChildren,Uo,jo,ui,ao,y8(yi,So),ko):gs||Va(vi,yi,jo,null,ui,ao,y8(yi,So),ko,!1),es>0){if(es&16)Sa(jo,Is,Cl,ui,So);else if(es&2&&Is.class!==Cl.class&&mt(jo,"class",null,Cl.class,So),es&4&&mt(jo,"style",Is.style,Cl.style,So),es&8){const Du=yi.dynamicProps;for(let kc=0;kc{Zl&&eg(Zl,ui,yi,vi),El&&ay(yi,vi,ui,"updated")},ao)},Fa=(vi,yi,ui,ao,So,ko,gs)=>{for(let jo=0;jo{if(yi!==ui){if(yi!==mf)for(const ko in yi)!b2(ko)&&!(ko in ui)&&mt(vi,ko,yi[ko],null,So,ao);for(const ko in ui){if(b2(ko))continue;const gs=ui[ko],jo=yi[ko];gs!==jo&&ko!=="value"&&mt(vi,ko,jo,gs,So,ao)}"value"in ui&&mt(vi,"value",yi.value,ui.value,So)}},Ni=(vi,yi,ui,ao,So,ko,gs,jo,es)=>{const Uo=yi.el=vi?vi.el:Dt(""),El=yi.anchor=vi?vi.anchor:Dt("");let{patchFlag:Is,dynamicChildren:Cl,slotScopeIds:Zl}=yi;Zl&&(jo=jo?jo.concat(Zl):Zl),vi==null?(j(Uo,ui,ao),j(El,ui,ao),Gi(yi.children||[],ui,El,So,ko,gs,jo,es)):Is>0&&Is&64&&Cl&&vi.dynamicChildren?(Fa(vi.dynamicChildren,Cl,ui,So,ko,gs,jo),(yi.key!=null||So&&yi===So.subTree)&&qA(vi,yi,!0)):Va(vi,yi,ui,El,So,ko,gs,jo,es)},zi=(vi,yi,ui,ao,So,ko,gs,jo,es)=>{yi.slotScopeIds=jo,vi==null?yi.shapeFlag&512?So.ctx.activate(yi,ui,ao,gs,es):ia(yi,ui,ao,So,ko,gs,es):Ua(vi,yi,es)},ia=(vi,yi,ui,ao,So,ko,gs)=>{const jo=vi.component=SY(vi,ao,So);if(C4(vi)&&(jo.ctx.renderer=Ss),EY(jo,!1,gs),jo.asyncDep){if(So&&So.registerDep(jo,qi,gs),!vi.el){const es=jo.subTree=uu(Jp);Tn(null,es,yi,ui),vi.placeholder=es.el}}else qi(jo,vi,yi,ui,So,ko,gs)},Ua=(vi,yi,ui)=>{const ao=yi.component=vi.component;if(yY(vi,yi,ui))if(ao.asyncDep&&!ao.asyncResolved){Ei(ao,yi,ui);return}else ao.next=yi,ao.update();else yi.el=vi.el,ao.vnode=yi},qi=(vi,yi,ui,ao,So,ko,gs)=>{const jo=()=>{if(vi.isMounted){let{next:Is,bu:Cl,u:Zl,parent:Du,vnode:kc}=vi;{const Yf=yI(vi);if(Yf){Is&&(Is.el=kc.el,Ei(vi,Is,gs)),Yf.asyncDep.then(()=>{vi.isUnmounted||jo()});return}}let ic=Is,vf;oy(vi,!1),Is?(Is.el=kc.el,Ei(vi,Is,gs)):Is=kc,Cl&&H5(Cl),(vf=Is.props&&Is.props.onVnodeBeforeUpdate)&&eg(vf,Du,Is,kc),oy(vi,!0);const Bf=RC(vi),Fp=vi.subTree;vi.subTree=Bf,Pr(Fp,Bf,Be(Fp.el),ka(Fp),vi,So,ko),Is.el=Bf.el,ic===null&&xY(vi,Bf.el),Zl&&d0(Zl,So),(vf=Is.props&&Is.props.onVnodeUpdated)&&d0(()=>eg(vf,Du,Is,kc),So)}else{let Is;const{el:Cl,props:Zl}=yi,{bm:Du,m:kc,parent:ic,root:vf,type:Bf}=vi,Fp=u_(yi);oy(vi,!1),Du&&H5(Du),!Fp&&(Is=Zl&&Zl.onVnodeBeforeMount)&&eg(Is,ic,yi),oy(vi,!0);{vf.ce&&vf.ce._def.shadowRoot!==!1&&vf.ce._injectChildStyle(Bf);const Yf=vi.subTree=RC(vi);Pr(null,Yf,ui,ao,vi,So,ko),yi.el=Yf.el}if(kc&&d0(kc,So),!Fp&&(Is=Zl&&Zl.onVnodeMounted)){const Yf=yi;d0(()=>eg(Is,ic,Yf),So)}(yi.shapeFlag&256||ic&&u_(ic.vnode)&&ic.vnode.shapeFlag&256)&&vi.a&&d0(vi.a,So),vi.isMounted=!0,yi=ui=ao=null}};vi.scope.on();const es=vi.effect=new wz(jo);vi.scope.off();const Uo=vi.update=es.run.bind(es),El=vi.job=es.runIfDirty.bind(es);El.i=vi,El.id=vi.uid,es.scheduler=()=>NA(El),oy(vi,!0),Uo()},Ei=(vi,yi,ui)=>{yi.component=vi;const ao=vi.vnode.props;vi.vnode=yi,vi.next=null,rY(vi,yi.props,ao,ui),oY(vi,yi.children,ui),ov(),AC(vi),sv()},Va=(vi,yi,ui,ao,So,ko,gs,jo,es=!1)=>{const Uo=vi&&vi.children,El=vi?vi.shapeFlag:0,Is=yi.children,{patchFlag:Cl,shapeFlag:Zl}=yi;if(Cl>0){if(Cl&128){xo(Uo,Is,ui,ao,So,ko,gs,jo,es);return}else if(Cl&256){us(Uo,Is,ui,ao,So,ko,gs,jo,es);return}}Zl&8?(El&16&&ya(Uo,So,ko),Is!==Uo&&pe(ui,Is)):El&16?Zl&16?xo(Uo,Is,ui,ao,So,ko,gs,jo,es):ya(Uo,So,ko,!0):(El&8&&pe(ui,""),Zl&16&&Gi(Is,ui,ao,So,ko,gs,jo,es))},us=(vi,yi,ui,ao,So,ko,gs,jo,es)=>{vi=vi||o_,yi=yi||o_;const Uo=vi.length,El=yi.length,Is=Math.min(Uo,El);let Cl;for(Cl=0;ClEl?ya(vi,So,ko,!0,!1,Is):Gi(yi,ui,ao,So,ko,gs,jo,es,Is)},xo=(vi,yi,ui,ao,So,ko,gs,jo,es)=>{let Uo=0;const El=yi.length;let Is=vi.length-1,Cl=El-1;for(;Uo<=Is&&Uo<=Cl;){const Zl=vi[Uo],Du=yi[Uo]=es?a1(yi[Uo]):lg(yi[Uo]);if(gy(Zl,Du))Pr(Zl,Du,ui,null,So,ko,gs,jo,es);else break;Uo++}for(;Uo<=Is&&Uo<=Cl;){const Zl=vi[Is],Du=yi[Cl]=es?a1(yi[Cl]):lg(yi[Cl]);if(gy(Zl,Du))Pr(Zl,Du,ui,null,So,ko,gs,jo,es);else break;Is--,Cl--}if(Uo>Is){if(Uo<=Cl){const Zl=Cl+1,Du=ZlCl)for(;Uo<=Is;)co(vi[Uo],So,ko,!0),Uo++;else{const Zl=Uo,Du=Uo,kc=new Map;for(Uo=Du;Uo<=Cl;Uo++){const fd=yi[Uo]=es?a1(yi[Uo]):lg(yi[Uo]);fd.key!=null&&kc.set(fd.key,Uo)}let ic,vf=0;const Bf=Cl-Du+1;let Fp=!1,Yf=0;const g0=new Array(Bf);for(Uo=0;Uo=Bf){co(fd,So,ko,!0);continue}let Sd;if(fd.key!=null)Sd=kc.get(fd.key);else for(ic=Du;ic<=Cl;ic++)if(g0[ic-Du]===0&&gy(fd,yi[ic])){Sd=ic;break}Sd===void 0?co(fd,So,ko,!0):(g0[Sd-Du]=Uo+1,Sd>=Yf?Yf=Sd:Fp=!0,Pr(fd,yi[Sd],ui,null,So,ko,gs,jo,es),vf++)}const Rp=Fp?cY(g0):o_;for(ic=Rp.length-1,Uo=Bf-1;Uo>=0;Uo--){const fd=Du+Uo,Sd=yi[fd],mm=yi[fd+1],y1=fd+1{const{el:ko,type:gs,transition:jo,children:es,shapeFlag:Uo}=vi;if(Uo&6){Mo(vi.component.subTree,yi,ui,ao);return}if(Uo&128){vi.suspense.move(yi,ui,ao);return}if(Uo&64){gs.move(vi,yi,ui,Ss);return}if(gs===Ou){j(ko,yi,ui);for(let Is=0;Isjo.enter(ko),So);else{const{leave:Is,delayLeave:Cl,afterLeave:Zl}=jo,Du=()=>{vi.ctx.isUnmounted?J(ko):j(ko,yi,ui)},kc=()=>{Is(ko,()=>{Du(),Zl&&Zl()})};Cl?Cl(ko,Du,kc):kc()}else j(ko,yi,ui)},co=(vi,yi,ui,ao=!1,So=!1)=>{const{type:ko,props:gs,ref:jo,children:es,dynamicChildren:Uo,shapeFlag:El,patchFlag:Is,dirs:Cl,cacheIndex:Zl}=vi;if(Is===-2&&(So=!1),jo!=null&&(ov(),A2(jo,null,ui,vi,!0),sv()),Zl!=null&&(yi.renderCache[Zl]=void 0),El&256){yi.ctx.deactivate(vi);return}const Du=El&1&&Cl,kc=!u_(vi);let ic;if(kc&&(ic=gs&&gs.onVnodeBeforeUnmount)&&eg(ic,yi,vi),El&6)eo(vi.component,ui,ao);else{if(El&128){vi.suspense.unmount(ui,ao);return}Du&&ay(vi,null,yi,"beforeUnmount"),El&64?vi.type.remove(vi,yi,ui,Ss,ao):Uo&&!Uo.hasOnce&&(ko!==Ou||Is>0&&Is&64)?ya(Uo,yi,ui,!1,!0):(ko===Ou&&Is&384||!So&&El&16)&&ya(es,yi,ui),ao&&Go(vi)}(kc&&(ic=gs&&gs.onVnodeUnmounted)||Du)&&d0(()=>{ic&&eg(ic,yi,vi),Du&&ay(vi,null,yi,"unmounted")},ui)},Go=vi=>{const{type:yi,el:ui,anchor:ao,transition:So}=vi;if(yi===Ou){To(ui,ao);return}if(yi===Z5){ei(vi);return}const ko=()=>{J(ui),So&&!So.persisted&&So.afterLeave&&So.afterLeave()};if(vi.shapeFlag&1&&So&&!So.persisted){const{leave:gs,delayLeave:jo}=So,es=()=>gs(ui,ko);jo?jo(vi.el,ko,es):es()}else ko()},To=(vi,yi)=>{let ui;for(;vi!==yi;)ui=ir(vi),J(vi),vi=ui;J(yi)},eo=(vi,yi,ui)=>{const{bum:ao,scope:So,job:ko,subTree:gs,um:jo,m:es,a:Uo,parent:El,slots:{__:Is}}=vi;FC(es),FC(Uo),ao&&H5(ao),El&&iu(Is)&&Is.forEach(Cl=>{El.renderCache[Cl]=void 0}),So.stop(),ko&&(ko.flags|=8,co(gs,vi,yi,ui)),jo&&d0(jo,yi),d0(()=>{vi.isUnmounted=!0},yi),yi&&yi.pendingBranch&&!yi.isUnmounted&&vi.asyncDep&&!vi.asyncResolved&&vi.suspenseId===yi.pendingId&&(yi.deps--,yi.deps===0&&yi.resolve())},ya=(vi,yi,ui,ao=!1,So=!1,ko=0)=>{for(let gs=ko;gs{if(vi.shapeFlag&6)return ka(vi.component.subTree);if(vi.shapeFlag&128)return vi.suspense.next();const yi=ir(vi.anchor||vi.el),ui=yi&&yi[qz];return ui?ir(ui):yi};let mo=!1;const vo=(vi,yi,ui)=>{vi==null?yi._vnode&&co(yi._vnode,null,null,!0):Pr(yi._vnode||null,vi,yi,null,null,null,ui),yi._vnode=vi,mo||(mo=!0,AC(),Vz(),mo=!1)},Ss={p:Pr,um:co,m:Mo,r:Go,mt:ia,mc:Gi,pc:Va,pbc:Fa,n:ka,o:d};return{render:vo,hydrate:void 0,createApp:QG(vo)}}function y8({type:d,props:l},z){return z==="svg"&&d==="foreignObject"||z==="mathml"&&d==="annotation-xml"&&l&&l.encoding&&l.encoding.includes("html")?void 0:z}function oy({effect:d,job:l},z){z?(d.flags|=32,l.flags|=4):(d.flags&=-33,l.flags&=-5)}function uY(d,l){return(!d||d&&!d.pendingBranch)&&l&&!l.persisted}function qA(d,l,z=!1){const j=d.children,J=l.children;if(iu(j)&&iu(J))for(let mt=0;mt>1,d[z[Dt]]0&&(l[j]=z[mt-1]),z[mt]=j)}}for(mt=z.length,kt=z[mt-1];mt-- >0;)z[mt]=kt,kt=l[kt];return z}function yI(d){const l=d.subTree.component;if(l)return l.asyncDep&&!l.asyncResolved?l:yI(l)}function FC(d){if(d)for(let l=0;lhm(hY);function fm(d,l,z){return xI(d,l,z)}function xI(d,l,z=mf){const{immediate:j,deep:J,flush:mt,once:kt}=z,Dt=up({},z),$t=l&&j||!l&&mt!=="post";let ee;if(U2){if(mt==="sync"){const vr=fY();ee=vr.__watcherHandles||(vr.__watcherHandles=[])}else if(!$t){const vr=()=>{};return vr.stop=hg,vr.resume=hg,vr.pause=hg,vr}}const pe=Qp;Dt.call=(vr,Ir,Pr)=>Pm(vr,pe,Ir,Pr);let Be=!1;mt==="post"?Dt.scheduler=vr=>{d0(vr,pe&&pe.suspense)}:mt!=="sync"&&(Be=!0,Dt.scheduler=(vr,Ir)=>{Ir?vr():NA(vr)}),Dt.augmentJob=vr=>{l&&(vr.flags|=4),Be&&(vr.flags|=2,pe&&(vr.id=pe.uid,vr.i=pe))};const ir=CG(d,l,Dt);return U2&&(ee?ee.push(ir):$t&&ir()),ir}function dY(d,l,z){const j=this.proxy,J=cd(d)?d.includes(".")?_I(j,d):()=>j[d]:d.bind(j,j);let mt;Vu(l)?mt=l:(mt=l.handler,z=l);const kt=rw(this),Dt=xI(J,mt.bind(j),z);return kt(),Dt}function _I(d,l){const z=l.split(".");return()=>{let j=d;for(let J=0;Jl==="modelValue"||l==="model-value"?d.modelModifiers:d[`${l}Modifiers`]||d[`${dm(l)}Modifiers`]||d[`${Ly(l)}Modifiers`];function mY(d,l,...z){if(d.isUnmounted)return;const j=d.vnode.props||mf;let J=z;const mt=l.startsWith("update:"),kt=mt&&pY(j,l.slice(7));kt&&(kt.trim&&(J=z.map(pe=>cd(pe)?pe.trim():pe)),kt.number&&(J=z.map(e4)));let Dt,$t=j[Dt=h8(l)]||j[Dt=h8(dm(l))];!$t&&mt&&($t=j[Dt=h8(Ly(l))]),$t&&Pm($t,d,6,J);const ee=j[Dt+"Once"];if(ee){if(!d.emitted)d.emitted={};else if(d.emitted[Dt])return;d.emitted[Dt]=!0,Pm(ee,d,6,J)}}function bI(d,l,z=!1){const j=l.emitsCache,J=j.get(d);if(J!==void 0)return J;const mt=d.emits;let kt={},Dt=!1;if(!Vu(d)){const $t=ee=>{const pe=bI(ee,l,!0);pe&&(Dt=!0,up(kt,pe))};!z&&l.mixins.length&&l.mixins.forEach($t),d.extends&&$t(d.extends),d.mixins&&d.mixins.forEach($t)}return!mt&&!Dt?(gf(d)&&j.set(d,null),null):(iu(mt)?mt.forEach($t=>kt[$t]=null):up(kt,mt),gf(d)&&j.set(d,kt),kt)}function P4(d,l){return!d||!w4(l)?!1:(l=l.slice(2).replace(/Once$/,""),Rh(d,l[0].toLowerCase()+l.slice(1))||Rh(d,Ly(l))||Rh(d,l))}function RC(d){const{type:l,vnode:z,proxy:j,withProxy:J,propsOptions:[mt],slots:kt,attrs:Dt,emit:$t,render:ee,renderCache:pe,props:Be,data:ir,setupState:vr,ctx:Ir,inheritAttrs:Pr}=d,Wr=o4(d);let Tn,Ft;try{if(z.shapeFlag&4){const ei=J||j,jn=ei;Tn=lg(ee.call(jn,ei,pe,Be,vr,ir,Ir)),Ft=Dt}else{const ei=l;Tn=lg(ei.length>1?ei(Be,{attrs:Dt,slots:kt,emit:$t}):ei(Be,null)),Ft=l.props?Dt:gY(Dt)}}catch(ei){S2.length=0,E4(ei,d,1),Tn=uu(Jp)}let wn=Tn;if(Ft&&Pr!==!1){const ei=Object.keys(Ft),{shapeFlag:jn}=wn;ei.length&&jn&7&&(mt&&ei.some(EA)&&(Ft=vY(Ft,mt)),wn=g1(wn,Ft,!1,!0))}return z.dirs&&(wn=g1(wn,null,!1,!0),wn.dirs=wn.dirs?wn.dirs.concat(z.dirs):z.dirs),z.transition&&My(wn,z.transition),Tn=wn,o4(Wr),Tn}const gY=d=>{let l;for(const z in d)(z==="class"||z==="style"||w4(z))&&((l||(l={}))[z]=d[z]);return l},vY=(d,l)=>{const z={};for(const j in d)(!EA(j)||!(j.slice(9)in l))&&(z[j]=d[j]);return z};function yY(d,l,z){const{props:j,children:J,component:mt}=d,{props:kt,children:Dt,patchFlag:$t}=l,ee=mt.emitsOptions;if(l.dirs||l.transition)return!0;if(z&&$t>=0){if($t&1024)return!0;if($t&16)return j?BC(j,kt,ee):!!kt;if($t&8){const pe=l.dynamicProps;for(let Be=0;Bed.__isSuspense;function _Y(d,l){l&&l.pendingBranch?iu(d)?l.effects.push(...d):l.effects.push(d):zG(d)}const Ou=Symbol.for("v-fgt"),z4=Symbol.for("v-txt"),Jp=Symbol.for("v-cmt"),Z5=Symbol.for("v-stc"),S2=[];let Y0=null;function Si(d=!1){S2.push(Y0=d?null:[])}function bY(){S2.pop(),Y0=S2[S2.length-1]||null}let N2=1;function NC(d,l=!1){N2+=d,d<0&&Y0&&l&&(Y0.hasOnce=!0)}function kI(d){return d.dynamicChildren=N2>0?Y0||o_:null,bY(),N2>0&&Y0&&Y0.push(d),d}function Fi(d,l,z,j,J,mt){return kI(Oe(d,l,z,j,J,mt,!0))}function K0(d,l,z,j,J){return kI(uu(d,l,z,j,J,!0))}function j2(d){return d?d.__v_isVNode===!0:!1}function gy(d,l){return d.type===l.type&&d.key===l.key}const TI=({key:d})=>d??null,$5=({ref:d,ref_key:l,ref_for:z})=>(typeof d=="number"&&(d=""+d),d!=null?cd(d)||qd(d)||Vu(d)?{i:Dp,r:d,k:l,f:!!z}:d:null);function Oe(d,l=null,z=null,j=0,J=null,mt=d===Ou?0:1,kt=!1,Dt=!1){const $t={__v_isVNode:!0,__v_skip:!0,type:d,props:l,key:l&&TI(l),ref:l&&$5(l),scopeId:Wz,slotScopeIds:null,children:z,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:mt,patchFlag:j,dynamicProps:J,dynamicChildren:null,appContext:null,ctx:Dp};return Dt?(ZA($t,z),mt&128&&d.normalize($t)):z&&($t.shapeFlag|=cd(z)?8:16),N2>0&&!kt&&Y0&&($t.patchFlag>0||mt&6)&&$t.patchFlag!==32&&Y0.push($t),$t}const uu=wY;function wY(d,l=null,z=null,j=0,J=null,mt=!1){if((!d||d===iI)&&(d=Jp),j2(d)){const Dt=g1(d,l,!0);return z&&ZA(Dt,z),N2>0&&!mt&&Y0&&(Dt.shapeFlag&6?Y0[Y0.indexOf(d)]=Dt:Y0.push(Dt)),Dt.patchFlag=-2,Dt}if(IY(d)&&(d=d.__vccOpts),l){l=kY(l);let{class:Dt,style:$t}=l;Dt&&!cd(Dt)&&(l.class=Xs(Dt)),gf($t)&&(RA($t)&&!iu($t)&&($t=up({},$t)),l.style=pg($t))}const kt=cd(d)?1:wI(d)?128:Zz(d)?64:gf(d)?4:Vu(d)?2:0;return Oe(d,l,z,j,J,kt,mt,!0)}function kY(d){return d?RA(d)||fI(d)?up({},d):d:null}function g1(d,l,z=!1,j=!1){const{props:J,ref:mt,patchFlag:kt,children:Dt,transition:$t}=d,ee=l?TY(J||{},l):J,pe={__v_isVNode:!0,__v_skip:!0,type:d.type,props:ee,key:ee&&TI(ee),ref:l&&l.ref?z&&mt?iu(mt)?mt.concat($5(l)):[mt,$5(l)]:$5(l):mt,scopeId:d.scopeId,slotScopeIds:d.slotScopeIds,children:Dt,target:d.target,targetStart:d.targetStart,targetAnchor:d.targetAnchor,staticCount:d.staticCount,shapeFlag:d.shapeFlag,patchFlag:l&&d.type!==Ou?kt===-1?16:kt|16:kt,dynamicProps:d.dynamicProps,dynamicChildren:d.dynamicChildren,appContext:d.appContext,dirs:d.dirs,transition:$t,component:d.component,suspense:d.suspense,ssContent:d.ssContent&&g1(d.ssContent),ssFallback:d.ssFallback&&g1(d.ssFallback),placeholder:d.placeholder,el:d.el,anchor:d.anchor,ctx:d.ctx,ce:d.ce};return $t&&j&&My(pe,$t.clone(pe)),pe}function nc(d=" ",l=0){return uu(z4,null,d,l)}function Af(d,l){const z=uu(Z5,null,d);return z.staticCount=l,z}function ps(d="",l=!1){return l?(Si(),K0(Jp,null,d)):uu(Jp,null,d)}function lg(d){return d==null||typeof d=="boolean"?uu(Jp):iu(d)?uu(Ou,null,d.slice()):j2(d)?a1(d):uu(z4,null,String(d))}function a1(d){return d.el===null&&d.patchFlag!==-1||d.memo?d:g1(d)}function ZA(d,l){let z=0;const{shapeFlag:j}=d;if(l==null)l=null;else if(iu(l))z=16;else if(typeof l=="object")if(j&65){const J=l.default;J&&(J._c&&(J._d=!1),ZA(d,J()),J._c&&(J._d=!0));return}else{z=32;const J=l._;!J&&!fI(l)?l._ctx=Dp:J===3&&Dp&&(Dp.slots._===1?l._=1:(l._=2,d.patchFlag|=1024))}else Vu(l)?(l={default:l,_ctx:Dp},z=32):(l=String(l),j&64?(z=16,l=[nc(l)]):z=8);d.children=l,d.shapeFlag|=z}function TY(...d){const l={};for(let z=0;zQp||Dp;let u4,eA;{const d=M4(),l=(z,j)=>{let J;return(J=d[z])||(J=d[z]=[]),J.push(j),mt=>{J.length>1?J.forEach(kt=>kt(mt)):J[0](mt)}};u4=l("__VUE_INSTANCE_SETTERS__",z=>Qp=z),eA=l("__VUE_SSR_SETTERS__",z=>U2=z)}const rw=d=>{const l=Qp;return u4(d),d.scope.on(),()=>{d.scope.off(),u4(l)}},jC=()=>{Qp&&Qp.scope.off(),u4(null)};function AI(d){return d.vnode.shapeFlag&4}let U2=!1;function EY(d,l=!1,z=!1){l&&eA(l);const{props:j,children:J}=d.vnode,mt=AI(d);eY(d,j,mt,l),aY(d,J,z||l);const kt=mt?CY(d,l):void 0;return l&&eA(!1),kt}function CY(d,l){const z=d.type;d.accessCache=Object.create(null),d.proxy=new Proxy(d.ctx,ZG);const{setup:j}=z;if(j){ov();const J=d.setupContext=j.length>1?PY(d):null,mt=rw(d),kt=tw(j,d,0,[d.props,J]),Dt=dz(kt);if(sv(),mt(),(Dt||d.sp)&&!u_(d)&&tI(d),Dt){if(kt.then(jC,jC),l)return kt.then($t=>{UC(d,$t)}).catch($t=>{E4($t,d,0)});d.asyncDep=kt}else UC(d,kt)}else MI(d)}function UC(d,l,z){Vu(l)?d.type.__ssrInlineRender?d.ssrRender=l:d.render=l:gf(l)&&(d.setupState=Nz(l)),MI(d)}function MI(d,l,z){const j=d.type;d.render||(d.render=j.render||hg);{const J=rw(d);ov();try{$G(d)}finally{sv(),J()}}}const LY={get(d,l){return Kp(d,"get",""),d[l]}};function PY(d){const l=z=>{d.exposed=z||{}};return{attrs:new Proxy(d.attrs,LY),slots:d.slots,emit:d.emit,expose:l}}function O4(d){return d.exposed?d.exposeProxy||(d.exposeProxy=new Proxy(Nz(BA(d.exposed)),{get(l,z){if(z in l)return l[z];if(z in M2)return M2[z](d)},has(l,z){return z in l||z in M2}})):d.proxy}function zY(d,l=!0){return Vu(d)?d.displayName||d.name:d.name||l&&d.__name}function IY(d){return Vu(d)&&"__vccOpts"in d}const Ko=(d,l)=>SG(d,l,U2);function $A(d,l,z){const j=arguments.length;return j===2?gf(l)&&!iu(l)?j2(l)?uu(d,null,[l]):uu(d,l):uu(d,null,l):(j>3?z=Array.prototype.slice.call(arguments,2):j===3&&j2(z)&&(z=[z]),uu(d,l,z))}const OY="3.5.18";/** +**/function tw(d,s,E,B){try{return B?d(...B):d()}catch(K){z4(K,s,E)}}function Lm(d,s,E,B){if(Vu(d)){const K=tw(d,s,E,B);return K&&CI(K)&&K.catch(pt=>{z4(pt,s,E)}),K}if(au(d)){const K=[];for(let pt=0;pt>>1,K=f0[B],pt=R2(K);pt=R2(E)?f0.push(d):f0.splice(tY(s),0,d),d.flags|=1,nz()}}function nz(){c4||(c4=rz.then(az))}function eY(d){au(d)?u_.push(...d):i1&&d.id===-1?i1.splice(i_+1,0,d):d.flags&1||(u_.push(d),d.flags|=1),nz()}function RC(d,s,E=lg+1){for(;ER2(E)-R2(B));if(u_.length=0,i1){i1.push(...s);return}for(i1=s,i_=0;i_d.id==null?d.flags&2?-1:1/0:d.id;function az(d){try{for(lg=0;lg{B._d&&XC(-1);const pt=h4(s);let _t;try{_t=d(...K)}finally{h4(pt),B._d&&XC(1)}return _t};return B._n=!0,B._c=!0,B._d=!0,B}function Gp(d,s){if(Op===null)return d;const E=N4(Op),B=d.dirs||(d.dirs=[]);for(let K=0;Kd.__isTeleport,T2=d=>d&&(d.disabled||d.disabled===""),BC=d=>d&&(d.defer||d.defer===""),NC=d=>typeof SVGElement<"u"&&d instanceof SVGElement,jC=d=>typeof MathMLElement=="function"&&d instanceof MathMLElement,oA=(d,s)=>{const E=d&&d.to;return sd(E)?s?s(E):null:E},uz={name:"Teleport",__isTeleport:!0,process(d,s,E,B,K,pt,_t,Ot,jt,te){const{mc:he,pc:De,pbc:er,o:{insert:pr,querySelector:Mr,createText:Tr,createComment:Vr}}=te,mn=T2(s.props);let{shapeFlag:Dt,children:cn,dynamicChildren:Jn}=s;if(d==null){const Bn=s.el=Tr(""),ni=s.anchor=Tr("");pr(Bn,E,B),pr(ni,E,B);const Wi=(qr,Di)=>{Dt&16&&(K&&K.isCE&&(K.ce._teleportTarget=qr),he(cn,qr,Di,K,pt,_t,Ot,jt))},Un=()=>{const qr=s.target=oA(s.props,Mr),Di=cz(qr,s,Tr,pr);qr&&(_t!=="svg"&&NC(qr)?_t="svg":_t!=="mathml"&&jC(qr)&&(_t="mathml"),mn||(Wi(qr,Di),Y5(s,!1)))};mn&&(Wi(E,ni),Y5(s,!0)),BC(s.props)?(s.el.__isMounted=!1,c0(()=>{Un(),delete s.el.__isMounted},pt)):Un()}else{if(BC(s.props)&&d.el.__isMounted===!1){c0(()=>{uz.process(d,s,E,B,K,pt,_t,Ot,jt,te)},pt);return}s.el=d.el,s.targetStart=d.targetStart;const Bn=s.anchor=d.anchor,ni=s.target=d.target,Wi=s.targetAnchor=d.targetAnchor,Un=T2(d.props),qr=Un?E:ni,Di=Un?Bn:Wi;if(_t==="svg"||NC(ni)?_t="svg":(_t==="mathml"||jC(ni))&&(_t="mathml"),Jn?(er(d.dynamicChildren,Jn,qr,K,pt,_t,Ot),rM(d,s,!0)):jt||De(d,s,qr,Di,K,pt,_t,Ot,!1),mn)Un?s.props&&d.props&&s.props.to!==d.props.to&&(s.props.to=d.props.to):C5(s,E,Bn,te,1);else if((s.props&&s.props.to)!==(d.props&&d.props.to)){const Fi=s.target=oA(s.props,Mr);Fi&&C5(s,Fi,null,te,0)}else Un&&C5(s,ni,Wi,te,1);Y5(s,mn)}},remove(d,s,E,{um:B,o:{remove:K}},pt){const{shapeFlag:_t,children:Ot,anchor:jt,targetStart:te,targetAnchor:he,target:De,props:er}=d;if(De&&(K(te),K(he)),pt&&K(jt),_t&16){const pr=pt||!T2(er);for(let Mr=0;Mr{d.isMounted=!0}),gg(()=>{d.isUnmounting=!0}),d}const im=[Function,Array],fz={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:im,onEnter:im,onAfterEnter:im,onEnterCancelled:im,onBeforeLeave:im,onLeave:im,onAfterLeave:im,onLeaveCancelled:im,onBeforeAppear:im,onAppear:im,onAfterAppear:im,onAppearCancelled:im},dz=d=>{const s=d.subTree;return s.component?dz(s.component):s},nY={name:"BaseTransition",props:fz,setup(d,{slots:s}){const E=B4(),B=hz();return()=>{const K=s.default&&JA(s.default(),!0);if(!K||!K.length)return;const pt=pz(K),_t=Uu(d),{mode:Ot}=_t;if(B.isLeaving)return k8(pt);const jt=UC(pt);if(!jt)return k8(pt);let te=B2(jt,_t,B,E,De=>te=De);jt.type!==Yp&&Sy(jt,te);let he=E.subTree&&UC(E.subTree);if(he&&he.type!==Yp&&!vy(jt,he)&&dz(E).type!==Yp){let De=B2(he,_t,B,E);if(Sy(he,De),Ot==="out-in"&&jt.type!==Yp)return B.isLeaving=!0,De.afterLeave=()=>{B.isLeaving=!1,E.job.flags&8||E.update(),delete De.afterLeave,he=void 0},k8(pt);Ot==="in-out"&&jt.type!==Yp?De.delayLeave=(er,pr,Mr)=>{const Tr=mz(B,he);Tr[String(he.key)]=he,er[a1]=()=>{pr(),er[a1]=void 0,delete te.delayedLeave,he=void 0},te.delayedLeave=()=>{Mr(),delete te.delayedLeave,he=void 0}}:he=void 0}else he&&(he=void 0);return pt}}};function pz(d){let s=d[0];if(d.length>1){for(const E of d)if(E.type!==Yp){s=E;break}}return s}const iY=nY;function mz(d,s){const{leavingVNodes:E}=d;let B=E.get(s.type);return B||(B=Object.create(null),E.set(s.type,B)),B}function B2(d,s,E,B,K){const{appear:pt,mode:_t,persisted:Ot=!1,onBeforeEnter:jt,onEnter:te,onAfterEnter:he,onEnterCancelled:De,onBeforeLeave:er,onLeave:pr,onAfterLeave:Mr,onLeaveCancelled:Tr,onBeforeAppear:Vr,onAppear:mn,onAfterAppear:Dt,onAppearCancelled:cn}=s,Jn=String(d.key),Bn=mz(E,d),ni=(qr,Di)=>{qr&&Lm(qr,B,9,Di)},Wi=(qr,Di)=>{const Fi=Di[1];ni(qr,Di),au(qr)?qr.every(Pi=>Pi.length<=1)&&Fi():qr.length<=1&&Fi()},Un={mode:_t,persisted:Ot,beforeEnter(qr){let Di=jt;if(!E.isMounted)if(pt)Di=Vr||jt;else return;qr[a1]&&qr[a1](!0);const Fi=Bn[Jn];Fi&&vy(d,Fi)&&Fi.el[a1]&&Fi.el[a1](),ni(Di,[qr])},enter(qr){let Di=te,Fi=he,Pi=De;if(!E.isMounted)if(pt)Di=mn||te,Fi=Dt||he,Pi=cn||De;else return;let bi=!1;const Yi=qr[L5]=Ca=>{bi||(bi=!0,Ca?ni(Pi,[qr]):ni(Fi,[qr]),Un.delayedLeave&&Un.delayedLeave(),qr[L5]=void 0)};Di?Wi(Di,[qr,Yi]):Yi()},leave(qr,Di){const Fi=String(d.key);if(qr[L5]&&qr[L5](!0),E.isUnmounting)return Di();ni(er,[qr]);let Pi=!1;const bi=qr[a1]=Yi=>{Pi||(Pi=!0,Di(),Yi?ni(Tr,[qr]):ni(Mr,[qr]),qr[a1]=void 0,Bn[Fi]===d&&delete Bn[Fi])};Bn[Fi]=d,pr?Wi(pr,[qr,bi]):bi()},clone(qr){const Di=B2(qr,s,E,B,K);return K&&K(Di),Di}};return Un}function k8(d){if(O4(d))return d=y1(d),d.children=null,d}function UC(d){if(!O4(d))return lz(d.type)&&d.children?pz(d.children):d;if(d.component)return d.component.subTree;const{shapeFlag:s,children:E}=d;if(E){if(s&16)return E[0];if(s&32&&Vu(E.default))return E.default()}}function Sy(d,s){d.shapeFlag&6&&d.component?(d.transition=s,Sy(d.component.subTree,s)):d.shapeFlag&128?(d.ssContent.transition=s.clone(d.ssContent),d.ssFallback.transition=s.clone(d.ssFallback)):d.transition=s}function JA(d,s=!1,E){let B=[],K=0;for(let pt=0;pt1)for(let pt=0;ptA2(Mr,s&&(au(s)?s[Tr]:s),E,B,K));return}if(c_(B)&&!K){B.shapeFlag&512&&B.type.__asyncResolved&&B.component.subTree.component&&A2(d,s,E,B.component.subTree);return}const pt=B.shapeFlag&4?N4(B.component):B.el,_t=K?null:pt,{i:Ot,r:jt}=d,te=s&&s.r,he=Ot.refs===mf?Ot.refs={}:Ot.refs,De=Ot.setupState,er=Uu(De),pr=De===mf?()=>!1:Mr=>Rh(er,Mr);if(te!=null&&te!==jt&&(sd(te)?(he[te]=null,pr(te)&&(De[te]=null)):jd(te)&&(te.value=null)),Vu(jt))tw(jt,Ot,12,[_t,he]);else{const Mr=sd(jt),Tr=jd(jt);if(Mr||Tr){const Vr=()=>{if(d.f){const mn=Mr?pr(jt)?De[jt]:he[jt]:jt.value;K?au(mn)&&jA(mn,pt):au(mn)?mn.includes(pt)||mn.push(pt):Mr?(he[jt]=[pt],pr(jt)&&(De[jt]=he[jt])):(jt.value=[pt],d.k&&(he[d.k]=jt.value))}else Mr?(he[jt]=_t,pr(jt)&&(De[jt]=_t)):Tr&&(jt.value=_t,d.k&&(he[d.k]=_t))};_t?(Vr.id=-1,c0(Vr,E)):Vr()}}}P4().requestIdleCallback;P4().cancelIdleCallback;const c_=d=>!!d.type.__asyncLoader,O4=d=>d.type.__isKeepAlive;function aY(d,s){vz(d,"a",s)}function oY(d,s){vz(d,"da",s)}function vz(d,s,E=Kp){const B=d.__wdc||(d.__wdc=()=>{let K=E;for(;K;){if(K.isDeactivated)return;K=K.parent}return d()});if(D4(s,B,E),E){let K=E.parent;for(;K&&K.parent;)O4(K.parent.vnode)&&sY(B,s,E,K),K=K.parent}}function sY(d,s,E,B){const K=D4(s,d,B,!0);Iy(()=>{jA(B[s],K)},E)}function D4(d,s,E=Kp,B=!1){if(E){const K=E[d]||(E[d]=[]),pt=s.__weh||(s.__weh=(..._t)=>{av();const Ot=rw(E),jt=Lm(s,E,d,_t);return Ot(),ov(),jt});return B?K.unshift(pt):K.push(pt),pt}}const sv=d=>(s,E=Kp)=>{(!U2||d==="sp")&&D4(d,(...B)=>s(...B),E)},lY=sv("bm"),bp=sv("m"),uY=sv("bu"),yz=sv("u"),gg=sv("bum"),Iy=sv("um"),cY=sv("sp"),hY=sv("rtg"),fY=sv("rtc");function dY(d,s=Kp){D4("ec",d,s)}const xz="components";function QA(d,s){return bz(xz,d,!0,s)||d}const _z=Symbol.for("v-ndc");function f4(d){return sd(d)?bz(xz,d,!1)||d:d||_z}function bz(d,s,E=!0,B=!1){const K=Op||Kp;if(K){const pt=K.type;{const Ot=eK(pt,!1);if(Ot&&(Ot===s||Ot===cm(s)||Ot===L4(cm(s))))return pt}const _t=VC(K[d]||pt[d],s)||VC(K.appContext[d],s);return!_t&&B?pt:_t}}function VC(d,s){return d&&(d[s]||d[cm(s)]||d[L4(cm(s))])}function Jh(d,s,E,B){let K;const pt=E,_t=au(d);if(_t||sd(d)){const Ot=_t&&m1(d);let jt=!1,te=!1;Ot&&(jt=!lm(d),te=v1(d),d=I4(d)),K=new Array(d.length);for(let he=0,De=d.length;hes(Ot,jt,void 0,pt));else{const Ot=Object.keys(d);K=new Array(Ot.length);for(let jt=0,te=Ot.length;jtj2(s)?!(s.type===Yp||s.type===Pu&&!wz(s.children)):!0)?d:null}const sA=d=>d?Uz(d)?N4(d):sA(d.parent):null,M2=ap(Object.create(null),{$:d=>d,$el:d=>d.vnode.el,$data:d=>d.data,$props:d=>d.props,$attrs:d=>d.attrs,$slots:d=>d.slots,$refs:d=>d.refs,$parent:d=>sA(d.parent),$root:d=>sA(d.root),$host:d=>d.ce,$emit:d=>d.emit,$options:d=>Tz(d),$forceUpdate:d=>d.f||(d.f=()=>{KA(d.update)}),$nextTick:d=>d.n||(d.n=om.bind(d.proxy)),$watch:d=>FY.bind(d)}),T8=(d,s)=>d!==mf&&!d.__isScriptSetup&&Rh(d,s),mY={get({_:d},s){if(s==="__v_skip")return!0;const{ctx:E,setupState:B,data:K,props:pt,accessCache:_t,type:Ot,appContext:jt}=d;let te;if(s[0]!=="$"){const pr=_t[s];if(pr!==void 0)switch(pr){case 1:return B[s];case 2:return K[s];case 4:return E[s];case 3:return pt[s]}else{if(T8(B,s))return _t[s]=1,B[s];if(K!==mf&&Rh(K,s))return _t[s]=2,K[s];if((te=d.propsOptions[0])&&Rh(te,s))return _t[s]=3,pt[s];if(E!==mf&&Rh(E,s))return _t[s]=4,E[s];lA&&(_t[s]=0)}}const he=M2[s];let De,er;if(he)return s==="$attrs"&&Zp(d.attrs,"get",""),he(d);if((De=Ot.__cssModules)&&(De=De[s]))return De;if(E!==mf&&Rh(E,s))return _t[s]=4,E[s];if(er=jt.config.globalProperties,Rh(er,s))return er[s]},set({_:d},s,E){const{data:B,setupState:K,ctx:pt}=d;return T8(K,s)?(K[s]=E,!0):B!==mf&&Rh(B,s)?(B[s]=E,!0):Rh(d.props,s)||s[0]==="$"&&s.slice(1)in d?!1:(pt[s]=E,!0)},has({_:{data:d,setupState:s,accessCache:E,ctx:B,appContext:K,propsOptions:pt}},_t){let Ot;return!!E[_t]||d!==mf&&Rh(d,_t)||T8(s,_t)||(Ot=pt[0])&&Rh(Ot,_t)||Rh(B,_t)||Rh(M2,_t)||Rh(K.config.globalProperties,_t)},defineProperty(d,s,E){return E.get!=null?d._.accessCache[s]=0:Rh(E,"value")&&this.set(d,s,E.value,null),Reflect.defineProperty(d,s,E)}};function HC(d){return au(d)?d.reduce((s,E)=>(s[E]=null,s),{}):d}let lA=!0;function gY(d){const s=Tz(d),E=d.proxy,B=d.ctx;lA=!1,s.beforeCreate&&WC(s.beforeCreate,d,"bc");const{data:K,computed:pt,methods:_t,watch:Ot,provide:jt,inject:te,created:he,beforeMount:De,mounted:er,beforeUpdate:pr,updated:Mr,activated:Tr,deactivated:Vr,beforeDestroy:mn,beforeUnmount:Dt,destroyed:cn,unmounted:Jn,render:Bn,renderTracked:ni,renderTriggered:Wi,errorCaptured:Un,serverPrefetch:qr,expose:Di,inheritAttrs:Fi,components:Pi,directives:bi,filters:Yi}=s;if(te&&vY(te,B,null),_t)for(const si in _t){const Ma=_t[si];Vu(Ma)&&(B[si]=Ma.bind(E))}if(K){const si=K.call(E,E);gf(si)&&(d.data=My(si))}if(lA=!0,pt)for(const si in pt){const Ma=pt[si],zo=Vu(Ma)?Ma.bind(E,E):Vu(Ma.get)?Ma.get.bind(E,E):dg,ho=!Vu(Ma)&&Vu(Ma.set)?Ma.set.bind(E):dg,mo=$o({get:zo,set:ho});Object.defineProperty(B,si,{enumerable:!0,configurable:!0,get:()=>mo.value,set:Ts=>mo.value=Ts})}if(Ot)for(const si in Ot)kz(Ot[si],B,E,si);if(jt){const si=Vu(jt)?jt.call(E):jt;Reflect.ownKeys(si).forEach(Ma=>{K5(Ma,si[Ma])})}he&&WC(he,d,"c");function Ni(si,Ma){au(Ma)?Ma.forEach(zo=>si(zo.bind(E))):Ma&&si(Ma.bind(E))}if(Ni(lY,De),Ni(bp,er),Ni(uY,pr),Ni(yz,Mr),Ni(aY,Tr),Ni(oY,Vr),Ni(dY,Un),Ni(fY,ni),Ni(hY,Wi),Ni(gg,Dt),Ni(Iy,Jn),Ni(cY,qr),au(Di))if(Di.length){const si=d.exposed||(d.exposed={});Di.forEach(Ma=>{Object.defineProperty(si,Ma,{get:()=>E[Ma],set:zo=>E[Ma]=zo,enumerable:!0})})}else d.exposed||(d.exposed={});Bn&&d.render===dg&&(d.render=Bn),Fi!=null&&(d.inheritAttrs=Fi),Pi&&(d.components=Pi),bi&&(d.directives=bi),qr&&gz(d)}function vY(d,s,E=dg){au(d)&&(d=uA(d));for(const B in d){const K=d[B];let pt;gf(K)?"default"in K?pt=um(K.from||B,K.default,!0):pt=um(K.from||B):pt=um(K),jd(pt)?Object.defineProperty(s,B,{enumerable:!0,configurable:!0,get:()=>pt.value,set:_t=>pt.value=_t}):s[B]=pt}}function WC(d,s,E){Lm(au(d)?d.map(B=>B.bind(s.proxy)):d.bind(s.proxy),s,E)}function kz(d,s,E,B){let K=B.includes(".")?Fz(E,B):()=>E[B];if(sd(d)){const pt=s[d];Vu(pt)&&Em(K,pt)}else if(Vu(d))Em(K,d.bind(E));else if(gf(d))if(au(d))d.forEach(pt=>kz(pt,s,E,B));else{const pt=Vu(d.handler)?d.handler.bind(E):s[d.handler];Vu(pt)&&Em(K,pt,d)}}function Tz(d){const s=d.type,{mixins:E,extends:B}=s,{mixins:K,optionsCache:pt,config:{optionMergeStrategies:_t}}=d.appContext,Ot=pt.get(s);let jt;return Ot?jt=Ot:!K.length&&!E&&!B?jt=s:(jt={},K.length&&K.forEach(te=>d4(jt,te,_t,!0)),d4(jt,s,_t)),gf(s)&&pt.set(s,jt),jt}function d4(d,s,E,B=!1){const{mixins:K,extends:pt}=s;pt&&d4(d,pt,E,!0),K&&K.forEach(_t=>d4(d,_t,E,!0));for(const _t in s)if(!(B&&_t==="expose")){const Ot=yY[_t]||E&&E[_t];d[_t]=Ot?Ot(d[_t],s[_t]):s[_t]}return d}const yY={data:qC,props:$C,emits:$C,methods:m2,computed:m2,beforeCreate:u0,created:u0,beforeMount:u0,mounted:u0,beforeUpdate:u0,updated:u0,beforeDestroy:u0,beforeUnmount:u0,destroyed:u0,unmounted:u0,activated:u0,deactivated:u0,errorCaptured:u0,serverPrefetch:u0,components:m2,directives:m2,watch:_Y,provide:qC,inject:xY};function qC(d,s){return s?d?function(){return ap(Vu(d)?d.call(this,this):d,Vu(s)?s.call(this,this):s)}:s:d}function xY(d,s){return m2(uA(d),uA(s))}function uA(d){if(au(d)){const s={};for(let E=0;E1)return E&&Vu(s)?s.call(B&&B.proxy):s}}function kY(){return!!(B4()||ky)}const Mz={},Sz=()=>Object.create(Mz),Ez=d=>Object.getPrototypeOf(d)===Mz;function TY(d,s,E,B=!1){const K={},pt=Sz();d.propsDefaults=Object.create(null),Cz(d,s,K,pt);for(const _t in d.propsOptions[0])_t in K||(K[_t]=void 0);E?d.props=B?K:JI(K):d.type.props?d.props=K:d.props=pt,d.attrs=pt}function AY(d,s,E,B){const{props:K,attrs:pt,vnode:{patchFlag:_t}}=d,Ot=Uu(K),[jt]=d.propsOptions;let te=!1;if((B||_t>0)&&!(_t&16)){if(_t&8){const he=d.vnode.dynamicProps;for(let De=0;De{jt=!0;const[er,pr]=Lz(De,s,!0);ap(_t,er),pr&&Ot.push(...pr)};!E&&s.mixins.length&&s.mixins.forEach(he),d.extends&&he(d.extends),d.mixins&&d.mixins.forEach(he)}if(!pt&&!jt)return gf(d)&&B.set(d,s_),s_;if(au(pt))for(let he=0;hed==="_"||d==="__"||d==="_ctx"||d==="$stable",eM=d=>au(d)?d.map(cg):[cg(d)],SY=(d,s,E)=>{if(s._n)return s;const B=ew((...K)=>eM(s(...K)),E);return B._c=!1,B},Pz=(d,s,E)=>{const B=d._ctx;for(const K in d){if(tM(K))continue;const pt=d[K];if(Vu(pt))s[K]=SY(K,pt,B);else if(pt!=null){const _t=eM(pt);s[K]=()=>_t}}},Iz=(d,s)=>{const E=eM(s);d.slots.default=()=>E},zz=(d,s,E)=>{for(const B in s)(E||!tM(B))&&(d[B]=s[B])},EY=(d,s,E)=>{const B=d.slots=Sz();if(d.vnode.shapeFlag&32){const K=s.__;K&&rA(B,"__",K,!0);const pt=s._;pt?(zz(B,s,E),E&&rA(B,"_",pt,!0)):Pz(s,B)}else s&&Iz(d,s)},CY=(d,s,E)=>{const{vnode:B,slots:K}=d;let pt=!0,_t=mf;if(B.shapeFlag&32){const Ot=s._;Ot?E&&Ot===1?pt=!1:zz(K,s,E):(pt=!s.$stable,Pz(s,K)),_t=s}else s&&(Iz(d,s),_t={default:1});if(pt)for(const Ot in K)!tM(Ot)&&_t[Ot]==null&&delete K[Ot]},c0=HY;function LY(d){return PY(d)}function PY(d,s){const E=P4();E.__VUE__=!0;const{insert:B,remove:K,patchProp:pt,createElement:_t,createText:Ot,createComment:jt,setText:te,setElementText:he,parentNode:De,nextSibling:er,setScopeId:pr=dg,insertStaticContent:Mr}=d,Tr=(vi,wi,hi,go=null,Mo=null,To=null,ms=void 0,bs=null,as=!!wi.dynamicChildren)=>{if(vi===wi)return;vi&&!vy(vi,wi)&&(go=da(vi),Ts(vi,Mo,To,!0),vi=null),wi.patchFlag===-2&&(as=!1,wi.dynamicChildren=null);const{type:Yo,ref:Ol,shapeFlag:Ns}=wi;switch(Yo){case R4:Vr(vi,wi,hi,go);break;case Yp:mn(vi,wi,hi,go);break;case X5:vi==null&&Dt(wi,hi,go,ms);break;case Pu:Pi(vi,wi,hi,go,Mo,To,ms,bs,as);break;default:Ns&1?Bn(vi,wi,hi,go,Mo,To,ms,bs,as):Ns&6?bi(vi,wi,hi,go,Mo,To,ms,bs,as):(Ns&64||Ns&128)&&Yo.process(vi,wi,hi,go,Mo,To,ms,bs,as,us)}Ol!=null&&Mo?A2(Ol,vi&&vi.ref,To,wi||vi,!wi):Ol==null&&vi&&vi.ref!=null&&A2(vi.ref,null,To,vi,!0)},Vr=(vi,wi,hi,go)=>{if(vi==null)B(wi.el=Ot(wi.children),hi,go);else{const Mo=wi.el=vi.el;wi.children!==vi.children&&te(Mo,wi.children)}},mn=(vi,wi,hi,go)=>{vi==null?B(wi.el=jt(wi.children||""),hi,go):wi.el=vi.el},Dt=(vi,wi,hi,go)=>{[vi.el,vi.anchor]=Mr(vi.children,wi,hi,go,vi.el,vi.anchor)},cn=({el:vi,anchor:wi},hi,go)=>{let Mo;for(;vi&&vi!==wi;)Mo=er(vi),B(vi,hi,go),vi=Mo;B(wi,hi,go)},Jn=({el:vi,anchor:wi})=>{let hi;for(;vi&&vi!==wi;)hi=er(vi),K(vi),vi=hi;K(wi)},Bn=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{wi.type==="svg"?ms="svg":wi.type==="math"&&(ms="mathml"),vi==null?ni(wi,hi,go,Mo,To,ms,bs,as):qr(vi,wi,Mo,To,ms,bs,as)},ni=(vi,wi,hi,go,Mo,To,ms,bs)=>{let as,Yo;const{props:Ol,shapeFlag:Ns,transition:Bl,dirs:vu}=vi;if(as=vi.el=_t(vi.type,To,Ol&&Ol.is,Ol),Ns&8?he(as,vi.children):Ns&16&&Un(vi.children,as,null,go,Mo,A8(vi,To),ms,bs),vu&&ay(vi,null,go,"created"),Wi(as,vi,vi.scopeId,ms,go),Ol){for(const fh in Ol)fh!=="value"&&!b2(fh)&&pt(as,fh,null,Ol[fh],To,go);"value"in Ol&&pt(as,"value",null,Ol.value,To),(Yo=Ol.onVnodeBeforeMount)&&ng(Yo,go,vi)}vu&&ay(vi,null,go,"beforeMount");const tc=IY(Mo,Bl);tc&&Bl.beforeEnter(as),B(as,wi,hi),((Yo=Ol&&Ol.onVnodeMounted)||tc||vu)&&c0(()=>{Yo&&ng(Yo,go,vi),tc&&Bl.enter(as),vu&&ay(vi,null,go,"mounted")},Mo)},Wi=(vi,wi,hi,go,Mo)=>{if(hi&&pr(vi,hi),go)for(let To=0;To{for(let Yo=as;Yo{const bs=wi.el=vi.el;let{patchFlag:as,dynamicChildren:Yo,dirs:Ol}=wi;as|=vi.patchFlag&16;const Ns=vi.props||mf,Bl=wi.props||mf;let vu;if(hi&&oy(hi,!1),(vu=Bl.onVnodeBeforeUpdate)&&ng(vu,hi,wi,vi),Ol&&ay(wi,vi,hi,"beforeUpdate"),hi&&oy(hi,!0),(Ns.innerHTML&&Bl.innerHTML==null||Ns.textContent&&Bl.textContent==null)&&he(bs,""),Yo?Di(vi.dynamicChildren,Yo,bs,hi,go,A8(wi,Mo),To):ms||Ma(vi,wi,bs,null,hi,go,A8(wi,Mo),To,!1),as>0){if(as&16)Fi(bs,Ns,Bl,hi,Mo);else if(as&2&&Ns.class!==Bl.class&&pt(bs,"class",null,Bl.class,Mo),as&4&&pt(bs,"style",Ns.style,Bl.style,Mo),as&8){const tc=wi.dynamicProps;for(let fh=0;fh{vu&&ng(vu,hi,wi,vi),Ol&&ay(wi,vi,hi,"updated")},go)},Di=(vi,wi,hi,go,Mo,To,ms)=>{for(let bs=0;bs{if(wi!==hi){if(wi!==mf)for(const To in wi)!b2(To)&&!(To in hi)&&pt(vi,To,wi[To],null,Mo,go);for(const To in hi){if(b2(To))continue;const ms=hi[To],bs=wi[To];ms!==bs&&To!=="value"&&pt(vi,To,bs,ms,Mo,go)}"value"in hi&&pt(vi,"value",wi.value,hi.value,Mo)}},Pi=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{const Yo=wi.el=vi?vi.el:Ot(""),Ol=wi.anchor=vi?vi.anchor:Ot("");let{patchFlag:Ns,dynamicChildren:Bl,slotScopeIds:vu}=wi;vu&&(bs=bs?bs.concat(vu):vu),vi==null?(B(Yo,hi,go),B(Ol,hi,go),Un(wi.children||[],hi,Ol,Mo,To,ms,bs,as)):Ns>0&&Ns&64&&Bl&&vi.dynamicChildren?(Di(vi.dynamicChildren,Bl,hi,Mo,To,ms,bs),(wi.key!=null||Mo&&wi===Mo.subTree)&&rM(vi,wi,!0)):Ma(vi,wi,hi,Ol,Mo,To,ms,bs,as)},bi=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{wi.slotScopeIds=bs,vi==null?wi.shapeFlag&512?Mo.ctx.activate(wi,hi,go,ms,as):Yi(wi,hi,go,Mo,To,ms,as):Ca(vi,wi,as)},Yi=(vi,wi,hi,go,Mo,To,ms)=>{const bs=vi.component=KY(vi,go,Mo);if(O4(vi)&&(bs.ctx.renderer=us),XY(bs,!1,ms),bs.asyncDep){if(Mo&&Mo.registerDep(bs,Ni,ms),!vi.el){const as=bs.subTree=Wl(Yp);mn(null,as,wi,hi),vi.placeholder=as.el}}else Ni(bs,vi,wi,hi,Mo,To,ms)},Ca=(vi,wi,hi)=>{const go=wi.component=vi.component;if(UY(vi,wi,hi))if(go.asyncDep&&!go.asyncResolved){si(go,wi,hi);return}else go.next=wi,go.update();else wi.el=vi.el,go.vnode=wi},Ni=(vi,wi,hi,go,Mo,To,ms)=>{const bs=()=>{if(vi.isMounted){let{next:Ns,bu:Bl,u:vu,parent:tc,vnode:fh}=vi;{const d0=Oz(vi);if(d0){Ns&&(Ns.el=fh.el,si(vi,Ns,ms)),d0.asyncDep.then(()=>{vi.isUnmounted||bs()});return}}let Fc=Ns,op;oy(vi,!1),Ns?(Ns.el=fh.el,si(vi,Ns,ms)):Ns=fh,Bl&&G5(Bl),(op=Ns.props&&Ns.props.onVnodeBeforeUpdate)&&ng(op,tc,Ns,fh),oy(vi,!0);const Kd=YC(vi),e0=vi.subTree;vi.subTree=Kd,Tr(e0,Kd,De(e0.el),da(e0),vi,Mo,To),Ns.el=Kd.el,Fc===null&&VY(vi,Kd.el),vu&&c0(vu,Mo),(op=Ns.props&&Ns.props.onVnodeUpdated)&&c0(()=>ng(op,tc,Ns,fh),Mo)}else{let Ns;const{el:Bl,props:vu}=wi,{bm:tc,m:fh,parent:Fc,root:op,type:Kd}=vi,e0=c_(wi);oy(vi,!1),tc&&G5(tc),!e0&&(Ns=vu&&vu.onVnodeBeforeMount)&&ng(Ns,Fc,wi),oy(vi,!0);{op.ce&&op.ce._def.shadowRoot!==!1&&op.ce._injectChildStyle(Kd);const d0=vi.subTree=YC(vi);Tr(null,d0,hi,go,vi,Mo,To),wi.el=d0.el}if(fh&&c0(fh,Mo),!e0&&(Ns=vu&&vu.onVnodeMounted)){const d0=wi;c0(()=>ng(Ns,Fc,d0),Mo)}(wi.shapeFlag&256||Fc&&c_(Fc.vnode)&&Fc.vnode.shapeFlag&256)&&vi.a&&c0(vi.a,Mo),vi.isMounted=!0,wi=hi=go=null}};vi.scope.on();const as=vi.effect=new BI(bs);vi.scope.off();const Yo=vi.update=as.run.bind(as),Ol=vi.job=as.runIfDirty.bind(as);Ol.i=vi,Ol.id=vi.uid,as.scheduler=()=>KA(Ol),oy(vi,!0),Yo()},si=(vi,wi,hi)=>{wi.component=vi;const go=vi.vnode.props;vi.vnode=wi,vi.next=null,AY(vi,wi.props,go,hi),CY(vi,wi.children,hi),av(),RC(vi),ov()},Ma=(vi,wi,hi,go,Mo,To,ms,bs,as=!1)=>{const Yo=vi&&vi.children,Ol=vi?vi.shapeFlag:0,Ns=wi.children,{patchFlag:Bl,shapeFlag:vu}=wi;if(Bl>0){if(Bl&128){ho(Yo,Ns,hi,go,Mo,To,ms,bs,as);return}else if(Bl&256){zo(Yo,Ns,hi,go,Mo,To,ms,bs,as);return}}vu&8?(Ol&16&&Ia(Yo,Mo,To),Ns!==Yo&&he(hi,Ns)):Ol&16?vu&16?ho(Yo,Ns,hi,go,Mo,To,ms,bs,as):Ia(Yo,Mo,To,!0):(Ol&8&&he(hi,""),vu&16&&Un(Ns,hi,go,Mo,To,ms,bs,as))},zo=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{vi=vi||s_,wi=wi||s_;const Yo=vi.length,Ol=wi.length,Ns=Math.min(Yo,Ol);let Bl;for(Bl=0;BlOl?Ia(vi,Mo,To,!0,!1,Ns):Un(wi,hi,go,Mo,To,ms,bs,as,Ns)},ho=(vi,wi,hi,go,Mo,To,ms,bs,as)=>{let Yo=0;const Ol=wi.length;let Ns=vi.length-1,Bl=Ol-1;for(;Yo<=Ns&&Yo<=Bl;){const vu=vi[Yo],tc=wi[Yo]=as?o1(wi[Yo]):cg(wi[Yo]);if(vy(vu,tc))Tr(vu,tc,hi,null,Mo,To,ms,bs,as);else break;Yo++}for(;Yo<=Ns&&Yo<=Bl;){const vu=vi[Ns],tc=wi[Bl]=as?o1(wi[Bl]):cg(wi[Bl]);if(vy(vu,tc))Tr(vu,tc,hi,null,Mo,To,ms,bs,as);else break;Ns--,Bl--}if(Yo>Ns){if(Yo<=Bl){const vu=Bl+1,tc=vuBl)for(;Yo<=Ns;)Ts(vi[Yo],Mo,To,!0),Yo++;else{const vu=Yo,tc=Yo,fh=new Map;for(Yo=tc;Yo<=Bl;Yo++){const sp=wi[Yo]=as?o1(wi[Yo]):cg(wi[Yo]);sp.key!=null&&fh.set(sp.key,Yo)}let Fc,op=0;const Kd=Bl-tc+1;let e0=!1,d0=0;const Dm=new Array(Kd);for(Yo=0;Yo=Kd){Ts(sp,Mo,To,!0);continue}let p0;if(sp.key!=null)p0=fh.get(sp.key);else for(Fc=tc;Fc<=Bl;Fc++)if(Dm[Fc-tc]===0&&vy(sp,wi[Fc])){p0=Fc;break}p0===void 0?Ts(sp,Mo,To,!0):(Dm[p0-tc]=Yo+1,p0>=d0?d0=p0:e0=!0,Tr(sp,wi[p0],hi,null,Mo,To,ms,bs,as),op++)}const uv=e0?zY(Dm):s_;for(Fc=uv.length-1,Yo=Kd-1;Yo>=0;Yo--){const sp=tc+Yo,p0=wi[sp],Fm=wi[sp+1],Fy=sp+1{const{el:To,type:ms,transition:bs,children:as,shapeFlag:Yo}=vi;if(Yo&6){mo(vi.component.subTree,wi,hi,go);return}if(Yo&128){vi.suspense.move(wi,hi,go);return}if(Yo&64){ms.move(vi,wi,hi,us);return}if(ms===Pu){B(To,wi,hi);for(let Ns=0;Nsbs.enter(To),Mo);else{const{leave:Ns,delayLeave:Bl,afterLeave:vu}=bs,tc=()=>{vi.ctx.isUnmounted?K(To):B(To,wi,hi)},fh=()=>{Ns(To,()=>{tc(),vu&&vu()})};Bl?Bl(To,tc,fh):fh()}else B(To,wi,hi)},Ts=(vi,wi,hi,go=!1,Mo=!1)=>{const{type:To,props:ms,ref:bs,children:as,dynamicChildren:Yo,shapeFlag:Ol,patchFlag:Ns,dirs:Bl,cacheIndex:vu}=vi;if(Ns===-2&&(Mo=!1),bs!=null&&(av(),A2(bs,null,hi,vi,!0),ov()),vu!=null&&(wi.renderCache[vu]=void 0),Ol&256){wi.ctx.deactivate(vi);return}const tc=Ol&1&&Bl,fh=!c_(vi);let Fc;if(fh&&(Fc=ms&&ms.onVnodeBeforeUnmount)&&ng(Fc,wi,vi),Ol&6)ro(vi.component,hi,go);else{if(Ol&128){vi.suspense.unmount(hi,go);return}tc&&ay(vi,null,wi,"beforeUnmount"),Ol&64?vi.type.remove(vi,wi,hi,us,go):Yo&&!Yo.hasOnce&&(To!==Pu||Ns>0&&Ns&64)?Ia(Yo,wi,hi,!1,!0):(To===Pu&&Ns&384||!Mo&&Ol&16)&&Ia(as,wi,hi),go&&xl(vi)}(fh&&(Fc=ms&&ms.onVnodeUnmounted)||tc)&&c0(()=>{Fc&&ng(Fc,wi,vi),tc&&ay(vi,null,wi,"unmounted")},hi)},xl=vi=>{const{type:wi,el:hi,anchor:go,transition:Mo}=vi;if(wi===Pu){ko(hi,go);return}if(wi===X5){Jn(vi);return}const To=()=>{K(hi),Mo&&!Mo.persisted&&Mo.afterLeave&&Mo.afterLeave()};if(vi.shapeFlag&1&&Mo&&!Mo.persisted){const{leave:ms,delayLeave:bs}=Mo,as=()=>ms(hi,To);bs?bs(vi.el,To,as):as()}else To()},ko=(vi,wi)=>{let hi;for(;vi!==wi;)hi=er(vi),K(vi),vi=hi;K(wi)},ro=(vi,wi,hi)=>{const{bum:go,scope:Mo,job:To,subTree:ms,um:bs,m:as,a:Yo,parent:Ol,slots:{__:Ns}}=vi;GC(as),GC(Yo),go&&G5(go),Ol&&au(Ns)&&Ns.forEach(Bl=>{Ol.renderCache[Bl]=void 0}),Mo.stop(),To&&(To.flags|=8,Ts(ms,vi,wi,hi)),bs&&c0(bs,wi),c0(()=>{vi.isUnmounted=!0},wi),wi&&wi.pendingBranch&&!wi.isUnmounted&&vi.asyncDep&&!vi.asyncResolved&&vi.suspenseId===wi.pendingId&&(wi.deps--,wi.deps===0&&wi.resolve())},Ia=(vi,wi,hi,go=!1,Mo=!1,To=0)=>{for(let ms=To;ms{if(vi.shapeFlag&6)return da(vi.component.subTree);if(vi.shapeFlag&128)return vi.suspense.next();const wi=er(vi.anchor||vi.el),hi=wi&&wi[sz];return hi?er(hi):wi};let no=!1;const po=(vi,wi,hi)=>{vi==null?wi._vnode&&Ts(wi._vnode,null,null,!0):Tr(wi._vnode||null,vi,wi,null,null,null,hi),wi._vnode=vi,no||(no=!0,RC(),iz(),no=!1)},us={p:Tr,um:Ts,m:mo,r:xl,mt:Yi,mc:Un,pc:Ma,pbc:Di,n:da,o:d};return{render:po,hydrate:void 0,createApp:wY(po)}}function A8({type:d,props:s},E){return E==="svg"&&d==="foreignObject"||E==="mathml"&&d==="annotation-xml"&&s&&s.encoding&&s.encoding.includes("html")?void 0:E}function oy({effect:d,job:s},E){E?(d.flags|=32,s.flags|=4):(d.flags&=-33,s.flags&=-5)}function IY(d,s){return(!d||d&&!d.pendingBranch)&&s&&!s.persisted}function rM(d,s,E=!1){const B=d.children,K=s.children;if(au(B)&&au(K))for(let pt=0;pt>1,d[E[Ot]]0&&(s[B]=E[pt-1]),E[pt]=B)}}for(pt=E.length,_t=E[pt-1];pt-- >0;)E[pt]=_t,_t=s[_t];return E}function Oz(d){const s=d.subTree.component;if(s)return s.asyncDep&&!s.asyncResolved?s:Oz(s)}function GC(d){if(d)for(let s=0;sum(OY);function Em(d,s,E){return Dz(d,s,E)}function Dz(d,s,E=mf){const{immediate:B,deep:K,flush:pt,once:_t}=E,Ot=ap({},E),jt=s&&B||!s&&pt!=="post";let te;if(U2){if(pt==="sync"){const pr=DY();te=pr.__watcherHandles||(pr.__watcherHandles=[])}else if(!jt){const pr=()=>{};return pr.stop=dg,pr.resume=dg,pr.pause=dg,pr}}const he=Kp;Ot.call=(pr,Mr,Tr)=>Lm(pr,he,Mr,Tr);let De=!1;pt==="post"?Ot.scheduler=pr=>{c0(pr,he&&he.suspense)}:pt!=="sync"&&(De=!0,Ot.scheduler=(pr,Mr)=>{Mr?pr():KA(pr)}),Ot.augmentJob=pr=>{s&&(pr.flags|=4),De&&(pr.flags|=2,he&&(pr.id=he.uid,pr.i=he))};const er=JG(d,s,Ot);return U2&&(te?te.push(er):jt&&er()),er}function FY(d,s,E){const B=this.proxy,K=sd(d)?d.includes(".")?Fz(B,d):()=>B[d]:d.bind(B,B);let pt;Vu(s)?pt=s:(pt=s.handler,E=s);const _t=rw(this),Ot=Dz(K,pt.bind(B),E);return _t(),Ot}function Fz(d,s){const E=s.split(".");return()=>{let B=d;for(let K=0;Ks==="modelValue"||s==="model-value"?d.modelModifiers:d[`${s}Modifiers`]||d[`${cm(s)}Modifiers`]||d[`${Py(s)}Modifiers`];function BY(d,s,...E){if(d.isUnmounted)return;const B=d.vnode.props||mf;let K=E;const pt=s.startsWith("update:"),_t=pt&&RY(B,s.slice(7));_t&&(_t.trim&&(K=E.map(he=>sd(he)?he.trim():he)),_t.number&&(K=E.map(o4)));let Ot,jt=B[Ot=y8(s)]||B[Ot=y8(cm(s))];!jt&&pt&&(jt=B[Ot=y8(Py(s))]),jt&&Lm(jt,d,6,K);const te=B[Ot+"Once"];if(te){if(!d.emitted)d.emitted={};else if(d.emitted[Ot])return;d.emitted[Ot]=!0,Lm(te,d,6,K)}}function Rz(d,s,E=!1){const B=s.emitsCache,K=B.get(d);if(K!==void 0)return K;const pt=d.emits;let _t={},Ot=!1;if(!Vu(d)){const jt=te=>{const he=Rz(te,s,!0);he&&(Ot=!0,ap(_t,he))};!E&&s.mixins.length&&s.mixins.forEach(jt),d.extends&&jt(d.extends),d.mixins&&d.mixins.forEach(jt)}return!pt&&!Ot?(gf(d)&&B.set(d,null),null):(au(pt)?pt.forEach(jt=>_t[jt]=null):ap(_t,pt),gf(d)&&B.set(d,_t),_t)}function F4(d,s){return!d||!S4(s)?!1:(s=s.slice(2).replace(/Once$/,""),Rh(d,s[0].toLowerCase()+s.slice(1))||Rh(d,Py(s))||Rh(d,s))}function YC(d){const{type:s,vnode:E,proxy:B,withProxy:K,propsOptions:[pt],slots:_t,attrs:Ot,emit:jt,render:te,renderCache:he,props:De,data:er,setupState:pr,ctx:Mr,inheritAttrs:Tr}=d,Vr=h4(d);let mn,Dt;try{if(E.shapeFlag&4){const Jn=K||B,Bn=Jn;mn=cg(te.call(Bn,Jn,he,De,pr,er,Mr)),Dt=Ot}else{const Jn=s;mn=cg(Jn.length>1?Jn(De,{attrs:Ot,slots:_t,emit:jt}):Jn(De,null)),Dt=s.props?Ot:NY(Ot)}}catch(Jn){S2.length=0,z4(Jn,d,1),mn=Wl(Yp)}let cn=mn;if(Dt&&Tr!==!1){const Jn=Object.keys(Dt),{shapeFlag:Bn}=cn;Jn.length&&Bn&7&&(pt&&Jn.some(NA)&&(Dt=jY(Dt,pt)),cn=y1(cn,Dt,!1,!0))}return E.dirs&&(cn=y1(cn,null,!1,!0),cn.dirs=cn.dirs?cn.dirs.concat(E.dirs):E.dirs),E.transition&&Sy(cn,E.transition),mn=cn,h4(Vr),mn}const NY=d=>{let s;for(const E in d)(E==="class"||E==="style"||S4(E))&&((s||(s={}))[E]=d[E]);return s},jY=(d,s)=>{const E={};for(const B in d)(!NA(B)||!(B.slice(9)in s))&&(E[B]=d[B]);return E};function UY(d,s,E){const{props:B,children:K,component:pt}=d,{props:_t,children:Ot,patchFlag:jt}=s,te=pt.emitsOptions;if(s.dirs||s.transition)return!0;if(E&&jt>=0){if(jt&1024)return!0;if(jt&16)return B?KC(B,_t,te):!!_t;if(jt&8){const he=s.dynamicProps;for(let De=0;Ded.__isSuspense;function HY(d,s){s&&s.pendingBranch?au(d)?s.effects.push(...d):s.effects.push(d):eY(d)}const Pu=Symbol.for("v-fgt"),R4=Symbol.for("v-txt"),Yp=Symbol.for("v-cmt"),X5=Symbol.for("v-stc"),S2=[];let $0=null;function _i(d=!1){S2.push($0=d?null:[])}function WY(){S2.pop(),$0=S2[S2.length-1]||null}let N2=1;function XC(d,s=!1){N2+=d,d<0&&$0&&s&&($0.hasOnce=!0)}function Nz(d){return d.dynamicChildren=N2>0?$0||s_:null,WY(),N2>0&&$0&&$0.push(d),d}function zi(d,s,E,B,K,pt){return Nz(Ee(d,s,E,B,K,pt,!0))}function Z0(d,s,E,B,K){return Nz(Wl(d,s,E,B,K,!0))}function j2(d){return d?d.__v_isVNode===!0:!1}function vy(d,s){return d.type===s.type&&d.key===s.key}const jz=({key:d})=>d??null,J5=({ref:d,ref_key:s,ref_for:E})=>(typeof d=="number"&&(d=""+d),d!=null?sd(d)||jd(d)||Vu(d)?{i:Op,r:d,k:s,f:!!E}:d:null);function Ee(d,s=null,E=null,B=0,K=null,pt=d===Pu?0:1,_t=!1,Ot=!1){const jt={__v_isVNode:!0,__v_skip:!0,type:d,props:s,key:s&&jz(s),ref:s&&J5(s),scopeId:oz,slotScopeIds:null,children:E,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:pt,patchFlag:B,dynamicProps:K,dynamicChildren:null,appContext:null,ctx:Op};return Ot?(nM(jt,E),pt&128&&d.normalize(jt)):E&&(jt.shapeFlag|=sd(E)?8:16),N2>0&&!_t&&$0&&(jt.patchFlag>0||pt&6)&&jt.patchFlag!==32&&$0.push(jt),jt}const Wl=qY;function qY(d,s=null,E=null,B=0,K=null,pt=!1){if((!d||d===_z)&&(d=Yp),j2(d)){const Ot=y1(d,s,!0);return E&&nM(Ot,E),N2>0&&!pt&&$0&&(Ot.shapeFlag&6?$0[$0.indexOf(d)]=Ot:$0.push(Ot)),Ot.patchFlag=-2,Ot}if(rK(d)&&(d=d.__vccOpts),s){s=$Y(s);let{class:Ot,style:jt}=s;Ot&&!sd(Ot)&&(s.class=jo(Ot)),gf(jt)&&(GA(jt)&&!au(jt)&&(jt=ap({},jt)),s.style=hm(jt))}const _t=sd(d)?1:Bz(d)?128:lz(d)?64:gf(d)?4:Vu(d)?2:0;return Ee(d,s,E,B,K,_t,pt,!0)}function $Y(d){return d?GA(d)||Ez(d)?ap({},d):d:null}function y1(d,s,E=!1,B=!1){const{props:K,ref:pt,patchFlag:_t,children:Ot,transition:jt}=d,te=s?ZY(K||{},s):K,he={__v_isVNode:!0,__v_skip:!0,type:d.type,props:te,key:te&&jz(te),ref:s&&s.ref?E&&pt?au(pt)?pt.concat(J5(s)):[pt,J5(s)]:J5(s):pt,scopeId:d.scopeId,slotScopeIds:d.slotScopeIds,children:Ot,target:d.target,targetStart:d.targetStart,targetAnchor:d.targetAnchor,staticCount:d.staticCount,shapeFlag:d.shapeFlag,patchFlag:s&&d.type!==Pu?_t===-1?16:_t|16:_t,dynamicProps:d.dynamicProps,dynamicChildren:d.dynamicChildren,appContext:d.appContext,dirs:d.dirs,transition:jt,component:d.component,suspense:d.suspense,ssContent:d.ssContent&&y1(d.ssContent),ssFallback:d.ssFallback&&y1(d.ssFallback),placeholder:d.placeholder,el:d.el,anchor:d.anchor,ctx:d.ctx,ce:d.ce};return jt&&B&&Sy(he,jt.clone(he)),he}function Qu(d=" ",s=0){return Wl(R4,null,d,s)}function $f(d,s){const E=Wl(X5,null,d);return E.staticCount=s,E}function is(d="",s=!1){return s?(_i(),Z0(Yp,null,d)):Wl(Yp,null,d)}function cg(d){return d==null||typeof d=="boolean"?Wl(Yp):au(d)?Wl(Pu,null,d.slice()):j2(d)?o1(d):Wl(R4,null,String(d))}function o1(d){return d.el===null&&d.patchFlag!==-1||d.memo?d:y1(d)}function nM(d,s){let E=0;const{shapeFlag:B}=d;if(s==null)s=null;else if(au(s))E=16;else if(typeof s=="object")if(B&65){const K=s.default;K&&(K._c&&(K._d=!1),nM(d,K()),K._c&&(K._d=!0));return}else{E=32;const K=s._;!K&&!Ez(s)?s._ctx=Op:K===3&&Op&&(Op.slots._===1?s._=1:(s._=2,d.patchFlag|=1024))}else Vu(s)?(s={default:s,_ctx:Op},E=32):(s=String(s),B&64?(E=16,s=[Qu(s)]):E=8);d.children=s,d.shapeFlag|=E}function ZY(...d){const s={};for(let E=0;EKp||Op;let p4,hA;{const d=P4(),s=(E,B)=>{let K;return(K=d[E])||(K=d[E]=[]),K.push(B),pt=>{K.length>1?K.forEach(_t=>_t(pt)):K[0](pt)}};p4=s("__VUE_INSTANCE_SETTERS__",E=>Kp=E),hA=s("__VUE_SSR_SETTERS__",E=>U2=E)}const rw=d=>{const s=Kp;return p4(d),d.scope.on(),()=>{d.scope.off(),p4(s)}},JC=()=>{Kp&&Kp.scope.off(),p4(null)};function Uz(d){return d.vnode.shapeFlag&4}let U2=!1;function XY(d,s=!1,E=!1){s&&hA(s);const{props:B,children:K}=d.vnode,pt=Uz(d);TY(d,B,pt,s),EY(d,K,E||s);const _t=pt?JY(d,s):void 0;return s&&hA(!1),_t}function JY(d,s){const E=d.type;d.accessCache=Object.create(null),d.proxy=new Proxy(d.ctx,mY);const{setup:B}=E;if(B){av();const K=d.setupContext=B.length>1?tK(d):null,pt=rw(d),_t=tw(B,d,0,[d.props,K]),Ot=CI(_t);if(ov(),pt(),(Ot||d.sp)&&!c_(d)&&gz(d),Ot){if(_t.then(JC,JC),s)return _t.then(jt=>{QC(d,jt)}).catch(jt=>{z4(jt,d,0)});d.asyncDep=_t}else QC(d,_t)}else Vz(d)}function QC(d,s,E){Vu(s)?d.type.__ssrInlineRender?d.ssrRender=s:d.render=s:gf(s)&&(d.setupState=ez(s)),Vz(d)}function Vz(d,s,E){const B=d.type;d.render||(d.render=B.render||dg);{const K=rw(d);av();try{gY(d)}finally{ov(),K()}}}const QY={get(d,s){return Zp(d,"get",""),d[s]}};function tK(d){const s=E=>{d.exposed=E||{}};return{attrs:new Proxy(d.attrs,QY),slots:d.slots,emit:d.emit,expose:s}}function N4(d){return d.exposed?d.exposeProxy||(d.exposeProxy=new Proxy(ez(YA(d.exposed)),{get(s,E){if(E in s)return s[E];if(E in M2)return M2[E](d)},has(s,E){return E in s||E in M2}})):d.proxy}function eK(d,s=!0){return Vu(d)?d.displayName||d.name:d.name||s&&d.__name}function rK(d){return Vu(d)&&"__vccOpts"in d}const $o=(d,s)=>KG(d,s,U2);function iM(d,s,E){const B=arguments.length;return B===2?gf(s)&&!au(s)?j2(s)?Wl(d,null,[s]):Wl(d,s):Wl(d,null,s):(B>3?E=Array.prototype.slice.call(arguments,2):B===3&&j2(E)&&(E=[E]),Wl(d,s,E))}const nK="3.5.18";/** * @vue/runtime-dom v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let rA;const VC=typeof window<"u"&&window.trustedTypes;if(VC)try{rA=VC.createPolicy("vue",{createHTML:d=>d})}catch{}const SI=rA?d=>rA.createHTML(d):d=>d,DY="http://www.w3.org/2000/svg",FY="http://www.w3.org/1998/Math/MathML",Qg=typeof document<"u"?document:null,HC=Qg&&Qg.createElement("template"),RY={insert:(d,l,z)=>{l.insertBefore(d,z||null)},remove:d=>{const l=d.parentNode;l&&l.removeChild(d)},createElement:(d,l,z,j)=>{const J=l==="svg"?Qg.createElementNS(DY,d):l==="mathml"?Qg.createElementNS(FY,d):z?Qg.createElement(d,{is:z}):Qg.createElement(d);return d==="select"&&j&&j.multiple!=null&&J.setAttribute("multiple",j.multiple),J},createText:d=>Qg.createTextNode(d),createComment:d=>Qg.createComment(d),setText:(d,l)=>{d.nodeValue=l},setElementText:(d,l)=>{d.textContent=l},parentNode:d=>d.parentNode,nextSibling:d=>d.nextSibling,querySelector:d=>Qg.querySelector(d),setScopeId(d,l){d.setAttribute(l,"")},insertStaticContent(d,l,z,j,J,mt){const kt=z?z.previousSibling:l.lastChild;if(J&&(J===mt||J.nextSibling))for(;l.insertBefore(J.cloneNode(!0),z),!(J===mt||!(J=J.nextSibling)););else{HC.innerHTML=SI(j==="svg"?`${d}`:j==="mathml"?`${d}`:d);const Dt=HC.content;if(j==="svg"||j==="mathml"){const $t=Dt.firstChild;for(;$t.firstChild;)Dt.appendChild($t.firstChild);Dt.removeChild($t)}l.insertBefore(Dt,z)}return[kt?kt.nextSibling:l.firstChild,z?z.previousSibling:l.lastChild]}},Jv="transition",e2="animation",d_=Symbol("_vtc"),EI={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},CI=up({},Kz,EI),BY=d=>(d.displayName="Transition",d.props=CI,d),LI=BY((d,{slots:l})=>$A(DG,PI(d),l)),sy=(d,l=[])=>{iu(d)?d.forEach(z=>z(...l)):d&&d(...l)},WC=d=>d?iu(d)?d.some(l=>l.length>1):d.length>1:!1;function PI(d){const l={};for(const Ni in d)Ni in EI||(l[Ni]=d[Ni]);if(d.css===!1)return l;const{name:z="v",type:j,duration:J,enterFromClass:mt=`${z}-enter-from`,enterActiveClass:kt=`${z}-enter-active`,enterToClass:Dt=`${z}-enter-to`,appearFromClass:$t=mt,appearActiveClass:ee=kt,appearToClass:pe=Dt,leaveFromClass:Be=`${z}-leave-from`,leaveActiveClass:ir=`${z}-leave-active`,leaveToClass:vr=`${z}-leave-to`}=d,Ir=NY(J),Pr=Ir&&Ir[0],Wr=Ir&&Ir[1],{onBeforeEnter:Tn,onEnter:Ft,onEnterCancelled:wn,onLeave:ei,onLeaveCancelled:jn,onBeforeAppear:ai=Tn,onAppear:Qi=Ft,onAppearCancelled:Gi=wn}=l,En=(Ni,zi,ia,Ua)=>{Ni._enterCancelled=Ua,e1(Ni,zi?pe:Dt),e1(Ni,zi?ee:kt),ia&&ia()},Fa=(Ni,zi)=>{Ni._isLeaving=!1,e1(Ni,Be),e1(Ni,vr),e1(Ni,ir),zi&&zi()},Sa=Ni=>(zi,ia)=>{const Ua=Ni?Qi:Ft,qi=()=>En(zi,Ni,ia);sy(Ua,[zi,qi]),qC(()=>{e1(zi,Ni?$t:mt),ig(zi,Ni?pe:Dt),WC(Ua)||ZC(zi,j,Pr,qi)})};return up(l,{onBeforeEnter(Ni){sy(Tn,[Ni]),ig(Ni,mt),ig(Ni,kt)},onBeforeAppear(Ni){sy(ai,[Ni]),ig(Ni,$t),ig(Ni,ee)},onEnter:Sa(!1),onAppear:Sa(!0),onLeave(Ni,zi){Ni._isLeaving=!0;const ia=()=>Fa(Ni,zi);ig(Ni,Be),Ni._enterCancelled?(ig(Ni,ir),nA()):(nA(),ig(Ni,ir)),qC(()=>{Ni._isLeaving&&(e1(Ni,Be),ig(Ni,vr),WC(ei)||ZC(Ni,j,Wr,ia))}),sy(ei,[Ni,ia])},onEnterCancelled(Ni){En(Ni,!1,void 0,!0),sy(wn,[Ni])},onAppearCancelled(Ni){En(Ni,!0,void 0,!0),sy(Gi,[Ni])},onLeaveCancelled(Ni){Fa(Ni),sy(jn,[Ni])}})}function NY(d){if(d==null)return null;if(gf(d))return[x8(d.enter),x8(d.leave)];{const l=x8(d);return[l,l]}}function x8(d){return q$(d)}function ig(d,l){l.split(/\s+/).forEach(z=>z&&d.classList.add(z)),(d[d_]||(d[d_]=new Set)).add(l)}function e1(d,l){l.split(/\s+/).forEach(j=>j&&d.classList.remove(j));const z=d[d_];z&&(z.delete(l),z.size||(d[d_]=void 0))}function qC(d){requestAnimationFrame(()=>{requestAnimationFrame(d)})}let jY=0;function ZC(d,l,z,j){const J=d._endId=++jY,mt=()=>{J===d._endId&&j()};if(z!=null)return setTimeout(mt,z);const{type:kt,timeout:Dt,propCount:$t}=zI(d,l);if(!kt)return j();const ee=kt+"end";let pe=0;const Be=()=>{d.removeEventListener(ee,ir),mt()},ir=vr=>{vr.target===d&&++pe>=$t&&Be()};setTimeout(()=>{pe<$t&&Be()},Dt+1),d.addEventListener(ee,ir)}function zI(d,l){const z=window.getComputedStyle(d),j=Ir=>(z[Ir]||"").split(", "),J=j(`${Jv}Delay`),mt=j(`${Jv}Duration`),kt=$C(J,mt),Dt=j(`${e2}Delay`),$t=j(`${e2}Duration`),ee=$C(Dt,$t);let pe=null,Be=0,ir=0;l===Jv?kt>0&&(pe=Jv,Be=kt,ir=mt.length):l===e2?ee>0&&(pe=e2,Be=ee,ir=$t.length):(Be=Math.max(kt,ee),pe=Be>0?kt>ee?Jv:e2:null,ir=pe?pe===Jv?mt.length:$t.length:0);const vr=pe===Jv&&/\b(transform|all)(,|$)/.test(j(`${Jv}Property`).toString());return{type:pe,timeout:Be,propCount:ir,hasTransform:vr}}function $C(d,l){for(;d.lengthGC(z)+GC(d[j])))}function GC(d){return d==="auto"?0:Number(d.slice(0,-1).replace(",","."))*1e3}function nA(){return document.body.offsetHeight}function UY(d,l,z){const j=d[d_];j&&(l=(l?[l,...j]:[...j]).join(" ")),l==null?d.removeAttribute("class"):z?d.setAttribute("class",l):d.className=l}const c4=Symbol("_vod"),II=Symbol("_vsh"),r2={beforeMount(d,{value:l},{transition:z}){d[c4]=d.style.display==="none"?"":d.style.display,z&&l?z.beforeEnter(d):n2(d,l)},mounted(d,{value:l},{transition:z}){z&&l&&z.enter(d)},updated(d,{value:l,oldValue:z},{transition:j}){!l!=!z&&(j?l?(j.beforeEnter(d),n2(d,!0),j.enter(d)):j.leave(d,()=>{n2(d,!1)}):n2(d,l))},beforeUnmount(d,{value:l}){n2(d,l)}};function n2(d,l){d.style.display=l?d[c4]:"none",d[II]=!l}const VY=Symbol(""),HY=/(^|;)\s*display\s*:/;function WY(d,l,z){const j=d.style,J=cd(z);let mt=!1;if(z&&!J){if(l)if(cd(l))for(const kt of l.split(";")){const Dt=kt.slice(0,kt.indexOf(":")).trim();z[Dt]==null&&G5(j,Dt,"")}else for(const kt in l)z[kt]==null&&G5(j,kt,"");for(const kt in z)kt==="display"&&(mt=!0),G5(j,kt,z[kt])}else if(J){if(l!==z){const kt=j[VY];kt&&(z+=";"+kt),j.cssText=z,mt=HY.test(z)}}else l&&d.removeAttribute("style");c4 in d&&(d[c4]=mt?j.display:"",d[II]&&(j.display="none"))}const YC=/\s*!important$/;function G5(d,l,z){if(iu(z))z.forEach(j=>G5(d,l,j));else if(z==null&&(z=""),l.startsWith("--"))d.setProperty(l,z);else{const j=qY(d,l);YC.test(z)?d.setProperty(Ly(j),z.replace(YC,""),"important"):d[j]=z}}const KC=["Webkit","Moz","ms"],_8={};function qY(d,l){const z=_8[l];if(z)return z;let j=dm(l);if(j!=="filter"&&j in d)return _8[l]=j;j=A4(j);for(let J=0;Jb8||(YY.then(()=>b8=0),b8=Date.now());function XY(d,l){const z=j=>{if(!j._vts)j._vts=Date.now();else if(j._vts<=z.attached)return;Pm(JY(j,z.value),l,5,[j])};return z.value=d,z.attached=KY(),z}function JY(d,l){if(iu(l)){const z=d.stopImmediatePropagation;return d.stopImmediatePropagation=()=>{z.call(d),d._stopped=!0},l.map(j=>J=>!J._stopped&&j&&j(J))}else return l}const rL=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&d.charCodeAt(2)>96&&d.charCodeAt(2)<123,QY=(d,l,z,j,J,mt)=>{const kt=J==="svg";l==="class"?UY(d,j,kt):l==="style"?WY(d,z,j):w4(l)?EA(l)||$Y(d,l,z,j,mt):(l[0]==="."?(l=l.slice(1),!0):l[0]==="^"?(l=l.slice(1),!1):tK(d,l,j,kt))?(QC(d,l,j),!d.tagName.includes("-")&&(l==="value"||l==="checked"||l==="selected")&&JC(d,l,j,kt,mt,l!=="value")):d._isVueCE&&(/[A-Z]/.test(l)||!cd(j))?QC(d,dm(l),j,mt,l):(l==="true-value"?d._trueValue=j:l==="false-value"&&(d._falseValue=j),JC(d,l,j,kt))};function tK(d,l,z,j){if(j)return!!(l==="innerHTML"||l==="textContent"||l in d&&rL(l)&&Vu(z));if(l==="spellcheck"||l==="draggable"||l==="translate"||l==="autocorrect"||l==="form"||l==="list"&&d.tagName==="INPUT"||l==="type"&&d.tagName==="TEXTAREA")return!1;if(l==="width"||l==="height"){const J=d.tagName;if(J==="IMG"||J==="VIDEO"||J==="CANVAS"||J==="SOURCE")return!1}return rL(l)&&cd(z)?!1:l in d}const OI=new WeakMap,DI=new WeakMap,h4=Symbol("_moveCb"),nL=Symbol("_enterCb"),eK=d=>(delete d.props.mode,d),rK=eK({name:"TransitionGroup",props:up({},CI,{tag:String,moveClass:String}),setup(d,{slots:l}){const z=I4(),j=Yz();let J,mt;return rI(()=>{if(!J.length)return;const kt=d.moveClass||`${d.name||"v"}-move`;if(!sK(J[0].el,z.vnode.el,kt)){J=[];return}J.forEach(iK),J.forEach(aK);const Dt=J.filter(oK);nA(),Dt.forEach($t=>{const ee=$t.el,pe=ee.style;ig(ee,kt),pe.transform=pe.webkitTransform=pe.transitionDuration="";const Be=ee[h4]=ir=>{ir&&ir.target!==ee||(!ir||/transform$/.test(ir.propertyName))&&(ee.removeEventListener("transitionend",Be),ee[h4]=null,e1(ee,kt))};ee.addEventListener("transitionend",Be)}),J=[]}),()=>{const kt=Uu(d),Dt=PI(kt);let $t=kt.tag||Ou;if(J=[],mt)for(let ee=0;ee{Dt.split(/\s+/).forEach($t=>$t&&j.classList.remove($t))}),z.split(/\s+/).forEach(Dt=>Dt&&j.classList.add(Dt)),j.style.display="none";const mt=l.nodeType===1?l:l.parentNode;mt.appendChild(j);const{hasTransform:kt}=zI(j);return mt.removeChild(j),kt}const p_=d=>{const l=d.props["onUpdate:modelValue"]||!1;return iu(l)?z=>H5(l,z):l};function lK(d){d.target.composing=!0}function iL(d){const l=d.target;l.composing&&(l.composing=!1,l.dispatchEvent(new Event("input")))}const av=Symbol("_assign"),GA={created(d,{modifiers:{lazy:l,trim:z,number:j}},J){d[av]=p_(J);const mt=j||J.props&&J.props.type==="number";s1(d,l?"change":"input",kt=>{if(kt.target.composing)return;let Dt=d.value;z&&(Dt=Dt.trim()),mt&&(Dt=e4(Dt)),d[av](Dt)}),z&&s1(d,"change",()=>{d.value=d.value.trim()}),l||(s1(d,"compositionstart",lK),s1(d,"compositionend",iL),s1(d,"change",iL))},mounted(d,{value:l}){d.value=l??""},beforeUpdate(d,{value:l,oldValue:z,modifiers:{lazy:j,trim:J,number:mt}},kt){if(d[av]=p_(kt),d.composing)return;const Dt=(mt||d.type==="number")&&!/^0\d/.test(d.value)?e4(d.value):d.value,$t=l??"";Dt!==$t&&(document.activeElement===d&&d.type!=="range"&&(j&&l===z||J&&d.value.trim()===$t)||(d.value=$t))}},V2={created(d,{value:l},z){d.checked=f_(l,z.props.value),d[av]=p_(z),s1(d,"change",()=>{d[av](H2(d))})},beforeUpdate(d,{value:l,oldValue:z},j){d[av]=p_(j),l!==z&&(d.checked=f_(l,j.props.value))}},iA={deep:!0,created(d,{value:l,modifiers:{number:z}},j){const J=k4(l);s1(d,"change",()=>{const mt=Array.prototype.filter.call(d.options,kt=>kt.selected).map(kt=>z?e4(H2(kt)):H2(kt));d[av](d.multiple?J?new Set(mt):mt:mt[0]),d._assigning=!0,C0(()=>{d._assigning=!1})}),d[av]=p_(j)},mounted(d,{value:l}){aL(d,l)},beforeUpdate(d,l,z){d[av]=p_(z)},updated(d,{value:l}){d._assigning||aL(d,l)}};function aL(d,l){const z=d.multiple,j=iu(l);if(!(z&&!j&&!k4(l))){for(let J=0,mt=d.options.length;JString(ee)===String(Dt)):kt.selected=Q$(l,Dt)>-1}else kt.selected=l.has(Dt);else if(f_(H2(kt),l)){d.selectedIndex!==J&&(d.selectedIndex=J);return}}!z&&d.selectedIndex!==-1&&(d.selectedIndex=-1)}}function H2(d){return"_value"in d?d._value:d.value}const uK=["ctrl","shift","alt","meta"],cK={stop:d=>d.stopPropagation(),prevent:d=>d.preventDefault(),self:d=>d.target!==d.currentTarget,ctrl:d=>!d.ctrlKey,shift:d=>!d.shiftKey,alt:d=>!d.altKey,meta:d=>!d.metaKey,left:d=>"button"in d&&d.button!==0,middle:d=>"button"in d&&d.button!==1,right:d=>"button"in d&&d.button!==2,exact:(d,l)=>uK.some(z=>d[`${z}Key`]&&!l.includes(z))},zm=(d,l)=>{const z=d._withMods||(d._withMods={}),j=l.join(".");return z[j]||(z[j]=(J,...mt)=>{for(let kt=0;kt{const l=fK().createApp(...d),{mount:z}=l;return l.mount=j=>{const J=mK(j);if(!J)return;const mt=l._component;!Vu(mt)&&!mt.render&&!mt.template&&(mt.template=J.innerHTML),J.nodeType===1&&(J.textContent="");const kt=z(J,!1,pK(J));return J instanceof Element&&(J.removeAttribute("v-cloak"),J.setAttribute("data-v-app","")),kt},l};function pK(d){if(d instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&d instanceof MathMLElement)return"mathml"}function mK(d){return cd(d)?document.querySelector(d):d}/*! +**/let fA;const tL=typeof window<"u"&&window.trustedTypes;if(tL)try{fA=tL.createPolicy("vue",{createHTML:d=>d})}catch{}const Hz=fA?d=>fA.createHTML(d):d=>d,iK="http://www.w3.org/2000/svg",aK="http://www.w3.org/1998/Math/MathML",Jg=typeof document<"u"?document:null,eL=Jg&&Jg.createElement("template"),oK={insert:(d,s,E)=>{s.insertBefore(d,E||null)},remove:d=>{const s=d.parentNode;s&&s.removeChild(d)},createElement:(d,s,E,B)=>{const K=s==="svg"?Jg.createElementNS(iK,d):s==="mathml"?Jg.createElementNS(aK,d):E?Jg.createElement(d,{is:E}):Jg.createElement(d);return d==="select"&&B&&B.multiple!=null&&K.setAttribute("multiple",B.multiple),K},createText:d=>Jg.createTextNode(d),createComment:d=>Jg.createComment(d),setText:(d,s)=>{d.nodeValue=s},setElementText:(d,s)=>{d.textContent=s},parentNode:d=>d.parentNode,nextSibling:d=>d.nextSibling,querySelector:d=>Jg.querySelector(d),setScopeId(d,s){d.setAttribute(s,"")},insertStaticContent(d,s,E,B,K,pt){const _t=E?E.previousSibling:s.lastChild;if(K&&(K===pt||K.nextSibling))for(;s.insertBefore(K.cloneNode(!0),E),!(K===pt||!(K=K.nextSibling)););else{eL.innerHTML=Hz(B==="svg"?`${d}`:B==="mathml"?`${d}`:d);const Ot=eL.content;if(B==="svg"||B==="mathml"){const jt=Ot.firstChild;for(;jt.firstChild;)Ot.appendChild(jt.firstChild);Ot.removeChild(jt)}s.insertBefore(Ot,E)}return[_t?_t.nextSibling:s.firstChild,E?E.previousSibling:s.lastChild]}},Jv="transition",Qb="animation",p_=Symbol("_vtc"),Wz={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qz=ap({},fz,Wz),sK=d=>(d.displayName="Transition",d.props=qz,d),$z=sK((d,{slots:s})=>iM(iY,Zz(d),s)),sy=(d,s=[])=>{au(d)?d.forEach(E=>E(...s)):d&&d(...s)},rL=d=>d?au(d)?d.some(s=>s.length>1):d.length>1:!1;function Zz(d){const s={};for(const Pi in d)Pi in Wz||(s[Pi]=d[Pi]);if(d.css===!1)return s;const{name:E="v",type:B,duration:K,enterFromClass:pt=`${E}-enter-from`,enterActiveClass:_t=`${E}-enter-active`,enterToClass:Ot=`${E}-enter-to`,appearFromClass:jt=pt,appearActiveClass:te=_t,appearToClass:he=Ot,leaveFromClass:De=`${E}-leave-from`,leaveActiveClass:er=`${E}-leave-active`,leaveToClass:pr=`${E}-leave-to`}=d,Mr=lK(K),Tr=Mr&&Mr[0],Vr=Mr&&Mr[1],{onBeforeEnter:mn,onEnter:Dt,onEnterCancelled:cn,onLeave:Jn,onLeaveCancelled:Bn,onBeforeAppear:ni=mn,onAppear:Wi=Dt,onAppearCancelled:Un=cn}=s,qr=(Pi,bi,Yi,Ca)=>{Pi._enterCancelled=Ca,e1(Pi,bi?he:Ot),e1(Pi,bi?te:_t),Yi&&Yi()},Di=(Pi,bi)=>{Pi._isLeaving=!1,e1(Pi,De),e1(Pi,pr),e1(Pi,er),bi&&bi()},Fi=Pi=>(bi,Yi)=>{const Ca=Pi?Wi:Dt,Ni=()=>qr(bi,Pi,Yi);sy(Ca,[bi,Ni]),nL(()=>{e1(bi,Pi?jt:pt),og(bi,Pi?he:Ot),rL(Ca)||iL(bi,B,Tr,Ni)})};return ap(s,{onBeforeEnter(Pi){sy(mn,[Pi]),og(Pi,pt),og(Pi,_t)},onBeforeAppear(Pi){sy(ni,[Pi]),og(Pi,jt),og(Pi,te)},onEnter:Fi(!1),onAppear:Fi(!0),onLeave(Pi,bi){Pi._isLeaving=!0;const Yi=()=>Di(Pi,bi);og(Pi,De),Pi._enterCancelled?(og(Pi,er),dA()):(dA(),og(Pi,er)),nL(()=>{Pi._isLeaving&&(e1(Pi,De),og(Pi,pr),rL(Jn)||iL(Pi,B,Vr,Yi))}),sy(Jn,[Pi,Yi])},onEnterCancelled(Pi){qr(Pi,!1,void 0,!0),sy(cn,[Pi])},onAppearCancelled(Pi){qr(Pi,!0,void 0,!0),sy(Un,[Pi])},onLeaveCancelled(Pi){Di(Pi),sy(Bn,[Pi])}})}function lK(d){if(d==null)return null;if(gf(d))return[M8(d.enter),M8(d.leave)];{const s=M8(d);return[s,s]}}function M8(d){return pG(d)}function og(d,s){s.split(/\s+/).forEach(E=>E&&d.classList.add(E)),(d[p_]||(d[p_]=new Set)).add(s)}function e1(d,s){s.split(/\s+/).forEach(B=>B&&d.classList.remove(B));const E=d[p_];E&&(E.delete(s),E.size||(d[p_]=void 0))}function nL(d){requestAnimationFrame(()=>{requestAnimationFrame(d)})}let uK=0;function iL(d,s,E,B){const K=d._endId=++uK,pt=()=>{K===d._endId&&B()};if(E!=null)return setTimeout(pt,E);const{type:_t,timeout:Ot,propCount:jt}=Gz(d,s);if(!_t)return B();const te=_t+"end";let he=0;const De=()=>{d.removeEventListener(te,er),pt()},er=pr=>{pr.target===d&&++he>=jt&&De()};setTimeout(()=>{he(E[Mr]||"").split(", "),K=B(`${Jv}Delay`),pt=B(`${Jv}Duration`),_t=aL(K,pt),Ot=B(`${Qb}Delay`),jt=B(`${Qb}Duration`),te=aL(Ot,jt);let he=null,De=0,er=0;s===Jv?_t>0&&(he=Jv,De=_t,er=pt.length):s===Qb?te>0&&(he=Qb,De=te,er=jt.length):(De=Math.max(_t,te),he=De>0?_t>te?Jv:Qb:null,er=he?he===Jv?pt.length:jt.length:0);const pr=he===Jv&&/\b(transform|all)(,|$)/.test(B(`${Jv}Property`).toString());return{type:he,timeout:De,propCount:er,hasTransform:pr}}function aL(d,s){for(;d.lengthoL(E)+oL(d[B])))}function oL(d){return d==="auto"?0:Number(d.slice(0,-1).replace(",","."))*1e3}function dA(){return document.body.offsetHeight}function cK(d,s,E){const B=d[p_];B&&(s=(s?[s,...B]:[...B]).join(" ")),s==null?d.removeAttribute("class"):E?d.setAttribute("class",s):d.className=s}const m4=Symbol("_vod"),Yz=Symbol("_vsh"),t2={beforeMount(d,{value:s},{transition:E}){d[m4]=d.style.display==="none"?"":d.style.display,E&&s?E.beforeEnter(d):e2(d,s)},mounted(d,{value:s},{transition:E}){E&&s&&E.enter(d)},updated(d,{value:s,oldValue:E},{transition:B}){!s!=!E&&(B?s?(B.beforeEnter(d),e2(d,!0),B.enter(d)):B.leave(d,()=>{e2(d,!1)}):e2(d,s))},beforeUnmount(d,{value:s}){e2(d,s)}};function e2(d,s){d.style.display=s?d[m4]:"none",d[Yz]=!s}const hK=Symbol(""),fK=/(^|;)\s*display\s*:/;function dK(d,s,E){const B=d.style,K=sd(E);let pt=!1;if(E&&!K){if(s)if(sd(s))for(const _t of s.split(";")){const Ot=_t.slice(0,_t.indexOf(":")).trim();E[Ot]==null&&Q5(B,Ot,"")}else for(const _t in s)E[_t]==null&&Q5(B,_t,"");for(const _t in E)_t==="display"&&(pt=!0),Q5(B,_t,E[_t])}else if(K){if(s!==E){const _t=B[hK];_t&&(E+=";"+_t),B.cssText=E,pt=fK.test(E)}}else s&&d.removeAttribute("style");m4 in d&&(d[m4]=pt?B.display:"",d[Yz]&&(B.display="none"))}const sL=/\s*!important$/;function Q5(d,s,E){if(au(E))E.forEach(B=>Q5(d,s,B));else if(E==null&&(E=""),s.startsWith("--"))d.setProperty(s,E);else{const B=pK(d,s);sL.test(E)?d.setProperty(Py(B),E.replace(sL,""),"important"):d[B]=E}}const lL=["Webkit","Moz","ms"],S8={};function pK(d,s){const E=S8[s];if(E)return E;let B=cm(s);if(B!=="filter"&&B in d)return S8[s]=B;B=L4(B);for(let K=0;KE8||(yK.then(()=>E8=0),E8=Date.now());function _K(d,s){const E=B=>{if(!B._vts)B._vts=Date.now();else if(B._vts<=E.attached)return;Lm(bK(B,E.value),s,5,[B])};return E.value=d,E.attached=xK(),E}function bK(d,s){if(au(s)){const E=d.stopImmediatePropagation;return d.stopImmediatePropagation=()=>{E.call(d),d._stopped=!0},s.map(B=>K=>!K._stopped&&B&&B(K))}else return s}const pL=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&d.charCodeAt(2)>96&&d.charCodeAt(2)<123,wK=(d,s,E,B,K,pt)=>{const _t=K==="svg";s==="class"?cK(d,B,_t):s==="style"?dK(d,E,B):S4(s)?NA(s)||gK(d,s,E,B,pt):(s[0]==="."?(s=s.slice(1),!0):s[0]==="^"?(s=s.slice(1),!1):kK(d,s,B,_t))?(hL(d,s,B),!d.tagName.includes("-")&&(s==="value"||s==="checked"||s==="selected")&&cL(d,s,B,_t,pt,s!=="value")):d._isVueCE&&(/[A-Z]/.test(s)||!sd(B))?hL(d,cm(s),B,pt,s):(s==="true-value"?d._trueValue=B:s==="false-value"&&(d._falseValue=B),cL(d,s,B,_t))};function kK(d,s,E,B){if(B)return!!(s==="innerHTML"||s==="textContent"||s in d&&pL(s)&&Vu(E));if(s==="spellcheck"||s==="draggable"||s==="translate"||s==="autocorrect"||s==="form"||s==="list"&&d.tagName==="INPUT"||s==="type"&&d.tagName==="TEXTAREA")return!1;if(s==="width"||s==="height"){const K=d.tagName;if(K==="IMG"||K==="VIDEO"||K==="CANVAS"||K==="SOURCE")return!1}return pL(s)&&sd(E)?!1:s in d}const Kz=new WeakMap,Xz=new WeakMap,g4=Symbol("_moveCb"),mL=Symbol("_enterCb"),TK=d=>(delete d.props.mode,d),AK=TK({name:"TransitionGroup",props:ap({},qz,{tag:String,moveClass:String}),setup(d,{slots:s}){const E=B4(),B=hz();let K,pt;return yz(()=>{if(!K.length)return;const _t=d.moveClass||`${d.name||"v"}-move`;if(!LK(K[0].el,E.vnode.el,_t)){K=[];return}K.forEach(SK),K.forEach(EK);const Ot=K.filter(CK);dA(),Ot.forEach(jt=>{const te=jt.el,he=te.style;og(te,_t),he.transform=he.webkitTransform=he.transitionDuration="";const De=te[g4]=er=>{er&&er.target!==te||(!er||/transform$/.test(er.propertyName))&&(te.removeEventListener("transitionend",De),te[g4]=null,e1(te,_t))};te.addEventListener("transitionend",De)}),K=[]}),()=>{const _t=Uu(d),Ot=Zz(_t);let jt=_t.tag||Pu;if(K=[],pt)for(let te=0;te{Ot.split(/\s+/).forEach(jt=>jt&&B.classList.remove(jt))}),E.split(/\s+/).forEach(Ot=>Ot&&B.classList.add(Ot)),B.style.display="none";const pt=s.nodeType===1?s:s.parentNode;pt.appendChild(B);const{hasTransform:_t}=Gz(B);return pt.removeChild(B),_t}const m_=d=>{const s=d.props["onUpdate:modelValue"]||!1;return au(s)?E=>G5(s,E):s};function PK(d){d.target.composing=!0}function gL(d){const s=d.target;s.composing&&(s.composing=!1,s.dispatchEvent(new Event("input")))}const iv=Symbol("_assign"),aM={created(d,{modifiers:{lazy:s,trim:E,number:B}},K){d[iv]=m_(K);const pt=B||K.props&&K.props.type==="number";u1(d,s?"change":"input",_t=>{if(_t.target.composing)return;let Ot=d.value;E&&(Ot=Ot.trim()),pt&&(Ot=o4(Ot)),d[iv](Ot)}),E&&u1(d,"change",()=>{d.value=d.value.trim()}),s||(u1(d,"compositionstart",PK),u1(d,"compositionend",gL),u1(d,"change",gL))},mounted(d,{value:s}){d.value=s??""},beforeUpdate(d,{value:s,oldValue:E,modifiers:{lazy:B,trim:K,number:pt}},_t){if(d[iv]=m_(_t),d.composing)return;const Ot=(pt||d.type==="number")&&!/^0\d/.test(d.value)?o4(d.value):d.value,jt=s??"";Ot!==jt&&(document.activeElement===d&&d.type!=="range"&&(B&&s===E||K&&d.value.trim()===jt)||(d.value=jt))}},V2={created(d,{value:s},E){d.checked=d_(s,E.props.value),d[iv]=m_(E),u1(d,"change",()=>{d[iv](H2(d))})},beforeUpdate(d,{value:s,oldValue:E},B){d[iv]=m_(B),s!==E&&(d.checked=d_(s,B.props.value))}},pA={deep:!0,created(d,{value:s,modifiers:{number:E}},B){const K=E4(s);u1(d,"change",()=>{const pt=Array.prototype.filter.call(d.options,_t=>_t.selected).map(_t=>E?o4(H2(_t)):H2(_t));d[iv](d.multiple?K?new Set(pt):pt:pt[0]),d._assigning=!0,om(()=>{d._assigning=!1})}),d[iv]=m_(B)},mounted(d,{value:s}){vL(d,s)},beforeUpdate(d,s,E){d[iv]=m_(E)},updated(d,{value:s}){d._assigning||vL(d,s)}};function vL(d,s){const E=d.multiple,B=au(s);if(!(E&&!B&&!E4(s))){for(let K=0,pt=d.options.length;KString(te)===String(Ot)):_t.selected=wG(s,Ot)>-1}else _t.selected=s.has(Ot);else if(d_(H2(_t),s)){d.selectedIndex!==K&&(d.selectedIndex=K);return}}!E&&d.selectedIndex!==-1&&(d.selectedIndex=-1)}}function H2(d){return"_value"in d?d._value:d.value}const IK=["ctrl","shift","alt","meta"],zK={stop:d=>d.stopPropagation(),prevent:d=>d.preventDefault(),self:d=>d.target!==d.currentTarget,ctrl:d=>!d.ctrlKey,shift:d=>!d.shiftKey,alt:d=>!d.altKey,meta:d=>!d.metaKey,left:d=>"button"in d&&d.button!==0,middle:d=>"button"in d&&d.button!==1,right:d=>"button"in d&&d.button!==2,exact:(d,s)=>IK.some(E=>d[`${E}Key`]&&!s.includes(E))},Pm=(d,s)=>{const E=d._withMods||(d._withMods={}),B=s.join(".");return E[B]||(E[B]=(K,...pt)=>{for(let _t=0;_t{const s=DK().createApp(...d),{mount:E}=s;return s.mount=B=>{const K=BK(B);if(!K)return;const pt=s._component;!Vu(pt)&&!pt.render&&!pt.template&&(pt.template=K.innerHTML),K.nodeType===1&&(K.textContent="");const _t=E(K,!1,RK(K));return K instanceof Element&&(K.removeAttribute("v-cloak"),K.setAttribute("data-v-app","")),_t},s};function RK(d){if(d instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&d instanceof MathMLElement)return"mathml"}function BK(d){return sd(d)?document.querySelector(d):d}/*! * pinia v3.0.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let FI;const D4=d=>FI=d,RI=Symbol();function aA(d){return d&&typeof d=="object"&&Object.prototype.toString.call(d)==="[object Object]"&&typeof d.toJSON!="function"}var E2;(function(d){d.direct="direct",d.patchObject="patch object",d.patchFunction="patch function"})(E2||(E2={}));function gK(){const d=_z(!0),l=d.run(()=>ro({}));let z=[],j=[];const J=BA({install(mt){D4(J),J._a=mt,mt.provide(RI,J),mt.config.globalProperties.$pinia=J,j.forEach(kt=>z.push(kt)),j=[]},use(mt){return this._a?z.push(mt):j.push(mt),this},_p:z,_a:null,_e:d,_s:new Map,state:l});return J}const BI=()=>{};function sL(d,l,z,j=BI){d.add(l);const J=()=>{d.delete(l)&&j()};return!z&&bz()&&tG(J),J}function Qx(d,...l){d.forEach(z=>{z(...l)})}const vK=d=>d(),lL=Symbol(),w8=Symbol();function oA(d,l){d instanceof Map&&l instanceof Map?l.forEach((z,j)=>d.set(j,z)):d instanceof Set&&l instanceof Set&&l.forEach(d.add,d);for(const z in l){if(!l.hasOwnProperty(z))continue;const j=l[z],J=d[z];aA(J)&&aA(j)&&d.hasOwnProperty(z)&&!qd(j)&&!d1(j)?d[z]=oA(J,j):d[z]=j}return d}const yK=Symbol();function xK(d){return!aA(d)||!Object.prototype.hasOwnProperty.call(d,yK)}const{assign:r1}=Object;function _K(d){return!!(qd(d)&&d.effect)}function bK(d,l,z,j){const{state:J,actions:mt,getters:kt}=l,Dt=z.state.value[d];let $t;function ee(){Dt||(z.state.value[d]=J?J():{});const pe=kG(z.state.value[d]);return r1(pe,mt,Object.keys(kt||{}).reduce((Be,ir)=>(Be[ir]=BA(Ko(()=>{D4(z);const vr=z._s.get(d);return kt[ir].call(vr,vr)})),Be),{}))}return $t=NI(d,ee,l,z,j,!0),$t}function NI(d,l,z={},j,J,mt){let kt;const Dt=r1({actions:{}},z),$t={deep:!0};let ee,pe,Be=new Set,ir=new Set,vr;const Ir=j.state.value[d];!mt&&!Ir&&(j.state.value[d]={}),ro({});let Pr;function Wr(Gi){let En;ee=pe=!1,typeof Gi=="function"?(Gi(j.state.value[d]),En={type:E2.patchFunction,storeId:d,events:vr}):(oA(j.state.value[d],Gi),En={type:E2.patchObject,payload:Gi,storeId:d,events:vr});const Fa=Pr=Symbol();C0().then(()=>{Pr===Fa&&(ee=!0)}),pe=!0,Qx(Be,En,j.state.value[d])}const Tn=mt?function(){const{state:En}=z,Fa=En?En():{};this.$patch(Sa=>{r1(Sa,Fa)})}:BI;function Ft(){kt.stop(),Be.clear(),ir.clear(),j._s.delete(d)}const wn=(Gi,En="")=>{if(lL in Gi)return Gi[w8]=En,Gi;const Fa=function(){D4(j);const Sa=Array.from(arguments),Ni=new Set,zi=new Set;function ia(Ei){Ni.add(Ei)}function Ua(Ei){zi.add(Ei)}Qx(ir,{args:Sa,name:Fa[w8],store:jn,after:ia,onError:Ua});let qi;try{qi=Gi.apply(this&&this.$id===d?this:jn,Sa)}catch(Ei){throw Qx(zi,Ei),Ei}return qi instanceof Promise?qi.then(Ei=>(Qx(Ni,Ei),Ei)).catch(Ei=>(Qx(zi,Ei),Promise.reject(Ei))):(Qx(Ni,qi),qi)};return Fa[lL]=!0,Fa[w8]=En,Fa},ei={_p:j,$id:d,$onAction:sL.bind(null,ir),$patch:Wr,$reset:Tn,$subscribe(Gi,En={}){const Fa=sL(Be,Gi,En.detached,()=>Sa()),Sa=kt.run(()=>fm(()=>j.state.value[d],Ni=>{(En.flush==="sync"?pe:ee)&&Gi({storeId:d,type:E2.direct,events:vr},Ni)},r1({},$t,En)));return Fa},$dispose:Ft},jn=Ay(ei);j._s.set(d,jn);const Qi=(j._a&&j._a.runWithContext||vK)(()=>j._e.run(()=>(kt=_z()).run(()=>l({action:wn}))));for(const Gi in Qi){const En=Qi[Gi];if(qd(En)&&!_K(En)||d1(En))mt||(Ir&&xK(En)&&(qd(En)?En.value=Ir[Gi]:oA(En,Ir[Gi])),j.state.value[d][Gi]=En);else if(typeof En=="function"){const Fa=wn(En,Gi);Qi[Gi]=Fa,Dt.actions[Gi]=En}}return r1(jn,Qi),r1(Uu(jn),Qi),Object.defineProperty(jn,"$state",{get:()=>j.state.value[d],set:Gi=>{Wr(En=>{r1(En,Gi)})}}),j._p.forEach(Gi=>{r1(jn,kt.run(()=>Gi({store:jn,app:j._a,pinia:j,options:Dt})))}),Ir&&mt&&z.hydrate&&z.hydrate(jn.$state,Ir),ee=!0,pe=!0,jn}/*! #__NO_SIDE_EFFECTS__ */function YA(d,l,z){let j;const J=typeof l=="function";j=J?z:l;function mt(kt,Dt){const $t=tY();return kt=kt||($t?hm(RI,null):null),kt&&D4(kt),kt=FI,kt._s.has(d)||(J?NI(d,l,j,kt):bK(d,j,kt)),kt._s.get(d)}return mt.$id=d,mt}/*! + */let Jz;const j4=d=>Jz=d,Qz=Symbol();function mA(d){return d&&typeof d=="object"&&Object.prototype.toString.call(d)==="[object Object]"&&typeof d.toJSON!="function"}var E2;(function(d){d.direct="direct",d.patchObject="patch object",d.patchFunction="patch function"})(E2||(E2={}));function NK(){const d=FI(!0),s=d.run(()=>Ga({}));let E=[],B=[];const K=YA({install(pt){j4(K),K._a=pt,pt.provide(Qz,K),pt.config.globalProperties.$pinia=K,B.forEach(_t=>E.push(_t)),B=[]},use(pt){return this._a?E.push(pt):B.push(pt),this},_p:E,_a:null,_e:d,_s:new Map,state:s});return K}const tO=()=>{};function xL(d,s,E,B=tO){d.add(s);const K=()=>{d.delete(s)&&B()};return!E&&RI()&&kG(K),K}function t_(d,...s){d.forEach(E=>{E(...s)})}const jK=d=>d(),_L=Symbol(),C8=Symbol();function gA(d,s){d instanceof Map&&s instanceof Map?s.forEach((E,B)=>d.set(B,E)):d instanceof Set&&s instanceof Set&&s.forEach(d.add,d);for(const E in s){if(!s.hasOwnProperty(E))continue;const B=s[E],K=d[E];mA(K)&&mA(B)&&d.hasOwnProperty(E)&&!jd(B)&&!m1(B)?d[E]=gA(K,B):d[E]=B}return d}const UK=Symbol();function VK(d){return!mA(d)||!Object.prototype.hasOwnProperty.call(d,UK)}const{assign:r1}=Object;function HK(d){return!!(jd(d)&&d.effect)}function WK(d,s,E,B){const{state:K,actions:pt,getters:_t}=s,Ot=E.state.value[d];let jt;function te(){Ot||(E.state.value[d]=K?K():{});const he=$G(E.state.value[d]);return r1(he,pt,Object.keys(_t||{}).reduce((De,er)=>(De[er]=YA($o(()=>{j4(E);const pr=E._s.get(d);return _t[er].call(pr,pr)})),De),{}))}return jt=eO(d,te,s,E,B,!0),jt}function eO(d,s,E={},B,K,pt){let _t;const Ot=r1({actions:{}},E),jt={deep:!0};let te,he,De=new Set,er=new Set,pr;const Mr=B.state.value[d];!pt&&!Mr&&(B.state.value[d]={}),Ga({});let Tr;function Vr(Un){let qr;te=he=!1,typeof Un=="function"?(Un(B.state.value[d]),qr={type:E2.patchFunction,storeId:d,events:pr}):(gA(B.state.value[d],Un),qr={type:E2.patchObject,payload:Un,storeId:d,events:pr});const Di=Tr=Symbol();om().then(()=>{Tr===Di&&(te=!0)}),he=!0,t_(De,qr,B.state.value[d])}const mn=pt?function(){const{state:qr}=E,Di=qr?qr():{};this.$patch(Fi=>{r1(Fi,Di)})}:tO;function Dt(){_t.stop(),De.clear(),er.clear(),B._s.delete(d)}const cn=(Un,qr="")=>{if(_L in Un)return Un[C8]=qr,Un;const Di=function(){j4(B);const Fi=Array.from(arguments),Pi=new Set,bi=new Set;function Yi(si){Pi.add(si)}function Ca(si){bi.add(si)}t_(er,{args:Fi,name:Di[C8],store:Bn,after:Yi,onError:Ca});let Ni;try{Ni=Un.apply(this&&this.$id===d?this:Bn,Fi)}catch(si){throw t_(bi,si),si}return Ni instanceof Promise?Ni.then(si=>(t_(Pi,si),si)).catch(si=>(t_(bi,si),Promise.reject(si))):(t_(Pi,Ni),Ni)};return Di[_L]=!0,Di[C8]=qr,Di},Jn={_p:B,$id:d,$onAction:xL.bind(null,er),$patch:Vr,$reset:mn,$subscribe(Un,qr={}){const Di=xL(De,Un,qr.detached,()=>Fi()),Fi=_t.run(()=>Em(()=>B.state.value[d],Pi=>{(qr.flush==="sync"?he:te)&&Un({storeId:d,type:E2.direct,events:pr},Pi)},r1({},jt,qr)));return Di},$dispose:Dt},Bn=My(Jn);B._s.set(d,Bn);const Wi=(B._a&&B._a.runWithContext||jK)(()=>B._e.run(()=>(_t=FI()).run(()=>s({action:cn}))));for(const Un in Wi){const qr=Wi[Un];if(jd(qr)&&!HK(qr)||m1(qr))pt||(Mr&&VK(qr)&&(jd(qr)?qr.value=Mr[Un]:gA(qr,Mr[Un])),B.state.value[d][Un]=qr);else if(typeof qr=="function"){const Di=cn(qr,Un);Wi[Un]=Di,Ot.actions[Un]=qr}}return r1(Bn,Wi),r1(Uu(Bn),Wi),Object.defineProperty(Bn,"$state",{get:()=>B.state.value[d],set:Un=>{Vr(qr=>{r1(qr,Un)})}}),B._p.forEach(Un=>{r1(Bn,_t.run(()=>Un({store:Bn,app:B._a,pinia:B,options:Ot})))}),Mr&&pt&&E.hydrate&&E.hydrate(Bn.$state,Mr),te=!0,he=!0,Bn}/*! #__NO_SIDE_EFFECTS__ */function oM(d,s,E){let B;const K=typeof s=="function";B=K?E:s;function pt(_t,Ot){const jt=kY();return _t=_t||(jt?um(Qz,null):null),_t&&j4(_t),_t=Jz,_t._s.has(d)||(K?eO(d,s,B,_t):WK(d,B,_t)),_t._s.get(d)}return pt.$id=d,pt}/*! * vue-router v4.6.3 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const i_=typeof document<"u";function jI(d){return typeof d=="object"||"displayName"in d||"props"in d||"__vccOpts"in d}function wK(d){return d.__esModule||d[Symbol.toStringTag]==="Module"||d.default&&jI(d.default)}const Fh=Object.assign;function k8(d,l){const z={};for(const j in l){const J=l[j];z[j]=Im(J)?J.map(d):d(J)}return z}const C2=()=>{},Im=Array.isArray;function uL(d,l){const z={};for(const j in d)z[j]=j in l?l[j]:d[j];return z}const UI=/#/g,kK=/&/g,TK=/\//g,AK=/=/g,MK=/\?/g,VI=/\+/g,SK=/%5B/g,EK=/%5D/g,HI=/%5E/g,CK=/%60/g,WI=/%7B/g,LK=/%7C/g,qI=/%7D/g,PK=/%20/g;function KA(d){return d==null?"":encodeURI(""+d).replace(LK,"|").replace(SK,"[").replace(EK,"]")}function zK(d){return KA(d).replace(WI,"{").replace(qI,"}").replace(HI,"^")}function sA(d){return KA(d).replace(VI,"%2B").replace(PK,"+").replace(UI,"%23").replace(kK,"%26").replace(CK,"`").replace(WI,"{").replace(qI,"}").replace(HI,"^")}function IK(d){return sA(d).replace(AK,"%3D")}function OK(d){return KA(d).replace(UI,"%23").replace(MK,"%3F")}function DK(d){return OK(d).replace(TK,"%2F")}function W2(d){if(d==null)return null;try{return decodeURIComponent(""+d)}catch{}return""+d}const FK=/\/$/,RK=d=>d.replace(FK,"");function T8(d,l,z="/"){let j,J={},mt="",kt="";const Dt=l.indexOf("#");let $t=l.indexOf("?");return $t=Dt>=0&&$t>Dt?-1:$t,$t>=0&&(j=l.slice(0,$t),mt=l.slice($t,Dt>0?Dt:l.length),J=d(mt.slice(1))),Dt>=0&&(j=j||l.slice(0,Dt),kt=l.slice(Dt,l.length)),j=UK(j??l,z),{fullPath:j+mt+kt,path:j,query:J,hash:W2(kt)}}function BK(d,l){const z=l.query?d(l.query):"";return l.path+(z&&"?")+z+(l.hash||"")}function cL(d,l){return!l||!d.toLowerCase().startsWith(l.toLowerCase())?d:d.slice(l.length)||"/"}function NK(d,l,z){const j=l.matched.length-1,J=z.matched.length-1;return j>-1&&j===J&&m_(l.matched[j],z.matched[J])&&ZI(l.params,z.params)&&d(l.query)===d(z.query)&&l.hash===z.hash}function m_(d,l){return(d.aliasOf||d)===(l.aliasOf||l)}function ZI(d,l){if(Object.keys(d).length!==Object.keys(l).length)return!1;for(const z in d)if(!jK(d[z],l[z]))return!1;return!0}function jK(d,l){return Im(d)?hL(d,l):Im(l)?hL(l,d):d===l}function hL(d,l){return Im(l)?d.length===l.length&&d.every((z,j)=>z===l[j]):d.length===1&&d[0]===l}function UK(d,l){if(d.startsWith("/"))return d;if(!d)return l;const z=l.split("/"),j=d.split("/"),J=j[j.length-1];(J===".."||J===".")&&j.push("");let mt=z.length-1,kt,Dt;for(kt=0;kt1&&mt--;else break;return z.slice(0,mt).join("/")+"/"+j.slice(kt).join("/")}const Qv={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let lA=function(d){return d.pop="pop",d.push="push",d}({}),A8=function(d){return d.back="back",d.forward="forward",d.unknown="",d}({});function VK(d){if(!d)if(i_){const l=document.querySelector("base");d=l&&l.getAttribute("href")||"/",d=d.replace(/^\w+:\/\/[^\/]+/,"")}else d="/";return d[0]!=="/"&&d[0]!=="#"&&(d="/"+d),RK(d)}const HK=/^[^#]+#/;function WK(d,l){return d.replace(HK,"#")+l}function qK(d,l){const z=document.documentElement.getBoundingClientRect(),j=d.getBoundingClientRect();return{behavior:l.behavior,left:j.left-z.left-(l.left||0),top:j.top-z.top-(l.top||0)}}const F4=()=>({left:window.scrollX,top:window.scrollY});function ZK(d){let l;if("el"in d){const z=d.el,j=typeof z=="string"&&z.startsWith("#"),J=typeof z=="string"?j?document.getElementById(z.slice(1)):document.querySelector(z):z;if(!J)return;l=qK(J,d)}else l=d;"scrollBehavior"in document.documentElement.style?window.scrollTo(l):window.scrollTo(l.left!=null?l.left:window.scrollX,l.top!=null?l.top:window.scrollY)}function fL(d,l){return(history.state?history.state.position-l:-1)+d}const uA=new Map;function $K(d,l){uA.set(d,l)}function GK(d){const l=uA.get(d);return uA.delete(d),l}function YK(d){return typeof d=="string"||d&&typeof d=="object"}function $I(d){return typeof d=="string"||typeof d=="symbol"}let kd=function(d){return d[d.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",d[d.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",d[d.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",d[d.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",d[d.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",d}({});const GI=Symbol("");kd.MATCHER_NOT_FOUND+"",kd.NAVIGATION_GUARD_REDIRECT+"",kd.NAVIGATION_ABORTED+"",kd.NAVIGATION_CANCELLED+"",kd.NAVIGATION_DUPLICATED+"";function g_(d,l){return Fh(new Error,{type:d,[GI]:!0},l)}function Gg(d,l){return d instanceof Error&&GI in d&&(l==null||!!(d.type&l))}const KK=["params","query","hash"];function XK(d){if(typeof d=="string")return d;if(d.path!=null)return d.path;const l={};for(const z of KK)z in d&&(l[z]=d[z]);return JSON.stringify(l,null,2)}function JK(d){const l={};if(d===""||d==="?")return l;const z=(d[0]==="?"?d.slice(1):d).split("&");for(let j=0;jJ&&sA(J)):[j&&sA(j)]).forEach(J=>{J!==void 0&&(l+=(l.length?"&":"")+z,J!=null&&(l+="="+J))})}return l}function QK(d){const l={};for(const z in d){const j=d[z];j!==void 0&&(l[z]=Im(j)?j.map(J=>J==null?null:""+J):j==null?j:""+j)}return l}const tX=Symbol(""),pL=Symbol(""),R4=Symbol(""),XA=Symbol(""),cA=Symbol("");function i2(){let d=[];function l(j){return d.push(j),()=>{const J=d.indexOf(j);J>-1&&d.splice(J,1)}}function z(){d=[]}return{add:l,list:()=>d.slice(),reset:z}}function o1(d,l,z,j,J,mt=kt=>kt()){const kt=j&&(j.enterCallbacks[J]=j.enterCallbacks[J]||[]);return()=>new Promise((Dt,$t)=>{const ee=ir=>{ir===!1?$t(g_(kd.NAVIGATION_ABORTED,{from:z,to:l})):ir instanceof Error?$t(ir):YK(ir)?$t(g_(kd.NAVIGATION_GUARD_REDIRECT,{from:l,to:ir})):(kt&&j.enterCallbacks[J]===kt&&typeof ir=="function"&&kt.push(ir),Dt())},pe=mt(()=>d.call(j&&j.instances[J],l,z,ee));let Be=Promise.resolve(pe);d.length<3&&(Be=Be.then(ee)),Be.catch(ir=>$t(ir))})}function M8(d,l,z,j,J=mt=>mt()){const mt=[];for(const kt of d)for(const Dt in kt.components){let $t=kt.components[Dt];if(!(l!=="beforeRouteEnter"&&!kt.instances[Dt]))if(jI($t)){const ee=($t.__vccOpts||$t)[l];ee&&mt.push(o1(ee,z,j,kt,Dt,J))}else{let ee=$t();mt.push(()=>ee.then(pe=>{if(!pe)throw new Error(`Couldn't resolve component "${Dt}" at "${kt.path}"`);const Be=wK(pe)?pe.default:pe;kt.mods[Dt]=pe,kt.components[Dt]=Be;const ir=(Be.__vccOpts||Be)[l];return ir&&o1(ir,z,j,kt,Dt,J)()}))}}return mt}function eX(d,l){const z=[],j=[],J=[],mt=Math.max(l.matched.length,d.matched.length);for(let kt=0;ktm_(ee,Dt))?j.push(Dt):z.push(Dt));const $t=d.matched[kt];$t&&(l.matched.find(ee=>m_(ee,$t))||J.push($t))}return[z,j,J]}/*! + */const a_=typeof document<"u";function rO(d){return typeof d=="object"||"displayName"in d||"props"in d||"__vccOpts"in d}function qK(d){return d.__esModule||d[Symbol.toStringTag]==="Module"||d.default&&rO(d.default)}const Fh=Object.assign;function L8(d,s){const E={};for(const B in s){const K=s[B];E[B]=Im(K)?K.map(d):d(K)}return E}const C2=()=>{},Im=Array.isArray;function bL(d,s){const E={};for(const B in d)E[B]=B in s?s[B]:d[B];return E}const nO=/#/g,$K=/&/g,ZK=/\//g,GK=/=/g,YK=/\?/g,iO=/\+/g,KK=/%5B/g,XK=/%5D/g,aO=/%5E/g,JK=/%60/g,oO=/%7B/g,QK=/%7C/g,sO=/%7D/g,tX=/%20/g;function sM(d){return d==null?"":encodeURI(""+d).replace(QK,"|").replace(KK,"[").replace(XK,"]")}function eX(d){return sM(d).replace(oO,"{").replace(sO,"}").replace(aO,"^")}function vA(d){return sM(d).replace(iO,"%2B").replace(tX,"+").replace(nO,"%23").replace($K,"%26").replace(JK,"`").replace(oO,"{").replace(sO,"}").replace(aO,"^")}function rX(d){return vA(d).replace(GK,"%3D")}function nX(d){return sM(d).replace(nO,"%23").replace(YK,"%3F")}function iX(d){return nX(d).replace(ZK,"%2F")}function W2(d){if(d==null)return null;try{return decodeURIComponent(""+d)}catch{}return""+d}const aX=/\/$/,oX=d=>d.replace(aX,"");function P8(d,s,E="/"){let B,K={},pt="",_t="";const Ot=s.indexOf("#");let jt=s.indexOf("?");return jt=Ot>=0&&jt>Ot?-1:jt,jt>=0&&(B=s.slice(0,jt),pt=s.slice(jt,Ot>0?Ot:s.length),K=d(pt.slice(1))),Ot>=0&&(B=B||s.slice(0,Ot),_t=s.slice(Ot,s.length)),B=cX(B??s,E),{fullPath:B+pt+_t,path:B,query:K,hash:W2(_t)}}function sX(d,s){const E=s.query?d(s.query):"";return s.path+(E&&"?")+E+(s.hash||"")}function wL(d,s){return!s||!d.toLowerCase().startsWith(s.toLowerCase())?d:d.slice(s.length)||"/"}function lX(d,s,E){const B=s.matched.length-1,K=E.matched.length-1;return B>-1&&B===K&&g_(s.matched[B],E.matched[K])&&lO(s.params,E.params)&&d(s.query)===d(E.query)&&s.hash===E.hash}function g_(d,s){return(d.aliasOf||d)===(s.aliasOf||s)}function lO(d,s){if(Object.keys(d).length!==Object.keys(s).length)return!1;for(const E in d)if(!uX(d[E],s[E]))return!1;return!0}function uX(d,s){return Im(d)?kL(d,s):Im(s)?kL(s,d):d===s}function kL(d,s){return Im(s)?d.length===s.length&&d.every((E,B)=>E===s[B]):d.length===1&&d[0]===s}function cX(d,s){if(d.startsWith("/"))return d;if(!d)return s;const E=s.split("/"),B=d.split("/"),K=B[B.length-1];(K===".."||K===".")&&B.push("");let pt=E.length-1,_t,Ot;for(_t=0;_t1&&pt--;else break;return E.slice(0,pt).join("/")+"/"+B.slice(_t).join("/")}const Qv={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let yA=function(d){return d.pop="pop",d.push="push",d}({}),I8=function(d){return d.back="back",d.forward="forward",d.unknown="",d}({});function hX(d){if(!d)if(a_){const s=document.querySelector("base");d=s&&s.getAttribute("href")||"/",d=d.replace(/^\w+:\/\/[^\/]+/,"")}else d="/";return d[0]!=="/"&&d[0]!=="#"&&(d="/"+d),oX(d)}const fX=/^[^#]+#/;function dX(d,s){return d.replace(fX,"#")+s}function pX(d,s){const E=document.documentElement.getBoundingClientRect(),B=d.getBoundingClientRect();return{behavior:s.behavior,left:B.left-E.left-(s.left||0),top:B.top-E.top-(s.top||0)}}const U4=()=>({left:window.scrollX,top:window.scrollY});function mX(d){let s;if("el"in d){const E=d.el,B=typeof E=="string"&&E.startsWith("#"),K=typeof E=="string"?B?document.getElementById(E.slice(1)):document.querySelector(E):E;if(!K)return;s=pX(K,d)}else s=d;"scrollBehavior"in document.documentElement.style?window.scrollTo(s):window.scrollTo(s.left!=null?s.left:window.scrollX,s.top!=null?s.top:window.scrollY)}function TL(d,s){return(history.state?history.state.position-s:-1)+d}const xA=new Map;function gX(d,s){xA.set(d,s)}function vX(d){const s=xA.get(d);return xA.delete(d),s}function yX(d){return typeof d=="string"||d&&typeof d=="object"}function uO(d){return typeof d=="string"||typeof d=="symbol"}let xd=function(d){return d[d.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",d[d.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",d[d.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",d[d.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",d[d.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",d}({});const cO=Symbol("");xd.MATCHER_NOT_FOUND+"",xd.NAVIGATION_GUARD_REDIRECT+"",xd.NAVIGATION_ABORTED+"",xd.NAVIGATION_CANCELLED+"",xd.NAVIGATION_DUPLICATED+"";function v_(d,s){return Fh(new Error,{type:d,[cO]:!0},s)}function Gg(d,s){return d instanceof Error&&cO in d&&(s==null||!!(d.type&s))}const xX=["params","query","hash"];function _X(d){if(typeof d=="string")return d;if(d.path!=null)return d.path;const s={};for(const E of xX)E in d&&(s[E]=d[E]);return JSON.stringify(s,null,2)}function bX(d){const s={};if(d===""||d==="?")return s;const E=(d[0]==="?"?d.slice(1):d).split("&");for(let B=0;BK&&vA(K)):[B&&vA(B)]).forEach(K=>{K!==void 0&&(s+=(s.length?"&":"")+E,K!=null&&(s+="="+K))})}return s}function wX(d){const s={};for(const E in d){const B=d[E];B!==void 0&&(s[E]=Im(B)?B.map(K=>K==null?null:""+K):B==null?B:""+B)}return s}const kX=Symbol(""),ML=Symbol(""),V4=Symbol(""),lM=Symbol(""),_A=Symbol("");function r2(){let d=[];function s(B){return d.push(B),()=>{const K=d.indexOf(B);K>-1&&d.splice(K,1)}}function E(){d=[]}return{add:s,list:()=>d.slice(),reset:E}}function s1(d,s,E,B,K,pt=_t=>_t()){const _t=B&&(B.enterCallbacks[K]=B.enterCallbacks[K]||[]);return()=>new Promise((Ot,jt)=>{const te=er=>{er===!1?jt(v_(xd.NAVIGATION_ABORTED,{from:E,to:s})):er instanceof Error?jt(er):yX(er)?jt(v_(xd.NAVIGATION_GUARD_REDIRECT,{from:s,to:er})):(_t&&B.enterCallbacks[K]===_t&&typeof er=="function"&&_t.push(er),Ot())},he=pt(()=>d.call(B&&B.instances[K],s,E,te));let De=Promise.resolve(he);d.length<3&&(De=De.then(te)),De.catch(er=>jt(er))})}function z8(d,s,E,B,K=pt=>pt()){const pt=[];for(const _t of d)for(const Ot in _t.components){let jt=_t.components[Ot];if(!(s!=="beforeRouteEnter"&&!_t.instances[Ot]))if(rO(jt)){const te=(jt.__vccOpts||jt)[s];te&&pt.push(s1(te,E,B,_t,Ot,K))}else{let te=jt();pt.push(()=>te.then(he=>{if(!he)throw new Error(`Couldn't resolve component "${Ot}" at "${_t.path}"`);const De=qK(he)?he.default:he;_t.mods[Ot]=he,_t.components[Ot]=De;const er=(De.__vccOpts||De)[s];return er&&s1(er,E,B,_t,Ot,K)()}))}}return pt}function TX(d,s){const E=[],B=[],K=[],pt=Math.max(s.matched.length,d.matched.length);for(let _t=0;_tg_(te,Ot))?B.push(Ot):E.push(Ot));const jt=d.matched[_t];jt&&(s.matched.find(te=>g_(te,jt))||K.push(jt))}return[E,B,K]}/*! * vue-router v4.6.3 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let rX=()=>location.protocol+"//"+location.host;function YI(d,l){const{pathname:z,search:j,hash:J}=l,mt=d.indexOf("#");if(mt>-1){let kt=J.includes(d.slice(mt))?d.slice(mt).length:1,Dt=J.slice(kt);return Dt[0]!=="/"&&(Dt="/"+Dt),cL(Dt,"")}return cL(z,d)+j+J}function nX(d,l,z,j){let J=[],mt=[],kt=null;const Dt=({state:ir})=>{const vr=YI(d,location),Ir=z.value,Pr=l.value;let Wr=0;if(ir){if(z.value=vr,l.value=ir,kt&&kt===Ir){kt=null;return}Wr=Pr?ir.position-Pr.position:0}else j(vr);J.forEach(Tn=>{Tn(z.value,Ir,{delta:Wr,type:lA.pop,direction:Wr?Wr>0?A8.forward:A8.back:A8.unknown})})};function $t(){kt=z.value}function ee(ir){J.push(ir);const vr=()=>{const Ir=J.indexOf(ir);Ir>-1&&J.splice(Ir,1)};return mt.push(vr),vr}function pe(){if(document.visibilityState==="hidden"){const{history:ir}=window;if(!ir.state)return;ir.replaceState(Fh({},ir.state,{scroll:F4()}),"")}}function Be(){for(const ir of mt)ir();mt=[],window.removeEventListener("popstate",Dt),window.removeEventListener("pagehide",pe),document.removeEventListener("visibilitychange",pe)}return window.addEventListener("popstate",Dt),window.addEventListener("pagehide",pe),document.addEventListener("visibilitychange",pe),{pauseListeners:$t,listen:ee,destroy:Be}}function mL(d,l,z,j=!1,J=!1){return{back:d,current:l,forward:z,replaced:j,position:window.history.length,scroll:J?F4():null}}function iX(d){const{history:l,location:z}=window,j={value:YI(d,z)},J={value:l.state};J.value||mt(j.value,{back:null,current:j.value,forward:null,position:l.length-1,replaced:!0,scroll:null},!0);function mt($t,ee,pe){const Be=d.indexOf("#"),ir=Be>-1?(z.host&&document.querySelector("base")?d:d.slice(Be))+$t:rX()+d+$t;try{l[pe?"replaceState":"pushState"](ee,"",ir),J.value=ee}catch(vr){console.error(vr),z[pe?"replace":"assign"](ir)}}function kt($t,ee){mt($t,Fh({},l.state,mL(J.value.back,$t,J.value.forward,!0),ee,{position:J.value.position}),!0),j.value=$t}function Dt($t,ee){const pe=Fh({},J.value,l.state,{forward:$t,scroll:F4()});mt(pe.current,pe,!0),mt($t,Fh({},mL(j.value,$t,null),{position:pe.position+1},ee),!1),j.value=$t}return{location:j,state:J,push:Dt,replace:kt}}function aX(d){d=VK(d);const l=iX(d),z=nX(d,l.state,l.location,l.replace);function j(mt,kt=!0){kt||z.pauseListeners(),history.go(mt)}const J=Fh({location:"",base:d,go:j,createHref:WK.bind(null,d)},l,z);return Object.defineProperty(J,"location",{enumerable:!0,get:()=>l.location.value}),Object.defineProperty(J,"state",{enumerable:!0,get:()=>l.state.value}),J}let yy=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.Group=2]="Group",d}({});var sp=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.ParamRegExp=2]="ParamRegExp",d[d.ParamRegExpEnd=3]="ParamRegExpEnd",d[d.EscapeNext=4]="EscapeNext",d}(sp||{});const oX={type:yy.Static,value:""},sX=/[a-zA-Z0-9_]/;function lX(d){if(!d)return[[]];if(d==="/")return[[oX]];if(!d.startsWith("/"))throw new Error(`Invalid path "${d}"`);function l(vr){throw new Error(`ERR (${z})/"${ee}": ${vr}`)}let z=sp.Static,j=z;const J=[];let mt;function kt(){mt&&J.push(mt),mt=[]}let Dt=0,$t,ee="",pe="";function Be(){ee&&(z===sp.Static?mt.push({type:yy.Static,value:ee}):z===sp.Param||z===sp.ParamRegExp||z===sp.ParamRegExpEnd?(mt.length>1&&($t==="*"||$t==="+")&&l(`A repeatable param (${ee}) must be alone in its segment. eg: '/:ids+.`),mt.push({type:yy.Param,value:ee,regexp:pe,repeatable:$t==="*"||$t==="+",optional:$t==="*"||$t==="?"})):l("Invalid state to consume buffer"),ee="")}function ir(){ee+=$t}for(;Dtl.length?l.length===1&&l[0]===p0.Static+p0.Segment?1:-1:0}function KI(d,l){let z=0;const j=d.score,J=l.score;for(;z0&&l[l.length-1]<0}const dX={strict:!1,end:!0,sensitive:!1};function pX(d,l,z){const j=hX(lX(d.path),z),J=Fh(j,{record:d,parent:l,children:[],alias:[]});return l&&!J.record.aliasOf==!l.record.aliasOf&&l.children.push(J),J}function mX(d,l){const z=[],j=new Map;l=uL(dX,l);function J(Be){return j.get(Be)}function mt(Be,ir,vr){const Ir=!vr,Pr=xL(Be);Pr.aliasOf=vr&&vr.record;const Wr=uL(l,Be),Tn=[Pr];if("alias"in Be){const ei=typeof Be.alias=="string"?[Be.alias]:Be.alias;for(const jn of ei)Tn.push(xL(Fh({},Pr,{components:vr?vr.record.components:Pr.components,path:jn,aliasOf:vr?vr.record:Pr})))}let Ft,wn;for(const ei of Tn){const{path:jn}=ei;if(ir&&jn[0]!=="/"){const ai=ir.record.path,Qi=ai[ai.length-1]==="/"?"":"/";ei.path=ir.record.path+(jn&&Qi+jn)}if(Ft=pX(ei,ir,Wr),vr?vr.alias.push(Ft):(wn=wn||Ft,wn!==Ft&&wn.alias.push(Ft),Ir&&Be.name&&!_L(Ft)&&kt(Be.name)),XI(Ft)&&$t(Ft),Pr.children){const ai=Pr.children;for(let Qi=0;Qi{kt(wn)}:C2}function kt(Be){if($I(Be)){const ir=j.get(Be);ir&&(j.delete(Be),z.splice(z.indexOf(ir),1),ir.children.forEach(kt),ir.alias.forEach(kt))}else{const ir=z.indexOf(Be);ir>-1&&(z.splice(ir,1),Be.record.name&&j.delete(Be.record.name),Be.children.forEach(kt),Be.alias.forEach(kt))}}function Dt(){return z}function $t(Be){const ir=yX(Be,z);z.splice(ir,0,Be),Be.record.name&&!_L(Be)&&j.set(Be.record.name,Be)}function ee(Be,ir){let vr,Ir={},Pr,Wr;if("name"in Be&&Be.name){if(vr=j.get(Be.name),!vr)throw g_(kd.MATCHER_NOT_FOUND,{location:Be});Wr=vr.record.name,Ir=Fh(yL(ir.params,vr.keys.filter(wn=>!wn.optional).concat(vr.parent?vr.parent.keys.filter(wn=>wn.optional):[]).map(wn=>wn.name)),Be.params&&yL(Be.params,vr.keys.map(wn=>wn.name))),Pr=vr.stringify(Ir)}else if(Be.path!=null)Pr=Be.path,vr=z.find(wn=>wn.re.test(Pr)),vr&&(Ir=vr.parse(Pr),Wr=vr.record.name);else{if(vr=ir.name?j.get(ir.name):z.find(wn=>wn.re.test(ir.path)),!vr)throw g_(kd.MATCHER_NOT_FOUND,{location:Be,currentLocation:ir});Wr=vr.record.name,Ir=Fh({},ir.params,Be.params),Pr=vr.stringify(Ir)}const Tn=[];let Ft=vr;for(;Ft;)Tn.unshift(Ft.record),Ft=Ft.parent;return{name:Wr,path:Pr,params:Ir,matched:Tn,meta:vX(Tn)}}d.forEach(Be=>mt(Be));function pe(){z.length=0,j.clear()}return{addRoute:mt,resolve:ee,removeRoute:kt,clearRoutes:pe,getRoutes:Dt,getRecordMatcher:J}}function yL(d,l){const z={};for(const j of l)j in d&&(z[j]=d[j]);return z}function xL(d){const l={path:d.path,redirect:d.redirect,name:d.name,meta:d.meta||{},aliasOf:d.aliasOf,beforeEnter:d.beforeEnter,props:gX(d),children:d.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in d?d.components||null:d.component&&{default:d.component}};return Object.defineProperty(l,"mods",{value:{}}),l}function gX(d){const l={},z=d.props||!1;if("component"in d)l.default=z;else for(const j in d.components)l[j]=typeof z=="object"?z[j]:z;return l}function _L(d){for(;d;){if(d.record.aliasOf)return!0;d=d.parent}return!1}function vX(d){return d.reduce((l,z)=>Fh(l,z.meta),{})}function yX(d,l){let z=0,j=l.length;for(;z!==j;){const mt=z+j>>1;KI(d,l[mt])<0?j=mt:z=mt+1}const J=xX(d);return J&&(j=l.lastIndexOf(J,j-1)),j}function xX(d){let l=d;for(;l=l.parent;)if(XI(l)&&KI(d,l)===0)return l}function XI({record:d}){return!!(d.name||d.components&&Object.keys(d.components).length||d.redirect)}function bL(d){const l=hm(R4),z=hm(XA),j=Ko(()=>{const $t=Ju(d.to);return l.resolve($t)}),J=Ko(()=>{const{matched:$t}=j.value,{length:ee}=$t,pe=$t[ee-1],Be=z.matched;if(!pe||!Be.length)return-1;const ir=Be.findIndex(m_.bind(null,pe));if(ir>-1)return ir;const vr=wL($t[ee-2]);return ee>1&&wL(pe)===vr&&Be[Be.length-1].path!==vr?Be.findIndex(m_.bind(null,$t[ee-2])):ir}),mt=Ko(()=>J.value>-1&&TX(z.params,j.value.params)),kt=Ko(()=>J.value>-1&&J.value===z.matched.length-1&&ZI(z.params,j.value.params));function Dt($t={}){if(kX($t)){const ee=l[Ju(d.replace)?"replace":"push"](Ju(d.to)).catch(C2);return d.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>ee),ee}return Promise.resolve()}return{route:j,href:Ko(()=>j.value.href),isActive:mt,isExactActive:kt,navigate:Dt}}function _X(d){return d.length===1?d[0]:d}const bX=ah({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:bL,setup(d,{slots:l}){const z=Ay(bL(d)),{options:j}=hm(R4),J=Ko(()=>({[kL(d.activeClass,j.linkActiveClass,"router-link-active")]:z.isActive,[kL(d.exactActiveClass,j.linkExactActiveClass,"router-link-exact-active")]:z.isExactActive}));return()=>{const mt=l.default&&_X(l.default(z));return d.custom?mt:$A("a",{"aria-current":z.isExactActive?d.ariaCurrentValue:null,href:z.href,onClick:z.navigate,class:J.value},mt)}}}),wX=bX;function kX(d){if(!(d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)&&!d.defaultPrevented&&!(d.button!==void 0&&d.button!==0)){if(d.currentTarget&&d.currentTarget.getAttribute){const l=d.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(l))return}return d.preventDefault&&d.preventDefault(),!0}}function TX(d,l){for(const z in l){const j=l[z],J=d[z];if(typeof j=="string"){if(j!==J)return!1}else if(!Im(J)||J.length!==j.length||j.some((mt,kt)=>mt!==J[kt]))return!1}return!0}function wL(d){return d?d.aliasOf?d.aliasOf.path:d.path:""}const kL=(d,l,z)=>d??l??z,AX=ah({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(d,{attrs:l,slots:z}){const j=hm(cA),J=Ko(()=>d.route||j.value),mt=hm(pL,0),kt=Ko(()=>{let ee=Ju(mt);const{matched:pe}=J.value;let Be;for(;(Be=pe[ee])&&!Be.components;)ee++;return ee}),Dt=Ko(()=>J.value.matched[kt.value]);q5(pL,Ko(()=>kt.value+1)),q5(tX,Dt),q5(cA,J);const $t=ro();return fm(()=>[$t.value,Dt.value,d.name],([ee,pe,Be],[ir,vr,Ir])=>{pe&&(pe.instances[Be]=ee,vr&&vr!==pe&&ee&&ee===ir&&(pe.leaveGuards.size||(pe.leaveGuards=vr.leaveGuards),pe.updateGuards.size||(pe.updateGuards=vr.updateGuards))),ee&&pe&&(!vr||!m_(pe,vr)||!ir)&&(pe.enterCallbacks[Be]||[]).forEach(Pr=>Pr(ee))},{flush:"post"}),()=>{const ee=J.value,pe=d.name,Be=Dt.value,ir=Be&&Be.components[pe];if(!ir)return TL(z.default,{Component:ir,route:ee});const vr=Be.props[pe],Ir=vr?vr===!0?ee.params:typeof vr=="function"?vr(ee):vr:null,Wr=$A(ir,Fh({},Ir,l,{onVnodeUnmounted:Tn=>{Tn.component.isUnmounted&&(Be.instances[pe]=null)},ref:$t}));return TL(z.default,{Component:Wr,route:ee})||Wr}}});function TL(d,l){if(!d)return null;const z=d(l);return z.length===1?z[0]:z}const MX=AX;function SX(d){const l=mX(d.routes,d),z=d.parseQuery||JK,j=d.stringifyQuery||dL,J=d.history,mt=i2(),kt=i2(),Dt=i2(),$t=_G(Qv);let ee=Qv;i_&&d.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const pe=k8.bind(null,ka=>""+ka),Be=k8.bind(null,DK),ir=k8.bind(null,W2);function vr(ka,mo){let vo,Ss;return $I(ka)?(vo=l.getRecordMatcher(ka),Ss=mo):Ss=ka,l.addRoute(Ss,vo)}function Ir(ka){const mo=l.getRecordMatcher(ka);mo&&l.removeRoute(mo)}function Pr(){return l.getRoutes().map(ka=>ka.record)}function Wr(ka){return!!l.getRecordMatcher(ka)}function Tn(ka,mo){if(mo=Fh({},mo||$t.value),typeof ka=="string"){const ui=T8(z,ka,mo.path),ao=l.resolve({path:ui.path},mo),So=J.createHref(ui.fullPath);return Fh(ui,ao,{params:ir(ao.params),hash:W2(ui.hash),redirectedFrom:void 0,href:So})}let vo;if(ka.path!=null)vo=Fh({},ka,{path:T8(z,ka.path,mo.path).path});else{const ui=Fh({},ka.params);for(const ao in ui)ui[ao]==null&&delete ui[ao];vo=Fh({},ka,{params:Be(ui)}),mo.params=Be(mo.params)}const Ss=l.resolve(vo,mo),Yo=ka.hash||"";Ss.params=pe(ir(Ss.params));const vi=BK(j,Fh({},ka,{hash:zK(Yo),path:Ss.path})),yi=J.createHref(vi);return Fh({fullPath:vi,hash:Yo,query:j===dL?QK(ka.query):ka.query||{}},Ss,{redirectedFrom:void 0,href:yi})}function Ft(ka){return typeof ka=="string"?T8(z,ka,$t.value.path):Fh({},ka)}function wn(ka,mo){if(ee!==ka)return g_(kd.NAVIGATION_CANCELLED,{from:mo,to:ka})}function ei(ka){return Qi(ka)}function jn(ka){return ei(Fh(Ft(ka),{replace:!0}))}function ai(ka,mo){const vo=ka.matched[ka.matched.length-1];if(vo&&vo.redirect){const{redirect:Ss}=vo;let Yo=typeof Ss=="function"?Ss(ka,mo):Ss;return typeof Yo=="string"&&(Yo=Yo.includes("?")||Yo.includes("#")?Yo=Ft(Yo):{path:Yo},Yo.params={}),Fh({query:ka.query,hash:ka.hash,params:Yo.path!=null?{}:ka.params},Yo)}}function Qi(ka,mo){const vo=ee=Tn(ka),Ss=$t.value,Yo=ka.state,vi=ka.force,yi=ka.replace===!0,ui=ai(vo,Ss);if(ui)return Qi(Fh(Ft(ui),{state:typeof ui=="object"?Fh({},Yo,ui.state):Yo,force:vi,replace:yi}),mo||vo);const ao=vo;ao.redirectedFrom=mo;let So;return!vi&&NK(j,Ss,vo)&&(So=g_(kd.NAVIGATION_DUPLICATED,{to:ao,from:Ss}),Mo(Ss,Ss,!0,!1)),(So?Promise.resolve(So):Fa(ao,Ss)).catch(ko=>Gg(ko)?Gg(ko,kd.NAVIGATION_GUARD_REDIRECT)?ko:xo(ko):Va(ko,ao,Ss)).then(ko=>{if(ko){if(Gg(ko,kd.NAVIGATION_GUARD_REDIRECT))return Qi(Fh({replace:yi},Ft(ko.to),{state:typeof ko.to=="object"?Fh({},Yo,ko.to.state):Yo,force:vi}),mo||ao)}else ko=Ni(ao,Ss,!0,yi,Yo);return Sa(ao,Ss,ko),ko})}function Gi(ka,mo){const vo=wn(ka,mo);return vo?Promise.reject(vo):Promise.resolve()}function En(ka){const mo=To.values().next().value;return mo&&typeof mo.runWithContext=="function"?mo.runWithContext(ka):ka()}function Fa(ka,mo){let vo;const[Ss,Yo,vi]=eX(ka,mo);vo=M8(Ss.reverse(),"beforeRouteLeave",ka,mo);for(const ui of Ss)ui.leaveGuards.forEach(ao=>{vo.push(o1(ao,ka,mo))});const yi=Gi.bind(null,ka,mo);return vo.push(yi),ya(vo).then(()=>{vo=[];for(const ui of mt.list())vo.push(o1(ui,ka,mo));return vo.push(yi),ya(vo)}).then(()=>{vo=M8(Yo,"beforeRouteUpdate",ka,mo);for(const ui of Yo)ui.updateGuards.forEach(ao=>{vo.push(o1(ao,ka,mo))});return vo.push(yi),ya(vo)}).then(()=>{vo=[];for(const ui of vi)if(ui.beforeEnter)if(Im(ui.beforeEnter))for(const ao of ui.beforeEnter)vo.push(o1(ao,ka,mo));else vo.push(o1(ui.beforeEnter,ka,mo));return vo.push(yi),ya(vo)}).then(()=>(ka.matched.forEach(ui=>ui.enterCallbacks={}),vo=M8(vi,"beforeRouteEnter",ka,mo,En),vo.push(yi),ya(vo))).then(()=>{vo=[];for(const ui of kt.list())vo.push(o1(ui,ka,mo));return vo.push(yi),ya(vo)}).catch(ui=>Gg(ui,kd.NAVIGATION_CANCELLED)?ui:Promise.reject(ui))}function Sa(ka,mo,vo){Dt.list().forEach(Ss=>En(()=>Ss(ka,mo,vo)))}function Ni(ka,mo,vo,Ss,Yo){const vi=wn(ka,mo);if(vi)return vi;const yi=mo===Qv,ui=i_?history.state:{};vo&&(Ss||yi?J.replace(ka.fullPath,Fh({scroll:yi&&ui&&ui.scroll},Yo)):J.push(ka.fullPath,Yo)),$t.value=ka,Mo(ka,mo,vo,yi),xo()}let zi;function ia(){zi||(zi=J.listen((ka,mo,vo)=>{if(!eo.listening)return;const Ss=Tn(ka),Yo=ai(Ss,eo.currentRoute.value);if(Yo){Qi(Fh(Yo,{replace:!0,force:!0}),Ss).catch(C2);return}ee=Ss;const vi=$t.value;i_&&$K(fL(vi.fullPath,vo.delta),F4()),Fa(Ss,vi).catch(yi=>Gg(yi,kd.NAVIGATION_ABORTED|kd.NAVIGATION_CANCELLED)?yi:Gg(yi,kd.NAVIGATION_GUARD_REDIRECT)?(Qi(Fh(Ft(yi.to),{force:!0}),Ss).then(ui=>{Gg(ui,kd.NAVIGATION_ABORTED|kd.NAVIGATION_DUPLICATED)&&!vo.delta&&vo.type===lA.pop&&J.go(-1,!1)}).catch(C2),Promise.reject()):(vo.delta&&J.go(-vo.delta,!1),Va(yi,Ss,vi))).then(yi=>{yi=yi||Ni(Ss,vi,!1),yi&&(vo.delta&&!Gg(yi,kd.NAVIGATION_CANCELLED)?J.go(-vo.delta,!1):vo.type===lA.pop&&Gg(yi,kd.NAVIGATION_ABORTED|kd.NAVIGATION_DUPLICATED)&&J.go(-1,!1)),Sa(Ss,vi,yi)}).catch(C2)}))}let Ua=i2(),qi=i2(),Ei;function Va(ka,mo,vo){xo(ka);const Ss=qi.list();return Ss.length?Ss.forEach(Yo=>Yo(ka,mo,vo)):console.error(ka),Promise.reject(ka)}function us(){return Ei&&$t.value!==Qv?Promise.resolve():new Promise((ka,mo)=>{Ua.add([ka,mo])})}function xo(ka){return Ei||(Ei=!ka,ia(),Ua.list().forEach(([mo,vo])=>ka?vo(ka):mo()),Ua.reset()),ka}function Mo(ka,mo,vo,Ss){const{scrollBehavior:Yo}=d;if(!i_||!Yo)return Promise.resolve();const vi=!vo&&GK(fL(ka.fullPath,0))||(Ss||!vo)&&history.state&&history.state.scroll||null;return C0().then(()=>Yo(ka,mo,vi)).then(yi=>yi&&ZK(yi)).catch(yi=>Va(yi,ka,mo))}const co=ka=>J.go(ka);let Go;const To=new Set,eo={currentRoute:$t,listening:!0,addRoute:vr,removeRoute:Ir,clearRoutes:l.clearRoutes,hasRoute:Wr,getRoutes:Pr,resolve:Tn,options:d,push:ei,replace:jn,go:co,back:()=>co(-1),forward:()=>co(1),beforeEach:mt.add,beforeResolve:kt.add,afterEach:Dt.add,onError:qi.add,isReady:us,install(ka){ka.component("RouterLink",wX),ka.component("RouterView",MX),ka.config.globalProperties.$router=eo,Object.defineProperty(ka.config.globalProperties,"$route",{enumerable:!0,get:()=>Ju($t)}),i_&&!Go&&$t.value===Qv&&(Go=!0,ei(J.location).catch(Ss=>{}));const mo={};for(const Ss in Qv)Object.defineProperty(mo,Ss,{get:()=>$t.value[Ss],enumerable:!0});ka.provide(R4,eo),ka.provide(XA,Fz(mo)),ka.provide(cA,$t);const vo=ka.unmount;To.add(ka),ka.unmount=function(){To.delete(ka),To.size<1&&(ee=Qv,zi&&zi(),zi=null,$t.value=Qv,Go=!1,Ei=!1),vo()}}};function ya(ka){return ka.reduce((mo,vo)=>mo.then(()=>En(vo)),Promise.resolve())}return eo}function JI(){return hm(R4)}function QI(d){return hm(XA)}function tO(d,l){return function(){return d.apply(l,arguments)}}const{toString:EX}=Object.prototype,{getPrototypeOf:JA}=Object,{iterator:B4,toStringTag:eO}=Symbol,N4=(d=>l=>{const z=EX.call(l);return d[z]||(d[z]=z.slice(8,-1).toLowerCase())})(Object.create(null)),Om=d=>(d=d.toLowerCase(),l=>N4(l)===d),j4=d=>l=>typeof l===d,{isArray:w_}=Array,v_=j4("undefined");function nw(d){return d!==null&&!v_(d)&&d.constructor!==null&&!v_(d.constructor)&&L0(d.constructor.isBuffer)&&d.constructor.isBuffer(d)}const rO=Om("ArrayBuffer");function CX(d){let l;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?l=ArrayBuffer.isView(d):l=d&&d.buffer&&rO(d.buffer),l}const LX=j4("string"),L0=j4("function"),nO=j4("number"),iw=d=>d!==null&&typeof d=="object",PX=d=>d===!0||d===!1,Y5=d=>{if(N4(d)!=="object")return!1;const l=JA(d);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(eO in d)&&!(B4 in d)},zX=d=>{if(!iw(d)||nw(d))return!1;try{return Object.keys(d).length===0&&Object.getPrototypeOf(d)===Object.prototype}catch{return!1}},IX=Om("Date"),OX=Om("File"),DX=Om("Blob"),FX=Om("FileList"),RX=d=>iw(d)&&L0(d.pipe),BX=d=>{let l;return d&&(typeof FormData=="function"&&d instanceof FormData||L0(d.append)&&((l=N4(d))==="formdata"||l==="object"&&L0(d.toString)&&d.toString()==="[object FormData]"))},NX=Om("URLSearchParams"),[jX,UX,VX,HX]=["ReadableStream","Request","Response","Headers"].map(Om),WX=d=>d.trim?d.trim():d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function aw(d,l,{allOwnKeys:z=!1}={}){if(d===null||typeof d>"u")return;let j,J;if(typeof d!="object"&&(d=[d]),w_(d))for(j=0,J=d.length;j0;)if(J=z[j],l===J.toLowerCase())return J;return null}const xy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,aO=d=>!v_(d)&&d!==xy;function hA(){const{caseless:d,skipUndefined:l}=aO(this)&&this||{},z={},j=(J,mt)=>{const kt=d&&iO(z,mt)||mt;Y5(z[kt])&&Y5(J)?z[kt]=hA(z[kt],J):Y5(J)?z[kt]=hA({},J):w_(J)?z[kt]=J.slice():(!l||!v_(J))&&(z[kt]=J)};for(let J=0,mt=arguments.length;J(aw(l,(J,mt)=>{z&&L0(J)?d[mt]=tO(J,z):d[mt]=J},{allOwnKeys:j}),d),ZX=d=>(d.charCodeAt(0)===65279&&(d=d.slice(1)),d),$X=(d,l,z,j)=>{d.prototype=Object.create(l.prototype,j),d.prototype.constructor=d,Object.defineProperty(d,"super",{value:l.prototype}),z&&Object.assign(d.prototype,z)},GX=(d,l,z,j)=>{let J,mt,kt;const Dt={};if(l=l||{},d==null)return l;do{for(J=Object.getOwnPropertyNames(d),mt=J.length;mt-- >0;)kt=J[mt],(!j||j(kt,d,l))&&!Dt[kt]&&(l[kt]=d[kt],Dt[kt]=!0);d=z!==!1&&JA(d)}while(d&&(!z||z(d,l))&&d!==Object.prototype);return l},YX=(d,l,z)=>{d=String(d),(z===void 0||z>d.length)&&(z=d.length),z-=l.length;const j=d.indexOf(l,z);return j!==-1&&j===z},KX=d=>{if(!d)return null;if(w_(d))return d;let l=d.length;if(!nO(l))return null;const z=new Array(l);for(;l-- >0;)z[l]=d[l];return z},XX=(d=>l=>d&&l instanceof d)(typeof Uint8Array<"u"&&JA(Uint8Array)),JX=(d,l)=>{const j=(d&&d[B4]).call(d);let J;for(;(J=j.next())&&!J.done;){const mt=J.value;l.call(d,mt[0],mt[1])}},QX=(d,l)=>{let z;const j=[];for(;(z=d.exec(l))!==null;)j.push(z);return j},tJ=Om("HTMLFormElement"),eJ=d=>d.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(z,j,J){return j.toUpperCase()+J}),AL=(({hasOwnProperty:d})=>(l,z)=>d.call(l,z))(Object.prototype),rJ=Om("RegExp"),oO=(d,l)=>{const z=Object.getOwnPropertyDescriptors(d),j={};aw(z,(J,mt)=>{let kt;(kt=l(J,mt,d))!==!1&&(j[mt]=kt||J)}),Object.defineProperties(d,j)},nJ=d=>{oO(d,(l,z)=>{if(L0(d)&&["arguments","caller","callee"].indexOf(z)!==-1)return!1;const j=d[z];if(L0(j)){if(l.enumerable=!1,"writable"in l){l.writable=!1;return}l.set||(l.set=()=>{throw Error("Can not rewrite read-only method '"+z+"'")})}})},iJ=(d,l)=>{const z={},j=J=>{J.forEach(mt=>{z[mt]=!0})};return w_(d)?j(d):j(String(d).split(l)),z},aJ=()=>{},oJ=(d,l)=>d!=null&&Number.isFinite(d=+d)?d:l;function sJ(d){return!!(d&&L0(d.append)&&d[eO]==="FormData"&&d[B4])}const lJ=d=>{const l=new Array(10),z=(j,J)=>{if(iw(j)){if(l.indexOf(j)>=0)return;if(nw(j))return j;if(!("toJSON"in j)){l[J]=j;const mt=w_(j)?[]:{};return aw(j,(kt,Dt)=>{const $t=z(kt,J+1);!v_($t)&&(mt[Dt]=$t)}),l[J]=void 0,mt}}return j};return z(d,0)},uJ=Om("AsyncFunction"),cJ=d=>d&&(iw(d)||L0(d))&&L0(d.then)&&L0(d.catch),sO=((d,l)=>d?setImmediate:l?((z,j)=>(xy.addEventListener("message",({source:J,data:mt})=>{J===xy&&mt===z&&j.length&&j.shift()()},!1),J=>{j.push(J),xy.postMessage(z,"*")}))(`axios@${Math.random()}`,[]):z=>setTimeout(z))(typeof setImmediate=="function",L0(xy.postMessage)),hJ=typeof queueMicrotask<"u"?queueMicrotask.bind(xy):typeof process<"u"&&process.nextTick||sO,fJ=d=>d!=null&&L0(d[B4]),to={isArray:w_,isArrayBuffer:rO,isBuffer:nw,isFormData:BX,isArrayBufferView:CX,isString:LX,isNumber:nO,isBoolean:PX,isObject:iw,isPlainObject:Y5,isEmptyObject:zX,isReadableStream:jX,isRequest:UX,isResponse:VX,isHeaders:HX,isUndefined:v_,isDate:IX,isFile:OX,isBlob:DX,isRegExp:rJ,isFunction:L0,isStream:RX,isURLSearchParams:NX,isTypedArray:XX,isFileList:FX,forEach:aw,merge:hA,extend:qX,trim:WX,stripBOM:ZX,inherits:$X,toFlatObject:GX,kindOf:N4,kindOfTest:Om,endsWith:YX,toArray:KX,forEachEntry:JX,matchAll:QX,isHTMLForm:tJ,hasOwnProperty:AL,hasOwnProp:AL,reduceDescriptors:oO,freezeMethods:nJ,toObjectSet:iJ,toCamelCase:eJ,noop:aJ,toFiniteNumber:oJ,findKey:iO,global:xy,isContextDefined:aO,isSpecCompliantForm:sJ,toJSONObject:lJ,isAsyncFn:uJ,isThenable:cJ,setImmediate:sO,asap:hJ,isIterable:fJ};function Qu(d,l,z,j,J){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=d,this.name="AxiosError",l&&(this.code=l),z&&(this.config=z),j&&(this.request=j),J&&(this.response=J,this.status=J.status?J.status:null)}to.inherits(Qu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:to.toJSONObject(this.config),code:this.code,status:this.status}}});const lO=Qu.prototype,uO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(d=>{uO[d]={value:d}});Object.defineProperties(Qu,uO);Object.defineProperty(lO,"isAxiosError",{value:!0});Qu.from=(d,l,z,j,J,mt)=>{const kt=Object.create(lO);to.toFlatObject(d,kt,function(pe){return pe!==Error.prototype},ee=>ee!=="isAxiosError");const Dt=d&&d.message?d.message:"Error",$t=l==null&&d?d.code:l;return Qu.call(kt,Dt,$t,z,j,J),d&&kt.cause==null&&Object.defineProperty(kt,"cause",{value:d,configurable:!0}),kt.name=d&&d.name||"Error",mt&&Object.assign(kt,mt),kt};const dJ=null;function fA(d){return to.isPlainObject(d)||to.isArray(d)}function cO(d){return to.endsWith(d,"[]")?d.slice(0,-2):d}function ML(d,l,z){return d?d.concat(l).map(function(J,mt){return J=cO(J),!z&&mt?"["+J+"]":J}).join(z?".":""):l}function pJ(d){return to.isArray(d)&&!d.some(fA)}const mJ=to.toFlatObject(to,{},null,function(l){return/^is[A-Z]/.test(l)});function U4(d,l,z){if(!to.isObject(d))throw new TypeError("target must be an object");l=l||new FormData,z=to.toFlatObject(z,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Pr,Wr){return!to.isUndefined(Wr[Pr])});const j=z.metaTokens,J=z.visitor||pe,mt=z.dots,kt=z.indexes,$t=(z.Blob||typeof Blob<"u"&&Blob)&&to.isSpecCompliantForm(l);if(!to.isFunction(J))throw new TypeError("visitor must be a function");function ee(Ir){if(Ir===null)return"";if(to.isDate(Ir))return Ir.toISOString();if(to.isBoolean(Ir))return Ir.toString();if(!$t&&to.isBlob(Ir))throw new Qu("Blob is not supported. Use a Buffer instead.");return to.isArrayBuffer(Ir)||to.isTypedArray(Ir)?$t&&typeof Blob=="function"?new Blob([Ir]):Buffer.from(Ir):Ir}function pe(Ir,Pr,Wr){let Tn=Ir;if(Ir&&!Wr&&typeof Ir=="object"){if(to.endsWith(Pr,"{}"))Pr=j?Pr:Pr.slice(0,-2),Ir=JSON.stringify(Ir);else if(to.isArray(Ir)&&pJ(Ir)||(to.isFileList(Ir)||to.endsWith(Pr,"[]"))&&(Tn=to.toArray(Ir)))return Pr=cO(Pr),Tn.forEach(function(wn,ei){!(to.isUndefined(wn)||wn===null)&&l.append(kt===!0?ML([Pr],ei,mt):kt===null?Pr:Pr+"[]",ee(wn))}),!1}return fA(Ir)?!0:(l.append(ML(Wr,Pr,mt),ee(Ir)),!1)}const Be=[],ir=Object.assign(mJ,{defaultVisitor:pe,convertValue:ee,isVisitable:fA});function vr(Ir,Pr){if(!to.isUndefined(Ir)){if(Be.indexOf(Ir)!==-1)throw Error("Circular reference detected in "+Pr.join("."));Be.push(Ir),to.forEach(Ir,function(Tn,Ft){(!(to.isUndefined(Tn)||Tn===null)&&J.call(l,Tn,to.isString(Ft)?Ft.trim():Ft,Pr,ir))===!0&&vr(Tn,Pr?Pr.concat(Ft):[Ft])}),Be.pop()}}if(!to.isObject(d))throw new TypeError("data must be an object");return vr(d),l}function SL(d){const l={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(d).replace(/[!'()~]|%20|%00/g,function(j){return l[j]})}function QA(d,l){this._pairs=[],d&&U4(d,this,l)}const hO=QA.prototype;hO.append=function(l,z){this._pairs.push([l,z])};hO.toString=function(l){const z=l?function(j){return l.call(this,j,SL)}:SL;return this._pairs.map(function(J){return z(J[0])+"="+z(J[1])},"").join("&")};function gJ(d){return encodeURIComponent(d).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function fO(d,l,z){if(!l)return d;const j=z&&z.encode||gJ;to.isFunction(z)&&(z={serialize:z});const J=z&&z.serialize;let mt;if(J?mt=J(l,z):mt=to.isURLSearchParams(l)?l.toString():new QA(l,z).toString(j),mt){const kt=d.indexOf("#");kt!==-1&&(d=d.slice(0,kt)),d+=(d.indexOf("?")===-1?"?":"&")+mt}return d}class EL{constructor(){this.handlers=[]}use(l,z,j){return this.handlers.push({fulfilled:l,rejected:z,synchronous:j?j.synchronous:!1,runWhen:j?j.runWhen:null}),this.handlers.length-1}eject(l){this.handlers[l]&&(this.handlers[l]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(l){to.forEach(this.handlers,function(j){j!==null&&l(j)})}}const dO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vJ=typeof URLSearchParams<"u"?URLSearchParams:QA,yJ=typeof FormData<"u"?FormData:null,xJ=typeof Blob<"u"?Blob:null,_J={isBrowser:!0,classes:{URLSearchParams:vJ,FormData:yJ,Blob:xJ},protocols:["http","https","file","blob","url","data"]},tM=typeof window<"u"&&typeof document<"u",dA=typeof navigator=="object"&&navigator||void 0,bJ=tM&&(!dA||["ReactNative","NativeScript","NS"].indexOf(dA.product)<0),wJ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kJ=tM&&window.location.href||"http://localhost",TJ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:tM,hasStandardBrowserEnv:bJ,hasStandardBrowserWebWorkerEnv:wJ,navigator:dA,origin:kJ},Symbol.toStringTag,{value:"Module"})),t0={...TJ,..._J};function AJ(d,l){return U4(d,new t0.classes.URLSearchParams,{visitor:function(z,j,J,mt){return t0.isNode&&to.isBuffer(z)?(this.append(j,z.toString("base64")),!1):mt.defaultVisitor.apply(this,arguments)},...l})}function MJ(d){return to.matchAll(/\w+|\[(\w*)]/g,d).map(l=>l[0]==="[]"?"":l[1]||l[0])}function SJ(d){const l={},z=Object.keys(d);let j;const J=z.length;let mt;for(j=0;j=z.length;return kt=!kt&&to.isArray(J)?J.length:kt,$t?(to.hasOwnProp(J,kt)?J[kt]=[J[kt],j]:J[kt]=j,!Dt):((!J[kt]||!to.isObject(J[kt]))&&(J[kt]=[]),l(z,j,J[kt],mt)&&to.isArray(J[kt])&&(J[kt]=SJ(J[kt])),!Dt)}if(to.isFormData(d)&&to.isFunction(d.entries)){const z={};return to.forEachEntry(d,(j,J)=>{l(MJ(j),J,z,0)}),z}return null}function EJ(d,l,z){if(to.isString(d))try{return(l||JSON.parse)(d),to.trim(d)}catch(j){if(j.name!=="SyntaxError")throw j}return(z||JSON.stringify)(d)}const ow={transitional:dO,adapter:["xhr","http","fetch"],transformRequest:[function(l,z){const j=z.getContentType()||"",J=j.indexOf("application/json")>-1,mt=to.isObject(l);if(mt&&to.isHTMLForm(l)&&(l=new FormData(l)),to.isFormData(l))return J?JSON.stringify(pO(l)):l;if(to.isArrayBuffer(l)||to.isBuffer(l)||to.isStream(l)||to.isFile(l)||to.isBlob(l)||to.isReadableStream(l))return l;if(to.isArrayBufferView(l))return l.buffer;if(to.isURLSearchParams(l))return z.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),l.toString();let Dt;if(mt){if(j.indexOf("application/x-www-form-urlencoded")>-1)return AJ(l,this.formSerializer).toString();if((Dt=to.isFileList(l))||j.indexOf("multipart/form-data")>-1){const $t=this.env&&this.env.FormData;return U4(Dt?{"files[]":l}:l,$t&&new $t,this.formSerializer)}}return mt||J?(z.setContentType("application/json",!1),EJ(l)):l}],transformResponse:[function(l){const z=this.transitional||ow.transitional,j=z&&z.forcedJSONParsing,J=this.responseType==="json";if(to.isResponse(l)||to.isReadableStream(l))return l;if(l&&to.isString(l)&&(j&&!this.responseType||J)){const kt=!(z&&z.silentJSONParsing)&&J;try{return JSON.parse(l,this.parseReviver)}catch(Dt){if(kt)throw Dt.name==="SyntaxError"?Qu.from(Dt,Qu.ERR_BAD_RESPONSE,this,null,this.response):Dt}}return l}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:t0.classes.FormData,Blob:t0.classes.Blob},validateStatus:function(l){return l>=200&&l<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};to.forEach(["delete","get","head","post","put","patch"],d=>{ow.headers[d]={}});const CJ=to.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),LJ=d=>{const l={};let z,j,J;return d&&d.split(` -`).forEach(function(kt){J=kt.indexOf(":"),z=kt.substring(0,J).trim().toLowerCase(),j=kt.substring(J+1).trim(),!(!z||l[z]&&CJ[z])&&(z==="set-cookie"?l[z]?l[z].push(j):l[z]=[j]:l[z]=l[z]?l[z]+", "+j:j)}),l},CL=Symbol("internals");function a2(d){return d&&String(d).trim().toLowerCase()}function K5(d){return d===!1||d==null?d:to.isArray(d)?d.map(K5):String(d)}function PJ(d){const l=Object.create(null),z=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let j;for(;j=z.exec(d);)l[j[1]]=j[2];return l}const zJ=d=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(d.trim());function S8(d,l,z,j,J){if(to.isFunction(j))return j.call(this,l,z);if(J&&(l=z),!!to.isString(l)){if(to.isString(j))return l.indexOf(j)!==-1;if(to.isRegExp(j))return j.test(l)}}function IJ(d){return d.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(l,z,j)=>z.toUpperCase()+j)}function OJ(d,l){const z=to.toCamelCase(" "+l);["get","set","has"].forEach(j=>{Object.defineProperty(d,j+z,{value:function(J,mt,kt){return this[j].call(this,l,J,mt,kt)},configurable:!0})})}let P0=class{constructor(l){l&&this.set(l)}set(l,z,j){const J=this;function mt(Dt,$t,ee){const pe=a2($t);if(!pe)throw new Error("header name must be a non-empty string");const Be=to.findKey(J,pe);(!Be||J[Be]===void 0||ee===!0||ee===void 0&&J[Be]!==!1)&&(J[Be||$t]=K5(Dt))}const kt=(Dt,$t)=>to.forEach(Dt,(ee,pe)=>mt(ee,pe,$t));if(to.isPlainObject(l)||l instanceof this.constructor)kt(l,z);else if(to.isString(l)&&(l=l.trim())&&!zJ(l))kt(LJ(l),z);else if(to.isObject(l)&&to.isIterable(l)){let Dt={},$t,ee;for(const pe of l){if(!to.isArray(pe))throw TypeError("Object iterator must return a key-value pair");Dt[ee=pe[0]]=($t=Dt[ee])?to.isArray($t)?[...$t,pe[1]]:[$t,pe[1]]:pe[1]}kt(Dt,z)}else l!=null&&mt(z,l,j);return this}get(l,z){if(l=a2(l),l){const j=to.findKey(this,l);if(j){const J=this[j];if(!z)return J;if(z===!0)return PJ(J);if(to.isFunction(z))return z.call(this,J,j);if(to.isRegExp(z))return z.exec(J);throw new TypeError("parser must be boolean|regexp|function")}}}has(l,z){if(l=a2(l),l){const j=to.findKey(this,l);return!!(j&&this[j]!==void 0&&(!z||S8(this,this[j],j,z)))}return!1}delete(l,z){const j=this;let J=!1;function mt(kt){if(kt=a2(kt),kt){const Dt=to.findKey(j,kt);Dt&&(!z||S8(j,j[Dt],Dt,z))&&(delete j[Dt],J=!0)}}return to.isArray(l)?l.forEach(mt):mt(l),J}clear(l){const z=Object.keys(this);let j=z.length,J=!1;for(;j--;){const mt=z[j];(!l||S8(this,this[mt],mt,l,!0))&&(delete this[mt],J=!0)}return J}normalize(l){const z=this,j={};return to.forEach(this,(J,mt)=>{const kt=to.findKey(j,mt);if(kt){z[kt]=K5(J),delete z[mt];return}const Dt=l?IJ(mt):String(mt).trim();Dt!==mt&&delete z[mt],z[Dt]=K5(J),j[Dt]=!0}),this}concat(...l){return this.constructor.concat(this,...l)}toJSON(l){const z=Object.create(null);return to.forEach(this,(j,J)=>{j!=null&&j!==!1&&(z[J]=l&&to.isArray(j)?j.join(", "):j)}),z}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([l,z])=>l+": "+z).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...z){const j=new this(l);return z.forEach(J=>j.set(J)),j}static accessor(l){const j=(this[CL]=this[CL]={accessors:{}}).accessors,J=this.prototype;function mt(kt){const Dt=a2(kt);j[Dt]||(OJ(J,kt),j[Dt]=!0)}return to.isArray(l)?l.forEach(mt):mt(l),this}};P0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);to.reduceDescriptors(P0.prototype,({value:d},l)=>{let z=l[0].toUpperCase()+l.slice(1);return{get:()=>d,set(j){this[z]=j}}});to.freezeMethods(P0);function E8(d,l){const z=this||ow,j=l||z,J=P0.from(j.headers);let mt=j.data;return to.forEach(d,function(Dt){mt=Dt.call(z,mt,J.normalize(),l?l.status:void 0)}),J.normalize(),mt}function mO(d){return!!(d&&d.__CANCEL__)}function k_(d,l,z){Qu.call(this,d??"canceled",Qu.ERR_CANCELED,l,z),this.name="CanceledError"}to.inherits(k_,Qu,{__CANCEL__:!0});function gO(d,l,z){const j=z.config.validateStatus;!z.status||!j||j(z.status)?d(z):l(new Qu("Request failed with status code "+z.status,[Qu.ERR_BAD_REQUEST,Qu.ERR_BAD_RESPONSE][Math.floor(z.status/100)-4],z.config,z.request,z))}function DJ(d){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(d);return l&&l[1]||""}function FJ(d,l){d=d||10;const z=new Array(d),j=new Array(d);let J=0,mt=0,kt;return l=l!==void 0?l:1e3,function($t){const ee=Date.now(),pe=j[mt];kt||(kt=ee),z[J]=$t,j[J]=ee;let Be=mt,ir=0;for(;Be!==J;)ir+=z[Be++],Be=Be%d;if(J=(J+1)%d,J===mt&&(mt=(mt+1)%d),ee-kt{z=pe,J=null,mt&&(clearTimeout(mt),mt=null),d(...ee)};return[(...ee)=>{const pe=Date.now(),Be=pe-z;Be>=j?kt(ee,pe):(J=ee,mt||(mt=setTimeout(()=>{mt=null,kt(J)},j-Be)))},()=>J&&kt(J)]}const f4=(d,l,z=3)=>{let j=0;const J=FJ(50,250);return RJ(mt=>{const kt=mt.loaded,Dt=mt.lengthComputable?mt.total:void 0,$t=kt-j,ee=J($t),pe=kt<=Dt;j=kt;const Be={loaded:kt,total:Dt,progress:Dt?kt/Dt:void 0,bytes:$t,rate:ee||void 0,estimated:ee&&Dt&&pe?(Dt-kt)/ee:void 0,event:mt,lengthComputable:Dt!=null,[l?"download":"upload"]:!0};d(Be)},z)},LL=(d,l)=>{const z=d!=null;return[j=>l[0]({lengthComputable:z,total:d,loaded:j}),l[1]]},PL=d=>(...l)=>to.asap(()=>d(...l)),BJ=t0.hasStandardBrowserEnv?((d,l)=>z=>(z=new URL(z,t0.origin),d.protocol===z.protocol&&d.host===z.host&&(l||d.port===z.port)))(new URL(t0.origin),t0.navigator&&/(msie|trident)/i.test(t0.navigator.userAgent)):()=>!0,NJ=t0.hasStandardBrowserEnv?{write(d,l,z,j,J,mt,kt){if(typeof document>"u")return;const Dt=[`${d}=${encodeURIComponent(l)}`];to.isNumber(z)&&Dt.push(`expires=${new Date(z).toUTCString()}`),to.isString(j)&&Dt.push(`path=${j}`),to.isString(J)&&Dt.push(`domain=${J}`),mt===!0&&Dt.push("secure"),to.isString(kt)&&Dt.push(`SameSite=${kt}`),document.cookie=Dt.join("; ")},read(d){if(typeof document>"u")return null;const l=document.cookie.match(new RegExp("(?:^|; )"+d+"=([^;]*)"));return l?decodeURIComponent(l[1]):null},remove(d){this.write(d,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function jJ(d){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(d)}function UJ(d,l){return l?d.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):d}function vO(d,l,z){let j=!jJ(l);return d&&(j||z==!1)?UJ(d,l):l}const zL=d=>d instanceof P0?{...d}:d;function Sy(d,l){l=l||{};const z={};function j(ee,pe,Be,ir){return to.isPlainObject(ee)&&to.isPlainObject(pe)?to.merge.call({caseless:ir},ee,pe):to.isPlainObject(pe)?to.merge({},pe):to.isArray(pe)?pe.slice():pe}function J(ee,pe,Be,ir){if(to.isUndefined(pe)){if(!to.isUndefined(ee))return j(void 0,ee,Be,ir)}else return j(ee,pe,Be,ir)}function mt(ee,pe){if(!to.isUndefined(pe))return j(void 0,pe)}function kt(ee,pe){if(to.isUndefined(pe)){if(!to.isUndefined(ee))return j(void 0,ee)}else return j(void 0,pe)}function Dt(ee,pe,Be){if(Be in l)return j(ee,pe);if(Be in d)return j(void 0,ee)}const $t={url:mt,method:mt,data:mt,baseURL:kt,transformRequest:kt,transformResponse:kt,paramsSerializer:kt,timeout:kt,timeoutMessage:kt,withCredentials:kt,withXSRFToken:kt,adapter:kt,responseType:kt,xsrfCookieName:kt,xsrfHeaderName:kt,onUploadProgress:kt,onDownloadProgress:kt,decompress:kt,maxContentLength:kt,maxBodyLength:kt,beforeRedirect:kt,transport:kt,httpAgent:kt,httpsAgent:kt,cancelToken:kt,socketPath:kt,responseEncoding:kt,validateStatus:Dt,headers:(ee,pe,Be)=>J(zL(ee),zL(pe),Be,!0)};return to.forEach(Object.keys({...d,...l}),function(pe){const Be=$t[pe]||J,ir=Be(d[pe],l[pe],pe);to.isUndefined(ir)&&Be!==Dt||(z[pe]=ir)}),z}const yO=d=>{const l=Sy({},d);let{data:z,withXSRFToken:j,xsrfHeaderName:J,xsrfCookieName:mt,headers:kt,auth:Dt}=l;if(l.headers=kt=P0.from(kt),l.url=fO(vO(l.baseURL,l.url,l.allowAbsoluteUrls),d.params,d.paramsSerializer),Dt&&kt.set("Authorization","Basic "+btoa((Dt.username||"")+":"+(Dt.password?unescape(encodeURIComponent(Dt.password)):""))),to.isFormData(z)){if(t0.hasStandardBrowserEnv||t0.hasStandardBrowserWebWorkerEnv)kt.setContentType(void 0);else if(to.isFunction(z.getHeaders)){const $t=z.getHeaders(),ee=["content-type","content-length"];Object.entries($t).forEach(([pe,Be])=>{ee.includes(pe.toLowerCase())&&kt.set(pe,Be)})}}if(t0.hasStandardBrowserEnv&&(j&&to.isFunction(j)&&(j=j(l)),j||j!==!1&&BJ(l.url))){const $t=J&&mt&&NJ.read(mt);$t&&kt.set(J,$t)}return l},VJ=typeof XMLHttpRequest<"u",HJ=VJ&&function(d){return new Promise(function(z,j){const J=yO(d);let mt=J.data;const kt=P0.from(J.headers).normalize();let{responseType:Dt,onUploadProgress:$t,onDownloadProgress:ee}=J,pe,Be,ir,vr,Ir;function Pr(){vr&&vr(),Ir&&Ir(),J.cancelToken&&J.cancelToken.unsubscribe(pe),J.signal&&J.signal.removeEventListener("abort",pe)}let Wr=new XMLHttpRequest;Wr.open(J.method.toUpperCase(),J.url,!0),Wr.timeout=J.timeout;function Tn(){if(!Wr)return;const wn=P0.from("getAllResponseHeaders"in Wr&&Wr.getAllResponseHeaders()),jn={data:!Dt||Dt==="text"||Dt==="json"?Wr.responseText:Wr.response,status:Wr.status,statusText:Wr.statusText,headers:wn,config:d,request:Wr};gO(function(Qi){z(Qi),Pr()},function(Qi){j(Qi),Pr()},jn),Wr=null}"onloadend"in Wr?Wr.onloadend=Tn:Wr.onreadystatechange=function(){!Wr||Wr.readyState!==4||Wr.status===0&&!(Wr.responseURL&&Wr.responseURL.indexOf("file:")===0)||setTimeout(Tn)},Wr.onabort=function(){Wr&&(j(new Qu("Request aborted",Qu.ECONNABORTED,d,Wr)),Wr=null)},Wr.onerror=function(ei){const jn=ei&&ei.message?ei.message:"Network Error",ai=new Qu(jn,Qu.ERR_NETWORK,d,Wr);ai.event=ei||null,j(ai),Wr=null},Wr.ontimeout=function(){let ei=J.timeout?"timeout of "+J.timeout+"ms exceeded":"timeout exceeded";const jn=J.transitional||dO;J.timeoutErrorMessage&&(ei=J.timeoutErrorMessage),j(new Qu(ei,jn.clarifyTimeoutError?Qu.ETIMEDOUT:Qu.ECONNABORTED,d,Wr)),Wr=null},mt===void 0&&kt.setContentType(null),"setRequestHeader"in Wr&&to.forEach(kt.toJSON(),function(ei,jn){Wr.setRequestHeader(jn,ei)}),to.isUndefined(J.withCredentials)||(Wr.withCredentials=!!J.withCredentials),Dt&&Dt!=="json"&&(Wr.responseType=J.responseType),ee&&([ir,Ir]=f4(ee,!0),Wr.addEventListener("progress",ir)),$t&&Wr.upload&&([Be,vr]=f4($t),Wr.upload.addEventListener("progress",Be),Wr.upload.addEventListener("loadend",vr)),(J.cancelToken||J.signal)&&(pe=wn=>{Wr&&(j(!wn||wn.type?new k_(null,d,Wr):wn),Wr.abort(),Wr=null)},J.cancelToken&&J.cancelToken.subscribe(pe),J.signal&&(J.signal.aborted?pe():J.signal.addEventListener("abort",pe)));const Ft=DJ(J.url);if(Ft&&t0.protocols.indexOf(Ft)===-1){j(new Qu("Unsupported protocol "+Ft+":",Qu.ERR_BAD_REQUEST,d));return}Wr.send(mt||null)})},WJ=(d,l)=>{const{length:z}=d=d?d.filter(Boolean):[];if(l||z){let j=new AbortController,J;const mt=function(ee){if(!J){J=!0,Dt();const pe=ee instanceof Error?ee:this.reason;j.abort(pe instanceof Qu?pe:new k_(pe instanceof Error?pe.message:pe))}};let kt=l&&setTimeout(()=>{kt=null,mt(new Qu(`timeout ${l} of ms exceeded`,Qu.ETIMEDOUT))},l);const Dt=()=>{d&&(kt&&clearTimeout(kt),kt=null,d.forEach(ee=>{ee.unsubscribe?ee.unsubscribe(mt):ee.removeEventListener("abort",mt)}),d=null)};d.forEach(ee=>ee.addEventListener("abort",mt));const{signal:$t}=j;return $t.unsubscribe=()=>to.asap(Dt),$t}},qJ=function*(d,l){let z=d.byteLength;if(z{const J=ZJ(d,l);let mt=0,kt,Dt=$t=>{kt||(kt=!0,j&&j($t))};return new ReadableStream({async pull($t){try{const{done:ee,value:pe}=await J.next();if(ee){Dt(),$t.close();return}let Be=pe.byteLength;if(z){let ir=mt+=Be;z(ir)}$t.enqueue(new Uint8Array(pe))}catch(ee){throw Dt(ee),ee}},cancel($t){return Dt($t),J.return()}},{highWaterMark:2})},OL=64*1024,{isFunction:E5}=to,GJ=(({Request:d,Response:l})=>({Request:d,Response:l}))(to.global),{ReadableStream:DL,TextEncoder:FL}=to.global,RL=(d,...l)=>{try{return!!d(...l)}catch{return!1}},YJ=d=>{d=to.merge.call({skipUndefined:!0},GJ,d);const{fetch:l,Request:z,Response:j}=d,J=l?E5(l):typeof fetch=="function",mt=E5(z),kt=E5(j);if(!J)return!1;const Dt=J&&E5(DL),$t=J&&(typeof FL=="function"?(Ir=>Pr=>Ir.encode(Pr))(new FL):async Ir=>new Uint8Array(await new z(Ir).arrayBuffer())),ee=mt&&Dt&&RL(()=>{let Ir=!1;const Pr=new z(t0.origin,{body:new DL,method:"POST",get duplex(){return Ir=!0,"half"}}).headers.has("Content-Type");return Ir&&!Pr}),pe=kt&&Dt&&RL(()=>to.isReadableStream(new j("").body)),Be={stream:pe&&(Ir=>Ir.body)};J&&["text","arrayBuffer","blob","formData","stream"].forEach(Ir=>{!Be[Ir]&&(Be[Ir]=(Pr,Wr)=>{let Tn=Pr&&Pr[Ir];if(Tn)return Tn.call(Pr);throw new Qu(`Response type '${Ir}' is not supported`,Qu.ERR_NOT_SUPPORT,Wr)})});const ir=async Ir=>{if(Ir==null)return 0;if(to.isBlob(Ir))return Ir.size;if(to.isSpecCompliantForm(Ir))return(await new z(t0.origin,{method:"POST",body:Ir}).arrayBuffer()).byteLength;if(to.isArrayBufferView(Ir)||to.isArrayBuffer(Ir))return Ir.byteLength;if(to.isURLSearchParams(Ir)&&(Ir=Ir+""),to.isString(Ir))return(await $t(Ir)).byteLength},vr=async(Ir,Pr)=>{const Wr=to.toFiniteNumber(Ir.getContentLength());return Wr??ir(Pr)};return async Ir=>{let{url:Pr,method:Wr,data:Tn,signal:Ft,cancelToken:wn,timeout:ei,onDownloadProgress:jn,onUploadProgress:ai,responseType:Qi,headers:Gi,withCredentials:En="same-origin",fetchOptions:Fa}=yO(Ir),Sa=l||fetch;Qi=Qi?(Qi+"").toLowerCase():"text";let Ni=WJ([Ft,wn&&wn.toAbortSignal()],ei),zi=null;const ia=Ni&&Ni.unsubscribe&&(()=>{Ni.unsubscribe()});let Ua;try{if(ai&&ee&&Wr!=="get"&&Wr!=="head"&&(Ua=await vr(Gi,Tn))!==0){let Mo=new z(Pr,{method:"POST",body:Tn,duplex:"half"}),co;if(to.isFormData(Tn)&&(co=Mo.headers.get("content-type"))&&Gi.setContentType(co),Mo.body){const[Go,To]=LL(Ua,f4(PL(ai)));Tn=IL(Mo.body,OL,Go,To)}}to.isString(En)||(En=En?"include":"omit");const qi=mt&&"credentials"in z.prototype,Ei={...Fa,signal:Ni,method:Wr.toUpperCase(),headers:Gi.normalize().toJSON(),body:Tn,duplex:"half",credentials:qi?En:void 0};zi=mt&&new z(Pr,Ei);let Va=await(mt?Sa(zi,Fa):Sa(Pr,Ei));const us=pe&&(Qi==="stream"||Qi==="response");if(pe&&(jn||us&&ia)){const Mo={};["status","statusText","headers"].forEach(eo=>{Mo[eo]=Va[eo]});const co=to.toFiniteNumber(Va.headers.get("content-length")),[Go,To]=jn&&LL(co,f4(PL(jn),!0))||[];Va=new j(IL(Va.body,OL,Go,()=>{To&&To(),ia&&ia()}),Mo)}Qi=Qi||"text";let xo=await Be[to.findKey(Be,Qi)||"text"](Va,Ir);return!us&&ia&&ia(),await new Promise((Mo,co)=>{gO(Mo,co,{data:xo,headers:P0.from(Va.headers),status:Va.status,statusText:Va.statusText,config:Ir,request:zi})})}catch(qi){throw ia&&ia(),qi&&qi.name==="TypeError"&&/Load failed|fetch/i.test(qi.message)?Object.assign(new Qu("Network Error",Qu.ERR_NETWORK,Ir,zi),{cause:qi.cause||qi}):Qu.from(qi,qi&&qi.code,Ir,zi)}}},KJ=new Map,xO=d=>{let l=d&&d.env||{};const{fetch:z,Request:j,Response:J}=l,mt=[j,J,z];let kt=mt.length,Dt=kt,$t,ee,pe=KJ;for(;Dt--;)$t=mt[Dt],ee=pe.get($t),ee===void 0&&pe.set($t,ee=Dt?new Map:YJ(l)),pe=ee;return ee};xO();const eM={http:dJ,xhr:HJ,fetch:{get:xO}};to.forEach(eM,(d,l)=>{if(d){try{Object.defineProperty(d,"name",{value:l})}catch{}Object.defineProperty(d,"adapterName",{value:l})}});const BL=d=>`- ${d}`,XJ=d=>to.isFunction(d)||d===null||d===!1;function JJ(d,l){d=to.isArray(d)?d:[d];const{length:z}=d;let j,J;const mt={};for(let kt=0;kt`adapter ${$t} `+(ee===!1?"is not supported by the environment":"is not available in the build"));let Dt=z?kt.length>1?`since : -`+kt.map(BL).join(` -`):" "+BL(kt[0]):"as no adapter specified";throw new Qu("There is no suitable adapter to dispatch the request "+Dt,"ERR_NOT_SUPPORT")}return J}const _O={getAdapter:JJ,adapters:eM};function C8(d){if(d.cancelToken&&d.cancelToken.throwIfRequested(),d.signal&&d.signal.aborted)throw new k_(null,d)}function NL(d){return C8(d),d.headers=P0.from(d.headers),d.data=E8.call(d,d.transformRequest),["post","put","patch"].indexOf(d.method)!==-1&&d.headers.setContentType("application/x-www-form-urlencoded",!1),_O.getAdapter(d.adapter||ow.adapter,d)(d).then(function(j){return C8(d),j.data=E8.call(d,d.transformResponse,j),j.headers=P0.from(j.headers),j},function(j){return mO(j)||(C8(d),j&&j.response&&(j.response.data=E8.call(d,d.transformResponse,j.response),j.response.headers=P0.from(j.response.headers))),Promise.reject(j)})}const bO="1.13.2",V4={};["object","boolean","number","function","string","symbol"].forEach((d,l)=>{V4[d]=function(j){return typeof j===d||"a"+(l<1?"n ":" ")+d}});const jL={};V4.transitional=function(l,z,j){function J(mt,kt){return"[Axios v"+bO+"] Transitional option '"+mt+"'"+kt+(j?". "+j:"")}return(mt,kt,Dt)=>{if(l===!1)throw new Qu(J(kt," has been removed"+(z?" in "+z:"")),Qu.ERR_DEPRECATED);return z&&!jL[kt]&&(jL[kt]=!0,console.warn(J(kt," has been deprecated since v"+z+" and will be removed in the near future"))),l?l(mt,kt,Dt):!0}};V4.spelling=function(l){return(z,j)=>(console.warn(`${j} is likely a misspelling of ${l}`),!0)};function QJ(d,l,z){if(typeof d!="object")throw new Qu("options must be an object",Qu.ERR_BAD_OPTION_VALUE);const j=Object.keys(d);let J=j.length;for(;J-- >0;){const mt=j[J],kt=l[mt];if(kt){const Dt=d[mt],$t=Dt===void 0||kt(Dt,mt,d);if($t!==!0)throw new Qu("option "+mt+" must be "+$t,Qu.ERR_BAD_OPTION_VALUE);continue}if(z!==!0)throw new Qu("Unknown option "+mt,Qu.ERR_BAD_OPTION)}}const X5={assertOptions:QJ,validators:V4},rg=X5.validators;let ky=class{constructor(l){this.defaults=l||{},this.interceptors={request:new EL,response:new EL}}async request(l,z){try{return await this._request(l,z)}catch(j){if(j instanceof Error){let J={};Error.captureStackTrace?Error.captureStackTrace(J):J=new Error;const mt=J.stack?J.stack.replace(/^.+\n/,""):"";try{j.stack?mt&&!String(j.stack).endsWith(mt.replace(/^.+\n.+\n/,""))&&(j.stack+=` -`+mt):j.stack=mt}catch{}}throw j}}_request(l,z){typeof l=="string"?(z=z||{},z.url=l):z=l||{},z=Sy(this.defaults,z);const{transitional:j,paramsSerializer:J,headers:mt}=z;j!==void 0&&X5.assertOptions(j,{silentJSONParsing:rg.transitional(rg.boolean),forcedJSONParsing:rg.transitional(rg.boolean),clarifyTimeoutError:rg.transitional(rg.boolean)},!1),J!=null&&(to.isFunction(J)?z.paramsSerializer={serialize:J}:X5.assertOptions(J,{encode:rg.function,serialize:rg.function},!0)),z.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?z.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:z.allowAbsoluteUrls=!0),X5.assertOptions(z,{baseUrl:rg.spelling("baseURL"),withXsrfToken:rg.spelling("withXSRFToken")},!0),z.method=(z.method||this.defaults.method||"get").toLowerCase();let kt=mt&&to.merge(mt.common,mt[z.method]);mt&&to.forEach(["delete","get","head","post","put","patch","common"],Ir=>{delete mt[Ir]}),z.headers=P0.concat(kt,mt);const Dt=[];let $t=!0;this.interceptors.request.forEach(function(Pr){typeof Pr.runWhen=="function"&&Pr.runWhen(z)===!1||($t=$t&&Pr.synchronous,Dt.unshift(Pr.fulfilled,Pr.rejected))});const ee=[];this.interceptors.response.forEach(function(Pr){ee.push(Pr.fulfilled,Pr.rejected)});let pe,Be=0,ir;if(!$t){const Ir=[NL.bind(this),void 0];for(Ir.unshift(...Dt),Ir.push(...ee),ir=Ir.length,pe=Promise.resolve(z);Be{if(!j._listeners)return;let mt=j._listeners.length;for(;mt-- >0;)j._listeners[mt](J);j._listeners=null}),this.promise.then=J=>{let mt;const kt=new Promise(Dt=>{j.subscribe(Dt),mt=Dt}).then(J);return kt.cancel=function(){j.unsubscribe(mt)},kt},l(function(mt,kt,Dt){j.reason||(j.reason=new k_(mt,kt,Dt),z(j.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const z=this._listeners.indexOf(l);z!==-1&&this._listeners.splice(z,1)}toAbortSignal(){const l=new AbortController,z=j=>{l.abort(j)};return this.subscribe(z),l.signal.unsubscribe=()=>this.unsubscribe(z),l.signal}static source(){let l;return{token:new wO(function(J){l=J}),cancel:l}}};function eQ(d){return function(z){return d.apply(null,z)}}function rQ(d){return to.isObject(d)&&d.isAxiosError===!0}const pA={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pA).forEach(([d,l])=>{pA[l]=d});function kO(d){const l=new ky(d),z=tO(ky.prototype.request,l);return to.extend(z,ky.prototype,l,{allOwnKeys:!0}),to.extend(z,l,null,{allOwnKeys:!0}),z.create=function(J){return kO(Sy(d,J))},z}const Td=kO(ow);Td.Axios=ky;Td.CanceledError=k_;Td.CancelToken=tQ;Td.isCancel=mO;Td.VERSION=bO;Td.toFormData=U4;Td.AxiosError=Qu;Td.Cancel=Td.CanceledError;Td.all=function(l){return Promise.all(l)};Td.spread=eQ;Td.isAxiosError=rQ;Td.mergeConfig=Sy;Td.AxiosHeaders=P0;Td.formToJSON=d=>pO(to.isHTMLForm(d)?new FormData(d):d);Td.getAdapter=_O.getAdapter;Td.HttpStatusCode=pA;Td.default=Td;const{Axios:zvt,AxiosError:Ivt,CanceledError:Ovt,isCancel:Dvt,CancelToken:Fvt,VERSION:Rvt,all:Bvt,Cancel:Nvt,isAxiosError:jvt,spread:Uvt,toFormData:Vvt,AxiosHeaders:Hvt,HttpStatusCode:Wvt,formToJSON:qvt,getAdapter:Zvt,mergeConfig:$vt}=Td,nQ="/api",iQ="",aQ=nQ,oQ=iQ,vy=Td.create({baseURL:aQ,timeout:5e3,headers:{"Content-Type":"application/json"}});vy.interceptors.request.use(d=>d,d=>(console.error("API Request Error:",d),Promise.reject(d)));vy.interceptors.response.use(d=>d,d=>(console.error("API Response Error:",d.response?.data||d.message),Promise.reject(d)));class Ah{static async get(l,z){try{return(await vy.get(l,{params:z})).data}catch(j){throw this.handleError(j)}}static async post(l,z,j){try{return(await vy.post(l,z,j)).data}catch(J){throw this.handleError(J)}}static async put(l,z,j){try{return(await vy.put(l,z,j)).data}catch(J){throw this.handleError(J)}}static async delete(l,z){try{return(await vy.delete(l,z)).data}catch(j){throw this.handleError(j)}}static async getTransportKeys(){return this.get("transport_keys")}static async createTransportKey(l,z,j,J,mt){const kt={name:l,flood_policy:z,parent_id:J,last_used:mt};return j!==void 0&&(kt.transport_key=j),this.post("transport_keys",kt)}static async getTransportKey(l){return this.get(`transport_key/${l}`)}static async updateTransportKey(l,z,j,J,mt,kt){return this.put(`transport_key/${l}`,{name:z,flood_policy:j,transport_key:J,parent_id:mt,last_used:kt})}static async deleteTransportKey(l){return this.delete(`transport_key/${l}`)}static async updateGlobalFloodPolicy(l){return this.post("global_flood_policy",{global_flood_allow:l})}static async getLogs(){try{return(await vy.get("logs")).data}catch(l){throw this.handleError(l)}}static async deleteAdvert(l){return this.delete(`advert/${l}`)}static async pingNeighbor(l){return this.post("ping_neighbor",l)}static handleError(l){if(Td.isAxiosError(l)){if(l.response){const z=l.response.data?.error||l.response.data?.message||`HTTP ${l.response.status}`;return new Error(z)}else if(l.request)return new Error("Network error - no response received")}return new Error(l instanceof Error?l.message:"Unknown error occurred")}}const gg=YA("system",()=>{const d=ro(null),l=ro(!1),z=ro(null),j=ro(null),J=ro("forward"),mt=ro(!0),kt=ro(0),Dt=ro(10),$t=ro(!1),ee=Ko(()=>d.value?.config?.node_name??"Unknown"),pe=Ko(()=>{const zi=d.value?.public_key;return!zi||zi==="Unknown"?"Unknown":zi.length>=16?`${zi.slice(0,8)} ... ${zi.slice(-8)}`:`${zi}`}),Be=Ko(()=>d.value!==null),ir=Ko(()=>d.value?.version??"Unknown"),vr=Ko(()=>d.value?.core_version??"Unknown"),Ir=Ko(()=>d.value?.noise_floor_dbm??null),Pr=Ko(()=>Dt.value>0?Math.min(kt.value/Dt.value*100,100):0),Wr=Ko(()=>J.value==="monitor"?{text:"Monitor Mode",title:"Monitoring only - not forwarding packets"}:mt.value?{text:"Active",title:"Forwarding with duty cycle enforcement"}:{text:"No Limits",title:"Forwarding without duty cycle enforcement"}),Tn=Ko(()=>J.value==="monitor"?{active:!1,warning:!0}:{active:!0,warning:!1}),Ft=Ko(()=>mt.value?{active:!0,warning:!1}:{active:!1,warning:!0}),wn=zi=>{$t.value=zi};async function ei(){try{l.value=!0,z.value=null;const zi=await Ah.get("/stats");if(zi.success&&zi.data)return d.value=zi.data,j.value=new Date,jn(zi.data),zi.data;if(zi&&"version"in zi){const ia=zi;return d.value=ia,j.value=new Date,jn(ia),ia}else throw new Error(zi.error||"Failed to fetch stats")}catch(zi){throw z.value=zi instanceof Error?zi.message:"Unknown error occurred",console.error("Error fetching stats:",zi),zi}finally{l.value=!1}}function jn(zi){if(zi.config){const Ua=zi.config.repeater?.mode;(Ua==="forward"||Ua==="monitor")&&(J.value=Ua);const qi=zi.config.duty_cycle;if(qi){mt.value=qi.enforcement_enabled!==!1;const Ei=qi.max_airtime_percent;typeof Ei=="number"?Dt.value=Ei:Ei&&typeof Ei=="object"&&"parsedValue"in Ei&&(Dt.value=Ei.parsedValue||10)}}const ia=zi.utilization_percent;typeof ia=="number"?kt.value=ia:ia&&typeof ia=="object"&&"parsedValue"in ia&&(kt.value=ia.parsedValue||0)}async function ai(zi){try{const ia=await Ah.post("/set_mode",{mode:zi});if(ia.success)return J.value=zi,!0;throw new Error(ia.error||"Failed to set mode")}catch(ia){throw z.value=ia instanceof Error?ia.message:"Unknown error occurred",console.error("Error setting mode:",ia),ia}}async function Qi(zi){try{const ia=await Ah.post("/set_duty_cycle",{enabled:zi});if(ia.success)return mt.value=zi,!0;throw new Error(ia.error||"Failed to set duty cycle")}catch(ia){throw z.value=ia instanceof Error?ia.message:"Unknown error occurred",console.error("Error setting duty cycle:",ia),ia}}async function Gi(){try{const zi=await Ah.post("/send_advert",{},{timeout:1e4});if(zi.success)return console.log("Advertisement sent successfully:",zi.data),!0;throw new Error(zi.error||"Failed to send advert")}catch(zi){throw z.value=zi instanceof Error?zi.message:"Unknown error occurred",console.error("Error sending advert:",zi),zi}}async function En(){const zi=J.value==="forward"?"monitor":"forward";return await ai(zi)}async function Fa(){return await Qi(!mt.value)}async function Sa(zi=5e3){await ei();const ia=setInterval(async()=>{try{await ei()}catch(Ua){console.error("Auto-refresh error:",Ua)}},zi);return()=>clearInterval(ia)}function Ni(){d.value=null,z.value=null,j.value=null,l.value=!1,J.value="forward",mt.value=!0,kt.value=0,Dt.value=10}return{stats:d,isLoading:l,error:z,lastUpdated:j,currentMode:J,dutyCycleEnabled:mt,dutyCycleUtilization:kt,dutyCycleMax:Dt,cadCalibrationRunning:$t,nodeName:ee,pubKey:pe,hasStats:Be,version:ir,coreVersion:vr,noiseFloorDbm:Ir,dutyCyclePercentage:Pr,statusBadge:Wr,modeButtonState:Tn,dutyCycleButtonState:Ft,fetchStats:ei,setMode:ai,setDutyCycle:Qi,sendAdvert:Gi,toggleMode:En,toggleDutyCycle:Fa,startAutoRefresh:Sa,reset:Ni,setCadCalibrationRunning:wn}}),hd=(d,l)=>{const z=d.__vccOpts||d;for(const[j,J]of l)z[j]=J;return z},sQ={},lQ={width:"23",height:"25",viewBox:"0 0 23 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function uQ(d,l){return Si(),Fi("svg",lQ,l[0]||(l[0]=[Oe("path",{d:"M2.84279 2.25795C2.90709 1.12053 3.17879 0.625914 3.95795 0.228723C4.79631 -0.198778 6.11858 0.000168182 7.67449 0.788054C8.34465 1.12757 8.41289 1.13448 9.58736 0.983905C11.1485 0.783681 13.1582 0.784388 14.5991 0.985738C15.6887 1.13801 15.7603 1.1304 16.4321 0.790174C18.6406 -0.328212 20.3842 -0.255036 21.0156 0.982491C21.3308 1.6002 21.3893 3.20304 21.1449 4.52503C21.0094 5.25793 21.0238 5.34943 21.3502 5.83037C23.6466 9.21443 21.9919 14.6998 18.0569 16.7469C17.7558 16.9036 17.502 17.0005 17.2952 17.0795C16.6602 17.3219 16.4674 17.3956 16.7008 18.5117C16.8132 19.0486 16.9486 20.3833 17.0018 21.478C17.098 23.4567 17.0966 23.4705 16.7495 23.8742C16.2772 24.4233 15.5963 24.4326 15.135 23.8962C14.8341 23.5464 14.8047 23.3812 14.8047 22.0315C14.8047 20.037 14.5861 18.7113 14.0695 17.5753C13.4553 16.2235 13.9106 15.7194 15.3154 15.4173C17.268 14.9973 18.793 13.7923 19.643 11.9978C20.4511 10.2921 20.5729 7.93485 19.1119 6.50124C18.6964 6.00746 18.6674 5.56022 18.9641 4.21159C19.075 3.70754 19.168 3.05725 19.1707 2.76637C19.1749 2.30701 19.1331 2.23764 18.8509 2.23764C18.6724 2.23764 17.9902 2.49736 17.3352 2.81474L16.2897 3.32145C16.1947 3.36751 16.0883 3.38522 15.9834 3.37318C13.3251 3.06805 10.7991 3.06334 8.12774 3.37438C8.02244 3.38663 7.91563 3.36892 7.82025 3.32263L6.77535 2.81559C6.12027 2.49764 5.43813 2.23764 5.25963 2.23764C4.84693 2.23764 4.84072 2.54233 5.2169 4.35258C5.44669 5.45816 5.60133 5.70451 4.93703 6.58851C3.94131 7.91359 3.69258 9.55902 4.22654 11.2878C4.89952 13.4664 6.54749 14.9382 8.86436 15.4292C10.261 15.7253 10.6261 16.1115 10.0928 17.713C9.67293 18.9734 9.40748 19.2982 8.79738 19.2982C7.97649 19.2982 7.46228 18.5871 7.74527 17.843C7.86991 17.5151 7.83283 17.4801 7.06383 17.1996C4.71637 16.3437 2.9209 14.4254 2.10002 11.8959C1.46553 9.94098 1.74471 7.39642 2.76257 5.85843C3.10914 5.33477 3.1145 5.29036 2.95277 4.28787C2.86126 3.72037 2.81177 2.80699 2.84279 2.25795Z",fill:"white"},null,-1),Oe("path",{d:"M2.02306 16.5589C1.68479 16.0516 0.999227 15.9144 0.491814 16.2527C-0.0155884 16.591 -0.152708 17.2765 0.185564 17.7839C0.435301 18.1586 0.734065 18.4663 0.987777 18.72C1.03455 18.7668 1.08 18.8119 1.12438 18.856C1.3369 19.0671 1.52455 19.2535 1.71302 19.4748C2.12986 19.964 2.54572 20.623 2.78206 21.8047C2.88733 22.3311 3.26569 22.6147 3.47533 22.7386C3.70269 22.8728 3.9511 22.952 4.15552 23.0036C4.57369 23.109 5.08133 23.1638 5.56309 23.1957C6.09196 23.2308 6.665 23.2422 7.17743 23.2453C7.1778 23.8547 7.67202 24.3487 8.28162 24.3487C8.89146 24.3487 9.38582 23.8543 9.38582 23.2445V22.1403C9.38582 21.5305 8.89146 21.0361 8.28162 21.0361C8.17753 21.0361 8.06491 21.0364 7.94562 21.0369C7.29761 21.0389 6.45295 21.0414 5.70905 20.9922C5.35033 20.9684 5.05544 20.9347 4.8392 20.8936C4.50619 19.5863 3.96821 18.7165 3.39415 18.0426C3.14038 17.7448 2.87761 17.4842 2.66387 17.2722C2.62385 17.2326 2.58556 17.1946 2.54935 17.1584C2.30273 16.9118 2.1414 16.7365 2.02306 16.5589Z",fill:"white"},null,-1)]))}const cQ=hd(sQ,[["render",uQ]]),hQ={},fQ={width:"17",height:"24",viewBox:"0 0 17 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dQ(d,l){return Si(),Fi("svg",fQ,l[0]||(l[0]=[Af('',12)]))}const pQ=hd(hQ,[["render",dQ]]),sw=YA("packets",()=>{const d=ro(null),l=ro(null),z=ro([]),j=ro([]),J=ro(null),mt=ro(!1),kt=ro(null),Dt=ro(null),$t=ro([]),ee=ro([]),pe=Ko(()=>d.value!==null),Be=Ko(()=>l.value!==null),ir=Ko(()=>z.value.length>0),vr=Ko(()=>j.value.length>0),Ir=Ko(()=>J.value?.avg_noise_floor??0),Pr=Ko(()=>d.value?.total_packets??0),Wr=Ko(()=>d.value?.avg_rssi??0),Tn=Ko(()=>d.value?.avg_snr??0),Ft=Ko(()=>l.value?.uptime_seconds??0),wn=Ko(()=>{if(!d.value?.packet_types)return[];const qi=d.value.packet_types,Ei=qi.reduce((Va,us)=>Va+us.count,0);return qi.map(Va=>({type:Va.type.toString(),count:Va.count,percentage:Ei>0?Va.count/Ei*100:0}))}),ei=Ko(()=>{const qi={};return z.value.forEach(Ei=>{qi[Ei.type]||(qi[Ei.type]=[]),qi[Ei.type].push(Ei)}),qi});async function jn(){try{const qi=await Ah.get("/stats");if(qi.success&&qi.data){l.value=qi.data;const Ei=new Date;return ee.value.push({timestamp:Ei,stats:qi.data}),ee.value.length>50&&(ee.value=ee.value.slice(-50)),qi.data}else if(qi&&"version"in qi){const Ei=qi;l.value=Ei;const Va=new Date;return ee.value.push({timestamp:Va,stats:Ei}),ee.value.length>50&&(ee.value=ee.value.slice(-50)),Ei}else throw new Error(qi.error||"Failed to fetch system stats")}catch(qi){throw kt.value=qi instanceof Error?qi.message:"Unknown error occurred",console.error("Error fetching system stats:",qi),qi}}async function ai(qi={hours:24}){try{const Ei=await Ah.get("/noise_floor_history",qi);if(Ei.success&&Ei.data&&Ei.data.history)return j.value=Ei.data.history,Dt.value=new Date,Ei.data.history;throw new Error(Ei.error||"Failed to fetch noise floor history")}catch(Ei){throw kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching noise floor history:",Ei),Ei}}async function Qi(qi={hours:24}){try{const Ei=await Ah.get("/noise_floor_stats",qi);if(Ei.success&&Ei.data&&Ei.data.stats)return J.value=Ei.data.stats,Dt.value=new Date,Ei.data.stats;throw new Error(Ei.error||"Failed to fetch noise floor stats")}catch(Ei){throw kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching noise floor stats:",Ei),Ei}}const Gi=Ko(()=>!j.value||!Array.isArray(j.value)?[]:j.value.slice(-50).map(qi=>qi.noise_floor_dbm));async function En(qi={hours:24}){try{mt.value=!0,kt.value=null;const Ei=await Ah.get("/packet_stats",qi);if(Ei.success&&Ei.data){d.value=Ei.data;const Va=new Date;$t.value.push({timestamp:Va,stats:Ei.data}),$t.value.length>50&&($t.value=$t.value.slice(-50)),Dt.value=Va}else throw new Error(Ei.error||"Failed to fetch packet stats")}catch(Ei){kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching packet stats:",Ei)}finally{mt.value=!1}}async function Fa(qi={limit:100}){try{mt.value=!0,kt.value=null;const Ei=await Ah.get("/recent_packets",qi);if(Ei.success&&Ei.data)z.value=Ei.data,Dt.value=new Date;else throw new Error(Ei.error||"Failed to fetch recent packets")}catch(Ei){kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching recent packets:",Ei)}finally{mt.value=!1}}async function Sa(qi){try{mt.value=!0,kt.value=null;const Ei=await Ah.get("/filtered_packets",qi);if(Ei.success&&Ei.data)return z.value=Ei.data,Dt.value=new Date,Ei.data;throw new Error(Ei.error||"Failed to fetch filtered packets")}catch(Ei){throw kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching filtered packets:",Ei),Ei}finally{mt.value=!1}}async function Ni(qi){try{mt.value=!0,kt.value=null;const Ei=await Ah.get("/packet_by_hash",{packet_hash:qi});if(Ei.success&&Ei.data)return Ei.data;throw new Error(Ei.error||"Packet not found")}catch(Ei){throw kt.value=Ei instanceof Error?Ei.message:"Unknown error occurred",console.error("Error fetching packet by hash:",Ei),Ei}finally{mt.value=!1}}const zi=Ko(()=>{const qi=$t.value,Ei=ee.value;return{totalPackets:qi.map(Va=>Va.stats.total_packets),transmittedPackets:qi.map(Va=>Va.stats.transmitted_packets),droppedPackets:qi.map(Va=>Va.stats.dropped_packets),avgRssi:qi.map(Va=>Va.stats.avg_rssi),uptimeHours:Ei.map(Va=>Math.floor((Va.stats.uptime_seconds||0)/3600))}});async function ia(qi=3e4){await Promise.all([jn(),En(),Fa(),ai({hours:1}),Qi({hours:1})]);const Ei=setInterval(async()=>{try{await Promise.all([jn(),En(),Fa(),ai({hours:1}),Qi({hours:1})])}catch(Va){console.error("Auto-refresh error:",Va)}},qi);return()=>clearInterval(Ei)}function Ua(){d.value=null,l.value=null,z.value=[],j.value=[],J.value=null,$t.value=[],ee.value=[],kt.value=null,Dt.value=null,mt.value=!1}return{packetStats:d,systemStats:l,recentPackets:z,noiseFloorHistory:j,noiseFloorStats:J,packetStatsHistory:$t,systemStatsHistory:ee,isLoading:mt,error:kt,lastUpdated:Dt,hasPacketStats:pe,hasSystemStats:Be,hasRecentPackets:ir,hasNoiseFloorData:vr,currentNoiseFloor:Ir,totalPackets:Pr,averageRSSI:Wr,averageSNR:Tn,uptime:Ft,packetTypeBreakdown:wn,recentPacketsByType:ei,sparklineData:zi,noiseFloorSparklineData:Gi,fetchSystemStats:jn,fetchPacketStats:En,fetchRecentPackets:Fa,fetchFilteredPackets:Sa,getPacketByHash:Ni,fetchNoiseFloorHistory:ai,fetchNoiseFloorStats:Qi,startAutoRefresh:ia,reset:Ua}}),mQ={class:"glass-card-green p-5 relative overflow-hidden"},gQ={key:0,class:"absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-10 rounded-lg"},vQ={class:"flex items-baseline gap-2 mb-8"},yQ={class:"text-primary text-2xl font-medium"},xQ={class:"absolute bottom-0 left-5 w-[196px] h-[30px]",viewBox:"0 0 196 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_Q=["d"],bQ=["d"],wQ=["cy"],kQ=ah({__name:"RFNoiseFloor",setup(d){const l=sw(),z=gg(),j=ro(null),J=pe=>{if(pe.length<2)return"";const Be=196,ir=30,vr=4,Ir=-125,Wr=-105-Ir;let Tn="";return pe.forEach((Ft,wn)=>{const ei=wn/(pe.length-1)*Be,jn=(Ft-Ir)/Wr,ai=ir-jn*(ir-vr*2)-vr;if(wn===0)Tn+=`M ${ei} ${ai}`;else{const Gi=((wn-1)/(pe.length-1)*Be+ei)/2;Tn+=` Q ${Gi} ${ai} ${ei} ${ai}`}}),Tn},mt=async()=>{try{await Promise.all([l.fetchNoiseFloorHistory({hours:1}),l.fetchNoiseFloorStats({hours:1})])}catch(pe){console.error("Error fetching noise floor data:",pe)}};i0(()=>{mt(),j.value=window.setInterval(mt,5e3)}),mg(()=>{j.value&&clearInterval(j.value)});const kt=Ko(()=>{const pe=l.noiseFloorSparklineData;return pe&&pe.length>0?pe[pe.length-1]:l.noiseFloorStats?.avg_noise_floor??-116}),Dt=Ko(()=>l.noiseFloorSparklineData),$t=Ko(()=>J(Dt.value)),ee=Ko(()=>{if(Dt.value.length===0)return 15;const pe=Dt.value[Dt.value.length-1],Be=-125,vr=-105-Be;return 30-(pe-Be)/vr*22-4});return(pe,Be)=>(Si(),Fi("div",mQ,[Ju(z).cadCalibrationRunning?(Si(),Fi("div",gQ,Be[0]||(Be[0]=[Af('
CAD Calibration

In Progress

',1)]))):ps("",!0),Be[4]||(Be[4]=Oe("p",{class:"text-dark-text text-xs uppercase mb-2"},"RF NOISE FLOOR",-1)),Oe("div",vQ,[Oe("span",yQ,na(kt.value),1),Be[1]||(Be[1]=Oe("span",{class:"text-dark-text text-xs uppercase"},"dBm",-1))]),(Si(),Fi("svg",xQ,[Be[3]||(Be[3]=Af('',1)),Dt.value.length>1?(Si(),Fi("path",{key:0,d:`${$t.value} L 196 30 L 0 30 Z`,fill:"url(#rf-noise-gradient)",class:"transition-all duration-500 ease-out"},null,8,_Q)):ps("",!0),Dt.value.length>1?(Si(),Fi("path",{key:1,d:$t.value,stroke:"#B1FFFF","stroke-width":"2",fill:"none",filter:"url(#line-glow)",class:"transition-all duration-500 ease-out"},null,8,bQ)):ps("",!0),Dt.value.length>0?(Si(),Fi("circle",{key:2,cx:196,cy:ee.value,r:"2",fill:"#B1FFFF",class:"animate-pulse"},Be[2]||(Be[2]=[Oe("animate",{attributeName:"r",values:"2;3;2",dur:"2s",repeatCount:"indefinite"},null,-1)]),8,wQ)):ps("",!0)]))]))}}),TQ=hd(kQ,[["__scopeId","data-v-ad12b3cb"]]),AQ={},MQ={width:"800px",height:"800px",viewBox:"0 -1.5 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"w-full h-full"};function SQ(d,l){return Si(),Fi("svg",MQ,l[0]||(l[0]=[Oe("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[Oe("g",{transform:"translate(-420.000000, -3641.000000)",fill:"currentColor"},[Oe("g",{id:"icons",transform:"translate(56.000000, 160.000000)"},[Oe("path",{d:"M378.195439,3483.828 L376.781439,3485.242 C378.195439,3486.656 378.294439,3489.588 376.880439,3491.002 L378.294439,3492.417 C380.415439,3490.295 380.316439,3485.949 378.195439,3483.828 M381.023439,3481 L379.609439,3482.414 C382.438439,3485.242 382.537439,3491.002 379.708439,3493.831 L381.122439,3495.245 C385.365439,3491.002 384.559439,3484.535 381.023439,3481 M375.432439,3486.737 C375.409439,3486.711 375.392439,3486.682 375.367439,3486.656 L375.363439,3486.66 C374.582439,3485.879 373.243439,3485.952 372.536439,3486.659 C371.829439,3487.366 371.831439,3488.778 372.538439,3489.485 C372.547439,3489.494 372.558439,3489.499 372.567439,3489.508 C372.590439,3489.534 372.607439,3489.563 372.632439,3489.588 L372.636439,3489.585 C373.201439,3490.15 373.000439,3488.284 373.000439,3498 L375.000439,3498 C375.000439,3488.058 374.753439,3490.296 375.463439,3489.586 C376.170439,3488.879 376.168439,3487.467 375.461439,3486.76 C375.452439,3486.751 375.441439,3486.746 375.432439,3486.737 M371.119439,3485.242 L369.705439,3483.828 C367.584439,3485.949 367.683439,3490.295 369.804439,3492.417 L371.218439,3491.002 C369.804439,3489.588 369.705439,3486.656 371.119439,3485.242 M368.390439,3493.831 L366.976439,3495.245 C363.440439,3491.709 362.634439,3485.242 366.877439,3481 L368.291439,3482.414 C365.462439,3485.242 365.561439,3491.002 368.390439,3493.831",id:"radio_tower-[#1019]"})])])],-1)]))}const EQ=hd(AQ,[["render",SQ]]),CQ={class:"text-center"},LQ={class:"relative flex items-center justify-center mb-8"},PQ={class:"relative w-32 h-32"},zQ={class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"},IQ={key:0,class:"absolute inset-0 flex items-center justify-center"},OQ={key:1,class:"absolute inset-0 flex items-center justify-center"},DQ={key:2,class:"absolute inset-0"},FQ={class:"mb-6"},RQ={key:0,class:"text-white text-lg"},BQ={key:1,class:"text-accent-green text-lg font-medium"},NQ={key:2,class:"text-secondary text-lg"},jQ={key:3,class:"text-accent-red text-lg"},UQ={key:4,class:"text-dark-text"},VQ={key:5,class:"mt-3"},HQ={key:0,class:"text-secondary text-sm"},WQ={key:1,class:"text-accent-red text-sm"},qQ={key:0,class:"flex gap-3"},ZQ={key:1,class:"text-dark-text text-sm"},$Q=ah({name:"AdvertModal",__name:"AdvertModal",props:{isOpen:{type:Boolean},isLoading:{type:Boolean},isSuccess:{type:Boolean},error:{default:null}},emits:["close","send"],setup(d,{emit:l}){const z=d,j=l,J=ro(!1),mt=ro(!1),kt=ro(!1);fm(()=>z.isOpen,pe=>{pe?(J.value=!0,setTimeout(()=>{mt.value=!0},50)):(mt.value=!1,kt.value=!1,setTimeout(()=>{J.value=!1},300))},{immediate:!0}),fm(()=>z.isLoading,pe=>{pe||setTimeout(()=>{kt.value=!1},1e3)});const Dt=()=>{z.isLoading||j("close")},$t=()=>{z.isLoading||(kt.value=!0,j("send"))},ee=pe=>pe?.includes("Network error - no response received")||pe?.includes("timeout");return(pe,Be)=>(Si(),K0(jA,{to:"body"},[J.value?(Si(),Fi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:zm(Dt,["self"])},[Oe("div",{class:Xs(["absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-300",mt.value?"opacity-100":"opacity-0"])},null,2),Oe("div",{class:Xs(["relative glass-card rounded-[20px] p-8 max-w-md w-full transform transition-all duration-300",mt.value?"scale-100 opacity-100":"scale-95 opacity-0"])},[pe.isLoading?ps("",!0):(Si(),Fi("button",{key:0,onClick:Dt,class:"absolute top-4 right-4 text-dark-text hover:text-white transition-colors p-2"},Be[0]||(Be[0]=[Oe("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))),Oe("div",CQ,[Be[6]||(Be[6]=Oe("h2",{class:"text-white text-xl font-semibold mb-6"},"Send Advertisement",-1)),Oe("div",LQ,[Oe("div",PQ,[Oe("div",zQ,[uu(EQ,{class:Xs(["w-16 h-16 transition-all duration-500",[pe.isLoading?"animate-pulse":"",pe.isSuccess?"text-accent-green":pe.error&&!ee(pe.error)?"text-accent-red":"text-primary"]]),style:pg({filter:pe.isLoading?"drop-shadow(0 0 8px currentColor)":pe.isSuccess?"drop-shadow(0 0 8px #A5E5B6)":pe.error&&!ee(pe.error)?"drop-shadow(0 0 8px #FB787B)":"drop-shadow(0 0 4px #AAE8E8)"})},null,8,["class","style"])]),pe.isLoading||pe.isSuccess?(Si(),Fi("div",IQ,[Oe("div",{class:Xs(["absolute w-16 h-16 rounded-full border-2 animate-ping",[pe.isSuccess?"border-accent-green/60":"border-primary/60"]]),style:{"animation-duration":"1.5s"}},null,2),Oe("div",{class:Xs(["absolute w-24 h-24 rounded-full border-2 animate-ping",[pe.isSuccess?"border-accent-green/40":"border-primary/40"]]),style:{"animation-duration":"2s","animation-delay":"0.3s"}},null,2),Oe("div",{class:Xs(["absolute w-32 h-32 rounded-full border-2 animate-ping",[pe.isSuccess?"border-accent-green/20":"border-primary/20"]]),style:{"animation-duration":"2.5s","animation-delay":"0.6s"}},null,2)])):ps("",!0),kt.value?(Si(),Fi("div",OQ,Be[1]||(Be[1]=[Oe("div",{class:"absolute w-8 h-8 rounded-full border-4 border-secondary animate-ping-fast"},null,-1),Oe("div",{class:"absolute w-16 h-16 rounded-full border-3 border-secondary/70 animate-ping-fast",style:{"animation-delay":"0.1s"}},null,-1),Oe("div",{class:"absolute w-24 h-24 rounded-full border-2 border-secondary/50 animate-ping-fast",style:{"animation-delay":"0.2s"}},null,-1),Oe("div",{class:"absolute w-32 h-32 rounded-full border-2 border-secondary/30 animate-ping-fast",style:{"animation-delay":"0.3s"}},null,-1)]))):ps("",!0),pe.isLoading||pe.isSuccess?(Si(),Fi("div",DQ,[Oe("div",{class:Xs(["absolute top-2 right-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[pe.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"0.5s"}},Be[2]||(Be[2]=[Oe("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Oe("div",{class:Xs(["absolute bottom-2 left-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[pe.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1s"}},Be[3]||(Be[3]=[Oe("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Oe("div",{class:Xs(["absolute top-1/2 right-1 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[pe.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1.5s",transform:"translateY(-50%)"}},Be[4]||(Be[4]=[Oe("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Oe("div",{class:Xs(["absolute top-3 left-3 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[pe.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"2s"}},Be[5]||(Be[5]=[Oe("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2)])):ps("",!0)])]),Oe("div",FQ,[pe.isLoading?(Si(),Fi("p",RQ," Broadcasting advertisement... ")):pe.isSuccess?(Si(),Fi("p",BQ," Advertisement sent successfully! ")):pe.error&&ee(pe.error)?(Si(),Fi("p",NQ," Advertisement likely sent ")):pe.error?(Si(),Fi("p",jQ," Failed to send advertisement ")):(Si(),Fi("p",UQ," This will broadcast your node's presence to nearby nodes. ")),pe.error?(Si(),Fi("div",VQ,[ee(pe.error)?(Si(),Fi("p",HQ," Network timeout occurred, but the advertisement may have been successfully transmitted to nearby nodes. ")):(Si(),Fi("p",WQ,na(pe.error),1))])):ps("",!0)]),!pe.isLoading&&!pe.isSuccess?(Si(),Fi("div",qQ,[Oe("button",{onClick:Dt,class:"flex-1 glass-card border border-dark-border hover:border-primary rounded-[10px] px-6 py-3 text-dark-text hover:text-white transition-all duration-200"}," Cancel "),Oe("button",{onClick:$t,class:Xs(["flex-1 rounded-[10px] px-6 py-3 font-medium transition-all duration-200 shadow-lg",[pe.error&&ee(pe.error)?"bg-secondary hover:bg-secondary/90 text-dark-bg hover:shadow-secondary/20":"bg-primary hover:bg-primary/90 text-dark-bg hover:shadow-primary/20"]])},na(pe.error&&ee(pe.error)?"Try Again":"Send Advertisement"),3)])):ps("",!0),pe.isSuccess?(Si(),Fi("div",ZQ," Closing automatically... ")):ps("",!0)])],2)])):ps("",!0)]))}}),GQ=hd($Q,[["__scopeId","data-v-a5eb8c7f"]]),YQ={},KQ={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function XQ(d,l){return Si(),Fi("svg",KQ,l[0]||(l[0]=[Af('',2)]))}const TO=hd(YQ,[["render",XQ]]),JQ={},QQ={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ttt(d,l){return Si(),Fi("svg",QQ,l[0]||(l[0]=[Af('',9)]))}const AO=hd(JQ,[["render",ttt]]),ett={},rtt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ntt(d,l){return Si(),Fi("svg",rtt,l[0]||(l[0]=[Af('',2)]))}const MO=hd(ett,[["render",ntt]]),itt={},att={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ott(d,l){return Si(),Fi("svg",att,l[0]||(l[0]=[Oe("path",{d:"M9.81633 1.99133L8.5085 0.683492C8.29229 0.466088 8.03511 0.293723 7.75185 0.176372C7.46859 0.059021 7.16486 -0.000985579 6.85825 -0.000175002H1.75C1.28587 -0.000175002 0.840752 0.184199 0.512563 0.512388C0.184375 0.840577 0 1.2857 0 1.74983V13.9998H10.5V3.64099C10.4985 3.02248 10.2528 2.4296 9.81633 1.99133ZM8.9915 2.81616C9.02083 2.84799 9.04829 2.88149 9.07375 2.91649H7.58333V1.42608C7.61834 1.45153 7.65184 1.479 7.68367 1.50833L8.9915 2.81616ZM1.16667 12.8332V1.74983C1.16667 1.59512 1.22812 1.44674 1.33752 1.33735C1.44692 1.22795 1.59529 1.16649 1.75 1.16649H6.41667V4.08316H9.33333V12.8332H1.16667ZM2.33333 9.33316H8.16667V5.83316H2.33333V9.33316ZM3.5 6.99983H7V8.16649H3.5V6.99983ZM2.33333 10.4998H8.16667V11.6665H2.33333V10.4998Z",fill:"white"},null,-1)]))}const SO=hd(itt,[["render",ott]]),stt={},ltt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function utt(d,l){return Si(),Fi("svg",ltt,l[0]||(l[0]=[Af('',2)]))}const EO=hd(stt,[["render",utt]]),ctt={},htt={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ftt(d,l){return Si(),Fi("svg",htt,l[0]||(l[0]=[Oe("path",{d:"M10.5 14.0004H9.33333V11.0586C9.33287 10.6013 9.15099 10.1628 8.82761 9.83942C8.50422 9.51603 8.06575 9.33415 7.60842 9.33369H2.89158C2.43425 9.33415 1.99578 9.51603 1.67239 9.83942C1.34901 10.1628 1.16713 10.6013 1.16667 11.0586V14.0004H0V11.0586C0.000926233 10.292 0.305872 9.55705 0.847948 9.01497C1.39002 8.47289 2.12497 8.16795 2.89158 8.16702H7.60842C8.37503 8.16795 9.10998 8.47289 9.65205 9.01497C10.1941 9.55705 10.4991 10.292 10.5 11.0586V14.0004Z",fill:"white"},null,-1),Oe("path",{d:"M5.25 6.99997C4.55777 6.99997 3.88108 6.7947 3.30551 6.41011C2.72993 6.02553 2.28133 5.4789 2.01642 4.83936C1.75152 4.19982 1.6822 3.49609 1.81725 2.81716C1.9523 2.13822 2.28564 1.51458 2.77513 1.0251C3.26461 0.535614 3.88825 0.202271 4.56719 0.0672226C5.24612 -0.0678257 5.94985 0.00148598 6.58939 0.266393C7.22894 0.531299 7.77556 0.979903 8.16015 1.55548C8.54473 2.13105 8.75 2.80774 8.75 3.49997C8.74908 4.42794 8.38003 5.31765 7.72385 5.97382C7.06768 6.63 6.17798 6.99904 5.25 6.99997ZM5.25 1.16664C4.78851 1.16664 4.33739 1.30349 3.95367 1.55988C3.56996 1.81627 3.27089 2.18068 3.09428 2.60704C2.91768 3.0334 2.87147 3.50256 2.9615 3.95518C3.05153 4.4078 3.27376 4.82357 3.60009 5.14989C3.92641 5.47621 4.34217 5.69844 4.79479 5.78847C5.24741 5.8785 5.71657 5.83229 6.14293 5.65569C6.56929 5.47909 6.93371 5.18002 7.1901 4.7963C7.44649 4.41259 7.58334 3.96146 7.58334 3.49997C7.58334 2.88113 7.3375 2.28764 6.89992 1.85006C6.46233 1.41247 5.86884 1.16664 5.25 1.16664Z",fill:"white"},null,-1)]))}const CO=hd(ctt,[["render",ftt]]),dtt={},ptt={width:"11",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mtt(d,l){return Si(),Fi("svg",ptt,l[0]||(l[0]=[Oe("path",{d:"M6.77889 9.16667H10.1122V12.5M4.11222 3.83333H0.77889V0.5M10.3906 4.50227C10.0168 3.57711 9.39097 2.77536 8.58423 2.18815C7.77749 1.60094 6.82233 1.25168 5.82707 1.18034C4.8318 1.109 3.83627 1.31827 2.95402 1.78441C2.07177 2.25055 1.3381 2.95503 0.836182 3.81742M0.500244 8.49805C0.874034 9.42321 1.49986 10.225 2.30661 10.8122C3.11335 11.3994 4.06948 11.7482 5.06474 11.8195C6.06001 11.8909 7.05473 11.6816 7.93697 11.2155C8.81922 10.7494 9.55239 10.045 10.0543 9.18262",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const gtt=hd(dtt,[["render",mtt]]),vtt={},ytt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xtt(d,l){return Si(),Fi("svg",ytt,l[0]||(l[0]=[Af('',2)]))}const _tt=hd(vtt,[["render",xtt]]),btt={class:"w-[285px] flex-shrink-0 p-[15px] hidden lg:block"},wtt={class:"glass-card h-full p-6"},ktt={class:"mb-12"},Ttt={class:"text-[#C3C3C3] text-sm"},Att=["title"],Mtt={class:"text-[#C3C3C3] text-sm mt-1"},Stt={class:"mb-8"},Ett={class:"mb-8"},Ctt={class:"space-y-2"},Ltt=["onClick"],Ptt={class:"mb-8"},ztt={class:"space-y-2"},Itt=["onClick"],Ott=["disabled"],Dtt={class:"flex items-center gap-3"},Ftt=["disabled"],Rtt={class:"flex items-center gap-3"},Btt={class:"mb-4"},Ntt={class:"flex items-center gap-2"},jtt={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},Utt={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},Vtt={key:0,class:"mb-4"},Htt={class:"text-dark-text text-xs mb-2"},Wtt={class:"text-white"},qtt={class:"w-full h-1 bg-white/10 rounded-full overflow-hidden"},Ztt={class:"flex items-center justify-between"},$tt={class:"flex items-center gap-2 text-dark-text text-xs"},Gtt={class:"flex items-center gap-2"},Ytt={href:"https://github.com/rightup",target:"_blank",class:"inline-block"},Ktt={href:"https://buymeacoffee.com/rightup",target:"_blank",class:"inline-block"},Xtt=ah({name:"SidebarNav",__name:"Sidebar",setup(d){const l=JI(),z=QI(),j=gg(),J=ro(!1),mt=ro(!1),kt=ro(!1),Dt=ro(!1),$t=ro(!1),ee=ro(null);let pe=null;i0(async()=>{pe=await j.startAutoRefresh(5e3)}),b_(()=>{pe&&pe()});const Be={dashboard:AO,neighbors:CO,statistics:EO,configuration:TO,logs:SO,help:MO},ir=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],vr=Ko(()=>jn=>z.path===jn),Ir=jn=>{l.push(jn)},Pr=async()=>{J.value=!0,ee.value=null;try{await j.sendAdvert(),$t.value=!0,setTimeout(()=>{Wr()},2e3)}catch(jn){ee.value=jn instanceof Error?jn.message:"Unknown error occurred",console.error("Failed to send advert:",jn)}finally{J.value=!1}},Wr=()=>{Dt.value=!1,$t.value=!1,ee.value=null,J.value=!1},Tn=async()=>{if(!mt.value){mt.value=!0;try{await j.toggleMode()}catch(jn){console.error("Failed to toggle mode:",jn)}finally{mt.value=!1}}},Ft=async()=>{if(!kt.value){kt.value=!0;try{await j.toggleDutyCycle()}catch(jn){console.error("Failed to toggle duty cycle:",jn)}finally{kt.value=!1}}},wn=ro(new Date().toLocaleTimeString());setInterval(()=>{wn.value=new Date().toLocaleTimeString()},1e3);const ei=Ko(()=>{const jn=j.dutyCyclePercentage;let ai="#A5E5B6";return jn>90?ai="#FB787B":jn>70&&(ai="#FFC246"),{width:jn===0?"2px":`${Math.max(jn,2)}%`,backgroundColor:ai}});return(jn,ai)=>(Si(),Fi(Ou,null,[Oe("aside",btt,[Oe("div",wtt,[Oe("div",ktt,[ai[1]||(ai[1]=Oe("h1",{class:"text-white text-[22px] font-bold mb-2"},"pyMC Repeater",-1)),Oe("p",Ttt,[nc(na(Ju(j).nodeName)+" ",1),Oe("span",{class:Xs(["inline-block w-2 h-2 rounded-full ml-2",Ju(j).statusBadge.text==="Active"?"bg-accent-green":Ju(j).statusBadge.text==="Monitor Mode"?"bg-secondary":"bg-accent-red"]),title:Ju(j).statusBadge.title},null,10,Att)]),Oe("p",Mtt,"<"+na(Ju(j).pubKey)+">",1)]),ai[10]||(ai[10]=Oe("div",{class:"border-t border-dark-border mb-6"},null,-1)),Oe("div",Stt,[ai[3]||(ai[3]=Oe("p",{class:"text-dark-text text-xs uppercase mb-4"},"Actions",-1)),Oe("button",{onClick:ai[0]||(ai[0]=Qi=>Dt.value=!0),class:"w-full bg-white rounded-[10px] py-3 px-4 flex items-center gap-2 text-sm font-medium text-[#212122] hover:bg-gray-100 transition-colors"},ai[2]||(ai[2]=[Oe("svg",{class:"w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Oe("path",{d:"M7 0C5.61553 0 4.26216 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.003033 5.6003 -0.13559 7.00777 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C13.998 5.1441 13.2599 3.36479 11.9475 2.05247C10.6352 0.74015 8.8559 0.0020073 7 0V0ZM7 12.8333C5.84628 12.8333 4.71846 12.4912 3.75918 11.8502C2.79989 11.2093 2.05222 10.2982 1.61071 9.23232C1.16919 8.16642 1.05368 6.99353 1.27876 5.86197C1.50384 4.73042 2.05941 3.69102 2.87521 2.87521C3.69102 2.0594 4.73042 1.50383 5.86198 1.27875C6.99353 1.05367 8.16642 1.16919 9.23232 1.6107C10.2982 2.05221 11.2093 2.79989 11.8502 3.75917C12.4912 4.71846 12.8333 5.84628 12.8333 7C12.8316 8.54658 12.2165 10.0293 11.1229 11.1229C10.0293 12.2165 8.54658 12.8316 7 12.8333ZM8.16667 7C8.1676 7.20501 8.11448 7.40665 8.01268 7.58461C7.91087 7.76256 7.76397 7.91054 7.58677 8.01365C7.40957 8.11676 7.20833 8.17136 7.00332 8.17194C6.7983 8.17252 6.59675 8.11906 6.41897 8.01696C6.24119 7.91485 6.09346 7.7677 5.99065 7.59033C5.88784 7.41295 5.83358 7.21162 5.83335 7.0066C5.83312 6.80159 5.88691 6.60013 5.98932 6.42252C6.09172 6.24491 6.23912 6.09743 6.41667 5.99492V3.5H7.58334V5.99492C7.76016 6.09659 7.90713 6.24298 8.00952 6.41939C8.1119 6.5958 8.1661 6.79603 8.16667 7Z",fill:"#212122"})],-1),nc(" Send Advert ",-1)]))]),Oe("div",Ett,[ai[4]||(ai[4]=Oe("p",{class:"text-dark-text text-xs uppercase mb-4"},"Monitoring",-1)),Oe("div",Ctt,[(Si(!0),Fi(Ou,null,sf(ir.slice(0,3),Qi=>(Si(),Fi("button",{key:Qi.name,onClick:Gi=>Ir(Qi.route),class:Xs([vr.value(Qi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(Si(),K0(s4(Be[Qi.icon]),{class:"w-3.5 h-3.5"})),nc(" "+na(Qi.name),1)],10,Ltt))),128))])]),Oe("div",Ptt,[ai[5]||(ai[5]=Oe("p",{class:"text-dark-text text-xs uppercase mb-4"},"System",-1)),Oe("div",ztt,[(Si(!0),Fi(Ou,null,sf(ir.slice(3),Qi=>(Si(),Fi("button",{key:Qi.name,onClick:Gi=>Ir(Qi.route),class:Xs([vr.value(Qi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(Si(),K0(s4(Be[Qi.icon]),{class:"w-3.5 h-3.5"})),nc(" "+na(Qi.name),1)],10,Itt))),128))])]),uu(TQ,{"current-value":Ju(j).noiseFloorDbm||-116,"update-interval":3e3,class:"mb-6"},null,8,["current-value"]),Oe("button",{onClick:Tn,disabled:mt.value,class:Xs(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",Ju(j).modeButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Oe("div",Dtt,[uu(gtt,{class:"w-4 h-4 text-white group-hover:text-primary transition-colors"}),ai[6]||(ai[6]=Oe("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Mode",-1))]),Oe("span",{class:Xs(["text-xs font-medium group-hover:text-white transition-colors",Ju(j).modeButtonState.warning?"text-accent-red":"text-accent-green"])},na(mt.value?"Changing...":Ju(j).currentMode.charAt(0).toUpperCase()+Ju(j).currentMode.slice(1)),3)],10,Ott),Oe("button",{onClick:Ft,disabled:kt.value,class:Xs(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",Ju(j).dutyCycleButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Oe("div",Rtt,[uu(_tt,{class:"w-3.5 h-3.5 text-white group-hover:text-primary transition-colors"}),ai[7]||(ai[7]=Oe("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Duty Cycle",-1))]),Oe("span",{class:Xs(["text-xs font-medium group-hover:text-white transition-colors",Ju(j).dutyCycleButtonState.warning?"text-accent-red":"text-primary"])},na(kt.value?"Changing...":Ju(j).dutyCycleEnabled?"Enabled":"Disabled"),3)],10,Ftt),Oe("div",Btt,[Oe("div",Ntt,[Oe("span",jtt," R:v"+na(Ju(j).version),1),Oe("span",Utt," C:v"+na(Ju(j).coreVersion),1)])]),ai[11]||(ai[11]=Oe("div",{class:"border-t border-accent-green mb-4"},null,-1)),Ju(j).dutyCycleEnabled?(Si(),Fi("div",Vtt,[Oe("p",Htt,[ai[8]||(ai[8]=nc(" Duty Cycle: ",-1)),Oe("span",Wtt,na(Ju(j).dutyCycleUtilization.toFixed(1))+"% / "+na(Ju(j).dutyCycleMax.toFixed(1))+"%",1)]),Oe("div",qtt,[Oe("div",{class:"h-full rounded-full transition-all duration-300",style:pg(ei.value)},null,4)])])):ps("",!0),Oe("div",Ztt,[Oe("div",$tt,[ai[9]||(ai[9]=Oe("svg",{class:"w-3 h-3",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Oe("path",{d:"M6.5 13C5.59722 13 4.75174 12.8286 3.96355 12.4858C3.17537 12.143 2.48926 11.6795 1.90522 11.0955C1.32119 10.5115 0.85776 9.82535 0.514945 9.03717C0.172131 8.24898 0.000482491 7.40326 1.0101e-06 6.5C-0.000480471 5.59674 0.171168 4.75126 0.514945 3.96356C0.858723 3.17585 1.32191 2.48974 1.9045 1.90522C2.48709 1.3207 3.1732 0.857278 3.96283 0.514944C4.75246 0.172611 5.59818 0.000962963 6.5 0C7.48703 0 8.42303 0.210648 9.30799 0.631944C10.193 1.05324 10.9421 1.64907 11.5555 2.41944V1.44444C11.5555 1.23981 11.6249 1.06841 11.7635 0.930222C11.9022 0.792037 12.0736 0.722704 12.2778 0.722222C12.4819 0.721741 12.6536 0.791074 12.7927 0.930222C12.9319 1.06937 13.001 1.24078 13 1.44444V4.33333C13 4.53796 12.9307 4.70961 12.792 4.84828C12.6533 4.98694 12.4819 5.05604 12.2778 5.05556H9.38888C9.18425 5.05556 9.01285 4.98622 8.87466 4.84756C8.73647 4.70889 8.66714 4.53748 8.66666 4.33333C8.66618 4.12919 8.73551 3.95778 8.87466 3.81911C9.01381 3.68044 9.18521 3.61111 9.38888 3.61111H10.6528C10.1593 2.93704 9.55138 2.40741 8.82916 2.02222C8.10694 1.63704 7.33055 1.44444 6.5 1.44444C5.09166 1.44444 3.89711 1.93507 2.91633 2.91633C1.93555 3.89759 1.44493 5.09215 1.44444 6.5C1.44396 7.90785 1.93459 9.10265 2.91633 10.0844C3.89807 11.0661 5.09263 11.5565 6.5 11.5556C7.64351 11.5556 8.66666 11.2125 9.56944 10.5264C10.4722 9.84028 11.068 8.95555 11.3569 7.87222C11.4171 7.67963 11.5255 7.53519 11.6819 7.43889C11.8384 7.34259 12.013 7.30648 12.2055 7.33055C12.4102 7.35463 12.5727 7.44178 12.693 7.592C12.8134 7.74222 12.8495 7.90785 12.8014 8.08889C12.4523 9.5213 11.694 10.698 10.5264 11.6191C9.35879 12.5402 8.01666 13.0005 6.5 13ZM7.22222 6.21111L9.02777 8.01667C9.16018 8.14907 9.22638 8.31759 9.22638 8.52222C9.22638 8.72685 9.16018 8.89537 9.02777 9.02778C8.89536 9.16018 8.72685 9.22639 8.52222 9.22639C8.31759 9.22639 8.14907 9.16018 8.01666 9.02778L5.99444 7.00556C5.92222 6.93333 5.86805 6.8522 5.83194 6.76217C5.79583 6.67213 5.77777 6.57872 5.77777 6.48194V3.61111C5.77777 3.40648 5.84711 3.23507 5.98577 3.09689C6.12444 2.9587 6.29585 2.88937 6.5 2.88889C6.70414 2.88841 6.87579 2.95774 7.01494 3.09689C7.15409 3.23604 7.22318 3.40744 7.22222 3.61111V6.21111Z",fill:"currentColor"})],-1)),nc(" Last Updated: "+na(wn.value),1)]),Oe("div",Gtt,[Oe("a",Ytt,[uu(cQ,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})]),Oe("a",Ktt,[uu(pQ,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})])])])])]),uu(GQ,{isOpen:Dt.value,isLoading:J.value,isSuccess:$t.value,error:ee.value,onClose:Wr,onSend:Pr},null,8,["isOpen","isLoading","isSuccess","error"])],64))}}),Jtt={key:0,class:"fixed inset-0 z-40 lg:hidden"},Qtt={class:"absolute left-0 top-0 bottom-0 w-72 p-4"},tet={class:"glass-card h-full p-6 overflow-auto"},eet={class:"mb-4"},ret={class:"space-y-2 mb-3"},net=["onClick"],iet={class:"mb-4"},aet={class:"space-y-2 mb-3"},oet=["onClick"],set=ah({name:"MobileSidebar",__name:"MobileSidebar",props:{showMobileSidebar:{type:Boolean}},emits:["update:showMobileSidebar"],setup(d,{emit:l}){const z=l,j=JI(),J=QI(),mt={dashboard:AO,neighbors:CO,statistics:EO,configuration:TO,logs:SO,help:MO},kt=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],Dt=pe=>J.path===pe,$t=pe=>{j.push(pe),ee()},ee=()=>{z("update:showMobileSidebar",!1)};return(pe,Be)=>pe.showMobileSidebar?(Si(),Fi("div",Jtt,[Oe("div",{class:"absolute inset-0 bg-black/50",onClick:ee}),Oe("div",Qtt,[Oe("div",tet,[Oe("div",{class:"mb-6 flex items-center justify-between"},[Be[0]||(Be[0]=Oe("div",null,[Oe("h1",{class:"text-white text-[20px] font-bold"},"pyMC Repeater"),Oe("p",{class:"text-[#C3C3C3] text-sm"},[nc("phenix-rep56 "),Oe("span",{class:"inline-block w-2 h-2 rounded-full bg-[#95F3AE] ml-2"})])],-1)),Oe("button",{onClick:ee,class:"text-dark-text"},"✕")]),Be[5]||(Be[5]=Oe("div",{class:"border-t border-dark-border mb-4"},null,-1)),Oe("div",null,[Be[3]||(Be[3]=Af('

pyMC Repeater

phenix-rep56

<94eib04...4563ghbjbjn>

Actions

',3)),Oe("div",eet,[Be[1]||(Be[1]=Oe("p",{class:"text-dark-text text-xs uppercase mb-2"},"Monitoring",-1)),Oe("div",ret,[(Si(!0),Fi(Ou,null,sf(kt.slice(0,3),ir=>(Si(),Fi("button",{key:ir.name,onClick:vr=>$t(ir.route),class:Xs([Dt(ir.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(Si(),K0(s4(mt[ir.icon]),{class:"w-3.5 h-3.5"})),nc(" "+na(ir.name),1)],10,net))),128))])]),Oe("div",iet,[Be[2]||(Be[2]=Oe("p",{class:"text-dark-text text-xs uppercase mb-2"},"System",-1)),Oe("div",aet,[(Si(!0),Fi(Ou,null,sf(kt.slice(3),ir=>(Si(),Fi("button",{key:ir.name,onClick:vr=>$t(ir.route),class:Xs([Dt(ir.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(Si(),K0(s4(mt[ir.icon]),{class:"w-3.5 h-3.5"})),nc(" "+na(ir.name),1)],10,oet))),128))])]),Be[4]||(Be[4]=Af('

RF NOISE FLOOR

-116.0dbm
Mode
Forward
Duty Cycle
Enabled
ActiveVl.0.2

Duty Cycle: 0.0% / 6.0%

Last Updated: 18:55:24

',7))])])])])):ps("",!0)}}),uet={class:"glass-card p-6 mb-5 rounded-[20px] relative z-10"},cet={class:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4"},het={class:"flex items-center gap-3"},fet={class:"text-right mr-4"},det={key:0,class:"flex items-center gap-2"},pet={key:1,class:"space-y-1"},met={class:"text-dark-text text-sm"},get={class:"text-primary font-medium"},vet={key:0,class:"text-xs text-dark-text/80"},yet={key:0},xet={key:1,class:"text-xs text-dark-text/60"},_et={key:2},bet={key:0,class:"text-xs text-dark-text/60"},wet=["disabled"],ket={class:"flex items-center justify-between mb-3"},Tet={class:"flex items-center gap-2"},Aet=["disabled"],Met=["disabled"],Eet={class:"space-y-3 text-sm"},Cet={key:0,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},Let={class:"flex items-center justify-between"},Pet={class:"text-accent-red font-bold"},zet={class:"text-xs text-gray-400 mt-1"},Iet={key:1,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-accent-green"},Oet={class:"flex items-center justify-between"},Det={class:"text-accent-green font-bold"},Fet={key:0,class:"text-xs text-gray-400 mt-1"},Ret={key:2,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},Bet={key:3,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},Net={class:"text-xs text-gray-400"},jet={class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-primary"},Uet={class:"flex items-center justify-between"},Vet={class:"text-primary font-bold"},Het={key:0,class:"text-xs text-gray-400 mt-1"},Wet={class:"flex items-center justify-between"},qet={class:"text-white font-medium"},Zet={key:0,class:"mt-2"},$et={class:"text-xs text-gray-400"},Get={class:"text-gray-300"},Yet={key:4,class:"bg-[#0B1014] p-4 rounded-lg border border-white/10 text-center"},Ket={key:5,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 text-center"},Xet=ah({name:"TopBar",__name:"TopBar",emits:["toggleMobileSidebar"],setup(d,{emit:l}){const z=l,j=gg(),J=ro(!1),mt=ro(null),kt=ro({hasUpdate:!1,currentVersion:"",latestVersion:"",isChecking:!1,lastChecked:null,error:null}),Dt=ro({}),$t=ro(!0),ee=ro(null),pe=["Chat Node","Repeater","Room Server"];function Be(Gi){const En=Gi.target;mt.value&&!mt.value.contains(En)&&(J.value=!1)}const ir=async()=>{try{$t.value=!0;const Gi={};for(const En of pe)try{const Fa=await Ah.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(En)}&hours=168`);Fa.success&&Array.isArray(Fa.data)?Gi[En]=Fa.data:Gi[En]=[]}catch(Fa){console.error(`Error fetching ${En} nodes:`,Fa),Gi[En]=[]}Dt.value=Gi,ee.value=new Date}catch(Gi){console.error("Error updating tracked nodes:",Gi)}finally{$t.value=!1}},vr=async()=>{if(!kt.value.isChecking)try{kt.value.isChecking=!0,kt.value.error=null,await j.fetchStats();const Gi=j.version;if(!Gi||Gi==="Unknown"){kt.value.error="Unable to determine current version";return}const Fa=await fetch("https://raw.githubusercontent.com/rightup/pyMC_Repeater/main/repeater/__init__.py");if(!Fa.ok)throw new Error(`GitHub request failed: ${Fa.status}`);const Ni=(await Fa.text()).match(/__version__\s*=\s*["']([^"']+)["']/);if(!Ni)throw new Error("Could not parse version from GitHub file");const zi=Ni[1];kt.value.currentVersion=Gi,kt.value.latestVersion=zi,kt.value.lastChecked=new Date,kt.value.hasUpdate=Gi!==zi}catch(Gi){console.error("Error checking for updates:",Gi),kt.value.error=Gi instanceof Error?Gi.message:"Failed to check for updates"}finally{kt.value.isChecking=!1}},Ir=Ko(()=>Object.values(Dt.value).reduce((En,Fa)=>En+Fa.length,0)),Pr=Ko(()=>pe.map(En=>({type:En,count:Dt.value[En]?.length||0})).filter(En=>En.count>0)),Wr=Ko(()=>kt.value.hasUpdate||Ir.value>0),Tn=Gi=>({"Chat Node":"text-blue-400",Repeater:"text-accent-green","Room Server":"text-accent-purple"})[Gi]||"text-gray-400",Ft=Gi=>{const En=Dt.value[Gi]||[];return En.length===0?"None":En.reduce((Sa,Ni)=>Ni.last_seen>Sa.last_seen?Ni:Sa,En[0]).node_name||"Unknown Node"};let wn=null,ei=null;const jn=()=>{wn&&clearInterval(wn),wn=setInterval(()=>{ir()},3e4),ei&&clearInterval(ei),ei=setInterval(()=>{vr()},6e5)},ai=()=>{wn&&(clearInterval(wn),wn=null),ei&&(clearInterval(ei),ei=null)};i0(()=>{document.addEventListener("click",Be),ir(),vr(),jn()}),mg(()=>{document.removeEventListener("click",Be),ai()});const Qi=()=>{z("toggleMobileSidebar")};return(Gi,En)=>(Si(),Fi("div",uet,[Oe("div",cet,[Oe("div",{class:"flex items-center gap-3"},[Oe("button",{onClick:Qi,class:"lg:hidden w-10 h-10 rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors"},En[2]||(En[2]=[Oe("svg",{class:"w-5 h-5 text-white",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Oe("path",{d:"M3 6h14M3 10h14M3 14h14",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),En[3]||(En[3]=Oe("div",null,[Oe("h1",{class:"text-white text-[35px] font-bold mb-2"},"Welcome👋")],-1))]),Oe("div",het,[Oe("div",fet,[$t.value?(Si(),Fi("div",det,En[4]||(En[4]=[Oe("div",{class:"animate-spin rounded-full h-3 w-3 border-b-2 border-primary"},null,-1),Oe("p",{class:"text-dark-text text-sm"},"Loading tracking data...",-1)]))):Ir.value>0?(Si(),Fi("div",pet,[Oe("p",met,[En[5]||(En[5]=nc(" Tracking: ",-1)),Oe("span",get,na(Ir.value)+" node"+na(Ir.value===1?"":"s"),1)]),Pr.value.length>1?(Si(),Fi("div",vet,[(Si(!0),Fi(Ou,null,sf(Pr.value,(Fa,Sa)=>(Si(),Fi("span",{key:Fa.type,class:"inline"},[nc(na(Fa.count)+" "+na(Fa.type)+na(Fa.count===1?"":"s"),1),SaJ.value=!J.value,["stop"])),class:"w-[35px] h-[35px] rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors relative"},[En[8]||(En[8]=Oe("svg",{class:"w-5 h-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Oe("path",{d:"M12.5 14.1667V15C12.5 16.3807 11.3807 17.5 9.99998 17.5C8.61927 17.5 7.49998 16.3807 7.49998 15V14.1667M12.5 14.1667L7.49998 14.1667M12.5 14.1667H15.8333C16.2936 14.1667 16.6666 13.7936 16.6666 13.3333V12.845C16.6666 12.624 16.5788 12.4122 16.4225 12.2559L15.9969 11.8302C15.8921 11.7255 15.8333 11.5833 15.8333 11.4351V8.33333C15.8333 8.1863 15.828 8.04045 15.817 7.89674M7.49998 14.1667L4.16665 14.1668C3.70641 14.1668 3.33331 13.7934 3.33331 13.3332V12.8451C3.33331 12.6241 3.42118 12.4124 3.57745 12.2561L4.00307 11.8299C4.10781 11.7251 4.16665 11.5835 4.16665 11.4353V8.33331C4.16665 5.11167 6.77831 2.5 9.99998 2.5C10.593 2.5 11.1653 2.58848 11.7045 2.75297M15.817 7.89674C16.8223 7.32275 17.5 6.24051 17.5 5C17.5 3.15905 16.0076 1.66666 14.1666 1.66666C13.1914 1.66666 12.3141 2.08544 11.7045 2.75297M15.817 7.89674C15.3304 8.17457 14.7671 8.33333 14.1666 8.33333C12.3257 8.33333 10.8333 6.84095 10.8333 5C10.8333 4.13425 11.1634 3.34558 11.7045 2.75297M15.817 7.89674C15.817 7.89674 15.817 7.89675 15.817 7.89674ZM11.7045 2.75297C11.7049 2.75309 11.7053 2.75321 11.7057 2.75333",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),Wr.value?(Si(),Fi("span",{key:0,class:Xs(["absolute top-2 right-2 w-2 h-2 rounded-full",kt.value.hasUpdate?"bg-accent-red animate-pulse":"bg-primary"])},null,2)):ps("",!0)]),J.value?(Si(),Fi("div",{key:0,ref_key:"notifRef",ref:mt,class:"absolute right-6 top-14 z-[100] w-80 bg-[#1A1E1F] border border-white/20 rounded-[15px] p-4 shadow-2xl backdrop-blur-sm",onClick:En[1]||(En[1]=zm(()=>{},["stop"]))},[Oe("div",ket,[En[10]||(En[10]=Oe("p",{class:"text-white font-semibold"},"System Status",-1)),Oe("div",Tet,[Oe("button",{onClick:vr,disabled:kt.value.isChecking,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50",title:"Check for updates"},na(kt.value.isChecking?"Checking...":"Check Updates"),9,Aet),En[9]||(En[9]=Oe("span",{class:"text-dark-text text-xs"},"•",-1)),Oe("button",{onClick:ir,disabled:$t.value,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50"},na($t.value?"Updating...":"Refresh"),9,Met)])]),Oe("div",Eet,[kt.value.hasUpdate?(Si(),Fi("div",Cet,[Oe("div",Let,[En[11]||(En[11]=Oe("span",{class:"text-white font-medium"},"Update Available",-1)),Oe("span",Pet,na(kt.value.latestVersion),1)]),Oe("div",zet," Current: "+na(kt.value.currentVersion),1),En[12]||(En[12]=Oe("div",{class:"text-xs text-gray-300 mt-2"},[Oe("a",{href:"https://github.com/rightup/pyMC_Repeater",target:"_blank",class:"text-accent-red hover:text-accent-red/80 underline"}," Goto Github→ ")],-1))])):kt.value.currentVersion&&!kt.value.isChecking?(Si(),Fi("div",Iet,[Oe("div",Oet,[En[13]||(En[13]=Oe("span",{class:"text-white font-medium"},"Up to Date",-1)),Oe("span",Det,na(kt.value.currentVersion),1)]),kt.value.lastChecked?(Si(),Fi("div",Fet," Last checked: "+na(kt.value.lastChecked.toLocaleTimeString()),1)):ps("",!0)])):kt.value.isChecking?(Si(),Fi("div",Ret,En[14]||(En[14]=[Oe("div",{class:"flex items-center justify-center gap-2"},[Oe("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),Oe("span",{class:"text-gray-300"},"Checking for updates...")],-1)]))):kt.value.error?(Si(),Fi("div",Bet,[En[15]||(En[15]=Oe("div",{class:"text-white font-medium mb-1"},"Update Check Failed",-1)),Oe("div",Net,na(kt.value.error),1)])):ps("",!0),En[20]||(En[20]=Oe("div",{class:"border-t border-white/10"},null,-1)),En[21]||(En[21]=Oe("div",{class:"text-white font-medium text-sm mb-2"},"Mesh Network Status",-1)),Oe("div",jet,[Oe("div",Uet,[En[16]||(En[16]=Oe("span",{class:"text-white font-medium"},"Total Tracked Nodes",-1)),Oe("span",Vet,na(Ir.value),1)]),ee.value?(Si(),Fi("div",Het," Last updated: "+na(ee.value.toLocaleString()),1)):ps("",!0)]),(Si(!0),Fi(Ou,null,sf(Pr.value,Fa=>(Si(),Fi("div",{key:Fa.type,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},[Oe("div",Wet,[Oe("span",qet,na(Fa.type)+na(Fa.count===1?"":"s"),1),Oe("span",{class:Xs([Tn(Fa.type),"font-bold"])},na(Fa.count),3)]),Dt.value[Fa.type]?.length>0?(Si(),Fi("div",Zet,[Oe("div",$et,[En[17]||(En[17]=nc(" Latest: ",-1)),Oe("span",Get,na(Ft(Fa.type)),1)])])):ps("",!0)]))),128)),Ir.value===0&&!$t.value?(Si(),Fi("div",Yet,En[18]||(En[18]=[Oe("div",{class:"text-gray-400"},[Oe("svg",{class:"w-8 h-8 mx-auto mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.034 0-3.9.785-5.291 2.09M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]),Oe("span",null,"No mesh nodes detected")],-1)]))):ps("",!0),$t.value?(Si(),Fi("div",Ket,En[19]||(En[19]=[Oe("div",{class:"flex items-center justify-center gap-2"},[Oe("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),Oe("span",{class:"text-gray-300"},"Scanning mesh network...")],-1)]))):ps("",!0)])],512)):ps("",!0)])])]))}}),Jet=hd(Xet,[["__scopeId","data-v-0a06f286"]]),Qet={class:"min-h-screen bg-dark-bg overflow-hidden relative font-sans"},trt={class:"relative flex min-h-screen"},ert={class:"flex-1 p-4 lg:p-[15px] overflow-y-auto"},rrt=ah({name:"DashboardLayout",__name:"DashboardLayout",setup(d){const l=ro(!1),z=()=>{l.value=!l.value},j=()=>{l.value=!1};return(J,mt)=>{const kt=VA("router-view");return Si(),Fi("div",Qet,[mt[1]||(mt[1]=Oe("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 -top-[79px] left-[575px] mix-blend-screen pointer-events-none"},null,-1)),mt[2]||(mt[2]=Oe("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-75 -top-[94px] -left-[92px] mix-blend-screen pointer-events-none"},null,-1)),mt[3]||(mt[3]=Oe("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 top-[373px] left-[246px] mix-blend-screen pointer-events-none"},null,-1)),Oe("div",trt,[uu(Xtt,{class:"hidden lg:block"}),uu(set,{showMobileSidebar:l.value,"onUpdate:showMobileSidebar":mt[0]||(mt[0]=Dt=>l.value=Dt),onClose:j},null,8,["showMobileSidebar"]),Oe("main",ert,[uu(Jet,{onToggleMobileSidebar:z}),uu(kt)])])])}}}),nrt=ah({__name:"App",setup(d){return(l,z)=>(Si(),K0(rrt))}}),irt={class:"sparkline-container"},art={class:"text-white text-sm font-semibold mb-4"},ort={class:"flex items-end gap-4"},srt=["id","width","height","viewBox"],lrt=["id"],urt=["stop-color"],crt=["stop-color"],hrt=["d","fill"],frt=["d","stroke"],drt=["cx","cy","fill"],prt=ah({name:"SparklineChart",__name:"Sparkline",props:{title:{},value:{},color:{},data:{default:()=>[]},width:{default:131},height:{default:37},animate:{type:Boolean,default:!0},showChart:{type:Boolean,default:!0}},setup(d){const l=d,z=Ko(()=>{if(l.data&&l.data.length>0)return l.data;const kt=typeof l.value=="number"?l.value:10,Dt=20,$t=kt*.3;return Array.from({length:Dt},(ee,pe)=>{const Be=Math.sin(pe/Dt*Math.PI*2)*$t*.5,ir=(Math.random()-.5)*$t*.3;return Math.max(0,kt+Be+ir)})}),j=Ko(()=>{const kt=z.value;if(kt.length<2)return"";const Dt=Math.max(...kt),$t=Math.min(...kt),ee=Dt-$t||1,pe=l.width/(kt.length-1);let Be="";return kt.forEach((ir,vr)=>{const Ir=vr*pe,Pr=l.height-(ir-$t)/ee*l.height;if(vr===0)Be+=`M ${Ir} ${Pr}`;else{const Tn=((vr-1)*pe+Ir)/2;Be+=` Q ${Tn} ${Pr} ${Ir} ${Pr}`}}),Be}),J=ro("");i0(()=>{J.value=j.value}),fm(()=>l.data,(kt,Dt)=>{const $t=!Dt||kt.length!==Dt.length||Math.abs(kt.length-Dt.length)>5;l.animate&&$t?(J.value="",setTimeout(()=>{J.value=j.value},50)):J.value=j.value});const mt=Ko(()=>`sparkline-${l.title.replace(/\s+/g,"-").toLowerCase()}`);return(kt,Dt)=>(Si(),Fi("div",irt,[Oe("p",art,na(kt.title),1),Oe("div",ort,[Oe("span",{class:"text-[30px] font-bold",style:pg({color:kt.color})},[nc(na(kt.value),1),qG(kt.$slots,"unit",{},void 0)],4),kt.showChart?(Si(),Fi("svg",{key:0,id:mt.value,class:"mb-3 sparkline-svg",width:kt.width,height:kt.height,viewBox:`0 0 ${kt.width} ${kt.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Oe("defs",null,[Oe("linearGradient",{id:`gradient-${mt.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[Oe("stop",{offset:"0%","stop-color":kt.color,"stop-opacity":"0.3"},null,8,urt),Oe("stop",{offset:"100%","stop-color":kt.color,"stop-opacity":"0.1"},null,8,crt)],8,lrt)]),Oe("path",{d:`${J.value} L ${kt.width} ${kt.height} L 0 ${kt.height} Z`,fill:`url(#gradient-${mt.value})`,class:"sparkline-fill"},null,8,hrt),Oe("path",{d:J.value,stroke:kt.color,"stroke-width":"2",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:Xs(["sparkline-path",{"animate-draw":kt.animate}])},null,10,frt),z.value.length>0?(Si(),Fi("circle",{key:0,cx:kt.width,cy:kt.height-(z.value[z.value.length-1]-Math.min(...z.value))/(Math.max(...z.value)-Math.min(...z.value)||1)*kt.height,r:"2",fill:kt.color,class:Xs(["sparkline-dot",{"animate-pulse":kt.animate}])},null,10,drt)):ps("",!0)],8,srt)):ps("",!0)])]))}}),a_=hd(prt,[["__scopeId","data-v-574bf55e"]]),mrt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-5"},grt=ah({name:"StatsCards",__name:"StatsCards",setup(d){const l=sw(),z=ro(null),j=Ko(()=>{const kt=l.packetStats,Dt=l.systemStats,$t=ee=>{const pe=Math.floor(ee/86400),Be=Math.floor(ee%86400/3600),ir=Math.floor(ee%3600/60);return pe>0?`${pe}d ${Be}h`:Be>0?`${Be}h ${ir}m`:`${ir}m`};return{packetsReceived:kt?.total_packets||0,packetsForwarded:kt?.transmitted_packets||0,uptimeFormatted:Dt?$t(Dt.uptime_seconds||0):"0m",uptimeHours:Dt?Math.floor((Dt.uptime_seconds||0)/3600):0,droppedPackets:kt?.dropped_packets||0,signalQuality:Math.round((kt?.avg_rssi||0)+120)}}),J=Ko(()=>l.sparklineData),mt=async()=>{try{await Promise.all([l.fetchSystemStats(),l.fetchPacketStats({hours:24})])}catch(kt){console.error("Error fetching stats:",kt)}};return i0(()=>{mt(),z.value=window.setInterval(mt,5e3)}),mg(()=>{z.value&&clearInterval(z.value)}),(kt,Dt)=>(Si(),Fi("div",mrt,[uu(a_,{title:"RX Packets",value:j.value.packetsReceived,color:"#AAE8E8",data:J.value.totalPackets},null,8,["value","data"]),uu(a_,{title:"Forward",value:j.value.packetsForwarded,color:"#FFC246",data:J.value.transmittedPackets},null,8,["value","data"]),uu(a_,{title:"Up Time",value:j.value.uptimeFormatted,color:"#EBA0FC",data:[],showChart:!1},null,8,["value"]),uu(a_,{title:"Dropped",value:j.value.droppedPackets,color:"#FB787B",data:J.value.droppedPackets},null,8,["value","data"])]))}}),vrt={class:"glass-card rounded-[10px] p-6"},yrt={class:"h-80 relative"},xrt={key:0,class:"absolute inset-0 flex items-center justify-center"},_rt={key:1,class:"absolute inset-0 flex items-center justify-center"},brt={class:"text-red-400"},wrt={key:2,class:"absolute inset-0 flex items-center justify-center"},krt={key:3,class:"h-full flex items-end justify-around gap-2 px-4"},Trt={class:"relative w-full h-64 flex flex-col justify-end"},Art={class:"text-white text-xs font-semibold drop-shadow-lg backdrop-blur-sm bg-black/20 px-2 py-0.5 rounded-md border border-white/10"},Mrt={class:"mt-2 text-center"},Srt={class:"text-white text-xs font-medium leading-tight"},Ert={key:0,class:"mt-4 text-sm text-white text-center"},Crt=ah({name:"SignalQualityChart",__name:"SignalQualityChart",setup(d){const l=ro([]),z=ro(null),j=ro(!0),J=ro(null),mt=["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(139, 92, 246, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(6, 182, 212, 0.8)","rgba(249, 115, 22, 0.8)","rgba(132, 204, 22, 0.8)","rgba(236, 72, 153, 0.8)","rgba(107, 114, 128, 0.8)"],kt=async()=>{try{J.value=null;const $t=await Ah.get("/packet_type_graph_data");if($t?.success&&$t?.data){const ee=$t.data;if(ee?.series){const pe=[];ee.series.forEach((Be,ir)=>{let vr=0;Be.data&&Array.isArray(Be.data)&&(vr=Be.data.reduce((Ir,Pr)=>Ir+(Pr[1]||0),0)),vr>0&&pe.push({name:Be.name||`Type ${Be.type}`,type:Be.type,count:vr,color:mt[ir%mt.length]})}),pe.sort((Be,ir)=>ir.count-Be.count),l.value=pe,j.value=!1}else console.error("No series data found in response"),J.value="No series data in server response",j.value=!1}else console.error("Invalid API response structure:",$t),J.value="Invalid response from server",j.value=!1}catch($t){console.error("Failed to fetch packet type data:",$t),J.value=$t instanceof Error?$t.message:"Failed to load data",j.value=!1}},Dt=$t=>{if(l.value.length===0)return 0;const ee=Math.max(...l.value.map(pe=>pe.count));return Math.max($t/ee*100,2)};return i0(()=>{kt(),z.value=setInterval(()=>{kt()},3e4)}),mg(()=>{z.value&&clearInterval(z.value)}),($t,ee)=>(Si(),Fi("div",vrt,[ee[2]||(ee[2]=Oe("h3",{class:"text-white text-xl font-semibold mb-4"},"Packet Types",-1)),ee[3]||(ee[3]=Oe("p",{class:"text-white text-sm uppercase mb-4"},"Distribution by Type",-1)),Oe("div",yrt,[j.value?(Si(),Fi("div",xrt,ee[0]||(ee[0]=[Oe("div",{class:"text-white"},"Loading packet types...",-1)]))):J.value?(Si(),Fi("div",_rt,[Oe("div",brt,na(J.value),1)])):l.value.length===0?(Si(),Fi("div",wrt,ee[1]||(ee[1]=[Oe("div",{class:"text-white"},"No packet data available",-1)]))):(Si(),Fi("div",krt,[(Si(!0),Fi(Ou,null,sf(l.value,pe=>(Si(),Fi("div",{key:pe.type,class:"flex flex-col items-center flex-1 max-w-20 h-full"},[Oe("div",Trt,[Oe("div",{class:"w-full rounded-t-[10px] transition-all duration-500 ease-out flex items-end justify-center pb-1 backdrop-blur-[50px] shadow-lg border border-white/20 hover:border-white/30",style:pg({height:Dt(pe.count)+"%",background:`linear-gradient(135deg, - ${pe.color} 0%, - ${pe.color.replace("0.8","0.6")} 30%, - ${pe.color.replace("0.8","0.4")} 70%, - ${pe.color.replace("0.8","0.3")} 100%), + */let AX=()=>location.protocol+"//"+location.host;function hO(d,s){const{pathname:E,search:B,hash:K}=s,pt=d.indexOf("#");if(pt>-1){let _t=K.includes(d.slice(pt))?d.slice(pt).length:1,Ot=K.slice(_t);return Ot[0]!=="/"&&(Ot="/"+Ot),wL(Ot,"")}return wL(E,d)+B+K}function MX(d,s,E,B){let K=[],pt=[],_t=null;const Ot=({state:er})=>{const pr=hO(d,location),Mr=E.value,Tr=s.value;let Vr=0;if(er){if(E.value=pr,s.value=er,_t&&_t===Mr){_t=null;return}Vr=Tr?er.position-Tr.position:0}else B(pr);K.forEach(mn=>{mn(E.value,Mr,{delta:Vr,type:yA.pop,direction:Vr?Vr>0?I8.forward:I8.back:I8.unknown})})};function jt(){_t=E.value}function te(er){K.push(er);const pr=()=>{const Mr=K.indexOf(er);Mr>-1&&K.splice(Mr,1)};return pt.push(pr),pr}function he(){if(document.visibilityState==="hidden"){const{history:er}=window;if(!er.state)return;er.replaceState(Fh({},er.state,{scroll:U4()}),"")}}function De(){for(const er of pt)er();pt=[],window.removeEventListener("popstate",Ot),window.removeEventListener("pagehide",he),document.removeEventListener("visibilitychange",he)}return window.addEventListener("popstate",Ot),window.addEventListener("pagehide",he),document.addEventListener("visibilitychange",he),{pauseListeners:jt,listen:te,destroy:De}}function SL(d,s,E,B=!1,K=!1){return{back:d,current:s,forward:E,replaced:B,position:window.history.length,scroll:K?U4():null}}function SX(d){const{history:s,location:E}=window,B={value:hO(d,E)},K={value:s.state};K.value||pt(B.value,{back:null,current:B.value,forward:null,position:s.length-1,replaced:!0,scroll:null},!0);function pt(jt,te,he){const De=d.indexOf("#"),er=De>-1?(E.host&&document.querySelector("base")?d:d.slice(De))+jt:AX()+d+jt;try{s[he?"replaceState":"pushState"](te,"",er),K.value=te}catch(pr){console.error(pr),E[he?"replace":"assign"](er)}}function _t(jt,te){pt(jt,Fh({},s.state,SL(K.value.back,jt,K.value.forward,!0),te,{position:K.value.position}),!0),B.value=jt}function Ot(jt,te){const he=Fh({},K.value,s.state,{forward:jt,scroll:U4()});pt(he.current,he,!0),pt(jt,Fh({},SL(B.value,jt,null),{position:he.position+1},te),!1),B.value=jt}return{location:B,state:K,push:Ot,replace:_t}}function EX(d){d=hX(d);const s=SX(d),E=MX(d,s.state,s.location,s.replace);function B(pt,_t=!0){_t||E.pauseListeners(),history.go(pt)}const K=Fh({location:"",base:d,go:B,createHref:dX.bind(null,d)},s,E);return Object.defineProperty(K,"location",{enumerable:!0,get:()=>s.location.value}),Object.defineProperty(K,"state",{enumerable:!0,get:()=>s.state.value}),K}let xy=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.Group=2]="Group",d}({});var np=function(d){return d[d.Static=0]="Static",d[d.Param=1]="Param",d[d.ParamRegExp=2]="ParamRegExp",d[d.ParamRegExpEnd=3]="ParamRegExpEnd",d[d.EscapeNext=4]="EscapeNext",d}(np||{});const CX={type:xy.Static,value:""},LX=/[a-zA-Z0-9_]/;function PX(d){if(!d)return[[]];if(d==="/")return[[CX]];if(!d.startsWith("/"))throw new Error(`Invalid path "${d}"`);function s(pr){throw new Error(`ERR (${E})/"${te}": ${pr}`)}let E=np.Static,B=E;const K=[];let pt;function _t(){pt&&K.push(pt),pt=[]}let Ot=0,jt,te="",he="";function De(){te&&(E===np.Static?pt.push({type:xy.Static,value:te}):E===np.Param||E===np.ParamRegExp||E===np.ParamRegExpEnd?(pt.length>1&&(jt==="*"||jt==="+")&&s(`A repeatable param (${te}) must be alone in its segment. eg: '/:ids+.`),pt.push({type:xy.Param,value:te,regexp:he,repeatable:jt==="*"||jt==="+",optional:jt==="*"||jt==="?"})):s("Invalid state to consume buffer"),te="")}function er(){te+=jt}for(;Ots.length?s.length===1&&s[0]===h0.Static+h0.Segment?1:-1:0}function fO(d,s){let E=0;const B=d.score,K=s.score;for(;E0&&s[s.length-1]<0}const FX={strict:!1,end:!0,sensitive:!1};function RX(d,s,E){const B=OX(PX(d.path),E),K=Fh(B,{record:d,parent:s,children:[],alias:[]});return s&&!K.record.aliasOf==!s.record.aliasOf&&s.children.push(K),K}function BX(d,s){const E=[],B=new Map;s=bL(FX,s);function K(De){return B.get(De)}function pt(De,er,pr){const Mr=!pr,Tr=PL(De);Tr.aliasOf=pr&&pr.record;const Vr=bL(s,De),mn=[Tr];if("alias"in De){const Jn=typeof De.alias=="string"?[De.alias]:De.alias;for(const Bn of Jn)mn.push(PL(Fh({},Tr,{components:pr?pr.record.components:Tr.components,path:Bn,aliasOf:pr?pr.record:Tr})))}let Dt,cn;for(const Jn of mn){const{path:Bn}=Jn;if(er&&Bn[0]!=="/"){const ni=er.record.path,Wi=ni[ni.length-1]==="/"?"":"/";Jn.path=er.record.path+(Bn&&Wi+Bn)}if(Dt=RX(Jn,er,Vr),pr?pr.alias.push(Dt):(cn=cn||Dt,cn!==Dt&&cn.alias.push(Dt),Mr&&De.name&&!IL(Dt)&&_t(De.name)),dO(Dt)&&jt(Dt),Tr.children){const ni=Tr.children;for(let Wi=0;Wi{_t(cn)}:C2}function _t(De){if(uO(De)){const er=B.get(De);er&&(B.delete(De),E.splice(E.indexOf(er),1),er.children.forEach(_t),er.alias.forEach(_t))}else{const er=E.indexOf(De);er>-1&&(E.splice(er,1),De.record.name&&B.delete(De.record.name),De.children.forEach(_t),De.alias.forEach(_t))}}function Ot(){return E}function jt(De){const er=UX(De,E);E.splice(er,0,De),De.record.name&&!IL(De)&&B.set(De.record.name,De)}function te(De,er){let pr,Mr={},Tr,Vr;if("name"in De&&De.name){if(pr=B.get(De.name),!pr)throw v_(xd.MATCHER_NOT_FOUND,{location:De});Vr=pr.record.name,Mr=Fh(LL(er.params,pr.keys.filter(cn=>!cn.optional).concat(pr.parent?pr.parent.keys.filter(cn=>cn.optional):[]).map(cn=>cn.name)),De.params&&LL(De.params,pr.keys.map(cn=>cn.name))),Tr=pr.stringify(Mr)}else if(De.path!=null)Tr=De.path,pr=E.find(cn=>cn.re.test(Tr)),pr&&(Mr=pr.parse(Tr),Vr=pr.record.name);else{if(pr=er.name?B.get(er.name):E.find(cn=>cn.re.test(er.path)),!pr)throw v_(xd.MATCHER_NOT_FOUND,{location:De,currentLocation:er});Vr=pr.record.name,Mr=Fh({},er.params,De.params),Tr=pr.stringify(Mr)}const mn=[];let Dt=pr;for(;Dt;)mn.unshift(Dt.record),Dt=Dt.parent;return{name:Vr,path:Tr,params:Mr,matched:mn,meta:jX(mn)}}d.forEach(De=>pt(De));function he(){E.length=0,B.clear()}return{addRoute:pt,resolve:te,removeRoute:_t,clearRoutes:he,getRoutes:Ot,getRecordMatcher:K}}function LL(d,s){const E={};for(const B of s)B in d&&(E[B]=d[B]);return E}function PL(d){const s={path:d.path,redirect:d.redirect,name:d.name,meta:d.meta||{},aliasOf:d.aliasOf,beforeEnter:d.beforeEnter,props:NX(d),children:d.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in d?d.components||null:d.component&&{default:d.component}};return Object.defineProperty(s,"mods",{value:{}}),s}function NX(d){const s={},E=d.props||!1;if("component"in d)s.default=E;else for(const B in d.components)s[B]=typeof E=="object"?E[B]:E;return s}function IL(d){for(;d;){if(d.record.aliasOf)return!0;d=d.parent}return!1}function jX(d){return d.reduce((s,E)=>Fh(s,E.meta),{})}function UX(d,s){let E=0,B=s.length;for(;E!==B;){const pt=E+B>>1;fO(d,s[pt])<0?B=pt:E=pt+1}const K=VX(d);return K&&(B=s.lastIndexOf(K,B-1)),B}function VX(d){let s=d;for(;s=s.parent;)if(dO(s)&&fO(d,s)===0)return s}function dO({record:d}){return!!(d.name||d.components&&Object.keys(d.components).length||d.redirect)}function zL(d){const s=um(V4),E=um(lM),B=$o(()=>{const jt=zl(d.to);return s.resolve(jt)}),K=$o(()=>{const{matched:jt}=B.value,{length:te}=jt,he=jt[te-1],De=E.matched;if(!he||!De.length)return-1;const er=De.findIndex(g_.bind(null,he));if(er>-1)return er;const pr=OL(jt[te-2]);return te>1&&OL(he)===pr&&De[De.length-1].path!==pr?De.findIndex(g_.bind(null,jt[te-2])):er}),pt=$o(()=>K.value>-1&&ZX(E.params,B.value.params)),_t=$o(()=>K.value>-1&&K.value===E.matched.length-1&&lO(E.params,B.value.params));function Ot(jt={}){if($X(jt)){const te=s[zl(d.replace)?"replace":"push"](zl(d.to)).catch(C2);return d.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>te),te}return Promise.resolve()}return{route:B,href:$o(()=>B.value.href),isActive:pt,isExactActive:_t,navigate:Ot}}function HX(d){return d.length===1?d[0]:d}const WX=Dc({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:zL,setup(d,{slots:s}){const E=My(zL(d)),{options:B}=um(V4),K=$o(()=>({[DL(d.activeClass,B.linkActiveClass,"router-link-active")]:E.isActive,[DL(d.exactActiveClass,B.linkExactActiveClass,"router-link-exact-active")]:E.isExactActive}));return()=>{const pt=s.default&&HX(s.default(E));return d.custom?pt:iM("a",{"aria-current":E.isExactActive?d.ariaCurrentValue:null,href:E.href,onClick:E.navigate,class:K.value},pt)}}}),qX=WX;function $X(d){if(!(d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)&&!d.defaultPrevented&&!(d.button!==void 0&&d.button!==0)){if(d.currentTarget&&d.currentTarget.getAttribute){const s=d.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(s))return}return d.preventDefault&&d.preventDefault(),!0}}function ZX(d,s){for(const E in s){const B=s[E],K=d[E];if(typeof B=="string"){if(B!==K)return!1}else if(!Im(K)||K.length!==B.length||B.some((pt,_t)=>pt!==K[_t]))return!1}return!0}function OL(d){return d?d.aliasOf?d.aliasOf.path:d.path:""}const DL=(d,s,E)=>d??s??E,GX=Dc({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(d,{attrs:s,slots:E}){const B=um(_A),K=$o(()=>d.route||B.value),pt=um(ML,0),_t=$o(()=>{let te=zl(pt);const{matched:he}=K.value;let De;for(;(De=he[te])&&!De.components;)te++;return te}),Ot=$o(()=>K.value.matched[_t.value]);K5(ML,$o(()=>_t.value+1)),K5(kX,Ot),K5(_A,K);const jt=Ga();return Em(()=>[jt.value,Ot.value,d.name],([te,he,De],[er,pr,Mr])=>{he&&(he.instances[De]=te,pr&&pr!==he&&te&&te===er&&(he.leaveGuards.size||(he.leaveGuards=pr.leaveGuards),he.updateGuards.size||(he.updateGuards=pr.updateGuards))),te&&he&&(!pr||!g_(he,pr)||!er)&&(he.enterCallbacks[De]||[]).forEach(Tr=>Tr(te))},{flush:"post"}),()=>{const te=K.value,he=d.name,De=Ot.value,er=De&&De.components[he];if(!er)return FL(E.default,{Component:er,route:te});const pr=De.props[he],Mr=pr?pr===!0?te.params:typeof pr=="function"?pr(te):pr:null,Vr=iM(er,Fh({},Mr,s,{onVnodeUnmounted:mn=>{mn.component.isUnmounted&&(De.instances[he]=null)},ref:jt}));return FL(E.default,{Component:Vr,route:te})||Vr}}});function FL(d,s){if(!d)return null;const E=d(s);return E.length===1?E[0]:E}const YX=GX;function KX(d){const s=BX(d.routes,d),E=d.parseQuery||bX,B=d.stringifyQuery||AL,K=d.history,pt=r2(),_t=r2(),Ot=r2(),jt=HG(Qv);let te=Qv;a_&&d.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const he=L8.bind(null,da=>""+da),De=L8.bind(null,iX),er=L8.bind(null,W2);function pr(da,no){let po,us;return uO(da)?(po=s.getRecordMatcher(da),us=no):us=da,s.addRoute(us,po)}function Mr(da){const no=s.getRecordMatcher(da);no&&s.removeRoute(no)}function Tr(){return s.getRoutes().map(da=>da.record)}function Vr(da){return!!s.getRecordMatcher(da)}function mn(da,no){if(no=Fh({},no||jt.value),typeof da=="string"){const hi=P8(E,da,no.path),go=s.resolve({path:hi.path},no),Mo=K.createHref(hi.fullPath);return Fh(hi,go,{params:er(go.params),hash:W2(hi.hash),redirectedFrom:void 0,href:Mo})}let po;if(da.path!=null)po=Fh({},da,{path:P8(E,da.path,no.path).path});else{const hi=Fh({},da.params);for(const go in hi)hi[go]==null&&delete hi[go];po=Fh({},da,{params:De(hi)}),no.params=De(no.params)}const us=s.resolve(po,no),Ho=da.hash||"";us.params=he(er(us.params));const vi=sX(B,Fh({},da,{hash:eX(Ho),path:us.path})),wi=K.createHref(vi);return Fh({fullPath:vi,hash:Ho,query:B===AL?wX(da.query):da.query||{}},us,{redirectedFrom:void 0,href:wi})}function Dt(da){return typeof da=="string"?P8(E,da,jt.value.path):Fh({},da)}function cn(da,no){if(te!==da)return v_(xd.NAVIGATION_CANCELLED,{from:no,to:da})}function Jn(da){return Wi(da)}function Bn(da){return Jn(Fh(Dt(da),{replace:!0}))}function ni(da,no){const po=da.matched[da.matched.length-1];if(po&&po.redirect){const{redirect:us}=po;let Ho=typeof us=="function"?us(da,no):us;return typeof Ho=="string"&&(Ho=Ho.includes("?")||Ho.includes("#")?Ho=Dt(Ho):{path:Ho},Ho.params={}),Fh({query:da.query,hash:da.hash,params:Ho.path!=null?{}:da.params},Ho)}}function Wi(da,no){const po=te=mn(da),us=jt.value,Ho=da.state,vi=da.force,wi=da.replace===!0,hi=ni(po,us);if(hi)return Wi(Fh(Dt(hi),{state:typeof hi=="object"?Fh({},Ho,hi.state):Ho,force:vi,replace:wi}),no||po);const go=po;go.redirectedFrom=no;let Mo;return!vi&&lX(B,us,po)&&(Mo=v_(xd.NAVIGATION_DUPLICATED,{to:go,from:us}),mo(us,us,!0,!1)),(Mo?Promise.resolve(Mo):Di(go,us)).catch(To=>Gg(To)?Gg(To,xd.NAVIGATION_GUARD_REDIRECT)?To:ho(To):Ma(To,go,us)).then(To=>{if(To){if(Gg(To,xd.NAVIGATION_GUARD_REDIRECT))return Wi(Fh({replace:wi},Dt(To.to),{state:typeof To.to=="object"?Fh({},Ho,To.to.state):Ho,force:vi}),no||go)}else To=Pi(go,us,!0,wi,Ho);return Fi(go,us,To),To})}function Un(da,no){const po=cn(da,no);return po?Promise.reject(po):Promise.resolve()}function qr(da){const no=ko.values().next().value;return no&&typeof no.runWithContext=="function"?no.runWithContext(da):da()}function Di(da,no){let po;const[us,Ho,vi]=TX(da,no);po=z8(us.reverse(),"beforeRouteLeave",da,no);for(const hi of us)hi.leaveGuards.forEach(go=>{po.push(s1(go,da,no))});const wi=Un.bind(null,da,no);return po.push(wi),Ia(po).then(()=>{po=[];for(const hi of pt.list())po.push(s1(hi,da,no));return po.push(wi),Ia(po)}).then(()=>{po=z8(Ho,"beforeRouteUpdate",da,no);for(const hi of Ho)hi.updateGuards.forEach(go=>{po.push(s1(go,da,no))});return po.push(wi),Ia(po)}).then(()=>{po=[];for(const hi of vi)if(hi.beforeEnter)if(Im(hi.beforeEnter))for(const go of hi.beforeEnter)po.push(s1(go,da,no));else po.push(s1(hi.beforeEnter,da,no));return po.push(wi),Ia(po)}).then(()=>(da.matched.forEach(hi=>hi.enterCallbacks={}),po=z8(vi,"beforeRouteEnter",da,no,qr),po.push(wi),Ia(po))).then(()=>{po=[];for(const hi of _t.list())po.push(s1(hi,da,no));return po.push(wi),Ia(po)}).catch(hi=>Gg(hi,xd.NAVIGATION_CANCELLED)?hi:Promise.reject(hi))}function Fi(da,no,po){Ot.list().forEach(us=>qr(()=>us(da,no,po)))}function Pi(da,no,po,us,Ho){const vi=cn(da,no);if(vi)return vi;const wi=no===Qv,hi=a_?history.state:{};po&&(us||wi?K.replace(da.fullPath,Fh({scroll:wi&&hi&&hi.scroll},Ho)):K.push(da.fullPath,Ho)),jt.value=da,mo(da,no,po,wi),ho()}let bi;function Yi(){bi||(bi=K.listen((da,no,po)=>{if(!ro.listening)return;const us=mn(da),Ho=ni(us,ro.currentRoute.value);if(Ho){Wi(Fh(Ho,{replace:!0,force:!0}),us).catch(C2);return}te=us;const vi=jt.value;a_&&gX(TL(vi.fullPath,po.delta),U4()),Di(us,vi).catch(wi=>Gg(wi,xd.NAVIGATION_ABORTED|xd.NAVIGATION_CANCELLED)?wi:Gg(wi,xd.NAVIGATION_GUARD_REDIRECT)?(Wi(Fh(Dt(wi.to),{force:!0}),us).then(hi=>{Gg(hi,xd.NAVIGATION_ABORTED|xd.NAVIGATION_DUPLICATED)&&!po.delta&&po.type===yA.pop&&K.go(-1,!1)}).catch(C2),Promise.reject()):(po.delta&&K.go(-po.delta,!1),Ma(wi,us,vi))).then(wi=>{wi=wi||Pi(us,vi,!1),wi&&(po.delta&&!Gg(wi,xd.NAVIGATION_CANCELLED)?K.go(-po.delta,!1):po.type===yA.pop&&Gg(wi,xd.NAVIGATION_ABORTED|xd.NAVIGATION_DUPLICATED)&&K.go(-1,!1)),Fi(us,vi,wi)}).catch(C2)}))}let Ca=r2(),Ni=r2(),si;function Ma(da,no,po){ho(da);const us=Ni.list();return us.length?us.forEach(Ho=>Ho(da,no,po)):console.error(da),Promise.reject(da)}function zo(){return si&&jt.value!==Qv?Promise.resolve():new Promise((da,no)=>{Ca.add([da,no])})}function ho(da){return si||(si=!da,Yi(),Ca.list().forEach(([no,po])=>da?po(da):no()),Ca.reset()),da}function mo(da,no,po,us){const{scrollBehavior:Ho}=d;if(!a_||!Ho)return Promise.resolve();const vi=!po&&vX(TL(da.fullPath,0))||(us||!po)&&history.state&&history.state.scroll||null;return om().then(()=>Ho(da,no,vi)).then(wi=>wi&&mX(wi)).catch(wi=>Ma(wi,da,no))}const Ts=da=>K.go(da);let xl;const ko=new Set,ro={currentRoute:jt,listening:!0,addRoute:pr,removeRoute:Mr,clearRoutes:s.clearRoutes,hasRoute:Vr,getRoutes:Tr,resolve:mn,options:d,push:Jn,replace:Bn,go:Ts,back:()=>Ts(-1),forward:()=>Ts(1),beforeEach:pt.add,beforeResolve:_t.add,afterEach:Ot.add,onError:Ni.add,isReady:zo,install(da){da.component("RouterLink",qX),da.component("RouterView",YX),da.config.globalProperties.$router=ro,Object.defineProperty(da.config.globalProperties,"$route",{enumerable:!0,get:()=>zl(jt)}),a_&&!xl&&jt.value===Qv&&(xl=!0,Jn(K.location).catch(us=>{}));const no={};for(const us in Qv)Object.defineProperty(no,us,{get:()=>jt.value[us],enumerable:!0});da.provide(V4,ro),da.provide(lM,JI(no)),da.provide(_A,jt);const po=da.unmount;ko.add(da),da.unmount=function(){ko.delete(da),ko.size<1&&(te=Qv,bi&&bi(),bi=null,jt.value=Qv,xl=!1,si=!1),po()}}};function Ia(da){return da.reduce((no,po)=>no.then(()=>qr(po)),Promise.resolve())}return ro}function pO(){return um(V4)}function mO(d){return um(lM)}function gO(d,s){return function(){return d.apply(s,arguments)}}const{toString:XX}=Object.prototype,{getPrototypeOf:uM}=Object,{iterator:H4,toStringTag:vO}=Symbol,W4=(d=>s=>{const E=XX.call(s);return d[E]||(d[E]=E.slice(8,-1).toLowerCase())})(Object.create(null)),zm=d=>(d=d.toLowerCase(),s=>W4(s)===d),q4=d=>s=>typeof s===d,{isArray:w_}=Array,y_=q4("undefined");function nw(d){return d!==null&&!y_(d)&&d.constructor!==null&&!y_(d.constructor)&&S0(d.constructor.isBuffer)&&d.constructor.isBuffer(d)}const yO=zm("ArrayBuffer");function JX(d){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(d):s=d&&d.buffer&&yO(d.buffer),s}const QX=q4("string"),S0=q4("function"),xO=q4("number"),iw=d=>d!==null&&typeof d=="object",tJ=d=>d===!0||d===!1,t4=d=>{if(W4(d)!=="object")return!1;const s=uM(d);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(vO in d)&&!(H4 in d)},eJ=d=>{if(!iw(d)||nw(d))return!1;try{return Object.keys(d).length===0&&Object.getPrototypeOf(d)===Object.prototype}catch{return!1}},rJ=zm("Date"),nJ=zm("File"),iJ=zm("Blob"),aJ=zm("FileList"),oJ=d=>iw(d)&&S0(d.pipe),sJ=d=>{let s;return d&&(typeof FormData=="function"&&d instanceof FormData||S0(d.append)&&((s=W4(d))==="formdata"||s==="object"&&S0(d.toString)&&d.toString()==="[object FormData]"))},lJ=zm("URLSearchParams"),[uJ,cJ,hJ,fJ]=["ReadableStream","Request","Response","Headers"].map(zm),dJ=d=>d.trim?d.trim():d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function aw(d,s,{allOwnKeys:E=!1}={}){if(d===null||typeof d>"u")return;let B,K;if(typeof d!="object"&&(d=[d]),w_(d))for(B=0,K=d.length;B0;)if(K=E[B],s===K.toLowerCase())return K;return null}const _y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bO=d=>!y_(d)&&d!==_y;function bA(){const{caseless:d,skipUndefined:s}=bO(this)&&this||{},E={},B=(K,pt)=>{const _t=d&&_O(E,pt)||pt;t4(E[_t])&&t4(K)?E[_t]=bA(E[_t],K):t4(K)?E[_t]=bA({},K):w_(K)?E[_t]=K.slice():(!s||!y_(K))&&(E[_t]=K)};for(let K=0,pt=arguments.length;K(aw(s,(K,pt)=>{E&&S0(K)?d[pt]=gO(K,E):d[pt]=K},{allOwnKeys:B}),d),mJ=d=>(d.charCodeAt(0)===65279&&(d=d.slice(1)),d),gJ=(d,s,E,B)=>{d.prototype=Object.create(s.prototype,B),d.prototype.constructor=d,Object.defineProperty(d,"super",{value:s.prototype}),E&&Object.assign(d.prototype,E)},vJ=(d,s,E,B)=>{let K,pt,_t;const Ot={};if(s=s||{},d==null)return s;do{for(K=Object.getOwnPropertyNames(d),pt=K.length;pt-- >0;)_t=K[pt],(!B||B(_t,d,s))&&!Ot[_t]&&(s[_t]=d[_t],Ot[_t]=!0);d=E!==!1&&uM(d)}while(d&&(!E||E(d,s))&&d!==Object.prototype);return s},yJ=(d,s,E)=>{d=String(d),(E===void 0||E>d.length)&&(E=d.length),E-=s.length;const B=d.indexOf(s,E);return B!==-1&&B===E},xJ=d=>{if(!d)return null;if(w_(d))return d;let s=d.length;if(!xO(s))return null;const E=new Array(s);for(;s-- >0;)E[s]=d[s];return E},_J=(d=>s=>d&&s instanceof d)(typeof Uint8Array<"u"&&uM(Uint8Array)),bJ=(d,s)=>{const B=(d&&d[H4]).call(d);let K;for(;(K=B.next())&&!K.done;){const pt=K.value;s.call(d,pt[0],pt[1])}},wJ=(d,s)=>{let E;const B=[];for(;(E=d.exec(s))!==null;)B.push(E);return B},kJ=zm("HTMLFormElement"),TJ=d=>d.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(E,B,K){return B.toUpperCase()+K}),RL=(({hasOwnProperty:d})=>(s,E)=>d.call(s,E))(Object.prototype),AJ=zm("RegExp"),wO=(d,s)=>{const E=Object.getOwnPropertyDescriptors(d),B={};aw(E,(K,pt)=>{let _t;(_t=s(K,pt,d))!==!1&&(B[pt]=_t||K)}),Object.defineProperties(d,B)},MJ=d=>{wO(d,(s,E)=>{if(S0(d)&&["arguments","caller","callee"].indexOf(E)!==-1)return!1;const B=d[E];if(S0(B)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+E+"'")})}})},SJ=(d,s)=>{const E={},B=K=>{K.forEach(pt=>{E[pt]=!0})};return w_(d)?B(d):B(String(d).split(s)),E},EJ=()=>{},CJ=(d,s)=>d!=null&&Number.isFinite(d=+d)?d:s;function LJ(d){return!!(d&&S0(d.append)&&d[vO]==="FormData"&&d[H4])}const PJ=d=>{const s=new Array(10),E=(B,K)=>{if(iw(B)){if(s.indexOf(B)>=0)return;if(nw(B))return B;if(!("toJSON"in B)){s[K]=B;const pt=w_(B)?[]:{};return aw(B,(_t,Ot)=>{const jt=E(_t,K+1);!y_(jt)&&(pt[Ot]=jt)}),s[K]=void 0,pt}}return B};return E(d,0)},IJ=zm("AsyncFunction"),zJ=d=>d&&(iw(d)||S0(d))&&S0(d.then)&&S0(d.catch),kO=((d,s)=>d?setImmediate:s?((E,B)=>(_y.addEventListener("message",({source:K,data:pt})=>{K===_y&&pt===E&&B.length&&B.shift()()},!1),K=>{B.push(K),_y.postMessage(E,"*")}))(`axios@${Math.random()}`,[]):E=>setTimeout(E))(typeof setImmediate=="function",S0(_y.postMessage)),OJ=typeof queueMicrotask<"u"?queueMicrotask.bind(_y):typeof process<"u"&&process.nextTick||kO,DJ=d=>d!=null&&S0(d[H4]),eo={isArray:w_,isArrayBuffer:yO,isBuffer:nw,isFormData:sJ,isArrayBufferView:JX,isString:QX,isNumber:xO,isBoolean:tJ,isObject:iw,isPlainObject:t4,isEmptyObject:eJ,isReadableStream:uJ,isRequest:cJ,isResponse:hJ,isHeaders:fJ,isUndefined:y_,isDate:rJ,isFile:nJ,isBlob:iJ,isRegExp:AJ,isFunction:S0,isStream:oJ,isURLSearchParams:lJ,isTypedArray:_J,isFileList:aJ,forEach:aw,merge:bA,extend:pJ,trim:dJ,stripBOM:mJ,inherits:gJ,toFlatObject:vJ,kindOf:W4,kindOfTest:zm,endsWith:yJ,toArray:xJ,forEachEntry:bJ,matchAll:wJ,isHTMLForm:kJ,hasOwnProperty:RL,hasOwnProp:RL,reduceDescriptors:wO,freezeMethods:MJ,toObjectSet:SJ,toCamelCase:TJ,noop:EJ,toFiniteNumber:CJ,findKey:_O,global:_y,isContextDefined:bO,isSpecCompliantForm:LJ,toJSONObject:PJ,isAsyncFn:IJ,isThenable:zJ,setImmediate:kO,asap:OJ,isIterable:DJ};function Ju(d,s,E,B,K){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=d,this.name="AxiosError",s&&(this.code=s),E&&(this.config=E),B&&(this.request=B),K&&(this.response=K,this.status=K.status?K.status:null)}eo.inherits(Ju,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:eo.toJSONObject(this.config),code:this.code,status:this.status}}});const TO=Ju.prototype,AO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(d=>{AO[d]={value:d}});Object.defineProperties(Ju,AO);Object.defineProperty(TO,"isAxiosError",{value:!0});Ju.from=(d,s,E,B,K,pt)=>{const _t=Object.create(TO);eo.toFlatObject(d,_t,function(he){return he!==Error.prototype},te=>te!=="isAxiosError");const Ot=d&&d.message?d.message:"Error",jt=s==null&&d?d.code:s;return Ju.call(_t,Ot,jt,E,B,K),d&&_t.cause==null&&Object.defineProperty(_t,"cause",{value:d,configurable:!0}),_t.name=d&&d.name||"Error",pt&&Object.assign(_t,pt),_t};const FJ=null;function wA(d){return eo.isPlainObject(d)||eo.isArray(d)}function MO(d){return eo.endsWith(d,"[]")?d.slice(0,-2):d}function BL(d,s,E){return d?d.concat(s).map(function(K,pt){return K=MO(K),!E&&pt?"["+K+"]":K}).join(E?".":""):s}function RJ(d){return eo.isArray(d)&&!d.some(wA)}const BJ=eo.toFlatObject(eo,{},null,function(s){return/^is[A-Z]/.test(s)});function $4(d,s,E){if(!eo.isObject(d))throw new TypeError("target must be an object");s=s||new FormData,E=eo.toFlatObject(E,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Tr,Vr){return!eo.isUndefined(Vr[Tr])});const B=E.metaTokens,K=E.visitor||he,pt=E.dots,_t=E.indexes,jt=(E.Blob||typeof Blob<"u"&&Blob)&&eo.isSpecCompliantForm(s);if(!eo.isFunction(K))throw new TypeError("visitor must be a function");function te(Mr){if(Mr===null)return"";if(eo.isDate(Mr))return Mr.toISOString();if(eo.isBoolean(Mr))return Mr.toString();if(!jt&&eo.isBlob(Mr))throw new Ju("Blob is not supported. Use a Buffer instead.");return eo.isArrayBuffer(Mr)||eo.isTypedArray(Mr)?jt&&typeof Blob=="function"?new Blob([Mr]):Buffer.from(Mr):Mr}function he(Mr,Tr,Vr){let mn=Mr;if(Mr&&!Vr&&typeof Mr=="object"){if(eo.endsWith(Tr,"{}"))Tr=B?Tr:Tr.slice(0,-2),Mr=JSON.stringify(Mr);else if(eo.isArray(Mr)&&RJ(Mr)||(eo.isFileList(Mr)||eo.endsWith(Tr,"[]"))&&(mn=eo.toArray(Mr)))return Tr=MO(Tr),mn.forEach(function(cn,Jn){!(eo.isUndefined(cn)||cn===null)&&s.append(_t===!0?BL([Tr],Jn,pt):_t===null?Tr:Tr+"[]",te(cn))}),!1}return wA(Mr)?!0:(s.append(BL(Vr,Tr,pt),te(Mr)),!1)}const De=[],er=Object.assign(BJ,{defaultVisitor:he,convertValue:te,isVisitable:wA});function pr(Mr,Tr){if(!eo.isUndefined(Mr)){if(De.indexOf(Mr)!==-1)throw Error("Circular reference detected in "+Tr.join("."));De.push(Mr),eo.forEach(Mr,function(mn,Dt){(!(eo.isUndefined(mn)||mn===null)&&K.call(s,mn,eo.isString(Dt)?Dt.trim():Dt,Tr,er))===!0&&pr(mn,Tr?Tr.concat(Dt):[Dt])}),De.pop()}}if(!eo.isObject(d))throw new TypeError("data must be an object");return pr(d),s}function NL(d){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(d).replace(/[!'()~]|%20|%00/g,function(B){return s[B]})}function cM(d,s){this._pairs=[],d&&$4(d,this,s)}const SO=cM.prototype;SO.append=function(s,E){this._pairs.push([s,E])};SO.toString=function(s){const E=s?function(B){return s.call(this,B,NL)}:NL;return this._pairs.map(function(K){return E(K[0])+"="+E(K[1])},"").join("&")};function NJ(d){return encodeURIComponent(d).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function EO(d,s,E){if(!s)return d;const B=E&&E.encode||NJ;eo.isFunction(E)&&(E={serialize:E});const K=E&&E.serialize;let pt;if(K?pt=K(s,E):pt=eo.isURLSearchParams(s)?s.toString():new cM(s,E).toString(B),pt){const _t=d.indexOf("#");_t!==-1&&(d=d.slice(0,_t)),d+=(d.indexOf("?")===-1?"?":"&")+pt}return d}class jL{constructor(){this.handlers=[]}use(s,E,B){return this.handlers.push({fulfilled:s,rejected:E,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){eo.forEach(this.handlers,function(B){B!==null&&s(B)})}}const CO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jJ=typeof URLSearchParams<"u"?URLSearchParams:cM,UJ=typeof FormData<"u"?FormData:null,VJ=typeof Blob<"u"?Blob:null,HJ={isBrowser:!0,classes:{URLSearchParams:jJ,FormData:UJ,Blob:VJ},protocols:["http","https","file","blob","url","data"]},hM=typeof window<"u"&&typeof document<"u",kA=typeof navigator=="object"&&navigator||void 0,WJ=hM&&(!kA||["ReactNative","NativeScript","NS"].indexOf(kA.product)<0),qJ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$J=hM&&window.location.href||"http://localhost",ZJ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hM,hasStandardBrowserEnv:WJ,hasStandardBrowserWebWorkerEnv:qJ,navigator:kA,origin:$J},Symbol.toStringTag,{value:"Module"})),Xp={...ZJ,...HJ};function GJ(d,s){return $4(d,new Xp.classes.URLSearchParams,{visitor:function(E,B,K,pt){return Xp.isNode&&eo.isBuffer(E)?(this.append(B,E.toString("base64")),!1):pt.defaultVisitor.apply(this,arguments)},...s})}function YJ(d){return eo.matchAll(/\w+|\[(\w*)]/g,d).map(s=>s[0]==="[]"?"":s[1]||s[0])}function KJ(d){const s={},E=Object.keys(d);let B;const K=E.length;let pt;for(B=0;B=E.length;return _t=!_t&&eo.isArray(K)?K.length:_t,jt?(eo.hasOwnProp(K,_t)?K[_t]=[K[_t],B]:K[_t]=B,!Ot):((!K[_t]||!eo.isObject(K[_t]))&&(K[_t]=[]),s(E,B,K[_t],pt)&&eo.isArray(K[_t])&&(K[_t]=KJ(K[_t])),!Ot)}if(eo.isFormData(d)&&eo.isFunction(d.entries)){const E={};return eo.forEachEntry(d,(B,K)=>{s(YJ(B),K,E,0)}),E}return null}function XJ(d,s,E){if(eo.isString(d))try{return(s||JSON.parse)(d),eo.trim(d)}catch(B){if(B.name!=="SyntaxError")throw B}return(E||JSON.stringify)(d)}const ow={transitional:CO,adapter:["xhr","http","fetch"],transformRequest:[function(s,E){const B=E.getContentType()||"",K=B.indexOf("application/json")>-1,pt=eo.isObject(s);if(pt&&eo.isHTMLForm(s)&&(s=new FormData(s)),eo.isFormData(s))return K?JSON.stringify(LO(s)):s;if(eo.isArrayBuffer(s)||eo.isBuffer(s)||eo.isStream(s)||eo.isFile(s)||eo.isBlob(s)||eo.isReadableStream(s))return s;if(eo.isArrayBufferView(s))return s.buffer;if(eo.isURLSearchParams(s))return E.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let Ot;if(pt){if(B.indexOf("application/x-www-form-urlencoded")>-1)return GJ(s,this.formSerializer).toString();if((Ot=eo.isFileList(s))||B.indexOf("multipart/form-data")>-1){const jt=this.env&&this.env.FormData;return $4(Ot?{"files[]":s}:s,jt&&new jt,this.formSerializer)}}return pt||K?(E.setContentType("application/json",!1),XJ(s)):s}],transformResponse:[function(s){const E=this.transitional||ow.transitional,B=E&&E.forcedJSONParsing,K=this.responseType==="json";if(eo.isResponse(s)||eo.isReadableStream(s))return s;if(s&&eo.isString(s)&&(B&&!this.responseType||K)){const _t=!(E&&E.silentJSONParsing)&&K;try{return JSON.parse(s,this.parseReviver)}catch(Ot){if(_t)throw Ot.name==="SyntaxError"?Ju.from(Ot,Ju.ERR_BAD_RESPONSE,this,null,this.response):Ot}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xp.classes.FormData,Blob:Xp.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};eo.forEach(["delete","get","head","post","put","patch"],d=>{ow.headers[d]={}});const JJ=eo.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),QJ=d=>{const s={};let E,B,K;return d&&d.split(` +`).forEach(function(_t){K=_t.indexOf(":"),E=_t.substring(0,K).trim().toLowerCase(),B=_t.substring(K+1).trim(),!(!E||s[E]&&JJ[E])&&(E==="set-cookie"?s[E]?s[E].push(B):s[E]=[B]:s[E]=s[E]?s[E]+", "+B:B)}),s},UL=Symbol("internals");function n2(d){return d&&String(d).trim().toLowerCase()}function e4(d){return d===!1||d==null?d:eo.isArray(d)?d.map(e4):String(d)}function tQ(d){const s=Object.create(null),E=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let B;for(;B=E.exec(d);)s[B[1]]=B[2];return s}const eQ=d=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(d.trim());function O8(d,s,E,B,K){if(eo.isFunction(B))return B.call(this,s,E);if(K&&(s=E),!!eo.isString(s)){if(eo.isString(B))return s.indexOf(B)!==-1;if(eo.isRegExp(B))return B.test(s)}}function rQ(d){return d.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,E,B)=>E.toUpperCase()+B)}function nQ(d,s){const E=eo.toCamelCase(" "+s);["get","set","has"].forEach(B=>{Object.defineProperty(d,B+E,{value:function(K,pt,_t){return this[B].call(this,s,K,pt,_t)},configurable:!0})})}let E0=class{constructor(s){s&&this.set(s)}set(s,E,B){const K=this;function pt(Ot,jt,te){const he=n2(jt);if(!he)throw new Error("header name must be a non-empty string");const De=eo.findKey(K,he);(!De||K[De]===void 0||te===!0||te===void 0&&K[De]!==!1)&&(K[De||jt]=e4(Ot))}const _t=(Ot,jt)=>eo.forEach(Ot,(te,he)=>pt(te,he,jt));if(eo.isPlainObject(s)||s instanceof this.constructor)_t(s,E);else if(eo.isString(s)&&(s=s.trim())&&!eQ(s))_t(QJ(s),E);else if(eo.isObject(s)&&eo.isIterable(s)){let Ot={},jt,te;for(const he of s){if(!eo.isArray(he))throw TypeError("Object iterator must return a key-value pair");Ot[te=he[0]]=(jt=Ot[te])?eo.isArray(jt)?[...jt,he[1]]:[jt,he[1]]:he[1]}_t(Ot,E)}else s!=null&&pt(E,s,B);return this}get(s,E){if(s=n2(s),s){const B=eo.findKey(this,s);if(B){const K=this[B];if(!E)return K;if(E===!0)return tQ(K);if(eo.isFunction(E))return E.call(this,K,B);if(eo.isRegExp(E))return E.exec(K);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,E){if(s=n2(s),s){const B=eo.findKey(this,s);return!!(B&&this[B]!==void 0&&(!E||O8(this,this[B],B,E)))}return!1}delete(s,E){const B=this;let K=!1;function pt(_t){if(_t=n2(_t),_t){const Ot=eo.findKey(B,_t);Ot&&(!E||O8(B,B[Ot],Ot,E))&&(delete B[Ot],K=!0)}}return eo.isArray(s)?s.forEach(pt):pt(s),K}clear(s){const E=Object.keys(this);let B=E.length,K=!1;for(;B--;){const pt=E[B];(!s||O8(this,this[pt],pt,s,!0))&&(delete this[pt],K=!0)}return K}normalize(s){const E=this,B={};return eo.forEach(this,(K,pt)=>{const _t=eo.findKey(B,pt);if(_t){E[_t]=e4(K),delete E[pt];return}const Ot=s?rQ(pt):String(pt).trim();Ot!==pt&&delete E[pt],E[Ot]=e4(K),B[Ot]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const E=Object.create(null);return eo.forEach(this,(B,K)=>{B!=null&&B!==!1&&(E[K]=s&&eo.isArray(B)?B.join(", "):B)}),E}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,E])=>s+": "+E).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...E){const B=new this(s);return E.forEach(K=>B.set(K)),B}static accessor(s){const B=(this[UL]=this[UL]={accessors:{}}).accessors,K=this.prototype;function pt(_t){const Ot=n2(_t);B[Ot]||(nQ(K,_t),B[Ot]=!0)}return eo.isArray(s)?s.forEach(pt):pt(s),this}};E0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);eo.reduceDescriptors(E0.prototype,({value:d},s)=>{let E=s[0].toUpperCase()+s.slice(1);return{get:()=>d,set(B){this[E]=B}}});eo.freezeMethods(E0);function D8(d,s){const E=this||ow,B=s||E,K=E0.from(B.headers);let pt=B.data;return eo.forEach(d,function(Ot){pt=Ot.call(E,pt,K.normalize(),s?s.status:void 0)}),K.normalize(),pt}function PO(d){return!!(d&&d.__CANCEL__)}function k_(d,s,E){Ju.call(this,d??"canceled",Ju.ERR_CANCELED,s,E),this.name="CanceledError"}eo.inherits(k_,Ju,{__CANCEL__:!0});function IO(d,s,E){const B=E.config.validateStatus;!E.status||!B||B(E.status)?d(E):s(new Ju("Request failed with status code "+E.status,[Ju.ERR_BAD_REQUEST,Ju.ERR_BAD_RESPONSE][Math.floor(E.status/100)-4],E.config,E.request,E))}function iQ(d){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(d);return s&&s[1]||""}function aQ(d,s){d=d||10;const E=new Array(d),B=new Array(d);let K=0,pt=0,_t;return s=s!==void 0?s:1e3,function(jt){const te=Date.now(),he=B[pt];_t||(_t=te),E[K]=jt,B[K]=te;let De=pt,er=0;for(;De!==K;)er+=E[De++],De=De%d;if(K=(K+1)%d,K===pt&&(pt=(pt+1)%d),te-_t{E=he,K=null,pt&&(clearTimeout(pt),pt=null),d(...te)};return[(...te)=>{const he=Date.now(),De=he-E;De>=B?_t(te,he):(K=te,pt||(pt=setTimeout(()=>{pt=null,_t(K)},B-De)))},()=>K&&_t(K)]}const v4=(d,s,E=3)=>{let B=0;const K=aQ(50,250);return oQ(pt=>{const _t=pt.loaded,Ot=pt.lengthComputable?pt.total:void 0,jt=_t-B,te=K(jt),he=_t<=Ot;B=_t;const De={loaded:_t,total:Ot,progress:Ot?_t/Ot:void 0,bytes:jt,rate:te||void 0,estimated:te&&Ot&&he?(Ot-_t)/te:void 0,event:pt,lengthComputable:Ot!=null,[s?"download":"upload"]:!0};d(De)},E)},VL=(d,s)=>{const E=d!=null;return[B=>s[0]({lengthComputable:E,total:d,loaded:B}),s[1]]},HL=d=>(...s)=>eo.asap(()=>d(...s)),sQ=Xp.hasStandardBrowserEnv?((d,s)=>E=>(E=new URL(E,Xp.origin),d.protocol===E.protocol&&d.host===E.host&&(s||d.port===E.port)))(new URL(Xp.origin),Xp.navigator&&/(msie|trident)/i.test(Xp.navigator.userAgent)):()=>!0,lQ=Xp.hasStandardBrowserEnv?{write(d,s,E,B,K,pt,_t){if(typeof document>"u")return;const Ot=[`${d}=${encodeURIComponent(s)}`];eo.isNumber(E)&&Ot.push(`expires=${new Date(E).toUTCString()}`),eo.isString(B)&&Ot.push(`path=${B}`),eo.isString(K)&&Ot.push(`domain=${K}`),pt===!0&&Ot.push("secure"),eo.isString(_t)&&Ot.push(`SameSite=${_t}`),document.cookie=Ot.join("; ")},read(d){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+d+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(d){this.write(d,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function uQ(d){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(d)}function cQ(d,s){return s?d.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):d}function zO(d,s,E){let B=!uQ(s);return d&&(B||E==!1)?cQ(d,s):s}const WL=d=>d instanceof E0?{...d}:d;function Ey(d,s){s=s||{};const E={};function B(te,he,De,er){return eo.isPlainObject(te)&&eo.isPlainObject(he)?eo.merge.call({caseless:er},te,he):eo.isPlainObject(he)?eo.merge({},he):eo.isArray(he)?he.slice():he}function K(te,he,De,er){if(eo.isUndefined(he)){if(!eo.isUndefined(te))return B(void 0,te,De,er)}else return B(te,he,De,er)}function pt(te,he){if(!eo.isUndefined(he))return B(void 0,he)}function _t(te,he){if(eo.isUndefined(he)){if(!eo.isUndefined(te))return B(void 0,te)}else return B(void 0,he)}function Ot(te,he,De){if(De in s)return B(te,he);if(De in d)return B(void 0,te)}const jt={url:pt,method:pt,data:pt,baseURL:_t,transformRequest:_t,transformResponse:_t,paramsSerializer:_t,timeout:_t,timeoutMessage:_t,withCredentials:_t,withXSRFToken:_t,adapter:_t,responseType:_t,xsrfCookieName:_t,xsrfHeaderName:_t,onUploadProgress:_t,onDownloadProgress:_t,decompress:_t,maxContentLength:_t,maxBodyLength:_t,beforeRedirect:_t,transport:_t,httpAgent:_t,httpsAgent:_t,cancelToken:_t,socketPath:_t,responseEncoding:_t,validateStatus:Ot,headers:(te,he,De)=>K(WL(te),WL(he),De,!0)};return eo.forEach(Object.keys({...d,...s}),function(he){const De=jt[he]||K,er=De(d[he],s[he],he);eo.isUndefined(er)&&De!==Ot||(E[he]=er)}),E}const OO=d=>{const s=Ey({},d);let{data:E,withXSRFToken:B,xsrfHeaderName:K,xsrfCookieName:pt,headers:_t,auth:Ot}=s;if(s.headers=_t=E0.from(_t),s.url=EO(zO(s.baseURL,s.url,s.allowAbsoluteUrls),d.params,d.paramsSerializer),Ot&&_t.set("Authorization","Basic "+btoa((Ot.username||"")+":"+(Ot.password?unescape(encodeURIComponent(Ot.password)):""))),eo.isFormData(E)){if(Xp.hasStandardBrowserEnv||Xp.hasStandardBrowserWebWorkerEnv)_t.setContentType(void 0);else if(eo.isFunction(E.getHeaders)){const jt=E.getHeaders(),te=["content-type","content-length"];Object.entries(jt).forEach(([he,De])=>{te.includes(he.toLowerCase())&&_t.set(he,De)})}}if(Xp.hasStandardBrowserEnv&&(B&&eo.isFunction(B)&&(B=B(s)),B||B!==!1&&sQ(s.url))){const jt=K&&pt&&lQ.read(pt);jt&&_t.set(K,jt)}return s},hQ=typeof XMLHttpRequest<"u",fQ=hQ&&function(d){return new Promise(function(E,B){const K=OO(d);let pt=K.data;const _t=E0.from(K.headers).normalize();let{responseType:Ot,onUploadProgress:jt,onDownloadProgress:te}=K,he,De,er,pr,Mr;function Tr(){pr&&pr(),Mr&&Mr(),K.cancelToken&&K.cancelToken.unsubscribe(he),K.signal&&K.signal.removeEventListener("abort",he)}let Vr=new XMLHttpRequest;Vr.open(K.method.toUpperCase(),K.url,!0),Vr.timeout=K.timeout;function mn(){if(!Vr)return;const cn=E0.from("getAllResponseHeaders"in Vr&&Vr.getAllResponseHeaders()),Bn={data:!Ot||Ot==="text"||Ot==="json"?Vr.responseText:Vr.response,status:Vr.status,statusText:Vr.statusText,headers:cn,config:d,request:Vr};IO(function(Wi){E(Wi),Tr()},function(Wi){B(Wi),Tr()},Bn),Vr=null}"onloadend"in Vr?Vr.onloadend=mn:Vr.onreadystatechange=function(){!Vr||Vr.readyState!==4||Vr.status===0&&!(Vr.responseURL&&Vr.responseURL.indexOf("file:")===0)||setTimeout(mn)},Vr.onabort=function(){Vr&&(B(new Ju("Request aborted",Ju.ECONNABORTED,d,Vr)),Vr=null)},Vr.onerror=function(Jn){const Bn=Jn&&Jn.message?Jn.message:"Network Error",ni=new Ju(Bn,Ju.ERR_NETWORK,d,Vr);ni.event=Jn||null,B(ni),Vr=null},Vr.ontimeout=function(){let Jn=K.timeout?"timeout of "+K.timeout+"ms exceeded":"timeout exceeded";const Bn=K.transitional||CO;K.timeoutErrorMessage&&(Jn=K.timeoutErrorMessage),B(new Ju(Jn,Bn.clarifyTimeoutError?Ju.ETIMEDOUT:Ju.ECONNABORTED,d,Vr)),Vr=null},pt===void 0&&_t.setContentType(null),"setRequestHeader"in Vr&&eo.forEach(_t.toJSON(),function(Jn,Bn){Vr.setRequestHeader(Bn,Jn)}),eo.isUndefined(K.withCredentials)||(Vr.withCredentials=!!K.withCredentials),Ot&&Ot!=="json"&&(Vr.responseType=K.responseType),te&&([er,Mr]=v4(te,!0),Vr.addEventListener("progress",er)),jt&&Vr.upload&&([De,pr]=v4(jt),Vr.upload.addEventListener("progress",De),Vr.upload.addEventListener("loadend",pr)),(K.cancelToken||K.signal)&&(he=cn=>{Vr&&(B(!cn||cn.type?new k_(null,d,Vr):cn),Vr.abort(),Vr=null)},K.cancelToken&&K.cancelToken.subscribe(he),K.signal&&(K.signal.aborted?he():K.signal.addEventListener("abort",he)));const Dt=iQ(K.url);if(Dt&&Xp.protocols.indexOf(Dt)===-1){B(new Ju("Unsupported protocol "+Dt+":",Ju.ERR_BAD_REQUEST,d));return}Vr.send(pt||null)})},dQ=(d,s)=>{const{length:E}=d=d?d.filter(Boolean):[];if(s||E){let B=new AbortController,K;const pt=function(te){if(!K){K=!0,Ot();const he=te instanceof Error?te:this.reason;B.abort(he instanceof Ju?he:new k_(he instanceof Error?he.message:he))}};let _t=s&&setTimeout(()=>{_t=null,pt(new Ju(`timeout ${s} of ms exceeded`,Ju.ETIMEDOUT))},s);const Ot=()=>{d&&(_t&&clearTimeout(_t),_t=null,d.forEach(te=>{te.unsubscribe?te.unsubscribe(pt):te.removeEventListener("abort",pt)}),d=null)};d.forEach(te=>te.addEventListener("abort",pt));const{signal:jt}=B;return jt.unsubscribe=()=>eo.asap(Ot),jt}},pQ=function*(d,s){let E=d.byteLength;if(E{const K=mQ(d,s);let pt=0,_t,Ot=jt=>{_t||(_t=!0,B&&B(jt))};return new ReadableStream({async pull(jt){try{const{done:te,value:he}=await K.next();if(te){Ot(),jt.close();return}let De=he.byteLength;if(E){let er=pt+=De;E(er)}jt.enqueue(new Uint8Array(he))}catch(te){throw Ot(te),te}},cancel(jt){return Ot(jt),K.return()}},{highWaterMark:2})},$L=64*1024,{isFunction:P5}=eo,vQ=(({Request:d,Response:s})=>({Request:d,Response:s}))(eo.global),{ReadableStream:ZL,TextEncoder:GL}=eo.global,YL=(d,...s)=>{try{return!!d(...s)}catch{return!1}},yQ=d=>{d=eo.merge.call({skipUndefined:!0},vQ,d);const{fetch:s,Request:E,Response:B}=d,K=s?P5(s):typeof fetch=="function",pt=P5(E),_t=P5(B);if(!K)return!1;const Ot=K&&P5(ZL),jt=K&&(typeof GL=="function"?(Mr=>Tr=>Mr.encode(Tr))(new GL):async Mr=>new Uint8Array(await new E(Mr).arrayBuffer())),te=pt&&Ot&&YL(()=>{let Mr=!1;const Tr=new E(Xp.origin,{body:new ZL,method:"POST",get duplex(){return Mr=!0,"half"}}).headers.has("Content-Type");return Mr&&!Tr}),he=_t&&Ot&&YL(()=>eo.isReadableStream(new B("").body)),De={stream:he&&(Mr=>Mr.body)};K&&["text","arrayBuffer","blob","formData","stream"].forEach(Mr=>{!De[Mr]&&(De[Mr]=(Tr,Vr)=>{let mn=Tr&&Tr[Mr];if(mn)return mn.call(Tr);throw new Ju(`Response type '${Mr}' is not supported`,Ju.ERR_NOT_SUPPORT,Vr)})});const er=async Mr=>{if(Mr==null)return 0;if(eo.isBlob(Mr))return Mr.size;if(eo.isSpecCompliantForm(Mr))return(await new E(Xp.origin,{method:"POST",body:Mr}).arrayBuffer()).byteLength;if(eo.isArrayBufferView(Mr)||eo.isArrayBuffer(Mr))return Mr.byteLength;if(eo.isURLSearchParams(Mr)&&(Mr=Mr+""),eo.isString(Mr))return(await jt(Mr)).byteLength},pr=async(Mr,Tr)=>{const Vr=eo.toFiniteNumber(Mr.getContentLength());return Vr??er(Tr)};return async Mr=>{let{url:Tr,method:Vr,data:mn,signal:Dt,cancelToken:cn,timeout:Jn,onDownloadProgress:Bn,onUploadProgress:ni,responseType:Wi,headers:Un,withCredentials:qr="same-origin",fetchOptions:Di}=OO(Mr),Fi=s||fetch;Wi=Wi?(Wi+"").toLowerCase():"text";let Pi=dQ([Dt,cn&&cn.toAbortSignal()],Jn),bi=null;const Yi=Pi&&Pi.unsubscribe&&(()=>{Pi.unsubscribe()});let Ca;try{if(ni&&te&&Vr!=="get"&&Vr!=="head"&&(Ca=await pr(Un,mn))!==0){let mo=new E(Tr,{method:"POST",body:mn,duplex:"half"}),Ts;if(eo.isFormData(mn)&&(Ts=mo.headers.get("content-type"))&&Un.setContentType(Ts),mo.body){const[xl,ko]=VL(Ca,v4(HL(ni)));mn=qL(mo.body,$L,xl,ko)}}eo.isString(qr)||(qr=qr?"include":"omit");const Ni=pt&&"credentials"in E.prototype,si={...Di,signal:Pi,method:Vr.toUpperCase(),headers:Un.normalize().toJSON(),body:mn,duplex:"half",credentials:Ni?qr:void 0};bi=pt&&new E(Tr,si);let Ma=await(pt?Fi(bi,Di):Fi(Tr,si));const zo=he&&(Wi==="stream"||Wi==="response");if(he&&(Bn||zo&&Yi)){const mo={};["status","statusText","headers"].forEach(ro=>{mo[ro]=Ma[ro]});const Ts=eo.toFiniteNumber(Ma.headers.get("content-length")),[xl,ko]=Bn&&VL(Ts,v4(HL(Bn),!0))||[];Ma=new B(qL(Ma.body,$L,xl,()=>{ko&&ko(),Yi&&Yi()}),mo)}Wi=Wi||"text";let ho=await De[eo.findKey(De,Wi)||"text"](Ma,Mr);return!zo&&Yi&&Yi(),await new Promise((mo,Ts)=>{IO(mo,Ts,{data:ho,headers:E0.from(Ma.headers),status:Ma.status,statusText:Ma.statusText,config:Mr,request:bi})})}catch(Ni){throw Yi&&Yi(),Ni&&Ni.name==="TypeError"&&/Load failed|fetch/i.test(Ni.message)?Object.assign(new Ju("Network Error",Ju.ERR_NETWORK,Mr,bi),{cause:Ni.cause||Ni}):Ju.from(Ni,Ni&&Ni.code,Mr,bi)}}},xQ=new Map,DO=d=>{let s=d&&d.env||{};const{fetch:E,Request:B,Response:K}=s,pt=[B,K,E];let _t=pt.length,Ot=_t,jt,te,he=xQ;for(;Ot--;)jt=pt[Ot],te=he.get(jt),te===void 0&&he.set(jt,te=Ot?new Map:yQ(s)),he=te;return te};DO();const fM={http:FJ,xhr:fQ,fetch:{get:DO}};eo.forEach(fM,(d,s)=>{if(d){try{Object.defineProperty(d,"name",{value:s})}catch{}Object.defineProperty(d,"adapterName",{value:s})}});const KL=d=>`- ${d}`,_Q=d=>eo.isFunction(d)||d===null||d===!1;function bQ(d,s){d=eo.isArray(d)?d:[d];const{length:E}=d;let B,K;const pt={};for(let _t=0;_t`adapter ${jt} `+(te===!1?"is not supported by the environment":"is not available in the build"));let Ot=E?_t.length>1?`since : +`+_t.map(KL).join(` +`):" "+KL(_t[0]):"as no adapter specified";throw new Ju("There is no suitable adapter to dispatch the request "+Ot,"ERR_NOT_SUPPORT")}return K}const FO={getAdapter:bQ,adapters:fM};function F8(d){if(d.cancelToken&&d.cancelToken.throwIfRequested(),d.signal&&d.signal.aborted)throw new k_(null,d)}function XL(d){return F8(d),d.headers=E0.from(d.headers),d.data=D8.call(d,d.transformRequest),["post","put","patch"].indexOf(d.method)!==-1&&d.headers.setContentType("application/x-www-form-urlencoded",!1),FO.getAdapter(d.adapter||ow.adapter,d)(d).then(function(B){return F8(d),B.data=D8.call(d,d.transformResponse,B),B.headers=E0.from(B.headers),B},function(B){return PO(B)||(F8(d),B&&B.response&&(B.response.data=D8.call(d,d.transformResponse,B.response),B.response.headers=E0.from(B.response.headers))),Promise.reject(B)})}const RO="1.13.2",Z4={};["object","boolean","number","function","string","symbol"].forEach((d,s)=>{Z4[d]=function(B){return typeof B===d||"a"+(s<1?"n ":" ")+d}});const JL={};Z4.transitional=function(s,E,B){function K(pt,_t){return"[Axios v"+RO+"] Transitional option '"+pt+"'"+_t+(B?". "+B:"")}return(pt,_t,Ot)=>{if(s===!1)throw new Ju(K(_t," has been removed"+(E?" in "+E:"")),Ju.ERR_DEPRECATED);return E&&!JL[_t]&&(JL[_t]=!0,console.warn(K(_t," has been deprecated since v"+E+" and will be removed in the near future"))),s?s(pt,_t,Ot):!0}};Z4.spelling=function(s){return(E,B)=>(console.warn(`${B} is likely a misspelling of ${s}`),!0)};function wQ(d,s,E){if(typeof d!="object")throw new Ju("options must be an object",Ju.ERR_BAD_OPTION_VALUE);const B=Object.keys(d);let K=B.length;for(;K-- >0;){const pt=B[K],_t=s[pt];if(_t){const Ot=d[pt],jt=Ot===void 0||_t(Ot,pt,d);if(jt!==!0)throw new Ju("option "+pt+" must be "+jt,Ju.ERR_BAD_OPTION_VALUE);continue}if(E!==!0)throw new Ju("Unknown option "+pt,Ju.ERR_BAD_OPTION)}}const r4={assertOptions:wQ,validators:Z4},ig=r4.validators;let Ty=class{constructor(s){this.defaults=s||{},this.interceptors={request:new jL,response:new jL}}async request(s,E){try{return await this._request(s,E)}catch(B){if(B instanceof Error){let K={};Error.captureStackTrace?Error.captureStackTrace(K):K=new Error;const pt=K.stack?K.stack.replace(/^.+\n/,""):"";try{B.stack?pt&&!String(B.stack).endsWith(pt.replace(/^.+\n.+\n/,""))&&(B.stack+=` +`+pt):B.stack=pt}catch{}}throw B}}_request(s,E){typeof s=="string"?(E=E||{},E.url=s):E=s||{},E=Ey(this.defaults,E);const{transitional:B,paramsSerializer:K,headers:pt}=E;B!==void 0&&r4.assertOptions(B,{silentJSONParsing:ig.transitional(ig.boolean),forcedJSONParsing:ig.transitional(ig.boolean),clarifyTimeoutError:ig.transitional(ig.boolean)},!1),K!=null&&(eo.isFunction(K)?E.paramsSerializer={serialize:K}:r4.assertOptions(K,{encode:ig.function,serialize:ig.function},!0)),E.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?E.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:E.allowAbsoluteUrls=!0),r4.assertOptions(E,{baseUrl:ig.spelling("baseURL"),withXsrfToken:ig.spelling("withXSRFToken")},!0),E.method=(E.method||this.defaults.method||"get").toLowerCase();let _t=pt&&eo.merge(pt.common,pt[E.method]);pt&&eo.forEach(["delete","get","head","post","put","patch","common"],Mr=>{delete pt[Mr]}),E.headers=E0.concat(_t,pt);const Ot=[];let jt=!0;this.interceptors.request.forEach(function(Tr){typeof Tr.runWhen=="function"&&Tr.runWhen(E)===!1||(jt=jt&&Tr.synchronous,Ot.unshift(Tr.fulfilled,Tr.rejected))});const te=[];this.interceptors.response.forEach(function(Tr){te.push(Tr.fulfilled,Tr.rejected)});let he,De=0,er;if(!jt){const Mr=[XL.bind(this),void 0];for(Mr.unshift(...Ot),Mr.push(...te),er=Mr.length,he=Promise.resolve(E);De{if(!B._listeners)return;let pt=B._listeners.length;for(;pt-- >0;)B._listeners[pt](K);B._listeners=null}),this.promise.then=K=>{let pt;const _t=new Promise(Ot=>{B.subscribe(Ot),pt=Ot}).then(K);return _t.cancel=function(){B.unsubscribe(pt)},_t},s(function(pt,_t,Ot){B.reason||(B.reason=new k_(pt,_t,Ot),E(B.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const E=this._listeners.indexOf(s);E!==-1&&this._listeners.splice(E,1)}toAbortSignal(){const s=new AbortController,E=B=>{s.abort(B)};return this.subscribe(E),s.signal.unsubscribe=()=>this.unsubscribe(E),s.signal}static source(){let s;return{token:new BO(function(K){s=K}),cancel:s}}};function TQ(d){return function(E){return d.apply(null,E)}}function AQ(d){return eo.isObject(d)&&d.isAxiosError===!0}const TA={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(TA).forEach(([d,s])=>{TA[s]=d});function NO(d){const s=new Ty(d),E=gO(Ty.prototype.request,s);return eo.extend(E,Ty.prototype,s,{allOwnKeys:!0}),eo.extend(E,s,null,{allOwnKeys:!0}),E.create=function(K){return NO(Ey(d,K))},E}const _d=NO(ow);_d.Axios=Ty;_d.CanceledError=k_;_d.CancelToken=kQ;_d.isCancel=PO;_d.VERSION=RO;_d.toFormData=$4;_d.AxiosError=Ju;_d.Cancel=_d.CanceledError;_d.all=function(s){return Promise.all(s)};_d.spread=TQ;_d.isAxiosError=AQ;_d.mergeConfig=Ey;_d.AxiosHeaders=E0;_d.formToJSON=d=>LO(eo.isHTMLForm(d)?new FormData(d):d);_d.getAdapter=FO.getAdapter;_d.HttpStatusCode=TA;_d.default=_d;const{Axios:E1t,AxiosError:C1t,CanceledError:L1t,isCancel:P1t,CancelToken:I1t,VERSION:z1t,all:O1t,Cancel:D1t,isAxiosError:F1t,spread:R1t,toFormData:B1t,AxiosHeaders:N1t,HttpStatusCode:j1t,formToJSON:U1t,getAdapter:V1t,mergeConfig:H1t}=_d,MQ="/api",SQ="",EQ=MQ,CQ=SQ,yy=_d.create({baseURL:EQ,timeout:5e3,headers:{"Content-Type":"application/json"}});yy.interceptors.request.use(d=>d,d=>(console.error("API Request Error:",d),Promise.reject(d)));yy.interceptors.response.use(d=>d,d=>(console.error("API Response Error:",d.response?.data||d.message),Promise.reject(d)));class Ah{static async get(s,E){try{return(await yy.get(s,{params:E})).data}catch(B){throw this.handleError(B)}}static async post(s,E,B){try{return(await yy.post(s,E,B)).data}catch(K){throw this.handleError(K)}}static async put(s,E,B){try{return(await yy.put(s,E,B)).data}catch(K){throw this.handleError(K)}}static async delete(s,E){try{return(await yy.delete(s,E)).data}catch(B){throw this.handleError(B)}}static async getTransportKeys(){return this.get("transport_keys")}static async createTransportKey(s,E,B,K,pt){const _t={name:s,flood_policy:E,parent_id:K,last_used:pt};return B!==void 0&&(_t.transport_key=B),this.post("transport_keys",_t)}static async getTransportKey(s){return this.get(`transport_key/${s}`)}static async updateTransportKey(s,E,B,K,pt,_t){return this.put(`transport_key/${s}`,{name:E,flood_policy:B,transport_key:K,parent_id:pt,last_used:_t})}static async deleteTransportKey(s){return this.delete(`transport_key/${s}`)}static async updateGlobalFloodPolicy(s){return this.post("global_flood_policy",{global_flood_allow:s})}static async getLogs(){try{return(await yy.get("logs")).data}catch(s){throw this.handleError(s)}}static async deleteAdvert(s){return this.delete(`advert/${s}`)}static async pingNeighbor(s){return this.post("ping_neighbor",s)}static handleError(s){if(_d.isAxiosError(s)){if(s.response){const E=s.response.data?.error||s.response.data?.message||`HTTP ${s.response.status}`;return new Error(E)}else if(s.request)return new Error("Network error - no response received")}return new Error(s instanceof Error?s.message:"Unknown error occurred")}}const Om=oM("system",()=>{const d=Ga(null),s=Ga(!1),E=Ga(null),B=Ga(null),K=Ga("forward"),pt=Ga(!0),_t=Ga(0),Ot=Ga(10),jt=Ga(!1),te=$o(()=>d.value?.config?.node_name??"Unknown"),he=$o(()=>{const bi=d.value?.public_key;return!bi||bi==="Unknown"?"Unknown":bi.length>=16?`${bi.slice(0,8)} ... ${bi.slice(-8)}`:`${bi}`}),De=$o(()=>d.value!==null),er=$o(()=>d.value?.version??"Unknown"),pr=$o(()=>d.value?.core_version??"Unknown"),Mr=$o(()=>d.value?.noise_floor_dbm??null),Tr=$o(()=>Ot.value>0?Math.min(_t.value/Ot.value*100,100):0),Vr=$o(()=>K.value==="monitor"?{text:"Monitor Mode",title:"Monitoring only - not forwarding packets"}:pt.value?{text:"Active",title:"Forwarding with duty cycle enforcement"}:{text:"No Limits",title:"Forwarding without duty cycle enforcement"}),mn=$o(()=>K.value==="monitor"?{active:!1,warning:!0}:{active:!0,warning:!1}),Dt=$o(()=>pt.value?{active:!0,warning:!1}:{active:!1,warning:!0}),cn=bi=>{jt.value=bi};async function Jn(){try{s.value=!0,E.value=null;const bi=await Ah.get("/stats");if(bi.success&&bi.data)return d.value=bi.data,B.value=new Date,Bn(bi.data),bi.data;if(bi&&"version"in bi){const Yi=bi;return d.value=Yi,B.value=new Date,Bn(Yi),Yi}else throw new Error(bi.error||"Failed to fetch stats")}catch(bi){throw E.value=bi instanceof Error?bi.message:"Unknown error occurred",console.error("Error fetching stats:",bi),bi}finally{s.value=!1}}function Bn(bi){if(bi.config){const Ca=bi.config.repeater?.mode;(Ca==="forward"||Ca==="monitor")&&(K.value=Ca);const Ni=bi.config.duty_cycle;if(Ni){pt.value=Ni.enforcement_enabled!==!1;const si=Ni.max_airtime_percent;typeof si=="number"?Ot.value=si:si&&typeof si=="object"&&"parsedValue"in si&&(Ot.value=si.parsedValue||10)}}const Yi=bi.utilization_percent;typeof Yi=="number"?_t.value=Yi:Yi&&typeof Yi=="object"&&"parsedValue"in Yi&&(_t.value=Yi.parsedValue||0)}async function ni(bi){try{const Yi=await Ah.post("/set_mode",{mode:bi});if(Yi.success)return K.value=bi,!0;throw new Error(Yi.error||"Failed to set mode")}catch(Yi){throw E.value=Yi instanceof Error?Yi.message:"Unknown error occurred",console.error("Error setting mode:",Yi),Yi}}async function Wi(bi){try{const Yi=await Ah.post("/set_duty_cycle",{enabled:bi});if(Yi.success)return pt.value=bi,!0;throw new Error(Yi.error||"Failed to set duty cycle")}catch(Yi){throw E.value=Yi instanceof Error?Yi.message:"Unknown error occurred",console.error("Error setting duty cycle:",Yi),Yi}}async function Un(){try{const bi=await Ah.post("/send_advert",{},{timeout:1e4});if(bi.success)return console.log("Advertisement sent successfully:",bi.data),!0;throw new Error(bi.error||"Failed to send advert")}catch(bi){throw E.value=bi instanceof Error?bi.message:"Unknown error occurred",console.error("Error sending advert:",bi),bi}}async function qr(){const bi=K.value==="forward"?"monitor":"forward";return await ni(bi)}async function Di(){return await Wi(!pt.value)}async function Fi(bi=5e3){await Jn();const Yi=setInterval(async()=>{try{await Jn()}catch(Ca){console.error("Auto-refresh error:",Ca)}},bi);return()=>clearInterval(Yi)}function Pi(){d.value=null,E.value=null,B.value=null,s.value=!1,K.value="forward",pt.value=!0,_t.value=0,Ot.value=10}return{stats:d,isLoading:s,error:E,lastUpdated:B,currentMode:K,dutyCycleEnabled:pt,dutyCycleUtilization:_t,dutyCycleMax:Ot,cadCalibrationRunning:jt,nodeName:te,pubKey:he,hasStats:De,version:er,coreVersion:pr,noiseFloorDbm:Mr,dutyCyclePercentage:Tr,statusBadge:Vr,modeButtonState:mn,dutyCycleButtonState:Dt,fetchStats:Jn,setMode:ni,setDutyCycle:Wi,sendAdvert:Un,toggleMode:qr,toggleDutyCycle:Di,startAutoRefresh:Fi,reset:Pi,setCadCalibrationRunning:cn}}),ld=(d,s)=>{const E=d.__vccOpts||d;for(const[B,K]of s)E[B]=K;return E},LQ={},PQ={width:"23",height:"25",viewBox:"0 0 23 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function IQ(d,s){return _i(),zi("svg",PQ,s[0]||(s[0]=[Ee("path",{d:"M2.84279 2.25795C2.90709 1.12053 3.17879 0.625914 3.95795 0.228723C4.79631 -0.198778 6.11858 0.000168182 7.67449 0.788054C8.34465 1.12757 8.41289 1.13448 9.58736 0.983905C11.1485 0.783681 13.1582 0.784388 14.5991 0.985738C15.6887 1.13801 15.7603 1.1304 16.4321 0.790174C18.6406 -0.328212 20.3842 -0.255036 21.0156 0.982491C21.3308 1.6002 21.3893 3.20304 21.1449 4.52503C21.0094 5.25793 21.0238 5.34943 21.3502 5.83037C23.6466 9.21443 21.9919 14.6998 18.0569 16.7469C17.7558 16.9036 17.502 17.0005 17.2952 17.0795C16.6602 17.3219 16.4674 17.3956 16.7008 18.5117C16.8132 19.0486 16.9486 20.3833 17.0018 21.478C17.098 23.4567 17.0966 23.4705 16.7495 23.8742C16.2772 24.4233 15.5963 24.4326 15.135 23.8962C14.8341 23.5464 14.8047 23.3812 14.8047 22.0315C14.8047 20.037 14.5861 18.7113 14.0695 17.5753C13.4553 16.2235 13.9106 15.7194 15.3154 15.4173C17.268 14.9973 18.793 13.7923 19.643 11.9978C20.4511 10.2921 20.5729 7.93485 19.1119 6.50124C18.6964 6.00746 18.6674 5.56022 18.9641 4.21159C19.075 3.70754 19.168 3.05725 19.1707 2.76637C19.1749 2.30701 19.1331 2.23764 18.8509 2.23764C18.6724 2.23764 17.9902 2.49736 17.3352 2.81474L16.2897 3.32145C16.1947 3.36751 16.0883 3.38522 15.9834 3.37318C13.3251 3.06805 10.7991 3.06334 8.12774 3.37438C8.02244 3.38663 7.91563 3.36892 7.82025 3.32263L6.77535 2.81559C6.12027 2.49764 5.43813 2.23764 5.25963 2.23764C4.84693 2.23764 4.84072 2.54233 5.2169 4.35258C5.44669 5.45816 5.60133 5.70451 4.93703 6.58851C3.94131 7.91359 3.69258 9.55902 4.22654 11.2878C4.89952 13.4664 6.54749 14.9382 8.86436 15.4292C10.261 15.7253 10.6261 16.1115 10.0928 17.713C9.67293 18.9734 9.40748 19.2982 8.79738 19.2982C7.97649 19.2982 7.46228 18.5871 7.74527 17.843C7.86991 17.5151 7.83283 17.4801 7.06383 17.1996C4.71637 16.3437 2.9209 14.4254 2.10002 11.8959C1.46553 9.94098 1.74471 7.39642 2.76257 5.85843C3.10914 5.33477 3.1145 5.29036 2.95277 4.28787C2.86126 3.72037 2.81177 2.80699 2.84279 2.25795Z",fill:"white"},null,-1),Ee("path",{d:"M2.02306 16.5589C1.68479 16.0516 0.999227 15.9144 0.491814 16.2527C-0.0155884 16.591 -0.152708 17.2765 0.185564 17.7839C0.435301 18.1586 0.734065 18.4663 0.987777 18.72C1.03455 18.7668 1.08 18.8119 1.12438 18.856C1.3369 19.0671 1.52455 19.2535 1.71302 19.4748C2.12986 19.964 2.54572 20.623 2.78206 21.8047C2.88733 22.3311 3.26569 22.6147 3.47533 22.7386C3.70269 22.8728 3.9511 22.952 4.15552 23.0036C4.57369 23.109 5.08133 23.1638 5.56309 23.1957C6.09196 23.2308 6.665 23.2422 7.17743 23.2453C7.1778 23.8547 7.67202 24.3487 8.28162 24.3487C8.89146 24.3487 9.38582 23.8543 9.38582 23.2445V22.1403C9.38582 21.5305 8.89146 21.0361 8.28162 21.0361C8.17753 21.0361 8.06491 21.0364 7.94562 21.0369C7.29761 21.0389 6.45295 21.0414 5.70905 20.9922C5.35033 20.9684 5.05544 20.9347 4.8392 20.8936C4.50619 19.5863 3.96821 18.7165 3.39415 18.0426C3.14038 17.7448 2.87761 17.4842 2.66387 17.2722C2.62385 17.2326 2.58556 17.1946 2.54935 17.1584C2.30273 16.9118 2.1414 16.7365 2.02306 16.5589Z",fill:"white"},null,-1)]))}const zQ=ld(LQ,[["render",IQ]]),OQ={},DQ={width:"17",height:"24",viewBox:"0 0 17 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FQ(d,s){return _i(),zi("svg",DQ,s[0]||(s[0]=[$f('',12)]))}const RQ=ld(OQ,[["render",FQ]]),sw=oM("packets",()=>{const d=Ga(null),s=Ga(null),E=Ga([]),B=Ga([]),K=Ga(null),pt=Ga(!1),_t=Ga(null),Ot=Ga(null),jt=Ga([]),te=Ga([]),he=$o(()=>d.value!==null),De=$o(()=>s.value!==null),er=$o(()=>E.value.length>0),pr=$o(()=>B.value.length>0),Mr=$o(()=>K.value?.avg_noise_floor??0),Tr=$o(()=>d.value?.total_packets??0),Vr=$o(()=>d.value?.avg_rssi??0),mn=$o(()=>d.value?.avg_snr??0),Dt=$o(()=>s.value?.uptime_seconds??0),cn=$o(()=>{if(!d.value?.packet_types)return[];const Ni=d.value.packet_types,si=Ni.reduce((Ma,zo)=>Ma+zo.count,0);return Ni.map(Ma=>({type:Ma.type.toString(),count:Ma.count,percentage:si>0?Ma.count/si*100:0}))}),Jn=$o(()=>{const Ni={};return E.value.forEach(si=>{Ni[si.type]||(Ni[si.type]=[]),Ni[si.type].push(si)}),Ni});async function Bn(){try{const Ni=await Ah.get("/stats");if(Ni.success&&Ni.data){s.value=Ni.data;const si=new Date;return te.value.push({timestamp:si,stats:Ni.data}),te.value.length>50&&(te.value=te.value.slice(-50)),Ni.data}else if(Ni&&"version"in Ni){const si=Ni;s.value=si;const Ma=new Date;return te.value.push({timestamp:Ma,stats:si}),te.value.length>50&&(te.value=te.value.slice(-50)),si}else throw new Error(Ni.error||"Failed to fetch system stats")}catch(Ni){throw _t.value=Ni instanceof Error?Ni.message:"Unknown error occurred",console.error("Error fetching system stats:",Ni),Ni}}async function ni(Ni={hours:24}){try{const si=await Ah.get("/noise_floor_history",Ni);if(si.success&&si.data&&si.data.history)return B.value=si.data.history,Ot.value=new Date,si.data.history;throw new Error(si.error||"Failed to fetch noise floor history")}catch(si){throw _t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching noise floor history:",si),si}}async function Wi(Ni={hours:24}){try{const si=await Ah.get("/noise_floor_stats",Ni);if(si.success&&si.data&&si.data.stats)return K.value=si.data.stats,Ot.value=new Date,si.data.stats;throw new Error(si.error||"Failed to fetch noise floor stats")}catch(si){throw _t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching noise floor stats:",si),si}}const Un=$o(()=>!B.value||!Array.isArray(B.value)?[]:B.value.slice(-50).map(Ni=>Ni.noise_floor_dbm));async function qr(Ni={hours:24}){try{pt.value=!0,_t.value=null;const si=await Ah.get("/packet_stats",Ni);if(si.success&&si.data){d.value=si.data;const Ma=new Date;jt.value.push({timestamp:Ma,stats:si.data}),jt.value.length>50&&(jt.value=jt.value.slice(-50)),Ot.value=Ma}else throw new Error(si.error||"Failed to fetch packet stats")}catch(si){_t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching packet stats:",si)}finally{pt.value=!1}}async function Di(Ni={limit:100}){try{pt.value=!0,_t.value=null;const si=await Ah.get("/recent_packets",Ni);if(si.success&&si.data)E.value=si.data,Ot.value=new Date;else throw new Error(si.error||"Failed to fetch recent packets")}catch(si){_t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching recent packets:",si)}finally{pt.value=!1}}async function Fi(Ni){try{pt.value=!0,_t.value=null;const si=await Ah.get("/filtered_packets",Ni);if(si.success&&si.data)return E.value=si.data,Ot.value=new Date,si.data;throw new Error(si.error||"Failed to fetch filtered packets")}catch(si){throw _t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching filtered packets:",si),si}finally{pt.value=!1}}async function Pi(Ni){try{pt.value=!0,_t.value=null;const si=await Ah.get("/packet_by_hash",{packet_hash:Ni});if(si.success&&si.data)return si.data;throw new Error(si.error||"Packet not found")}catch(si){throw _t.value=si instanceof Error?si.message:"Unknown error occurred",console.error("Error fetching packet by hash:",si),si}finally{pt.value=!1}}const bi=$o(()=>{const Ni=jt.value,si=te.value;return{totalPackets:Ni.map(Ma=>Ma.stats.total_packets),transmittedPackets:Ni.map(Ma=>Ma.stats.transmitted_packets),droppedPackets:Ni.map(Ma=>Ma.stats.dropped_packets),avgRssi:Ni.map(Ma=>Ma.stats.avg_rssi),uptimeHours:si.map(Ma=>Math.floor((Ma.stats.uptime_seconds||0)/3600))}});async function Yi(Ni=3e4){await Promise.all([Bn(),qr(),Di(),ni({hours:1}),Wi({hours:1})]);const si=setInterval(async()=>{try{await Promise.all([Bn(),qr(),Di(),ni({hours:1}),Wi({hours:1})])}catch(Ma){console.error("Auto-refresh error:",Ma)}},Ni);return()=>clearInterval(si)}function Ca(){d.value=null,s.value=null,E.value=[],B.value=[],K.value=null,jt.value=[],te.value=[],_t.value=null,Ot.value=null,pt.value=!1}return{packetStats:d,systemStats:s,recentPackets:E,noiseFloorHistory:B,noiseFloorStats:K,packetStatsHistory:jt,systemStatsHistory:te,isLoading:pt,error:_t,lastUpdated:Ot,hasPacketStats:he,hasSystemStats:De,hasRecentPackets:er,hasNoiseFloorData:pr,currentNoiseFloor:Mr,totalPackets:Tr,averageRSSI:Vr,averageSNR:mn,uptime:Dt,packetTypeBreakdown:cn,recentPacketsByType:Jn,sparklineData:bi,noiseFloorSparklineData:Un,fetchSystemStats:Bn,fetchPacketStats:qr,fetchRecentPackets:Di,fetchFilteredPackets:Fi,getPacketByHash:Pi,fetchNoiseFloorHistory:ni,fetchNoiseFloorStats:Wi,startAutoRefresh:Yi,reset:Ca}}),BQ={class:"glass-card-green p-5 relative overflow-hidden"},NQ={key:0,class:"absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-10 rounded-lg"},jQ={class:"flex items-baseline gap-2 mb-8"},UQ={class:"text-primary text-2xl font-medium"},VQ={class:"absolute bottom-0 left-5 w-[196px] h-[30px]",viewBox:"0 0 196 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},HQ=["d"],WQ=["d"],qQ=["cy"],$Q=Dc({__name:"RFNoiseFloor",setup(d){const s=sw(),E=Om(),B=Ga(null),K=he=>{if(he.length<2)return"";const De=196,er=30,pr=4,Mr=-125,Vr=-105-Mr;let mn="";return he.forEach((Dt,cn)=>{const Jn=cn/(he.length-1)*De,Bn=(Dt-Mr)/Vr,ni=er-Bn*(er-pr*2)-pr;if(cn===0)mn+=`M ${Jn} ${ni}`;else{const Un=((cn-1)/(he.length-1)*De+Jn)/2;mn+=` Q ${Un} ${ni} ${Jn} ${ni}`}}),mn},pt=async()=>{try{await Promise.all([s.fetchNoiseFloorHistory({hours:1}),s.fetchNoiseFloorStats({hours:1})])}catch(he){console.error("Error fetching noise floor data:",he)}};bp(()=>{pt(),B.value=window.setInterval(pt,5e3)}),gg(()=>{B.value&&clearInterval(B.value)});const _t=$o(()=>{const he=s.noiseFloorSparklineData;return he&&he.length>0?he[he.length-1]:s.noiseFloorStats?.avg_noise_floor??-116}),Ot=$o(()=>s.noiseFloorSparklineData),jt=$o(()=>K(Ot.value)),te=$o(()=>{if(Ot.value.length===0)return 15;const he=Ot.value[Ot.value.length-1],De=-125,pr=-105-De;return 30-(he-De)/pr*22-4});return(he,De)=>(_i(),zi("div",BQ,[zl(E).cadCalibrationRunning?(_i(),zi("div",NQ,De[0]||(De[0]=[$f('
CAD Calibration

In Progress

',1)]))):is("",!0),De[4]||(De[4]=Ee("p",{class:"text-dark-text text-xs uppercase mb-2"},"RF NOISE FLOOR",-1)),Ee("div",jQ,[Ee("span",UQ,Qi(_t.value),1),De[1]||(De[1]=Ee("span",{class:"text-dark-text text-xs uppercase"},"dBm",-1))]),(_i(),zi("svg",VQ,[De[3]||(De[3]=$f('',1)),Ot.value.length>1?(_i(),zi("path",{key:0,d:`${jt.value} L 196 30 L 0 30 Z`,fill:"url(#rf-noise-gradient)",class:"transition-all duration-500 ease-out"},null,8,HQ)):is("",!0),Ot.value.length>1?(_i(),zi("path",{key:1,d:jt.value,stroke:"#B1FFFF","stroke-width":"2",fill:"none",filter:"url(#line-glow)",class:"transition-all duration-500 ease-out"},null,8,WQ)):is("",!0),Ot.value.length>0?(_i(),zi("circle",{key:2,cx:196,cy:te.value,r:"2",fill:"#B1FFFF",class:"animate-pulse"},De[2]||(De[2]=[Ee("animate",{attributeName:"r",values:"2;3;2",dur:"2s",repeatCount:"indefinite"},null,-1)]),8,qQ)):is("",!0)]))]))}}),jO=ld($Q,[["__scopeId","data-v-ad12b3cb"]]),ZQ={},GQ={width:"800px",height:"800px",viewBox:"0 -1.5 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"w-full h-full"};function YQ(d,s){return _i(),zi("svg",GQ,s[0]||(s[0]=[Ee("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[Ee("g",{transform:"translate(-420.000000, -3641.000000)",fill:"currentColor"},[Ee("g",{id:"icons",transform:"translate(56.000000, 160.000000)"},[Ee("path",{d:"M378.195439,3483.828 L376.781439,3485.242 C378.195439,3486.656 378.294439,3489.588 376.880439,3491.002 L378.294439,3492.417 C380.415439,3490.295 380.316439,3485.949 378.195439,3483.828 M381.023439,3481 L379.609439,3482.414 C382.438439,3485.242 382.537439,3491.002 379.708439,3493.831 L381.122439,3495.245 C385.365439,3491.002 384.559439,3484.535 381.023439,3481 M375.432439,3486.737 C375.409439,3486.711 375.392439,3486.682 375.367439,3486.656 L375.363439,3486.66 C374.582439,3485.879 373.243439,3485.952 372.536439,3486.659 C371.829439,3487.366 371.831439,3488.778 372.538439,3489.485 C372.547439,3489.494 372.558439,3489.499 372.567439,3489.508 C372.590439,3489.534 372.607439,3489.563 372.632439,3489.588 L372.636439,3489.585 C373.201439,3490.15 373.000439,3488.284 373.000439,3498 L375.000439,3498 C375.000439,3488.058 374.753439,3490.296 375.463439,3489.586 C376.170439,3488.879 376.168439,3487.467 375.461439,3486.76 C375.452439,3486.751 375.441439,3486.746 375.432439,3486.737 M371.119439,3485.242 L369.705439,3483.828 C367.584439,3485.949 367.683439,3490.295 369.804439,3492.417 L371.218439,3491.002 C369.804439,3489.588 369.705439,3486.656 371.119439,3485.242 M368.390439,3493.831 L366.976439,3495.245 C363.440439,3491.709 362.634439,3485.242 366.877439,3481 L368.291439,3482.414 C365.462439,3485.242 365.561439,3491.002 368.390439,3493.831",id:"radio_tower-[#1019]"})])])],-1)]))}const KQ=ld(ZQ,[["render",YQ]]),XQ={class:"text-center"},JQ={class:"relative flex items-center justify-center mb-8"},QQ={class:"relative w-32 h-32"},ttt={class:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2"},ett={key:0,class:"absolute inset-0 flex items-center justify-center"},rtt={key:1,class:"absolute inset-0 flex items-center justify-center"},ntt={key:2,class:"absolute inset-0"},itt={class:"mb-6"},att={key:0,class:"text-white text-lg"},ott={key:1,class:"text-accent-green text-lg font-medium"},stt={key:2,class:"text-secondary text-lg"},ltt={key:3,class:"text-accent-red text-lg"},utt={key:4,class:"text-dark-text"},ctt={key:5,class:"mt-3"},htt={key:0,class:"text-secondary text-sm"},ftt={key:1,class:"text-accent-red text-sm"},dtt={key:0,class:"flex gap-3"},ptt={key:1,class:"text-dark-text text-sm"},mtt=Dc({name:"AdvertModal",__name:"AdvertModal",props:{isOpen:{type:Boolean},isLoading:{type:Boolean},isSuccess:{type:Boolean},error:{default:null}},emits:["close","send"],setup(d,{emit:s}){const E=d,B=s,K=Ga(!1),pt=Ga(!1),_t=Ga(!1);Em(()=>E.isOpen,he=>{he?(K.value=!0,setTimeout(()=>{pt.value=!0},50)):(pt.value=!1,_t.value=!1,setTimeout(()=>{K.value=!1},300))},{immediate:!0}),Em(()=>E.isLoading,he=>{he||setTimeout(()=>{_t.value=!1},1e3)});const Ot=()=>{E.isLoading||B("close")},jt=()=>{E.isLoading||(_t.value=!0,B("send"))},te=he=>he?.includes("Network error - no response received")||he?.includes("timeout");return(he,De)=>(_i(),Z0(XA,{to:"body"},[K.value?(_i(),zi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:Pm(Ot,["self"])},[Ee("div",{class:jo(["absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-300",pt.value?"opacity-100":"opacity-0"])},null,2),Ee("div",{class:jo(["relative glass-card rounded-[20px] p-8 max-w-md w-full transform transition-all duration-300",pt.value?"scale-100 opacity-100":"scale-95 opacity-0"])},[he.isLoading?is("",!0):(_i(),zi("button",{key:0,onClick:Ot,class:"absolute top-4 right-4 text-dark-text hover:text-white transition-colors p-2"},De[0]||(De[0]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))),Ee("div",XQ,[De[6]||(De[6]=Ee("h2",{class:"text-white text-xl font-semibold mb-6"},"Send Advertisement",-1)),Ee("div",JQ,[Ee("div",QQ,[Ee("div",ttt,[Wl(KQ,{class:jo(["w-16 h-16 transition-all duration-500",[he.isLoading?"animate-pulse":"",he.isSuccess?"text-accent-green":he.error&&!te(he.error)?"text-accent-red":"text-primary"]]),style:hm({filter:he.isLoading?"drop-shadow(0 0 8px currentColor)":he.isSuccess?"drop-shadow(0 0 8px #A5E5B6)":he.error&&!te(he.error)?"drop-shadow(0 0 8px #FB787B)":"drop-shadow(0 0 4px #AAE8E8)"})},null,8,["class","style"])]),he.isLoading||he.isSuccess?(_i(),zi("div",ett,[Ee("div",{class:jo(["absolute w-16 h-16 rounded-full border-2 animate-ping",[he.isSuccess?"border-accent-green/60":"border-primary/60"]]),style:{"animation-duration":"1.5s"}},null,2),Ee("div",{class:jo(["absolute w-24 h-24 rounded-full border-2 animate-ping",[he.isSuccess?"border-accent-green/40":"border-primary/40"]]),style:{"animation-duration":"2s","animation-delay":"0.3s"}},null,2),Ee("div",{class:jo(["absolute w-32 h-32 rounded-full border-2 animate-ping",[he.isSuccess?"border-accent-green/20":"border-primary/20"]]),style:{"animation-duration":"2.5s","animation-delay":"0.6s"}},null,2)])):is("",!0),_t.value?(_i(),zi("div",rtt,De[1]||(De[1]=[Ee("div",{class:"absolute w-8 h-8 rounded-full border-4 border-secondary animate-ping-fast"},null,-1),Ee("div",{class:"absolute w-16 h-16 rounded-full border-3 border-secondary/70 animate-ping-fast",style:{"animation-delay":"0.1s"}},null,-1),Ee("div",{class:"absolute w-24 h-24 rounded-full border-2 border-secondary/50 animate-ping-fast",style:{"animation-delay":"0.2s"}},null,-1),Ee("div",{class:"absolute w-32 h-32 rounded-full border-2 border-secondary/30 animate-ping-fast",style:{"animation-delay":"0.3s"}},null,-1)]))):is("",!0),he.isLoading||he.isSuccess?(_i(),zi("div",ntt,[Ee("div",{class:jo(["absolute top-2 right-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[he.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"0.5s"}},De[2]||(De[2]=[Ee("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Ee("div",{class:jo(["absolute bottom-2 left-2 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[he.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1s"}},De[3]||(De[3]=[Ee("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Ee("div",{class:jo(["absolute top-1/2 right-1 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[he.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"1.5s",transform:"translateY(-50%)"}},De[4]||(De[4]=[Ee("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2),Ee("div",{class:jo(["absolute top-3 left-3 w-4 h-4 rounded-full transition-all duration-500 animate-pulse",[he.isSuccess?"bg-accent-green shadow-lg shadow-accent-green/50":"bg-primary/70 shadow-lg shadow-primary/30"]]),style:{"animation-delay":"2s"}},De[5]||(De[5]=[Ee("div",{class:"w-2 h-2 bg-white rounded-full mx-auto mt-1"},null,-1)]),2)])):is("",!0)])]),Ee("div",itt,[he.isLoading?(_i(),zi("p",att," Broadcasting advertisement... ")):he.isSuccess?(_i(),zi("p",ott," Advertisement sent successfully! ")):he.error&&te(he.error)?(_i(),zi("p",stt," Advertisement likely sent ")):he.error?(_i(),zi("p",ltt," Failed to send advertisement ")):(_i(),zi("p",utt," This will broadcast your node's presence to nearby nodes. ")),he.error?(_i(),zi("div",ctt,[te(he.error)?(_i(),zi("p",htt," Network timeout occurred, but the advertisement may have been successfully transmitted to nearby nodes. ")):(_i(),zi("p",ftt,Qi(he.error),1))])):is("",!0)]),!he.isLoading&&!he.isSuccess?(_i(),zi("div",dtt,[Ee("button",{onClick:Ot,class:"flex-1 glass-card border border-dark-border hover:border-primary rounded-[10px] px-6 py-3 text-dark-text hover:text-white transition-all duration-200"}," Cancel "),Ee("button",{onClick:jt,class:jo(["flex-1 rounded-[10px] px-6 py-3 font-medium transition-all duration-200 shadow-lg",[he.error&&te(he.error)?"bg-secondary hover:bg-secondary/90 text-dark-bg hover:shadow-secondary/20":"bg-primary hover:bg-primary/90 text-dark-bg hover:shadow-primary/20"]])},Qi(he.error&&te(he.error)?"Try Again":"Send Advertisement"),3)])):is("",!0),he.isSuccess?(_i(),zi("div",ptt," Closing automatically... ")):is("",!0)])],2)])):is("",!0)]))}}),UO=ld(mtt,[["__scopeId","data-v-a5eb8c7f"]]),gtt={},vtt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ytt(d,s){return _i(),zi("svg",vtt,s[0]||(s[0]=[$f('',2)]))}const VO=ld(gtt,[["render",ytt]]),xtt={},_tt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function btt(d,s){return _i(),zi("svg",_tt,s[0]||(s[0]=[$f('',9)]))}const HO=ld(xtt,[["render",btt]]),wtt={},ktt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ttt(d,s){return _i(),zi("svg",ktt,s[0]||(s[0]=[$f('',2)]))}const WO=ld(wtt,[["render",Ttt]]),Att={},Mtt={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Stt(d,s){return _i(),zi("svg",Mtt,s[0]||(s[0]=[Ee("path",{d:"M9.81633 1.99133L8.5085 0.683492C8.29229 0.466088 8.03511 0.293723 7.75185 0.176372C7.46859 0.059021 7.16486 -0.000985579 6.85825 -0.000175002H1.75C1.28587 -0.000175002 0.840752 0.184199 0.512563 0.512388C0.184375 0.840577 0 1.2857 0 1.74983V13.9998H10.5V3.64099C10.4985 3.02248 10.2528 2.4296 9.81633 1.99133ZM8.9915 2.81616C9.02083 2.84799 9.04829 2.88149 9.07375 2.91649H7.58333V1.42608C7.61834 1.45153 7.65184 1.479 7.68367 1.50833L8.9915 2.81616ZM1.16667 12.8332V1.74983C1.16667 1.59512 1.22812 1.44674 1.33752 1.33735C1.44692 1.22795 1.59529 1.16649 1.75 1.16649H6.41667V4.08316H9.33333V12.8332H1.16667ZM2.33333 9.33316H8.16667V5.83316H2.33333V9.33316ZM3.5 6.99983H7V8.16649H3.5V6.99983ZM2.33333 10.4998H8.16667V11.6665H2.33333V10.4998Z",fill:"white"},null,-1)]))}const qO=ld(Att,[["render",Stt]]),Ett={},Ctt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ltt(d,s){return _i(),zi("svg",Ctt,s[0]||(s[0]=[$f('',2)]))}const $O=ld(Ett,[["render",Ltt]]),Ptt={},Itt={width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ztt(d,s){return _i(),zi("svg",Itt,s[0]||(s[0]=[Ee("path",{d:"M10.5 14.0004H9.33333V11.0586C9.33287 10.6013 9.15099 10.1628 8.82761 9.83942C8.50422 9.51603 8.06575 9.33415 7.60842 9.33369H2.89158C2.43425 9.33415 1.99578 9.51603 1.67239 9.83942C1.34901 10.1628 1.16713 10.6013 1.16667 11.0586V14.0004H0V11.0586C0.000926233 10.292 0.305872 9.55705 0.847948 9.01497C1.39002 8.47289 2.12497 8.16795 2.89158 8.16702H7.60842C8.37503 8.16795 9.10998 8.47289 9.65205 9.01497C10.1941 9.55705 10.4991 10.292 10.5 11.0586V14.0004Z",fill:"white"},null,-1),Ee("path",{d:"M5.25 6.99997C4.55777 6.99997 3.88108 6.7947 3.30551 6.41011C2.72993 6.02553 2.28133 5.4789 2.01642 4.83936C1.75152 4.19982 1.6822 3.49609 1.81725 2.81716C1.9523 2.13822 2.28564 1.51458 2.77513 1.0251C3.26461 0.535614 3.88825 0.202271 4.56719 0.0672226C5.24612 -0.0678257 5.94985 0.00148598 6.58939 0.266393C7.22894 0.531299 7.77556 0.979903 8.16015 1.55548C8.54473 2.13105 8.75 2.80774 8.75 3.49997C8.74908 4.42794 8.38003 5.31765 7.72385 5.97382C7.06768 6.63 6.17798 6.99904 5.25 6.99997ZM5.25 1.16664C4.78851 1.16664 4.33739 1.30349 3.95367 1.55988C3.56996 1.81627 3.27089 2.18068 3.09428 2.60704C2.91768 3.0334 2.87147 3.50256 2.9615 3.95518C3.05153 4.4078 3.27376 4.82357 3.60009 5.14989C3.92641 5.47621 4.34217 5.69844 4.79479 5.78847C5.24741 5.8785 5.71657 5.83229 6.14293 5.65569C6.56929 5.47909 6.93371 5.18002 7.1901 4.7963C7.44649 4.41259 7.58334 3.96146 7.58334 3.49997C7.58334 2.88113 7.3375 2.28764 6.89992 1.85006C6.46233 1.41247 5.86884 1.16664 5.25 1.16664Z",fill:"white"},null,-1)]))}const ZO=ld(Ptt,[["render",ztt]]),Ott={},Dtt={width:"11",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ftt(d,s){return _i(),zi("svg",Dtt,s[0]||(s[0]=[Ee("path",{d:"M6.77889 9.16667H10.1122V12.5M4.11222 3.83333H0.77889V0.5M10.3906 4.50227C10.0168 3.57711 9.39097 2.77536 8.58423 2.18815C7.77749 1.60094 6.82233 1.25168 5.82707 1.18034C4.8318 1.109 3.83627 1.31827 2.95402 1.78441C2.07177 2.25055 1.3381 2.95503 0.836182 3.81742M0.500244 8.49805C0.874034 9.42321 1.49986 10.225 2.30661 10.8122C3.11335 11.3994 4.06948 11.7482 5.06474 11.8195C6.06001 11.8909 7.05473 11.6816 7.93697 11.2155C8.81922 10.7494 9.55239 10.045 10.0543 9.18262",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const GO=ld(Ott,[["render",Ftt]]),Rtt={},Btt={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ntt(d,s){return _i(),zi("svg",Btt,s[0]||(s[0]=[$f('',2)]))}const YO=ld(Rtt,[["render",Ntt]]),jtt={class:"w-[285px] flex-shrink-0 p-[15px] hidden lg:block"},Utt={class:"glass-card h-full p-6"},Vtt={class:"mb-12"},Htt={class:"text-[#C3C3C3] text-sm"},Wtt=["title"],qtt={class:"text-[#C3C3C3] text-sm mt-1"},$tt={class:"mb-8"},Ztt={class:"mb-8"},Gtt={class:"space-y-2"},Ytt=["onClick"],Ktt={class:"mb-8"},Xtt={class:"space-y-2"},Jtt=["onClick"],Qtt=["disabled"],tet={class:"flex items-center gap-3"},eet=["disabled"],ret={class:"flex items-center gap-3"},net={class:"mb-4"},iet={class:"flex items-center gap-2"},aet={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},oet={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},set={key:0,class:"mb-4"},uet={class:"text-dark-text text-xs mb-2"},cet={class:"text-white"},het={class:"w-full h-1 bg-white/10 rounded-full overflow-hidden"},fet={class:"flex items-center justify-between"},det={class:"flex items-center gap-2 text-dark-text text-xs"},pet={class:"flex items-center gap-2"},met={href:"https://github.com/rightup",target:"_blank",class:"inline-block"},get={href:"https://buymeacoffee.com/rightup",target:"_blank",class:"inline-block"},vet=Dc({name:"SidebarNav",__name:"Sidebar",setup(d){const s=pO(),E=mO(),B=Om(),K=Ga(!1),pt=Ga(!1),_t=Ga(!1),Ot=Ga(!1),jt=Ga(!1),te=Ga(null);let he=null;bp(async()=>{he=await B.startAutoRefresh(5e3)}),Iy(()=>{he&&he()});const De={dashboard:HO,neighbors:ZO,statistics:$O,configuration:VO,logs:qO,help:WO},er=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],pr=$o(()=>Bn=>E.path===Bn),Mr=Bn=>{s.push(Bn)},Tr=async()=>{K.value=!0,te.value=null;try{await B.sendAdvert(),jt.value=!0,setTimeout(()=>{Vr()},2e3)}catch(Bn){te.value=Bn instanceof Error?Bn.message:"Unknown error occurred",console.error("Failed to send advert:",Bn)}finally{K.value=!1}},Vr=()=>{Ot.value=!1,jt.value=!1,te.value=null,K.value=!1},mn=async()=>{if(!pt.value){pt.value=!0;try{await B.toggleMode()}catch(Bn){console.error("Failed to toggle mode:",Bn)}finally{pt.value=!1}}},Dt=async()=>{if(!_t.value){_t.value=!0;try{await B.toggleDutyCycle()}catch(Bn){console.error("Failed to toggle duty cycle:",Bn)}finally{_t.value=!1}}},cn=Ga(new Date().toLocaleTimeString());setInterval(()=>{cn.value=new Date().toLocaleTimeString()},1e3);const Jn=$o(()=>{const Bn=B.dutyCyclePercentage;let ni="#A5E5B6";return Bn>90?ni="#FB787B":Bn>70&&(ni="#FFC246"),{width:Bn===0?"2px":`${Math.max(Bn,2)}%`,backgroundColor:ni}});return(Bn,ni)=>(_i(),zi(Pu,null,[Ee("aside",jtt,[Ee("div",Utt,[Ee("div",Vtt,[ni[1]||(ni[1]=Ee("h1",{class:"text-white text-[22px] font-bold mb-2"},"pyMC Repeater",-1)),Ee("p",Htt,[Qu(Qi(zl(B).nodeName)+" ",1),Ee("span",{class:jo(["inline-block w-2 h-2 rounded-full ml-2",zl(B).statusBadge.text==="Active"?"bg-accent-green":zl(B).statusBadge.text==="Monitor Mode"?"bg-secondary":"bg-accent-red"]),title:zl(B).statusBadge.title},null,10,Wtt)]),Ee("p",qtt,"<"+Qi(zl(B).pubKey)+">",1)]),ni[10]||(ni[10]=Ee("div",{class:"border-t border-dark-border mb-6"},null,-1)),Ee("div",$tt,[ni[3]||(ni[3]=Ee("p",{class:"text-dark-text text-xs uppercase mb-4"},"Actions",-1)),Ee("button",{onClick:ni[0]||(ni[0]=Wi=>Ot.value=!0),class:"w-full bg-white rounded-[10px] py-3 px-4 flex items-center gap-2 text-sm font-medium text-[#212122] hover:bg-gray-100 transition-colors"},ni[2]||(ni[2]=[Ee("svg",{class:"w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M7 0C5.61553 0 4.26216 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.003033 5.6003 -0.13559 7.00777 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C13.998 5.1441 13.2599 3.36479 11.9475 2.05247C10.6352 0.74015 8.8559 0.0020073 7 0V0ZM7 12.8333C5.84628 12.8333 4.71846 12.4912 3.75918 11.8502C2.79989 11.2093 2.05222 10.2982 1.61071 9.23232C1.16919 8.16642 1.05368 6.99353 1.27876 5.86197C1.50384 4.73042 2.05941 3.69102 2.87521 2.87521C3.69102 2.0594 4.73042 1.50383 5.86198 1.27875C6.99353 1.05367 8.16642 1.16919 9.23232 1.6107C10.2982 2.05221 11.2093 2.79989 11.8502 3.75917C12.4912 4.71846 12.8333 5.84628 12.8333 7C12.8316 8.54658 12.2165 10.0293 11.1229 11.1229C10.0293 12.2165 8.54658 12.8316 7 12.8333ZM8.16667 7C8.1676 7.20501 8.11448 7.40665 8.01268 7.58461C7.91087 7.76256 7.76397 7.91054 7.58677 8.01365C7.40957 8.11676 7.20833 8.17136 7.00332 8.17194C6.7983 8.17252 6.59675 8.11906 6.41897 8.01696C6.24119 7.91485 6.09346 7.7677 5.99065 7.59033C5.88784 7.41295 5.83358 7.21162 5.83335 7.0066C5.83312 6.80159 5.88691 6.60013 5.98932 6.42252C6.09172 6.24491 6.23912 6.09743 6.41667 5.99492V3.5H7.58334V5.99492C7.76016 6.09659 7.90713 6.24298 8.00952 6.41939C8.1119 6.5958 8.1661 6.79603 8.16667 7Z",fill:"#212122"})],-1),Qu(" Send Advert ",-1)]))]),Ee("div",Ztt,[ni[4]||(ni[4]=Ee("p",{class:"text-dark-text text-xs uppercase mb-4"},"Monitoring",-1)),Ee("div",Gtt,[(_i(!0),zi(Pu,null,Jh(er.slice(0,3),Wi=>(_i(),zi("button",{key:Wi.name,onClick:Un=>Mr(Wi.route),class:jo([pr.value(Wi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(_i(),Z0(f4(De[Wi.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Qi(Wi.name),1)],10,Ytt))),128))])]),Ee("div",Ktt,[ni[5]||(ni[5]=Ee("p",{class:"text-dark-text text-xs uppercase mb-4"},"System",-1)),Ee("div",Xtt,[(_i(!0),zi(Pu,null,Jh(er.slice(3),Wi=>(_i(),zi("button",{key:Wi.name,onClick:Un=>Mr(Wi.route),class:jo([pr.value(Wi.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(_i(),Z0(f4(De[Wi.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Qi(Wi.name),1)],10,Jtt))),128))])]),Wl(jO,{"current-value":zl(B).noiseFloorDbm||-116,"update-interval":3e3,class:"mb-6"},null,8,["current-value"]),Ee("button",{onClick:mn,disabled:pt.value,class:jo(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",zl(B).modeButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Ee("div",tet,[Wl(GO,{class:"w-4 h-4 text-white group-hover:text-primary transition-colors"}),ni[6]||(ni[6]=Ee("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Mode",-1))]),Ee("span",{class:jo(["text-xs font-medium group-hover:text-white transition-colors",zl(B).modeButtonState.warning?"text-accent-red":"text-accent-green"])},Qi(pt.value?"Changing...":zl(B).currentMode.charAt(0).toUpperCase()+zl(B).currentMode.slice(1)),3)],10,Qtt),Ee("button",{onClick:Dt,disabled:_t.value,class:jo(["p-4 flex items-center justify-between mb-4 w-full transition-all duration-200 cursor-pointer group",zl(B).dutyCycleButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Ee("div",ret,[Wl(YO,{class:"w-3.5 h-3.5 text-white group-hover:text-primary transition-colors"}),ni[7]||(ni[7]=Ee("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Duty Cycle",-1))]),Ee("span",{class:jo(["text-xs font-medium group-hover:text-white transition-colors",zl(B).dutyCycleButtonState.warning?"text-accent-red":"text-primary"])},Qi(_t.value?"Changing...":zl(B).dutyCycleEnabled?"Enabled":"Disabled"),3)],10,eet),Ee("div",net,[Ee("div",iet,[Ee("span",aet," R:v"+Qi(zl(B).version),1),Ee("span",oet," C:v"+Qi(zl(B).coreVersion),1)])]),ni[11]||(ni[11]=Ee("div",{class:"border-t border-accent-green mb-4"},null,-1)),zl(B).dutyCycleEnabled?(_i(),zi("div",set,[Ee("p",uet,[ni[8]||(ni[8]=Qu(" Duty Cycle: ",-1)),Ee("span",cet,Qi(zl(B).dutyCycleUtilization.toFixed(1))+"% / "+Qi(zl(B).dutyCycleMax.toFixed(1))+"%",1)]),Ee("div",het,[Ee("div",{class:"h-full rounded-full transition-all duration-300",style:hm(Jn.value)},null,4)])])):is("",!0),Ee("div",fet,[Ee("div",det,[ni[9]||(ni[9]=Ee("svg",{class:"w-3 h-3",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M6.5 13C5.59722 13 4.75174 12.8286 3.96355 12.4858C3.17537 12.143 2.48926 11.6795 1.90522 11.0955C1.32119 10.5115 0.85776 9.82535 0.514945 9.03717C0.172131 8.24898 0.000482491 7.40326 1.0101e-06 6.5C-0.000480471 5.59674 0.171168 4.75126 0.514945 3.96356C0.858723 3.17585 1.32191 2.48974 1.9045 1.90522C2.48709 1.3207 3.1732 0.857278 3.96283 0.514944C4.75246 0.172611 5.59818 0.000962963 6.5 0C7.48703 0 8.42303 0.210648 9.30799 0.631944C10.193 1.05324 10.9421 1.64907 11.5555 2.41944V1.44444C11.5555 1.23981 11.6249 1.06841 11.7635 0.930222C11.9022 0.792037 12.0736 0.722704 12.2778 0.722222C12.4819 0.721741 12.6536 0.791074 12.7927 0.930222C12.9319 1.06937 13.001 1.24078 13 1.44444V4.33333C13 4.53796 12.9307 4.70961 12.792 4.84828C12.6533 4.98694 12.4819 5.05604 12.2778 5.05556H9.38888C9.18425 5.05556 9.01285 4.98622 8.87466 4.84756C8.73647 4.70889 8.66714 4.53748 8.66666 4.33333C8.66618 4.12919 8.73551 3.95778 8.87466 3.81911C9.01381 3.68044 9.18521 3.61111 9.38888 3.61111H10.6528C10.1593 2.93704 9.55138 2.40741 8.82916 2.02222C8.10694 1.63704 7.33055 1.44444 6.5 1.44444C5.09166 1.44444 3.89711 1.93507 2.91633 2.91633C1.93555 3.89759 1.44493 5.09215 1.44444 6.5C1.44396 7.90785 1.93459 9.10265 2.91633 10.0844C3.89807 11.0661 5.09263 11.5565 6.5 11.5556C7.64351 11.5556 8.66666 11.2125 9.56944 10.5264C10.4722 9.84028 11.068 8.95555 11.3569 7.87222C11.4171 7.67963 11.5255 7.53519 11.6819 7.43889C11.8384 7.34259 12.013 7.30648 12.2055 7.33055C12.4102 7.35463 12.5727 7.44178 12.693 7.592C12.8134 7.74222 12.8495 7.90785 12.8014 8.08889C12.4523 9.5213 11.694 10.698 10.5264 11.6191C9.35879 12.5402 8.01666 13.0005 6.5 13ZM7.22222 6.21111L9.02777 8.01667C9.16018 8.14907 9.22638 8.31759 9.22638 8.52222C9.22638 8.72685 9.16018 8.89537 9.02777 9.02778C8.89536 9.16018 8.72685 9.22639 8.52222 9.22639C8.31759 9.22639 8.14907 9.16018 8.01666 9.02778L5.99444 7.00556C5.92222 6.93333 5.86805 6.8522 5.83194 6.76217C5.79583 6.67213 5.77777 6.57872 5.77777 6.48194V3.61111C5.77777 3.40648 5.84711 3.23507 5.98577 3.09689C6.12444 2.9587 6.29585 2.88937 6.5 2.88889C6.70414 2.88841 6.87579 2.95774 7.01494 3.09689C7.15409 3.23604 7.22318 3.40744 7.22222 3.61111V6.21111Z",fill:"currentColor"})],-1)),Qu(" Last Updated: "+Qi(cn.value),1)]),Ee("div",pet,[Ee("a",met,[Wl(zQ,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})]),Ee("a",get,[Wl(RQ,{class:"w-4 h-4 text-dark-text hover:text-white transition-colors"})])])])])]),Wl(UO,{isOpen:Ot.value,isLoading:K.value,isSuccess:jt.value,error:te.value,onClose:Vr,onSend:Tr},null,8,["isOpen","isLoading","isSuccess","error"])],64))}}),yet={key:0,class:"fixed inset-0 z-40 lg:hidden"},xet={class:"absolute left-0 top-0 bottom-0 w-72 p-4"},_et={class:"glass-card h-full p-6 overflow-auto"},bet={class:"mb-6 flex items-center justify-between"},wet={class:"text-[#C3C3C3] text-sm"},ket=["title"],Tet={class:"text-[#C3C3C3] text-sm mt-1"},Aet={class:"mb-4"},Met={class:"mb-4"},Eet={class:"space-y-2 mb-3"},Cet=["onClick"],Let={class:"mb-4"},Pet={class:"space-y-2 mb-3"},Iet=["onClick"],zet=["disabled"],Oet={class:"flex items-center gap-3"},Det=["disabled"],Fet={class:"flex items-center gap-3"},Ret={class:"mb-4"},Bet={class:"flex items-center gap-2"},Net={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},jet={class:"glass-card px-2 py-1 text-dark-text text-xs font-medium rounded border border-dark-border"},Uet={key:0,class:"mb-4"},Vet={class:"text-dark-text text-xs mb-2"},Het={class:"text-white"},Wet={class:"w-full h-1 bg-white/10 rounded-full overflow-hidden"},qet={class:"text-dark-text text-xs"},$et=Dc({name:"MobileSidebar",__name:"MobileSidebar",props:{showMobileSidebar:{type:Boolean}},emits:["update:showMobileSidebar"],setup(d,{emit:s}){const E=s,B=pO(),K=mO(),pt=Om(),_t=Ga(!1),Ot=Ga(!1),jt=Ga(!1),te=Ga(!1),he=Ga(!1),De=Ga(null);let er=null;bp(async()=>{er=await pt.startAutoRefresh(5e3)}),Iy(()=>{er&&er()});const pr={dashboard:HO,neighbors:ZO,statistics:$O,configuration:VO,logs:qO,help:WO},Mr=[{name:"Dashboard",icon:"dashboard",route:"/"},{name:"Neighbors",icon:"neighbors",route:"/neighbors"},{name:"Statistics",icon:"statistics",route:"/statistics"},{name:"Configuration",icon:"configuration",route:"/configuration"},{name:"Logs",icon:"logs",route:"/logs"},{name:"Help",icon:"help",route:"/help"}],Tr=$o(()=>Un=>K.path===Un),Vr=Un=>{B.push(Un),mn()},mn=()=>{E("update:showMobileSidebar",!1)},Dt=async()=>{_t.value=!0,De.value=null;try{await pt.sendAdvert(),he.value=!0,setTimeout(()=>{cn()},2e3)}catch(Un){De.value=Un instanceof Error?Un.message:"Unknown error occurred",console.error("Failed to send advert:",Un)}finally{_t.value=!1}},cn=()=>{te.value=!1,he.value=!1,De.value=null,_t.value=!1},Jn=async()=>{if(!Ot.value){Ot.value=!0;try{await pt.toggleMode()}catch(Un){console.error("Failed to toggle mode:",Un)}finally{Ot.value=!1}}},Bn=async()=>{if(!jt.value){jt.value=!0;try{await pt.toggleDutyCycle()}catch(Un){console.error("Failed to toggle duty cycle:",Un)}finally{jt.value=!1}}},ni=Ga(new Date().toLocaleTimeString());setInterval(()=>{ni.value=new Date().toLocaleTimeString()},1e3);const Wi=$o(()=>{const Un=pt.dutyCyclePercentage;let qr="#A5E5B6";return Un>90?qr="#FB787B":Un>70&&(qr="#FFC246"),{width:Un===0?"2px":`${Math.max(Un,2)}%`,backgroundColor:qr}});return(Un,qr)=>(_i(),zi(Pu,null,[Un.showMobileSidebar?(_i(),zi("div",yet,[Ee("div",{class:"absolute inset-0 bg-black/50",onClick:mn}),Ee("div",xet,[Ee("div",_et,[Ee("div",bet,[Ee("div",null,[qr[1]||(qr[1]=Ee("h1",{class:"text-white text-[20px] font-bold"},"pyMC Repeater",-1)),Ee("p",wet,[Qu(Qi(zl(pt).nodeName)+" ",1),Ee("span",{class:jo(["inline-block w-2 h-2 rounded-full ml-2",zl(pt).statusBadge.text==="Active"?"bg-accent-green":zl(pt).statusBadge.text==="Monitor Mode"?"bg-secondary":"bg-accent-red"]),title:zl(pt).statusBadge.title},null,10,ket)]),Ee("p",Tet,"<"+Qi(zl(pt).pubKey)+">",1)]),Ee("button",{onClick:mn,class:"text-dark-text"},"✕")]),qr[9]||(qr[9]=Ee("div",{class:"border-t border-dark-border mb-4"},null,-1)),Ee("div",Aet,[qr[3]||(qr[3]=Ee("p",{class:"text-dark-text text-xs uppercase mb-2"},"Actions",-1)),Ee("button",{onClick:qr[0]||(qr[0]=Di=>te.value=!0),class:"w-full bg-white rounded-[10px] py-3 px-4 flex items-center gap-2 text-sm font-medium text-[#212122] hover:bg-gray-100 transition-colors mb-2"},qr[2]||(qr[2]=[Ee("svg",{class:"w-3.5 h-3.5",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M7 0C5.61553 0 4.26216 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.003033 5.6003 -0.13559 7.00777 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C13.998 5.1441 13.2599 3.36479 11.9475 2.05247C10.6352 0.74015 8.8559 0.0020073 7 0V0ZM7 12.8333C5.84628 12.8333 4.71846 12.4912 3.75918 11.8502C2.79989 11.2093 2.05222 10.2982 1.61071 9.23232C1.16919 8.16642 1.05368 6.99353 1.27876 5.86197C1.50384 4.73042 2.05941 3.69102 2.87521 2.87521C3.69102 2.0594 4.73042 1.50383 5.86198 1.27875C6.99353 1.05367 8.16642 1.16919 9.23232 1.6107C10.2982 2.05221 11.2093 2.79989 11.8502 3.75917C12.4912 4.71846 12.8333 5.84628 12.8333 7C12.8316 8.54658 12.2165 10.0293 11.1229 11.1229C10.0293 12.2165 8.54658 12.8316 7 12.8333ZM8.16667 7C8.1676 7.20501 8.11448 7.40665 8.01268 7.58461C7.91087 7.76256 7.76397 7.91054 7.58677 8.01365C7.40957 8.11676 7.20833 8.17136 7.00332 8.17194C6.7983 8.17252 6.59675 8.11906 6.41897 8.01696C6.24119 7.91485 6.09346 7.7677 5.99065 7.59033C5.88784 7.41295 5.83358 7.21162 5.83335 7.0066C5.83312 6.80159 5.88691 6.60013 5.98932 6.42252C6.09172 6.24491 6.23912 6.09743 6.41667 5.99492V3.5H7.58334V5.99492C7.76016 6.09659 7.90713 6.24298 8.00952 6.41939C8.1119 6.5958 8.1661 6.79603 8.16667 7Z",fill:"#212122"})],-1),Qu(" Send Advert ",-1)]))]),Ee("div",Met,[qr[4]||(qr[4]=Ee("p",{class:"text-dark-text text-xs uppercase mb-2"},"Monitoring",-1)),Ee("div",Eet,[(_i(!0),zi(Pu,null,Jh(Mr.slice(0,3),Di=>(_i(),zi("button",{key:Di.name,onClick:Fi=>Vr(Di.route),class:jo([Tr.value(Di.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(_i(),Z0(f4(pr[Di.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Qi(Di.name),1)],10,Cet))),128))])]),Ee("div",Let,[qr[5]||(qr[5]=Ee("p",{class:"text-dark-text text-xs uppercase mb-2"},"System",-1)),Ee("div",Pet,[(_i(!0),zi(Pu,null,Jh(Mr.slice(3),Di=>(_i(),zi("button",{key:Di.name,onClick:Fi=>Vr(Di.route),class:jo([Tr.value(Di.route)?"bg-primary/20 shadow-[0_0_6px_0_rgba(170,232,232,0.20)] text-primary":"text-white hover:bg-white/5","w-full rounded-[10px] py-3 px-4 flex items-center gap-3 text-sm transition-all"])},[(_i(),Z0(f4(pr[Di.icon]),{class:"w-3.5 h-3.5"})),Qu(" "+Qi(Di.name),1)],10,Iet))),128))])]),Wl(jO,{"current-value":zl(pt).noiseFloorDbm||-116,"update-interval":3e3,class:"mb-4"},null,8,["current-value"]),Ee("button",{onClick:Jn,disabled:Ot.value,class:jo(["p-4 flex items-center justify-between mb-3 w-full transition-all duration-200 cursor-pointer group",zl(pt).modeButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Ee("div",Oet,[Wl(GO,{class:"w-4 h-4 text-white group-hover:text-primary transition-colors"}),qr[6]||(qr[6]=Ee("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Mode",-1))]),Ee("span",{class:jo(["text-xs font-medium group-hover:text-white transition-colors",zl(pt).modeButtonState.warning?"text-accent-red":"text-accent-green"])},Qi(Ot.value?"Changing...":zl(pt).currentMode.charAt(0).toUpperCase()+zl(pt).currentMode.slice(1)),3)],10,zet),Ee("button",{onClick:Bn,disabled:jt.value,class:jo(["p-4 flex items-center justify-between mb-3 w-full transition-all duration-200 cursor-pointer group",zl(pt).dutyCycleButtonState.warning?"glass-card-orange hover:bg-accent-red/10":"glass-card-green hover:bg-accent-green/10"])},[Ee("div",Fet,[Wl(YO,{class:"w-3.5 h-3.5 text-white group-hover:text-primary transition-colors"}),qr[7]||(qr[7]=Ee("span",{class:"text-white text-sm group-hover:text-primary transition-colors"},"Duty Cycle",-1))]),Ee("span",{class:jo(["text-xs font-medium group-hover:text-white transition-colors",zl(pt).dutyCycleButtonState.warning?"text-accent-red":"text-primary"])},Qi(jt.value?"Changing...":zl(pt).dutyCycleEnabled?"Enabled":"Disabled"),3)],10,Det),Ee("div",Ret,[Ee("div",Bet,[Ee("span",Net," R:v"+Qi(zl(pt).version),1),Ee("span",jet," C:v"+Qi(zl(pt).coreVersion),1)])]),qr[10]||(qr[10]=Ee("div",{class:"border-t border-accent-green mb-4"},null,-1)),zl(pt).dutyCycleEnabled?(_i(),zi("div",Uet,[Ee("p",Vet,[qr[8]||(qr[8]=Qu(" Duty Cycle: ",-1)),Ee("span",Het,Qi(zl(pt).dutyCycleUtilization.toFixed(1))+"% / "+Qi(zl(pt).dutyCycleMax.toFixed(1))+"%",1)]),Ee("div",Wet,[Ee("div",{class:"h-full rounded-full transition-all duration-300",style:hm(Wi.value)},null,4)])])):is("",!0),Ee("p",qet,"Last Updated: "+Qi(ni.value),1)])])])):is("",!0),Wl(UO,{isOpen:te.value,isLoading:_t.value,isSuccess:he.value,error:De.value,onClose:cn,onSend:Dt},null,8,["isOpen","isLoading","isSuccess","error"])],64))}}),Zet={class:"glass-card p-6 mb-5 rounded-[20px] relative z-10"},Get={class:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4"},Yet={class:"flex items-center gap-3"},Ket={class:"text-right mr-4"},Xet={key:0,class:"flex items-center gap-2"},Jet={key:1,class:"space-y-1"},Qet={class:"text-dark-text text-sm"},trt={class:"text-primary font-medium"},ert={key:0,class:"text-xs text-dark-text/80"},rrt={key:0},nrt={key:1,class:"text-xs text-dark-text/60"},irt={key:2},art={key:0,class:"text-xs text-dark-text/60"},ort=["disabled"],srt={class:"flex items-center justify-between mb-3"},lrt={class:"flex items-center gap-2"},urt=["disabled"],crt=["disabled"],hrt={class:"space-y-3 text-sm"},frt={key:0,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},drt={class:"flex items-center justify-between"},prt={class:"text-accent-red font-bold"},mrt={class:"text-xs text-gray-400 mt-1"},grt={key:1,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-accent-green"},vrt={class:"flex items-center justify-between"},yrt={class:"text-accent-green font-bold"},xrt={key:0,class:"text-xs text-gray-400 mt-1"},_rt={key:2,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},brt={key:3,class:"bg-[#0B1014] p-3 rounded-lg border border-accent-red/30 border-l-2 border-l-accent-red"},wrt={class:"text-xs text-gray-400"},krt={class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 border-l-2 border-l-primary"},Trt={class:"flex items-center justify-between"},Art={class:"text-primary font-bold"},Mrt={key:0,class:"text-xs text-gray-400 mt-1"},Srt={class:"flex items-center justify-between"},Ert={class:"text-white font-medium"},Crt={key:0,class:"mt-2"},Lrt={class:"text-xs text-gray-400"},Prt={class:"text-gray-300"},Irt={key:4,class:"bg-[#0B1014] p-4 rounded-lg border border-white/10 text-center"},zrt={key:5,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10 text-center"},Ort=Dc({name:"TopBar",__name:"TopBar",emits:["toggleMobileSidebar"],setup(d,{emit:s}){const E=s,B=Om(),K=Ga(!1),pt=Ga(null),_t=Ga({hasUpdate:!1,currentVersion:"",latestVersion:"",isChecking:!1,lastChecked:null,error:null}),Ot=Ga({}),jt=Ga(!0),te=Ga(null),he=["Chat Node","Repeater","Room Server"];function De(Un){const qr=Un.target;pt.value&&!pt.value.contains(qr)&&(K.value=!1)}const er=async()=>{try{jt.value=!0;const Un={};for(const qr of he)try{const Di=await Ah.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(qr)}&hours=168`);Di.success&&Array.isArray(Di.data)?Un[qr]=Di.data:Un[qr]=[]}catch(Di){console.error(`Error fetching ${qr} nodes:`,Di),Un[qr]=[]}Ot.value=Un,te.value=new Date}catch(Un){console.error("Error updating tracked nodes:",Un)}finally{jt.value=!1}},pr=async()=>{if(!_t.value.isChecking)try{_t.value.isChecking=!0,_t.value.error=null,await B.fetchStats();const Un=B.version;if(!Un||Un==="Unknown"){_t.value.error="Unable to determine current version";return}const Di=await fetch("https://raw.githubusercontent.com/rightup/pyMC_Repeater/main/repeater/__init__.py");if(!Di.ok)throw new Error(`GitHub request failed: ${Di.status}`);const Pi=(await Di.text()).match(/__version__\s*=\s*["']([^"']+)["']/);if(!Pi)throw new Error("Could not parse version from GitHub file");const bi=Pi[1];_t.value.currentVersion=Un,_t.value.latestVersion=bi,_t.value.lastChecked=new Date,_t.value.hasUpdate=Un!==bi}catch(Un){console.error("Error checking for updates:",Un),_t.value.error=Un instanceof Error?Un.message:"Failed to check for updates"}finally{_t.value.isChecking=!1}},Mr=$o(()=>Object.values(Ot.value).reduce((qr,Di)=>qr+Di.length,0)),Tr=$o(()=>he.map(qr=>({type:qr,count:Ot.value[qr]?.length||0})).filter(qr=>qr.count>0)),Vr=$o(()=>_t.value.hasUpdate||Mr.value>0),mn=Un=>({"Chat Node":"text-blue-400",Repeater:"text-accent-green","Room Server":"text-accent-purple"})[Un]||"text-gray-400",Dt=Un=>{const qr=Ot.value[Un]||[];return qr.length===0?"None":qr.reduce((Fi,Pi)=>Pi.last_seen>Fi.last_seen?Pi:Fi,qr[0]).node_name||"Unknown Node"};let cn=null,Jn=null;const Bn=()=>{cn&&clearInterval(cn),cn=setInterval(()=>{er()},3e4),Jn&&clearInterval(Jn),Jn=setInterval(()=>{pr()},6e5)},ni=()=>{cn&&(clearInterval(cn),cn=null),Jn&&(clearInterval(Jn),Jn=null)};bp(()=>{document.addEventListener("click",De),er(),pr(),Bn()}),gg(()=>{document.removeEventListener("click",De),ni()});const Wi=()=>{E("toggleMobileSidebar")};return(Un,qr)=>(_i(),zi("div",Zet,[Ee("div",Get,[Ee("div",{class:"flex items-center gap-3"},[Ee("button",{onClick:Wi,class:"lg:hidden w-10 h-10 rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors"},qr[2]||(qr[2]=[Ee("svg",{class:"w-5 h-5 text-white",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M3 6h14M3 10h14M3 14h14",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])),qr[3]||(qr[3]=Ee("div",null,[Ee("h1",{class:"text-white text-[35px] font-bold mb-2"},"Welcome👋")],-1))]),Ee("div",Yet,[Ee("div",Ket,[jt.value?(_i(),zi("div",Xet,qr[4]||(qr[4]=[Ee("div",{class:"animate-spin rounded-full h-3 w-3 border-b-2 border-primary"},null,-1),Ee("p",{class:"text-dark-text text-sm"},"Loading tracking data...",-1)]))):Mr.value>0?(_i(),zi("div",Jet,[Ee("p",Qet,[qr[5]||(qr[5]=Qu(" Tracking: ",-1)),Ee("span",trt,Qi(Mr.value)+" node"+Qi(Mr.value===1?"":"s"),1)]),Tr.value.length>1?(_i(),zi("div",ert,[(_i(!0),zi(Pu,null,Jh(Tr.value,(Di,Fi)=>(_i(),zi("span",{key:Di.type,class:"inline"},[Qu(Qi(Di.count)+" "+Qi(Di.type)+Qi(Di.count===1?"":"s"),1),FiK.value=!K.value,["stop"])),class:"w-[35px] h-[35px] rounded bg-[#1A1E1F] flex items-center justify-center hover:bg-[#2A2E2F] transition-colors relative"},[qr[8]||(qr[8]=Ee("svg",{class:"w-5 h-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M12.5 14.1667V15C12.5 16.3807 11.3807 17.5 9.99998 17.5C8.61927 17.5 7.49998 16.3807 7.49998 15V14.1667M12.5 14.1667L7.49998 14.1667M12.5 14.1667H15.8333C16.2936 14.1667 16.6666 13.7936 16.6666 13.3333V12.845C16.6666 12.624 16.5788 12.4122 16.4225 12.2559L15.9969 11.8302C15.8921 11.7255 15.8333 11.5833 15.8333 11.4351V8.33333C15.8333 8.1863 15.828 8.04045 15.817 7.89674M7.49998 14.1667L4.16665 14.1668C3.70641 14.1668 3.33331 13.7934 3.33331 13.3332V12.8451C3.33331 12.6241 3.42118 12.4124 3.57745 12.2561L4.00307 11.8299C4.10781 11.7251 4.16665 11.5835 4.16665 11.4353V8.33331C4.16665 5.11167 6.77831 2.5 9.99998 2.5C10.593 2.5 11.1653 2.58848 11.7045 2.75297M15.817 7.89674C16.8223 7.32275 17.5 6.24051 17.5 5C17.5 3.15905 16.0076 1.66666 14.1666 1.66666C13.1914 1.66666 12.3141 2.08544 11.7045 2.75297M15.817 7.89674C15.3304 8.17457 14.7671 8.33333 14.1666 8.33333C12.3257 8.33333 10.8333 6.84095 10.8333 5C10.8333 4.13425 11.1634 3.34558 11.7045 2.75297M15.817 7.89674C15.817 7.89674 15.817 7.89675 15.817 7.89674ZM11.7045 2.75297C11.7049 2.75309 11.7053 2.75321 11.7057 2.75333",stroke:"white","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),Vr.value?(_i(),zi("span",{key:0,class:jo(["absolute top-2 right-2 w-2 h-2 rounded-full",_t.value.hasUpdate?"bg-accent-red animate-pulse":"bg-primary"])},null,2)):is("",!0)]),K.value?(_i(),zi("div",{key:0,ref_key:"notifRef",ref:pt,class:"absolute right-6 top-14 z-[100] w-80 bg-[#1A1E1F] border border-white/20 rounded-[15px] p-4 shadow-2xl backdrop-blur-sm",onClick:qr[1]||(qr[1]=Pm(()=>{},["stop"]))},[Ee("div",srt,[qr[10]||(qr[10]=Ee("p",{class:"text-white font-semibold"},"System Status",-1)),Ee("div",lrt,[Ee("button",{onClick:pr,disabled:_t.value.isChecking,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50",title:"Check for updates"},Qi(_t.value.isChecking?"Checking...":"Check Updates"),9,urt),qr[9]||(qr[9]=Ee("span",{class:"text-dark-text text-xs"},"•",-1)),Ee("button",{onClick:er,disabled:jt.value,class:"text-xs text-primary hover:text-primary/80 disabled:opacity-50"},Qi(jt.value?"Updating...":"Refresh"),9,crt)])]),Ee("div",hrt,[_t.value.hasUpdate?(_i(),zi("div",frt,[Ee("div",drt,[qr[11]||(qr[11]=Ee("span",{class:"text-white font-medium"},"Update Available",-1)),Ee("span",prt,Qi(_t.value.latestVersion),1)]),Ee("div",mrt," Current: "+Qi(_t.value.currentVersion),1),qr[12]||(qr[12]=Ee("div",{class:"text-xs text-gray-300 mt-2"},[Ee("a",{href:"https://github.com/rightup/pyMC_Repeater",target:"_blank",class:"text-accent-red hover:text-accent-red/80 underline"}," Goto Github→ ")],-1))])):_t.value.currentVersion&&!_t.value.isChecking?(_i(),zi("div",grt,[Ee("div",vrt,[qr[13]||(qr[13]=Ee("span",{class:"text-white font-medium"},"Up to Date",-1)),Ee("span",yrt,Qi(_t.value.currentVersion),1)]),_t.value.lastChecked?(_i(),zi("div",xrt," Last checked: "+Qi(_t.value.lastChecked.toLocaleTimeString()),1)):is("",!0)])):_t.value.isChecking?(_i(),zi("div",_rt,qr[14]||(qr[14]=[Ee("div",{class:"flex items-center justify-center gap-2"},[Ee("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),Ee("span",{class:"text-gray-300"},"Checking for updates...")],-1)]))):_t.value.error?(_i(),zi("div",brt,[qr[15]||(qr[15]=Ee("div",{class:"text-white font-medium mb-1"},"Update Check Failed",-1)),Ee("div",wrt,Qi(_t.value.error),1)])):is("",!0),qr[20]||(qr[20]=Ee("div",{class:"border-t border-white/10"},null,-1)),qr[21]||(qr[21]=Ee("div",{class:"text-white font-medium text-sm mb-2"},"Mesh Network Status",-1)),Ee("div",krt,[Ee("div",Trt,[qr[16]||(qr[16]=Ee("span",{class:"text-white font-medium"},"Total Tracked Nodes",-1)),Ee("span",Art,Qi(Mr.value),1)]),te.value?(_i(),zi("div",Mrt," Last updated: "+Qi(te.value.toLocaleString()),1)):is("",!0)]),(_i(!0),zi(Pu,null,Jh(Tr.value,Di=>(_i(),zi("div",{key:Di.type,class:"bg-[#0B1014] p-3 rounded-lg border border-white/10"},[Ee("div",Srt,[Ee("span",Ert,Qi(Di.type)+Qi(Di.count===1?"":"s"),1),Ee("span",{class:jo([mn(Di.type),"font-bold"])},Qi(Di.count),3)]),Ot.value[Di.type]?.length>0?(_i(),zi("div",Crt,[Ee("div",Lrt,[qr[17]||(qr[17]=Qu(" Latest: ",-1)),Ee("span",Prt,Qi(Dt(Di.type)),1)])])):is("",!0)]))),128)),Mr.value===0&&!jt.value?(_i(),zi("div",Irt,qr[18]||(qr[18]=[Ee("div",{class:"text-gray-400"},[Ee("svg",{class:"w-8 h-8 mx-auto mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.034 0-3.9.785-5.291 2.09M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]),Ee("span",null,"No mesh nodes detected")],-1)]))):is("",!0),jt.value?(_i(),zi("div",zrt,qr[19]||(qr[19]=[Ee("div",{class:"flex items-center justify-center gap-2"},[Ee("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary"}),Ee("span",{class:"text-gray-300"},"Scanning mesh network...")],-1)]))):is("",!0)])],512)):is("",!0)])])]))}}),Drt=ld(Ort,[["__scopeId","data-v-0a06f286"]]),Frt={class:"min-h-screen bg-dark-bg overflow-hidden relative font-sans"},Rrt={class:"relative flex min-h-screen"},Brt={class:"flex-1 p-4 lg:p-[15px] overflow-y-auto"},Nrt=Dc({name:"DashboardLayout",__name:"DashboardLayout",setup(d){const s=Ga(!1),E=()=>{s.value=!s.value},B=()=>{s.value=!1};return(K,pt)=>{const _t=QA("router-view");return _i(),zi("div",Frt,[pt[1]||(pt[1]=Ee("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 -top-[79px] left-[575px] mix-blend-screen pointer-events-none"},null,-1)),pt[2]||(pt[2]=Ee("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-75 -top-[94px] -left-[92px] mix-blend-screen pointer-events-none"},null,-1)),pt[3]||(pt[3]=Ee("div",{class:"absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] bg-gradient-to-b from-cyan-400/25 to-cyan-200/10 blur-[120px] opacity-80 top-[373px] left-[246px] mix-blend-screen pointer-events-none"},null,-1)),Ee("div",Rrt,[Wl(vet,{class:"hidden lg:block"}),Wl($et,{showMobileSidebar:s.value,"onUpdate:showMobileSidebar":pt[0]||(pt[0]=Ot=>s.value=Ot),onClose:B},null,8,["showMobileSidebar"]),Ee("main",Brt,[Wl(Drt,{onToggleMobileSidebar:E}),Wl(_t)])])])}}}),jrt=Dc({__name:"App",setup(d){return(s,E)=>(_i(),Z0(Nrt))}}),Urt={class:"sparkline-container"},Vrt={class:"text-white text-sm font-semibold mb-4"},Hrt={class:"flex items-end gap-4"},Wrt=["id","width","height","viewBox"],qrt=["id"],$rt=["stop-color"],Zrt=["stop-color"],Grt=["d","fill"],Yrt=["d","stroke"],Krt=["cx","cy","fill"],Xrt=Dc({name:"SparklineChart",__name:"Sparkline",props:{title:{},value:{},color:{},data:{default:()=>[]},width:{default:131},height:{default:37},animate:{type:Boolean,default:!0},showChart:{type:Boolean,default:!0}},setup(d){const s=d,E=$o(()=>{if(s.data&&s.data.length>0)return s.data;const _t=typeof s.value=="number"?s.value:10,Ot=20,jt=_t*.3;return Array.from({length:Ot},(te,he)=>{const De=Math.sin(he/Ot*Math.PI*2)*jt*.5,er=(Math.random()-.5)*jt*.3;return Math.max(0,_t+De+er)})}),B=$o(()=>{const _t=E.value;if(_t.length<2)return"";const Ot=Math.max(..._t),jt=Math.min(..._t),te=Ot-jt||1,he=s.width/(_t.length-1);let De="";return _t.forEach((er,pr)=>{const Mr=pr*he,Tr=s.height-(er-jt)/te*s.height;if(pr===0)De+=`M ${Mr} ${Tr}`;else{const mn=((pr-1)*he+Mr)/2;De+=` Q ${mn} ${Tr} ${Mr} ${Tr}`}}),De}),K=Ga("");bp(()=>{K.value=B.value}),Em(()=>s.data,(_t,Ot)=>{const jt=!Ot||_t.length!==Ot.length||Math.abs(_t.length-Ot.length)>5;s.animate&&jt?(K.value="",setTimeout(()=>{K.value=B.value},50)):K.value=B.value});const pt=$o(()=>`sparkline-${s.title.replace(/\s+/g,"-").toLowerCase()}`);return(_t,Ot)=>(_i(),zi("div",Urt,[Ee("p",Vrt,Qi(_t.title),1),Ee("div",Hrt,[Ee("span",{class:"text-[30px] font-bold",style:hm({color:_t.color})},[Qu(Qi(_t.value),1),pY(_t.$slots,"unit",{},void 0)],4),_t.showChart?(_i(),zi("svg",{key:0,id:pt.value,class:"mb-3 sparkline-svg",width:_t.width,height:_t.height,viewBox:`0 0 ${_t.width} ${_t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("defs",null,[Ee("linearGradient",{id:`gradient-${pt.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[Ee("stop",{offset:"0%","stop-color":_t.color,"stop-opacity":"0.3"},null,8,$rt),Ee("stop",{offset:"100%","stop-color":_t.color,"stop-opacity":"0.1"},null,8,Zrt)],8,qrt)]),Ee("path",{d:`${K.value} L ${_t.width} ${_t.height} L 0 ${_t.height} Z`,fill:`url(#gradient-${pt.value})`,class:"sparkline-fill"},null,8,Grt),Ee("path",{d:K.value,stroke:_t.color,"stroke-width":"2",fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:jo(["sparkline-path",{"animate-draw":_t.animate}])},null,10,Yrt),E.value.length>0?(_i(),zi("circle",{key:0,cx:_t.width,cy:_t.height-(E.value[E.value.length-1]-Math.min(...E.value))/(Math.max(...E.value)-Math.min(...E.value)||1)*_t.height,r:"2",fill:_t.color,class:jo(["sparkline-dot",{"animate-pulse":_t.animate}])},null,10,Krt)):is("",!0)],8,Wrt)):is("",!0)])]))}}),o_=ld(Xrt,[["__scopeId","data-v-574bf55e"]]),Jrt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-5"},Qrt=Dc({name:"StatsCards",__name:"StatsCards",setup(d){const s=sw(),E=Ga(null),B=$o(()=>{const _t=s.packetStats,Ot=s.systemStats,jt=te=>{const he=Math.floor(te/86400),De=Math.floor(te%86400/3600),er=Math.floor(te%3600/60);return he>0?`${he}d ${De}h`:De>0?`${De}h ${er}m`:`${er}m`};return{packetsReceived:_t?.total_packets||0,packetsForwarded:_t?.transmitted_packets||0,uptimeFormatted:Ot?jt(Ot.uptime_seconds||0):"0m",uptimeHours:Ot?Math.floor((Ot.uptime_seconds||0)/3600):0,droppedPackets:_t?.dropped_packets||0,signalQuality:Math.round((_t?.avg_rssi||0)+120)}}),K=$o(()=>s.sparklineData),pt=async()=>{try{await Promise.all([s.fetchSystemStats(),s.fetchPacketStats({hours:24})])}catch(_t){console.error("Error fetching stats:",_t)}};return bp(()=>{pt(),E.value=window.setInterval(pt,5e3)}),gg(()=>{E.value&&clearInterval(E.value)}),(_t,Ot)=>(_i(),zi("div",Jrt,[Wl(o_,{title:"RX Packets",value:B.value.packetsReceived,color:"#AAE8E8",data:K.value.totalPackets},null,8,["value","data"]),Wl(o_,{title:"Forward",value:B.value.packetsForwarded,color:"#FFC246",data:K.value.transmittedPackets},null,8,["value","data"]),Wl(o_,{title:"Up Time",value:B.value.uptimeFormatted,color:"#EBA0FC",data:[],showChart:!1},null,8,["value"]),Wl(o_,{title:"Dropped",value:B.value.droppedPackets,color:"#FB787B",data:K.value.droppedPackets},null,8,["value","data"])]))}}),tnt={class:"glass-card rounded-[10px] p-6"},ent={class:"h-80 relative"},rnt={key:0,class:"absolute inset-0 flex items-center justify-center"},nnt={key:1,class:"absolute inset-0 flex items-center justify-center"},int={class:"text-red-400"},ant={key:2,class:"absolute inset-0 flex items-center justify-center"},ont={key:3,class:"h-full flex items-end justify-around gap-2 px-4"},snt={class:"relative w-full h-64 flex flex-col justify-end"},lnt={class:"text-white text-xs font-semibold drop-shadow-lg backdrop-blur-sm bg-black/20 px-2 py-0.5 rounded-md border border-white/10"},unt={class:"mt-2 text-center"},cnt={class:"text-white text-xs font-medium leading-tight"},hnt={key:0,class:"mt-4 text-sm text-white text-center"},fnt=Dc({name:"SignalQualityChart",__name:"SignalQualityChart",setup(d){const s=Ga([]),E=Ga(null),B=Ga(!0),K=Ga(null),pt=["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(139, 92, 246, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(6, 182, 212, 0.8)","rgba(249, 115, 22, 0.8)","rgba(132, 204, 22, 0.8)","rgba(236, 72, 153, 0.8)","rgba(107, 114, 128, 0.8)"],_t=async()=>{try{K.value=null;const jt=await Ah.get("/packet_type_graph_data");if(jt?.success&&jt?.data){const te=jt.data;if(te?.series){const he=[];te.series.forEach((De,er)=>{let pr=0;De.data&&Array.isArray(De.data)&&(pr=De.data.reduce((Mr,Tr)=>Mr+(Tr[1]||0),0)),pr>0&&he.push({name:De.name||`Type ${De.type}`,type:De.type,count:pr,color:pt[er%pt.length]})}),he.sort((De,er)=>er.count-De.count),s.value=he,B.value=!1}else console.error("No series data found in response"),K.value="No series data in server response",B.value=!1}else console.error("Invalid API response structure:",jt),K.value="Invalid response from server",B.value=!1}catch(jt){console.error("Failed to fetch packet type data:",jt),K.value=jt instanceof Error?jt.message:"Failed to load data",B.value=!1}},Ot=jt=>{if(s.value.length===0)return 0;const te=Math.max(...s.value.map(he=>he.count));return Math.max(jt/te*100,2)};return bp(()=>{_t(),E.value=setInterval(()=>{_t()},3e4)}),gg(()=>{E.value&&clearInterval(E.value)}),(jt,te)=>(_i(),zi("div",tnt,[te[2]||(te[2]=Ee("h3",{class:"text-white text-xl font-semibold mb-4"},"Packet Types",-1)),te[3]||(te[3]=Ee("p",{class:"text-white text-sm uppercase mb-4"},"Distribution by Type",-1)),Ee("div",ent,[B.value?(_i(),zi("div",rnt,te[0]||(te[0]=[Ee("div",{class:"text-white"},"Loading packet types...",-1)]))):K.value?(_i(),zi("div",nnt,[Ee("div",int,Qi(K.value),1)])):s.value.length===0?(_i(),zi("div",ant,te[1]||(te[1]=[Ee("div",{class:"text-white"},"No packet data available",-1)]))):(_i(),zi("div",ont,[(_i(!0),zi(Pu,null,Jh(s.value,he=>(_i(),zi("div",{key:he.type,class:"flex flex-col items-center flex-1 max-w-20 h-full"},[Ee("div",snt,[Ee("div",{class:"w-full rounded-t-[10px] transition-all duration-500 ease-out flex items-end justify-center pb-1 backdrop-blur-[50px] shadow-lg border border-white/20 hover:border-white/30",style:hm({height:Ot(he.count)+"%",background:`linear-gradient(135deg, + ${he.color} 0%, + ${he.color.replace("0.8","0.6")} 30%, + ${he.color.replace("0.8","0.4")} 70%, + ${he.color.replace("0.8","0.3")} 100%), linear-gradient(91deg, rgba(34, 34, 34, 0.43) 1.17%, rgba(135, 135, 136, 0.10) 99.82%)`,backgroundBlendMode:"overlay, normal",minHeight:"8px",boxShadow:` - 0 8px 32px ${pe.color.replace("0.8","0.3")}, + 0 8px 32px ${he.color.replace("0.8","0.3")}, 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2) - `})},[Oe("span",Art,na(pe.count),1)],4)]),Oe("div",Mrt,[Oe("div",Srt,na(pe.name.replace(/\([^)]*\)/g,"").trim()),1)])]))),128))]))]),l.value.length>0?(Si(),Fi("div",Ert," Total packet types: "+na(l.value.length)+" | Total packets: "+na(l.value.reduce((pe,Be)=>pe+Be.count,0)),1)):ps("",!0)]))}}),Lrt=hd(Crt,[["__scopeId","data-v-dc58fd68"]]),Prt={class:"glass-card rounded-[10px] p-6"},zrt={class:"relative h-48"},Irt={class:"mt-4 grid grid-cols-2 gap-4"},Ort={class:"text-center"},Drt={class:"text-2xl font-bold text-white"},Frt={class:"text-center"},Rrt={class:"text-2xl font-bold text-white"},Brt={class:"mt-3 grid grid-cols-3 gap-3 text-center"},Nrt={class:"text-sm font-semibold text-accent-purple"},jrt={class:"text-sm font-semibold text-accent-red"},Urt={class:"text-sm font-semibold text-white"},Vrt=ah({name:"PerformanceChart",__name:"PerformanceChart",setup(d){const l=sw(),z=ro(null),j=ro([]),J=ro(null),mt=ro(!0),kt=async()=>{try{mt.value=!0;const $t=await Ah.get("/recent_packets",{limit:50});if(!$t.success){j.value=[],mt.value=!1,C0(()=>{Dt()});return}const ee=$t.data||[],pe=Date.now(),Be=24,ir=12,vr=Be*60*60*1e3/ir,Ir=[];for(let Pr=0;Pr{const ai=jn.timestamp*1e3;return ai>=Wr&&ai!jn.transmitted).length,ei=Ft.filter(jn=>jn.transmitted).length;Ir.push({time:new Date(Wr+vr/2).toISOString(),rxPackets:wn,txPackets:ei})}j.value=Ir,mt.value=!1,C0(()=>{Dt()})}catch{j.value=[],mt.value=!1,C0(()=>{Dt()})}},Dt=()=>{if(!z.value)return;const $t=z.value,ee=$t.getContext("2d");if(!ee)return;const pe=$t.parentElement;if(!pe)return;const Be=pe.getBoundingClientRect(),ir=Be.width,vr=Be.height;$t.width=ir*window.devicePixelRatio,$t.height=vr*window.devicePixelRatio,$t.style.width=ir+"px",$t.style.height=vr+"px",ee.scale(window.devicePixelRatio,window.devicePixelRatio);const Ir=20;if(ee.clearRect(0,0,ir,vr),mt.value){ee.fillStyle="#666",ee.font="16px sans-serif",ee.textAlign="center",ee.fillText("Loading chart data...",ir/2,vr/2);return}if(j.value.length===0){ee.fillStyle="#666",ee.font="16px sans-serif",ee.textAlign="center",ee.fillText("No data available",ir/2,vr/2);return}const Pr=j.value.every(Gi=>Gi.rxPackets===0&&Gi.txPackets===0),Wr=ir-Ir*2,Tn=vr-Ir*2,Ft=j.value.flatMap(Gi=>[Gi.rxPackets,Gi.txPackets]),wn=Math.min(...Ft),ei=Math.max(...Ft),jn=wn,ai=ei,Qi=Math.max(ai-jn,1);if(ee.strokeStyle="rgba(255, 255, 255, 0.1)",ee.lineWidth=1,jn<=0&&ai>=0){ee.strokeStyle="rgba(255, 255, 255, 0.3)",ee.lineWidth=2;const Gi=vr-Ir-(0-jn)/Qi*Tn;ee.beginPath(),ee.moveTo(Ir,Gi),ee.lineTo(ir-Ir,Gi),ee.stroke(),Gi>20&&Gi1&&(ee.strokeStyle="#EBA0FC",ee.lineWidth=2,ee.beginPath(),j.value.forEach((Gi,En)=>{const Fa=Ir+Wr*En/(j.value.length-1),Sa=vr-Ir-(Gi.rxPackets-jn)/Qi*Tn;En===0?ee.moveTo(Fa,Sa):ee.lineTo(Fa,Sa)}),ee.stroke(),ee.fillStyle="#EBA0FC",j.value.forEach((Gi,En)=>{const Fa=Ir+Wr*En/(j.value.length-1),Sa=vr-Ir-(Gi.rxPackets-jn)/Qi*Tn;ee.beginPath(),ee.arc(Fa,Sa,2,0,2*Math.PI),ee.fill()})),j.value.length>1&&(ee.strokeStyle="#FB787B",ee.lineWidth=2,ee.beginPath(),j.value.forEach((Gi,En)=>{const Fa=Ir+Wr*En/(j.value.length-1),Sa=vr-Ir-(Gi.txPackets-jn)/Qi*Tn;En===0?ee.moveTo(Fa,Sa):ee.lineTo(Fa,Sa)}),ee.stroke(),ee.fillStyle="#FB787B",j.value.forEach((Gi,En)=>{const Fa=Ir+Wr*En/(j.value.length-1),Sa=vr-Ir-(Gi.txPackets-jn)/Qi*Tn;ee.beginPath(),ee.arc(Fa,Sa,2,0,2*Math.PI),ee.fill()})),ee.fillStyle="rgba(255, 255, 255, 0.6)",ee.font="12px system-ui",ee.textAlign="center",Pr&&(ee.fillStyle="rgba(255, 255, 255, 0.6)",ee.font="14px system-ui",ee.textAlign="center",ee.fillText("No packet activity in last 24 hours",ir/2,vr-15))};return i0(()=>{kt(),J.value=window.setInterval(kt,3e4),C0(()=>{Dt(),setTimeout(()=>{Dt()},100)}),window.addEventListener("resize",Dt)}),mg(()=>{J.value&&clearInterval(J.value),window.removeEventListener("resize",Dt)}),($t,ee)=>(Si(),Fi("div",Prt,[ee[5]||(ee[5]=Af('

Performance Metrics

Packet Activity (Last 24 Hours)

Received
Transmitted
',3)),Oe("div",zrt,[Oe("canvas",{ref_key:"chartRef",ref:z,class:"absolute inset-0 w-full h-full"},null,512)]),Oe("div",Irt,[Oe("div",Ort,[Oe("div",Drt,na(Ju(l).packetStats?.total_packets||0),1),ee[0]||(ee[0]=Oe("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Received",-1))]),Oe("div",Frt,[Oe("div",Rrt,na(Ju(l).packetStats?.transmitted_packets||0),1),ee[1]||(ee[1]=Oe("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Transmitted",-1))])]),Oe("div",Brt,[Oe("div",null,[Oe("div",Nrt,na(j.value.length>0?Math.round(j.value.reduce((pe,Be)=>pe+Be.rxPackets,0)/j.value.length*100)/100:0),1),ee[2]||(ee[2]=Oe("div",{class:"text-xs text-white/60"},"Avg RX/hr",-1))]),Oe("div",null,[Oe("div",jrt,na(j.value.length>0?Math.round(j.value.reduce((pe,Be)=>pe+Be.txPackets,0)/j.value.length*100)/100:0),1),ee[3]||(ee[3]=Oe("div",{class:"text-xs text-white/60"},"Avg TX/hr",-1))]),Oe("div",null,[Oe("div",Urt,na(Ju(l).packetStats?.dropped_packets||0),1),ee[4]||(ee[4]=Oe("div",{class:"text-xs text-white/60"},"Dropped",-1))])])]))}}),Hrt=hd(Vrt,[["__scopeId","data-v-2ece57e8"]]),Wrt={class:"relative w-full max-w-4xl max-h-[90vh] overflow-hidden"},qrt={class:"glass-card rounded-[20px] p-8 backdrop-blur-[50px] shadow-2xl border border-white/20"},Zrt={class:"flex items-center justify-between mb-6"},$rt={class:"text-white/70 text-sm"},Grt={class:"max-h-[70vh] overflow-y-auto custom-scrollbar"},Yrt={class:"mb-6"},Krt={class:"glass-card bg-white/5 rounded-[15px] p-4"},Xrt={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Jrt={class:"space-y-3"},Qrt={class:"flex justify-between py-2 border-b border-white/10"},tnt={class:"text-white font-mono text-sm"},ent={class:"flex justify-between py-2 border-b border-white/10"},rnt={class:"text-white font-mono text-xs break-all"},nnt={key:0,class:"flex justify-between py-2 border-b border-white/10"},int={class:"text-white font-mono text-xs"},ant={class:"space-y-3"},ont={class:"flex justify-between py-2 border-b border-white/10"},snt={class:"text-white font-semibold"},lnt={class:"flex justify-between py-2 border-b border-white/10"},unt={class:"text-white font-semibold"},cnt={class:"flex justify-between py-2 border-b border-white/10"},hnt={class:"mb-6"},fnt={class:"glass-card bg-white/5 rounded-[15px] p-4"},dnt={class:"space-y-3"},pnt={class:"flex justify-between py-2 border-b border-white/10"},mnt={class:"text-white"},gnt={key:0,class:"pt-2"},vnt={class:"glass-card bg-black/30 rounded-[10px] p-4 mb-4"},ynt={class:"w-full overflow-x-auto"},xnt={class:"text-white/90 text-xs font-mono whitespace-pre leading-relaxed min-w-full"},_nt={class:"flex items-center justify-between mb-3"},bnt={class:"text-white/80 text-sm font-semibold"},wnt={class:"text-white/60 text-xs"},knt={class:"glass-card bg-black/40 rounded-[8px] p-3 mb-3 overflow-x-auto"},Tnt={class:"font-mono text-sm text-white whitespace-pre min-w-full"},Ant={class:"glass-card bg-white/5 rounded-[10px] overflow-hidden"},Mnt={class:"text-cyan-400 text-sm font-mono"},Snt={class:"text-white text-sm"},Ent={class:"text-white text-sm font-semibold"},Cnt={class:"text-orange-400 text-sm font-mono"},Lnt={key:0,class:"text-white/60 text-xs italic mt-2 px-1"},Pnt={key:1,class:"py-2"},znt={class:"mb-6"},Int={class:"glass-card bg-white/5 rounded-[15px] p-4"},Ont={class:"space-y-4"},Dnt={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Fnt={class:"flex justify-between py-2 border-b border-white/10"},Rnt={class:"flex justify-between py-2 border-b border-white/10"},Bnt={key:0,class:"py-2"},Nnt={class:"glass-card bg-black/20 rounded-[10px] p-4"},jnt={class:"flex items-center flex-wrap gap-2"},Unt={class:"relative group"},Vnt={class:"relative px-3 py-2 bg-gradient-to-br from-blue-500/20 to-cyan-500/20 border border-cyan-400/40 rounded-lg transform transition-all hover:scale-105"},Hnt={class:"font-mono text-xs font-semibold text-white/90"},Wnt={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},qnt={key:0,class:"mx-2 text-cyan-400/60"},Znt={key:1,class:"py-2"},$nt={class:"text-white/70 text-sm mb-2 flex items-center"},Gnt={key:0,class:"w-4 h-4 ml-2 text-yellow-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ynt={key:1,class:"text-yellow-400 text-xs ml-1"},Knt={class:"glass-card bg-black/20 rounded-[10px] p-4"},Xnt={class:"flex items-center flex-wrap gap-2"},Jnt={class:"relative group"},Qnt={key:0,class:"absolute -top-1 -right-1 w-2 h-2 bg-yellow-400 rounded-full animate-pulse"},tit={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},eit={key:0,class:"mx-1 text-orange-400/60"},rit={class:"mb-6"},nit={class:"glass-card bg-white/5 rounded-[15px] p-4"},iit={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4"},ait={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},oit={class:"text-lg font-bold text-white"},sit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},lit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},uit={class:"text-lg font-bold text-white"},cit={class:"mb-4"},hit={class:"flex items-center gap-3"},fit={class:"flex gap-1"},dit={class:"text-white/80 text-sm capitalize"},pit={key:0,class:"mb-4"},mit={class:"text-white/70 text-sm mb-3"},git={class:"space-y-2"},vit={class:"flex items-center gap-3"},yit={class:"text-white/60 text-sm"},xit={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},_it={class:"space-y-2"},bit={class:"flex justify-between py-2 border-b border-white/10"},wit={class:"text-white"},kit={class:"flex justify-between py-2 border-b border-white/10"},Tit={class:"space-y-2"},Ait={class:"flex justify-between py-2 border-b border-white/10"},Mit={key:0,class:"flex justify-between py-2 border-b border-white/10"},Sit={class:"text-red-400 text-sm"},Eit={class:"mt-6 pt-4 border-t border-white/10 flex justify-end"},Cit=ah({name:"PacketDetailsModal",__name:"PacketDetailsModal",props:{packet:{},isOpen:{type:Boolean},localHash:{}},emits:["close"],setup(d,{emit:l}){const z=d,j=l,J=Ft=>new Date(Ft*1e3).toLocaleString(),mt=Ft=>Ft.transmitted?Ft.is_duplicate?"text-amber-400":Ft.drop_reason?"text-red-400":"text-green-400":"text-red-400",kt=Ft=>Ft.transmitted?Ft.is_duplicate?"Duplicate":Ft.drop_reason?"Dropped":"Forwarded":"Dropped",Dt=Ft=>({0:"Request",1:"Response",2:"Plain Text Message",3:"Acknowledgment",4:"Node Advertisement",5:"Group Text Message",6:"Group Datagram",7:"Anonymous Request",8:"Returned Path",9:"Trace",10:"Multi-part Packet",15:"Custom Packet"})[Ft]||`Unknown Type (${Ft})`,$t=Ft=>({0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"})[Ft]||`Unknown Route (${Ft})`,ee=Ft=>{if(!Ft)return"None";const ei=Ft.replace(/\s+/g,"").toUpperCase().match(/.{2}/g)||[],jn=[];for(let ai=0;ai{try{let jn=0;const ai=wn.length/2;if(ai>=100){if(wn.length>=jn+64){const Qi=wn.slice(jn,jn+64);Ft.push({name:"Public Key",byteRange:`${(ei+jn)/2}-${(ei+jn+63)/2}`,hexData:Qi.match(/.{8}/g)?.join(" ")||Qi,description:"Ed25519 public key of the node (32 bytes)",fields:[{bits:"0-255",name:"Ed25519 Public Key",value:`${Qi.slice(0,16)}...${Qi.slice(-16)}`,binary:"32 bytes (256 bits)"}]}),jn+=64}if(wn.length>=jn+8){const Qi=wn.slice(jn,jn+8),Gi=parseInt(Qi,16),En=new Date(Gi*1e3);Ft.push({name:"Timestamp",byteRange:`${(ei+jn)/2}-${(ei+jn+7)/2}`,hexData:Qi.match(/.{2}/g)?.join(" ")||Qi,description:"Unix timestamp of advertisement",fields:[{bits:"0-31",name:"Unix Timestamp",value:`${Gi} (${En.toLocaleString()})`,binary:Gi.toString(2).padStart(32,"0")}]}),jn+=8}if(wn.length>=jn+128){const Qi=wn.slice(jn,jn+128);Ft.push({name:"Signature",byteRange:`${(ei+jn)/2}-${(ei+jn+127)/2}`,hexData:Qi.match(/.{8}/g)?.join(" ")||Qi,description:"Ed25519 signature of public key, timestamp, and appdata",fields:[{bits:"0-511",name:"Ed25519 Signature",value:`${Qi.slice(0,16)}...${Qi.slice(-16)}`,binary:"64 bytes (512 bits)"}]}),jn+=128}if(wn.length>jn){const Qi=wn.slice(jn);Be(Ft,Qi,ei+jn)}}else Ft.push({name:"ADVERT AppData (Partial)",byteRange:`${ei/2}-${ei/2+ai-1}`,hexData:wn.match(/.{2}/g)?.join(" ")||wn,description:`Partial ADVERT data - appears to be just AppData portion (${ai} bytes)`,fields:[{bits:`0-${ai*8-1}`,name:"Partial Data",value:`${ai} bytes - attempting to decode as AppData`,binary:`${ai} bytes (${ai*8} bits)`}]}),Be(Ft,wn,ei)}catch(jn){Ft.push({name:"ADVERT Parse Error",byteRange:"N/A",hexData:wn.slice(0,32)+"...",description:"Failed to parse ADVERT payload structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${jn instanceof Error?jn.message:"Unknown error"}`,binary:"Invalid"}]})}},Be=(Ft,wn,ei)=>{try{const jn=wn.length/2;Ft.push({name:"AppData",byteRange:`${ei/2}-${ei/2+jn-1}`,hexData:wn.match(/.{2}/g)?.join(" ")||wn,description:`Node advertisement application data (${jn} bytes)`,fields:[{bits:`0-${jn*8-1}`,name:"Application Data",value:`${jn} bytes (contains flags, location, name, etc.)`,binary:`${jn} bytes (${jn*8} bits)`}]});let ai=0;if(wn.length>=2){const Qi=parseInt(wn.slice(ai,ai+2),16),Gi=[],En=!!(Qi&16),Fa=!!(Qi&32),Sa=!!(Qi&64),Ni=!!(Qi&128);if(Qi&1&&Gi.push("is chat node"),Qi&2&&Gi.push("is repeater"),Qi&4&&Gi.push("is room server"),Qi&8&&Gi.push("is sensor"),En&&Gi.push("has location"),Fa&&Gi.push("has feature 1"),Sa&&Gi.push("has feature 2"),Ni&&Gi.push("has name"),Ft.push({name:"AppData Flags",byteRange:`${(ei+ai)/2}`,hexData:`0x${wn.slice(ai,ai+2)}`,description:"Flags indicating which optional fields are present",fields:[{bits:"0-7",name:"Flags",value:Gi.join(", ")||"none",binary:Qi.toString(2).padStart(8,"0")}]}),ai+=2,En&&wn.length>=ai+16){const zi=wn.slice(ai,ai+8),ia=[];for(let Go=6;Go>=0;Go-=2)ia.push(zi.slice(Go,Go+2));const Ua=parseInt(ia.join(""),16),qi=Ua>2147483647?Ua-4294967296:Ua,Ei=qi/1e6,Va=wn.slice(ai+8,ai+16),us=[];for(let Go=6;Go>=0;Go-=2)us.push(Va.slice(Go,Go+2));const xo=parseInt(us.join(""),16),Mo=xo>2147483647?xo-4294967296:xo,co=Mo/1e6;Ft.push({name:"Location Data",byteRange:`${(ei+ai)/2}-${(ei+ai+15)/2}`,hexData:`${zi.match(/.{2}/g)?.join(" ")||zi} ${Va.match(/.{2}/g)?.join(" ")||Va}`,description:"GPS coordinates (latitude and longitude)",fields:[{bits:"0-31",name:"Latitude",value:`${Ei.toFixed(6)}° (raw: ${qi})`,binary:qi.toString(2).padStart(32,"0")},{bits:"32-63",name:"Longitude",value:`${co.toFixed(6)}° (raw: ${Mo})`,binary:Mo.toString(2).padStart(32,"0")}]}),ai+=16}if(Fa&&wn.length>=ai+4){const zi=wn.slice(ai,ai+4),ia=parseInt(zi,16);Ft.push({name:"Feature 1",byteRange:`${(ei+ai)/2}-${(ei+ai+3)/2}`,hexData:zi.match(/.{2}/g)?.join(" ")||zi,description:"Reserved feature 1 (2 bytes)",fields:[{bits:"0-15",name:"Feature 1 Value",value:`${ia}`,binary:ia.toString(2).padStart(16,"0")}]}),ai+=4}if(Sa&&wn.length>=ai+4){const zi=wn.slice(ai,ai+4),ia=parseInt(zi,16);Ft.push({name:"Feature 2",byteRange:`${(ei+ai)/2}-${(ei+ai+3)/2}`,hexData:zi.match(/.{2}/g)?.join(" ")||zi,description:"Reserved feature 2 (2 bytes)",fields:[{bits:"0-15",name:"Feature 2 Value",value:`${ia}`,binary:ia.toString(2).padStart(16,"0")}]}),ai+=4}if(Ni&&wn.length>ai){const zi=wn.slice(ai),ia=zi.match(/.{2}/g)||[],Ua=ia.map(qi=>{const Ei=parseInt(qi,16);return Ei>=32&&Ei<=126?String.fromCharCode(Ei):"."}).join("").replace(/\.+$/,"");Ft.push({name:"Node Name",byteRange:`${(ei+ai)/2}-${(ei+wn.length-1)/2}`,hexData:zi.match(/.{2}/g)?.join(" ")||zi,description:`Node name string (${ia.length} bytes)`,fields:[{bits:`0-${ia.length*8-1}`,name:"Node Name",value:`"${Ua}"`,binary:`ASCII text (${ia.length} bytes)`}]})}}}catch(jn){Ft.push({name:"AppData Parse Error",byteRange:"N/A",hexData:wn.slice(0,Math.min(32,wn.length)),description:"Failed to parse AppData structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${jn instanceof Error?jn.message:"Unknown error"}`,binary:"Invalid"}]})}},ir=Ft=>{if(!Ft)return[];if(Array.isArray(Ft))return Ft;if(typeof Ft=="string")try{return JSON.parse(Ft)}catch{return[]}return[]},vr=Ft=>{const wn=[];if(!Ft)return wn;try{const ei=Ft.raw_packet;if(ei){const jn=ei.replace(/\s+/g,"").toUpperCase();let ai=0;if(jn.length>=2){const Qi=jn.slice(ai,ai+2),Gi=parseInt(Qi,16),En=Gi&3,Fa=(Gi&60)>>2,Sa=(Gi&192)>>6,Ni={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},zi={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};if(wn.push({name:"Header",byteRange:"0",hexData:`0x${Qi}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:Ni[En]||"Unknown",binary:En.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:zi[Fa]||"Unknown",binary:Fa.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:Sa.toString(),binary:Sa.toString(2).padStart(2,"0")}]}),ai+=2,(En===0||En===3)&&jn.length>=ai+8){const Ua=jn.slice(ai,ai+8),qi=parseInt(Ua.slice(0,4),16),Ei=parseInt(Ua.slice(4,8),16);wn.push({name:"Transport Codes",byteRange:"1-4",hexData:`${Ua.slice(0,4)} ${Ua.slice(4,8)}`,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-15",name:"Code 1",value:qi.toString(),binary:qi.toString(2).padStart(16,"0")},{bits:"16-31",name:"Code 2",value:Ei.toString(),binary:Ei.toString(2).padStart(16,"0")}]}),ai+=8}if(jn.length>=ai+2){const Ua=jn.slice(ai,ai+2),qi=parseInt(Ua,16);if(wn.push({name:"Path Length",byteRange:`${ai/2}`,hexData:`0x${Ua}`,description:`${qi} bytes of path data`,fields:[{bits:"0-7",name:"Path Length",value:`${qi} bytes`,binary:qi.toString(2).padStart(8,"0")}]}),ai+=2,qi>0&&jn.length>=ai+qi*2){const Ei=jn.slice(ai,ai+qi*2);wn.push({name:"Path Data",byteRange:`${ai/2}-${(ai+qi*2-2)/2}`,hexData:Ei.match(/.{2}/g)?.join(" ")||Ei,description:"Routing path information",fields:[{bits:`0-${qi*8-1}`,name:"Route Path",value:`${qi} bytes of routing data`,binary:`${qi} bytes (${qi*8} bits)`}]}),ai+=qi*2}}if(jn.length>ai){const Ua=jn.slice(ai),qi=Ua.length/2;Fa===4?pe(wn,Ua,ai):wn.push({name:"Payload Data",byteRange:`${ai/2}-${ai/2+qi-1}`,hexData:Ua.match(/.{2}/g)?.join(" ")||Ua,description:"Application data content",fields:[{bits:`0-${qi*8-1}`,name:"Application Data",value:`${qi} bytes`,binary:`${qi} bytes (${qi*8} bits)`}]})}}}else{if(Ft.header){const jn=Ft.header.replace(/0x/gi,"").replace(/\s+/g,"").toUpperCase(),ai=parseInt(jn,16),Qi=ai&3,Gi=(ai&60)>>2,En=(ai&192)>>6,Fa={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},Sa={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};wn.push({name:"Header",byteRange:"0",hexData:`0x${jn}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:Fa[Qi]||"Unknown",binary:Qi.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:Sa[Gi]||"Unknown",binary:Gi.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:En.toString(),binary:En.toString(2).padStart(2,"0")}]}),Ft.transport_codes&&wn.push({name:"Transport Codes",byteRange:"1-4",hexData:Ft.transport_codes,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-31",name:"Transport Codes",value:Ft.transport_codes,binary:"Available in separate field"}]}),Ft.original_path&&Ft.original_path.length>0&&wn.push({name:"Original Path",byteRange:"?",hexData:Ft.original_path.join(" "),description:`Original routing path (${Ft.original_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Ft.original_path.length} nodes`,binary:"Available as node list"}]}),Ft.forwarded_path&&Ft.forwarded_path.length>0&&wn.push({name:"Forwarded Path",byteRange:"?",hexData:Ft.forwarded_path.join(" "),description:`Forwarded routing path (${Ft.forwarded_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Ft.forwarded_path.length} nodes`,binary:"Available as node list"}]})}if(Ft.payload){const jn=Ft.payload.replace(/\s+/g,"").toUpperCase(),ai=jn.length/2;Ft.type===4?pe(wn,jn,0):wn.push({name:"Payload Data",byteRange:`0-${ai-1}`,hexData:jn.match(/.{2}/g)?.join(" ")||jn,description:`Application data content (${ai} bytes)`,fields:[{bits:`0-${ai*8-1}`,name:"Application Data",value:`${ai} bytes`,binary:`${ai} bytes (${ai*8} bits)`}]})}}}catch{wn.push({name:"Parse Error",byteRange:"N/A",hexData:"Error",description:"Unable to parse packet structure",fields:[{bits:"N/A",name:"Error",value:"Parse failed",binary:"Invalid"}]})}return wn},Ir=Ft=>Ft>=10?"text-green-400":Ft>=5?"text-cyan-400":Ft>=0?"text-yellow-400":"text-red-400",Pr=(Ft,wn=8)=>{const jn={7:-7.5,8:-10,9:-12.5,10:-15,11:-17.5,12:-20}[wn]||-10;let ai,Qi;return Ft>=jn+10?(ai=4,Qi="signal-excellent"):Ft>=jn+5?(ai=3,Qi="signal-good"):Ft>=jn?(ai=2,Qi="signal-fair"):(ai=1,Qi="signal-poor"),{level:ai,className:Qi}},Wr=Ft=>{Ft.key==="Escape"&&j("close")},Tn=Ft=>{Ft.target===Ft.currentTarget&&j("close")};return(Ft,wn)=>(Si(),K0(jA,{to:"body"},[uu(LI,{name:"modal",appear:""},{default:ew(()=>[Ft.isOpen&&Ft.packet?(Si(),Fi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:Tn,onKeydown:Wr,tabindex:"0"},[wn[36]||(wn[36]=Oe("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-md"},null,-1)),Oe("div",Wrt,[Oe("div",qrt,[Oe("div",Zrt,[Oe("div",null,[wn[2]||(wn[2]=Oe("h2",{class:"text-2xl font-bold text-white mb-1"},"Packet Details",-1)),Oe("p",$rt,na(Dt(Ft.packet.type))+" - "+na($t(Ft.packet.route)),1)]),Oe("button",{onClick:wn[0]||(wn[0]=ei=>j("close")),class:"w-8 h-8 flex items-center justify-center rounded-full bg-white/10 hover:bg-white/20 transition-colors duration-200 text-white/70 hover:text-white"},wn[3]||(wn[3]=[Oe("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Oe("div",Grt,[Oe("div",Yrt,[wn[10]||(wn[10]=Oe("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Oe("div",{class:"w-2 h-2 rounded-full bg-cyan-400 mr-3"}),nc(" Basic Information ")],-1)),Oe("div",Krt,[Oe("div",Xrt,[Oe("div",Jrt,[Oe("div",Qrt,[wn[4]||(wn[4]=Oe("span",{class:"text-white/70 text-sm"},"Timestamp",-1)),Oe("span",tnt,na(J(Ft.packet.timestamp)),1)]),Oe("div",ent,[wn[5]||(wn[5]=Oe("span",{class:"text-white/70 text-sm"},"Packet Hash",-1)),Oe("span",rnt,na(Ft.packet.packet_hash),1)]),Ft.packet.header?(Si(),Fi("div",nnt,[wn[6]||(wn[6]=Oe("span",{class:"text-white/70 text-sm"},"Header",-1)),Oe("span",int,na(Ft.packet.header),1)])):ps("",!0)]),Oe("div",ant,[Oe("div",ont,[wn[7]||(wn[7]=Oe("span",{class:"text-white/70 text-sm"},"Type",-1)),Oe("span",snt,na(Ft.packet.type)+" ("+na(Dt(Ft.packet.type))+")",1)]),Oe("div",lnt,[wn[8]||(wn[8]=Oe("span",{class:"text-white/70 text-sm"},"Route",-1)),Oe("span",unt,na(Ft.packet.route)+" ("+na($t(Ft.packet.route))+")",1)]),Oe("div",cnt,[wn[9]||(wn[9]=Oe("span",{class:"text-white/70 text-sm"},"Status",-1)),Oe("span",{class:Xs(["font-semibold",mt(Ft.packet)])},na(kt(Ft.packet)),3)])])])])]),Oe("div",hnt,[wn[16]||(wn[16]=Oe("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Oe("div",{class:"w-2 h-2 rounded-full bg-orange-400 mr-3"}),nc(" Payload Data ")],-1)),Oe("div",fnt,[Oe("div",dnt,[Oe("div",pnt,[wn[11]||(wn[11]=Oe("span",{class:"text-white/70 text-sm"},"Payload Length",-1)),Oe("span",mnt,na(Ft.packet.payload_length||Ft.packet.length)+" bytes",1)]),Ft.packet.payload?(Si(),Fi("div",gnt,[wn[14]||(wn[14]=Oe("div",{class:"text-white/70 text-sm mb-3"},"Payload Analysis",-1)),Oe("div",vnt,[wn[12]||(wn[12]=Oe("div",{class:"text-white/70 text-xs mb-2 font-semibold"},"Raw Hex Data",-1)),Oe("div",ynt,[Oe("pre",xnt,na(ee(Ft.packet.payload)),1)])]),(Si(!0),Fi(Ou,null,sf(vr(Ft.packet).filter(ei=>!ei.name.includes("Parse Error")),(ei,jn)=>(Si(),Fi("div",{key:jn,class:"mb-4"},[Oe("div",_nt,[Oe("h4",bnt,na(ei.name),1),Oe("span",wnt,"Bytes "+na(ei.byteRange),1)]),Oe("div",knt,[Oe("div",Tnt,na(ei.hexData),1)]),Oe("div",Ant,[wn[13]||(wn[13]=Oe("div",{class:"grid grid-cols-4 gap-4 p-3 bg-white/10 text-white/70 text-xs font-semibold uppercase tracking-wide"},[Oe("div",null,"Bits"),Oe("div",null,"Field"),Oe("div",null,"Value"),Oe("div",null,"Binary")],-1)),(Si(!0),Fi(Ou,null,sf(ei.fields,(ai,Qi)=>(Si(),Fi("div",{key:Qi,class:"grid grid-cols-4 gap-4 p-3 border-b border-white/5 last:border-b-0 hover:bg-white/5 transition-colors"},[Oe("div",Mnt,na(ai.bits),1),Oe("div",Snt,na(ai.name),1),Oe("div",Ent,na(ai.value),1),Oe("div",Cnt,na(ai.binary),1)]))),128))]),ei.description?(Si(),Fi("div",Lnt,na(ei.description),1)):ps("",!0)]))),128))])):(Si(),Fi("div",Pnt,wn[15]||(wn[15]=[Oe("span",{class:"text-white/70 text-sm"},"Payload:",-1),Oe("span",{class:"text-white/50 ml-2"},"None",-1)])))])])]),Oe("div",znt,[wn[24]||(wn[24]=Oe("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Oe("div",{class:"w-2 h-2 rounded-full bg-purple-400 mr-3"}),nc(" Path Information ")],-1)),Oe("div",Int,[Oe("div",Ont,[Oe("div",Dnt,[Oe("div",Fnt,[wn[17]||(wn[17]=Oe("span",{class:"text-white/70 text-sm"},"Source Hash",-1)),Oe("span",{class:Xs(["text-white font-mono text-xs",z.localHash&&Ft.packet.src_hash===z.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},na(Ft.packet.src_hash||"Unknown"),3)]),Oe("div",Rnt,[wn[18]||(wn[18]=Oe("span",{class:"text-white/70 text-sm"},"Destination Hash",-1)),Oe("span",{class:Xs(["text-white font-mono text-xs",z.localHash&&Ft.packet.dst_hash===z.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},na(Ft.packet.dst_hash||"Broadcast"),3)])]),ir(Ft.packet.original_path).length>0?(Si(),Fi("div",Bnt,[wn[20]||(wn[20]=Oe("div",{class:"text-white/70 text-sm mb-2"},"Original Path",-1)),Oe("div",Nnt,[Oe("div",jnt,[(Si(!0),Fi(Ou,null,sf(ir(Ft.packet.original_path),(ei,jn)=>(Si(),Fi("div",{key:jn,class:"flex items-center"},[Oe("div",Unt,[Oe("div",Vnt,[Oe("div",Hnt,na(ei.length<=2?ei.toUpperCase():ei.slice(0,2).toUpperCase()),1)]),Oe("div",Wnt," Node: "+na(ei),1)]),jn0?(Si(),Fi("div",Znt,[Oe("div",$nt,[wn[22]||(wn[22]=nc(" Forwarded Path ",-1)),JSON.stringify(ir(Ft.packet.original_path))!==JSON.stringify(ir(Ft.packet.forwarded_path))?(Si(),Fi("svg",Gnt,wn[21]||(wn[21]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):ps("",!0),JSON.stringify(ir(Ft.packet.original_path))!==JSON.stringify(ir(Ft.packet.forwarded_path))?(Si(),Fi("span",Ynt,"(Modified)")):ps("",!0)]),Oe("div",Knt,[Oe("div",Xnt,[(Si(!0),Fi(Ou,null,sf(ir(Ft.packet.forwarded_path),(ei,jn)=>(Si(),Fi("div",{key:jn,class:"flex items-center"},[Oe("div",Jnt,[Oe("div",{class:Xs(["relative px-3 py-2 bg-gradient-to-br from-orange-500/20 to-yellow-500/20 border border-orange-400/40 rounded-lg transform transition-all hover:scale-105",z.localHash&&ei===z.localHash?"bg-gradient-to-br from-yellow-400/30 to-orange-400/30 border-yellow-300 shadow-yellow-400/20 shadow-lg":"hover:border-orange-400/60"])},[Oe("div",{class:Xs(["font-mono text-xs font-semibold",z.localHash&&ei===z.localHash?"text-yellow-200":"text-white/90"])},na(ei.slice(0,2).toUpperCase()),3),z.localHash&&ei===z.localHash?(Si(),Fi("div",Qnt)):ps("",!0)],2),Oe("div",tit,na(ei),1)]),jnOe("div",{key:ei,class:Xs(["w-2 h-6 rounded-sm transition-all duration-300",ei<=Pr(Ft.packet.snr).level?{"signal-excellent":"bg-green-400","signal-good":"bg-cyan-400","signal-fair":"bg-yellow-400","signal-poor":"bg-red-400"}[Pr(Ft.packet.snr).className]:"bg-white/10"])},null,2)),64))]),Oe("span",dit,na(Pr(Ft.packet.snr).className.replace("signal-","")),1)])]),Ft.packet.is_trace&&Ft.packet.path_snr_details&&Ft.packet.path_snr_details.length>0?(Si(),Fi("div",pit,[Oe("div",mit,"Path SNR Details ("+na(Ft.packet.path_snr_details.length)+" hops)",1),Oe("div",git,[(Si(!0),Fi(Ou,null,sf(Ft.packet.path_snr_details,(ei,jn)=>(Si(),Fi("div",{key:jn,class:"flex items-center justify-between p-2 glass-card bg-black/20 rounded-[8px]"},[Oe("div",vit,[Oe("span",yit,na(jn+1)+".",1),Oe("span",{class:Xs(["font-mono text-xs text-white",z.localHash&&ei.hash===z.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},na(ei.hash),3)]),Oe("span",{class:Xs(["text-sm font-bold",Ir(ei.snr_db)])},na(ei.snr_db.toFixed(1))+"dB ",3)]))),128))])])):ps("",!0),Oe("div",xit,[Oe("div",_it,[Oe("div",bit,[wn[31]||(wn[31]=Oe("span",{class:"text-white/70 text-sm"},"TX Delay",-1)),Oe("span",wit,na(Number(Ft.packet.tx_delay_ms)>0?Number(Ft.packet.tx_delay_ms).toFixed(1)+"ms":"-"),1)]),Oe("div",kit,[wn[32]||(wn[32]=Oe("span",{class:"text-white/70 text-sm"},"Transmitted",-1)),Oe("span",{class:Xs(Ft.packet.transmitted?"text-green-400":"text-red-400")},na(Ft.packet.transmitted?"Yes":"No"),3)])]),Oe("div",Tit,[Oe("div",Ait,[wn[33]||(wn[33]=Oe("span",{class:"text-white/70 text-sm"},"Is Duplicate",-1)),Oe("span",{class:Xs(Ft.packet.is_duplicate?"text-amber-400":"text-white/60")},na(Ft.packet.is_duplicate?"Yes":"No"),3)]),Ft.packet.drop_reason?(Si(),Fi("div",Mit,[wn[34]||(wn[34]=Oe("span",{class:"text-white/70 text-sm"},"Drop Reason",-1)),Oe("span",Sit,na(Ft.packet.drop_reason),1)])):ps("",!0)])])])])]),Oe("div",Eit,[Oe("button",{onClick:wn[1]||(wn[1]=ei=>j("close")),class:"px-6 py-2 bg-gradient-to-r from-cyan-500/20 to-cyan-400/20 hover:from-cyan-500/30 hover:to-cyan-400/30 border border-cyan-400/30 rounded-[10px] text-white transition-all duration-200 backdrop-blur-sm"}," Close ")])])])],32)):ps("",!0)]),_:1})]))}}),Lit=hd(Cit,[["__scopeId","data-v-3b73bfd6"]]),Pit={class:"glass-card rounded-[20px] p-6"},zit={class:"flex justify-between items-center mb-6"},Iit={class:"flex items-center gap-3"},Oit={class:"text-dark-text text-sm"},Dit=["title"],Fit={key:1,class:"text-primary text-sm"},Rit={key:2,class:"text-accent-red text-sm"},Bit={class:"flex items-center gap-3"},Nit={class:"flex flex-col"},jit=["value"],Uit={class:"flex flex-col"},Vit=["value"],Hit={class:"flex flex-col"},Wit={class:"flex flex-col"},qit=["disabled"],Zit={class:"space-y-4 overflow-hidden"},$it=["onClick"],Git={class:"grid grid-cols-12 gap-2 items-center"},Yit={class:"col-span-1 text-white text-sm"},Kit={class:"col-span-1 flex items-center gap-2"},Xit={class:"text-white text-xs"},Jit={class:"col-span-2"},Qit={class:"col-span-1 text-white text-xs"},tat={class:"col-span-2"},eat={class:"space-y-1"},rat={class:"inline-block px-2 py-0.5 rounded bg-[#588187] text-accent-cyan text-xs"},nat={class:"col-span-1 text-white text-xs"},iat={class:"col-span-1 text-white text-xs"},aat={class:"col-span-1 text-white text-xs"},oat={class:"col-span-1 text-white text-xs"},sat={class:"col-span-1"},lat={key:0,class:"text-accent-red text-[8px] italic truncate"},uat={key:0,class:"flex justify-between items-center mt-6 pt-4 border-t border-dark-border"},cat={class:"flex items-center gap-4"},hat={class:"text-dark-text text-sm"},fat={key:0,class:"flex items-center gap-2"},dat=["disabled"],pat={class:"text-dark-text text-xs"},mat={class:"flex items-center gap-2"},gat=["disabled"],vat={class:"flex items-center gap-1"},yat={key:1,class:"text-dark-text text-sm px-2"},xat=["onClick"],_at={key:2,class:"text-dark-text text-sm px-2"},bat=["disabled"],wat={key:1,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},kat={class:"flex items-center gap-4"},Tat={class:"text-dark-text text-sm"},Aat={class:"text-dark-text text-xs"},Mat={key:2,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},o2=10,ly=1e3,Sat=ah({name:"PacketTable",__name:"PacketTable",setup(d){const l=sw(),z=ro(1),j=ro(null),J=ro(100),mt=ro(!1),kt=ro(null),Dt=ro(!1),$t=us=>{kt.value=us,Dt.value=!0},ee=()=>{Dt.value=!1,kt.value=null},pe=ro("all"),Be=ro("all"),ir=ro(!1),vr=ro(null),Ir=["all","0","1","2","3","4","5","6","7","8","9"],Pr=["all","1","2"],Wr=Ko(()=>{let us=l.recentPackets;if(pe.value!=="all"){const xo=parseInt(pe.value);us=us.filter(Mo=>Mo.type===xo)}if(Be.value!=="all"){const xo=parseInt(Be.value);us=us.filter(Mo=>Mo.route===xo)}return ir.value&&vr.value!==null&&(us=us.filter(xo=>xo.timestamp>=vr.value)),us}),Tn=Ko(()=>{const us=(z.value-1)*o2,xo=us+o2;return Wr.value.slice(us,xo)}),Ft=Ko(()=>Math.ceil(Wr.value.length/o2)),wn=Ko(()=>z.value===Ft.value),ei=Ko(()=>l.recentPackets.length>=J.value&&J.valuewn.value&&ei.value&&!mt.value),ai=us=>new Date(us*1e3).toLocaleTimeString("en-US",{hour12:!1}),Qi=us=>({0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE"})[us]||`TYPE_${us}`,Gi=us=>({0:"T-Flood",1:"Flood",2:"Direct",3:"T-Direct"})[us]||`Route ${us}`,En=us=>us.transmitted?"text-accent-green":"text-primary",Fa=us=>us.drop_reason?"Dropped":us.transmitted?"Forward":"Received",Sa=us=>us===1?"bg-[#223231] text-accent-cyan":"bg-secondary/30 text-secondary",Ni=us=>({0:"bg-primary",1:"bg-accent-green",2:"bg-secondary",3:"bg-accent-purple",4:"bg-accent-red",5:"bg-accent-cyan",6:"bg-primary",7:"bg-accent-purple",8:"bg-accent-green",9:"bg-secondary"})[us]||"bg-gray-500",zi=us=>({0:"border-l-primary",1:"border-l-accent-green",2:"border-l-secondary",3:"border-l-accent-purple",4:"border-l-accent-red",5:"border-l-accent-cyan",6:"border-l-primary",7:"border-l-accent-purple",8:"border-l-accent-green",9:"border-l-secondary"})[us]||"border-l-gray-500",ia=()=>{pe.value="all",Be.value="all",ir.value=!1,vr.value=null,z.value=1},Ua=()=>{ir.value?(ir.value=!1,vr.value=null):(ir.value=!0,vr.value=Date.now()/1e3),z.value=1},qi=Ko(()=>vr.value?new Date(vr.value*1e3).toLocaleTimeString():""),Ei=async us=>{try{const xo=us||J.value;await l.fetchRecentPackets({limit:xo})}catch(xo){console.error("Error fetching packet data:",xo)}},Va=async()=>{if(!(mt.value||J.value>=ly)){mt.value=!0;try{const us=Math.min(J.value+200,ly);J.value=us,await Ei(us)}catch(us){console.error("Error loading more records:",us)}finally{mt.value=!1}}};return i0(async()=>{await Ei(),j.value=window.setInterval(Ei,5e3)}),mg(()=>{j.value&&clearInterval(j.value)}),(us,xo)=>(Si(),Fi(Ou,null,[Oe("div",Pit,[Oe("div",zit,[Oe("div",Iit,[xo[6]||(xo[6]=Oe("h3",{class:"text-white text-xl font-semibold"},"Recent Packets",-1)),Oe("span",Oit," ("+na(Wr.value.length)+" of "+na(Ju(l).recentPackets.length)+") ",1),ir.value?(Si(),Fi("span",{key:0,class:"text-primary text-sm bg-primary/10 px-2 py-1 rounded-md border border-primary/20",title:`Filter activated at ${qi.value}`}," Live Mode (since "+na(qi.value)+") ",9,Dit)):ps("",!0),Ju(l).isLoading?(Si(),Fi("span",Fit,"Loading...")):ps("",!0),Ju(l).error?(Si(),Fi("span",Rit,na(Ju(l).error),1)):ps("",!0)]),Oe("div",Bit,[Oe("div",Nit,[xo[7]||(xo[7]=Oe("label",{class:"text-dark-text text-xs mb-1"},"Type",-1)),Xp(Oe("select",{"onUpdate:modelValue":xo[0]||(xo[0]=Mo=>pe.value=Mo),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(Si(),Fi(Ou,null,sf(Ir,Mo=>Oe("option",{key:Mo,value:Mo,class:"bg-[#1A1E1F] text-white"},na(Mo==="all"?"All Types":`Type ${Mo} (${Qi(parseInt(Mo))})`),9,jit)),64))],512),[[iA,pe.value]])]),Oe("div",Uit,[xo[8]||(xo[8]=Oe("label",{class:"text-dark-text text-xs mb-1"},"Route",-1)),Xp(Oe("select",{"onUpdate:modelValue":xo[1]||(xo[1]=Mo=>Be.value=Mo),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(Si(),Fi(Ou,null,sf(Pr,Mo=>Oe("option",{key:Mo,value:Mo,class:"bg-[#1A1E1F] text-white"},na(Mo==="all"?"All Routes":`Route ${Mo} (${Gi(parseInt(Mo))})`),9,Vit)),64))],512),[[iA,Be.value]])]),Oe("div",Hit,[xo[9]||(xo[9]=Oe("label",{class:"text-dark-text text-xs mb-1"},"Filter",-1)),Oe("button",{onClick:Ua,class:Xs(["glass-card border rounded-[10px] px-4 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 min-w-[120px]",{"border-primary bg-primary/10 text-primary":ir.value,"border-dark-border text-dark-text hover:border-primary hover:text-white hover:bg-primary/5":!ir.value}])},na(ir.value?"New Only":"Show New"),3)]),Oe("div",Wit,[xo[10]||(xo[10]=Oe("label",{class:"text-transparent text-xs mb-1"},".",-1)),Oe("button",{onClick:ia,class:Xs(["glass-card border border-dark-border hover:border-primary rounded-[10px] px-4 py-2 text-dark-text hover:text-white text-sm transition-all duration-200 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20",{"opacity-50 cursor-not-allowed hover:border-dark-border hover:text-dark-text":pe.value==="all"&&Be.value==="all"&&!ir.value,"hover:bg-primary/10":pe.value!=="all"||Be.value!=="all"||ir.value}]),disabled:pe.value==="all"&&Be.value==="all"&&!ir.value}," Reset ",10,qit)])])]),xo[14]||(xo[14]=Af('
Time
Type
Route
LEN
Path/Hashes
RSSI
SNR
Score
TX Delay
Status
',1)),Oe("div",Zit,[uu(nK,{name:"packet-list",tag:"div",class:"space-y-4",appear:""},{default:ew(()=>[(Si(!0),Fi(Ou,null,sf(Tn.value,(Mo,co)=>(Si(),Fi("div",{key:`${Mo.packet_hash}_${Mo.timestamp}_${co}`,class:Xs(["packet-row border-b border-dark-border/50 pb-4 hover:bg-white/5 transition-colors duration-200 cursor-pointer rounded-[10px] p-2 border-l-4",zi(Mo.type)]),onClick:Go=>$t(Mo)},[Oe("div",Git,[Oe("div",Yit,na(ai(Mo.timestamp)),1),Oe("div",Kit,[Oe("div",{class:Xs(["w-2 h-2 rounded-full",Ni(Mo.type)])},null,2),Oe("span",Xit,na(Qi(Mo.type)),1)]),Oe("div",Jit,[Oe("span",{class:Xs(["inline-block px-2 py-1 rounded text-xs font-medium",Sa(Mo.route)])},na(Gi(Mo.route)),3)]),Oe("div",Qit,na(Mo.length)+"B",1),Oe("div",tat,[Oe("div",eat,[Oe("span",rat,na(Mo.src_hash?.slice(-4)||"????")+" → "+na(Mo.dst_hash?.slice(-4)||"????"),1)])]),Oe("div",nat,na(Mo.rssi.toFixed(0)),1),Oe("div",iat,na(Mo.snr.toFixed(1))+"dB",1),Oe("div",aat,na(Mo.score.toFixed(2)),1),Oe("div",oat,na(Number(Mo.tx_delay_ms)>0?Number(Mo.tx_delay_ms).toFixed(1)+"ms":""),1),Oe("div",sat,[Oe("div",null,[Oe("span",{class:Xs(["text-xs font-medium",En(Mo)])},na(Fa(Mo)),3),Mo.drop_reason?(Si(),Fi("p",lat,na(Mo.drop_reason),1)):ps("",!0)])])])],10,$it))),128))]),_:1})]),Ft.value>1?(Si(),Fi("div",uat,[Oe("div",cat,[Oe("span",hat," Showing "+na((z.value-1)*o2+1)+" - "+na(Math.min(z.value*o2,Wr.value.length))+" of "+na(Wr.value.length)+" packets ",1),jn.value?(Si(),Fi("div",fat,[xo[11]||(xo[11]=Oe("span",{class:"text-dark-text text-xs"},"•",-1)),Oe("button",{onClick:Va,disabled:mt.value,class:Xs(["glass-card border border-primary rounded-[8px] px-3 py-1.5 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 hover:bg-primary/5",{"text-primary border-primary cursor-pointer":!mt.value,"text-dark-text border-dark-border cursor-not-allowed opacity-50":mt.value}])},na(mt.value?"Loading...":`Load ${Math.min(200,ly-J.value)} more`),11,dat),Oe("span",pat,"("+na(J.value)+"/"+na(ly)+" max)",1)])):ps("",!0)]),Oe("div",mat,[Oe("button",{onClick:xo[2]||(xo[2]=Mo=>z.value=z.value-1),disabled:z.value<=1,class:Xs(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":z.value<=1,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":z.value>1}])}," Previous ",10,gat),Oe("div",vat,[z.value>3?(Si(),Fi("button",{key:0,onClick:xo[3]||(xo[3]=Mo=>z.value=1),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"}," 1 ")):ps("",!0),z.value>4?(Si(),Fi("span",yat,"...")):ps("",!0),(Si(!0),Fi(Ou,null,sf(Array.from({length:Math.min(5,Ft.value)},(Mo,co)=>Math.max(1,Math.min(z.value-2,Ft.value-4))+co).filter(Mo=>Mo<=Ft.value),Mo=>(Si(),Fi("button",{key:Mo,onClick:co=>z.value=Mo,class:Xs(["glass-card border rounded-[8px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-primary bg-primary/10 text-primary":z.value===Mo,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":z.value!==Mo}])},na(Mo),11,xat))),128)),z.valuez.value=Ft.value),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"},na(Ft.value),1)):ps("",!0)]),Oe("button",{onClick:xo[5]||(xo[5]=Mo=>z.value=z.value+1),disabled:z.value>=Ft.value,class:Xs(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":z.value>=Ft.value,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":z.value(Si(),Fi("div",null,[uu(grt),Oe("div",Cat,[uu(Hrt),uu(Lrt)]),uu(Eat)]))}}),Pat={class:"relative","data-menu-container":""},zat=ah({__name:"NeighborMenu",props:{neighbor:{},canPing:{type:Boolean}},emits:["ping","delete"],setup(d,{emit:l}){const z=window.__neighborMenuManager||{activeMenu:null,setActiveMenu:Ir=>{if(z.activeMenu&&z.activeMenu!==Ir)try{z.activeMenu.closeMenu()}catch(Pr){console.warn("Error closing previous menu:",Pr)}z.activeMenu=Ir}};window.__neighborMenuManager=z;const j=d,J=l,mt=ro(!1),kt=ro(),Dt=ro({top:0,left:0}),$t=()=>{mt.value=!1,document.removeEventListener("click",Be,!0),document.removeEventListener("keydown",ir),z.activeMenu===ee&&(z.activeMenu=null)},ee={closeMenu:$t},pe=()=>{$t(),J("delete",j.neighbor)},Be=Ir=>{Ir.target.closest("[data-menu-container]")||$t()},ir=Ir=>{Ir.key==="Escape"&&$t()},vr=async()=>{if(!mt.value&&kt.value){z.setActiveMenu(ee);const Ir=kt.value.getBoundingClientRect();Dt.value={top:Ir.bottom+4,left:Ir.left},mt.value=!0,await C0(),document.addEventListener("click",Be,!0),document.addEventListener("keydown",ir)}else $t()};return b_(()=>{$t()}),(Ir,Pr)=>(Si(),Fi("div",Pat,[Oe("button",{ref_key:"buttonRef",ref:kt,onClick:vr,class:Xs(["p-1 rounded hover:bg-white/10 transition-colors text-white/60 hover:text-white/80",{"bg-white/10 text-white/80":mt.value}]),"data-menu-container":""},Pr[0]||(Pr[0]=[Oe("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})],-1)]),2),(Si(),K0(jA,{to:"body"},[mt.value?(Si(),Fi("div",{key:0,class:"fixed w-36 bg-dark-card/90 backdrop-blur-lg border border-white/20 rounded-[15px] shadow-2xl z-[999999]",style:pg({top:Dt.value.top+"px",left:Dt.value.left+"px"}),"data-menu-container":""},[Oe("div",{class:"py-2"},[Oe("button",{onClick:pe,class:"flex items-center gap-3 w-full px-4 py-3 text-sm text-accent-red hover:bg-accent-red/10 transition-colors"},Pr[1]||(Pr[1]=[Oe("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1),Oe("span",{class:"font-medium"},"Delete",-1)]))])],4)):ps("",!0)]))]))}}),Iat={class:"bg-white/5 border border-white/10 rounded-lg p-4 mb-6"},Oat={class:"flex items-center gap-3"},Dat={class:"flex-1 min-w-0"},Fat={class:"text-white font-medium truncate"},Rat={class:"text-white/60 text-sm font-mono"},Bat={key:0,class:"text-white/50 text-xs"},Nat={key:1,class:"text-white/50 text-xs"},jat=ah({__name:"DeleteNeighborModal",props:{show:{type:Boolean},neighbor:{}},emits:["close","delete"],setup(d,{emit:l}){const z=d,j=l,J=()=>{z.neighbor&&(j("delete",z.neighbor.id),mt())},mt=()=>{j("close")},kt=Dt=>{Dt.target===Dt.currentTarget&&mt()};return(Dt,$t)=>Dt.show&&Dt.neighbor?(Si(),Fi("div",{key:0,onClick:kt,class:"fixed inset-0 bg-black/80 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Oe("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:$t[0]||($t[0]=zm(()=>{},["stop"]))},[Oe("div",{class:"flex items-center gap-3 mb-6"},[$t[2]||($t[2]=Oe("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),$t[3]||($t[3]=Oe("div",null,[Oe("h3",{class:"text-xl font-semibold text-white"},"Delete Neighbor"),Oe("p",{class:"text-white/60 text-sm mt-1"}," Are you sure you want to delete this neighbor? ")],-1)),Oe("button",{onClick:mt,class:"ml-auto text-white/60 hover:text-white transition-colors"},$t[1]||($t[1]=[Oe("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Oe("div",Iat,[Oe("div",Oat,[Oe("div",Dat,[Oe("div",Fat,na(Dt.neighbor?.node_name||Dt.neighbor?.long_name||Dt.neighbor?.short_name||"Unknown"),1),Oe("div",Rat," ID: "+na(Dt.neighbor?.node_num_hex||Dt.neighbor?.node_num||Dt.neighbor?.id||"N/A"),1),Dt.neighbor?.contact_type?(Si(),Fi("div",Bat,na(Dt.neighbor.contact_type),1)):ps("",!0),Dt.neighbor?.hw_model?(Si(),Fi("div",Nat,na(Dt.neighbor.hw_model),1)):ps("",!0)])])]),$t[4]||($t[4]=Oe("div",{class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},[Oe("div",{class:"flex items-center gap-2 text-accent-red text-sm"},[Oe("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),Oe("span",null,"This action cannot be undone")])],-1)),Oe("div",{class:"flex gap-3"},[Oe("button",{onClick:mt,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Oe("button",{onClick:J,class:"flex-1 px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors font-medium"}," Delete ")])])])):ps("",!0)}});function LO(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var g2={exports:{}};/* @preserve + `})},[Ee("span",lnt,Qi(he.count),1)],4)]),Ee("div",unt,[Ee("div",cnt,Qi(he.name.replace(/\([^)]*\)/g,"").trim()),1)])]))),128))]))]),s.value.length>0?(_i(),zi("div",hnt," Total packet types: "+Qi(s.value.length)+" | Total packets: "+Qi(s.value.reduce((he,De)=>he+De.count,0)),1)):is("",!0)]))}}),dnt=ld(fnt,[["__scopeId","data-v-dc58fd68"]]),pnt={class:"glass-card rounded-[10px] p-6"},mnt={class:"relative h-48"},gnt={class:"mt-4 grid grid-cols-2 gap-4"},vnt={class:"text-center"},ynt={class:"text-2xl font-bold text-white"},xnt={class:"text-center"},_nt={class:"text-2xl font-bold text-white"},bnt={class:"mt-3 grid grid-cols-3 gap-3 text-center"},wnt={class:"text-sm font-semibold text-accent-purple"},knt={class:"text-sm font-semibold text-accent-red"},Tnt={class:"text-sm font-semibold text-white"},Ant=Dc({name:"PerformanceChart",__name:"PerformanceChart",setup(d){const s=sw(),E=Ga(null),B=Ga([]),K=Ga(null),pt=Ga(!0),_t=async()=>{try{pt.value=!0;const jt=await Ah.get("/recent_packets",{limit:50});if(!jt.success){B.value=[],pt.value=!1,om(()=>{Ot()});return}const te=jt.data||[],he=Date.now(),De=24,er=12,pr=De*60*60*1e3/er,Mr=[];for(let Tr=0;Tr{const ni=Bn.timestamp*1e3;return ni>=Vr&&ni!Bn.transmitted).length,Jn=Dt.filter(Bn=>Bn.transmitted).length;Mr.push({time:new Date(Vr+pr/2).toISOString(),rxPackets:cn,txPackets:Jn})}B.value=Mr,pt.value=!1,om(()=>{Ot()})}catch{B.value=[],pt.value=!1,om(()=>{Ot()})}},Ot=()=>{if(!E.value)return;const jt=E.value,te=jt.getContext("2d");if(!te)return;const he=jt.parentElement;if(!he)return;const De=he.getBoundingClientRect(),er=De.width,pr=De.height;jt.width=er*window.devicePixelRatio,jt.height=pr*window.devicePixelRatio,jt.style.width=er+"px",jt.style.height=pr+"px",te.scale(window.devicePixelRatio,window.devicePixelRatio);const Mr=20;if(te.clearRect(0,0,er,pr),pt.value){te.fillStyle="#666",te.font="16px sans-serif",te.textAlign="center",te.fillText("Loading chart data...",er/2,pr/2);return}if(B.value.length===0){te.fillStyle="#666",te.font="16px sans-serif",te.textAlign="center",te.fillText("No data available",er/2,pr/2);return}const Tr=B.value.every(Un=>Un.rxPackets===0&&Un.txPackets===0),Vr=er-Mr*2,mn=pr-Mr*2,Dt=B.value.flatMap(Un=>[Un.rxPackets,Un.txPackets]),cn=Math.min(...Dt),Jn=Math.max(...Dt),Bn=cn,ni=Jn,Wi=Math.max(ni-Bn,1);if(te.strokeStyle="rgba(255, 255, 255, 0.1)",te.lineWidth=1,Bn<=0&&ni>=0){te.strokeStyle="rgba(255, 255, 255, 0.3)",te.lineWidth=2;const Un=pr-Mr-(0-Bn)/Wi*mn;te.beginPath(),te.moveTo(Mr,Un),te.lineTo(er-Mr,Un),te.stroke(),Un>20&&Un1&&(te.strokeStyle="#EBA0FC",te.lineWidth=2,te.beginPath(),B.value.forEach((Un,qr)=>{const Di=Mr+Vr*qr/(B.value.length-1),Fi=pr-Mr-(Un.rxPackets-Bn)/Wi*mn;qr===0?te.moveTo(Di,Fi):te.lineTo(Di,Fi)}),te.stroke(),te.fillStyle="#EBA0FC",B.value.forEach((Un,qr)=>{const Di=Mr+Vr*qr/(B.value.length-1),Fi=pr-Mr-(Un.rxPackets-Bn)/Wi*mn;te.beginPath(),te.arc(Di,Fi,2,0,2*Math.PI),te.fill()})),B.value.length>1&&(te.strokeStyle="#FB787B",te.lineWidth=2,te.beginPath(),B.value.forEach((Un,qr)=>{const Di=Mr+Vr*qr/(B.value.length-1),Fi=pr-Mr-(Un.txPackets-Bn)/Wi*mn;qr===0?te.moveTo(Di,Fi):te.lineTo(Di,Fi)}),te.stroke(),te.fillStyle="#FB787B",B.value.forEach((Un,qr)=>{const Di=Mr+Vr*qr/(B.value.length-1),Fi=pr-Mr-(Un.txPackets-Bn)/Wi*mn;te.beginPath(),te.arc(Di,Fi,2,0,2*Math.PI),te.fill()})),te.fillStyle="rgba(255, 255, 255, 0.6)",te.font="12px system-ui",te.textAlign="center",Tr&&(te.fillStyle="rgba(255, 255, 255, 0.6)",te.font="14px system-ui",te.textAlign="center",te.fillText("No packet activity in last 24 hours",er/2,pr-15))};return bp(()=>{_t(),K.value=window.setInterval(_t,3e4),om(()=>{Ot(),setTimeout(()=>{Ot()},100)}),window.addEventListener("resize",Ot)}),gg(()=>{K.value&&clearInterval(K.value),window.removeEventListener("resize",Ot)}),(jt,te)=>(_i(),zi("div",pnt,[te[5]||(te[5]=$f('

Performance Metrics

Packet Activity (Last 24 Hours)

Received
Transmitted
',3)),Ee("div",mnt,[Ee("canvas",{ref_key:"chartRef",ref:E,class:"absolute inset-0 w-full h-full"},null,512)]),Ee("div",gnt,[Ee("div",vnt,[Ee("div",ynt,Qi(zl(s).packetStats?.total_packets||0),1),te[0]||(te[0]=Ee("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Received",-1))]),Ee("div",xnt,[Ee("div",_nt,Qi(zl(s).packetStats?.transmitted_packets||0),1),te[1]||(te[1]=Ee("div",{class:"text-xs text-white/70 uppercase tracking-wide"},"Total Transmitted",-1))])]),Ee("div",bnt,[Ee("div",null,[Ee("div",wnt,Qi(B.value.length>0?Math.round(B.value.reduce((he,De)=>he+De.rxPackets,0)/B.value.length*100)/100:0),1),te[2]||(te[2]=Ee("div",{class:"text-xs text-white/60"},"Avg RX/hr",-1))]),Ee("div",null,[Ee("div",knt,Qi(B.value.length>0?Math.round(B.value.reduce((he,De)=>he+De.txPackets,0)/B.value.length*100)/100:0),1),te[3]||(te[3]=Ee("div",{class:"text-xs text-white/60"},"Avg TX/hr",-1))]),Ee("div",null,[Ee("div",Tnt,Qi(zl(s).packetStats?.dropped_packets||0),1),te[4]||(te[4]=Ee("div",{class:"text-xs text-white/60"},"Dropped",-1))])])]))}}),Mnt=ld(Ant,[["__scopeId","data-v-2ece57e8"]]),Snt={class:"relative w-full max-w-4xl max-h-[90vh] overflow-hidden"},Ent={class:"glass-card rounded-[20px] p-8 backdrop-blur-[50px] shadow-2xl border border-white/20"},Cnt={class:"flex items-center justify-between mb-6"},Lnt={class:"text-white/70 text-sm"},Pnt={class:"max-h-[70vh] overflow-y-auto custom-scrollbar"},Int={class:"mb-6"},znt={class:"glass-card bg-white/5 rounded-[15px] p-4"},Ont={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Dnt={class:"space-y-3"},Fnt={class:"flex justify-between py-2 border-b border-white/10"},Rnt={class:"text-white font-mono text-sm"},Bnt={class:"flex justify-between py-2 border-b border-white/10"},Nnt={class:"text-white font-mono text-xs break-all"},jnt={key:0,class:"flex justify-between py-2 border-b border-white/10"},Unt={class:"text-white font-mono text-xs"},Vnt={class:"space-y-3"},Hnt={class:"flex justify-between py-2 border-b border-white/10"},Wnt={class:"text-white font-semibold"},qnt={class:"flex justify-between py-2 border-b border-white/10"},$nt={class:"text-white font-semibold"},Znt={class:"flex justify-between py-2 border-b border-white/10"},Gnt={class:"mb-6"},Ynt={class:"glass-card bg-white/5 rounded-[15px] p-4"},Knt={class:"space-y-3"},Xnt={class:"flex justify-between py-2 border-b border-white/10"},Jnt={class:"text-white"},Qnt={key:0,class:"pt-2"},tit={class:"glass-card bg-black/30 rounded-[10px] p-4 mb-4"},eit={class:"w-full overflow-x-auto"},rit={class:"text-white/90 text-xs font-mono whitespace-pre leading-relaxed min-w-full"},nit={class:"flex items-center justify-between mb-3"},iit={class:"text-white/80 text-sm font-semibold"},ait={class:"text-white/60 text-xs"},oit={class:"glass-card bg-black/40 rounded-[8px] p-3 mb-3 overflow-x-auto"},sit={class:"font-mono text-sm text-white whitespace-pre min-w-full"},lit={class:"glass-card bg-white/5 rounded-[10px] overflow-hidden"},uit={class:"text-cyan-400 text-sm font-mono"},cit={class:"text-white text-sm"},hit={class:"text-white text-sm font-semibold"},fit={class:"text-orange-400 text-sm font-mono"},dit={key:0,class:"text-white/60 text-xs italic mt-2 px-1"},pit={key:1,class:"py-2"},mit={class:"mb-6"},git={class:"glass-card bg-white/5 rounded-[15px] p-4"},vit={class:"space-y-4"},yit={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},xit={class:"flex justify-between py-2 border-b border-white/10"},_it={class:"flex justify-between py-2 border-b border-white/10"},bit={key:0,class:"py-2"},wit={class:"glass-card bg-black/20 rounded-[10px] p-4"},kit={class:"flex items-center flex-wrap gap-2"},Tit={class:"relative group"},Ait={class:"relative px-3 py-2 bg-gradient-to-br from-blue-500/20 to-cyan-500/20 border border-cyan-400/40 rounded-lg transform transition-all hover:scale-105"},Mit={class:"font-mono text-xs font-semibold text-white/90"},Sit={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},Eit={key:0,class:"mx-2 text-cyan-400/60"},Cit={key:1,class:"py-2"},Lit={class:"text-white/70 text-sm mb-2 flex items-center"},Pit={key:0,class:"w-4 h-4 ml-2 text-yellow-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Iit={key:1,class:"text-yellow-400 text-xs ml-1"},zit={class:"glass-card bg-black/20 rounded-[10px] p-4"},Oit={class:"flex items-center flex-wrap gap-2"},Dit={class:"relative group"},Fit={key:0,class:"absolute -top-1 -right-1 w-2 h-2 bg-yellow-400 rounded-full animate-pulse"},Rit={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-black/90 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},Bit={key:0,class:"mx-1 text-orange-400/60"},Nit={class:"mb-6"},jit={class:"glass-card bg-white/5 rounded-[15px] p-4"},Uit={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4"},Vit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},Hit={class:"text-lg font-bold text-white"},Wit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},qit={class:"text-center p-3 glass-card bg-black/20 rounded-[10px]"},$it={class:"text-lg font-bold text-white"},Zit={class:"mb-4"},Git={class:"flex items-center gap-3"},Yit={class:"flex gap-1"},Kit={class:"text-white/80 text-sm capitalize"},Xit={key:0,class:"mb-4"},Jit={class:"text-white/70 text-sm mb-3"},Qit={class:"space-y-2"},tat={class:"flex items-center gap-3"},eat={class:"text-white/60 text-sm"},rat={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},nat={class:"space-y-2"},iat={class:"flex justify-between py-2 border-b border-white/10"},aat={class:"text-white"},oat={class:"flex justify-between py-2 border-b border-white/10"},sat={class:"space-y-2"},lat={class:"flex justify-between py-2 border-b border-white/10"},uat={key:0,class:"flex justify-between py-2 border-b border-white/10"},cat={class:"text-red-400 text-sm"},hat={class:"mt-6 pt-4 border-t border-white/10 flex justify-end"},fat=Dc({name:"PacketDetailsModal",__name:"PacketDetailsModal",props:{packet:{},isOpen:{type:Boolean},localHash:{}},emits:["close"],setup(d,{emit:s}){const E=d,B=s,K=Dt=>new Date(Dt*1e3).toLocaleString(),pt=Dt=>Dt.transmitted?Dt.is_duplicate?"text-amber-400":Dt.drop_reason?"text-red-400":"text-green-400":"text-red-400",_t=Dt=>Dt.transmitted?Dt.is_duplicate?"Duplicate":Dt.drop_reason?"Dropped":"Forwarded":"Dropped",Ot=Dt=>({0:"Request",1:"Response",2:"Plain Text Message",3:"Acknowledgment",4:"Node Advertisement",5:"Group Text Message",6:"Group Datagram",7:"Anonymous Request",8:"Returned Path",9:"Trace",10:"Multi-part Packet",15:"Custom Packet"})[Dt]||`Unknown Type (${Dt})`,jt=Dt=>({0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"})[Dt]||`Unknown Route (${Dt})`,te=Dt=>{if(!Dt)return"None";const Jn=Dt.replace(/\s+/g,"").toUpperCase().match(/.{2}/g)||[],Bn=[];for(let ni=0;ni{try{let Bn=0;const ni=cn.length/2;if(ni>=100){if(cn.length>=Bn+64){const Wi=cn.slice(Bn,Bn+64);Dt.push({name:"Public Key",byteRange:`${(Jn+Bn)/2}-${(Jn+Bn+63)/2}`,hexData:Wi.match(/.{8}/g)?.join(" ")||Wi,description:"Ed25519 public key of the node (32 bytes)",fields:[{bits:"0-255",name:"Ed25519 Public Key",value:`${Wi.slice(0,16)}...${Wi.slice(-16)}`,binary:"32 bytes (256 bits)"}]}),Bn+=64}if(cn.length>=Bn+8){const Wi=cn.slice(Bn,Bn+8),Un=parseInt(Wi,16),qr=new Date(Un*1e3);Dt.push({name:"Timestamp",byteRange:`${(Jn+Bn)/2}-${(Jn+Bn+7)/2}`,hexData:Wi.match(/.{2}/g)?.join(" ")||Wi,description:"Unix timestamp of advertisement",fields:[{bits:"0-31",name:"Unix Timestamp",value:`${Un} (${qr.toLocaleString()})`,binary:Un.toString(2).padStart(32,"0")}]}),Bn+=8}if(cn.length>=Bn+128){const Wi=cn.slice(Bn,Bn+128);Dt.push({name:"Signature",byteRange:`${(Jn+Bn)/2}-${(Jn+Bn+127)/2}`,hexData:Wi.match(/.{8}/g)?.join(" ")||Wi,description:"Ed25519 signature of public key, timestamp, and appdata",fields:[{bits:"0-511",name:"Ed25519 Signature",value:`${Wi.slice(0,16)}...${Wi.slice(-16)}`,binary:"64 bytes (512 bits)"}]}),Bn+=128}if(cn.length>Bn){const Wi=cn.slice(Bn);De(Dt,Wi,Jn+Bn)}}else Dt.push({name:"ADVERT AppData (Partial)",byteRange:`${Jn/2}-${Jn/2+ni-1}`,hexData:cn.match(/.{2}/g)?.join(" ")||cn,description:`Partial ADVERT data - appears to be just AppData portion (${ni} bytes)`,fields:[{bits:`0-${ni*8-1}`,name:"Partial Data",value:`${ni} bytes - attempting to decode as AppData`,binary:`${ni} bytes (${ni*8} bits)`}]}),De(Dt,cn,Jn)}catch(Bn){Dt.push({name:"ADVERT Parse Error",byteRange:"N/A",hexData:cn.slice(0,32)+"...",description:"Failed to parse ADVERT payload structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${Bn instanceof Error?Bn.message:"Unknown error"}`,binary:"Invalid"}]})}},De=(Dt,cn,Jn)=>{try{const Bn=cn.length/2;Dt.push({name:"AppData",byteRange:`${Jn/2}-${Jn/2+Bn-1}`,hexData:cn.match(/.{2}/g)?.join(" ")||cn,description:`Node advertisement application data (${Bn} bytes)`,fields:[{bits:`0-${Bn*8-1}`,name:"Application Data",value:`${Bn} bytes (contains flags, location, name, etc.)`,binary:`${Bn} bytes (${Bn*8} bits)`}]});let ni=0;if(cn.length>=2){const Wi=parseInt(cn.slice(ni,ni+2),16),Un=[],qr=!!(Wi&16),Di=!!(Wi&32),Fi=!!(Wi&64),Pi=!!(Wi&128);if(Wi&1&&Un.push("is chat node"),Wi&2&&Un.push("is repeater"),Wi&4&&Un.push("is room server"),Wi&8&&Un.push("is sensor"),qr&&Un.push("has location"),Di&&Un.push("has feature 1"),Fi&&Un.push("has feature 2"),Pi&&Un.push("has name"),Dt.push({name:"AppData Flags",byteRange:`${(Jn+ni)/2}`,hexData:`0x${cn.slice(ni,ni+2)}`,description:"Flags indicating which optional fields are present",fields:[{bits:"0-7",name:"Flags",value:Un.join(", ")||"none",binary:Wi.toString(2).padStart(8,"0")}]}),ni+=2,qr&&cn.length>=ni+16){const bi=cn.slice(ni,ni+8),Yi=[];for(let xl=6;xl>=0;xl-=2)Yi.push(bi.slice(xl,xl+2));const Ca=parseInt(Yi.join(""),16),Ni=Ca>2147483647?Ca-4294967296:Ca,si=Ni/1e6,Ma=cn.slice(ni+8,ni+16),zo=[];for(let xl=6;xl>=0;xl-=2)zo.push(Ma.slice(xl,xl+2));const ho=parseInt(zo.join(""),16),mo=ho>2147483647?ho-4294967296:ho,Ts=mo/1e6;Dt.push({name:"Location Data",byteRange:`${(Jn+ni)/2}-${(Jn+ni+15)/2}`,hexData:`${bi.match(/.{2}/g)?.join(" ")||bi} ${Ma.match(/.{2}/g)?.join(" ")||Ma}`,description:"GPS coordinates (latitude and longitude)",fields:[{bits:"0-31",name:"Latitude",value:`${si.toFixed(6)}° (raw: ${Ni})`,binary:Ni.toString(2).padStart(32,"0")},{bits:"32-63",name:"Longitude",value:`${Ts.toFixed(6)}° (raw: ${mo})`,binary:mo.toString(2).padStart(32,"0")}]}),ni+=16}if(Di&&cn.length>=ni+4){const bi=cn.slice(ni,ni+4),Yi=parseInt(bi,16);Dt.push({name:"Feature 1",byteRange:`${(Jn+ni)/2}-${(Jn+ni+3)/2}`,hexData:bi.match(/.{2}/g)?.join(" ")||bi,description:"Reserved feature 1 (2 bytes)",fields:[{bits:"0-15",name:"Feature 1 Value",value:`${Yi}`,binary:Yi.toString(2).padStart(16,"0")}]}),ni+=4}if(Fi&&cn.length>=ni+4){const bi=cn.slice(ni,ni+4),Yi=parseInt(bi,16);Dt.push({name:"Feature 2",byteRange:`${(Jn+ni)/2}-${(Jn+ni+3)/2}`,hexData:bi.match(/.{2}/g)?.join(" ")||bi,description:"Reserved feature 2 (2 bytes)",fields:[{bits:"0-15",name:"Feature 2 Value",value:`${Yi}`,binary:Yi.toString(2).padStart(16,"0")}]}),ni+=4}if(Pi&&cn.length>ni){const bi=cn.slice(ni),Yi=bi.match(/.{2}/g)||[],Ca=Yi.map(Ni=>{const si=parseInt(Ni,16);return si>=32&&si<=126?String.fromCharCode(si):"."}).join("").replace(/\.+$/,"");Dt.push({name:"Node Name",byteRange:`${(Jn+ni)/2}-${(Jn+cn.length-1)/2}`,hexData:bi.match(/.{2}/g)?.join(" ")||bi,description:`Node name string (${Yi.length} bytes)`,fields:[{bits:`0-${Yi.length*8-1}`,name:"Node Name",value:`"${Ca}"`,binary:`ASCII text (${Yi.length} bytes)`}]})}}}catch(Bn){Dt.push({name:"AppData Parse Error",byteRange:"N/A",hexData:cn.slice(0,Math.min(32,cn.length)),description:"Failed to parse AppData structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${Bn instanceof Error?Bn.message:"Unknown error"}`,binary:"Invalid"}]})}},er=Dt=>{if(!Dt)return[];if(Array.isArray(Dt))return Dt;if(typeof Dt=="string")try{return JSON.parse(Dt)}catch{return[]}return[]},pr=Dt=>{const cn=[];if(!Dt)return cn;try{const Jn=Dt.raw_packet;if(Jn){const Bn=Jn.replace(/\s+/g,"").toUpperCase();let ni=0;if(Bn.length>=2){const Wi=Bn.slice(ni,ni+2),Un=parseInt(Wi,16),qr=Un&3,Di=(Un&60)>>2,Fi=(Un&192)>>6,Pi={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},bi={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};if(cn.push({name:"Header",byteRange:"0",hexData:`0x${Wi}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:Pi[qr]||"Unknown",binary:qr.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:bi[Di]||"Unknown",binary:Di.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:Fi.toString(),binary:Fi.toString(2).padStart(2,"0")}]}),ni+=2,(qr===0||qr===3)&&Bn.length>=ni+8){const Ca=Bn.slice(ni,ni+8),Ni=parseInt(Ca.slice(0,4),16),si=parseInt(Ca.slice(4,8),16);cn.push({name:"Transport Codes",byteRange:"1-4",hexData:`${Ca.slice(0,4)} ${Ca.slice(4,8)}`,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-15",name:"Code 1",value:Ni.toString(),binary:Ni.toString(2).padStart(16,"0")},{bits:"16-31",name:"Code 2",value:si.toString(),binary:si.toString(2).padStart(16,"0")}]}),ni+=8}if(Bn.length>=ni+2){const Ca=Bn.slice(ni,ni+2),Ni=parseInt(Ca,16);if(cn.push({name:"Path Length",byteRange:`${ni/2}`,hexData:`0x${Ca}`,description:`${Ni} bytes of path data`,fields:[{bits:"0-7",name:"Path Length",value:`${Ni} bytes`,binary:Ni.toString(2).padStart(8,"0")}]}),ni+=2,Ni>0&&Bn.length>=ni+Ni*2){const si=Bn.slice(ni,ni+Ni*2);cn.push({name:"Path Data",byteRange:`${ni/2}-${(ni+Ni*2-2)/2}`,hexData:si.match(/.{2}/g)?.join(" ")||si,description:"Routing path information",fields:[{bits:`0-${Ni*8-1}`,name:"Route Path",value:`${Ni} bytes of routing data`,binary:`${Ni} bytes (${Ni*8} bits)`}]}),ni+=Ni*2}}if(Bn.length>ni){const Ca=Bn.slice(ni),Ni=Ca.length/2;Di===4?he(cn,Ca,ni):cn.push({name:"Payload Data",byteRange:`${ni/2}-${ni/2+Ni-1}`,hexData:Ca.match(/.{2}/g)?.join(" ")||Ca,description:"Application data content",fields:[{bits:`0-${Ni*8-1}`,name:"Application Data",value:`${Ni} bytes`,binary:`${Ni} bytes (${Ni*8} bits)`}]})}}}else{if(Dt.header){const Bn=Dt.header.replace(/0x/gi,"").replace(/\s+/g,"").toUpperCase(),ni=parseInt(Bn,16),Wi=ni&3,Un=(ni&60)>>2,qr=(ni&192)>>6,Di={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},Fi={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};cn.push({name:"Header",byteRange:"0",hexData:`0x${Bn}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:Di[Wi]||"Unknown",binary:Wi.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:Fi[Un]||"Unknown",binary:Un.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:qr.toString(),binary:qr.toString(2).padStart(2,"0")}]}),Dt.transport_codes&&cn.push({name:"Transport Codes",byteRange:"1-4",hexData:Dt.transport_codes,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-31",name:"Transport Codes",value:Dt.transport_codes,binary:"Available in separate field"}]}),Dt.original_path&&Dt.original_path.length>0&&cn.push({name:"Original Path",byteRange:"?",hexData:Dt.original_path.join(" "),description:`Original routing path (${Dt.original_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Dt.original_path.length} nodes`,binary:"Available as node list"}]}),Dt.forwarded_path&&Dt.forwarded_path.length>0&&cn.push({name:"Forwarded Path",byteRange:"?",hexData:Dt.forwarded_path.join(" "),description:`Forwarded routing path (${Dt.forwarded_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${Dt.forwarded_path.length} nodes`,binary:"Available as node list"}]})}if(Dt.payload){const Bn=Dt.payload.replace(/\s+/g,"").toUpperCase(),ni=Bn.length/2;Dt.type===4?he(cn,Bn,0):cn.push({name:"Payload Data",byteRange:`0-${ni-1}`,hexData:Bn.match(/.{2}/g)?.join(" ")||Bn,description:`Application data content (${ni} bytes)`,fields:[{bits:`0-${ni*8-1}`,name:"Application Data",value:`${ni} bytes`,binary:`${ni} bytes (${ni*8} bits)`}]})}}}catch{cn.push({name:"Parse Error",byteRange:"N/A",hexData:"Error",description:"Unable to parse packet structure",fields:[{bits:"N/A",name:"Error",value:"Parse failed",binary:"Invalid"}]})}return cn},Mr=Dt=>Dt>=10?"text-green-400":Dt>=5?"text-cyan-400":Dt>=0?"text-yellow-400":"text-red-400",Tr=(Dt,cn=8)=>{const Bn={7:-7.5,8:-10,9:-12.5,10:-15,11:-17.5,12:-20}[cn]||-10;let ni,Wi;return Dt>=Bn+10?(ni=4,Wi="signal-excellent"):Dt>=Bn+5?(ni=3,Wi="signal-good"):Dt>=Bn?(ni=2,Wi="signal-fair"):(ni=1,Wi="signal-poor"),{level:ni,className:Wi}},Vr=Dt=>{Dt.key==="Escape"&&B("close")},mn=Dt=>{Dt.target===Dt.currentTarget&&B("close")};return(Dt,cn)=>(_i(),Z0(XA,{to:"body"},[Wl($z,{name:"modal",appear:""},{default:ew(()=>[Dt.isOpen&&Dt.packet?(_i(),zi("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:mn,onKeydown:Vr,tabindex:"0"},[cn[36]||(cn[36]=Ee("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-md"},null,-1)),Ee("div",Snt,[Ee("div",Ent,[Ee("div",Cnt,[Ee("div",null,[cn[2]||(cn[2]=Ee("h2",{class:"text-2xl font-bold text-white mb-1"},"Packet Details",-1)),Ee("p",Lnt,Qi(Ot(Dt.packet.type))+" - "+Qi(jt(Dt.packet.route)),1)]),Ee("button",{onClick:cn[0]||(cn[0]=Jn=>B("close")),class:"w-8 h-8 flex items-center justify-center rounded-full bg-white/10 hover:bg-white/20 transition-colors duration-200 text-white/70 hover:text-white"},cn[3]||(cn[3]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("div",Pnt,[Ee("div",Int,[cn[10]||(cn[10]=Ee("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Ee("div",{class:"w-2 h-2 rounded-full bg-cyan-400 mr-3"}),Qu(" Basic Information ")],-1)),Ee("div",znt,[Ee("div",Ont,[Ee("div",Dnt,[Ee("div",Fnt,[cn[4]||(cn[4]=Ee("span",{class:"text-white/70 text-sm"},"Timestamp",-1)),Ee("span",Rnt,Qi(K(Dt.packet.timestamp)),1)]),Ee("div",Bnt,[cn[5]||(cn[5]=Ee("span",{class:"text-white/70 text-sm"},"Packet Hash",-1)),Ee("span",Nnt,Qi(Dt.packet.packet_hash),1)]),Dt.packet.header?(_i(),zi("div",jnt,[cn[6]||(cn[6]=Ee("span",{class:"text-white/70 text-sm"},"Header",-1)),Ee("span",Unt,Qi(Dt.packet.header),1)])):is("",!0)]),Ee("div",Vnt,[Ee("div",Hnt,[cn[7]||(cn[7]=Ee("span",{class:"text-white/70 text-sm"},"Type",-1)),Ee("span",Wnt,Qi(Dt.packet.type)+" ("+Qi(Ot(Dt.packet.type))+")",1)]),Ee("div",qnt,[cn[8]||(cn[8]=Ee("span",{class:"text-white/70 text-sm"},"Route",-1)),Ee("span",$nt,Qi(Dt.packet.route)+" ("+Qi(jt(Dt.packet.route))+")",1)]),Ee("div",Znt,[cn[9]||(cn[9]=Ee("span",{class:"text-white/70 text-sm"},"Status",-1)),Ee("span",{class:jo(["font-semibold",pt(Dt.packet)])},Qi(_t(Dt.packet)),3)])])])])]),Ee("div",Gnt,[cn[16]||(cn[16]=Ee("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Ee("div",{class:"w-2 h-2 rounded-full bg-orange-400 mr-3"}),Qu(" Payload Data ")],-1)),Ee("div",Ynt,[Ee("div",Knt,[Ee("div",Xnt,[cn[11]||(cn[11]=Ee("span",{class:"text-white/70 text-sm"},"Payload Length",-1)),Ee("span",Jnt,Qi(Dt.packet.payload_length||Dt.packet.length)+" bytes",1)]),Dt.packet.payload?(_i(),zi("div",Qnt,[cn[14]||(cn[14]=Ee("div",{class:"text-white/70 text-sm mb-3"},"Payload Analysis",-1)),Ee("div",tit,[cn[12]||(cn[12]=Ee("div",{class:"text-white/70 text-xs mb-2 font-semibold"},"Raw Hex Data",-1)),Ee("div",eit,[Ee("pre",rit,Qi(te(Dt.packet.payload)),1)])]),(_i(!0),zi(Pu,null,Jh(pr(Dt.packet).filter(Jn=>!Jn.name.includes("Parse Error")),(Jn,Bn)=>(_i(),zi("div",{key:Bn,class:"mb-4"},[Ee("div",nit,[Ee("h4",iit,Qi(Jn.name),1),Ee("span",ait,"Bytes "+Qi(Jn.byteRange),1)]),Ee("div",oit,[Ee("div",sit,Qi(Jn.hexData),1)]),Ee("div",lit,[cn[13]||(cn[13]=Ee("div",{class:"grid grid-cols-4 gap-4 p-3 bg-white/10 text-white/70 text-xs font-semibold uppercase tracking-wide"},[Ee("div",null,"Bits"),Ee("div",null,"Field"),Ee("div",null,"Value"),Ee("div",null,"Binary")],-1)),(_i(!0),zi(Pu,null,Jh(Jn.fields,(ni,Wi)=>(_i(),zi("div",{key:Wi,class:"grid grid-cols-4 gap-4 p-3 border-b border-white/5 last:border-b-0 hover:bg-white/5 transition-colors"},[Ee("div",uit,Qi(ni.bits),1),Ee("div",cit,Qi(ni.name),1),Ee("div",hit,Qi(ni.value),1),Ee("div",fit,Qi(ni.binary),1)]))),128))]),Jn.description?(_i(),zi("div",dit,Qi(Jn.description),1)):is("",!0)]))),128))])):(_i(),zi("div",pit,cn[15]||(cn[15]=[Ee("span",{class:"text-white/70 text-sm"},"Payload:",-1),Ee("span",{class:"text-white/50 ml-2"},"None",-1)])))])])]),Ee("div",mit,[cn[24]||(cn[24]=Ee("h3",{class:"text-lg font-semibold text-white mb-4 flex items-center"},[Ee("div",{class:"w-2 h-2 rounded-full bg-purple-400 mr-3"}),Qu(" Path Information ")],-1)),Ee("div",git,[Ee("div",vit,[Ee("div",yit,[Ee("div",xit,[cn[17]||(cn[17]=Ee("span",{class:"text-white/70 text-sm"},"Source Hash",-1)),Ee("span",{class:jo(["text-white font-mono text-xs",E.localHash&&Dt.packet.src_hash===E.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},Qi(Dt.packet.src_hash||"Unknown"),3)]),Ee("div",_it,[cn[18]||(cn[18]=Ee("span",{class:"text-white/70 text-sm"},"Destination Hash",-1)),Ee("span",{class:jo(["text-white font-mono text-xs",E.localHash&&Dt.packet.dst_hash===E.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},Qi(Dt.packet.dst_hash||"Broadcast"),3)])]),er(Dt.packet.original_path).length>0?(_i(),zi("div",bit,[cn[20]||(cn[20]=Ee("div",{class:"text-white/70 text-sm mb-2"},"Original Path",-1)),Ee("div",wit,[Ee("div",kit,[(_i(!0),zi(Pu,null,Jh(er(Dt.packet.original_path),(Jn,Bn)=>(_i(),zi("div",{key:Bn,class:"flex items-center"},[Ee("div",Tit,[Ee("div",Ait,[Ee("div",Mit,Qi(Jn.length<=2?Jn.toUpperCase():Jn.slice(0,2).toUpperCase()),1)]),Ee("div",Sit," Node: "+Qi(Jn),1)]),Bn0?(_i(),zi("div",Cit,[Ee("div",Lit,[cn[22]||(cn[22]=Qu(" Forwarded Path ",-1)),JSON.stringify(er(Dt.packet.original_path))!==JSON.stringify(er(Dt.packet.forwarded_path))?(_i(),zi("svg",Pit,cn[21]||(cn[21]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):is("",!0),JSON.stringify(er(Dt.packet.original_path))!==JSON.stringify(er(Dt.packet.forwarded_path))?(_i(),zi("span",Iit,"(Modified)")):is("",!0)]),Ee("div",zit,[Ee("div",Oit,[(_i(!0),zi(Pu,null,Jh(er(Dt.packet.forwarded_path),(Jn,Bn)=>(_i(),zi("div",{key:Bn,class:"flex items-center"},[Ee("div",Dit,[Ee("div",{class:jo(["relative px-3 py-2 bg-gradient-to-br from-orange-500/20 to-yellow-500/20 border border-orange-400/40 rounded-lg transform transition-all hover:scale-105",E.localHash&&Jn===E.localHash?"bg-gradient-to-br from-yellow-400/30 to-orange-400/30 border-yellow-300 shadow-yellow-400/20 shadow-lg":"hover:border-orange-400/60"])},[Ee("div",{class:jo(["font-mono text-xs font-semibold",E.localHash&&Jn===E.localHash?"text-yellow-200":"text-white/90"])},Qi(Jn.slice(0,2).toUpperCase()),3),E.localHash&&Jn===E.localHash?(_i(),zi("div",Fit)):is("",!0)],2),Ee("div",Rit,Qi(Jn),1)]),BnEe("div",{key:Jn,class:jo(["w-2 h-6 rounded-sm transition-all duration-300",Jn<=Tr(Dt.packet.snr).level?{"signal-excellent":"bg-green-400","signal-good":"bg-cyan-400","signal-fair":"bg-yellow-400","signal-poor":"bg-red-400"}[Tr(Dt.packet.snr).className]:"bg-white/10"])},null,2)),64))]),Ee("span",Kit,Qi(Tr(Dt.packet.snr).className.replace("signal-","")),1)])]),Dt.packet.is_trace&&Dt.packet.path_snr_details&&Dt.packet.path_snr_details.length>0?(_i(),zi("div",Xit,[Ee("div",Jit,"Path SNR Details ("+Qi(Dt.packet.path_snr_details.length)+" hops)",1),Ee("div",Qit,[(_i(!0),zi(Pu,null,Jh(Dt.packet.path_snr_details,(Jn,Bn)=>(_i(),zi("div",{key:Bn,class:"flex items-center justify-between p-2 glass-card bg-black/20 rounded-[8px]"},[Ee("div",tat,[Ee("span",eat,Qi(Bn+1)+".",1),Ee("span",{class:jo(["font-mono text-xs text-white",E.localHash&&Jn.hash===E.localHash?"bg-cyan-400/20 text-cyan-300 px-1 rounded":""])},Qi(Jn.hash),3)]),Ee("span",{class:jo(["text-sm font-bold",Mr(Jn.snr_db)])},Qi(Jn.snr_db.toFixed(1))+"dB ",3)]))),128))])])):is("",!0),Ee("div",rat,[Ee("div",nat,[Ee("div",iat,[cn[31]||(cn[31]=Ee("span",{class:"text-white/70 text-sm"},"TX Delay",-1)),Ee("span",aat,Qi(Number(Dt.packet.tx_delay_ms)>0?Number(Dt.packet.tx_delay_ms).toFixed(1)+"ms":"-"),1)]),Ee("div",oat,[cn[32]||(cn[32]=Ee("span",{class:"text-white/70 text-sm"},"Transmitted",-1)),Ee("span",{class:jo(Dt.packet.transmitted?"text-green-400":"text-red-400")},Qi(Dt.packet.transmitted?"Yes":"No"),3)])]),Ee("div",sat,[Ee("div",lat,[cn[33]||(cn[33]=Ee("span",{class:"text-white/70 text-sm"},"Is Duplicate",-1)),Ee("span",{class:jo(Dt.packet.is_duplicate?"text-amber-400":"text-white/60")},Qi(Dt.packet.is_duplicate?"Yes":"No"),3)]),Dt.packet.drop_reason?(_i(),zi("div",uat,[cn[34]||(cn[34]=Ee("span",{class:"text-white/70 text-sm"},"Drop Reason",-1)),Ee("span",cat,Qi(Dt.packet.drop_reason),1)])):is("",!0)])])])])]),Ee("div",hat,[Ee("button",{onClick:cn[1]||(cn[1]=Jn=>B("close")),class:"px-6 py-2 bg-gradient-to-r from-cyan-500/20 to-cyan-400/20 hover:from-cyan-500/30 hover:to-cyan-400/30 border border-cyan-400/30 rounded-[10px] text-white transition-all duration-200 backdrop-blur-sm"}," Close ")])])])],32)):is("",!0)]),_:1})]))}}),dat=ld(fat,[["__scopeId","data-v-3b73bfd6"]]),pat={class:"glass-card rounded-[20px] p-6"},mat={class:"flex justify-between items-center mb-6"},gat={class:"flex items-center gap-3"},vat={class:"text-dark-text text-sm"},yat=["title"],xat={key:1,class:"text-primary text-sm"},_at={key:2,class:"text-accent-red text-sm"},bat={class:"flex items-center gap-3"},wat={class:"flex flex-col"},kat=["value"],Tat={class:"flex flex-col"},Aat=["value"],Mat={class:"flex flex-col"},Sat={class:"flex flex-col"},Eat=["disabled"],Cat={class:"space-y-4 overflow-hidden"},Lat=["onClick"],Pat={class:"grid grid-cols-12 gap-2 items-center"},Iat={class:"col-span-1 text-white text-sm"},zat={class:"col-span-1 flex items-center gap-2"},Oat={class:"text-white text-xs"},Dat={class:"col-span-2"},Fat={class:"col-span-1 text-white text-xs"},Rat={class:"col-span-2"},Bat={class:"space-y-1"},Nat={class:"inline-block px-2 py-0.5 rounded bg-[#588187] text-accent-cyan text-xs"},jat={class:"col-span-1 text-white text-xs"},Uat={class:"col-span-1 text-white text-xs"},Vat={class:"col-span-1 text-white text-xs"},Hat={class:"col-span-1 text-white text-xs"},Wat={class:"col-span-1"},qat={key:0,class:"text-accent-red text-[8px] italic truncate"},$at={key:0,class:"flex justify-between items-center mt-6 pt-4 border-t border-dark-border"},Zat={class:"flex items-center gap-4"},Gat={class:"text-dark-text text-sm"},Yat={key:0,class:"flex items-center gap-2"},Kat=["disabled"],Xat={class:"text-dark-text text-xs"},Jat={class:"flex items-center gap-2"},Qat=["disabled"],tot={class:"flex items-center gap-1"},eot={key:1,class:"text-dark-text text-sm px-2"},rot=["onClick"],not={key:2,class:"text-dark-text text-sm px-2"},iot=["disabled"],aot={key:1,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},oot={class:"flex items-center gap-4"},sot={class:"text-dark-text text-sm"},lot={class:"text-dark-text text-xs"},uot={key:2,class:"flex justify-center mt-6 pt-4 border-t border-dark-border"},i2=10,ly=1e3,cot=Dc({name:"PacketTable",__name:"PacketTable",setup(d){const s=sw(),E=Ga(1),B=Ga(null),K=Ga(100),pt=Ga(!1),_t=Ga(null),Ot=Ga(!1),jt=zo=>{_t.value=zo,Ot.value=!0},te=()=>{Ot.value=!1,_t.value=null},he=Ga("all"),De=Ga("all"),er=Ga(!1),pr=Ga(null),Mr=["all","0","1","2","3","4","5","6","7","8","9"],Tr=["all","1","2"],Vr=$o(()=>{let zo=s.recentPackets;if(he.value!=="all"){const ho=parseInt(he.value);zo=zo.filter(mo=>mo.type===ho)}if(De.value!=="all"){const ho=parseInt(De.value);zo=zo.filter(mo=>mo.route===ho)}return er.value&&pr.value!==null&&(zo=zo.filter(ho=>ho.timestamp>=pr.value)),zo}),mn=$o(()=>{const zo=(E.value-1)*i2,ho=zo+i2;return Vr.value.slice(zo,ho)}),Dt=$o(()=>Math.ceil(Vr.value.length/i2)),cn=$o(()=>E.value===Dt.value),Jn=$o(()=>s.recentPackets.length>=K.value&&K.valuecn.value&&Jn.value&&!pt.value),ni=zo=>new Date(zo*1e3).toLocaleTimeString("en-US",{hour12:!1}),Wi=zo=>({0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE"})[zo]||`TYPE_${zo}`,Un=zo=>({0:"T-Flood",1:"Flood",2:"Direct",3:"T-Direct"})[zo]||`Route ${zo}`,qr=zo=>zo.transmitted?"text-accent-green":"text-primary",Di=zo=>zo.drop_reason?"Dropped":zo.transmitted?"Forward":"Received",Fi=zo=>zo===1?"bg-[#223231] text-accent-cyan":"bg-secondary/30 text-secondary",Pi=zo=>({0:"bg-primary",1:"bg-accent-green",2:"bg-secondary",3:"bg-accent-purple",4:"bg-accent-red",5:"bg-accent-cyan",6:"bg-primary",7:"bg-accent-purple",8:"bg-accent-green",9:"bg-secondary"})[zo]||"bg-gray-500",bi=zo=>({0:"border-l-primary",1:"border-l-accent-green",2:"border-l-secondary",3:"border-l-accent-purple",4:"border-l-accent-red",5:"border-l-accent-cyan",6:"border-l-primary",7:"border-l-accent-purple",8:"border-l-accent-green",9:"border-l-secondary"})[zo]||"border-l-gray-500",Yi=()=>{he.value="all",De.value="all",er.value=!1,pr.value=null,E.value=1},Ca=()=>{er.value?(er.value=!1,pr.value=null):(er.value=!0,pr.value=Date.now()/1e3),E.value=1},Ni=$o(()=>pr.value?new Date(pr.value*1e3).toLocaleTimeString():""),si=async zo=>{try{const ho=zo||K.value;await s.fetchRecentPackets({limit:ho})}catch(ho){console.error("Error fetching packet data:",ho)}},Ma=async()=>{if(!(pt.value||K.value>=ly)){pt.value=!0;try{const zo=Math.min(K.value+200,ly);K.value=zo,await si(zo)}catch(zo){console.error("Error loading more records:",zo)}finally{pt.value=!1}}};return bp(async()=>{await si(),B.value=window.setInterval(si,5e3)}),gg(()=>{B.value&&clearInterval(B.value)}),(zo,ho)=>(_i(),zi(Pu,null,[Ee("div",pat,[Ee("div",mat,[Ee("div",gat,[ho[6]||(ho[6]=Ee("h3",{class:"text-white text-xl font-semibold"},"Recent Packets",-1)),Ee("span",vat," ("+Qi(Vr.value.length)+" of "+Qi(zl(s).recentPackets.length)+") ",1),er.value?(_i(),zi("span",{key:0,class:"text-primary text-sm bg-primary/10 px-2 py-1 rounded-md border border-primary/20",title:`Filter activated at ${Ni.value}`}," Live Mode (since "+Qi(Ni.value)+") ",9,yat)):is("",!0),zl(s).isLoading?(_i(),zi("span",xat,"Loading...")):is("",!0),zl(s).error?(_i(),zi("span",_at,Qi(zl(s).error),1)):is("",!0)]),Ee("div",bat,[Ee("div",wat,[ho[7]||(ho[7]=Ee("label",{class:"text-dark-text text-xs mb-1"},"Type",-1)),Gp(Ee("select",{"onUpdate:modelValue":ho[0]||(ho[0]=mo=>he.value=mo),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(_i(),zi(Pu,null,Jh(Mr,mo=>Ee("option",{key:mo,value:mo,class:"bg-[#1A1E1F] text-white"},Qi(mo==="all"?"All Types":`Type ${mo} (${Wi(parseInt(mo))})`),9,kat)),64))],512),[[pA,he.value]])]),Ee("div",Tat,[ho[8]||(ho[8]=Ee("label",{class:"text-dark-text text-xs mb-1"},"Route",-1)),Gp(Ee("select",{"onUpdate:modelValue":ho[1]||(ho[1]=mo=>De.value=mo),class:"glass-card border border-dark-border rounded-[10px] px-3 py-2 text-white text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(_i(),zi(Pu,null,Jh(Tr,mo=>Ee("option",{key:mo,value:mo,class:"bg-[#1A1E1F] text-white"},Qi(mo==="all"?"All Routes":`Route ${mo} (${Un(parseInt(mo))})`),9,Aat)),64))],512),[[pA,De.value]])]),Ee("div",Mat,[ho[9]||(ho[9]=Ee("label",{class:"text-dark-text text-xs mb-1"},"Filter",-1)),Ee("button",{onClick:Ca,class:jo(["glass-card border rounded-[10px] px-4 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 min-w-[120px]",{"border-primary bg-primary/10 text-primary":er.value,"border-dark-border text-dark-text hover:border-primary hover:text-white hover:bg-primary/5":!er.value}])},Qi(er.value?"New Only":"Show New"),3)]),Ee("div",Sat,[ho[10]||(ho[10]=Ee("label",{class:"text-transparent text-xs mb-1"},".",-1)),Ee("button",{onClick:Yi,class:jo(["glass-card border border-dark-border hover:border-primary rounded-[10px] px-4 py-2 text-dark-text hover:text-white text-sm transition-all duration-200 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20",{"opacity-50 cursor-not-allowed hover:border-dark-border hover:text-dark-text":he.value==="all"&&De.value==="all"&&!er.value,"hover:bg-primary/10":he.value!=="all"||De.value!=="all"||er.value}]),disabled:he.value==="all"&&De.value==="all"&&!er.value}," Reset ",10,Eat)])])]),ho[14]||(ho[14]=$f('
Time
Type
Route
LEN
Path/Hashes
RSSI
SNR
Score
TX Delay
Status
',1)),Ee("div",Cat,[Wl(MK,{name:"packet-list",tag:"div",class:"space-y-4",appear:""},{default:ew(()=>[(_i(!0),zi(Pu,null,Jh(mn.value,(mo,Ts)=>(_i(),zi("div",{key:`${mo.packet_hash}_${mo.timestamp}_${Ts}`,class:jo(["packet-row border-b border-dark-border/50 pb-4 hover:bg-white/5 transition-colors duration-200 cursor-pointer rounded-[10px] p-2 border-l-4",bi(mo.type)]),onClick:xl=>jt(mo)},[Ee("div",Pat,[Ee("div",Iat,Qi(ni(mo.timestamp)),1),Ee("div",zat,[Ee("div",{class:jo(["w-2 h-2 rounded-full",Pi(mo.type)])},null,2),Ee("span",Oat,Qi(Wi(mo.type)),1)]),Ee("div",Dat,[Ee("span",{class:jo(["inline-block px-2 py-1 rounded text-xs font-medium",Fi(mo.route)])},Qi(Un(mo.route)),3)]),Ee("div",Fat,Qi(mo.length)+"B",1),Ee("div",Rat,[Ee("div",Bat,[Ee("span",Nat,Qi(mo.src_hash?.slice(-4)||"????")+" → "+Qi(mo.dst_hash?.slice(-4)||"????"),1)])]),Ee("div",jat,Qi(mo.rssi.toFixed(0)),1),Ee("div",Uat,Qi(mo.snr.toFixed(1))+"dB",1),Ee("div",Vat,Qi(mo.score.toFixed(2)),1),Ee("div",Hat,Qi(Number(mo.tx_delay_ms)>0?Number(mo.tx_delay_ms).toFixed(1)+"ms":""),1),Ee("div",Wat,[Ee("div",null,[Ee("span",{class:jo(["text-xs font-medium",qr(mo)])},Qi(Di(mo)),3),mo.drop_reason?(_i(),zi("p",qat,Qi(mo.drop_reason),1)):is("",!0)])])])],10,Lat))),128))]),_:1})]),Dt.value>1?(_i(),zi("div",$at,[Ee("div",Zat,[Ee("span",Gat," Showing "+Qi((E.value-1)*i2+1)+" - "+Qi(Math.min(E.value*i2,Vr.value.length))+" of "+Qi(Vr.value.length)+" packets ",1),Bn.value?(_i(),zi("div",Yat,[ho[11]||(ho[11]=Ee("span",{class:"text-dark-text text-xs"},"•",-1)),Ee("button",{onClick:Ma,disabled:pt.value,class:jo(["glass-card border border-primary rounded-[8px] px-3 py-1.5 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 hover:bg-primary/5",{"text-primary border-primary cursor-pointer":!pt.value,"text-dark-text border-dark-border cursor-not-allowed opacity-50":pt.value}])},Qi(pt.value?"Loading...":`Load ${Math.min(200,ly-K.value)} more`),11,Kat),Ee("span",Xat,"("+Qi(K.value)+"/"+Qi(ly)+" max)",1)])):is("",!0)]),Ee("div",Jat,[Ee("button",{onClick:ho[2]||(ho[2]=mo=>E.value=E.value-1),disabled:E.value<=1,class:jo(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":E.value<=1,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":E.value>1}])}," Previous ",10,Qat),Ee("div",tot,[E.value>3?(_i(),zi("button",{key:0,onClick:ho[3]||(ho[3]=mo=>E.value=1),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"}," 1 ")):is("",!0),E.value>4?(_i(),zi("span",eot,"...")):is("",!0),(_i(!0),zi(Pu,null,Jh(Array.from({length:Math.min(5,Dt.value)},(mo,Ts)=>Math.max(1,Math.min(E.value-2,Dt.value-4))+Ts).filter(mo=>mo<=Dt.value),mo=>(_i(),zi("button",{key:mo,onClick:Ts=>E.value=mo,class:jo(["glass-card border rounded-[8px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-primary bg-primary/10 text-primary":E.value===mo,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":E.value!==mo}])},Qi(mo),11,rot))),128)),E.valueE.value=Dt.value),class:"glass-card border border-dark-border hover:border-primary rounded-[8px] px-3 py-2 text-sm text-white hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"},Qi(Dt.value),1)):is("",!0)]),Ee("button",{onClick:ho[5]||(ho[5]=mo=>E.value=E.value+1),disabled:E.value>=Dt.value,class:jo(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20",{"border-dark-border text-dark-text cursor-not-allowed opacity-50":E.value>=Dt.value,"border-dark-border text-white hover:border-primary hover:text-primary hover:bg-primary/5":E.value(_i(),zi("div",null,[Wl(Qrt),Ee("div",fot,[Wl(Mnt),Wl(dnt)]),Wl(hot)]))}}),pot={class:"bg-white/5 border border-white/10 rounded-lg p-4 mb-6"},mot={class:"flex items-center gap-3"},got={class:"flex-1 min-w-0"},vot={class:"text-white font-medium truncate"},yot={class:"text-white/60 text-sm font-mono"},xot={key:0,class:"text-white/50 text-xs"},_ot={key:1,class:"text-white/50 text-xs"},bot=Dc({__name:"DeleteNeighborModal",props:{show:{type:Boolean},neighbor:{}},emits:["close","delete"],setup(d,{emit:s}){const E=d,B=s,K=()=>{E.neighbor&&(B("delete",E.neighbor.id),pt())},pt=()=>{B("close")},_t=Ot=>{Ot.target===Ot.currentTarget&&pt()};return(Ot,jt)=>Ot.show&&Ot.neighbor?(_i(),zi("div",{key:0,onClick:_t,class:"fixed inset-0 bg-black/80 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Ee("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:jt[0]||(jt[0]=Pm(()=>{},["stop"]))},[Ee("div",{class:"flex items-center gap-3 mb-6"},[jt[2]||(jt[2]=Ee("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),jt[3]||(jt[3]=Ee("div",null,[Ee("h3",{class:"text-xl font-semibold text-white"},"Delete Neighbor"),Ee("p",{class:"text-white/60 text-sm mt-1"}," Are you sure you want to delete this neighbor? ")],-1)),Ee("button",{onClick:pt,class:"ml-auto text-white/60 hover:text-white transition-colors"},jt[1]||(jt[1]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("div",pot,[Ee("div",mot,[Ee("div",got,[Ee("div",vot,Qi(Ot.neighbor?.node_name||Ot.neighbor?.long_name||Ot.neighbor?.short_name||"Unknown"),1),Ee("div",yot," ID: "+Qi(Ot.neighbor?.node_num_hex||Ot.neighbor?.node_num||Ot.neighbor?.id||"N/A"),1),Ot.neighbor?.contact_type?(_i(),zi("div",xot,Qi(Ot.neighbor.contact_type),1)):is("",!0),Ot.neighbor?.hw_model?(_i(),zi("div",_ot,Qi(Ot.neighbor.hw_model),1)):is("",!0)])])]),jt[4]||(jt[4]=Ee("div",{class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},[Ee("div",{class:"flex items-center gap-2 text-accent-red text-sm"},[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),Ee("span",null,"This action cannot be undone")])],-1)),Ee("div",{class:"flex gap-3"},[Ee("button",{onClick:pt,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Ee("button",{onClick:K,class:"flex-1 px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors font-medium"}," Delete ")])])])):is("",!0)}});function KO(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var g2={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */var Uat=g2.exports,UL;function Vat(){return UL||(UL=1,function(d,l){(function(z,j){j(l)})(Uat,function(z){var j="1.9.4";function J(ct){var Bt,me,Qe,zr;for(me=1,Qe=arguments.length;me"u"||!L||!L.Mixin)){ct=wn(ct)?ct:[ct];for(var Bt=0;Bt0?Math.floor(ct):Math.ceil(ct)};Va.prototype={clone:function(){return new Va(this.x,this.y)},add:function(ct){return this.clone()._add(xo(ct))},_add:function(ct){return this.x+=ct.x,this.y+=ct.y,this},subtract:function(ct){return this.clone()._subtract(xo(ct))},_subtract:function(ct){return this.x-=ct.x,this.y-=ct.y,this},divideBy:function(ct){return this.clone()._divideBy(ct)},_divideBy:function(ct){return this.x/=ct,this.y/=ct,this},multiplyBy:function(ct){return this.clone()._multiplyBy(ct)},_multiplyBy:function(ct){return this.x*=ct,this.y*=ct,this},scaleBy:function(ct){return new Va(this.x*ct.x,this.y*ct.y)},unscaleBy:function(ct){return new Va(this.x/ct.x,this.y/ct.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=us(this.x),this.y=us(this.y),this},distanceTo:function(ct){ct=xo(ct);var Bt=ct.x-this.x,me=ct.y-this.y;return Math.sqrt(Bt*Bt+me*me)},equals:function(ct){return ct=xo(ct),ct.x===this.x&&ct.y===this.y},contains:function(ct){return ct=xo(ct),Math.abs(ct.x)<=Math.abs(this.x)&&Math.abs(ct.y)<=Math.abs(this.y)},toString:function(){return"Point("+ir(this.x)+", "+ir(this.y)+")"}};function xo(ct,Bt,me){return ct instanceof Va?ct:wn(ct)?new Va(ct[0],ct[1]):ct==null?ct:typeof ct=="object"&&"x"in ct&&"y"in ct?new Va(ct.x,ct.y):new Va(ct,Bt,me)}function Mo(ct,Bt){if(ct)for(var me=Bt?[ct,Bt]:ct,Qe=0,zr=me.length;Qe=this.min.x&&me.x<=this.max.x&&Bt.y>=this.min.y&&me.y<=this.max.y},intersects:function(ct){ct=co(ct);var Bt=this.min,me=this.max,Qe=ct.min,zr=ct.max,kn=zr.x>=Bt.x&&Qe.x<=me.x,ji=zr.y>=Bt.y&&Qe.y<=me.y;return kn&&ji},overlaps:function(ct){ct=co(ct);var Bt=this.min,me=this.max,Qe=ct.min,zr=ct.max,kn=zr.x>Bt.x&&Qe.xBt.y&&Qe.y=Bt.lat&&zr.lat<=me.lat&&Qe.lng>=Bt.lng&&zr.lng<=me.lng},intersects:function(ct){ct=To(ct);var Bt=this._southWest,me=this._northEast,Qe=ct.getSouthWest(),zr=ct.getNorthEast(),kn=zr.lat>=Bt.lat&&Qe.lat<=me.lat,ji=zr.lng>=Bt.lng&&Qe.lng<=me.lng;return kn&&ji},overlaps:function(ct){ct=To(ct);var Bt=this._southWest,me=this._northEast,Qe=ct.getSouthWest(),zr=ct.getNorthEast(),kn=zr.lat>Bt.lat&&Qe.latBt.lng&&Qe.lng1,e6=function(){var ct=!1;try{var Bt=Object.defineProperty({},"passive",{get:function(){ct=!0}});window.addEventListener("testPassiveEventSupport",Be,Bt),window.removeEventListener("testPassiveEventSupport",Be,Bt)}catch{}return ct}(),r6=function(){return!!document.createElement("canvas").getContext}(),S_=!!(document.createElementNS&&ao("svg").createSVGRect),n6=!!S_&&function(){var ct=document.createElement("div");return ct.innerHTML="",(ct.firstChild&&ct.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),i6=!S_&&function(){try{var ct=document.createElement("div");ct.innerHTML='';var Bt=ct.firstChild;return Bt.style.behavior="url(#default#VML)",Bt&&typeof Bt.adj=="object"}catch{return!1}}(),fw=navigator.platform.indexOf("Mac")===0,E_=navigator.platform.indexOf("Linux")===0;function a0(ct){return navigator.userAgent.toLowerCase().indexOf(ct)>=0}var Ll={ie:gs,ielt9:jo,edge:es,webkit:Uo,android:El,android23:Is,androidStock:Zl,opera:Du,chrome:kc,gecko:ic,safari:vf,phantom:Bf,opera12:Fp,win:Yf,ie3d:g0,webkit3d:Rp,gecko3d:fd,any3d:Sd,mobile:mm,mobileWebkit:y1,mobileWebkit3d:A_,msPointer:x1,pointer:Oy,touch:M_,touchNative:Dy,mobileOpera:J4,mobileGecko:Q4,retina:t6,passiveEvents:e6,canvas:r6,svg:S_,vml:i6,inlineSvg:n6,mac:fw,linux:E_},Yc=Ll.msPointer?"MSPointerDown":"pointerdown",Ed=Ll.msPointer?"MSPointerMove":"pointermove",C_=Ll.msPointer?"MSPointerUp":"pointerup",$u=Ll.msPointer?"MSPointerCancel":"pointercancel",_1={touchstart:Yc,touchmove:Ed,touchend:C_,touchcancel:$u},dw={touchstart:s6,touchmove:X0,touchend:X0,touchcancel:X0},cv={},Fy=!1;function b1(ct,Bt,me){return Bt==="touchstart"&&L_(),dw[Bt]?(me=dw[Bt].bind(this,me),ct.addEventListener(_1[Bt],me,!1),me):(console.warn("wrong event specified:",Bt),Be)}function a6(ct,Bt,me){if(!_1[Bt]){console.warn("wrong event specified:",Bt);return}ct.removeEventListener(_1[Bt],me,!1)}function Qo(ct){cv[ct.pointerId]=ct}function o6(ct){cv[ct.pointerId]&&(cv[ct.pointerId]=ct)}function w1(ct){delete cv[ct.pointerId]}function L_(){Fy||(document.addEventListener(Yc,Qo,!0),document.addEventListener(Ed,o6,!0),document.addEventListener(C_,w1,!0),document.addEventListener($u,w1,!0),Fy=!0)}function X0(ct,Bt){if(Bt.pointerType!==(Bt.MSPOINTER_TYPE_MOUSE||"mouse")){Bt.touches=[];for(var me in cv)Bt.touches.push(cv[me]);Bt.changedTouches=[Bt],ct(Bt)}}function s6(ct,Bt){Bt.MSPOINTER_TYPE_TOUCH&&Bt.pointerType===Bt.MSPOINTER_TYPE_TOUCH&&gc(Bt),X0(ct,Bt)}function l6(ct){var Bt={},me,Qe;for(Qe in ct)me=ct[Qe],Bt[Qe]=me&&me.bind?me.bind(ct):me;return ct=Bt,Bt.type="dblclick",Bt.detail=2,Bt.isTrusted=!1,Bt._simulated=!0,Bt}var u6=200;function c6(ct,Bt){ct.addEventListener("dblclick",Bt);var me=0,Qe;function zr(kn){if(kn.detail!==1){Qe=kn.detail;return}if(!(kn.pointerType==="mouse"||kn.sourceCapabilities&&!kn.sourceCapabilities.firesTouchEvents)){var ji=vw(kn);if(!(ji.some(function(Ya){return Ya instanceof HTMLLabelElement&&Ya.attributes.for})&&!ji.some(function(Ya){return Ya instanceof HTMLInputElement||Ya instanceof HTMLSelectElement}))){var Ba=Date.now();Ba-me<=u6?(Qe++,Qe===2&&Bt(l6(kn))):Qe=1,me=Ba}}}return ct.addEventListener("click",zr),{dblclick:Bt,simDblclick:zr}}function P_(ct,Bt){ct.removeEventListener("dblclick",Bt.dblclick),ct.removeEventListener("click",Bt.simDblclick)}var z_=Rm(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),k1=Rm(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),pw=k1==="webkitTransition"||k1==="OTransition"?k1+"End":"transitionend";function mw(ct){return typeof ct=="string"?document.getElementById(ct):ct}function T1(ct,Bt){var me=ct.style[Bt]||ct.currentStyle&&ct.currentStyle[Bt];if((!me||me==="auto")&&document.defaultView){var Qe=document.defaultView.getComputedStyle(ct,null);me=Qe?Qe[Bt]:null}return me==="auto"?null:me}function Lc(ct,Bt,me){var Qe=document.createElement(ct);return Qe.className=Bt||"",me&&me.appendChild(Qe),Qe}function Mf(ct){var Bt=ct.parentNode;Bt&&Bt.removeChild(ct)}function Ry(ct){for(;ct.firstChild;)ct.removeChild(ct.firstChild)}function hv(ct){var Bt=ct.parentNode;Bt&&Bt.lastChild!==ct&&Bt.appendChild(ct)}function _n(ct){var Bt=ct.parentNode;Bt&&Bt.firstChild!==ct&&Bt.insertBefore(ct,Bt.firstChild)}function I_(ct,Bt){if(ct.classList!==void 0)return ct.classList.contains(Bt);var me=Fm(ct);return me.length>0&&new RegExp("(^|\\s)"+Bt+"(\\s|$)").test(me)}function Wu(ct,Bt){if(ct.classList!==void 0)for(var me=Ir(Bt),Qe=0,zr=me.length;Qe0?2*window.devicePixelRatio:1;function Mc(ct){return Ll.edge?ct.wheelDeltaY/2:ct.deltaY&&ct.deltaMode===0?-ct.deltaY/Xc:ct.deltaY&&ct.deltaMode===1?-ct.deltaY*20:ct.deltaY&&ct.deltaMode===2?-ct.deltaY*60:ct.deltaX||ct.deltaZ?0:ct.wheelDelta?(ct.wheelDeltaY||ct.wheelDelta)/2:ct.detail&&Math.abs(ct.detail)<32765?-ct.detail*20:ct.detail?ct.detail/-32765*60:0}function bg(ct,Bt){var me=Bt.relatedTarget;if(!me)return!0;try{for(;me&&me!==ct;)me=me.parentNode}catch{return!1}return me!==ct}var Np={__proto__:null,on:Pu,off:Nh,stopPropagation:o0,disableScrollPropagation:gm,disableClickPropagation:fv,preventDefault:gc,stop:_g,getPropagationPath:vw,getMousePosition:ep,getWheelDelta:Mc,isExternalTarget:bg,addListener:Pu,removeListener:Nh},S1=Ei.extend({run:function(ct,Bt,me,Qe){this.stop(),this._el=ct,this._inProgress=!0,this._duration=me||.25,this._easeOutPower=1/Math.max(Qe||.5,.2),this._startPos=Rc(ct),this._offset=Bt.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Sa(this._animate,this),this._step()},_step:function(ct){var Bt=+new Date-this._startTime,me=this._duration*1e3;Btthis.options.maxZoom)?this.setZoom(ct):this},panInsideBounds:function(ct,Bt){this._enforcingBounds=!0;var me=this.getCenter(),Qe=this._limitCenter(me,this._zoom,To(ct));return me.equals(Qe)||this.panTo(Qe,Bt),this._enforcingBounds=!1,this},panInside:function(ct,Bt){Bt=Bt||{};var me=xo(Bt.paddingTopLeft||Bt.padding||[0,0]),Qe=xo(Bt.paddingBottomRight||Bt.padding||[0,0]),zr=this.project(this.getCenter()),kn=this.project(ct),ji=this.getPixelBounds(),Ba=co([ji.min.add(me),ji.max.subtract(Qe)]),Ya=Ba.getSize();if(!Ba.contains(kn)){this._enforcingBounds=!0;var yo=kn.subtract(Ba.getCenter()),Ws=Ba.extend(kn).getSize().subtract(Ya);zr.x+=yo.x<0?-Ws.x:Ws.x,zr.y+=yo.y<0?-Ws.y:Ws.y,this.panTo(this.unproject(zr),Bt),this._enforcingBounds=!1}return this},invalidateSize:function(ct){if(!this._loaded)return this;ct=J({animate:!1,pan:!0},ct===!0?{animate:!0}:ct);var Bt=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var me=this.getSize(),Qe=Bt.divideBy(2).round(),zr=me.divideBy(2).round(),kn=Qe.subtract(zr);return!kn.x&&!kn.y?this:(ct.animate&&ct.pan?this.panBy(kn):(ct.pan&&this._rawPanBy(kn),this.fire("move"),ct.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(kt(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:Bt,newSize:me}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(ct){if(ct=this._locateOptions=J({timeout:1e4,watch:!1},ct),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var Bt=kt(this._handleGeolocationResponse,this),me=kt(this._handleGeolocationError,this);return ct.watch?this._locationWatchId=navigator.geolocation.watchPosition(Bt,me,ct):navigator.geolocation.getCurrentPosition(Bt,me,ct),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(ct){if(this._container._leaflet_id){var Bt=ct.code,me=ct.message||(Bt===1?"permission denied":Bt===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:Bt,message:"Geolocation error: "+me+"."})}},_handleGeolocationResponse:function(ct){if(this._container._leaflet_id){var Bt=ct.coords.latitude,me=ct.coords.longitude,Qe=new eo(Bt,me),zr=Qe.toBounds(ct.coords.accuracy*2),kn=this._locateOptions;if(kn.setView){var ji=this.getBoundsZoom(zr);this.setView(Qe,kn.maxZoom?Math.min(ji,kn.maxZoom):ji)}var Ba={latlng:Qe,bounds:zr,timestamp:ct.timestamp};for(var Ya in ct.coords)typeof ct.coords[Ya]=="number"&&(Ba[Ya]=ct.coords[Ya]);this.fire("locationfound",Ba)}},addHandler:function(ct,Bt){if(!Bt)return this;var me=this[ct]=new Bt(this);return this._handlers.push(me),this.options[ct]&&me.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Mf(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Ni(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var ct;for(ct in this._layers)this._layers[ct].remove();for(ct in this._panes)Mf(this._panes[ct]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(ct,Bt){var me="leaflet-pane"+(ct?" leaflet-"+ct.replace("Pane","")+"-pane":""),Qe=Lc("div",me,Bt||this._mapPane);return ct&&(this._panes[ct]=Qe),Qe},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var ct=this.getPixelBounds(),Bt=this.unproject(ct.getBottomLeft()),me=this.unproject(ct.getTopRight());return new Go(Bt,me)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(ct,Bt,me){ct=To(ct),me=xo(me||[0,0]);var Qe=this.getZoom()||0,zr=this.getMinZoom(),kn=this.getMaxZoom(),ji=ct.getNorthWest(),Ba=ct.getSouthEast(),Ya=this.getSize().subtract(me),yo=co(this.project(Ba,Qe),this.project(ji,Qe)).getSize(),Ws=Ll.any3d?this.options.zoomSnap:1,_l=Ya.x/yo.x,Fu=Ya.y/yo.y,Pd=Bt?Math.max(_l,Fu):Math.min(_l,Fu);return Qe=this.getScaleZoom(Pd,Qe),Ws&&(Qe=Math.round(Qe/(Ws/100))*(Ws/100),Qe=Bt?Math.ceil(Qe/Ws)*Ws:Math.floor(Qe/Ws)*Ws),Math.max(zr,Math.min(kn,Qe))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Va(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(ct,Bt){var me=this._getTopLeftPoint(ct,Bt);return new Mo(me,me.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(ct){return this.options.crs.getProjectedBounds(ct===void 0?this.getZoom():ct)},getPane:function(ct){return typeof ct=="string"?this._panes[ct]:ct},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(ct,Bt){var me=this.options.crs;return Bt=Bt===void 0?this._zoom:Bt,me.scale(ct)/me.scale(Bt)},getScaleZoom:function(ct,Bt){var me=this.options.crs;Bt=Bt===void 0?this._zoom:Bt;var Qe=me.zoom(ct*me.scale(Bt));return isNaN(Qe)?1/0:Qe},project:function(ct,Bt){return Bt=Bt===void 0?this._zoom:Bt,this.options.crs.latLngToPoint(ya(ct),Bt)},unproject:function(ct,Bt){return Bt=Bt===void 0?this._zoom:Bt,this.options.crs.pointToLatLng(xo(ct),Bt)},layerPointToLatLng:function(ct){var Bt=xo(ct).add(this.getPixelOrigin());return this.unproject(Bt)},latLngToLayerPoint:function(ct){var Bt=this.project(ya(ct))._round();return Bt._subtract(this.getPixelOrigin())},wrapLatLng:function(ct){return this.options.crs.wrapLatLng(ya(ct))},wrapLatLngBounds:function(ct){return this.options.crs.wrapLatLngBounds(To(ct))},distance:function(ct,Bt){return this.options.crs.distance(ya(ct),ya(Bt))},containerPointToLayerPoint:function(ct){return xo(ct).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(ct){return xo(ct).add(this._getMapPanePos())},containerPointToLatLng:function(ct){var Bt=this.containerPointToLayerPoint(xo(ct));return this.layerPointToLatLng(Bt)},latLngToContainerPoint:function(ct){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ya(ct)))},mouseEventToContainerPoint:function(ct){return ep(ct,this._container)},mouseEventToLayerPoint:function(ct){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(ct))},mouseEventToLatLng:function(ct){return this.layerPointToLatLng(this.mouseEventToLayerPoint(ct))},_initContainer:function(ct){var Bt=this._container=mw(ct);if(Bt){if(Bt._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Pu(Bt,"scroll",this._onScroll,this),this._containerId=$t(Bt)},_initLayout:function(){var ct=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ll.any3d,Wu(ct,"leaflet-container"+(Ll.touch?" leaflet-touch":"")+(Ll.retina?" leaflet-retina":"")+(Ll.ielt9?" leaflet-oldie":"")+(Ll.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var Bt=T1(ct,"position");Bt!=="absolute"&&Bt!=="relative"&&Bt!=="fixed"&&Bt!=="sticky"&&(ct.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var ct=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ac(this._mapPane,new Va(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Wu(ct.markerPane,"leaflet-zoom-hide"),Wu(ct.shadowPane,"leaflet-zoom-hide"))},_resetView:function(ct,Bt,me){ac(this._mapPane,new Va(0,0));var Qe=!this._loaded;this._loaded=!0,Bt=this._limitZoom(Bt),this.fire("viewprereset");var zr=this._zoom!==Bt;this._moveStart(zr,me)._move(ct,Bt)._moveEnd(zr),this.fire("viewreset"),Qe&&this.fire("load")},_moveStart:function(ct,Bt){return ct&&this.fire("zoomstart"),Bt||this.fire("movestart"),this},_move:function(ct,Bt,me,Qe){Bt===void 0&&(Bt=this._zoom);var zr=this._zoom!==Bt;return this._zoom=Bt,this._lastCenter=ct,this._pixelOrigin=this._getNewPixelOrigin(ct),Qe?me&&me.pinch&&this.fire("zoom",me):((zr||me&&me.pinch)&&this.fire("zoom",me),this.fire("move",me)),this},_moveEnd:function(ct){return ct&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Ni(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(ct){ac(this._mapPane,this._getMapPanePos().subtract(ct))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(ct){this._targets={},this._targets[$t(this._container)]=this;var Bt=ct?Nh:Pu;Bt(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&Bt(window,"resize",this._onResize,this),Ll.any3d&&this.options.transform3DLimit&&(ct?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Ni(this._resizeRequest),this._resizeRequest=Sa(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var ct=this._getMapPanePos();Math.max(Math.abs(ct.x),Math.abs(ct.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(ct,Bt){for(var me=[],Qe,zr=Bt==="mouseout"||Bt==="mouseover",kn=ct.target||ct.srcElement,ji=!1;kn;){if(Qe=this._targets[$t(kn)],Qe&&(Bt==="click"||Bt==="preclick")&&this._draggableMoved(Qe)){ji=!0;break}if(Qe&&Qe.listens(Bt,!0)&&(zr&&!bg(kn,ct)||(me.push(Qe),zr))||kn===this._container)break;kn=kn.parentNode}return!me.length&&!ji&&!zr&&this.listens(Bt,!0)&&(me=[this]),me},_isClickDisabled:function(ct){for(;ct&&ct!==this._container;){if(ct._leaflet_disable_click)return!0;ct=ct.parentNode}},_handleDOMEvent:function(ct){var Bt=ct.target||ct.srcElement;if(!(!this._loaded||Bt._leaflet_disable_events||ct.type==="click"&&this._isClickDisabled(Bt))){var me=ct.type;me==="mousedown"&&Zd(Bt),this._fireDOMEvent(ct,me)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(ct,Bt,me){if(ct.type==="click"){var Qe=J({},ct);Qe.type="preclick",this._fireDOMEvent(Qe,Qe.type,me)}var zr=this._findEventTargets(ct,Bt);if(me){for(var kn=[],ji=0;ji0?Math.round(ct-Bt)/2:Math.max(0,Math.ceil(ct))-Math.max(0,Math.floor(Bt))},_limitZoom:function(ct){var Bt=this.getMinZoom(),me=this.getMaxZoom(),Qe=Ll.any3d?this.options.zoomSnap:1;return Qe&&(ct=Math.round(ct/Qe)*Qe),Math.max(Bt,Math.min(me,ct))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Nf(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(ct,Bt){var me=this._getCenterOffset(ct)._trunc();return(Bt&&Bt.animate)!==!0&&!this.getSize().contains(me)?!1:(this.panBy(me,Bt),!0)},_createAnimProxy:function(){var ct=this._proxy=Lc("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(ct),this.on("zoomanim",function(Bt){var me=z_,Qe=this._proxy.style[me];mu(this._proxy,this.project(Bt.center,Bt.zoom),this.getZoomScale(Bt.zoom,1)),Qe===this._proxy.style[me]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Mf(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var ct=this.getCenter(),Bt=this.getZoom();mu(this._proxy,this.project(ct,Bt),this.getZoomScale(Bt,1))},_catchTransitionEnd:function(ct){this._animatingZoom&&ct.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(ct,Bt,me){if(this._animatingZoom)return!0;if(me=me||{},!this._zoomAnimated||me.animate===!1||this._nothingToAnimate()||Math.abs(Bt-this._zoom)>this.options.zoomAnimationThreshold)return!1;var Qe=this.getZoomScale(Bt),zr=this._getCenterOffset(ct)._divideBy(1-1/Qe);return me.animate!==!0&&!this.getSize().contains(zr)?!1:(Sa(function(){this._moveStart(!0,me.noMoveStart||!1)._animateZoom(ct,Bt,!0)},this),!0)},_animateZoom:function(ct,Bt,me,Qe){this._mapPane&&(me&&(this._animatingZoom=!0,this._animateToCenter=ct,this._animateToZoom=Bt,Wu(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:ct,zoom:Bt,noUpdate:Qe}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(kt(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Nf(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Vs(ct,Bt){return new Sc(ct,Bt)}var cp=ia.extend({options:{position:"topright"},initialize:function(ct){Pr(this,ct)},getPosition:function(){return this.options.position},setPosition:function(ct){var Bt=this._map;return Bt&&Bt.removeControl(this),this.options.position=ct,Bt&&Bt.addControl(this),this},getContainer:function(){return this._container},addTo:function(ct){this.remove(),this._map=ct;var Bt=this._container=this.onAdd(ct),me=this.getPosition(),Qe=ct._controlCorners[me];return Wu(Bt,"leaflet-control"),me.indexOf("bottom")!==-1?Qe.insertBefore(Bt,Qe.firstChild):Qe.appendChild(Bt),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Mf(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(ct){this._map&&ct&&ct.screenX>0&&ct.screenY>0&&this._map.getContainer().focus()}}),s0=function(ct){return new cp(ct)};Sc.include({addControl:function(ct){return ct.addTo(this),this},removeControl:function(ct){return ct.remove(),this},_initControlPos:function(){var ct=this._controlCorners={},Bt="leaflet-",me=this._controlContainer=Lc("div",Bt+"control-container",this._container);function Qe(zr,kn){var ji=Bt+zr+" "+Bt+kn;ct[zr+kn]=Lc("div",ji,me)}Qe("top","left"),Qe("top","right"),Qe("bottom","left"),Qe("bottom","right")},_clearControlPos:function(){for(var ct in this._controlCorners)Mf(this._controlCorners[ct]);Mf(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var dv=cp.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(ct,Bt,me,Qe){return me1,this._baseLayersList.style.display=ct?"":"none"),this._separator.style.display=Bt&&ct?"":"none",this},_onLayerChange:function(ct){this._handlingClick||this._update();var Bt=this._getLayer($t(ct.target)),me=Bt.overlay?ct.type==="add"?"overlayadd":"overlayremove":ct.type==="add"?"baselayerchange":null;me&&this._map.fire(me,Bt)},_createRadioElement:function(ct,Bt){var me='",Qe=document.createElement("div");return Qe.innerHTML=me,Qe.firstChild},_addItem:function(ct){var Bt=document.createElement("label"),me=this._map.hasLayer(ct.layer),Qe;ct.overlay?(Qe=document.createElement("input"),Qe.type="checkbox",Qe.className="leaflet-control-layers-selector",Qe.defaultChecked=me):Qe=this._createRadioElement("leaflet-base-layers_"+$t(this),me),this._layerControlInputs.push(Qe),Qe.layerId=$t(ct.layer),Pu(Qe,"click",this._onInputClick,this);var zr=document.createElement("span");zr.innerHTML=" "+ct.name;var kn=document.createElement("span");Bt.appendChild(kn),kn.appendChild(Qe),kn.appendChild(zr);var ji=ct.overlay?this._overlaysList:this._baseLayersList;return ji.appendChild(Bt),this._checkDisabledLayers(),Bt},_onInputClick:function(){if(!this._preventClick){var ct=this._layerControlInputs,Bt,me,Qe=[],zr=[];this._handlingClick=!0;for(var kn=ct.length-1;kn>=0;kn--)Bt=ct[kn],me=this._getLayer(Bt.layerId).layer,Bt.checked?Qe.push(me):Bt.checked||zr.push(me);for(kn=0;kn=0;zr--)Bt=ct[zr],me=this._getLayer(Bt.layerId).layer,Bt.disabled=me.options.minZoom!==void 0&&Qeme.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var ct=this._section;this._preventClick=!0,Pu(ct,"click",gc),this.expand();var Bt=this;setTimeout(function(){Nh(ct,"click",gc),Bt._preventClick=!1})}}),J0=function(ct,Bt,me){return new dv(ct,Bt,me)},Ls=cp.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(ct){var Bt="leaflet-control-zoom",me=Lc("div",Bt+" leaflet-bar"),Qe=this.options;return this._zoomInButton=this._createButton(Qe.zoomInText,Qe.zoomInTitle,Bt+"-in",me,this._zoomIn),this._zoomOutButton=this._createButton(Qe.zoomOutText,Qe.zoomOutTitle,Bt+"-out",me,this._zoomOut),this._updateDisabled(),ct.on("zoomend zoomlevelschange",this._updateDisabled,this),me},onRemove:function(ct){ct.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(ct){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(ct.shiftKey?3:1))},_createButton:function(ct,Bt,me,Qe,zr){var kn=Lc("a",me,Qe);return kn.innerHTML=ct,kn.href="#",kn.title=Bt,kn.setAttribute("role","button"),kn.setAttribute("aria-label",Bt),fv(kn),Pu(kn,"click",_g),Pu(kn,"click",zr,this),Pu(kn,"click",this._refocusOnMap,this),kn},_updateDisabled:function(){var ct=this._map,Bt="leaflet-disabled";Nf(this._zoomInButton,Bt),Nf(this._zoomOutButton,Bt),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||ct._zoom===ct.getMinZoom())&&(Wu(this._zoomOutButton,Bt),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||ct._zoom===ct.getMaxZoom())&&(Wu(this._zoomInButton,Bt),this._zoomInButton.setAttribute("aria-disabled","true"))}});Sc.mergeOptions({zoomControl:!0}),Sc.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ls,this.addControl(this.zoomControl))});var yw=function(ct){return new Ls(ct)},O_=cp.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(ct){var Bt="leaflet-control-scale",me=Lc("div",Bt),Qe=this.options;return this._addScales(Qe,Bt+"-line",me),ct.on(Qe.updateWhenIdle?"moveend":"move",this._update,this),ct.whenReady(this._update,this),me},onRemove:function(ct){ct.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(ct,Bt,me){ct.metric&&(this._mScale=Lc("div",Bt,me)),ct.imperial&&(this._iScale=Lc("div",Bt,me))},_update:function(){var ct=this._map,Bt=ct.getSize().y/2,me=ct.distance(ct.containerPointToLatLng([0,Bt]),ct.containerPointToLatLng([this.options.maxWidth,Bt]));this._updateScales(me)},_updateScales:function(ct){this.options.metric&&ct&&this._updateMetric(ct),this.options.imperial&&ct&&this._updateImperial(ct)},_updateMetric:function(ct){var Bt=this._getRoundNum(ct),me=Bt<1e3?Bt+" m":Bt/1e3+" km";this._updateScale(this._mScale,me,Bt/ct)},_updateImperial:function(ct){var Bt=ct*3.2808399,me,Qe,zr;Bt>5280?(me=Bt/5280,Qe=this._getRoundNum(me),this._updateScale(this._iScale,Qe+" mi",Qe/me)):(zr=this._getRoundNum(Bt),this._updateScale(this._iScale,zr+" ft",zr/Bt))},_updateScale:function(ct,Bt,me){ct.style.width=Math.round(this.options.maxWidth*me)+"px",ct.innerHTML=Bt},_getRoundNum:function(ct){var Bt=Math.pow(10,(Math.floor(ct)+"").length-1),me=ct/Bt;return me=me>=10?10:me>=5?5:me>=3?3:me>=2?2:1,Bt*me}}),h6=function(ct){return new O_(ct)},D_='',F_=cp.extend({options:{position:"bottomright",prefix:''+(Ll.inlineSvg?D_+" ":"")+"Leaflet"},initialize:function(ct){Pr(this,ct),this._attributions={}},onAdd:function(ct){ct.attributionControl=this,this._container=Lc("div","leaflet-control-attribution"),fv(this._container);for(var Bt in ct._layers)ct._layers[Bt].getAttribution&&this.addAttribution(ct._layers[Bt].getAttribution());return this._update(),ct.on("layeradd",this._addAttribution,this),this._container},onRemove:function(ct){ct.off("layeradd",this._addAttribution,this)},_addAttribution:function(ct){ct.layer.getAttribution&&(this.addAttribution(ct.layer.getAttribution()),ct.layer.once("remove",function(){this.removeAttribution(ct.layer.getAttribution())},this))},setPrefix:function(ct){return this.options.prefix=ct,this._update(),this},addAttribution:function(ct){return ct?(this._attributions[ct]||(this._attributions[ct]=0),this._attributions[ct]++,this._update(),this):this},removeAttribution:function(ct){return ct?(this._attributions[ct]&&(this._attributions[ct]--,this._update()),this):this},_update:function(){if(this._map){var ct=[];for(var Bt in this._attributions)this._attributions[Bt]&&ct.push(Bt);var me=[];this.options.prefix&&me.push(this.options.prefix),ct.length&&me.push(ct.join(", ")),this._container.innerHTML=me.join(' ')}}});Sc.mergeOptions({attributionControl:!0}),Sc.addInitHook(function(){this.options.attributionControl&&new F_().addTo(this)});var f6=function(ct){return new F_(ct)};cp.Layers=dv,cp.Zoom=Ls,cp.Scale=O_,cp.Attribution=F_,s0.layers=J0,s0.zoom=yw,s0.scale=h6,s0.attribution=f6;var Q0=ia.extend({initialize:function(ct){this._map=ct},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Q0.addTo=function(ct,Bt){return ct.addHandler(Bt,this),this};var hp={Events:qi},O0=Ll.touch?"touchstart mousedown":"mousedown",Bm=Ei.extend({options:{clickTolerance:3},initialize:function(ct,Bt,me,Qe){Pr(this,Qe),this._element=ct,this._dragStartTarget=Bt||ct,this._preventOutline=me},enable:function(){this._enabled||(Pu(this._dragStartTarget,O0,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Bm._dragging===this&&this.finishDrag(!0),Nh(this._dragStartTarget,O0,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(ct){if(this._enabled&&(this._moved=!1,!I_(this._element,"leaflet-zoom-anim"))){if(ct.touches&&ct.touches.length!==1){Bm._dragging===this&&this.finishDrag();return}if(!(Bm._dragging||ct.shiftKey||ct.which!==1&&ct.button!==1&&!ct.touches)&&(Bm._dragging=this,this._preventOutline&&Zd(this._element),Kc(),z0(),!this._moving)){this.fire("down");var Bt=ct.touches?ct.touches[0]:ct,me=Cd(this._element);this._startPoint=new Va(Bt.clientX,Bt.clientY),this._startPos=Rc(this._element),this._parentScale=M1(me);var Qe=ct.type==="mousedown";Pu(document,Qe?"mousemove":"touchmove",this._onMove,this),Pu(document,Qe?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(ct){if(this._enabled){if(ct.touches&&ct.touches.length>1){this._moved=!0;return}var Bt=ct.touches&&ct.touches.length===1?ct.touches[0]:ct,me=new Va(Bt.clientX,Bt.clientY)._subtract(this._startPoint);!me.x&&!me.y||Math.abs(me.x)+Math.abs(me.y)kn&&(ji=Ba,kn=Ya);kn>me&&(Bt[ji]=1,kg(ct,Bt,me,Qe,ji),kg(ct,Bt,me,ji,zr))}function _w(ct,Bt){for(var me=[ct[0]],Qe=1,zr=0,kn=ct.length;QeBt&&(me.push(ct[Qe]),zr=Qe);return zrBt.max.x&&(me|=2),ct.yBt.max.y&&(me|=8),me}function m6(ct,Bt){var me=Bt.x-ct.x,Qe=Bt.y-ct.y;return me*me+Qe*Qe}function pv(ct,Bt,me,Qe){var zr=Bt.x,kn=Bt.y,ji=me.x-zr,Ba=me.y-kn,Ya=ji*ji+Ba*Ba,yo;return Ya>0&&(yo=((ct.x-zr)*ji+(ct.y-kn)*Ba)/Ya,yo>1?(zr=me.x,kn=me.y):yo>0&&(zr+=ji*yo,kn+=Ba*yo)),ji=ct.x-zr,Ba=ct.y-kn,Qe?ji*ji+Ba*Ba:new Va(zr,kn)}function y0(ct){return!wn(ct[0])||typeof ct[0][0]!="object"&&typeof ct[0][0]<"u"}function bw(ct){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),y0(ct)}function ww(ct,Bt){var me,Qe,zr,kn,ji,Ba,Ya,yo;if(!ct||ct.length===0)throw new Error("latlngs not passed");y0(ct)||(console.warn("latlngs are not flat! Only the first ring will be used"),ct=ct[0]);var Ws=ya([0,0]),_l=To(ct),Fu=_l.getNorthWest().distanceTo(_l.getSouthWest())*_l.getNorthEast().distanceTo(_l.getNorthWest());Fu<1700&&(Ws=jy(ct));var Pd=ct.length,jf=[];for(me=0;meQe){Ya=(kn-Qe)/zr,yo=[Ba.x-Ya*(Ba.x-ji.x),Ba.y-Ya*(Ba.y-ji.y)];break}var Tp=Bt.unproject(xo(yo));return ya([Tp.lat+Ws.lat,Tp.lng+Ws.lng])}var Qh={__proto__:null,simplify:B_,pointToSegmentDistance:xw,closestPointOnSegment:wg,clipSegment:j_,_getEdgeIntersection:Tg,_getBitCode:Ag,_sqClosestPointOnSegment:pv,isFlat:y0,_flat:bw,polylineCenter:ww},x0={project:function(ct){return new Va(ct.lng,ct.lat)},unproject:function(ct){return new eo(ct.y,ct.x)},bounds:new Mo([-180,-90],[180,90])},mv={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Mo([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(ct){var Bt=Math.PI/180,me=this.R,Qe=ct.lat*Bt,zr=this.R_MINOR/me,kn=Math.sqrt(1-zr*zr),ji=kn*Math.sin(Qe),Ba=Math.tan(Math.PI/4-Qe/2)/Math.pow((1-ji)/(1+ji),kn/2);return Qe=-me*Math.log(Math.max(Ba,1e-10)),new Va(ct.lng*Bt*me,Qe)},unproject:function(ct){for(var Bt=180/Math.PI,me=this.R,Qe=this.R_MINOR/me,zr=Math.sqrt(1-Qe*Qe),kn=Math.exp(-ct.y/me),ji=Math.PI/2-2*Math.atan(kn),Ba=0,Ya=.1,yo;Ba<15&&Math.abs(Ya)>1e-7;Ba++)yo=zr*Math.sin(ji),yo=Math.pow((1-yo)/(1+yo),zr/2),Ya=Math.PI/2-2*Math.atan(kn*yo)-ji,ji+=Ya;return new eo(ji*Bt,ct.x*Bt/me)}},U_={__proto__:null,LonLat:x0,Mercator:mv,SphericalMercator:Ss},V_=J({},mo,{code:"EPSG:3395",projection:mv,transformation:function(){var ct=.5/(Math.PI*mv.R);return vi(ct,.5,-ct,.5)}()}),Uy=J({},mo,{code:"EPSG:4326",projection:x0,transformation:vi(1/180,1,-1/180,.5)}),Mg=J({},ka,{projection:x0,transformation:vi(1,0,-1,0),scale:function(ct){return Math.pow(2,ct)},zoom:function(ct){return Math.log(ct)/Math.LN2},distance:function(ct,Bt){var me=Bt.lng-ct.lng,Qe=Bt.lat-ct.lat;return Math.sqrt(me*me+Qe*Qe)},infinite:!0});ka.Earth=mo,ka.EPSG3395=V_,ka.EPSG3857=yi,ka.EPSG900913=ui,ka.EPSG4326=Uy,ka.Simple=Mg;var l0=Ei.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(ct){return ct.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(ct){return ct&&ct.removeLayer(this),this},getPane:function(ct){return this._map.getPane(ct?this.options[ct]||ct:this.options.pane)},addInteractiveTarget:function(ct){return this._map._targets[$t(ct)]=this,this},removeInteractiveTarget:function(ct){return delete this._map._targets[$t(ct)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(ct){var Bt=ct.target;if(Bt.hasLayer(this)){if(this._map=Bt,this._zoomAnimated=Bt._zoomAnimated,this.getEvents){var me=this.getEvents();Bt.on(me,this),this.once("remove",function(){Bt.off(me,this)},this)}this.onAdd(Bt),this.fire("add"),Bt.fire("layeradd",{layer:this})}}});Sc.include({addLayer:function(ct){if(!ct._layerAdd)throw new Error("The provided object is not a Layer.");var Bt=$t(ct);return this._layers[Bt]?this:(this._layers[Bt]=ct,ct._mapToAdd=this,ct.beforeAdd&&ct.beforeAdd(this),this.whenReady(ct._layerAdd,ct),this)},removeLayer:function(ct){var Bt=$t(ct);return this._layers[Bt]?(this._loaded&&ct.onRemove(this),delete this._layers[Bt],this._loaded&&(this.fire("layerremove",{layer:ct}),ct.fire("remove")),ct._map=ct._mapToAdd=null,this):this},hasLayer:function(ct){return $t(ct)in this._layers},eachLayer:function(ct,Bt){for(var me in this._layers)ct.call(Bt,this._layers[me]);return this},_addLayers:function(ct){ct=ct?wn(ct)?ct:[ct]:[];for(var Bt=0,me=ct.length;Btthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&Bt[0]instanceof eo&&Bt[0].equals(Bt[me-1])&&Bt.pop(),Bt},_setLatLngs:function(ct){_0.prototype._setLatLngs.call(this,ct),y0(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return y0(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var ct=this._renderer._bounds,Bt=this.options.weight,me=new Va(Bt,Bt);if(ct=new Mo(ct.min.subtract(me),ct.max.add(me)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(ct))){if(this.options.noClip){this._parts=this._rings;return}for(var Qe=0,zr=this._rings.length,kn;Qect.y!=zr.y>ct.y&&ct.x<(zr.x-Qe.x)*(ct.y-Qe.y)/(zr.y-Qe.y)+Qe.x&&(Bt=!Bt);return Bt||_0.prototype._containsPoint.call(this,ct,!0)}});function v6(ct,Bt){return new yv(ct,Bt)}var vm=kp.extend({initialize:function(ct,Bt){Pr(this,Bt),this._layers={},ct&&this.addData(ct)},addData:function(ct){var Bt=wn(ct)?ct:ct.features,me,Qe,zr;if(Bt){for(me=0,Qe=Bt.length;me0&&zr.push(zr[0].slice()),zr}function ym(ct,Bt){return ct.feature?J({},ct.feature,{geometry:Bt}):Gy(Bt)}function Gy(ct){return ct.type==="Feature"||ct.type==="FeatureCollection"?ct:{type:"Feature",properties:{},geometry:ct}}var $_={toGeoJSON:function(ct){return ym(this,{type:"Point",coordinates:Z_(this.getLatLng(),ct)})}};E1.include($_),Wy.include($_),Hy.include($_),_0.include({toGeoJSON:function(ct){var Bt=!y0(this._latlngs),me=$y(this._latlngs,Bt?1:0,!1,ct);return ym(this,{type:(Bt?"Multi":"")+"LineString",coordinates:me})}}),yv.include({toGeoJSON:function(ct){var Bt=!y0(this._latlngs),me=Bt&&!y0(this._latlngs[0]),Qe=$y(this._latlngs,me?2:Bt?1:0,!0,ct);return Bt||(Qe=[Qe]),ym(this,{type:(me?"Multi":"")+"Polygon",coordinates:Qe})}}),Sg.include({toMultiPoint:function(ct){var Bt=[];return this.eachLayer(function(me){Bt.push(me.toGeoJSON(ct).geometry.coordinates)}),ym(this,{type:"MultiPoint",coordinates:Bt})},toGeoJSON:function(ct){var Bt=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(Bt==="MultiPoint")return this.toMultiPoint(ct);var me=Bt==="GeometryCollection",Qe=[];return this.eachLayer(function(zr){if(zr.toGeoJSON){var kn=zr.toGeoJSON(ct);if(me)Qe.push(kn.geometry);else{var ji=Gy(kn);ji.type==="FeatureCollection"?Qe.push.apply(Qe,ji.features):Qe.push(ji)}}}),me?ym(this,{geometries:Qe,type:"GeometryCollection"}):{type:"FeatureCollection",features:Qe}}});function G_(ct,Bt){return new vm(ct,Bt)}var Yy=G_,xm=l0.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(ct,Bt,me){this._url=ct,this._bounds=To(Bt),Pr(this,me)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Wu(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Mf(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(ct){return this.options.opacity=ct,this._image&&this._updateOpacity(),this},setStyle:function(ct){return ct.opacity&&this.setOpacity(ct.opacity),this},bringToFront:function(){return this._map&&hv(this._image),this},bringToBack:function(){return this._map&&_n(this._image),this},setUrl:function(ct){return this._url=ct,this._image&&(this._image.src=ct),this},setBounds:function(ct){return this._bounds=To(ct),this._map&&this._reset(),this},getEvents:function(){var ct={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(ct.zoomanim=this._animateZoom),ct},setZIndex:function(ct){return this.options.zIndex=ct,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var ct=this._url.tagName==="IMG",Bt=this._image=ct?this._url:Lc("img");if(Wu(Bt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Bt,"leaflet-zoom-animated"),this.options.className&&Wu(Bt,this.options.className),Bt.onselectstart=Be,Bt.onmousemove=Be,Bt.onload=kt(this.fire,this,"load"),Bt.onerror=kt(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(Bt.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),ct){this._url=Bt.src;return}Bt.src=this._url,Bt.alt=this.options.alt},_animateZoom:function(ct){var Bt=this._map.getZoomScale(ct.zoom),me=this._map._latLngBoundsToNewLayerBounds(this._bounds,ct.zoom,ct.center).min;mu(this._image,me,Bt)},_reset:function(){var ct=this._image,Bt=new Mo(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),me=Bt.getSize();ac(ct,Bt.min),ct.style.width=me.x+"px",ct.style.height=me.y+"px"},_updateOpacity:function(){v0(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var ct=this.options.errorOverlayUrl;ct&&this._url!==ct&&(this._url=ct,this._image.src=ct)},getCenter:function(){return this._bounds.getCenter()}}),_m=function(ct,Bt,me){return new xm(ct,Bt,me)},D0=xm.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var ct=this._url.tagName==="VIDEO",Bt=this._image=ct?this._url:Lc("video");if(Wu(Bt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Bt,"leaflet-zoom-animated"),this.options.className&&Wu(Bt,this.options.className),Bt.onselectstart=Be,Bt.onmousemove=Be,Bt.onloadeddata=kt(this.fire,this,"load"),ct){for(var me=Bt.getElementsByTagName("source"),Qe=[],zr=0;zr0?Qe:[Bt.src];return}wn(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(Bt.style,"objectFit")&&(Bt.style.objectFit="fill"),Bt.autoplay=!!this.options.autoplay,Bt.loop=!!this.options.loop,Bt.muted=!!this.options.muted,Bt.playsInline=!!this.options.playsInline;for(var kn=0;knzr?(Bt.height=zr+"px",Wu(ct,kn)):Nf(ct,kn),this._containerWidth=this._container.offsetWidth},_animateZoom:function(ct){var Bt=this._map._latLngToNewLayerPoint(this._latlng,ct.zoom,ct.center),me=this._getAnchor();ac(this._container,Bt.add(me))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var ct=this._map,Bt=parseInt(T1(this._container,"marginBottom"),10)||0,me=this._container.offsetHeight+Bt,Qe=this._containerWidth,zr=new Va(this._containerLeft,-me-this._containerBottom);zr._add(Rc(this._container));var kn=ct.layerPointToContainerPoint(zr),ji=xo(this.options.autoPanPadding),Ba=xo(this.options.autoPanPaddingTopLeft||ji),Ya=xo(this.options.autoPanPaddingBottomRight||ji),yo=ct.getSize(),Ws=0,_l=0;kn.x+Qe+Ya.x>yo.x&&(Ws=kn.x+Qe-yo.x+Ya.x),kn.x-Ws-Ba.x<0&&(Ws=kn.x-Ba.x),kn.y+me+Ya.y>yo.y&&(_l=kn.y+me-yo.y+Ya.y),kn.y-_l-Ba.y<0&&(_l=kn.y-Ba.y),(Ws||_l)&&(this.options.keepInView&&(this._autopanning=!0),ct.fire("autopanstart").panBy([Ws,_l]))}},_getAnchor:function(){return xo(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),yf=function(ct,Bt){return new Eg(ct,Bt)};Sc.mergeOptions({closePopupOnClick:!0}),Sc.include({openPopup:function(ct,Bt,me){return this._initOverlay(Eg,ct,Bt,me).openOn(this),this},closePopup:function(ct){return ct=arguments.length?ct:this._popup,ct&&ct.close(),this}}),l0.include({bindPopup:function(ct,Bt){return this._popup=this._initOverlay(Eg,this._popup,ct,Bt),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(ct){return this._popup&&(this instanceof kp||(this._popup._source=this),this._popup._prepareOpen(ct||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(ct){return this._popup&&this._popup.setContent(ct),this},getPopup:function(){return this._popup},_openPopup:function(ct){if(!(!this._popup||!this._map)){_g(ct);var Bt=ct.layer||ct.target;if(this._popup._source===Bt&&!(Bt instanceof jm)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(ct.latlng);return}this._popup._source=Bt,this.openPopup(ct.latlng)}},_movePopup:function(ct){this._popup.setLatLng(ct.latlng)},_onKeyPress:function(ct){ct.originalEvent.keyCode===13&&this._openPopup(ct)}});var C1=tm.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(ct){tm.prototype.onAdd.call(this,ct),this.setOpacity(this.options.opacity),ct.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(ct){tm.prototype.onRemove.call(this,ct),ct.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var ct=tm.prototype.getEvents.call(this);return this.options.permanent||(ct.preclick=this.close),ct},_initLayout:function(){var ct="leaflet-tooltip",Bt=ct+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Lc("div",Bt),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+$t(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(ct){var Bt,me,Qe=this._map,zr=this._container,kn=Qe.latLngToContainerPoint(Qe.getCenter()),ji=Qe.layerPointToContainerPoint(ct),Ba=this.options.direction,Ya=zr.offsetWidth,yo=zr.offsetHeight,Ws=xo(this.options.offset),_l=this._getAnchor();Ba==="top"?(Bt=Ya/2,me=yo):Ba==="bottom"?(Bt=Ya/2,me=0):Ba==="center"?(Bt=Ya/2,me=yo/2):Ba==="right"?(Bt=0,me=yo/2):Ba==="left"?(Bt=Ya,me=yo/2):ji.xthis.options.maxZoom||meQe?this._retainParent(zr,kn,ji,Qe):!1)},_retainChildren:function(ct,Bt,me,Qe){for(var zr=2*ct;zr<2*ct+2;zr++)for(var kn=2*Bt;kn<2*Bt+2;kn++){var ji=new Va(zr,kn);ji.z=me+1;var Ba=this._tileCoordsToKey(ji),Ya=this._tiles[Ba];if(Ya&&Ya.active){Ya.retain=!0;continue}else Ya&&Ya.loaded&&(Ya.retain=!0);me+1this.options.maxZoom||this.options.minZoom!==void 0&&zr1){this._setView(ct,me);return}for(var _l=zr.min.y;_l<=zr.max.y;_l++)for(var Fu=zr.min.x;Fu<=zr.max.x;Fu++){var Pd=new Va(Fu,_l);if(Pd.z=this._tileZoom,!!this._isValidTile(Pd)){var jf=this._tiles[this._tileCoordsToKey(Pd)];jf?jf.current=!0:ji.push(Pd)}}if(ji.sort(function(Tp,Vm){return Tp.distanceTo(kn)-Vm.distanceTo(kn)}),ji.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var w0=document.createDocumentFragment();for(Fu=0;Fume.max.x)||!Bt.wrapLat&&(ct.yme.max.y))return!1}if(!this.options.bounds)return!0;var Qe=this._tileCoordsToBounds(ct);return To(this.options.bounds).overlaps(Qe)},_keyToBounds:function(ct){return this._tileCoordsToBounds(this._keyToTileCoords(ct))},_tileCoordsToNwSe:function(ct){var Bt=this._map,me=this.getTileSize(),Qe=ct.scaleBy(me),zr=Qe.add(me),kn=Bt.unproject(Qe,ct.z),ji=Bt.unproject(zr,ct.z);return[kn,ji]},_tileCoordsToBounds:function(ct){var Bt=this._tileCoordsToNwSe(ct),me=new Go(Bt[0],Bt[1]);return this.options.noWrap||(me=this._map.wrapLatLngBounds(me)),me},_tileCoordsToKey:function(ct){return ct.x+":"+ct.y+":"+ct.z},_keyToTileCoords:function(ct){var Bt=ct.split(":"),me=new Va(+Bt[0],+Bt[1]);return me.z=+Bt[2],me},_removeTile:function(ct){var Bt=this._tiles[ct];Bt&&(Mf(Bt.el),delete this._tiles[ct],this.fire("tileunload",{tile:Bt.el,coords:this._keyToTileCoords(ct)}))},_initTile:function(ct){Wu(ct,"leaflet-tile");var Bt=this.getTileSize();ct.style.width=Bt.x+"px",ct.style.height=Bt.y+"px",ct.onselectstart=Be,ct.onmousemove=Be,Ll.ielt9&&this.options.opacity<1&&v0(ct,this.options.opacity)},_addTile:function(ct,Bt){var me=this._getTilePos(ct),Qe=this._tileCoordsToKey(ct),zr=this.createTile(this._wrapCoords(ct),kt(this._tileReady,this,ct));this._initTile(zr),this.createTile.length<2&&Sa(kt(this._tileReady,this,ct,null,zr)),ac(zr,me),this._tiles[Qe]={el:zr,coords:ct,current:!0},Bt.appendChild(zr),this.fire("tileloadstart",{tile:zr,coords:ct})},_tileReady:function(ct,Bt,me){Bt&&this.fire("tileerror",{error:Bt,tile:me,coords:ct});var Qe=this._tileCoordsToKey(ct);me=this._tiles[Qe],me&&(me.loaded=+new Date,this._map._fadeAnimated?(v0(me.el,0),Ni(this._fadeFrame),this._fadeFrame=Sa(this._updateOpacity,this)):(me.active=!0,this._pruneTiles()),Bt||(Wu(me.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:me.el,coords:ct})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ll.ielt9||!this._map._fadeAnimated?Sa(this._pruneTiles,this):setTimeout(kt(this._pruneTiles,this),250)))},_getTilePos:function(ct){return ct.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(ct){var Bt=new Va(this._wrapX?pe(ct.x,this._wrapX):ct.x,this._wrapY?pe(ct.y,this._wrapY):ct.y);return Bt.z=ct.z,Bt},_pxBoundsToTileRange:function(ct){var Bt=this.getTileSize();return new Mo(ct.min.unscaleBy(Bt).floor(),ct.max.unscaleBy(Bt).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var ct in this._tiles)if(!this._tiles[ct].loaded)return!1;return!0}});function K_(ct){return new L1(ct)}var u0=L1.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(ct,Bt){this._url=ct,Bt=Pr(this,Bt),Bt.detectRetina&&Ll.retina&&Bt.maxZoom>0?(Bt.tileSize=Math.floor(Bt.tileSize/2),Bt.zoomReverse?(Bt.zoomOffset--,Bt.minZoom=Math.min(Bt.maxZoom,Bt.minZoom+1)):(Bt.zoomOffset++,Bt.maxZoom=Math.max(Bt.minZoom,Bt.maxZoom-1)),Bt.minZoom=Math.max(0,Bt.minZoom)):Bt.zoomReverse?Bt.minZoom=Math.min(Bt.maxZoom,Bt.minZoom):Bt.maxZoom=Math.max(Bt.minZoom,Bt.maxZoom),typeof Bt.subdomains=="string"&&(Bt.subdomains=Bt.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(ct,Bt){return this._url===ct&&Bt===void 0&&(Bt=!0),this._url=ct,Bt||this.redraw(),this},createTile:function(ct,Bt){var me=document.createElement("img");return Pu(me,"load",kt(this._tileOnLoad,this,Bt,me)),Pu(me,"error",kt(this._tileOnError,this,Bt,me)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(me.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(me.referrerPolicy=this.options.referrerPolicy),me.alt="",me.src=this.getTileUrl(ct),me},getTileUrl:function(ct){var Bt={r:Ll.retina?"@2x":"",s:this._getSubdomain(ct),x:ct.x,y:ct.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var me=this._globalTileRange.max.y-ct.y;this.options.tms&&(Bt.y=me),Bt["-y"]=me}return Ft(this._url,J(Bt,this.options))},_tileOnLoad:function(ct,Bt){Ll.ielt9?setTimeout(kt(ct,this,null,Bt),0):ct(null,Bt)},_tileOnError:function(ct,Bt,me){var Qe=this.options.errorTileUrl;Qe&&Bt.getAttribute("src")!==Qe&&(Bt.src=Qe),ct(me,Bt)},_onTileRemove:function(ct){ct.tile.onload=null},_getZoomForUrl:function(){var ct=this._tileZoom,Bt=this.options.maxZoom,me=this.options.zoomReverse,Qe=this.options.zoomOffset;return me&&(ct=Bt-ct),ct+Qe},_getSubdomain:function(ct){var Bt=Math.abs(ct.x+ct.y)%this.options.subdomains.length;return this.options.subdomains[Bt]},_abortLoading:function(){var ct,Bt;for(ct in this._tiles)if(this._tiles[ct].coords.z!==this._tileZoom&&(Bt=this._tiles[ct].el,Bt.onload=Be,Bt.onerror=Be,!Bt.complete)){Bt.src=jn;var me=this._tiles[ct].coords;Mf(Bt),delete this._tiles[ct],this.fire("tileabort",{tile:Bt,coords:me})}},_removeTile:function(ct){var Bt=this._tiles[ct];if(Bt)return Bt.el.setAttribute("src",jn),L1.prototype._removeTile.call(this,ct)},_tileReady:function(ct,Bt,me){if(!(!this._map||me&&me.getAttribute("src")===jn))return L1.prototype._tileReady.call(this,ct,Bt,me)}});function Ky(ct,Bt){return new u0(ct,Bt)}var Xy=u0.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(ct,Bt){this._url=ct;var me=J({},this.defaultWmsParams);for(var Qe in Bt)Qe in this.options||(me[Qe]=Bt[Qe]);Bt=Pr(this,Bt);var zr=Bt.detectRetina&&Ll.retina?2:1,kn=this.getTileSize();me.width=kn.x*zr,me.height=kn.y*zr,this.wmsParams=me},onAdd:function(ct){this._crs=this.options.crs||ct.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var Bt=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[Bt]=this._crs.code,u0.prototype.onAdd.call(this,ct)},getTileUrl:function(ct){var Bt=this._tileCoordsToNwSe(ct),me=this._crs,Qe=co(me.project(Bt[0]),me.project(Bt[1])),zr=Qe.min,kn=Qe.max,ji=(this._wmsVersion>=1.3&&this._crs===Uy?[zr.y,zr.x,kn.y,kn.x]:[zr.x,zr.y,kn.x,kn.y]).join(","),Ba=u0.prototype.getTileUrl.call(this,ct);return Ba+Wr(this.wmsParams,Ba,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+ji},setParams:function(ct,Bt){return J(this.wmsParams,ct),Bt||this.redraw(),this}});function Cw(ct,Bt){return new Xy(ct,Bt)}u0.WMS=Xy,Ky.wms=Cw;var bm=l0.extend({options:{padding:.1},initialize:function(ct){Pr(this,ct),$t(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Wu(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var ct={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(ct.zoomanim=this._onAnimZoom),ct},_onAnimZoom:function(ct){this._updateTransform(ct.center,ct.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(ct,Bt){var me=this._map.getZoomScale(Bt,this._zoom),Qe=this._map.getSize().multiplyBy(.5+this.options.padding),zr=this._map.project(this._center,Bt),kn=Qe.multiplyBy(-me).add(zr).subtract(this._map._getNewPixelOrigin(ct,Bt));Ll.any3d?mu(this._container,kn,me):ac(this._container,kn)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var ct in this._layers)this._layers[ct]._reset()},_onZoomEnd:function(){for(var ct in this._layers)this._layers[ct]._project()},_updatePaths:function(){for(var ct in this._layers)this._layers[ct]._update()},_update:function(){var ct=this.options.padding,Bt=this._map.getSize(),me=this._map.containerPointToLayerPoint(Bt.multiplyBy(-ct)).round();this._bounds=new Mo(me,me.add(Bt.multiplyBy(1+ct*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Lw=bm.extend({options:{tolerance:0},getEvents:function(){var ct=bm.prototype.getEvents.call(this);return ct.viewprereset=this._onViewPreReset,ct},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){bm.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var ct=this._container=document.createElement("canvas");Pu(ct,"mousemove",this._onMouseMove,this),Pu(ct,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Pu(ct,"mouseout",this._handleMouseOut,this),ct._leaflet_disable_events=!0,this._ctx=ct.getContext("2d")},_destroyContainer:function(){Ni(this._redrawRequest),delete this._ctx,Mf(this._container),Nh(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var ct;this._redrawBounds=null;for(var Bt in this._layers)ct=this._layers[Bt],ct._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){bm.prototype._update.call(this);var ct=this._bounds,Bt=this._container,me=ct.getSize(),Qe=Ll.retina?2:1;ac(Bt,ct.min),Bt.width=Qe*me.x,Bt.height=Qe*me.y,Bt.style.width=me.x+"px",Bt.style.height=me.y+"px",Ll.retina&&this._ctx.scale(2,2),this._ctx.translate(-ct.min.x,-ct.min.y),this.fire("update")}},_reset:function(){bm.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(ct){this._updateDashArray(ct),this._layers[$t(ct)]=ct;var Bt=ct._order={layer:ct,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=Bt),this._drawLast=Bt,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(ct){this._requestRedraw(ct)},_removePath:function(ct){var Bt=ct._order,me=Bt.next,Qe=Bt.prev;me?me.prev=Qe:this._drawLast=Qe,Qe?Qe.next=me:this._drawFirst=me,delete ct._order,delete this._layers[$t(ct)],this._requestRedraw(ct)},_updatePath:function(ct){this._extendRedrawBounds(ct),ct._project(),ct._update(),this._requestRedraw(ct)},_updateStyle:function(ct){this._updateDashArray(ct),this._requestRedraw(ct)},_updateDashArray:function(ct){if(typeof ct.options.dashArray=="string"){var Bt=ct.options.dashArray.split(/[, ]+/),me=[],Qe,zr;for(zr=0;zr')}}catch{}return function(ct){return document.createElement("<"+ct+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),_6={_initContainer:function(){this._container=Lc("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(bm.prototype._update.call(this),this.fire("update"))},_initPath:function(ct){var Bt=ct._container=P1("shape");Wu(Bt,"leaflet-vml-shape "+(this.options.className||"")),Bt.coordsize="1 1",ct._path=P1("path"),Bt.appendChild(ct._path),this._updateStyle(ct),this._layers[$t(ct)]=ct},_addPath:function(ct){var Bt=ct._container;this._container.appendChild(Bt),ct.options.interactive&&ct.addInteractiveTarget(Bt)},_removePath:function(ct){var Bt=ct._container;Mf(Bt),ct.removeInteractiveTarget(Bt),delete this._layers[$t(ct)]},_updateStyle:function(ct){var Bt=ct._stroke,me=ct._fill,Qe=ct.options,zr=ct._container;zr.stroked=!!Qe.stroke,zr.filled=!!Qe.fill,Qe.stroke?(Bt||(Bt=ct._stroke=P1("stroke")),zr.appendChild(Bt),Bt.weight=Qe.weight+"px",Bt.color=Qe.color,Bt.opacity=Qe.opacity,Qe.dashArray?Bt.dashStyle=wn(Qe.dashArray)?Qe.dashArray.join(" "):Qe.dashArray.replace(/( *, *)/g," "):Bt.dashStyle="",Bt.endcap=Qe.lineCap.replace("butt","flat"),Bt.joinstyle=Qe.lineJoin):Bt&&(zr.removeChild(Bt),ct._stroke=null),Qe.fill?(me||(me=ct._fill=P1("fill")),zr.appendChild(me),me.color=Qe.fillColor||Qe.color,me.opacity=Qe.fillOpacity):me&&(zr.removeChild(me),ct._fill=null)},_updateCircle:function(ct){var Bt=ct._point.round(),me=Math.round(ct._radius),Qe=Math.round(ct._radiusY||me);this._setPath(ct,ct._empty()?"M0 0":"AL "+Bt.x+","+Bt.y+" "+me+","+Qe+" 0,"+65535*360)},_setPath:function(ct,Bt){ct._path.v=Bt},_bringToFront:function(ct){hv(ct._container)},_bringToBack:function(ct){_n(ct._container)}},Um=Ll.vml?P1:ao,jp=bm.extend({_initContainer:function(){this._container=Um("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Um("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Mf(this._container),Nh(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){bm.prototype._update.call(this);var ct=this._bounds,Bt=ct.getSize(),me=this._container;(!this._svgSize||!this._svgSize.equals(Bt))&&(this._svgSize=Bt,me.setAttribute("width",Bt.x),me.setAttribute("height",Bt.y)),ac(me,ct.min),me.setAttribute("viewBox",[ct.min.x,ct.min.y,Bt.x,Bt.y].join(" ")),this.fire("update")}},_initPath:function(ct){var Bt=ct._path=Um("path");ct.options.className&&Wu(Bt,ct.options.className),ct.options.interactive&&Wu(Bt,"leaflet-interactive"),this._updateStyle(ct),this._layers[$t(ct)]=ct},_addPath:function(ct){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(ct._path),ct.addInteractiveTarget(ct._path)},_removePath:function(ct){Mf(ct._path),ct.removeInteractiveTarget(ct._path),delete this._layers[$t(ct)]},_updatePath:function(ct){ct._project(),ct._update()},_updateStyle:function(ct){var Bt=ct._path,me=ct.options;Bt&&(me.stroke?(Bt.setAttribute("stroke",me.color),Bt.setAttribute("stroke-opacity",me.opacity),Bt.setAttribute("stroke-width",me.weight),Bt.setAttribute("stroke-linecap",me.lineCap),Bt.setAttribute("stroke-linejoin",me.lineJoin),me.dashArray?Bt.setAttribute("stroke-dasharray",me.dashArray):Bt.removeAttribute("stroke-dasharray"),me.dashOffset?Bt.setAttribute("stroke-dashoffset",me.dashOffset):Bt.removeAttribute("stroke-dashoffset")):Bt.setAttribute("stroke","none"),me.fill?(Bt.setAttribute("fill",me.fillColor||me.color),Bt.setAttribute("fill-opacity",me.fillOpacity),Bt.setAttribute("fill-rule",me.fillRule||"evenodd")):Bt.setAttribute("fill","none"))},_updatePoly:function(ct,Bt){this._setPath(ct,So(ct._parts,Bt))},_updateCircle:function(ct){var Bt=ct._point,me=Math.max(Math.round(ct._radius),1),Qe=Math.max(Math.round(ct._radiusY),1)||me,zr="a"+me+","+Qe+" 0 1,0 ",kn=ct._empty()?"M0 0":"M"+(Bt.x-me)+","+Bt.y+zr+me*2+",0 "+zr+-me*2+",0 ";this._setPath(ct,kn)},_setPath:function(ct,Bt){ct._path.setAttribute("d",Bt)},_bringToFront:function(ct){hv(ct._path)},_bringToBack:function(ct){_n(ct._path)}});Ll.vml&&jp.include(_6);function Pw(ct){return Ll.svg||Ll.vml?new jp(ct):null}Sc.include({getRenderer:function(ct){var Bt=ct.options.renderer||this._getPaneRenderer(ct.options.pane)||this.options.renderer||this._renderer;return Bt||(Bt=this._renderer=this._createRenderer()),this.hasLayer(Bt)||this.addLayer(Bt),Bt},_getPaneRenderer:function(ct){if(ct==="overlayPane"||ct===void 0)return!1;var Bt=this._paneRenderers[ct];return Bt===void 0&&(Bt=this._createRenderer({pane:ct}),this._paneRenderers[ct]=Bt),Bt},_createRenderer:function(ct){return this.options.preferCanvas&&X_(ct)||Pw(ct)}});var c0=yv.extend({initialize:function(ct,Bt){yv.prototype.initialize.call(this,this._boundsToLatLngs(ct),Bt)},setBounds:function(ct){return this.setLatLngs(this._boundsToLatLngs(ct))},_boundsToLatLngs:function(ct){return ct=To(ct),[ct.getSouthWest(),ct.getNorthWest(),ct.getNorthEast(),ct.getSouthEast()]}});function F0(ct,Bt){return new c0(ct,Bt)}jp.create=Um,jp.pointsToPath=So,vm.geometryToLayer=qy,vm.coordsToLatLng=q_,vm.coordsToLatLngs=Zy,vm.latLngToCoords=Z_,vm.latLngsToCoords=$y,vm.getFeature=ym,vm.asFeature=Gy,Sc.mergeOptions({boxZoom:!0});var xv=Q0.extend({initialize:function(ct){this._map=ct,this._container=ct._container,this._pane=ct._panes.overlayPane,this._resetStateTimeout=0,ct.on("unload",this._destroy,this)},addHooks:function(){Pu(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Nh(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Mf(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(ct){if(!ct.shiftKey||ct.which!==1&&ct.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),z0(),Kc(),this._startPoint=this._map.mouseEventToContainerPoint(ct),Pu(document,{contextmenu:_g,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(ct){this._moved||(this._moved=!0,this._box=Lc("div","leaflet-zoom-box",this._container),Wu(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(ct);var Bt=new Mo(this._point,this._startPoint),me=Bt.getSize();ac(this._box,Bt.min),this._box.style.width=me.x+"px",this._box.style.height=me.y+"px"},_finish:function(){this._moved&&(Mf(this._box),Nf(this._container,"leaflet-crosshair")),vg(),Bp(),Nh(document,{contextmenu:_g,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(ct){if(!(ct.which!==1&&ct.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(kt(this._resetState,this),0);var Bt=new Go(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(Bt).fire("boxzoomend",{boxZoomBounds:Bt})}},_onKeyDown:function(ct){ct.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Sc.addInitHook("addHandler","boxZoom",xv),Sc.mergeOptions({doubleClickZoom:!0});var b0=Q0.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(ct){var Bt=this._map,me=Bt.getZoom(),Qe=Bt.options.zoomDelta,zr=ct.originalEvent.shiftKey?me-Qe:me+Qe;Bt.options.doubleClickZoom==="center"?Bt.setZoom(zr):Bt.setZoomAround(ct.containerPoint,zr)}});Sc.addInitHook("addHandler","doubleClickZoom",b0),Sc.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var R0=Q0.extend({addHooks:function(){if(!this._draggable){var ct=this._map;this._draggable=new Bm(ct._mapPane,ct._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),ct.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),ct.on("zoomend",this._onZoomEnd,this),ct.whenReady(this._onZoomEnd,this))}Wu(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Nf(this._map._container,"leaflet-grab"),Nf(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var ct=this._map;if(ct._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var Bt=To(this._map.options.maxBounds);this._offsetLimit=co(this._map.latLngToContainerPoint(Bt.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(Bt.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;ct.fire("movestart").fire("dragstart"),ct.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(ct){if(this._map.options.inertia){var Bt=this._lastTime=+new Date,me=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(me),this._times.push(Bt),this._prunePositions(Bt)}this._map.fire("move",ct).fire("drag",ct)},_prunePositions:function(ct){for(;this._positions.length>1&&ct-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var ct=this._map.getSize().divideBy(2),Bt=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=Bt.subtract(ct).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(ct,Bt){return ct-(ct-Bt)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var ct=this._draggable._newPos.subtract(this._draggable._startPos),Bt=this._offsetLimit;ct.xBt.max.x&&(ct.x=this._viscousLimit(ct.x,Bt.max.x)),ct.y>Bt.max.y&&(ct.y=this._viscousLimit(ct.y,Bt.max.y)),this._draggable._newPos=this._draggable._startPos.add(ct)}},_onPreDragWrap:function(){var ct=this._worldWidth,Bt=Math.round(ct/2),me=this._initialWorldOffset,Qe=this._draggable._newPos.x,zr=(Qe-Bt+me)%ct+Bt-me,kn=(Qe+Bt+me)%ct-Bt-me,ji=Math.abs(zr+me)0?kn:-kn))-Bt;this._delta=0,this._startTime=null,ji&&(ct.options.scrollWheelZoom==="center"?ct.setZoom(Bt+ji):ct.setZoomAround(this._lastMousePos,Bt+ji))}});Sc.addInitHook("addHandler","scrollWheelZoom",Cg);var Iw=600;Sc.mergeOptions({tapHold:Ll.touchNative&&Ll.safari&&Ll.mobile,tapTolerance:15});var Ow=Q0.extend({addHooks:function(){Pu(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Nh(this._map._container,"touchstart",this._onDown,this)},_onDown:function(ct){if(clearTimeout(this._holdTimeout),ct.touches.length===1){var Bt=ct.touches[0];this._startPos=this._newPos=new Va(Bt.clientX,Bt.clientY),this._holdTimeout=setTimeout(kt(function(){this._cancel(),this._isTapValid()&&(Pu(document,"touchend",gc),Pu(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",Bt))},this),Iw),Pu(document,"touchend touchcancel contextmenu",this._cancel,this),Pu(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function ct(){Nh(document,"touchend",gc),Nh(document,"touchend touchcancel",ct)},_cancel:function(){clearTimeout(this._holdTimeout),Nh(document,"touchend touchcancel contextmenu",this._cancel,this),Nh(document,"touchmove",this._onMove,this)},_onMove:function(ct){var Bt=ct.touches[0];this._newPos=new Va(Bt.clientX,Bt.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(ct,Bt){var me=new MouseEvent(ct,{bubbles:!0,cancelable:!0,view:window,screenX:Bt.screenX,screenY:Bt.screenY,clientX:Bt.clientX,clientY:Bt.clientY});me._simulated=!0,Bt.target.dispatchEvent(me)}});Sc.addInitHook("addHandler","tapHold",Ow),Sc.mergeOptions({touchZoom:Ll.touch,bounceAtZoomLimits:!0});var B0=Q0.extend({addHooks:function(){Wu(this._map._container,"leaflet-touch-zoom"),Pu(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Nf(this._map._container,"leaflet-touch-zoom"),Nh(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(ct){var Bt=this._map;if(!(!ct.touches||ct.touches.length!==2||Bt._animatingZoom||this._zooming)){var me=Bt.mouseEventToContainerPoint(ct.touches[0]),Qe=Bt.mouseEventToContainerPoint(ct.touches[1]);this._centerPoint=Bt.getSize()._divideBy(2),this._startLatLng=Bt.containerPointToLatLng(this._centerPoint),Bt.options.touchZoom!=="center"&&(this._pinchStartLatLng=Bt.containerPointToLatLng(me.add(Qe)._divideBy(2))),this._startDist=me.distanceTo(Qe),this._startZoom=Bt.getZoom(),this._moved=!1,this._zooming=!0,Bt._stop(),Pu(document,"touchmove",this._onTouchMove,this),Pu(document,"touchend touchcancel",this._onTouchEnd,this),gc(ct)}},_onTouchMove:function(ct){if(!(!ct.touches||ct.touches.length!==2||!this._zooming)){var Bt=this._map,me=Bt.mouseEventToContainerPoint(ct.touches[0]),Qe=Bt.mouseEventToContainerPoint(ct.touches[1]),zr=me.distanceTo(Qe)/this._startDist;if(this._zoom=Bt.getScaleZoom(zr,this._startZoom),!Bt.options.bounceAtZoomLimits&&(this._zoomBt.getMaxZoom()&&zr>1)&&(this._zoom=Bt._limitZoom(this._zoom)),Bt.options.touchZoom==="center"){if(this._center=this._startLatLng,zr===1)return}else{var kn=me._add(Qe)._divideBy(2)._subtract(this._centerPoint);if(zr===1&&kn.x===0&&kn.y===0)return;this._center=Bt.unproject(Bt.project(this._pinchStartLatLng,this._zoom).subtract(kn),this._zoom)}this._moved||(Bt._moveStart(!0,!1),this._moved=!0),Ni(this._animRequest);var ji=kt(Bt._move,Bt,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Sa(ji,this,!0),gc(ct)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Ni(this._animRequest),Nh(document,"touchmove",this._onTouchMove,this),Nh(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Sc.addInitHook("addHandler","touchZoom",B0),Sc.BoxZoom=xv,Sc.DoubleClickZoom=b0,Sc.Drag=R0,Sc.Keyboard=zw,Sc.ScrollWheelZoom=Cg,Sc.TapHold=Ow,Sc.TouchZoom=B0,z.Bounds=Mo,z.Browser=Ll,z.CRS=ka,z.Canvas=Lw,z.Circle=Wy,z.CircleMarker=Hy,z.Class=ia,z.Control=cp,z.DivIcon=Ew,z.DivOverlay=tm,z.DomEvent=Np,z.DomUtil=Ac,z.Draggable=Bm,z.Evented=Ei,z.FeatureGroup=kp,z.GeoJSON=vm,z.GridLayer=L1,z.Handler=Q0,z.Icon=Nm,z.ImageOverlay=xm,z.LatLng=eo,z.LatLngBounds=Go,z.Layer=l0,z.LayerGroup=Sg,z.LineUtil=Qh,z.Map=Sc,z.Marker=E1,z.Mixin=hp,z.Path=jm,z.Point=Va,z.PolyUtil=d6,z.Polygon=yv,z.Polyline=_0,z.Popup=Eg,z.PosAnimation=S1,z.Projection=U_,z.Rectangle=c0,z.Renderer=bm,z.SVG=jp,z.SVGOverlay=Y_,z.TileLayer=u0,z.Tooltip=C1,z.Transformation=Yo,z.Util=zi,z.VideoOverlay=D0,z.bind=kt,z.bounds=co,z.canvas=X_,z.circle=vv,z.circleMarker=Tw,z.control=s0,z.divIcon=x6,z.extend=J,z.featureGroup=kw,z.geoJSON=G_,z.geoJson=Yy,z.gridLayer=K_,z.icon=H_,z.imageOverlay=_m,z.latLng=ya,z.latLngBounds=To,z.layerGroup=Vy,z.map=Vs,z.marker=g6,z.point=xo,z.polygon=v6,z.polyline=Aw,z.popup=yf,z.rectangle=F0,z.setOptions=Pr,z.stamp=$t,z.svg=Pw,z.svgOverlay=y6,z.tileLayer=Ky,z.tooltip=Sw,z.transformation=vi,z.version=j,z.videoOverlay=tf;var N0=window.L;z.noConflict=function(){return window.L=N0,this},window.L=z})}(g2,g2.exports)),g2.exports}var Hat=Vat();const Yg=LO(Hat),Wat={class:"space-y-6"},qat={key:0,class:"flex items-center justify-center py-12"},Zat={key:1,class:"bg-accent-red/10 border border-accent-red/20 rounded-[15px] p-6"},$at={class:"flex items-center gap-3"},Gat={class:"text-accent-red/80 text-sm"},Yat={key:0,class:"bg-accent-red/10 border border-accent-red/20 rounded-[15px] p-6"},Kat={key:1,class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},Xat={class:"flex items-center justify-between p-6 pb-4"},Jat={class:"text-white text-lg font-semibold"},Qat={class:"text-sm text-dark-text ml-2"},tot={class:"overflow-x-auto"},eot={class:"w-full"},rot={class:"bg-dark-bg/30"},not=["onMouseenter","onMouseleave"],iot={class:"py-4 px-6 text-center"},aot={class:"py-4 px-6 text-white text-sm"},oot={class:"py-4 px-6 text-white text-sm font-mono"},sot={class:"py-4 px-6 text-white text-sm"},lot={key:0},uot={key:1,class:"text-dark-text"},cot={class:"py-4 px-6 text-white text-sm"},hot={class:"py-4 px-6 text-white text-sm"},fot={class:"py-4 px-6 text-white text-sm"},dot={class:"py-4 px-6 text-white text-sm"},pot={class:"py-4 px-6 text-white text-sm"},mot={class:"py-4 px-6 text-white text-sm"},got={class:"py-4 px-6 text-white text-sm text-center"},vot={key:2,class:"text-center py-12"},yot=ah({name:"NeighborsView",__name:"Neighbors",setup(d){const l=gg(),z={0:"Unknown",1:"Chat Node",2:"Repeater",3:"Room Server",4:"Hybrid Node"},j={0:"text-gray-400",1:"text-blue-400",2:"text-accent-green",3:"text-accent-purple",4:"text-secondary"},J=ro({}),mt=ro(!0),kt=ro(null),Dt=ro(!1),$t=ro(null),ee=Ko(()=>l.stats?.config?.repeater?.latitude??null),pe=Ko(()=>l.stats?.config?.repeater?.longitude??null),Be=Ko(()=>ee.value!==null&&pe.value!==null&&typeof ee.value=="number"&&typeof pe.value=="number"&&ee.value!==0&&pe.value!==0&&Math.abs(ee.value)<=90&&Math.abs(pe.value)<=180),ir=ro();let vr=null;const Ir=ro(new Map),Pr=Ko(()=>Object.entries(z).filter(([co])=>J.value[co]?.length>0).sort(([co],[Go])=>parseInt(co)-parseInt(Go))),Wr=Ko(()=>Object.values(J.value).flat().filter(co=>co.latitude!==null&&co.longitude!==null)),Tn=co=>new Date(co*1e3).toLocaleString(),Ft=co=>co.length<=16?co:`${co.slice(0,8)}...${co.slice(-8)}`,wn=co=>co!==null?`${co} dBm`:"N/A",ei=co=>co!==null?`${co.toFixed(1)} dB`:"N/A",jn=co=>co===null?"Unknown":{0:"Unknown",1:"Flood",2:"Direct"}[co]||`Type ${co}`,ai=(co,Go,To,eo)=>{const ka=(To-co)*Math.PI/180,mo=(eo-Go)*Math.PI/180,vo=Math.sin(ka/2)*Math.sin(ka/2)+Math.cos(co*Math.PI/180)*Math.cos(To*Math.PI/180)*Math.sin(mo/2)*Math.sin(mo/2);return 6371*(2*Math.atan2(Math.sqrt(vo),Math.sqrt(1-vo)))},Qi=co=>Be.value?co.latitude!==null&&co.longitude!==null?`${ai(ee.value,pe.value,co.latitude,co.longitude).toFixed(2)} km`:"Unknown":"Unknown (No base location)",Gi=co=>{const Go={0:"#9CA3AF",1:"#60A5FA",2:"#A5E5B6",3:"#EBA0FC",4:"#FFC246"};return Go[co]||Go[0]},En=async co=>{try{const Go=await Ah.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(co)}&hours=168`);return Go.success&&Array.isArray(Go.data)?Go.data:[]}catch(Go){return console.error(`Error fetching adverts for contact type ${co}:`,Go),[]}},Fa=async()=>{mt.value=!0,kt.value=null;try{J.value={};for(const[co,Go]of Object.entries(z)){const To=await En(Go);To.length>0&&(J.value[co]=To)}}catch(co){console.error("Error loading adverts:",co),kt.value=co instanceof Error?co.message:"Unknown error occurred"}finally{mt.value=!1}},Sa=async()=>{if(Ni(),await C0(),!ir.value){setTimeout(()=>{ir.value&&Sa()},500);return}setTimeout(()=>{if(!ir.value)return;if(ir.value.offsetWidth===0||ir.value.offsetHeight===0){setTimeout(()=>Sa(),500);return}if(!Be.value){console.error("Base coordinates not available from system config");return}const co=ee.value,Go=pe.value;let To=null;if(Wr.value.length>0){const eo=[co,...Wr.value.map(Yo=>Yo.latitude)],ya=[Go,...Wr.value.map(Yo=>Yo.longitude)],ka=Math.min(...eo),mo=Math.max(...eo),vo=Math.min(...ya),Ss=Math.max(...ya);To=[[ka,vo],[mo,Ss]]}try{To?vr=Yg.map(ir.value,{zoomControl:!0,attributionControl:!0,preferCanvas:!1}).fitBounds(To,{padding:[50,50]}):vr=Yg.map(ir.value,{center:[co,Go],zoom:12,zoomControl:!0,attributionControl:!0,preferCanvas:!1});const eo=Yg.tileLayer("https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO',maxZoom:18,minZoom:1,crossOrigin:!0}),ya=Yg.tileLayer("https://{s}.basemaps.cartocdn.com/dark_only_labels/{z}/{x}/{y}{r}.png",{maxZoom:18,minZoom:1,crossOrigin:!0});eo.addTo(vr),ya.addTo(vr);let ka=!1,mo=!1;const vo=()=>{ka&&mo&&setTimeout(()=>{vi()},1e3)};eo.on("load",()=>{ka=!0,vr&&vr.invalidateSize(),vo()}),ya.on("load",()=>{mo=!0,vo()});const Ss=(yi,ui=!1)=>{const ao=ui?12:8;return Yg.divIcon({className:"custom-div-icon",html:`
`,iconSize:[ao+4,ao+4],iconAnchor:[ao/2+2,ao/2+2]})},Yo=Ss("#AAE8E8",!0);Yg.marker([co,Go],{icon:Yo}).addTo(vr).bindPopup(` -
- This Node
- Base Station
- ${co.toFixed(6)}, ${Go.toFixed(6)} + */var wot=g2.exports,QL;function kot(){return QL||(QL=1,function(d,s){(function(E,B){B(s)})(wot,function(E){var B="1.9.4";function K(ct){var Bt,me,Qe,zr;for(me=1,Qe=arguments.length;me"u"||!L||!L.Mixin)){ct=cn(ct)?ct:[ct];for(var Bt=0;Bt0?Math.floor(ct):Math.ceil(ct)};Ma.prototype={clone:function(){return new Ma(this.x,this.y)},add:function(ct){return this.clone()._add(ho(ct))},_add:function(ct){return this.x+=ct.x,this.y+=ct.y,this},subtract:function(ct){return this.clone()._subtract(ho(ct))},_subtract:function(ct){return this.x-=ct.x,this.y-=ct.y,this},divideBy:function(ct){return this.clone()._divideBy(ct)},_divideBy:function(ct){return this.x/=ct,this.y/=ct,this},multiplyBy:function(ct){return this.clone()._multiplyBy(ct)},_multiplyBy:function(ct){return this.x*=ct,this.y*=ct,this},scaleBy:function(ct){return new Ma(this.x*ct.x,this.y*ct.y)},unscaleBy:function(ct){return new Ma(this.x/ct.x,this.y/ct.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=zo(this.x),this.y=zo(this.y),this},distanceTo:function(ct){ct=ho(ct);var Bt=ct.x-this.x,me=ct.y-this.y;return Math.sqrt(Bt*Bt+me*me)},equals:function(ct){return ct=ho(ct),ct.x===this.x&&ct.y===this.y},contains:function(ct){return ct=ho(ct),Math.abs(ct.x)<=Math.abs(this.x)&&Math.abs(ct.y)<=Math.abs(this.y)},toString:function(){return"Point("+er(this.x)+", "+er(this.y)+")"}};function ho(ct,Bt,me){return ct instanceof Ma?ct:cn(ct)?new Ma(ct[0],ct[1]):ct==null?ct:typeof ct=="object"&&"x"in ct&&"y"in ct?new Ma(ct.x,ct.y):new Ma(ct,Bt,me)}function mo(ct,Bt){if(ct)for(var me=Bt?[ct,Bt]:ct,Qe=0,zr=me.length;Qe=this.min.x&&me.x<=this.max.x&&Bt.y>=this.min.y&&me.y<=this.max.y},intersects:function(ct){ct=Ts(ct);var Bt=this.min,me=this.max,Qe=ct.min,zr=ct.max,An=zr.x>=Bt.x&&Qe.x<=me.x,qi=zr.y>=Bt.y&&Qe.y<=me.y;return An&&qi},overlaps:function(ct){ct=Ts(ct);var Bt=this.min,me=this.max,Qe=ct.min,zr=ct.max,An=zr.x>Bt.x&&Qe.xBt.y&&Qe.y=Bt.lat&&zr.lat<=me.lat&&Qe.lng>=Bt.lng&&zr.lng<=me.lng},intersects:function(ct){ct=ko(ct);var Bt=this._southWest,me=this._northEast,Qe=ct.getSouthWest(),zr=ct.getNorthEast(),An=zr.lat>=Bt.lat&&Qe.lat<=me.lat,qi=zr.lng>=Bt.lng&&Qe.lng<=me.lng;return An&&qi},overlaps:function(ct){ct=ko(ct);var Bt=this._southWest,me=this._northEast,Qe=ct.getSouthWest(),zr=ct.getNorthEast(),An=zr.lat>Bt.lat&&Qe.latBt.lng&&Qe.lng1,l6=function(){var ct=!1;try{var Bt=Object.defineProperty({},"passive",{get:function(){ct=!0}});window.addEventListener("testPassiveEventSupport",De,Bt),window.removeEventListener("testPassiveEventSupport",De,Bt)}catch{}return ct}(),u6=function(){return!!document.createElement("canvas").getContext}(),A_=!!(document.createElementNS&&go("svg").createSVGRect),c6=!!A_&&function(){var ct=document.createElement("div");return ct.innerHTML="",(ct.firstChild&&ct.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),h6=!A_&&function(){try{var ct=document.createElement("div");ct.innerHTML='';var Bt=ct.firstChild;return Bt.style.behavior="url(#default#VML)",Bt&&typeof Bt.adj=="object"}catch{return!1}}(),mw=navigator.platform.indexOf("Mac")===0,M_=navigator.platform.indexOf("Linux")===0;function r0(ct){return navigator.userAgent.toLowerCase().indexOf(ct)>=0}var El={ie:ms,ielt9:bs,edge:as,webkit:Yo,android:Ol,android23:Ns,androidStock:vu,opera:tc,chrome:fh,gecko:Fc,safari:op,phantom:Kd,opera12:e0,win:d0,ie3d:Dm,webkit3d:uv,gecko3d:sp,any3d:p0,mobile:Fm,mobileWebkit:Fy,mobileWebkit3d:n6,msPointer:fw,pointer:dw,touch:i6,touchNative:pw,mobileOpera:a6,mobileGecko:o6,retina:s6,passiveEvents:l6,canvas:u6,svg:A_,vml:h6,inlineSvg:c6,mac:mw,linux:M_},Yc=El.msPointer?"MSPointerDown":"pointerdown",kd=El.msPointer?"MSPointerMove":"pointermove",S_=El.msPointer?"MSPointerUp":"pointerup",Zu=El.msPointer?"MSPointerCancel":"pointercancel",_1={touchstart:Yc,touchmove:kd,touchend:S_,touchcancel:Zu},gw={touchstart:p6,touchmove:G0,touchend:G0,touchcancel:G0},cv={},Ry=!1;function b1(ct,Bt,me){return Bt==="touchstart"&&E_(),gw[Bt]?(me=gw[Bt].bind(this,me),ct.addEventListener(_1[Bt],me,!1),me):(console.warn("wrong event specified:",Bt),De)}function f6(ct,Bt,me){if(!_1[Bt]){console.warn("wrong event specified:",Bt);return}ct.removeEventListener(_1[Bt],me,!1)}function Jo(ct){cv[ct.pointerId]=ct}function d6(ct){cv[ct.pointerId]&&(cv[ct.pointerId]=ct)}function w1(ct){delete cv[ct.pointerId]}function E_(){Ry||(document.addEventListener(Yc,Jo,!0),document.addEventListener(kd,d6,!0),document.addEventListener(S_,w1,!0),document.addEventListener(Zu,w1,!0),Ry=!0)}function G0(ct,Bt){if(Bt.pointerType!==(Bt.MSPOINTER_TYPE_MOUSE||"mouse")){Bt.touches=[];for(var me in cv)Bt.touches.push(cv[me]);Bt.changedTouches=[Bt],ct(Bt)}}function p6(ct,Bt){Bt.MSPOINTER_TYPE_TOUCH&&Bt.pointerType===Bt.MSPOINTER_TYPE_TOUCH&&mc(Bt),G0(ct,Bt)}function m6(ct){var Bt={},me,Qe;for(Qe in ct)me=ct[Qe],Bt[Qe]=me&&me.bind?me.bind(ct):me;return ct=Bt,Bt.type="dblclick",Bt.detail=2,Bt.isTrusted=!1,Bt._simulated=!0,Bt}var g6=200;function v6(ct,Bt){ct.addEventListener("dblclick",Bt);var me=0,Qe;function zr(An){if(An.detail!==1){Qe=An.detail;return}if(!(An.pointerType==="mouse"||An.sourceCapabilities&&!An.sourceCapabilities.firesTouchEvents)){var qi=_w(An);if(!(qi.some(function(Ka){return Ka instanceof HTMLLabelElement&&Ka.attributes.for})&&!qi.some(function(Ka){return Ka instanceof HTMLInputElement||Ka instanceof HTMLSelectElement}))){var ja=Date.now();ja-me<=g6?(Qe++,Qe===2&&Bt(m6(An))):Qe=1,me=ja}}}return ct.addEventListener("click",zr),{dblclick:Bt,simDblclick:zr}}function C_(ct,Bt){ct.removeEventListener("dblclick",Bt.dblclick),ct.removeEventListener("click",Bt.simDblclick)}var L_=Nm(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),k1=Nm(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),vw=k1==="webkitTransition"||k1==="OTransition"?k1+"End":"transitionend";function yw(ct){return typeof ct=="string"?document.getElementById(ct):ct}function T1(ct,Bt){var me=ct.style[Bt]||ct.currentStyle&&ct.currentStyle[Bt];if((!me||me==="auto")&&document.defaultView){var Qe=document.defaultView.getComputedStyle(ct,null);me=Qe?Qe[Bt]:null}return me==="auto"?null:me}function Ec(ct,Bt,me){var Qe=document.createElement(ct);return Qe.className=Bt||"",me&&me.appendChild(Qe),Qe}function Tf(ct){var Bt=ct.parentNode;Bt&&Bt.removeChild(ct)}function By(ct){for(;ct.firstChild;)ct.removeChild(ct.firstChild)}function hv(ct){var Bt=ct.parentNode;Bt&&Bt.lastChild!==ct&&Bt.appendChild(ct)}function kn(ct){var Bt=ct.parentNode;Bt&&Bt.firstChild!==ct&&Bt.insertBefore(ct,Bt.firstChild)}function P_(ct,Bt){if(ct.classList!==void 0)return ct.classList.contains(Bt);var me=Bm(ct);return me.length>0&&new RegExp("(^|\\s)"+Bt+"(\\s|$)").test(me)}function Wu(ct,Bt){if(ct.classList!==void 0)for(var me=Mr(Bt),Qe=0,zr=me.length;Qe0?2*window.devicePixelRatio:1;function Tc(ct){return El.edge?ct.wheelDeltaY/2:ct.deltaY&&ct.deltaMode===0?-ct.deltaY/Xc:ct.deltaY&&ct.deltaMode===1?-ct.deltaY*20:ct.deltaY&&ct.deltaMode===2?-ct.deltaY*60:ct.deltaX||ct.deltaZ?0:ct.wheelDelta?(ct.wheelDeltaY||ct.wheelDelta)/2:ct.detail&&Math.abs(ct.detail)<32765?-ct.detail*20:ct.detail?ct.detail/-32765*60:0}function bg(ct,Bt){var me=Bt.relatedTarget;if(!me)return!0;try{for(;me&&me!==ct;)me=me.parentNode}catch{return!1}return me!==ct}var Fp={__proto__:null,on:zu,off:Nh,stopPropagation:n0,disableScrollPropagation:dm,disableClickPropagation:fv,preventDefault:mc,stop:_g,getPropagationPath:_w,getMousePosition:Xd,getWheelDelta:Tc,isExternalTarget:bg,addListener:zu,removeListener:Nh},S1=si.extend({run:function(ct,Bt,me,Qe){this.stop(),this._el=ct,this._inProgress=!0,this._duration=me||.25,this._easeOutPower=1/Math.max(Qe||.5,.2),this._startPos=Rc(ct),this._offset=Bt.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Fi(this._animate,this),this._step()},_step:function(ct){var Bt=+new Date-this._startTime,me=this._duration*1e3;Btthis.options.maxZoom)?this.setZoom(ct):this},panInsideBounds:function(ct,Bt){this._enforcingBounds=!0;var me=this.getCenter(),Qe=this._limitCenter(me,this._zoom,ko(ct));return me.equals(Qe)||this.panTo(Qe,Bt),this._enforcingBounds=!1,this},panInside:function(ct,Bt){Bt=Bt||{};var me=ho(Bt.paddingTopLeft||Bt.padding||[0,0]),Qe=ho(Bt.paddingBottomRight||Bt.padding||[0,0]),zr=this.project(this.getCenter()),An=this.project(ct),qi=this.getPixelBounds(),ja=Ts([qi.min.add(me),qi.max.subtract(Qe)]),Ka=ja.getSize();if(!ja.contains(An)){this._enforcingBounds=!0;var xo=An.subtract(ja.getCenter()),Ws=ja.extend(An).getSize().subtract(Ka);zr.x+=xo.x<0?-Ws.x:Ws.x,zr.y+=xo.y<0?-Ws.y:Ws.y,this.panTo(this.unproject(zr),Bt),this._enforcingBounds=!1}return this},invalidateSize:function(ct){if(!this._loaded)return this;ct=K({animate:!1,pan:!0},ct===!0?{animate:!0}:ct);var Bt=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var me=this.getSize(),Qe=Bt.divideBy(2).round(),zr=me.divideBy(2).round(),An=Qe.subtract(zr);return!An.x&&!An.y?this:(ct.animate&&ct.pan?this.panBy(An):(ct.pan&&this._rawPanBy(An),this.fire("move"),ct.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(_t(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:Bt,newSize:me}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(ct){if(ct=this._locateOptions=K({timeout:1e4,watch:!1},ct),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var Bt=_t(this._handleGeolocationResponse,this),me=_t(this._handleGeolocationError,this);return ct.watch?this._locationWatchId=navigator.geolocation.watchPosition(Bt,me,ct):navigator.geolocation.getCurrentPosition(Bt,me,ct),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(ct){if(this._container._leaflet_id){var Bt=ct.code,me=ct.message||(Bt===1?"permission denied":Bt===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:Bt,message:"Geolocation error: "+me+"."})}},_handleGeolocationResponse:function(ct){if(this._container._leaflet_id){var Bt=ct.coords.latitude,me=ct.coords.longitude,Qe=new ro(Bt,me),zr=Qe.toBounds(ct.coords.accuracy*2),An=this._locateOptions;if(An.setView){var qi=this.getBoundsZoom(zr);this.setView(Qe,An.maxZoom?Math.min(qi,An.maxZoom):qi)}var ja={latlng:Qe,bounds:zr,timestamp:ct.timestamp};for(var Ka in ct.coords)typeof ct.coords[Ka]=="number"&&(ja[Ka]=ct.coords[Ka]);this.fire("locationfound",ja)}},addHandler:function(ct,Bt){if(!Bt)return this;var me=this[ct]=new Bt(this);return this._handlers.push(me),this.options[ct]&&me.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Tf(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Pi(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var ct;for(ct in this._layers)this._layers[ct].remove();for(ct in this._panes)Tf(this._panes[ct]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(ct,Bt){var me="leaflet-pane"+(ct?" leaflet-"+ct.replace("Pane","")+"-pane":""),Qe=Ec("div",me,Bt||this._mapPane);return ct&&(this._panes[ct]=Qe),Qe},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var ct=this.getPixelBounds(),Bt=this.unproject(ct.getBottomLeft()),me=this.unproject(ct.getTopRight());return new xl(Bt,me)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(ct,Bt,me){ct=ko(ct),me=ho(me||[0,0]);var Qe=this.getZoom()||0,zr=this.getMinZoom(),An=this.getMaxZoom(),qi=ct.getNorthWest(),ja=ct.getSouthEast(),Ka=this.getSize().subtract(me),xo=Ts(this.project(ja,Qe),this.project(qi,Qe)).getSize(),Ws=El.any3d?this.options.zoomSnap:1,_l=Ka.x/xo.x,Fu=Ka.y/xo.y,Md=Bt?Math.max(_l,Fu):Math.min(_l,Fu);return Qe=this.getScaleZoom(Md,Qe),Ws&&(Qe=Math.round(Qe/(Ws/100))*(Ws/100),Qe=Bt?Math.ceil(Qe/Ws)*Ws:Math.floor(Qe/Ws)*Ws),Math.max(zr,Math.min(An,Qe))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Ma(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(ct,Bt){var me=this._getTopLeftPoint(ct,Bt);return new mo(me,me.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(ct){return this.options.crs.getProjectedBounds(ct===void 0?this.getZoom():ct)},getPane:function(ct){return typeof ct=="string"?this._panes[ct]:ct},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(ct,Bt){var me=this.options.crs;return Bt=Bt===void 0?this._zoom:Bt,me.scale(ct)/me.scale(Bt)},getScaleZoom:function(ct,Bt){var me=this.options.crs;Bt=Bt===void 0?this._zoom:Bt;var Qe=me.zoom(ct*me.scale(Bt));return isNaN(Qe)?1/0:Qe},project:function(ct,Bt){return Bt=Bt===void 0?this._zoom:Bt,this.options.crs.latLngToPoint(Ia(ct),Bt)},unproject:function(ct,Bt){return Bt=Bt===void 0?this._zoom:Bt,this.options.crs.pointToLatLng(ho(ct),Bt)},layerPointToLatLng:function(ct){var Bt=ho(ct).add(this.getPixelOrigin());return this.unproject(Bt)},latLngToLayerPoint:function(ct){var Bt=this.project(Ia(ct))._round();return Bt._subtract(this.getPixelOrigin())},wrapLatLng:function(ct){return this.options.crs.wrapLatLng(Ia(ct))},wrapLatLngBounds:function(ct){return this.options.crs.wrapLatLngBounds(ko(ct))},distance:function(ct,Bt){return this.options.crs.distance(Ia(ct),Ia(Bt))},containerPointToLayerPoint:function(ct){return ho(ct).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(ct){return ho(ct).add(this._getMapPanePos())},containerPointToLatLng:function(ct){var Bt=this.containerPointToLayerPoint(ho(ct));return this.layerPointToLatLng(Bt)},latLngToContainerPoint:function(ct){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Ia(ct)))},mouseEventToContainerPoint:function(ct){return Xd(ct,this._container)},mouseEventToLayerPoint:function(ct){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(ct))},mouseEventToLatLng:function(ct){return this.layerPointToLatLng(this.mouseEventToLayerPoint(ct))},_initContainer:function(ct){var Bt=this._container=yw(ct);if(Bt){if(Bt._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");zu(Bt,"scroll",this._onScroll,this),this._containerId=jt(Bt)},_initLayout:function(){var ct=this._container;this._fadeAnimated=this.options.fadeAnimation&&El.any3d,Wu(ct,"leaflet-container"+(El.touch?" leaflet-touch":"")+(El.retina?" leaflet-retina":"")+(El.ielt9?" leaflet-oldie":"")+(El.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var Bt=T1(ct,"position");Bt!=="absolute"&&Bt!=="relative"&&Bt!=="fixed"&&Bt!=="sticky"&&(ct.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var ct=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ic(this._mapPane,new Ma(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Wu(ct.markerPane,"leaflet-zoom-hide"),Wu(ct.shadowPane,"leaflet-zoom-hide"))},_resetView:function(ct,Bt,me){ic(this._mapPane,new Ma(0,0));var Qe=!this._loaded;this._loaded=!0,Bt=this._limitZoom(Bt),this.fire("viewprereset");var zr=this._zoom!==Bt;this._moveStart(zr,me)._move(ct,Bt)._moveEnd(zr),this.fire("viewreset"),Qe&&this.fire("load")},_moveStart:function(ct,Bt){return ct&&this.fire("zoomstart"),Bt||this.fire("movestart"),this},_move:function(ct,Bt,me,Qe){Bt===void 0&&(Bt=this._zoom);var zr=this._zoom!==Bt;return this._zoom=Bt,this._lastCenter=ct,this._pixelOrigin=this._getNewPixelOrigin(ct),Qe?me&&me.pinch&&this.fire("zoom",me):((zr||me&&me.pinch)&&this.fire("zoom",me),this.fire("move",me)),this},_moveEnd:function(ct){return ct&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Pi(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(ct){ic(this._mapPane,this._getMapPanePos().subtract(ct))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(ct){this._targets={},this._targets[jt(this._container)]=this;var Bt=ct?Nh:zu;Bt(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&Bt(window,"resize",this._onResize,this),El.any3d&&this.options.transform3DLimit&&(ct?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Pi(this._resizeRequest),this._resizeRequest=Fi(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var ct=this._getMapPanePos();Math.max(Math.abs(ct.x),Math.abs(ct.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(ct,Bt){for(var me=[],Qe,zr=Bt==="mouseout"||Bt==="mouseover",An=ct.target||ct.srcElement,qi=!1;An;){if(Qe=this._targets[jt(An)],Qe&&(Bt==="click"||Bt==="preclick")&&this._draggableMoved(Qe)){qi=!0;break}if(Qe&&Qe.listens(Bt,!0)&&(zr&&!bg(An,ct)||(me.push(Qe),zr))||An===this._container)break;An=An.parentNode}return!me.length&&!qi&&!zr&&this.listens(Bt,!0)&&(me=[this]),me},_isClickDisabled:function(ct){for(;ct&&ct!==this._container;){if(ct._leaflet_disable_click)return!0;ct=ct.parentNode}},_handleDOMEvent:function(ct){var Bt=ct.target||ct.srcElement;if(!(!this._loaded||Bt._leaflet_disable_events||ct.type==="click"&&this._isClickDisabled(Bt))){var me=ct.type;me==="mousedown"&&Ud(Bt),this._fireDOMEvent(ct,me)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(ct,Bt,me){if(ct.type==="click"){var Qe=K({},ct);Qe.type="preclick",this._fireDOMEvent(Qe,Qe.type,me)}var zr=this._findEventTargets(ct,Bt);if(me){for(var An=[],qi=0;qi0?Math.round(ct-Bt)/2:Math.max(0,Math.ceil(ct))-Math.max(0,Math.floor(Bt))},_limitZoom:function(ct){var Bt=this.getMinZoom(),me=this.getMaxZoom(),Qe=El.any3d?this.options.zoomSnap:1;return Qe&&(ct=Math.round(ct/Qe)*Qe),Math.max(Bt,Math.min(me,ct))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ff(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(ct,Bt){var me=this._getCenterOffset(ct)._trunc();return(Bt&&Bt.animate)!==!0&&!this.getSize().contains(me)?!1:(this.panBy(me,Bt),!0)},_createAnimProxy:function(){var ct=this._proxy=Ec("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(ct),this.on("zoomanim",function(Bt){var me=L_,Qe=this._proxy.style[me];mu(this._proxy,this.project(Bt.center,Bt.zoom),this.getZoomScale(Bt.zoom,1)),Qe===this._proxy.style[me]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Tf(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var ct=this.getCenter(),Bt=this.getZoom();mu(this._proxy,this.project(ct,Bt),this.getZoomScale(Bt,1))},_catchTransitionEnd:function(ct){this._animatingZoom&&ct.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(ct,Bt,me){if(this._animatingZoom)return!0;if(me=me||{},!this._zoomAnimated||me.animate===!1||this._nothingToAnimate()||Math.abs(Bt-this._zoom)>this.options.zoomAnimationThreshold)return!1;var Qe=this.getZoomScale(Bt),zr=this._getCenterOffset(ct)._divideBy(1-1/Qe);return me.animate!==!0&&!this.getSize().contains(zr)?!1:(Fi(function(){this._moveStart(!0,me.noMoveStart||!1)._animateZoom(ct,Bt,!0)},this),!0)},_animateZoom:function(ct,Bt,me,Qe){this._mapPane&&(me&&(this._animatingZoom=!0,this._animateToCenter=ct,this._animateToZoom=Bt,Wu(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:ct,zoom:Bt,noUpdate:Qe}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(_t(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ff(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Vs(ct,Bt){return new Ac(ct,Bt)}var lp=Yi.extend({options:{position:"topright"},initialize:function(ct){Tr(this,ct)},getPosition:function(){return this.options.position},setPosition:function(ct){var Bt=this._map;return Bt&&Bt.removeControl(this),this.options.position=ct,Bt&&Bt.addControl(this),this},getContainer:function(){return this._container},addTo:function(ct){this.remove(),this._map=ct;var Bt=this._container=this.onAdd(ct),me=this.getPosition(),Qe=ct._controlCorners[me];return Wu(Bt,"leaflet-control"),me.indexOf("bottom")!==-1?Qe.insertBefore(Bt,Qe.firstChild):Qe.appendChild(Bt),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Tf(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(ct){this._map&&ct&&ct.screenX>0&&ct.screenY>0&&this._map.getContainer().focus()}}),i0=function(ct){return new lp(ct)};Ac.include({addControl:function(ct){return ct.addTo(this),this},removeControl:function(ct){return ct.remove(),this},_initControlPos:function(){var ct=this._controlCorners={},Bt="leaflet-",me=this._controlContainer=Ec("div",Bt+"control-container",this._container);function Qe(zr,An){var qi=Bt+zr+" "+Bt+An;ct[zr+An]=Ec("div",qi,me)}Qe("top","left"),Qe("top","right"),Qe("bottom","left"),Qe("bottom","right")},_clearControlPos:function(){for(var ct in this._controlCorners)Tf(this._controlCorners[ct]);Tf(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var dv=lp.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(ct,Bt,me,Qe){return me1,this._baseLayersList.style.display=ct?"":"none"),this._separator.style.display=Bt&&ct?"":"none",this},_onLayerChange:function(ct){this._handlingClick||this._update();var Bt=this._getLayer(jt(ct.target)),me=Bt.overlay?ct.type==="add"?"overlayadd":"overlayremove":ct.type==="add"?"baselayerchange":null;me&&this._map.fire(me,Bt)},_createRadioElement:function(ct,Bt){var me='",Qe=document.createElement("div");return Qe.innerHTML=me,Qe.firstChild},_addItem:function(ct){var Bt=document.createElement("label"),me=this._map.hasLayer(ct.layer),Qe;ct.overlay?(Qe=document.createElement("input"),Qe.type="checkbox",Qe.className="leaflet-control-layers-selector",Qe.defaultChecked=me):Qe=this._createRadioElement("leaflet-base-layers_"+jt(this),me),this._layerControlInputs.push(Qe),Qe.layerId=jt(ct.layer),zu(Qe,"click",this._onInputClick,this);var zr=document.createElement("span");zr.innerHTML=" "+ct.name;var An=document.createElement("span");Bt.appendChild(An),An.appendChild(Qe),An.appendChild(zr);var qi=ct.overlay?this._overlaysList:this._baseLayersList;return qi.appendChild(Bt),this._checkDisabledLayers(),Bt},_onInputClick:function(){if(!this._preventClick){var ct=this._layerControlInputs,Bt,me,Qe=[],zr=[];this._handlingClick=!0;for(var An=ct.length-1;An>=0;An--)Bt=ct[An],me=this._getLayer(Bt.layerId).layer,Bt.checked?Qe.push(me):Bt.checked||zr.push(me);for(An=0;An=0;zr--)Bt=ct[zr],me=this._getLayer(Bt.layerId).layer,Bt.disabled=me.options.minZoom!==void 0&&Qeme.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var ct=this._section;this._preventClick=!0,zu(ct,"click",mc),this.expand();var Bt=this;setTimeout(function(){Nh(ct,"click",mc),Bt._preventClick=!1})}}),Y0=function(ct,Bt,me){return new dv(ct,Bt,me)},Ls=lp.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(ct){var Bt="leaflet-control-zoom",me=Ec("div",Bt+" leaflet-bar"),Qe=this.options;return this._zoomInButton=this._createButton(Qe.zoomInText,Qe.zoomInTitle,Bt+"-in",me,this._zoomIn),this._zoomOutButton=this._createButton(Qe.zoomOutText,Qe.zoomOutTitle,Bt+"-out",me,this._zoomOut),this._updateDisabled(),ct.on("zoomend zoomlevelschange",this._updateDisabled,this),me},onRemove:function(ct){ct.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(ct){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(ct.shiftKey?3:1))},_createButton:function(ct,Bt,me,Qe,zr){var An=Ec("a",me,Qe);return An.innerHTML=ct,An.href="#",An.title=Bt,An.setAttribute("role","button"),An.setAttribute("aria-label",Bt),fv(An),zu(An,"click",_g),zu(An,"click",zr,this),zu(An,"click",this._refocusOnMap,this),An},_updateDisabled:function(){var ct=this._map,Bt="leaflet-disabled";Ff(this._zoomInButton,Bt),Ff(this._zoomOutButton,Bt),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||ct._zoom===ct.getMinZoom())&&(Wu(this._zoomOutButton,Bt),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||ct._zoom===ct.getMaxZoom())&&(Wu(this._zoomInButton,Bt),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ac.mergeOptions({zoomControl:!0}),Ac.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ls,this.addControl(this.zoomControl))});var bw=function(ct){return new Ls(ct)},I_=lp.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(ct){var Bt="leaflet-control-scale",me=Ec("div",Bt),Qe=this.options;return this._addScales(Qe,Bt+"-line",me),ct.on(Qe.updateWhenIdle?"moveend":"move",this._update,this),ct.whenReady(this._update,this),me},onRemove:function(ct){ct.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(ct,Bt,me){ct.metric&&(this._mScale=Ec("div",Bt,me)),ct.imperial&&(this._iScale=Ec("div",Bt,me))},_update:function(){var ct=this._map,Bt=ct.getSize().y/2,me=ct.distance(ct.containerPointToLatLng([0,Bt]),ct.containerPointToLatLng([this.options.maxWidth,Bt]));this._updateScales(me)},_updateScales:function(ct){this.options.metric&&ct&&this._updateMetric(ct),this.options.imperial&&ct&&this._updateImperial(ct)},_updateMetric:function(ct){var Bt=this._getRoundNum(ct),me=Bt<1e3?Bt+" m":Bt/1e3+" km";this._updateScale(this._mScale,me,Bt/ct)},_updateImperial:function(ct){var Bt=ct*3.2808399,me,Qe,zr;Bt>5280?(me=Bt/5280,Qe=this._getRoundNum(me),this._updateScale(this._iScale,Qe+" mi",Qe/me)):(zr=this._getRoundNum(Bt),this._updateScale(this._iScale,zr+" ft",zr/Bt))},_updateScale:function(ct,Bt,me){ct.style.width=Math.round(this.options.maxWidth*me)+"px",ct.innerHTML=Bt},_getRoundNum:function(ct){var Bt=Math.pow(10,(Math.floor(ct)+"").length-1),me=ct/Bt;return me=me>=10?10:me>=5?5:me>=3?3:me>=2?2:1,Bt*me}}),y6=function(ct){return new I_(ct)},z_='',O_=lp.extend({options:{position:"bottomright",prefix:''+(El.inlineSvg?z_+" ":"")+"Leaflet"},initialize:function(ct){Tr(this,ct),this._attributions={}},onAdd:function(ct){ct.attributionControl=this,this._container=Ec("div","leaflet-control-attribution"),fv(this._container);for(var Bt in ct._layers)ct._layers[Bt].getAttribution&&this.addAttribution(ct._layers[Bt].getAttribution());return this._update(),ct.on("layeradd",this._addAttribution,this),this._container},onRemove:function(ct){ct.off("layeradd",this._addAttribution,this)},_addAttribution:function(ct){ct.layer.getAttribution&&(this.addAttribution(ct.layer.getAttribution()),ct.layer.once("remove",function(){this.removeAttribution(ct.layer.getAttribution())},this))},setPrefix:function(ct){return this.options.prefix=ct,this._update(),this},addAttribution:function(ct){return ct?(this._attributions[ct]||(this._attributions[ct]=0),this._attributions[ct]++,this._update(),this):this},removeAttribution:function(ct){return ct?(this._attributions[ct]&&(this._attributions[ct]--,this._update()),this):this},_update:function(){if(this._map){var ct=[];for(var Bt in this._attributions)this._attributions[Bt]&&ct.push(Bt);var me=[];this.options.prefix&&me.push(this.options.prefix),ct.length&&me.push(ct.join(", ")),this._container.innerHTML=me.join(' ')}}});Ac.mergeOptions({attributionControl:!0}),Ac.addInitHook(function(){this.options.attributionControl&&new O_().addTo(this)});var x6=function(ct){return new O_(ct)};lp.Layers=dv,lp.Zoom=Ls,lp.Scale=I_,lp.Attribution=O_,i0.layers=Y0,i0.zoom=bw,i0.scale=y6,i0.attribution=x6;var K0=Yi.extend({initialize:function(ct){this._map=ct},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});K0.addTo=function(ct,Bt){return ct.addHandler(Bt,this),this};var up={Events:Ni},P0=El.touch?"touchstart mousedown":"mousedown",jm=si.extend({options:{clickTolerance:3},initialize:function(ct,Bt,me,Qe){Tr(this,Qe),this._element=ct,this._dragStartTarget=Bt||ct,this._preventOutline=me},enable:function(){this._enabled||(zu(this._dragStartTarget,P0,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(jm._dragging===this&&this.finishDrag(!0),Nh(this._dragStartTarget,P0,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(ct){if(this._enabled&&(this._moved=!1,!P_(this._element,"leaflet-zoom-anim"))){if(ct.touches&&ct.touches.length!==1){jm._dragging===this&&this.finishDrag();return}if(!(jm._dragging||ct.shiftKey||ct.which!==1&&ct.button!==1&&!ct.touches)&&(jm._dragging=this,this._preventOutline&&Ud(this._element),Kc(),C0(),!this._moving)){this.fire("down");var Bt=ct.touches?ct.touches[0]:ct,me=Td(this._element);this._startPoint=new Ma(Bt.clientX,Bt.clientY),this._startPos=Rc(this._element),this._parentScale=M1(me);var Qe=ct.type==="mousedown";zu(document,Qe?"mousemove":"touchmove",this._onMove,this),zu(document,Qe?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(ct){if(this._enabled){if(ct.touches&&ct.touches.length>1){this._moved=!0;return}var Bt=ct.touches&&ct.touches.length===1?ct.touches[0]:ct,me=new Ma(Bt.clientX,Bt.clientY)._subtract(this._startPoint);!me.x&&!me.y||Math.abs(me.x)+Math.abs(me.y)An&&(qi=ja,An=Ka);An>me&&(Bt[qi]=1,kg(ct,Bt,me,Qe,qi),kg(ct,Bt,me,qi,zr))}function kw(ct,Bt){for(var me=[ct[0]],Qe=1,zr=0,An=ct.length;QeBt&&(me.push(ct[Qe]),zr=Qe);return zrBt.max.x&&(me|=2),ct.yBt.max.y&&(me|=8),me}function w6(ct,Bt){var me=Bt.x-ct.x,Qe=Bt.y-ct.y;return me*me+Qe*Qe}function pv(ct,Bt,me,Qe){var zr=Bt.x,An=Bt.y,qi=me.x-zr,ja=me.y-An,Ka=qi*qi+ja*ja,xo;return Ka>0&&(xo=((ct.x-zr)*qi+(ct.y-An)*ja)/Ka,xo>1?(zr=me.x,An=me.y):xo>0&&(zr+=qi*xo,An+=ja*xo)),qi=ct.x-zr,ja=ct.y-An,Qe?qi*qi+ja*ja:new Ma(zr,An)}function g0(ct){return!cn(ct[0])||typeof ct[0][0]!="object"&&typeof ct[0][0]<"u"}function Tw(ct){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),g0(ct)}function Aw(ct,Bt){var me,Qe,zr,An,qi,ja,Ka,xo;if(!ct||ct.length===0)throw new Error("latlngs not passed");g0(ct)||(console.warn("latlngs are not flat! Only the first ring will be used"),ct=ct[0]);var Ws=Ia([0,0]),_l=ko(ct),Fu=_l.getNorthWest().distanceTo(_l.getSouthWest())*_l.getNorthEast().distanceTo(_l.getNorthWest());Fu<1700&&(Ws=Uy(ct));var Md=ct.length,Rf=[];for(me=0;meQe){Ka=(An-Qe)/zr,xo=[ja.x-Ka*(ja.x-qi.x),ja.y-Ka*(ja.y-qi.y)];break}var kp=Bt.unproject(ho(xo));return Ia([kp.lat+Ws.lat,kp.lng+Ws.lng])}var tf={__proto__:null,simplify:F_,pointToSegmentDistance:ww,closestPointOnSegment:wg,clipSegment:B_,_getEdgeIntersection:Tg,_getBitCode:Ag,_sqClosestPointOnSegment:pv,isFlat:g0,_flat:Tw,polylineCenter:Aw},v0={project:function(ct){return new Ma(ct.lng,ct.lat)},unproject:function(ct){return new ro(ct.y,ct.x)},bounds:new mo([-180,-90],[180,90])},mv={R:6378137,R_MINOR:6356752314245179e-9,bounds:new mo([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(ct){var Bt=Math.PI/180,me=this.R,Qe=ct.lat*Bt,zr=this.R_MINOR/me,An=Math.sqrt(1-zr*zr),qi=An*Math.sin(Qe),ja=Math.tan(Math.PI/4-Qe/2)/Math.pow((1-qi)/(1+qi),An/2);return Qe=-me*Math.log(Math.max(ja,1e-10)),new Ma(ct.lng*Bt*me,Qe)},unproject:function(ct){for(var Bt=180/Math.PI,me=this.R,Qe=this.R_MINOR/me,zr=Math.sqrt(1-Qe*Qe),An=Math.exp(-ct.y/me),qi=Math.PI/2-2*Math.atan(An),ja=0,Ka=.1,xo;ja<15&&Math.abs(Ka)>1e-7;ja++)xo=zr*Math.sin(qi),xo=Math.pow((1-xo)/(1+xo),zr/2),Ka=Math.PI/2-2*Math.atan(An*xo)-qi,qi+=Ka;return new ro(qi*Bt,ct.x*Bt/me)}},N_={__proto__:null,LonLat:v0,Mercator:mv,SphericalMercator:us},j_=K({},no,{code:"EPSG:3395",projection:mv,transformation:function(){var ct=.5/(Math.PI*mv.R);return vi(ct,.5,-ct,.5)}()}),Vy=K({},no,{code:"EPSG:4326",projection:v0,transformation:vi(1/180,1,-1/180,.5)}),Mg=K({},da,{projection:v0,transformation:vi(1,0,-1,0),scale:function(ct){return Math.pow(2,ct)},zoom:function(ct){return Math.log(ct)/Math.LN2},distance:function(ct,Bt){var me=Bt.lng-ct.lng,Qe=Bt.lat-ct.lat;return Math.sqrt(me*me+Qe*Qe)},infinite:!0});da.Earth=no,da.EPSG3395=j_,da.EPSG3857=wi,da.EPSG900913=hi,da.EPSG4326=Vy,da.Simple=Mg;var a0=si.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(ct){return ct.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(ct){return ct&&ct.removeLayer(this),this},getPane:function(ct){return this._map.getPane(ct?this.options[ct]||ct:this.options.pane)},addInteractiveTarget:function(ct){return this._map._targets[jt(ct)]=this,this},removeInteractiveTarget:function(ct){return delete this._map._targets[jt(ct)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(ct){var Bt=ct.target;if(Bt.hasLayer(this)){if(this._map=Bt,this._zoomAnimated=Bt._zoomAnimated,this.getEvents){var me=this.getEvents();Bt.on(me,this),this.once("remove",function(){Bt.off(me,this)},this)}this.onAdd(Bt),this.fire("add"),Bt.fire("layeradd",{layer:this})}}});Ac.include({addLayer:function(ct){if(!ct._layerAdd)throw new Error("The provided object is not a Layer.");var Bt=jt(ct);return this._layers[Bt]?this:(this._layers[Bt]=ct,ct._mapToAdd=this,ct.beforeAdd&&ct.beforeAdd(this),this.whenReady(ct._layerAdd,ct),this)},removeLayer:function(ct){var Bt=jt(ct);return this._layers[Bt]?(this._loaded&&ct.onRemove(this),delete this._layers[Bt],this._loaded&&(this.fire("layerremove",{layer:ct}),ct.fire("remove")),ct._map=ct._mapToAdd=null,this):this},hasLayer:function(ct){return jt(ct)in this._layers},eachLayer:function(ct,Bt){for(var me in this._layers)ct.call(Bt,this._layers[me]);return this},_addLayers:function(ct){ct=ct?cn(ct)?ct:[ct]:[];for(var Bt=0,me=ct.length;Btthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&Bt[0]instanceof ro&&Bt[0].equals(Bt[me-1])&&Bt.pop(),Bt},_setLatLngs:function(ct){y0.prototype._setLatLngs.call(this,ct),g0(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return g0(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var ct=this._renderer._bounds,Bt=this.options.weight,me=new Ma(Bt,Bt);if(ct=new mo(ct.min.subtract(me),ct.max.add(me)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(ct))){if(this.options.noClip){this._parts=this._rings;return}for(var Qe=0,zr=this._rings.length,An;Qect.y!=zr.y>ct.y&&ct.x<(zr.x-Qe.x)*(ct.y-Qe.y)/(zr.y-Qe.y)+Qe.x&&(Bt=!Bt);return Bt||y0.prototype._containsPoint.call(this,ct,!0)}});function T6(ct,Bt){return new yv(ct,Bt)}var pm=wp.extend({initialize:function(ct,Bt){Tr(this,Bt),this._layers={},ct&&this.addData(ct)},addData:function(ct){var Bt=cn(ct)?ct:ct.features,me,Qe,zr;if(Bt){for(me=0,Qe=Bt.length;me0&&zr.push(zr[0].slice()),zr}function mm(ct,Bt){return ct.feature?K({},ct.feature,{geometry:Bt}):Yy(Bt)}function Yy(ct){return ct.type==="Feature"||ct.type==="FeatureCollection"?ct:{type:"Feature",properties:{},geometry:ct}}var q_={toGeoJSON:function(ct){return mm(this,{type:"Point",coordinates:W_(this.getLatLng(),ct)})}};E1.include(q_),qy.include(q_),Wy.include(q_),y0.include({toGeoJSON:function(ct){var Bt=!g0(this._latlngs),me=Gy(this._latlngs,Bt?1:0,!1,ct);return mm(this,{type:(Bt?"Multi":"")+"LineString",coordinates:me})}}),yv.include({toGeoJSON:function(ct){var Bt=!g0(this._latlngs),me=Bt&&!g0(this._latlngs[0]),Qe=Gy(this._latlngs,me?2:Bt?1:0,!0,ct);return Bt||(Qe=[Qe]),mm(this,{type:(me?"Multi":"")+"Polygon",coordinates:Qe})}}),Sg.include({toMultiPoint:function(ct){var Bt=[];return this.eachLayer(function(me){Bt.push(me.toGeoJSON(ct).geometry.coordinates)}),mm(this,{type:"MultiPoint",coordinates:Bt})},toGeoJSON:function(ct){var Bt=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(Bt==="MultiPoint")return this.toMultiPoint(ct);var me=Bt==="GeometryCollection",Qe=[];return this.eachLayer(function(zr){if(zr.toGeoJSON){var An=zr.toGeoJSON(ct);if(me)Qe.push(An.geometry);else{var qi=Yy(An);qi.type==="FeatureCollection"?Qe.push.apply(Qe,qi.features):Qe.push(qi)}}}),me?mm(this,{geometries:Qe,type:"GeometryCollection"}):{type:"FeatureCollection",features:Qe}}});function $_(ct,Bt){return new pm(ct,Bt)}var Ky=$_,gm=a0.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(ct,Bt,me){this._url=ct,this._bounds=ko(Bt),Tr(this,me)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Wu(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Tf(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(ct){return this.options.opacity=ct,this._image&&this._updateOpacity(),this},setStyle:function(ct){return ct.opacity&&this.setOpacity(ct.opacity),this},bringToFront:function(){return this._map&&hv(this._image),this},bringToBack:function(){return this._map&&kn(this._image),this},setUrl:function(ct){return this._url=ct,this._image&&(this._image.src=ct),this},setBounds:function(ct){return this._bounds=ko(ct),this._map&&this._reset(),this},getEvents:function(){var ct={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(ct.zoomanim=this._animateZoom),ct},setZIndex:function(ct){return this.options.zIndex=ct,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var ct=this._url.tagName==="IMG",Bt=this._image=ct?this._url:Ec("img");if(Wu(Bt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Bt,"leaflet-zoom-animated"),this.options.className&&Wu(Bt,this.options.className),Bt.onselectstart=De,Bt.onmousemove=De,Bt.onload=_t(this.fire,this,"load"),Bt.onerror=_t(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(Bt.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),ct){this._url=Bt.src;return}Bt.src=this._url,Bt.alt=this.options.alt},_animateZoom:function(ct){var Bt=this._map.getZoomScale(ct.zoom),me=this._map._latLngBoundsToNewLayerBounds(this._bounds,ct.zoom,ct.center).min;mu(this._image,me,Bt)},_reset:function(){var ct=this._image,Bt=new mo(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),me=Bt.getSize();ic(ct,Bt.min),ct.style.width=me.x+"px",ct.style.height=me.y+"px"},_updateOpacity:function(){m0(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var ct=this.options.errorOverlayUrl;ct&&this._url!==ct&&(this._url=ct,this._image.src=ct)},getCenter:function(){return this._bounds.getCenter()}}),vm=function(ct,Bt,me){return new gm(ct,Bt,me)},I0=gm.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var ct=this._url.tagName==="VIDEO",Bt=this._image=ct?this._url:Ec("video");if(Wu(Bt,"leaflet-image-layer"),this._zoomAnimated&&Wu(Bt,"leaflet-zoom-animated"),this.options.className&&Wu(Bt,this.options.className),Bt.onselectstart=De,Bt.onmousemove=De,Bt.onloadeddata=_t(this.fire,this,"load"),ct){for(var me=Bt.getElementsByTagName("source"),Qe=[],zr=0;zr0?Qe:[Bt.src];return}cn(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(Bt.style,"objectFit")&&(Bt.style.objectFit="fill"),Bt.autoplay=!!this.options.autoplay,Bt.loop=!!this.options.loop,Bt.muted=!!this.options.muted,Bt.playsInline=!!this.options.playsInline;for(var An=0;Anzr?(Bt.height=zr+"px",Wu(ct,An)):Ff(ct,An),this._containerWidth=this._container.offsetWidth},_animateZoom:function(ct){var Bt=this._map._latLngToNewLayerPoint(this._latlng,ct.zoom,ct.center),me=this._getAnchor();ic(this._container,Bt.add(me))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var ct=this._map,Bt=parseInt(T1(this._container,"marginBottom"),10)||0,me=this._container.offsetHeight+Bt,Qe=this._containerWidth,zr=new Ma(this._containerLeft,-me-this._containerBottom);zr._add(Rc(this._container));var An=ct.layerPointToContainerPoint(zr),qi=ho(this.options.autoPanPadding),ja=ho(this.options.autoPanPaddingTopLeft||qi),Ka=ho(this.options.autoPanPaddingBottomRight||qi),xo=ct.getSize(),Ws=0,_l=0;An.x+Qe+Ka.x>xo.x&&(Ws=An.x+Qe-xo.x+Ka.x),An.x-Ws-ja.x<0&&(Ws=An.x-ja.x),An.y+me+Ka.y>xo.y&&(_l=An.y+me-xo.y+Ka.y),An.y-_l-ja.y<0&&(_l=An.y-ja.y),(Ws||_l)&&(this.options.keepInView&&(this._autopanning=!0),ct.fire("autopanstart").panBy([Ws,_l]))}},_getAnchor:function(){return ho(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),vf=function(ct,Bt){return new Eg(ct,Bt)};Ac.mergeOptions({closePopupOnClick:!0}),Ac.include({openPopup:function(ct,Bt,me){return this._initOverlay(Eg,ct,Bt,me).openOn(this),this},closePopup:function(ct){return ct=arguments.length?ct:this._popup,ct&&ct.close(),this}}),a0.include({bindPopup:function(ct,Bt){return this._popup=this._initOverlay(Eg,this._popup,ct,Bt),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(ct){return this._popup&&(this instanceof wp||(this._popup._source=this),this._popup._prepareOpen(ct||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(ct){return this._popup&&this._popup.setContent(ct),this},getPopup:function(){return this._popup},_openPopup:function(ct){if(!(!this._popup||!this._map)){_g(ct);var Bt=ct.layer||ct.target;if(this._popup._source===Bt&&!(Bt instanceof Vm)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(ct.latlng);return}this._popup._source=Bt,this.openPopup(ct.latlng)}},_movePopup:function(ct){this._popup.setLatLng(ct.latlng)},_onKeyPress:function(ct){ct.originalEvent.keyCode===13&&this._openPopup(ct)}});var C1=X0.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(ct){X0.prototype.onAdd.call(this,ct),this.setOpacity(this.options.opacity),ct.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(ct){X0.prototype.onRemove.call(this,ct),ct.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var ct=X0.prototype.getEvents.call(this);return this.options.permanent||(ct.preclick=this.close),ct},_initLayout:function(){var ct="leaflet-tooltip",Bt=ct+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Ec("div",Bt),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+jt(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(ct){var Bt,me,Qe=this._map,zr=this._container,An=Qe.latLngToContainerPoint(Qe.getCenter()),qi=Qe.layerPointToContainerPoint(ct),ja=this.options.direction,Ka=zr.offsetWidth,xo=zr.offsetHeight,Ws=ho(this.options.offset),_l=this._getAnchor();ja==="top"?(Bt=Ka/2,me=xo):ja==="bottom"?(Bt=Ka/2,me=0):ja==="center"?(Bt=Ka/2,me=xo/2):ja==="right"?(Bt=0,me=xo/2):ja==="left"?(Bt=Ka,me=xo/2):qi.xthis.options.maxZoom||meQe?this._retainParent(zr,An,qi,Qe):!1)},_retainChildren:function(ct,Bt,me,Qe){for(var zr=2*ct;zr<2*ct+2;zr++)for(var An=2*Bt;An<2*Bt+2;An++){var qi=new Ma(zr,An);qi.z=me+1;var ja=this._tileCoordsToKey(qi),Ka=this._tiles[ja];if(Ka&&Ka.active){Ka.retain=!0;continue}else Ka&&Ka.loaded&&(Ka.retain=!0);me+1this.options.maxZoom||this.options.minZoom!==void 0&&zr1){this._setView(ct,me);return}for(var _l=zr.min.y;_l<=zr.max.y;_l++)for(var Fu=zr.min.x;Fu<=zr.max.x;Fu++){var Md=new Ma(Fu,_l);if(Md.z=this._tileZoom,!!this._isValidTile(Md)){var Rf=this._tiles[this._tileCoordsToKey(Md)];Rf?Rf.current=!0:qi.push(Md)}}if(qi.sort(function(kp,Wm){return kp.distanceTo(An)-Wm.distanceTo(An)}),qi.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var _0=document.createDocumentFragment();for(Fu=0;Fume.max.x)||!Bt.wrapLat&&(ct.yme.max.y))return!1}if(!this.options.bounds)return!0;var Qe=this._tileCoordsToBounds(ct);return ko(this.options.bounds).overlaps(Qe)},_keyToBounds:function(ct){return this._tileCoordsToBounds(this._keyToTileCoords(ct))},_tileCoordsToNwSe:function(ct){var Bt=this._map,me=this.getTileSize(),Qe=ct.scaleBy(me),zr=Qe.add(me),An=Bt.unproject(Qe,ct.z),qi=Bt.unproject(zr,ct.z);return[An,qi]},_tileCoordsToBounds:function(ct){var Bt=this._tileCoordsToNwSe(ct),me=new xl(Bt[0],Bt[1]);return this.options.noWrap||(me=this._map.wrapLatLngBounds(me)),me},_tileCoordsToKey:function(ct){return ct.x+":"+ct.y+":"+ct.z},_keyToTileCoords:function(ct){var Bt=ct.split(":"),me=new Ma(+Bt[0],+Bt[1]);return me.z=+Bt[2],me},_removeTile:function(ct){var Bt=this._tiles[ct];Bt&&(Tf(Bt.el),delete this._tiles[ct],this.fire("tileunload",{tile:Bt.el,coords:this._keyToTileCoords(ct)}))},_initTile:function(ct){Wu(ct,"leaflet-tile");var Bt=this.getTileSize();ct.style.width=Bt.x+"px",ct.style.height=Bt.y+"px",ct.onselectstart=De,ct.onmousemove=De,El.ielt9&&this.options.opacity<1&&m0(ct,this.options.opacity)},_addTile:function(ct,Bt){var me=this._getTilePos(ct),Qe=this._tileCoordsToKey(ct),zr=this.createTile(this._wrapCoords(ct),_t(this._tileReady,this,ct));this._initTile(zr),this.createTile.length<2&&Fi(_t(this._tileReady,this,ct,null,zr)),ic(zr,me),this._tiles[Qe]={el:zr,coords:ct,current:!0},Bt.appendChild(zr),this.fire("tileloadstart",{tile:zr,coords:ct})},_tileReady:function(ct,Bt,me){Bt&&this.fire("tileerror",{error:Bt,tile:me,coords:ct});var Qe=this._tileCoordsToKey(ct);me=this._tiles[Qe],me&&(me.loaded=+new Date,this._map._fadeAnimated?(m0(me.el,0),Pi(this._fadeFrame),this._fadeFrame=Fi(this._updateOpacity,this)):(me.active=!0,this._pruneTiles()),Bt||(Wu(me.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:me.el,coords:ct})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),El.ielt9||!this._map._fadeAnimated?Fi(this._pruneTiles,this):setTimeout(_t(this._pruneTiles,this),250)))},_getTilePos:function(ct){return ct.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(ct){var Bt=new Ma(this._wrapX?he(ct.x,this._wrapX):ct.x,this._wrapY?he(ct.y,this._wrapY):ct.y);return Bt.z=ct.z,Bt},_pxBoundsToTileRange:function(ct){var Bt=this.getTileSize();return new mo(ct.min.unscaleBy(Bt).floor(),ct.max.unscaleBy(Bt).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var ct in this._tiles)if(!this._tiles[ct].loaded)return!1;return!0}});function G_(ct){return new L1(ct)}var o0=L1.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(ct,Bt){this._url=ct,Bt=Tr(this,Bt),Bt.detectRetina&&El.retina&&Bt.maxZoom>0?(Bt.tileSize=Math.floor(Bt.tileSize/2),Bt.zoomReverse?(Bt.zoomOffset--,Bt.minZoom=Math.min(Bt.maxZoom,Bt.minZoom+1)):(Bt.zoomOffset++,Bt.maxZoom=Math.max(Bt.minZoom,Bt.maxZoom-1)),Bt.minZoom=Math.max(0,Bt.minZoom)):Bt.zoomReverse?Bt.minZoom=Math.min(Bt.maxZoom,Bt.minZoom):Bt.maxZoom=Math.max(Bt.minZoom,Bt.maxZoom),typeof Bt.subdomains=="string"&&(Bt.subdomains=Bt.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(ct,Bt){return this._url===ct&&Bt===void 0&&(Bt=!0),this._url=ct,Bt||this.redraw(),this},createTile:function(ct,Bt){var me=document.createElement("img");return zu(me,"load",_t(this._tileOnLoad,this,Bt,me)),zu(me,"error",_t(this._tileOnError,this,Bt,me)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(me.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(me.referrerPolicy=this.options.referrerPolicy),me.alt="",me.src=this.getTileUrl(ct),me},getTileUrl:function(ct){var Bt={r:El.retina?"@2x":"",s:this._getSubdomain(ct),x:ct.x,y:ct.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var me=this._globalTileRange.max.y-ct.y;this.options.tms&&(Bt.y=me),Bt["-y"]=me}return Dt(this._url,K(Bt,this.options))},_tileOnLoad:function(ct,Bt){El.ielt9?setTimeout(_t(ct,this,null,Bt),0):ct(null,Bt)},_tileOnError:function(ct,Bt,me){var Qe=this.options.errorTileUrl;Qe&&Bt.getAttribute("src")!==Qe&&(Bt.src=Qe),ct(me,Bt)},_onTileRemove:function(ct){ct.tile.onload=null},_getZoomForUrl:function(){var ct=this._tileZoom,Bt=this.options.maxZoom,me=this.options.zoomReverse,Qe=this.options.zoomOffset;return me&&(ct=Bt-ct),ct+Qe},_getSubdomain:function(ct){var Bt=Math.abs(ct.x+ct.y)%this.options.subdomains.length;return this.options.subdomains[Bt]},_abortLoading:function(){var ct,Bt;for(ct in this._tiles)if(this._tiles[ct].coords.z!==this._tileZoom&&(Bt=this._tiles[ct].el,Bt.onload=De,Bt.onerror=De,!Bt.complete)){Bt.src=Bn;var me=this._tiles[ct].coords;Tf(Bt),delete this._tiles[ct],this.fire("tileabort",{tile:Bt,coords:me})}},_removeTile:function(ct){var Bt=this._tiles[ct];if(Bt)return Bt.el.setAttribute("src",Bn),L1.prototype._removeTile.call(this,ct)},_tileReady:function(ct,Bt,me){if(!(!this._map||me&&me.getAttribute("src")===Bn))return L1.prototype._tileReady.call(this,ct,Bt,me)}});function Xy(ct,Bt){return new o0(ct,Bt)}var Jy=o0.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(ct,Bt){this._url=ct;var me=K({},this.defaultWmsParams);for(var Qe in Bt)Qe in this.options||(me[Qe]=Bt[Qe]);Bt=Tr(this,Bt);var zr=Bt.detectRetina&&El.retina?2:1,An=this.getTileSize();me.width=An.x*zr,me.height=An.y*zr,this.wmsParams=me},onAdd:function(ct){this._crs=this.options.crs||ct.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var Bt=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[Bt]=this._crs.code,o0.prototype.onAdd.call(this,ct)},getTileUrl:function(ct){var Bt=this._tileCoordsToNwSe(ct),me=this._crs,Qe=Ts(me.project(Bt[0]),me.project(Bt[1])),zr=Qe.min,An=Qe.max,qi=(this._wmsVersion>=1.3&&this._crs===Vy?[zr.y,zr.x,An.y,An.x]:[zr.x,zr.y,An.x,An.y]).join(","),ja=o0.prototype.getTileUrl.call(this,ct);return ja+Vr(this.wmsParams,ja,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+qi},setParams:function(ct,Bt){return K(this.wmsParams,ct),Bt||this.redraw(),this}});function Iw(ct,Bt){return new Jy(ct,Bt)}o0.WMS=Jy,Xy.wms=Iw;var ym=a0.extend({options:{padding:.1},initialize:function(ct){Tr(this,ct),jt(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Wu(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var ct={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(ct.zoomanim=this._onAnimZoom),ct},_onAnimZoom:function(ct){this._updateTransform(ct.center,ct.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(ct,Bt){var me=this._map.getZoomScale(Bt,this._zoom),Qe=this._map.getSize().multiplyBy(.5+this.options.padding),zr=this._map.project(this._center,Bt),An=Qe.multiplyBy(-me).add(zr).subtract(this._map._getNewPixelOrigin(ct,Bt));El.any3d?mu(this._container,An,me):ic(this._container,An)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var ct in this._layers)this._layers[ct]._reset()},_onZoomEnd:function(){for(var ct in this._layers)this._layers[ct]._project()},_updatePaths:function(){for(var ct in this._layers)this._layers[ct]._update()},_update:function(){var ct=this.options.padding,Bt=this._map.getSize(),me=this._map.containerPointToLayerPoint(Bt.multiplyBy(-ct)).round();this._bounds=new mo(me,me.add(Bt.multiplyBy(1+ct*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),zw=ym.extend({options:{tolerance:0},getEvents:function(){var ct=ym.prototype.getEvents.call(this);return ct.viewprereset=this._onViewPreReset,ct},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ym.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var ct=this._container=document.createElement("canvas");zu(ct,"mousemove",this._onMouseMove,this),zu(ct,"click dblclick mousedown mouseup contextmenu",this._onClick,this),zu(ct,"mouseout",this._handleMouseOut,this),ct._leaflet_disable_events=!0,this._ctx=ct.getContext("2d")},_destroyContainer:function(){Pi(this._redrawRequest),delete this._ctx,Tf(this._container),Nh(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var ct;this._redrawBounds=null;for(var Bt in this._layers)ct=this._layers[Bt],ct._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ym.prototype._update.call(this);var ct=this._bounds,Bt=this._container,me=ct.getSize(),Qe=El.retina?2:1;ic(Bt,ct.min),Bt.width=Qe*me.x,Bt.height=Qe*me.y,Bt.style.width=me.x+"px",Bt.style.height=me.y+"px",El.retina&&this._ctx.scale(2,2),this._ctx.translate(-ct.min.x,-ct.min.y),this.fire("update")}},_reset:function(){ym.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(ct){this._updateDashArray(ct),this._layers[jt(ct)]=ct;var Bt=ct._order={layer:ct,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=Bt),this._drawLast=Bt,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(ct){this._requestRedraw(ct)},_removePath:function(ct){var Bt=ct._order,me=Bt.next,Qe=Bt.prev;me?me.prev=Qe:this._drawLast=Qe,Qe?Qe.next=me:this._drawFirst=me,delete ct._order,delete this._layers[jt(ct)],this._requestRedraw(ct)},_updatePath:function(ct){this._extendRedrawBounds(ct),ct._project(),ct._update(),this._requestRedraw(ct)},_updateStyle:function(ct){this._updateDashArray(ct),this._requestRedraw(ct)},_updateDashArray:function(ct){if(typeof ct.options.dashArray=="string"){var Bt=ct.options.dashArray.split(/[, ]+/),me=[],Qe,zr;for(zr=0;zr')}}catch{}return function(ct){return document.createElement("<"+ct+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),S6={_initContainer:function(){this._container=Ec("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ym.prototype._update.call(this),this.fire("update"))},_initPath:function(ct){var Bt=ct._container=P1("shape");Wu(Bt,"leaflet-vml-shape "+(this.options.className||"")),Bt.coordsize="1 1",ct._path=P1("path"),Bt.appendChild(ct._path),this._updateStyle(ct),this._layers[jt(ct)]=ct},_addPath:function(ct){var Bt=ct._container;this._container.appendChild(Bt),ct.options.interactive&&ct.addInteractiveTarget(Bt)},_removePath:function(ct){var Bt=ct._container;Tf(Bt),ct.removeInteractiveTarget(Bt),delete this._layers[jt(ct)]},_updateStyle:function(ct){var Bt=ct._stroke,me=ct._fill,Qe=ct.options,zr=ct._container;zr.stroked=!!Qe.stroke,zr.filled=!!Qe.fill,Qe.stroke?(Bt||(Bt=ct._stroke=P1("stroke")),zr.appendChild(Bt),Bt.weight=Qe.weight+"px",Bt.color=Qe.color,Bt.opacity=Qe.opacity,Qe.dashArray?Bt.dashStyle=cn(Qe.dashArray)?Qe.dashArray.join(" "):Qe.dashArray.replace(/( *, *)/g," "):Bt.dashStyle="",Bt.endcap=Qe.lineCap.replace("butt","flat"),Bt.joinstyle=Qe.lineJoin):Bt&&(zr.removeChild(Bt),ct._stroke=null),Qe.fill?(me||(me=ct._fill=P1("fill")),zr.appendChild(me),me.color=Qe.fillColor||Qe.color,me.opacity=Qe.fillOpacity):me&&(zr.removeChild(me),ct._fill=null)},_updateCircle:function(ct){var Bt=ct._point.round(),me=Math.round(ct._radius),Qe=Math.round(ct._radiusY||me);this._setPath(ct,ct._empty()?"M0 0":"AL "+Bt.x+","+Bt.y+" "+me+","+Qe+" 0,"+65535*360)},_setPath:function(ct,Bt){ct._path.v=Bt},_bringToFront:function(ct){hv(ct._container)},_bringToBack:function(ct){kn(ct._container)}},Hm=El.vml?P1:go,Rp=ym.extend({_initContainer:function(){this._container=Hm("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Hm("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Tf(this._container),Nh(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ym.prototype._update.call(this);var ct=this._bounds,Bt=ct.getSize(),me=this._container;(!this._svgSize||!this._svgSize.equals(Bt))&&(this._svgSize=Bt,me.setAttribute("width",Bt.x),me.setAttribute("height",Bt.y)),ic(me,ct.min),me.setAttribute("viewBox",[ct.min.x,ct.min.y,Bt.x,Bt.y].join(" ")),this.fire("update")}},_initPath:function(ct){var Bt=ct._path=Hm("path");ct.options.className&&Wu(Bt,ct.options.className),ct.options.interactive&&Wu(Bt,"leaflet-interactive"),this._updateStyle(ct),this._layers[jt(ct)]=ct},_addPath:function(ct){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(ct._path),ct.addInteractiveTarget(ct._path)},_removePath:function(ct){Tf(ct._path),ct.removeInteractiveTarget(ct._path),delete this._layers[jt(ct)]},_updatePath:function(ct){ct._project(),ct._update()},_updateStyle:function(ct){var Bt=ct._path,me=ct.options;Bt&&(me.stroke?(Bt.setAttribute("stroke",me.color),Bt.setAttribute("stroke-opacity",me.opacity),Bt.setAttribute("stroke-width",me.weight),Bt.setAttribute("stroke-linecap",me.lineCap),Bt.setAttribute("stroke-linejoin",me.lineJoin),me.dashArray?Bt.setAttribute("stroke-dasharray",me.dashArray):Bt.removeAttribute("stroke-dasharray"),me.dashOffset?Bt.setAttribute("stroke-dashoffset",me.dashOffset):Bt.removeAttribute("stroke-dashoffset")):Bt.setAttribute("stroke","none"),me.fill?(Bt.setAttribute("fill",me.fillColor||me.color),Bt.setAttribute("fill-opacity",me.fillOpacity),Bt.setAttribute("fill-rule",me.fillRule||"evenodd")):Bt.setAttribute("fill","none"))},_updatePoly:function(ct,Bt){this._setPath(ct,Mo(ct._parts,Bt))},_updateCircle:function(ct){var Bt=ct._point,me=Math.max(Math.round(ct._radius),1),Qe=Math.max(Math.round(ct._radiusY),1)||me,zr="a"+me+","+Qe+" 0 1,0 ",An=ct._empty()?"M0 0":"M"+(Bt.x-me)+","+Bt.y+zr+me*2+",0 "+zr+-me*2+",0 ";this._setPath(ct,An)},_setPath:function(ct,Bt){ct._path.setAttribute("d",Bt)},_bringToFront:function(ct){hv(ct._path)},_bringToBack:function(ct){kn(ct._path)}});El.vml&&Rp.include(S6);function Ow(ct){return El.svg||El.vml?new Rp(ct):null}Ac.include({getRenderer:function(ct){var Bt=ct.options.renderer||this._getPaneRenderer(ct.options.pane)||this.options.renderer||this._renderer;return Bt||(Bt=this._renderer=this._createRenderer()),this.hasLayer(Bt)||this.addLayer(Bt),Bt},_getPaneRenderer:function(ct){if(ct==="overlayPane"||ct===void 0)return!1;var Bt=this._paneRenderers[ct];return Bt===void 0&&(Bt=this._createRenderer({pane:ct}),this._paneRenderers[ct]=Bt),Bt},_createRenderer:function(ct){return this.options.preferCanvas&&Y_(ct)||Ow(ct)}});var s0=yv.extend({initialize:function(ct,Bt){yv.prototype.initialize.call(this,this._boundsToLatLngs(ct),Bt)},setBounds:function(ct){return this.setLatLngs(this._boundsToLatLngs(ct))},_boundsToLatLngs:function(ct){return ct=ko(ct),[ct.getSouthWest(),ct.getNorthWest(),ct.getNorthEast(),ct.getSouthEast()]}});function z0(ct,Bt){return new s0(ct,Bt)}Rp.create=Hm,Rp.pointsToPath=Mo,pm.geometryToLayer=$y,pm.coordsToLatLng=H_,pm.coordsToLatLngs=Zy,pm.latLngToCoords=W_,pm.latLngsToCoords=Gy,pm.getFeature=mm,pm.asFeature=Yy,Ac.mergeOptions({boxZoom:!0});var xv=K0.extend({initialize:function(ct){this._map=ct,this._container=ct._container,this._pane=ct._panes.overlayPane,this._resetStateTimeout=0,ct.on("unload",this._destroy,this)},addHooks:function(){zu(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Nh(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Tf(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(ct){if(!ct.shiftKey||ct.which!==1&&ct.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),C0(),Kc(),this._startPoint=this._map.mouseEventToContainerPoint(ct),zu(document,{contextmenu:_g,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(ct){this._moved||(this._moved=!0,this._box=Ec("div","leaflet-zoom-box",this._container),Wu(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(ct);var Bt=new mo(this._point,this._startPoint),me=Bt.getSize();ic(this._box,Bt.min),this._box.style.width=me.x+"px",this._box.style.height=me.y+"px"},_finish:function(){this._moved&&(Tf(this._box),Ff(this._container,"leaflet-crosshair")),vg(),Dp(),Nh(document,{contextmenu:_g,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(ct){if(!(ct.which!==1&&ct.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(_t(this._resetState,this),0);var Bt=new xl(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(Bt).fire("boxzoomend",{boxZoomBounds:Bt})}},_onKeyDown:function(ct){ct.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ac.addInitHook("addHandler","boxZoom",xv),Ac.mergeOptions({doubleClickZoom:!0});var x0=K0.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(ct){var Bt=this._map,me=Bt.getZoom(),Qe=Bt.options.zoomDelta,zr=ct.originalEvent.shiftKey?me-Qe:me+Qe;Bt.options.doubleClickZoom==="center"?Bt.setZoom(zr):Bt.setZoomAround(ct.containerPoint,zr)}});Ac.addInitHook("addHandler","doubleClickZoom",x0),Ac.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var O0=K0.extend({addHooks:function(){if(!this._draggable){var ct=this._map;this._draggable=new jm(ct._mapPane,ct._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),ct.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),ct.on("zoomend",this._onZoomEnd,this),ct.whenReady(this._onZoomEnd,this))}Wu(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ff(this._map._container,"leaflet-grab"),Ff(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var ct=this._map;if(ct._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var Bt=ko(this._map.options.maxBounds);this._offsetLimit=Ts(this._map.latLngToContainerPoint(Bt.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(Bt.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;ct.fire("movestart").fire("dragstart"),ct.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(ct){if(this._map.options.inertia){var Bt=this._lastTime=+new Date,me=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(me),this._times.push(Bt),this._prunePositions(Bt)}this._map.fire("move",ct).fire("drag",ct)},_prunePositions:function(ct){for(;this._positions.length>1&&ct-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var ct=this._map.getSize().divideBy(2),Bt=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=Bt.subtract(ct).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(ct,Bt){return ct-(ct-Bt)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var ct=this._draggable._newPos.subtract(this._draggable._startPos),Bt=this._offsetLimit;ct.xBt.max.x&&(ct.x=this._viscousLimit(ct.x,Bt.max.x)),ct.y>Bt.max.y&&(ct.y=this._viscousLimit(ct.y,Bt.max.y)),this._draggable._newPos=this._draggable._startPos.add(ct)}},_onPreDragWrap:function(){var ct=this._worldWidth,Bt=Math.round(ct/2),me=this._initialWorldOffset,Qe=this._draggable._newPos.x,zr=(Qe-Bt+me)%ct+Bt-me,An=(Qe+Bt+me)%ct-Bt-me,qi=Math.abs(zr+me)0?An:-An))-Bt;this._delta=0,this._startTime=null,qi&&(ct.options.scrollWheelZoom==="center"?ct.setZoom(Bt+qi):ct.setZoomAround(this._lastMousePos,Bt+qi))}});Ac.addInitHook("addHandler","scrollWheelZoom",Cg);var Fw=600;Ac.mergeOptions({tapHold:El.touchNative&&El.safari&&El.mobile,tapTolerance:15});var Rw=K0.extend({addHooks:function(){zu(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Nh(this._map._container,"touchstart",this._onDown,this)},_onDown:function(ct){if(clearTimeout(this._holdTimeout),ct.touches.length===1){var Bt=ct.touches[0];this._startPos=this._newPos=new Ma(Bt.clientX,Bt.clientY),this._holdTimeout=setTimeout(_t(function(){this._cancel(),this._isTapValid()&&(zu(document,"touchend",mc),zu(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",Bt))},this),Fw),zu(document,"touchend touchcancel contextmenu",this._cancel,this),zu(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function ct(){Nh(document,"touchend",mc),Nh(document,"touchend touchcancel",ct)},_cancel:function(){clearTimeout(this._holdTimeout),Nh(document,"touchend touchcancel contextmenu",this._cancel,this),Nh(document,"touchmove",this._onMove,this)},_onMove:function(ct){var Bt=ct.touches[0];this._newPos=new Ma(Bt.clientX,Bt.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(ct,Bt){var me=new MouseEvent(ct,{bubbles:!0,cancelable:!0,view:window,screenX:Bt.screenX,screenY:Bt.screenY,clientX:Bt.clientX,clientY:Bt.clientY});me._simulated=!0,Bt.target.dispatchEvent(me)}});Ac.addInitHook("addHandler","tapHold",Rw),Ac.mergeOptions({touchZoom:El.touch,bounceAtZoomLimits:!0});var D0=K0.extend({addHooks:function(){Wu(this._map._container,"leaflet-touch-zoom"),zu(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ff(this._map._container,"leaflet-touch-zoom"),Nh(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(ct){var Bt=this._map;if(!(!ct.touches||ct.touches.length!==2||Bt._animatingZoom||this._zooming)){var me=Bt.mouseEventToContainerPoint(ct.touches[0]),Qe=Bt.mouseEventToContainerPoint(ct.touches[1]);this._centerPoint=Bt.getSize()._divideBy(2),this._startLatLng=Bt.containerPointToLatLng(this._centerPoint),Bt.options.touchZoom!=="center"&&(this._pinchStartLatLng=Bt.containerPointToLatLng(me.add(Qe)._divideBy(2))),this._startDist=me.distanceTo(Qe),this._startZoom=Bt.getZoom(),this._moved=!1,this._zooming=!0,Bt._stop(),zu(document,"touchmove",this._onTouchMove,this),zu(document,"touchend touchcancel",this._onTouchEnd,this),mc(ct)}},_onTouchMove:function(ct){if(!(!ct.touches||ct.touches.length!==2||!this._zooming)){var Bt=this._map,me=Bt.mouseEventToContainerPoint(ct.touches[0]),Qe=Bt.mouseEventToContainerPoint(ct.touches[1]),zr=me.distanceTo(Qe)/this._startDist;if(this._zoom=Bt.getScaleZoom(zr,this._startZoom),!Bt.options.bounceAtZoomLimits&&(this._zoomBt.getMaxZoom()&&zr>1)&&(this._zoom=Bt._limitZoom(this._zoom)),Bt.options.touchZoom==="center"){if(this._center=this._startLatLng,zr===1)return}else{var An=me._add(Qe)._divideBy(2)._subtract(this._centerPoint);if(zr===1&&An.x===0&&An.y===0)return;this._center=Bt.unproject(Bt.project(this._pinchStartLatLng,this._zoom).subtract(An),this._zoom)}this._moved||(Bt._moveStart(!0,!1),this._moved=!0),Pi(this._animRequest);var qi=_t(Bt._move,Bt,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Fi(qi,this,!0),mc(ct)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Pi(this._animRequest),Nh(document,"touchmove",this._onTouchMove,this),Nh(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Ac.addInitHook("addHandler","touchZoom",D0),Ac.BoxZoom=xv,Ac.DoubleClickZoom=x0,Ac.Drag=O0,Ac.Keyboard=Dw,Ac.ScrollWheelZoom=Cg,Ac.TapHold=Rw,Ac.TouchZoom=D0,E.Bounds=mo,E.Browser=El,E.CRS=da,E.Canvas=zw,E.Circle=qy,E.CircleMarker=Wy,E.Class=Yi,E.Control=lp,E.DivIcon=Pw,E.DivOverlay=X0,E.DomEvent=Fp,E.DomUtil=kc,E.Draggable=jm,E.Evented=si,E.FeatureGroup=wp,E.GeoJSON=pm,E.GridLayer=L1,E.Handler=K0,E.Icon=Um,E.ImageOverlay=gm,E.LatLng=ro,E.LatLngBounds=xl,E.Layer=a0,E.LayerGroup=Sg,E.LineUtil=tf,E.Map=Ac,E.Marker=E1,E.Mixin=up,E.Path=Vm,E.Point=Ma,E.PolyUtil=_6,E.Polygon=yv,E.Polyline=y0,E.Popup=Eg,E.PosAnimation=S1,E.Projection=N_,E.Rectangle=s0,E.Renderer=ym,E.SVG=Rp,E.SVGOverlay=Z_,E.TileLayer=o0,E.Tooltip=C1,E.Transformation=Ho,E.Util=bi,E.VideoOverlay=I0,E.bind=_t,E.bounds=Ts,E.canvas=Y_,E.circle=vv,E.circleMarker=Sw,E.control=i0,E.divIcon=M6,E.extend=K,E.featureGroup=Mw,E.geoJSON=$_,E.geoJson=Ky,E.gridLayer=G_,E.icon=U_,E.imageOverlay=vm,E.latLng=Ia,E.latLngBounds=ko,E.layerGroup=Hy,E.map=Vs,E.marker=k6,E.point=ho,E.polygon=T6,E.polyline=Ew,E.popup=vf,E.rectangle=z0,E.setOptions=Tr,E.stamp=jt,E.svg=Ow,E.svgOverlay=A6,E.tileLayer=Xy,E.tooltip=Lw,E.transformation=vi,E.version=B,E.videoOverlay=ef;var F0=window.L;E.noConflict=function(){return window.L=F0,this},window.L=E})}(g2,g2.exports)),g2.exports}var Tot=kot();const Mm=KO(Tot),tP=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],R8=1,a2=8;class dM{static from(s){if(!(s instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[E,B]=new Uint8Array(s,0,2);if(E!==219)throw new Error("Data does not appear to be in a KDBush format.");const K=B>>4;if(K!==R8)throw new Error(`Got v${K} data when expected v${R8}.`);const pt=tP[B&15];if(!pt)throw new Error("Unrecognized array type.");const[_t]=new Uint16Array(s,2,1),[Ot]=new Uint32Array(s,4,1);return new dM(Ot,_t,pt,s)}constructor(s,E=64,B=Float64Array,K){if(isNaN(s)||s<0)throw new Error(`Unpexpected numItems value: ${s}.`);this.numItems=+s,this.nodeSize=Math.min(Math.max(+E,2),65535),this.ArrayType=B,this.IndexArrayType=s<65536?Uint16Array:Uint32Array;const pt=tP.indexOf(this.ArrayType),_t=s*2*this.ArrayType.BYTES_PER_ELEMENT,Ot=s*this.IndexArrayType.BYTES_PER_ELEMENT,jt=(8-Ot%8)%8;if(pt<0)throw new Error(`Unexpected typed array class: ${B}.`);K&&K instanceof ArrayBuffer?(this.data=K,this.ids=new this.IndexArrayType(this.data,a2,s),this.coords=new this.ArrayType(this.data,a2+Ot+jt,s*2),this._pos=s*2,this._finished=!0):(this.data=new ArrayBuffer(a2+_t+Ot+jt),this.ids=new this.IndexArrayType(this.data,a2,s),this.coords=new this.ArrayType(this.data,a2+Ot+jt,s*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(R8<<4)+pt]),new Uint16Array(this.data,2,1)[0]=E,new Uint32Array(this.data,4,1)[0]=s)}add(s,E){const B=this._pos>>1;return this.ids[B]=B,this.coords[this._pos++]=s,this.coords[this._pos++]=E,B}finish(){const s=this._pos>>1;if(s!==this.numItems)throw new Error(`Added ${s} items when expected ${this.numItems}.`);return AA(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(s,E,B,K){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:pt,coords:_t,nodeSize:Ot}=this,jt=[0,pt.length-1,0],te=[];for(;jt.length;){const he=jt.pop()||0,De=jt.pop()||0,er=jt.pop()||0;if(De-er<=Ot){for(let Vr=er;Vr<=De;Vr++){const mn=_t[2*Vr],Dt=_t[2*Vr+1];mn>=s&&mn<=B&&Dt>=E&&Dt<=K&&te.push(pt[Vr])}continue}const pr=er+De>>1,Mr=_t[2*pr],Tr=_t[2*pr+1];Mr>=s&&Mr<=B&&Tr>=E&&Tr<=K&&te.push(pt[pr]),(he===0?s<=Mr:E<=Tr)&&(jt.push(er),jt.push(pr-1),jt.push(1-he)),(he===0?B>=Mr:K>=Tr)&&(jt.push(pr+1),jt.push(De),jt.push(1-he))}return te}within(s,E,B){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:K,coords:pt,nodeSize:_t}=this,Ot=[0,K.length-1,0],jt=[],te=B*B;for(;Ot.length;){const he=Ot.pop()||0,De=Ot.pop()||0,er=Ot.pop()||0;if(De-er<=_t){for(let Vr=er;Vr<=De;Vr++)eP(pt[2*Vr],pt[2*Vr+1],s,E)<=te&&jt.push(K[Vr]);continue}const pr=er+De>>1,Mr=pt[2*pr],Tr=pt[2*pr+1];eP(Mr,Tr,s,E)<=te&&jt.push(K[pr]),(he===0?s-B<=Mr:E-B<=Tr)&&(Ot.push(er),Ot.push(pr-1),Ot.push(1-he)),(he===0?s+B>=Mr:E+B>=Tr)&&(Ot.push(pr+1),Ot.push(De),Ot.push(1-he))}return jt}}function AA(d,s,E,B,K,pt){if(K-B<=E)return;const _t=B+K>>1;XO(d,s,_t,B,K,pt),AA(d,s,E,B,_t-1,1-pt),AA(d,s,E,_t+1,K,1-pt)}function XO(d,s,E,B,K,pt){for(;K>B;){if(K-B>600){const te=K-B+1,he=E-B+1,De=Math.log(te),er=.5*Math.exp(2*De/3),pr=.5*Math.sqrt(De*er*(te-er)/te)*(he-te/2<0?-1:1),Mr=Math.max(B,Math.floor(E-he*er/te+pr)),Tr=Math.min(K,Math.floor(E+(te-he)*er/te+pr));XO(d,s,E,Mr,Tr,pt)}const _t=s[2*E+pt];let Ot=B,jt=K;for(o2(d,s,B,E),s[2*K+pt]>_t&&o2(d,s,B,K);Ot_t;)jt--}s[2*B+pt]===_t?o2(d,s,B,jt):(jt++,o2(d,s,jt,K)),jt<=E&&(B=jt+1),E<=jt&&(K=jt-1)}}function o2(d,s,E,B){B8(d,E,B),B8(s,2*E,2*B),B8(s,2*E+1,2*B+1)}function B8(d,s,E){const B=d[s];d[s]=d[E],d[E]=B}function eP(d,s,E,B){const K=d-E,pt=s-B;return K*K+pt*pt}const Aot={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:d=>d},rP=Math.fround||(d=>s=>(d[0]=+s,d[0]))(new Float32Array(1)),uy=2,l1=3,N8=4,n1=5,JO=6;class Mot{constructor(s){this.options=Object.assign(Object.create(Aot),s),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(s){const{log:E,minZoom:B,maxZoom:K}=this.options;E&&console.time("total time");const pt=`prepare ${s.length} points`;E&&console.time(pt),this.points=s;const _t=[];for(let jt=0;jt=B;jt--){const te=+Date.now();Ot=this.trees[jt]=this._createTree(this._cluster(Ot,jt)),E&&console.log("z%d: %d clusters in %dms",jt,Ot.numItems,+Date.now()-te)}return E&&console.timeEnd("total time"),this}getClusters(s,E){let B=((s[0]+180)%360+360)%360-180;const K=Math.max(-90,Math.min(90,s[1]));let pt=s[2]===180?180:((s[2]+180)%360+360)%360-180;const _t=Math.max(-90,Math.min(90,s[3]));if(s[2]-s[0]>=360)B=-180,pt=180;else if(B>pt){const De=this.getClusters([B,K,180,_t],E),er=this.getClusters([-180,K,pt,_t],E);return De.concat(er)}const Ot=this.trees[this._limitZoom(E)],jt=Ot.range(I5(B),z5(_t),I5(pt),z5(K)),te=Ot.data,he=[];for(const De of jt){const er=this.stride*De;he.push(te[er+n1]>1?nP(te,er,this.clusterProps):this.points[te[er+l1]])}return he}getChildren(s){const E=this._getOriginId(s),B=this._getOriginZoom(s),K="No cluster with the specified id.",pt=this.trees[B];if(!pt)throw new Error(K);const _t=pt.data;if(E*this.stride>=_t.length)throw new Error(K);const Ot=this.options.radius/(this.options.extent*Math.pow(2,B-1)),jt=_t[E*this.stride],te=_t[E*this.stride+1],he=pt.within(jt,te,Ot),De=[];for(const er of he){const pr=er*this.stride;_t[pr+N8]===s&&De.push(_t[pr+n1]>1?nP(_t,pr,this.clusterProps):this.points[_t[pr+l1]])}if(De.length===0)throw new Error(K);return De}getLeaves(s,E,B){E=E||10,B=B||0;const K=[];return this._appendLeaves(K,s,E,B,0),K}getTile(s,E,B){const K=this.trees[this._limitZoom(s)],pt=Math.pow(2,s),{extent:_t,radius:Ot}=this.options,jt=Ot/_t,te=(B-jt)/pt,he=(B+1+jt)/pt,De={features:[]};return this._addTileFeatures(K.range((E-jt)/pt,te,(E+1+jt)/pt,he),K.data,E,B,pt,De),E===0&&this._addTileFeatures(K.range(1-jt/pt,te,1,he),K.data,pt,B,pt,De),E===pt-1&&this._addTileFeatures(K.range(0,te,jt/pt,he),K.data,-1,B,pt,De),De.features.length?De:null}getClusterExpansionZoom(s){let E=this._getOriginZoom(s)-1;for(;E<=this.options.maxZoom;){const B=this.getChildren(s);if(E++,B.length!==1)break;s=B[0].properties.cluster_id}return E}_appendLeaves(s,E,B,K,pt){const _t=this.getChildren(E);for(const Ot of _t){const jt=Ot.properties;if(jt&&jt.cluster?pt+jt.point_count<=K?pt+=jt.point_count:pt=this._appendLeaves(s,jt.cluster_id,B,K,pt):pt1;let he,De,er;if(te)he=QO(E,jt,this.clusterProps),De=E[jt],er=E[jt+1];else{const Tr=this.points[E[jt+l1]];he=Tr.properties;const[Vr,mn]=Tr.geometry.coordinates;De=I5(Vr),er=z5(mn)}const pr={type:1,geometry:[[Math.round(this.options.extent*(De*pt-B)),Math.round(this.options.extent*(er*pt-K))]],tags:he};let Mr;te||this.options.generateId?Mr=E[jt+l1]:Mr=this.points[E[jt+l1]].id,Mr!==void 0&&(pr.id=Mr),_t.features.push(pr)}}_limitZoom(s){return Math.max(this.options.minZoom,Math.min(Math.floor(+s),this.options.maxZoom+1))}_cluster(s,E){const{radius:B,extent:K,reduce:pt,minPoints:_t}=this.options,Ot=B/(K*Math.pow(2,E)),jt=s.data,te=[],he=this.stride;for(let De=0;DeE&&(Vr+=jt[Dt+n1])}if(Vr>Tr&&Vr>=_t){let mn=er*Tr,Dt=pr*Tr,cn,Jn=-1;const Bn=((De/he|0)<<5)+(E+1)+this.points.length;for(const ni of Mr){const Wi=ni*he;if(jt[Wi+uy]<=E)continue;jt[Wi+uy]=E;const Un=jt[Wi+n1];mn+=jt[Wi]*Un,Dt+=jt[Wi+1]*Un,jt[Wi+N8]=Bn,pt&&(cn||(cn=this._map(jt,De,!0),Jn=this.clusterProps.length,this.clusterProps.push(cn)),pt(cn,this._map(jt,Wi)))}jt[De+N8]=Bn,te.push(mn/Vr,Dt/Vr,1/0,Bn,-1,Vr),pt&&te.push(Jn)}else{for(let mn=0;mn1)for(const mn of Mr){const Dt=mn*he;if(!(jt[Dt+uy]<=E)){jt[Dt+uy]=E;for(let cn=0;cn>5}_getOriginZoom(s){return(s-this.points.length)%32}_map(s,E,B){if(s[E+n1]>1){const _t=this.clusterProps[s[E+JO]];return B?Object.assign({},_t):_t}const K=this.points[s[E+l1]].properties,pt=this.options.map(K);return B&&pt===K?Object.assign({},pt):pt}}function nP(d,s,E){return{type:"Feature",id:d[s+l1],properties:QO(d,s,E),geometry:{type:"Point",coordinates:[Sot(d[s]),Eot(d[s+1])]}}}function QO(d,s,E){const B=d[s+n1],K=B>=1e4?`${Math.round(B/1e3)}k`:B>=1e3?`${Math.round(B/100)/10}k`:B,pt=d[s+JO],_t=pt===-1?{}:Object.assign({},E[pt]);return Object.assign(_t,{cluster:!0,cluster_id:d[s+l1],point_count:B,point_count_abbreviated:K})}function I5(d){return d/360+.5}function z5(d){const s=Math.sin(d*Math.PI/180),E=.5-.25*Math.log((1+s)/(1-s))/Math.PI;return E<0?0:E>1?1:E}function Sot(d){return(d-.5)*360}function Eot(d){const s=(180-d*360)*Math.PI/180;return 360*Math.atan(Math.exp(s))/Math.PI-90}const Cot={class:"map-container"},Lot={key:0,class:"flex items-center justify-center h-96 bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px]"},Pot={key:2,class:"map-legend"},Iot={class:"legend-footer"},zot={key:3,class:"map-attribution"},Oot=Dc({__name:"NetworkMap",props:{adverts:{},baseLatitude:{default:null},baseLongitude:{default:null}},setup(d,{expose:s}){typeof window<"u"&&!window.chrome&&(window.chrome={runtime:{}});const E=d,B=Ga();let K=null;const pt=Ga(new Map);let _t=null;const Ot=Ga(new Map),jt=Ga([]),te=Ga(!0),he=Ga(60),De=Ga(14),er=$o(()=>E.baseLatitude!==null&&E.baseLongitude!==null&&typeof E.baseLatitude=="number"&&typeof E.baseLongitude=="number"&&E.baseLatitude!==0&&E.baseLongitude!==0&&Math.abs(E.baseLatitude)<=90&&Math.abs(E.baseLongitude)<=180),pr=Un=>new Date(Un*1e3).toLocaleString(),Mr=Un=>Un?`${Un} dBm`:"N/A",Tr=Un=>Un?`${Un} dB`:"N/A",Vr=Un=>({0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"})[Un||0]||"Unknown",mn=(Un,qr,Di,Fi)=>{const bi=(Di-Un)*Math.PI/180,Yi=(Fi-qr)*Math.PI/180,Ca=Math.sin(bi/2)*Math.sin(bi/2)+Math.cos(Un*Math.PI/180)*Math.cos(Di*Math.PI/180)*Math.sin(Yi/2)*Math.sin(Yi/2);return 6371*(2*Math.atan2(Math.sqrt(Ca),Math.sqrt(1-Ca)))},Dt=()=>{K&&(jt.value.forEach(Un=>{K&&Un.remove()}),jt.value.length=0,K.remove(),K=null),pt.value.clear(),Ot.value.clear(),_t=null},cn=Un=>{const qr=new Map;return Un.filter(Di=>Di.latitude!==null&&Di.longitude!==null).map(Di=>{let Fi=Di.latitude,Pi=Di.longitude;const bi=`${Fi.toFixed(6)}_${Pi.toFixed(6)}`,Yi=qr.get(bi)||0;if(qr.set(bi,Yi+1),Yi>0){const Ni=Yi*60*(Math.PI/180);Fi+=Math.sin(Ni)*.001*(Yi*.5),Pi+=Math.cos(Ni)*.001*(Yi*.5)}return{type:"Feature",properties:{advert:{...Di,jittered_latitude:Fi,jittered_longitude:Pi}},geometry:{type:"Point",coordinates:[Pi,Fi]}}})},Jn=Un=>{_t=new Mot({radius:he.value,maxZoom:De.value,minPoints:2}),_t.load(Un)},Bn=async()=>{if(!B.value||!er.value){console.warn("Cannot initialize map: missing container or coordinates");return}Dt(),await om();const Un=E.baseLatitude,qr=E.baseLongitude;try{K=Mm.map(B.value,{center:[Un,qr],zoom:10,zoomControl:!0,scrollWheelZoom:!0,doubleClickZoom:!0,boxZoom:!0,keyboard:!0,attributionControl:!1});try{const si=Mm.tileLayer("https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png",{maxZoom:19,attribution:'© OpenStreetMap contributors © CARTO',errorTileUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}),Ma=Mm.tileLayer("https://{s}.basemaps.cartocdn.com/dark_only_labels/{z}/{x}/{y}{r}.png",{maxZoom:19,attribution:"",errorTileUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="});si.addTo(K),Ma.addTo(K)}catch(si){console.warn("Error loading tiles:",si)}const Di=(si,Ma=!1)=>{const zo=Ma?16:12;return Mm.divIcon({className:"custom-div-icon",html:`
`,iconSize:[zo+4,zo+4],iconAnchor:[(zo+4)/2,(zo+4)/2]})},Fi=si=>{const Ma=si<10?30:si<100?40:50;return Mm.divIcon({className:"custom-cluster-icon",html:` +
+ ${si}
- `);const vi=()=>{const yi={0:"#9CA3AF",1:"#60A5FA",2:"#A5E5B6",3:"#EBA0FC",4:"#FFC246"},ui=[];let ao=0,So=0;const ko=Wr.value.length,gs=()=>{};Wr.value.forEach(jo=>{if(jo.latitude!==null&&jo.longitude!==null&&vr){const es=parseInt(jo.contact_type),Uo=yi[es]||yi[0],El=Ss(Uo),Is=ai(co,Go,jo.latitude,jo.longitude),Cl=Yg.marker([jo.latitude,jo.longitude],{icon:El}).addTo(vr).bindPopup(` -
- ${jo.node_name||"Unknown Node"}
- ${z[es]||"Unknown"}
- Distance: ${Is.toFixed(2)} km
- Route: ${jn(jo.route_type)}
- RSSI: ${wn(jo.rssi)}
- SNR: ${ei(jo.snr)}
- ${jo.latitude.toFixed(6)}, ${jo.longitude.toFixed(6)} + `,iconSize:[Ma,Ma],iconAnchor:[Ma/2,Ma/2]})},Pi=Di("#ef4444",!0);Mm.marker([Un,qr],{icon:Pi}).addTo(K).bindPopup(` +
+ Base Station
+ Base Station
+ ${Un.toFixed(6)}, ${qr.toFixed(6)} +
+ `);const bi={Unknown:"#9CA3AF","Chat Node":"#60A5FA",Repeater:"#A5E5B6","Room Server":"#EBA0FC","Hybrid Node":"#FFC246"},Yi=(si,Ma,zo,ho,mo=0)=>{if(!K)return;const Ts=si.jittered_latitude||si.latitude,xl=si.jittered_longitude||si.longitude;if(Ts===null||xl===null)return;const ko=si.route_type||0;let ro=ho,Ia=3,da=.7,no;ko===2?(ro="#A5E5B6",Ia=4,da=.9):ko===1?(ro="#FFC246",no="10, 5",da=.8):ko===3?(ro="#059669",Ia=5,da=.95):ko===0?(ro="#ea580c",no="12, 6",da=.8):(ro="#9CA3AF",no="2, 5",da=.6);const po=[Ma,zo],us=[Ts,xl],Ho=Mm.polyline([po,us],{color:ro,weight:Ia,opacity:0,dashArray:no,className:"connection-line"}).addTo(K),vi=Mm.polyline([po,po],{color:ro,weight:Ia,opacity:0,dashArray:no,className:"connection-line animated-line"}).addTo(K);setTimeout(()=>{let wi=0;const hi=30;vi.setStyle({opacity:da+.2});const go=()=>{wi++;const Mo=wi/hi,To=po[0]+(us[0]-po[0])*Mo,ms=po[1]+(us[1]-po[1])*Mo;vi.setLatLngs([po,[To,ms]]),wi{K&&vi&&vi.remove(),Ho.setStyle({opacity:da}),Ho.on("mouseover",()=>{Ho.setStyle({weight:Ia+2,opacity:Math.min(da+.3,1)})}),Ho.on("mouseout",()=>{Ho.setStyle({weight:Ia,opacity:da})});const bs=mn(Ma,zo,Ts,xl);Ho.bindPopup(` +
+ Connection to ${si.node_name||"Unknown Node"}
+ Distance: ${bs.toFixed(2)} km
+ Route: ${Vr(si.route_type)}
+ Signal: ${Mr(si.rssi)} / ${Tr(si.snr)} +
+ `),jt.value.push(Ho)},200)};go()},mo)},Ca=()=>{if(!K||!_t)return;const si=K.getBounds(),Ma=Math.floor(K.getZoom());Ot.value.forEach(ho=>{K&&ho.remove()}),Ot.value.clear(),jt.value.forEach(ho=>{K&&ho.remove()}),jt.value.length=0,_t.getClusters([si.getWest(),si.getSouth(),si.getEast(),si.getNorth()],Ma).forEach(ho=>{const[mo,Ts]=ho.geometry.coordinates,xl=ho.properties;if(xl.cluster){const ko=Mm.marker([Ts,mo],{icon:Fi(xl.point_count||0)}).addTo(K);ko.on("click",()=>{if(K&&_t){const us=_t.getClusterExpansionZoom(xl.cluster_id);K.setView([Ts,mo],us)}});const Ia=_t.getLeaves(xl.cluster_id,1/0).map(us=>`
+ • ${us.properties.advert.node_name||"Unknown Node"} (${us.properties.advert.contact_type}) +
`).join("");ko.bindPopup(` +
+ Cluster: ${xl.point_count} nodes
+
+ ${Ia}
- `);Ir.value.set(jo.pubkey,Cl);const Zl=Cl.getElement();Zl&&(Zl.style.opacity="0",Zl.style.transition="opacity 0.5s ease-out");const Du=jo.route_type||0;let kc=Uo,ic=3,vf=.7,Bf;Du===2?(kc="#A5E5B6",ic=4,vf=.9):Du===1?(kc="#FFC246",Bf="10, 5",vf=.8):(kc="#9CA3AF",Bf="2, 5",vf=.6),(()=>{const Yf=[co,Go],g0=[jo.latitude,jo.longitude],Rp=Yg.polyline([Yf,g0],{color:kc,weight:ic,opacity:0,dashArray:Bf,className:"connection-line"}).addTo(vr),fd=Yg.polyline([Yf,Yf],{color:kc,weight:ic,opacity:0,dashArray:Bf,className:"connection-line animated-line"}).addTo(vr);setTimeout(()=>{fd.setStyle({opacity:vf});let Sd=0;const A_=1500/1e3*60,x1=()=>{Sd+=1/A_,Sd>1&&(Sd=1);const Oy=Yf[0]+(g0[0]-Yf[0])*Sd,Dy=Yf[1]+(g0[1]-Yf[1])*Sd,M_=[Oy,Dy];fd.setLatLngs([Yf,M_]),Sd<1?requestAnimationFrame(x1):(vr.removeLayer(fd),Rp.setStyle({opacity:vf}),Zl&&(Zl.style.opacity="1"),Rp.on("mouseover",()=>{Rp.setStyle({weight:ic+2,opacity:Math.min(vf+.3,1)})}),Rp.on("mouseout",()=>{Rp.setStyle({weight:ic,opacity:vf})}),Rp.bindPopup(` -
- Connection to ${jo.node_name||"Unknown Node"}
- Distance: ${Is.toFixed(2)} km
- Route: ${jn(jo.route_type)}
- Signal: ${wn(jo.rssi)} / ${ei(jo.snr)} -
- `),ui.push(Rp),So++,So===ko&&gs())};x1()},ao)})(),ao+=300}})};setTimeout(()=>{vr&&vr.invalidateSize()},2e3)}catch(eo){console.error("Error initializing map:",eo)}},200)},Ni=()=>{vr&&(vr.remove(),vr=null),Ir.value.clear()},zi=co=>{const Go=Ir.value.get(co);if(Go){const To=Go.getElement();To&&To.classList.add("marker-highlight")}},ia=co=>{const Go=Ir.value.get(co);if(Go){const To=Go.getElement();To&&To.classList.remove("marker-highlight")}},Ua=async co=>{try{await Ah.pingNeighbor({id:co.id,pubkey:co.pubkey,node_name:co.node_name}),console.log("Ping sent to neighbor:",co.node_name||co.pubkey)}catch(Go){console.error("Error pinging neighbor:",Go)}},qi=co=>{$t.value=co,Dt.value=!0},Ei=co=>{Ua(co)},Va=co=>{qi(co)},us=async co=>{try{await Ah.deleteAdvert(co),await Fa(),console.log("Neighbor deleted successfully")}catch(Go){console.error("Error deleting neighbor:",Go)}finally{Dt.value=!1,$t.value=null}},xo=()=>{Dt.value=!1,$t.value=null},Mo=co=>co==="Repeater";return i0(async()=>{l.hasStats||await l.fetchStats(),await Fa()}),b_(()=>{Ni()}),fm([Wr,Be],async([co,Go])=>{co.length>0&&Go&&!mt.value&&(await C0(),setTimeout(async()=>{await Sa()},300))},{immediate:!1}),fm(mt,async co=>{!co&&Wr.value.length>0&&Be.value&&(await C0(),setTimeout(async()=>{await Sa()},300))}),(co,Go)=>(Si(),Fi("div",Wat,[mt.value?(Si(),Fi("div",qat,Go[0]||(Go[0]=[Oe("div",{class:"text-center"},[Oe("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),Oe("p",{class:"text-dark-text"},"Loading neighbor data...")],-1)]))):kt.value?(Si(),Fi("div",Zat,[Oe("div",$at,[Go[2]||(Go[2]=Oe("svg",{class:"w-5 h-5 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),Oe("div",null,[Go[1]||(Go[1]=Oe("h3",{class:"text-accent-red font-medium"},"Error Loading Neighbors",-1)),Oe("p",Gat,na(kt.value),1)])])])):(Si(),Fi(Ou,{key:2},[Be.value?Wr.value.length>0?(Si(),Fi("div",Kat,[Oe("div",{class:"flex items-center justify-between mb-4"},[Go[4]||(Go[4]=Oe("h2",{class:"text-white text-lg font-semibold"},"Network Map",-1)),Oe("button",{onClick:Sa,class:"px-3 py-1 text-xs bg-primary/20 text-primary border border-primary/30 rounded-lg hover:bg-primary/30 transition-colors"}," Reload Map ")]),Oe("div",{ref_key:"mapContainer",ref:ir,class:"w-full h-96 bg-gray-900 rounded-lg border border-gray-700/50 overflow-hidden leaflet-container shadow-xl",style:{"min-height":"384px",position:"relative",outline:"none","box-shadow":"inset 0 0 20px rgba(0,0,0,0.5)"}},null,512),Go[5]||(Go[5]=Af('

Node Types

This Node
Repeater
Chat Node
Room Server
Hybrid Node

Connection Types

Direct Routing
Flood Routing
',1))])):ps("",!0):(Si(),Fi("div",Yat,Go[3]||(Go[3]=[Af('

Location Not Configured

Base station coordinates are not configured or set to default values (0,0). Please update your repeater configuration with valid GPS coordinates and restart the repeater to enable the network map and distance calculations.

',1)]))),(Si(!0),Fi(Ou,null,sf(Pr.value,([To,eo])=>(Si(),Fi("div",{key:To,class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden"},[Oe("div",Xat,[Oe("h2",Jat,[nc(na(eo)+" ",1),Oe("span",Qat,"("+na(J.value[To]?.length||0)+")",1)]),Oe("div",{class:Xs(["flex items-center gap-2 text-sm",j[parseInt(To)]])},[Oe("div",{class:"w-2 h-2 rounded-full",style:pg(`background-color: ${Gi(parseInt(To))}`)},null,4),nc(" "+na(eo),1)],2)]),Oe("div",tot,[Oe("table",eot,[Go[6]||(Go[6]=Oe("thead",null,[Oe("tr",{class:"bg-dark-bg/50"},[Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5 w-8"}),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Node Name"),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Public Key"),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Location"),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Distance"),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Route Type"),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"RSSI"),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"SNR"),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Last Seen"),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"First Seen"),Oe("th",{class:"text-left text-dark-text text-xs font-medium py-3 px-6 border-b border-white/5"},"Advert Count")])],-1)),Oe("tbody",rot,[(Si(!0),Fi(Ou,null,sf(J.value[To],ya=>(Si(),Fi("tr",{key:ya.id,class:"hover:bg-white/5 transition-colors",onMouseenter:ka=>zi(ya.pubkey),onMouseleave:ka=>ia(ya.pubkey)},[Oe("td",iot,[uu(zat,{neighbor:ya,"can-ping":Mo(ya.contact_type),onPing:Ei,onDelete:Va},null,8,["neighbor","can-ping"])]),Oe("td",aot,na(ya.node_name||"Unknown"),1),Oe("td",oot,na(Ft(ya.pubkey)),1),Oe("td",sot,[ya.latitude!==null&&ya.longitude!==null?(Si(),Fi("span",lot,na(ya.latitude.toFixed(6))+", "+na(ya.longitude.toFixed(6)),1)):(Si(),Fi("span",uot,"Unknown"))]),Oe("td",cot,na(Qi(ya)),1),Oe("td",hot,[Oe("span",{class:Xs(ya.route_type===2?"text-accent-green":ya.route_type===1?"text-secondary":"text-gray-400")},na(jn(ya.route_type)),3)]),Oe("td",fot,na(wn(ya.rssi)),1),Oe("td",dot,na(ei(ya.snr)),1),Oe("td",pot,na(Tn(ya.last_seen)),1),Oe("td",mot,na(Tn(ya.first_seen)),1),Oe("td",got,na(ya.advert_count),1)],40,not))),128))])])])]))),128)),Pr.value.length===0?(Si(),Fi("div",vot,[Go[7]||(Go[7]=Af('

No Neighbors Found

No mesh neighbors have been discovered in your area yet.

',3)),Oe("button",{onClick:Fa,class:"mt-4 px-4 py-2 bg-primary/20 text-primary border border-primary/30 rounded-lg hover:bg-primary/30 transition-colors"}," Refresh ")])):ps("",!0)],64)),uu(jat,{show:Dt.value,neighbor:$t.value,onClose:xo,onDelete:us},null,8,["show","neighbor"])]))}}),xot=hd(yot,[["__scopeId","data-v-988767ac"]]);/*! +
+ Click to zoom in and separate nodes +
+
+ `),Ot.value.set(`cluster-${xl.cluster_id}`,ko);const da=mn(Un,qr,Ts,mo),no=Math.min(Math.floor(da*5),200),po={node_name:`Cluster of ${xl.point_count} nodes`,contact_type:"Cluster",route_type:2,rssi:null,snr:null,jittered_latitude:Ts,jittered_longitude:mo,latitude:Ts,longitude:mo};Yi(po,Un,qr,"#AAE8E8",no)}else{const ko=xl.advert,ro=bi[ko.contact_type]||bi.Unknown,Ia=Di(ro),da=Ts,no=mo,po=mn(Un,qr,da,no),us=Mm.marker([da,no],{icon:Ia}).addTo(K).bindPopup(` +
+ ${ko.node_name||"Unknown Node"}
+ Type: ${ko.contact_type}
+ Distance: ${po.toFixed(2)} km
+ Signal: ${Mr(ko.rssi)} / ${Tr(ko.snr)}
+ Route: ${Vr(ko.route_type)}
+ Last Seen: ${pr(ko.last_seen)} + ${ko.jittered_latitude?'
Position adjusted to separate overlapping nodes':""} +
+ `);pt.value.set(ko.pubkey,us),Ot.value.set(`node-${ko.pubkey}`,us);const Ho=Math.min(Math.floor(po*5),200),vi={...ko,jittered_latitude:da,jittered_longitude:no};Yi(vi,Un,qr,ro,Ho)}})},Ni=(si,Ma)=>{let zo=0;cn(E.adverts).forEach(mo=>{const Ts=mo.properties.advert;if(Ts.latitude!==null&&Ts.longitude!==null){const xl=bi[Ts.contact_type]||bi.Unknown,ko=Di(xl),ro=Ts.jittered_latitude||Ts.latitude,Ia=Ts.jittered_longitude||Ts.longitude,da=Mm.marker([ro,Ia],{icon:ko}).addTo(K).bindPopup(` +
+ ${Ts.node_name||"Unknown Node"}
+ Type: ${Ts.contact_type}
+ Distance: ${mn(si,Ma,ro,Ia).toFixed(2)} km
+ Signal: ${Mr(Ts.rssi)} / ${Tr(Ts.snr)}
+ Route: ${Vr(Ts.route_type)}
+ Last Seen: ${pr(Ts.last_seen)} + ${Ts.jittered_latitude?'
Position adjusted to separate overlapping nodes':""} +
+ `);pt.value.set(Ts.pubkey,da);const no=da.getElement();no&&(no.style.opacity="0",no.style.transition="opacity 0.5s ease-out"),Yi(Ts,si,Ma,xl,zo),setTimeout(()=>{no&&(no.style.opacity="1")},zo+1e3),zo+=100}})};if(te.value&&E.adverts.length>0)try{const si=cn(E.adverts);Jn(si);const Ma=Math.min(14,K.getZoom());K.setZoom(Ma),setTimeout(()=>{try{Ca()}catch(zo){console.warn("Error updating clusters:",zo),Ni(Un,qr)}},100),K.on("moveend",()=>{try{Ca()}catch(zo){console.warn("Error updating clusters on move:",zo)}}),K.on("zoomend",()=>{try{Ca()}catch(zo){console.warn("Error updating clusters on zoom:",zo)}})}catch(si){console.warn("Error initializing clustering:",si),Ni(Un,qr)}else Ni(Un,qr);setTimeout(()=>{K&&K.invalidateSize()},1e3)}catch(Di){console.error("Error initializing map:",Di)}};return s({highlightNode:Un=>{const qr=pt.value.get(Un);if(qr){const Di=qr.getElement();if(Di){const Fi=Di.querySelector("div");Fi&&Fi.classList.add("marker-highlight")}}},unhighlightNode:Un=>{const qr=pt.value.get(Un);if(qr){const Di=qr.getElement();if(Di){const Fi=Di.querySelector("div");Fi&&Fi.classList.remove("marker-highlight")}}},initializeOpenStreetMap:Bn}),Em(()=>E.adverts,()=>{K&&er.value&&setTimeout(()=>{Bn()},100)},{immediate:!1}),bp(()=>{er.value&&E.adverts.length>0&&setTimeout(()=>{Bn()},300)}),Iy(()=>{Dt()}),(Un,qr)=>(_i(),zi("div",Cot,[er.value?(_i(),zi("div",{key:1,ref_key:"mapContainer",ref:B,class:"leaflet-map-container h-96 w-full bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden",style:{"min-height":"384px",position:"relative"}},null,512)):(_i(),zi("div",Lot,qr[0]||(qr[0]=[$f('

No valid coordinates available

Configure base station location to view map

',1)]))),er.value&&Un.adverts.length>0?(_i(),zi("div",Pot,[qr[1]||(qr[1]=$f('
Network Map
Node Types
Base Station
Chat Node
Repeater
Room Server
Hybrid Node
Unknown
2+
Cluster
Route Types
Direct
Transport Direct
Flood
Transport Flood
',3)),Ee("div",Iot,Qi(Un.adverts.length)+" node"+Qi(Un.adverts.length!==1?"s":"")+" visible ",1)])):is("",!0),er.value?(_i(),zi("div",zot," © OpenStreetMap contributors © CARTO ")):is("",!0)]))}}),Dot=ld(Oot,[["__scopeId","data-v-ab4f1a7c"]]),Fot={class:"relative","data-menu-container":""},Rot=Dc({__name:"NeighborMenu",props:{neighbor:{},canPing:{type:Boolean}},emits:["ping","delete"],setup(d,{emit:s}){const E=window.__neighborMenuManager||{activeMenu:null,setActiveMenu:Mr=>{if(E.activeMenu&&E.activeMenu!==Mr)try{E.activeMenu.closeMenu()}catch(Tr){console.warn("Error closing previous menu:",Tr)}E.activeMenu=Mr}};window.__neighborMenuManager=E;const B=d,K=s,pt=Ga(!1),_t=Ga(),Ot=Ga({top:0,left:0}),jt=()=>{pt.value=!1,document.removeEventListener("click",De,!0),document.removeEventListener("keydown",er),E.activeMenu===te&&(E.activeMenu=null)},te={closeMenu:jt},he=()=>{jt(),K("delete",B.neighbor)},De=Mr=>{Mr.target.closest("[data-menu-container]")||jt()},er=Mr=>{Mr.key==="Escape"&&jt()},pr=async()=>{if(!pt.value&&_t.value){E.setActiveMenu(te);const Mr=_t.value.getBoundingClientRect();Ot.value={top:Mr.bottom+4,left:Mr.left},pt.value=!0,await om(),document.addEventListener("click",De,!0),document.addEventListener("keydown",er)}else jt()};return Iy(()=>{jt()}),(Mr,Tr)=>(_i(),zi("div",Fot,[Ee("button",{ref_key:"buttonRef",ref:_t,onClick:pr,class:jo(["p-1 rounded hover:bg-white/10 transition-colors text-white/60 hover:text-white/80",{"bg-white/10 text-white/80":pt.value}]),"data-menu-container":""},Tr[0]||(Tr[0]=[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})],-1)]),2),(_i(),Z0(XA,{to:"body"},[pt.value?(_i(),zi("div",{key:0,class:"fixed w-36 bg-dark-card/90 backdrop-blur-lg border border-white/20 rounded-[15px] shadow-2xl z-[999999]",style:hm({top:Ot.value.top+"px",left:Ot.value.left+"px"}),"data-menu-container":""},[Ee("div",{class:"py-2"},[Ee("button",{onClick:he,class:"flex items-center gap-3 w-full px-4 py-3 text-sm text-accent-red hover:bg-accent-red/10 transition-colors"},Tr[1]||(Tr[1]=[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1),Ee("span",{class:"font-medium"},"Delete",-1)]))])],4)):is("",!0)]))]))}}),Bot={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},Not={class:"flex items-center justify-between mb-4"},jot={class:"flex items-center gap-3"},Uot={class:"text-white text-lg font-semibold"},Vot={class:"bg-white/10 text-white text-xs px-2 py-1 rounded-full"},Hot={key:0,class:"flex bg-dark-card/30 backdrop-blur rounded-lg border border-white/10 p-1"},Wot={class:"overflow-x-auto"},qot={class:"w-full"},$ot={class:"bg-dark-bg/50"},Zot={class:"bg-dark-bg/30"},Got=["onMouseenter","onMouseleave"],Yot=["onClick","title"],Kot={key:0,class:"ml-1 text-xs"},Xot={key:0,class:"flex items-center gap-3"},Jot={class:"text-white/70"},Qot={class:"flex gap-1"},tst=["onClick"],est=["onClick"],rst={key:1,class:"text-dark-text"},nst={class:"flex items-center gap-2"},ist={class:"flex items-end gap-0.5"},ast={class:"flex items-center gap-2"},ost=["title"],sst=["title"],lst=Dc({__name:"NeighborTable",props:{contactType:{},contactTypeKey:{},adverts:{},color:{},baseLatitude:{default:null},baseLongitude:{default:null},isCompactView:{type:Boolean,default:!1},isFirstTable:{type:Boolean,default:!1},showViewToggle:{type:Boolean,default:!1}},emits:["highlight-node","unhighlight-node","menu-ping","menu-delete","toggle-view"],setup(d,{emit:s}){const E=Ga(null),B=d,K=s,pt=qr=>new Date(qr*1e3).toLocaleString(),_t=qr=>`${qr.slice(0,8)}...${qr.slice(-8)}`,Ot=qr=>{switch(qr){case 2:return{text:"Direct",bgColor:"bg-green-500/20",borderColor:"border-green-400/30",textColor:"text-green-400"};case 3:return{text:"Transport Direct",bgColor:"bg-green-600/20",borderColor:"border-green-500/30",textColor:"text-green-500"};case 1:return{text:"Flood",bgColor:"bg-yellow-500/20",borderColor:"border-yellow-400/30",textColor:"text-yellow-400"};case 0:return{text:"Transport Flood",bgColor:"bg-orange-500/20",borderColor:"border-orange-400/30",textColor:"text-orange-400"};default:return{text:"Unknown",bgColor:"bg-gray-500/20",borderColor:"border-gray-400/30",textColor:"text-gray-400"}}},jt=qr=>qr?`${qr} dBm`:"N/A",te=qr=>qr?`${qr} dB`:"N/A",he=(qr,Di,Fi,Pi)=>{const Yi=(Fi-qr)*Math.PI/180,Ca=(Pi-Di)*Math.PI/180,Ni=Math.sin(Yi/2)*Math.sin(Yi/2)+Math.cos(qr*Math.PI/180)*Math.cos(Fi*Math.PI/180)*Math.sin(Ca/2)*Math.sin(Ca/2);return 6371*(2*Math.atan2(Math.sqrt(Ni),Math.sqrt(1-Ni)))},De=qr=>B.baseLatitude===null||B.baseLongitude===null||qr.latitude===null||qr.longitude===null?"N/A":`${he(B.baseLatitude,B.baseLongitude,qr.latitude,qr.longitude).toFixed(1)} km`,er=async qr=>{try{return await navigator.clipboard.writeText(qr),!0}catch{const Di=document.createElement("textarea");return Di.value=qr,document.body.appendChild(Di),Di.select(),document.execCommand("copy"),document.body.removeChild(Di),!0}},pr=qr=>{const Di=Date.now(),Fi=qr*1e3,Pi=Di-Fi,bi=Math.floor(Pi/1e3),Yi=Math.floor(bi/60),Ca=Math.floor(Yi/60),Ni=Math.floor(Ca/24);return bi<60?`${bi}s ago`:Yi<60?`${Yi}m ago`:Ca<24?`${Ca}h ago`:`${Ni}d ago`},Mr=qr=>{const Di=Date.now(),Fi=qr*1e3,Pi=Di-Fi,bi=Math.floor(Pi/(1e3*60*60));return bi<1?{color:"text-green-400"}:bi<26?{color:"text-yellow-400"}:{color:"text-red-400"}},Tr=async(qr,Di)=>{const Fi=`${qr.toFixed(6)}, ${Di.toFixed(6)}`;await er(Fi)},Vr=(qr,Di)=>{const Fi=`https://www.google.com/maps?q=${qr},${Di}`;window.open(Fi,"_blank")},mn=async qr=>{await er(qr),E.value=qr,setTimeout(()=>{E.value=null},2e3)},Dt=qr=>qr?qr>=-50?{bars:5,color:"text-green-400"}:qr>=-60?{bars:4,color:"text-green-300"}:qr>=-70?{bars:3,color:"text-yellow-400"}:qr>=-80?{bars:2,color:"text-orange-400"}:qr>=-90?{bars:1,color:"text-red-400"}:{bars:0,color:"text-red-500"}:{bars:0,color:"text-gray-400"},cn=()=>B.isCompactView?"py-2 px-2":"py-4 px-3",Jn=()=>{K("toggle-view")},Bn=qr=>{K("highlight-node",qr)},ni=qr=>{K("unhighlight-node",qr)},Wi=qr=>{K("menu-ping",qr)},Un=qr=>{K("menu-delete",qr)};return(qr,Di)=>(_i(),zi("div",Bot,[Ee("div",Not,[Ee("div",jot,[Ee("div",{class:"w-3 h-3 rounded-full border border-white/20",style:hm({backgroundColor:qr.color})},null,4),Ee("h3",Uot,Qi(qr.contactType),1),Ee("span",Vot,Qi(qr.adverts.length),1)]),qr.isFirstTable&&qr.showViewToggle?(_i(),zi("div",Hot,[Ee("button",{onClick:Jn,class:jo(["p-2 rounded-md transition-colors",qr.isCompactView?"text-white/60 hover:text-primary hover:bg-primary/10":"bg-primary/20 text-primary border border-primary/30"]),title:"Comfortable view"},Di[0]||(Di[0]=[Ee("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("rect",{x:"3",y:"3",width:"18",height:"6",rx:"2",stroke:"currentColor","stroke-width":"2"}),Ee("rect",{x:"3",y:"12",width:"18",height:"6",rx:"2",stroke:"currentColor","stroke-width":"2"})],-1)]),2),Ee("button",{onClick:Jn,class:jo(["p-2 rounded-md transition-colors",qr.isCompactView?"bg-primary/20 text-primary border border-primary/30":"text-white/60 hover:text-primary hover:bg-primary/10"]),title:"Compact view"},Di[1]||(Di[1]=[Ee("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("rect",{x:"3",y:"3",width:"18",height:"4",rx:"2",stroke:"currentColor","stroke-width":"2"}),Ee("rect",{x:"3",y:"10",width:"18",height:"4",rx:"2",stroke:"currentColor","stroke-width":"2"}),Ee("rect",{x:"3",y:"17",width:"18",height:"4",rx:"2",stroke:"currentColor","stroke-width":"2"})],-1)]),2)])):is("",!0)]),Ee("div",Wot,[Ee("table",qot,[Ee("thead",null,[Ee("tr",$ot,[Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},null,2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Node Name",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Public Key",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Location",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Distance",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Route Type",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"RSSI",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"SNR",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Last Seen",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"First Seen",2),Ee("th",{class:jo(`text-left text-dark-text text-xs font-medium py-3 ${cn().split(" ")[1]} border-b border-white/5`)},"Advert Count",2)])]),Ee("tbody",Zot,[(_i(!0),zi(Pu,null,Jh(qr.adverts,Fi=>(_i(),zi("tr",{key:Fi.id,class:"hover:bg-white/5 transition-colors",onMouseenter:Pi=>Bn(Fi.pubkey),onMouseleave:Pi=>ni(Fi.pubkey)},[Ee("td",{class:jo(cn())},[Wl(Rot,{neighbor:Fi,onPing:Wi,onDelete:Un},null,8,["neighbor"])],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},Qi(Fi.node_name||"Unknown"),3),Ee("td",{class:jo(`${cn()} text-white text-sm font-mono`)},[Ee("button",{onClick:Pi=>mn(Fi.pubkey),class:jo(["text-white hover:text-primary-light transition-colors cursor-pointer underline underline-offset-2 decoration-white/30 hover:decoration-primary-light/60",E.value===Fi.pubkey?"text-green-400 decoration-green-400/60":""]),title:E.value===Fi.pubkey?"Copied!":"Click to copy full public key"},[Qu(Qi(_t(Fi.pubkey))+" ",1),E.value===Fi.pubkey?(_i(),zi("span",Kot,"✓")):is("",!0)],10,Yot)],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Fi.latitude!==null&&Fi.longitude!==null?(_i(),zi("div",Xot,[Ee("span",Jot,Qi(Fi.latitude.toFixed(4))+", "+Qi(Fi.longitude.toFixed(4)),1),Ee("div",Qot,[Ee("button",{onClick:Pi=>Tr(Fi.latitude,Fi.longitude),class:"text-white/60 hover:text-white transition-colors cursor-pointer",title:"Copy coordinates to clipboard"},Di[2]||(Di[2]=[Ee("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2",stroke:"currentColor","stroke-width":"2"}),Ee("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1",stroke:"currentColor","stroke-width":"2"})],-1)]),8,tst),Ee("button",{onClick:Pi=>Vr(Fi.latitude,Fi.longitude),class:"text-white/60 hover:text-blue-400 transition-colors cursor-pointer",title:"Open in Google Maps"},Di[3]||(Di[3]=[Ee("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z",stroke:"currentColor","stroke-width":"2"}),Ee("circle",{cx:"12",cy:"10",r:"3",stroke:"currentColor","stroke-width":"2"})],-1)]),8,est)])])):(_i(),zi("span",rst,"Unknown"))],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},Qi(De(Fi)),3),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Ee("span",{class:jo(["inline-block px-2 py-1 rounded-full text-xs border transition-colors",Ot(Fi.route_type).bgColor,Ot(Fi.route_type).borderColor,Ot(Fi.route_type).textColor])},Qi(Ot(Fi.route_type).text),3)],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Ee("div",nst,[Ee("div",ist,[(_i(),zi(Pu,null,Jh(5,Pi=>Ee("div",{key:Pi,class:jo(["w-1 transition-colors",Pi<=Dt(Fi.rssi).bars?Dt(Fi.rssi).color:"text-gray-600"]),style:hm({height:`${4+Pi*2}px`})},Di[4]||(Di[4]=[Ee("div",{class:"w-full h-full bg-current rounded-sm"},null,-1)]),6)),64))]),Ee("span",{class:jo(Dt(Fi.rssi).color)},Qi(jt(Fi.rssi)),3)])],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},Qi(te(Fi.snr)),3),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Ee("div",ast,[Ee("div",{class:jo(["w-2 h-2 rounded-full",Mr(Fi.last_seen).color==="text-green-400"?"bg-green-400":"",Mr(Fi.last_seen).color==="text-yellow-400"?"bg-yellow-400":"",Mr(Fi.last_seen).color==="text-red-400"?"bg-red-400":""])},null,2),Ee("span",{class:jo([Mr(Fi.last_seen).color,"cursor-help"]),title:pt(Fi.last_seen)},Qi(pr(Fi.last_seen)),11,ost)])],2),Ee("td",{class:jo(`${cn()} text-white text-sm`)},[Ee("span",{title:pt(Fi.first_seen),class:"cursor-help"},Qi(pr(Fi.first_seen)),9,sst)],2),Ee("td",{class:jo(`${cn()} text-white text-sm text-center`)},Qi(Fi.advert_count),3)],40,Got))),128))])])])]))}}),ust={class:"space-y-6"},cst={key:0,class:"flex items-center justify-center py-12"},hst={key:1,class:"bg-accent-red/10 border border-accent-red/20 rounded-[15px] p-6"},fst={class:"flex items-center gap-3"},dst={class:"text-accent-red/80 text-sm"},pst={key:0,class:"text-center py-12"},mst=Dc({name:"NeighborsView",__name:"Neighbors",setup(d){const s=Om(),E={0:"Unknown",1:"Chat Node",2:"Repeater",3:"Room Server",4:"Hybrid Node"},B={0:"#6b7280",1:"#60a5fa",2:"#34d399",3:"#a855f7",4:"#f59e0b"},K=Ga({}),pt=Ga(!0),_t=Ga(null),Ot=Ga(!1),jt=Ga(!1),te=Ga(null),he=$o(()=>{if(!te.value)return null;const Un=te.value;return{id:Un.id,pubkey:Un.pubkey,node_name:Un.node_name,contact_type:Un.contact_type,latitude:Un.latitude,longitude:Un.longitude,rssi:Un.rssi,snr:Un.snr,route_type:Un.route_type,last_seen:Un.last_seen,first_seen:Un.first_seen,advert_count:Un.advert_count,timestamp:Un.timestamp,is_repeater:Un.is_repeater,is_new_neighbor:Un.is_new_neighbor}}),De=$o(()=>s.stats?.config?.repeater?.latitude),er=$o(()=>s.stats?.config?.repeater?.longitude),pr=$o(()=>Object.entries(E).filter(([Un])=>K.value[Un]?.length>0).sort(([Un],[qr])=>parseInt(Un)-parseInt(qr))),Mr=$o(()=>Object.values(K.value).flat().filter(Un=>Un.latitude!==null&&Un.longitude!==null)),Tr=async Un=>{try{const qr=await Ah.get(`/adverts_by_contact_type?contact_type=${encodeURIComponent(Un)}&hours=168`);return qr.success&&Array.isArray(qr.data)?qr.data:[]}catch(qr){return console.error(`Error fetching adverts for contact type ${Un}:`,qr),[]}},Vr=async()=>{pt.value=!0,_t.value=null;try{K.value={};for(const[Un,qr]of Object.entries(E)){const Di=await Tr(qr);Di.length>0&&(K.value[Un]=Di)}}catch(Un){console.error("Error loading adverts:",Un),_t.value=Un instanceof Error?Un.message:"Failed to load neighbor data"}finally{pt.value=!1}},mn=Ga(),Dt=Un=>{mn.value?.highlightNode(Un)},cn=Un=>{mn.value?.unhighlightNode(Un)},Jn=async Un=>{const qr=Un;try{const Di=await Ah.post("/ping_neighbor",{pubkey:qr.pubkey});Di.success?console.log("Ping sent successfully"):console.error("Failed to ping neighbor:",Di.error)}catch(Di){console.error("Error pinging neighbor:",Di)}},Bn=Un=>{te.value=Un,jt.value=!0},ni=()=>{jt.value=!1,te.value=null},Wi=async Un=>{try{await Ah.deleteAdvert(Un),await Vr(),ni()}catch(qr){console.error("Error deleting neighbor:",qr)}};return bp(async()=>{await Vr()}),(Un,qr)=>(_i(),zi("div",ust,[pt.value?(_i(),zi("div",cst,qr[1]||(qr[1]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),Ee("p",{class:"text-dark-text"},"Loading neighbor data...")],-1)]))):_t.value?(_i(),zi("div",hst,[Ee("div",fst,[qr[3]||(qr[3]=Ee("svg",{class:"w-5 h-5 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),Ee("div",null,[qr[2]||(qr[2]=Ee("h3",{class:"text-accent-red font-medium"},"Error Loading Neighbors",-1)),Ee("p",dst,Qi(_t.value),1)])])])):(_i(),zi(Pu,{key:2},[Wl(Dot,{ref_key:"networkMapRef",ref:mn,adverts:Mr.value,"base-latitude":De.value,"base-longitude":er.value},null,8,["adverts","base-latitude","base-longitude"]),(_i(!0),zi(Pu,null,Jh(pr.value,([Di,Fi])=>(_i(),zi("div",{key:Di,class:"space-y-6"},[Wl(lst,{"contact-type":Fi,"contact-type-key":Di,adverts:K.value[Di],color:B[parseInt(Di)],"base-latitude":De.value,"base-longitude":er.value,"is-compact-view":Ot.value,"is-first-table":Di===pr.value[0]?.[0],"show-view-toggle":pr.value.length>0,onHighlightNode:Dt,onUnhighlightNode:cn,onMenuPing:Jn,onMenuDelete:Bn,onToggleView:qr[0]||(qr[0]=Pi=>Ot.value=!Ot.value)},null,8,["contact-type","contact-type-key","adverts","color","base-latitude","base-longitude","is-compact-view","is-first-table","show-view-toggle"])]))),128)),pr.value.length===0?(_i(),zi("div",pst,[qr[4]||(qr[4]=$f('

No Neighbors Found

No mesh neighbors have been discovered in your area yet.

',3)),Ee("button",{onClick:Vr,class:"mt-4 px-4 py-2 bg-primary/20 text-primary border border-primary/30 rounded-lg hover:bg-primary/30 transition-colors"}," Refresh ")])):is("",!0)],64)),Wl(bot,{show:jt.value,neighbor:he.value,onClose:ni,onDelete:Wi},null,8,["show","neighbor"])]))}});/*! * @kurkle/color v0.3.4 * https://github.com/kurkle/color#readme * (c) 2024 Jukka Kurkela * Released under the MIT License - */function lw(d){return d+.5|0}const u1=(d,l,z)=>Math.max(Math.min(d,z),l);function v2(d){return u1(lw(d*2.55),0,255)}function p1(d){return u1(lw(d*255),0,255)}function tv(d){return u1(lw(d/2.55)/100,0,1)}function VL(d){return u1(lw(d*100),0,100)}const lm={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mA=[..."0123456789ABCDEF"],_ot=d=>mA[d&15],bot=d=>mA[(d&240)>>4]+mA[d&15],C5=d=>(d&240)>>4===(d&15),wot=d=>C5(d.r)&&C5(d.g)&&C5(d.b)&&C5(d.a);function kot(d){var l=d.length,z;return d[0]==="#"&&(l===4||l===5?z={r:255&lm[d[1]]*17,g:255&lm[d[2]]*17,b:255&lm[d[3]]*17,a:l===5?lm[d[4]]*17:255}:(l===7||l===9)&&(z={r:lm[d[1]]<<4|lm[d[2]],g:lm[d[3]]<<4|lm[d[4]],b:lm[d[5]]<<4|lm[d[6]],a:l===9?lm[d[7]]<<4|lm[d[8]]:255})),z}const Tot=(d,l)=>d<255?l(d):"";function Aot(d){var l=wot(d)?_ot:bot;return d?"#"+l(d.r)+l(d.g)+l(d.b)+Tot(d.a,l):void 0}const Mot=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function PO(d,l,z){const j=l*Math.min(z,1-z),J=(mt,kt=(mt+d/30)%12)=>z-j*Math.max(Math.min(kt-3,9-kt,1),-1);return[J(0),J(8),J(4)]}function Sot(d,l,z){const j=(J,mt=(J+d/60)%6)=>z-z*l*Math.max(Math.min(mt,4-mt,1),0);return[j(5),j(3),j(1)]}function Eot(d,l,z){const j=PO(d,1,.5);let J;for(l+z>1&&(J=1/(l+z),l*=J,z*=J),J=0;J<3;J++)j[J]*=1-l-z,j[J]+=l;return j}function Cot(d,l,z,j,J){return d===J?(l-z)/j+(l.5?pe/(2-mt-kt):pe/(mt+kt),$t=Cot(z,j,J,pe,mt),$t=$t*60+.5),[$t|0,ee||0,Dt]}function nM(d,l,z,j){return(Array.isArray(l)?d(l[0],l[1],l[2]):d(l,z,j)).map(p1)}function iM(d,l,z){return nM(PO,d,l,z)}function Lot(d,l,z){return nM(Eot,d,l,z)}function Pot(d,l,z){return nM(Sot,d,l,z)}function zO(d){return(d%360+360)%360}function zot(d){const l=Mot.exec(d);let z=255,j;if(!l)return;l[5]!==j&&(z=l[6]?v2(+l[5]):p1(+l[5]));const J=zO(+l[2]),mt=+l[3]/100,kt=+l[4]/100;return l[1]==="hwb"?j=Lot(J,mt,kt):l[1]==="hsv"?j=Pot(J,mt,kt):j=iM(J,mt,kt),{r:j[0],g:j[1],b:j[2],a:z}}function Iot(d,l){var z=rM(d);z[0]=zO(z[0]+l),z=iM(z),d.r=z[0],d.g=z[1],d.b=z[2]}function Oot(d){if(!d)return;const l=rM(d),z=l[0],j=VL(l[1]),J=VL(l[2]);return d.a<255?`hsla(${z}, ${j}%, ${J}%, ${tv(d.a)})`:`hsl(${z}, ${j}%, ${J}%)`}const HL={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},WL={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Dot(){const d={},l=Object.keys(WL),z=Object.keys(HL);let j,J,mt,kt,Dt;for(j=0;j>16&255,mt>>8&255,mt&255]}return d}let L5;function Fot(d){L5||(L5=Dot(),L5.transparent=[0,0,0,0]);const l=L5[d.toLowerCase()];return l&&{r:l[0],g:l[1],b:l[2],a:l.length===4?l[3]:255}}const Rot=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Bot(d){const l=Rot.exec(d);let z=255,j,J,mt;if(l){if(l[7]!==j){const kt=+l[7];z=l[8]?v2(kt):u1(kt*255,0,255)}return j=+l[1],J=+l[3],mt=+l[5],j=255&(l[2]?v2(j):u1(j,0,255)),J=255&(l[4]?v2(J):u1(J,0,255)),mt=255&(l[6]?v2(mt):u1(mt,0,255)),{r:j,g:J,b:mt,a:z}}}function Not(d){return d&&(d.a<255?`rgba(${d.r}, ${d.g}, ${d.b}, ${tv(d.a)})`:`rgb(${d.r}, ${d.g}, ${d.b})`)}const L8=d=>d<=.0031308?d*12.92:Math.pow(d,1/2.4)*1.055-.055,t_=d=>d<=.04045?d/12.92:Math.pow((d+.055)/1.055,2.4);function jot(d,l,z){const j=t_(tv(d.r)),J=t_(tv(d.g)),mt=t_(tv(d.b));return{r:p1(L8(j+z*(t_(tv(l.r))-j))),g:p1(L8(J+z*(t_(tv(l.g))-J))),b:p1(L8(mt+z*(t_(tv(l.b))-mt))),a:d.a+z*(l.a-d.a)}}function P5(d,l,z){if(d){let j=rM(d);j[l]=Math.max(0,Math.min(j[l]+j[l]*z,l===0?360:1)),j=iM(j),d.r=j[0],d.g=j[1],d.b=j[2]}}function IO(d,l){return d&&Object.assign(l||{},d)}function qL(d){var l={r:0,g:0,b:0,a:255};return Array.isArray(d)?d.length>=3&&(l={r:d[0],g:d[1],b:d[2],a:255},d.length>3&&(l.a=p1(d[3]))):(l=IO(d,{r:0,g:0,b:0,a:1}),l.a=p1(l.a)),l}function Uot(d){return d.charAt(0)==="r"?Bot(d):zot(d)}class q2{constructor(l){if(l instanceof q2)return l;const z=typeof l;let j;z==="object"?j=qL(l):z==="string"&&(j=kot(l)||Fot(l)||Uot(l)),this._rgb=j,this._valid=!!j}get valid(){return this._valid}get rgb(){var l=IO(this._rgb);return l&&(l.a=tv(l.a)),l}set rgb(l){this._rgb=qL(l)}rgbString(){return this._valid?Not(this._rgb):void 0}hexString(){return this._valid?Aot(this._rgb):void 0}hslString(){return this._valid?Oot(this._rgb):void 0}mix(l,z){if(l){const j=this.rgb,J=l.rgb;let mt;const kt=z===mt?.5:z,Dt=2*kt-1,$t=j.a-J.a,ee=((Dt*$t===-1?Dt:(Dt+$t)/(1+Dt*$t))+1)/2;mt=1-ee,j.r=255&ee*j.r+mt*J.r+.5,j.g=255&ee*j.g+mt*J.g+.5,j.b=255&ee*j.b+mt*J.b+.5,j.a=kt*j.a+(1-kt)*J.a,this.rgb=j}return this}interpolate(l,z){return l&&(this._rgb=jot(this._rgb,l._rgb,z)),this}clone(){return new q2(this.rgb)}alpha(l){return this._rgb.a=p1(l),this}clearer(l){const z=this._rgb;return z.a*=1-l,this}greyscale(){const l=this._rgb,z=lw(l.r*.3+l.g*.59+l.b*.11);return l.r=l.g=l.b=z,this}opaquer(l){const z=this._rgb;return z.a*=1+l,this}negate(){const l=this._rgb;return l.r=255-l.r,l.g=255-l.g,l.b=255-l.b,this}lighten(l){return P5(this._rgb,2,l),this}darken(l){return P5(this._rgb,2,-l),this}saturate(l){return P5(this._rgb,1,l),this}desaturate(l){return P5(this._rgb,1,-l),this}rotate(l){return Iot(this._rgb,l),this}}/*! + */function lw(d){return d+.5|0}const h1=(d,s,E)=>Math.max(Math.min(d,E),s);function v2(d){return h1(lw(d*2.55),0,255)}function g1(d){return h1(lw(d*255),0,255)}function Qg(d){return h1(lw(d/2.55)/100,0,1)}function iP(d){return h1(lw(d*100),0,100)}const am={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},MA=[..."0123456789ABCDEF"],gst=d=>MA[d&15],vst=d=>MA[(d&240)>>4]+MA[d&15],O5=d=>(d&240)>>4===(d&15),yst=d=>O5(d.r)&&O5(d.g)&&O5(d.b)&&O5(d.a);function xst(d){var s=d.length,E;return d[0]==="#"&&(s===4||s===5?E={r:255&am[d[1]]*17,g:255&am[d[2]]*17,b:255&am[d[3]]*17,a:s===5?am[d[4]]*17:255}:(s===7||s===9)&&(E={r:am[d[1]]<<4|am[d[2]],g:am[d[3]]<<4|am[d[4]],b:am[d[5]]<<4|am[d[6]],a:s===9?am[d[7]]<<4|am[d[8]]:255})),E}const _st=(d,s)=>d<255?s(d):"";function bst(d){var s=yst(d)?gst:vst;return d?"#"+s(d.r)+s(d.g)+s(d.b)+_st(d.a,s):void 0}const wst=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function tD(d,s,E){const B=s*Math.min(E,1-E),K=(pt,_t=(pt+d/30)%12)=>E-B*Math.max(Math.min(_t-3,9-_t,1),-1);return[K(0),K(8),K(4)]}function kst(d,s,E){const B=(K,pt=(K+d/60)%6)=>E-E*s*Math.max(Math.min(pt,4-pt,1),0);return[B(5),B(3),B(1)]}function Tst(d,s,E){const B=tD(d,1,.5);let K;for(s+E>1&&(K=1/(s+E),s*=K,E*=K),K=0;K<3;K++)B[K]*=1-s-E,B[K]+=s;return B}function Ast(d,s,E,B,K){return d===K?(s-E)/B+(s.5?he/(2-pt-_t):he/(pt+_t),jt=Ast(E,B,K,he,pt),jt=jt*60+.5),[jt|0,te||0,Ot]}function mM(d,s,E,B){return(Array.isArray(s)?d(s[0],s[1],s[2]):d(s,E,B)).map(g1)}function gM(d,s,E){return mM(tD,d,s,E)}function Mst(d,s,E){return mM(Tst,d,s,E)}function Sst(d,s,E){return mM(kst,d,s,E)}function eD(d){return(d%360+360)%360}function Est(d){const s=wst.exec(d);let E=255,B;if(!s)return;s[5]!==B&&(E=s[6]?v2(+s[5]):g1(+s[5]));const K=eD(+s[2]),pt=+s[3]/100,_t=+s[4]/100;return s[1]==="hwb"?B=Mst(K,pt,_t):s[1]==="hsv"?B=Sst(K,pt,_t):B=gM(K,pt,_t),{r:B[0],g:B[1],b:B[2],a:E}}function Cst(d,s){var E=pM(d);E[0]=eD(E[0]+s),E=gM(E),d.r=E[0],d.g=E[1],d.b=E[2]}function Lst(d){if(!d)return;const s=pM(d),E=s[0],B=iP(s[1]),K=iP(s[2]);return d.a<255?`hsla(${E}, ${B}%, ${K}%, ${Qg(d.a)})`:`hsl(${E}, ${B}%, ${K}%)`}const aP={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},oP={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Pst(){const d={},s=Object.keys(oP),E=Object.keys(aP);let B,K,pt,_t,Ot;for(B=0;B>16&255,pt>>8&255,pt&255]}return d}let D5;function Ist(d){D5||(D5=Pst(),D5.transparent=[0,0,0,0]);const s=D5[d.toLowerCase()];return s&&{r:s[0],g:s[1],b:s[2],a:s.length===4?s[3]:255}}const zst=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ost(d){const s=zst.exec(d);let E=255,B,K,pt;if(s){if(s[7]!==B){const _t=+s[7];E=s[8]?v2(_t):h1(_t*255,0,255)}return B=+s[1],K=+s[3],pt=+s[5],B=255&(s[2]?v2(B):h1(B,0,255)),K=255&(s[4]?v2(K):h1(K,0,255)),pt=255&(s[6]?v2(pt):h1(pt,0,255)),{r:B,g:K,b:pt,a:E}}}function Dst(d){return d&&(d.a<255?`rgba(${d.r}, ${d.g}, ${d.b}, ${Qg(d.a)})`:`rgb(${d.r}, ${d.g}, ${d.b})`)}const j8=d=>d<=.0031308?d*12.92:Math.pow(d,1/2.4)*1.055-.055,e_=d=>d<=.04045?d/12.92:Math.pow((d+.055)/1.055,2.4);function Fst(d,s,E){const B=e_(Qg(d.r)),K=e_(Qg(d.g)),pt=e_(Qg(d.b));return{r:g1(j8(B+E*(e_(Qg(s.r))-B))),g:g1(j8(K+E*(e_(Qg(s.g))-K))),b:g1(j8(pt+E*(e_(Qg(s.b))-pt))),a:d.a+E*(s.a-d.a)}}function F5(d,s,E){if(d){let B=pM(d);B[s]=Math.max(0,Math.min(B[s]+B[s]*E,s===0?360:1)),B=gM(B),d.r=B[0],d.g=B[1],d.b=B[2]}}function rD(d,s){return d&&Object.assign(s||{},d)}function sP(d){var s={r:0,g:0,b:0,a:255};return Array.isArray(d)?d.length>=3&&(s={r:d[0],g:d[1],b:d[2],a:255},d.length>3&&(s.a=g1(d[3]))):(s=rD(d,{r:0,g:0,b:0,a:1}),s.a=g1(s.a)),s}function Rst(d){return d.charAt(0)==="r"?Ost(d):Est(d)}class q2{constructor(s){if(s instanceof q2)return s;const E=typeof s;let B;E==="object"?B=sP(s):E==="string"&&(B=xst(s)||Ist(s)||Rst(s)),this._rgb=B,this._valid=!!B}get valid(){return this._valid}get rgb(){var s=rD(this._rgb);return s&&(s.a=Qg(s.a)),s}set rgb(s){this._rgb=sP(s)}rgbString(){return this._valid?Dst(this._rgb):void 0}hexString(){return this._valid?bst(this._rgb):void 0}hslString(){return this._valid?Lst(this._rgb):void 0}mix(s,E){if(s){const B=this.rgb,K=s.rgb;let pt;const _t=E===pt?.5:E,Ot=2*_t-1,jt=B.a-K.a,te=((Ot*jt===-1?Ot:(Ot+jt)/(1+Ot*jt))+1)/2;pt=1-te,B.r=255&te*B.r+pt*K.r+.5,B.g=255&te*B.g+pt*K.g+.5,B.b=255&te*B.b+pt*K.b+.5,B.a=_t*B.a+(1-_t)*K.a,this.rgb=B}return this}interpolate(s,E){return s&&(this._rgb=Fst(this._rgb,s._rgb,E)),this}clone(){return new q2(this.rgb)}alpha(s){return this._rgb.a=g1(s),this}clearer(s){const E=this._rgb;return E.a*=1-s,this}greyscale(){const s=this._rgb,E=lw(s.r*.3+s.g*.59+s.b*.11);return s.r=s.g=s.b=E,this}opaquer(s){const E=this._rgb;return E.a*=1+s,this}negate(){const s=this._rgb;return s.r=255-s.r,s.g=255-s.g,s.b=255-s.b,this}lighten(s){return F5(this._rgb,2,s),this}darken(s){return F5(this._rgb,2,-s),this}saturate(s){return F5(this._rgb,1,s),this}desaturate(s){return F5(this._rgb,1,-s),this}rotate(s){return Cst(this._rgb,s),this}}/*! * Chart.js v4.5.1 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License - */function Kg(){}const Vot=(()=>{let d=0;return()=>d++})();function Bh(d){return d==null}function tp(d){if(Array.isArray&&Array.isArray(d))return!0;const l=Object.prototype.toString.call(d);return l.slice(0,7)==="[object"&&l.slice(-6)==="Array]"}function Cc(d){return d!==null&&Object.prototype.toString.call(d)==="[object Object]"}function n0(d){return(typeof d=="number"||d instanceof Number)&&isFinite(+d)}function ng(d,l){return n0(d)?d:l}function hc(d,l){return typeof d>"u"?l:d}const Hot=(d,l)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100:+d/l,OO=(d,l)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100*l:+d;function Rf(d,l,z){if(d&&typeof d.call=="function")return d.apply(z,l)}function Xh(d,l,z,j){let J,mt,kt;if(tp(d))for(mt=d.length,J=0;Jd,x:d=>d.x,y:d=>d.y};function Zot(d){const l=d.split("."),z=[];let j="";for(const J of l)j+=J,j.endsWith("\\")?j=j.slice(0,-1)+".":(z.push(j),j="");return z}function $ot(d){const l=Zot(d);return z=>{for(const j of l){if(j==="")break;z=z&&z[j]}return z}}function Ey(d,l){return(ZL[l]||(ZL[l]=$ot(l)))(d)}function aM(d){return d.charAt(0).toUpperCase()+d.slice(1)}const $2=d=>typeof d<"u",v1=d=>typeof d=="function",$L=(d,l)=>{if(d.size!==l.size)return!1;for(const z of d)if(!l.has(z))return!1;return!0};function Got(d){return d.type==="mouseup"||d.type==="click"||d.type==="contextmenu"}const Jh=Math.PI,ud=2*Jh,Yot=ud+Jh,m4=Number.POSITIVE_INFINITY,Kot=Jh/180,lp=Jh/2,uy=Jh/4,GL=Jh*2/3,FO=Math.log10,fg=Math.sign;function P2(d,l,z){return Math.abs(d-l)J-mt).pop(),l}function Jot(d){return typeof d=="symbol"||typeof d=="object"&&d!==null&&!(Symbol.toPrimitive in d||"toString"in d||"valueOf"in d)}function G2(d){return!Jot(d)&&!isNaN(parseFloat(d))&&isFinite(d)}function Qot(d,l){const z=Math.round(d);return z-l<=d&&z+l>=d}function tst(d,l,z){let j,J,mt;for(j=0,J=d.length;j$t&&ee=Math.min(l,z)-j&&d<=Math.max(l,z)+j}function oM(d,l,z){z=z||(kt=>d[kt]1;)mt=J+j>>1,z(mt)?J=mt:j=mt;return{lo:J,hi:j}}const _y=(d,l,z,j)=>oM(d,z,j?J=>{const mt=d[J][l];return mtd[J][l]oM(d,z,j=>d[j][l]>=z);function ast(d,l,z){let j=0,J=d.length;for(;jj&&d[J-1]>z;)J--;return j>0||J{const j="_onData"+aM(z),J=d[z];Object.defineProperty(d,z,{configurable:!0,enumerable:!1,value(...mt){const kt=J.apply(this,mt);return d._chartjs.listeners.forEach(Dt=>{typeof Dt[j]=="function"&&Dt[j](...mt)}),kt}})})}function XL(d,l){const z=d._chartjs;if(!z)return;const j=z.listeners,J=j.indexOf(l);J!==-1&&j.splice(J,1),!(j.length>0)&&(BO.forEach(mt=>{delete d[mt]}),delete d._chartjs)}function NO(d){const l=new Set(d);return l.size===d.length?d:Array.from(l)}const jO=function(){return typeof window>"u"?function(d){return d()}:window.requestAnimationFrame}();function UO(d,l){let z=[],j=!1;return function(...J){z=J,j||(j=!0,jO.call(window,()=>{j=!1,d.apply(l,z)}))}}function sst(d,l){let z;return function(...j){return l?(clearTimeout(z),z=setTimeout(d,l,j)):d.apply(this,j),l}}const sM=d=>d==="start"?"left":d==="end"?"right":"center",Gp=(d,l,z)=>d==="start"?l:d==="end"?z:(l+z)/2,lst=(d,l,z,j)=>d===(j?"left":"right")?z:d==="center"?(l+z)/2:l;function ust(d,l,z){const j=l.length;let J=0,mt=j;if(d._sorted){const{iScale:kt,vScale:Dt,_parsed:$t}=d,ee=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null,pe=kt.axis,{min:Be,max:ir,minDefined:vr,maxDefined:Ir}=kt.getUserBounds();if(vr){if(J=Math.min(_y($t,pe,Be).lo,z?j:_y(l,pe,kt.getPixelForValue(Be)).lo),ee){const Pr=$t.slice(0,J+1).reverse().findIndex(Wr=>!Bh(Wr[Dt.axis]));J-=Math.max(0,Pr)}J=e0(J,0,j-1)}if(Ir){let Pr=Math.max(_y($t,kt.axis,ir,!0).hi+1,z?0:_y(l,pe,kt.getPixelForValue(ir),!0).hi+1);if(ee){const Wr=$t.slice(Pr-1).findIndex(Tn=>!Bh(Tn[Dt.axis]));Pr+=Math.max(0,Wr)}mt=e0(Pr,J,j)-J}else mt=j-J}return{start:J,count:mt}}function cst(d){const{xScale:l,yScale:z,_scaleRanges:j}=d,J={xmin:l.min,xmax:l.max,ymin:z.min,ymax:z.max};if(!j)return d._scaleRanges=J,!0;const mt=j.xmin!==l.min||j.xmax!==l.max||j.ymin!==z.min||j.ymax!==z.max;return Object.assign(j,J),mt}const z5=d=>d===0||d===1,JL=(d,l,z)=>-(Math.pow(2,10*(d-=1))*Math.sin((d-l)*ud/z)),QL=(d,l,z)=>Math.pow(2,-10*d)*Math.sin((d-l)*ud/z)+1,z2={linear:d=>d,easeInQuad:d=>d*d,easeOutQuad:d=>-d*(d-2),easeInOutQuad:d=>(d/=.5)<1?.5*d*d:-.5*(--d*(d-2)-1),easeInCubic:d=>d*d*d,easeOutCubic:d=>(d-=1)*d*d+1,easeInOutCubic:d=>(d/=.5)<1?.5*d*d*d:.5*((d-=2)*d*d+2),easeInQuart:d=>d*d*d*d,easeOutQuart:d=>-((d-=1)*d*d*d-1),easeInOutQuart:d=>(d/=.5)<1?.5*d*d*d*d:-.5*((d-=2)*d*d*d-2),easeInQuint:d=>d*d*d*d*d,easeOutQuint:d=>(d-=1)*d*d*d*d+1,easeInOutQuint:d=>(d/=.5)<1?.5*d*d*d*d*d:.5*((d-=2)*d*d*d*d+2),easeInSine:d=>-Math.cos(d*lp)+1,easeOutSine:d=>Math.sin(d*lp),easeInOutSine:d=>-.5*(Math.cos(Jh*d)-1),easeInExpo:d=>d===0?0:Math.pow(2,10*(d-1)),easeOutExpo:d=>d===1?1:-Math.pow(2,-10*d)+1,easeInOutExpo:d=>z5(d)?d:d<.5?.5*Math.pow(2,10*(d*2-1)):.5*(-Math.pow(2,-10*(d*2-1))+2),easeInCirc:d=>d>=1?d:-(Math.sqrt(1-d*d)-1),easeOutCirc:d=>Math.sqrt(1-(d-=1)*d),easeInOutCirc:d=>(d/=.5)<1?-.5*(Math.sqrt(1-d*d)-1):.5*(Math.sqrt(1-(d-=2)*d)+1),easeInElastic:d=>z5(d)?d:JL(d,.075,.3),easeOutElastic:d=>z5(d)?d:QL(d,.075,.3),easeInOutElastic(d){return z5(d)?d:d<.5?.5*JL(d*2,.1125,.45):.5+.5*QL(d*2-1,.1125,.45)},easeInBack(d){return d*d*((1.70158+1)*d-1.70158)},easeOutBack(d){return(d-=1)*d*((1.70158+1)*d+1.70158)+1},easeInOutBack(d){let l=1.70158;return(d/=.5)<1?.5*(d*d*(((l*=1.525)+1)*d-l)):.5*((d-=2)*d*(((l*=1.525)+1)*d+l)+2)},easeInBounce:d=>1-z2.easeOutBounce(1-d),easeOutBounce(d){return d<1/2.75?7.5625*d*d:d<2/2.75?7.5625*(d-=1.5/2.75)*d+.75:d<2.5/2.75?7.5625*(d-=2.25/2.75)*d+.9375:7.5625*(d-=2.625/2.75)*d+.984375},easeInOutBounce:d=>d<.5?z2.easeInBounce(d*2)*.5:z2.easeOutBounce(d*2-1)*.5+.5};function lM(d){if(d&&typeof d=="object"){const l=d.toString();return l==="[object CanvasPattern]"||l==="[object CanvasGradient]"}return!1}function tP(d){return lM(d)?d:new q2(d)}function P8(d){return lM(d)?d:new q2(d).saturate(.5).darken(.1).hexString()}const hst=["x","y","borderWidth","radius","tension"],fst=["color","borderColor","backgroundColor"];function dst(d){d.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),d.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:l=>l!=="onProgress"&&l!=="onComplete"&&l!=="fn"}),d.set("animations",{colors:{type:"color",properties:fst},numbers:{type:"number",properties:hst}}),d.describe("animations",{_fallback:"animation"}),d.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:l=>l|0}}}})}function pst(d){d.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const eP=new Map;function mst(d,l){l=l||{};const z=d+JSON.stringify(l);let j=eP.get(z);return j||(j=new Intl.NumberFormat(d,l),eP.set(z,j)),j}function uM(d,l,z){return mst(l,z).format(d)}const gst={values(d){return tp(d)?d:""+d},numeric(d,l,z){if(d===0)return"0";const j=this.chart.options.locale;let J,mt=d;if(z.length>1){const ee=Math.max(Math.abs(z[0].value),Math.abs(z[z.length-1].value));(ee<1e-4||ee>1e15)&&(J="scientific"),mt=vst(d,z)}const kt=FO(Math.abs(mt)),Dt=isNaN(kt)?1:Math.max(Math.min(-1*Math.floor(kt),20),0),$t={notation:J,minimumFractionDigits:Dt,maximumFractionDigits:Dt};return Object.assign($t,this.options.ticks.format),uM(d,j,$t)}};function vst(d,l){let z=l.length>3?l[2].value-l[1].value:l[1].value-l[0].value;return Math.abs(z)>=1&&d!==Math.floor(d)&&(z=d-Math.floor(d)),z}var VO={formatters:gst};function yst(d){d.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(l,z)=>z.lineWidth,tickColor:(l,z)=>z.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:VO.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),d.route("scale.ticks","color","","color"),d.route("scale.grid","color","","borderColor"),d.route("scale.border","color","","borderColor"),d.route("scale.title","color","","color"),d.describe("scale",{_fallback:!1,_scriptable:l=>!l.startsWith("before")&&!l.startsWith("after")&&l!=="callback"&&l!=="parser",_indexable:l=>l!=="borderDash"&&l!=="tickBorderDash"&&l!=="dash"}),d.describe("scales",{_fallback:"scale"}),d.describe("scale.ticks",{_scriptable:l=>l!=="backdropPadding"&&l!=="callback",_indexable:l=>l!=="backdropPadding"})}const Cy=Object.create(null),vA=Object.create(null);function I2(d,l){if(!l)return d;const z=l.split(".");for(let j=0,J=z.length;jj.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(j,J)=>P8(J.backgroundColor),this.hoverBorderColor=(j,J)=>P8(J.borderColor),this.hoverColor=(j,J)=>P8(J.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(l),this.apply(z)}set(l,z){return z8(this,l,z)}get(l){return I2(this,l)}describe(l,z){return z8(vA,l,z)}override(l,z){return z8(Cy,l,z)}route(l,z,j,J){const mt=I2(this,l),kt=I2(this,j),Dt="_"+z;Object.defineProperties(mt,{[Dt]:{value:mt[z],writable:!0},[z]:{enumerable:!0,get(){const $t=this[Dt],ee=kt[J];return Cc($t)?Object.assign({},ee,$t):hc($t,ee)},set($t){this[Dt]=$t}}})}apply(l){l.forEach(z=>z(this))}}var Vd=new xst({_scriptable:d=>!d.startsWith("on"),_indexable:d=>d!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[dst,pst,yst]);function _st(d){return!d||Bh(d.size)||Bh(d.family)?null:(d.style?d.style+" ":"")+(d.weight?d.weight+" ":"")+d.size+"px "+d.family}function rP(d,l,z,j,J){let mt=l[J];return mt||(mt=l[J]=d.measureText(J).width,z.push(J)),mt>j&&(j=mt),j}function cy(d,l,z){const j=d.currentDevicePixelRatio,J=z!==0?Math.max(z/2,.5):0;return Math.round((l-J)*j)/j+J}function nP(d,l){!l&&!d||(l=l||d.getContext("2d"),l.save(),l.resetTransform(),l.clearRect(0,0,d.width,d.height),l.restore())}function yA(d,l,z,j){HO(d,l,z,j,null)}function HO(d,l,z,j,J){let mt,kt,Dt,$t,ee,pe,Be,ir;const vr=l.pointStyle,Ir=l.rotation,Pr=l.radius;let Wr=(Ir||0)*Kot;if(vr&&typeof vr=="object"&&(mt=vr.toString(),mt==="[object HTMLImageElement]"||mt==="[object HTMLCanvasElement]")){d.save(),d.translate(z,j),d.rotate(Wr),d.drawImage(vr,-vr.width/2,-vr.height/2,vr.width,vr.height),d.restore();return}if(!(isNaN(Pr)||Pr<=0)){switch(d.beginPath(),vr){default:J?d.ellipse(z,j,J/2,Pr,0,0,ud):d.arc(z,j,Pr,0,ud),d.closePath();break;case"triangle":pe=J?J/2:Pr,d.moveTo(z+Math.sin(Wr)*pe,j-Math.cos(Wr)*Pr),Wr+=GL,d.lineTo(z+Math.sin(Wr)*pe,j-Math.cos(Wr)*Pr),Wr+=GL,d.lineTo(z+Math.sin(Wr)*pe,j-Math.cos(Wr)*Pr),d.closePath();break;case"rectRounded":ee=Pr*.516,$t=Pr-ee,kt=Math.cos(Wr+uy)*$t,Be=Math.cos(Wr+uy)*(J?J/2-ee:$t),Dt=Math.sin(Wr+uy)*$t,ir=Math.sin(Wr+uy)*(J?J/2-ee:$t),d.arc(z-Be,j-Dt,ee,Wr-Jh,Wr-lp),d.arc(z+ir,j-kt,ee,Wr-lp,Wr),d.arc(z+Be,j+Dt,ee,Wr,Wr+lp),d.arc(z-ir,j+kt,ee,Wr+lp,Wr+Jh),d.closePath();break;case"rect":if(!Ir){$t=Math.SQRT1_2*Pr,pe=J?J/2:$t,d.rect(z-pe,j-$t,2*pe,2*$t);break}Wr+=uy;case"rectRot":Be=Math.cos(Wr)*(J?J/2:Pr),kt=Math.cos(Wr)*Pr,Dt=Math.sin(Wr)*Pr,ir=Math.sin(Wr)*(J?J/2:Pr),d.moveTo(z-Be,j-Dt),d.lineTo(z+ir,j-kt),d.lineTo(z+Be,j+Dt),d.lineTo(z-ir,j+kt),d.closePath();break;case"crossRot":Wr+=uy;case"cross":Be=Math.cos(Wr)*(J?J/2:Pr),kt=Math.cos(Wr)*Pr,Dt=Math.sin(Wr)*Pr,ir=Math.sin(Wr)*(J?J/2:Pr),d.moveTo(z-Be,j-Dt),d.lineTo(z+Be,j+Dt),d.moveTo(z+ir,j-kt),d.lineTo(z-ir,j+kt);break;case"star":Be=Math.cos(Wr)*(J?J/2:Pr),kt=Math.cos(Wr)*Pr,Dt=Math.sin(Wr)*Pr,ir=Math.sin(Wr)*(J?J/2:Pr),d.moveTo(z-Be,j-Dt),d.lineTo(z+Be,j+Dt),d.moveTo(z+ir,j-kt),d.lineTo(z-ir,j+kt),Wr+=uy,Be=Math.cos(Wr)*(J?J/2:Pr),kt=Math.cos(Wr)*Pr,Dt=Math.sin(Wr)*Pr,ir=Math.sin(Wr)*(J?J/2:Pr),d.moveTo(z-Be,j-Dt),d.lineTo(z+Be,j+Dt),d.moveTo(z+ir,j-kt),d.lineTo(z-ir,j+kt);break;case"line":kt=J?J/2:Math.cos(Wr)*Pr,Dt=Math.sin(Wr)*Pr,d.moveTo(z-kt,j-Dt),d.lineTo(z+kt,j+Dt);break;case"dash":d.moveTo(z,j),d.lineTo(z+Math.cos(Wr)*(J?J/2:Pr),j+Math.sin(Wr)*Pr);break;case!1:d.closePath();break}d.fill(),l.borderWidth>0&&d.stroke()}}function K2(d,l,z){return z=z||.5,!l||d&&d.x>l.left-z&&d.xl.top-z&&d.y0&&mt.strokeColor!=="";let $t,ee;for(d.save(),d.font=J.string,kst(d,mt),$t=0;$t+d||0;function cM(d,l){const z={},j=Cc(l),J=j?Object.keys(l):l,mt=Cc(d)?j?kt=>hc(d[kt],d[l[kt]]):kt=>d[kt]:()=>d;for(const kt of J)z[kt]=Cst(mt(kt));return z}function WO(d){return cM(d,{top:"y",right:"x",bottom:"y",left:"x"})}function c_(d){return cM(d,["topLeft","topRight","bottomLeft","bottomRight"])}function pm(d){const l=WO(d);return l.width=l.left+l.right,l.height=l.top+l.bottom,l}function r0(d,l){d=d||{},l=l||Vd.font;let z=hc(d.size,l.size);typeof z=="string"&&(z=parseInt(z,10));let j=hc(d.style,l.style);j&&!(""+j).match(Sst)&&(console.warn('Invalid font style specified: "'+j+'"'),j=void 0);const J={family:hc(d.family,l.family),lineHeight:Est(hc(d.lineHeight,l.lineHeight),z),size:z,style:j,weight:hc(d.weight,l.weight),string:""};return J.string=_st(J),J}function I5(d,l,z,j){let J,mt,kt;for(J=0,mt=d.length;Jz&&Dt===0?0:Dt+$t;return{min:kt(j,-Math.abs(mt)),max:kt(J,mt)}}function Py(d,l){return Object.assign(Object.create(d),l)}function hM(d,l=[""],z,j,J=()=>d[0]){const mt=z||d;typeof j>"u"&&(j=GO("_fallback",d));const kt={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:d,_rootScopes:mt,_fallback:j,_getTarget:J,override:Dt=>hM([Dt,...d],l,mt,j)};return new Proxy(kt,{deleteProperty(Dt,$t){return delete Dt[$t],delete Dt._keys,delete d[0][$t],!0},get(Dt,$t){return ZO(Dt,$t,()=>Bst($t,l,d,Dt))},getOwnPropertyDescriptor(Dt,$t){return Reflect.getOwnPropertyDescriptor(Dt._scopes[0],$t)},getPrototypeOf(){return Reflect.getPrototypeOf(d[0])},has(Dt,$t){return aP(Dt).includes($t)},ownKeys(Dt){return aP(Dt)},set(Dt,$t,ee){const pe=Dt._storage||(Dt._storage=J());return Dt[$t]=pe[$t]=ee,delete Dt._keys,!0}})}function y_(d,l,z,j){const J={_cacheable:!1,_proxy:d,_context:l,_subProxy:z,_stack:new Set,_descriptors:qO(d,j),setContext:mt=>y_(d,mt,z,j),override:mt=>y_(d.override(mt),l,z,j)};return new Proxy(J,{deleteProperty(mt,kt){return delete mt[kt],delete d[kt],!0},get(mt,kt,Dt){return ZO(mt,kt,()=>zst(mt,kt,Dt))},getOwnPropertyDescriptor(mt,kt){return mt._descriptors.allKeys?Reflect.has(d,kt)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(d,kt)},getPrototypeOf(){return Reflect.getPrototypeOf(d)},has(mt,kt){return Reflect.has(d,kt)},ownKeys(){return Reflect.ownKeys(d)},set(mt,kt,Dt){return d[kt]=Dt,delete mt[kt],!0}})}function qO(d,l={scriptable:!0,indexable:!0}){const{_scriptable:z=l.scriptable,_indexable:j=l.indexable,_allKeys:J=l.allKeys}=d;return{allKeys:J,scriptable:z,indexable:j,isScriptable:v1(z)?z:()=>z,isIndexable:v1(j)?j:()=>j}}const Pst=(d,l)=>d?d+aM(l):l,fM=(d,l)=>Cc(l)&&d!=="adapters"&&(Object.getPrototypeOf(l)===null||l.constructor===Object);function ZO(d,l,z){if(Object.prototype.hasOwnProperty.call(d,l)||l==="constructor")return d[l];const j=z();return d[l]=j,j}function zst(d,l,z){const{_proxy:j,_context:J,_subProxy:mt,_descriptors:kt}=d;let Dt=j[l];return v1(Dt)&&kt.isScriptable(l)&&(Dt=Ist(l,Dt,d,z)),tp(Dt)&&Dt.length&&(Dt=Ost(l,Dt,d,kt.isIndexable)),fM(l,Dt)&&(Dt=y_(Dt,J,mt&&mt[l],kt)),Dt}function Ist(d,l,z,j){const{_proxy:J,_context:mt,_subProxy:kt,_stack:Dt}=z;if(Dt.has(d))throw new Error("Recursion detected: "+Array.from(Dt).join("->")+"->"+d);Dt.add(d);let $t=l(mt,kt||j);return Dt.delete(d),fM(d,$t)&&($t=dM(J._scopes,J,d,$t)),$t}function Ost(d,l,z,j){const{_proxy:J,_context:mt,_subProxy:kt,_descriptors:Dt}=z;if(typeof mt.index<"u"&&j(d))return l[mt.index%l.length];if(Cc(l[0])){const $t=l,ee=J._scopes.filter(pe=>pe!==$t);l=[];for(const pe of $t){const Be=dM(ee,J,d,pe);l.push(y_(Be,mt,kt&&kt[d],Dt))}}return l}function $O(d,l,z){return v1(d)?d(l,z):d}const Dst=(d,l)=>d===!0?l:typeof d=="string"?Ey(l,d):void 0;function Fst(d,l,z,j,J){for(const mt of l){const kt=Dst(z,mt);if(kt){d.add(kt);const Dt=$O(kt._fallback,z,J);if(typeof Dt<"u"&&Dt!==z&&Dt!==j)return Dt}else if(kt===!1&&typeof j<"u"&&z!==j)return null}return!1}function dM(d,l,z,j){const J=l._rootScopes,mt=$O(l._fallback,z,j),kt=[...d,...J],Dt=new Set;Dt.add(j);let $t=iP(Dt,kt,z,mt||z,j);return $t===null||typeof mt<"u"&&mt!==z&&($t=iP(Dt,kt,mt,$t,j),$t===null)?!1:hM(Array.from(Dt),[""],J,mt,()=>Rst(l,z,j))}function iP(d,l,z,j,J){for(;z;)z=Fst(d,l,z,j,J);return z}function Rst(d,l,z){const j=d._getTarget();l in j||(j[l]={});const J=j[l];return tp(J)&&Cc(z)?z:J||{}}function Bst(d,l,z,j){let J;for(const mt of l)if(J=GO(Pst(mt,d),z),typeof J<"u")return fM(d,J)?dM(z,j,d,J):J}function GO(d,l){for(const z of l){if(!z)continue;const j=z[d];if(typeof j<"u")return j}}function aP(d){let l=d._keys;return l||(l=d._keys=Nst(d._scopes)),l}function Nst(d){const l=new Set;for(const z of d)for(const j of Object.keys(z).filter(J=>!J.startsWith("_")))l.add(j);return Array.from(l)}const jst=Number.EPSILON||1e-14,x_=(d,l)=>ld==="x"?"y":"x";function Ust(d,l,z,j){const J=d.skip?l:d,mt=l,kt=z.skip?l:z,Dt=gA(mt,J),$t=gA(kt,mt);let ee=Dt/(Dt+$t),pe=$t/(Dt+$t);ee=isNaN(ee)?0:ee,pe=isNaN(pe)?0:pe;const Be=j*ee,ir=j*pe;return{previous:{x:mt.x-Be*(kt.x-J.x),y:mt.y-Be*(kt.y-J.y)},next:{x:mt.x+ir*(kt.x-J.x),y:mt.y+ir*(kt.y-J.y)}}}function Vst(d,l,z){const j=d.length;let J,mt,kt,Dt,$t,ee=x_(d,0);for(let pe=0;pe!ee.skip)),l.cubicInterpolationMode==="monotone")Wst(d,J);else{let ee=j?d[d.length-1]:d[0];for(mt=0,kt=d.length;mtd.ownerDocument.defaultView.getComputedStyle(d,null);function $st(d,l){return q4(d).getPropertyValue(l)}const Gst=["top","right","bottom","left"];function Ty(d,l,z){const j={};z=z?"-"+z:"";for(let J=0;J<4;J++){const mt=Gst[J];j[mt]=parseFloat(d[l+"-"+mt+z])||0}return j.width=j.left+j.right,j.height=j.top+j.bottom,j}const Yst=(d,l,z)=>(d>0||l>0)&&(!z||!z.shadowRoot);function Kst(d,l){const z=d.touches,j=z&&z.length?z[0]:d,{offsetX:J,offsetY:mt}=j;let kt=!1,Dt,$t;if(Yst(J,mt,d.target))Dt=J,$t=mt;else{const ee=l.getBoundingClientRect();Dt=j.clientX-ee.left,$t=j.clientY-ee.top,kt=!0}return{x:Dt,y:$t,box:kt}}function dy(d,l){if("native"in d)return d;const{canvas:z,currentDevicePixelRatio:j}=l,J=q4(z),mt=J.boxSizing==="border-box",kt=Ty(J,"padding"),Dt=Ty(J,"border","width"),{x:$t,y:ee,box:pe}=Kst(d,z),Be=kt.left+(pe&&Dt.left),ir=kt.top+(pe&&Dt.top);let{width:vr,height:Ir}=l;return mt&&(vr-=kt.width+Dt.width,Ir-=kt.height+Dt.height),{x:Math.round(($t-Be)/vr*z.width/j),y:Math.round((ee-ir)/Ir*z.height/j)}}function Xst(d,l,z){let j,J;if(l===void 0||z===void 0){const mt=d&&mM(d);if(!mt)l=d.clientWidth,z=d.clientHeight;else{const kt=mt.getBoundingClientRect(),Dt=q4(mt),$t=Ty(Dt,"border","width"),ee=Ty(Dt,"padding");l=kt.width-ee.width-$t.width,z=kt.height-ee.height-$t.height,j=v4(Dt.maxWidth,mt,"clientWidth"),J=v4(Dt.maxHeight,mt,"clientHeight")}}return{width:l,height:z,maxWidth:j||m4,maxHeight:J||m4}}const c1=d=>Math.round(d*10)/10;function Jst(d,l,z,j){const J=q4(d),mt=Ty(J,"margin"),kt=v4(J.maxWidth,d,"clientWidth")||m4,Dt=v4(J.maxHeight,d,"clientHeight")||m4,$t=Xst(d,l,z);let{width:ee,height:pe}=$t;if(J.boxSizing==="content-box"){const ir=Ty(J,"border","width"),vr=Ty(J,"padding");ee-=vr.width+ir.width,pe-=vr.height+ir.height}return ee=Math.max(0,ee-mt.width),pe=Math.max(0,j?ee/j:pe-mt.height),ee=c1(Math.min(ee,kt,$t.maxWidth)),pe=c1(Math.min(pe,Dt,$t.maxHeight)),ee&&!pe&&(pe=c1(ee/2)),(l!==void 0||z!==void 0)&&j&&$t.height&&pe>$t.height&&(pe=$t.height,ee=c1(Math.floor(pe*j))),{width:ee,height:pe}}function oP(d,l,z){const j=l||1,J=c1(d.height*j),mt=c1(d.width*j);d.height=c1(d.height),d.width=c1(d.width);const kt=d.canvas;return kt.style&&(z||!kt.style.height&&!kt.style.width)&&(kt.style.height=`${d.height}px`,kt.style.width=`${d.width}px`),d.currentDevicePixelRatio!==j||kt.height!==J||kt.width!==mt?(d.currentDevicePixelRatio=j,kt.height=J,kt.width=mt,d.ctx.setTransform(j,0,0,j,0,0),!0):!1}const Qst=function(){let d=!1;try{const l={get passive(){return d=!0,!1}};pM()&&(window.addEventListener("test",null,l),window.removeEventListener("test",null,l))}catch{}return d}();function sP(d,l){const z=$st(d,l),j=z&&z.match(/^(\d+)(\.\d+)?px$/);return j?+j[1]:void 0}function py(d,l,z,j){return{x:d.x+z*(l.x-d.x),y:d.y+z*(l.y-d.y)}}function tlt(d,l,z,j){return{x:d.x+z*(l.x-d.x),y:j==="middle"?z<.5?d.y:l.y:j==="after"?z<1?d.y:l.y:z>0?l.y:d.y}}function elt(d,l,z,j){const J={x:d.cp2x,y:d.cp2y},mt={x:l.cp1x,y:l.cp1y},kt=py(d,J,z),Dt=py(J,mt,z),$t=py(mt,l,z),ee=py(kt,Dt,z),pe=py(Dt,$t,z);return py(ee,pe,z)}const rlt=function(d,l){return{x(z){return d+d+l-z},setWidth(z){l=z},textAlign(z){return z==="center"?z:z==="right"?"left":"right"},xPlus(z,j){return z-j},leftForLtr(z,j){return z-j}}},nlt=function(){return{x(d){return d},setWidth(d){},textAlign(d){return d},xPlus(d,l){return d+l},leftForLtr(d,l){return d}}};function h_(d,l,z){return d?rlt(l,z):nlt()}function KO(d,l){let z,j;(l==="ltr"||l==="rtl")&&(z=d.canvas.style,j=[z.getPropertyValue("direction"),z.getPropertyPriority("direction")],z.setProperty("direction",l,"important"),d.prevTextDirection=j)}function XO(d,l){l!==void 0&&(delete d.prevTextDirection,d.canvas.style.setProperty("direction",l[0],l[1]))}function JO(d){return d==="angle"?{between:Y2,compare:rst,normalize:G0}:{between:iv,compare:(l,z)=>l-z,normalize:l=>l}}function lP({start:d,end:l,count:z,loop:j,style:J}){return{start:d%z,end:l%z,loop:j&&(l-d+1)%z===0,style:J}}function ilt(d,l,z){const{property:j,start:J,end:mt}=z,{between:kt,normalize:Dt}=JO(j),$t=l.length;let{start:ee,end:pe,loop:Be}=d,ir,vr;if(Be){for(ee+=$t,pe+=$t,ir=0,vr=$t;ir$t(J,wn,Tn)&&Dt(J,wn)!==0,jn=()=>Dt(mt,Tn)===0||$t(mt,wn,Tn),ai=()=>Pr||ei(),Qi=()=>!Pr||jn();for(let Gi=pe,En=pe;Gi<=Be;++Gi)Ft=l[Gi%kt],!Ft.skip&&(Tn=ee(Ft[j]),Tn!==wn&&(Pr=$t(Tn,J,mt),Wr===null&&ai()&&(Wr=Dt(Tn,J)===0?Gi:En),Wr!==null&&Qi()&&(Ir.push(lP({start:Wr,end:Gi,loop:ir,count:kt,style:vr})),Wr=null),En=Gi,wn=Tn));return Wr!==null&&Ir.push(lP({start:Wr,end:Be,loop:ir,count:kt,style:vr})),Ir}function tD(d,l){const z=[],j=d.segments;for(let J=0;JJ&&d[mt%l].skip;)mt--;return mt%=l,{start:J,end:mt}}function olt(d,l,z,j){const J=d.length,mt=[];let kt=l,Dt=d[l],$t;for($t=l+1;$t<=z;++$t){const ee=d[$t%J];ee.skip||ee.stop?Dt.skip||(j=!1,mt.push({start:l%J,end:($t-1)%J,loop:j}),l=kt=ee.stop?$t:null):(kt=$t,Dt.skip&&(l=$t)),Dt=ee}return kt!==null&&mt.push({start:l%J,end:kt%J,loop:j}),mt}function slt(d,l){const z=d.points,j=d.options.spanGaps,J=z.length;if(!J)return[];const mt=!!d._loop,{start:kt,end:Dt}=alt(z,J,mt,j);if(j===!0)return uP(d,[{start:kt,end:Dt,loop:mt}],z,l);const $t=Dt{let d=0;return()=>d++})();function Bh(d){return d==null}function Yd(d){if(Array.isArray&&Array.isArray(d))return!0;const s=Object.prototype.toString.call(d);return s.slice(0,7)==="[object"&&s.slice(-6)==="Array]"}function Sc(d){return d!==null&&Object.prototype.toString.call(d)==="[object Object]"}function t0(d){return(typeof d=="number"||d instanceof Number)&&isFinite(+d)}function ag(d,s){return t0(d)?d:s}function cc(d,s){return typeof d>"u"?s:d}const Nst=(d,s)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100:+d/s,nD=(d,s)=>typeof d=="string"&&d.endsWith("%")?parseFloat(d)/100*s:+d;function Df(d,s,E){if(d&&typeof d.call=="function")return d.apply(E,s)}function Xh(d,s,E,B){let K,pt,_t;if(Yd(d))for(pt=d.length,K=0;Kd,x:d=>d.x,y:d=>d.y};function Vst(d){const s=d.split("."),E=[];let B="";for(const K of s)B+=K,B.endsWith("\\")?B=B.slice(0,-1)+".":(E.push(B),B="");return E}function Hst(d){const s=Vst(d);return E=>{for(const B of s){if(B==="")break;E=E&&E[B]}return E}}function Cy(d,s){return(lP[s]||(lP[s]=Hst(s)))(d)}function vM(d){return d.charAt(0).toUpperCase()+d.slice(1)}const Z2=d=>typeof d<"u",x1=d=>typeof d=="function",uP=(d,s)=>{if(d.size!==s.size)return!1;for(const E of d)if(!s.has(E))return!1;return!0};function Wst(d){return d.type==="mouseup"||d.type==="click"||d.type==="contextmenu"}const Qh=Math.PI,od=2*Qh,qst=od+Qh,_4=Number.POSITIVE_INFINITY,$st=Qh/180,ip=Qh/2,cy=Qh/4,cP=Qh*2/3,aD=Math.log10,pg=Math.sign;function P2(d,s,E){return Math.abs(d-s)K-pt).pop(),s}function Gst(d){return typeof d=="symbol"||typeof d=="object"&&d!==null&&!(Symbol.toPrimitive in d||"toString"in d||"valueOf"in d)}function G2(d){return!Gst(d)&&!isNaN(parseFloat(d))&&isFinite(d)}function Yst(d,s){const E=Math.round(d);return E-s<=d&&E+s>=d}function Kst(d,s,E){let B,K,pt;for(B=0,K=d.length;Bjt&&te=Math.min(s,E)-B&&d<=Math.max(s,E)+B}function yM(d,s,E){E=E||(_t=>d[_t]1;)pt=K+B>>1,E(pt)?K=pt:B=pt;return{lo:K,hi:B}}const by=(d,s,E,B)=>yM(d,E,B?K=>{const pt=d[K][s];return ptd[K][s]yM(d,E,B=>d[B][s]>=E);function elt(d,s,E){let B=0,K=d.length;for(;BB&&d[K-1]>E;)K--;return B>0||K{const B="_onData"+vM(E),K=d[E];Object.defineProperty(d,E,{configurable:!0,enumerable:!1,value(...pt){const _t=K.apply(this,pt);return d._chartjs.listeners.forEach(Ot=>{typeof Ot[B]=="function"&&Ot[B](...pt)}),_t}})})}function dP(d,s){const E=d._chartjs;if(!E)return;const B=E.listeners,K=B.indexOf(s);K!==-1&&B.splice(K,1),!(B.length>0)&&(sD.forEach(pt=>{delete d[pt]}),delete d._chartjs)}function lD(d){const s=new Set(d);return s.size===d.length?d:Array.from(s)}const uD=function(){return typeof window>"u"?function(d){return d()}:window.requestAnimationFrame}();function cD(d,s){let E=[],B=!1;return function(...K){E=K,B||(B=!0,uD.call(window,()=>{B=!1,d.apply(s,E)}))}}function nlt(d,s){let E;return function(...B){return s?(clearTimeout(E),E=setTimeout(d,s,B)):d.apply(this,B),s}}const xM=d=>d==="start"?"left":d==="end"?"right":"center",qp=(d,s,E)=>d==="start"?s:d==="end"?E:(s+E)/2,ilt=(d,s,E,B)=>d===(B?"left":"right")?E:d==="center"?(s+E)/2:s;function alt(d,s,E){const B=s.length;let K=0,pt=B;if(d._sorted){const{iScale:_t,vScale:Ot,_parsed:jt}=d,te=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null,he=_t.axis,{min:De,max:er,minDefined:pr,maxDefined:Mr}=_t.getUserBounds();if(pr){if(K=Math.min(by(jt,he,De).lo,E?B:by(s,he,_t.getPixelForValue(De)).lo),te){const Tr=jt.slice(0,K+1).reverse().findIndex(Vr=>!Bh(Vr[Ot.axis]));K-=Math.max(0,Tr)}K=Jp(K,0,B-1)}if(Mr){let Tr=Math.max(by(jt,_t.axis,er,!0).hi+1,E?0:by(s,he,_t.getPixelForValue(er),!0).hi+1);if(te){const Vr=jt.slice(Tr-1).findIndex(mn=>!Bh(mn[Ot.axis]));Tr+=Math.max(0,Vr)}pt=Jp(Tr,K,B)-K}else pt=B-K}return{start:K,count:pt}}function olt(d){const{xScale:s,yScale:E,_scaleRanges:B}=d,K={xmin:s.min,xmax:s.max,ymin:E.min,ymax:E.max};if(!B)return d._scaleRanges=K,!0;const pt=B.xmin!==s.min||B.xmax!==s.max||B.ymin!==E.min||B.ymax!==E.max;return Object.assign(B,K),pt}const R5=d=>d===0||d===1,pP=(d,s,E)=>-(Math.pow(2,10*(d-=1))*Math.sin((d-s)*od/E)),mP=(d,s,E)=>Math.pow(2,-10*d)*Math.sin((d-s)*od/E)+1,I2={linear:d=>d,easeInQuad:d=>d*d,easeOutQuad:d=>-d*(d-2),easeInOutQuad:d=>(d/=.5)<1?.5*d*d:-.5*(--d*(d-2)-1),easeInCubic:d=>d*d*d,easeOutCubic:d=>(d-=1)*d*d+1,easeInOutCubic:d=>(d/=.5)<1?.5*d*d*d:.5*((d-=2)*d*d+2),easeInQuart:d=>d*d*d*d,easeOutQuart:d=>-((d-=1)*d*d*d-1),easeInOutQuart:d=>(d/=.5)<1?.5*d*d*d*d:-.5*((d-=2)*d*d*d-2),easeInQuint:d=>d*d*d*d*d,easeOutQuint:d=>(d-=1)*d*d*d*d+1,easeInOutQuint:d=>(d/=.5)<1?.5*d*d*d*d*d:.5*((d-=2)*d*d*d*d+2),easeInSine:d=>-Math.cos(d*ip)+1,easeOutSine:d=>Math.sin(d*ip),easeInOutSine:d=>-.5*(Math.cos(Qh*d)-1),easeInExpo:d=>d===0?0:Math.pow(2,10*(d-1)),easeOutExpo:d=>d===1?1:-Math.pow(2,-10*d)+1,easeInOutExpo:d=>R5(d)?d:d<.5?.5*Math.pow(2,10*(d*2-1)):.5*(-Math.pow(2,-10*(d*2-1))+2),easeInCirc:d=>d>=1?d:-(Math.sqrt(1-d*d)-1),easeOutCirc:d=>Math.sqrt(1-(d-=1)*d),easeInOutCirc:d=>(d/=.5)<1?-.5*(Math.sqrt(1-d*d)-1):.5*(Math.sqrt(1-(d-=2)*d)+1),easeInElastic:d=>R5(d)?d:pP(d,.075,.3),easeOutElastic:d=>R5(d)?d:mP(d,.075,.3),easeInOutElastic(d){return R5(d)?d:d<.5?.5*pP(d*2,.1125,.45):.5+.5*mP(d*2-1,.1125,.45)},easeInBack(d){return d*d*((1.70158+1)*d-1.70158)},easeOutBack(d){return(d-=1)*d*((1.70158+1)*d+1.70158)+1},easeInOutBack(d){let s=1.70158;return(d/=.5)<1?.5*(d*d*(((s*=1.525)+1)*d-s)):.5*((d-=2)*d*(((s*=1.525)+1)*d+s)+2)},easeInBounce:d=>1-I2.easeOutBounce(1-d),easeOutBounce(d){return d<1/2.75?7.5625*d*d:d<2/2.75?7.5625*(d-=1.5/2.75)*d+.75:d<2.5/2.75?7.5625*(d-=2.25/2.75)*d+.9375:7.5625*(d-=2.625/2.75)*d+.984375},easeInOutBounce:d=>d<.5?I2.easeInBounce(d*2)*.5:I2.easeOutBounce(d*2-1)*.5+.5};function _M(d){if(d&&typeof d=="object"){const s=d.toString();return s==="[object CanvasPattern]"||s==="[object CanvasGradient]"}return!1}function gP(d){return _M(d)?d:new q2(d)}function U8(d){return _M(d)?d:new q2(d).saturate(.5).darken(.1).hexString()}const slt=["x","y","borderWidth","radius","tension"],llt=["color","borderColor","backgroundColor"];function ult(d){d.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),d.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:s=>s!=="onProgress"&&s!=="onComplete"&&s!=="fn"}),d.set("animations",{colors:{type:"color",properties:llt},numbers:{type:"number",properties:slt}}),d.describe("animations",{_fallback:"animation"}),d.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:s=>s|0}}}})}function clt(d){d.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const vP=new Map;function hlt(d,s){s=s||{};const E=d+JSON.stringify(s);let B=vP.get(E);return B||(B=new Intl.NumberFormat(d,s),vP.set(E,B)),B}function bM(d,s,E){return hlt(s,E).format(d)}const flt={values(d){return Yd(d)?d:""+d},numeric(d,s,E){if(d===0)return"0";const B=this.chart.options.locale;let K,pt=d;if(E.length>1){const te=Math.max(Math.abs(E[0].value),Math.abs(E[E.length-1].value));(te<1e-4||te>1e15)&&(K="scientific"),pt=dlt(d,E)}const _t=aD(Math.abs(pt)),Ot=isNaN(_t)?1:Math.max(Math.min(-1*Math.floor(_t),20),0),jt={notation:K,minimumFractionDigits:Ot,maximumFractionDigits:Ot};return Object.assign(jt,this.options.ticks.format),bM(d,B,jt)}};function dlt(d,s){let E=s.length>3?s[2].value-s[1].value:s[1].value-s[0].value;return Math.abs(E)>=1&&d!==Math.floor(d)&&(E=d-Math.floor(d)),E}var hD={formatters:flt};function plt(d){d.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(s,E)=>E.lineWidth,tickColor:(s,E)=>E.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:hD.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),d.route("scale.ticks","color","","color"),d.route("scale.grid","color","","borderColor"),d.route("scale.border","color","","borderColor"),d.route("scale.title","color","","color"),d.describe("scale",{_fallback:!1,_scriptable:s=>!s.startsWith("before")&&!s.startsWith("after")&&s!=="callback"&&s!=="parser",_indexable:s=>s!=="borderDash"&&s!=="tickBorderDash"&&s!=="dash"}),d.describe("scales",{_fallback:"scale"}),d.describe("scale.ticks",{_scriptable:s=>s!=="backdropPadding"&&s!=="callback",_indexable:s=>s!=="backdropPadding"})}const Ly=Object.create(null),EA=Object.create(null);function z2(d,s){if(!s)return d;const E=s.split(".");for(let B=0,K=E.length;BB.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(B,K)=>U8(K.backgroundColor),this.hoverBorderColor=(B,K)=>U8(K.borderColor),this.hoverColor=(B,K)=>U8(K.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(s),this.apply(E)}set(s,E){return V8(this,s,E)}get(s){return z2(this,s)}describe(s,E){return V8(EA,s,E)}override(s,E){return V8(Ly,s,E)}route(s,E,B,K){const pt=z2(this,s),_t=z2(this,B),Ot="_"+E;Object.defineProperties(pt,{[Ot]:{value:pt[E],writable:!0},[E]:{enumerable:!0,get(){const jt=this[Ot],te=_t[K];return Sc(jt)?Object.assign({},te,jt):cc(jt,te)},set(jt){this[Ot]=jt}}})}apply(s){s.forEach(E=>E(this))}}var Rd=new mlt({_scriptable:d=>!d.startsWith("on"),_indexable:d=>d!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ult,clt,plt]);function glt(d){return!d||Bh(d.size)||Bh(d.family)?null:(d.style?d.style+" ":"")+(d.weight?d.weight+" ":"")+d.size+"px "+d.family}function yP(d,s,E,B,K){let pt=s[K];return pt||(pt=s[K]=d.measureText(K).width,E.push(K)),pt>B&&(B=pt),B}function hy(d,s,E){const B=d.currentDevicePixelRatio,K=E!==0?Math.max(E/2,.5):0;return Math.round((s-K)*B)/B+K}function xP(d,s){!s&&!d||(s=s||d.getContext("2d"),s.save(),s.resetTransform(),s.clearRect(0,0,d.width,d.height),s.restore())}function CA(d,s,E,B){fD(d,s,E,B,null)}function fD(d,s,E,B,K){let pt,_t,Ot,jt,te,he,De,er;const pr=s.pointStyle,Mr=s.rotation,Tr=s.radius;let Vr=(Mr||0)*$st;if(pr&&typeof pr=="object"&&(pt=pr.toString(),pt==="[object HTMLImageElement]"||pt==="[object HTMLCanvasElement]")){d.save(),d.translate(E,B),d.rotate(Vr),d.drawImage(pr,-pr.width/2,-pr.height/2,pr.width,pr.height),d.restore();return}if(!(isNaN(Tr)||Tr<=0)){switch(d.beginPath(),pr){default:K?d.ellipse(E,B,K/2,Tr,0,0,od):d.arc(E,B,Tr,0,od),d.closePath();break;case"triangle":he=K?K/2:Tr,d.moveTo(E+Math.sin(Vr)*he,B-Math.cos(Vr)*Tr),Vr+=cP,d.lineTo(E+Math.sin(Vr)*he,B-Math.cos(Vr)*Tr),Vr+=cP,d.lineTo(E+Math.sin(Vr)*he,B-Math.cos(Vr)*Tr),d.closePath();break;case"rectRounded":te=Tr*.516,jt=Tr-te,_t=Math.cos(Vr+cy)*jt,De=Math.cos(Vr+cy)*(K?K/2-te:jt),Ot=Math.sin(Vr+cy)*jt,er=Math.sin(Vr+cy)*(K?K/2-te:jt),d.arc(E-De,B-Ot,te,Vr-Qh,Vr-ip),d.arc(E+er,B-_t,te,Vr-ip,Vr),d.arc(E+De,B+Ot,te,Vr,Vr+ip),d.arc(E-er,B+_t,te,Vr+ip,Vr+Qh),d.closePath();break;case"rect":if(!Mr){jt=Math.SQRT1_2*Tr,he=K?K/2:jt,d.rect(E-he,B-jt,2*he,2*jt);break}Vr+=cy;case"rectRot":De=Math.cos(Vr)*(K?K/2:Tr),_t=Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,er=Math.sin(Vr)*(K?K/2:Tr),d.moveTo(E-De,B-Ot),d.lineTo(E+er,B-_t),d.lineTo(E+De,B+Ot),d.lineTo(E-er,B+_t),d.closePath();break;case"crossRot":Vr+=cy;case"cross":De=Math.cos(Vr)*(K?K/2:Tr),_t=Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,er=Math.sin(Vr)*(K?K/2:Tr),d.moveTo(E-De,B-Ot),d.lineTo(E+De,B+Ot),d.moveTo(E+er,B-_t),d.lineTo(E-er,B+_t);break;case"star":De=Math.cos(Vr)*(K?K/2:Tr),_t=Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,er=Math.sin(Vr)*(K?K/2:Tr),d.moveTo(E-De,B-Ot),d.lineTo(E+De,B+Ot),d.moveTo(E+er,B-_t),d.lineTo(E-er,B+_t),Vr+=cy,De=Math.cos(Vr)*(K?K/2:Tr),_t=Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,er=Math.sin(Vr)*(K?K/2:Tr),d.moveTo(E-De,B-Ot),d.lineTo(E+De,B+Ot),d.moveTo(E+er,B-_t),d.lineTo(E-er,B+_t);break;case"line":_t=K?K/2:Math.cos(Vr)*Tr,Ot=Math.sin(Vr)*Tr,d.moveTo(E-_t,B-Ot),d.lineTo(E+_t,B+Ot);break;case"dash":d.moveTo(E,B),d.lineTo(E+Math.cos(Vr)*(K?K/2:Tr),B+Math.sin(Vr)*Tr);break;case!1:d.closePath();break}d.fill(),s.borderWidth>0&&d.stroke()}}function K2(d,s,E){return E=E||.5,!s||d&&d.x>s.left-E&&d.xs.top-E&&d.y0&&pt.strokeColor!=="";let jt,te;for(d.save(),d.font=K.string,xlt(d,pt),jt=0;jt<_t.length;++jt)te=_t[jt],pt.backdrop&&blt(d,pt.backdrop),Ot&&(pt.strokeColor&&(d.strokeStyle=pt.strokeColor),Bh(pt.strokeWidth)||(d.lineWidth=pt.strokeWidth),d.strokeText(te,E,B,pt.maxWidth)),d.fillText(te,E,B,pt.maxWidth),_lt(d,E,B,te,pt),B+=Number(K.lineHeight);d.restore()}function b4(d,s){const{x:E,y:B,w:K,h:pt,radius:_t}=s;d.arc(E+_t.topLeft,B+_t.topLeft,_t.topLeft,1.5*Qh,Qh,!0),d.lineTo(E,B+pt-_t.bottomLeft),d.arc(E+_t.bottomLeft,B+pt-_t.bottomLeft,_t.bottomLeft,Qh,ip,!0),d.lineTo(E+K-_t.bottomRight,B+pt),d.arc(E+K-_t.bottomRight,B+pt-_t.bottomRight,_t.bottomRight,ip,0,!0),d.lineTo(E+K,B+_t.topRight),d.arc(E+K-_t.topRight,B+_t.topRight,_t.topRight,0,-ip,!0),d.lineTo(E+_t.topLeft,B)}const wlt=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,klt=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Tlt(d,s){const E=(""+d).match(wlt);if(!E||E[1]==="normal")return s*1.2;switch(d=+E[2],E[3]){case"px":return d;case"%":d/=100;break}return s*d}const Alt=d=>+d||0;function wM(d,s){const E={},B=Sc(s),K=B?Object.keys(s):s,pt=Sc(d)?B?_t=>cc(d[_t],d[s[_t]]):_t=>d[_t]:()=>d;for(const _t of K)E[_t]=Alt(pt(_t));return E}function dD(d){return wM(d,{top:"y",right:"x",bottom:"y",left:"x"})}function h_(d){return wM(d,["topLeft","topRight","bottomLeft","bottomRight"])}function fm(d){const s=dD(d);return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function Qp(d,s){d=d||{},s=s||Rd.font;let E=cc(d.size,s.size);typeof E=="string"&&(E=parseInt(E,10));let B=cc(d.style,s.style);B&&!(""+B).match(klt)&&(console.warn('Invalid font style specified: "'+B+'"'),B=void 0);const K={family:cc(d.family,s.family),lineHeight:Tlt(cc(d.lineHeight,s.lineHeight),E),size:E,style:B,weight:cc(d.weight,s.weight),string:""};return K.string=glt(K),K}function B5(d,s,E,B){let K,pt,_t;for(K=0,pt=d.length;KE&&Ot===0?0:Ot+jt;return{min:_t(B,-Math.abs(pt)),max:_t(K,pt)}}function zy(d,s){return Object.assign(Object.create(d),s)}function kM(d,s=[""],E,B,K=()=>d[0]){const pt=E||d;typeof B>"u"&&(B=vD("_fallback",d));const _t={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:d,_rootScopes:pt,_fallback:B,_getTarget:K,override:Ot=>kM([Ot,...d],s,pt,B)};return new Proxy(_t,{deleteProperty(Ot,jt){return delete Ot[jt],delete Ot._keys,delete d[0][jt],!0},get(Ot,jt){return mD(Ot,jt,()=>Olt(jt,s,d,Ot))},getOwnPropertyDescriptor(Ot,jt){return Reflect.getOwnPropertyDescriptor(Ot._scopes[0],jt)},getPrototypeOf(){return Reflect.getPrototypeOf(d[0])},has(Ot,jt){return bP(Ot).includes(jt)},ownKeys(Ot){return bP(Ot)},set(Ot,jt,te){const he=Ot._storage||(Ot._storage=K());return Ot[jt]=he[jt]=te,delete Ot._keys,!0}})}function x_(d,s,E,B){const K={_cacheable:!1,_proxy:d,_context:s,_subProxy:E,_stack:new Set,_descriptors:pD(d,B),setContext:pt=>x_(d,pt,E,B),override:pt=>x_(d.override(pt),s,E,B)};return new Proxy(K,{deleteProperty(pt,_t){return delete pt[_t],delete d[_t],!0},get(pt,_t,Ot){return mD(pt,_t,()=>Elt(pt,_t,Ot))},getOwnPropertyDescriptor(pt,_t){return pt._descriptors.allKeys?Reflect.has(d,_t)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(d,_t)},getPrototypeOf(){return Reflect.getPrototypeOf(d)},has(pt,_t){return Reflect.has(d,_t)},ownKeys(){return Reflect.ownKeys(d)},set(pt,_t,Ot){return d[_t]=Ot,delete pt[_t],!0}})}function pD(d,s={scriptable:!0,indexable:!0}){const{_scriptable:E=s.scriptable,_indexable:B=s.indexable,_allKeys:K=s.allKeys}=d;return{allKeys:K,scriptable:E,indexable:B,isScriptable:x1(E)?E:()=>E,isIndexable:x1(B)?B:()=>B}}const Slt=(d,s)=>d?d+vM(s):s,TM=(d,s)=>Sc(s)&&d!=="adapters"&&(Object.getPrototypeOf(s)===null||s.constructor===Object);function mD(d,s,E){if(Object.prototype.hasOwnProperty.call(d,s)||s==="constructor")return d[s];const B=E();return d[s]=B,B}function Elt(d,s,E){const{_proxy:B,_context:K,_subProxy:pt,_descriptors:_t}=d;let Ot=B[s];return x1(Ot)&&_t.isScriptable(s)&&(Ot=Clt(s,Ot,d,E)),Yd(Ot)&&Ot.length&&(Ot=Llt(s,Ot,d,_t.isIndexable)),TM(s,Ot)&&(Ot=x_(Ot,K,pt&&pt[s],_t)),Ot}function Clt(d,s,E,B){const{_proxy:K,_context:pt,_subProxy:_t,_stack:Ot}=E;if(Ot.has(d))throw new Error("Recursion detected: "+Array.from(Ot).join("->")+"->"+d);Ot.add(d);let jt=s(pt,_t||B);return Ot.delete(d),TM(d,jt)&&(jt=AM(K._scopes,K,d,jt)),jt}function Llt(d,s,E,B){const{_proxy:K,_context:pt,_subProxy:_t,_descriptors:Ot}=E;if(typeof pt.index<"u"&&B(d))return s[pt.index%s.length];if(Sc(s[0])){const jt=s,te=K._scopes.filter(he=>he!==jt);s=[];for(const he of jt){const De=AM(te,K,d,he);s.push(x_(De,pt,_t&&_t[d],Ot))}}return s}function gD(d,s,E){return x1(d)?d(s,E):d}const Plt=(d,s)=>d===!0?s:typeof d=="string"?Cy(s,d):void 0;function Ilt(d,s,E,B,K){for(const pt of s){const _t=Plt(E,pt);if(_t){d.add(_t);const Ot=gD(_t._fallback,E,K);if(typeof Ot<"u"&&Ot!==E&&Ot!==B)return Ot}else if(_t===!1&&typeof B<"u"&&E!==B)return null}return!1}function AM(d,s,E,B){const K=s._rootScopes,pt=gD(s._fallback,E,B),_t=[...d,...K],Ot=new Set;Ot.add(B);let jt=_P(Ot,_t,E,pt||E,B);return jt===null||typeof pt<"u"&&pt!==E&&(jt=_P(Ot,_t,pt,jt,B),jt===null)?!1:kM(Array.from(Ot),[""],K,pt,()=>zlt(s,E,B))}function _P(d,s,E,B,K){for(;E;)E=Ilt(d,s,E,B,K);return E}function zlt(d,s,E){const B=d._getTarget();s in B||(B[s]={});const K=B[s];return Yd(K)&&Sc(E)?E:K||{}}function Olt(d,s,E,B){let K;for(const pt of s)if(K=vD(Slt(pt,d),E),typeof K<"u")return TM(d,K)?AM(E,B,d,K):K}function vD(d,s){for(const E of s){if(!E)continue;const B=E[d];if(typeof B<"u")return B}}function bP(d){let s=d._keys;return s||(s=d._keys=Dlt(d._scopes)),s}function Dlt(d){const s=new Set;for(const E of d)for(const B of Object.keys(E).filter(K=>!K.startsWith("_")))s.add(B);return Array.from(s)}const Flt=Number.EPSILON||1e-14,__=(d,s)=>sd==="x"?"y":"x";function Rlt(d,s,E,B){const K=d.skip?s:d,pt=s,_t=E.skip?s:E,Ot=SA(pt,K),jt=SA(_t,pt);let te=Ot/(Ot+jt),he=jt/(Ot+jt);te=isNaN(te)?0:te,he=isNaN(he)?0:he;const De=B*te,er=B*he;return{previous:{x:pt.x-De*(_t.x-K.x),y:pt.y-De*(_t.y-K.y)},next:{x:pt.x+er*(_t.x-K.x),y:pt.y+er*(_t.y-K.y)}}}function Blt(d,s,E){const B=d.length;let K,pt,_t,Ot,jt,te=__(d,0);for(let he=0;he!te.skip)),s.cubicInterpolationMode==="monotone")jlt(d,K);else{let te=B?d[d.length-1]:d[0];for(pt=0,_t=d.length;pt<_t;++pt)Ot=d[pt],jt=Rlt(te,Ot,d[Math.min(pt+1,_t-(B?0:1))%_t],s.tension),Ot.cp1x=jt.previous.x,Ot.cp1y=jt.previous.y,Ot.cp2x=jt.next.x,Ot.cp2y=jt.next.y,te=Ot}s.capBezierPoints&&Ult(d,E)}function MM(){return typeof window<"u"&&typeof document<"u"}function SM(d){let s=d.parentNode;return s&&s.toString()==="[object ShadowRoot]"&&(s=s.host),s}function w4(d,s,E){let B;return typeof d=="string"?(B=parseInt(d,10),d.indexOf("%")!==-1&&(B=B/100*s.parentNode[E])):B=d,B}const K4=d=>d.ownerDocument.defaultView.getComputedStyle(d,null);function Hlt(d,s){return K4(d).getPropertyValue(s)}const Wlt=["top","right","bottom","left"];function Ay(d,s,E){const B={};E=E?"-"+E:"";for(let K=0;K<4;K++){const pt=Wlt[K];B[pt]=parseFloat(d[s+"-"+pt+E])||0}return B.width=B.left+B.right,B.height=B.top+B.bottom,B}const qlt=(d,s,E)=>(d>0||s>0)&&(!E||!E.shadowRoot);function $lt(d,s){const E=d.touches,B=E&&E.length?E[0]:d,{offsetX:K,offsetY:pt}=B;let _t=!1,Ot,jt;if(qlt(K,pt,d.target))Ot=K,jt=pt;else{const te=s.getBoundingClientRect();Ot=B.clientX-te.left,jt=B.clientY-te.top,_t=!0}return{x:Ot,y:jt,box:_t}}function py(d,s){if("native"in d)return d;const{canvas:E,currentDevicePixelRatio:B}=s,K=K4(E),pt=K.boxSizing==="border-box",_t=Ay(K,"padding"),Ot=Ay(K,"border","width"),{x:jt,y:te,box:he}=$lt(d,E),De=_t.left+(he&&Ot.left),er=_t.top+(he&&Ot.top);let{width:pr,height:Mr}=s;return pt&&(pr-=_t.width+Ot.width,Mr-=_t.height+Ot.height),{x:Math.round((jt-De)/pr*E.width/B),y:Math.round((te-er)/Mr*E.height/B)}}function Zlt(d,s,E){let B,K;if(s===void 0||E===void 0){const pt=d&&SM(d);if(!pt)s=d.clientWidth,E=d.clientHeight;else{const _t=pt.getBoundingClientRect(),Ot=K4(pt),jt=Ay(Ot,"border","width"),te=Ay(Ot,"padding");s=_t.width-te.width-jt.width,E=_t.height-te.height-jt.height,B=w4(Ot.maxWidth,pt,"clientWidth"),K=w4(Ot.maxHeight,pt,"clientHeight")}}return{width:s,height:E,maxWidth:B||_4,maxHeight:K||_4}}const f1=d=>Math.round(d*10)/10;function Glt(d,s,E,B){const K=K4(d),pt=Ay(K,"margin"),_t=w4(K.maxWidth,d,"clientWidth")||_4,Ot=w4(K.maxHeight,d,"clientHeight")||_4,jt=Zlt(d,s,E);let{width:te,height:he}=jt;if(K.boxSizing==="content-box"){const er=Ay(K,"border","width"),pr=Ay(K,"padding");te-=pr.width+er.width,he-=pr.height+er.height}return te=Math.max(0,te-pt.width),he=Math.max(0,B?te/B:he-pt.height),te=f1(Math.min(te,_t,jt.maxWidth)),he=f1(Math.min(he,Ot,jt.maxHeight)),te&&!he&&(he=f1(te/2)),(s!==void 0||E!==void 0)&&B&&jt.height&&he>jt.height&&(he=jt.height,te=f1(Math.floor(he*B))),{width:te,height:he}}function wP(d,s,E){const B=s||1,K=f1(d.height*B),pt=f1(d.width*B);d.height=f1(d.height),d.width=f1(d.width);const _t=d.canvas;return _t.style&&(E||!_t.style.height&&!_t.style.width)&&(_t.style.height=`${d.height}px`,_t.style.width=`${d.width}px`),d.currentDevicePixelRatio!==B||_t.height!==K||_t.width!==pt?(d.currentDevicePixelRatio=B,_t.height=K,_t.width=pt,d.ctx.setTransform(B,0,0,B,0,0),!0):!1}const Ylt=function(){let d=!1;try{const s={get passive(){return d=!0,!1}};MM()&&(window.addEventListener("test",null,s),window.removeEventListener("test",null,s))}catch{}return d}();function kP(d,s){const E=Hlt(d,s),B=E&&E.match(/^(\d+)(\.\d+)?px$/);return B?+B[1]:void 0}function my(d,s,E,B){return{x:d.x+E*(s.x-d.x),y:d.y+E*(s.y-d.y)}}function Klt(d,s,E,B){return{x:d.x+E*(s.x-d.x),y:B==="middle"?E<.5?d.y:s.y:B==="after"?E<1?d.y:s.y:E>0?s.y:d.y}}function Xlt(d,s,E,B){const K={x:d.cp2x,y:d.cp2y},pt={x:s.cp1x,y:s.cp1y},_t=my(d,K,E),Ot=my(K,pt,E),jt=my(pt,s,E),te=my(_t,Ot,E),he=my(Ot,jt,E);return my(te,he,E)}const Jlt=function(d,s){return{x(E){return d+d+s-E},setWidth(E){s=E},textAlign(E){return E==="center"?E:E==="right"?"left":"right"},xPlus(E,B){return E-B},leftForLtr(E,B){return E-B}}},Qlt=function(){return{x(d){return d},setWidth(d){},textAlign(d){return d},xPlus(d,s){return d+s},leftForLtr(d,s){return d}}};function f_(d,s,E){return d?Jlt(s,E):Qlt()}function xD(d,s){let E,B;(s==="ltr"||s==="rtl")&&(E=d.canvas.style,B=[E.getPropertyValue("direction"),E.getPropertyPriority("direction")],E.setProperty("direction",s,"important"),d.prevTextDirection=B)}function _D(d,s){s!==void 0&&(delete d.prevTextDirection,d.canvas.style.setProperty("direction",s[0],s[1]))}function bD(d){return d==="angle"?{between:Y2,compare:Jst,normalize:q0}:{between:nv,compare:(s,E)=>s-E,normalize:s=>s}}function TP({start:d,end:s,count:E,loop:B,style:K}){return{start:d%E,end:s%E,loop:B&&(s-d+1)%E===0,style:K}}function tut(d,s,E){const{property:B,start:K,end:pt}=E,{between:_t,normalize:Ot}=bD(B),jt=s.length;let{start:te,end:he,loop:De}=d,er,pr;if(De){for(te+=jt,he+=jt,er=0,pr=jt;erjt(K,cn,mn)&&Ot(K,cn)!==0,Bn=()=>Ot(pt,mn)===0||jt(pt,cn,mn),ni=()=>Tr||Jn(),Wi=()=>!Tr||Bn();for(let Un=he,qr=he;Un<=De;++Un)Dt=s[Un%_t],!Dt.skip&&(mn=te(Dt[B]),mn!==cn&&(Tr=jt(mn,K,pt),Vr===null&&ni()&&(Vr=Ot(mn,K)===0?Un:qr),Vr!==null&&Wi()&&(Mr.push(TP({start:Vr,end:Un,loop:er,count:_t,style:pr})),Vr=null),qr=Un,cn=mn));return Vr!==null&&Mr.push(TP({start:Vr,end:De,loop:er,count:_t,style:pr})),Mr}function kD(d,s){const E=[],B=d.segments;for(let K=0;KK&&d[pt%s].skip;)pt--;return pt%=s,{start:K,end:pt}}function rut(d,s,E,B){const K=d.length,pt=[];let _t=s,Ot=d[s],jt;for(jt=s+1;jt<=E;++jt){const te=d[jt%K];te.skip||te.stop?Ot.skip||(B=!1,pt.push({start:s%K,end:(jt-1)%K,loop:B}),s=_t=te.stop?jt:null):(_t=jt,Ot.skip&&(s=jt)),Ot=te}return _t!==null&&pt.push({start:s%K,end:_t%K,loop:B}),pt}function nut(d,s){const E=d.points,B=d.options.spanGaps,K=E.length;if(!K)return[];const pt=!!d._loop,{start:_t,end:Ot}=eut(E,K,pt,B);if(B===!0)return AP(d,[{start:_t,end:Ot,loop:pt}],E,s);const jt=Ot<_t?Ot+K:Ot,te=!!d._fullLoop&&_t===0&&Ot===K-1;return AP(d,rut(E,_t,jt,te),E,s)}function AP(d,s,E,B){return!B||!B.setContext||!E?s:iut(d,s,E,B)}function iut(d,s,E,B){const K=d._chart.getContext(),pt=MP(d.options),{_datasetIndex:_t,options:{spanGaps:Ot}}=d,jt=E.length,te=[];let he=pt,De=s[0].start,er=De;function pr(Mr,Tr,Vr,mn){const Dt=Ot?-1:1;if(Mr!==Tr){for(Mr+=jt;E[Mr%jt].skip;)Mr-=Dt;for(;E[Tr%jt].skip;)Tr+=Dt;Mr%jt!==Tr%jt&&(te.push({start:Mr%jt,end:Tr%jt,loop:Vr,style:mn}),he=mn,De=Tr%jt)}}for(const Mr of s){De=Ot?De:Mr.start;let Tr=E[De%jt],Vr;for(er=De+1;er<=Mr.end;er++){const mn=E[er%jt];Vr=MP(B.setContext(zy(K,{type:"segment",p0:Tr,p1:mn,p0DataIndex:(er-1)%jt,p1DataIndex:er%jt,datasetIndex:_t}))),aut(Vr,he)&&pr(De,er-1,Mr.loop,he),Tr=mn,he=Vr}DeDt({chart:l,initial:z.initial,numSteps:kt,currentStep:Math.min(j-z.start,kt)}))}_refresh(){this._request||(this._running=!0,this._request=jO.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(l=Date.now()){let z=0;this._charts.forEach((j,J)=>{if(!j.running||!j.items.length)return;const mt=j.items;let kt=mt.length-1,Dt=!1,$t;for(;kt>=0;--kt)$t=mt[kt],$t._active?($t._total>j.duration&&(j.duration=$t._total),$t.tick(l),Dt=!0):(mt[kt]=mt[mt.length-1],mt.pop());Dt&&(J.draw(),this._notify(J,j,l,"progress")),mt.length||(j.running=!1,this._notify(J,j,l,"complete"),j.initial=!1),z+=mt.length}),this._lastDate=l,z===0&&(this._running=!1)}_getAnims(l){const z=this._charts;let j=z.get(l);return j||(j={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},z.set(l,j)),j}listen(l,z,j){this._getAnims(l).listeners[z].push(j)}add(l,z){!z||!z.length||this._getAnims(l).items.push(...z)}has(l){return this._getAnims(l).items.length>0}start(l){const z=this._charts.get(l);z&&(z.running=!0,z.start=Date.now(),z.duration=z.items.reduce((j,J)=>Math.max(j,J._duration),0),this._refresh())}running(l){if(!this._running)return!1;const z=this._charts.get(l);return!(!z||!z.running||!z.items.length)}stop(l){const z=this._charts.get(l);if(!z||!z.items.length)return;const j=z.items;let J=j.length-1;for(;J>=0;--J)j[J].cancel();z.items=[],this._notify(l,z,Date.now(),"complete")}remove(l){return this._charts.delete(l)}}var Xg=new hlt;const hP="transparent",flt={boolean(d,l,z){return z>.5?l:d},color(d,l,z){const j=tP(d||hP),J=j.valid&&tP(l||hP);return J&&J.valid?J.mix(j,z).hexString():l},number(d,l,z){return d+(l-d)*z}};class dlt{constructor(l,z,j,J){const mt=z[j];J=I5([l.to,J,mt,l.from]);const kt=I5([l.from,mt,J]);this._active=!0,this._fn=l.fn||flt[l.type||typeof kt],this._easing=z2[l.easing]||z2.linear,this._start=Math.floor(Date.now()+(l.delay||0)),this._duration=this._total=Math.floor(l.duration),this._loop=!!l.loop,this._target=z,this._prop=j,this._from=kt,this._to=J,this._promises=void 0}active(){return this._active}update(l,z,j){if(this._active){this._notify(!1);const J=this._target[this._prop],mt=j-this._start,kt=this._duration-mt;this._start=j,this._duration=Math.floor(Math.max(kt,l.duration)),this._total+=mt,this._loop=!!l.loop,this._to=I5([l.to,z,J,l.from]),this._from=I5([l.from,J,z])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(l){const z=l-this._start,j=this._duration,J=this._prop,mt=this._from,kt=this._loop,Dt=this._to;let $t;if(this._active=mt!==Dt&&(kt||z1?2-$t:$t,$t=this._easing(Math.min(1,Math.max(0,$t))),this._target[J]=this._fn(mt,Dt,$t)}wait(){const l=this._promises||(this._promises=[]);return new Promise((z,j)=>{l.push({res:z,rej:j})})}_notify(l){const z=l?"res":"rej",j=this._promises||[];for(let J=0;J{const mt=l[J];if(!Cc(mt))return;const kt={};for(const Dt of z)kt[Dt]=mt[Dt];(tp(mt.properties)&&mt.properties||[J]).forEach(Dt=>{(Dt===J||!j.has(Dt))&&j.set(Dt,kt)})})}_animateOptions(l,z){const j=z.options,J=mlt(l,j);if(!J)return[];const mt=this._createAnimations(J,j);return j.$shared&&plt(l.options.$animations,j).then(()=>{l.options=j},()=>{}),mt}_createAnimations(l,z){const j=this._properties,J=[],mt=l.$animations||(l.$animations={}),kt=Object.keys(z),Dt=Date.now();let $t;for($t=kt.length-1;$t>=0;--$t){const ee=kt[$t];if(ee.charAt(0)==="$")continue;if(ee==="options"){J.push(...this._animateOptions(l,z));continue}const pe=z[ee];let Be=mt[ee];const ir=j.get(ee);if(Be)if(ir&&Be.active()){Be.update(ir,pe,Dt);continue}else Be.cancel();if(!ir||!ir.duration){l[ee]=pe;continue}mt[ee]=Be=new dlt(ir,l,ee,pe),J.push(Be)}return J}update(l,z){if(this._properties.size===0){Object.assign(l,z);return}const j=this._createAnimations(l,z);if(j.length)return Xg.add(this._chart,j),!0}}function plt(d,l){const z=[],j=Object.keys(l);for(let J=0;J0||!z&&mt<0)return J.index}return null}function mP(d,l){const{chart:z,_cachedMeta:j}=d,J=z._stacks||(z._stacks={}),{iScale:mt,vScale:kt,index:Dt}=j,$t=mt.axis,ee=kt.axis,pe=xlt(mt,kt,j),Be=l.length;let ir;for(let vr=0;vrz[j].axis===l).shift()}function wlt(d,l){return Py(d,{active:!1,dataset:void 0,datasetIndex:l,index:l,mode:"default",type:"dataset"})}function klt(d,l,z){return Py(d,{active:!1,dataIndex:l,parsed:void 0,raw:void 0,element:z,index:l,mode:"default",type:"data"})}function s2(d,l){const z=d.controller.index,j=d.vScale&&d.vScale.axis;if(j){l=l||d._parsed;for(const J of l){const mt=J._stacks;if(!mt||mt[j]===void 0||mt[j][z]===void 0)return;delete mt[j][z],mt[j]._visualValues!==void 0&&mt[j]._visualValues[z]!==void 0&&delete mt[j]._visualValues[z]}}}const D8=d=>d==="reset"||d==="none",gP=(d,l)=>l?d:Object.assign({},d),Tlt=(d,l,z)=>d&&!l.hidden&&l._stacked&&{keys:nD(z,!0),values:null};class Z4{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(l,z){this.chart=l,this._ctx=l.ctx,this.index=z,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const l=this._cachedMeta;this.configure(),this.linkScales(),l._stacked=I8(l.vScale,l),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(l){this.index!==l&&s2(this._cachedMeta),this.index=l}linkScales(){const l=this.chart,z=this._cachedMeta,j=this.getDataset(),J=(Be,ir,vr,Ir)=>Be==="x"?ir:Be==="r"?Ir:vr,mt=z.xAxisID=hc(j.xAxisID,O8(l,"x")),kt=z.yAxisID=hc(j.yAxisID,O8(l,"y")),Dt=z.rAxisID=hc(j.rAxisID,O8(l,"r")),$t=z.indexAxis,ee=z.iAxisID=J($t,mt,kt,Dt),pe=z.vAxisID=J($t,kt,mt,Dt);z.xScale=this.getScaleForId(mt),z.yScale=this.getScaleForId(kt),z.rScale=this.getScaleForId(Dt),z.iScale=this.getScaleForId(ee),z.vScale=this.getScaleForId(pe)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(l){return this.chart.scales[l]}_getOtherScale(l){const z=this._cachedMeta;return l===z.iScale?z.vScale:z.iScale}reset(){this._update("reset")}_destroy(){const l=this._cachedMeta;this._data&&XL(this._data,this),l._stacked&&s2(l)}_dataCheck(){const l=this.getDataset(),z=l.data||(l.data=[]),j=this._data;if(Cc(z)){const J=this._cachedMeta;this._data=ylt(z,J)}else if(j!==z){if(j){XL(j,this);const J=this._cachedMeta;s2(J),J._parsed=[]}z&&Object.isExtensible(z)&&ost(z,this),this._syncList=[],this._data=z}}addElements(){const l=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(l.dataset=new this.datasetElementType)}buildOrUpdateElements(l){const z=this._cachedMeta,j=this.getDataset();let J=!1;this._dataCheck();const mt=z._stacked;z._stacked=I8(z.vScale,z),z.stack!==j.stack&&(J=!0,s2(z),z.stack=j.stack),this._resyncElements(l),(J||mt!==z._stacked)&&(mP(this,z._parsed),z._stacked=I8(z.vScale,z))}configure(){const l=this.chart.config,z=l.datasetScopeKeys(this._type),j=l.getOptionScopes(this.getDataset(),z,!0);this.options=l.createResolver(j,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(l,z){const{_cachedMeta:j,_data:J}=this,{iScale:mt,_stacked:kt}=j,Dt=mt.axis;let $t=l===0&&z===J.length?!0:j._sorted,ee=l>0&&j._parsed[l-1],pe,Be,ir;if(this._parsing===!1)j._parsed=J,j._sorted=!0,ir=J;else{tp(J[l])?ir=this.parseArrayData(j,J,l,z):Cc(J[l])?ir=this.parseObjectData(j,J,l,z):ir=this.parsePrimitiveData(j,J,l,z);const vr=()=>Be[Dt]===null||ee&&Be[Dt]Pr||Be=0;--ir)if(!Ir()){this.updateRangeFromParsed(ee,l,vr,$t);break}}return ee}getAllParsedValues(l){const z=this._cachedMeta._parsed,j=[];let J,mt,kt;for(J=0,mt=z.length;J=0&&lthis.getContext(j,J,z),Pr=ee.resolveNamedOptions(ir,vr,Ir,Be);return Pr.$shared&&(Pr.$shared=$t,mt[kt]=Object.freeze(gP(Pr,$t))),Pr}_resolveAnimations(l,z,j){const J=this.chart,mt=this._cachedDataOpts,kt=`animation-${z}`,Dt=mt[kt];if(Dt)return Dt;let $t;if(J.options.animation!==!1){const pe=this.chart.config,Be=pe.datasetAnimationScopeKeys(this._type,z),ir=pe.getOptionScopes(this.getDataset(),Be);$t=pe.createResolver(ir,this.getContext(l,j,z))}const ee=new rD(J,$t&&$t.animations);return $t&&$t._cacheable&&(mt[kt]=Object.freeze(ee)),ee}getSharedOptions(l){if(l.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},l))}includeOptions(l,z){return!z||D8(l)||this.chart._animationsDisabled}_getSharedOptions(l,z){const j=this.resolveDataElementOptions(l,z),J=this._sharedOptions,mt=this.getSharedOptions(j),kt=this.includeOptions(z,mt)||mt!==J;return this.updateSharedOptions(mt,z,j),{sharedOptions:mt,includeOptions:kt}}updateElement(l,z,j,J){D8(J)?Object.assign(l,j):this._resolveAnimations(z,J).update(l,j)}updateSharedOptions(l,z,j){l&&!D8(z)&&this._resolveAnimations(void 0,z).update(l,j)}_setStyle(l,z,j,J){l.active=J;const mt=this.getStyle(z,J);this._resolveAnimations(z,j,J).update(l,{options:!J&&this.getSharedOptions(mt)||mt})}removeHoverStyle(l,z,j){this._setStyle(l,j,"active",!1)}setHoverStyle(l,z,j){this._setStyle(l,j,"active",!0)}_removeDatasetHoverStyle(){const l=this._cachedMeta.dataset;l&&this._setStyle(l,void 0,"active",!1)}_setDatasetHoverStyle(){const l=this._cachedMeta.dataset;l&&this._setStyle(l,void 0,"active",!0)}_resyncElements(l){const z=this._data,j=this._cachedMeta.data;for(const[Dt,$t,ee]of this._syncList)this[Dt]($t,ee);this._syncList=[];const J=j.length,mt=z.length,kt=Math.min(mt,J);kt&&this.parse(0,kt),mt>J?this._insertElements(J,mt-J,l):mt{for(ee.length+=z,Dt=ee.length-1;Dt>=kt;Dt--)ee[Dt]=ee[Dt-z]};for($t(mt),Dt=l;DtJ-mt))}return d._cache.$bar}function Mlt(d){const l=d.iScale,z=Alt(l,d.type);let j=l._length,J,mt,kt,Dt;const $t=()=>{kt===32767||kt===-32768||($2(Dt)&&(j=Math.min(j,Math.abs(kt-Dt)||j)),Dt=kt)};for(J=0,mt=z.length;J0?J[d-1]:null,Dt=dMath.abs(Dt)&&($t=Dt,ee=kt),l[z.axis]=ee,l._custom={barStart:$t,barEnd:ee,start:J,end:mt,min:kt,max:Dt}}function iD(d,l,z,j){return tp(d)?Clt(d,l,z,j):l[z.axis]=z.parse(d,j),l}function vP(d,l,z,j){const J=d.iScale,mt=d.vScale,kt=J.getLabels(),Dt=J===mt,$t=[];let ee,pe,Be,ir;for(ee=z,pe=z+j;ee=z?1:-1)}function Plt(d){let l,z,j,J,mt;return d.horizontal?(l=d.base>d.x,z="left",j="right"):(l=d.basepe.controller.options.grouped),mt=j.options.stacked,kt=[],Dt=this._cachedMeta.controller.getParsed(z),$t=Dt&&Dt[j.axis],ee=pe=>{const Be=pe._parsed.find(vr=>vr[j.axis]===$t),ir=Be&&Be[pe.vScale.axis];if(Bh(ir)||isNaN(ir))return!0};for(const pe of J)if(!(z!==void 0&&ee(pe))&&((mt===!1||kt.indexOf(pe.stack)===-1||mt===void 0&&pe.stack===void 0)&&kt.push(pe.stack),pe.index===l))break;return kt.length||kt.push(void 0),kt}_getStackCount(l){return this._getStacks(void 0,l).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const l=this.chart.scales,z=this.chart.options.indexAxis;return Object.keys(l).filter(j=>l[j].axis===z).shift()}_getAxis(){const l={},z=this.getFirstScaleIdForIndexAxis();for(const j of this.chart.data.datasets)l[hc(this.chart.options.indexAxis==="x"?j.xAxisID:j.yAxisID,z)]=!0;return Object.keys(l)}_getStackIndex(l,z,j){const J=this._getStacks(l,j),mt=z!==void 0?J.indexOf(z):-1;return mt===-1?J.length-1:mt}_getRuler(){const l=this.options,z=this._cachedMeta,j=z.iScale,J=[];let mt,kt;for(mt=0,kt=z.data.length;mtY2(wn,Dt,$t,!0)?1:Math.max(ei,ei*z,jn,jn*z),Ir=(wn,ei,jn)=>Y2(wn,Dt,$t,!0)?-1:Math.min(ei,ei*z,jn,jn*z),Pr=vr(0,ee,Be),Wr=vr(lp,pe,ir),Tn=Ir(Jh,ee,Be),Ft=Ir(Jh+lp,pe,ir);j=(Pr-Tn)/2,J=(Wr-Ft)/2,mt=-(Pr+Tn)/2,kt=-(Wr+Ft)/2}return{ratioX:j,ratioY:J,offsetX:mt,offsetY:kt}}class Rlt extends Z4{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:l=>l!=="spacing",_indexable:l=>l!=="spacing"&&!l.startsWith("borderDash")&&!l.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(l){const z=l.data,{labels:{pointStyle:j,textAlign:J,color:mt,useBorderRadius:kt,borderRadius:Dt}}=l.legend.options;return z.labels.length&&z.datasets.length?z.labels.map(($t,ee)=>{const Be=l.getDatasetMeta(0).controller.getStyle(ee);return{text:$t,fillStyle:Be.backgroundColor,fontColor:mt,hidden:!l.getDataVisibility(ee),lineDash:Be.borderDash,lineDashOffset:Be.borderDashOffset,lineJoin:Be.borderJoinStyle,lineWidth:Be.borderWidth,strokeStyle:Be.borderColor,textAlign:J,pointStyle:j,borderRadius:kt&&(Dt||Be.borderRadius),index:ee}}):[]}},onClick(l,z,j){j.chart.toggleDataVisibility(z.index),j.chart.update()}}}};constructor(l,z){super(l,z),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(l,z){const j=this.getDataset().data,J=this._cachedMeta;if(this._parsing===!1)J._parsed=j;else{let mt=$t=>+j[$t];if(Cc(j[l])){const{key:$t="value"}=this._parsing;mt=ee=>+Ey(j[ee],$t)}let kt,Dt;for(kt=l,Dt=l+z;kt0&&!isNaN(l)?ud*(Math.abs(l)/z):0}getLabelAndValue(l){const z=this._cachedMeta,j=this.chart,J=j.data.labels||[],mt=uM(z._parsed[l],j.options.locale);return{label:J[l]||"",value:mt}}getMaxBorderWidth(l){let z=0;const j=this.chart;let J,mt,kt,Dt,$t;if(!l){for(J=0,mt=j.data.datasets.length;J0&&this.getParsed(z-1);for(let jn=0;jn=Ft){Qi.skip=!0;continue}const Gi=this.getParsed(jn),En=Bh(Gi[vr]),Fa=Qi[ir]=kt.getPixelForValue(Gi[ir],jn),Sa=Qi[vr]=mt||En?Dt.getBasePixel():Dt.getPixelForValue($t?this.applyStack(Dt,Gi,$t):Gi[vr],jn);Qi.skip=isNaN(Fa)||isNaN(Sa)||En,Qi.stop=jn>0&&Math.abs(Gi[ir]-ei[ir])>Wr,Pr&&(Qi.parsed=Gi,Qi.raw=ee.data[jn]),Be&&(Qi.options=pe||this.resolveDataElementOptions(jn,ai.active?"active":J)),Tn||this.updateElement(ai,jn,Qi,J),ei=Gi}}getMaxOverflow(){const l=this._cachedMeta,z=l.dataset,j=z.options&&z.options.borderWidth||0,J=l.data||[];if(!J.length)return j;const mt=J[0].size(this.resolveDataElementOptions(0)),kt=J[J.length-1].size(this.resolveDataElementOptions(J.length-1));return Math.max(j,mt,kt)/2}draw(){const l=this._cachedMeta;l.dataset.updateControlPoints(this.chart.chartArea,l.iScale.axis),super.draw()}}function hy(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class gM{static override(l){Object.assign(gM.prototype,l)}options;constructor(l){this.options=l||{}}init(){}formats(){return hy()}parse(){return hy()}format(){return hy()}add(){return hy()}diff(){return hy()}startOf(){return hy()}endOf(){return hy()}}var aD={_date:gM};function Nlt(d,l,z,j){const{controller:J,data:mt,_sorted:kt}=d,Dt=J._cachedMeta.iScale,$t=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null;if(Dt&&l===Dt.axis&&l!=="r"&&kt&&mt.length){const ee=Dt._reversePixels?ist:_y;if(j){if(J._sharedOptions){const pe=mt[0],Be=typeof pe.getRange=="function"&&pe.getRange(l);if(Be){const ir=ee(mt,l,z-Be),vr=ee(mt,l,z+Be);return{lo:ir.lo,hi:vr.hi}}}}else{const pe=ee(mt,l,z);if($t){const{vScale:Be}=J._cachedMeta,{_parsed:ir}=d,vr=ir.slice(0,pe.lo+1).reverse().findIndex(Pr=>!Bh(Pr[Be.axis]));pe.lo-=Math.max(0,vr);const Ir=ir.slice(pe.hi).findIndex(Pr=>!Bh(Pr[Be.axis]));pe.hi+=Math.max(0,Ir)}return pe}}return{lo:0,hi:mt.length-1}}function $4(d,l,z,j,J){const mt=d.getSortedVisibleDatasetMetas(),kt=z[l];for(let Dt=0,$t=mt.length;Dt<$t;++Dt){const{index:ee,data:pe}=mt[Dt],{lo:Be,hi:ir}=Nlt(mt[Dt],l,kt,J);for(let vr=Be;vr<=ir;++vr){const Ir=pe[vr];Ir.skip||j(Ir,ee,vr)}}}function jlt(d){const l=d.indexOf("x")!==-1,z=d.indexOf("y")!==-1;return function(j,J){const mt=l?Math.abs(j.x-J.x):0,kt=z?Math.abs(j.y-J.y):0;return Math.sqrt(Math.pow(mt,2)+Math.pow(kt,2))}}function R8(d,l,z,j,J){const mt=[];return!J&&!d.isPointInArea(l)||$4(d,z,l,function(Dt,$t,ee){!J&&!K2(Dt,d.chartArea,0)||Dt.inRange(l.x,l.y,j)&&mt.push({element:Dt,datasetIndex:$t,index:ee})},!0),mt}function Ult(d,l,z,j){let J=[];function mt(kt,Dt,$t){const{startAngle:ee,endAngle:pe}=kt.getProps(["startAngle","endAngle"],j),{angle:Be}=RO(kt,{x:l.x,y:l.y});Y2(Be,ee,pe)&&J.push({element:kt,datasetIndex:Dt,index:$t})}return $4(d,z,l,mt),J}function Vlt(d,l,z,j,J,mt){let kt=[];const Dt=jlt(z);let $t=Number.POSITIVE_INFINITY;function ee(pe,Be,ir){const vr=pe.inRange(l.x,l.y,J);if(j&&!vr)return;const Ir=pe.getCenterPoint(J);if(!(!!mt||d.isPointInArea(Ir))&&!vr)return;const Wr=Dt(l,Ir);Wr<$t?(kt=[{element:pe,datasetIndex:Be,index:ir}],$t=Wr):Wr===$t&&kt.push({element:pe,datasetIndex:Be,index:ir})}return $4(d,z,l,ee),kt}function B8(d,l,z,j,J,mt){return!mt&&!d.isPointInArea(l)?[]:z==="r"&&!j?Ult(d,l,z,J):Vlt(d,l,z,j,J,mt)}function _P(d,l,z,j,J){const mt=[],kt=z==="x"?"inXRange":"inYRange";let Dt=!1;return $4(d,z,l,($t,ee,pe)=>{$t[kt]&&$t[kt](l[z],J)&&(mt.push({element:$t,datasetIndex:ee,index:pe}),Dt=Dt||$t.inRange(l.x,l.y,J))}),j&&!Dt?[]:mt}var Hlt={modes:{index(d,l,z,j){const J=dy(l,d),mt=z.axis||"x",kt=z.includeInvisible||!1,Dt=z.intersect?R8(d,J,mt,j,kt):B8(d,J,mt,!1,j,kt),$t=[];return Dt.length?(d.getSortedVisibleDatasetMetas().forEach(ee=>{const pe=Dt[0].index,Be=ee.data[pe];Be&&!Be.skip&&$t.push({element:Be,datasetIndex:ee.index,index:pe})}),$t):[]},dataset(d,l,z,j){const J=dy(l,d),mt=z.axis||"xy",kt=z.includeInvisible||!1;let Dt=z.intersect?R8(d,J,mt,j,kt):B8(d,J,mt,!1,j,kt);if(Dt.length>0){const $t=Dt[0].datasetIndex,ee=d.getDatasetMeta($t).data;Dt=[];for(let pe=0;pez.pos===l)}function bP(d,l){return d.filter(z=>oD.indexOf(z.pos)===-1&&z.box.axis===l)}function u2(d,l){return d.sort((z,j)=>{const J=l?j:z,mt=l?z:j;return J.weight===mt.weight?J.index-mt.index:J.weight-mt.weight})}function Wlt(d){const l=[];let z,j,J,mt,kt,Dt;for(z=0,j=(d||[]).length;zee.box.fullSize),!0),j=u2(l2(l,"left"),!0),J=u2(l2(l,"right")),mt=u2(l2(l,"top"),!0),kt=u2(l2(l,"bottom")),Dt=bP(l,"x"),$t=bP(l,"y");return{fullSize:z,leftAndTop:j.concat(mt),rightAndBottom:J.concat($t).concat(kt).concat(Dt),chartArea:l2(l,"chartArea"),vertical:j.concat(J).concat($t),horizontal:mt.concat(kt).concat(Dt)}}function wP(d,l,z,j){return Math.max(d[z],l[z])+Math.max(d[j],l[j])}function sD(d,l){d.top=Math.max(d.top,l.top),d.left=Math.max(d.left,l.left),d.bottom=Math.max(d.bottom,l.bottom),d.right=Math.max(d.right,l.right)}function Glt(d,l,z,j){const{pos:J,box:mt}=z,kt=d.maxPadding;if(!Cc(J)){z.size&&(d[J]-=z.size);const Be=j[z.stack]||{size:0,count:1};Be.size=Math.max(Be.size,z.horizontal?mt.height:mt.width),z.size=Be.size/Be.count,d[J]+=z.size}mt.getPadding&&sD(kt,mt.getPadding());const Dt=Math.max(0,l.outerWidth-wP(kt,d,"left","right")),$t=Math.max(0,l.outerHeight-wP(kt,d,"top","bottom")),ee=Dt!==d.w,pe=$t!==d.h;return d.w=Dt,d.h=$t,z.horizontal?{same:ee,other:pe}:{same:pe,other:ee}}function Ylt(d){const l=d.maxPadding;function z(j){const J=Math.max(l[j]-d[j],0);return d[j]+=J,J}d.y+=z("top"),d.x+=z("left"),z("right"),z("bottom")}function Klt(d,l){const z=l.maxPadding;function j(J){const mt={left:0,top:0,right:0,bottom:0};return J.forEach(kt=>{mt[kt]=Math.max(l[kt],z[kt])}),mt}return j(d?["left","right"]:["top","bottom"])}function y2(d,l,z,j){const J=[];let mt,kt,Dt,$t,ee,pe;for(mt=0,kt=d.length,ee=0;mt{typeof Pr.beforeLayout=="function"&&Pr.beforeLayout()});const pe=$t.reduce((Pr,Wr)=>Wr.box.options&&Wr.box.options.display===!1?Pr:Pr+1,0)||1,Be=Object.freeze({outerWidth:l,outerHeight:z,padding:J,availableWidth:mt,availableHeight:kt,vBoxMaxWidth:mt/2/pe,hBoxMaxHeight:kt/2}),ir=Object.assign({},J);sD(ir,pm(j));const vr=Object.assign({maxPadding:ir,w:mt,h:kt,x:J.left,y:J.top},J),Ir=Zlt($t.concat(ee),Be);y2(Dt.fullSize,vr,Be,Ir),y2($t,vr,Be,Ir),y2(ee,vr,Be,Ir)&&y2($t,vr,Be,Ir),Ylt(vr),kP(Dt.leftAndTop,vr,Be,Ir),vr.x+=vr.w,vr.y+=vr.h,kP(Dt.rightAndBottom,vr,Be,Ir),d.chartArea={left:vr.left,top:vr.top,right:vr.left+vr.w,bottom:vr.top+vr.h,height:vr.h,width:vr.w},Xh(Dt.chartArea,Pr=>{const Wr=Pr.box;Object.assign(Wr,d.chartArea),Wr.update(vr.w,vr.h,{left:0,top:0,right:0,bottom:0})})}};class lD{acquireContext(l,z){}releaseContext(l){return!1}addEventListener(l,z,j){}removeEventListener(l,z,j){}getDevicePixelRatio(){return 1}getMaximumSize(l,z,j,J){return z=Math.max(0,z||l.width),j=j||l.height,{width:z,height:Math.max(0,J?Math.floor(z/J):j)}}isAttached(l){return!0}updateConfig(l){}}class Xlt extends lD{acquireContext(l){return l&&l.getContext&&l.getContext("2d")||null}updateConfig(l){l.options.animation=!1}}const J5="$chartjs",Jlt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},TP=d=>d===null||d==="";function Qlt(d,l){const z=d.style,j=d.getAttribute("height"),J=d.getAttribute("width");if(d[J5]={initial:{height:j,width:J,style:{display:z.display,height:z.height,width:z.width}}},z.display=z.display||"block",z.boxSizing=z.boxSizing||"border-box",TP(J)){const mt=sP(d,"width");mt!==void 0&&(d.width=mt)}if(TP(j))if(d.style.height==="")d.height=d.width/(l||2);else{const mt=sP(d,"height");mt!==void 0&&(d.height=mt)}return d}const uD=Qst?{passive:!0}:!1;function tut(d,l,z){d&&d.addEventListener(l,z,uD)}function eut(d,l,z){d&&d.canvas&&d.canvas.removeEventListener(l,z,uD)}function rut(d,l){const z=Jlt[d.type]||d.type,{x:j,y:J}=dy(d,l);return{type:z,chart:l,native:d,x:j!==void 0?j:null,y:J!==void 0?J:null}}function y4(d,l){for(const z of d)if(z===l||z.contains(l))return!0}function nut(d,l,z){const j=d.canvas,J=new MutationObserver(mt=>{let kt=!1;for(const Dt of mt)kt=kt||y4(Dt.addedNodes,j),kt=kt&&!y4(Dt.removedNodes,j);kt&&z()});return J.observe(document,{childList:!0,subtree:!0}),J}function iut(d,l,z){const j=d.canvas,J=new MutationObserver(mt=>{let kt=!1;for(const Dt of mt)kt=kt||y4(Dt.removedNodes,j),kt=kt&&!y4(Dt.addedNodes,j);kt&&z()});return J.observe(document,{childList:!0,subtree:!0}),J}const J2=new Map;let AP=0;function cD(){const d=window.devicePixelRatio;d!==AP&&(AP=d,J2.forEach((l,z)=>{z.currentDevicePixelRatio!==d&&l()}))}function aut(d,l){J2.size||window.addEventListener("resize",cD),J2.set(d,l)}function out(d){J2.delete(d),J2.size||window.removeEventListener("resize",cD)}function sut(d,l,z){const j=d.canvas,J=j&&mM(j);if(!J)return;const mt=UO((Dt,$t)=>{const ee=J.clientWidth;z(Dt,$t),ee{const $t=Dt[0],ee=$t.contentRect.width,pe=$t.contentRect.height;ee===0&&pe===0||mt(ee,pe)});return kt.observe(J),aut(d,mt),kt}function N8(d,l,z){z&&z.disconnect(),l==="resize"&&out(d)}function lut(d,l,z){const j=d.canvas,J=UO(mt=>{d.ctx!==null&&z(rut(mt,d))},d);return tut(j,l,J),J}class uut extends lD{acquireContext(l,z){const j=l&&l.getContext&&l.getContext("2d");return j&&j.canvas===l?(Qlt(l,z),j):null}releaseContext(l){const z=l.canvas;if(!z[J5])return!1;const j=z[J5].initial;["height","width"].forEach(mt=>{const kt=j[mt];Bh(kt)?z.removeAttribute(mt):z.setAttribute(mt,kt)});const J=j.style||{};return Object.keys(J).forEach(mt=>{z.style[mt]=J[mt]}),z.width=z.width,delete z[J5],!0}addEventListener(l,z,j){this.removeEventListener(l,z);const J=l.$proxies||(l.$proxies={}),kt={attach:nut,detach:iut,resize:sut}[z]||lut;J[z]=kt(l,z,j)}removeEventListener(l,z){const j=l.$proxies||(l.$proxies={}),J=j[z];if(!J)return;({attach:N8,detach:N8,resize:N8}[z]||eut)(l,z,J),j[z]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(l,z,j,J){return Jst(l,z,j,J)}isAttached(l){const z=l&&mM(l);return!!(z&&z.isConnected)}}function cut(d){return!pM()||typeof OffscreenCanvas<"u"&&d instanceof OffscreenCanvas?Xlt:uut}let uv=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(l){const{x:z,y:j}=this.getProps(["x","y"],l);return{x:z,y:j}}hasValue(){return G2(this.x)&&G2(this.y)}getProps(l,z){const j=this.$animations;if(!z||!j)return this;const J={};return l.forEach(mt=>{J[mt]=j[mt]&&j[mt].active()?j[mt]._to:this[mt]}),J}};function hut(d,l){const z=d.options.ticks,j=fut(d),J=Math.min(z.maxTicksLimit||j,j),mt=z.major.enabled?put(l):[],kt=mt.length,Dt=mt[0],$t=mt[kt-1],ee=[];if(kt>J)return mut(l,ee,mt,kt/J),ee;const pe=dut(mt,l,J);if(kt>0){let Be,ir;const vr=kt>1?Math.round(($t-Dt)/(kt-1)):null;for(R5(l,ee,pe,Bh(vr)?0:Dt-vr,Dt),Be=0,ir=kt-1;BeJ)return $t}return Math.max(J,1)}function put(d){const l=[];let z,j;for(z=0,j=d.length;zd==="left"?"right":d==="right"?"left":d,MP=(d,l,z)=>l==="top"||l==="left"?d[l]+z:d[l]-z,SP=(d,l)=>Math.min(l||d,d);function EP(d,l){const z=[],j=d.length/l,J=d.length;let mt=0;for(;mtkt+Dt)))return $t}function xut(d,l){Xh(d,z=>{const j=z.gc,J=j.length/2;let mt;if(J>l){for(mt=0;mtj?j:z,j=J&&z>j?z:j,{min:ng(z,ng(j,z)),max:ng(j,ng(z,j))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const l=this.chart.data;return this.options.labels||(this.isHorizontal()?l.xLabels:l.yLabels)||l.labels||[]}getLabelItems(l=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(l))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Rf(this.options.beforeUpdate,[this])}update(l,z,j){const{beginAtZero:J,grace:mt,ticks:kt}=this.options,Dt=kt.sampleSize;this.beforeUpdate(),this.maxWidth=l,this.maxHeight=z,this._margins=j=Object.assign({left:0,right:0,top:0,bottom:0},j),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+j.left+j.right:this.height+j.top+j.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Lst(this,mt,J),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const $t=Dt=mt||j<=1||!this.isHorizontal()){this.labelRotation=J;return}const pe=this._getLabelSizes(),Be=pe.widest.width,ir=pe.highest.height,vr=e0(this.chart.width-Be,0,this.maxWidth);Dt=l.offset?this.maxWidth/j:vr/(j-1),Be+6>Dt&&(Dt=vr/(j-(l.offset?.5:1)),$t=this.maxHeight-c2(l.grid)-z.padding-CP(l.title,this.chart.options.font),ee=Math.sqrt(Be*Be+ir*ir),kt=est(Math.min(Math.asin(e0((pe.highest.height+6)/Dt,-1,1)),Math.asin(e0($t/ee,-1,1))-Math.asin(e0(ir/ee,-1,1)))),kt=Math.max(J,Math.min(mt,kt))),this.labelRotation=kt}afterCalculateLabelRotation(){Rf(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Rf(this.options.beforeFit,[this])}fit(){const l={width:0,height:0},{chart:z,options:{ticks:j,title:J,grid:mt}}=this,kt=this._isVisible(),Dt=this.isHorizontal();if(kt){const $t=CP(J,z.options.font);if(Dt?(l.width=this.maxWidth,l.height=c2(mt)+$t):(l.height=this.maxHeight,l.width=c2(mt)+$t),j.display&&this.ticks.length){const{first:ee,last:pe,widest:Be,highest:ir}=this._getLabelSizes(),vr=j.padding*2,Ir=nv(this.labelRotation),Pr=Math.cos(Ir),Wr=Math.sin(Ir);if(Dt){const Tn=j.mirror?0:Wr*Be.width+Pr*ir.height;l.height=Math.min(this.maxHeight,l.height+Tn+vr)}else{const Tn=j.mirror?0:Pr*Be.width+Wr*ir.height;l.width=Math.min(this.maxWidth,l.width+Tn+vr)}this._calculatePadding(ee,pe,Wr,Pr)}}this._handleMargins(),Dt?(this.width=this._length=z.width-this._margins.left-this._margins.right,this.height=l.height):(this.width=l.width,this.height=this._length=z.height-this._margins.top-this._margins.bottom)}_calculatePadding(l,z,j,J){const{ticks:{align:mt,padding:kt},position:Dt}=this.options,$t=this.labelRotation!==0,ee=Dt!=="top"&&this.axis==="x";if(this.isHorizontal()){const pe=this.getPixelForTick(0)-this.left,Be=this.right-this.getPixelForTick(this.ticks.length-1);let ir=0,vr=0;$t?ee?(ir=J*l.width,vr=j*z.height):(ir=j*l.height,vr=J*z.width):mt==="start"?vr=z.width:mt==="end"?ir=l.width:mt!=="inner"&&(ir=l.width/2,vr=z.width/2),this.paddingLeft=Math.max((ir-pe+kt)*this.width/(this.width-pe),0),this.paddingRight=Math.max((vr-Be+kt)*this.width/(this.width-Be),0)}else{let pe=z.height/2,Be=l.height/2;mt==="start"?(pe=0,Be=l.height):mt==="end"&&(pe=z.height,Be=0),this.paddingTop=pe+kt,this.paddingBottom=Be+kt}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Rf(this.options.afterFit,[this])}isHorizontal(){const{axis:l,position:z}=this.options;return z==="top"||z==="bottom"||l==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(l){this.beforeTickToLabelConversion(),this.generateTickLabels(l);let z,j;for(z=0,j=l.length;z({width:kt[En]||0,height:Dt[En]||0});return{first:Gi(0),last:Gi(z-1),widest:Gi(ai),highest:Gi(Qi),widths:kt,heights:Dt}}getLabelForValue(l){return l}getPixelForValue(l,z){return NaN}getValueForPixel(l){}getPixelForTick(l){const z=this.ticks;return l<0||l>z.length-1?null:this.getPixelForValue(z[l].value)}getPixelForDecimal(l){this._reversePixels&&(l=1-l);const z=this._startPixel+l*this._length;return nst(this._alignToPixels?cy(this.chart,z,0):z)}getDecimalForPixel(l){const z=(l-this._startPixel)/this._length;return this._reversePixels?1-z:z}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:l,max:z}=this;return l<0&&z<0?z:l>0&&z>0?l:0}getContext(l){const z=this.ticks||[];if(l>=0&&lDt*J?Dt/j:$t/J:$t*J0}_computeGridLineItems(l){const z=this.axis,j=this.chart,J=this.options,{grid:mt,position:kt,border:Dt}=J,$t=mt.offset,ee=this.isHorizontal(),Be=this.ticks.length+($t?1:0),ir=c2(mt),vr=[],Ir=Dt.setContext(this.getContext()),Pr=Ir.display?Ir.width:0,Wr=Pr/2,Tn=function(qi){return cy(j,qi,Pr)};let Ft,wn,ei,jn,ai,Qi,Gi,En,Fa,Sa,Ni,zi;if(kt==="top")Ft=Tn(this.bottom),Qi=this.bottom-ir,En=Ft-Wr,Sa=Tn(l.top)+Wr,zi=l.bottom;else if(kt==="bottom")Ft=Tn(this.top),Sa=l.top,zi=Tn(l.bottom)-Wr,Qi=Ft+Wr,En=this.top+ir;else if(kt==="left")Ft=Tn(this.right),ai=this.right-ir,Gi=Ft-Wr,Fa=Tn(l.left)+Wr,Ni=l.right;else if(kt==="right")Ft=Tn(this.left),Fa=l.left,Ni=Tn(l.right)-Wr,ai=Ft+Wr,Gi=this.left+ir;else if(z==="x"){if(kt==="center")Ft=Tn((l.top+l.bottom)/2+.5);else if(Cc(kt)){const qi=Object.keys(kt)[0],Ei=kt[qi];Ft=Tn(this.chart.scales[qi].getPixelForValue(Ei))}Sa=l.top,zi=l.bottom,Qi=Ft+Wr,En=Qi+ir}else if(z==="y"){if(kt==="center")Ft=Tn((l.left+l.right)/2);else if(Cc(kt)){const qi=Object.keys(kt)[0],Ei=kt[qi];Ft=Tn(this.chart.scales[qi].getPixelForValue(Ei))}ai=Ft-Wr,Gi=ai-ir,Fa=l.left,Ni=l.right}const ia=hc(J.ticks.maxTicksLimit,Be),Ua=Math.max(1,Math.ceil(Be/ia));for(wn=0;wn0&&(ya-=To/2);break}Mo={left:ya,top:eo,width:To+co.width,height:Go+co.height,color:Ua.backdropColor}}Wr.push({label:ei,font:En,textOffset:Ni,options:{rotation:Pr,color:Ei,strokeColor:Va,strokeWidth:us,textAlign:xo,textBaseline:zi,translation:[jn,ai],backdrop:Mo}})}return Wr}_getXAxisLabelAlignment(){const{position:l,ticks:z}=this.options;if(-nv(this.labelRotation))return l==="top"?"left":"right";let J="center";return z.align==="start"?J="left":z.align==="end"?J="right":z.align==="inner"&&(J="inner"),J}_getYAxisLabelAlignment(l){const{position:z,ticks:{crossAlign:j,mirror:J,padding:mt}}=this.options,kt=this._getLabelSizes(),Dt=l+mt,$t=kt.widest.width;let ee,pe;return z==="left"?J?(pe=this.right+mt,j==="near"?ee="left":j==="center"?(ee="center",pe+=$t/2):(ee="right",pe+=$t)):(pe=this.right-Dt,j==="near"?ee="right":j==="center"?(ee="center",pe-=$t/2):(ee="left",pe=this.left)):z==="right"?J?(pe=this.left+mt,j==="near"?ee="right":j==="center"?(ee="center",pe-=$t/2):(ee="left",pe-=$t)):(pe=this.left+Dt,j==="near"?ee="left":j==="center"?(ee="center",pe+=$t/2):(ee="right",pe=this.right)):ee="right",{textAlign:ee,x:pe}}_computeLabelArea(){if(this.options.ticks.mirror)return;const l=this.chart,z=this.options.position;if(z==="left"||z==="right")return{top:0,left:this.left,bottom:l.height,right:this.right};if(z==="top"||z==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:l.width}}drawBackground(){const{ctx:l,options:{backgroundColor:z},left:j,top:J,width:mt,height:kt}=this;z&&(l.save(),l.fillStyle=z,l.fillRect(j,J,mt,kt),l.restore())}getLineWidthForValue(l){const z=this.options.grid;if(!this._isVisible()||!z.display)return 0;const J=this.ticks.findIndex(mt=>mt.value===l);return J>=0?z.setContext(this.getContext(J)).lineWidth:0}drawGrid(l){const z=this.options.grid,j=this.ctx,J=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(l));let mt,kt;const Dt=($t,ee,pe)=>{!pe.width||!pe.color||(j.save(),j.lineWidth=pe.width,j.strokeStyle=pe.color,j.setLineDash(pe.borderDash||[]),j.lineDashOffset=pe.borderDashOffset,j.beginPath(),j.moveTo($t.x,$t.y),j.lineTo(ee.x,ee.y),j.stroke(),j.restore())};if(z.display)for(mt=0,kt=J.length;mt{this.draw(mt)}}]:[{z:j,draw:mt=>{this.drawBackground(),this.drawGrid(mt),this.drawTitle()}},{z:J,draw:()=>{this.drawBorder()}},{z,draw:mt=>{this.drawLabels(mt)}}]}getMatchingVisibleMetas(l){const z=this.chart.getSortedVisibleDatasetMetas(),j=this.axis+"AxisID",J=[];let mt,kt;for(mt=0,kt=z.length;mt{const j=z.split("."),J=j.pop(),mt=[d].concat(j).join("."),kt=l[z].split("."),Dt=kt.pop(),$t=kt.join(".");Vd.route(mt,J,$t,Dt)})}function Mut(d){return"id"in d&&"defaults"in d}class Sut{constructor(){this.controllers=new B5(Z4,"datasets",!0),this.elements=new B5(uv,"elements"),this.plugins=new B5(Object,"plugins"),this.scales=new B5(T_,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...l){this._each("register",l)}remove(...l){this._each("unregister",l)}addControllers(...l){this._each("register",l,this.controllers)}addElements(...l){this._each("register",l,this.elements)}addPlugins(...l){this._each("register",l,this.plugins)}addScales(...l){this._each("register",l,this.scales)}getController(l){return this._get(l,this.controllers,"controller")}getElement(l){return this._get(l,this.elements,"element")}getPlugin(l){return this._get(l,this.plugins,"plugin")}getScale(l){return this._get(l,this.scales,"scale")}removeControllers(...l){this._each("unregister",l,this.controllers)}removeElements(...l){this._each("unregister",l,this.elements)}removePlugins(...l){this._each("unregister",l,this.plugins)}removeScales(...l){this._each("unregister",l,this.scales)}_each(l,z,j){[...z].forEach(J=>{const mt=j||this._getRegistryForType(J);j||mt.isForType(J)||mt===this.plugins&&J.id?this._exec(l,mt,J):Xh(J,kt=>{const Dt=j||this._getRegistryForType(kt);this._exec(l,Dt,kt)})})}_exec(l,z,j){const J=aM(l);Rf(j["before"+J],[],j),z[l](j),Rf(j["after"+J],[],j)}_getRegistryForType(l){for(let z=0;zmt.filter(Dt=>!kt.some($t=>Dt.plugin.id===$t.plugin.id));this._notify(J(z,j),l,"stop"),this._notify(J(j,z),l,"start")}}function Cut(d){const l={},z=[],j=Object.keys(sg.plugins.items);for(let mt=0;mt1&&LP(d[0].toLowerCase());if(j)return j}throw new Error(`Cannot determine type of '${d}' axis. Please provide 'axis' or 'position' option.`)}function PP(d,l,z){if(z[l+"AxisID"]===d)return{axis:l}}function Fut(d,l){if(l.data&&l.data.datasets){const z=l.data.datasets.filter(j=>j.xAxisID===d||j.yAxisID===d);if(z.length)return PP(d,"x",z[0])||PP(d,"y",z[0])}return{}}function Rut(d,l){const z=Cy[d.type]||{scales:{}},j=l.scales||{},J=xA(d.type,l),mt=Object.create(null);return Object.keys(j).forEach(kt=>{const Dt=j[kt];if(!Cc(Dt))return console.error(`Invalid scale configuration for scale: ${kt}`);if(Dt._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${kt}`);const $t=_A(kt,Dt,Fut(kt,d),Vd.scales[Dt.type]),ee=Out($t,J),pe=z.scales||{};mt[kt]=L2(Object.create(null),[{axis:$t},Dt,pe[$t],pe[ee]])}),d.data.datasets.forEach(kt=>{const Dt=kt.type||d.type,$t=kt.indexAxis||xA(Dt,l),pe=(Cy[Dt]||{}).scales||{};Object.keys(pe).forEach(Be=>{const ir=Iut(Be,$t),vr=kt[ir+"AxisID"]||ir;mt[vr]=mt[vr]||Object.create(null),L2(mt[vr],[{axis:ir},j[vr],pe[Be]])})}),Object.keys(mt).forEach(kt=>{const Dt=mt[kt];L2(Dt,[Vd.scales[Dt.type],Vd.scale])}),mt}function hD(d){const l=d.options||(d.options={});l.plugins=hc(l.plugins,{}),l.scales=Rut(d,l)}function fD(d){return d=d||{},d.datasets=d.datasets||[],d.labels=d.labels||[],d}function But(d){return d=d||{},d.data=fD(d.data),hD(d),d}const zP=new Map,dD=new Set;function N5(d,l){let z=zP.get(d);return z||(z=l(),zP.set(d,z),dD.add(z)),z}const h2=(d,l,z)=>{const j=Ey(l,z);j!==void 0&&d.add(j)};class Nut{constructor(l){this._config=But(l),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(l){this._config.type=l}get data(){return this._config.data}set data(l){this._config.data=fD(l)}get options(){return this._config.options}set options(l){this._config.options=l}get plugins(){return this._config.plugins}update(){const l=this._config;this.clearCache(),hD(l)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(l){return N5(l,()=>[[`datasets.${l}`,""]])}datasetAnimationScopeKeys(l,z){return N5(`${l}.transition.${z}`,()=>[[`datasets.${l}.transitions.${z}`,`transitions.${z}`],[`datasets.${l}`,""]])}datasetElementScopeKeys(l,z){return N5(`${l}-${z}`,()=>[[`datasets.${l}.elements.${z}`,`datasets.${l}`,`elements.${z}`,""]])}pluginScopeKeys(l){const z=l.id,j=this.type;return N5(`${j}-plugin-${z}`,()=>[[`plugins.${z}`,...l.additionalOptionScopes||[]]])}_cachedScopes(l,z){const j=this._scopeCache;let J=j.get(l);return(!J||z)&&(J=new Map,j.set(l,J)),J}getOptionScopes(l,z,j){const{options:J,type:mt}=this,kt=this._cachedScopes(l,j),Dt=kt.get(z);if(Dt)return Dt;const $t=new Set;z.forEach(pe=>{l&&($t.add(l),pe.forEach(Be=>h2($t,l,Be))),pe.forEach(Be=>h2($t,J,Be)),pe.forEach(Be=>h2($t,Cy[mt]||{},Be)),pe.forEach(Be=>h2($t,Vd,Be)),pe.forEach(Be=>h2($t,vA,Be))});const ee=Array.from($t);return ee.length===0&&ee.push(Object.create(null)),dD.has(z)&&kt.set(z,ee),ee}chartOptionScopes(){const{options:l,type:z}=this;return[l,Cy[z]||{},Vd.datasets[z]||{},{type:z},Vd,vA]}resolveNamedOptions(l,z,j,J=[""]){const mt={$shared:!0},{resolver:kt,subPrefixes:Dt}=IP(this._resolverCache,l,J);let $t=kt;if(Uut(kt,z)){mt.$shared=!1,j=v1(j)?j():j;const ee=this.createResolver(l,j,Dt);$t=y_(kt,j,ee)}for(const ee of z)mt[ee]=$t[ee];return mt}createResolver(l,z,j=[""],J){const{resolver:mt}=IP(this._resolverCache,l,j);return Cc(z)?y_(mt,z,void 0,J):mt}}function IP(d,l,z){let j=d.get(l);j||(j=new Map,d.set(l,j));const J=z.join();let mt=j.get(J);return mt||(mt={resolver:hM(l,z),subPrefixes:z.filter(Dt=>!Dt.toLowerCase().includes("hover"))},j.set(J,mt)),mt}const jut=d=>Cc(d)&&Object.getOwnPropertyNames(d).some(l=>v1(d[l]));function Uut(d,l){const{isScriptable:z,isIndexable:j}=qO(d);for(const J of l){const mt=z(J),kt=j(J),Dt=(kt||mt)&&d[J];if(mt&&(v1(Dt)||jut(Dt))||kt&&tp(Dt))return!0}return!1}var Vut="4.5.1";const Hut=["top","bottom","left","right","chartArea"];function OP(d,l){return d==="top"||d==="bottom"||Hut.indexOf(d)===-1&&l==="x"}function DP(d,l){return function(z,j){return z[d]===j[d]?z[l]-j[l]:z[d]-j[d]}}function FP(d){const l=d.chart,z=l.options.animation;l.notifyPlugins("afterRender"),Rf(z&&z.onComplete,[d],l)}function Wut(d){const l=d.chart,z=l.options.animation;Rf(z&&z.onProgress,[d],l)}function pD(d){return pM()&&typeof d=="string"?d=document.getElementById(d):d&&d.length&&(d=d[0]),d&&d.canvas&&(d=d.canvas),d}const Q5={},RP=d=>{const l=pD(d);return Object.values(Q5).filter(z=>z.canvas===l).pop()};function qut(d,l,z){const j=Object.keys(d);for(const J of j){const mt=+J;if(mt>=l){const kt=d[J];delete d[J],(z>0||mt>l)&&(d[mt+z]=kt)}}}function Zut(d,l,z,j){return!z||d.type==="mouseout"?null:j?l:d}class x2{static defaults=Vd;static instances=Q5;static overrides=Cy;static registry=sg;static version=Vut;static getChart=RP;static register(...l){sg.add(...l),BP()}static unregister(...l){sg.remove(...l),BP()}constructor(l,z){const j=this.config=new Nut(z),J=pD(l),mt=RP(J);if(mt)throw new Error("Canvas is already in use. Chart with ID '"+mt.id+"' must be destroyed before the canvas with ID '"+mt.canvas.id+"' can be reused.");const kt=j.createResolver(j.chartOptionScopes(),this.getContext());this.platform=new(j.platform||cut(J)),this.platform.updateConfig(j);const Dt=this.platform.acquireContext(J,kt.aspectRatio),$t=Dt&&Dt.canvas,ee=$t&&$t.height,pe=$t&&$t.width;if(this.id=Vot(),this.ctx=Dt,this.canvas=$t,this.width=pe,this.height=ee,this._options=kt,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Eut,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=sst(Be=>this.update(Be),kt.resizeDelay||0),this._dataChanges=[],Q5[this.id]=this,!Dt||!$t){console.error("Failed to create chart: can't acquire context from the given item");return}Xg.listen(this,"complete",FP),Xg.listen(this,"progress",Wut),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:l,maintainAspectRatio:z},width:j,height:J,_aspectRatio:mt}=this;return Bh(l)?z&&mt?mt:J?j/J:null:l}get data(){return this.config.data}set data(l){this.config.data=l}get options(){return this._options}set options(l){this.config.options=l}get registry(){return sg}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return nP(this.canvas,this.ctx),this}stop(){return Xg.stop(this),this}resize(l,z){Xg.running(this)?this._resizeBeforeDraw={width:l,height:z}:this._resize(l,z)}_resize(l,z){const j=this.options,J=this.canvas,mt=j.maintainAspectRatio&&this.aspectRatio,kt=this.platform.getMaximumSize(J,l,z,mt),Dt=j.devicePixelRatio||this.platform.getDevicePixelRatio(),$t=this.width?"resize":"attach";this.width=kt.width,this.height=kt.height,this._aspectRatio=this.aspectRatio,oP(this,Dt,!0)&&(this.notifyPlugins("resize",{size:kt}),Rf(j.onResize,[this,kt],this),this.attached&&this._doResize($t)&&this.render())}ensureScalesHaveIDs(){const z=this.options.scales||{};Xh(z,(j,J)=>{j.id=J})}buildOrUpdateScales(){const l=this.options,z=l.scales,j=this.scales,J=Object.keys(j).reduce((kt,Dt)=>(kt[Dt]=!1,kt),{});let mt=[];z&&(mt=mt.concat(Object.keys(z).map(kt=>{const Dt=z[kt],$t=_A(kt,Dt),ee=$t==="r",pe=$t==="x";return{options:Dt,dposition:ee?"chartArea":pe?"bottom":"left",dtype:ee?"radialLinear":pe?"category":"linear"}}))),Xh(mt,kt=>{const Dt=kt.options,$t=Dt.id,ee=_A($t,Dt),pe=hc(Dt.type,kt.dtype);(Dt.position===void 0||OP(Dt.position,ee)!==OP(kt.dposition))&&(Dt.position=kt.dposition),J[$t]=!0;let Be=null;if($t in j&&j[$t].type===pe)Be=j[$t];else{const ir=sg.getScale(pe);Be=new ir({id:$t,type:pe,ctx:this.ctx,chart:this}),j[Be.id]=Be}Be.init(Dt,l)}),Xh(J,(kt,Dt)=>{kt||delete j[Dt]}),Xh(j,kt=>{um.configure(this,kt,kt.options),um.addBox(this,kt)})}_updateMetasets(){const l=this._metasets,z=this.data.datasets.length,j=l.length;if(l.sort((J,mt)=>J.index-mt.index),j>z){for(let J=z;Jz.length&&delete this._stacks,l.forEach((j,J)=>{z.filter(mt=>mt===j._dataset).length===0&&this._destroyDatasetMeta(J)})}buildOrUpdateControllers(){const l=[],z=this.data.datasets;let j,J;for(this._removeUnreferencedMetasets(),j=0,J=z.length;j{this.getDatasetMeta(z).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(l){const z=this.config;z.update();const j=this._options=z.createResolver(z.chartOptionScopes(),this.getContext()),J=this._animationsDisabled=!j.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:l,cancelable:!0})===!1)return;const mt=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let kt=0;for(let ee=0,pe=this.data.datasets.length;ee{ee.reset()}),this._updateDatasets(l),this.notifyPlugins("afterUpdate",{mode:l}),this._layers.sort(DP("z","_idx"));const{_active:Dt,_lastEvent:$t}=this;$t?this._eventHandler($t,!0):Dt.length&&this._updateHoverStyles(Dt,Dt,!0),this.render()}_updateScales(){Xh(this.scales,l=>{um.removeBox(this,l)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const l=this.options,z=new Set(Object.keys(this._listeners)),j=new Set(l.events);(!$L(z,j)||!!this._responsiveListeners!==l.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:l}=this,z=this._getUniformDataChanges()||[];for(const{method:j,start:J,count:mt}of z){const kt=j==="_removeElements"?-mt:mt;qut(l,J,kt)}}_getUniformDataChanges(){const l=this._dataChanges;if(!l||!l.length)return;this._dataChanges=[];const z=this.data.datasets.length,j=mt=>new Set(l.filter(kt=>kt[0]===mt).map((kt,Dt)=>Dt+","+kt.splice(1).join(","))),J=j(0);for(let mt=1;mtmt.split(",")).map(mt=>({method:mt[1],start:+mt[2],count:+mt[3]}))}_updateLayout(l){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;um.update(this,this.width,this.height,l);const z=this.chartArea,j=z.width<=0||z.height<=0;this._layers=[],Xh(this.boxes,J=>{j&&J.position==="chartArea"||(J.configure&&J.configure(),this._layers.push(...J._layers()))},this),this._layers.forEach((J,mt)=>{J._idx=mt}),this.notifyPlugins("afterLayout")}_updateDatasets(l){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:l,cancelable:!0})!==!1){for(let z=0,j=this.data.datasets.length;z=0;--z)this._drawDataset(l[z]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(l){const z=this.ctx,j={meta:l,index:l.index,cancelable:!0},J=eD(this,l);this.notifyPlugins("beforeDatasetDraw",j)!==!1&&(J&&H4(z,J),l.controller.draw(),J&&W4(z),j.cancelable=!1,this.notifyPlugins("afterDatasetDraw",j))}isPointInArea(l){return K2(l,this.chartArea,this._minPadding)}getElementsAtEventForMode(l,z,j,J){const mt=Hlt.modes[z];return typeof mt=="function"?mt(this,l,j,J):[]}getDatasetMeta(l){const z=this.data.datasets[l],j=this._metasets;let J=j.filter(mt=>mt&&mt._dataset===z).pop();return J||(J={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:z&&z.order||0,index:l,_dataset:z,_parsed:[],_sorted:!1},j.push(J)),J}getContext(){return this.$context||(this.$context=Py(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(l){const z=this.data.datasets[l];if(!z)return!1;const j=this.getDatasetMeta(l);return typeof j.hidden=="boolean"?!j.hidden:!z.hidden}setDatasetVisibility(l,z){const j=this.getDatasetMeta(l);j.hidden=!z}toggleDataVisibility(l){this._hiddenIndices[l]=!this._hiddenIndices[l]}getDataVisibility(l){return!this._hiddenIndices[l]}_updateVisibility(l,z,j){const J=j?"show":"hide",mt=this.getDatasetMeta(l),kt=mt.controller._resolveAnimations(void 0,J);$2(z)?(mt.data[z].hidden=!j,this.update()):(this.setDatasetVisibility(l,j),kt.update(mt,{visible:j}),this.update(Dt=>Dt.datasetIndex===l?J:void 0))}hide(l,z){this._updateVisibility(l,z,!1)}show(l,z){this._updateVisibility(l,z,!0)}_destroyDatasetMeta(l){const z=this._metasets[l];z&&z.controller&&z.controller._destroy(),delete this._metasets[l]}_stop(){let l,z;for(this.stop(),Xg.remove(this),l=0,z=this.data.datasets.length;l{z.addEventListener(this,mt,kt),l[mt]=kt},J=(mt,kt,Dt)=>{mt.offsetX=kt,mt.offsetY=Dt,this._eventHandler(mt)};Xh(this.options.events,mt=>j(mt,J))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const l=this._responsiveListeners,z=this.platform,j=($t,ee)=>{z.addEventListener(this,$t,ee),l[$t]=ee},J=($t,ee)=>{l[$t]&&(z.removeEventListener(this,$t,ee),delete l[$t])},mt=($t,ee)=>{this.canvas&&this.resize($t,ee)};let kt;const Dt=()=>{J("attach",Dt),this.attached=!0,this.resize(),j("resize",mt),j("detach",kt)};kt=()=>{this.attached=!1,J("resize",mt),this._stop(),this._resize(0,0),j("attach",Dt)},z.isAttached(this.canvas)?Dt():kt()}unbindEvents(){Xh(this._listeners,(l,z)=>{this.platform.removeEventListener(this,z,l)}),this._listeners={},Xh(this._responsiveListeners,(l,z)=>{this.platform.removeEventListener(this,z,l)}),this._responsiveListeners=void 0}updateHoverStyle(l,z,j){const J=j?"set":"remove";let mt,kt,Dt,$t;for(z==="dataset"&&(mt=this.getDatasetMeta(l[0].datasetIndex),mt.controller["_"+J+"DatasetHoverStyle"]()),Dt=0,$t=l.length;Dt<$t;++Dt){kt=l[Dt];const ee=kt&&this.getDatasetMeta(kt.datasetIndex).controller;ee&&ee[J+"HoverStyle"](kt.element,kt.datasetIndex,kt.index)}}getActiveElements(){return this._active||[]}setActiveElements(l){const z=this._active||[],j=l.map(({datasetIndex:mt,index:kt})=>{const Dt=this.getDatasetMeta(mt);if(!Dt)throw new Error("No dataset found at index "+mt);return{datasetIndex:mt,element:Dt.data[kt],index:kt}});!d4(j,z)&&(this._active=j,this._lastEvent=null,this._updateHoverStyles(j,z))}notifyPlugins(l,z,j){return this._plugins.notify(this,l,z,j)}isPluginEnabled(l){return this._plugins._cache.filter(z=>z.plugin.id===l).length===1}_updateHoverStyles(l,z,j){const J=this.options.hover,mt=($t,ee)=>$t.filter(pe=>!ee.some(Be=>pe.datasetIndex===Be.datasetIndex&&pe.index===Be.index)),kt=mt(z,l),Dt=j?l:mt(l,z);kt.length&&this.updateHoverStyle(kt,J.mode,!1),Dt.length&&J.mode&&this.updateHoverStyle(Dt,J.mode,!0)}_eventHandler(l,z){const j={event:l,replay:z,cancelable:!0,inChartArea:this.isPointInArea(l)},J=kt=>(kt.options.events||this.options.events).includes(l.native.type);if(this.notifyPlugins("beforeEvent",j,J)===!1)return;const mt=this._handleEvent(l,z,j.inChartArea);return j.cancelable=!1,this.notifyPlugins("afterEvent",j,J),(mt||j.changed)&&this.render(),this}_handleEvent(l,z,j){const{_active:J=[],options:mt}=this,kt=z,Dt=this._getActiveElements(l,J,j,kt),$t=Got(l),ee=Zut(l,this._lastEvent,j,$t);j&&(this._lastEvent=null,Rf(mt.onHover,[l,Dt,this],this),$t&&Rf(mt.onClick,[l,Dt,this],this));const pe=!d4(Dt,J);return(pe||z)&&(this._active=Dt,this._updateHoverStyles(Dt,J,z)),this._lastEvent=ee,pe}_getActiveElements(l,z,j,J){if(l.type==="mouseout")return[];if(!j)return z;const mt=this.options.hover;return this.getElementsAtEventForMode(l,mt.mode,mt,J)}}function BP(){return Xh(x2.instances,d=>d._plugins.invalidate())}function $ut(d,l,z){const{startAngle:j,x:J,y:mt,outerRadius:kt,innerRadius:Dt,options:$t}=l,{borderWidth:ee,borderJoinStyle:pe}=$t,Be=Math.min(ee/kt,G0(j-z));if(d.beginPath(),d.arc(J,mt,kt-ee/2,j+Be/2,z-Be/2),Dt>0){const ir=Math.min(ee/Dt,G0(j-z));d.arc(J,mt,Dt+ee/2,z-ir/2,j+ir/2,!0)}else{const ir=Math.min(ee/2,kt*G0(j-z));if(pe==="round")d.arc(J,mt,ir,z-Jh/2,j+Jh/2,!0);else if(pe==="bevel"){const vr=2*ir*ir,Ir=-vr*Math.cos(z+Jh/2)+J,Pr=-vr*Math.sin(z+Jh/2)+mt,Wr=vr*Math.cos(j+Jh/2)+J,Tn=vr*Math.sin(j+Jh/2)+mt;d.lineTo(Ir,Pr),d.lineTo(Wr,Tn)}}d.closePath(),d.moveTo(0,0),d.rect(0,0,d.canvas.width,d.canvas.height),d.clip("evenodd")}function Gut(d,l,z){const{startAngle:j,pixelMargin:J,x:mt,y:kt,outerRadius:Dt,innerRadius:$t}=l;let ee=J/Dt;d.beginPath(),d.arc(mt,kt,Dt,j-ee,z+ee),$t>J?(ee=J/$t,d.arc(mt,kt,$t,z+ee,j-ee,!0)):d.arc(mt,kt,J,z+lp,j-lp),d.closePath(),d.clip()}function Yut(d){return cM(d,["outerStart","outerEnd","innerStart","innerEnd"])}function Kut(d,l,z,j){const J=Yut(d.options.borderRadius),mt=(z-l)/2,kt=Math.min(mt,j*l/2),Dt=$t=>{const ee=(z-Math.min(mt,$t))*j/2;return e0($t,0,Math.min(mt,ee))};return{outerStart:Dt(J.outerStart),outerEnd:Dt(J.outerEnd),innerStart:e0(J.innerStart,0,kt),innerEnd:e0(J.innerEnd,0,kt)}}function e_(d,l,z,j){return{x:z+d*Math.cos(l),y:j+d*Math.sin(l)}}function x4(d,l,z,j,J,mt){const{x:kt,y:Dt,startAngle:$t,pixelMargin:ee,innerRadius:pe}=l,Be=Math.max(l.outerRadius+j+z-ee,0),ir=pe>0?pe+j+z+ee:0;let vr=0;const Ir=J-$t;if(j){const Ua=pe>0?pe-j:0,qi=Be>0?Be-j:0,Ei=(Ua+qi)/2,Va=Ei!==0?Ir*Ei/(Ei+j):Ir;vr=(Ir-Va)/2}const Pr=Math.max(.001,Ir*Be-z/Jh)/Be,Wr=(Ir-Pr)/2,Tn=$t+Wr+vr,Ft=J-Wr-vr,{outerStart:wn,outerEnd:ei,innerStart:jn,innerEnd:ai}=Kut(l,ir,Be,Ft-Tn),Qi=Be-wn,Gi=Be-ei,En=Tn+wn/Qi,Fa=Ft-ei/Gi,Sa=ir+jn,Ni=ir+ai,zi=Tn+jn/Sa,ia=Ft-ai/Ni;if(d.beginPath(),mt){const Ua=(En+Fa)/2;if(d.arc(kt,Dt,Be,En,Ua),d.arc(kt,Dt,Be,Ua,Fa),ei>0){const us=e_(Gi,Fa,kt,Dt);d.arc(us.x,us.y,ei,Fa,Ft+lp)}const qi=e_(Ni,Ft,kt,Dt);if(d.lineTo(qi.x,qi.y),ai>0){const us=e_(Ni,ia,kt,Dt);d.arc(us.x,us.y,ai,Ft+lp,ia+Math.PI)}const Ei=(Ft-ai/ir+(Tn+jn/ir))/2;if(d.arc(kt,Dt,ir,Ft-ai/ir,Ei,!0),d.arc(kt,Dt,ir,Ei,Tn+jn/ir,!0),jn>0){const us=e_(Sa,zi,kt,Dt);d.arc(us.x,us.y,jn,zi+Math.PI,Tn-lp)}const Va=e_(Qi,Tn,kt,Dt);if(d.lineTo(Va.x,Va.y),wn>0){const us=e_(Qi,En,kt,Dt);d.arc(us.x,us.y,wn,Tn-lp,En)}}else{d.moveTo(kt,Dt);const Ua=Math.cos(En)*Be+kt,qi=Math.sin(En)*Be+Dt;d.lineTo(Ua,qi);const Ei=Math.cos(Fa)*Be+kt,Va=Math.sin(Fa)*Be+Dt;d.lineTo(Ei,Va)}d.closePath()}function Xut(d,l,z,j,J){const{fullCircles:mt,startAngle:kt,circumference:Dt}=l;let $t=l.endAngle;if(mt){x4(d,l,z,j,$t,J);for(let ee=0;ee=Jh&&vr===0&&pe!=="miter"&&$ut(d,l,Pr),mt||(x4(d,l,z,j,Pr,J),d.stroke())}class Qut extends uv{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:l=>l!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(l){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,l&&Object.assign(this,l)}inRange(l,z,j){const J=this.getProps(["x","y"],j),{angle:mt,distance:kt}=RO(J,{x:l,y:z}),{startAngle:Dt,endAngle:$t,innerRadius:ee,outerRadius:pe,circumference:Be}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],j),ir=(this.options.spacing+this.options.borderWidth)/2,vr=hc(Be,$t-Dt),Ir=Y2(mt,Dt,$t)&&Dt!==$t,Pr=vr>=ud||Ir,Wr=iv(kt,ee+ir,pe+ir);return Pr&&Wr}getCenterPoint(l){const{x:z,y:j,startAngle:J,endAngle:mt,innerRadius:kt,outerRadius:Dt}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],l),{offset:$t,spacing:ee}=this.options,pe=(J+mt)/2,Be=(kt+Dt+ee+$t)/2;return{x:z+Math.cos(pe)*Be,y:j+Math.sin(pe)*Be}}tooltipPosition(l){return this.getCenterPoint(l)}draw(l){const{options:z,circumference:j}=this,J=(z.offset||0)/4,mt=(z.spacing||0)/2,kt=z.circular;if(this.pixelMargin=z.borderAlign==="inner"?.33:0,this.fullCircles=j>ud?Math.floor(j/ud):0,j===0||this.innerRadius<0||this.outerRadius<0)return;l.save();const Dt=(this.startAngle+this.endAngle)/2;l.translate(Math.cos(Dt)*J,Math.sin(Dt)*J);const $t=1-Math.sin(Math.min(Jh,j||0)),ee=J*$t;l.fillStyle=z.backgroundColor,l.strokeStyle=z.borderColor,Xut(l,this,ee,mt,kt),Jut(l,this,ee,mt,kt),l.restore()}}function mD(d,l,z=l){d.lineCap=hc(z.borderCapStyle,l.borderCapStyle),d.setLineDash(hc(z.borderDash,l.borderDash)),d.lineDashOffset=hc(z.borderDashOffset,l.borderDashOffset),d.lineJoin=hc(z.borderJoinStyle,l.borderJoinStyle),d.lineWidth=hc(z.borderWidth,l.borderWidth),d.strokeStyle=hc(z.borderColor,l.borderColor)}function tct(d,l,z){d.lineTo(z.x,z.y)}function ect(d){return d.stepped?bst:d.tension||d.cubicInterpolationMode==="monotone"?wst:tct}function gD(d,l,z={}){const j=d.length,{start:J=0,end:mt=j-1}=z,{start:kt,end:Dt}=l,$t=Math.max(J,kt),ee=Math.min(mt,Dt),pe=JDt&&mt>Dt;return{count:j,start:$t,loop:l.loop,ilen:ee<$t&&!pe?j+ee-$t:ee-$t}}function rct(d,l,z,j){const{points:J,options:mt}=l,{count:kt,start:Dt,loop:$t,ilen:ee}=gD(J,z,j),pe=ect(mt);let{move:Be=!0,reverse:ir}=j||{},vr,Ir,Pr;for(vr=0;vr<=ee;++vr)Ir=J[(Dt+(ir?ee-vr:vr))%kt],!Ir.skip&&(Be?(d.moveTo(Ir.x,Ir.y),Be=!1):pe(d,Pr,Ir,ir,mt.stepped),Pr=Ir);return $t&&(Ir=J[(Dt+(ir?ee:0))%kt],pe(d,Pr,Ir,ir,mt.stepped)),!!$t}function nct(d,l,z,j){const J=l.points,{count:mt,start:kt,ilen:Dt}=gD(J,z,j),{move:$t=!0,reverse:ee}=j||{};let pe=0,Be=0,ir,vr,Ir,Pr,Wr,Tn;const Ft=ei=>(kt+(ee?Dt-ei:ei))%mt,wn=()=>{Pr!==Wr&&(d.lineTo(pe,Wr),d.lineTo(pe,Pr),d.lineTo(pe,Tn))};for($t&&(vr=J[Ft(0)],d.moveTo(vr.x,vr.y)),ir=0;ir<=Dt;++ir){if(vr=J[Ft(ir)],vr.skip)continue;const ei=vr.x,jn=vr.y,ai=ei|0;ai===Ir?(jnWr&&(Wr=jn),pe=(Be*pe+ei)/++Be):(wn(),d.lineTo(ei,jn),Ir=ai,Be=0,Pr=Wr=jn),Tn=jn}wn()}function bA(d){const l=d.options,z=l.borderDash&&l.borderDash.length;return!d._decimated&&!d._loop&&!l.tension&&l.cubicInterpolationMode!=="monotone"&&!l.stepped&&!z?nct:rct}function ict(d){return d.stepped?tlt:d.tension||d.cubicInterpolationMode==="monotone"?elt:py}function act(d,l,z,j){let J=l._path;J||(J=l._path=new Path2D,l.path(J,z,j)&&J.closePath()),mD(d,l.options),d.stroke(J)}function oct(d,l,z,j){const{segments:J,options:mt}=l,kt=bA(l);for(const Dt of J)mD(d,mt,Dt.style),d.beginPath(),kt(d,l,Dt,{start:z,end:z+j-1})&&d.closePath(),d.stroke()}const sct=typeof Path2D=="function";function lct(d,l,z,j){sct&&!l.options.segment?act(d,l,z,j):oct(d,l,z,j)}class G4 extends uv{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:l=>l!=="borderDash"&&l!=="fill"};constructor(l){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,l&&Object.assign(this,l)}updateControlPoints(l,z){const j=this.options;if((j.tension||j.cubicInterpolationMode==="monotone")&&!j.stepped&&!this._pointsUpdated){const J=j.spanGaps?this._loop:this._fullLoop;Zst(this._points,j,l,J,z),this._pointsUpdated=!0}}set points(l){this._points=l,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=slt(this,this.options.segment))}first(){const l=this.segments,z=this.points;return l.length&&z[l[0].start]}last(){const l=this.segments,z=this.points,j=l.length;return j&&z[l[j-1].end]}interpolate(l,z){const j=this.options,J=l[z],mt=this.points,kt=tD(this,{property:z,start:J,end:J});if(!kt.length)return;const Dt=[],$t=ict(j);let ee,pe;for(ee=0,pe=kt.length;ee{Dt=Y4(kt,Dt,J);const $t=J[kt],ee=J[Dt];j!==null?(mt.push({x:$t.x,y:j}),mt.push({x:ee.x,y:j})):z!==null&&(mt.push({x:z,y:$t.y}),mt.push({x:z,y:ee.y}))}),mt}function Y4(d,l,z){for(;l>d;l--){const j=z[l];if(!isNaN(j.x)&&!isNaN(j.y))break}return l}function jP(d,l,z,j){return d&&l?j(d[z],l[z]):d?d[z]:l?l[z]:0}function yD(d,l){let z=[],j=!1;return tp(d)?(j=!0,z=d):z=vct(d,l),z.length?new G4({points:z,options:{tension:0},_loop:j,_fullLoop:j}):null}function UP(d){return d&&d.fill!==!1}function yct(d,l,z){let J=d[l].fill;const mt=[l];let kt;if(!z)return J;for(;J!==!1&&mt.indexOf(J)===-1;){if(!n0(J))return J;if(kt=d[J],!kt)return!1;if(kt.visible)return J;mt.push(J),J=kt.fill}return!1}function xct(d,l,z){const j=kct(d);if(Cc(j))return isNaN(j.value)?!1:j;let J=parseFloat(j);return n0(J)&&Math.floor(J)===J?_ct(j[0],l,J,z):["origin","start","end","stack","shape"].indexOf(j)>=0&&j}function _ct(d,l,z,j){return(d==="-"||d==="+")&&(z=l+z),z===l||z<0||z>=j?!1:z}function bct(d,l){let z=null;return d==="start"?z=l.bottom:d==="end"?z=l.top:Cc(d)?z=l.getPixelForValue(d.value):l.getBasePixel&&(z=l.getBasePixel()),z}function wct(d,l,z){let j;return d==="start"?j=z:d==="end"?j=l.options.reverse?l.min:l.max:Cc(d)?j=d.value:j=l.getBaseValue(),j}function kct(d){const l=d.options,z=l.fill;let j=hc(z&&z.target,z);return j===void 0&&(j=!!l.backgroundColor),j===!1||j===null?!1:j===!0?"origin":j}function Tct(d){const{scale:l,index:z,line:j}=d,J=[],mt=j.segments,kt=j.points,Dt=Act(l,z);Dt.push(yD({x:null,y:l.bottom},j));for(let $t=0;$t=0;--kt){const Dt=J[kt].$filler;Dt&&(Dt.line.updateControlPoints(mt,Dt.axis),j&&Dt.fill&&V8(d.ctx,Dt,mt))}},beforeDatasetsDraw(d,l,z){if(z.drawTime!=="beforeDatasetsDraw")return;const j=d.getSortedVisibleDatasetMetas();for(let J=j.length-1;J>=0;--J){const mt=j[J].$filler;UP(mt)&&V8(d.ctx,mt,d.chartArea)}},beforeDatasetDraw(d,l,z){const j=l.meta.$filler;!UP(j)||z.drawTime!=="beforeDatasetDraw"||V8(d.ctx,j,d.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const qP=(d,l)=>{let{boxHeight:z=l,boxWidth:j=l}=d;return d.usePointStyle&&(z=Math.min(z,l),j=d.pointStyleWidth||Math.min(j,l)),{boxWidth:j,boxHeight:z,itemHeight:Math.max(l,z)}},Fct=(d,l)=>d!==null&&l!==null&&d.datasetIndex===l.datasetIndex&&d.index===l.index;class ZP extends uv{constructor(l){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=l.chart,this.options=l.options,this.ctx=l.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(l,z,j){this.maxWidth=l,this.maxHeight=z,this._margins=j,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const l=this.options.labels||{};let z=Rf(l.generateLabels,[this.chart],this)||[];l.filter&&(z=z.filter(j=>l.filter(j,this.chart.data))),l.sort&&(z=z.sort((j,J)=>l.sort(j,J,this.chart.data))),this.options.reverse&&z.reverse(),this.legendItems=z}fit(){const{options:l,ctx:z}=this;if(!l.display){this.width=this.height=0;return}const j=l.labels,J=r0(j.font),mt=J.size,kt=this._computeTitleHeight(),{boxWidth:Dt,itemHeight:$t}=qP(j,mt);let ee,pe;z.font=J.string,this.isHorizontal()?(ee=this.maxWidth,pe=this._fitRows(kt,mt,Dt,$t)+10):(pe=this.maxHeight,ee=this._fitCols(kt,J,Dt,$t)+10),this.width=Math.min(ee,l.maxWidth||this.maxWidth),this.height=Math.min(pe,l.maxHeight||this.maxHeight)}_fitRows(l,z,j,J){const{ctx:mt,maxWidth:kt,options:{labels:{padding:Dt}}}=this,$t=this.legendHitBoxes=[],ee=this.lineWidths=[0],pe=J+Dt;let Be=l;mt.textAlign="left",mt.textBaseline="middle";let ir=-1,vr=-pe;return this.legendItems.forEach((Ir,Pr)=>{const Wr=j+z/2+mt.measureText(Ir.text).width;(Pr===0||ee[ee.length-1]+Wr+2*Dt>kt)&&(Be+=pe,ee[ee.length-(Pr>0?0:1)]=0,vr+=pe,ir++),$t[Pr]={left:0,top:vr,row:ir,width:Wr,height:J},ee[ee.length-1]+=Wr+Dt}),Be}_fitCols(l,z,j,J){const{ctx:mt,maxHeight:kt,options:{labels:{padding:Dt}}}=this,$t=this.legendHitBoxes=[],ee=this.columnSizes=[],pe=kt-l;let Be=Dt,ir=0,vr=0,Ir=0,Pr=0;return this.legendItems.forEach((Wr,Tn)=>{const{itemWidth:Ft,itemHeight:wn}=Rct(j,z,mt,Wr,J);Tn>0&&vr+wn+2*Dt>pe&&(Be+=ir+Dt,ee.push({width:ir,height:vr}),Ir+=ir+Dt,Pr++,ir=vr=0),$t[Tn]={left:Ir,top:vr,col:Pr,width:Ft,height:wn},ir=Math.max(ir,Ft),vr+=wn+Dt}),Be+=ir,ee.push({width:ir,height:vr}),Be}adjustHitBoxes(){if(!this.options.display)return;const l=this._computeTitleHeight(),{legendHitBoxes:z,options:{align:j,labels:{padding:J},rtl:mt}}=this,kt=h_(mt,this.left,this.width);if(this.isHorizontal()){let Dt=0,$t=Gp(j,this.left+J,this.right-this.lineWidths[Dt]);for(const ee of z)Dt!==ee.row&&(Dt=ee.row,$t=Gp(j,this.left+J,this.right-this.lineWidths[Dt])),ee.top+=this.top+l+J,ee.left=kt.leftForLtr(kt.x($t),ee.width),$t+=ee.width+J}else{let Dt=0,$t=Gp(j,this.top+l+J,this.bottom-this.columnSizes[Dt].height);for(const ee of z)ee.col!==Dt&&(Dt=ee.col,$t=Gp(j,this.top+l+J,this.bottom-this.columnSizes[Dt].height)),ee.top=$t,ee.left+=this.left+J,ee.left=kt.leftForLtr(kt.x(ee.left),ee.width),$t+=ee.height+J}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const l=this.ctx;H4(l,this),this._draw(),W4(l)}}_draw(){const{options:l,columnSizes:z,lineWidths:j,ctx:J}=this,{align:mt,labels:kt}=l,Dt=Vd.color,$t=h_(l.rtl,this.left,this.width),ee=r0(kt.font),{padding:pe}=kt,Be=ee.size,ir=Be/2;let vr;this.drawTitle(),J.textAlign=$t.textAlign("left"),J.textBaseline="middle",J.lineWidth=.5,J.font=ee.string;const{boxWidth:Ir,boxHeight:Pr,itemHeight:Wr}=qP(kt,Be),Tn=function(ai,Qi,Gi){if(isNaN(Ir)||Ir<=0||isNaN(Pr)||Pr<0)return;J.save();const En=hc(Gi.lineWidth,1);if(J.fillStyle=hc(Gi.fillStyle,Dt),J.lineCap=hc(Gi.lineCap,"butt"),J.lineDashOffset=hc(Gi.lineDashOffset,0),J.lineJoin=hc(Gi.lineJoin,"miter"),J.lineWidth=En,J.strokeStyle=hc(Gi.strokeStyle,Dt),J.setLineDash(hc(Gi.lineDash,[])),kt.usePointStyle){const Fa={radius:Pr*Math.SQRT2/2,pointStyle:Gi.pointStyle,rotation:Gi.rotation,borderWidth:En},Sa=$t.xPlus(ai,Ir/2),Ni=Qi+ir;HO(J,Fa,Sa,Ni,kt.pointStyleWidth&&Ir)}else{const Fa=Qi+Math.max((Be-Pr)/2,0),Sa=$t.leftForLtr(ai,Ir),Ni=c_(Gi.borderRadius);J.beginPath(),Object.values(Ni).some(zi=>zi!==0)?g4(J,{x:Sa,y:Fa,w:Ir,h:Pr,radius:Ni}):J.rect(Sa,Fa,Ir,Pr),J.fill(),En!==0&&J.stroke()}J.restore()},Ft=function(ai,Qi,Gi){X2(J,Gi.text,ai,Qi+Wr/2,ee,{strikethrough:Gi.hidden,textAlign:$t.textAlign(Gi.textAlign)})},wn=this.isHorizontal(),ei=this._computeTitleHeight();wn?vr={x:Gp(mt,this.left+pe,this.right-j[0]),y:this.top+pe+ei,line:0}:vr={x:this.left+pe,y:Gp(mt,this.top+ei+pe,this.bottom-z[0].height),line:0},KO(this.ctx,l.textDirection);const jn=Wr+pe;this.legendItems.forEach((ai,Qi)=>{J.strokeStyle=ai.fontColor,J.fillStyle=ai.fontColor;const Gi=J.measureText(ai.text).width,En=$t.textAlign(ai.textAlign||(ai.textAlign=kt.textAlign)),Fa=Ir+ir+Gi;let Sa=vr.x,Ni=vr.y;$t.setWidth(this.width),wn?Qi>0&&Sa+Fa+pe>this.right&&(Ni=vr.y+=jn,vr.line++,Sa=vr.x=Gp(mt,this.left+pe,this.right-j[vr.line])):Qi>0&&Ni+jn>this.bottom&&(Sa=vr.x=Sa+z[vr.line].width+pe,vr.line++,Ni=vr.y=Gp(mt,this.top+ei+pe,this.bottom-z[vr.line].height));const zi=$t.x(Sa);if(Tn(zi,Ni,ai),Sa=lst(En,Sa+Ir+ir,wn?Sa+Fa:this.right,l.rtl),Ft($t.x(Sa),Ni,ai),wn)vr.x+=Fa+pe;else if(typeof ai.text!="string"){const ia=ee.lineHeight;vr.y+=_D(ai,ia)+pe}else vr.y+=jn}),XO(this.ctx,l.textDirection)}drawTitle(){const l=this.options,z=l.title,j=r0(z.font),J=pm(z.padding);if(!z.display)return;const mt=h_(l.rtl,this.left,this.width),kt=this.ctx,Dt=z.position,$t=j.size/2,ee=J.top+$t;let pe,Be=this.left,ir=this.width;if(this.isHorizontal())ir=Math.max(...this.lineWidths),pe=this.top+ee,Be=Gp(l.align,Be,this.right-ir);else{const Ir=this.columnSizes.reduce((Pr,Wr)=>Math.max(Pr,Wr.height),0);pe=ee+Gp(l.align,this.top,this.bottom-Ir-l.labels.padding-this._computeTitleHeight())}const vr=Gp(Dt,Be,Be+ir);kt.textAlign=mt.textAlign(sM(Dt)),kt.textBaseline="middle",kt.strokeStyle=z.color,kt.fillStyle=z.color,kt.font=j.string,X2(kt,z.text,vr,pe,j)}_computeTitleHeight(){const l=this.options.title,z=r0(l.font),j=pm(l.padding);return l.display?z.lineHeight+j.height:0}_getLegendItemAt(l,z){let j,J,mt;if(iv(l,this.left,this.right)&&iv(z,this.top,this.bottom)){for(mt=this.legendHitBoxes,j=0;jmt.length>kt.length?mt:kt)),l+z.size/2+j.measureText(J).width}function Nct(d,l,z){let j=d;return typeof l.text!="string"&&(j=_D(l,z)),j}function _D(d,l){const z=d.text?d.text.length:0;return l*z}function jct(d,l){return!!((d==="mousemove"||d==="mouseout")&&(l.onHover||l.onLeave)||l.onClick&&(d==="click"||d==="mouseup"))}var Uct={id:"legend",_element:ZP,start(d,l,z){const j=d.legend=new ZP({ctx:d.ctx,options:z,chart:d});um.configure(d,j,z),um.addBox(d,j)},stop(d){um.removeBox(d,d.legend),delete d.legend},beforeUpdate(d,l,z){const j=d.legend;um.configure(d,j,z),j.options=z},afterUpdate(d){const l=d.legend;l.buildLabels(),l.adjustHitBoxes()},afterEvent(d,l){l.replay||d.legend.handleEvent(l.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(d,l,z){const j=l.datasetIndex,J=z.chart;J.isDatasetVisible(j)?(J.hide(j),l.hidden=!0):(J.show(j),l.hidden=!1)},onHover:null,onLeave:null,labels:{color:d=>d.chart.options.color,boxWidth:40,padding:10,generateLabels(d){const l=d.data.datasets,{labels:{usePointStyle:z,pointStyle:j,textAlign:J,color:mt,useBorderRadius:kt,borderRadius:Dt}}=d.legend.options;return d._getSortedDatasetMetas().map($t=>{const ee=$t.controller.getStyle(z?0:void 0),pe=pm(ee.borderWidth);return{text:l[$t.index].label,fillStyle:ee.backgroundColor,fontColor:mt,hidden:!$t.visible,lineCap:ee.borderCapStyle,lineDash:ee.borderDash,lineDashOffset:ee.borderDashOffset,lineJoin:ee.borderJoinStyle,lineWidth:(pe.width+pe.height)/4,strokeStyle:ee.borderColor,pointStyle:j||ee.pointStyle,rotation:ee.rotation,textAlign:J||ee.textAlign,borderRadius:kt&&(Dt||ee.borderRadius),datasetIndex:$t.index}},this)}},title:{color:d=>d.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:d=>!d.startsWith("on"),labels:{_scriptable:d=>!["generateLabels","filter","sort"].includes(d)}}};class bD extends uv{constructor(l){super(),this.chart=l.chart,this.options=l.options,this.ctx=l.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(l,z){const j=this.options;if(this.left=0,this.top=0,!j.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=l,this.height=this.bottom=z;const J=tp(j.text)?j.text.length:1;this._padding=pm(j.padding);const mt=J*r0(j.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=mt:this.width=mt}isHorizontal(){const l=this.options.position;return l==="top"||l==="bottom"}_drawArgs(l){const{top:z,left:j,bottom:J,right:mt,options:kt}=this,Dt=kt.align;let $t=0,ee,pe,Be;return this.isHorizontal()?(pe=Gp(Dt,j,mt),Be=z+l,ee=mt-j):(kt.position==="left"?(pe=j+l,Be=Gp(Dt,J,z),$t=Jh*-.5):(pe=mt-l,Be=Gp(Dt,z,J),$t=Jh*.5),ee=J-z),{titleX:pe,titleY:Be,maxWidth:ee,rotation:$t}}draw(){const l=this.ctx,z=this.options;if(!z.display)return;const j=r0(z.font),mt=j.lineHeight/2+this._padding.top,{titleX:kt,titleY:Dt,maxWidth:$t,rotation:ee}=this._drawArgs(mt);X2(l,z.text,0,0,j,{color:z.color,maxWidth:$t,rotation:ee,textAlign:sM(z.align),textBaseline:"middle",translation:[kt,Dt]})}}function Vct(d,l){const z=new bD({ctx:d.ctx,options:l,chart:d});um.configure(d,z,l),um.addBox(d,z),d.titleBlock=z}var Hct={id:"title",_element:bD,start(d,l,z){Vct(d,z)},stop(d){const l=d.titleBlock;um.removeBox(d,l),delete d.titleBlock},beforeUpdate(d,l,z){const j=d.titleBlock;um.configure(d,j,z),j.options=z},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const _2={average(d){if(!d.length)return!1;let l,z,j=new Set,J=0,mt=0;for(l=0,z=d.length;lDt+$t)/j.size,y:J/mt}},nearest(d,l){if(!d.length)return!1;let z=l.x,j=l.y,J=Number.POSITIVE_INFINITY,mt,kt,Dt;for(mt=0,kt=d.length;mtOt({chart:s,initial:E.initial,numSteps:_t,currentStep:Math.min(B-E.start,_t)}))}_refresh(){this._request||(this._running=!0,this._request=uD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(s=Date.now()){let E=0;this._charts.forEach((B,K)=>{if(!B.running||!B.items.length)return;const pt=B.items;let _t=pt.length-1,Ot=!1,jt;for(;_t>=0;--_t)jt=pt[_t],jt._active?(jt._total>B.duration&&(B.duration=jt._total),jt.tick(s),Ot=!0):(pt[_t]=pt[pt.length-1],pt.pop());Ot&&(K.draw(),this._notify(K,B,s,"progress")),pt.length||(B.running=!1,this._notify(K,B,s,"complete"),B.initial=!1),E+=pt.length}),this._lastDate=s,E===0&&(this._running=!1)}_getAnims(s){const E=this._charts;let B=E.get(s);return B||(B={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},E.set(s,B)),B}listen(s,E,B){this._getAnims(s).listeners[E].push(B)}add(s,E){!E||!E.length||this._getAnims(s).items.push(...E)}has(s){return this._getAnims(s).items.length>0}start(s){const E=this._charts.get(s);E&&(E.running=!0,E.start=Date.now(),E.duration=E.items.reduce((B,K)=>Math.max(B,K._duration),0),this._refresh())}running(s){if(!this._running)return!1;const E=this._charts.get(s);return!(!E||!E.running||!E.items.length)}stop(s){const E=this._charts.get(s);if(!E||!E.items.length)return;const B=E.items;let K=B.length-1;for(;K>=0;--K)B[K].cancel();E.items=[],this._notify(s,E,Date.now(),"complete")}remove(s){return this._charts.delete(s)}}var Kg=new sut;const SP="transparent",lut={boolean(d,s,E){return E>.5?s:d},color(d,s,E){const B=gP(d||SP),K=B.valid&&gP(s||SP);return K&&K.valid?K.mix(B,E).hexString():s},number(d,s,E){return d+(s-d)*E}};class uut{constructor(s,E,B,K){const pt=E[B];K=B5([s.to,K,pt,s.from]);const _t=B5([s.from,pt,K]);this._active=!0,this._fn=s.fn||lut[s.type||typeof _t],this._easing=I2[s.easing]||I2.linear,this._start=Math.floor(Date.now()+(s.delay||0)),this._duration=this._total=Math.floor(s.duration),this._loop=!!s.loop,this._target=E,this._prop=B,this._from=_t,this._to=K,this._promises=void 0}active(){return this._active}update(s,E,B){if(this._active){this._notify(!1);const K=this._target[this._prop],pt=B-this._start,_t=this._duration-pt;this._start=B,this._duration=Math.floor(Math.max(_t,s.duration)),this._total+=pt,this._loop=!!s.loop,this._to=B5([s.to,E,K,s.from]),this._from=B5([s.from,K,E])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(s){const E=s-this._start,B=this._duration,K=this._prop,pt=this._from,_t=this._loop,Ot=this._to;let jt;if(this._active=pt!==Ot&&(_t||E1?2-jt:jt,jt=this._easing(Math.min(1,Math.max(0,jt))),this._target[K]=this._fn(pt,Ot,jt)}wait(){const s=this._promises||(this._promises=[]);return new Promise((E,B)=>{s.push({res:E,rej:B})})}_notify(s){const E=s?"res":"rej",B=this._promises||[];for(let K=0;K{const pt=s[K];if(!Sc(pt))return;const _t={};for(const Ot of E)_t[Ot]=pt[Ot];(Yd(pt.properties)&&pt.properties||[K]).forEach(Ot=>{(Ot===K||!B.has(Ot))&&B.set(Ot,_t)})})}_animateOptions(s,E){const B=E.options,K=hut(s,B);if(!K)return[];const pt=this._createAnimations(K,B);return B.$shared&&cut(s.options.$animations,B).then(()=>{s.options=B},()=>{}),pt}_createAnimations(s,E){const B=this._properties,K=[],pt=s.$animations||(s.$animations={}),_t=Object.keys(E),Ot=Date.now();let jt;for(jt=_t.length-1;jt>=0;--jt){const te=_t[jt];if(te.charAt(0)==="$")continue;if(te==="options"){K.push(...this._animateOptions(s,E));continue}const he=E[te];let De=pt[te];const er=B.get(te);if(De)if(er&&De.active()){De.update(er,he,Ot);continue}else De.cancel();if(!er||!er.duration){s[te]=he;continue}pt[te]=De=new uut(er,s,te,he),K.push(De)}return K}update(s,E){if(this._properties.size===0){Object.assign(s,E);return}const B=this._createAnimations(s,E);if(B.length)return Kg.add(this._chart,B),!0}}function cut(d,s){const E=[],B=Object.keys(s);for(let K=0;K0||!E&&pt<0)return K.index}return null}function PP(d,s){const{chart:E,_cachedMeta:B}=d,K=E._stacks||(E._stacks={}),{iScale:pt,vScale:_t,index:Ot}=B,jt=pt.axis,te=_t.axis,he=mut(pt,_t,B),De=s.length;let er;for(let pr=0;prE[B].axis===s).shift()}function yut(d,s){return zy(d,{active:!1,dataset:void 0,datasetIndex:s,index:s,mode:"default",type:"dataset"})}function xut(d,s,E){return zy(d,{active:!1,dataIndex:s,parsed:void 0,raw:void 0,element:E,index:s,mode:"default",type:"data"})}function s2(d,s){const E=d.controller.index,B=d.vScale&&d.vScale.axis;if(B){s=s||d._parsed;for(const K of s){const pt=K._stacks;if(!pt||pt[B]===void 0||pt[B][E]===void 0)return;delete pt[B][E],pt[B]._visualValues!==void 0&&pt[B]._visualValues[E]!==void 0&&delete pt[B]._visualValues[E]}}}const q8=d=>d==="reset"||d==="none",IP=(d,s)=>s?d:Object.assign({},d),_ut=(d,s,E)=>d&&!s.hidden&&s._stacked&&{keys:MD(E,!0),values:null};class X4{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(s,E){this.chart=s,this._ctx=s.ctx,this.index=E,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const s=this._cachedMeta;this.configure(),this.linkScales(),s._stacked=H8(s.vScale,s),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(s){this.index!==s&&s2(this._cachedMeta),this.index=s}linkScales(){const s=this.chart,E=this._cachedMeta,B=this.getDataset(),K=(De,er,pr,Mr)=>De==="x"?er:De==="r"?Mr:pr,pt=E.xAxisID=cc(B.xAxisID,W8(s,"x")),_t=E.yAxisID=cc(B.yAxisID,W8(s,"y")),Ot=E.rAxisID=cc(B.rAxisID,W8(s,"r")),jt=E.indexAxis,te=E.iAxisID=K(jt,pt,_t,Ot),he=E.vAxisID=K(jt,_t,pt,Ot);E.xScale=this.getScaleForId(pt),E.yScale=this.getScaleForId(_t),E.rScale=this.getScaleForId(Ot),E.iScale=this.getScaleForId(te),E.vScale=this.getScaleForId(he)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(s){return this.chart.scales[s]}_getOtherScale(s){const E=this._cachedMeta;return s===E.iScale?E.vScale:E.iScale}reset(){this._update("reset")}_destroy(){const s=this._cachedMeta;this._data&&dP(this._data,this),s._stacked&&s2(s)}_dataCheck(){const s=this.getDataset(),E=s.data||(s.data=[]),B=this._data;if(Sc(E)){const K=this._cachedMeta;this._data=put(E,K)}else if(B!==E){if(B){dP(B,this);const K=this._cachedMeta;s2(K),K._parsed=[]}E&&Object.isExtensible(E)&&rlt(E,this),this._syncList=[],this._data=E}}addElements(){const s=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(s.dataset=new this.datasetElementType)}buildOrUpdateElements(s){const E=this._cachedMeta,B=this.getDataset();let K=!1;this._dataCheck();const pt=E._stacked;E._stacked=H8(E.vScale,E),E.stack!==B.stack&&(K=!0,s2(E),E.stack=B.stack),this._resyncElements(s),(K||pt!==E._stacked)&&(PP(this,E._parsed),E._stacked=H8(E.vScale,E))}configure(){const s=this.chart.config,E=s.datasetScopeKeys(this._type),B=s.getOptionScopes(this.getDataset(),E,!0);this.options=s.createResolver(B,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(s,E){const{_cachedMeta:B,_data:K}=this,{iScale:pt,_stacked:_t}=B,Ot=pt.axis;let jt=s===0&&E===K.length?!0:B._sorted,te=s>0&&B._parsed[s-1],he,De,er;if(this._parsing===!1)B._parsed=K,B._sorted=!0,er=K;else{Yd(K[s])?er=this.parseArrayData(B,K,s,E):Sc(K[s])?er=this.parseObjectData(B,K,s,E):er=this.parsePrimitiveData(B,K,s,E);const pr=()=>De[Ot]===null||te&&De[Ot]Tr||De=0;--er)if(!Mr()){this.updateRangeFromParsed(te,s,pr,jt);break}}return te}getAllParsedValues(s){const E=this._cachedMeta._parsed,B=[];let K,pt,_t;for(K=0,pt=E.length;K=0&&sthis.getContext(B,K,E),Tr=te.resolveNamedOptions(er,pr,Mr,De);return Tr.$shared&&(Tr.$shared=jt,pt[_t]=Object.freeze(IP(Tr,jt))),Tr}_resolveAnimations(s,E,B){const K=this.chart,pt=this._cachedDataOpts,_t=`animation-${E}`,Ot=pt[_t];if(Ot)return Ot;let jt;if(K.options.animation!==!1){const he=this.chart.config,De=he.datasetAnimationScopeKeys(this._type,E),er=he.getOptionScopes(this.getDataset(),De);jt=he.createResolver(er,this.getContext(s,B,E))}const te=new AD(K,jt&&jt.animations);return jt&&jt._cacheable&&(pt[_t]=Object.freeze(te)),te}getSharedOptions(s){if(s.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},s))}includeOptions(s,E){return!E||q8(s)||this.chart._animationsDisabled}_getSharedOptions(s,E){const B=this.resolveDataElementOptions(s,E),K=this._sharedOptions,pt=this.getSharedOptions(B),_t=this.includeOptions(E,pt)||pt!==K;return this.updateSharedOptions(pt,E,B),{sharedOptions:pt,includeOptions:_t}}updateElement(s,E,B,K){q8(K)?Object.assign(s,B):this._resolveAnimations(E,K).update(s,B)}updateSharedOptions(s,E,B){s&&!q8(E)&&this._resolveAnimations(void 0,E).update(s,B)}_setStyle(s,E,B,K){s.active=K;const pt=this.getStyle(E,K);this._resolveAnimations(E,B,K).update(s,{options:!K&&this.getSharedOptions(pt)||pt})}removeHoverStyle(s,E,B){this._setStyle(s,B,"active",!1)}setHoverStyle(s,E,B){this._setStyle(s,B,"active",!0)}_removeDatasetHoverStyle(){const s=this._cachedMeta.dataset;s&&this._setStyle(s,void 0,"active",!1)}_setDatasetHoverStyle(){const s=this._cachedMeta.dataset;s&&this._setStyle(s,void 0,"active",!0)}_resyncElements(s){const E=this._data,B=this._cachedMeta.data;for(const[Ot,jt,te]of this._syncList)this[Ot](jt,te);this._syncList=[];const K=B.length,pt=E.length,_t=Math.min(pt,K);_t&&this.parse(0,_t),pt>K?this._insertElements(K,pt-K,s):pt{for(te.length+=E,Ot=te.length-1;Ot>=_t;Ot--)te[Ot]=te[Ot-E]};for(jt(pt),Ot=s;Ot<_t;++Ot)pt[Ot]=new this.dataElementType;this._parsing&&jt(K._parsed),this.parse(s,E),B&&this.updateElements(pt,s,E,"reset")}updateElements(s,E,B,K){}_removeElements(s,E){const B=this._cachedMeta;if(this._parsing){const K=B._parsed.splice(s,E);B._stacked&&s2(B,K)}B.data.splice(s,E)}_sync(s){if(this._parsing)this._syncList.push(s);else{const[E,B,K]=s;this[E](B,K)}this.chart._dataChanges.push([this.index,...s])}_onDataPush(){const s=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-s,s])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(s,E){E&&this._sync(["_removeElements",s,E]);const B=arguments.length-2;B&&this._sync(["_insertElements",s,B])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function but(d,s){if(!d._cache.$bar){const E=d.getMatchingVisibleMetas(s);let B=[];for(let K=0,pt=E.length;KK-pt))}return d._cache.$bar}function wut(d){const s=d.iScale,E=but(s,d.type);let B=s._length,K,pt,_t,Ot;const jt=()=>{_t===32767||_t===-32768||(Z2(Ot)&&(B=Math.min(B,Math.abs(_t-Ot)||B)),Ot=_t)};for(K=0,pt=E.length;K0?K[d-1]:null,Ot=dMath.abs(Ot)&&(jt=Ot,te=_t),s[E.axis]=te,s._custom={barStart:jt,barEnd:te,start:K,end:pt,min:_t,max:Ot}}function SD(d,s,E,B){return Yd(d)?Aut(d,s,E,B):s[E.axis]=E.parse(d,B),s}function zP(d,s,E,B){const K=d.iScale,pt=d.vScale,_t=K.getLabels(),Ot=K===pt,jt=[];let te,he,De,er;for(te=E,he=E+B;te=E?1:-1)}function Sut(d){let s,E,B,K,pt;return d.horizontal?(s=d.base>d.x,E="left",B="right"):(s=d.basehe.controller.options.grouped),pt=B.options.stacked,_t=[],Ot=this._cachedMeta.controller.getParsed(E),jt=Ot&&Ot[B.axis],te=he=>{const De=he._parsed.find(pr=>pr[B.axis]===jt),er=De&&De[he.vScale.axis];if(Bh(er)||isNaN(er))return!0};for(const he of K)if(!(E!==void 0&&te(he))&&((pt===!1||_t.indexOf(he.stack)===-1||pt===void 0&&he.stack===void 0)&&_t.push(he.stack),he.index===s))break;return _t.length||_t.push(void 0),_t}_getStackCount(s){return this._getStacks(void 0,s).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const s=this.chart.scales,E=this.chart.options.indexAxis;return Object.keys(s).filter(B=>s[B].axis===E).shift()}_getAxis(){const s={},E=this.getFirstScaleIdForIndexAxis();for(const B of this.chart.data.datasets)s[cc(this.chart.options.indexAxis==="x"?B.xAxisID:B.yAxisID,E)]=!0;return Object.keys(s)}_getStackIndex(s,E,B){const K=this._getStacks(s,B),pt=E!==void 0?K.indexOf(E):-1;return pt===-1?K.length-1:pt}_getRuler(){const s=this.options,E=this._cachedMeta,B=E.iScale,K=[];let pt,_t;for(pt=0,_t=E.data.length;pt<_t;++pt)K.push(B.getPixelForValue(this.getParsed(pt)[B.axis],pt));const Ot=s.barThickness;return{min:Ot||wut(E),pixels:K,start:B._startPixel,end:B._endPixel,stackCount:this._getStackCount(),scale:B,grouped:s.grouped,ratio:Ot?1:s.categoryPercentage*s.barPercentage}}_calculateBarValuePixels(s){const{_cachedMeta:{vScale:E,_stacked:B,index:K},options:{base:pt,minBarLength:_t}}=this,Ot=pt||0,jt=this.getParsed(s),te=jt._custom,he=$8(te);let De=jt[E.axis],er=0,pr=B?this.applyStack(E,jt,B):De,Mr,Tr;pr!==De&&(er=pr-De,pr=De),he&&(De=te.barStart,pr=te.barEnd-te.barStart,De!==0&&pg(De)!==pg(te.barEnd)&&(er=0),er+=De);const Vr=!Bh(pt)&&!he?pt:er;let mn=E.getPixelForValue(Vr);if(this.chart.getDataVisibility(s)?Mr=E.getPixelForValue(er+pr):Mr=mn,Tr=Mr-mn,Math.abs(Tr)<_t){Tr=Mut(Tr,E,Ot)*_t,De===Ot&&(mn-=Tr/2);const Dt=E.getPixelForDecimal(0),cn=E.getPixelForDecimal(1),Jn=Math.min(Dt,cn),Bn=Math.max(Dt,cn);mn=Math.max(Math.min(mn,Bn),Jn),Mr=mn+Tr,B&&!he&&(jt._stacks[E.axis]._visualValues[K]=E.getValueForPixel(Mr)-E.getValueForPixel(mn))}if(mn===E.getPixelForValue(Ot)){const Dt=pg(Tr)*E.getLineWidthForValue(Ot)/2;mn+=Dt,Tr-=Dt}return{size:Tr,base:mn,head:Mr,center:Mr+Tr/2}}_calculateBarIndexPixels(s,E){const B=E.scale,K=this.options,pt=K.skipNull,_t=cc(K.maxBarThickness,1/0);let Ot,jt;const te=this._getAxisCount();if(E.grouped){const he=pt?this._getStackCount(s):E.stackCount,De=K.barThickness==="flex"?Tut(s,E,K,he*te):kut(s,E,K,he*te),er=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,pr=this._getAxis().indexOf(cc(er,this.getFirstScaleIdForIndexAxis())),Mr=this._getStackIndex(this.index,this._cachedMeta.stack,pt?s:void 0)+pr;Ot=De.start+De.chunk*Mr+De.chunk/2,jt=Math.min(_t,De.chunk*De.ratio)}else Ot=B.getPixelForValue(this.getParsed(s)[B.axis],s),jt=Math.min(_t,E.min*E.ratio);return{base:Ot-jt/2,head:Ot+jt/2,center:Ot,size:jt}}draw(){const s=this._cachedMeta,E=s.vScale,B=s.data,K=B.length;let pt=0;for(;ptY2(cn,Ot,jt,!0)?1:Math.max(Jn,Jn*E,Bn,Bn*E),Mr=(cn,Jn,Bn)=>Y2(cn,Ot,jt,!0)?-1:Math.min(Jn,Jn*E,Bn,Bn*E),Tr=pr(0,te,De),Vr=pr(ip,he,er),mn=Mr(Qh,te,De),Dt=Mr(Qh+ip,he,er);B=(Tr-mn)/2,K=(Vr-Dt)/2,pt=-(Tr+mn)/2,_t=-(Vr+Dt)/2}return{ratioX:B,ratioY:K,offsetX:pt,offsetY:_t}}class zut extends X4{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:s=>s!=="spacing",_indexable:s=>s!=="spacing"&&!s.startsWith("borderDash")&&!s.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(s){const E=s.data,{labels:{pointStyle:B,textAlign:K,color:pt,useBorderRadius:_t,borderRadius:Ot}}=s.legend.options;return E.labels.length&&E.datasets.length?E.labels.map((jt,te)=>{const De=s.getDatasetMeta(0).controller.getStyle(te);return{text:jt,fillStyle:De.backgroundColor,fontColor:pt,hidden:!s.getDataVisibility(te),lineDash:De.borderDash,lineDashOffset:De.borderDashOffset,lineJoin:De.borderJoinStyle,lineWidth:De.borderWidth,strokeStyle:De.borderColor,textAlign:K,pointStyle:B,borderRadius:_t&&(Ot||De.borderRadius),index:te}}):[]}},onClick(s,E,B){B.chart.toggleDataVisibility(E.index),B.chart.update()}}}};constructor(s,E){super(s,E),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(s,E){const B=this.getDataset().data,K=this._cachedMeta;if(this._parsing===!1)K._parsed=B;else{let pt=jt=>+B[jt];if(Sc(B[s])){const{key:jt="value"}=this._parsing;pt=te=>+Cy(B[te],jt)}let _t,Ot;for(_t=s,Ot=s+E;_t0&&!isNaN(s)?od*(Math.abs(s)/E):0}getLabelAndValue(s){const E=this._cachedMeta,B=this.chart,K=B.data.labels||[],pt=bM(E._parsed[s],B.options.locale);return{label:K[s]||"",value:pt}}getMaxBorderWidth(s){let E=0;const B=this.chart;let K,pt,_t,Ot,jt;if(!s){for(K=0,pt=B.data.datasets.length;K0&&this.getParsed(E-1);for(let Bn=0;Bn=Dt){Wi.skip=!0;continue}const Un=this.getParsed(Bn),qr=Bh(Un[pr]),Di=Wi[er]=_t.getPixelForValue(Un[er],Bn),Fi=Wi[pr]=pt||qr?Ot.getBasePixel():Ot.getPixelForValue(jt?this.applyStack(Ot,Un,jt):Un[pr],Bn);Wi.skip=isNaN(Di)||isNaN(Fi)||qr,Wi.stop=Bn>0&&Math.abs(Un[er]-Jn[er])>Vr,Tr&&(Wi.parsed=Un,Wi.raw=te.data[Bn]),De&&(Wi.options=he||this.resolveDataElementOptions(Bn,ni.active?"active":K)),mn||this.updateElement(ni,Bn,Wi,K),Jn=Un}}getMaxOverflow(){const s=this._cachedMeta,E=s.dataset,B=E.options&&E.options.borderWidth||0,K=s.data||[];if(!K.length)return B;const pt=K[0].size(this.resolveDataElementOptions(0)),_t=K[K.length-1].size(this.resolveDataElementOptions(K.length-1));return Math.max(B,pt,_t)/2}draw(){const s=this._cachedMeta;s.dataset.updateControlPoints(this.chart.chartArea,s.iScale.axis),super.draw()}}function fy(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class EM{static override(s){Object.assign(EM.prototype,s)}options;constructor(s){this.options=s||{}}init(){}formats(){return fy()}parse(){return fy()}format(){return fy()}add(){return fy()}diff(){return fy()}startOf(){return fy()}endOf(){return fy()}}var ED={_date:EM};function Dut(d,s,E,B){const{controller:K,data:pt,_sorted:_t}=d,Ot=K._cachedMeta.iScale,jt=d.dataset&&d.dataset.options?d.dataset.options.spanGaps:null;if(Ot&&s===Ot.axis&&s!=="r"&&_t&&pt.length){const te=Ot._reversePixels?tlt:by;if(B){if(K._sharedOptions){const he=pt[0],De=typeof he.getRange=="function"&&he.getRange(s);if(De){const er=te(pt,s,E-De),pr=te(pt,s,E+De);return{lo:er.lo,hi:pr.hi}}}}else{const he=te(pt,s,E);if(jt){const{vScale:De}=K._cachedMeta,{_parsed:er}=d,pr=er.slice(0,he.lo+1).reverse().findIndex(Tr=>!Bh(Tr[De.axis]));he.lo-=Math.max(0,pr);const Mr=er.slice(he.hi).findIndex(Tr=>!Bh(Tr[De.axis]));he.hi+=Math.max(0,Mr)}return he}}return{lo:0,hi:pt.length-1}}function J4(d,s,E,B,K){const pt=d.getSortedVisibleDatasetMetas(),_t=E[s];for(let Ot=0,jt=pt.length;Ot{jt[_t]&&jt[_t](s[E],K)&&(pt.push({element:jt,datasetIndex:te,index:he}),Ot=Ot||jt.inRange(s.x,s.y,K))}),B&&!Ot?[]:pt}var Nut={modes:{index(d,s,E,B){const K=py(s,d),pt=E.axis||"x",_t=E.includeInvisible||!1,Ot=E.intersect?Z8(d,K,pt,B,_t):G8(d,K,pt,!1,B,_t),jt=[];return Ot.length?(d.getSortedVisibleDatasetMetas().forEach(te=>{const he=Ot[0].index,De=te.data[he];De&&!De.skip&&jt.push({element:De,datasetIndex:te.index,index:he})}),jt):[]},dataset(d,s,E,B){const K=py(s,d),pt=E.axis||"xy",_t=E.includeInvisible||!1;let Ot=E.intersect?Z8(d,K,pt,B,_t):G8(d,K,pt,!1,B,_t);if(Ot.length>0){const jt=Ot[0].datasetIndex,te=d.getDatasetMeta(jt).data;Ot=[];for(let he=0;heE.pos===s)}function RP(d,s){return d.filter(E=>CD.indexOf(E.pos)===-1&&E.box.axis===s)}function u2(d,s){return d.sort((E,B)=>{const K=s?B:E,pt=s?E:B;return K.weight===pt.weight?K.index-pt.index:K.weight-pt.weight})}function jut(d){const s=[];let E,B,K,pt,_t,Ot;for(E=0,B=(d||[]).length;Ete.box.fullSize),!0),B=u2(l2(s,"left"),!0),K=u2(l2(s,"right")),pt=u2(l2(s,"top"),!0),_t=u2(l2(s,"bottom")),Ot=RP(s,"x"),jt=RP(s,"y");return{fullSize:E,leftAndTop:B.concat(pt),rightAndBottom:K.concat(jt).concat(_t).concat(Ot),chartArea:l2(s,"chartArea"),vertical:B.concat(K).concat(jt),horizontal:pt.concat(_t).concat(Ot)}}function BP(d,s,E,B){return Math.max(d[E],s[E])+Math.max(d[B],s[B])}function LD(d,s){d.top=Math.max(d.top,s.top),d.left=Math.max(d.left,s.left),d.bottom=Math.max(d.bottom,s.bottom),d.right=Math.max(d.right,s.right)}function Wut(d,s,E,B){const{pos:K,box:pt}=E,_t=d.maxPadding;if(!Sc(K)){E.size&&(d[K]-=E.size);const De=B[E.stack]||{size:0,count:1};De.size=Math.max(De.size,E.horizontal?pt.height:pt.width),E.size=De.size/De.count,d[K]+=E.size}pt.getPadding&&LD(_t,pt.getPadding());const Ot=Math.max(0,s.outerWidth-BP(_t,d,"left","right")),jt=Math.max(0,s.outerHeight-BP(_t,d,"top","bottom")),te=Ot!==d.w,he=jt!==d.h;return d.w=Ot,d.h=jt,E.horizontal?{same:te,other:he}:{same:he,other:te}}function qut(d){const s=d.maxPadding;function E(B){const K=Math.max(s[B]-d[B],0);return d[B]+=K,K}d.y+=E("top"),d.x+=E("left"),E("right"),E("bottom")}function $ut(d,s){const E=s.maxPadding;function B(K){const pt={left:0,top:0,right:0,bottom:0};return K.forEach(_t=>{pt[_t]=Math.max(s[_t],E[_t])}),pt}return B(d?["left","right"]:["top","bottom"])}function y2(d,s,E,B){const K=[];let pt,_t,Ot,jt,te,he;for(pt=0,_t=d.length,te=0;pt<_t;++pt){Ot=d[pt],jt=Ot.box,jt.update(Ot.width||s.w,Ot.height||s.h,$ut(Ot.horizontal,s));const{same:De,other:er}=Wut(s,E,Ot,B);te|=De&&K.length,he=he||er,jt.fullSize||K.push(Ot)}return te&&y2(K,s,E,B)||he}function U5(d,s,E,B,K){d.top=E,d.left=s,d.right=s+B,d.bottom=E+K,d.width=B,d.height=K}function NP(d,s,E,B){const K=E.padding;let{x:pt,y:_t}=s;for(const Ot of d){const jt=Ot.box,te=B[Ot.stack]||{placed:0,weight:1},he=Ot.stackWeight/te.weight||1;if(Ot.horizontal){const De=s.w*he,er=te.size||jt.height;Z2(te.start)&&(_t=te.start),jt.fullSize?U5(jt,K.left,_t,E.outerWidth-K.right-K.left,er):U5(jt,s.left+te.placed,_t,De,er),te.start=_t,te.placed+=De,_t=jt.bottom}else{const De=s.h*he,er=te.size||jt.width;Z2(te.start)&&(pt=te.start),jt.fullSize?U5(jt,pt,K.top,er,E.outerHeight-K.bottom-K.top):U5(jt,pt,s.top+te.placed,er,De),te.start=pt,te.placed+=De,pt=jt.right}}s.x=pt,s.y=_t}var sm={addBox(d,s){d.boxes||(d.boxes=[]),s.fullSize=s.fullSize||!1,s.position=s.position||"top",s.weight=s.weight||0,s._layers=s._layers||function(){return[{z:0,draw(E){s.draw(E)}}]},d.boxes.push(s)},removeBox(d,s){const E=d.boxes?d.boxes.indexOf(s):-1;E!==-1&&d.boxes.splice(E,1)},configure(d,s,E){s.fullSize=E.fullSize,s.position=E.position,s.weight=E.weight},update(d,s,E,B){if(!d)return;const K=fm(d.options.layout.padding),pt=Math.max(s-K.width,0),_t=Math.max(E-K.height,0),Ot=Hut(d.boxes),jt=Ot.vertical,te=Ot.horizontal;Xh(d.boxes,Tr=>{typeof Tr.beforeLayout=="function"&&Tr.beforeLayout()});const he=jt.reduce((Tr,Vr)=>Vr.box.options&&Vr.box.options.display===!1?Tr:Tr+1,0)||1,De=Object.freeze({outerWidth:s,outerHeight:E,padding:K,availableWidth:pt,availableHeight:_t,vBoxMaxWidth:pt/2/he,hBoxMaxHeight:_t/2}),er=Object.assign({},K);LD(er,fm(B));const pr=Object.assign({maxPadding:er,w:pt,h:_t,x:K.left,y:K.top},K),Mr=Vut(jt.concat(te),De);y2(Ot.fullSize,pr,De,Mr),y2(jt,pr,De,Mr),y2(te,pr,De,Mr)&&y2(jt,pr,De,Mr),qut(pr),NP(Ot.leftAndTop,pr,De,Mr),pr.x+=pr.w,pr.y+=pr.h,NP(Ot.rightAndBottom,pr,De,Mr),d.chartArea={left:pr.left,top:pr.top,right:pr.left+pr.w,bottom:pr.top+pr.h,height:pr.h,width:pr.w},Xh(Ot.chartArea,Tr=>{const Vr=Tr.box;Object.assign(Vr,d.chartArea),Vr.update(pr.w,pr.h,{left:0,top:0,right:0,bottom:0})})}};class PD{acquireContext(s,E){}releaseContext(s){return!1}addEventListener(s,E,B){}removeEventListener(s,E,B){}getDevicePixelRatio(){return 1}getMaximumSize(s,E,B,K){return E=Math.max(0,E||s.width),B=B||s.height,{width:E,height:Math.max(0,K?Math.floor(E/K):B)}}isAttached(s){return!0}updateConfig(s){}}class Zut extends PD{acquireContext(s){return s&&s.getContext&&s.getContext("2d")||null}updateConfig(s){s.options.animation=!1}}const n4="$chartjs",Gut={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jP=d=>d===null||d==="";function Yut(d,s){const E=d.style,B=d.getAttribute("height"),K=d.getAttribute("width");if(d[n4]={initial:{height:B,width:K,style:{display:E.display,height:E.height,width:E.width}}},E.display=E.display||"block",E.boxSizing=E.boxSizing||"border-box",jP(K)){const pt=kP(d,"width");pt!==void 0&&(d.width=pt)}if(jP(B))if(d.style.height==="")d.height=d.width/(s||2);else{const pt=kP(d,"height");pt!==void 0&&(d.height=pt)}return d}const ID=Ylt?{passive:!0}:!1;function Kut(d,s,E){d&&d.addEventListener(s,E,ID)}function Xut(d,s,E){d&&d.canvas&&d.canvas.removeEventListener(s,E,ID)}function Jut(d,s){const E=Gut[d.type]||d.type,{x:B,y:K}=py(d,s);return{type:E,chart:s,native:d,x:B!==void 0?B:null,y:K!==void 0?K:null}}function k4(d,s){for(const E of d)if(E===s||E.contains(s))return!0}function Qut(d,s,E){const B=d.canvas,K=new MutationObserver(pt=>{let _t=!1;for(const Ot of pt)_t=_t||k4(Ot.addedNodes,B),_t=_t&&!k4(Ot.removedNodes,B);_t&&E()});return K.observe(document,{childList:!0,subtree:!0}),K}function tct(d,s,E){const B=d.canvas,K=new MutationObserver(pt=>{let _t=!1;for(const Ot of pt)_t=_t||k4(Ot.removedNodes,B),_t=_t&&!k4(Ot.addedNodes,B);_t&&E()});return K.observe(document,{childList:!0,subtree:!0}),K}const J2=new Map;let UP=0;function zD(){const d=window.devicePixelRatio;d!==UP&&(UP=d,J2.forEach((s,E)=>{E.currentDevicePixelRatio!==d&&s()}))}function ect(d,s){J2.size||window.addEventListener("resize",zD),J2.set(d,s)}function rct(d){J2.delete(d),J2.size||window.removeEventListener("resize",zD)}function nct(d,s,E){const B=d.canvas,K=B&&SM(B);if(!K)return;const pt=cD((Ot,jt)=>{const te=K.clientWidth;E(Ot,jt),te{const jt=Ot[0],te=jt.contentRect.width,he=jt.contentRect.height;te===0&&he===0||pt(te,he)});return _t.observe(K),ect(d,pt),_t}function Y8(d,s,E){E&&E.disconnect(),s==="resize"&&rct(d)}function ict(d,s,E){const B=d.canvas,K=cD(pt=>{d.ctx!==null&&E(Jut(pt,d))},d);return Kut(B,s,K),K}class act extends PD{acquireContext(s,E){const B=s&&s.getContext&&s.getContext("2d");return B&&B.canvas===s?(Yut(s,E),B):null}releaseContext(s){const E=s.canvas;if(!E[n4])return!1;const B=E[n4].initial;["height","width"].forEach(pt=>{const _t=B[pt];Bh(_t)?E.removeAttribute(pt):E.setAttribute(pt,_t)});const K=B.style||{};return Object.keys(K).forEach(pt=>{E.style[pt]=K[pt]}),E.width=E.width,delete E[n4],!0}addEventListener(s,E,B){this.removeEventListener(s,E);const K=s.$proxies||(s.$proxies={}),_t={attach:Qut,detach:tct,resize:nct}[E]||ict;K[E]=_t(s,E,B)}removeEventListener(s,E){const B=s.$proxies||(s.$proxies={}),K=B[E];if(!K)return;({attach:Y8,detach:Y8,resize:Y8}[E]||Xut)(s,E,K),B[E]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(s,E,B,K){return Glt(s,E,B,K)}isAttached(s){const E=s&&SM(s);return!!(E&&E.isConnected)}}function oct(d){return!MM()||typeof OffscreenCanvas<"u"&&d instanceof OffscreenCanvas?Zut:act}let lv=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(s){const{x:E,y:B}=this.getProps(["x","y"],s);return{x:E,y:B}}hasValue(){return G2(this.x)&&G2(this.y)}getProps(s,E){const B=this.$animations;if(!E||!B)return this;const K={};return s.forEach(pt=>{K[pt]=B[pt]&&B[pt].active()?B[pt]._to:this[pt]}),K}};function sct(d,s){const E=d.options.ticks,B=lct(d),K=Math.min(E.maxTicksLimit||B,B),pt=E.major.enabled?cct(s):[],_t=pt.length,Ot=pt[0],jt=pt[_t-1],te=[];if(_t>K)return hct(s,te,pt,_t/K),te;const he=uct(pt,s,K);if(_t>0){let De,er;const pr=_t>1?Math.round((jt-Ot)/(_t-1)):null;for(V5(s,te,he,Bh(pr)?0:Ot-pr,Ot),De=0,er=_t-1;DeK)return jt}return Math.max(K,1)}function cct(d){const s=[];let E,B;for(E=0,B=d.length;Ed==="left"?"right":d==="right"?"left":d,VP=(d,s,E)=>s==="top"||s==="left"?d[s]+E:d[s]-E,HP=(d,s)=>Math.min(s||d,d);function WP(d,s){const E=[],B=d.length/s,K=d.length;let pt=0;for(;pt_t+Ot)))return jt}function mct(d,s){Xh(d,E=>{const B=E.gc,K=B.length/2;let pt;if(K>s){for(pt=0;ptB?B:E,B=K&&E>B?E:B,{min:ag(E,ag(B,E)),max:ag(B,ag(E,B))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const s=this.chart.data;return this.options.labels||(this.isHorizontal()?s.xLabels:s.yLabels)||s.labels||[]}getLabelItems(s=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(s))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Df(this.options.beforeUpdate,[this])}update(s,E,B){const{beginAtZero:K,grace:pt,ticks:_t}=this.options,Ot=_t.sampleSize;this.beforeUpdate(),this.maxWidth=s,this.maxHeight=E,this._margins=B=Object.assign({left:0,right:0,top:0,bottom:0},B),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+B.left+B.right:this.height+B.top+B.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Mlt(this,pt,K),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const jt=Ot=pt||B<=1||!this.isHorizontal()){this.labelRotation=K;return}const he=this._getLabelSizes(),De=he.widest.width,er=he.highest.height,pr=Jp(this.chart.width-De,0,this.maxWidth);Ot=s.offset?this.maxWidth/B:pr/(B-1),De+6>Ot&&(Ot=pr/(B-(s.offset?.5:1)),jt=this.maxHeight-c2(s.grid)-E.padding-qP(s.title,this.chart.options.font),te=Math.sqrt(De*De+er*er),_t=Xst(Math.min(Math.asin(Jp((he.highest.height+6)/Ot,-1,1)),Math.asin(Jp(jt/te,-1,1))-Math.asin(Jp(er/te,-1,1)))),_t=Math.max(K,Math.min(pt,_t))),this.labelRotation=_t}afterCalculateLabelRotation(){Df(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Df(this.options.beforeFit,[this])}fit(){const s={width:0,height:0},{chart:E,options:{ticks:B,title:K,grid:pt}}=this,_t=this._isVisible(),Ot=this.isHorizontal();if(_t){const jt=qP(K,E.options.font);if(Ot?(s.width=this.maxWidth,s.height=c2(pt)+jt):(s.height=this.maxHeight,s.width=c2(pt)+jt),B.display&&this.ticks.length){const{first:te,last:he,widest:De,highest:er}=this._getLabelSizes(),pr=B.padding*2,Mr=rv(this.labelRotation),Tr=Math.cos(Mr),Vr=Math.sin(Mr);if(Ot){const mn=B.mirror?0:Vr*De.width+Tr*er.height;s.height=Math.min(this.maxHeight,s.height+mn+pr)}else{const mn=B.mirror?0:Tr*De.width+Vr*er.height;s.width=Math.min(this.maxWidth,s.width+mn+pr)}this._calculatePadding(te,he,Vr,Tr)}}this._handleMargins(),Ot?(this.width=this._length=E.width-this._margins.left-this._margins.right,this.height=s.height):(this.width=s.width,this.height=this._length=E.height-this._margins.top-this._margins.bottom)}_calculatePadding(s,E,B,K){const{ticks:{align:pt,padding:_t},position:Ot}=this.options,jt=this.labelRotation!==0,te=Ot!=="top"&&this.axis==="x";if(this.isHorizontal()){const he=this.getPixelForTick(0)-this.left,De=this.right-this.getPixelForTick(this.ticks.length-1);let er=0,pr=0;jt?te?(er=K*s.width,pr=B*E.height):(er=B*s.height,pr=K*E.width):pt==="start"?pr=E.width:pt==="end"?er=s.width:pt!=="inner"&&(er=s.width/2,pr=E.width/2),this.paddingLeft=Math.max((er-he+_t)*this.width/(this.width-he),0),this.paddingRight=Math.max((pr-De+_t)*this.width/(this.width-De),0)}else{let he=E.height/2,De=s.height/2;pt==="start"?(he=0,De=s.height):pt==="end"&&(he=E.height,De=0),this.paddingTop=he+_t,this.paddingBottom=De+_t}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Df(this.options.afterFit,[this])}isHorizontal(){const{axis:s,position:E}=this.options;return E==="top"||E==="bottom"||s==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(s){this.beforeTickToLabelConversion(),this.generateTickLabels(s);let E,B;for(E=0,B=s.length;E({width:_t[qr]||0,height:Ot[qr]||0});return{first:Un(0),last:Un(E-1),widest:Un(ni),highest:Un(Wi),widths:_t,heights:Ot}}getLabelForValue(s){return s}getPixelForValue(s,E){return NaN}getValueForPixel(s){}getPixelForTick(s){const E=this.ticks;return s<0||s>E.length-1?null:this.getPixelForValue(E[s].value)}getPixelForDecimal(s){this._reversePixels&&(s=1-s);const E=this._startPixel+s*this._length;return Qst(this._alignToPixels?hy(this.chart,E,0):E)}getDecimalForPixel(s){const E=(s-this._startPixel)/this._length;return this._reversePixels?1-E:E}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:s,max:E}=this;return s<0&&E<0?E:s>0&&E>0?s:0}getContext(s){const E=this.ticks||[];if(s>=0&&sOt*K?Ot/B:jt/K:jt*K0}_computeGridLineItems(s){const E=this.axis,B=this.chart,K=this.options,{grid:pt,position:_t,border:Ot}=K,jt=pt.offset,te=this.isHorizontal(),De=this.ticks.length+(jt?1:0),er=c2(pt),pr=[],Mr=Ot.setContext(this.getContext()),Tr=Mr.display?Mr.width:0,Vr=Tr/2,mn=function(Ni){return hy(B,Ni,Tr)};let Dt,cn,Jn,Bn,ni,Wi,Un,qr,Di,Fi,Pi,bi;if(_t==="top")Dt=mn(this.bottom),Wi=this.bottom-er,qr=Dt-Vr,Fi=mn(s.top)+Vr,bi=s.bottom;else if(_t==="bottom")Dt=mn(this.top),Fi=s.top,bi=mn(s.bottom)-Vr,Wi=Dt+Vr,qr=this.top+er;else if(_t==="left")Dt=mn(this.right),ni=this.right-er,Un=Dt-Vr,Di=mn(s.left)+Vr,Pi=s.right;else if(_t==="right")Dt=mn(this.left),Di=s.left,Pi=mn(s.right)-Vr,ni=Dt+Vr,Un=this.left+er;else if(E==="x"){if(_t==="center")Dt=mn((s.top+s.bottom)/2+.5);else if(Sc(_t)){const Ni=Object.keys(_t)[0],si=_t[Ni];Dt=mn(this.chart.scales[Ni].getPixelForValue(si))}Fi=s.top,bi=s.bottom,Wi=Dt+Vr,qr=Wi+er}else if(E==="y"){if(_t==="center")Dt=mn((s.left+s.right)/2);else if(Sc(_t)){const Ni=Object.keys(_t)[0],si=_t[Ni];Dt=mn(this.chart.scales[Ni].getPixelForValue(si))}ni=Dt-Vr,Un=ni-er,Di=s.left,Pi=s.right}const Yi=cc(K.ticks.maxTicksLimit,De),Ca=Math.max(1,Math.ceil(De/Yi));for(cn=0;cn0&&(Ia-=ko/2);break}mo={left:Ia,top:ro,width:ko+Ts.width,height:xl+Ts.height,color:Ca.backdropColor}}Vr.push({label:Jn,font:qr,textOffset:Pi,options:{rotation:Tr,color:si,strokeColor:Ma,strokeWidth:zo,textAlign:ho,textBaseline:bi,translation:[Bn,ni],backdrop:mo}})}return Vr}_getXAxisLabelAlignment(){const{position:s,ticks:E}=this.options;if(-rv(this.labelRotation))return s==="top"?"left":"right";let K="center";return E.align==="start"?K="left":E.align==="end"?K="right":E.align==="inner"&&(K="inner"),K}_getYAxisLabelAlignment(s){const{position:E,ticks:{crossAlign:B,mirror:K,padding:pt}}=this.options,_t=this._getLabelSizes(),Ot=s+pt,jt=_t.widest.width;let te,he;return E==="left"?K?(he=this.right+pt,B==="near"?te="left":B==="center"?(te="center",he+=jt/2):(te="right",he+=jt)):(he=this.right-Ot,B==="near"?te="right":B==="center"?(te="center",he-=jt/2):(te="left",he=this.left)):E==="right"?K?(he=this.left+pt,B==="near"?te="right":B==="center"?(te="center",he-=jt/2):(te="left",he-=jt)):(he=this.left+Ot,B==="near"?te="left":B==="center"?(te="center",he+=jt/2):(te="right",he=this.right)):te="right",{textAlign:te,x:he}}_computeLabelArea(){if(this.options.ticks.mirror)return;const s=this.chart,E=this.options.position;if(E==="left"||E==="right")return{top:0,left:this.left,bottom:s.height,right:this.right};if(E==="top"||E==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:s.width}}drawBackground(){const{ctx:s,options:{backgroundColor:E},left:B,top:K,width:pt,height:_t}=this;E&&(s.save(),s.fillStyle=E,s.fillRect(B,K,pt,_t),s.restore())}getLineWidthForValue(s){const E=this.options.grid;if(!this._isVisible()||!E.display)return 0;const K=this.ticks.findIndex(pt=>pt.value===s);return K>=0?E.setContext(this.getContext(K)).lineWidth:0}drawGrid(s){const E=this.options.grid,B=this.ctx,K=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(s));let pt,_t;const Ot=(jt,te,he)=>{!he.width||!he.color||(B.save(),B.lineWidth=he.width,B.strokeStyle=he.color,B.setLineDash(he.borderDash||[]),B.lineDashOffset=he.borderDashOffset,B.beginPath(),B.moveTo(jt.x,jt.y),B.lineTo(te.x,te.y),B.stroke(),B.restore())};if(E.display)for(pt=0,_t=K.length;pt<_t;++pt){const jt=K[pt];E.drawOnChartArea&&Ot({x:jt.x1,y:jt.y1},{x:jt.x2,y:jt.y2},jt),E.drawTicks&&Ot({x:jt.tx1,y:jt.ty1},{x:jt.tx2,y:jt.ty2},{color:jt.tickColor,width:jt.tickWidth,borderDash:jt.tickBorderDash,borderDashOffset:jt.tickBorderDashOffset})}}drawBorder(){const{chart:s,ctx:E,options:{border:B,grid:K}}=this,pt=B.setContext(this.getContext()),_t=B.display?pt.width:0;if(!_t)return;const Ot=K.setContext(this.getContext(0)).lineWidth,jt=this._borderValue;let te,he,De,er;this.isHorizontal()?(te=hy(s,this.left,_t)-_t/2,he=hy(s,this.right,Ot)+Ot/2,De=er=jt):(De=hy(s,this.top,_t)-_t/2,er=hy(s,this.bottom,Ot)+Ot/2,te=he=jt),E.save(),E.lineWidth=pt.width,E.strokeStyle=pt.color,E.beginPath(),E.moveTo(te,De),E.lineTo(he,er),E.stroke(),E.restore()}drawLabels(s){if(!this.options.ticks.display)return;const B=this.ctx,K=this._computeLabelArea();K&&G4(B,K);const pt=this.getLabelItems(s);for(const _t of pt){const Ot=_t.options,jt=_t.font,te=_t.label,he=_t.textOffset;X2(B,te,0,he,jt,Ot)}K&&Y4(B)}drawTitle(){const{ctx:s,options:{position:E,title:B,reverse:K}}=this;if(!B.display)return;const pt=Qp(B.font),_t=fm(B.padding),Ot=B.align;let jt=pt.lineHeight/2;E==="bottom"||E==="center"||Sc(E)?(jt+=_t.bottom,Yd(B.text)&&(jt+=pt.lineHeight*(B.text.length-1))):jt+=_t.top;const{titleX:te,titleY:he,maxWidth:De,rotation:er}=xct(this,jt,E,Ot);X2(s,B.text,0,0,pt,{color:B.color,maxWidth:De,rotation:er,textAlign:yct(Ot,E,K),textBaseline:"middle",translation:[te,he]})}draw(s){this._isVisible()&&(this.drawBackground(),this.drawGrid(s),this.drawBorder(),this.drawTitle(),this.drawLabels(s))}_layers(){const s=this.options,E=s.ticks&&s.ticks.z||0,B=cc(s.grid&&s.grid.z,-1),K=cc(s.border&&s.border.z,0);return!this._isVisible()||this.draw!==T_.prototype.draw?[{z:E,draw:pt=>{this.draw(pt)}}]:[{z:B,draw:pt=>{this.drawBackground(),this.drawGrid(pt),this.drawTitle()}},{z:K,draw:()=>{this.drawBorder()}},{z:E,draw:pt=>{this.drawLabels(pt)}}]}getMatchingVisibleMetas(s){const E=this.chart.getSortedVisibleDatasetMetas(),B=this.axis+"AxisID",K=[];let pt,_t;for(pt=0,_t=E.length;pt<_t;++pt){const Ot=E[pt];Ot[B]===this.id&&(!s||Ot.type===s)&&K.push(Ot)}return K}_resolveTickFontOptions(s){const E=this.options.ticks.setContext(this.getContext(s));return Qp(E.font)}_maxDigits(){const s=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/s}}class H5{constructor(s,E,B){this.type=s,this.scope=E,this.override=B,this.items=Object.create(null)}isForType(s){return Object.prototype.isPrototypeOf.call(this.type.prototype,s.prototype)}register(s){const E=Object.getPrototypeOf(s);let B;wct(E)&&(B=this.register(E));const K=this.items,pt=s.id,_t=this.scope+"."+pt;if(!pt)throw new Error("class does not have id: "+s);return pt in K||(K[pt]=s,_ct(s,_t,B),this.override&&Rd.override(s.id,s.overrides)),_t}get(s){return this.items[s]}unregister(s){const E=this.items,B=s.id,K=this.scope;B in E&&delete E[B],K&&B in Rd[K]&&(delete Rd[K][B],this.override&&delete Ly[B])}}function _ct(d,s,E){const B=$2(Object.create(null),[E?Rd.get(E):{},Rd.get(s),d.defaults]);Rd.set(s,B),d.defaultRoutes&&bct(s,d.defaultRoutes),d.descriptors&&Rd.describe(s,d.descriptors)}function bct(d,s){Object.keys(s).forEach(E=>{const B=E.split("."),K=B.pop(),pt=[d].concat(B).join("."),_t=s[E].split("."),Ot=_t.pop(),jt=_t.join(".");Rd.route(pt,K,jt,Ot)})}function wct(d){return"id"in d&&"defaults"in d}class kct{constructor(){this.controllers=new H5(X4,"datasets",!0),this.elements=new H5(lv,"elements"),this.plugins=new H5(Object,"plugins"),this.scales=new H5(T_,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...s){this._each("register",s)}remove(...s){this._each("unregister",s)}addControllers(...s){this._each("register",s,this.controllers)}addElements(...s){this._each("register",s,this.elements)}addPlugins(...s){this._each("register",s,this.plugins)}addScales(...s){this._each("register",s,this.scales)}getController(s){return this._get(s,this.controllers,"controller")}getElement(s){return this._get(s,this.elements,"element")}getPlugin(s){return this._get(s,this.plugins,"plugin")}getScale(s){return this._get(s,this.scales,"scale")}removeControllers(...s){this._each("unregister",s,this.controllers)}removeElements(...s){this._each("unregister",s,this.elements)}removePlugins(...s){this._each("unregister",s,this.plugins)}removeScales(...s){this._each("unregister",s,this.scales)}_each(s,E,B){[...E].forEach(K=>{const pt=B||this._getRegistryForType(K);B||pt.isForType(K)||pt===this.plugins&&K.id?this._exec(s,pt,K):Xh(K,_t=>{const Ot=B||this._getRegistryForType(_t);this._exec(s,Ot,_t)})})}_exec(s,E,B){const K=vM(s);Df(B["before"+K],[],B),E[s](B),Df(B["after"+K],[],B)}_getRegistryForType(s){for(let E=0;Ept.filter(Ot=>!_t.some(jt=>Ot.plugin.id===jt.plugin.id));this._notify(K(E,B),s,"stop"),this._notify(K(B,E),s,"start")}}function Act(d){const s={},E=[],B=Object.keys(ug.plugins.items);for(let pt=0;pt1&&$P(d[0].toLowerCase());if(B)return B}throw new Error(`Cannot determine type of '${d}' axis. Please provide 'axis' or 'position' option.`)}function ZP(d,s,E){if(E[s+"AxisID"]===d)return{axis:s}}function Ict(d,s){if(s.data&&s.data.datasets){const E=s.data.datasets.filter(B=>B.xAxisID===d||B.yAxisID===d);if(E.length)return ZP(d,"x",E[0])||ZP(d,"y",E[0])}return{}}function zct(d,s){const E=Ly[d.type]||{scales:{}},B=s.scales||{},K=LA(d.type,s),pt=Object.create(null);return Object.keys(B).forEach(_t=>{const Ot=B[_t];if(!Sc(Ot))return console.error(`Invalid scale configuration for scale: ${_t}`);if(Ot._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${_t}`);const jt=PA(_t,Ot,Ict(_t,d),Rd.scales[Ot.type]),te=Lct(jt,K),he=E.scales||{};pt[_t]=L2(Object.create(null),[{axis:jt},Ot,he[jt],he[te]])}),d.data.datasets.forEach(_t=>{const Ot=_t.type||d.type,jt=_t.indexAxis||LA(Ot,s),he=(Ly[Ot]||{}).scales||{};Object.keys(he).forEach(De=>{const er=Cct(De,jt),pr=_t[er+"AxisID"]||er;pt[pr]=pt[pr]||Object.create(null),L2(pt[pr],[{axis:er},B[pr],he[De]])})}),Object.keys(pt).forEach(_t=>{const Ot=pt[_t];L2(Ot,[Rd.scales[Ot.type],Rd.scale])}),pt}function OD(d){const s=d.options||(d.options={});s.plugins=cc(s.plugins,{}),s.scales=zct(d,s)}function DD(d){return d=d||{},d.datasets=d.datasets||[],d.labels=d.labels||[],d}function Oct(d){return d=d||{},d.data=DD(d.data),OD(d),d}const GP=new Map,FD=new Set;function W5(d,s){let E=GP.get(d);return E||(E=s(),GP.set(d,E),FD.add(E)),E}const h2=(d,s,E)=>{const B=Cy(s,E);B!==void 0&&d.add(B)};class Dct{constructor(s){this._config=Oct(s),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(s){this._config.type=s}get data(){return this._config.data}set data(s){this._config.data=DD(s)}get options(){return this._config.options}set options(s){this._config.options=s}get plugins(){return this._config.plugins}update(){const s=this._config;this.clearCache(),OD(s)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(s){return W5(s,()=>[[`datasets.${s}`,""]])}datasetAnimationScopeKeys(s,E){return W5(`${s}.transition.${E}`,()=>[[`datasets.${s}.transitions.${E}`,`transitions.${E}`],[`datasets.${s}`,""]])}datasetElementScopeKeys(s,E){return W5(`${s}-${E}`,()=>[[`datasets.${s}.elements.${E}`,`datasets.${s}`,`elements.${E}`,""]])}pluginScopeKeys(s){const E=s.id,B=this.type;return W5(`${B}-plugin-${E}`,()=>[[`plugins.${E}`,...s.additionalOptionScopes||[]]])}_cachedScopes(s,E){const B=this._scopeCache;let K=B.get(s);return(!K||E)&&(K=new Map,B.set(s,K)),K}getOptionScopes(s,E,B){const{options:K,type:pt}=this,_t=this._cachedScopes(s,B),Ot=_t.get(E);if(Ot)return Ot;const jt=new Set;E.forEach(he=>{s&&(jt.add(s),he.forEach(De=>h2(jt,s,De))),he.forEach(De=>h2(jt,K,De)),he.forEach(De=>h2(jt,Ly[pt]||{},De)),he.forEach(De=>h2(jt,Rd,De)),he.forEach(De=>h2(jt,EA,De))});const te=Array.from(jt);return te.length===0&&te.push(Object.create(null)),FD.has(E)&&_t.set(E,te),te}chartOptionScopes(){const{options:s,type:E}=this;return[s,Ly[E]||{},Rd.datasets[E]||{},{type:E},Rd,EA]}resolveNamedOptions(s,E,B,K=[""]){const pt={$shared:!0},{resolver:_t,subPrefixes:Ot}=YP(this._resolverCache,s,K);let jt=_t;if(Rct(_t,E)){pt.$shared=!1,B=x1(B)?B():B;const te=this.createResolver(s,B,Ot);jt=x_(_t,B,te)}for(const te of E)pt[te]=jt[te];return pt}createResolver(s,E,B=[""],K){const{resolver:pt}=YP(this._resolverCache,s,B);return Sc(E)?x_(pt,E,void 0,K):pt}}function YP(d,s,E){let B=d.get(s);B||(B=new Map,d.set(s,B));const K=E.join();let pt=B.get(K);return pt||(pt={resolver:kM(s,E),subPrefixes:E.filter(Ot=>!Ot.toLowerCase().includes("hover"))},B.set(K,pt)),pt}const Fct=d=>Sc(d)&&Object.getOwnPropertyNames(d).some(s=>x1(d[s]));function Rct(d,s){const{isScriptable:E,isIndexable:B}=pD(d);for(const K of s){const pt=E(K),_t=B(K),Ot=(_t||pt)&&d[K];if(pt&&(x1(Ot)||Fct(Ot))||_t&&Yd(Ot))return!0}return!1}var Bct="4.5.1";const Nct=["top","bottom","left","right","chartArea"];function KP(d,s){return d==="top"||d==="bottom"||Nct.indexOf(d)===-1&&s==="x"}function XP(d,s){return function(E,B){return E[d]===B[d]?E[s]-B[s]:E[d]-B[d]}}function JP(d){const s=d.chart,E=s.options.animation;s.notifyPlugins("afterRender"),Df(E&&E.onComplete,[d],s)}function jct(d){const s=d.chart,E=s.options.animation;Df(E&&E.onProgress,[d],s)}function RD(d){return MM()&&typeof d=="string"?d=document.getElementById(d):d&&d.length&&(d=d[0]),d&&d.canvas&&(d=d.canvas),d}const i4={},QP=d=>{const s=RD(d);return Object.values(i4).filter(E=>E.canvas===s).pop()};function Uct(d,s,E){const B=Object.keys(d);for(const K of B){const pt=+K;if(pt>=s){const _t=d[K];delete d[K],(E>0||pt>s)&&(d[pt+E]=_t)}}}function Vct(d,s,E,B){return!E||d.type==="mouseout"?null:B?s:d}class x2{static defaults=Rd;static instances=i4;static overrides=Ly;static registry=ug;static version=Bct;static getChart=QP;static register(...s){ug.add(...s),tI()}static unregister(...s){ug.remove(...s),tI()}constructor(s,E){const B=this.config=new Dct(E),K=RD(s),pt=QP(K);if(pt)throw new Error("Canvas is already in use. Chart with ID '"+pt.id+"' must be destroyed before the canvas with ID '"+pt.canvas.id+"' can be reused.");const _t=B.createResolver(B.chartOptionScopes(),this.getContext());this.platform=new(B.platform||oct(K)),this.platform.updateConfig(B);const Ot=this.platform.acquireContext(K,_t.aspectRatio),jt=Ot&&Ot.canvas,te=jt&&jt.height,he=jt&&jt.width;if(this.id=Bst(),this.ctx=Ot,this.canvas=jt,this.width=he,this.height=te,this._options=_t,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Tct,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=nlt(De=>this.update(De),_t.resizeDelay||0),this._dataChanges=[],i4[this.id]=this,!Ot||!jt){console.error("Failed to create chart: can't acquire context from the given item");return}Kg.listen(this,"complete",JP),Kg.listen(this,"progress",jct),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:s,maintainAspectRatio:E},width:B,height:K,_aspectRatio:pt}=this;return Bh(s)?E&&pt?pt:K?B/K:null:s}get data(){return this.config.data}set data(s){this.config.data=s}get options(){return this._options}set options(s){this.config.options=s}get registry(){return ug}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():wP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return xP(this.canvas,this.ctx),this}stop(){return Kg.stop(this),this}resize(s,E){Kg.running(this)?this._resizeBeforeDraw={width:s,height:E}:this._resize(s,E)}_resize(s,E){const B=this.options,K=this.canvas,pt=B.maintainAspectRatio&&this.aspectRatio,_t=this.platform.getMaximumSize(K,s,E,pt),Ot=B.devicePixelRatio||this.platform.getDevicePixelRatio(),jt=this.width?"resize":"attach";this.width=_t.width,this.height=_t.height,this._aspectRatio=this.aspectRatio,wP(this,Ot,!0)&&(this.notifyPlugins("resize",{size:_t}),Df(B.onResize,[this,_t],this),this.attached&&this._doResize(jt)&&this.render())}ensureScalesHaveIDs(){const E=this.options.scales||{};Xh(E,(B,K)=>{B.id=K})}buildOrUpdateScales(){const s=this.options,E=s.scales,B=this.scales,K=Object.keys(B).reduce((_t,Ot)=>(_t[Ot]=!1,_t),{});let pt=[];E&&(pt=pt.concat(Object.keys(E).map(_t=>{const Ot=E[_t],jt=PA(_t,Ot),te=jt==="r",he=jt==="x";return{options:Ot,dposition:te?"chartArea":he?"bottom":"left",dtype:te?"radialLinear":he?"category":"linear"}}))),Xh(pt,_t=>{const Ot=_t.options,jt=Ot.id,te=PA(jt,Ot),he=cc(Ot.type,_t.dtype);(Ot.position===void 0||KP(Ot.position,te)!==KP(_t.dposition))&&(Ot.position=_t.dposition),K[jt]=!0;let De=null;if(jt in B&&B[jt].type===he)De=B[jt];else{const er=ug.getScale(he);De=new er({id:jt,type:he,ctx:this.ctx,chart:this}),B[De.id]=De}De.init(Ot,s)}),Xh(K,(_t,Ot)=>{_t||delete B[Ot]}),Xh(B,_t=>{sm.configure(this,_t,_t.options),sm.addBox(this,_t)})}_updateMetasets(){const s=this._metasets,E=this.data.datasets.length,B=s.length;if(s.sort((K,pt)=>K.index-pt.index),B>E){for(let K=E;KE.length&&delete this._stacks,s.forEach((B,K)=>{E.filter(pt=>pt===B._dataset).length===0&&this._destroyDatasetMeta(K)})}buildOrUpdateControllers(){const s=[],E=this.data.datasets;let B,K;for(this._removeUnreferencedMetasets(),B=0,K=E.length;B{this.getDatasetMeta(E).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(s){const E=this.config;E.update();const B=this._options=E.createResolver(E.chartOptionScopes(),this.getContext()),K=this._animationsDisabled=!B.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:s,cancelable:!0})===!1)return;const pt=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let _t=0;for(let te=0,he=this.data.datasets.length;te{te.reset()}),this._updateDatasets(s),this.notifyPlugins("afterUpdate",{mode:s}),this._layers.sort(XP("z","_idx"));const{_active:Ot,_lastEvent:jt}=this;jt?this._eventHandler(jt,!0):Ot.length&&this._updateHoverStyles(Ot,Ot,!0),this.render()}_updateScales(){Xh(this.scales,s=>{sm.removeBox(this,s)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const s=this.options,E=new Set(Object.keys(this._listeners)),B=new Set(s.events);(!uP(E,B)||!!this._responsiveListeners!==s.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:s}=this,E=this._getUniformDataChanges()||[];for(const{method:B,start:K,count:pt}of E){const _t=B==="_removeElements"?-pt:pt;Uct(s,K,_t)}}_getUniformDataChanges(){const s=this._dataChanges;if(!s||!s.length)return;this._dataChanges=[];const E=this.data.datasets.length,B=pt=>new Set(s.filter(_t=>_t[0]===pt).map((_t,Ot)=>Ot+","+_t.splice(1).join(","))),K=B(0);for(let pt=1;ptpt.split(",")).map(pt=>({method:pt[1],start:+pt[2],count:+pt[3]}))}_updateLayout(s){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;sm.update(this,this.width,this.height,s);const E=this.chartArea,B=E.width<=0||E.height<=0;this._layers=[],Xh(this.boxes,K=>{B&&K.position==="chartArea"||(K.configure&&K.configure(),this._layers.push(...K._layers()))},this),this._layers.forEach((K,pt)=>{K._idx=pt}),this.notifyPlugins("afterLayout")}_updateDatasets(s){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:s,cancelable:!0})!==!1){for(let E=0,B=this.data.datasets.length;E=0;--E)this._drawDataset(s[E]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(s){const E=this.ctx,B={meta:s,index:s.index,cancelable:!0},K=TD(this,s);this.notifyPlugins("beforeDatasetDraw",B)!==!1&&(K&&G4(E,K),s.controller.draw(),K&&Y4(E),B.cancelable=!1,this.notifyPlugins("afterDatasetDraw",B))}isPointInArea(s){return K2(s,this.chartArea,this._minPadding)}getElementsAtEventForMode(s,E,B,K){const pt=Nut.modes[E];return typeof pt=="function"?pt(this,s,B,K):[]}getDatasetMeta(s){const E=this.data.datasets[s],B=this._metasets;let K=B.filter(pt=>pt&&pt._dataset===E).pop();return K||(K={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:E&&E.order||0,index:s,_dataset:E,_parsed:[],_sorted:!1},B.push(K)),K}getContext(){return this.$context||(this.$context=zy(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(s){const E=this.data.datasets[s];if(!E)return!1;const B=this.getDatasetMeta(s);return typeof B.hidden=="boolean"?!B.hidden:!E.hidden}setDatasetVisibility(s,E){const B=this.getDatasetMeta(s);B.hidden=!E}toggleDataVisibility(s){this._hiddenIndices[s]=!this._hiddenIndices[s]}getDataVisibility(s){return!this._hiddenIndices[s]}_updateVisibility(s,E,B){const K=B?"show":"hide",pt=this.getDatasetMeta(s),_t=pt.controller._resolveAnimations(void 0,K);Z2(E)?(pt.data[E].hidden=!B,this.update()):(this.setDatasetVisibility(s,B),_t.update(pt,{visible:B}),this.update(Ot=>Ot.datasetIndex===s?K:void 0))}hide(s,E){this._updateVisibility(s,E,!1)}show(s,E){this._updateVisibility(s,E,!0)}_destroyDatasetMeta(s){const E=this._metasets[s];E&&E.controller&&E.controller._destroy(),delete this._metasets[s]}_stop(){let s,E;for(this.stop(),Kg.remove(this),s=0,E=this.data.datasets.length;s{E.addEventListener(this,pt,_t),s[pt]=_t},K=(pt,_t,Ot)=>{pt.offsetX=_t,pt.offsetY=Ot,this._eventHandler(pt)};Xh(this.options.events,pt=>B(pt,K))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const s=this._responsiveListeners,E=this.platform,B=(jt,te)=>{E.addEventListener(this,jt,te),s[jt]=te},K=(jt,te)=>{s[jt]&&(E.removeEventListener(this,jt,te),delete s[jt])},pt=(jt,te)=>{this.canvas&&this.resize(jt,te)};let _t;const Ot=()=>{K("attach",Ot),this.attached=!0,this.resize(),B("resize",pt),B("detach",_t)};_t=()=>{this.attached=!1,K("resize",pt),this._stop(),this._resize(0,0),B("attach",Ot)},E.isAttached(this.canvas)?Ot():_t()}unbindEvents(){Xh(this._listeners,(s,E)=>{this.platform.removeEventListener(this,E,s)}),this._listeners={},Xh(this._responsiveListeners,(s,E)=>{this.platform.removeEventListener(this,E,s)}),this._responsiveListeners=void 0}updateHoverStyle(s,E,B){const K=B?"set":"remove";let pt,_t,Ot,jt;for(E==="dataset"&&(pt=this.getDatasetMeta(s[0].datasetIndex),pt.controller["_"+K+"DatasetHoverStyle"]()),Ot=0,jt=s.length;Ot{const Ot=this.getDatasetMeta(pt);if(!Ot)throw new Error("No dataset found at index "+pt);return{datasetIndex:pt,element:Ot.data[_t],index:_t}});!y4(B,E)&&(this._active=B,this._lastEvent=null,this._updateHoverStyles(B,E))}notifyPlugins(s,E,B){return this._plugins.notify(this,s,E,B)}isPluginEnabled(s){return this._plugins._cache.filter(E=>E.plugin.id===s).length===1}_updateHoverStyles(s,E,B){const K=this.options.hover,pt=(jt,te)=>jt.filter(he=>!te.some(De=>he.datasetIndex===De.datasetIndex&&he.index===De.index)),_t=pt(E,s),Ot=B?s:pt(s,E);_t.length&&this.updateHoverStyle(_t,K.mode,!1),Ot.length&&K.mode&&this.updateHoverStyle(Ot,K.mode,!0)}_eventHandler(s,E){const B={event:s,replay:E,cancelable:!0,inChartArea:this.isPointInArea(s)},K=_t=>(_t.options.events||this.options.events).includes(s.native.type);if(this.notifyPlugins("beforeEvent",B,K)===!1)return;const pt=this._handleEvent(s,E,B.inChartArea);return B.cancelable=!1,this.notifyPlugins("afterEvent",B,K),(pt||B.changed)&&this.render(),this}_handleEvent(s,E,B){const{_active:K=[],options:pt}=this,_t=E,Ot=this._getActiveElements(s,K,B,_t),jt=Wst(s),te=Vct(s,this._lastEvent,B,jt);B&&(this._lastEvent=null,Df(pt.onHover,[s,Ot,this],this),jt&&Df(pt.onClick,[s,Ot,this],this));const he=!y4(Ot,K);return(he||E)&&(this._active=Ot,this._updateHoverStyles(Ot,K,E)),this._lastEvent=te,he}_getActiveElements(s,E,B,K){if(s.type==="mouseout")return[];if(!B)return E;const pt=this.options.hover;return this.getElementsAtEventForMode(s,pt.mode,pt,K)}}function tI(){return Xh(x2.instances,d=>d._plugins.invalidate())}function Hct(d,s,E){const{startAngle:B,x:K,y:pt,outerRadius:_t,innerRadius:Ot,options:jt}=s,{borderWidth:te,borderJoinStyle:he}=jt,De=Math.min(te/_t,q0(B-E));if(d.beginPath(),d.arc(K,pt,_t-te/2,B+De/2,E-De/2),Ot>0){const er=Math.min(te/Ot,q0(B-E));d.arc(K,pt,Ot+te/2,E-er/2,B+er/2,!0)}else{const er=Math.min(te/2,_t*q0(B-E));if(he==="round")d.arc(K,pt,er,E-Qh/2,B+Qh/2,!0);else if(he==="bevel"){const pr=2*er*er,Mr=-pr*Math.cos(E+Qh/2)+K,Tr=-pr*Math.sin(E+Qh/2)+pt,Vr=pr*Math.cos(B+Qh/2)+K,mn=pr*Math.sin(B+Qh/2)+pt;d.lineTo(Mr,Tr),d.lineTo(Vr,mn)}}d.closePath(),d.moveTo(0,0),d.rect(0,0,d.canvas.width,d.canvas.height),d.clip("evenodd")}function Wct(d,s,E){const{startAngle:B,pixelMargin:K,x:pt,y:_t,outerRadius:Ot,innerRadius:jt}=s;let te=K/Ot;d.beginPath(),d.arc(pt,_t,Ot,B-te,E+te),jt>K?(te=K/jt,d.arc(pt,_t,jt,E+te,B-te,!0)):d.arc(pt,_t,K,E+ip,B-ip),d.closePath(),d.clip()}function qct(d){return wM(d,["outerStart","outerEnd","innerStart","innerEnd"])}function $ct(d,s,E,B){const K=qct(d.options.borderRadius),pt=(E-s)/2,_t=Math.min(pt,B*s/2),Ot=jt=>{const te=(E-Math.min(pt,jt))*B/2;return Jp(jt,0,Math.min(pt,te))};return{outerStart:Ot(K.outerStart),outerEnd:Ot(K.outerEnd),innerStart:Jp(K.innerStart,0,_t),innerEnd:Jp(K.innerEnd,0,_t)}}function r_(d,s,E,B){return{x:E+d*Math.cos(s),y:B+d*Math.sin(s)}}function T4(d,s,E,B,K,pt){const{x:_t,y:Ot,startAngle:jt,pixelMargin:te,innerRadius:he}=s,De=Math.max(s.outerRadius+B+E-te,0),er=he>0?he+B+E+te:0;let pr=0;const Mr=K-jt;if(B){const Ca=he>0?he-B:0,Ni=De>0?De-B:0,si=(Ca+Ni)/2,Ma=si!==0?Mr*si/(si+B):Mr;pr=(Mr-Ma)/2}const Tr=Math.max(.001,Mr*De-E/Qh)/De,Vr=(Mr-Tr)/2,mn=jt+Vr+pr,Dt=K-Vr-pr,{outerStart:cn,outerEnd:Jn,innerStart:Bn,innerEnd:ni}=$ct(s,er,De,Dt-mn),Wi=De-cn,Un=De-Jn,qr=mn+cn/Wi,Di=Dt-Jn/Un,Fi=er+Bn,Pi=er+ni,bi=mn+Bn/Fi,Yi=Dt-ni/Pi;if(d.beginPath(),pt){const Ca=(qr+Di)/2;if(d.arc(_t,Ot,De,qr,Ca),d.arc(_t,Ot,De,Ca,Di),Jn>0){const zo=r_(Un,Di,_t,Ot);d.arc(zo.x,zo.y,Jn,Di,Dt+ip)}const Ni=r_(Pi,Dt,_t,Ot);if(d.lineTo(Ni.x,Ni.y),ni>0){const zo=r_(Pi,Yi,_t,Ot);d.arc(zo.x,zo.y,ni,Dt+ip,Yi+Math.PI)}const si=(Dt-ni/er+(mn+Bn/er))/2;if(d.arc(_t,Ot,er,Dt-ni/er,si,!0),d.arc(_t,Ot,er,si,mn+Bn/er,!0),Bn>0){const zo=r_(Fi,bi,_t,Ot);d.arc(zo.x,zo.y,Bn,bi+Math.PI,mn-ip)}const Ma=r_(Wi,mn,_t,Ot);if(d.lineTo(Ma.x,Ma.y),cn>0){const zo=r_(Wi,qr,_t,Ot);d.arc(zo.x,zo.y,cn,mn-ip,qr)}}else{d.moveTo(_t,Ot);const Ca=Math.cos(qr)*De+_t,Ni=Math.sin(qr)*De+Ot;d.lineTo(Ca,Ni);const si=Math.cos(Di)*De+_t,Ma=Math.sin(Di)*De+Ot;d.lineTo(si,Ma)}d.closePath()}function Zct(d,s,E,B,K){const{fullCircles:pt,startAngle:_t,circumference:Ot}=s;let jt=s.endAngle;if(pt){T4(d,s,E,B,jt,K);for(let te=0;te=Qh&&pr===0&&he!=="miter"&&Hct(d,s,Tr),pt||(T4(d,s,E,B,Tr,K),d.stroke())}class Yct extends lv{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:s=>s!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(s){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,s&&Object.assign(this,s)}inRange(s,E,B){const K=this.getProps(["x","y"],B),{angle:pt,distance:_t}=oD(K,{x:s,y:E}),{startAngle:Ot,endAngle:jt,innerRadius:te,outerRadius:he,circumference:De}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],B),er=(this.options.spacing+this.options.borderWidth)/2,pr=cc(De,jt-Ot),Mr=Y2(pt,Ot,jt)&&Ot!==jt,Tr=pr>=od||Mr,Vr=nv(_t,te+er,he+er);return Tr&&Vr}getCenterPoint(s){const{x:E,y:B,startAngle:K,endAngle:pt,innerRadius:_t,outerRadius:Ot}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],s),{offset:jt,spacing:te}=this.options,he=(K+pt)/2,De=(_t+Ot+te+jt)/2;return{x:E+Math.cos(he)*De,y:B+Math.sin(he)*De}}tooltipPosition(s){return this.getCenterPoint(s)}draw(s){const{options:E,circumference:B}=this,K=(E.offset||0)/4,pt=(E.spacing||0)/2,_t=E.circular;if(this.pixelMargin=E.borderAlign==="inner"?.33:0,this.fullCircles=B>od?Math.floor(B/od):0,B===0||this.innerRadius<0||this.outerRadius<0)return;s.save();const Ot=(this.startAngle+this.endAngle)/2;s.translate(Math.cos(Ot)*K,Math.sin(Ot)*K);const jt=1-Math.sin(Math.min(Qh,B||0)),te=K*jt;s.fillStyle=E.backgroundColor,s.strokeStyle=E.borderColor,Zct(s,this,te,pt,_t),Gct(s,this,te,pt,_t),s.restore()}}function BD(d,s,E=s){d.lineCap=cc(E.borderCapStyle,s.borderCapStyle),d.setLineDash(cc(E.borderDash,s.borderDash)),d.lineDashOffset=cc(E.borderDashOffset,s.borderDashOffset),d.lineJoin=cc(E.borderJoinStyle,s.borderJoinStyle),d.lineWidth=cc(E.borderWidth,s.borderWidth),d.strokeStyle=cc(E.borderColor,s.borderColor)}function Kct(d,s,E){d.lineTo(E.x,E.y)}function Xct(d){return d.stepped?vlt:d.tension||d.cubicInterpolationMode==="monotone"?ylt:Kct}function ND(d,s,E={}){const B=d.length,{start:K=0,end:pt=B-1}=E,{start:_t,end:Ot}=s,jt=Math.max(K,_t),te=Math.min(pt,Ot),he=K<_t&&pt<_t||K>Ot&&pt>Ot;return{count:B,start:jt,loop:s.loop,ilen:te(_t+(te?Ot-Jn:Jn))%pt,cn=()=>{Tr!==Vr&&(d.lineTo(he,Vr),d.lineTo(he,Tr),d.lineTo(he,mn))};for(jt&&(pr=K[Dt(0)],d.moveTo(pr.x,pr.y)),er=0;er<=Ot;++er){if(pr=K[Dt(er)],pr.skip)continue;const Jn=pr.x,Bn=pr.y,ni=Jn|0;ni===Mr?(BnVr&&(Vr=Bn),he=(De*he+Jn)/++De):(cn(),d.lineTo(Jn,Bn),Mr=ni,De=0,Tr=Vr=Bn),mn=Bn}cn()}function IA(d){const s=d.options,E=s.borderDash&&s.borderDash.length;return!d._decimated&&!d._loop&&!s.tension&&s.cubicInterpolationMode!=="monotone"&&!s.stepped&&!E?Qct:Jct}function tht(d){return d.stepped?Klt:d.tension||d.cubicInterpolationMode==="monotone"?Xlt:my}function eht(d,s,E,B){let K=s._path;K||(K=s._path=new Path2D,s.path(K,E,B)&&K.closePath()),BD(d,s.options),d.stroke(K)}function rht(d,s,E,B){const{segments:K,options:pt}=s,_t=IA(s);for(const Ot of K)BD(d,pt,Ot.style),d.beginPath(),_t(d,s,Ot,{start:E,end:E+B-1})&&d.closePath(),d.stroke()}const nht=typeof Path2D=="function";function iht(d,s,E,B){nht&&!s.options.segment?eht(d,s,E,B):rht(d,s,E,B)}class Q4 extends lv{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:s=>s!=="borderDash"&&s!=="fill"};constructor(s){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,s&&Object.assign(this,s)}updateControlPoints(s,E){const B=this.options;if((B.tension||B.cubicInterpolationMode==="monotone")&&!B.stepped&&!this._pointsUpdated){const K=B.spanGaps?this._loop:this._fullLoop;Vlt(this._points,B,s,K,E),this._pointsUpdated=!0}}set points(s){this._points=s,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=nut(this,this.options.segment))}first(){const s=this.segments,E=this.points;return s.length&&E[s[0].start]}last(){const s=this.segments,E=this.points,B=s.length;return B&&E[s[B-1].end]}interpolate(s,E){const B=this.options,K=s[E],pt=this.points,_t=kD(this,{property:E,start:K,end:K});if(!_t.length)return;const Ot=[],jt=tht(B);let te,he;for(te=0,he=_t.length;te{Ot=t6(_t,Ot,K);const jt=K[_t],te=K[Ot];B!==null?(pt.push({x:jt.x,y:B}),pt.push({x:te.x,y:B})):E!==null&&(pt.push({x:E,y:jt.y}),pt.push({x:E,y:te.y}))}),pt}function t6(d,s,E){for(;s>d;s--){const B=E[s];if(!isNaN(B.x)&&!isNaN(B.y))break}return s}function rI(d,s,E,B){return d&&s?B(d[E],s[E]):d?d[E]:s?s[E]:0}function UD(d,s){let E=[],B=!1;return Yd(d)?(B=!0,E=d):E=dht(d,s),E.length?new Q4({points:E,options:{tension:0},_loop:B,_fullLoop:B}):null}function nI(d){return d&&d.fill!==!1}function pht(d,s,E){let K=d[s].fill;const pt=[s];let _t;if(!E)return K;for(;K!==!1&&pt.indexOf(K)===-1;){if(!t0(K))return K;if(_t=d[K],!_t)return!1;if(_t.visible)return K;pt.push(K),K=_t.fill}return!1}function mht(d,s,E){const B=xht(d);if(Sc(B))return isNaN(B.value)?!1:B;let K=parseFloat(B);return t0(K)&&Math.floor(K)===K?ght(B[0],s,K,E):["origin","start","end","stack","shape"].indexOf(B)>=0&&B}function ght(d,s,E,B){return(d==="-"||d==="+")&&(E=s+E),E===s||E<0||E>=B?!1:E}function vht(d,s){let E=null;return d==="start"?E=s.bottom:d==="end"?E=s.top:Sc(d)?E=s.getPixelForValue(d.value):s.getBasePixel&&(E=s.getBasePixel()),E}function yht(d,s,E){let B;return d==="start"?B=E:d==="end"?B=s.options.reverse?s.min:s.max:Sc(d)?B=d.value:B=s.getBaseValue(),B}function xht(d){const s=d.options,E=s.fill;let B=cc(E&&E.target,E);return B===void 0&&(B=!!s.backgroundColor),B===!1||B===null?!1:B===!0?"origin":B}function _ht(d){const{scale:s,index:E,line:B}=d,K=[],pt=B.segments,_t=B.points,Ot=bht(s,E);Ot.push(UD({x:null,y:s.bottom},B));for(let jt=0;jt=0;--_t){const Ot=K[_t].$filler;Ot&&(Ot.line.updateControlPoints(pt,Ot.axis),B&&Ot.fill&&J8(d.ctx,Ot,pt))}},beforeDatasetsDraw(d,s,E){if(E.drawTime!=="beforeDatasetsDraw")return;const B=d.getSortedVisibleDatasetMetas();for(let K=B.length-1;K>=0;--K){const pt=B[K].$filler;nI(pt)&&J8(d.ctx,pt,d.chartArea)}},beforeDatasetDraw(d,s,E){const B=s.meta.$filler;!nI(B)||E.drawTime!=="beforeDatasetDraw"||J8(d.ctx,B,d.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const sI=(d,s)=>{let{boxHeight:E=s,boxWidth:B=s}=d;return d.usePointStyle&&(E=Math.min(E,s),B=d.pointStyleWidth||Math.min(B,s)),{boxWidth:B,boxHeight:E,itemHeight:Math.max(s,E)}},Iht=(d,s)=>d!==null&&s!==null&&d.datasetIndex===s.datasetIndex&&d.index===s.index;class lI extends lv{constructor(s){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=s.chart,this.options=s.options,this.ctx=s.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(s,E,B){this.maxWidth=s,this.maxHeight=E,this._margins=B,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const s=this.options.labels||{};let E=Df(s.generateLabels,[this.chart],this)||[];s.filter&&(E=E.filter(B=>s.filter(B,this.chart.data))),s.sort&&(E=E.sort((B,K)=>s.sort(B,K,this.chart.data))),this.options.reverse&&E.reverse(),this.legendItems=E}fit(){const{options:s,ctx:E}=this;if(!s.display){this.width=this.height=0;return}const B=s.labels,K=Qp(B.font),pt=K.size,_t=this._computeTitleHeight(),{boxWidth:Ot,itemHeight:jt}=sI(B,pt);let te,he;E.font=K.string,this.isHorizontal()?(te=this.maxWidth,he=this._fitRows(_t,pt,Ot,jt)+10):(he=this.maxHeight,te=this._fitCols(_t,K,Ot,jt)+10),this.width=Math.min(te,s.maxWidth||this.maxWidth),this.height=Math.min(he,s.maxHeight||this.maxHeight)}_fitRows(s,E,B,K){const{ctx:pt,maxWidth:_t,options:{labels:{padding:Ot}}}=this,jt=this.legendHitBoxes=[],te=this.lineWidths=[0],he=K+Ot;let De=s;pt.textAlign="left",pt.textBaseline="middle";let er=-1,pr=-he;return this.legendItems.forEach((Mr,Tr)=>{const Vr=B+E/2+pt.measureText(Mr.text).width;(Tr===0||te[te.length-1]+Vr+2*Ot>_t)&&(De+=he,te[te.length-(Tr>0?0:1)]=0,pr+=he,er++),jt[Tr]={left:0,top:pr,row:er,width:Vr,height:K},te[te.length-1]+=Vr+Ot}),De}_fitCols(s,E,B,K){const{ctx:pt,maxHeight:_t,options:{labels:{padding:Ot}}}=this,jt=this.legendHitBoxes=[],te=this.columnSizes=[],he=_t-s;let De=Ot,er=0,pr=0,Mr=0,Tr=0;return this.legendItems.forEach((Vr,mn)=>{const{itemWidth:Dt,itemHeight:cn}=zht(B,E,pt,Vr,K);mn>0&&pr+cn+2*Ot>he&&(De+=er+Ot,te.push({width:er,height:pr}),Mr+=er+Ot,Tr++,er=pr=0),jt[mn]={left:Mr,top:pr,col:Tr,width:Dt,height:cn},er=Math.max(er,Dt),pr+=cn+Ot}),De+=er,te.push({width:er,height:pr}),De}adjustHitBoxes(){if(!this.options.display)return;const s=this._computeTitleHeight(),{legendHitBoxes:E,options:{align:B,labels:{padding:K},rtl:pt}}=this,_t=f_(pt,this.left,this.width);if(this.isHorizontal()){let Ot=0,jt=qp(B,this.left+K,this.right-this.lineWidths[Ot]);for(const te of E)Ot!==te.row&&(Ot=te.row,jt=qp(B,this.left+K,this.right-this.lineWidths[Ot])),te.top+=this.top+s+K,te.left=_t.leftForLtr(_t.x(jt),te.width),jt+=te.width+K}else{let Ot=0,jt=qp(B,this.top+s+K,this.bottom-this.columnSizes[Ot].height);for(const te of E)te.col!==Ot&&(Ot=te.col,jt=qp(B,this.top+s+K,this.bottom-this.columnSizes[Ot].height)),te.top=jt,te.left+=this.left+K,te.left=_t.leftForLtr(_t.x(te.left),te.width),jt+=te.height+K}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const s=this.ctx;G4(s,this),this._draw(),Y4(s)}}_draw(){const{options:s,columnSizes:E,lineWidths:B,ctx:K}=this,{align:pt,labels:_t}=s,Ot=Rd.color,jt=f_(s.rtl,this.left,this.width),te=Qp(_t.font),{padding:he}=_t,De=te.size,er=De/2;let pr;this.drawTitle(),K.textAlign=jt.textAlign("left"),K.textBaseline="middle",K.lineWidth=.5,K.font=te.string;const{boxWidth:Mr,boxHeight:Tr,itemHeight:Vr}=sI(_t,De),mn=function(ni,Wi,Un){if(isNaN(Mr)||Mr<=0||isNaN(Tr)||Tr<0)return;K.save();const qr=cc(Un.lineWidth,1);if(K.fillStyle=cc(Un.fillStyle,Ot),K.lineCap=cc(Un.lineCap,"butt"),K.lineDashOffset=cc(Un.lineDashOffset,0),K.lineJoin=cc(Un.lineJoin,"miter"),K.lineWidth=qr,K.strokeStyle=cc(Un.strokeStyle,Ot),K.setLineDash(cc(Un.lineDash,[])),_t.usePointStyle){const Di={radius:Tr*Math.SQRT2/2,pointStyle:Un.pointStyle,rotation:Un.rotation,borderWidth:qr},Fi=jt.xPlus(ni,Mr/2),Pi=Wi+er;fD(K,Di,Fi,Pi,_t.pointStyleWidth&&Mr)}else{const Di=Wi+Math.max((De-Tr)/2,0),Fi=jt.leftForLtr(ni,Mr),Pi=h_(Un.borderRadius);K.beginPath(),Object.values(Pi).some(bi=>bi!==0)?b4(K,{x:Fi,y:Di,w:Mr,h:Tr,radius:Pi}):K.rect(Fi,Di,Mr,Tr),K.fill(),qr!==0&&K.stroke()}K.restore()},Dt=function(ni,Wi,Un){X2(K,Un.text,ni,Wi+Vr/2,te,{strikethrough:Un.hidden,textAlign:jt.textAlign(Un.textAlign)})},cn=this.isHorizontal(),Jn=this._computeTitleHeight();cn?pr={x:qp(pt,this.left+he,this.right-B[0]),y:this.top+he+Jn,line:0}:pr={x:this.left+he,y:qp(pt,this.top+Jn+he,this.bottom-E[0].height),line:0},xD(this.ctx,s.textDirection);const Bn=Vr+he;this.legendItems.forEach((ni,Wi)=>{K.strokeStyle=ni.fontColor,K.fillStyle=ni.fontColor;const Un=K.measureText(ni.text).width,qr=jt.textAlign(ni.textAlign||(ni.textAlign=_t.textAlign)),Di=Mr+er+Un;let Fi=pr.x,Pi=pr.y;jt.setWidth(this.width),cn?Wi>0&&Fi+Di+he>this.right&&(Pi=pr.y+=Bn,pr.line++,Fi=pr.x=qp(pt,this.left+he,this.right-B[pr.line])):Wi>0&&Pi+Bn>this.bottom&&(Fi=pr.x=Fi+E[pr.line].width+he,pr.line++,Pi=pr.y=qp(pt,this.top+Jn+he,this.bottom-E[pr.line].height));const bi=jt.x(Fi);if(mn(bi,Pi,ni),Fi=ilt(qr,Fi+Mr+er,cn?Fi+Di:this.right,s.rtl),Dt(jt.x(Fi),Pi,ni),cn)pr.x+=Di+he;else if(typeof ni.text!="string"){const Yi=te.lineHeight;pr.y+=HD(ni,Yi)+he}else pr.y+=Bn}),_D(this.ctx,s.textDirection)}drawTitle(){const s=this.options,E=s.title,B=Qp(E.font),K=fm(E.padding);if(!E.display)return;const pt=f_(s.rtl,this.left,this.width),_t=this.ctx,Ot=E.position,jt=B.size/2,te=K.top+jt;let he,De=this.left,er=this.width;if(this.isHorizontal())er=Math.max(...this.lineWidths),he=this.top+te,De=qp(s.align,De,this.right-er);else{const Mr=this.columnSizes.reduce((Tr,Vr)=>Math.max(Tr,Vr.height),0);he=te+qp(s.align,this.top,this.bottom-Mr-s.labels.padding-this._computeTitleHeight())}const pr=qp(Ot,De,De+er);_t.textAlign=pt.textAlign(xM(Ot)),_t.textBaseline="middle",_t.strokeStyle=E.color,_t.fillStyle=E.color,_t.font=B.string,X2(_t,E.text,pr,he,B)}_computeTitleHeight(){const s=this.options.title,E=Qp(s.font),B=fm(s.padding);return s.display?E.lineHeight+B.height:0}_getLegendItemAt(s,E){let B,K,pt;if(nv(s,this.left,this.right)&&nv(E,this.top,this.bottom)){for(pt=this.legendHitBoxes,B=0;Bpt.length>_t.length?pt:_t)),s+E.size/2+B.measureText(K).width}function Dht(d,s,E){let B=d;return typeof s.text!="string"&&(B=HD(s,E)),B}function HD(d,s){const E=d.text?d.text.length:0;return s*E}function Fht(d,s){return!!((d==="mousemove"||d==="mouseout")&&(s.onHover||s.onLeave)||s.onClick&&(d==="click"||d==="mouseup"))}var Rht={id:"legend",_element:lI,start(d,s,E){const B=d.legend=new lI({ctx:d.ctx,options:E,chart:d});sm.configure(d,B,E),sm.addBox(d,B)},stop(d){sm.removeBox(d,d.legend),delete d.legend},beforeUpdate(d,s,E){const B=d.legend;sm.configure(d,B,E),B.options=E},afterUpdate(d){const s=d.legend;s.buildLabels(),s.adjustHitBoxes()},afterEvent(d,s){s.replay||d.legend.handleEvent(s.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(d,s,E){const B=s.datasetIndex,K=E.chart;K.isDatasetVisible(B)?(K.hide(B),s.hidden=!0):(K.show(B),s.hidden=!1)},onHover:null,onLeave:null,labels:{color:d=>d.chart.options.color,boxWidth:40,padding:10,generateLabels(d){const s=d.data.datasets,{labels:{usePointStyle:E,pointStyle:B,textAlign:K,color:pt,useBorderRadius:_t,borderRadius:Ot}}=d.legend.options;return d._getSortedDatasetMetas().map(jt=>{const te=jt.controller.getStyle(E?0:void 0),he=fm(te.borderWidth);return{text:s[jt.index].label,fillStyle:te.backgroundColor,fontColor:pt,hidden:!jt.visible,lineCap:te.borderCapStyle,lineDash:te.borderDash,lineDashOffset:te.borderDashOffset,lineJoin:te.borderJoinStyle,lineWidth:(he.width+he.height)/4,strokeStyle:te.borderColor,pointStyle:B||te.pointStyle,rotation:te.rotation,textAlign:K||te.textAlign,borderRadius:_t&&(Ot||te.borderRadius),datasetIndex:jt.index}},this)}},title:{color:d=>d.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:d=>!d.startsWith("on"),labels:{_scriptable:d=>!["generateLabels","filter","sort"].includes(d)}}};class WD extends lv{constructor(s){super(),this.chart=s.chart,this.options=s.options,this.ctx=s.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(s,E){const B=this.options;if(this.left=0,this.top=0,!B.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=s,this.height=this.bottom=E;const K=Yd(B.text)?B.text.length:1;this._padding=fm(B.padding);const pt=K*Qp(B.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=pt:this.width=pt}isHorizontal(){const s=this.options.position;return s==="top"||s==="bottom"}_drawArgs(s){const{top:E,left:B,bottom:K,right:pt,options:_t}=this,Ot=_t.align;let jt=0,te,he,De;return this.isHorizontal()?(he=qp(Ot,B,pt),De=E+s,te=pt-B):(_t.position==="left"?(he=B+s,De=qp(Ot,K,E),jt=Qh*-.5):(he=pt-s,De=qp(Ot,E,K),jt=Qh*.5),te=K-E),{titleX:he,titleY:De,maxWidth:te,rotation:jt}}draw(){const s=this.ctx,E=this.options;if(!E.display)return;const B=Qp(E.font),pt=B.lineHeight/2+this._padding.top,{titleX:_t,titleY:Ot,maxWidth:jt,rotation:te}=this._drawArgs(pt);X2(s,E.text,0,0,B,{color:E.color,maxWidth:jt,rotation:te,textAlign:xM(E.align),textBaseline:"middle",translation:[_t,Ot]})}}function Bht(d,s){const E=new WD({ctx:d.ctx,options:s,chart:d});sm.configure(d,E,s),sm.addBox(d,E),d.titleBlock=E}var Nht={id:"title",_element:WD,start(d,s,E){Bht(d,E)},stop(d){const s=d.titleBlock;sm.removeBox(d,s),delete d.titleBlock},beforeUpdate(d,s,E){const B=d.titleBlock;sm.configure(d,B,E),B.options=E},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const _2={average(d){if(!d.length)return!1;let s,E,B=new Set,K=0,pt=0;for(s=0,E=d.length;sOt+jt)/B.size,y:K/pt}},nearest(d,s){if(!d.length)return!1;let E=s.x,B=s.y,K=Number.POSITIVE_INFINITY,pt,_t,Ot;for(pt=0,_t=d.length;pt<_t;++pt){const jt=d[pt].element;if(jt&&jt.hasValue()){const te=jt.getCenterPoint(),he=SA(s,te);he-1?d.split(` -`):d}function Wct(d,l){const{element:z,datasetIndex:j,index:J}=l,mt=d.getDatasetMeta(j).controller,{label:kt,value:Dt}=mt.getLabelAndValue(J);return{chart:d,label:kt,parsed:mt.getParsed(J),raw:d.data.datasets[j].data[J],formattedValue:Dt,dataset:mt.getDataset(),dataIndex:J,datasetIndex:j,element:z}}function $P(d,l){const z=d.chart.ctx,{body:j,footer:J,title:mt}=d,{boxWidth:kt,boxHeight:Dt}=l,$t=r0(l.bodyFont),ee=r0(l.titleFont),pe=r0(l.footerFont),Be=mt.length,ir=J.length,vr=j.length,Ir=pm(l.padding);let Pr=Ir.height,Wr=0,Tn=j.reduce((ei,jn)=>ei+jn.before.length+jn.lines.length+jn.after.length,0);if(Tn+=d.beforeBody.length+d.afterBody.length,Be&&(Pr+=Be*ee.lineHeight+(Be-1)*l.titleSpacing+l.titleMarginBottom),Tn){const ei=l.displayColors?Math.max(Dt,$t.lineHeight):$t.lineHeight;Pr+=vr*ei+(Tn-vr)*$t.lineHeight+(Tn-1)*l.bodySpacing}ir&&(Pr+=l.footerMarginTop+ir*pe.lineHeight+(ir-1)*l.footerSpacing);let Ft=0;const wn=function(ei){Wr=Math.max(Wr,z.measureText(ei).width+Ft)};return z.save(),z.font=ee.string,Xh(d.title,wn),z.font=$t.string,Xh(d.beforeBody.concat(d.afterBody),wn),Ft=l.displayColors?kt+2+l.boxPadding:0,Xh(j,ei=>{Xh(ei.before,wn),Xh(ei.lines,wn),Xh(ei.after,wn)}),Ft=0,z.font=pe.string,Xh(d.footer,wn),z.restore(),Wr+=Ir.width,{width:Wr,height:Pr}}function qct(d,l){const{y:z,height:j}=l;return zd.height-j/2?"bottom":"center"}function Zct(d,l,z,j){const{x:J,width:mt}=j,kt=z.caretSize+z.caretPadding;if(d==="left"&&J+mt+kt>l.width||d==="right"&&J-mt-kt<0)return!0}function $ct(d,l,z,j){const{x:J,width:mt}=z,{width:kt,chartArea:{left:Dt,right:$t}}=d;let ee="center";return j==="center"?ee=J<=(Dt+$t)/2?"left":"right":J<=mt/2?ee="left":J>=kt-mt/2&&(ee="right"),Zct(ee,d,l,z)&&(ee="center"),ee}function GP(d,l,z){const j=z.yAlign||l.yAlign||qct(d,z);return{xAlign:z.xAlign||l.xAlign||$ct(d,l,z,j),yAlign:j}}function Gct(d,l){let{x:z,width:j}=d;return l==="right"?z-=j:l==="center"&&(z-=j/2),z}function Yct(d,l,z){let{y:j,height:J}=d;return l==="top"?j+=z:l==="bottom"?j-=J+z:j-=J/2,j}function YP(d,l,z,j){const{caretSize:J,caretPadding:mt,cornerRadius:kt}=d,{xAlign:Dt,yAlign:$t}=z,ee=J+mt,{topLeft:pe,topRight:Be,bottomLeft:ir,bottomRight:vr}=c_(kt);let Ir=Gct(l,Dt);const Pr=Yct(l,$t,ee);return $t==="center"?Dt==="left"?Ir+=ee:Dt==="right"&&(Ir-=ee):Dt==="left"?Ir-=Math.max(pe,ir)+J:Dt==="right"&&(Ir+=Math.max(Be,vr)+J),{x:e0(Ir,0,j.width-l.width),y:e0(Pr,0,j.height-l.height)}}function j5(d,l,z){const j=pm(z.padding);return l==="center"?d.x+d.width/2:l==="right"?d.x+d.width-j.right:d.x+j.left}function KP(d){return ag([],Jg(d))}function Kct(d,l,z){return Py(d,{tooltip:l,tooltipItems:z,type:"tooltip"})}function XP(d,l){const z=l&&l.dataset&&l.dataset.tooltip&&l.dataset.tooltip.callbacks;return z?d.override(z):d}const wD={beforeTitle:Kg,title(d){if(d.length>0){const l=d[0],z=l.chart.data.labels,j=z?z.length:0;if(this&&this.options&&this.options.mode==="dataset")return l.dataset.label||"";if(l.label)return l.label;if(j>0&&l.dataIndex"u"?wD[l].call(z,j):J}class JP extends uv{static positioners=_2;constructor(l){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=l.chart,this.options=l.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(l){this.options=l,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const l=this._cachedAnimations;if(l)return l;const z=this.chart,j=this.options.setContext(this.getContext()),J=j.enabled&&z.options.animation&&j.animations,mt=new rD(this.chart,J);return J._cacheable&&(this._cachedAnimations=Object.freeze(mt)),mt}getContext(){return this.$context||(this.$context=Kct(this.chart.getContext(),this,this._tooltipItems))}getTitle(l,z){const{callbacks:j}=z,J=S0(j,"beforeTitle",this,l),mt=S0(j,"title",this,l),kt=S0(j,"afterTitle",this,l);let Dt=[];return Dt=ag(Dt,Jg(J)),Dt=ag(Dt,Jg(mt)),Dt=ag(Dt,Jg(kt)),Dt}getBeforeBody(l,z){return KP(S0(z.callbacks,"beforeBody",this,l))}getBody(l,z){const{callbacks:j}=z,J=[];return Xh(l,mt=>{const kt={before:[],lines:[],after:[]},Dt=XP(j,mt);ag(kt.before,Jg(S0(Dt,"beforeLabel",this,mt))),ag(kt.lines,S0(Dt,"label",this,mt)),ag(kt.after,Jg(S0(Dt,"afterLabel",this,mt))),J.push(kt)}),J}getAfterBody(l,z){return KP(S0(z.callbacks,"afterBody",this,l))}getFooter(l,z){const{callbacks:j}=z,J=S0(j,"beforeFooter",this,l),mt=S0(j,"footer",this,l),kt=S0(j,"afterFooter",this,l);let Dt=[];return Dt=ag(Dt,Jg(J)),Dt=ag(Dt,Jg(mt)),Dt=ag(Dt,Jg(kt)),Dt}_createItems(l){const z=this._active,j=this.chart.data,J=[],mt=[],kt=[];let Dt=[],$t,ee;for($t=0,ee=z.length;$tl.filter(pe,Be,ir,j))),l.itemSort&&(Dt=Dt.sort((pe,Be)=>l.itemSort(pe,Be,j))),Xh(Dt,pe=>{const Be=XP(l.callbacks,pe);J.push(S0(Be,"labelColor",this,pe)),mt.push(S0(Be,"labelPointStyle",this,pe)),kt.push(S0(Be,"labelTextColor",this,pe))}),this.labelColors=J,this.labelPointStyles=mt,this.labelTextColors=kt,this.dataPoints=Dt,Dt}update(l,z){const j=this.options.setContext(this.getContext()),J=this._active;let mt,kt=[];if(!J.length)this.opacity!==0&&(mt={opacity:0});else{const Dt=_2[j.position].call(this,J,this._eventPosition);kt=this._createItems(j),this.title=this.getTitle(kt,j),this.beforeBody=this.getBeforeBody(kt,j),this.body=this.getBody(kt,j),this.afterBody=this.getAfterBody(kt,j),this.footer=this.getFooter(kt,j);const $t=this._size=$P(this,j),ee=Object.assign({},Dt,$t),pe=GP(this.chart,j,ee),Be=YP(j,ee,pe,this.chart);this.xAlign=pe.xAlign,this.yAlign=pe.yAlign,mt={opacity:1,x:Be.x,y:Be.y,width:$t.width,height:$t.height,caretX:Dt.x,caretY:Dt.y}}this._tooltipItems=kt,this.$context=void 0,mt&&this._resolveAnimations().update(this,mt),l&&j.external&&j.external.call(this,{chart:this.chart,tooltip:this,replay:z})}drawCaret(l,z,j,J){const mt=this.getCaretPosition(l,j,J);z.lineTo(mt.x1,mt.y1),z.lineTo(mt.x2,mt.y2),z.lineTo(mt.x3,mt.y3)}getCaretPosition(l,z,j){const{xAlign:J,yAlign:mt}=this,{caretSize:kt,cornerRadius:Dt}=j,{topLeft:$t,topRight:ee,bottomLeft:pe,bottomRight:Be}=c_(Dt),{x:ir,y:vr}=l,{width:Ir,height:Pr}=z;let Wr,Tn,Ft,wn,ei,jn;return mt==="center"?(ei=vr+Pr/2,J==="left"?(Wr=ir,Tn=Wr-kt,wn=ei+kt,jn=ei-kt):(Wr=ir+Ir,Tn=Wr+kt,wn=ei-kt,jn=ei+kt),Ft=Wr):(J==="left"?Tn=ir+Math.max($t,pe)+kt:J==="right"?Tn=ir+Ir-Math.max(ee,Be)-kt:Tn=this.caretX,mt==="top"?(wn=vr,ei=wn-kt,Wr=Tn-kt,Ft=Tn+kt):(wn=vr+Pr,ei=wn+kt,Wr=Tn+kt,Ft=Tn-kt),jn=wn),{x1:Wr,x2:Tn,x3:Ft,y1:wn,y2:ei,y3:jn}}drawTitle(l,z,j){const J=this.title,mt=J.length;let kt,Dt,$t;if(mt){const ee=h_(j.rtl,this.x,this.width);for(l.x=j5(this,j.titleAlign,j),z.textAlign=ee.textAlign(j.titleAlign),z.textBaseline="middle",kt=r0(j.titleFont),Dt=j.titleSpacing,z.fillStyle=j.titleColor,z.font=kt.string,$t=0;$tFt!==0)?(l.beginPath(),l.fillStyle=mt.multiKeyBackground,g4(l,{x:Pr,y:Ir,w:ee,h:$t,radius:Tn}),l.fill(),l.stroke(),l.fillStyle=kt.backgroundColor,l.beginPath(),g4(l,{x:Wr,y:Ir+1,w:ee-2,h:$t-2,radius:Tn}),l.fill()):(l.fillStyle=mt.multiKeyBackground,l.fillRect(Pr,Ir,ee,$t),l.strokeRect(Pr,Ir,ee,$t),l.fillStyle=kt.backgroundColor,l.fillRect(Wr,Ir+1,ee-2,$t-2))}l.fillStyle=this.labelTextColors[j]}drawBody(l,z,j){const{body:J}=this,{bodySpacing:mt,bodyAlign:kt,displayColors:Dt,boxHeight:$t,boxWidth:ee,boxPadding:pe}=j,Be=r0(j.bodyFont);let ir=Be.lineHeight,vr=0;const Ir=h_(j.rtl,this.x,this.width),Pr=function(Gi){z.fillText(Gi,Ir.x(l.x+vr),l.y+ir/2),l.y+=ir+mt},Wr=Ir.textAlign(kt);let Tn,Ft,wn,ei,jn,ai,Qi;for(z.textAlign=kt,z.textBaseline="middle",z.font=Be.string,l.x=j5(this,Wr,j),z.fillStyle=j.bodyColor,Xh(this.beforeBody,Pr),vr=Dt&&Wr!=="right"?kt==="center"?ee/2+pe:ee+2+pe:0,ei=0,ai=J.length;ei0&&z.stroke()}_updateAnimationTarget(l){const z=this.chart,j=this.$animations,J=j&&j.x,mt=j&&j.y;if(J||mt){const kt=_2[l.position].call(this,this._active,this._eventPosition);if(!kt)return;const Dt=this._size=$P(this,l),$t=Object.assign({},kt,this._size),ee=GP(z,l,$t),pe=YP(l,$t,ee,z);(J._to!==pe.x||mt._to!==pe.y)&&(this.xAlign=ee.xAlign,this.yAlign=ee.yAlign,this.width=Dt.width,this.height=Dt.height,this.caretX=kt.x,this.caretY=kt.y,this._resolveAnimations().update(this,pe))}}_willRender(){return!!this.opacity}draw(l){const z=this.options.setContext(this.getContext());let j=this.opacity;if(!j)return;this._updateAnimationTarget(z);const J={width:this.width,height:this.height},mt={x:this.x,y:this.y};j=Math.abs(j)<.001?0:j;const kt=pm(z.padding),Dt=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;z.enabled&&Dt&&(l.save(),l.globalAlpha=j,this.drawBackground(mt,l,J,z),KO(l,z.textDirection),mt.y+=kt.top,this.drawTitle(mt,l,z),this.drawBody(mt,l,z),this.drawFooter(mt,l,z),XO(l,z.textDirection),l.restore())}getActiveElements(){return this._active||[]}setActiveElements(l,z){const j=this._active,J=l.map(({datasetIndex:Dt,index:$t})=>{const ee=this.chart.getDatasetMeta(Dt);if(!ee)throw new Error("Cannot find a dataset at index "+Dt);return{datasetIndex:Dt,element:ee.data[$t],index:$t}}),mt=!d4(j,J),kt=this._positionChanged(J,z);(mt||kt)&&(this._active=J,this._eventPosition=z,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(l,z,j=!0){if(z&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const J=this.options,mt=this._active||[],kt=this._getActiveElements(l,mt,z,j),Dt=this._positionChanged(kt,l),$t=z||!d4(kt,mt)||Dt;return $t&&(this._active=kt,(J.enabled||J.external)&&(this._eventPosition={x:l.x,y:l.y},this.update(!0,z))),$t}_getActiveElements(l,z,j,J){const mt=this.options;if(l.type==="mouseout")return[];if(!J)return z.filter(Dt=>this.chart.data.datasets[Dt.datasetIndex]&&this.chart.getDatasetMeta(Dt.datasetIndex).controller.getParsed(Dt.index)!==void 0);const kt=this.chart.getElementsAtEventForMode(l,mt.mode,mt,j);return mt.reverse&&kt.reverse(),kt}_positionChanged(l,z){const{caretX:j,caretY:J,options:mt}=this,kt=_2[mt.position].call(this,l,z);return kt!==!1&&(j!==kt.x||J!==kt.y)}}var Xct={id:"tooltip",_element:JP,positioners:_2,afterInit(d,l,z){z&&(d.tooltip=new JP({chart:d,options:z}))},beforeUpdate(d,l,z){d.tooltip&&d.tooltip.initialize(z)},reset(d,l,z){d.tooltip&&d.tooltip.initialize(z)},afterDraw(d){const l=d.tooltip;if(l&&l._willRender()){const z={tooltip:l};if(d.notifyPlugins("beforeTooltipDraw",{...z,cancelable:!0})===!1)return;l.draw(d.ctx),d.notifyPlugins("afterTooltipDraw",z)}},afterEvent(d,l){if(d.tooltip){const z=l.replay;d.tooltip.handleEvent(l.event,z,l.inChartArea)&&(l.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(d,l)=>l.bodyFont.size,boxWidth:(d,l)=>l.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:wD},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:d=>d!=="filter"&&d!=="itemSort"&&d!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Jct=(d,l,z,j)=>(typeof l=="string"?(z=d.push(l)-1,j.unshift({index:z,label:l})):isNaN(l)&&(z=null),z);function Qct(d,l,z,j){const J=d.indexOf(l);if(J===-1)return Jct(d,l,z,j);const mt=d.lastIndexOf(l);return J!==mt?z:J}const tht=(d,l)=>d===null?null:e0(Math.round(d),0,l);function QP(d){const l=this.getLabels();return d>=0&&dz.length-1?null:this.getPixelForValue(z[l].value)}getValueForPixel(l){return Math.round(this._startValue+this.getDecimalForPixel(l)*this._valueRange)}getBasePixel(){return this.bottom}}function rht(d,l){const z=[],{bounds:J,step:mt,min:kt,max:Dt,precision:$t,count:ee,maxTicks:pe,maxDigits:Be,includeBounds:ir}=d,vr=mt||1,Ir=pe-1,{min:Pr,max:Wr}=l,Tn=!Bh(kt),Ft=!Bh(Dt),wn=!Bh(ee),ei=(Wr-Pr)/(Be+1);let jn=YL((Wr-Pr)/Ir/vr)*vr,ai,Qi,Gi,En;if(jn<1e-14&&!Tn&&!Ft)return[{value:Pr},{value:Wr}];En=Math.ceil(Wr/jn)-Math.floor(Pr/jn),En>Ir&&(jn=YL(En*jn/Ir/vr)*vr),Bh($t)||(ai=Math.pow(10,$t),jn=Math.ceil(jn*ai)/ai),J==="ticks"?(Qi=Math.floor(Pr/jn)*jn,Gi=Math.ceil(Wr/jn)*jn):(Qi=Pr,Gi=Wr),Tn&&Ft&&mt&&Qot((Dt-kt)/mt,jn/1e3)?(En=Math.round(Math.min((Dt-kt)/jn,pe)),jn=(Dt-kt)/En,Qi=kt,Gi=Dt):wn?(Qi=Tn?kt:Qi,Gi=Ft?Dt:Gi,En=ee-1,jn=(Gi-Qi)/En):(En=(Gi-Qi)/jn,P2(En,Math.round(En),jn/1e3)?En=Math.round(En):En=Math.ceil(En));const Fa=Math.max(KL(jn),KL(Qi));ai=Math.pow(10,Bh($t)?Fa:$t),Qi=Math.round(Qi*ai)/ai,Gi=Math.round(Gi*ai)/ai;let Sa=0;for(Tn&&(ir&&Qi!==kt?(z.push({value:kt}),QiDt)break;z.push({value:Ni})}return Ft&&ir&&Gi!==Dt?z.length&&P2(z[z.length-1].value,Dt,tz(Dt,ei,d))?z[z.length-1].value=Dt:z.push({value:Dt}):(!Ft||Gi===Dt)&&z.push({value:Gi}),z}function tz(d,l,{horizontal:z,minRotation:j}){const J=nv(j),mt=(z?Math.sin(J):Math.cos(J))||.001,kt=.75*l*(""+d).length;return Math.min(l/mt,kt)}class nht extends T_{constructor(l){super(l),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(l,z){return Bh(l)||(typeof l=="number"||l instanceof Number)&&!isFinite(+l)?null:+l}handleTickRangeOptions(){const{beginAtZero:l}=this.options,{minDefined:z,maxDefined:j}=this.getUserBounds();let{min:J,max:mt}=this;const kt=$t=>J=z?J:$t,Dt=$t=>mt=j?mt:$t;if(l){const $t=fg(J),ee=fg(mt);$t<0&&ee<0?Dt(0):$t>0&&ee>0&&kt(0)}if(J===mt){let $t=mt===0?1:Math.abs(mt*.05);Dt(mt+$t),l||kt(J-$t)}this.min=J,this.max=mt}getTickLimit(){const l=this.options.ticks;let{maxTicksLimit:z,stepSize:j}=l,J;return j?(J=Math.ceil(this.max/j)-Math.floor(this.min/j)+1,J>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${j} would result generating up to ${J} ticks. Limiting to 1000.`),J=1e3)):(J=this.computeTickLimit(),z=z||11),z&&(J=Math.min(z,J)),J}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const l=this.options,z=l.ticks;let j=this.getTickLimit();j=Math.max(2,j);const J={maxTicks:j,bounds:l.bounds,min:l.min,max:l.max,precision:z.precision,step:z.stepSize,count:z.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:z.minRotation||0,includeBounds:z.includeBounds!==!1},mt=this._range||this,kt=rht(J,mt);return l.bounds==="ticks"&&tst(kt,this,"value"),l.reverse?(kt.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),kt}configure(){const l=this.ticks;let z=this.min,j=this.max;if(super.configure(),this.options.offset&&l.length){const J=(j-z)/Math.max(l.length-1,1)/2;z-=J,j+=J}this._startValue=z,this._endValue=j,this._valueRange=j-z}getLabelForValue(l){return uM(l,this.chart.options.locale,this.options.ticks.format)}}class iht extends nht{static id="linear";static defaults={ticks:{callback:VO.formatters.numeric}};determineDataLimits(){const{min:l,max:z}=this.getMinMax(!0);this.min=n0(l)?l:0,this.max=n0(z)?z:1,this.handleTickRangeOptions()}computeTickLimit(){const l=this.isHorizontal(),z=l?this.width:this.height,j=nv(this.options.ticks.minRotation),J=(l?Math.sin(j):Math.cos(j))||.001,mt=this._resolveTickFontOptions(0);return Math.ceil(z/Math.min(40,mt.lineHeight/J))}getPixelForValue(l){return l===null?NaN:this.getPixelForDecimal((l-this._startValue)/this._valueRange)}getValueForPixel(l){return this._startValue+this.getDecimalForPixel(l)*this._valueRange}}const K4={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},E0=Object.keys(K4);function ez(d,l){return d-l}function rz(d,l){if(Bh(l))return null;const z=d._adapter,{parser:j,round:J,isoWeekday:mt}=d._parseOpts;let kt=l;return typeof j=="function"&&(kt=j(kt)),n0(kt)||(kt=typeof j=="string"?z.parse(kt,j):z.parse(kt)),kt===null?null:(J&&(kt=J==="week"&&(G2(mt)||mt===!0)?z.startOf(kt,"isoWeek",mt):z.startOf(kt,J)),+kt)}function nz(d,l,z,j){const J=E0.length;for(let mt=E0.indexOf(d);mt=E0.indexOf(z);mt--){const kt=E0[mt];if(K4[kt].common&&d._adapter.diff(J,j,kt)>=l-1)return kt}return E0[z?E0.indexOf(z):0]}function oht(d){for(let l=E0.indexOf(d)+1,z=E0.length;l=l?z[j]:z[J];d[mt]=!0}}function sht(d,l,z,j){const J=d._adapter,mt=+J.startOf(l[0].value,j),kt=l[l.length-1].value;let Dt,$t;for(Dt=mt;Dt<=kt;Dt=+J.add(Dt,1,j))$t=z[Dt],$t>=0&&(l[$t].major=!0);return l}function az(d,l,z){const j=[],J={},mt=l.length;let kt,Dt;for(kt=0;kt+l.value))}initOffsets(l=[]){let z=0,j=0,J,mt;this.options.offset&&l.length&&(J=this.getDecimalForValue(l[0]),l.length===1?z=1-J:z=(this.getDecimalForValue(l[1])-J)/2,mt=this.getDecimalForValue(l[l.length-1]),l.length===1?j=mt:j=(mt-this.getDecimalForValue(l[l.length-2]))/2);const kt=l.length<3?.5:.25;z=e0(z,0,kt),j=e0(j,0,kt),this._offsets={start:z,end:j,factor:1/(z+1+j)}}_generate(){const l=this._adapter,z=this.min,j=this.max,J=this.options,mt=J.time,kt=mt.unit||nz(mt.minUnit,z,j,this._getLabelCapacity(z)),Dt=hc(J.ticks.stepSize,1),$t=kt==="week"?mt.isoWeekday:!1,ee=G2($t)||$t===!0,pe={};let Be=z,ir,vr;if(ee&&(Be=+l.startOf(Be,"isoWeek",$t)),Be=+l.startOf(Be,ee?"day":kt),l.diff(j,z,kt)>1e5*Dt)throw new Error(z+" and "+j+" are too far apart with stepSize of "+Dt+" "+kt);const Ir=J.ticks.source==="data"&&this.getDataTimestamps();for(ir=Be,vr=0;ir+Pr)}getLabelForValue(l){const z=this._adapter,j=this.options.time;return j.tooltipFormat?z.format(l,j.tooltipFormat):z.format(l,j.displayFormats.datetime)}format(l,z){const J=this.options.time.displayFormats,mt=this._unit,kt=z||J[mt];return this._adapter.format(l,kt)}_tickFormatFunction(l,z,j,J){const mt=this.options,kt=mt.ticks.callback;if(kt)return Rf(kt,[l,z,j],this);const Dt=mt.time.displayFormats,$t=this._unit,ee=this._majorUnit,pe=$t&&Dt[$t],Be=ee&&Dt[ee],ir=j[z],vr=ee&&Be&&ir&&ir.major;return this._adapter.format(l,J||(vr?Be:pe))}generateTickLabels(l){let z,j,J;for(z=0,j=l.length;z0?Dt:1}getDataTimestamps(){let l=this._cache.data||[],z,j;if(l.length)return l;const J=this.getMatchingVisibleMetas();if(this._normalized&&J.length)return this._cache.data=J[0].controller.getAllParsedValues(this);for(z=0,j=J.length;z=d[j].pos&&l<=d[J].pos&&({lo:j,hi:J}=_y(d,"pos",l)),{pos:mt,time:Dt}=d[j],{pos:kt,time:$t}=d[J]):(l>=d[j].time&&l<=d[J].time&&({lo:j,hi:J}=_y(d,"time",l)),{time:mt,pos:Dt}=d[j],{time:kt,pos:$t}=d[J]);const ee=kt-mt;return ee?Dt+($t-Dt)*(l-mt)/ee:Dt}class Yvt extends kA{static id="timeseries";static defaults=kA.defaults;constructor(l){super(l),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const l=this._getTimestampsForTable(),z=this._table=this.buildLookupTable(l);this._minPos=U5(z,this.min),this._tableRange=U5(z,this.max)-this._minPos,super.initOffsets(l)}buildLookupTable(l){const{min:z,max:j}=this,J=[],mt=[];let kt,Dt,$t,ee,pe;for(kt=0,Dt=l.length;kt=z&&ee<=j&&J.push(ee);if(J.length<2)return[{time:z,pos:0},{time:j,pos:1}];for(kt=0,Dt=J.length;ktJ-mt)}_getTimestampsForTable(){let l=this._cache.all||[];if(l.length)return l;const z=this.getDataTimestamps(),j=this.getLabelTimestamps();return z.length&&j.length?l=this.normalize(z.concat(j)):l=z.length?z:j,l=this._cache.all=l,l}getDecimalForValue(l){return(U5(this._table,l)-this._minPos)/this._tableRange}getValueForPixel(l){const z=this._offsets,j=this.getDecimalForPixel(l)/z.factor-z.end;return U5(this._table,j*this._tableRange+this._minPos,!0)}}const kD=6048e5,lht=864e5,uw=6e4,cw=36e5,uht=1e3,oz=Symbol.for("constructDateFrom");function Ad(d,l){return typeof d=="function"?d(l):d&&typeof d=="object"&&oz in d?d[oz](l):d instanceof Date?new d.constructor(l):new Date(l)}function Hu(d,l){return Ad(l||d,d)}function X4(d,l,z){const j=Hu(d,z?.in);return isNaN(l)?Ad(z?.in||d,NaN):(l&&j.setDate(j.getDate()+l),j)}function vM(d,l,z){const j=Hu(d,z?.in);if(isNaN(l))return Ad(d,NaN);if(!l)return j;const J=j.getDate(),mt=Ad(d,j.getTime());mt.setMonth(j.getMonth()+l+1,0);const kt=mt.getDate();return J>=kt?mt:(j.setFullYear(mt.getFullYear(),mt.getMonth(),J),j)}function yM(d,l,z){return Ad(d,+Hu(d)+l)}function cht(d,l,z){return yM(d,l*cw)}let hht={};function zy(){return hht}function dg(d,l){const z=zy(),j=l?.weekStartsOn??l?.locale?.options?.weekStartsOn??z.weekStartsOn??z.locale?.options?.weekStartsOn??0,J=Hu(d,l?.in),mt=J.getDay(),kt=(mt=mt.getTime()?j+1:z.getTime()>=Dt.getTime()?j:j-1}function _4(d){const l=Hu(d),z=new Date(Date.UTC(l.getFullYear(),l.getMonth(),l.getDate(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()));return z.setUTCFullYear(l.getFullYear()),+d-+z}function Iy(d,...l){const z=Ad.bind(null,l.find(j=>typeof j=="object"));return l.map(z)}function TA(d,l){const z=Hu(d,l?.in);return z.setHours(0,0,0,0),z}function AD(d,l,z){const[j,J]=Iy(z?.in,d,l),mt=TA(j),kt=TA(J),Dt=+mt-_4(mt),$t=+kt-_4(kt);return Math.round((Dt-$t)/lht)}function fht(d,l){const z=TD(d,l),j=Ad(d,0);return j.setFullYear(z,0,4),j.setHours(0,0,0,0),__(j)}function dht(d,l,z){const j=Hu(d,z?.in);return j.setTime(j.getTime()+l*uw),j}function pht(d,l,z){return vM(d,l*3,z)}function mht(d,l,z){return yM(d,l*1e3)}function ght(d,l,z){return X4(d,l*7,z)}function vht(d,l,z){return vM(d,l*12,z)}function O2(d,l){const z=+Hu(d)-+Hu(l);return z<0?-1:z>0?1:z}function yht(d){return d instanceof Date||typeof d=="object"&&Object.prototype.toString.call(d)==="[object Date]"}function MD(d){return!(!yht(d)&&typeof d!="number"||isNaN(+Hu(d)))}function xht(d,l,z){const[j,J]=Iy(z?.in,d,l),mt=j.getFullYear()-J.getFullYear(),kt=j.getMonth()-J.getMonth();return mt*12+kt}function _ht(d,l,z){const[j,J]=Iy(z?.in,d,l);return j.getFullYear()-J.getFullYear()}function SD(d,l,z){const[j,J]=Iy(z?.in,d,l),mt=sz(j,J),kt=Math.abs(AD(j,J));j.setDate(j.getDate()-mt*kt);const Dt=+(sz(j,J)===-mt),$t=mt*(kt-Dt);return $t===0?0:$t}function sz(d,l){const z=d.getFullYear()-l.getFullYear()||d.getMonth()-l.getMonth()||d.getDate()-l.getDate()||d.getHours()-l.getHours()||d.getMinutes()-l.getMinutes()||d.getSeconds()-l.getSeconds()||d.getMilliseconds()-l.getMilliseconds();return z<0?-1:z>0?1:z}function hw(d){return l=>{const j=(d?Math[d]:Math.trunc)(l);return j===0?0:j}}function bht(d,l,z){const[j,J]=Iy(z?.in,d,l),mt=(+j-+J)/cw;return hw(z?.roundingMethod)(mt)}function xM(d,l){return+Hu(d)-+Hu(l)}function wht(d,l,z){const j=xM(d,l)/uw;return hw(z?.roundingMethod)(j)}function ED(d,l){const z=Hu(d,l?.in);return z.setHours(23,59,59,999),z}function CD(d,l){const z=Hu(d,l?.in),j=z.getMonth();return z.setFullYear(z.getFullYear(),j+1,0),z.setHours(23,59,59,999),z}function kht(d,l){const z=Hu(d,l?.in);return+ED(z,l)==+CD(z,l)}function LD(d,l,z){const[j,J,mt]=Iy(z?.in,d,d,l),kt=O2(J,mt),Dt=Math.abs(xht(J,mt));if(Dt<1)return 0;J.getMonth()===1&&J.getDate()>27&&J.setDate(30),J.setMonth(J.getMonth()-kt*Dt);let $t=O2(J,mt)===-kt;kht(j)&&Dt===1&&O2(j,mt)===1&&($t=!1);const ee=kt*(Dt-+$t);return ee===0?0:ee}function Tht(d,l,z){const j=LD(d,l,z)/3;return hw(z?.roundingMethod)(j)}function Aht(d,l,z){const j=xM(d,l)/1e3;return hw(z?.roundingMethod)(j)}function Mht(d,l,z){const j=SD(d,l,z)/7;return hw(z?.roundingMethod)(j)}function Sht(d,l,z){const[j,J]=Iy(z?.in,d,l),mt=O2(j,J),kt=Math.abs(_ht(j,J));j.setFullYear(1584),J.setFullYear(1584);const Dt=O2(j,J)===-mt,$t=mt*(kt-+Dt);return $t===0?0:$t}function Eht(d,l){const z=Hu(d,l?.in),j=z.getMonth(),J=j-j%3;return z.setMonth(J,1),z.setHours(0,0,0,0),z}function Cht(d,l){const z=Hu(d,l?.in);return z.setDate(1),z.setHours(0,0,0,0),z}function Lht(d,l){const z=Hu(d,l?.in),j=z.getFullYear();return z.setFullYear(j+1,0,0),z.setHours(23,59,59,999),z}function PD(d,l){const z=Hu(d,l?.in);return z.setFullYear(z.getFullYear(),0,1),z.setHours(0,0,0,0),z}function Pht(d,l){const z=Hu(d,l?.in);return z.setMinutes(59,59,999),z}function zht(d,l){const z=zy(),j=z.weekStartsOn??z.locale?.options?.weekStartsOn??0,J=Hu(d,l?.in),mt=J.getDay(),kt=(mt{let j;const J=Fht[d];return typeof J=="string"?j=J:l===1?j=J.one:j=J.other.replace("{{count}}",l.toString()),z?.addSuffix?z.comparison&&z.comparison>0?"in "+j:j+" ago":j};function W8(d){return(l={})=>{const z=l.width?String(l.width):d.defaultWidth;return d.formats[z]||d.formats[d.defaultWidth]}}const Bht={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Nht={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jht={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uht={date:W8({formats:Bht,defaultWidth:"full"}),time:W8({formats:Nht,defaultWidth:"full"}),dateTime:W8({formats:jht,defaultWidth:"full"})},Vht={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hht=(d,l,z,j)=>Vht[d];function f2(d){return(l,z)=>{const j=z?.context?String(z.context):"standalone";let J;if(j==="formatting"&&d.formattingValues){const kt=d.defaultFormattingWidth||d.defaultWidth,Dt=z?.width?String(z.width):kt;J=d.formattingValues[Dt]||d.formattingValues[kt]}else{const kt=d.defaultWidth,Dt=z?.width?String(z.width):d.defaultWidth;J=d.values[Dt]||d.values[kt]}const mt=d.argumentCallback?d.argumentCallback(l):l;return J[mt]}}const Wht={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qht={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Zht={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ght={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Yht={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Kht=(d,l)=>{const z=Number(d),j=z%100;if(j>20||j<10)switch(j%10){case 1:return z+"st";case 2:return z+"nd";case 3:return z+"rd"}return z+"th"},Xht={ordinalNumber:Kht,era:f2({values:Wht,defaultWidth:"wide"}),quarter:f2({values:qht,defaultWidth:"wide",argumentCallback:d=>d-1}),month:f2({values:Zht,defaultWidth:"wide"}),day:f2({values:$ht,defaultWidth:"wide"}),dayPeriod:f2({values:Ght,defaultWidth:"wide",formattingValues:Yht,defaultFormattingWidth:"wide"})};function d2(d){return(l,z={})=>{const j=z.width,J=j&&d.matchPatterns[j]||d.matchPatterns[d.defaultMatchWidth],mt=l.match(J);if(!mt)return null;const kt=mt[0],Dt=j&&d.parsePatterns[j]||d.parsePatterns[d.defaultParseWidth],$t=Array.isArray(Dt)?Qht(Dt,Be=>Be.test(kt)):Jht(Dt,Be=>Be.test(kt));let ee;ee=d.valueCallback?d.valueCallback($t):$t,ee=z.valueCallback?z.valueCallback(ee):ee;const pe=l.slice(kt.length);return{value:ee,rest:pe}}}function Jht(d,l){for(const z in d)if(Object.prototype.hasOwnProperty.call(d,z)&&l(d[z]))return z}function Qht(d,l){for(let z=0;z{const j=l.match(d.matchPattern);if(!j)return null;const J=j[0],mt=l.match(d.parsePattern);if(!mt)return null;let kt=d.valueCallback?d.valueCallback(mt[0]):mt[0];kt=z.valueCallback?z.valueCallback(kt):kt;const Dt=l.slice(J.length);return{value:kt,rest:Dt}}}const eft=/^(\d+)(th|st|nd|rd)?/i,rft=/\d+/i,nft={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ift={any:[/^b/i,/^(a|c)/i]},aft={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},oft={any:[/1/i,/2/i,/3/i,/4/i]},sft={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},lft={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},uft={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},cft={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},hft={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},fft={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},dft={ordinalNumber:tft({matchPattern:eft,parsePattern:rft,valueCallback:d=>parseInt(d,10)}),era:d2({matchPatterns:nft,defaultMatchWidth:"wide",parsePatterns:ift,defaultParseWidth:"any"}),quarter:d2({matchPatterns:aft,defaultMatchWidth:"wide",parsePatterns:oft,defaultParseWidth:"any",valueCallback:d=>d+1}),month:d2({matchPatterns:sft,defaultMatchWidth:"wide",parsePatterns:lft,defaultParseWidth:"any"}),day:d2({matchPatterns:uft,defaultMatchWidth:"wide",parsePatterns:cft,defaultParseWidth:"any"}),dayPeriod:d2({matchPatterns:hft,defaultMatchWidth:"any",parsePatterns:fft,defaultParseWidth:"any"})},zD={code:"en-US",formatDistance:Rht,formatLong:Uht,formatRelative:Hht,localize:Xht,match:dft,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pft(d,l){const z=Hu(d,l?.in);return AD(z,PD(z))+1}function ID(d,l){const z=Hu(d,l?.in),j=+__(z)-+fht(z);return Math.round(j/kD)+1}function _M(d,l){const z=Hu(d,l?.in),j=z.getFullYear(),J=zy(),mt=l?.firstWeekContainsDate??l?.locale?.options?.firstWeekContainsDate??J.firstWeekContainsDate??J.locale?.options?.firstWeekContainsDate??1,kt=Ad(l?.in||d,0);kt.setFullYear(j+1,0,mt),kt.setHours(0,0,0,0);const Dt=dg(kt,l),$t=Ad(l?.in||d,0);$t.setFullYear(j,0,mt),$t.setHours(0,0,0,0);const ee=dg($t,l);return+z>=+Dt?j+1:+z>=+ee?j:j-1}function mft(d,l){const z=zy(),j=l?.firstWeekContainsDate??l?.locale?.options?.firstWeekContainsDate??z.firstWeekContainsDate??z.locale?.options?.firstWeekContainsDate??1,J=_M(d,l),mt=Ad(l?.in||d,0);return mt.setFullYear(J,0,j),mt.setHours(0,0,0,0),dg(mt,l)}function OD(d,l){const z=Hu(d,l?.in),j=+dg(z,l)-+mft(z,l);return Math.round(j/kD)+1}function Kh(d,l){const z=d<0?"-":"",j=Math.abs(d).toString().padStart(l,"0");return z+j}const t1={y(d,l){const z=d.getFullYear(),j=z>0?z:1-z;return Kh(l==="yy"?j%100:j,l.length)},M(d,l){const z=d.getMonth();return l==="M"?String(z+1):Kh(z+1,2)},d(d,l){return Kh(d.getDate(),l.length)},a(d,l){const z=d.getHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return z.toUpperCase();case"aaa":return z;case"aaaaa":return z[0];case"aaaa":default:return z==="am"?"a.m.":"p.m."}},h(d,l){return Kh(d.getHours()%12||12,l.length)},H(d,l){return Kh(d.getHours(),l.length)},m(d,l){return Kh(d.getMinutes(),l.length)},s(d,l){return Kh(d.getSeconds(),l.length)},S(d,l){const z=l.length,j=d.getMilliseconds(),J=Math.trunc(j*Math.pow(10,z-3));return Kh(J,l.length)}},r_={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},lz={G:function(d,l,z){const j=d.getFullYear()>0?1:0;switch(l){case"G":case"GG":case"GGG":return z.era(j,{width:"abbreviated"});case"GGGGG":return z.era(j,{width:"narrow"});case"GGGG":default:return z.era(j,{width:"wide"})}},y:function(d,l,z){if(l==="yo"){const j=d.getFullYear(),J=j>0?j:1-j;return z.ordinalNumber(J,{unit:"year"})}return t1.y(d,l)},Y:function(d,l,z,j){const J=_M(d,j),mt=J>0?J:1-J;if(l==="YY"){const kt=mt%100;return Kh(kt,2)}return l==="Yo"?z.ordinalNumber(mt,{unit:"year"}):Kh(mt,l.length)},R:function(d,l){const z=TD(d);return Kh(z,l.length)},u:function(d,l){const z=d.getFullYear();return Kh(z,l.length)},Q:function(d,l,z){const j=Math.ceil((d.getMonth()+1)/3);switch(l){case"Q":return String(j);case"QQ":return Kh(j,2);case"Qo":return z.ordinalNumber(j,{unit:"quarter"});case"QQQ":return z.quarter(j,{width:"abbreviated",context:"formatting"});case"QQQQQ":return z.quarter(j,{width:"narrow",context:"formatting"});case"QQQQ":default:return z.quarter(j,{width:"wide",context:"formatting"})}},q:function(d,l,z){const j=Math.ceil((d.getMonth()+1)/3);switch(l){case"q":return String(j);case"qq":return Kh(j,2);case"qo":return z.ordinalNumber(j,{unit:"quarter"});case"qqq":return z.quarter(j,{width:"abbreviated",context:"standalone"});case"qqqqq":return z.quarter(j,{width:"narrow",context:"standalone"});case"qqqq":default:return z.quarter(j,{width:"wide",context:"standalone"})}},M:function(d,l,z){const j=d.getMonth();switch(l){case"M":case"MM":return t1.M(d,l);case"Mo":return z.ordinalNumber(j+1,{unit:"month"});case"MMM":return z.month(j,{width:"abbreviated",context:"formatting"});case"MMMMM":return z.month(j,{width:"narrow",context:"formatting"});case"MMMM":default:return z.month(j,{width:"wide",context:"formatting"})}},L:function(d,l,z){const j=d.getMonth();switch(l){case"L":return String(j+1);case"LL":return Kh(j+1,2);case"Lo":return z.ordinalNumber(j+1,{unit:"month"});case"LLL":return z.month(j,{width:"abbreviated",context:"standalone"});case"LLLLL":return z.month(j,{width:"narrow",context:"standalone"});case"LLLL":default:return z.month(j,{width:"wide",context:"standalone"})}},w:function(d,l,z,j){const J=OD(d,j);return l==="wo"?z.ordinalNumber(J,{unit:"week"}):Kh(J,l.length)},I:function(d,l,z){const j=ID(d);return l==="Io"?z.ordinalNumber(j,{unit:"week"}):Kh(j,l.length)},d:function(d,l,z){return l==="do"?z.ordinalNumber(d.getDate(),{unit:"date"}):t1.d(d,l)},D:function(d,l,z){const j=pft(d);return l==="Do"?z.ordinalNumber(j,{unit:"dayOfYear"}):Kh(j,l.length)},E:function(d,l,z){const j=d.getDay();switch(l){case"E":case"EE":case"EEE":return z.day(j,{width:"abbreviated",context:"formatting"});case"EEEEE":return z.day(j,{width:"narrow",context:"formatting"});case"EEEEEE":return z.day(j,{width:"short",context:"formatting"});case"EEEE":default:return z.day(j,{width:"wide",context:"formatting"})}},e:function(d,l,z,j){const J=d.getDay(),mt=(J-j.weekStartsOn+8)%7||7;switch(l){case"e":return String(mt);case"ee":return Kh(mt,2);case"eo":return z.ordinalNumber(mt,{unit:"day"});case"eee":return z.day(J,{width:"abbreviated",context:"formatting"});case"eeeee":return z.day(J,{width:"narrow",context:"formatting"});case"eeeeee":return z.day(J,{width:"short",context:"formatting"});case"eeee":default:return z.day(J,{width:"wide",context:"formatting"})}},c:function(d,l,z,j){const J=d.getDay(),mt=(J-j.weekStartsOn+8)%7||7;switch(l){case"c":return String(mt);case"cc":return Kh(mt,l.length);case"co":return z.ordinalNumber(mt,{unit:"day"});case"ccc":return z.day(J,{width:"abbreviated",context:"standalone"});case"ccccc":return z.day(J,{width:"narrow",context:"standalone"});case"cccccc":return z.day(J,{width:"short",context:"standalone"});case"cccc":default:return z.day(J,{width:"wide",context:"standalone"})}},i:function(d,l,z){const j=d.getDay(),J=j===0?7:j;switch(l){case"i":return String(J);case"ii":return Kh(J,l.length);case"io":return z.ordinalNumber(J,{unit:"day"});case"iii":return z.day(j,{width:"abbreviated",context:"formatting"});case"iiiii":return z.day(j,{width:"narrow",context:"formatting"});case"iiiiii":return z.day(j,{width:"short",context:"formatting"});case"iiii":default:return z.day(j,{width:"wide",context:"formatting"})}},a:function(d,l,z){const J=d.getHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"});case"aaa":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return z.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaa":default:return z.dayPeriod(J,{width:"wide",context:"formatting"})}},b:function(d,l,z){const j=d.getHours();let J;switch(j===12?J=r_.noon:j===0?J=r_.midnight:J=j/12>=1?"pm":"am",l){case"b":case"bb":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"});case"bbb":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return z.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbb":default:return z.dayPeriod(J,{width:"wide",context:"formatting"})}},B:function(d,l,z){const j=d.getHours();let J;switch(j>=17?J=r_.evening:j>=12?J=r_.afternoon:j>=4?J=r_.morning:J=r_.night,l){case"B":case"BB":case"BBB":return z.dayPeriod(J,{width:"abbreviated",context:"formatting"});case"BBBBB":return z.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBB":default:return z.dayPeriod(J,{width:"wide",context:"formatting"})}},h:function(d,l,z){if(l==="ho"){let j=d.getHours()%12;return j===0&&(j=12),z.ordinalNumber(j,{unit:"hour"})}return t1.h(d,l)},H:function(d,l,z){return l==="Ho"?z.ordinalNumber(d.getHours(),{unit:"hour"}):t1.H(d,l)},K:function(d,l,z){const j=d.getHours()%12;return l==="Ko"?z.ordinalNumber(j,{unit:"hour"}):Kh(j,l.length)},k:function(d,l,z){let j=d.getHours();return j===0&&(j=24),l==="ko"?z.ordinalNumber(j,{unit:"hour"}):Kh(j,l.length)},m:function(d,l,z){return l==="mo"?z.ordinalNumber(d.getMinutes(),{unit:"minute"}):t1.m(d,l)},s:function(d,l,z){return l==="so"?z.ordinalNumber(d.getSeconds(),{unit:"second"}):t1.s(d,l)},S:function(d,l){return t1.S(d,l)},X:function(d,l,z){const j=d.getTimezoneOffset();if(j===0)return"Z";switch(l){case"X":return cz(j);case"XXXX":case"XX":return my(j);case"XXXXX":case"XXX":default:return my(j,":")}},x:function(d,l,z){const j=d.getTimezoneOffset();switch(l){case"x":return cz(j);case"xxxx":case"xx":return my(j);case"xxxxx":case"xxx":default:return my(j,":")}},O:function(d,l,z){const j=d.getTimezoneOffset();switch(l){case"O":case"OO":case"OOO":return"GMT"+uz(j,":");case"OOOO":default:return"GMT"+my(j,":")}},z:function(d,l,z){const j=d.getTimezoneOffset();switch(l){case"z":case"zz":case"zzz":return"GMT"+uz(j,":");case"zzzz":default:return"GMT"+my(j,":")}},t:function(d,l,z){const j=Math.trunc(+d/1e3);return Kh(j,l.length)},T:function(d,l,z){return Kh(+d,l.length)}};function uz(d,l=""){const z=d>0?"-":"+",j=Math.abs(d),J=Math.trunc(j/60),mt=j%60;return mt===0?z+String(J):z+String(J)+l+Kh(mt,2)}function cz(d,l){return d%60===0?(d>0?"-":"+")+Kh(Math.abs(d)/60,2):my(d,l)}function my(d,l=""){const z=d>0?"-":"+",j=Math.abs(d),J=Kh(Math.trunc(j/60),2),mt=Kh(j%60,2);return z+J+l+mt}const hz=(d,l)=>{switch(d){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},DD=(d,l)=>{switch(d){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},gft=(d,l)=>{const z=d.match(/(P+)(p+)?/)||[],j=z[1],J=z[2];if(!J)return hz(d,l);let mt;switch(j){case"P":mt=l.dateTime({width:"short"});break;case"PP":mt=l.dateTime({width:"medium"});break;case"PPP":mt=l.dateTime({width:"long"});break;case"PPPP":default:mt=l.dateTime({width:"full"});break}return mt.replace("{{date}}",hz(j,l)).replace("{{time}}",DD(J,l))},AA={p:DD,P:gft},vft=/^D+$/,yft=/^Y+$/,xft=["D","DD","YY","YYYY"];function FD(d){return vft.test(d)}function RD(d){return yft.test(d)}function MA(d,l,z){const j=_ft(d,l,z);if(console.warn(j),xft.includes(d))throw new RangeError(j)}function _ft(d,l,z){const j=d[0]==="Y"?"years":"days of the month";return`Use \`${d.toLowerCase()}\` instead of \`${d}\` (in \`${l}\`) for formatting ${j} to the input \`${z}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const bft=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wft=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kft=/^'([^]*?)'?$/,Tft=/''/g,Aft=/[a-zA-Z]/;function Mft(d,l,z){const j=zy(),J=z?.locale??j.locale??zD,mt=z?.firstWeekContainsDate??z?.locale?.options?.firstWeekContainsDate??j.firstWeekContainsDate??j.locale?.options?.firstWeekContainsDate??1,kt=z?.weekStartsOn??z?.locale?.options?.weekStartsOn??j.weekStartsOn??j.locale?.options?.weekStartsOn??0,Dt=Hu(d,z?.in);if(!MD(Dt))throw new RangeError("Invalid time value");let $t=l.match(wft).map(pe=>{const Be=pe[0];if(Be==="p"||Be==="P"){const ir=AA[Be];return ir(pe,J.formatLong)}return pe}).join("").match(bft).map(pe=>{if(pe==="''")return{isToken:!1,value:"'"};const Be=pe[0];if(Be==="'")return{isToken:!1,value:Sft(pe)};if(lz[Be])return{isToken:!0,value:pe};if(Be.match(Aft))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Be+"`");return{isToken:!1,value:pe}});J.localize.preprocessor&&($t=J.localize.preprocessor(Dt,$t));const ee={firstWeekContainsDate:mt,weekStartsOn:kt,locale:J};return $t.map(pe=>{if(!pe.isToken)return pe.value;const Be=pe.value;(!z?.useAdditionalWeekYearTokens&&RD(Be)||!z?.useAdditionalDayOfYearTokens&&FD(Be))&&MA(Be,l,String(d));const ir=lz[Be[0]];return ir(Dt,Be,J.localize,ee)}).join("")}function Sft(d){const l=d.match(kft);return l?l[1].replace(Tft,"'"):d}function Eft(){return Object.assign({},zy())}function Cft(d,l){const z=Hu(d,l?.in).getDay();return z===0?7:z}function Lft(d,l){const z=Pft(l)?new l(0):Ad(l,0);return z.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()),z.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()),z}function Pft(d){return typeof d=="function"&&d.prototype?.constructor===d}const zft=10;class BD{subPriority=0;validate(l,z){return!0}}class Ift extends BD{constructor(l,z,j,J,mt){super(),this.value=l,this.validateValue=z,this.setValue=j,this.priority=J,mt&&(this.subPriority=mt)}validate(l,z){return this.validateValue(l,this.value,z)}set(l,z,j){return this.setValue(l,z,this.value,j)}}class Oft extends BD{priority=zft;subPriority=-1;constructor(l,z){super(),this.context=l||(j=>Ad(z,j))}set(l,z){return z.timestampIsSet?l:Ad(l,Lft(l,this.context))}}class Mh{run(l,z,j,J){const mt=this.parse(l,z,j,J);return mt?{setter:new Ift(mt.value,this.validate,this.set,this.priority,this.subPriority),rest:mt.rest}:null}validate(l,z,j){return!0}}class Dft extends Mh{priority=140;parse(l,z,j){switch(z){case"G":case"GG":case"GGG":return j.era(l,{width:"abbreviated"})||j.era(l,{width:"narrow"});case"GGGGG":return j.era(l,{width:"narrow"});case"GGGG":default:return j.era(l,{width:"wide"})||j.era(l,{width:"abbreviated"})||j.era(l,{width:"narrow"})}}set(l,z,j){return z.era=j,l.setFullYear(j,0,1),l.setHours(0,0,0,0),l}incompatibleTokens=["R","u","t","T"]}const Hd={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ug={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Wd(d,l){return d&&{value:l(d.value),rest:d.rest}}function ld(d,l){const z=l.match(d);return z?{value:parseInt(z[0],10),rest:l.slice(z[0].length)}:null}function cg(d,l){const z=l.match(d);if(!z)return null;if(z[0]==="Z")return{value:0,rest:l.slice(1)};const j=z[1]==="+"?1:-1,J=z[2]?parseInt(z[2],10):0,mt=z[3]?parseInt(z[3],10):0,kt=z[5]?parseInt(z[5],10):0;return{value:j*(J*cw+mt*uw+kt*uht),rest:l.slice(z[0].length)}}function ND(d){return ld(Hd.anyDigitsSigned,d)}function Md(d,l){switch(d){case 1:return ld(Hd.singleDigit,l);case 2:return ld(Hd.twoDigits,l);case 3:return ld(Hd.threeDigits,l);case 4:return ld(Hd.fourDigits,l);default:return ld(new RegExp("^\\d{1,"+d+"}"),l)}}function b4(d,l){switch(d){case 1:return ld(Hd.singleDigitSigned,l);case 2:return ld(Hd.twoDigitsSigned,l);case 3:return ld(Hd.threeDigitsSigned,l);case 4:return ld(Hd.fourDigitsSigned,l);default:return ld(new RegExp("^-?\\d{1,"+d+"}"),l)}}function bM(d){switch(d){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function jD(d,l){const z=l>0,j=z?l:1-l;let J;if(j<=50)J=d||100;else{const mt=j+50,kt=Math.trunc(mt/100)*100,Dt=d>=mt%100;J=d+kt-(Dt?100:0)}return z?J:1-J}function UD(d){return d%400===0||d%4===0&&d%100!==0}class Fft extends Mh{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(l,z,j){const J=mt=>({year:mt,isTwoDigitYear:z==="yy"});switch(z){case"y":return Wd(Md(4,l),J);case"yo":return Wd(j.ordinalNumber(l,{unit:"year"}),J);default:return Wd(Md(z.length,l),J)}}validate(l,z){return z.isTwoDigitYear||z.year>0}set(l,z,j){const J=l.getFullYear();if(j.isTwoDigitYear){const kt=jD(j.year,J);return l.setFullYear(kt,0,1),l.setHours(0,0,0,0),l}const mt=!("era"in z)||z.era===1?j.year:1-j.year;return l.setFullYear(mt,0,1),l.setHours(0,0,0,0),l}}class Rft extends Mh{priority=130;parse(l,z,j){const J=mt=>({year:mt,isTwoDigitYear:z==="YY"});switch(z){case"Y":return Wd(Md(4,l),J);case"Yo":return Wd(j.ordinalNumber(l,{unit:"year"}),J);default:return Wd(Md(z.length,l),J)}}validate(l,z){return z.isTwoDigitYear||z.year>0}set(l,z,j,J){const mt=_M(l,J);if(j.isTwoDigitYear){const Dt=jD(j.year,mt);return l.setFullYear(Dt,0,J.firstWeekContainsDate),l.setHours(0,0,0,0),dg(l,J)}const kt=!("era"in z)||z.era===1?j.year:1-j.year;return l.setFullYear(kt,0,J.firstWeekContainsDate),l.setHours(0,0,0,0),dg(l,J)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Bft extends Mh{priority=130;parse(l,z){return b4(z==="R"?4:z.length,l)}set(l,z,j){const J=Ad(l,0);return J.setFullYear(j,0,4),J.setHours(0,0,0,0),__(J)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Nft extends Mh{priority=130;parse(l,z){return b4(z==="u"?4:z.length,l)}set(l,z,j){return l.setFullYear(j,0,1),l.setHours(0,0,0,0),l}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class jft extends Mh{priority=120;parse(l,z,j){switch(z){case"Q":case"QQ":return Md(z.length,l);case"Qo":return j.ordinalNumber(l,{unit:"quarter"});case"QQQ":return j.quarter(l,{width:"abbreviated",context:"formatting"})||j.quarter(l,{width:"narrow",context:"formatting"});case"QQQQQ":return j.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return j.quarter(l,{width:"wide",context:"formatting"})||j.quarter(l,{width:"abbreviated",context:"formatting"})||j.quarter(l,{width:"narrow",context:"formatting"})}}validate(l,z){return z>=1&&z<=4}set(l,z,j){return l.setMonth((j-1)*3,1),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Uft extends Mh{priority=120;parse(l,z,j){switch(z){case"q":case"qq":return Md(z.length,l);case"qo":return j.ordinalNumber(l,{unit:"quarter"});case"qqq":return j.quarter(l,{width:"abbreviated",context:"standalone"})||j.quarter(l,{width:"narrow",context:"standalone"});case"qqqqq":return j.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return j.quarter(l,{width:"wide",context:"standalone"})||j.quarter(l,{width:"abbreviated",context:"standalone"})||j.quarter(l,{width:"narrow",context:"standalone"})}}validate(l,z){return z>=1&&z<=4}set(l,z,j){return l.setMonth((j-1)*3,1),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Vft extends Mh{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(l,z,j){const J=mt=>mt-1;switch(z){case"M":return Wd(ld(Hd.month,l),J);case"MM":return Wd(Md(2,l),J);case"Mo":return Wd(j.ordinalNumber(l,{unit:"month"}),J);case"MMM":return j.month(l,{width:"abbreviated",context:"formatting"})||j.month(l,{width:"narrow",context:"formatting"});case"MMMMM":return j.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return j.month(l,{width:"wide",context:"formatting"})||j.month(l,{width:"abbreviated",context:"formatting"})||j.month(l,{width:"narrow",context:"formatting"})}}validate(l,z){return z>=0&&z<=11}set(l,z,j){return l.setMonth(j,1),l.setHours(0,0,0,0),l}}class Hft extends Mh{priority=110;parse(l,z,j){const J=mt=>mt-1;switch(z){case"L":return Wd(ld(Hd.month,l),J);case"LL":return Wd(Md(2,l),J);case"Lo":return Wd(j.ordinalNumber(l,{unit:"month"}),J);case"LLL":return j.month(l,{width:"abbreviated",context:"standalone"})||j.month(l,{width:"narrow",context:"standalone"});case"LLLLL":return j.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return j.month(l,{width:"wide",context:"standalone"})||j.month(l,{width:"abbreviated",context:"standalone"})||j.month(l,{width:"narrow",context:"standalone"})}}validate(l,z){return z>=0&&z<=11}set(l,z,j){return l.setMonth(j,1),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Wft(d,l,z){const j=Hu(d,z?.in),J=OD(j,z)-l;return j.setDate(j.getDate()-J*7),Hu(j,z?.in)}class qft extends Mh{priority=100;parse(l,z,j){switch(z){case"w":return ld(Hd.week,l);case"wo":return j.ordinalNumber(l,{unit:"week"});default:return Md(z.length,l)}}validate(l,z){return z>=1&&z<=53}set(l,z,j,J){return dg(Wft(l,j,J),J)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Zft(d,l,z){const j=Hu(d,z?.in),J=ID(j,z)-l;return j.setDate(j.getDate()-J*7),j}class $ft extends Mh{priority=100;parse(l,z,j){switch(z){case"I":return ld(Hd.week,l);case"Io":return j.ordinalNumber(l,{unit:"week"});default:return Md(z.length,l)}}validate(l,z){return z>=1&&z<=53}set(l,z,j){return __(Zft(l,j))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Gft=[31,28,31,30,31,30,31,31,30,31,30,31],Yft=[31,29,31,30,31,30,31,31,30,31,30,31];class Kft extends Mh{priority=90;subPriority=1;parse(l,z,j){switch(z){case"d":return ld(Hd.date,l);case"do":return j.ordinalNumber(l,{unit:"date"});default:return Md(z.length,l)}}validate(l,z){const j=l.getFullYear(),J=UD(j),mt=l.getMonth();return J?z>=1&&z<=Yft[mt]:z>=1&&z<=Gft[mt]}set(l,z,j){return l.setDate(j),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Xft extends Mh{priority=90;subpriority=1;parse(l,z,j){switch(z){case"D":case"DD":return ld(Hd.dayOfYear,l);case"Do":return j.ordinalNumber(l,{unit:"date"});default:return Md(z.length,l)}}validate(l,z){const j=l.getFullYear();return UD(j)?z>=1&&z<=366:z>=1&&z<=365}set(l,z,j){return l.setMonth(0,j),l.setHours(0,0,0,0),l}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function wM(d,l,z){const j=zy(),J=z?.weekStartsOn??z?.locale?.options?.weekStartsOn??j.weekStartsOn??j.locale?.options?.weekStartsOn??0,mt=Hu(d,z?.in),kt=mt.getDay(),$t=(l%7+7)%7,ee=7-J,pe=l<0||l>6?l-(kt+ee)%7:($t+ee)%7-(kt+ee)%7;return X4(mt,pe,z)}class Jft extends Mh{priority=90;parse(l,z,j){switch(z){case"E":case"EE":case"EEE":return j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"});case"EEEEE":return j.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"});case"EEEE":default:return j.day(l,{width:"wide",context:"formatting"})||j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"})}}validate(l,z){return z>=0&&z<=6}set(l,z,j,J){return l=wM(l,j,J),l.setHours(0,0,0,0),l}incompatibleTokens=["D","i","e","c","t","T"]}class Qft extends Mh{priority=90;parse(l,z,j,J){const mt=kt=>{const Dt=Math.floor((kt-1)/7)*7;return(kt+J.weekStartsOn+6)%7+Dt};switch(z){case"e":case"ee":return Wd(Md(z.length,l),mt);case"eo":return Wd(j.ordinalNumber(l,{unit:"day"}),mt);case"eee":return j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"});case"eeeee":return j.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"});case"eeee":default:return j.day(l,{width:"wide",context:"formatting"})||j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"})}}validate(l,z){return z>=0&&z<=6}set(l,z,j,J){return l=wM(l,j,J),l.setHours(0,0,0,0),l}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class tdt extends Mh{priority=90;parse(l,z,j,J){const mt=kt=>{const Dt=Math.floor((kt-1)/7)*7;return(kt+J.weekStartsOn+6)%7+Dt};switch(z){case"c":case"cc":return Wd(Md(z.length,l),mt);case"co":return Wd(j.ordinalNumber(l,{unit:"day"}),mt);case"ccc":return j.day(l,{width:"abbreviated",context:"standalone"})||j.day(l,{width:"short",context:"standalone"})||j.day(l,{width:"narrow",context:"standalone"});case"ccccc":return j.day(l,{width:"narrow",context:"standalone"});case"cccccc":return j.day(l,{width:"short",context:"standalone"})||j.day(l,{width:"narrow",context:"standalone"});case"cccc":default:return j.day(l,{width:"wide",context:"standalone"})||j.day(l,{width:"abbreviated",context:"standalone"})||j.day(l,{width:"short",context:"standalone"})||j.day(l,{width:"narrow",context:"standalone"})}}validate(l,z){return z>=0&&z<=6}set(l,z,j,J){return l=wM(l,j,J),l.setHours(0,0,0,0),l}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function edt(d,l,z){const j=Hu(d,z?.in),J=Cft(j,z),mt=l-J;return X4(j,mt,z)}class rdt extends Mh{priority=90;parse(l,z,j){const J=mt=>mt===0?7:mt;switch(z){case"i":case"ii":return Md(z.length,l);case"io":return j.ordinalNumber(l,{unit:"day"});case"iii":return Wd(j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"}),J);case"iiiii":return Wd(j.day(l,{width:"narrow",context:"formatting"}),J);case"iiiiii":return Wd(j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"}),J);case"iiii":default:return Wd(j.day(l,{width:"wide",context:"formatting"})||j.day(l,{width:"abbreviated",context:"formatting"})||j.day(l,{width:"short",context:"formatting"})||j.day(l,{width:"narrow",context:"formatting"}),J)}}validate(l,z){return z>=1&&z<=7}set(l,z,j){return l=edt(l,j),l.setHours(0,0,0,0),l}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class ndt extends Mh{priority=80;parse(l,z,j){switch(z){case"a":case"aa":case"aaa":return j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaaa":return j.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return j.dayPeriod(l,{width:"wide",context:"formatting"})||j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"})}}set(l,z,j){return l.setHours(bM(j),0,0,0),l}incompatibleTokens=["b","B","H","k","t","T"]}class idt extends Mh{priority=80;parse(l,z,j){switch(z){case"b":case"bb":case"bbb":return j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbbb":return j.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return j.dayPeriod(l,{width:"wide",context:"formatting"})||j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"})}}set(l,z,j){return l.setHours(bM(j),0,0,0),l}incompatibleTokens=["a","B","H","k","t","T"]}class adt extends Mh{priority=80;parse(l,z,j){switch(z){case"B":case"BB":case"BBB":return j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBBB":return j.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return j.dayPeriod(l,{width:"wide",context:"formatting"})||j.dayPeriod(l,{width:"abbreviated",context:"formatting"})||j.dayPeriod(l,{width:"narrow",context:"formatting"})}}set(l,z,j){return l.setHours(bM(j),0,0,0),l}incompatibleTokens=["a","b","t","T"]}class odt extends Mh{priority=70;parse(l,z,j){switch(z){case"h":return ld(Hd.hour12h,l);case"ho":return j.ordinalNumber(l,{unit:"hour"});default:return Md(z.length,l)}}validate(l,z){return z>=1&&z<=12}set(l,z,j){const J=l.getHours()>=12;return J&&j<12?l.setHours(j+12,0,0,0):!J&&j===12?l.setHours(0,0,0,0):l.setHours(j,0,0,0),l}incompatibleTokens=["H","K","k","t","T"]}class sdt extends Mh{priority=70;parse(l,z,j){switch(z){case"H":return ld(Hd.hour23h,l);case"Ho":return j.ordinalNumber(l,{unit:"hour"});default:return Md(z.length,l)}}validate(l,z){return z>=0&&z<=23}set(l,z,j){return l.setHours(j,0,0,0),l}incompatibleTokens=["a","b","h","K","k","t","T"]}class ldt extends Mh{priority=70;parse(l,z,j){switch(z){case"K":return ld(Hd.hour11h,l);case"Ko":return j.ordinalNumber(l,{unit:"hour"});default:return Md(z.length,l)}}validate(l,z){return z>=0&&z<=11}set(l,z,j){return l.getHours()>=12&&j<12?l.setHours(j+12,0,0,0):l.setHours(j,0,0,0),l}incompatibleTokens=["h","H","k","t","T"]}class udt extends Mh{priority=70;parse(l,z,j){switch(z){case"k":return ld(Hd.hour24h,l);case"ko":return j.ordinalNumber(l,{unit:"hour"});default:return Md(z.length,l)}}validate(l,z){return z>=1&&z<=24}set(l,z,j){const J=j<=24?j%24:j;return l.setHours(J,0,0,0),l}incompatibleTokens=["a","b","h","H","K","t","T"]}class cdt extends Mh{priority=60;parse(l,z,j){switch(z){case"m":return ld(Hd.minute,l);case"mo":return j.ordinalNumber(l,{unit:"minute"});default:return Md(z.length,l)}}validate(l,z){return z>=0&&z<=59}set(l,z,j){return l.setMinutes(j,0,0),l}incompatibleTokens=["t","T"]}class hdt extends Mh{priority=50;parse(l,z,j){switch(z){case"s":return ld(Hd.second,l);case"so":return j.ordinalNumber(l,{unit:"second"});default:return Md(z.length,l)}}validate(l,z){return z>=0&&z<=59}set(l,z,j){return l.setSeconds(j,0),l}incompatibleTokens=["t","T"]}class fdt extends Mh{priority=30;parse(l,z){const j=J=>Math.trunc(J*Math.pow(10,-z.length+3));return Wd(Md(z.length,l),j)}set(l,z,j){return l.setMilliseconds(j),l}incompatibleTokens=["t","T"]}class ddt extends Mh{priority=10;parse(l,z){switch(z){case"X":return cg(ug.basicOptionalMinutes,l);case"XX":return cg(ug.basic,l);case"XXXX":return cg(ug.basicOptionalSeconds,l);case"XXXXX":return cg(ug.extendedOptionalSeconds,l);case"XXX":default:return cg(ug.extended,l)}}set(l,z,j){return z.timestampIsSet?l:Ad(l,l.getTime()-_4(l)-j)}incompatibleTokens=["t","T","x"]}class pdt extends Mh{priority=10;parse(l,z){switch(z){case"x":return cg(ug.basicOptionalMinutes,l);case"xx":return cg(ug.basic,l);case"xxxx":return cg(ug.basicOptionalSeconds,l);case"xxxxx":return cg(ug.extendedOptionalSeconds,l);case"xxx":default:return cg(ug.extended,l)}}set(l,z,j){return z.timestampIsSet?l:Ad(l,l.getTime()-_4(l)-j)}incompatibleTokens=["t","T","X"]}class mdt extends Mh{priority=40;parse(l){return ND(l)}set(l,z,j){return[Ad(l,j*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class gdt extends Mh{priority=20;parse(l){return ND(l)}set(l,z,j){return[Ad(l,j),{timestampIsSet:!0}]}incompatibleTokens="*"}const vdt={G:new Dft,y:new Fft,Y:new Rft,R:new Bft,u:new Nft,Q:new jft,q:new Uft,M:new Vft,L:new Hft,w:new qft,I:new $ft,d:new Kft,D:new Xft,E:new Jft,e:new Qft,c:new tdt,i:new rdt,a:new ndt,b:new idt,B:new adt,h:new odt,H:new sdt,K:new ldt,k:new udt,m:new cdt,s:new hdt,S:new fdt,X:new ddt,x:new pdt,t:new mdt,T:new gdt},ydt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xdt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_dt=/^'([^]*?)'?$/,bdt=/''/g,wdt=/\S/,kdt=/[a-zA-Z]/;function Tdt(d,l,z,j){const J=()=>Ad(j?.in||z,NaN),mt=Eft(),kt=j?.locale??mt.locale??zD,Dt=j?.firstWeekContainsDate??j?.locale?.options?.firstWeekContainsDate??mt.firstWeekContainsDate??mt.locale?.options?.firstWeekContainsDate??1,$t=j?.weekStartsOn??j?.locale?.options?.weekStartsOn??mt.weekStartsOn??mt.locale?.options?.weekStartsOn??0;if(!l)return d?J():Hu(z,j?.in);const ee={firstWeekContainsDate:Dt,weekStartsOn:$t,locale:kt},pe=[new Oft(j?.in,z)],Be=l.match(xdt).map(Wr=>{const Tn=Wr[0];if(Tn in AA){const Ft=AA[Tn];return Ft(Wr,kt.formatLong)}return Wr}).join("").match(ydt),ir=[];for(let Wr of Be){!j?.useAdditionalWeekYearTokens&&RD(Wr)&&MA(Wr,l,d),!j?.useAdditionalDayOfYearTokens&&FD(Wr)&&MA(Wr,l,d);const Tn=Wr[0],Ft=vdt[Tn];if(Ft){const{incompatibleTokens:wn}=Ft;if(Array.isArray(wn)){const jn=ir.find(ai=>wn.includes(ai.token)||ai.token===Tn);if(jn)throw new RangeError(`The format string mustn't contain \`${jn.fullToken}\` and \`${Wr}\` at the same time`)}else if(Ft.incompatibleTokens==="*"&&ir.length>0)throw new RangeError(`The format string mustn't contain \`${Wr}\` and any other token at the same time`);ir.push({token:Tn,fullToken:Wr});const ei=Ft.run(d,Wr,kt.match,ee);if(!ei)return J();pe.push(ei.setter),d=ei.rest}else{if(Tn.match(kdt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Tn+"`");if(Wr==="''"?Wr="'":Tn==="'"&&(Wr=Adt(Wr)),d.indexOf(Wr)===0)d=d.slice(Wr.length);else return J()}}if(d.length>0&&wdt.test(d))return J();const vr=pe.map(Wr=>Wr.priority).sort((Wr,Tn)=>Tn-Wr).filter((Wr,Tn,Ft)=>Ft.indexOf(Wr)===Tn).map(Wr=>pe.filter(Tn=>Tn.priority===Wr).sort((Tn,Ft)=>Ft.subPriority-Tn.subPriority)).map(Wr=>Wr[0]);let Ir=Hu(z,j?.in);if(isNaN(+Ir))return J();const Pr={};for(const Wr of vr){if(!Wr.validate(Ir,ee))return J();const Tn=Wr.set(Ir,Pr,ee);Array.isArray(Tn)?(Ir=Tn[0],Object.assign(Pr,Tn[1])):Ir=Tn}return Ir}function Adt(d){return d.match(_dt)[1].replace(bdt,"'")}function Mdt(d,l){const z=Hu(d,l?.in);return z.setMinutes(0,0,0),z}function Sdt(d,l){const z=Hu(d,l?.in);return z.setSeconds(0,0),z}function Edt(d,l){const z=Hu(d,l?.in);return z.setMilliseconds(0),z}function Cdt(d,l){const z=()=>Ad(l?.in,NaN),j=l?.additionalDigits??2,J=Idt(d);let mt;if(J.date){const ee=Odt(J.date,j);mt=Ddt(ee.restDateString,ee.year)}if(!mt||isNaN(+mt))return z();const kt=+mt;let Dt=0,$t;if(J.time&&(Dt=Fdt(J.time),isNaN(Dt)))return z();if(J.timezone){if($t=Rdt(J.timezone),isNaN($t))return z()}else{const ee=new Date(kt+Dt),pe=Hu(0,l?.in);return pe.setFullYear(ee.getUTCFullYear(),ee.getUTCMonth(),ee.getUTCDate()),pe.setHours(ee.getUTCHours(),ee.getUTCMinutes(),ee.getUTCSeconds(),ee.getUTCMilliseconds()),pe}return Hu(kt+Dt+$t,l?.in)}const V5={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Ldt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Pdt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,zdt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Idt(d){const l={},z=d.split(V5.dateTimeDelimiter);let j;if(z.length>2)return l;if(/:/.test(z[0])?j=z[0]:(l.date=z[0],j=z[1],V5.timeZoneDelimiter.test(l.date)&&(l.date=d.split(V5.timeZoneDelimiter)[0],j=d.substr(l.date.length,d.length))),j){const J=V5.timezone.exec(j);J?(l.time=j.replace(J[1],""),l.timezone=J[1]):l.time=j}return l}function Odt(d,l){const z=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+l)+"})|(\\d{2}|[+-]\\d{"+(2+l)+"})$)"),j=d.match(z);if(!j)return{year:NaN,restDateString:""};const J=j[1]?parseInt(j[1]):null,mt=j[2]?parseInt(j[2]):null;return{year:mt===null?J:mt*100,restDateString:d.slice((j[1]||j[2]).length)}}function Ddt(d,l){if(l===null)return new Date(NaN);const z=d.match(Ldt);if(!z)return new Date(NaN);const j=!!z[4],J=p2(z[1]),mt=p2(z[2])-1,kt=p2(z[3]),Dt=p2(z[4]),$t=p2(z[5])-1;if(j)return Vdt(l,Dt,$t)?Bdt(l,Dt,$t):new Date(NaN);{const ee=new Date(0);return!jdt(l,mt,kt)||!Udt(l,J)?new Date(NaN):(ee.setUTCFullYear(l,mt,Math.max(J,kt)),ee)}}function p2(d){return d?parseInt(d):1}function Fdt(d){const l=d.match(Pdt);if(!l)return NaN;const z=q8(l[1]),j=q8(l[2]),J=q8(l[3]);return Hdt(z,j,J)?z*cw+j*uw+J*1e3:NaN}function q8(d){return d&&parseFloat(d.replace(",","."))||0}function Rdt(d){if(d==="Z")return 0;const l=d.match(zdt);if(!l)return 0;const z=l[1]==="+"?-1:1,j=parseInt(l[2]),J=l[3]&&parseInt(l[3])||0;return Wdt(j,J)?z*(j*cw+J*uw):NaN}function Bdt(d,l,z){const j=new Date(0);j.setUTCFullYear(d,0,4);const J=j.getUTCDay()||7,mt=(l-1)*7+z+1-J;return j.setUTCDate(j.getUTCDate()+mt),j}const Ndt=[31,null,31,30,31,30,31,31,30,31,30,31];function VD(d){return d%400===0||d%4===0&&d%100!==0}function jdt(d,l,z){return l>=0&&l<=11&&z>=1&&z<=(Ndt[l]||(VD(d)?29:28))}function Udt(d,l){return l>=1&&l<=(VD(d)?366:365)}function Vdt(d,l,z){return l>=1&&l<=53&&z>=0&&z<=6}function Hdt(d,l,z){return d===24?l===0&&z===0:z>=0&&z<60&&l>=0&&l<60&&d>=0&&d<25}function Wdt(d,l){return l>=0&&l<=59}/*! +`):d}function jht(d,s){const{element:E,datasetIndex:B,index:K}=s,pt=d.getDatasetMeta(B).controller,{label:_t,value:Ot}=pt.getLabelAndValue(K);return{chart:d,label:_t,parsed:pt.getParsed(K),raw:d.data.datasets[B].data[K],formattedValue:Ot,dataset:pt.getDataset(),dataIndex:K,datasetIndex:B,element:E}}function uI(d,s){const E=d.chart.ctx,{body:B,footer:K,title:pt}=d,{boxWidth:_t,boxHeight:Ot}=s,jt=Qp(s.bodyFont),te=Qp(s.titleFont),he=Qp(s.footerFont),De=pt.length,er=K.length,pr=B.length,Mr=fm(s.padding);let Tr=Mr.height,Vr=0,mn=B.reduce((Jn,Bn)=>Jn+Bn.before.length+Bn.lines.length+Bn.after.length,0);if(mn+=d.beforeBody.length+d.afterBody.length,De&&(Tr+=De*te.lineHeight+(De-1)*s.titleSpacing+s.titleMarginBottom),mn){const Jn=s.displayColors?Math.max(Ot,jt.lineHeight):jt.lineHeight;Tr+=pr*Jn+(mn-pr)*jt.lineHeight+(mn-1)*s.bodySpacing}er&&(Tr+=s.footerMarginTop+er*he.lineHeight+(er-1)*s.footerSpacing);let Dt=0;const cn=function(Jn){Vr=Math.max(Vr,E.measureText(Jn).width+Dt)};return E.save(),E.font=te.string,Xh(d.title,cn),E.font=jt.string,Xh(d.beforeBody.concat(d.afterBody),cn),Dt=s.displayColors?_t+2+s.boxPadding:0,Xh(B,Jn=>{Xh(Jn.before,cn),Xh(Jn.lines,cn),Xh(Jn.after,cn)}),Dt=0,E.font=he.string,Xh(d.footer,cn),E.restore(),Vr+=Mr.width,{width:Vr,height:Tr}}function Uht(d,s){const{y:E,height:B}=s;return Ed.height-B/2?"bottom":"center"}function Vht(d,s,E,B){const{x:K,width:pt}=B,_t=E.caretSize+E.caretPadding;if(d==="left"&&K+pt+_t>s.width||d==="right"&&K-pt-_t<0)return!0}function Hht(d,s,E,B){const{x:K,width:pt}=E,{width:_t,chartArea:{left:Ot,right:jt}}=d;let te="center";return B==="center"?te=K<=(Ot+jt)/2?"left":"right":K<=pt/2?te="left":K>=_t-pt/2&&(te="right"),Vht(te,d,s,E)&&(te="center"),te}function cI(d,s,E){const B=E.yAlign||s.yAlign||Uht(d,E);return{xAlign:E.xAlign||s.xAlign||Hht(d,s,E,B),yAlign:B}}function Wht(d,s){let{x:E,width:B}=d;return s==="right"?E-=B:s==="center"&&(E-=B/2),E}function qht(d,s,E){let{y:B,height:K}=d;return s==="top"?B+=E:s==="bottom"?B-=K+E:B-=K/2,B}function hI(d,s,E,B){const{caretSize:K,caretPadding:pt,cornerRadius:_t}=d,{xAlign:Ot,yAlign:jt}=E,te=K+pt,{topLeft:he,topRight:De,bottomLeft:er,bottomRight:pr}=h_(_t);let Mr=Wht(s,Ot);const Tr=qht(s,jt,te);return jt==="center"?Ot==="left"?Mr+=te:Ot==="right"&&(Mr-=te):Ot==="left"?Mr-=Math.max(he,er)+K:Ot==="right"&&(Mr+=Math.max(De,pr)+K),{x:Jp(Mr,0,B.width-s.width),y:Jp(Tr,0,B.height-s.height)}}function q5(d,s,E){const B=fm(E.padding);return s==="center"?d.x+d.width/2:s==="right"?d.x+d.width-B.right:d.x+B.left}function fI(d){return sg([],Xg(d))}function $ht(d,s,E){return zy(d,{tooltip:s,tooltipItems:E,type:"tooltip"})}function dI(d,s){const E=s&&s.dataset&&s.dataset.tooltip&&s.dataset.tooltip.callbacks;return E?d.override(E):d}const qD={beforeTitle:Yg,title(d){if(d.length>0){const s=d[0],E=s.chart.data.labels,B=E?E.length:0;if(this&&this.options&&this.options.mode==="dataset")return s.dataset.label||"";if(s.label)return s.label;if(B>0&&s.dataIndex"u"?qD[s].call(E,B):K}class pI extends lv{static positioners=_2;constructor(s){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=s.chart,this.options=s.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(s){this.options=s,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const s=this._cachedAnimations;if(s)return s;const E=this.chart,B=this.options.setContext(this.getContext()),K=B.enabled&&E.options.animation&&B.animations,pt=new AD(this.chart,K);return K._cacheable&&(this._cachedAnimations=Object.freeze(pt)),pt}getContext(){return this.$context||(this.$context=$ht(this.chart.getContext(),this,this._tooltipItems))}getTitle(s,E){const{callbacks:B}=E,K=A0(B,"beforeTitle",this,s),pt=A0(B,"title",this,s),_t=A0(B,"afterTitle",this,s);let Ot=[];return Ot=sg(Ot,Xg(K)),Ot=sg(Ot,Xg(pt)),Ot=sg(Ot,Xg(_t)),Ot}getBeforeBody(s,E){return fI(A0(E.callbacks,"beforeBody",this,s))}getBody(s,E){const{callbacks:B}=E,K=[];return Xh(s,pt=>{const _t={before:[],lines:[],after:[]},Ot=dI(B,pt);sg(_t.before,Xg(A0(Ot,"beforeLabel",this,pt))),sg(_t.lines,A0(Ot,"label",this,pt)),sg(_t.after,Xg(A0(Ot,"afterLabel",this,pt))),K.push(_t)}),K}getAfterBody(s,E){return fI(A0(E.callbacks,"afterBody",this,s))}getFooter(s,E){const{callbacks:B}=E,K=A0(B,"beforeFooter",this,s),pt=A0(B,"footer",this,s),_t=A0(B,"afterFooter",this,s);let Ot=[];return Ot=sg(Ot,Xg(K)),Ot=sg(Ot,Xg(pt)),Ot=sg(Ot,Xg(_t)),Ot}_createItems(s){const E=this._active,B=this.chart.data,K=[],pt=[],_t=[];let Ot=[],jt,te;for(jt=0,te=E.length;jts.filter(he,De,er,B))),s.itemSort&&(Ot=Ot.sort((he,De)=>s.itemSort(he,De,B))),Xh(Ot,he=>{const De=dI(s.callbacks,he);K.push(A0(De,"labelColor",this,he)),pt.push(A0(De,"labelPointStyle",this,he)),_t.push(A0(De,"labelTextColor",this,he))}),this.labelColors=K,this.labelPointStyles=pt,this.labelTextColors=_t,this.dataPoints=Ot,Ot}update(s,E){const B=this.options.setContext(this.getContext()),K=this._active;let pt,_t=[];if(!K.length)this.opacity!==0&&(pt={opacity:0});else{const Ot=_2[B.position].call(this,K,this._eventPosition);_t=this._createItems(B),this.title=this.getTitle(_t,B),this.beforeBody=this.getBeforeBody(_t,B),this.body=this.getBody(_t,B),this.afterBody=this.getAfterBody(_t,B),this.footer=this.getFooter(_t,B);const jt=this._size=uI(this,B),te=Object.assign({},Ot,jt),he=cI(this.chart,B,te),De=hI(B,te,he,this.chart);this.xAlign=he.xAlign,this.yAlign=he.yAlign,pt={opacity:1,x:De.x,y:De.y,width:jt.width,height:jt.height,caretX:Ot.x,caretY:Ot.y}}this._tooltipItems=_t,this.$context=void 0,pt&&this._resolveAnimations().update(this,pt),s&&B.external&&B.external.call(this,{chart:this.chart,tooltip:this,replay:E})}drawCaret(s,E,B,K){const pt=this.getCaretPosition(s,B,K);E.lineTo(pt.x1,pt.y1),E.lineTo(pt.x2,pt.y2),E.lineTo(pt.x3,pt.y3)}getCaretPosition(s,E,B){const{xAlign:K,yAlign:pt}=this,{caretSize:_t,cornerRadius:Ot}=B,{topLeft:jt,topRight:te,bottomLeft:he,bottomRight:De}=h_(Ot),{x:er,y:pr}=s,{width:Mr,height:Tr}=E;let Vr,mn,Dt,cn,Jn,Bn;return pt==="center"?(Jn=pr+Tr/2,K==="left"?(Vr=er,mn=Vr-_t,cn=Jn+_t,Bn=Jn-_t):(Vr=er+Mr,mn=Vr+_t,cn=Jn-_t,Bn=Jn+_t),Dt=Vr):(K==="left"?mn=er+Math.max(jt,he)+_t:K==="right"?mn=er+Mr-Math.max(te,De)-_t:mn=this.caretX,pt==="top"?(cn=pr,Jn=cn-_t,Vr=mn-_t,Dt=mn+_t):(cn=pr+Tr,Jn=cn+_t,Vr=mn+_t,Dt=mn-_t),Bn=cn),{x1:Vr,x2:mn,x3:Dt,y1:cn,y2:Jn,y3:Bn}}drawTitle(s,E,B){const K=this.title,pt=K.length;let _t,Ot,jt;if(pt){const te=f_(B.rtl,this.x,this.width);for(s.x=q5(this,B.titleAlign,B),E.textAlign=te.textAlign(B.titleAlign),E.textBaseline="middle",_t=Qp(B.titleFont),Ot=B.titleSpacing,E.fillStyle=B.titleColor,E.font=_t.string,jt=0;jtDt!==0)?(s.beginPath(),s.fillStyle=pt.multiKeyBackground,b4(s,{x:Tr,y:Mr,w:te,h:jt,radius:mn}),s.fill(),s.stroke(),s.fillStyle=_t.backgroundColor,s.beginPath(),b4(s,{x:Vr,y:Mr+1,w:te-2,h:jt-2,radius:mn}),s.fill()):(s.fillStyle=pt.multiKeyBackground,s.fillRect(Tr,Mr,te,jt),s.strokeRect(Tr,Mr,te,jt),s.fillStyle=_t.backgroundColor,s.fillRect(Vr,Mr+1,te-2,jt-2))}s.fillStyle=this.labelTextColors[B]}drawBody(s,E,B){const{body:K}=this,{bodySpacing:pt,bodyAlign:_t,displayColors:Ot,boxHeight:jt,boxWidth:te,boxPadding:he}=B,De=Qp(B.bodyFont);let er=De.lineHeight,pr=0;const Mr=f_(B.rtl,this.x,this.width),Tr=function(Un){E.fillText(Un,Mr.x(s.x+pr),s.y+er/2),s.y+=er+pt},Vr=Mr.textAlign(_t);let mn,Dt,cn,Jn,Bn,ni,Wi;for(E.textAlign=_t,E.textBaseline="middle",E.font=De.string,s.x=q5(this,Vr,B),E.fillStyle=B.bodyColor,Xh(this.beforeBody,Tr),pr=Ot&&Vr!=="right"?_t==="center"?te/2+he:te+2+he:0,Jn=0,ni=K.length;Jn0&&E.stroke()}_updateAnimationTarget(s){const E=this.chart,B=this.$animations,K=B&&B.x,pt=B&&B.y;if(K||pt){const _t=_2[s.position].call(this,this._active,this._eventPosition);if(!_t)return;const Ot=this._size=uI(this,s),jt=Object.assign({},_t,this._size),te=cI(E,s,jt),he=hI(s,jt,te,E);(K._to!==he.x||pt._to!==he.y)&&(this.xAlign=te.xAlign,this.yAlign=te.yAlign,this.width=Ot.width,this.height=Ot.height,this.caretX=_t.x,this.caretY=_t.y,this._resolveAnimations().update(this,he))}}_willRender(){return!!this.opacity}draw(s){const E=this.options.setContext(this.getContext());let B=this.opacity;if(!B)return;this._updateAnimationTarget(E);const K={width:this.width,height:this.height},pt={x:this.x,y:this.y};B=Math.abs(B)<.001?0:B;const _t=fm(E.padding),Ot=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;E.enabled&&Ot&&(s.save(),s.globalAlpha=B,this.drawBackground(pt,s,K,E),xD(s,E.textDirection),pt.y+=_t.top,this.drawTitle(pt,s,E),this.drawBody(pt,s,E),this.drawFooter(pt,s,E),_D(s,E.textDirection),s.restore())}getActiveElements(){return this._active||[]}setActiveElements(s,E){const B=this._active,K=s.map(({datasetIndex:Ot,index:jt})=>{const te=this.chart.getDatasetMeta(Ot);if(!te)throw new Error("Cannot find a dataset at index "+Ot);return{datasetIndex:Ot,element:te.data[jt],index:jt}}),pt=!y4(B,K),_t=this._positionChanged(K,E);(pt||_t)&&(this._active=K,this._eventPosition=E,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(s,E,B=!0){if(E&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const K=this.options,pt=this._active||[],_t=this._getActiveElements(s,pt,E,B),Ot=this._positionChanged(_t,s),jt=E||!y4(_t,pt)||Ot;return jt&&(this._active=_t,(K.enabled||K.external)&&(this._eventPosition={x:s.x,y:s.y},this.update(!0,E))),jt}_getActiveElements(s,E,B,K){const pt=this.options;if(s.type==="mouseout")return[];if(!K)return E.filter(Ot=>this.chart.data.datasets[Ot.datasetIndex]&&this.chart.getDatasetMeta(Ot.datasetIndex).controller.getParsed(Ot.index)!==void 0);const _t=this.chart.getElementsAtEventForMode(s,pt.mode,pt,B);return pt.reverse&&_t.reverse(),_t}_positionChanged(s,E){const{caretX:B,caretY:K,options:pt}=this,_t=_2[pt.position].call(this,s,E);return _t!==!1&&(B!==_t.x||K!==_t.y)}}var Zht={id:"tooltip",_element:pI,positioners:_2,afterInit(d,s,E){E&&(d.tooltip=new pI({chart:d,options:E}))},beforeUpdate(d,s,E){d.tooltip&&d.tooltip.initialize(E)},reset(d,s,E){d.tooltip&&d.tooltip.initialize(E)},afterDraw(d){const s=d.tooltip;if(s&&s._willRender()){const E={tooltip:s};if(d.notifyPlugins("beforeTooltipDraw",{...E,cancelable:!0})===!1)return;s.draw(d.ctx),d.notifyPlugins("afterTooltipDraw",E)}},afterEvent(d,s){if(d.tooltip){const E=s.replay;d.tooltip.handleEvent(s.event,E,s.inChartArea)&&(s.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(d,s)=>s.bodyFont.size,boxWidth:(d,s)=>s.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:qD},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:d=>d!=="filter"&&d!=="itemSort"&&d!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Ght=(d,s,E,B)=>(typeof s=="string"?(E=d.push(s)-1,B.unshift({index:E,label:s})):isNaN(s)&&(E=null),E);function Yht(d,s,E,B){const K=d.indexOf(s);if(K===-1)return Ght(d,s,E,B);const pt=d.lastIndexOf(s);return K!==pt?E:K}const Kht=(d,s)=>d===null?null:Jp(Math.round(d),0,s);function mI(d){const s=this.getLabels();return d>=0&&dE.length-1?null:this.getPixelForValue(E[s].value)}getValueForPixel(s){return Math.round(this._startValue+this.getDecimalForPixel(s)*this._valueRange)}getBasePixel(){return this.bottom}}function Jht(d,s){const E=[],{bounds:K,step:pt,min:_t,max:Ot,precision:jt,count:te,maxTicks:he,maxDigits:De,includeBounds:er}=d,pr=pt||1,Mr=he-1,{min:Tr,max:Vr}=s,mn=!Bh(_t),Dt=!Bh(Ot),cn=!Bh(te),Jn=(Vr-Tr)/(De+1);let Bn=hP((Vr-Tr)/Mr/pr)*pr,ni,Wi,Un,qr;if(Bn<1e-14&&!mn&&!Dt)return[{value:Tr},{value:Vr}];qr=Math.ceil(Vr/Bn)-Math.floor(Tr/Bn),qr>Mr&&(Bn=hP(qr*Bn/Mr/pr)*pr),Bh(jt)||(ni=Math.pow(10,jt),Bn=Math.ceil(Bn*ni)/ni),K==="ticks"?(Wi=Math.floor(Tr/Bn)*Bn,Un=Math.ceil(Vr/Bn)*Bn):(Wi=Tr,Un=Vr),mn&&Dt&&pt&&Yst((Ot-_t)/pt,Bn/1e3)?(qr=Math.round(Math.min((Ot-_t)/Bn,he)),Bn=(Ot-_t)/qr,Wi=_t,Un=Ot):cn?(Wi=mn?_t:Wi,Un=Dt?Ot:Un,qr=te-1,Bn=(Un-Wi)/qr):(qr=(Un-Wi)/Bn,P2(qr,Math.round(qr),Bn/1e3)?qr=Math.round(qr):qr=Math.ceil(qr));const Di=Math.max(fP(Bn),fP(Wi));ni=Math.pow(10,Bh(jt)?Di:jt),Wi=Math.round(Wi*ni)/ni,Un=Math.round(Un*ni)/ni;let Fi=0;for(mn&&(er&&Wi!==_t?(E.push({value:_t}),Wi<_t&&Fi++,P2(Math.round((Wi+Fi*Bn)*ni)/ni,_t,gI(_t,Jn,d))&&Fi++):Wi<_t&&Fi++);FiOt)break;E.push({value:Pi})}return Dt&&er&&Un!==Ot?E.length&&P2(E[E.length-1].value,Ot,gI(Ot,Jn,d))?E[E.length-1].value=Ot:E.push({value:Ot}):(!Dt||Un===Ot)&&E.push({value:Un}),E}function gI(d,s,{horizontal:E,minRotation:B}){const K=rv(B),pt=(E?Math.sin(K):Math.cos(K))||.001,_t=.75*s*(""+d).length;return Math.min(s/pt,_t)}class Qht extends T_{constructor(s){super(s),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(s,E){return Bh(s)||(typeof s=="number"||s instanceof Number)&&!isFinite(+s)?null:+s}handleTickRangeOptions(){const{beginAtZero:s}=this.options,{minDefined:E,maxDefined:B}=this.getUserBounds();let{min:K,max:pt}=this;const _t=jt=>K=E?K:jt,Ot=jt=>pt=B?pt:jt;if(s){const jt=pg(K),te=pg(pt);jt<0&&te<0?Ot(0):jt>0&&te>0&&_t(0)}if(K===pt){let jt=pt===0?1:Math.abs(pt*.05);Ot(pt+jt),s||_t(K-jt)}this.min=K,this.max=pt}getTickLimit(){const s=this.options.ticks;let{maxTicksLimit:E,stepSize:B}=s,K;return B?(K=Math.ceil(this.max/B)-Math.floor(this.min/B)+1,K>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${B} would result generating up to ${K} ticks. Limiting to 1000.`),K=1e3)):(K=this.computeTickLimit(),E=E||11),E&&(K=Math.min(E,K)),K}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const s=this.options,E=s.ticks;let B=this.getTickLimit();B=Math.max(2,B);const K={maxTicks:B,bounds:s.bounds,min:s.min,max:s.max,precision:E.precision,step:E.stepSize,count:E.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:E.minRotation||0,includeBounds:E.includeBounds!==!1},pt=this._range||this,_t=Jht(K,pt);return s.bounds==="ticks"&&Kst(_t,this,"value"),s.reverse?(_t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),_t}configure(){const s=this.ticks;let E=this.min,B=this.max;if(super.configure(),this.options.offset&&s.length){const K=(B-E)/Math.max(s.length-1,1)/2;E-=K,B+=K}this._startValue=E,this._endValue=B,this._valueRange=B-E}getLabelForValue(s){return bM(s,this.chart.options.locale,this.options.ticks.format)}}class tft extends Qht{static id="linear";static defaults={ticks:{callback:hD.formatters.numeric}};determineDataLimits(){const{min:s,max:E}=this.getMinMax(!0);this.min=t0(s)?s:0,this.max=t0(E)?E:1,this.handleTickRangeOptions()}computeTickLimit(){const s=this.isHorizontal(),E=s?this.width:this.height,B=rv(this.options.ticks.minRotation),K=(s?Math.sin(B):Math.cos(B))||.001,pt=this._resolveTickFontOptions(0);return Math.ceil(E/Math.min(40,pt.lineHeight/K))}getPixelForValue(s){return s===null?NaN:this.getPixelForDecimal((s-this._startValue)/this._valueRange)}getValueForPixel(s){return this._startValue+this.getDecimalForPixel(s)*this._valueRange}}const e6={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},M0=Object.keys(e6);function vI(d,s){return d-s}function yI(d,s){if(Bh(s))return null;const E=d._adapter,{parser:B,round:K,isoWeekday:pt}=d._parseOpts;let _t=s;return typeof B=="function"&&(_t=B(_t)),t0(_t)||(_t=typeof B=="string"?E.parse(_t,B):E.parse(_t)),_t===null?null:(K&&(_t=K==="week"&&(G2(pt)||pt===!0)?E.startOf(_t,"isoWeek",pt):E.startOf(_t,K)),+_t)}function xI(d,s,E,B){const K=M0.length;for(let pt=M0.indexOf(d);pt=M0.indexOf(E);pt--){const _t=M0[pt];if(e6[_t].common&&d._adapter.diff(K,B,_t)>=s-1)return _t}return M0[E?M0.indexOf(E):0]}function rft(d){for(let s=M0.indexOf(d)+1,E=M0.length;s=s?E[B]:E[K];d[pt]=!0}}function nft(d,s,E,B){const K=d._adapter,pt=+K.startOf(s[0].value,B),_t=s[s.length-1].value;let Ot,jt;for(Ot=pt;Ot<=_t;Ot=+K.add(Ot,1,B))jt=E[Ot],jt>=0&&(s[jt].major=!0);return s}function bI(d,s,E){const B=[],K={},pt=s.length;let _t,Ot;for(_t=0;_t+s.value))}initOffsets(s=[]){let E=0,B=0,K,pt;this.options.offset&&s.length&&(K=this.getDecimalForValue(s[0]),s.length===1?E=1-K:E=(this.getDecimalForValue(s[1])-K)/2,pt=this.getDecimalForValue(s[s.length-1]),s.length===1?B=pt:B=(pt-this.getDecimalForValue(s[s.length-2]))/2);const _t=s.length<3?.5:.25;E=Jp(E,0,_t),B=Jp(B,0,_t),this._offsets={start:E,end:B,factor:1/(E+1+B)}}_generate(){const s=this._adapter,E=this.min,B=this.max,K=this.options,pt=K.time,_t=pt.unit||xI(pt.minUnit,E,B,this._getLabelCapacity(E)),Ot=cc(K.ticks.stepSize,1),jt=_t==="week"?pt.isoWeekday:!1,te=G2(jt)||jt===!0,he={};let De=E,er,pr;if(te&&(De=+s.startOf(De,"isoWeek",jt)),De=+s.startOf(De,te?"day":_t),s.diff(B,E,_t)>1e5*Ot)throw new Error(E+" and "+B+" are too far apart with stepSize of "+Ot+" "+_t);const Mr=K.ticks.source==="data"&&this.getDataTimestamps();for(er=De,pr=0;er+Tr)}getLabelForValue(s){const E=this._adapter,B=this.options.time;return B.tooltipFormat?E.format(s,B.tooltipFormat):E.format(s,B.displayFormats.datetime)}format(s,E){const K=this.options.time.displayFormats,pt=this._unit,_t=E||K[pt];return this._adapter.format(s,_t)}_tickFormatFunction(s,E,B,K){const pt=this.options,_t=pt.ticks.callback;if(_t)return Df(_t,[s,E,B],this);const Ot=pt.time.displayFormats,jt=this._unit,te=this._majorUnit,he=jt&&Ot[jt],De=te&&Ot[te],er=B[E],pr=te&&De&&er&&er.major;return this._adapter.format(s,K||(pr?De:he))}generateTickLabels(s){let E,B,K;for(E=0,B=s.length;E0?Ot:1}getDataTimestamps(){let s=this._cache.data||[],E,B;if(s.length)return s;const K=this.getMatchingVisibleMetas();if(this._normalized&&K.length)return this._cache.data=K[0].controller.getAllParsedValues(this);for(E=0,B=K.length;E=d[B].pos&&s<=d[K].pos&&({lo:B,hi:K}=by(d,"pos",s)),{pos:pt,time:Ot}=d[B],{pos:_t,time:jt}=d[K]):(s>=d[B].time&&s<=d[K].time&&({lo:B,hi:K}=by(d,"time",s)),{time:pt,pos:Ot}=d[B],{time:_t,pos:jt}=d[K]);const te=_t-pt;return te?Ot+(jt-Ot)*(s-pt)/te:Ot}class q1t extends OA{static id="timeseries";static defaults=OA.defaults;constructor(s){super(s),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const s=this._getTimestampsForTable(),E=this._table=this.buildLookupTable(s);this._minPos=$5(E,this.min),this._tableRange=$5(E,this.max)-this._minPos,super.initOffsets(s)}buildLookupTable(s){const{min:E,max:B}=this,K=[],pt=[];let _t,Ot,jt,te,he;for(_t=0,Ot=s.length;_t=E&&te<=B&&K.push(te);if(K.length<2)return[{time:E,pos:0},{time:B,pos:1}];for(_t=0,Ot=K.length;_tK-pt)}_getTimestampsForTable(){let s=this._cache.all||[];if(s.length)return s;const E=this.getDataTimestamps(),B=this.getLabelTimestamps();return E.length&&B.length?s=this.normalize(E.concat(B)):s=E.length?E:B,s=this._cache.all=s,s}getDecimalForValue(s){return($5(this._table,s)-this._minPos)/this._tableRange}getValueForPixel(s){const E=this._offsets,B=this.getDecimalForPixel(s)/E.factor-E.end;return $5(this._table,B*this._tableRange+this._minPos,!0)}}const $D=6048e5,ift=864e5,uw=6e4,cw=36e5,aft=1e3,wI=Symbol.for("constructDateFrom");function bd(d,s){return typeof d=="function"?d(s):d&&typeof d=="object"&&wI in d?d[wI](s):d instanceof Date?new d.constructor(s):new Date(s)}function Hu(d,s){return bd(s||d,d)}function r6(d,s,E){const B=Hu(d,E?.in);return isNaN(s)?bd(E?.in||d,NaN):(s&&B.setDate(B.getDate()+s),B)}function CM(d,s,E){const B=Hu(d,E?.in);if(isNaN(s))return bd(d,NaN);if(!s)return B;const K=B.getDate(),pt=bd(d,B.getTime());pt.setMonth(B.getMonth()+s+1,0);const _t=pt.getDate();return K>=_t?pt:(B.setFullYear(pt.getFullYear(),pt.getMonth(),K),B)}function LM(d,s,E){return bd(d,+Hu(d)+s)}function oft(d,s,E){return LM(d,s*cw)}let sft={};function Oy(){return sft}function mg(d,s){const E=Oy(),B=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??E.weekStartsOn??E.locale?.options?.weekStartsOn??0,K=Hu(d,s?.in),pt=K.getDay(),_t=(pt=pt.getTime()?B+1:E.getTime()>=Ot.getTime()?B:B-1}function A4(d){const s=Hu(d),E=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()));return E.setUTCFullYear(s.getFullYear()),+d-+E}function Dy(d,...s){const E=bd.bind(null,s.find(B=>typeof B=="object"));return s.map(E)}function DA(d,s){const E=Hu(d,s?.in);return E.setHours(0,0,0,0),E}function GD(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=DA(B),_t=DA(K),Ot=+pt-A4(pt),jt=+_t-A4(_t);return Math.round((Ot-jt)/ift)}function lft(d,s){const E=ZD(d,s),B=bd(d,0);return B.setFullYear(E,0,4),B.setHours(0,0,0,0),b_(B)}function uft(d,s,E){const B=Hu(d,E?.in);return B.setTime(B.getTime()+s*uw),B}function cft(d,s,E){return CM(d,s*3,E)}function hft(d,s,E){return LM(d,s*1e3)}function fft(d,s,E){return r6(d,s*7,E)}function dft(d,s,E){return CM(d,s*12,E)}function O2(d,s){const E=+Hu(d)-+Hu(s);return E<0?-1:E>0?1:E}function pft(d){return d instanceof Date||typeof d=="object"&&Object.prototype.toString.call(d)==="[object Date]"}function YD(d){return!(!pft(d)&&typeof d!="number"||isNaN(+Hu(d)))}function mft(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=B.getFullYear()-K.getFullYear(),_t=B.getMonth()-K.getMonth();return pt*12+_t}function gft(d,s,E){const[B,K]=Dy(E?.in,d,s);return B.getFullYear()-K.getFullYear()}function KD(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=kI(B,K),_t=Math.abs(GD(B,K));B.setDate(B.getDate()-pt*_t);const Ot=+(kI(B,K)===-pt),jt=pt*(_t-Ot);return jt===0?0:jt}function kI(d,s){const E=d.getFullYear()-s.getFullYear()||d.getMonth()-s.getMonth()||d.getDate()-s.getDate()||d.getHours()-s.getHours()||d.getMinutes()-s.getMinutes()||d.getSeconds()-s.getSeconds()||d.getMilliseconds()-s.getMilliseconds();return E<0?-1:E>0?1:E}function hw(d){return s=>{const B=(d?Math[d]:Math.trunc)(s);return B===0?0:B}}function vft(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=(+B-+K)/cw;return hw(E?.roundingMethod)(pt)}function PM(d,s){return+Hu(d)-+Hu(s)}function yft(d,s,E){const B=PM(d,s)/uw;return hw(E?.roundingMethod)(B)}function XD(d,s){const E=Hu(d,s?.in);return E.setHours(23,59,59,999),E}function JD(d,s){const E=Hu(d,s?.in),B=E.getMonth();return E.setFullYear(E.getFullYear(),B+1,0),E.setHours(23,59,59,999),E}function xft(d,s){const E=Hu(d,s?.in);return+XD(E,s)==+JD(E,s)}function QD(d,s,E){const[B,K,pt]=Dy(E?.in,d,d,s),_t=O2(K,pt),Ot=Math.abs(mft(K,pt));if(Ot<1)return 0;K.getMonth()===1&&K.getDate()>27&&K.setDate(30),K.setMonth(K.getMonth()-_t*Ot);let jt=O2(K,pt)===-_t;xft(B)&&Ot===1&&O2(B,pt)===1&&(jt=!1);const te=_t*(Ot-+jt);return te===0?0:te}function _ft(d,s,E){const B=QD(d,s,E)/3;return hw(E?.roundingMethod)(B)}function bft(d,s,E){const B=PM(d,s)/1e3;return hw(E?.roundingMethod)(B)}function wft(d,s,E){const B=KD(d,s,E)/7;return hw(E?.roundingMethod)(B)}function kft(d,s,E){const[B,K]=Dy(E?.in,d,s),pt=O2(B,K),_t=Math.abs(gft(B,K));B.setFullYear(1584),K.setFullYear(1584);const Ot=O2(B,K)===-pt,jt=pt*(_t-+Ot);return jt===0?0:jt}function Tft(d,s){const E=Hu(d,s?.in),B=E.getMonth(),K=B-B%3;return E.setMonth(K,1),E.setHours(0,0,0,0),E}function Aft(d,s){const E=Hu(d,s?.in);return E.setDate(1),E.setHours(0,0,0,0),E}function Mft(d,s){const E=Hu(d,s?.in),B=E.getFullYear();return E.setFullYear(B+1,0,0),E.setHours(23,59,59,999),E}function tF(d,s){const E=Hu(d,s?.in);return E.setFullYear(E.getFullYear(),0,1),E.setHours(0,0,0,0),E}function Sft(d,s){const E=Hu(d,s?.in);return E.setMinutes(59,59,999),E}function Eft(d,s){const E=Oy(),B=E.weekStartsOn??E.locale?.options?.weekStartsOn??0,K=Hu(d,s?.in),pt=K.getDay(),_t=(pt{let B;const K=Ift[d];return typeof K=="string"?B=K:s===1?B=K.one:B=K.other.replace("{{count}}",s.toString()),E?.addSuffix?E.comparison&&E.comparison>0?"in "+B:B+" ago":B};function tA(d){return(s={})=>{const E=s.width?String(s.width):d.defaultWidth;return d.formats[E]||d.formats[d.defaultWidth]}}const Oft={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Dft={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Fft={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rft={date:tA({formats:Oft,defaultWidth:"full"}),time:tA({formats:Dft,defaultWidth:"full"}),dateTime:tA({formats:Fft,defaultWidth:"full"})},Bft={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Nft=(d,s,E,B)=>Bft[d];function f2(d){return(s,E)=>{const B=E?.context?String(E.context):"standalone";let K;if(B==="formatting"&&d.formattingValues){const _t=d.defaultFormattingWidth||d.defaultWidth,Ot=E?.width?String(E.width):_t;K=d.formattingValues[Ot]||d.formattingValues[_t]}else{const _t=d.defaultWidth,Ot=E?.width?String(E.width):d.defaultWidth;K=d.values[Ot]||d.values[_t]}const pt=d.argumentCallback?d.argumentCallback(s):s;return K[pt]}}const jft={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Uft={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Vft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Hft={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Wft={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qft={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$ft=(d,s)=>{const E=Number(d),B=E%100;if(B>20||B<10)switch(B%10){case 1:return E+"st";case 2:return E+"nd";case 3:return E+"rd"}return E+"th"},Zft={ordinalNumber:$ft,era:f2({values:jft,defaultWidth:"wide"}),quarter:f2({values:Uft,defaultWidth:"wide",argumentCallback:d=>d-1}),month:f2({values:Vft,defaultWidth:"wide"}),day:f2({values:Hft,defaultWidth:"wide"}),dayPeriod:f2({values:Wft,defaultWidth:"wide",formattingValues:qft,defaultFormattingWidth:"wide"})};function d2(d){return(s,E={})=>{const B=E.width,K=B&&d.matchPatterns[B]||d.matchPatterns[d.defaultMatchWidth],pt=s.match(K);if(!pt)return null;const _t=pt[0],Ot=B&&d.parsePatterns[B]||d.parsePatterns[d.defaultParseWidth],jt=Array.isArray(Ot)?Yft(Ot,De=>De.test(_t)):Gft(Ot,De=>De.test(_t));let te;te=d.valueCallback?d.valueCallback(jt):jt,te=E.valueCallback?E.valueCallback(te):te;const he=s.slice(_t.length);return{value:te,rest:he}}}function Gft(d,s){for(const E in d)if(Object.prototype.hasOwnProperty.call(d,E)&&s(d[E]))return E}function Yft(d,s){for(let E=0;E{const B=s.match(d.matchPattern);if(!B)return null;const K=B[0],pt=s.match(d.parsePattern);if(!pt)return null;let _t=d.valueCallback?d.valueCallback(pt[0]):pt[0];_t=E.valueCallback?E.valueCallback(_t):_t;const Ot=s.slice(K.length);return{value:_t,rest:Ot}}}const Xft=/^(\d+)(th|st|nd|rd)?/i,Jft=/\d+/i,Qft={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},tdt={any:[/^b/i,/^(a|c)/i]},edt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rdt={any:[/1/i,/2/i,/3/i,/4/i]},ndt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},idt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},adt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},odt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},sdt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ldt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},udt={ordinalNumber:Kft({matchPattern:Xft,parsePattern:Jft,valueCallback:d=>parseInt(d,10)}),era:d2({matchPatterns:Qft,defaultMatchWidth:"wide",parsePatterns:tdt,defaultParseWidth:"any"}),quarter:d2({matchPatterns:edt,defaultMatchWidth:"wide",parsePatterns:rdt,defaultParseWidth:"any",valueCallback:d=>d+1}),month:d2({matchPatterns:ndt,defaultMatchWidth:"wide",parsePatterns:idt,defaultParseWidth:"any"}),day:d2({matchPatterns:adt,defaultMatchWidth:"wide",parsePatterns:odt,defaultParseWidth:"any"}),dayPeriod:d2({matchPatterns:sdt,defaultMatchWidth:"any",parsePatterns:ldt,defaultParseWidth:"any"})},eF={code:"en-US",formatDistance:zft,formatLong:Rft,formatRelative:Nft,localize:Zft,match:udt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cdt(d,s){const E=Hu(d,s?.in);return GD(E,tF(E))+1}function rF(d,s){const E=Hu(d,s?.in),B=+b_(E)-+lft(E);return Math.round(B/$D)+1}function IM(d,s){const E=Hu(d,s?.in),B=E.getFullYear(),K=Oy(),pt=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??K.firstWeekContainsDate??K.locale?.options?.firstWeekContainsDate??1,_t=bd(s?.in||d,0);_t.setFullYear(B+1,0,pt),_t.setHours(0,0,0,0);const Ot=mg(_t,s),jt=bd(s?.in||d,0);jt.setFullYear(B,0,pt),jt.setHours(0,0,0,0);const te=mg(jt,s);return+E>=+Ot?B+1:+E>=+te?B:B-1}function hdt(d,s){const E=Oy(),B=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??E.firstWeekContainsDate??E.locale?.options?.firstWeekContainsDate??1,K=IM(d,s),pt=bd(s?.in||d,0);return pt.setFullYear(K,0,B),pt.setHours(0,0,0,0),mg(pt,s)}function nF(d,s){const E=Hu(d,s?.in),B=+mg(E,s)-+hdt(E,s);return Math.round(B/$D)+1}function Kh(d,s){const E=d<0?"-":"",B=Math.abs(d).toString().padStart(s,"0");return E+B}const t1={y(d,s){const E=d.getFullYear(),B=E>0?E:1-E;return Kh(s==="yy"?B%100:B,s.length)},M(d,s){const E=d.getMonth();return s==="M"?String(E+1):Kh(E+1,2)},d(d,s){return Kh(d.getDate(),s.length)},a(d,s){const E=d.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return E.toUpperCase();case"aaa":return E;case"aaaaa":return E[0];case"aaaa":default:return E==="am"?"a.m.":"p.m."}},h(d,s){return Kh(d.getHours()%12||12,s.length)},H(d,s){return Kh(d.getHours(),s.length)},m(d,s){return Kh(d.getMinutes(),s.length)},s(d,s){return Kh(d.getSeconds(),s.length)},S(d,s){const E=s.length,B=d.getMilliseconds(),K=Math.trunc(B*Math.pow(10,E-3));return Kh(K,s.length)}},n_={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},TI={G:function(d,s,E){const B=d.getFullYear()>0?1:0;switch(s){case"G":case"GG":case"GGG":return E.era(B,{width:"abbreviated"});case"GGGGG":return E.era(B,{width:"narrow"});case"GGGG":default:return E.era(B,{width:"wide"})}},y:function(d,s,E){if(s==="yo"){const B=d.getFullYear(),K=B>0?B:1-B;return E.ordinalNumber(K,{unit:"year"})}return t1.y(d,s)},Y:function(d,s,E,B){const K=IM(d,B),pt=K>0?K:1-K;if(s==="YY"){const _t=pt%100;return Kh(_t,2)}return s==="Yo"?E.ordinalNumber(pt,{unit:"year"}):Kh(pt,s.length)},R:function(d,s){const E=ZD(d);return Kh(E,s.length)},u:function(d,s){const E=d.getFullYear();return Kh(E,s.length)},Q:function(d,s,E){const B=Math.ceil((d.getMonth()+1)/3);switch(s){case"Q":return String(B);case"QQ":return Kh(B,2);case"Qo":return E.ordinalNumber(B,{unit:"quarter"});case"QQQ":return E.quarter(B,{width:"abbreviated",context:"formatting"});case"QQQQQ":return E.quarter(B,{width:"narrow",context:"formatting"});case"QQQQ":default:return E.quarter(B,{width:"wide",context:"formatting"})}},q:function(d,s,E){const B=Math.ceil((d.getMonth()+1)/3);switch(s){case"q":return String(B);case"qq":return Kh(B,2);case"qo":return E.ordinalNumber(B,{unit:"quarter"});case"qqq":return E.quarter(B,{width:"abbreviated",context:"standalone"});case"qqqqq":return E.quarter(B,{width:"narrow",context:"standalone"});case"qqqq":default:return E.quarter(B,{width:"wide",context:"standalone"})}},M:function(d,s,E){const B=d.getMonth();switch(s){case"M":case"MM":return t1.M(d,s);case"Mo":return E.ordinalNumber(B+1,{unit:"month"});case"MMM":return E.month(B,{width:"abbreviated",context:"formatting"});case"MMMMM":return E.month(B,{width:"narrow",context:"formatting"});case"MMMM":default:return E.month(B,{width:"wide",context:"formatting"})}},L:function(d,s,E){const B=d.getMonth();switch(s){case"L":return String(B+1);case"LL":return Kh(B+1,2);case"Lo":return E.ordinalNumber(B+1,{unit:"month"});case"LLL":return E.month(B,{width:"abbreviated",context:"standalone"});case"LLLLL":return E.month(B,{width:"narrow",context:"standalone"});case"LLLL":default:return E.month(B,{width:"wide",context:"standalone"})}},w:function(d,s,E,B){const K=nF(d,B);return s==="wo"?E.ordinalNumber(K,{unit:"week"}):Kh(K,s.length)},I:function(d,s,E){const B=rF(d);return s==="Io"?E.ordinalNumber(B,{unit:"week"}):Kh(B,s.length)},d:function(d,s,E){return s==="do"?E.ordinalNumber(d.getDate(),{unit:"date"}):t1.d(d,s)},D:function(d,s,E){const B=cdt(d);return s==="Do"?E.ordinalNumber(B,{unit:"dayOfYear"}):Kh(B,s.length)},E:function(d,s,E){const B=d.getDay();switch(s){case"E":case"EE":case"EEE":return E.day(B,{width:"abbreviated",context:"formatting"});case"EEEEE":return E.day(B,{width:"narrow",context:"formatting"});case"EEEEEE":return E.day(B,{width:"short",context:"formatting"});case"EEEE":default:return E.day(B,{width:"wide",context:"formatting"})}},e:function(d,s,E,B){const K=d.getDay(),pt=(K-B.weekStartsOn+8)%7||7;switch(s){case"e":return String(pt);case"ee":return Kh(pt,2);case"eo":return E.ordinalNumber(pt,{unit:"day"});case"eee":return E.day(K,{width:"abbreviated",context:"formatting"});case"eeeee":return E.day(K,{width:"narrow",context:"formatting"});case"eeeeee":return E.day(K,{width:"short",context:"formatting"});case"eeee":default:return E.day(K,{width:"wide",context:"formatting"})}},c:function(d,s,E,B){const K=d.getDay(),pt=(K-B.weekStartsOn+8)%7||7;switch(s){case"c":return String(pt);case"cc":return Kh(pt,s.length);case"co":return E.ordinalNumber(pt,{unit:"day"});case"ccc":return E.day(K,{width:"abbreviated",context:"standalone"});case"ccccc":return E.day(K,{width:"narrow",context:"standalone"});case"cccccc":return E.day(K,{width:"short",context:"standalone"});case"cccc":default:return E.day(K,{width:"wide",context:"standalone"})}},i:function(d,s,E){const B=d.getDay(),K=B===0?7:B;switch(s){case"i":return String(K);case"ii":return Kh(K,s.length);case"io":return E.ordinalNumber(K,{unit:"day"});case"iii":return E.day(B,{width:"abbreviated",context:"formatting"});case"iiiii":return E.day(B,{width:"narrow",context:"formatting"});case"iiiiii":return E.day(B,{width:"short",context:"formatting"});case"iiii":default:return E.day(B,{width:"wide",context:"formatting"})}},a:function(d,s,E){const K=d.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"});case"aaa":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return E.dayPeriod(K,{width:"narrow",context:"formatting"});case"aaaa":default:return E.dayPeriod(K,{width:"wide",context:"formatting"})}},b:function(d,s,E){const B=d.getHours();let K;switch(B===12?K=n_.noon:B===0?K=n_.midnight:K=B/12>=1?"pm":"am",s){case"b":case"bb":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"});case"bbb":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return E.dayPeriod(K,{width:"narrow",context:"formatting"});case"bbbb":default:return E.dayPeriod(K,{width:"wide",context:"formatting"})}},B:function(d,s,E){const B=d.getHours();let K;switch(B>=17?K=n_.evening:B>=12?K=n_.afternoon:B>=4?K=n_.morning:K=n_.night,s){case"B":case"BB":case"BBB":return E.dayPeriod(K,{width:"abbreviated",context:"formatting"});case"BBBBB":return E.dayPeriod(K,{width:"narrow",context:"formatting"});case"BBBB":default:return E.dayPeriod(K,{width:"wide",context:"formatting"})}},h:function(d,s,E){if(s==="ho"){let B=d.getHours()%12;return B===0&&(B=12),E.ordinalNumber(B,{unit:"hour"})}return t1.h(d,s)},H:function(d,s,E){return s==="Ho"?E.ordinalNumber(d.getHours(),{unit:"hour"}):t1.H(d,s)},K:function(d,s,E){const B=d.getHours()%12;return s==="Ko"?E.ordinalNumber(B,{unit:"hour"}):Kh(B,s.length)},k:function(d,s,E){let B=d.getHours();return B===0&&(B=24),s==="ko"?E.ordinalNumber(B,{unit:"hour"}):Kh(B,s.length)},m:function(d,s,E){return s==="mo"?E.ordinalNumber(d.getMinutes(),{unit:"minute"}):t1.m(d,s)},s:function(d,s,E){return s==="so"?E.ordinalNumber(d.getSeconds(),{unit:"second"}):t1.s(d,s)},S:function(d,s){return t1.S(d,s)},X:function(d,s,E){const B=d.getTimezoneOffset();if(B===0)return"Z";switch(s){case"X":return MI(B);case"XXXX":case"XX":return gy(B);case"XXXXX":case"XXX":default:return gy(B,":")}},x:function(d,s,E){const B=d.getTimezoneOffset();switch(s){case"x":return MI(B);case"xxxx":case"xx":return gy(B);case"xxxxx":case"xxx":default:return gy(B,":")}},O:function(d,s,E){const B=d.getTimezoneOffset();switch(s){case"O":case"OO":case"OOO":return"GMT"+AI(B,":");case"OOOO":default:return"GMT"+gy(B,":")}},z:function(d,s,E){const B=d.getTimezoneOffset();switch(s){case"z":case"zz":case"zzz":return"GMT"+AI(B,":");case"zzzz":default:return"GMT"+gy(B,":")}},t:function(d,s,E){const B=Math.trunc(+d/1e3);return Kh(B,s.length)},T:function(d,s,E){return Kh(+d,s.length)}};function AI(d,s=""){const E=d>0?"-":"+",B=Math.abs(d),K=Math.trunc(B/60),pt=B%60;return pt===0?E+String(K):E+String(K)+s+Kh(pt,2)}function MI(d,s){return d%60===0?(d>0?"-":"+")+Kh(Math.abs(d)/60,2):gy(d,s)}function gy(d,s=""){const E=d>0?"-":"+",B=Math.abs(d),K=Kh(Math.trunc(B/60),2),pt=Kh(B%60,2);return E+K+s+pt}const SI=(d,s)=>{switch(d){case"P":return s.date({width:"short"});case"PP":return s.date({width:"medium"});case"PPP":return s.date({width:"long"});case"PPPP":default:return s.date({width:"full"})}},iF=(d,s)=>{switch(d){case"p":return s.time({width:"short"});case"pp":return s.time({width:"medium"});case"ppp":return s.time({width:"long"});case"pppp":default:return s.time({width:"full"})}},fdt=(d,s)=>{const E=d.match(/(P+)(p+)?/)||[],B=E[1],K=E[2];if(!K)return SI(d,s);let pt;switch(B){case"P":pt=s.dateTime({width:"short"});break;case"PP":pt=s.dateTime({width:"medium"});break;case"PPP":pt=s.dateTime({width:"long"});break;case"PPPP":default:pt=s.dateTime({width:"full"});break}return pt.replace("{{date}}",SI(B,s)).replace("{{time}}",iF(K,s))},FA={p:iF,P:fdt},ddt=/^D+$/,pdt=/^Y+$/,mdt=["D","DD","YY","YYYY"];function aF(d){return ddt.test(d)}function oF(d){return pdt.test(d)}function RA(d,s,E){const B=gdt(d,s,E);if(console.warn(B),mdt.includes(d))throw new RangeError(B)}function gdt(d,s,E){const B=d[0]==="Y"?"years":"days of the month";return`Use \`${d.toLowerCase()}\` instead of \`${d}\` (in \`${s}\`) for formatting ${B} to the input \`${E}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vdt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ydt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xdt=/^'([^]*?)'?$/,_dt=/''/g,bdt=/[a-zA-Z]/;function wdt(d,s,E){const B=Oy(),K=E?.locale??B.locale??eF,pt=E?.firstWeekContainsDate??E?.locale?.options?.firstWeekContainsDate??B.firstWeekContainsDate??B.locale?.options?.firstWeekContainsDate??1,_t=E?.weekStartsOn??E?.locale?.options?.weekStartsOn??B.weekStartsOn??B.locale?.options?.weekStartsOn??0,Ot=Hu(d,E?.in);if(!YD(Ot))throw new RangeError("Invalid time value");let jt=s.match(ydt).map(he=>{const De=he[0];if(De==="p"||De==="P"){const er=FA[De];return er(he,K.formatLong)}return he}).join("").match(vdt).map(he=>{if(he==="''")return{isToken:!1,value:"'"};const De=he[0];if(De==="'")return{isToken:!1,value:kdt(he)};if(TI[De])return{isToken:!0,value:he};if(De.match(bdt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+De+"`");return{isToken:!1,value:he}});K.localize.preprocessor&&(jt=K.localize.preprocessor(Ot,jt));const te={firstWeekContainsDate:pt,weekStartsOn:_t,locale:K};return jt.map(he=>{if(!he.isToken)return he.value;const De=he.value;(!E?.useAdditionalWeekYearTokens&&oF(De)||!E?.useAdditionalDayOfYearTokens&&aF(De))&&RA(De,s,String(d));const er=TI[De[0]];return er(Ot,De,K.localize,te)}).join("")}function kdt(d){const s=d.match(xdt);return s?s[1].replace(_dt,"'"):d}function Tdt(){return Object.assign({},Oy())}function Adt(d,s){const E=Hu(d,s?.in).getDay();return E===0?7:E}function Mdt(d,s){const E=Sdt(s)?new s(0):bd(s,0);return E.setFullYear(d.getFullYear(),d.getMonth(),d.getDate()),E.setHours(d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()),E}function Sdt(d){return typeof d=="function"&&d.prototype?.constructor===d}const Edt=10;class sF{subPriority=0;validate(s,E){return!0}}class Cdt extends sF{constructor(s,E,B,K,pt){super(),this.value=s,this.validateValue=E,this.setValue=B,this.priority=K,pt&&(this.subPriority=pt)}validate(s,E){return this.validateValue(s,this.value,E)}set(s,E,B){return this.setValue(s,E,this.value,B)}}class Ldt extends sF{priority=Edt;subPriority=-1;constructor(s,E){super(),this.context=s||(B=>bd(E,B))}set(s,E){return E.timestampIsSet?s:bd(s,Mdt(s,this.context))}}class Mh{run(s,E,B,K){const pt=this.parse(s,E,B,K);return pt?{setter:new Cdt(pt.value,this.validate,this.set,this.priority,this.subPriority),rest:pt.rest}:null}validate(s,E,B){return!0}}class Pdt extends Mh{priority=140;parse(s,E,B){switch(E){case"G":case"GG":case"GGG":return B.era(s,{width:"abbreviated"})||B.era(s,{width:"narrow"});case"GGGGG":return B.era(s,{width:"narrow"});case"GGGG":default:return B.era(s,{width:"wide"})||B.era(s,{width:"abbreviated"})||B.era(s,{width:"narrow"})}}set(s,E,B){return E.era=B,s.setFullYear(B,0,1),s.setHours(0,0,0,0),s}incompatibleTokens=["R","u","t","T"]}const Bd={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},hg={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Nd(d,s){return d&&{value:s(d.value),rest:d.rest}}function ad(d,s){const E=s.match(d);return E?{value:parseInt(E[0],10),rest:s.slice(E[0].length)}:null}function fg(d,s){const E=s.match(d);if(!E)return null;if(E[0]==="Z")return{value:0,rest:s.slice(1)};const B=E[1]==="+"?1:-1,K=E[2]?parseInt(E[2],10):0,pt=E[3]?parseInt(E[3],10):0,_t=E[5]?parseInt(E[5],10):0;return{value:B*(K*cw+pt*uw+_t*aft),rest:s.slice(E[0].length)}}function lF(d){return ad(Bd.anyDigitsSigned,d)}function wd(d,s){switch(d){case 1:return ad(Bd.singleDigit,s);case 2:return ad(Bd.twoDigits,s);case 3:return ad(Bd.threeDigits,s);case 4:return ad(Bd.fourDigits,s);default:return ad(new RegExp("^\\d{1,"+d+"}"),s)}}function M4(d,s){switch(d){case 1:return ad(Bd.singleDigitSigned,s);case 2:return ad(Bd.twoDigitsSigned,s);case 3:return ad(Bd.threeDigitsSigned,s);case 4:return ad(Bd.fourDigitsSigned,s);default:return ad(new RegExp("^-?\\d{1,"+d+"}"),s)}}function zM(d){switch(d){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function uF(d,s){const E=s>0,B=E?s:1-s;let K;if(B<=50)K=d||100;else{const pt=B+50,_t=Math.trunc(pt/100)*100,Ot=d>=pt%100;K=d+_t-(Ot?100:0)}return E?K:1-K}function cF(d){return d%400===0||d%4===0&&d%100!==0}class Idt extends Mh{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(s,E,B){const K=pt=>({year:pt,isTwoDigitYear:E==="yy"});switch(E){case"y":return Nd(wd(4,s),K);case"yo":return Nd(B.ordinalNumber(s,{unit:"year"}),K);default:return Nd(wd(E.length,s),K)}}validate(s,E){return E.isTwoDigitYear||E.year>0}set(s,E,B){const K=s.getFullYear();if(B.isTwoDigitYear){const _t=uF(B.year,K);return s.setFullYear(_t,0,1),s.setHours(0,0,0,0),s}const pt=!("era"in E)||E.era===1?B.year:1-B.year;return s.setFullYear(pt,0,1),s.setHours(0,0,0,0),s}}class zdt extends Mh{priority=130;parse(s,E,B){const K=pt=>({year:pt,isTwoDigitYear:E==="YY"});switch(E){case"Y":return Nd(wd(4,s),K);case"Yo":return Nd(B.ordinalNumber(s,{unit:"year"}),K);default:return Nd(wd(E.length,s),K)}}validate(s,E){return E.isTwoDigitYear||E.year>0}set(s,E,B,K){const pt=IM(s,K);if(B.isTwoDigitYear){const Ot=uF(B.year,pt);return s.setFullYear(Ot,0,K.firstWeekContainsDate),s.setHours(0,0,0,0),mg(s,K)}const _t=!("era"in E)||E.era===1?B.year:1-B.year;return s.setFullYear(_t,0,K.firstWeekContainsDate),s.setHours(0,0,0,0),mg(s,K)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Odt extends Mh{priority=130;parse(s,E){return M4(E==="R"?4:E.length,s)}set(s,E,B){const K=bd(s,0);return K.setFullYear(B,0,4),K.setHours(0,0,0,0),b_(K)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Ddt extends Mh{priority=130;parse(s,E){return M4(E==="u"?4:E.length,s)}set(s,E,B){return s.setFullYear(B,0,1),s.setHours(0,0,0,0),s}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Fdt extends Mh{priority=120;parse(s,E,B){switch(E){case"Q":case"QQ":return wd(E.length,s);case"Qo":return B.ordinalNumber(s,{unit:"quarter"});case"QQQ":return B.quarter(s,{width:"abbreviated",context:"formatting"})||B.quarter(s,{width:"narrow",context:"formatting"});case"QQQQQ":return B.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return B.quarter(s,{width:"wide",context:"formatting"})||B.quarter(s,{width:"abbreviated",context:"formatting"})||B.quarter(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=1&&E<=4}set(s,E,B){return s.setMonth((B-1)*3,1),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Rdt extends Mh{priority=120;parse(s,E,B){switch(E){case"q":case"qq":return wd(E.length,s);case"qo":return B.ordinalNumber(s,{unit:"quarter"});case"qqq":return B.quarter(s,{width:"abbreviated",context:"standalone"})||B.quarter(s,{width:"narrow",context:"standalone"});case"qqqqq":return B.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return B.quarter(s,{width:"wide",context:"standalone"})||B.quarter(s,{width:"abbreviated",context:"standalone"})||B.quarter(s,{width:"narrow",context:"standalone"})}}validate(s,E){return E>=1&&E<=4}set(s,E,B){return s.setMonth((B-1)*3,1),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Bdt extends Mh{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(s,E,B){const K=pt=>pt-1;switch(E){case"M":return Nd(ad(Bd.month,s),K);case"MM":return Nd(wd(2,s),K);case"Mo":return Nd(B.ordinalNumber(s,{unit:"month"}),K);case"MMM":return B.month(s,{width:"abbreviated",context:"formatting"})||B.month(s,{width:"narrow",context:"formatting"});case"MMMMM":return B.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return B.month(s,{width:"wide",context:"formatting"})||B.month(s,{width:"abbreviated",context:"formatting"})||B.month(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=0&&E<=11}set(s,E,B){return s.setMonth(B,1),s.setHours(0,0,0,0),s}}class Ndt extends Mh{priority=110;parse(s,E,B){const K=pt=>pt-1;switch(E){case"L":return Nd(ad(Bd.month,s),K);case"LL":return Nd(wd(2,s),K);case"Lo":return Nd(B.ordinalNumber(s,{unit:"month"}),K);case"LLL":return B.month(s,{width:"abbreviated",context:"standalone"})||B.month(s,{width:"narrow",context:"standalone"});case"LLLLL":return B.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return B.month(s,{width:"wide",context:"standalone"})||B.month(s,{width:"abbreviated",context:"standalone"})||B.month(s,{width:"narrow",context:"standalone"})}}validate(s,E){return E>=0&&E<=11}set(s,E,B){return s.setMonth(B,1),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function jdt(d,s,E){const B=Hu(d,E?.in),K=nF(B,E)-s;return B.setDate(B.getDate()-K*7),Hu(B,E?.in)}class Udt extends Mh{priority=100;parse(s,E,B){switch(E){case"w":return ad(Bd.week,s);case"wo":return B.ordinalNumber(s,{unit:"week"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=53}set(s,E,B,K){return mg(jdt(s,B,K),K)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Vdt(d,s,E){const B=Hu(d,E?.in),K=rF(B,E)-s;return B.setDate(B.getDate()-K*7),B}class Hdt extends Mh{priority=100;parse(s,E,B){switch(E){case"I":return ad(Bd.week,s);case"Io":return B.ordinalNumber(s,{unit:"week"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=53}set(s,E,B){return b_(Vdt(s,B))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Wdt=[31,28,31,30,31,30,31,31,30,31,30,31],qdt=[31,29,31,30,31,30,31,31,30,31,30,31];class $dt extends Mh{priority=90;subPriority=1;parse(s,E,B){switch(E){case"d":return ad(Bd.date,s);case"do":return B.ordinalNumber(s,{unit:"date"});default:return wd(E.length,s)}}validate(s,E){const B=s.getFullYear(),K=cF(B),pt=s.getMonth();return K?E>=1&&E<=qdt[pt]:E>=1&&E<=Wdt[pt]}set(s,E,B){return s.setDate(B),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Zdt extends Mh{priority=90;subpriority=1;parse(s,E,B){switch(E){case"D":case"DD":return ad(Bd.dayOfYear,s);case"Do":return B.ordinalNumber(s,{unit:"date"});default:return wd(E.length,s)}}validate(s,E){const B=s.getFullYear();return cF(B)?E>=1&&E<=366:E>=1&&E<=365}set(s,E,B){return s.setMonth(0,B),s.setHours(0,0,0,0),s}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function OM(d,s,E){const B=Oy(),K=E?.weekStartsOn??E?.locale?.options?.weekStartsOn??B.weekStartsOn??B.locale?.options?.weekStartsOn??0,pt=Hu(d,E?.in),_t=pt.getDay(),jt=(s%7+7)%7,te=7-K,he=s<0||s>6?s-(_t+te)%7:(jt+te)%7-(_t+te)%7;return r6(pt,he,E)}class Gdt extends Mh{priority=90;parse(s,E,B){switch(E){case"E":case"EE":case"EEE":return B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"});case"EEEEE":return B.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"});case"EEEE":default:return B.day(s,{width:"wide",context:"formatting"})||B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=0&&E<=6}set(s,E,B,K){return s=OM(s,B,K),s.setHours(0,0,0,0),s}incompatibleTokens=["D","i","e","c","t","T"]}class Ydt extends Mh{priority=90;parse(s,E,B,K){const pt=_t=>{const Ot=Math.floor((_t-1)/7)*7;return(_t+K.weekStartsOn+6)%7+Ot};switch(E){case"e":case"ee":return Nd(wd(E.length,s),pt);case"eo":return Nd(B.ordinalNumber(s,{unit:"day"}),pt);case"eee":return B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"});case"eeeee":return B.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"});case"eeee":default:return B.day(s,{width:"wide",context:"formatting"})||B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"})}}validate(s,E){return E>=0&&E<=6}set(s,E,B,K){return s=OM(s,B,K),s.setHours(0,0,0,0),s}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Kdt extends Mh{priority=90;parse(s,E,B,K){const pt=_t=>{const Ot=Math.floor((_t-1)/7)*7;return(_t+K.weekStartsOn+6)%7+Ot};switch(E){case"c":case"cc":return Nd(wd(E.length,s),pt);case"co":return Nd(B.ordinalNumber(s,{unit:"day"}),pt);case"ccc":return B.day(s,{width:"abbreviated",context:"standalone"})||B.day(s,{width:"short",context:"standalone"})||B.day(s,{width:"narrow",context:"standalone"});case"ccccc":return B.day(s,{width:"narrow",context:"standalone"});case"cccccc":return B.day(s,{width:"short",context:"standalone"})||B.day(s,{width:"narrow",context:"standalone"});case"cccc":default:return B.day(s,{width:"wide",context:"standalone"})||B.day(s,{width:"abbreviated",context:"standalone"})||B.day(s,{width:"short",context:"standalone"})||B.day(s,{width:"narrow",context:"standalone"})}}validate(s,E){return E>=0&&E<=6}set(s,E,B,K){return s=OM(s,B,K),s.setHours(0,0,0,0),s}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Xdt(d,s,E){const B=Hu(d,E?.in),K=Adt(B,E),pt=s-K;return r6(B,pt,E)}class Jdt extends Mh{priority=90;parse(s,E,B){const K=pt=>pt===0?7:pt;switch(E){case"i":case"ii":return wd(E.length,s);case"io":return B.ordinalNumber(s,{unit:"day"});case"iii":return Nd(B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"}),K);case"iiiii":return Nd(B.day(s,{width:"narrow",context:"formatting"}),K);case"iiiiii":return Nd(B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"}),K);case"iiii":default:return Nd(B.day(s,{width:"wide",context:"formatting"})||B.day(s,{width:"abbreviated",context:"formatting"})||B.day(s,{width:"short",context:"formatting"})||B.day(s,{width:"narrow",context:"formatting"}),K)}}validate(s,E){return E>=1&&E<=7}set(s,E,B){return s=Xdt(s,B),s.setHours(0,0,0,0),s}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Qdt extends Mh{priority=80;parse(s,E,B){switch(E){case"a":case"aa":case"aaa":return B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaaa":return B.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return B.dayPeriod(s,{width:"wide",context:"formatting"})||B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"})}}set(s,E,B){return s.setHours(zM(B),0,0,0),s}incompatibleTokens=["b","B","H","k","t","T"]}class tpt extends Mh{priority=80;parse(s,E,B){switch(E){case"b":case"bb":case"bbb":return B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbbb":return B.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return B.dayPeriod(s,{width:"wide",context:"formatting"})||B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"})}}set(s,E,B){return s.setHours(zM(B),0,0,0),s}incompatibleTokens=["a","B","H","k","t","T"]}class ept extends Mh{priority=80;parse(s,E,B){switch(E){case"B":case"BB":case"BBB":return B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBBB":return B.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return B.dayPeriod(s,{width:"wide",context:"formatting"})||B.dayPeriod(s,{width:"abbreviated",context:"formatting"})||B.dayPeriod(s,{width:"narrow",context:"formatting"})}}set(s,E,B){return s.setHours(zM(B),0,0,0),s}incompatibleTokens=["a","b","t","T"]}class rpt extends Mh{priority=70;parse(s,E,B){switch(E){case"h":return ad(Bd.hour12h,s);case"ho":return B.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=12}set(s,E,B){const K=s.getHours()>=12;return K&&B<12?s.setHours(B+12,0,0,0):!K&&B===12?s.setHours(0,0,0,0):s.setHours(B,0,0,0),s}incompatibleTokens=["H","K","k","t","T"]}class npt extends Mh{priority=70;parse(s,E,B){switch(E){case"H":return ad(Bd.hour23h,s);case"Ho":return B.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=23}set(s,E,B){return s.setHours(B,0,0,0),s}incompatibleTokens=["a","b","h","K","k","t","T"]}class ipt extends Mh{priority=70;parse(s,E,B){switch(E){case"K":return ad(Bd.hour11h,s);case"Ko":return B.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=11}set(s,E,B){return s.getHours()>=12&&B<12?s.setHours(B+12,0,0,0):s.setHours(B,0,0,0),s}incompatibleTokens=["h","H","k","t","T"]}class apt extends Mh{priority=70;parse(s,E,B){switch(E){case"k":return ad(Bd.hour24h,s);case"ko":return B.ordinalNumber(s,{unit:"hour"});default:return wd(E.length,s)}}validate(s,E){return E>=1&&E<=24}set(s,E,B){const K=B<=24?B%24:B;return s.setHours(K,0,0,0),s}incompatibleTokens=["a","b","h","H","K","t","T"]}class opt extends Mh{priority=60;parse(s,E,B){switch(E){case"m":return ad(Bd.minute,s);case"mo":return B.ordinalNumber(s,{unit:"minute"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=59}set(s,E,B){return s.setMinutes(B,0,0),s}incompatibleTokens=["t","T"]}class spt extends Mh{priority=50;parse(s,E,B){switch(E){case"s":return ad(Bd.second,s);case"so":return B.ordinalNumber(s,{unit:"second"});default:return wd(E.length,s)}}validate(s,E){return E>=0&&E<=59}set(s,E,B){return s.setSeconds(B,0),s}incompatibleTokens=["t","T"]}class lpt extends Mh{priority=30;parse(s,E){const B=K=>Math.trunc(K*Math.pow(10,-E.length+3));return Nd(wd(E.length,s),B)}set(s,E,B){return s.setMilliseconds(B),s}incompatibleTokens=["t","T"]}class upt extends Mh{priority=10;parse(s,E){switch(E){case"X":return fg(hg.basicOptionalMinutes,s);case"XX":return fg(hg.basic,s);case"XXXX":return fg(hg.basicOptionalSeconds,s);case"XXXXX":return fg(hg.extendedOptionalSeconds,s);case"XXX":default:return fg(hg.extended,s)}}set(s,E,B){return E.timestampIsSet?s:bd(s,s.getTime()-A4(s)-B)}incompatibleTokens=["t","T","x"]}class cpt extends Mh{priority=10;parse(s,E){switch(E){case"x":return fg(hg.basicOptionalMinutes,s);case"xx":return fg(hg.basic,s);case"xxxx":return fg(hg.basicOptionalSeconds,s);case"xxxxx":return fg(hg.extendedOptionalSeconds,s);case"xxx":default:return fg(hg.extended,s)}}set(s,E,B){return E.timestampIsSet?s:bd(s,s.getTime()-A4(s)-B)}incompatibleTokens=["t","T","X"]}class hpt extends Mh{priority=40;parse(s){return lF(s)}set(s,E,B){return[bd(s,B*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class fpt extends Mh{priority=20;parse(s){return lF(s)}set(s,E,B){return[bd(s,B),{timestampIsSet:!0}]}incompatibleTokens="*"}const dpt={G:new Pdt,y:new Idt,Y:new zdt,R:new Odt,u:new Ddt,Q:new Fdt,q:new Rdt,M:new Bdt,L:new Ndt,w:new Udt,I:new Hdt,d:new $dt,D:new Zdt,E:new Gdt,e:new Ydt,c:new Kdt,i:new Jdt,a:new Qdt,b:new tpt,B:new ept,h:new rpt,H:new npt,K:new ipt,k:new apt,m:new opt,s:new spt,S:new lpt,X:new upt,x:new cpt,t:new hpt,T:new fpt},ppt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mpt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gpt=/^'([^]*?)'?$/,vpt=/''/g,ypt=/\S/,xpt=/[a-zA-Z]/;function _pt(d,s,E,B){const K=()=>bd(B?.in||E,NaN),pt=Tdt(),_t=B?.locale??pt.locale??eF,Ot=B?.firstWeekContainsDate??B?.locale?.options?.firstWeekContainsDate??pt.firstWeekContainsDate??pt.locale?.options?.firstWeekContainsDate??1,jt=B?.weekStartsOn??B?.locale?.options?.weekStartsOn??pt.weekStartsOn??pt.locale?.options?.weekStartsOn??0;if(!s)return d?K():Hu(E,B?.in);const te={firstWeekContainsDate:Ot,weekStartsOn:jt,locale:_t},he=[new Ldt(B?.in,E)],De=s.match(mpt).map(Vr=>{const mn=Vr[0];if(mn in FA){const Dt=FA[mn];return Dt(Vr,_t.formatLong)}return Vr}).join("").match(ppt),er=[];for(let Vr of De){!B?.useAdditionalWeekYearTokens&&oF(Vr)&&RA(Vr,s,d),!B?.useAdditionalDayOfYearTokens&&aF(Vr)&&RA(Vr,s,d);const mn=Vr[0],Dt=dpt[mn];if(Dt){const{incompatibleTokens:cn}=Dt;if(Array.isArray(cn)){const Bn=er.find(ni=>cn.includes(ni.token)||ni.token===mn);if(Bn)throw new RangeError(`The format string mustn't contain \`${Bn.fullToken}\` and \`${Vr}\` at the same time`)}else if(Dt.incompatibleTokens==="*"&&er.length>0)throw new RangeError(`The format string mustn't contain \`${Vr}\` and any other token at the same time`);er.push({token:mn,fullToken:Vr});const Jn=Dt.run(d,Vr,_t.match,te);if(!Jn)return K();he.push(Jn.setter),d=Jn.rest}else{if(mn.match(xpt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+mn+"`");if(Vr==="''"?Vr="'":mn==="'"&&(Vr=bpt(Vr)),d.indexOf(Vr)===0)d=d.slice(Vr.length);else return K()}}if(d.length>0&&ypt.test(d))return K();const pr=he.map(Vr=>Vr.priority).sort((Vr,mn)=>mn-Vr).filter((Vr,mn,Dt)=>Dt.indexOf(Vr)===mn).map(Vr=>he.filter(mn=>mn.priority===Vr).sort((mn,Dt)=>Dt.subPriority-mn.subPriority)).map(Vr=>Vr[0]);let Mr=Hu(E,B?.in);if(isNaN(+Mr))return K();const Tr={};for(const Vr of pr){if(!Vr.validate(Mr,te))return K();const mn=Vr.set(Mr,Tr,te);Array.isArray(mn)?(Mr=mn[0],Object.assign(Tr,mn[1])):Mr=mn}return Mr}function bpt(d){return d.match(gpt)[1].replace(vpt,"'")}function wpt(d,s){const E=Hu(d,s?.in);return E.setMinutes(0,0,0),E}function kpt(d,s){const E=Hu(d,s?.in);return E.setSeconds(0,0),E}function Tpt(d,s){const E=Hu(d,s?.in);return E.setMilliseconds(0),E}function Apt(d,s){const E=()=>bd(s?.in,NaN),B=s?.additionalDigits??2,K=Cpt(d);let pt;if(K.date){const te=Lpt(K.date,B);pt=Ppt(te.restDateString,te.year)}if(!pt||isNaN(+pt))return E();const _t=+pt;let Ot=0,jt;if(K.time&&(Ot=Ipt(K.time),isNaN(Ot)))return E();if(K.timezone){if(jt=zpt(K.timezone),isNaN(jt))return E()}else{const te=new Date(_t+Ot),he=Hu(0,s?.in);return he.setFullYear(te.getUTCFullYear(),te.getUTCMonth(),te.getUTCDate()),he.setHours(te.getUTCHours(),te.getUTCMinutes(),te.getUTCSeconds(),te.getUTCMilliseconds()),he}return Hu(_t+Ot+jt,s?.in)}const Z5={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Mpt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Spt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ept=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Cpt(d){const s={},E=d.split(Z5.dateTimeDelimiter);let B;if(E.length>2)return s;if(/:/.test(E[0])?B=E[0]:(s.date=E[0],B=E[1],Z5.timeZoneDelimiter.test(s.date)&&(s.date=d.split(Z5.timeZoneDelimiter)[0],B=d.substr(s.date.length,d.length))),B){const K=Z5.timezone.exec(B);K?(s.time=B.replace(K[1],""),s.timezone=K[1]):s.time=B}return s}function Lpt(d,s){const E=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+s)+"})|(\\d{2}|[+-]\\d{"+(2+s)+"})$)"),B=d.match(E);if(!B)return{year:NaN,restDateString:""};const K=B[1]?parseInt(B[1]):null,pt=B[2]?parseInt(B[2]):null;return{year:pt===null?K:pt*100,restDateString:d.slice((B[1]||B[2]).length)}}function Ppt(d,s){if(s===null)return new Date(NaN);const E=d.match(Mpt);if(!E)return new Date(NaN);const B=!!E[4],K=p2(E[1]),pt=p2(E[2])-1,_t=p2(E[3]),Ot=p2(E[4]),jt=p2(E[5])-1;if(B)return Bpt(s,Ot,jt)?Opt(s,Ot,jt):new Date(NaN);{const te=new Date(0);return!Fpt(s,pt,_t)||!Rpt(s,K)?new Date(NaN):(te.setUTCFullYear(s,pt,Math.max(K,_t)),te)}}function p2(d){return d?parseInt(d):1}function Ipt(d){const s=d.match(Spt);if(!s)return NaN;const E=eA(s[1]),B=eA(s[2]),K=eA(s[3]);return Npt(E,B,K)?E*cw+B*uw+K*1e3:NaN}function eA(d){return d&&parseFloat(d.replace(",","."))||0}function zpt(d){if(d==="Z")return 0;const s=d.match(Ept);if(!s)return 0;const E=s[1]==="+"?-1:1,B=parseInt(s[2]),K=s[3]&&parseInt(s[3])||0;return jpt(B,K)?E*(B*cw+K*uw):NaN}function Opt(d,s,E){const B=new Date(0);B.setUTCFullYear(d,0,4);const K=B.getUTCDay()||7,pt=(s-1)*7+E+1-K;return B.setUTCDate(B.getUTCDate()+pt),B}const Dpt=[31,null,31,30,31,30,31,31,30,31,30,31];function hF(d){return d%400===0||d%4===0&&d%100!==0}function Fpt(d,s,E){return s>=0&&s<=11&&E>=1&&E<=(Dpt[s]||(hF(d)?29:28))}function Rpt(d,s){return s>=1&&s<=(hF(d)?366:365)}function Bpt(d,s,E){return s>=1&&s<=53&&E>=0&&E<=6}function Npt(d,s,E){return d===24?s===0&&E===0:E>=0&&E<60&&s>=0&&s<60&&d>=0&&d<25}function jpt(d,s){return s>=0&&s<=59}/*! * chartjs-adapter-date-fns v3.0.0 * https://www.chartjs.org * (c) 2022 chartjs-adapter-date-fns Contributors * Released under the MIT license - */const qdt={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};aD._date.override({_id:"date-fns",formats:function(){return qdt},parse:function(d,l){if(d===null||typeof d>"u")return null;const z=typeof d;return z==="number"||d instanceof Date?d=Hu(d):z==="string"&&(typeof l=="string"?d=Tdt(d,l,new Date,this.options):d=Cdt(d,this.options)),MD(d)?d.getTime():null},format:function(d,l){return Mft(d,l,this.options)},add:function(d,l,z){switch(z){case"millisecond":return yM(d,l);case"second":return mht(d,l);case"minute":return dht(d,l);case"hour":return cht(d,l);case"day":return X4(d,l);case"week":return ght(d,l);case"month":return vM(d,l);case"quarter":return pht(d,l);case"year":return vht(d,l);default:return d}},diff:function(d,l,z){switch(z){case"millisecond":return xM(d,l);case"second":return Aht(d,l);case"minute":return wht(d,l);case"hour":return bht(d,l);case"day":return SD(d,l);case"week":return Mht(d,l);case"month":return LD(d,l);case"quarter":return Tht(d,l);case"year":return Sht(d,l);default:return 0}},startOf:function(d,l,z){switch(l){case"second":return Edt(d);case"minute":return Sdt(d);case"hour":return Mdt(d);case"day":return TA(d);case"week":return dg(d);case"isoWeek":return dg(d,{weekStartsOn:+z});case"month":return Cht(d);case"quarter":return Eht(d);case"year":return PD(d);default:return d}},endOf:function(d,l){switch(l){case"second":return Dht(d);case"minute":return Iht(d);case"hour":return Pht(d);case"day":return ED(d);case"week":return zht(d);case"month":return CD(d);case"quarter":return Oht(d);case"year":return Lht(d);default:return d}}});var t4={exports:{}},Zdt=t4.exports,fz;function $dt(){return fz||(fz=1,function(d){var l={};(function(z,j){d.exports?d.exports=j():z.moduleName=j()})(typeof self<"u"?self:Zdt,()=>{var z=(()=>{var j=Object.create,J=Object.defineProperty,mt=Object.defineProperties,kt=Object.getOwnPropertyDescriptor,Dt=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertyNames,ee=Object.getOwnPropertySymbols,pe=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,vr=(Q,$,c)=>$ in Q?J(Q,$,{enumerable:!0,configurable:!0,writable:!0,value:c}):Q[$]=c,Ir=(Q,$)=>{for(var c in $||($={}))Be.call($,c)&&vr(Q,c,$[c]);if(ee)for(var c of ee($))ir.call($,c)&&vr(Q,c,$[c]);return Q},Pr=(Q,$)=>mt(Q,Dt($)),Wr=(Q,$)=>{var c={};for(var g in Q)Be.call(Q,g)&&$.indexOf(g)<0&&(c[g]=Q[g]);if(Q!=null&&ee)for(var g of ee(Q))$.indexOf(g)<0&&ir.call(Q,g)&&(c[g]=Q[g]);return c},Tn=(Q,$)=>()=>(Q&&($=Q(Q=0)),$),Ft=(Q,$)=>()=>($||Q(($={exports:{}}).exports,$),$.exports),wn=(Q,$)=>{for(var c in $)J(Q,c,{get:$[c],enumerable:!0})},ei=(Q,$,c,g)=>{if($&&typeof $=="object"||typeof $=="function")for(let P of $t($))!Be.call(Q,P)&&P!==c&&J(Q,P,{get:()=>$[P],enumerable:!(g=kt($,P))||g.enumerable});return Q},jn=(Q,$,c)=>(c=Q!=null?j(pe(Q)):{},ei(J(c,"default",{value:Q,enumerable:!0}),Q)),ai=Q=>ei(J({},"__esModule",{value:!0}),Q),Qi=Ft(Q=>{Q.version="3.2.0"}),Gi=Ft((Q,$)=>{(function(c,g,P){g[c]=g[c]||P(),typeof $<"u"&&$.exports&&($.exports=g[c])})("Promise",typeof window<"u"?window:Q,function(){var c,g,P,S=Object.prototype.toString,t=typeof setImmediate<"u"?function(T){return setImmediate(T)}:setTimeout;try{Object.defineProperty({},"x",{}),c=function(T,u,b,_){return Object.defineProperty(T,u,{value:b,writable:!0,configurable:_!==!1})}}catch{c=function(u,b,_){return u[b]=_,u}}P=function(){var T,u,b;function _(C,M){this.fn=C,this.self=M,this.next=void 0}return{add:function(C,M){b=new _(C,M),u?u.next=b:T=b,u=b,b=void 0},drain:function(){var C=T;for(T=u=g=void 0;C;)C.fn.call(C.self),C=C.next}}}();function e(T,u){P.add(T,u),g||(g=t(P.drain))}function r(T){var u,b=typeof T;return T!=null&&(b=="object"||b=="function")&&(u=T.then),typeof u=="function"?u:!1}function a(){for(var T=0;T0&&e(a,b))}catch(_){i.call(new f(b),_)}}}function i(T){var u=this;u.triggered||(u.triggered=!0,u.def&&(u=u.def),u.msg=T,u.state=2,u.chain.length>0&&e(a,u))}function s(T,u,b,_){for(var C=0;C{(function(){var c={version:"3.8.2"},g=[].slice,P=function(At){return g.call(At)},S=self.document;function t(At){return At&&(At.ownerDocument||At.document||At).documentElement}function e(At){return At&&(At.ownerDocument&&At.ownerDocument.defaultView||At.document&&At||At.defaultView)}if(S)try{P(S.documentElement.childNodes)[0].nodeType}catch{P=function(jt){for(var ue=jt.length,Me=new Array(ue);ue--;)Me[ue]=jt[ue];return Me}}if(Date.now||(Date.now=function(){return+new Date}),S)try{S.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,a=r.setAttribute,n=r.setAttributeNS,o=this.CSSStyleDeclaration.prototype,i=o.setProperty;r.setAttribute=function(jt,ue){a.call(this,jt,ue+"")},r.setAttributeNS=function(jt,ue,Me){n.call(this,jt,ue,Me+"")},o.setProperty=function(jt,ue,Me){i.call(this,jt,ue+"",Me)}}c.ascending=s;function s(At,jt){return Atjt?1:At>=jt?0:NaN}c.descending=function(At,jt){return jtAt?1:jt>=At?0:NaN},c.min=function(At,jt){var ue=-1,Me=At.length,Le,Ne;if(arguments.length===1){for(;++ue=Ne){Le=Ne;break}for(;++ueNe&&(Le=Ne)}else{for(;++ue=Ne){Le=Ne;break}for(;++ueNe&&(Le=Ne)}return Le},c.max=function(At,jt){var ue=-1,Me=At.length,Le,Ne;if(arguments.length===1){for(;++ue=Ne){Le=Ne;break}for(;++ueLe&&(Le=Ne)}else{for(;++ue=Ne){Le=Ne;break}for(;++ueLe&&(Le=Ne)}return Le},c.extent=function(At,jt){var ue=-1,Me=At.length,Le,Ne,sr;if(arguments.length===1){for(;++ue=Ne){Le=sr=Ne;break}for(;++ueNe&&(Le=Ne),sr=Ne){Le=sr=Ne;break}for(;++ueNe&&(Le=Ne),sr1)return sr/(Mr-1)},c.deviation=function(){var At=c.variance.apply(this,arguments);return At&&Math.sqrt(At)};function y(At){return{left:function(jt,ue,Me,Le){for(arguments.length<3&&(Me=0),arguments.length<4&&(Le=jt.length);Me>>1;At(jt[Ne],ue)<0?Me=Ne+1:Le=Ne}return Me},right:function(jt,ue,Me,Le){for(arguments.length<3&&(Me=0),arguments.length<4&&(Le=jt.length);Me>>1;At(jt[Ne],ue)>0?Le=Ne:Me=Ne+1}return Me}}}var v=y(s);c.bisectLeft=v.left,c.bisect=c.bisectRight=v.right,c.bisector=function(At){return y(At.length===1?function(jt,ue){return s(At(jt),ue)}:At)},c.shuffle=function(At,jt,ue){(Me=arguments.length)<3&&(ue=At.length,Me<2&&(jt=0));for(var Me=ue-jt,Le,Ne;Me;)Ne=Math.random()*Me--|0,Le=At[Me+jt],At[Me+jt]=At[Ne+jt],At[Ne+jt]=Le;return At},c.permute=function(At,jt){for(var ue=jt.length,Me=new Array(ue);ue--;)Me[ue]=At[jt[ue]];return Me},c.pairs=function(At){for(var jt=0,ue=At.length-1,Me,Le=At[0],Ne=new Array(ue<0?0:ue);jt=0;)for(sr=At[jt],ue=sr.length;--ue>=0;)Ne[--Le]=sr[ue];return Ne};var u=Math.abs;c.range=function(At,jt,ue){if(arguments.length<3&&(ue=1,arguments.length<2&&(jt=At,At=0)),(jt-At)/ue===1/0)throw new Error("infinite range");var Me=[],Le=b(u(ue)),Ne=-1,sr;if(At*=Le,jt*=Le,ue*=Le,ue<0)for(;(sr=At+ue*++Ne)>jt;)Me.push(sr/Le);else for(;(sr=At+ue*++Ne)=jt.length)return Le?Le.call(At,Mr):Me?Mr.sort(Me):Mr;for(var Xr=-1,gn=Mr.length,In=jt[en++],On,Bi,Un,mi=new C,ki;++Xr=jt.length)return ar;var en=[],Xr=ue[Mr++];return ar.forEach(function(gn,In){en.push({key:gn,values:sr(In,Mr)})}),Xr?en.sort(function(gn,In){return Xr(gn.key,In.key)}):en}return At.map=function(ar,Mr){return Ne(Mr,ar,0)},At.entries=function(ar){return sr(Ne(c.map,ar,0),0)},At.key=function(ar){return jt.push(ar),At},At.sortKeys=function(ar){return ue[jt.length-1]=ar,At},At.sortValues=function(ar){return Me=ar,At},At.rollup=function(ar){return Le=ar,At},At},c.set=function(At){var jt=new N;if(At)for(var ue=0,Me=At.length;ue=0&&(Me=At.slice(ue+1),At=At.slice(0,ue)),At)return arguments.length<2?this[At].on(Me):this[At].on(Me,jt);if(arguments.length===2){if(jt==null)for(At in this)this.hasOwnProperty(At)&&this[At].on(Me,null);return this}};function X(At){var jt=[],ue=new C;function Me(){for(var Le=jt,Ne=-1,sr=Le.length,ar;++Ne=0&&(ue=At.slice(0,jt))!=="xmlns"&&(At=At.slice(jt+1)),wt.hasOwnProperty(ue)?{space:wt[ue],local:At}:At}},it.attr=function(At,jt){if(arguments.length<2){if(typeof At=="string"){var ue=this.node();return At=c.ns.qualify(At),At.local?ue.getAttributeNS(At.space,At.local):ue.getAttribute(At)}for(jt in At)this.each(zt(jt,At[jt]));return this}return this.each(zt(At,jt))};function zt(At,jt){At=c.ns.qualify(At);function ue(){this.removeAttribute(At)}function Me(){this.removeAttributeNS(At.space,At.local)}function Le(){this.setAttribute(At,jt)}function Ne(){this.setAttributeNS(At.space,At.local,jt)}function sr(){var Mr=jt.apply(this,arguments);Mr==null?this.removeAttribute(At):this.setAttribute(At,Mr)}function ar(){var Mr=jt.apply(this,arguments);Mr==null?this.removeAttributeNS(At.space,At.local):this.setAttributeNS(At.space,At.local,Mr)}return jt==null?At.local?Me:ue:typeof jt=="function"?At.local?ar:sr:At.local?Ne:Le}function Pt(At){return At.trim().replace(/\s+/g," ")}it.classed=function(At,jt){if(arguments.length<2){if(typeof At=="string"){var ue=this.node(),Me=(At=Ht(At)).length,Le=-1;if(jt=ue.classList){for(;++Le=0;)(Ne=ue[Me])&&(Le&&Le!==Ne.nextSibling&&Le.parentNode.insertBefore(Ne,Le),Le=Ne);return this},it.sort=function(At){At=te.apply(this,arguments);for(var jt=-1,ue=this.length;++jt=jt&&(jt=Le+1);!(Mr=sr[jt])&&++jt0&&(At=At.slice(0,Le));var sr=cr.get(At);sr&&(At=sr,Ne=jr);function ar(){var Xr=this[Me];Xr&&(this.removeEventListener(At,Xr,Xr.$),delete this[Me])}function Mr(){var Xr=Ne(jt,P(arguments));ar.call(this),this.addEventListener(At,this[Me]=Xr,Xr.$=ue),Xr._=jt}function en(){var Xr=new RegExp("^__on([^.]+)"+c.requote(At)+"$"),gn;for(var In in this)if(gn=In.match(Xr)){var On=this[In];this.removeEventListener(gn[1],On,On.$),delete this[In]}}return Le?jt?Mr:ar:jt?W:en}var cr=c.map({mouseenter:"mouseover",mouseleave:"mouseout"});S&&cr.forEach(function(At){"on"+At in S&&cr.remove(At)});function ur(At,jt){return function(ue){var Me=c.event;c.event=ue,jt[0]=this.__data__;try{At.apply(this,jt)}finally{c.event=Me}}}function jr(At,jt){var ue=ur(At,jt);return function(Me){var Le=this,Ne=Me.relatedTarget;(!Ne||Ne!==Le&&!(Ne.compareDocumentPosition(Le)&8))&&ue.call(Le,Me)}}var Hr,br=0;function Kr(At){var jt=".dragsuppress-"+ ++br,ue="click"+jt,Me=c.select(e(At)).on("touchmove"+jt,lt).on("dragstart"+jt,lt).on("selectstart"+jt,lt);if(Hr==null&&(Hr="onselectstart"in At?!1:F(At.style,"userSelect")),Hr){var Le=t(At).style,Ne=Le[Hr];Le[Hr]="none"}return function(sr){if(Me.on(jt,null),Hr&&(Le[Hr]=Ne),sr){var ar=function(){Me.on(ue,null)};Me.on(ue,function(){lt(),ar()},!0),setTimeout(ar,0)}}}c.mouse=function(At){return Ce(At,yt())};var rn=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ce(At,jt){jt.changedTouches&&(jt=jt.changedTouches[0]);var ue=At.ownerSVGElement||At;if(ue.createSVGPoint){var Me=ue.createSVGPoint();if(rn<0){var Le=e(At);if(Le.scrollX||Le.scrollY){ue=c.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ne=ue[0][0].getScreenCTM();rn=!(Ne.f||Ne.e),ue.remove()}}return rn?(Me.x=jt.pageX,Me.y=jt.pageY):(Me.x=jt.clientX,Me.y=jt.clientY),Me=Me.matrixTransform(At.getScreenCTM().inverse()),[Me.x,Me.y]}var sr=At.getBoundingClientRect();return[jt.clientX-sr.left-At.clientLeft,jt.clientY-sr.top-At.clientTop]}c.touch=function(At,jt,ue){if(arguments.length<3&&(ue=jt,jt=yt().changedTouches),jt){for(var Me=0,Le=jt.length,Ne;Me1?re:At<-1?-re:Math.asin(At)}function or(At){return((At=Math.exp(At))-1/At)/2}function Ar(At){return((At=Math.exp(At))+1/At)/2}function Tr(At){return((At=Math.exp(2*At))-1)/(At+1)}var pr=Math.SQRT2,Jr=2,Vn=4;c.interpolateZoom=function(At,jt){var ue=At[0],Me=At[1],Le=At[2],Ne=jt[0],sr=jt[1],ar=jt[2],Mr=Ne-ue,en=sr-Me,Xr=Mr*Mr+en*en,gn,In;if(Xr0&&(_o=_o.transition().duration(sr)),_o.call(Hi.event)}function Ro(){mi&&mi.domain(Un.range().map(function(_o){return(_o-At.x)/At.k}).map(Un.invert)),Pi&&Pi.domain(ki.range().map(function(_o){return(_o-At.y)/At.k}).map(ki.invert))}function Wo(_o){ar++||_o({type:"zoomstart"})}function sl(_o){Ro(),_o({type:"zoom",scale:At.k,translate:[At.x,At.y]})}function $o(_o){--ar||(_o({type:"zoomend"}),ue=null)}function ys(){var _o=this,Gs=Bi.of(_o,arguments),il=0,lu=c.select(e(_o)).on(en,Nl).on(Xr,eu),Kl=Yn(c.mouse(_o)),rh=Kr(_o);Di.call(_o),Wo(Gs);function Nl(){il=1,io(c.mouse(_o),Kl),sl(Gs)}function eu(){lu.on(en,null).on(Xr,null),rh(il),$o(Gs)}}function Tl(){var _o=this,Gs=Bi.of(_o,arguments),il={},lu=0,Kl,rh=".zoom-"+c.event.changedTouches[0].identifier,Nl="touchmove"+rh,eu="touchend"+rh,wh=[],_e=c.select(_o),kr=Kr(_o);Dn(),Wo(Gs),_e.on(Mr,null).on(In,Dn);function Lr(){var mn=c.touches(_o);return Kl=At.k,mn.forEach(function(ni){ni.identifier in il&&(il[ni.identifier]=Yn(ni))}),mn}function Dn(){var mn=c.event.target;c.select(mn).on(Nl,oi).on(eu,Jn),wh.push(mn);for(var ni=c.event.changedTouches,Yi=0,Ui=ni.length;Yi1){var Ra=ma[0],ta=ma[1],bi=Ra[0]-ta[0],cn=Ra[1]-ta[1];lu=bi*bi+cn*cn}}function oi(){var mn=c.touches(_o),ni,Yi,Ui,ma;Di.call(_o);for(var Za=0,Ra=mn.length;Za1?1:jt,ue=ue<0?0:ue>1?1:ue,Le=ue<=.5?ue*(1+jt):ue+jt-ue*jt,Me=2*ue-Le;function Ne(ar){return ar>360?ar-=360:ar<0&&(ar+=360),ar<60?Me+(Le-Me)*ar/60:ar<180?Le:ar<240?Me+(Le-Me)*(240-ar)/60:Me}function sr(ar){return Math.round(Ne(ar)*255)}return new La(sr(At+120),sr(At),sr(At-120))}c.hcl=We;function We(At,jt,ue){return this instanceof We?(this.h=+At,this.c=+jt,void(this.l=+ue)):arguments.length<2?At instanceof We?new We(At.h,At.c,At.l):At instanceof _r?Li(At.l,At.a,At.b):Li((At=Br((At=c.rgb(At)).r,At.g,At.b)).l,At.a,At.b):new We(At,jt,ue)}var rr=We.prototype=new ii;rr.brighter=function(At){return new We(this.h,this.c,Math.min(100,this.l+Qr*(arguments.length?At:1)))},rr.darker=function(At){return new We(this.h,this.c,Math.max(0,this.l-Qr*(arguments.length?At:1)))},rr.rgb=function(){return fr(this.h,this.c,this.l).rgb()};function fr(At,jt,ue){return isNaN(At)&&(At=0),isNaN(jt)&&(jt=0),new _r(ue,Math.cos(At*=le)*jt,Math.sin(At)*jt)}c.lab=_r;function _r(At,jt,ue){return this instanceof _r?(this.l=+At,this.a=+jt,void(this.b=+ue)):arguments.length<2?At instanceof _r?new _r(At.l,At.a,At.b):At instanceof We?fr(At.h,At.c,At.l):Br((At=La(At)).r,At.g,At.b):new _r(At,jt,ue)}var Qr=18,Cn=.95047,bn=1,An=1.08883,ci=_r.prototype=new ii;ci.brighter=function(At){return new _r(Math.min(100,this.l+Qr*(arguments.length?At:1)),this.a,this.b)},ci.darker=function(At){return new _r(Math.max(0,this.l-Qr*(arguments.length?At:1)),this.a,this.b)},ci.rgb=function(){return xi(this.l,this.a,this.b)};function xi(At,jt,ue){var Me=(At+16)/116,Le=Me+jt/500,Ne=Me-ue/200;return Le=Oi(Le)*Cn,Me=Oi(Me)*bn,Ne=Oi(Ne)*An,new La(li(3.2404542*Le-1.5371385*Me-.4985314*Ne),li(-.969266*Le+1.8760108*Me+.041556*Ne),li(.0556434*Le-.2040259*Me+1.0572252*Ne))}function Li(At,jt,ue){return At>0?new We(Math.atan2(ue,jt)*we,Math.sqrt(jt*jt+ue*ue),At):new We(NaN,NaN,At)}function Oi(At){return At>.206893034?At*At*At:(At-4/29)/7.787037}function Zi(At){return At>.008856?Math.pow(At,1/3):7.787037*At+4/29}function li(At){return Math.round(255*(At<=.00304?12.92*At:1.055*Math.pow(At,1/2.4)-.055))}c.rgb=La;function La(At,jt,ue){return this instanceof La?(this.r=~~At,this.g=~~jt,void(this.b=~~ue)):arguments.length<2?At instanceof La?new La(At.r,At.g,At.b):qr(""+At,La,Vi):new La(At,jt,ue)}function Wa(At){return new La(At>>16,At>>8&255,At&255)}function ze(At){return Wa(At)+""}var Pe=La.prototype=new ii;Pe.brighter=function(At){At=Math.pow(.7,arguments.length?At:1);var jt=this.r,ue=this.g,Me=this.b,Le=30;return!jt&&!ue&&!Me?new La(Le,Le,Le):(jt&&jt>4,Me=Me>>4|Me,Le=Mr&240,Le=Le>>4|Le,Ne=Mr&15,Ne=Ne<<4|Ne):At.length===7&&(Me=(Mr&16711680)>>16,Le=(Mr&65280)>>8,Ne=Mr&255)),jt(Me,Le,Ne))}function $r(At,jt,ue){var Me=Math.min(At/=255,jt/=255,ue/=255),Le=Math.max(At,jt,ue),Ne=Le-Me,sr,ar,Mr=(Le+Me)/2;return Ne?(ar=Mr<.5?Ne/(Le+Me):Ne/(2-Le-Me),At==Le?sr=(jt-ue)/Ne+(jt0&&Mr<1?0:sr),new qn(sr,ar,Mr)}function Br(At,jt,ue){At=Gr(At),jt=Gr(jt),ue=Gr(ue);var Me=Zi((.4124564*At+.3575761*jt+.1804375*ue)/Cn),Le=Zi((.2126729*At+.7151522*jt+.072175*ue)/bn),Ne=Zi((.0193339*At+.119192*jt+.9503041*ue)/An);return _r(116*Le-16,500*(Me-Le),200*(Le-Ne))}function Gr(At){return(At/=255)<=.04045?At/12.92:Math.pow((At+.055)/1.055,2.4)}function fn(At){var jt=parseFloat(At);return At.charAt(At.length-1)==="%"?Math.round(jt*2.55):jt}var an=c.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});an.forEach(function(At,jt){an.set(At,Wa(jt))});function Ee(At){return typeof At=="function"?At:function(){return At}}c.functor=Ee,c.xhr=dr(V);function dr(At){return function(jt,ue,Me){return arguments.length===2&&typeof ue=="function"&&(Me=ue,ue=null),Vr(jt,ue,At,Me)}}function Vr(At,jt,ue,Me){var Le={},Ne=c.dispatch("beforesend","progress","load","error"),sr={},ar=new XMLHttpRequest,Mr=null;self.XDomainRequest&&!("withCredentials"in ar)&&/^(http(s)?:)?\/\//.test(At)&&(ar=new XDomainRequest),"onload"in ar?ar.onload=ar.onerror=en:ar.onreadystatechange=function(){ar.readyState>3&&en()};function en(){var Xr=ar.status,gn;if(!Xr&&Fn(ar)||Xr>=200&&Xr<300||Xr===304){try{gn=ue.call(Le,ar)}catch(In){Ne.error.call(Le,In);return}Ne.load.call(Le,gn)}else Ne.error.call(Le,ar)}return ar.onprogress=function(Xr){var gn=c.event;c.event=Xr;try{Ne.progress.call(Le,ar)}finally{c.event=gn}},Le.header=function(Xr,gn){return Xr=(Xr+"").toLowerCase(),arguments.length<2?sr[Xr]:(gn==null?delete sr[Xr]:sr[Xr]=gn+"",Le)},Le.mimeType=function(Xr){return arguments.length?(jt=Xr==null?null:Xr+"",Le):jt},Le.responseType=function(Xr){return arguments.length?(Mr=Xr,Le):Mr},Le.response=function(Xr){return ue=Xr,Le},["get","post"].forEach(function(Xr){Le[Xr]=function(){return Le.send.apply(Le,[Xr].concat(P(arguments)))}}),Le.send=function(Xr,gn,In){if(arguments.length===2&&typeof gn=="function"&&(In=gn,gn=null),ar.open(Xr,At,!0),jt!=null&&!("accept"in sr)&&(sr.accept=jt+",*/*"),ar.setRequestHeader)for(var On in sr)ar.setRequestHeader(On,sr[On]);return jt!=null&&ar.overrideMimeType&&ar.overrideMimeType(jt),Mr!=null&&(ar.responseType=Mr),In!=null&&Le.on("error",In).on("load",function(Bi){In(null,Bi)}),Ne.beforesend.call(Le,ar),ar.send(gn??null),Le},Le.abort=function(){return ar.abort(),Le},c.rebind(Le,Ne,"on"),Me==null?Le:Le.get(vn(Me))}function vn(At){return At.length===1?function(jt,ue){At(jt==null?ue:null)}:At}function Fn(At){var jt=At.responseType;return jt&&jt!=="text"?At.response:At.responseText}c.dsv=function(At,jt){var ue=new RegExp('["'+At+` -]`),Me=At.charCodeAt(0);function Le(en,Xr,gn){arguments.length<3&&(gn=Xr,Xr=null);var In=Vr(en,jt,Xr==null?Ne:sr(Xr),gn);return In.row=function(On){return arguments.length?In.response((Xr=On)==null?Ne:sr(On)):Xr},In}function Ne(en){return Le.parse(en.responseText)}function sr(en){return function(Xr){return Le.parse(Xr.responseText,en)}}Le.parse=function(en,Xr){var gn;return Le.parseRows(en,function(In,On){if(gn)return gn(In,On-1);var Bi=function(Un){for(var mi={},ki=In.length,Pi=0;Pi=Bi)return In;if(Pi)return Pi=!1,gn;var Na=Un;if(en.charCodeAt(Na)===34){for(var Ha=Na;Ha++24?(isFinite(jt)&&(clearTimeout(Zn),Zn=setTimeout(Ja,jt)),Sn=0):(Sn=1,Ea(Ja))}c.timer.flush=function(){Xa(),Do()};function Xa(){for(var At=Date.now(),jt=Xn;jt;)At>=jt.t&&jt.c(At-jt.t)&&(jt.c=null),jt=jt.n;return At}function Do(){for(var At,jt=Xn,ue=1/0;jt;)jt.c?(jt.t=0;--ar)Un.push(Le[en[gn[ar]][2]]);for(ar=+On;ar1&&Ue(At[ue[Me-2]],At[ue[Me-1]],At[Le])<=0;)--Me;ue[Me++]=Le}return ue.slice(0,Me)}function xs(At,jt){return At[0]-jt[0]||At[1]-jt[1]}c.geom.polygon=function(At){return tt(At,os),At};var os=c.geom.polygon.prototype=[];os.area=function(){for(var At=-1,jt=this.length,ue,Me=this[jt-1],Le=0;++Atne)ar=ar.L;else if(sr=jt-fo(ar,ue),sr>ne){if(!ar.R){Me=ar;break}ar=ar.R}else{Ne>-ne?(Me=ar.P,Le=ar):sr>-ne?(Me=ar,Le=ar.N):Me=Le=ar;break}var Mr=kl(At);if(tl.insert(Me,Mr),!(!Me&&!Le)){if(Me===Le){Pl(Me),Le=kl(Me.site),tl.insert(Mr,Le),Mr.edge=Le.edge=au(Me.site,Mr.site),ol(Me),ol(Le);return}if(!Le){Mr.edge=au(Me.site,Mr.site);return}Pl(Me),Pl(Le);var en=Me.site,Xr=en.x,gn=en.y,In=At.x-Xr,On=At.y-gn,Bi=Le.site,Un=Bi.x-Xr,mi=Bi.y-gn,ki=2*(In*mi-On*Un),Pi=In*In+On*On,Hi=Un*Un+mi*mi,Yn={x:(mi*Pi-On*Hi)/ki+Xr,y:(In*Hi-Un*Pi)/ki+gn};rs(Le.edge,en,Bi,Yn),Mr.edge=au(en,At,null,Yn),Le.edge=au(At,Bi,null,Yn),ol(Me),ol(Le)}}function Ca(At,jt){var ue=At.site,Me=ue.x,Le=ue.y,Ne=Le-jt;if(!Ne)return Me;var sr=At.P;if(!sr)return-1/0;ue=sr.site;var ar=ue.x,Mr=ue.y,en=Mr-jt;if(!en)return ar;var Xr=ar-Me,gn=1/Ne-1/en,In=Xr/en;return gn?(-In+Math.sqrt(In*In-2*gn*(Xr*Xr/(-2*en)-Mr+en/2+Le-Ne/2)))/gn+Me:(Me+ar)/2}function fo(At,jt){var ue=At.N;if(ue)return Ca(ue,jt);var Me=At.site;return Me.y===jt?Me.x:1/0}function qs(At){this.site=At,this.edges=[]}qs.prototype.prepare=function(){for(var At=this.edges,jt=At.length,ue;jt--;)ue=At[jt].edge,(!ue.b||!ue.a)&&At.splice(jt,1);return At.sort(Jo),At.length};function Jl(At){for(var jt=At[0][0],ue=At[1][0],Me=At[0][1],Le=At[1][1],Ne,sr,ar,Mr,en=hl,Xr=en.length,gn,In,On,Bi,Un,mi;Xr--;)if(gn=en[Xr],!(!gn||!gn.prepare()))for(On=gn.edges,Bi=On.length,In=0;Inne||u(Mr-sr)>ne)&&(On.splice(In,0,new Mu(fl(gn.site,mi,u(ar-jt)ne?{x:jt,y:u(Ne-jt)ne?{x:u(sr-Le)ne?{x:ue,y:u(Ne-ue)ne?{x:u(sr-Me)=-Ct)){var On=Mr*Mr+en*en,Bi=Xr*Xr+gn*gn,Un=(gn*On-en*Bi)/In,mi=(Mr*Bi-Xr*On)/In,gn=mi+ar,ki=Po.pop()||new $l;ki.arc=At,ki.site=Le,ki.x=Un+sr,ki.y=gn+Math.sqrt(Un*Un+mi*mi),ki.cy=gn,At.circle=ki;for(var Pi=null,Hi=Ps._;Hi;)if(ki.y0)){if(Un/=On,On<0){if(Un0){if(Un>In)return;Un>gn&&(gn=Un)}if(Un=ue-ar,!(!On&&Un<0)){if(Un/=On,On<0){if(Un>In)return;Un>gn&&(gn=Un)}else if(On>0){if(Un0)){if(Un/=Bi,Bi<0){if(Un0){if(Un>In)return;Un>gn&&(gn=Un)}if(Un=Me-Mr,!(!Bi&&Un<0)){if(Un/=Bi,Bi<0){if(Un>In)return;Un>gn&&(gn=Un)}else if(Bi>0){if(Un0&&(Le.a={x:ar+gn*On,y:Mr+gn*Bi}),In<1&&(Le.b={x:ar+In*On,y:Mr+In*Bi}),Le}}}}}}function lo(At){for(var jt=ss,ue=Ru(At[0][0],At[0][1],At[1][0],At[1][1]),Me=jt.length,Le;Me--;)Le=jt[Me],(!As(Le,At)||!ue(Le)||u(Le.a.x-Le.b.x)=Ne)return;if(Xr>In){if(!Me)Me={x:Bi,y:sr};else if(Me.y>=ar)return;ue={x:Bi,y:ar}}else{if(!Me)Me={x:Bi,y:ar};else if(Me.y1)if(Xr>In){if(!Me)Me={x:(sr-ki)/mi,y:sr};else if(Me.y>=ar)return;ue={x:(ar-ki)/mi,y:ar}}else{if(!Me)Me={x:(ar-ki)/mi,y:ar};else if(Me.y=Ne)return;ue={x:Ne,y:mi*Ne+ki}}else{if(!Me)Me={x:Ne,y:mi*Ne+ki};else if(Me.x=Xr&&ki.x<=In&&ki.y>=gn&&ki.y<=On?[[Xr,On],[In,On],[In,gn],[Xr,gn]]:[];Pi.point=Mr[Un]}),en}function ar(Mr){return Mr.map(function(en,Xr){return{x:Math.round(Me(en,Xr)/ne)*ne,y:Math.round(Le(en,Xr)/ne)*ne,i:Xr}})}return sr.links=function(Mr){return oc(ar(Mr)).edges.filter(function(en){return en.l&&en.r}).map(function(en){return{source:Mr[en.l.i],target:Mr[en.r.i]}})},sr.triangles=function(Mr){var en=[];return oc(ar(Mr)).cells.forEach(function(Xr,gn){for(var In=Xr.site,On=Xr.edges.sort(Jo),Bi=-1,Un=On.length,mi,ki,Pi=On[Un-1].edge,Hi=Pi.l===In?Pi.r:Pi.l;++BiHi&&(Hi=Xr.x),Xr.y>Yn&&(Yn=Xr.y),On.push(Xr.x),Bi.push(Xr.y);else for(Un=0;UnHi&&(Hi=Na),Ha>Yn&&(Yn=Ha),On.push(Na),Bi.push(Ha)}var io=Hi-ki,zo=Yn-Pi;io>zo?Yn=Pi+io:Hi=ki+zo;function Ro($o,ys,Tl,Ku,du,_o,Gs,il){if(!(isNaN(Tl)||isNaN(Ku)))if($o.leaf){var lu=$o.x,Kl=$o.y;if(lu!=null)if(u(lu-Tl)+u(Kl-Ku)<.01)Wo($o,ys,Tl,Ku,du,_o,Gs,il);else{var rh=$o.point;$o.x=$o.y=$o.point=null,Wo($o,rh,lu,Kl,du,_o,Gs,il),Wo($o,ys,Tl,Ku,du,_o,Gs,il)}else $o.x=Tl,$o.y=Ku,$o.point=ys}else Wo($o,ys,Tl,Ku,du,_o,Gs,il)}function Wo($o,ys,Tl,Ku,du,_o,Gs,il){var lu=(du+Gs)*.5,Kl=(_o+il)*.5,rh=Tl>=lu,Nl=Ku>=Kl,eu=Nl<<1|rh;$o.leaf=!1,$o=$o.nodes[eu]||($o.nodes[eu]=Fl()),rh?du=lu:Gs=lu,Nl?_o=Kl:il=Kl,Ro($o,ys,Tl,Ku,du,_o,Gs,il)}var sl=Fl();if(sl.add=function($o){Ro(sl,$o,+gn($o,++Un),+In($o,Un),ki,Pi,Hi,Yn)},sl.visit=function($o){Bc($o,sl,ki,Pi,Hi,Yn)},sl.find=function($o){return Vf(sl,$o[0],$o[1],ki,Pi,Hi,Yn)},Un=-1,jt==null){for(;++UnNe||In>sr||On=Na,zo=ue>=Ha,Ro=zo<<1|io,Wo=Ro+4;Roue&&(Ne=jt.slice(ue,Ne),ar[sr]?ar[sr]+=Ne:ar[++sr]=Ne),(Me=Me[0])===(Le=Le[0])?ar[sr]?ar[sr]+=Le:ar[++sr]=Le:(ar[++sr]=null,Mr.push({i:sr,x:dc(Me,Le)})),ue=lc.lastIndex;return ue=0&&!(Me=c.interpolators[ue](At,jt)););return Me}c.interpolators=[function(At,jt){var ue=typeof jt;return(ue==="string"?an.has(jt.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(jt)?fc:sh:jt instanceof ii?fc:Array.isArray(jt)?Gl:ue==="object"&&isNaN(jt)?sc:dc)(At,jt)}],c.interpolateArray=Gl;function Gl(At,jt){var ue=[],Me=[],Le=At.length,Ne=jt.length,sr=Math.min(At.length,jt.length),ar;for(ar=0;ar=0?At.slice(0,jt):At,Me=jt>=0?At.slice(jt+1):"in";return ue=Pc.get(ue)||Sh,Me=Uh.get(Me)||V,xu(Me(ue.apply(null,g.call(arguments,1))))};function xu(At){return function(jt){return jt<=0?0:jt>=1?1:At(jt)}}function Id(At){return function(jt){return 1-At(1-jt)}}function el(At){return function(jt){return .5*(jt<.5?At(2*jt):2-At(2-2*jt))}}function $d(At){return At*At}function zl(At){return At*At*At}function ts(At){if(At<=0)return 0;if(At>=1)return 1;var jt=At*At,ue=jt*At;return 4*(At<.5?ue:3*(At-jt)+ue-.75)}function lf(At){return function(jt){return Math.pow(jt,At)}}function lh(At){return 1-Math.cos(At*re)}function ec(At){return Math.pow(2,10*(At-1))}function Hf(At){return 1-Math.sqrt(1-At*At)}function Vh(At,jt){var ue;return arguments.length<2&&(jt=.45),arguments.length?ue=jt/St*Math.asin(1/At):(At=1,ue=jt/4),function(Me){return 1+At*Math.pow(2,-10*Me)*Math.sin((Me-ue)*St/jt)}}function xf(At){return At||(At=1.70158),function(jt){return jt*jt*((At+1)*jt-At)}}function uc(At){return At<1/2.75?7.5625*At*At:At<2/2.75?7.5625*(At-=1.5/2.75)*At+.75:At<2.5/2.75?7.5625*(At-=2.25/2.75)*At+.9375:7.5625*(At-=2.625/2.75)*At+.984375}c.interpolateHcl=md;function md(At,jt){At=c.hcl(At),jt=c.hcl(jt);var ue=At.h,Me=At.c,Le=At.l,Ne=jt.h-ue,sr=jt.c-Me,ar=jt.l-Le;return isNaN(sr)&&(sr=0,Me=isNaN(Me)?jt.c:Me),isNaN(Ne)?(Ne=0,ue=isNaN(ue)?jt.h:ue):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(Mr){return fr(ue+Ne*Mr,Me+sr*Mr,Le+ar*Mr)+""}}c.interpolateHsl=Kf;function Kf(At,jt){At=c.hsl(At),jt=c.hsl(jt);var ue=At.h,Me=At.s,Le=At.l,Ne=jt.h-ue,sr=jt.s-Me,ar=jt.l-Le;return isNaN(sr)&&(sr=0,Me=isNaN(Me)?jt.s:Me),isNaN(Ne)?(Ne=0,ue=isNaN(ue)?jt.h:ue):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(Mr){return Vi(ue+Ne*Mr,Me+sr*Mr,Le+ar*Mr)+""}}c.interpolateLab=_f;function _f(At,jt){At=c.lab(At),jt=c.lab(jt);var ue=At.l,Me=At.a,Le=At.b,Ne=jt.l-ue,sr=jt.a-Me,ar=jt.b-Le;return function(Mr){return xi(ue+Ne*Mr,Me+sr*Mr,Le+ar*Mr)+""}}c.interpolateRound=Hh;function Hh(At,jt){return jt-=At,function(ue){return Math.round(At+jt*ue)}}c.transform=function(At){var jt=S.createElementNS(c.ns.prefix.svg,"g");return(c.transform=function(ue){if(ue!=null){jt.setAttribute("transform",ue);var Me=jt.transform.baseVal.consolidate()}return new Wf(Me?Me.matrix:Eh)})(At)};function Wf(At){var jt=[At.a,At.b],ue=[At.c,At.d],Me=uh(jt),Le=qf(jt,ue),Ne=uh(Xf(ue,jt,-Le))||0;jt[0]*ue[1]180?jt+=360:jt-At>180&&(At+=360),Me.push({i:ue.push(gh(ue)+"rotate(",null,")")-2,x:dc(At,jt)})):jt&&ue.push(gh(ue)+"rotate("+jt+")")}function Zf(At,jt,ue,Me){At!==jt?Me.push({i:ue.push(gh(ue)+"skewX(",null,")")-2,x:dc(At,jt)}):jt&&ue.push(gh(ue)+"skewX("+jt+")")}function tu(At,jt,ue,Me){if(At[0]!==jt[0]||At[1]!==jt[1]){var Le=ue.push(gh(ue)+"scale(",null,",",null,")");Me.push({i:Le-4,x:dc(At[0],jt[0])},{i:Le-2,x:dc(At[1],jt[1])})}else(jt[0]!==1||jt[1]!==1)&&ue.push(gh(ue)+"scale("+jt+")")}function Lf(At,jt){var ue=[],Me=[];return At=c.transform(At),jt=c.transform(jt),cc(At.translate,jt.translate,ue,Me),ef(At.rotate,jt.rotate,ue,Me),Zf(At.skew,jt.skew,ue,Me),tu(At.scale,jt.scale,ue,Me),At=jt=null,function(Le){for(var Ne=-1,sr=Me.length,ar;++Ne0?Ne=Yn:(ue.c=null,ue.t=NaN,ue=null,jt.end({type:"end",alpha:Ne=0})):Yn>0&&(jt.start({type:"start",alpha:Ne=Yn}),ue=Ri(At.tick)),At):Ne},At.start=function(){var Yn,Na=On.length,Ha=Bi.length,io=Me[0],zo=Me[1],Ro,Wo;for(Yn=0;Yn=0;)Ne.push(Xr=en[Mr]),Xr.parent=ar,Xr.depth=ar.depth+1;ue&&(ar.value=0),ar.children=en}else ue&&(ar.value=+ue.call(Me,ar,ar.depth)||0),delete ar.children;return vh(Le,function(gn){var In,On;At&&(In=gn.children)&&In.sort(At),ue&&(On=gn.parent)&&(On.value+=gn.value)}),sr}return Me.sort=function(Le){return arguments.length?(At=Le,Me):At},Me.children=function(Le){return arguments.length?(jt=Le,Me):jt},Me.value=function(Le){return arguments.length?(ue=Le,Me):ue},Me.revalue=function(Le){return ue&&(uf(Le,function(Ne){Ne.children&&(Ne.value=0)}),vh(Le,function(Ne){var sr;Ne.children||(Ne.value=+ue.call(Me,Ne,Ne.depth)||0),(sr=Ne.parent)&&(sr.value+=Ne.value)})),Le},Me};function _u(At,jt){return c.rebind(At,jt,"sort","children","value"),At.nodes=At,At.links=rp,At}function uf(At,jt){for(var ue=[At];(At=ue.pop())!=null;)if(jt(At),(Le=At.children)&&(Me=Le.length))for(var Me,Le;--Me>=0;)ue.push(Le[Me])}function vh(At,jt){for(var ue=[At],Me=[];(At=ue.pop())!=null;)if(Me.push(At),(sr=At.children)&&(Ne=sr.length))for(var Le=-1,Ne,sr;++LeLe&&(Le=ar),Me.push(ar)}for(sr=0;srMe&&(ue=jt,Me=Le);return ue}function Lh(At){return At.reduce(Vc,0)}function Vc(At,jt){return At+jt[1]}c.layout.histogram=function(){var At=!0,jt=Number,ue=wf,Me=gd;function Le(Ne,sr){for(var ar=[],Mr=Ne.map(jt,this),en=ue.call(this,Mr,sr),Xr=Me.call(this,en,Mr,sr),gn,sr=-1,In=Mr.length,On=Xr.length-1,Bi=At?1:1/In,Un;++sr0)for(sr=-1;++sr=en[0]&&Un<=en[1]&&(gn=ar[c.bisect(Xr,Un,1,On)-1],gn.y+=Bi,gn.push(Ne[sr]));return ar}return Le.value=function(Ne){return arguments.length?(jt=Ne,Le):jt},Le.range=function(Ne){return arguments.length?(ue=Ee(Ne),Le):ue},Le.bins=function(Ne){return arguments.length?(Me=typeof Ne=="number"?function(sr){return vu(sr,Ne)}:Ee(Ne),Le):Me},Le.frequency=function(Ne){return arguments.length?(At=!!Ne,Le):At},Le};function gd(At,jt){return vu(At,Math.ceil(Math.log(jt.length)/Math.LN2+1))}function vu(At,jt){for(var ue=-1,Me=+At[0],Le=(At[1]-Me)/jt,Ne=[];++ue<=jt;)Ne[ue]=Le*ue+Me;return Ne}function wf(At){return[c.min(At),c.max(At)]}c.layout.pack=function(){var At=c.layout.hierarchy().sort(Zh),jt=0,ue=[1,1],Me;function Le(Ne,sr){var ar=At.call(this,Ne,sr),Mr=ar[0],en=ue[0],Xr=ue[1],gn=Me==null?Math.sqrt:typeof Me=="function"?Me:function(){return Me};if(Mr.x=Mr.y=0,vh(Mr,function(On){On.r=+gn(On.value)}),vh(Mr,kf),jt){var In=jt*(Me?1:Math.max(2*Mr.r/en,2*Mr.r/Xr))/2;vh(Mr,function(On){On.r+=In}),vh(Mr,kf),vh(Mr,function(On){On.r-=In})}return ed(Mr,en/2,Xr/2,Me?1:1/Math.max(2*Mr.r/en,2*Mr.r/Xr)),ar}return Le.size=function(Ne){return arguments.length?(ue=Ne,Le):ue},Le.radius=function(Ne){return arguments.length?(Me=Ne==null||typeof Ne=="function"?Ne:+Ne,Le):Me},Le.padding=function(Ne){return arguments.length?(jt=+Ne,Le):jt},_u(Le,At)};function Zh(At,jt){return At.value-jt.value}function th(At,jt){var ue=At._pack_next;At._pack_next=jt,jt._pack_prev=At,jt._pack_next=ue,ue._pack_prev=jt}function rf(At,jt){At._pack_next=jt,jt._pack_prev=At}function $h(At,jt){var ue=jt.x-At.x,Me=jt.y-At.y,Le=At.r+jt.r;return .999*Le*Le>ue*ue+Me*Me}function kf(At){if(!(jt=At.children)||!(In=jt.length))return;var jt,ue=1/0,Me=-1/0,Le=1/0,Ne=-1/0,sr,ar,Mr,en,Xr,gn,In;function On(Yn){ue=Math.min(Yn.x-Yn.r,ue),Me=Math.max(Yn.x+Yn.r,Me),Le=Math.min(Yn.y-Yn.r,Le),Ne=Math.max(Yn.y+Yn.r,Ne)}if(jt.forEach(Fd),sr=jt[0],sr.x=-sr.r,sr.y=0,On(sr),In>1&&(ar=jt[1],ar.x=ar.r,ar.y=0,On(ar),In>2))for(Mr=jt[2],eh(sr,ar,Mr),On(Mr),th(sr,Mr),sr._pack_prev=Mr,th(Mr,ar),ar=sr._pack_next,en=3;enmi.x&&(mi=Na),Na.depth>ki.depth&&(ki=Na)});var Pi=jt(Un,mi)/2-Un.x,Hi=ue[0]/(mi.x+jt(mi,Un)/2+Pi),Yn=ue[1]/(ki.depth||1);uf(On,function(Na){Na.x=(Na.x+Pi)*Hi,Na.y=Na.depth*Yn})}return In}function Ne(Xr){for(var gn={A:null,children:[Xr]},In=[gn],On;(On=In.pop())!=null;)for(var Bi=On.children,Un,mi=0,ki=Bi.length;mi0&&(nu(df(Un,Xr,In),Xr,Na),ki+=Na,Pi+=Na),Hi+=Un.m,ki+=On.m,Yn+=mi.m,Pi+=Bi.m;Un&&!Bu(Bi)&&(Bi.t=Un,Bi.m+=Hi-Pi),On&&!xh(mi)&&(mi.t=On,mi.m+=ki-Yn,In=Xr)}return In}function en(Xr){Xr.x*=ue[0],Xr.y=Xr.depth*ue[1]}return Le.separation=function(Xr){return arguments.length?(jt=Xr,Le):jt},Le.size=function(Xr){return arguments.length?(Me=(ue=Xr)==null?en:null,Le):Me?null:ue},Le.nodeSize=function(Xr){return arguments.length?(Me=(ue=Xr)==null?null:en,Le):Me?ue:null},_u(Le,At)};function Ph(At,jt){return At.parent==jt.parent?1:2}function xh(At){var jt=At.children;return jt.length?jt[0]:At.t}function Bu(At){var jt=At.children,ue;return(ue=jt.length)?jt[ue-1]:At.t}function nu(At,jt,ue){var Me=ue/(jt.i-At.i);jt.c-=Me,jt.s+=ue,At.c+=Me,jt.z+=ue,jt.m+=ue}function _h(At){for(var jt=0,ue=0,Me=At.children,Le=Me.length,Ne;--Le>=0;)Ne=Me[Le],Ne.z+=jt,Ne.m+=jt,jt+=Ne.s+(ue+=Ne.c)}function df(At,jt,ue){return At.a.parent===jt.parent?At.a:ue}c.layout.cluster=function(){var At=c.layout.hierarchy().sort(null).value(null),jt=Ph,ue=[1,1],Me=!1;function Le(Ne,sr){var ar=At.call(this,Ne,sr),Mr=ar[0],en,Xr=0;vh(Mr,function(Un){var mi=Un.children;mi&&mi.length?(Un.x=$f(mi),Un.y=bh(mi)):(Un.x=en?Xr+=jt(Un,en):0,Un.y=0,en=Un)});var gn=mr(Mr),In=Ur(Mr),On=gn.x-jt(gn,In)/2,Bi=In.x+jt(In,gn)/2;return vh(Mr,Me?function(Un){Un.x=(Un.x-Mr.x)*ue[0],Un.y=(Mr.y-Un.y)*ue[1]}:function(Un){Un.x=(Un.x-On)/(Bi-On)*ue[0],Un.y=(1-(Mr.y?Un.y/Mr.y:1))*ue[1]}),ar}return Le.separation=function(Ne){return arguments.length?(jt=Ne,Le):jt},Le.size=function(Ne){return arguments.length?(Me=(ue=Ne)==null,Le):Me?null:ue},Le.nodeSize=function(Ne){return arguments.length?(Me=(ue=Ne)!=null,Le):Me?ue:null},_u(Le,At)};function bh(At){return 1+c.max(At,function(jt){return jt.y})}function $f(At){return At.reduce(function(jt,ue){return jt+ue.x},0)/At.length}function mr(At){var jt=At.children;return jt&&jt.length?mr(jt[0]):At}function Ur(At){var jt=At.children,ue;return jt&&(ue=jt.length)?Ur(jt[ue-1]):At}c.layout.treemap=function(){var At=c.layout.hierarchy(),jt=Math.round,ue=[1,1],Me=null,Le=xn,Ne=!1,sr,ar="squarify",Mr=.5*(1+Math.sqrt(5));function en(Un,mi){for(var ki=-1,Pi=Un.length,Hi,Yn;++ki0;)Pi.push(Yn=Hi[zo-1]),Pi.area+=Yn.area,ar!=="squarify"||(Ha=In(Pi,io))<=Na?(Hi.pop(),Na=Ha):(Pi.area-=Pi.pop().area,On(Pi,io,ki,!1),io=Math.min(ki.dx,ki.dy),Pi.length=Pi.area=0,Na=1/0);Pi.length&&(On(Pi,io,ki,!0),Pi.length=Pi.area=0),mi.forEach(Xr)}}function gn(Un){var mi=Un.children;if(mi&&mi.length){var ki=Le(Un),Pi=mi.slice(),Hi,Yn=[];for(en(Pi,ki.dx*ki.dy/Un.value),Yn.area=0;Hi=Pi.pop();)Yn.push(Hi),Yn.area+=Hi.area,Hi.z!=null&&(On(Yn,Hi.z?ki.dx:ki.dy,ki,!Pi.length),Yn.length=Yn.area=0);mi.forEach(gn)}}function In(Un,mi){for(var ki=Un.area,Pi,Hi=0,Yn=1/0,Na=-1,Ha=Un.length;++NaHi&&(Hi=Pi));return ki*=ki,mi*=mi,ki?Math.max(mi*Hi*Mr/ki,ki/(mi*Yn*Mr)):1/0}function On(Un,mi,ki,Pi){var Hi=-1,Yn=Un.length,Na=ki.x,Ha=ki.y,io=mi?jt(Un.area/mi):0,zo;if(mi==ki.dx){for((Pi||io>ki.dy)&&(io=ki.dy);++Hiki.dx)&&(io=ki.dx);++Hi1);return At+jt*Me*Math.sqrt(-2*Math.log(Ne)/Ne)}},logNormal:function(){var At=c.random.normal.apply(c,arguments);return function(){return Math.exp(At())}},bates:function(At){var jt=c.random.irwinHall(At);return function(){return jt()/At}},irwinHall:function(At){return function(){for(var jt=0,ue=0;ue2?la:ea,en=Me?Jf:Od;return Le=Mr(At,jt,en,ue),Ne=Mr(jt,At,en,nl),ar}function ar(Mr){return Le(Mr)}return ar.invert=function(Mr){return Ne(Mr)},ar.domain=function(Mr){return arguments.length?(At=Mr.map(Number),sr()):At},ar.range=function(Mr){return arguments.length?(jt=Mr,sr()):jt},ar.rangeRound=function(Mr){return ar.range(Mr).interpolate(Hh)},ar.clamp=function(Mr){return arguments.length?(Me=Mr,sr()):Me},ar.interpolate=function(Mr){return arguments.length?(ue=Mr,sr()):ue},ar.ticks=function(Mr){return as(At,Mr)},ar.tickFormat=function(Mr,en){return d3_scale_linearTickFormat(At,Mr,en)},ar.nice=function(Mr){return Ji(At,Mr),sr()},ar.copy=function(){return Pa(At,jt,ue,Me)},sr()}function ba(At,jt){return c.rebind(At,jt,"range","rangeRound","interpolate","clamp")}function Ji(At,jt){return pa(At,Da(no(At,jt)[2])),pa(At,Da(no(At,jt)[2])),At}function no(At,jt){jt==null&&(jt=10);var ue=Wn(At),Me=ue[1]-ue[0],Le=Math.pow(10,Math.floor(Math.log(Me/jt)/Math.LN10)),Ne=jt/Me*Le;return Ne<=.15?Le*=10:Ne<=.35?Le*=5:Ne<=.75&&(Le*=2),ue[0]=Math.ceil(ue[0]/Le)*Le,ue[1]=Math.floor(ue[1]/Le)*Le+Le*.5,ue[2]=Le,ue}function as(At,jt){return c.range.apply(c,no(At,jt))}c.scale.log=function(){return Xo(c.scale.linear().domain([0,1]),10,!0,[1,10])};function Xo(At,jt,ue,Me){function Le(ar){return(ue?Math.log(ar<0?0:ar):-Math.log(ar>0?0:-ar))/Math.log(jt)}function Ne(ar){return ue?Math.pow(jt,ar):-Math.pow(jt,-ar)}function sr(ar){return At(Le(ar))}return sr.invert=function(ar){return Ne(At.invert(ar))},sr.domain=function(ar){return arguments.length?(ue=ar[0]>=0,At.domain((Me=ar.map(Number)).map(Le)),sr):Me},sr.base=function(ar){return arguments.length?(jt=+ar,At.domain(Me.map(Le)),sr):jt},sr.nice=function(){var ar=pa(Me.map(Le),ue?Math:ls);return At.domain(ar),Me=ar.map(Ne),sr},sr.ticks=function(){var ar=Wn(Me),Mr=[],en=ar[0],Xr=ar[1],gn=Math.floor(Le(en)),In=Math.ceil(Le(Xr)),On=jt%1?2:jt;if(isFinite(In-gn)){if(ue){for(;gn0;Bi--)Mr.push(Ne(gn)*Bi);for(gn=0;Mr[gn]Xr;In--);Mr=Mr.slice(gn,In)}return Mr},sr.copy=function(){return Xo(At.copy(),jt,ue,Me)},ba(sr,At)}var ls={floor:function(At){return-Math.ceil(-At)},ceil:function(At){return-Math.floor(-At)}};c.scale.pow=function(){return ms(c.scale.linear(),1,[0,1])};function ms(At,jt,ue){var Me=oo(jt),Le=oo(1/jt);function Ne(sr){return At(Me(sr))}return Ne.invert=function(sr){return Le(At.invert(sr))},Ne.domain=function(sr){return arguments.length?(At.domain((ue=sr.map(Number)).map(Me)),Ne):ue},Ne.ticks=function(sr){return as(ue,sr)},Ne.tickFormat=function(sr,ar){return d3_scale_linearTickFormat(ue,sr,ar)},Ne.nice=function(sr){return Ne.domain(Ji(ue,sr))},Ne.exponent=function(sr){return arguments.length?(Me=oo(jt=sr),Le=oo(1/jt),At.domain(ue.map(Me)),Ne):jt},Ne.copy=function(){return ms(At.copy(),jt,ue)},ba(Ne,At)}function oo(At){return function(jt){return jt<0?-Math.pow(-jt,At):Math.pow(jt,At)}}c.scale.sqrt=function(){return c.scale.pow().exponent(.5)},c.scale.ordinal=function(){return qa([],{t:"range",a:[[]]})};function qa(At,jt){var ue,Me,Le;function Ne(ar){return Me[((ue.get(ar)||(jt.t==="range"?ue.set(ar,At.push(ar)):NaN))-1)%Me.length]}function sr(ar,Mr){return c.range(At.length).map(function(en){return ar+Mr*en})}return Ne.domain=function(ar){if(!arguments.length)return At;At=[],ue=new C;for(var Mr=-1,en=ar.length,Xr;++Mr0?ue[Ne-1]:At[0],NeIn?0:1;if(Xr=Nt)return Mr(Xr,Bi)+(en?Mr(en,1-Bi):"")+"Z";var Un,mi,ki,Pi,Hi=0,Yn=0,Na,Ha,io,zo,Ro,Wo,sl,$o,ys=[];if((Pi=(+sr.apply(this,arguments)||0)/2)&&(ki=Me===fu?Math.sqrt(en*en+Xr*Xr):+Me.apply(this,arguments),Bi||(Yn*=-1),Xr&&(Yn=qe(ki/Xr*Math.sin(Pi))),en&&(Hi=qe(ki/en*Math.sin(Pi)))),Xr){Na=Xr*Math.cos(gn+Yn),Ha=Xr*Math.sin(gn+Yn),io=Xr*Math.cos(In-Yn),zo=Xr*Math.sin(In-Yn);var Tl=Math.abs(In-gn-2*Yn)<=gt?0:1;if(Yn&&Hc(Na,Ha,io,zo)===Bi^Tl){var Ku=(gn+In)/2;Na=Xr*Math.cos(Ku),Ha=Xr*Math.sin(Ku),io=zo=null}}else Na=Ha=0;if(en){Ro=en*Math.cos(In-Hi),Wo=en*Math.sin(In-Hi),sl=en*Math.cos(gn+Hi),$o=en*Math.sin(gn+Hi);var du=Math.abs(gn-In+2*Hi)<=gt?0:1;if(Hi&&Hc(Ro,Wo,sl,$o)===1-Bi^du){var _o=(gn+In)/2;Ro=en*Math.cos(_o),Wo=en*Math.sin(_o),sl=$o=null}}else Ro=Wo=0;if(On>ne&&(Un=Math.min(Math.abs(Xr-en)/2,+ue.apply(this,arguments)))>.001){mi=en0?0:1}function zc(At,jt,ue,Me,Le){var Ne=At[0]-jt[0],sr=At[1]-jt[1],ar=(Le?Me:-Me)/Math.sqrt(Ne*Ne+sr*sr),Mr=ar*sr,en=-ar*Ne,Xr=At[0]+Mr,gn=At[1]+en,In=jt[0]+Mr,On=jt[1]+en,Bi=(Xr+In)/2,Un=(gn+On)/2,mi=In-Xr,ki=On-gn,Pi=mi*mi+ki*ki,Hi=ue-Me,Yn=Xr*On-In*gn,Na=(ki<0?-1:1)*Math.sqrt(Math.max(0,Hi*Hi*Pi-Yn*Yn)),Ha=(Yn*ki-mi*Na)/Pi,io=(-Yn*mi-ki*Na)/Pi,zo=(Yn*ki+mi*Na)/Pi,Ro=(-Yn*mi+ki*Na)/Pi,Wo=Ha-Bi,sl=io-Un,$o=zo-Bi,ys=Ro-Un;return Wo*Wo+sl*sl>$o*$o+ys*ys&&(Ha=zo,io=Ro),[[Ha-Mr,io-en],[Ha*ue/Hi,io*ue/Hi]]}function zh(){return!0}function Wc(At){var jt=go,ue=Fo,Me=zh,Le=Iu,Ne=Le.key,sr=.7;function ar(Mr){var en=[],Xr=[],gn=-1,In=Mr.length,On,Bi=Ee(jt),Un=Ee(ue);function mi(){en.push("M",Le(At(Xr),sr))}for(;++gn1?At.join("L"):At+"Z"}function Oh(At){return At.join("L")+"Z"}function is(At){for(var jt=0,ue=At.length,Me=At[0],Le=[Me[0],",",Me[1]];++jt1&&Le.push("H",Me[0]),Le.join("")}function Os(At){for(var jt=0,ue=At.length,Me=At[0],Le=[Me[0],",",Me[1]];++jt1){ar=jt[1],Ne=At[Mr],Mr++,Me+="C"+(Le[0]+sr[0])+","+(Le[1]+sr[1])+","+(Ne[0]-ar[0])+","+(Ne[1]-ar[1])+","+Ne[0]+","+Ne[1];for(var en=2;en9&&(Ne=ue*3/Math.sqrt(Ne),sr[ar]=Ne*Me,sr[ar+1]=Ne*Le));for(ar=-1;++ar<=Mr;)Ne=(At[Math.min(Mr,ar+1)][0]-At[Math.max(0,ar-1)][0])/(6*(1+sr[ar]*sr[ar])),jt.push([Ne||0,sr[ar]*Ne||0]);return jt}function ae(At){return At.length<3?Iu(At):At[0]+I(At,Xt(At))}c.svg.line.radial=function(){var At=Wc(xe);return At.radius=At.x,delete At.x,At.angle=At.y,delete At.y,At};function xe(At){for(var jt,ue=-1,Me=At.length,Le,Ne;++uegt)+",1 "+gn}function en(Xr,gn,In,On){return"Q 0,0 "+On}return Ne.radius=function(Xr){return arguments.length?(ue=Ee(Xr),Ne):ue},Ne.source=function(Xr){return arguments.length?(At=Ee(Xr),Ne):At},Ne.target=function(Xr){return arguments.length?(jt=Ee(Xr),Ne):jt},Ne.startAngle=function(Xr){return arguments.length?(Me=Ee(Xr),Ne):Me},Ne.endAngle=function(Xr){return arguments.length?(Le=Ee(Xr),Ne):Le},Ne};function Ze(At){return At.radius}c.svg.diagonal=function(){var At=je,jt=Ie,ue=wr;function Me(Le,Ne){var sr=At.call(this,Le,Ne),ar=jt.call(this,Le,Ne),Mr=(sr.y+ar.y)/2,en=[sr,{x:sr.x,y:Mr},{x:ar.x,y:Mr},ar];return en=en.map(ue),"M"+en[0]+"C"+en[1]+" "+en[2]+" "+en[3]}return Me.source=function(Le){return arguments.length?(At=Ee(Le),Me):At},Me.target=function(Le){return arguments.length?(jt=Ee(Le),Me):jt},Me.projection=function(Le){return arguments.length?(ue=Le,Me):ue},Me};function wr(At){return[At.x,At.y]}c.svg.diagonal.radial=function(){var At=c.svg.diagonal(),jt=wr,ue=At.projection;return At.projection=function(Me){return arguments.length?ue(Or(jt=Me)):jt},At};function Or(At){return function(){var jt=At.apply(this,arguments),ue=jt[0],Me=jt[1]-re;return[ue*Math.cos(Me),ue*Math.sin(Me)]}}c.svg.symbol=function(){var At=tn,jt=Nr;function ue(Me,Le){return(zn.get(At.call(this,Me,Le))||pn)(jt.call(this,Me,Le))}return ue.type=function(Me){return arguments.length?(At=Ee(Me),ue):At},ue.size=function(Me){return arguments.length?(jt=Ee(Me),ue):jt},ue};function Nr(){return 64}function tn(){return"circle"}function pn(At){var jt=Math.sqrt(At/gt);return"M0,"+jt+"A"+jt+","+jt+" 0 1,1 0,"+-jt+"A"+jt+","+jt+" 0 1,1 0,"+jt+"Z"}var zn=c.map({circle:pn,cross:function(At){var jt=Math.sqrt(At/5)/2;return"M"+-3*jt+","+-jt+"H"+-jt+"V"+-3*jt+"H"+jt+"V"+-jt+"H"+3*jt+"V"+jt+"H"+jt+"V"+3*jt+"H"+-jt+"V"+jt+"H"+-3*jt+"Z"},diamond:function(At){var jt=Math.sqrt(At/(2*ri)),ue=jt*ri;return"M0,"+-jt+"L"+ue+",0 0,"+jt+" "+-ue+",0Z"},square:function(At){var jt=Math.sqrt(At)/2;return"M"+-jt+","+-jt+"L"+jt+","+-jt+" "+jt+","+jt+" "+-jt+","+jt+"Z"},"triangle-down":function(At){var jt=Math.sqrt(At/Bn),ue=jt*Bn/2;return"M0,"+ue+"L"+jt+","+-ue+" "+-jt+","+-ue+"Z"},"triangle-up":function(At){var jt=Math.sqrt(At/Bn),ue=jt*Bn/2;return"M0,"+-ue+"L"+jt+","+ue+" "+-jt+","+ue+"Z"}});c.svg.symbolTypes=zn.keys();var Bn=Math.sqrt(3),ri=Math.tan(30*le);it.transition=function(At){for(var jt=Bo||++so,ue=yl(At),Me=[],Le,Ne,sr=Eo||{time:Date.now(),ease:ts,delay:0,duration:250},ar=-1,Mr=this.length;++ar0;)gn[--Pi].call(At,ki);if(mi>=1)return sr.event&&sr.event.end.call(At,At.__data__,jt),--Ne.count?delete Ne[Me]:delete At[ue],1}sr||(ar=Le.time,Mr=Ri(In,0,ar),sr=Ne[Me]={tween:new C,time:ar,timer:Mr,delay:Le.delay,duration:Le.duration,ease:Le.ease,index:jt},Le=null,++Ne.count)}c.svg.axis=function(){var At=c.scale.linear(),jt=wl,ue=6,Me=6,Le=3,Ne=[10],sr=null,ar;function Mr(en){en.each(function(){var Xr=c.select(this),gn=this.__chart__||At,In=this.__chart__=At.copy(),On=sr??(In.ticks?In.ticks.apply(In,Ne):In.domain()),Bi=ar??(In.tickFormat?In.tickFormat.apply(In,Ne):V),Un=Xr.selectAll(".tick").data(On,In),mi=Un.enter().insert("g",".domain").attr("class","tick").style("opacity",ne),ki=c.transition(Un.exit()).style("opacity",ne).remove(),Pi=c.transition(Un.order()).style("opacity",1),Hi=Math.max(ue,0)+Le,Yn,Na=hi(In),Ha=Xr.selectAll(".domain").data([0]),io=(Ha.enter().append("path").attr("class","domain"),c.transition(Ha));mi.append("line"),mi.append("text");var zo=mi.select("line"),Ro=Pi.select("line"),Wo=Un.select("text").text(Bi),sl=mi.select("text"),$o=Pi.select("text"),ys=jt==="top"||jt==="left"?-1:1,Tl,Ku,du,_o;if(jt==="bottom"||jt==="top"?(Yn=gu,Tl="x",du="y",Ku="x2",_o="y2",Wo.attr("dy",ys<0?"0em":".71em").style("text-anchor","middle"),io.attr("d","M"+Na[0]+","+ys*Me+"V0H"+Na[1]+"V"+ys*Me)):(Yn=Zs,Tl="y",du="x",Ku="y2",_o="x2",Wo.attr("dy",".32em").style("text-anchor",ys<0?"end":"start"),io.attr("d","M"+ys*Me+","+Na[0]+"H0V"+Na[1]+"H"+ys*Me)),zo.attr(_o,ys*ue),sl.attr(du,ys*Hi),Ro.attr(Ku,0).attr(_o,ys*ue),$o.attr(Tl,0).attr(du,ys*Hi),In.rangeBand){var Gs=In,il=Gs.rangeBand()/2;gn=In=function(lu){return Gs(lu)+il}}else gn.rangeBand?gn=In:ki.call(Yn,In,gn);mi.call(Yn,gn,In),Pi.call(Yn,In,In)})}return Mr.scale=function(en){return arguments.length?(At=en,Mr):At},Mr.orient=function(en){return arguments.length?(jt=en in Su?en+"":wl,Mr):jt},Mr.ticks=function(){return arguments.length?(Ne=P(arguments),Mr):Ne},Mr.tickValues=function(en){return arguments.length?(sr=en,Mr):sr},Mr.tickFormat=function(en){return arguments.length?(ar=en,Mr):ar},Mr.tickSize=function(en){var Xr=arguments.length;return Xr?(ue=+en,Me=+arguments[Xr-1],Mr):ue},Mr.innerTickSize=function(en){return arguments.length?(ue=+en,Mr):ue},Mr.outerTickSize=function(en){return arguments.length?(Me=+en,Mr):Me},Mr.tickPadding=function(en){return arguments.length?(Le=+en,Mr):Le},Mr.tickSubdivide=function(){return arguments.length&&Mr},Mr};var wl="bottom",Su={top:1,right:1,bottom:1,left:1};function gu(At,jt,ue){At.attr("transform",function(Me){var Le=jt(Me);return"translate("+(isFinite(Le)?Le:ue(Me))+",0)"})}function Zs(At,jt,ue){At.attr("transform",function(Me){var Le=jt(Me);return"translate(0,"+(isFinite(Le)?Le:ue(Me))+")"})}c.svg.brush=function(){var At=pt(Xr,"brushstart","brush","brushend"),jt=null,ue=null,Me=[0,0],Le=[0,0],Ne,sr,ar=!0,Mr=!0,en=Yu[0];function Xr(Un){Un.each(function(){var mi=c.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Bi).on("touchstart.brush",Bi),ki=mi.selectAll(".background").data([0]);ki.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),mi.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Pi=mi.selectAll(".resize").data(en,V);Pi.exit().remove(),Pi.enter().append("g").attr("class",function(Ha){return"resize "+Ha}).style("cursor",function(Ha){return $s[Ha]}).append("rect").attr("x",function(Ha){return/[ew]$/.test(Ha)?-3:null}).attr("y",function(Ha){return/^[ns]/.test(Ha)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Pi.style("display",Xr.empty()?"none":null);var Hi=c.transition(mi),Yn=c.transition(ki),Na;jt&&(Na=hi(jt),Yn.attr("x",Na[0]).attr("width",Na[1]-Na[0]),In(Hi)),ue&&(Na=hi(ue),Yn.attr("y",Na[0]).attr("height",Na[1]-Na[0]),On(Hi)),gn(Hi)})}Xr.event=function(Un){Un.each(function(){var mi=At.of(this,arguments),ki={x:Me,y:Le,i:Ne,j:sr},Pi=this.__chart__||ki;this.__chart__=ki,Bo?c.select(this).transition().each("start.brush",function(){Ne=Pi.i,sr=Pi.j,Me=Pi.x,Le=Pi.y,mi({type:"brushstart"})}).tween("brush:brush",function(){var Hi=Gl(Me,ki.x),Yn=Gl(Le,ki.y);return Ne=sr=null,function(Na){Me=ki.x=Hi(Na),Le=ki.y=Yn(Na),mi({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ne=ki.i,sr=ki.j,mi({type:"brush",mode:"resize"}),mi({type:"brushend"})}):(mi({type:"brushstart"}),mi({type:"brush",mode:"resize"}),mi({type:"brushend"}))})};function gn(Un){Un.selectAll(".resize").attr("transform",function(mi){return"translate("+Me[+/e$/.test(mi)]+","+Le[+/^s/.test(mi)]+")"})}function In(Un){Un.select(".extent").attr("x",Me[0]),Un.selectAll(".extent,.n>rect,.s>rect").attr("width",Me[1]-Me[0])}function On(Un){Un.select(".extent").attr("y",Le[0]),Un.selectAll(".extent,.e>rect,.w>rect").attr("height",Le[1]-Le[0])}function Bi(){var Un=this,mi=c.select(c.event.target),ki=At.of(Un,arguments),Pi=c.select(Un),Hi=mi.datum(),Yn=!/^(n|s)$/.test(Hi)&&jt,Na=!/^(e|w)$/.test(Hi)&&ue,Ha=mi.classed("extent"),io=Kr(Un),zo,Ro=c.mouse(Un),Wo,sl=c.select(e(Un)).on("keydown.brush",Tl).on("keyup.brush",Ku);if(c.event.changedTouches?sl.on("touchmove.brush",du).on("touchend.brush",Gs):sl.on("mousemove.brush",du).on("mouseup.brush",Gs),Pi.interrupt().selectAll("*").interrupt(),Ha)Ro[0]=Me[0]-Ro[0],Ro[1]=Le[0]-Ro[1];else if(Hi){var $o=+/w$/.test(Hi),ys=+/^n/.test(Hi);Wo=[Me[1-$o]-Ro[0],Le[1-ys]-Ro[1]],Ro[0]=Me[$o],Ro[1]=Le[ys]}else c.event.altKey&&(zo=Ro.slice());Pi.style("pointer-events","none").selectAll(".resize").style("display",null),c.select("body").style("cursor",mi.style("cursor")),ki({type:"brushstart"}),du();function Tl(){c.event.keyCode==32&&(Ha||(zo=null,Ro[0]-=Me[1],Ro[1]-=Le[1],Ha=2),lt())}function Ku(){c.event.keyCode==32&&Ha==2&&(Ro[0]+=Me[1],Ro[1]+=Le[1],Ha=0,lt())}function du(){var il=c.mouse(Un),lu=!1;Wo&&(il[0]+=Wo[0],il[1]+=Wo[1]),Ha||(c.event.altKey?(zo||(zo=[(Me[0]+Me[1])/2,(Le[0]+Le[1])/2]),Ro[0]=Me[+(il[0]{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=new Date,P=new Date;function S(Mt,te,ve,oe){function Te(He){return Mt(He=arguments.length===0?new Date:new Date(+He)),He}return Te.floor=function(He){return Mt(He=new Date(+He)),He},Te.ceil=function(He){return Mt(He=new Date(He-1)),te(He,1),Mt(He),He},Te.round=function(He){var Ge=Te(He),cr=Te.ceil(He);return He-Ge0))return ur;do ur.push(jr=new Date(+He)),te(He,cr),Mt(He);while(jr=Ge)for(;Mt(Ge),!He(Ge);)Ge.setTime(Ge-1)},function(Ge,cr){if(Ge>=Ge)if(cr<0)for(;++cr<=0;)for(;te(Ge,-1),!He(Ge););else for(;--cr>=0;)for(;te(Ge,1),!He(Ge););})},ve&&(Te.count=function(He,Ge){return g.setTime(+He),P.setTime(+Ge),Mt(g),Mt(P),Math.floor(ve(g,P))},Te.every=function(He){return He=Math.floor(He),!isFinite(He)||!(He>0)?null:He>1?Te.filter(oe?function(Ge){return oe(Ge)%He===0}:function(Ge){return Te.count(0,Ge)%He===0}):Te}),Te}var t=S(function(){},function(Mt,te){Mt.setTime(+Mt+te)},function(Mt,te){return te-Mt});t.every=function(Mt){return Mt=Math.floor(Mt),!isFinite(Mt)||!(Mt>0)?null:Mt>1?S(function(te){te.setTime(Math.floor(te/Mt)*Mt)},function(te,ve){te.setTime(+te+ve*Mt)},function(te,ve){return(ve-te)/Mt}):t};var e=t.range,r=1e3,a=6e4,n=36e5,o=864e5,i=6048e5,s=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds())},function(Mt,te){Mt.setTime(+Mt+te*r)},function(Mt,te){return(te-Mt)/r},function(Mt){return Mt.getUTCSeconds()}),f=s.range,x=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r)},function(Mt,te){Mt.setTime(+Mt+te*a)},function(Mt,te){return(te-Mt)/a},function(Mt){return Mt.getMinutes()}),y=x.range,v=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r-Mt.getMinutes()*a)},function(Mt,te){Mt.setTime(+Mt+te*n)},function(Mt,te){return(te-Mt)/n},function(Mt){return Mt.getHours()}),T=v.range,u=S(function(Mt){Mt.setHours(0,0,0,0)},function(Mt,te){Mt.setDate(Mt.getDate()+te)},function(Mt,te){return(te-Mt-(te.getTimezoneOffset()-Mt.getTimezoneOffset())*a)/o},function(Mt){return Mt.getDate()-1}),b=u.range;function _(Mt){return S(function(te){te.setDate(te.getDate()-(te.getDay()+7-Mt)%7),te.setHours(0,0,0,0)},function(te,ve){te.setDate(te.getDate()+ve*7)},function(te,ve){return(ve-te-(ve.getTimezoneOffset()-te.getTimezoneOffset())*a)/i})}var C=_(0),M=_(1),E=_(2),A=_(3),h=_(4),p=_(5),k=_(6),w=C.range,R=M.range,O=E.range,N=A.range,V=h.range,H=p.range,F=k.range,U=S(function(Mt){Mt.setDate(1),Mt.setHours(0,0,0,0)},function(Mt,te){Mt.setMonth(Mt.getMonth()+te)},function(Mt,te){return te.getMonth()-Mt.getMonth()+(te.getFullYear()-Mt.getFullYear())*12},function(Mt){return Mt.getMonth()}),W=U.range,q=S(function(Mt){Mt.setMonth(0,1),Mt.setHours(0,0,0,0)},function(Mt,te){Mt.setFullYear(Mt.getFullYear()+te)},function(Mt,te){return te.getFullYear()-Mt.getFullYear()},function(Mt){return Mt.getFullYear()});q.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(te){te.setFullYear(Math.floor(te.getFullYear()/Mt)*Mt),te.setMonth(0,1),te.setHours(0,0,0,0)},function(te,ve){te.setFullYear(te.getFullYear()+ve*Mt)})};var X=q.range,lt=S(function(Mt){Mt.setUTCSeconds(0,0)},function(Mt,te){Mt.setTime(+Mt+te*a)},function(Mt,te){return(te-Mt)/a},function(Mt){return Mt.getUTCMinutes()}),yt=lt.range,pt=S(function(Mt){Mt.setUTCMinutes(0,0,0)},function(Mt,te){Mt.setTime(+Mt+te*n)},function(Mt,te){return(te-Mt)/n},function(Mt){return Mt.getUTCHours()}),st=pt.range,tt=S(function(Mt){Mt.setUTCHours(0,0,0,0)},function(Mt,te){Mt.setUTCDate(Mt.getUTCDate()+te)},function(Mt,te){return(te-Mt)/o},function(Mt){return Mt.getUTCDate()-1}),dt=tt.range;function rt(Mt){return S(function(te){te.setUTCDate(te.getUTCDate()-(te.getUTCDay()+7-Mt)%7),te.setUTCHours(0,0,0,0)},function(te,ve){te.setUTCDate(te.getUTCDate()+ve*7)},function(te,ve){return(ve-te)/i})}var at=rt(0),vt=rt(1),it=rt(2),Y=rt(3),ft=rt(4),ut=rt(5),wt=rt(6),zt=at.range,Pt=vt.range,Wt=it.range,Ht=Y.range,Jt=ft.range,ge=ut.range,he=wt.range,de=S(function(Mt){Mt.setUTCDate(1),Mt.setUTCHours(0,0,0,0)},function(Mt,te){Mt.setUTCMonth(Mt.getUTCMonth()+te)},function(Mt,te){return te.getUTCMonth()-Mt.getUTCMonth()+(te.getUTCFullYear()-Mt.getUTCFullYear())*12},function(Mt){return Mt.getUTCMonth()}),se=de.range,Tt=S(function(Mt){Mt.setUTCMonth(0,1),Mt.setUTCHours(0,0,0,0)},function(Mt,te){Mt.setUTCFullYear(Mt.getUTCFullYear()+te)},function(Mt,te){return te.getUTCFullYear()-Mt.getUTCFullYear()},function(Mt){return Mt.getUTCFullYear()});Tt.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(te){te.setUTCFullYear(Math.floor(te.getUTCFullYear()/Mt)*Mt),te.setUTCMonth(0,1),te.setUTCHours(0,0,0,0)},function(te,ve){te.setUTCFullYear(te.getUTCFullYear()+ve*Mt)})};var Lt=Tt.range;c.timeDay=u,c.timeDays=b,c.timeFriday=p,c.timeFridays=H,c.timeHour=v,c.timeHours=T,c.timeInterval=S,c.timeMillisecond=t,c.timeMilliseconds=e,c.timeMinute=x,c.timeMinutes=y,c.timeMonday=M,c.timeMondays=R,c.timeMonth=U,c.timeMonths=W,c.timeSaturday=k,c.timeSaturdays=F,c.timeSecond=s,c.timeSeconds=f,c.timeSunday=C,c.timeSundays=w,c.timeThursday=h,c.timeThursdays=V,c.timeTuesday=E,c.timeTuesdays=O,c.timeWednesday=A,c.timeWednesdays=N,c.timeWeek=C,c.timeWeeks=w,c.timeYear=q,c.timeYears=X,c.utcDay=tt,c.utcDays=dt,c.utcFriday=ut,c.utcFridays=ge,c.utcHour=pt,c.utcHours=st,c.utcMillisecond=t,c.utcMilliseconds=e,c.utcMinute=lt,c.utcMinutes=yt,c.utcMonday=vt,c.utcMondays=Pt,c.utcMonth=de,c.utcMonths=se,c.utcSaturday=wt,c.utcSaturdays=he,c.utcSecond=s,c.utcSeconds=f,c.utcSunday=at,c.utcSundays=zt,c.utcThursday=ft,c.utcThursdays=Jt,c.utcTuesday=it,c.utcTuesdays=Wt,c.utcWednesday=Y,c.utcWednesdays=Ht,c.utcWeek=at,c.utcWeeks=zt,c.utcYear=Tt,c.utcYears=Lt,Object.defineProperty(c,"__esModule",{value:!0})})}),Sa=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,Fa()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function P(Gt){if(0<=Gt.y&&Gt.y<100){var ne=new Date(-1,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L);return ne.setFullYear(Gt.y),ne}return new Date(Gt.y,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L)}function S(Gt){if(0<=Gt.y&&Gt.y<100){var ne=new Date(Date.UTC(-1,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L));return ne.setUTCFullYear(Gt.y),ne}return new Date(Date.UTC(Gt.y,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L))}function t(Gt,ne,Ct){return{y:Gt,m:ne,d:Ct,H:0,M:0,S:0,L:0}}function e(Gt){var ne=Gt.dateTime,Ct=Gt.date,gt=Gt.time,St=Gt.periods,Nt=Gt.days,re=Gt.shortDays,le=Gt.months,we=Gt.shortMonths,Ue=f(St),qe=x(St),or=f(Nt),Ar=x(Nt),Tr=f(re),pr=x(re),Jr=f(le),Vn=x(le),Hn=f(we),Kn=x(we),Ci={a:xi,A:Li,b:Oi,B:Zi,c:null,d:U,e:U,f:yt,H:W,I:q,j:X,L:lt,m:pt,M:st,p:li,q:La,Q:Ge,s:cr,S:tt,u:dt,U:rt,V:at,w:vt,W:it,x:null,X:null,y:Y,Y:ft,Z:ut,"%":He},ii={a:Wa,A:ze,b:Pe,B:Rr,c:null,d:wt,e:wt,f:Jt,H:zt,I:Pt,j:Wt,L:Ht,m:ge,M:he,p:qr,q:$r,Q:Ge,s:cr,S:de,u:se,U:Tt,V:Lt,w:Mt,W:te,x:null,X:null,y:ve,Y:oe,Z:Te,"%":He},qn={a:fr,A:_r,b:Qr,B:Cn,c:bn,d:h,e:h,f:N,H:k,I:k,j:p,L:O,m:A,M:w,p:rr,q:E,Q:H,s:F,S:R,u:v,U:T,V:u,w:y,W:b,x:An,X:ci,y:C,Y:_,Z:M,"%":V};Ci.x=aa(Ct,Ci),Ci.X=aa(gt,Ci),Ci.c=aa(ne,Ci),ii.x=aa(Ct,ii),ii.X=aa(gt,ii),ii.c=aa(ne,ii);function aa(Br,Gr){return function(fn){var an=[],Ee=-1,dr=0,Vr=Br.length,vn,Fn,Xn;for(fn instanceof Date||(fn=new Date(+fn));++Ee53)return null;"w"in an||(an.w=1),"Z"in an?(dr=S(t(an.y,0,1)),Vr=dr.getUTCDay(),dr=Vr>4||Vr===0?g.utcMonday.ceil(dr):g.utcMonday(dr),dr=g.utcDay.offset(dr,(an.V-1)*7),an.y=dr.getUTCFullYear(),an.m=dr.getUTCMonth(),an.d=dr.getUTCDate()+(an.w+6)%7):(dr=P(t(an.y,0,1)),Vr=dr.getDay(),dr=Vr>4||Vr===0?g.timeMonday.ceil(dr):g.timeMonday(dr),dr=g.timeDay.offset(dr,(an.V-1)*7),an.y=dr.getFullYear(),an.m=dr.getMonth(),an.d=dr.getDate()+(an.w+6)%7)}else("W"in an||"U"in an)&&("w"in an||(an.w="u"in an?an.u%7:"W"in an?1:0),Vr="Z"in an?S(t(an.y,0,1)).getUTCDay():P(t(an.y,0,1)).getDay(),an.m=0,an.d="W"in an?(an.w+6)%7+an.W*7-(Vr+5)%7:an.w+an.U*7-(Vr+6)%7);return"Z"in an?(an.H+=an.Z/100|0,an.M+=an.Z%100,S(an)):P(an)}}function We(Br,Gr,fn,an){for(var Ee=0,dr=Gr.length,Vr=fn.length,vn,Fn;Ee=Vr)return-1;if(vn=Gr.charCodeAt(Ee++),vn===37){if(vn=Gr.charAt(Ee++),Fn=qn[vn in r?Gr.charAt(Ee++):vn],!Fn||(an=Fn(Br,fn,an))<0)return-1}else if(vn!=fn.charCodeAt(an++))return-1}return an}function rr(Br,Gr,fn){var an=Ue.exec(Gr.slice(fn));return an?(Br.p=qe[an[0].toLowerCase()],fn+an[0].length):-1}function fr(Br,Gr,fn){var an=Tr.exec(Gr.slice(fn));return an?(Br.w=pr[an[0].toLowerCase()],fn+an[0].length):-1}function _r(Br,Gr,fn){var an=or.exec(Gr.slice(fn));return an?(Br.w=Ar[an[0].toLowerCase()],fn+an[0].length):-1}function Qr(Br,Gr,fn){var an=Hn.exec(Gr.slice(fn));return an?(Br.m=Kn[an[0].toLowerCase()],fn+an[0].length):-1}function Cn(Br,Gr,fn){var an=Jr.exec(Gr.slice(fn));return an?(Br.m=Vn[an[0].toLowerCase()],fn+an[0].length):-1}function bn(Br,Gr,fn){return We(Br,ne,Gr,fn)}function An(Br,Gr,fn){return We(Br,Ct,Gr,fn)}function ci(Br,Gr,fn){return We(Br,gt,Gr,fn)}function xi(Br){return re[Br.getDay()]}function Li(Br){return Nt[Br.getDay()]}function Oi(Br){return we[Br.getMonth()]}function Zi(Br){return le[Br.getMonth()]}function li(Br){return St[+(Br.getHours()>=12)]}function La(Br){return 1+~~(Br.getMonth()/3)}function Wa(Br){return re[Br.getUTCDay()]}function ze(Br){return Nt[Br.getUTCDay()]}function Pe(Br){return we[Br.getUTCMonth()]}function Rr(Br){return le[Br.getUTCMonth()]}function qr(Br){return St[+(Br.getUTCHours()>=12)]}function $r(Br){return 1+~~(Br.getUTCMonth()/3)}return{format:function(Br){var Gr=aa(Br+="",Ci);return Gr.toString=function(){return Br},Gr},parse:function(Br){var Gr=Vi(Br+="",!1);return Gr.toString=function(){return Br},Gr},utcFormat:function(Br){var Gr=aa(Br+="",ii);return Gr.toString=function(){return Br},Gr},utcParse:function(Br){var Gr=Vi(Br+="",!0);return Gr.toString=function(){return Br},Gr}}}var r={"-":"",_:" ",0:"0"},a=/^\s*\d+/,n=/^%/,o=/[\\^$*+?|[\]().{}]/g;function i(Gt,ne,Ct){var gt=Gt<0?"-":"",St=(gt?-Gt:Gt)+"",Nt=St.length;return gt+(Nt68?1900:2e3),Ct+gt[0].length):-1}function M(Gt,ne,Ct){var gt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ne.slice(Ct,Ct+6));return gt?(Gt.Z=gt[1]?0:-(gt[2]+(gt[3]||"00")),Ct+gt[0].length):-1}function E(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+1));return gt?(Gt.q=gt[0]*3-3,Ct+gt[0].length):-1}function A(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.m=gt[0]-1,Ct+gt[0].length):-1}function h(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.d=+gt[0],Ct+gt[0].length):-1}function p(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?(Gt.m=0,Gt.d=+gt[0],Ct+gt[0].length):-1}function k(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.H=+gt[0],Ct+gt[0].length):-1}function w(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.M=+gt[0],Ct+gt[0].length):-1}function R(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.S=+gt[0],Ct+gt[0].length):-1}function O(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?(Gt.L=+gt[0],Ct+gt[0].length):-1}function N(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+6));return gt?(Gt.L=Math.floor(gt[0]/1e3),Ct+gt[0].length):-1}function V(Gt,ne,Ct){var gt=n.exec(ne.slice(Ct,Ct+1));return gt?Ct+gt[0].length:-1}function H(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?(Gt.Q=+gt[0],Ct+gt[0].length):-1}function F(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?(Gt.s=+gt[0],Ct+gt[0].length):-1}function U(Gt,ne){return i(Gt.getDate(),ne,2)}function W(Gt,ne){return i(Gt.getHours(),ne,2)}function q(Gt,ne){return i(Gt.getHours()%12||12,ne,2)}function X(Gt,ne){return i(1+g.timeDay.count(g.timeYear(Gt),Gt),ne,3)}function lt(Gt,ne){return i(Gt.getMilliseconds(),ne,3)}function yt(Gt,ne){return lt(Gt,ne)+"000"}function pt(Gt,ne){return i(Gt.getMonth()+1,ne,2)}function st(Gt,ne){return i(Gt.getMinutes(),ne,2)}function tt(Gt,ne){return i(Gt.getSeconds(),ne,2)}function dt(Gt){var ne=Gt.getDay();return ne===0?7:ne}function rt(Gt,ne){return i(g.timeSunday.count(g.timeYear(Gt)-1,Gt),ne,2)}function at(Gt,ne){var Ct=Gt.getDay();return Gt=Ct>=4||Ct===0?g.timeThursday(Gt):g.timeThursday.ceil(Gt),i(g.timeThursday.count(g.timeYear(Gt),Gt)+(g.timeYear(Gt).getDay()===4),ne,2)}function vt(Gt){return Gt.getDay()}function it(Gt,ne){return i(g.timeMonday.count(g.timeYear(Gt)-1,Gt),ne,2)}function Y(Gt,ne){return i(Gt.getFullYear()%100,ne,2)}function ft(Gt,ne){return i(Gt.getFullYear()%1e4,ne,4)}function ut(Gt){var ne=Gt.getTimezoneOffset();return(ne>0?"-":(ne*=-1,"+"))+i(ne/60|0,"0",2)+i(ne%60,"0",2)}function wt(Gt,ne){return i(Gt.getUTCDate(),ne,2)}function zt(Gt,ne){return i(Gt.getUTCHours(),ne,2)}function Pt(Gt,ne){return i(Gt.getUTCHours()%12||12,ne,2)}function Wt(Gt,ne){return i(1+g.utcDay.count(g.utcYear(Gt),Gt),ne,3)}function Ht(Gt,ne){return i(Gt.getUTCMilliseconds(),ne,3)}function Jt(Gt,ne){return Ht(Gt,ne)+"000"}function ge(Gt,ne){return i(Gt.getUTCMonth()+1,ne,2)}function he(Gt,ne){return i(Gt.getUTCMinutes(),ne,2)}function de(Gt,ne){return i(Gt.getUTCSeconds(),ne,2)}function se(Gt){var ne=Gt.getUTCDay();return ne===0?7:ne}function Tt(Gt,ne){return i(g.utcSunday.count(g.utcYear(Gt)-1,Gt),ne,2)}function Lt(Gt,ne){var Ct=Gt.getUTCDay();return Gt=Ct>=4||Ct===0?g.utcThursday(Gt):g.utcThursday.ceil(Gt),i(g.utcThursday.count(g.utcYear(Gt),Gt)+(g.utcYear(Gt).getUTCDay()===4),ne,2)}function Mt(Gt){return Gt.getUTCDay()}function te(Gt,ne){return i(g.utcMonday.count(g.utcYear(Gt)-1,Gt),ne,2)}function ve(Gt,ne){return i(Gt.getUTCFullYear()%100,ne,2)}function oe(Gt,ne){return i(Gt.getUTCFullYear()%1e4,ne,4)}function Te(){return"+0000"}function He(){return"%"}function Ge(Gt){return+Gt}function cr(Gt){return Math.floor(+Gt/1e3)}var ur;jr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function jr(Gt){return ur=e(Gt),c.timeFormat=ur.format,c.timeParse=ur.parse,c.utcFormat=ur.utcFormat,c.utcParse=ur.utcParse,ur}var Hr="%Y-%m-%dT%H:%M:%S.%LZ";function br(Gt){return Gt.toISOString()}var Kr=Date.prototype.toISOString?br:c.utcFormat(Hr);function rn(Gt){var ne=new Date(Gt);return isNaN(ne)?null:ne}var Ce=+new Date("2000-01-01T00:00:00.000Z")?rn:c.utcParse(Hr);c.isoFormat=Kr,c.isoParse=Ce,c.timeFormatDefaultLocale=jr,c.timeFormatLocale=e,Object.defineProperty(c,"__esModule",{value:!0})})}),Ni=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function P(A,h){if((p=(A=h?A.toExponential(h-1):A.toExponential()).indexOf("e"))<0)return null;var p,k=A.slice(0,p);return[k.length>1?k[0]+k.slice(2):k,+A.slice(p+1)]}function S(A){return A=P(Math.abs(A)),A?A[1]:NaN}function t(A,h){return function(p,k){for(var w=p.length,R=[],O=0,N=A[0],V=0;w>0&&N>0&&(V+N+1>k&&(N=Math.max(1,k-V)),R.push(p.substring(w-=N,w+N)),!((V+=N+1)>k));)N=A[O=(O+1)%A.length];return R.reverse().join(h)}}function e(A){return function(h){return h.replace(/[0-9]/g,function(p){return A[+p]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(A){if(!(h=r.exec(A)))throw new Error("invalid format: "+A);var h;return new n({fill:h[1],align:h[2],sign:h[3],symbol:h[4],zero:h[5],width:h[6],comma:h[7],precision:h[8]&&h[8].slice(1),trim:h[9],type:h[10]})}a.prototype=n.prototype;function n(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}n.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function o(A){t:for(var h=A.length,p=1,k=-1,w;p0&&(k=0);break}return k>0?A.slice(0,k)+A.slice(w+1):A}var i;function s(A,h){var p=P(A,h);if(!p)return A+"";var k=p[0],w=p[1],R=w-(i=Math.max(-8,Math.min(8,Math.floor(w/3)))*3)+1,O=k.length;return R===O?k:R>O?k+new Array(R-O+1).join("0"):R>0?k.slice(0,R)+"."+k.slice(R):"0."+new Array(1-R).join("0")+P(A,Math.max(0,h+R-1))[0]}function f(A,h){var p=P(A,h);if(!p)return A+"";var k=p[0],w=p[1];return w<0?"0."+new Array(-w).join("0")+k:k.length>w+1?k.slice(0,w+1)+"."+k.slice(w+1):k+new Array(w-k.length+2).join("0")}var x={"%":function(A,h){return(A*100).toFixed(h)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:g,e:function(A,h){return A.toExponential(h)},f:function(A,h){return A.toFixed(h)},g:function(A,h){return A.toPrecision(h)},o:function(A){return Math.round(A).toString(8)},p:function(A,h){return f(A*100,h)},r:f,s,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function y(A){return A}var v=Array.prototype.map,T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u(A){var h=A.grouping===void 0||A.thousands===void 0?y:t(v.call(A.grouping,Number),A.thousands+""),p=A.currency===void 0?"":A.currency[0]+"",k=A.currency===void 0?"":A.currency[1]+"",w=A.decimal===void 0?".":A.decimal+"",R=A.numerals===void 0?y:e(v.call(A.numerals,String)),O=A.percent===void 0?"%":A.percent+"",N=A.minus===void 0?"-":A.minus+"",V=A.nan===void 0?"NaN":A.nan+"";function H(U){U=a(U);var W=U.fill,q=U.align,X=U.sign,lt=U.symbol,yt=U.zero,pt=U.width,st=U.comma,tt=U.precision,dt=U.trim,rt=U.type;rt==="n"?(st=!0,rt="g"):x[rt]||(tt===void 0&&(tt=12),dt=!0,rt="g"),(yt||W==="0"&&q==="=")&&(yt=!0,W="0",q="=");var at=lt==="$"?p:lt==="#"&&/[boxX]/.test(rt)?"0"+rt.toLowerCase():"",vt=lt==="$"?k:/[%p]/.test(rt)?O:"",it=x[rt],Y=/[defgprs%]/.test(rt);tt=tt===void 0?6:/[gprs]/.test(rt)?Math.max(1,Math.min(21,tt)):Math.max(0,Math.min(20,tt));function ft(ut){var wt=at,zt=vt,Pt,Wt,Ht;if(rt==="c")zt=it(ut)+zt,ut="";else{ut=+ut;var Jt=ut<0||1/ut<0;if(ut=isNaN(ut)?V:it(Math.abs(ut),tt),dt&&(ut=o(ut)),Jt&&+ut==0&&X!=="+"&&(Jt=!1),wt=(Jt?X==="("?X:N:X==="-"||X==="("?"":X)+wt,zt=(rt==="s"?T[8+i/3]:"")+zt+(Jt&&X==="("?")":""),Y){for(Pt=-1,Wt=ut.length;++PtHt||Ht>57){zt=(Ht===46?w+ut.slice(Pt+1):ut.slice(Pt))+zt,ut=ut.slice(0,Pt);break}}}st&&!yt&&(ut=h(ut,1/0));var ge=wt.length+ut.length+zt.length,he=ge>1)+wt+ut+zt+he.slice(ge);break;default:ut=he+wt+ut+zt;break}return R(ut)}return ft.toString=function(){return U+""},ft}function F(U,W){var q=H((U=a(U),U.type="f",U)),X=Math.max(-8,Math.min(8,Math.floor(S(W)/3)))*3,lt=Math.pow(10,-X),yt=T[8+X/3];return function(pt){return q(lt*pt)+yt}}return{format:H,formatPrefix:F}}var b;_({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function _(A){return b=u(A),c.format=b.format,c.formatPrefix=b.formatPrefix,b}function C(A){return Math.max(0,-S(Math.abs(A)))}function M(A,h){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(S(h)/3)))*3-S(Math.abs(A)))}function E(A,h){return A=Math.abs(A),h=Math.abs(h)-A,Math.max(0,S(h)-S(A))+1}c.FormatSpecifier=n,c.formatDefaultLocale=_,c.formatLocale=u,c.formatSpecifier=a,c.precisionFixed=C,c.precisionPrefix=M,c.precisionRound=E,Object.defineProperty(c,"__esModule",{value:!0})})}),zi=Ft((Q,$)=>{$.exports=function(c){for(var g=c.length,P,S=0;S13)&&P!==32&&P!==133&&P!==160&&P!==5760&&P!==6158&&(P<8192||P>8205)&&P!==8232&&P!==8233&&P!==8239&&P!==8287&&P!==8288&&P!==12288&&P!==65279)return!1;return!0}}),ia=Ft((Q,$)=>{var c=zi();$.exports=function(g){var P=typeof g;if(P==="string"){var S=g;if(g=+g,g===0&&c(S))return!1}else if(P!=="number")return!1;return g-g<1}}),Ua=Ft((Q,$)=>{$.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}),qi=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c["base64-arraybuffer"]={}))})(Q,function(c){for(var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P=typeof Uint8Array>"u"?[]:new Uint8Array(256),S=0;S>2],i+=g[(a[n]&3)<<4|a[n+1]>>4],i+=g[(a[n+1]&15)<<2|a[n+2]>>6],i+=g[a[n+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e=function(r){var a=r.length*.75,n=r.length,o,i=0,s,f,x,y;r[r.length-1]==="="&&(a--,r[r.length-2]==="="&&a--);var v=new ArrayBuffer(a),T=new Uint8Array(v);for(o=0;o>4,T[i++]=(f&15)<<4|x>>2,T[i++]=(x&3)<<6|y&63;return v};c.decode=e,c.encode=t,Object.defineProperty(c,"__esModule",{value:!0})})}),Ei=Ft((Q,$)=>{$.exports=function(c){return window&&window.process&&window.process.versions?Object.prototype.toString.call(c)==="[object Object]":Object.prototype.toString.call(c)==="[object Object]"&&Object.getPrototypeOf(c).hasOwnProperty("hasOwnProperty")}}),Va=Ft(Q=>{var $=qi().decode,c=Ei(),g=Array.isArray,P=ArrayBuffer,S=DataView;function t(s){return P.isView(s)&&!(s instanceof S)}Q.isTypedArray=t;function e(s){return g(s)||t(s)}Q.isArrayOrTypedArray=e;function r(s){return!e(s[0])}Q.isArray1D=r,Q.ensureArray=function(s,f){return g(s)||(s=[]),s.length=f,s};var a={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};a.uint8c=a.u1c,a.uint8=a.u1,a.int8=a.i1,a.uint16=a.u2,a.int16=a.i2,a.uint32=a.u4,a.int32=a.i4,a.float32=a.f4,a.float64=a.f8;function n(s){return s.constructor===ArrayBuffer}Q.isArrayBuffer=n,Q.decodeTypedArraySpec=function(s){var f=[],x=o(s),y=x.dtype,v=a[y];if(!v)throw new Error('Error in dtype: "'+y+'"');var T=v.BYTES_PER_ELEMENT,u=x.bdata;n(u)||(u=$(u));var b=x.shape===void 0?[u.byteLength/T]:(""+x.shape).split(",");b.reverse();var _=b.length,C,M,E=+b[0],A=T*E,h=0;if(_===1)f=new v(u);else if(_===2)for(C=+b[1],M=0;M{var c=ia(),g=Va().isArrayOrTypedArray;$.exports=function(i,s){if(c(s))s=String(s);else if(typeof s!="string"||s.substr(s.length-4)==="[-1]")throw"bad property string";var f=s.split("."),x,y,v,T;for(T=0;T{var c=us(),g=/^\w*$/,P=0,S=1,t=2,e=3,r=4;$.exports=function(a,n,o,i){o=o||"name",i=i||"value";var s,f,x,y={};n&&n.length?(x=c(a,n),f=x.get()):f=a,n=n||"";var v={};if(f)for(s=0;s2)return y[_]=y[_]|t,u.set(b,null);if(T){for(s=_;s{var c=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,g=/^[^\.\[\]]+$/;$.exports=function(P,S){for(;S;){var t=P.match(c);if(t)P=t[1];else if(P.match(g))P="";else throw new Error("bad relativeAttr call:"+[P,S]);if(S.charAt(0)==="^")S=S.slice(1);else break}return P&&S.charAt(0)!=="["?P+"."+S:P+S}}),co=Ft((Q,$)=>{var c=ia();$.exports=function(g,P){if(g>0)return Math.log(g)/Math.LN10;var S=Math.log(Math.min(P[0],P[1]))/Math.LN10;return c(S)||(S=Math.log(Math.max(P[0],P[1]))/Math.LN10-6),S}}),Go=Ft((Q,$)=>{var c=Va().isArrayOrTypedArray,g=Ei();$.exports=function P(S,t){for(var e in t){var r=t[e],a=S[e];if(a!==r)if(e.charAt(0)==="_"||typeof r=="function"){if(e in S)continue;S[e]=r}else if(c(r)&&c(a)&&g(r[0])){if(e==="customdata"||e==="ids")continue;for(var n=Math.min(r.length,a.length),o=0;o{function c(P,S){var t=P%S;return t<0?t+S:t}function g(P,S){return Math.abs(P)>S/2?P-Math.round(P/S)*S:P}$.exports={mod:c,modHalf:g}}),eo=Ft((Q,$)=>{(function(c){var g=/^\s+/,P=/\s+$/,S=0,t=c.round,e=c.min,r=c.max,a=c.random;function n(Y,ft){if(Y=Y||"",ft=ft||{},Y instanceof n)return Y;if(!(this instanceof n))return new n(Y,ft);var ut=o(Y);this._originalInput=Y,this._r=ut.r,this._g=ut.g,this._b=ut.b,this._a=ut.a,this._roundA=t(100*this._a)/100,this._format=ft.format||ut.format,this._gradientType=ft.gradientType,this._r<1&&(this._r=t(this._r)),this._g<1&&(this._g=t(this._g)),this._b<1&&(this._b=t(this._b)),this._ok=ut.ok,this._tc_id=S++}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ft,ut,wt,zt,Pt,Wt;return ft=Y.r/255,ut=Y.g/255,wt=Y.b/255,ft<=.03928?zt=ft/12.92:zt=c.pow((ft+.055)/1.055,2.4),ut<=.03928?Pt=ut/12.92:Pt=c.pow((ut+.055)/1.055,2.4),wt<=.03928?Wt=wt/12.92:Wt=c.pow((wt+.055)/1.055,2.4),.2126*zt+.7152*Pt+.0722*Wt},setAlpha:function(Y){return this._a=U(Y),this._roundA=t(100*this._a)/100,this},toHsv:function(){var Y=x(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=x(this._r,this._g,this._b),ft=t(Y.h*360),ut=t(Y.s*100),wt=t(Y.v*100);return this._a==1?"hsv("+ft+", "+ut+"%, "+wt+"%)":"hsva("+ft+", "+ut+"%, "+wt+"%, "+this._roundA+")"},toHsl:function(){var Y=s(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=s(this._r,this._g,this._b),ft=t(Y.h*360),ut=t(Y.s*100),wt=t(Y.l*100);return this._a==1?"hsl("+ft+", "+ut+"%, "+wt+"%)":"hsla("+ft+", "+ut+"%, "+wt+"%, "+this._roundA+")"},toHex:function(Y){return v(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return T(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:t(this._r),g:t(this._g),b:t(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+t(this._r)+", "+t(this._g)+", "+t(this._b)+")":"rgba("+t(this._r)+", "+t(this._g)+", "+t(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:t(W(this._r,255)*100)+"%",g:t(W(this._g,255)*100)+"%",b:t(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%)":"rgba("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[v(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ft="#"+u(this._r,this._g,this._b,this._a),ut=ft,wt=this._gradientType?"GradientType = 1, ":"";if(Y){var zt=n(Y);ut="#"+u(zt._r,zt._g,zt._b,zt._a)}return"progid:DXImageTransform.Microsoft.gradient("+wt+"startColorstr="+ft+",endColorstr="+ut+")"},toString:function(Y){var ft=!!Y;Y=Y||this._format;var ut=!1,wt=this._a<1&&this._a>=0,zt=!ft&&wt&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return zt?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(ut=this.toRgbString()),Y==="prgb"&&(ut=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(ut=this.toHexString()),Y==="hex3"&&(ut=this.toHexString(!0)),Y==="hex4"&&(ut=this.toHex8String(!0)),Y==="hex8"&&(ut=this.toHex8String()),Y==="name"&&(ut=this.toName()),Y==="hsl"&&(ut=this.toHslString()),Y==="hsv"&&(ut=this.toHsvString()),ut||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(Y,ft){var ut=Y.apply(null,[this].concat([].slice.call(ft)));return this._r=ut._r,this._g=ut._g,this._b=ut._b,this.setAlpha(ut._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(C,arguments)},spin:function(){return this._applyModification(h,arguments)},_applyCombination:function(Y,ft){return Y.apply(null,[this].concat([].slice.call(ft)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(Y,ft){if(typeof Y=="object"){var ut={};for(var wt in Y)Y.hasOwnProperty(wt)&&(wt==="a"?ut[wt]=Y[wt]:ut[wt]=st(Y[wt]));Y=ut}return n(Y,ft)};function o(Y){var ft={r:0,g:0,b:0},ut=1,wt=null,zt=null,Pt=null,Wt=!1,Ht=!1;return typeof Y=="string"&&(Y=vt(Y)),typeof Y=="object"&&(at(Y.r)&&at(Y.g)&&at(Y.b)?(ft=i(Y.r,Y.g,Y.b),Wt=!0,Ht=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):at(Y.h)&&at(Y.s)&&at(Y.v)?(wt=st(Y.s),zt=st(Y.v),ft=y(Y.h,wt,zt),Wt=!0,Ht="hsv"):at(Y.h)&&at(Y.s)&&at(Y.l)&&(wt=st(Y.s),Pt=st(Y.l),ft=f(Y.h,wt,Pt),Wt=!0,Ht="hsl"),Y.hasOwnProperty("a")&&(ut=Y.a)),ut=U(ut),{ok:Wt,format:Y.format||Ht,r:e(255,r(ft.r,0)),g:e(255,r(ft.g,0)),b:e(255,r(ft.b,0)),a:ut}}function i(Y,ft,ut){return{r:W(Y,255)*255,g:W(ft,255)*255,b:W(ut,255)*255}}function s(Y,ft,ut){Y=W(Y,255),ft=W(ft,255),ut=W(ut,255);var wt=r(Y,ft,ut),zt=e(Y,ft,ut),Pt,Wt,Ht=(wt+zt)/2;if(wt==zt)Pt=Wt=0;else{var Jt=wt-zt;switch(Wt=Ht>.5?Jt/(2-wt-zt):Jt/(wt+zt),wt){case Y:Pt=(ft-ut)/Jt+(ft1&&(de-=1),de<1/6?ge+(he-ge)*6*de:de<1/2?he:de<2/3?ge+(he-ge)*(2/3-de)*6:ge}if(ft===0)wt=zt=Pt=ut;else{var Ht=ut<.5?ut*(1+ft):ut+ft-ut*ft,Jt=2*ut-Ht;wt=Wt(Jt,Ht,Y+1/3),zt=Wt(Jt,Ht,Y),Pt=Wt(Jt,Ht,Y-1/3)}return{r:wt*255,g:zt*255,b:Pt*255}}function x(Y,ft,ut){Y=W(Y,255),ft=W(ft,255),ut=W(ut,255);var wt=r(Y,ft,ut),zt=e(Y,ft,ut),Pt,Wt,Ht=wt,Jt=wt-zt;if(Wt=wt===0?0:Jt/wt,wt==zt)Pt=0;else{switch(wt){case Y:Pt=(ft-ut)/Jt+(ft>1)+720)%360;--ft;)wt.h=(wt.h+zt)%360,Pt.push(n(wt));return Pt}function N(Y,ft){ft=ft||6;for(var ut=n(Y).toHsv(),wt=ut.h,zt=ut.s,Pt=ut.v,Wt=[],Ht=1/ft;ft--;)Wt.push(n({h:wt,s:zt,v:Pt})),Pt=(Pt+Ht)%1;return Wt}n.mix=function(Y,ft,ut){ut=ut===0?0:ut||50;var wt=n(Y).toRgb(),zt=n(ft).toRgb(),Pt=ut/100,Wt={r:(zt.r-wt.r)*Pt+wt.r,g:(zt.g-wt.g)*Pt+wt.g,b:(zt.b-wt.b)*Pt+wt.b,a:(zt.a-wt.a)*Pt+wt.a};return n(Wt)},n.readability=function(Y,ft){var ut=n(Y),wt=n(ft);return(c.max(ut.getLuminance(),wt.getLuminance())+.05)/(c.min(ut.getLuminance(),wt.getLuminance())+.05)},n.isReadable=function(Y,ft,ut){var wt=n.readability(Y,ft),zt,Pt;switch(Pt=!1,zt=it(ut),zt.level+zt.size){case"AAsmall":case"AAAlarge":Pt=wt>=4.5;break;case"AAlarge":Pt=wt>=3;break;case"AAAsmall":Pt=wt>=7;break}return Pt},n.mostReadable=function(Y,ft,ut){var wt=null,zt=0,Pt,Wt,Ht,Jt;ut=ut||{},Wt=ut.includeFallbackColors,Ht=ut.level,Jt=ut.size;for(var ge=0;gezt&&(zt=Pt,wt=n(ft[ge]));return n.isReadable(Y,wt,{level:Ht,size:Jt})||!Wt?wt:(ut.includeFallbackColors=!1,n.mostReadable(Y,["#fff","#000"],ut))};var V=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},H=n.hexNames=F(V);function F(Y){var ft={};for(var ut in Y)Y.hasOwnProperty(ut)&&(ft[Y[ut]]=ut);return ft}function U(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function W(Y,ft){lt(Y)&&(Y="100%");var ut=yt(Y);return Y=e(ft,r(0,parseFloat(Y))),ut&&(Y=parseInt(Y*ft,10)/100),c.abs(Y-ft)<1e-6?1:Y%ft/parseFloat(ft)}function q(Y){return e(1,r(0,Y))}function X(Y){return parseInt(Y,16)}function lt(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function yt(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function pt(Y){return Y.length==1?"0"+Y:""+Y}function st(Y){return Y<=1&&(Y=Y*100+"%"),Y}function tt(Y){return c.round(parseFloat(Y)*255).toString(16)}function dt(Y){return X(Y)/255}var rt=function(){var Y="[-\\+]?\\d+%?",ft="[-\\+]?\\d*\\.\\d+%?",ut="(?:"+ft+")|(?:"+Y+")",wt="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?",zt="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?";return{CSS_UNIT:new RegExp(ut),rgb:new RegExp("rgb"+wt),rgba:new RegExp("rgba"+zt),hsl:new RegExp("hsl"+wt),hsla:new RegExp("hsla"+zt),hsv:new RegExp("hsv"+wt),hsva:new RegExp("hsva"+zt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function at(Y){return!!rt.CSS_UNIT.exec(Y)}function vt(Y){Y=Y.replace(g,"").replace(P,"").toLowerCase();var ft=!1;if(V[Y])Y=V[Y],ft=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ut;return(ut=rt.rgb.exec(Y))?{r:ut[1],g:ut[2],b:ut[3]}:(ut=rt.rgba.exec(Y))?{r:ut[1],g:ut[2],b:ut[3],a:ut[4]}:(ut=rt.hsl.exec(Y))?{h:ut[1],s:ut[2],l:ut[3]}:(ut=rt.hsla.exec(Y))?{h:ut[1],s:ut[2],l:ut[3],a:ut[4]}:(ut=rt.hsv.exec(Y))?{h:ut[1],s:ut[2],v:ut[3]}:(ut=rt.hsva.exec(Y))?{h:ut[1],s:ut[2],v:ut[3],a:ut[4]}:(ut=rt.hex8.exec(Y))?{r:X(ut[1]),g:X(ut[2]),b:X(ut[3]),a:dt(ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex6.exec(Y))?{r:X(ut[1]),g:X(ut[2]),b:X(ut[3]),format:ft?"name":"hex"}:(ut=rt.hex4.exec(Y))?{r:X(ut[1]+""+ut[1]),g:X(ut[2]+""+ut[2]),b:X(ut[3]+""+ut[3]),a:dt(ut[4]+""+ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex3.exec(Y))?{r:X(ut[1]+""+ut[1]),g:X(ut[2]+""+ut[2]),b:X(ut[3]+""+ut[3]),format:ft?"name":"hex"}:!1}function it(Y){var ft,ut;return Y=Y||{level:"AA",size:"small"},ft=(Y.level||"AA").toUpperCase(),ut=(Y.size||"small").toLowerCase(),ft!=="AA"&&ft!=="AAA"&&(ft="AA"),ut!=="small"&&ut!=="large"&&(ut="small"),{level:ft,size:ut}}typeof $<"u"&&$.exports?$.exports=n:window.tinycolor=n})(Math)}),ya=Ft(Q=>{var $=Ei(),c=Array.isArray;function g(S,t){var e,r;for(e=0;e{$.exports=function(c){var g=c.variantValues,P=c.editType,S=c.colorEditType;S===void 0&&(S=P);var t={editType:P,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};c.noNumericWeightValues&&(t.valType="enumerated",t.values=t.extras,t.extras=void 0,t.min=void 0,t.max=void 0);var e={family:{valType:"string",noBlank:!0,strict:!0,editType:P},size:{valType:"number",min:1,editType:P},color:{valType:"color",editType:S},weight:t,style:{editType:P,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:c.noFontVariant?void 0:{editType:P,valType:"enumerated",values:g||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:c.noFontTextcase?void 0:{editType:P,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:c.noFontLineposition?void 0:{editType:P,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:c.noFontShadow?void 0:{editType:P,valType:"string",dflt:c.autoShadowDflt?"auto":"none"},editType:P};return c.autoSize&&(e.size.dflt="auto"),c.autoColor&&(e.color.dflt="auto"),c.arrayOk&&(e.family.arrayOk=!0,e.weight.arrayOk=!0,e.style.arrayOk=!0,c.noFontVariant||(e.variant.arrayOk=!0),c.noFontTextcase||(e.textcase.arrayOk=!0),c.noFontLineposition||(e.lineposition.arrayOk=!0),c.noFontShadow||(e.shadow.arrayOk=!0),e.size.arrayOk=!0,e.color.arrayOk=!0),e}}),mo=Ft((Q,$)=>{$.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}),vo=Ft((Q,$)=>{var c=mo(),g=ka(),P=g({editType:"none"});P.family.dflt=c.HOVERFONT,P.size.dflt=c.HOVERFONTSIZE,$.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:P,grouptitlefont:g({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}),Ss=Ft((Q,$)=>{var c=ka(),g=vo().hoverlabel,P=ya().extendFlat;$.exports={hoverlabel:{bgcolor:P({},g.bgcolor,{arrayOk:!0}),bordercolor:P({},g.bordercolor,{arrayOk:!0}),font:c({arrayOk:!0,editType:"none"}),align:P({},g.align,{arrayOk:!0}),namelength:P({},g.namelength,{arrayOk:!0}),showarrow:P({},g.showarrow),editType:"none"}}}),Yo=Ft((Q,$)=>{var c=ka(),g=Ss();$.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:c({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:g.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}),vi=Ft((Q,$)=>{var c=eo(),g={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},P=g.RdBu;function S(r,a){if(a||(a=P),!r)return a;function n(){try{r=g[r]||JSON.parse(r)}catch{r=a}}return typeof r=="string"&&(n(),typeof r=="string"&&n()),t(r)?r:a}function t(r){var a=0;if(!Array.isArray(r)||r.length<2||!r[0]||!r[r.length-1]||+r[0][0]!=0||+r[r.length-1][0]!=1)return!1;for(var n=0;n{Q.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Q.defaultLine="#444",Q.lightLine="#eee",Q.background="#fff",Q.borderLine="#BEC8D9",Q.lightFraction=1e3/11}),ui=Ft((Q,$)=>{var c=eo(),g=ia(),P=Va().isTypedArray,S=$.exports={},t=yi();S.defaults=t.defaults;var e=S.defaultLine=t.defaultLine;S.lightLine=t.lightLine;var r=S.background=t.background;S.tinyRGB=function(n){var o=n.toRgb();return"rgb("+Math.round(o.r)+", "+Math.round(o.g)+", "+Math.round(o.b)+")"},S.rgb=function(n){return S.tinyRGB(c(n))},S.opacity=function(n){return n?c(n).getAlpha():0},S.addOpacity=function(n,o){var i=c(n).toRgb();return"rgba("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+", "+o+")"},S.combine=function(n,o){var i=c(n).toRgb();if(i.a===1)return c(n).toRgbString();var s=c(o||r).toRgb(),f=s.a===1?s:{r:255*(1-s.a)+s.r*s.a,g:255*(1-s.a)+s.g*s.a,b:255*(1-s.a)+s.b*s.a},x={r:f.r*(1-i.a)+i.r*i.a,g:f.g*(1-i.a)+i.g*i.a,b:f.b*(1-i.a)+i.b*i.a};return c(x).toRgbString()},S.interpolate=function(n,o,i){var s=c(n).toRgb(),f=c(o).toRgb(),x={r:i*s.r+(1-i)*f.r,g:i*s.g+(1-i)*f.g,b:i*s.b+(1-i)*f.b};return c(x).toRgbString()},S.contrast=function(n,o,i){var s=c(n);s.getAlpha()!==1&&(s=c(S.combine(n,r)));var f=s.isDark()?o?s.lighten(o):r:i?s.darken(i):e;return f.toString()},S.stroke=function(n,o){var i=c(o);n.style({stroke:S.tinyRGB(i),"stroke-opacity":i.getAlpha()})},S.fill=function(n,o){var i=c(o);n.style({fill:S.tinyRGB(i),"fill-opacity":i.getAlpha()})},S.clean=function(n){if(!(!n||typeof n!="object")){var o=Object.keys(n),i,s,f,x;for(i=0;i=0)))return n;if(x===3)s[x]>1&&(s[x]=1);else if(s[x]>=1)return n}var y=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return f?"rgba("+y+", "+s[3]+")":"rgb("+y+")"}}),ao=Ft((Q,$)=>{$.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}),So=Ft(Q=>{Q.counter=function($,c,g,P){var S=(c||"")+(g?"":"$"),t=P===!1?"":"^";return $==="xy"?new RegExp(t+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+S):new RegExp(t+$+"([2-9]|[1-9][0-9]+)?"+S)}}),ko=Ft(Q=>{var $=ia(),c=eo(),g=ya().extendFlat,P=Yo(),S=vi(),t=ui(),e=ao().DESELECTDIM,r=us(),a=So().counter,n=To().modHalf,o=Va().isArrayOrTypedArray,i=Va().isTypedArraySpec,s=Va().decodeTypedArraySpec;Q.valObjectMeta={data_array:{coerceFunction:function(x,y,v){y.set(o(x)?x:i(x)?s(x):v)}},enumerated:{coerceFunction:function(x,y,v,T){T.coerceNumber&&(x=+x),T.values.indexOf(x)===-1?y.set(v):y.set(x)},validateFunction:function(x,y){y.coerceNumber&&(x=+x);for(var v=y.values,T=0;TT.max?y.set(v):y.set(+x)}},integer:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}i(x)&&(x=s(x)),x%1||!$(x)||T.min!==void 0&&xT.max?y.set(v):y.set(+x)}},string:{coerceFunction:function(x,y,v,T){if(typeof x!="string"){var u=typeof x=="number";T.strict===!0||!u?y.set(v):y.set(String(x))}else T.noBlank&&!x?y.set(v):y.set(x)}},color:{coerceFunction:function(x,y,v){i(x)&&(x=s(x)),c(x).isValid()?y.set(x):y.set(v)}},colorlist:{coerceFunction:function(x,y,v){function T(u){return c(u).isValid()}!Array.isArray(x)||!x.length?y.set(v):x.every(T)?y.set(x):y.set(v)}},colorscale:{coerceFunction:function(x,y,v){y.set(S.get(x,v))}},angle:{coerceFunction:function(x,y,v){i(x)&&(x=s(x)),x==="auto"?y.set("auto"):$(x)?y.set(n(+x,360)):y.set(v)}},subplotid:{coerceFunction:function(x,y,v,T){var u=T.regex||a(v);if(typeof x=="string"&&u.test(x)){y.set(x);return}y.set(v)},validateFunction:function(x,y){var v=y.dflt;return x===v?!0:typeof x!="string"?!1:!!a(v).test(x)}},flaglist:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}if(typeof x!="string"){y.set(v);return}for(var u=x.split("+"),b=0;b{var c={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},g={};function P(S,t){for(var e in S){var r=S[e];r.valType?t[e]=r.dflt:(t[e]||(t[e]={}),P(r,t[e]))}}P(c,g),$.exports={configAttributes:c,dfltConfig:g}}),jo=Ft((Q,$)=>{var c=En(),g=ia(),P=[];$.exports=function(S,t){if(P.indexOf(S)!==-1)return;P.push(S);var e=1e3;g(t)?e=t:t==="long"&&(e=3e3);var r=c.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(P);function n(o){o.duration(700).style("opacity",0).each("end",function(i){var s=P.indexOf(i);s!==-1&&P.splice(s,1),c.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var i=c.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",function(){i.transition().call(n)});for(var s=i.append("p"),f=o.split(//g),x=0;x{var c=gs().dfltConfig,g=jo(),P=$.exports={};P.log=function(){var S;if(c.logging>1){var t=["LOG:"];for(S=0;S1){var e=[];for(S=0;S"),"long")}},P.warn=function(){var S;if(c.logging>0){var t=["WARN:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}},P.error=function(){var S;if(c.logging>0){var t=["ERROR:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}}}),Uo=Ft((Q,$)=>{$.exports=function(){}}),El=Ft((Q,$)=>{$.exports=function(c,g){if(g instanceof RegExp){for(var P=g.toString(),S=0;S{$.exports=c;function c(){var g=new Float32Array(16);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),Cl=Ft((Q,$)=>{$.exports=c;function c(g){var P=new Float32Array(16);return P[0]=g[0],P[1]=g[1],P[2]=g[2],P[3]=g[3],P[4]=g[4],P[5]=g[5],P[6]=g[6],P[7]=g[7],P[8]=g[8],P[9]=g[9],P[10]=g[10],P[11]=g[11],P[12]=g[12],P[13]=g[13],P[14]=g[14],P[15]=g[15],P}}),Zl=Ft((Q,$)=>{$.exports=c;function c(g,P){return g[0]=P[0],g[1]=P[1],g[2]=P[2],g[3]=P[3],g[4]=P[4],g[5]=P[5],g[6]=P[6],g[7]=P[7],g[8]=P[8],g[9]=P[9],g[10]=P[10],g[11]=P[11],g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15],g}}),Du=Ft((Q,$)=>{$.exports=c;function c(g){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),kc=Ft((Q,$)=>{$.exports=c;function c(g,P){if(g===P){var S=P[1],t=P[2],e=P[3],r=P[6],a=P[7],n=P[11];g[1]=P[4],g[2]=P[8],g[3]=P[12],g[4]=S,g[6]=P[9],g[7]=P[13],g[8]=t,g[9]=r,g[11]=P[14],g[12]=e,g[13]=a,g[14]=n}else g[0]=P[0],g[1]=P[4],g[2]=P[8],g[3]=P[12],g[4]=P[1],g[5]=P[5],g[6]=P[9],g[7]=P[13],g[8]=P[2],g[9]=P[6],g[10]=P[10],g[11]=P[14],g[12]=P[3],g[13]=P[7],g[14]=P[11],g[15]=P[15];return g}}),ic=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=P[0],t=P[1],e=P[2],r=P[3],a=P[4],n=P[5],o=P[6],i=P[7],s=P[8],f=P[9],x=P[10],y=P[11],v=P[12],T=P[13],u=P[14],b=P[15],_=S*n-t*a,C=S*o-e*a,M=S*i-r*a,E=t*o-e*n,A=t*i-r*n,h=e*i-r*o,p=s*T-f*v,k=s*u-x*v,w=s*b-y*v,R=f*u-x*T,O=f*b-y*T,N=x*b-y*u,V=_*N-C*O+M*R+E*w-A*k+h*p;return V?(V=1/V,g[0]=(n*N-o*O+i*R)*V,g[1]=(e*O-t*N-r*R)*V,g[2]=(T*h-u*A+b*E)*V,g[3]=(x*A-f*h-y*E)*V,g[4]=(o*w-a*N-i*k)*V,g[5]=(S*N-e*w+r*k)*V,g[6]=(u*M-v*h-b*C)*V,g[7]=(s*h-x*M+y*C)*V,g[8]=(a*O-n*w+i*p)*V,g[9]=(t*w-S*O-r*p)*V,g[10]=(v*A-T*M+b*_)*V,g[11]=(f*M-s*A-y*_)*V,g[12]=(n*k-a*R-o*p)*V,g[13]=(S*R-t*k+e*p)*V,g[14]=(T*C-v*E-u*_)*V,g[15]=(s*E-f*C+x*_)*V,g):null}}),vf=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=P[0],t=P[1],e=P[2],r=P[3],a=P[4],n=P[5],o=P[6],i=P[7],s=P[8],f=P[9],x=P[10],y=P[11],v=P[12],T=P[13],u=P[14],b=P[15];return g[0]=n*(x*b-y*u)-f*(o*b-i*u)+T*(o*y-i*x),g[1]=-(t*(x*b-y*u)-f*(e*b-r*u)+T*(e*y-r*x)),g[2]=t*(o*b-i*u)-n*(e*b-r*u)+T*(e*i-r*o),g[3]=-(t*(o*y-i*x)-n*(e*y-r*x)+f*(e*i-r*o)),g[4]=-(a*(x*b-y*u)-s*(o*b-i*u)+v*(o*y-i*x)),g[5]=S*(x*b-y*u)-s*(e*b-r*u)+v*(e*y-r*x),g[6]=-(S*(o*b-i*u)-a*(e*b-r*u)+v*(e*i-r*o)),g[7]=S*(o*y-i*x)-a*(e*y-r*x)+s*(e*i-r*o),g[8]=a*(f*b-y*T)-s*(n*b-i*T)+v*(n*y-i*f),g[9]=-(S*(f*b-y*T)-s*(t*b-r*T)+v*(t*y-r*f)),g[10]=S*(n*b-i*T)-a*(t*b-r*T)+v*(t*i-r*n),g[11]=-(S*(n*y-i*f)-a*(t*y-r*f)+s*(t*i-r*n)),g[12]=-(a*(f*u-x*T)-s*(n*u-o*T)+v*(n*x-o*f)),g[13]=S*(f*u-x*T)-s*(t*u-e*T)+v*(t*x-e*f),g[14]=-(S*(n*u-o*T)-a*(t*u-e*T)+v*(t*o-e*n)),g[15]=S*(n*x-o*f)-a*(t*x-e*f)+s*(t*o-e*n),g}}),Bf=Ft((Q,$)=>{$.exports=c;function c(g){var P=g[0],S=g[1],t=g[2],e=g[3],r=g[4],a=g[5],n=g[6],o=g[7],i=g[8],s=g[9],f=g[10],x=g[11],y=g[12],v=g[13],T=g[14],u=g[15],b=P*a-S*r,_=P*n-t*r,C=P*o-e*r,M=S*n-t*a,E=S*o-e*a,A=t*o-e*n,h=i*v-s*y,p=i*T-f*y,k=i*u-x*y,w=s*T-f*v,R=s*u-x*v,O=f*u-x*T;return b*O-_*R+C*w+M*k-E*p+A*h}}),Fp=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=P[0],e=P[1],r=P[2],a=P[3],n=P[4],o=P[5],i=P[6],s=P[7],f=P[8],x=P[9],y=P[10],v=P[11],T=P[12],u=P[13],b=P[14],_=P[15],C=S[0],M=S[1],E=S[2],A=S[3];return g[0]=C*t+M*n+E*f+A*T,g[1]=C*e+M*o+E*x+A*u,g[2]=C*r+M*i+E*y+A*b,g[3]=C*a+M*s+E*v+A*_,C=S[4],M=S[5],E=S[6],A=S[7],g[4]=C*t+M*n+E*f+A*T,g[5]=C*e+M*o+E*x+A*u,g[6]=C*r+M*i+E*y+A*b,g[7]=C*a+M*s+E*v+A*_,C=S[8],M=S[9],E=S[10],A=S[11],g[8]=C*t+M*n+E*f+A*T,g[9]=C*e+M*o+E*x+A*u,g[10]=C*r+M*i+E*y+A*b,g[11]=C*a+M*s+E*v+A*_,C=S[12],M=S[13],E=S[14],A=S[15],g[12]=C*t+M*n+E*f+A*T,g[13]=C*e+M*o+E*x+A*u,g[14]=C*r+M*i+E*y+A*b,g[15]=C*a+M*s+E*v+A*_,g}}),Yf=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=S[0],e=S[1],r=S[2],a,n,o,i,s,f,x,y,v,T,u,b;return P===g?(g[12]=P[0]*t+P[4]*e+P[8]*r+P[12],g[13]=P[1]*t+P[5]*e+P[9]*r+P[13],g[14]=P[2]*t+P[6]*e+P[10]*r+P[14],g[15]=P[3]*t+P[7]*e+P[11]*r+P[15]):(a=P[0],n=P[1],o=P[2],i=P[3],s=P[4],f=P[5],x=P[6],y=P[7],v=P[8],T=P[9],u=P[10],b=P[11],g[0]=a,g[1]=n,g[2]=o,g[3]=i,g[4]=s,g[5]=f,g[6]=x,g[7]=y,g[8]=v,g[9]=T,g[10]=u,g[11]=b,g[12]=a*t+s*e+v*r+P[12],g[13]=n*t+f*e+T*r+P[13],g[14]=o*t+x*e+u*r+P[14],g[15]=i*t+y*e+b*r+P[15]),g}}),g0=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=S[0],e=S[1],r=S[2];return g[0]=P[0]*t,g[1]=P[1]*t,g[2]=P[2]*t,g[3]=P[3]*t,g[4]=P[4]*e,g[5]=P[5]*e,g[6]=P[6]*e,g[7]=P[7]*e,g[8]=P[8]*r,g[9]=P[9]*r,g[10]=P[10]*r,g[11]=P[11]*r,g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15],g}}),Rp=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t){var e=t[0],r=t[1],a=t[2],n=Math.sqrt(e*e+r*r+a*a),o,i,s,f,x,y,v,T,u,b,_,C,M,E,A,h,p,k,w,R,O,N,V,H;return Math.abs(n)<1e-6?null:(n=1/n,e*=n,r*=n,a*=n,o=Math.sin(S),i=Math.cos(S),s=1-i,f=P[0],x=P[1],y=P[2],v=P[3],T=P[4],u=P[5],b=P[6],_=P[7],C=P[8],M=P[9],E=P[10],A=P[11],h=e*e*s+i,p=r*e*s+a*o,k=a*e*s-r*o,w=e*r*s-a*o,R=r*r*s+i,O=a*r*s+e*o,N=e*a*s+r*o,V=r*a*s-e*o,H=a*a*s+i,g[0]=f*h+T*p+C*k,g[1]=x*h+u*p+M*k,g[2]=y*h+b*p+E*k,g[3]=v*h+_*p+A*k,g[4]=f*w+T*R+C*O,g[5]=x*w+u*R+M*O,g[6]=y*w+b*R+E*O,g[7]=v*w+_*R+A*O,g[8]=f*N+T*V+C*H,g[9]=x*N+u*V+M*H,g[10]=y*N+b*V+E*H,g[11]=v*N+_*V+A*H,P!==g&&(g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15]),g)}}),fd=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=Math.sin(S),e=Math.cos(S),r=P[4],a=P[5],n=P[6],o=P[7],i=P[8],s=P[9],f=P[10],x=P[11];return P!==g&&(g[0]=P[0],g[1]=P[1],g[2]=P[2],g[3]=P[3],g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15]),g[4]=r*e+i*t,g[5]=a*e+s*t,g[6]=n*e+f*t,g[7]=o*e+x*t,g[8]=i*e-r*t,g[9]=s*e-a*t,g[10]=f*e-n*t,g[11]=x*e-o*t,g}}),Sd=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=Math.sin(S),e=Math.cos(S),r=P[0],a=P[1],n=P[2],o=P[3],i=P[8],s=P[9],f=P[10],x=P[11];return P!==g&&(g[4]=P[4],g[5]=P[5],g[6]=P[6],g[7]=P[7],g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15]),g[0]=r*e-i*t,g[1]=a*e-s*t,g[2]=n*e-f*t,g[3]=o*e-x*t,g[8]=r*t+i*e,g[9]=a*t+s*e,g[10]=n*t+f*e,g[11]=o*t+x*e,g}}),mm=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=Math.sin(S),e=Math.cos(S),r=P[0],a=P[1],n=P[2],o=P[3],i=P[4],s=P[5],f=P[6],x=P[7];return P!==g&&(g[8]=P[8],g[9]=P[9],g[10]=P[10],g[11]=P[11],g[12]=P[12],g[13]=P[13],g[14]=P[14],g[15]=P[15]),g[0]=r*e+i*t,g[1]=a*e+s*t,g[2]=n*e+f*t,g[3]=o*e+x*t,g[4]=i*e-r*t,g[5]=s*e-a*t,g[6]=f*e-n*t,g[7]=x*e-o*t,g}}),y1=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t,e,r,a=S[0],n=S[1],o=S[2],i=Math.sqrt(a*a+n*n+o*o);return Math.abs(i)<1e-6?null:(i=1/i,a*=i,n*=i,o*=i,t=Math.sin(P),e=Math.cos(P),r=1-e,g[0]=a*a*r+e,g[1]=n*a*r+o*t,g[2]=o*a*r-n*t,g[3]=0,g[4]=a*n*r-o*t,g[5]=n*n*r+e,g[6]=o*n*r+a*t,g[7]=0,g[8]=a*o*r+n*t,g[9]=n*o*r-a*t,g[10]=o*o*r+e,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g)}}),A_=Ft((Q,$)=>{$.exports=c;function c(g,P,S){var t=P[0],e=P[1],r=P[2],a=P[3],n=t+t,o=e+e,i=r+r,s=t*n,f=t*o,x=t*i,y=e*o,v=e*i,T=r*i,u=a*n,b=a*o,_=a*i;return g[0]=1-(y+T),g[1]=f+_,g[2]=x-b,g[3]=0,g[4]=f-_,g[5]=1-(s+T),g[6]=v+u,g[7]=0,g[8]=x+b,g[9]=v-u,g[10]=1-(s+y),g[11]=0,g[12]=S[0],g[13]=S[1],g[14]=S[2],g[15]=1,g}}),x1=Ft((Q,$)=>{$.exports=c;function c(g,P){return g[0]=P[0],g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=P[1],g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=P[2],g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),Oy=Ft((Q,$)=>{$.exports=c;function c(g,P){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=P[0],g[13]=P[1],g[14]=P[2],g[15]=1,g}}),Dy=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=Math.sin(P),t=Math.cos(P);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=t,g[6]=S,g[7]=0,g[8]=0,g[9]=-S,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),M_=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=Math.sin(P),t=Math.cos(P);return g[0]=t,g[1]=0,g[2]=-S,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=S,g[9]=0,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),J4=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=Math.sin(P),t=Math.cos(P);return g[0]=t,g[1]=S,g[2]=0,g[3]=0,g[4]=-S,g[5]=t,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),Q4=Ft((Q,$)=>{$.exports=c;function c(g,P){var S=P[0],t=P[1],e=P[2],r=P[3],a=S+S,n=t+t,o=e+e,i=S*a,s=t*a,f=t*n,x=e*a,y=e*n,v=e*o,T=r*a,u=r*n,b=r*o;return g[0]=1-f-v,g[1]=s+b,g[2]=x-u,g[3]=0,g[4]=s-b,g[5]=1-i-v,g[6]=y+T,g[7]=0,g[8]=x+u,g[9]=y-T,g[10]=1-i-f,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),t6=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t,e,r,a){var n=1/(S-P),o=1/(e-t),i=1/(r-a);return g[0]=r*2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r*2*o,g[6]=0,g[7]=0,g[8]=(S+P)*n,g[9]=(e+t)*o,g[10]=(a+r)*i,g[11]=-1,g[12]=0,g[13]=0,g[14]=a*r*2*i,g[15]=0,g}}),e6=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t,e){var r=1/Math.tan(P/2),a=1/(t-e);return g[0]=r/S,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=(e+t)*a,g[11]=-1,g[12]=0,g[13]=0,g[14]=2*e*t*a,g[15]=0,g}}),r6=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t){var e=Math.tan(P.upDegrees*Math.PI/180),r=Math.tan(P.downDegrees*Math.PI/180),a=Math.tan(P.leftDegrees*Math.PI/180),n=Math.tan(P.rightDegrees*Math.PI/180),o=2/(a+n),i=2/(e+r);return g[0]=o,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=i,g[6]=0,g[7]=0,g[8]=-((a-n)*o*.5),g[9]=(e-r)*i*.5,g[10]=t/(S-t),g[11]=-1,g[12]=0,g[13]=0,g[14]=t*S/(S-t),g[15]=0,g}}),S_=Ft((Q,$)=>{$.exports=c;function c(g,P,S,t,e,r,a){var n=1/(P-S),o=1/(t-e),i=1/(r-a);return g[0]=-2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=-2*o,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=2*i,g[11]=0,g[12]=(P+S)*n,g[13]=(e+t)*o,g[14]=(a+r)*i,g[15]=1,g}}),n6=Ft((Q,$)=>{var c=Du();$.exports=g;function g(P,S,t,e){var r,a,n,o,i,s,f,x,y,v,T=S[0],u=S[1],b=S[2],_=e[0],C=e[1],M=e[2],E=t[0],A=t[1],h=t[2];return Math.abs(T-E)<1e-6&&Math.abs(u-A)<1e-6&&Math.abs(b-h)<1e-6?c(P):(f=T-E,x=u-A,y=b-h,v=1/Math.sqrt(f*f+x*x+y*y),f*=v,x*=v,y*=v,r=C*y-M*x,a=M*f-_*y,n=_*x-C*f,v=Math.sqrt(r*r+a*a+n*n),v?(v=1/v,r*=v,a*=v,n*=v):(r=0,a=0,n=0),o=x*n-y*a,i=y*r-f*n,s=f*a-x*r,v=Math.sqrt(o*o+i*i+s*s),v?(v=1/v,o*=v,i*=v,s*=v):(o=0,i=0,s=0),P[0]=r,P[1]=o,P[2]=f,P[3]=0,P[4]=a,P[5]=i,P[6]=x,P[7]=0,P[8]=n,P[9]=s,P[10]=y,P[11]=0,P[12]=-(r*T+a*u+n*b),P[13]=-(o*T+i*u+s*b),P[14]=-(f*T+x*u+y*b),P[15]=1,P)}}),i6=Ft((Q,$)=>{$.exports=c;function c(g){return"mat4("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+", "+g[4]+", "+g[5]+", "+g[6]+", "+g[7]+", "+g[8]+", "+g[9]+", "+g[10]+", "+g[11]+", "+g[12]+", "+g[13]+", "+g[14]+", "+g[15]+")"}}),fw=Ft((Q,$)=>{$.exports={create:Is(),clone:Cl(),copy:Zl(),identity:Du(),transpose:kc(),invert:ic(),adjoint:vf(),determinant:Bf(),multiply:Fp(),translate:Yf(),scale:g0(),rotate:Rp(),rotateX:fd(),rotateY:Sd(),rotateZ:mm(),fromRotation:y1(),fromRotationTranslation:A_(),fromScaling:x1(),fromTranslation:Oy(),fromXRotation:Dy(),fromYRotation:M_(),fromZRotation:J4(),fromQuat:Q4(),frustum:t6(),perspective:e6(),perspectiveFromFieldOfView:r6(),ortho:S_(),lookAt:n6(),str:i6()}}),E_=Ft(Q=>{var $=fw();Q.init2dArray=function(c,g){for(var P=new Array(c),S=0;S{var c=En(),g=es(),P=E_(),S=fw();function t(T){var u;if(typeof T=="string"){if(u=document.getElementById(T),u===null)throw new Error("No DOM element with id '"+T+"' exists on the page.");return u}else if(T==null)throw new Error("DOM element provided is null or undefined");return T}function e(T){var u=c.select(T);return u.node()instanceof HTMLElement&&u.size()&&u.classed("js-plotly-plot")}function r(T){var u=T&&T.parentNode;u&&u.removeChild(T)}function a(T,u){n("global",T,u)}function n(T,u,b){var _="plotly.js-style-"+T,C=document.getElementById(_);if(!(C&&C.matches(".no-inline-styles"))){C||(C=document.createElement("style"),C.setAttribute("id",_),C.appendChild(document.createTextNode("")),document.head.appendChild(C));var M=C.sheet;M?M.insertRule?M.insertRule(u+"{"+b+"}",0):M.addRule?M.addRule(u,b,0):g.warn("addStyleRule failed"):g.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function o(T){var u="plotly.js-style-"+T,b=document.getElementById(u);b&&r(b)}function i(T,u,b,_,C,M){var E=_.split(":"),A=C.split(":"),h="data-btn-style-event-added";M||(M=document),M.querySelectorAll(T).forEach(function(p){p.getAttribute(h)||(p.addEventListener("mouseenter",function(){var k=this.querySelector(b);k&&(k.style[E[0]]=E[1])}),p.addEventListener("mouseleave",function(){var k=this.querySelector(b);k&&(u&&this.matches(u)?k.style[E[0]]=E[1]:k.style[A[0]]=A[1])}),p.setAttribute(h,!0))})}function s(T){var u=x(T),b=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return u.forEach(function(_){var C=f(_);if(C){var M=P.convertCssMatrix(C);b=S.multiply(b,b,M)}}),b}function f(T){var u=window.getComputedStyle(T,null),b=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("-moz-transform")||u.getPropertyValue("-ms-transform")||u.getPropertyValue("-o-transform")||u.getPropertyValue("transform");return b==="none"?null:b.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(_){return+_})}function x(T){for(var u=[];y(T);)u.push(T),T=T.parentNode,typeof ShadowRoot=="function"&&T instanceof ShadowRoot&&(T=T.host);return u}function y(T){return T&&(T instanceof Element||T instanceof HTMLElement)}function v(T,u){return T&&u&&T.top===u.top&&T.left===u.left&&T.right===u.right&&T.bottom===u.bottom}$.exports={getGraphDiv:t,isPlotDiv:e,removeElement:r,addStyleRule:a,addRelatedStyleRule:n,deleteRelatedStyleRule:o,setStyleOnHover:i,getFullTransformMatrix:s,getElementTransformMatrix:f,getElementAndAncestors:x,equalDomRects:v}}),Ll=Ft((Q,$)=>{$.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}}),Yc=Ft((Q,$)=>{var c=ya().extendFlat,g=Ei(),P={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},S={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},t=P.flags.slice().concat(["fullReplot"]),e=S.flags.slice().concat("layoutReplot");$.exports={traces:P,layout:S,traceFlags:function(){return r(t)},layoutFlags:function(){return r(e)},update:function(o,i){var s=i.editType;if(s&&s!=="none")for(var f=s.split("+"),x=0;x{Q.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},Q.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}}),C_=Ft((Q,$)=>{$.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}}),$u=Ft(Q=>{var{DATE_FORMAT_LINK:$,FORMAT_LINK:c}=C_(),g=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function P({supportOther:S}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(S?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,c,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,$,"for details on the date formatting syntax.",g].join(" ")}Q.templateFormatStringDescription=P,Q.hovertemplateAttrs=({editType:S="none",arrayOk:t}={},e={})=>Ir({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.texttemplateAttrs=({editType:S="calc",arrayOk:t}={},e={})=>Ir({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.shapeTexttemplateAttrs=({editType:S="arraydraw",newshape:t}={},e={})=>({valType:"string",dflt:"",editType:S}),Q.templatefallbackAttrs=({editType:S="none"}={})=>({valType:"any",dflt:"-",editType:S})}),_1=Ft((Q,$)=>{function c(b,_){return _?_.d2l(b):b}function g(b,_){return _?_.l2d(b):b}function P(b){return b.x0}function S(b){return b.x1}function t(b){return b.y0}function e(b){return b.y1}function r(b){return b.x0shift||0}function a(b){return b.x1shift||0}function n(b){return b.y0shift||0}function o(b){return b.y1shift||0}function i(b,_){return c(b.x1,_)+a(b)-c(b.x0,_)-r(b)}function s(b,_,C){return c(b.y1,C)+o(b)-c(b.y0,C)-n(b)}function f(b,_){return Math.abs(i(b,_))}function x(b,_,C){return Math.abs(s(b,_,C))}function y(b,_,C){return b.type!=="line"?void 0:Math.sqrt(Math.pow(i(b,_),2)+Math.pow(s(b,_,C),2))}function v(b,_){return g((c(b.x1,_)+a(b)+c(b.x0,_)+r(b))/2,_)}function T(b,_,C){return g((c(b.y1,C)+o(b)+c(b.y0,C)+n(b))/2,C)}function u(b,_,C){return b.type!=="line"?void 0:s(b,_,C)/i(b,_)}$.exports={x0:P,x1:S,y0:t,y1:e,slope:u,dx:i,dy:s,width:f,height:x,length:y,xcenter:v,ycenter:T}}),dw=Ft((Q,$)=>{var c=Yc().overrideAll,g=Yo(),P=ka(),S=Ed().dash,t=ya().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=_1();$.exports=c({newshape:{visible:t({},g.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:t({},g.legend,{}),legendgroup:t({},g.legendgroup,{}),legendgrouptitle:{text:t({},g.legendgrouptitle.text,{}),font:P({})},legendrank:t({},g.legendrank,{}),legendwidth:t({},g.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:t({},S,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:t({},g.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(a)}),texttemplatefallback:r({editType:"arraydraw"}),font:P({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}),cv=Ft((Q,$)=>{var c=Ed().dash,g=ya().extendFlat;$.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:g({},c,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}),Fy=Ft((Q,$)=>{$.exports=function(c){var g=c.editType;return{t:{valType:"number",dflt:0,editType:g},r:{valType:"number",dflt:0,editType:g},b:{valType:"number",dflt:0,editType:g},l:{valType:"number",dflt:0,editType:g},editType:g}}}),b1=Ft((Q,$)=>{var c=ka(),g=Ll(),P=yi(),S=dw(),t=cv(),e=Fy(),r=ya().extendFlat,a=c({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=P.defaultLine,$.exports={font:a,title:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:P.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:P.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:P.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:S.newshape,activeshape:S.activeshape,newselection:t.newselection,activeselection:t.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},g.transition,{editType:"none"})}}),a6=Ft(()=>{(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var Q=document.createElement("style");Q.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",Q.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Q)}})()}),Qo=Ft(Q=>{var $=es(),c=Uo(),g=El(),P=Ei(),S=a0().addStyleRule,t=ya(),e=Yo(),r=b1(),a=t.extendFlat,n=t.extendDeepAll;Q.modules={},Q.allCategories={},Q.allTypes=[],Q.subplotsRegistry={},Q.componentsRegistry={},Q.layoutArrayContainers=[],Q.layoutArrayRegexes=[],Q.traceLayoutAttributes={},Q.localeRegistry={},Q.apiMethodRegistry={},Q.collectableSubplotTypes=null,Q.register=function(b){if(Q.collectableSubplotTypes=null,b)b&&!Array.isArray(b)&&(b=[b]);else throw new Error("No argument passed to Plotly.register.");for(var _=0;_{var $=Sa().timeFormat,c=ia(),g=es(),P=To().mod,S=Ua(),t=S.BADNUM,e=S.ONEDAY,r=S.ONEHOUR,a=S.ONEMIN,n=S.ONESEC,o=S.EPOCHJD,i=Qo(),s=Sa().utcFormat,f=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=new Date().getFullYear()-70;function v(V){return V&&i.componentsRegistry.calendars&&typeof V=="string"&&V!=="gregorian"}Q.dateTick0=function(V,H){var F=T(V,!!H);if(H<2)return F;var U=Q.dateTime2ms(F,V);return U+=e*(H-1),Q.ms2DateTime(U,0,V)};function T(V,H){return v(V)?H?i.getComponentMethod("calendars","CANONICAL_SUNDAY")[V]:i.getComponentMethod("calendars","CANONICAL_TICK")[V]:H?"2000-01-02":"2000-01-01"}Q.dfltRange=function(V){return v(V)?i.getComponentMethod("calendars","DFLTRANGE")[V]:["2000-01-01","2001-01-01"]},Q.isJSDate=function(V){return typeof V=="object"&&V!==null&&typeof V.getTime=="function"};var u,b;Q.dateTime2ms=function(V,H){if(Q.isJSDate(V)){var F=V.getTimezoneOffset()*a,U=(V.getUTCMinutes()-V.getMinutes())*a+(V.getUTCSeconds()-V.getSeconds())*n+(V.getUTCMilliseconds()-V.getMilliseconds());if(U){var W=3*a;F=F-W/2+P(U-F+W/2,W)}return V=Number(V)-F,V>=u&&V<=b?V:t}if(typeof V!="string"&&typeof V!="number")return t;V=String(V);var q=v(H),X=V.charAt(0);q&&(X==="G"||X==="g")&&(V=V.substr(1),H="");var lt=q&&H.substr(0,7)==="chinese",yt=V.match(lt?x:f);if(!yt)return t;var pt=yt[1],st=yt[3]||"1",tt=Number(yt[5]||1),dt=Number(yt[7]||0),rt=Number(yt[9]||0),at=Number(yt[11]||0);if(q){if(pt.length===2)return t;pt=Number(pt);var vt;try{var it=i.getComponentMethod("calendars","getCal")(H);if(lt){var Y=st.charAt(st.length-1)==="i";st=parseInt(st,10),vt=it.newDate(pt,it.toMonthIndex(pt,st,Y),tt)}else vt=it.newDate(pt,Number(st),tt)}catch{return t}return vt?(vt.toJD()-o)*e+dt*r+rt*a+at*n:t}pt.length===2?pt=(Number(pt)+2e3-y)%100+y:pt=Number(pt),st-=1;var ft=new Date(Date.UTC(2e3,st,tt,dt,rt));return ft.setUTCFullYear(pt),ft.getUTCMonth()!==st||ft.getUTCDate()!==tt?t:ft.getTime()+at*n},u=Q.MIN_MS=Q.dateTime2ms("-9999"),b=Q.MAX_MS=Q.dateTime2ms("9999-12-31 23:59:59.9999"),Q.isDateTime=function(V,H){return Q.dateTime2ms(V,H)!==t};function _(V,H){return String(V+Math.pow(10,H)).substr(1)}var C=90*e,M=3*r,E=5*a;Q.ms2DateTime=function(V,H,F){if(typeof V!="number"||!(V>=u&&V<=b))return t;H||(H=0);var U=Math.floor(P(V+.05,1)*10),W=Math.round(V-U/10),q,X,lt,yt,pt,st;if(v(F)){var tt=Math.floor(W/e)+o,dt=Math.floor(P(V,e));try{q=i.getComponentMethod("calendars","getCal")(F).fromJD(tt).formatDate("yyyy-mm-dd")}catch{q=s("G%Y-%m-%d")(new Date(W))}if(q.charAt(0)==="-")for(;q.length<11;)q="-0"+q.substr(1);else for(;q.length<10;)q="0"+q;X=H=u+e&&V<=b-e))return t;var H=Math.floor(P(V+.05,1)*10),F=new Date(Math.round(V-H/10)),U=$("%Y-%m-%d")(F),W=F.getHours(),q=F.getMinutes(),X=F.getSeconds(),lt=F.getUTCMilliseconds()*10+H;return A(U,W,q,X,lt)};function A(V,H,F,U,W){if((H||F||U||W)&&(V+=" "+_(H,2)+":"+_(F,2),(U||W)&&(V+=":"+_(U,2),W))){for(var q=4;W%10===0;)q-=1,W/=10;V+="."+_(W,q)}return V}Q.cleanDate=function(V,H,F){if(V===t)return H;if(Q.isJSDate(V)||typeof V=="number"&&isFinite(V)){if(v(F))return g.error("JS Dates and milliseconds are incompatible with world calendars",V),H;if(V=Q.ms2DateTimeLocal(+V),!V&&H!==void 0)return H}else if(!Q.isDateTime(V,F))return g.error("unrecognized date",V),H;return V};var h=/%\d?f/g,p=/%h/g,k={1:"1",2:"1",3:"2",4:"2"};function w(V,H,F,U){V=V.replace(h,function(q){var X=Math.min(+q.charAt(1)||6,6),lt=(H/1e3%1+2).toFixed(X).substr(2).replace(/0+$/,"")||"0";return lt});var W=new Date(Math.floor(H+.05));if(V=V.replace(p,function(){return k[F("%q")(W)]}),v(U))try{V=i.getComponentMethod("calendars","worldCalFmt")(V,H,U)}catch{return"Invalid"}return F(V)(W)}var R=[59,59.9,59.99,59.999,59.9999];function O(V,H){var F=P(V+.05,e),U=_(Math.floor(F/r),2)+":"+_(P(Math.floor(F/a),60),2);if(H!=="M"){c(H)||(H=0);var W=Math.min(P(V/n,60),R[H]),q=(100+W).toFixed(H).substr(1);H>0&&(q=q.replace(/0+$/,"").replace(/[\.]$/,"")),U+=":"+q}return U}Q.formatDate=function(V,H,F,U,W,q){if(W=v(W)&&W,!H)if(F==="y")H=q.year;else if(F==="m")H=q.month;else if(F==="d")H=q.dayMonth+` + */const Upt={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};ED._date.override({_id:"date-fns",formats:function(){return Upt},parse:function(d,s){if(d===null||typeof d>"u")return null;const E=typeof d;return E==="number"||d instanceof Date?d=Hu(d):E==="string"&&(typeof s=="string"?d=_pt(d,s,new Date,this.options):d=Apt(d,this.options)),YD(d)?d.getTime():null},format:function(d,s){return wdt(d,s,this.options)},add:function(d,s,E){switch(E){case"millisecond":return LM(d,s);case"second":return hft(d,s);case"minute":return uft(d,s);case"hour":return oft(d,s);case"day":return r6(d,s);case"week":return fft(d,s);case"month":return CM(d,s);case"quarter":return cft(d,s);case"year":return dft(d,s);default:return d}},diff:function(d,s,E){switch(E){case"millisecond":return PM(d,s);case"second":return bft(d,s);case"minute":return yft(d,s);case"hour":return vft(d,s);case"day":return KD(d,s);case"week":return wft(d,s);case"month":return QD(d,s);case"quarter":return _ft(d,s);case"year":return kft(d,s);default:return 0}},startOf:function(d,s,E){switch(s){case"second":return Tpt(d);case"minute":return kpt(d);case"hour":return wpt(d);case"day":return DA(d);case"week":return mg(d);case"isoWeek":return mg(d,{weekStartsOn:+E});case"month":return Aft(d);case"quarter":return Tft(d);case"year":return tF(d);default:return d}},endOf:function(d,s){switch(s){case"second":return Pft(d);case"minute":return Cft(d);case"hour":return Sft(d);case"day":return XD(d);case"week":return Eft(d);case"month":return JD(d);case"quarter":return Lft(d);case"year":return Mft(d);default:return d}}});var a4={exports:{}},Vpt=a4.exports,EI;function Hpt(){return EI||(EI=1,function(d){var s={};(function(E,B){d.exports?d.exports=B():E.moduleName=B()})(typeof self<"u"?self:Vpt,()=>{var E=(()=>{var B=Object.create,K=Object.defineProperty,pt=Object.defineProperties,_t=Object.getOwnPropertyDescriptor,Ot=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertyNames,te=Object.getOwnPropertySymbols,he=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,pr=(Q,Z,c)=>Z in Q?K(Q,Z,{enumerable:!0,configurable:!0,writable:!0,value:c}):Q[Z]=c,Mr=(Q,Z)=>{for(var c in Z||(Z={}))De.call(Z,c)&&pr(Q,c,Z[c]);if(te)for(var c of te(Z))er.call(Z,c)&&pr(Q,c,Z[c]);return Q},Tr=(Q,Z)=>pt(Q,Ot(Z)),Vr=(Q,Z)=>{var c={};for(var g in Q)De.call(Q,g)&&Z.indexOf(g)<0&&(c[g]=Q[g]);if(Q!=null&&te)for(var g of te(Q))Z.indexOf(g)<0&&er.call(Q,g)&&(c[g]=Q[g]);return c},mn=(Q,Z)=>()=>(Q&&(Z=Q(Q=0)),Z),Dt=(Q,Z)=>()=>(Z||Q((Z={exports:{}}).exports,Z),Z.exports),cn=(Q,Z)=>{for(var c in Z)K(Q,c,{get:Z[c],enumerable:!0})},Jn=(Q,Z,c,g)=>{if(Z&&typeof Z=="object"||typeof Z=="function")for(let I of jt(Z))!De.call(Q,I)&&I!==c&&K(Q,I,{get:()=>Z[I],enumerable:!(g=_t(Z,I))||g.enumerable});return Q},Bn=(Q,Z,c)=>(c=Q!=null?B(he(Q)):{},Jn(K(c,"default",{value:Q,enumerable:!0}),Q)),ni=Q=>Jn(K({},"__esModule",{value:!0}),Q),Wi=Dt(Q=>{Q.version="3.2.0"}),Un=Dt((Q,Z)=>{(function(c,g,I){g[c]=g[c]||I(),typeof Z<"u"&&Z.exports&&(Z.exports=g[c])})("Promise",typeof window<"u"?window:Q,function(){var c,g,I,S=Object.prototype.toString,t=typeof setImmediate<"u"?function(T){return setImmediate(T)}:setTimeout;try{Object.defineProperty({},"x",{}),c=function(T,u,b,_){return Object.defineProperty(T,u,{value:b,writable:!0,configurable:_!==!1})}}catch{c=function(u,b,_){return u[b]=_,u}}I=function(){var T,u,b;function _(P,M){this.fn=P,this.self=M,this.next=void 0}return{add:function(P,M){b=new _(P,M),u?u.next=b:T=b,u=b,b=void 0},drain:function(){var P=T;for(T=u=g=void 0;P;)P.fn.call(P.self),P=P.next}}}();function e(T,u){I.add(T,u),g||(g=t(I.drain))}function r(T){var u,b=typeof T;return T!=null&&(b=="object"||b=="function")&&(u=T.then),typeof u=="function"?u:!1}function a(){for(var T=0;T0&&e(a,b))}catch(_){i.call(new f(b),_)}}}function i(T){var u=this;u.triggered||(u.triggered=!0,u.def&&(u=u.def),u.msg=T,u.state=2,u.chain.length>0&&e(a,u))}function l(T,u,b,_){for(var P=0;P{(function(){var c={version:"3.8.2"},g=[].slice,I=function(At){return g.call(At)},S=self.document;function t(At){return At&&(At.ownerDocument||At.document||At).documentElement}function e(At){return At&&(At.ownerDocument&&At.ownerDocument.defaultView||At.document&&At||At.defaultView)}if(S)try{I(S.documentElement.childNodes)[0].nodeType}catch{I=function(Ut){for(var ue=Ut.length,Me=new Array(ue);ue--;)Me[ue]=Ut[ue];return Me}}if(Date.now||(Date.now=function(){return+new Date}),S)try{S.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,a=r.setAttribute,n=r.setAttributeNS,o=this.CSSStyleDeclaration.prototype,i=o.setProperty;r.setAttribute=function(Ut,ue){a.call(this,Ut,ue+"")},r.setAttributeNS=function(Ut,ue,Me){n.call(this,Ut,ue,Me+"")},o.setProperty=function(Ut,ue,Me){i.call(this,Ut,ue+"",Me)}}c.ascending=l;function l(At,Ut){return AtUt?1:At>=Ut?0:NaN}c.descending=function(At,Ut){return UtAt?1:Ut>=At?0:NaN},c.min=function(At,Ut){var ue=-1,Me=At.length,Pe,Ne;if(arguments.length===1){for(;++ue=Ne){Pe=Ne;break}for(;++ueNe&&(Pe=Ne)}else{for(;++ue=Ne){Pe=Ne;break}for(;++ueNe&&(Pe=Ne)}return Pe},c.max=function(At,Ut){var ue=-1,Me=At.length,Pe,Ne;if(arguments.length===1){for(;++ue=Ne){Pe=Ne;break}for(;++uePe&&(Pe=Ne)}else{for(;++ue=Ne){Pe=Ne;break}for(;++uePe&&(Pe=Ne)}return Pe},c.extent=function(At,Ut){var ue=-1,Me=At.length,Pe,Ne,sr;if(arguments.length===1){for(;++ue=Ne){Pe=sr=Ne;break}for(;++ueNe&&(Pe=Ne),sr=Ne){Pe=sr=Ne;break}for(;++ueNe&&(Pe=Ne),sr1)return sr/(Er-1)},c.deviation=function(){var At=c.variance.apply(this,arguments);return At&&Math.sqrt(At)};function y(At){return{left:function(Ut,ue,Me,Pe){for(arguments.length<3&&(Me=0),arguments.length<4&&(Pe=Ut.length);Me>>1;At(Ut[Ne],ue)<0?Me=Ne+1:Pe=Ne}return Me},right:function(Ut,ue,Me,Pe){for(arguments.length<3&&(Me=0),arguments.length<4&&(Pe=Ut.length);Me>>1;At(Ut[Ne],ue)>0?Pe=Ne:Me=Ne+1}return Me}}}var v=y(l);c.bisectLeft=v.left,c.bisect=c.bisectRight=v.right,c.bisector=function(At){return y(At.length===1?function(Ut,ue){return l(At(Ut),ue)}:At)},c.shuffle=function(At,Ut,ue){(Me=arguments.length)<3&&(ue=At.length,Me<2&&(Ut=0));for(var Me=ue-Ut,Pe,Ne;Me;)Ne=Math.random()*Me--|0,Pe=At[Me+Ut],At[Me+Ut]=At[Ne+Ut],At[Ne+Ut]=Pe;return At},c.permute=function(At,Ut){for(var ue=Ut.length,Me=new Array(ue);ue--;)Me[ue]=At[Ut[ue]];return Me},c.pairs=function(At){for(var Ut=0,ue=At.length-1,Me,Pe=At[0],Ne=new Array(ue<0?0:ue);Ut=0;)for(sr=At[Ut],ue=sr.length;--ue>=0;)Ne[--Pe]=sr[ue];return Ne};var u=Math.abs;c.range=function(At,Ut,ue){if(arguments.length<3&&(ue=1,arguments.length<2&&(Ut=At,At=0)),(Ut-At)/ue===1/0)throw new Error("infinite range");var Me=[],Pe=b(u(ue)),Ne=-1,sr;if(At*=Pe,Ut*=Pe,ue*=Pe,ue<0)for(;(sr=At+ue*++Ne)>Ut;)Me.push(sr/Pe);else for(;(sr=At+ue*++Ne)=Ut.length)return Pe?Pe.call(At,Er):Me?Er.sort(Me):Er;for(var Jr=-1,xn=Er.length,zn=Ut[rn++],On,Hi,Vn,yi=new P,Si;++Jr=Ut.length)return ar;var rn=[],Jr=ue[Er++];return ar.forEach(function(xn,zn){rn.push({key:xn,values:sr(zn,Er)})}),Jr?rn.sort(function(xn,zn){return Jr(xn.key,zn.key)}):rn}return At.map=function(ar,Er){return Ne(Er,ar,0)},At.entries=function(ar){return sr(Ne(c.map,ar,0),0)},At.key=function(ar){return Ut.push(ar),At},At.sortKeys=function(ar){return ue[Ut.length-1]=ar,At},At.sortValues=function(ar){return Me=ar,At},At.rollup=function(ar){return Pe=ar,At},At},c.set=function(At){var Ut=new j;if(At)for(var ue=0,Me=At.length;ue=0&&(Me=At.slice(ue+1),At=At.slice(0,ue)),At)return arguments.length<2?this[At].on(Me):this[At].on(Me,Ut);if(arguments.length===2){if(Ut==null)for(At in this)this.hasOwnProperty(At)&&this[At].on(Me,null);return this}};function J(At){var Ut=[],ue=new P;function Me(){for(var Pe=Ut,Ne=-1,sr=Pe.length,ar;++Ne=0&&(ue=At.slice(0,Ut))!=="xmlns"&&(At=At.slice(Ut+1)),kt.hasOwnProperty(ue)?{space:kt[ue],local:At}:At}},it.attr=function(At,Ut){if(arguments.length<2){if(typeof At=="string"){var ue=this.node();return At=c.ns.qualify(At),At.local?ue.getAttributeNS(At.space,At.local):ue.getAttribute(At)}for(Ut in At)this.each(It(Ut,At[Ut]));return this}return this.each(It(At,Ut))};function It(At,Ut){At=c.ns.qualify(At);function ue(){this.removeAttribute(At)}function Me(){this.removeAttributeNS(At.space,At.local)}function Pe(){this.setAttribute(At,Ut)}function Ne(){this.setAttributeNS(At.space,At.local,Ut)}function sr(){var Er=Ut.apply(this,arguments);Er==null?this.removeAttribute(At):this.setAttribute(At,Er)}function ar(){var Er=Ut.apply(this,arguments);Er==null?this.removeAttributeNS(At.space,At.local):this.setAttributeNS(At.space,At.local,Er)}return Ut==null?At.local?Me:ue:typeof Ut=="function"?At.local?ar:sr:At.local?Ne:Pe}function Pt(At){return At.trim().replace(/\s+/g," ")}it.classed=function(At,Ut){if(arguments.length<2){if(typeof At=="string"){var ue=this.node(),Me=(At=Wt(At)).length,Pe=-1;if(Ut=ue.classList){for(;++Pe=0;)(Ne=ue[Me])&&(Pe&&Pe!==Ne.nextSibling&&Pe.parentNode.insertBefore(Ne,Pe),Pe=Ne);return this},it.sort=function(At){At=ee.apply(this,arguments);for(var Ut=-1,ue=this.length;++Ut=Ut&&(Ut=Pe+1);!(Er=sr[Ut])&&++Ut0&&(At=At.slice(0,Pe));var sr=cr.get(At);sr&&(At=sr,Ne=jr);function ar(){var Jr=this[Me];Jr&&(this.removeEventListener(At,Jr,Jr.$),delete this[Me])}function Er(){var Jr=Ne(Ut,I(arguments));ar.call(this),this.addEventListener(At,this[Me]=Jr,Jr.$=ue),Jr._=Ut}function rn(){var Jr=new RegExp("^__on([^.]+)"+c.requote(At)+"$"),xn;for(var zn in this)if(xn=zn.match(Jr)){var On=this[zn];this.removeEventListener(xn[1],On,On.$),delete this[zn]}}return Pe?Ut?Er:ar:Ut?W:rn}var cr=c.map({mouseenter:"mouseover",mouseleave:"mouseout"});S&&cr.forEach(function(At){"on"+At in S&&cr.remove(At)});function ur(At,Ut){return function(ue){var Me=c.event;c.event=ue,Ut[0]=this.__data__;try{At.apply(this,Ut)}finally{c.event=Me}}}function jr(At,Ut){var ue=ur(At,Ut);return function(Me){var Pe=this,Ne=Me.relatedTarget;(!Ne||Ne!==Pe&&!(Ne.compareDocumentPosition(Pe)&8))&&ue.call(Pe,Me)}}var Wr,br=0;function Xr(At){var Ut=".dragsuppress-"+ ++br,ue="click"+Ut,Me=c.select(e(At)).on("touchmove"+Ut,lt).on("dragstart"+Ut,lt).on("selectstart"+Ut,lt);if(Wr==null&&(Wr="onselectstart"in At?!1:F(At.style,"userSelect")),Wr){var Pe=t(At).style,Ne=Pe[Wr];Pe[Wr]="none"}return function(sr){if(Me.on(Ut,null),Wr&&(Pe[Wr]=Ne),sr){var ar=function(){Me.on(ue,null)};Me.on(ue,function(){lt(),ar()},!0),setTimeout(ar,0)}}}c.mouse=function(At){return Le(At,yt())};var nn=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Le(At,Ut){Ut.changedTouches&&(Ut=Ut.changedTouches[0]);var ue=At.ownerSVGElement||At;if(ue.createSVGPoint){var Me=ue.createSVGPoint();if(nn<0){var Pe=e(At);if(Pe.scrollX||Pe.scrollY){ue=c.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ne=ue[0][0].getScreenCTM();nn=!(Ne.f||Ne.e),ue.remove()}}return nn?(Me.x=Ut.pageX,Me.y=Ut.pageY):(Me.x=Ut.clientX,Me.y=Ut.clientY),Me=Me.matrixTransform(At.getScreenCTM().inverse()),[Me.x,Me.y]}var sr=At.getBoundingClientRect();return[Ut.clientX-sr.left-At.clientLeft,Ut.clientY-sr.top-At.clientTop]}c.touch=function(At,Ut,ue){if(arguments.length<3&&(ue=Ut,Ut=yt().changedTouches),Ut){for(var Me=0,Pe=Ut.length,Ne;Me1?re:At<-1?-re:Math.asin(At)}function or(At){return((At=Math.exp(At))-1/At)/2}function Sr(At){return((At=Math.exp(At))+1/At)/2}function Ar(At){return((At=Math.exp(2*At))-1)/(At+1)}var mr=Math.SQRT2,Qr=2,Hn=4;c.interpolateZoom=function(At,Ut){var ue=At[0],Me=At[1],Pe=At[2],Ne=Ut[0],sr=Ut[1],ar=Ut[2],Er=Ne-ue,rn=sr-Me,Jr=Er*Er+rn*rn,xn,zn;if(Jr0&&(_o=_o.transition().duration(sr)),_o.call(Gi.event)}function Ro(){yi&&yi.domain(Vn.range().map(function(_o){return(_o-At.x)/At.k}).map(Vn.invert)),Ri&&Ri.domain(Si.range().map(function(_o){return(_o-At.y)/At.k}).map(Si.invert))}function Wo(_o){ar++||_o({type:"zoomstart"})}function ol(_o){Ro(),_o({type:"zoom",scale:At.k,translate:[At.x,At.y]})}function Go(_o){--ar||(_o({type:"zoomend"}),ue=null)}function vs(){var _o=this,Gs=Hi.of(_o,arguments),nl=0,uu=c.select(e(_o)).on(rn,jl).on(Jr,ru),Xl=Kn(c.mouse(_o)),rh=Xr(_o);Ui.call(_o),Wo(Gs);function jl(){nl=1,ao(c.mouse(_o),Xl),ol(Gs)}function ru(){uu.on(rn,null).on(Jr,null),rh(nl),Go(Gs)}}function Tl(){var _o=this,Gs=Hi.of(_o,arguments),nl={},uu=0,Xl,rh=".zoom-"+c.event.changedTouches[0].identifier,jl="touchmove"+rh,ru="touchend"+rh,wh=[],_e=c.select(_o),kr=Xr(_o);Dn(),Wo(Gs),_e.on(Er,null).on(zn,Dn);function Ir(){var yn=c.touches(_o);return Xl=At.k,yn.forEach(function(ai){ai.identifier in nl&&(nl[ai.identifier]=Kn(ai))}),yn}function Dn(){var yn=c.event.target;c.select(yn).on(jl,li).on(ru,ti),wh.push(yn);for(var ai=c.event.changedTouches,ta=0,$i=ai.length;ta<$i;++ta)nl[ai[ta].identifier]=null;var ya=Ir(),$a=Date.now();if(ya.length===1){if($a-On<500){var Na=ya[0];Po(_o,Na,nl[Na.identifier],Math.floor(Math.log(At.k)/Math.LN2)+1),lt()}On=$a}else if(ya.length>1){var Na=ya[0],ia=ya[1],Ai=Na[0]-ia[0],fn=Na[1]-ia[1];uu=Ai*Ai+fn*fn}}function li(){var yn=c.touches(_o),ai,ta,$i,ya;Ui.call(_o);for(var $a=0,Na=yn.length;$a1?1:Ut,ue=ue<0?0:ue>1?1:ue,Pe=ue<=.5?ue*(1+Ut):ue+Ut-ue*Ut,Me=2*ue-Pe;function Ne(ar){return ar>360?ar-=360:ar<0&&(ar+=360),ar<60?Me+(Pe-Me)*ar/60:ar<180?Pe:ar<240?Me+(Pe-Me)*(240-ar)/60:Me}function sr(ar){return Math.round(Ne(ar)*255)}return new za(sr(At+120),sr(At),sr(At-120))}c.hcl=We;function We(At,Ut,ue){return this instanceof We?(this.h=+At,this.c=+Ut,void(this.l=+ue)):arguments.length<2?At instanceof We?new We(At.h,At.c,At.l):At instanceof _r?Oi(At.l,At.a,At.b):Oi((At=Br((At=c.rgb(At)).r,At.g,At.b)).l,At.a,At.b):new We(At,Ut,ue)}var nr=We.prototype=new oi;nr.brighter=function(At){return new We(this.h,this.c,Math.min(100,this.l+tn*(arguments.length?At:1)))},nr.darker=function(At){return new We(this.h,this.c,Math.max(0,this.l-tn*(arguments.length?At:1)))},nr.rgb=function(){return fr(this.h,this.c,this.l).rgb()};function fr(At,Ut,ue){return isNaN(At)&&(At=0),isNaN(Ut)&&(Ut=0),new _r(ue,Math.cos(At*=le)*Ut,Math.sin(At)*Ut)}c.lab=_r;function _r(At,Ut,ue){return this instanceof _r?(this.l=+At,this.a=+Ut,void(this.b=+ue)):arguments.length<2?At instanceof _r?new _r(At.l,At.a,At.b):At instanceof We?fr(At.h,At.c,At.l):Br((At=za(At)).r,At.g,At.b):new _r(At,Ut,ue)}var tn=18,Cn=.95047,Tn=1,Mn=1.08883,fi=_r.prototype=new oi;fi.brighter=function(At){return new _r(Math.min(100,this.l+tn*(arguments.length?At:1)),this.a,this.b)},fi.darker=function(At){return new _r(Math.max(0,this.l-tn*(arguments.length?At:1)),this.a,this.b)},fi.rgb=function(){return ki(this.l,this.a,this.b)};function ki(At,Ut,ue){var Me=(At+16)/116,Pe=Me+Ut/500,Ne=Me-ue/200;return Pe=ji(Pe)*Cn,Me=ji(Me)*Tn,Ne=ji(Ne)*Mn,new za(ci(3.2404542*Pe-1.5371385*Me-.4985314*Ne),ci(-.969266*Pe+1.8760108*Me+.041556*Ne),ci(.0556434*Pe-.2040259*Me+1.0572252*Ne))}function Oi(At,Ut,ue){return At>0?new We(Math.atan2(ue,Ut)*we,Math.sqrt(Ut*Ut+ue*ue),At):new We(NaN,NaN,At)}function ji(At){return At>.206893034?At*At*At:(At-4/29)/7.787037}function Xi(At){return At>.008856?Math.pow(At,1/3):7.787037*At+4/29}function ci(At){return Math.round(255*(At<=.00304?12.92*At:1.055*Math.pow(At,1/2.4)-.055))}c.rgb=za;function za(At,Ut,ue){return this instanceof za?(this.r=~~At,this.g=~~Ut,void(this.b=~~ue)):arguments.length<2?At instanceof za?new za(At.r,At.g,At.b):$r(""+At,za,Zi):new za(At,Ut,ue)}function Wa(At){return new za(At>>16,At>>8&255,At&255)}function ze(At){return Wa(At)+""}var Ie=za.prototype=new oi;Ie.brighter=function(At){At=Math.pow(.7,arguments.length?At:1);var Ut=this.r,ue=this.g,Me=this.b,Pe=30;return!Ut&&!ue&&!Me?new za(Pe,Pe,Pe):(Ut&&Ut>4,Me=Me>>4|Me,Pe=Er&240,Pe=Pe>>4|Pe,Ne=Er&15,Ne=Ne<<4|Ne):At.length===7&&(Me=(Er&16711680)>>16,Pe=(Er&65280)>>8,Ne=Er&255)),Ut(Me,Pe,Ne))}function Gr(At,Ut,ue){var Me=Math.min(At/=255,Ut/=255,ue/=255),Pe=Math.max(At,Ut,ue),Ne=Pe-Me,sr,ar,Er=(Pe+Me)/2;return Ne?(ar=Er<.5?Ne/(Pe+Me):Ne/(2-Pe-Me),At==Pe?sr=(Ut-ue)/Ne+(Ut0&&Er<1?0:sr),new $n(sr,ar,Er)}function Br(At,Ut,ue){At=Yr(At),Ut=Yr(Ut),ue=Yr(ue);var Me=Xi((.4124564*At+.3575761*Ut+.1804375*ue)/Cn),Pe=Xi((.2126729*At+.7151522*Ut+.072175*ue)/Tn),Ne=Xi((.0193339*At+.119192*Ut+.9503041*ue)/Mn);return _r(116*Pe-16,500*(Me-Pe),200*(Pe-Ne))}function Yr(At){return(At/=255)<=.04045?At/12.92:Math.pow((At+.055)/1.055,2.4)}function pn(At){var Ut=parseFloat(At);return At.charAt(At.length-1)==="%"?Math.round(Ut*2.55):Ut}var on=c.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});on.forEach(function(At,Ut){on.set(At,Wa(Ut))});function Ce(At){return typeof At=="function"?At:function(){return At}}c.functor=Ce,c.xhr=dr(V);function dr(At){return function(Ut,ue,Me){return arguments.length===2&&typeof ue=="function"&&(Me=ue,ue=null),Hr(Ut,ue,At,Me)}}function Hr(At,Ut,ue,Me){var Pe={},Ne=c.dispatch("beforesend","progress","load","error"),sr={},ar=new XMLHttpRequest,Er=null;self.XDomainRequest&&!("withCredentials"in ar)&&/^(http(s)?:)?\/\//.test(At)&&(ar=new XDomainRequest),"onload"in ar?ar.onload=ar.onerror=rn:ar.onreadystatechange=function(){ar.readyState>3&&rn()};function rn(){var Jr=ar.status,xn;if(!Jr&&Fn(ar)||Jr>=200&&Jr<300||Jr===304){try{xn=ue.call(Pe,ar)}catch(zn){Ne.error.call(Pe,zn);return}Ne.load.call(Pe,xn)}else Ne.error.call(Pe,ar)}return ar.onprogress=function(Jr){var xn=c.event;c.event=Jr;try{Ne.progress.call(Pe,ar)}finally{c.event=xn}},Pe.header=function(Jr,xn){return Jr=(Jr+"").toLowerCase(),arguments.length<2?sr[Jr]:(xn==null?delete sr[Jr]:sr[Jr]=xn+"",Pe)},Pe.mimeType=function(Jr){return arguments.length?(Ut=Jr==null?null:Jr+"",Pe):Ut},Pe.responseType=function(Jr){return arguments.length?(Er=Jr,Pe):Er},Pe.response=function(Jr){return ue=Jr,Pe},["get","post"].forEach(function(Jr){Pe[Jr]=function(){return Pe.send.apply(Pe,[Jr].concat(I(arguments)))}}),Pe.send=function(Jr,xn,zn){if(arguments.length===2&&typeof xn=="function"&&(zn=xn,xn=null),ar.open(Jr,At,!0),Ut!=null&&!("accept"in sr)&&(sr.accept=Ut+",*/*"),ar.setRequestHeader)for(var On in sr)ar.setRequestHeader(On,sr[On]);return Ut!=null&&ar.overrideMimeType&&ar.overrideMimeType(Ut),Er!=null&&(ar.responseType=Er),zn!=null&&Pe.on("error",zn).on("load",function(Hi){zn(null,Hi)}),Ne.beforesend.call(Pe,ar),ar.send(xn??null),Pe},Pe.abort=function(){return ar.abort(),Pe},c.rebind(Pe,Ne,"on"),Me==null?Pe:Pe.get(_n(Me))}function _n(At){return At.length===1?function(Ut,ue){At(Ut==null?ue:null)}:At}function Fn(At){var Ut=At.responseType;return Ut&&Ut!=="text"?At.response:At.responseText}c.dsv=function(At,Ut){var ue=new RegExp('["'+At+` +]`),Me=At.charCodeAt(0);function Pe(rn,Jr,xn){arguments.length<3&&(xn=Jr,Jr=null);var zn=Hr(rn,Ut,Jr==null?Ne:sr(Jr),xn);return zn.row=function(On){return arguments.length?zn.response((Jr=On)==null?Ne:sr(On)):Jr},zn}function Ne(rn){return Pe.parse(rn.responseText)}function sr(rn){return function(Jr){return Pe.parse(Jr.responseText,rn)}}Pe.parse=function(rn,Jr){var xn;return Pe.parseRows(rn,function(zn,On){if(xn)return xn(zn,On-1);var Hi=function(Vn){for(var yi={},Si=zn.length,Ri=0;Ri=Hi)return zn;if(Ri)return Ri=!1,xn;var Ua=Vn;if(rn.charCodeAt(Ua)===34){for(var Ha=Ua;Ha++24?(isFinite(Ut)&&(clearTimeout(Zn),Zn=setTimeout(Qa,Ut)),En=0):(En=1,La(Qa))}c.timer.flush=function(){Ja(),Do()};function Ja(){for(var At=Date.now(),Ut=Qn;Ut;)At>=Ut.t&&Ut.c(At-Ut.t)&&(Ut.c=null),Ut=Ut.n;return At}function Do(){for(var At,Ut=Qn,ue=1/0;Ut;)Ut.c?(Ut.t=0;--ar)Vn.push(Pe[rn[xn[ar]][2]]);for(ar=+On;ar1&&Ue(At[ue[Me-2]],At[ue[Me-1]],At[Pe])<=0;)--Me;ue[Me++]=Pe}return ue.slice(0,Me)}function ys(At,Ut){return At[0]-Ut[0]||At[1]-Ut[1]}c.geom.polygon=function(At){return tt(At,os),At};var os=c.geom.polygon.prototype=[];os.area=function(){for(var At=-1,Ut=this.length,ue,Me=this[Ut-1],Pe=0;++Atne)ar=ar.L;else if(sr=Ut-fo(ar,ue),sr>ne){if(!ar.R){Me=ar;break}ar=ar.R}else{Ne>-ne?(Me=ar.P,Pe=ar):sr>-ne?(Me=ar,Pe=ar.N):Me=Pe=ar;break}var Er=kl(At);if(Qs.insert(Me,Er),!(!Me&&!Pe)){if(Me===Pe){Cl(Me),Pe=kl(Me.site),Qs.insert(Er,Pe),Er.edge=Pe.edge=ou(Me.site,Er.site),al(Me),al(Pe);return}if(!Pe){Er.edge=ou(Me.site,Er.site);return}Cl(Me),Cl(Pe);var rn=Me.site,Jr=rn.x,xn=rn.y,zn=At.x-Jr,On=At.y-xn,Hi=Pe.site,Vn=Hi.x-Jr,yi=Hi.y-xn,Si=2*(zn*yi-On*Vn),Ri=zn*zn+On*On,Gi=Vn*Vn+yi*yi,Kn={x:(yi*Ri-On*Gi)/Si+Jr,y:(zn*Gi-Vn*Ri)/Si+xn};ts(Pe.edge,rn,Hi,Kn),Er.edge=ou(rn,At,null,Kn),Pe.edge=ou(At,Hi,null,Kn),al(Me),al(Pe)}}function Pa(At,Ut){var ue=At.site,Me=ue.x,Pe=ue.y,Ne=Pe-Ut;if(!Ne)return Me;var sr=At.P;if(!sr)return-1/0;ue=sr.site;var ar=ue.x,Er=ue.y,rn=Er-Ut;if(!rn)return ar;var Jr=ar-Me,xn=1/Ne-1/rn,zn=Jr/rn;return xn?(-zn+Math.sqrt(zn*zn-2*xn*(Jr*Jr/(-2*rn)-Er+rn/2+Pe-Ne/2)))/xn+Me:(Me+ar)/2}function fo(At,Ut){var ue=At.N;if(ue)return Pa(ue,Ut);var Me=At.site;return Me.y===Ut?Me.x:1/0}function qs(At){this.site=At,this.edges=[]}qs.prototype.prepare=function(){for(var At=this.edges,Ut=At.length,ue;Ut--;)ue=At[Ut].edge,(!ue.b||!ue.a)&&At.splice(Ut,1);return At.sort(Xo),At.length};function Ql(At){for(var Ut=At[0][0],ue=At[1][0],Me=At[0][1],Pe=At[1][1],Ne,sr,ar,Er,rn=cl,Jr=rn.length,xn,zn,On,Hi,Vn,yi;Jr--;)if(xn=rn[Jr],!(!xn||!xn.prepare()))for(On=xn.edges,Hi=On.length,zn=0;znne||u(Er-sr)>ne)&&(On.splice(zn,0,new Su(hl(xn.site,yi,u(ar-Ut)ne?{x:Ut,y:u(Ne-Ut)ne?{x:u(sr-Pe)ne?{x:ue,y:u(Ne-ue)ne?{x:u(sr-Me)=-Ct)){var On=Er*Er+rn*rn,Hi=Jr*Jr+xn*xn,Vn=(xn*On-rn*Hi)/zn,yi=(Er*Hi-Jr*On)/zn,xn=yi+ar,Si=Lo.pop()||new Gl;Si.arc=At,Si.site=Pe,Si.x=Vn+sr,Si.y=xn+Math.sqrt(Vn*Vn+yi*yi),Si.cy=xn,At.circle=Si;for(var Ri=null,Gi=Ps._;Gi;)if(Si.y0)){if(Vn/=On,On<0){if(Vn0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}if(Vn=ue-ar,!(!On&&Vn<0)){if(Vn/=On,On<0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}else if(On>0){if(Vn0)){if(Vn/=Hi,Hi<0){if(Vn0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}if(Vn=Me-Er,!(!Hi&&Vn<0)){if(Vn/=Hi,Hi<0){if(Vn>zn)return;Vn>xn&&(xn=Vn)}else if(Hi>0){if(Vn0&&(Pe.a={x:ar+xn*On,y:Er+xn*Hi}),zn<1&&(Pe.b={x:ar+zn*On,y:Er+zn*Hi}),Pe}}}}}}function lo(At){for(var Ut=ss,ue=Ru(At[0][0],At[0][1],At[1][0],At[1][1]),Me=Ut.length,Pe;Me--;)Pe=Ut[Me],(!Ms(Pe,At)||!ue(Pe)||u(Pe.a.x-Pe.b.x)=Ne)return;if(Jr>zn){if(!Me)Me={x:Hi,y:sr};else if(Me.y>=ar)return;ue={x:Hi,y:ar}}else{if(!Me)Me={x:Hi,y:ar};else if(Me.y1)if(Jr>zn){if(!Me)Me={x:(sr-Si)/yi,y:sr};else if(Me.y>=ar)return;ue={x:(ar-Si)/yi,y:ar}}else{if(!Me)Me={x:(ar-Si)/yi,y:ar};else if(Me.y=Ne)return;ue={x:Ne,y:yi*Ne+Si}}else{if(!Me)Me={x:Ne,y:yi*Ne+Si};else if(Me.x=Jr&&Si.x<=zn&&Si.y>=xn&&Si.y<=On?[[Jr,On],[zn,On],[zn,xn],[Jr,xn]]:[];Ri.point=Er[Vn]}),rn}function ar(Er){return Er.map(function(rn,Jr){return{x:Math.round(Me(rn,Jr)/ne)*ne,y:Math.round(Pe(rn,Jr)/ne)*ne,i:Jr}})}return sr.links=function(Er){return ac(ar(Er)).edges.filter(function(rn){return rn.l&&rn.r}).map(function(rn){return{source:Er[rn.l.i],target:Er[rn.r.i]}})},sr.triangles=function(Er){var rn=[];return ac(ar(Er)).cells.forEach(function(Jr,xn){for(var zn=Jr.site,On=Jr.edges.sort(Xo),Hi=-1,Vn=On.length,yi,Si,Ri=On[Vn-1].edge,Gi=Ri.l===zn?Ri.r:Ri.l;++HiGi&&(Gi=Jr.x),Jr.y>Kn&&(Kn=Jr.y),On.push(Jr.x),Hi.push(Jr.y);else for(Vn=0;VnGi&&(Gi=Ua),Ha>Kn&&(Kn=Ha),On.push(Ua),Hi.push(Ha)}var ao=Gi-Si,Po=Kn-Ri;ao>Po?Kn=Ri+ao:Gi=Si+Po;function Ro(Go,vs,Tl,Ku,du,_o,Gs,nl){if(!(isNaN(Tl)||isNaN(Ku)))if(Go.leaf){var uu=Go.x,Xl=Go.y;if(uu!=null)if(u(uu-Tl)+u(Xl-Ku)<.01)Wo(Go,vs,Tl,Ku,du,_o,Gs,nl);else{var rh=Go.point;Go.x=Go.y=Go.point=null,Wo(Go,rh,uu,Xl,du,_o,Gs,nl),Wo(Go,vs,Tl,Ku,du,_o,Gs,nl)}else Go.x=Tl,Go.y=Ku,Go.point=vs}else Wo(Go,vs,Tl,Ku,du,_o,Gs,nl)}function Wo(Go,vs,Tl,Ku,du,_o,Gs,nl){var uu=(du+Gs)*.5,Xl=(_o+nl)*.5,rh=Tl>=uu,jl=Ku>=Xl,ru=jl<<1|rh;Go.leaf=!1,Go=Go.nodes[ru]||(Go.nodes[ru]=Fl()),rh?du=uu:Gs=uu,jl?_o=Xl:nl=Xl,Ro(Go,vs,Tl,Ku,du,_o,Gs,nl)}var ol=Fl();if(ol.add=function(Go){Ro(ol,Go,+xn(Go,++Vn),+zn(Go,Vn),Si,Ri,Gi,Kn)},ol.visit=function(Go){Bc(Go,ol,Si,Ri,Gi,Kn)},ol.find=function(Go){return Nf(ol,Go[0],Go[1],Si,Ri,Gi,Kn)},Vn=-1,Ut==null){for(;++VnNe||zn>sr||On=Ua,Po=ue>=Ha,Ro=Po<<1|ao,Wo=Ro+4;Roue&&(Ne=Ut.slice(ue,Ne),ar[sr]?ar[sr]+=Ne:ar[++sr]=Ne),(Me=Me[0])===(Pe=Pe[0])?ar[sr]?ar[sr]+=Pe:ar[++sr]=Pe:(ar[++sr]=null,Er.push({i:sr,x:fc(Me,Pe)})),ue=sc.lastIndex;return ue=0&&!(Me=c.interpolators[ue](At,Ut)););return Me}c.interpolators=[function(At,Ut){var ue=typeof Ut;return(ue==="string"?on.has(Ut.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ut)?hc:oh:Ut instanceof oi?hc:Array.isArray(Ut)?Yl:ue==="object"&&isNaN(Ut)?oc:fc)(At,Ut)}],c.interpolateArray=Yl;function Yl(At,Ut){var ue=[],Me=[],Pe=At.length,Ne=Ut.length,sr=Math.min(At.length,Ut.length),ar;for(ar=0;ar=0?At.slice(0,Ut):At,Me=Ut>=0?At.slice(Ut+1):"in";return ue=Cc.get(ue)||Sh,Me=Uh.get(Me)||V,_u(Me(ue.apply(null,g.call(arguments,1))))};function _u(At){return function(Ut){return Ut<=0?0:Ut>=1?1:At(Ut)}}function Ed(At){return function(Ut){return 1-At(1-Ut)}}function tl(At){return function(Ut){return .5*(Ut<.5?At(2*Ut):2-At(2-2*Ut))}}function Vd(At){return At*At}function Ll(At){return At*At*At}function Qo(At){if(At<=0)return 0;if(At>=1)return 1;var Ut=At*At,ue=Ut*At;return 4*(At<.5?ue:3*(At-Ut)+ue-.75)}function lf(At){return function(Ut){return Math.pow(Ut,At)}}function sh(At){return 1-Math.cos(At*re)}function rc(At){return Math.pow(2,10*(At-1))}function jf(At){return 1-Math.sqrt(1-At*At)}function Vh(At,Ut){var ue;return arguments.length<2&&(Ut=.45),arguments.length?ue=Ut/St*Math.asin(1/At):(At=1,ue=Ut/4),function(Me){return 1+At*Math.pow(2,-10*Me)*Math.sin((Me-ue)*St/Ut)}}function yf(At){return At||(At=1.70158),function(Ut){return Ut*Ut*((At+1)*Ut-At)}}function lc(At){return At<1/2.75?7.5625*At*At:At<2/2.75?7.5625*(At-=1.5/2.75)*At+.75:At<2.5/2.75?7.5625*(At-=2.25/2.75)*At+.9375:7.5625*(At-=2.625/2.75)*At+.984375}c.interpolateHcl=hd;function hd(At,Ut){At=c.hcl(At),Ut=c.hcl(Ut);var ue=At.h,Me=At.c,Pe=At.l,Ne=Ut.h-ue,sr=Ut.c-Me,ar=Ut.l-Pe;return isNaN(sr)&&(sr=0,Me=isNaN(Me)?Ut.c:Me),isNaN(Ne)?(Ne=0,ue=isNaN(ue)?Ut.h:ue):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(Er){return fr(ue+Ne*Er,Me+sr*Er,Pe+ar*Er)+""}}c.interpolateHsl=Zf;function Zf(At,Ut){At=c.hsl(At),Ut=c.hsl(Ut);var ue=At.h,Me=At.s,Pe=At.l,Ne=Ut.h-ue,sr=Ut.s-Me,ar=Ut.l-Pe;return isNaN(sr)&&(sr=0,Me=isNaN(Me)?Ut.s:Me),isNaN(Ne)?(Ne=0,ue=isNaN(ue)?Ut.h:ue):Ne>180?Ne-=360:Ne<-180&&(Ne+=360),function(Er){return Zi(ue+Ne*Er,Me+sr*Er,Pe+ar*Er)+""}}c.interpolateLab=xf;function xf(At,Ut){At=c.lab(At),Ut=c.lab(Ut);var ue=At.l,Me=At.a,Pe=At.b,Ne=Ut.l-ue,sr=Ut.a-Me,ar=Ut.b-Pe;return function(Er){return ki(ue+Ne*Er,Me+sr*Er,Pe+ar*Er)+""}}c.interpolateRound=Hh;function Hh(At,Ut){return Ut-=At,function(ue){return Math.round(At+Ut*ue)}}c.transform=function(At){var Ut=S.createElementNS(c.ns.prefix.svg,"g");return(c.transform=function(ue){if(ue!=null){Ut.setAttribute("transform",ue);var Me=Ut.transform.baseVal.consolidate()}return new Uf(Me?Me.matrix:Eh)})(At)};function Uf(At){var Ut=[At.a,At.b],ue=[At.c,At.d],Me=lh(Ut),Pe=Vf(Ut,ue),Ne=lh(Gf(ue,Ut,-Pe))||0;Ut[0]*ue[1]180?Ut+=360:Ut-At>180&&(At+=360),Me.push({i:ue.push(gh(ue)+"rotate(",null,")")-2,x:fc(At,Ut)})):Ut&&ue.push(gh(ue)+"rotate("+Ut+")")}function Hf(At,Ut,ue,Me){At!==Ut?Me.push({i:ue.push(gh(ue)+"skewX(",null,")")-2,x:fc(At,Ut)}):Ut&&ue.push(gh(ue)+"skewX("+Ut+")")}function eu(At,Ut,ue,Me){if(At[0]!==Ut[0]||At[1]!==Ut[1]){var Pe=ue.push(gh(ue)+"scale(",null,",",null,")");Me.push({i:Pe-4,x:fc(At[0],Ut[0])},{i:Pe-2,x:fc(At[1],Ut[1])})}else(Ut[0]!==1||Ut[1]!==1)&&ue.push(gh(ue)+"scale("+Ut+")")}function Ef(At,Ut){var ue=[],Me=[];return At=c.transform(At),Ut=c.transform(Ut),uc(At.translate,Ut.translate,ue,Me),rf(At.rotate,Ut.rotate,ue,Me),Hf(At.skew,Ut.skew,ue,Me),eu(At.scale,Ut.scale,ue,Me),At=Ut=null,function(Pe){for(var Ne=-1,sr=Me.length,ar;++Ne0?Ne=Kn:(ue.c=null,ue.t=NaN,ue=null,Ut.end({type:"end",alpha:Ne=0})):Kn>0&&(Ut.start({type:"start",alpha:Ne=Kn}),ue=Vi(At.tick)),At):Ne},At.start=function(){var Kn,Ua=On.length,Ha=Hi.length,ao=Me[0],Po=Me[1],Ro,Wo;for(Kn=0;Kn=0;)Ne.push(Jr=rn[Er]),Jr.parent=ar,Jr.depth=ar.depth+1;ue&&(ar.value=0),ar.children=rn}else ue&&(ar.value=+ue.call(Me,ar,ar.depth)||0),delete ar.children;return vh(Pe,function(xn){var zn,On;At&&(zn=xn.children)&&zn.sort(At),ue&&(On=xn.parent)&&(On.value+=xn.value)}),sr}return Me.sort=function(Pe){return arguments.length?(At=Pe,Me):At},Me.children=function(Pe){return arguments.length?(Ut=Pe,Me):Ut},Me.value=function(Pe){return arguments.length?(ue=Pe,Me):ue},Me.revalue=function(Pe){return ue&&(uf(Pe,function(Ne){Ne.children&&(Ne.value=0)}),vh(Pe,function(Ne){var sr;Ne.children||(Ne.value=+ue.call(Me,Ne,Ne.depth)||0),(sr=Ne.parent)&&(sr.value+=Ne.value)})),Pe},Me};function bu(At,Ut){return c.rebind(At,Ut,"sort","children","value"),At.nodes=At,At.links=Jd,At}function uf(At,Ut){for(var ue=[At];(At=ue.pop())!=null;)if(Ut(At),(Pe=At.children)&&(Me=Pe.length))for(var Me,Pe;--Me>=0;)ue.push(Pe[Me])}function vh(At,Ut){for(var ue=[At],Me=[];(At=ue.pop())!=null;)if(Me.push(At),(sr=At.children)&&(Ne=sr.length))for(var Pe=-1,Ne,sr;++PePe&&(Pe=ar),Me.push(ar)}for(sr=0;srMe&&(ue=Ut,Me=Pe);return ue}function Lh(At){return At.reduce(Vc,0)}function Vc(At,Ut){return At+Ut[1]}c.layout.histogram=function(){var At=!0,Ut=Number,ue=bf,Me=fd;function Pe(Ne,sr){for(var ar=[],Er=Ne.map(Ut,this),rn=ue.call(this,Er,sr),Jr=Me.call(this,rn,Er,sr),xn,sr=-1,zn=Er.length,On=Jr.length-1,Hi=At?1:1/zn,Vn;++sr0)for(sr=-1;++sr=rn[0]&&Vn<=rn[1]&&(xn=ar[c.bisect(Jr,Vn,1,On)-1],xn.y+=Hi,xn.push(Ne[sr]));return ar}return Pe.value=function(Ne){return arguments.length?(Ut=Ne,Pe):Ut},Pe.range=function(Ne){return arguments.length?(ue=Ce(Ne),Pe):ue},Pe.bins=function(Ne){return arguments.length?(Me=typeof Ne=="number"?function(sr){return yu(sr,Ne)}:Ce(Ne),Pe):Me},Pe.frequency=function(Ne){return arguments.length?(At=!!Ne,Pe):At},Pe};function fd(At,Ut){return yu(At,Math.ceil(Math.log(Ut.length)/Math.LN2+1))}function yu(At,Ut){for(var ue=-1,Me=+At[0],Pe=(At[1]-Me)/Ut,Ne=[];++ue<=Ut;)Ne[ue]=Pe*ue+Me;return Ne}function bf(At){return[c.min(At),c.max(At)]}c.layout.pack=function(){var At=c.layout.hierarchy().sort($h),Ut=0,ue=[1,1],Me;function Pe(Ne,sr){var ar=At.call(this,Ne,sr),Er=ar[0],rn=ue[0],Jr=ue[1],xn=Me==null?Math.sqrt:typeof Me=="function"?Me:function(){return Me};if(Er.x=Er.y=0,vh(Er,function(On){On.r=+xn(On.value)}),vh(Er,wf),Ut){var zn=Ut*(Me?1:Math.max(2*Er.r/rn,2*Er.r/Jr))/2;vh(Er,function(On){On.r+=zn}),vh(Er,wf),vh(Er,function(On){On.r-=zn})}return Jf(Er,rn/2,Jr/2,Me?1:1/Math.max(2*Er.r/rn,2*Er.r/Jr)),ar}return Pe.size=function(Ne){return arguments.length?(ue=Ne,Pe):ue},Pe.radius=function(Ne){return arguments.length?(Me=Ne==null||typeof Ne=="function"?Ne:+Ne,Pe):Me},Pe.padding=function(Ne){return arguments.length?(Ut=+Ne,Pe):Ut},bu(Pe,At)};function $h(At,Ut){return At.value-Ut.value}function th(At,Ut){var ue=At._pack_next;At._pack_next=Ut,Ut._pack_prev=At,Ut._pack_next=ue,ue._pack_prev=Ut}function nf(At,Ut){At._pack_next=Ut,Ut._pack_prev=At}function Zh(At,Ut){var ue=Ut.x-At.x,Me=Ut.y-At.y,Pe=At.r+Ut.r;return .999*Pe*Pe>ue*ue+Me*Me}function wf(At){if(!(Ut=At.children)||!(zn=Ut.length))return;var Ut,ue=1/0,Me=-1/0,Pe=1/0,Ne=-1/0,sr,ar,Er,rn,Jr,xn,zn;function On(Kn){ue=Math.min(Kn.x-Kn.r,ue),Me=Math.max(Kn.x+Kn.r,Me),Pe=Math.min(Kn.y-Kn.r,Pe),Ne=Math.max(Kn.y+Kn.r,Ne)}if(Ut.forEach(Pd),sr=Ut[0],sr.x=-sr.r,sr.y=0,On(sr),zn>1&&(ar=Ut[1],ar.x=ar.r,ar.y=0,On(ar),zn>2))for(Er=Ut[2],eh(sr,ar,Er),On(Er),th(sr,Er),sr._pack_prev=Er,th(Er,ar),ar=sr._pack_next,rn=3;rnyi.x&&(yi=Ua),Ua.depth>Si.depth&&(Si=Ua)});var Ri=Ut(Vn,yi)/2-Vn.x,Gi=ue[0]/(yi.x+Ut(yi,Vn)/2+Ri),Kn=ue[1]/(Si.depth||1);uf(On,function(Ua){Ua.x=(Ua.x+Ri)*Gi,Ua.y=Ua.depth*Kn})}return zn}function Ne(Jr){for(var xn={A:null,children:[Jr]},zn=[xn],On;(On=zn.pop())!=null;)for(var Hi=On.children,Vn,yi=0,Si=Hi.length;yi0&&(iu(df(Vn,Jr,zn),Jr,Ua),Si+=Ua,Ri+=Ua),Gi+=Vn.m,Si+=On.m,Kn+=yi.m,Ri+=Hi.m;Vn&&!Bu(Hi)&&(Hi.t=Vn,Hi.m+=Gi-Ri),On&&!xh(yi)&&(yi.t=On,yi.m+=Si-Kn,zn=Jr)}return zn}function rn(Jr){Jr.x*=ue[0],Jr.y=Jr.depth*ue[1]}return Pe.separation=function(Jr){return arguments.length?(Ut=Jr,Pe):Ut},Pe.size=function(Jr){return arguments.length?(Me=(ue=Jr)==null?rn:null,Pe):Me?null:ue},Pe.nodeSize=function(Jr){return arguments.length?(Me=(ue=Jr)==null?null:rn,Pe):Me?ue:null},bu(Pe,At)};function Ph(At,Ut){return At.parent==Ut.parent?1:2}function xh(At){var Ut=At.children;return Ut.length?Ut[0]:At.t}function Bu(At){var Ut=At.children,ue;return(ue=Ut.length)?Ut[ue-1]:At.t}function iu(At,Ut,ue){var Me=ue/(Ut.i-At.i);Ut.c-=Me,Ut.s+=ue,At.c+=Me,Ut.z+=ue,Ut.m+=ue}function _h(At){for(var Ut=0,ue=0,Me=At.children,Pe=Me.length,Ne;--Pe>=0;)Ne=Me[Pe],Ne.z+=Ut,Ne.m+=Ut,Ut+=Ne.s+(ue+=Ne.c)}function df(At,Ut,ue){return At.a.parent===Ut.parent?At.a:ue}c.layout.cluster=function(){var At=c.layout.hierarchy().sort(null).value(null),Ut=Ph,ue=[1,1],Me=!1;function Pe(Ne,sr){var ar=At.call(this,Ne,sr),Er=ar[0],rn,Jr=0;vh(Er,function(Vn){var yi=Vn.children;yi&&yi.length?(Vn.x=Wf(yi),Vn.y=bh(yi)):(Vn.x=rn?Jr+=Ut(Vn,rn):0,Vn.y=0,rn=Vn)});var xn=gr(Er),zn=Ur(Er),On=xn.x-Ut(xn,zn)/2,Hi=zn.x+Ut(zn,xn)/2;return vh(Er,Me?function(Vn){Vn.x=(Vn.x-Er.x)*ue[0],Vn.y=(Er.y-Vn.y)*ue[1]}:function(Vn){Vn.x=(Vn.x-On)/(Hi-On)*ue[0],Vn.y=(1-(Er.y?Vn.y/Er.y:1))*ue[1]}),ar}return Pe.separation=function(Ne){return arguments.length?(Ut=Ne,Pe):Ut},Pe.size=function(Ne){return arguments.length?(Me=(ue=Ne)==null,Pe):Me?null:ue},Pe.nodeSize=function(Ne){return arguments.length?(Me=(ue=Ne)!=null,Pe):Me?ue:null},bu(Pe,At)};function bh(At){return 1+c.max(At,function(Ut){return Ut.y})}function Wf(At){return At.reduce(function(Ut,ue){return Ut+ue.x},0)/At.length}function gr(At){var Ut=At.children;return Ut&&Ut.length?gr(Ut[0]):At}function Ur(At){var Ut=At.children,ue;return Ut&&(ue=Ut.length)?Ur(Ut[ue-1]):At}c.layout.treemap=function(){var At=c.layout.hierarchy(),Ut=Math.round,ue=[1,1],Me=null,Pe=wn,Ne=!1,sr,ar="squarify",Er=.5*(1+Math.sqrt(5));function rn(Vn,yi){for(var Si=-1,Ri=Vn.length,Gi,Kn;++Si0;)Ri.push(Kn=Gi[Po-1]),Ri.area+=Kn.area,ar!=="squarify"||(Ha=zn(Ri,ao))<=Ua?(Gi.pop(),Ua=Ha):(Ri.area-=Ri.pop().area,On(Ri,ao,Si,!1),ao=Math.min(Si.dx,Si.dy),Ri.length=Ri.area=0,Ua=1/0);Ri.length&&(On(Ri,ao,Si,!0),Ri.length=Ri.area=0),yi.forEach(Jr)}}function xn(Vn){var yi=Vn.children;if(yi&&yi.length){var Si=Pe(Vn),Ri=yi.slice(),Gi,Kn=[];for(rn(Ri,Si.dx*Si.dy/Vn.value),Kn.area=0;Gi=Ri.pop();)Kn.push(Gi),Kn.area+=Gi.area,Gi.z!=null&&(On(Kn,Gi.z?Si.dx:Si.dy,Si,!Ri.length),Kn.length=Kn.area=0);yi.forEach(xn)}}function zn(Vn,yi){for(var Si=Vn.area,Ri,Gi=0,Kn=1/0,Ua=-1,Ha=Vn.length;++UaGi&&(Gi=Ri));return Si*=Si,yi*=yi,Si?Math.max(yi*Gi*Er/Si,Si/(yi*Kn*Er)):1/0}function On(Vn,yi,Si,Ri){var Gi=-1,Kn=Vn.length,Ua=Si.x,Ha=Si.y,ao=yi?Ut(Vn.area/yi):0,Po;if(yi==Si.dx){for((Ri||ao>Si.dy)&&(ao=Si.dy);++GiSi.dx)&&(ao=Si.dx);++Gi1);return At+Ut*Me*Math.sqrt(-2*Math.log(Ne)/Ne)}},logNormal:function(){var At=c.random.normal.apply(c,arguments);return function(){return Math.exp(At())}},bates:function(At){var Ut=c.random.irwinHall(At);return function(){return Ut()/At}},irwinHall:function(At){return function(){for(var Ut=0,ue=0;ue2?ca:aa,rn=Me?Yf:Cd;return Pe=Er(At,Ut,rn,ue),Ne=Er(Ut,At,rn,rl),ar}function ar(Er){return Pe(Er)}return ar.invert=function(Er){return Ne(Er)},ar.domain=function(Er){return arguments.length?(At=Er.map(Number),sr()):At},ar.range=function(Er){return arguments.length?(Ut=Er,sr()):Ut},ar.rangeRound=function(Er){return ar.range(Er).interpolate(Hh)},ar.clamp=function(Er){return arguments.length?(Me=Er,sr()):Me},ar.interpolate=function(Er){return arguments.length?(ue=Er,sr()):ue},ar.ticks=function(Er){return ns(At,Er)},ar.tickFormat=function(Er,rn){return d3_scale_linearTickFormat(At,Er,rn)},ar.nice=function(Er){return na(At,Er),sr()},ar.copy=function(){return Oa(At,Ut,ue,Me)},sr()}function ka(At,Ut){return c.rebind(At,Ut,"range","rangeRound","interpolate","clamp")}function na(At,Ut){return va(At,Ba(io(At,Ut)[2])),va(At,Ba(io(At,Ut)[2])),At}function io(At,Ut){Ut==null&&(Ut=10);var ue=qn(At),Me=ue[1]-ue[0],Pe=Math.pow(10,Math.floor(Math.log(Me/Ut)/Math.LN10)),Ne=Ut/Me*Pe;return Ne<=.15?Pe*=10:Ne<=.35?Pe*=5:Ne<=.75&&(Pe*=2),ue[0]=Math.ceil(ue[0]/Pe)*Pe,ue[1]=Math.floor(ue[1]/Pe)*Pe+Pe*.5,ue[2]=Pe,ue}function ns(At,Ut){return c.range.apply(c,io(At,Ut))}c.scale.log=function(){return Ko(c.scale.linear().domain([0,1]),10,!0,[1,10])};function Ko(At,Ut,ue,Me){function Pe(ar){return(ue?Math.log(ar<0?0:ar):-Math.log(ar>0?0:-ar))/Math.log(Ut)}function Ne(ar){return ue?Math.pow(Ut,ar):-Math.pow(Ut,-ar)}function sr(ar){return At(Pe(ar))}return sr.invert=function(ar){return Ne(At.invert(ar))},sr.domain=function(ar){return arguments.length?(ue=ar[0]>=0,At.domain((Me=ar.map(Number)).map(Pe)),sr):Me},sr.base=function(ar){return arguments.length?(Ut=+ar,At.domain(Me.map(Pe)),sr):Ut},sr.nice=function(){var ar=va(Me.map(Pe),ue?Math:ls);return At.domain(ar),Me=ar.map(Ne),sr},sr.ticks=function(){var ar=qn(Me),Er=[],rn=ar[0],Jr=ar[1],xn=Math.floor(Pe(rn)),zn=Math.ceil(Pe(Jr)),On=Ut%1?2:Ut;if(isFinite(zn-xn)){if(ue){for(;xn0;Hi--)Er.push(Ne(xn)*Hi);for(xn=0;Er[xn]Jr;zn--);Er=Er.slice(xn,zn)}return Er},sr.copy=function(){return Ko(At.copy(),Ut,ue,Me)},ka(sr,At)}var ls={floor:function(At){return-Math.ceil(-At)},ceil:function(At){return-Math.floor(-At)}};c.scale.pow=function(){return ps(c.scale.linear(),1,[0,1])};function ps(At,Ut,ue){var Me=oo(Ut),Pe=oo(1/Ut);function Ne(sr){return At(Me(sr))}return Ne.invert=function(sr){return Pe(At.invert(sr))},Ne.domain=function(sr){return arguments.length?(At.domain((ue=sr.map(Number)).map(Me)),Ne):ue},Ne.ticks=function(sr){return ns(ue,sr)},Ne.tickFormat=function(sr,ar){return d3_scale_linearTickFormat(ue,sr,ar)},Ne.nice=function(sr){return Ne.domain(na(ue,sr))},Ne.exponent=function(sr){return arguments.length?(Me=oo(Ut=sr),Pe=oo(1/Ut),At.domain(ue.map(Me)),Ne):Ut},Ne.copy=function(){return ps(At.copy(),Ut,ue)},ka(Ne,At)}function oo(At){return function(Ut){return Ut<0?-Math.pow(-Ut,At):Math.pow(Ut,At)}}c.scale.sqrt=function(){return c.scale.pow().exponent(.5)},c.scale.ordinal=function(){return qa([],{t:"range",a:[[]]})};function qa(At,Ut){var ue,Me,Pe;function Ne(ar){return Me[((ue.get(ar)||(Ut.t==="range"?ue.set(ar,At.push(ar)):NaN))-1)%Me.length]}function sr(ar,Er){return c.range(At.length).map(function(rn){return ar+Er*rn})}return Ne.domain=function(ar){if(!arguments.length)return At;At=[],ue=new P;for(var Er=-1,rn=ar.length,Jr;++Er0?ue[Ne-1]:At[0],Nezn?0:1;if(Jr=Nt)return Er(Jr,Hi)+(rn?Er(rn,1-Hi):"")+"Z";var Vn,yi,Si,Ri,Gi=0,Kn=0,Ua,Ha,ao,Po,Ro,Wo,ol,Go,vs=[];if((Ri=(+sr.apply(this,arguments)||0)/2)&&(Si=Me===fu?Math.sqrt(rn*rn+Jr*Jr):+Me.apply(this,arguments),Hi||(Kn*=-1),Jr&&(Kn=qe(Si/Jr*Math.sin(Ri))),rn&&(Gi=qe(Si/rn*Math.sin(Ri)))),Jr){Ua=Jr*Math.cos(xn+Kn),Ha=Jr*Math.sin(xn+Kn),ao=Jr*Math.cos(zn-Kn),Po=Jr*Math.sin(zn-Kn);var Tl=Math.abs(zn-xn-2*Kn)<=gt?0:1;if(Kn&&Hc(Ua,Ha,ao,Po)===Hi^Tl){var Ku=(xn+zn)/2;Ua=Jr*Math.cos(Ku),Ha=Jr*Math.sin(Ku),ao=Po=null}}else Ua=Ha=0;if(rn){Ro=rn*Math.cos(zn-Gi),Wo=rn*Math.sin(zn-Gi),ol=rn*Math.cos(xn+Gi),Go=rn*Math.sin(xn+Gi);var du=Math.abs(xn-zn+2*Gi)<=gt?0:1;if(Gi&&Hc(Ro,Wo,ol,Go)===1-Hi^du){var _o=(xn+zn)/2;Ro=rn*Math.cos(_o),Wo=rn*Math.sin(_o),ol=Go=null}}else Ro=Wo=0;if(On>ne&&(Vn=Math.min(Math.abs(Jr-rn)/2,+ue.apply(this,arguments)))>.001){yi=rn0?0:1}function Lc(At,Ut,ue,Me,Pe){var Ne=At[0]-Ut[0],sr=At[1]-Ut[1],ar=(Pe?Me:-Me)/Math.sqrt(Ne*Ne+sr*sr),Er=ar*sr,rn=-ar*Ne,Jr=At[0]+Er,xn=At[1]+rn,zn=Ut[0]+Er,On=Ut[1]+rn,Hi=(Jr+zn)/2,Vn=(xn+On)/2,yi=zn-Jr,Si=On-xn,Ri=yi*yi+Si*Si,Gi=ue-Me,Kn=Jr*On-zn*xn,Ua=(Si<0?-1:1)*Math.sqrt(Math.max(0,Gi*Gi*Ri-Kn*Kn)),Ha=(Kn*Si-yi*Ua)/Ri,ao=(-Kn*yi-Si*Ua)/Ri,Po=(Kn*Si+yi*Ua)/Ri,Ro=(-Kn*yi+Si*Ua)/Ri,Wo=Ha-Hi,ol=ao-Vn,Go=Po-Hi,vs=Ro-Vn;return Wo*Wo+ol*ol>Go*Go+vs*vs&&(Ha=Po,ao=Ro),[[Ha-Er,ao-rn],[Ha*ue/Gi,ao*ue/Gi]]}function Ih(){return!0}function Wc(At){var Ut=yo,ue=Fo,Me=Ih,Pe=Du,Ne=Pe.key,sr=.7;function ar(Er){var rn=[],Jr=[],xn=-1,zn=Er.length,On,Hi=Ce(Ut),Vn=Ce(ue);function yi(){rn.push("M",Pe(At(Jr),sr))}for(;++xn1?At.join("L"):At+"Z"}function Oh(At){return At.join("L")+"Z"}function rs(At){for(var Ut=0,ue=At.length,Me=At[0],Pe=[Me[0],",",Me[1]];++Ut1&&Pe.push("H",Me[0]),Pe.join("")}function zs(At){for(var Ut=0,ue=At.length,Me=At[0],Pe=[Me[0],",",Me[1]];++Ut1){ar=Ut[1],Ne=At[Er],Er++,Me+="C"+(Pe[0]+sr[0])+","+(Pe[1]+sr[1])+","+(Ne[0]-ar[0])+","+(Ne[1]-ar[1])+","+Ne[0]+","+Ne[1];for(var rn=2;rn9&&(Ne=ue*3/Math.sqrt(Ne),sr[ar]=Ne*Me,sr[ar+1]=Ne*Pe));for(ar=-1;++ar<=Er;)Ne=(At[Math.min(Er,ar+1)][0]-At[Math.max(0,ar-1)][0])/(6*(1+sr[ar]*sr[ar])),Ut.push([Ne||0,sr[ar]*Ne||0]);return Ut}function ae(At){return At.length<3?Du(At):At[0]+z(At,Xt(At))}c.svg.line.radial=function(){var At=Wc(xe);return At.radius=At.x,delete At.x,At.angle=At.y,delete At.y,At};function xe(At){for(var Ut,ue=-1,Me=At.length,Pe,Ne;++uegt)+",1 "+xn}function rn(Jr,xn,zn,On){return"Q 0,0 "+On}return Ne.radius=function(Jr){return arguments.length?(ue=Ce(Jr),Ne):ue},Ne.source=function(Jr){return arguments.length?(At=Ce(Jr),Ne):At},Ne.target=function(Jr){return arguments.length?(Ut=Ce(Jr),Ne):Ut},Ne.startAngle=function(Jr){return arguments.length?(Me=Ce(Jr),Ne):Me},Ne.endAngle=function(Jr){return arguments.length?(Pe=Ce(Jr),Ne):Pe},Ne};function $e(At){return At.radius}c.svg.diagonal=function(){var At=je,Ut=Oe,ue=wr;function Me(Pe,Ne){var sr=At.call(this,Pe,Ne),ar=Ut.call(this,Pe,Ne),Er=(sr.y+ar.y)/2,rn=[sr,{x:sr.x,y:Er},{x:ar.x,y:Er},ar];return rn=rn.map(ue),"M"+rn[0]+"C"+rn[1]+" "+rn[2]+" "+rn[3]}return Me.source=function(Pe){return arguments.length?(At=Ce(Pe),Me):At},Me.target=function(Pe){return arguments.length?(Ut=Ce(Pe),Me):Ut},Me.projection=function(Pe){return arguments.length?(ue=Pe,Me):ue},Me};function wr(At){return[At.x,At.y]}c.svg.diagonal.radial=function(){var At=c.svg.diagonal(),Ut=wr,ue=At.projection;return At.projection=function(Me){return arguments.length?ue(Or(Ut=Me)):Ut},At};function Or(At){return function(){var Ut=At.apply(this,arguments),ue=Ut[0],Me=Ut[1]-re;return[ue*Math.cos(Me),ue*Math.sin(Me)]}}c.svg.symbol=function(){var At=en,Ut=Nr;function ue(Me,Pe){return(In.get(At.call(this,Me,Pe))||vn)(Ut.call(this,Me,Pe))}return ue.type=function(Me){return arguments.length?(At=Ce(Me),ue):At},ue.size=function(Me){return arguments.length?(Ut=Ce(Me),ue):Ut},ue};function Nr(){return 64}function en(){return"circle"}function vn(At){var Ut=Math.sqrt(At/gt);return"M0,"+Ut+"A"+Ut+","+Ut+" 0 1,1 0,"+-Ut+"A"+Ut+","+Ut+" 0 1,1 0,"+Ut+"Z"}var In=c.map({circle:vn,cross:function(At){var Ut=Math.sqrt(At/5)/2;return"M"+-3*Ut+","+-Ut+"H"+-Ut+"V"+-3*Ut+"H"+Ut+"V"+-Ut+"H"+3*Ut+"V"+Ut+"H"+Ut+"V"+3*Ut+"H"+-Ut+"V"+Ut+"H"+-3*Ut+"Z"},diamond:function(At){var Ut=Math.sqrt(At/(2*ii)),ue=Ut*ii;return"M0,"+-Ut+"L"+ue+",0 0,"+Ut+" "+-ue+",0Z"},square:function(At){var Ut=Math.sqrt(At)/2;return"M"+-Ut+","+-Ut+"L"+Ut+","+-Ut+" "+Ut+","+Ut+" "+-Ut+","+Ut+"Z"},"triangle-down":function(At){var Ut=Math.sqrt(At/Nn),ue=Ut*Nn/2;return"M0,"+ue+"L"+Ut+","+-ue+" "+-Ut+","+-ue+"Z"},"triangle-up":function(At){var Ut=Math.sqrt(At/Nn),ue=Ut*Nn/2;return"M0,"+-ue+"L"+Ut+","+ue+" "+-Ut+","+ue+"Z"}});c.svg.symbolTypes=In.keys();var Nn=Math.sqrt(3),ii=Math.tan(30*le);it.transition=function(At){for(var Ut=Bo||++so,ue=vl(At),Me=[],Pe,Ne,sr=So||{time:Date.now(),ease:Qo,delay:0,duration:250},ar=-1,Er=this.length;++ar0;)xn[--Ri].call(At,Si);if(yi>=1)return sr.event&&sr.event.end.call(At,At.__data__,Ut),--Ne.count?delete Ne[Me]:delete At[ue],1}sr||(ar=Pe.time,Er=Vi(zn,0,ar),sr=Ne[Me]={tween:new P,time:ar,timer:Er,delay:Pe.delay,duration:Pe.duration,ease:Pe.ease,index:Ut},Pe=null,++Ne.count)}c.svg.axis=function(){var At=c.scale.linear(),Ut=wl,ue=6,Me=6,Pe=3,Ne=[10],sr=null,ar;function Er(rn){rn.each(function(){var Jr=c.select(this),xn=this.__chart__||At,zn=this.__chart__=At.copy(),On=sr??(zn.ticks?zn.ticks.apply(zn,Ne):zn.domain()),Hi=ar??(zn.tickFormat?zn.tickFormat.apply(zn,Ne):V),Vn=Jr.selectAll(".tick").data(On,zn),yi=Vn.enter().insert("g",".domain").attr("class","tick").style("opacity",ne),Si=c.transition(Vn.exit()).style("opacity",ne).remove(),Ri=c.transition(Vn.order()).style("opacity",1),Gi=Math.max(ue,0)+Pe,Kn,Ua=di(zn),Ha=Jr.selectAll(".domain").data([0]),ao=(Ha.enter().append("path").attr("class","domain"),c.transition(Ha));yi.append("line"),yi.append("text");var Po=yi.select("line"),Ro=Ri.select("line"),Wo=Vn.select("text").text(Hi),ol=yi.select("text"),Go=Ri.select("text"),vs=Ut==="top"||Ut==="left"?-1:1,Tl,Ku,du,_o;if(Ut==="bottom"||Ut==="top"?(Kn=gu,Tl="x",du="y",Ku="x2",_o="y2",Wo.attr("dy",vs<0?"0em":".71em").style("text-anchor","middle"),ao.attr("d","M"+Ua[0]+","+vs*Me+"V0H"+Ua[1]+"V"+vs*Me)):(Kn=$s,Tl="y",du="x",Ku="y2",_o="x2",Wo.attr("dy",".32em").style("text-anchor",vs<0?"end":"start"),ao.attr("d","M"+vs*Me+","+Ua[0]+"H0V"+Ua[1]+"H"+vs*Me)),Po.attr(_o,vs*ue),ol.attr(du,vs*Gi),Ro.attr(Ku,0).attr(_o,vs*ue),Go.attr(Tl,0).attr(du,vs*Gi),zn.rangeBand){var Gs=zn,nl=Gs.rangeBand()/2;xn=zn=function(uu){return Gs(uu)+nl}}else xn.rangeBand?xn=zn:Si.call(Kn,zn,xn);yi.call(Kn,xn,zn),Ri.call(Kn,zn,zn)})}return Er.scale=function(rn){return arguments.length?(At=rn,Er):At},Er.orient=function(rn){return arguments.length?(Ut=rn in Eu?rn+"":wl,Er):Ut},Er.ticks=function(){return arguments.length?(Ne=I(arguments),Er):Ne},Er.tickValues=function(rn){return arguments.length?(sr=rn,Er):sr},Er.tickFormat=function(rn){return arguments.length?(ar=rn,Er):ar},Er.tickSize=function(rn){var Jr=arguments.length;return Jr?(ue=+rn,Me=+arguments[Jr-1],Er):ue},Er.innerTickSize=function(rn){return arguments.length?(ue=+rn,Er):ue},Er.outerTickSize=function(rn){return arguments.length?(Me=+rn,Er):Me},Er.tickPadding=function(rn){return arguments.length?(Pe=+rn,Er):Pe},Er.tickSubdivide=function(){return arguments.length&&Er},Er};var wl="bottom",Eu={top:1,right:1,bottom:1,left:1};function gu(At,Ut,ue){At.attr("transform",function(Me){var Pe=Ut(Me);return"translate("+(isFinite(Pe)?Pe:ue(Me))+",0)"})}function $s(At,Ut,ue){At.attr("transform",function(Me){var Pe=Ut(Me);return"translate(0,"+(isFinite(Pe)?Pe:ue(Me))+")"})}c.svg.brush=function(){var At=mt(Jr,"brushstart","brush","brushend"),Ut=null,ue=null,Me=[0,0],Pe=[0,0],Ne,sr,ar=!0,Er=!0,rn=Yu[0];function Jr(Vn){Vn.each(function(){var yi=c.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Hi).on("touchstart.brush",Hi),Si=yi.selectAll(".background").data([0]);Si.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),yi.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ri=yi.selectAll(".resize").data(rn,V);Ri.exit().remove(),Ri.enter().append("g").attr("class",function(Ha){return"resize "+Ha}).style("cursor",function(Ha){return Zs[Ha]}).append("rect").attr("x",function(Ha){return/[ew]$/.test(Ha)?-3:null}).attr("y",function(Ha){return/^[ns]/.test(Ha)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ri.style("display",Jr.empty()?"none":null);var Gi=c.transition(yi),Kn=c.transition(Si),Ua;Ut&&(Ua=di(Ut),Kn.attr("x",Ua[0]).attr("width",Ua[1]-Ua[0]),zn(Gi)),ue&&(Ua=di(ue),Kn.attr("y",Ua[0]).attr("height",Ua[1]-Ua[0]),On(Gi)),xn(Gi)})}Jr.event=function(Vn){Vn.each(function(){var yi=At.of(this,arguments),Si={x:Me,y:Pe,i:Ne,j:sr},Ri=this.__chart__||Si;this.__chart__=Si,Bo?c.select(this).transition().each("start.brush",function(){Ne=Ri.i,sr=Ri.j,Me=Ri.x,Pe=Ri.y,yi({type:"brushstart"})}).tween("brush:brush",function(){var Gi=Yl(Me,Si.x),Kn=Yl(Pe,Si.y);return Ne=sr=null,function(Ua){Me=Si.x=Gi(Ua),Pe=Si.y=Kn(Ua),yi({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ne=Si.i,sr=Si.j,yi({type:"brush",mode:"resize"}),yi({type:"brushend"})}):(yi({type:"brushstart"}),yi({type:"brush",mode:"resize"}),yi({type:"brushend"}))})};function xn(Vn){Vn.selectAll(".resize").attr("transform",function(yi){return"translate("+Me[+/e$/.test(yi)]+","+Pe[+/^s/.test(yi)]+")"})}function zn(Vn){Vn.select(".extent").attr("x",Me[0]),Vn.selectAll(".extent,.n>rect,.s>rect").attr("width",Me[1]-Me[0])}function On(Vn){Vn.select(".extent").attr("y",Pe[0]),Vn.selectAll(".extent,.e>rect,.w>rect").attr("height",Pe[1]-Pe[0])}function Hi(){var Vn=this,yi=c.select(c.event.target),Si=At.of(Vn,arguments),Ri=c.select(Vn),Gi=yi.datum(),Kn=!/^(n|s)$/.test(Gi)&&Ut,Ua=!/^(e|w)$/.test(Gi)&&ue,Ha=yi.classed("extent"),ao=Xr(Vn),Po,Ro=c.mouse(Vn),Wo,ol=c.select(e(Vn)).on("keydown.brush",Tl).on("keyup.brush",Ku);if(c.event.changedTouches?ol.on("touchmove.brush",du).on("touchend.brush",Gs):ol.on("mousemove.brush",du).on("mouseup.brush",Gs),Ri.interrupt().selectAll("*").interrupt(),Ha)Ro[0]=Me[0]-Ro[0],Ro[1]=Pe[0]-Ro[1];else if(Gi){var Go=+/w$/.test(Gi),vs=+/^n/.test(Gi);Wo=[Me[1-Go]-Ro[0],Pe[1-vs]-Ro[1]],Ro[0]=Me[Go],Ro[1]=Pe[vs]}else c.event.altKey&&(Po=Ro.slice());Ri.style("pointer-events","none").selectAll(".resize").style("display",null),c.select("body").style("cursor",yi.style("cursor")),Si({type:"brushstart"}),du();function Tl(){c.event.keyCode==32&&(Ha||(Po=null,Ro[0]-=Me[1],Ro[1]-=Pe[1],Ha=2),lt())}function Ku(){c.event.keyCode==32&&Ha==2&&(Ro[0]+=Me[1],Ro[1]+=Pe[1],Ha=0,lt())}function du(){var nl=c.mouse(Vn),uu=!1;Wo&&(nl[0]+=Wo[0],nl[1]+=Wo[1]),Ha||(c.event.altKey?(Po||(Po=[(Me[0]+Me[1])/2,(Pe[0]+Pe[1])/2]),Ro[0]=Me[+(nl[0]{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=new Date,I=new Date;function S(Mt,ee,ve,oe){function Te(He){return Mt(He=arguments.length===0?new Date:new Date(+He)),He}return Te.floor=function(He){return Mt(He=new Date(+He)),He},Te.ceil=function(He){return Mt(He=new Date(He-1)),ee(He,1),Mt(He),He},Te.round=function(He){var Ge=Te(He),cr=Te.ceil(He);return He-Ge0))return ur;do ur.push(jr=new Date(+He)),ee(He,cr),Mt(He);while(jr=Ge)for(;Mt(Ge),!He(Ge);)Ge.setTime(Ge-1)},function(Ge,cr){if(Ge>=Ge)if(cr<0)for(;++cr<=0;)for(;ee(Ge,-1),!He(Ge););else for(;--cr>=0;)for(;ee(Ge,1),!He(Ge););})},ve&&(Te.count=function(He,Ge){return g.setTime(+He),I.setTime(+Ge),Mt(g),Mt(I),Math.floor(ve(g,I))},Te.every=function(He){return He=Math.floor(He),!isFinite(He)||!(He>0)?null:He>1?Te.filter(oe?function(Ge){return oe(Ge)%He===0}:function(Ge){return Te.count(0,Ge)%He===0}):Te}),Te}var t=S(function(){},function(Mt,ee){Mt.setTime(+Mt+ee)},function(Mt,ee){return ee-Mt});t.every=function(Mt){return Mt=Math.floor(Mt),!isFinite(Mt)||!(Mt>0)?null:Mt>1?S(function(ee){ee.setTime(Math.floor(ee/Mt)*Mt)},function(ee,ve){ee.setTime(+ee+ve*Mt)},function(ee,ve){return(ve-ee)/Mt}):t};var e=t.range,r=1e3,a=6e4,n=36e5,o=864e5,i=6048e5,l=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds())},function(Mt,ee){Mt.setTime(+Mt+ee*r)},function(Mt,ee){return(ee-Mt)/r},function(Mt){return Mt.getUTCSeconds()}),f=l.range,x=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r)},function(Mt,ee){Mt.setTime(+Mt+ee*a)},function(Mt,ee){return(ee-Mt)/a},function(Mt){return Mt.getMinutes()}),y=x.range,v=S(function(Mt){Mt.setTime(Mt-Mt.getMilliseconds()-Mt.getSeconds()*r-Mt.getMinutes()*a)},function(Mt,ee){Mt.setTime(+Mt+ee*n)},function(Mt,ee){return(ee-Mt)/n},function(Mt){return Mt.getHours()}),T=v.range,u=S(function(Mt){Mt.setHours(0,0,0,0)},function(Mt,ee){Mt.setDate(Mt.getDate()+ee)},function(Mt,ee){return(ee-Mt-(ee.getTimezoneOffset()-Mt.getTimezoneOffset())*a)/o},function(Mt){return Mt.getDate()-1}),b=u.range;function _(Mt){return S(function(ee){ee.setDate(ee.getDate()-(ee.getDay()+7-Mt)%7),ee.setHours(0,0,0,0)},function(ee,ve){ee.setDate(ee.getDate()+ve*7)},function(ee,ve){return(ve-ee-(ve.getTimezoneOffset()-ee.getTimezoneOffset())*a)/i})}var P=_(0),M=_(1),C=_(2),A=_(3),h=_(4),p=_(5),k=_(6),w=P.range,R=M.range,O=C.range,j=A.range,V=h.range,H=p.range,F=k.range,U=S(function(Mt){Mt.setDate(1),Mt.setHours(0,0,0,0)},function(Mt,ee){Mt.setMonth(Mt.getMonth()+ee)},function(Mt,ee){return ee.getMonth()-Mt.getMonth()+(ee.getFullYear()-Mt.getFullYear())*12},function(Mt){return Mt.getMonth()}),W=U.range,q=S(function(Mt){Mt.setMonth(0,1),Mt.setHours(0,0,0,0)},function(Mt,ee){Mt.setFullYear(Mt.getFullYear()+ee)},function(Mt,ee){return ee.getFullYear()-Mt.getFullYear()},function(Mt){return Mt.getFullYear()});q.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(ee){ee.setFullYear(Math.floor(ee.getFullYear()/Mt)*Mt),ee.setMonth(0,1),ee.setHours(0,0,0,0)},function(ee,ve){ee.setFullYear(ee.getFullYear()+ve*Mt)})};var J=q.range,lt=S(function(Mt){Mt.setUTCSeconds(0,0)},function(Mt,ee){Mt.setTime(+Mt+ee*a)},function(Mt,ee){return(ee-Mt)/a},function(Mt){return Mt.getUTCMinutes()}),yt=lt.range,mt=S(function(Mt){Mt.setUTCMinutes(0,0,0)},function(Mt,ee){Mt.setTime(+Mt+ee*n)},function(Mt,ee){return(ee-Mt)/n},function(Mt){return Mt.getUTCHours()}),st=mt.range,tt=S(function(Mt){Mt.setUTCHours(0,0,0,0)},function(Mt,ee){Mt.setUTCDate(Mt.getUTCDate()+ee)},function(Mt,ee){return(ee-Mt)/o},function(Mt){return Mt.getUTCDate()-1}),dt=tt.range;function rt(Mt){return S(function(ee){ee.setUTCDate(ee.getUTCDate()-(ee.getUTCDay()+7-Mt)%7),ee.setUTCHours(0,0,0,0)},function(ee,ve){ee.setUTCDate(ee.getUTCDate()+ve*7)},function(ee,ve){return(ve-ee)/i})}var at=rt(0),vt=rt(1),it=rt(2),Y=rt(3),ft=rt(4),ut=rt(5),kt=rt(6),It=at.range,Pt=vt.range,qt=it.range,Wt=Y.range,Jt=ft.range,ge=ut.range,fe=kt.range,pe=S(function(Mt){Mt.setUTCDate(1),Mt.setUTCHours(0,0,0,0)},function(Mt,ee){Mt.setUTCMonth(Mt.getUTCMonth()+ee)},function(Mt,ee){return ee.getUTCMonth()-Mt.getUTCMonth()+(ee.getUTCFullYear()-Mt.getUTCFullYear())*12},function(Mt){return Mt.getUTCMonth()}),se=pe.range,Tt=S(function(Mt){Mt.setUTCMonth(0,1),Mt.setUTCHours(0,0,0,0)},function(Mt,ee){Mt.setUTCFullYear(Mt.getUTCFullYear()+ee)},function(Mt,ee){return ee.getUTCFullYear()-Mt.getUTCFullYear()},function(Mt){return Mt.getUTCFullYear()});Tt.every=function(Mt){return!isFinite(Mt=Math.floor(Mt))||!(Mt>0)?null:S(function(ee){ee.setUTCFullYear(Math.floor(ee.getUTCFullYear()/Mt)*Mt),ee.setUTCMonth(0,1),ee.setUTCHours(0,0,0,0)},function(ee,ve){ee.setUTCFullYear(ee.getUTCFullYear()+ve*Mt)})};var Lt=Tt.range;c.timeDay=u,c.timeDays=b,c.timeFriday=p,c.timeFridays=H,c.timeHour=v,c.timeHours=T,c.timeInterval=S,c.timeMillisecond=t,c.timeMilliseconds=e,c.timeMinute=x,c.timeMinutes=y,c.timeMonday=M,c.timeMondays=R,c.timeMonth=U,c.timeMonths=W,c.timeSaturday=k,c.timeSaturdays=F,c.timeSecond=l,c.timeSeconds=f,c.timeSunday=P,c.timeSundays=w,c.timeThursday=h,c.timeThursdays=V,c.timeTuesday=C,c.timeTuesdays=O,c.timeWednesday=A,c.timeWednesdays=j,c.timeWeek=P,c.timeWeeks=w,c.timeYear=q,c.timeYears=J,c.utcDay=tt,c.utcDays=dt,c.utcFriday=ut,c.utcFridays=ge,c.utcHour=mt,c.utcHours=st,c.utcMillisecond=t,c.utcMilliseconds=e,c.utcMinute=lt,c.utcMinutes=yt,c.utcMonday=vt,c.utcMondays=Pt,c.utcMonth=pe,c.utcMonths=se,c.utcSaturday=kt,c.utcSaturdays=fe,c.utcSecond=l,c.utcSeconds=f,c.utcSunday=at,c.utcSundays=It,c.utcThursday=ft,c.utcThursdays=Jt,c.utcTuesday=it,c.utcTuesdays=qt,c.utcWednesday=Y,c.utcWednesdays=Wt,c.utcWeek=at,c.utcWeeks=It,c.utcYear=Tt,c.utcYears=Lt,Object.defineProperty(c,"__esModule",{value:!0})})}),Fi=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,Di()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function I(Gt){if(0<=Gt.y&&Gt.y<100){var ne=new Date(-1,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L);return ne.setFullYear(Gt.y),ne}return new Date(Gt.y,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L)}function S(Gt){if(0<=Gt.y&&Gt.y<100){var ne=new Date(Date.UTC(-1,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L));return ne.setUTCFullYear(Gt.y),ne}return new Date(Date.UTC(Gt.y,Gt.m,Gt.d,Gt.H,Gt.M,Gt.S,Gt.L))}function t(Gt,ne,Ct){return{y:Gt,m:ne,d:Ct,H:0,M:0,S:0,L:0}}function e(Gt){var ne=Gt.dateTime,Ct=Gt.date,gt=Gt.time,St=Gt.periods,Nt=Gt.days,re=Gt.shortDays,le=Gt.months,we=Gt.shortMonths,Ue=f(St),qe=x(St),or=f(Nt),Sr=x(Nt),Ar=f(re),mr=x(re),Qr=f(le),Hn=x(le),Wn=f(we),Xn=x(we),Ii={a:ki,A:Oi,b:ji,B:Xi,c:null,d:U,e:U,f:yt,H:W,I:q,j:J,L:lt,m:mt,M:st,p:ci,q:za,Q:Ge,s:cr,S:tt,u:dt,U:rt,V:at,w:vt,W:it,x:null,X:null,y:Y,Y:ft,Z:ut,"%":He},oi={a:Wa,A:ze,b:Ie,B:Rr,c:null,d:kt,e:kt,f:Jt,H:It,I:Pt,j:qt,L:Wt,m:ge,M:fe,p:$r,q:Gr,Q:Ge,s:cr,S:pe,u:se,U:Tt,V:Lt,w:Mt,W:ee,x:null,X:null,y:ve,Y:oe,Z:Te,"%":He},$n={a:fr,A:_r,b:tn,B:Cn,c:Tn,d:h,e:h,f:j,H:k,I:k,j:p,L:O,m:A,M:w,p:nr,q:C,Q:H,s:F,S:R,u:v,U:T,V:u,w:y,W:b,x:Mn,X:fi,y:P,Y:_,Z:M,"%":V};Ii.x=sa(Ct,Ii),Ii.X=sa(gt,Ii),Ii.c=sa(ne,Ii),oi.x=sa(Ct,oi),oi.X=sa(gt,oi),oi.c=sa(ne,oi);function sa(Br,Yr){return function(pn){var on=[],Ce=-1,dr=0,Hr=Br.length,_n,Fn,Qn;for(pn instanceof Date||(pn=new Date(+pn));++Ce53)return null;"w"in on||(on.w=1),"Z"in on?(dr=S(t(on.y,0,1)),Hr=dr.getUTCDay(),dr=Hr>4||Hr===0?g.utcMonday.ceil(dr):g.utcMonday(dr),dr=g.utcDay.offset(dr,(on.V-1)*7),on.y=dr.getUTCFullYear(),on.m=dr.getUTCMonth(),on.d=dr.getUTCDate()+(on.w+6)%7):(dr=I(t(on.y,0,1)),Hr=dr.getDay(),dr=Hr>4||Hr===0?g.timeMonday.ceil(dr):g.timeMonday(dr),dr=g.timeDay.offset(dr,(on.V-1)*7),on.y=dr.getFullYear(),on.m=dr.getMonth(),on.d=dr.getDate()+(on.w+6)%7)}else("W"in on||"U"in on)&&("w"in on||(on.w="u"in on?on.u%7:"W"in on?1:0),Hr="Z"in on?S(t(on.y,0,1)).getUTCDay():I(t(on.y,0,1)).getDay(),on.m=0,on.d="W"in on?(on.w+6)%7+on.W*7-(Hr+5)%7:on.w+on.U*7-(Hr+6)%7);return"Z"in on?(on.H+=on.Z/100|0,on.M+=on.Z%100,S(on)):I(on)}}function We(Br,Yr,pn,on){for(var Ce=0,dr=Yr.length,Hr=pn.length,_n,Fn;Ce=Hr)return-1;if(_n=Yr.charCodeAt(Ce++),_n===37){if(_n=Yr.charAt(Ce++),Fn=$n[_n in r?Yr.charAt(Ce++):_n],!Fn||(on=Fn(Br,pn,on))<0)return-1}else if(_n!=pn.charCodeAt(on++))return-1}return on}function nr(Br,Yr,pn){var on=Ue.exec(Yr.slice(pn));return on?(Br.p=qe[on[0].toLowerCase()],pn+on[0].length):-1}function fr(Br,Yr,pn){var on=Ar.exec(Yr.slice(pn));return on?(Br.w=mr[on[0].toLowerCase()],pn+on[0].length):-1}function _r(Br,Yr,pn){var on=or.exec(Yr.slice(pn));return on?(Br.w=Sr[on[0].toLowerCase()],pn+on[0].length):-1}function tn(Br,Yr,pn){var on=Wn.exec(Yr.slice(pn));return on?(Br.m=Xn[on[0].toLowerCase()],pn+on[0].length):-1}function Cn(Br,Yr,pn){var on=Qr.exec(Yr.slice(pn));return on?(Br.m=Hn[on[0].toLowerCase()],pn+on[0].length):-1}function Tn(Br,Yr,pn){return We(Br,ne,Yr,pn)}function Mn(Br,Yr,pn){return We(Br,Ct,Yr,pn)}function fi(Br,Yr,pn){return We(Br,gt,Yr,pn)}function ki(Br){return re[Br.getDay()]}function Oi(Br){return Nt[Br.getDay()]}function ji(Br){return we[Br.getMonth()]}function Xi(Br){return le[Br.getMonth()]}function ci(Br){return St[+(Br.getHours()>=12)]}function za(Br){return 1+~~(Br.getMonth()/3)}function Wa(Br){return re[Br.getUTCDay()]}function ze(Br){return Nt[Br.getUTCDay()]}function Ie(Br){return we[Br.getUTCMonth()]}function Rr(Br){return le[Br.getUTCMonth()]}function $r(Br){return St[+(Br.getUTCHours()>=12)]}function Gr(Br){return 1+~~(Br.getUTCMonth()/3)}return{format:function(Br){var Yr=sa(Br+="",Ii);return Yr.toString=function(){return Br},Yr},parse:function(Br){var Yr=Zi(Br+="",!1);return Yr.toString=function(){return Br},Yr},utcFormat:function(Br){var Yr=sa(Br+="",oi);return Yr.toString=function(){return Br},Yr},utcParse:function(Br){var Yr=Zi(Br+="",!0);return Yr.toString=function(){return Br},Yr}}}var r={"-":"",_:" ",0:"0"},a=/^\s*\d+/,n=/^%/,o=/[\\^$*+?|[\]().{}]/g;function i(Gt,ne,Ct){var gt=Gt<0?"-":"",St=(gt?-Gt:Gt)+"",Nt=St.length;return gt+(Nt68?1900:2e3),Ct+gt[0].length):-1}function M(Gt,ne,Ct){var gt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ne.slice(Ct,Ct+6));return gt?(Gt.Z=gt[1]?0:-(gt[2]+(gt[3]||"00")),Ct+gt[0].length):-1}function C(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+1));return gt?(Gt.q=gt[0]*3-3,Ct+gt[0].length):-1}function A(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.m=gt[0]-1,Ct+gt[0].length):-1}function h(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.d=+gt[0],Ct+gt[0].length):-1}function p(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?(Gt.m=0,Gt.d=+gt[0],Ct+gt[0].length):-1}function k(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.H=+gt[0],Ct+gt[0].length):-1}function w(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.M=+gt[0],Ct+gt[0].length):-1}function R(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+2));return gt?(Gt.S=+gt[0],Ct+gt[0].length):-1}function O(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+3));return gt?(Gt.L=+gt[0],Ct+gt[0].length):-1}function j(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct,Ct+6));return gt?(Gt.L=Math.floor(gt[0]/1e3),Ct+gt[0].length):-1}function V(Gt,ne,Ct){var gt=n.exec(ne.slice(Ct,Ct+1));return gt?Ct+gt[0].length:-1}function H(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?(Gt.Q=+gt[0],Ct+gt[0].length):-1}function F(Gt,ne,Ct){var gt=a.exec(ne.slice(Ct));return gt?(Gt.s=+gt[0],Ct+gt[0].length):-1}function U(Gt,ne){return i(Gt.getDate(),ne,2)}function W(Gt,ne){return i(Gt.getHours(),ne,2)}function q(Gt,ne){return i(Gt.getHours()%12||12,ne,2)}function J(Gt,ne){return i(1+g.timeDay.count(g.timeYear(Gt),Gt),ne,3)}function lt(Gt,ne){return i(Gt.getMilliseconds(),ne,3)}function yt(Gt,ne){return lt(Gt,ne)+"000"}function mt(Gt,ne){return i(Gt.getMonth()+1,ne,2)}function st(Gt,ne){return i(Gt.getMinutes(),ne,2)}function tt(Gt,ne){return i(Gt.getSeconds(),ne,2)}function dt(Gt){var ne=Gt.getDay();return ne===0?7:ne}function rt(Gt,ne){return i(g.timeSunday.count(g.timeYear(Gt)-1,Gt),ne,2)}function at(Gt,ne){var Ct=Gt.getDay();return Gt=Ct>=4||Ct===0?g.timeThursday(Gt):g.timeThursday.ceil(Gt),i(g.timeThursday.count(g.timeYear(Gt),Gt)+(g.timeYear(Gt).getDay()===4),ne,2)}function vt(Gt){return Gt.getDay()}function it(Gt,ne){return i(g.timeMonday.count(g.timeYear(Gt)-1,Gt),ne,2)}function Y(Gt,ne){return i(Gt.getFullYear()%100,ne,2)}function ft(Gt,ne){return i(Gt.getFullYear()%1e4,ne,4)}function ut(Gt){var ne=Gt.getTimezoneOffset();return(ne>0?"-":(ne*=-1,"+"))+i(ne/60|0,"0",2)+i(ne%60,"0",2)}function kt(Gt,ne){return i(Gt.getUTCDate(),ne,2)}function It(Gt,ne){return i(Gt.getUTCHours(),ne,2)}function Pt(Gt,ne){return i(Gt.getUTCHours()%12||12,ne,2)}function qt(Gt,ne){return i(1+g.utcDay.count(g.utcYear(Gt),Gt),ne,3)}function Wt(Gt,ne){return i(Gt.getUTCMilliseconds(),ne,3)}function Jt(Gt,ne){return Wt(Gt,ne)+"000"}function ge(Gt,ne){return i(Gt.getUTCMonth()+1,ne,2)}function fe(Gt,ne){return i(Gt.getUTCMinutes(),ne,2)}function pe(Gt,ne){return i(Gt.getUTCSeconds(),ne,2)}function se(Gt){var ne=Gt.getUTCDay();return ne===0?7:ne}function Tt(Gt,ne){return i(g.utcSunday.count(g.utcYear(Gt)-1,Gt),ne,2)}function Lt(Gt,ne){var Ct=Gt.getUTCDay();return Gt=Ct>=4||Ct===0?g.utcThursday(Gt):g.utcThursday.ceil(Gt),i(g.utcThursday.count(g.utcYear(Gt),Gt)+(g.utcYear(Gt).getUTCDay()===4),ne,2)}function Mt(Gt){return Gt.getUTCDay()}function ee(Gt,ne){return i(g.utcMonday.count(g.utcYear(Gt)-1,Gt),ne,2)}function ve(Gt,ne){return i(Gt.getUTCFullYear()%100,ne,2)}function oe(Gt,ne){return i(Gt.getUTCFullYear()%1e4,ne,4)}function Te(){return"+0000"}function He(){return"%"}function Ge(Gt){return+Gt}function cr(Gt){return Math.floor(+Gt/1e3)}var ur;jr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function jr(Gt){return ur=e(Gt),c.timeFormat=ur.format,c.timeParse=ur.parse,c.utcFormat=ur.utcFormat,c.utcParse=ur.utcParse,ur}var Wr="%Y-%m-%dT%H:%M:%S.%LZ";function br(Gt){return Gt.toISOString()}var Xr=Date.prototype.toISOString?br:c.utcFormat(Wr);function nn(Gt){var ne=new Date(Gt);return isNaN(ne)?null:ne}var Le=+new Date("2000-01-01T00:00:00.000Z")?nn:c.utcParse(Wr);c.isoFormat=Xr,c.isoParse=Le,c.timeFormatDefaultLocale=jr,c.timeFormatLocale=e,Object.defineProperty(c,"__esModule",{value:!0})})}),Pi=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function I(A,h){if((p=(A=h?A.toExponential(h-1):A.toExponential()).indexOf("e"))<0)return null;var p,k=A.slice(0,p);return[k.length>1?k[0]+k.slice(2):k,+A.slice(p+1)]}function S(A){return A=I(Math.abs(A)),A?A[1]:NaN}function t(A,h){return function(p,k){for(var w=p.length,R=[],O=0,j=A[0],V=0;w>0&&j>0&&(V+j+1>k&&(j=Math.max(1,k-V)),R.push(p.substring(w-=j,w+j)),!((V+=j+1)>k));)j=A[O=(O+1)%A.length];return R.reverse().join(h)}}function e(A){return function(h){return h.replace(/[0-9]/g,function(p){return A[+p]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(A){if(!(h=r.exec(A)))throw new Error("invalid format: "+A);var h;return new n({fill:h[1],align:h[2],sign:h[3],symbol:h[4],zero:h[5],width:h[6],comma:h[7],precision:h[8]&&h[8].slice(1),trim:h[9],type:h[10]})}a.prototype=n.prototype;function n(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}n.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function o(A){t:for(var h=A.length,p=1,k=-1,w;p0&&(k=0);break}return k>0?A.slice(0,k)+A.slice(w+1):A}var i;function l(A,h){var p=I(A,h);if(!p)return A+"";var k=p[0],w=p[1],R=w-(i=Math.max(-8,Math.min(8,Math.floor(w/3)))*3)+1,O=k.length;return R===O?k:R>O?k+new Array(R-O+1).join("0"):R>0?k.slice(0,R)+"."+k.slice(R):"0."+new Array(1-R).join("0")+I(A,Math.max(0,h+R-1))[0]}function f(A,h){var p=I(A,h);if(!p)return A+"";var k=p[0],w=p[1];return w<0?"0."+new Array(-w).join("0")+k:k.length>w+1?k.slice(0,w+1)+"."+k.slice(w+1):k+new Array(w-k.length+2).join("0")}var x={"%":function(A,h){return(A*100).toFixed(h)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:g,e:function(A,h){return A.toExponential(h)},f:function(A,h){return A.toFixed(h)},g:function(A,h){return A.toPrecision(h)},o:function(A){return Math.round(A).toString(8)},p:function(A,h){return f(A*100,h)},r:f,s:l,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function y(A){return A}var v=Array.prototype.map,T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u(A){var h=A.grouping===void 0||A.thousands===void 0?y:t(v.call(A.grouping,Number),A.thousands+""),p=A.currency===void 0?"":A.currency[0]+"",k=A.currency===void 0?"":A.currency[1]+"",w=A.decimal===void 0?".":A.decimal+"",R=A.numerals===void 0?y:e(v.call(A.numerals,String)),O=A.percent===void 0?"%":A.percent+"",j=A.minus===void 0?"-":A.minus+"",V=A.nan===void 0?"NaN":A.nan+"";function H(U){U=a(U);var W=U.fill,q=U.align,J=U.sign,lt=U.symbol,yt=U.zero,mt=U.width,st=U.comma,tt=U.precision,dt=U.trim,rt=U.type;rt==="n"?(st=!0,rt="g"):x[rt]||(tt===void 0&&(tt=12),dt=!0,rt="g"),(yt||W==="0"&&q==="=")&&(yt=!0,W="0",q="=");var at=lt==="$"?p:lt==="#"&&/[boxX]/.test(rt)?"0"+rt.toLowerCase():"",vt=lt==="$"?k:/[%p]/.test(rt)?O:"",it=x[rt],Y=/[defgprs%]/.test(rt);tt=tt===void 0?6:/[gprs]/.test(rt)?Math.max(1,Math.min(21,tt)):Math.max(0,Math.min(20,tt));function ft(ut){var kt=at,It=vt,Pt,qt,Wt;if(rt==="c")It=it(ut)+It,ut="";else{ut=+ut;var Jt=ut<0||1/ut<0;if(ut=isNaN(ut)?V:it(Math.abs(ut),tt),dt&&(ut=o(ut)),Jt&&+ut==0&&J!=="+"&&(Jt=!1),kt=(Jt?J==="("?J:j:J==="-"||J==="("?"":J)+kt,It=(rt==="s"?T[8+i/3]:"")+It+(Jt&&J==="("?")":""),Y){for(Pt=-1,qt=ut.length;++PtWt||Wt>57){It=(Wt===46?w+ut.slice(Pt+1):ut.slice(Pt))+It,ut=ut.slice(0,Pt);break}}}st&&!yt&&(ut=h(ut,1/0));var ge=kt.length+ut.length+It.length,fe=ge>1)+kt+ut+It+fe.slice(ge);break;default:ut=fe+kt+ut+It;break}return R(ut)}return ft.toString=function(){return U+""},ft}function F(U,W){var q=H((U=a(U),U.type="f",U)),J=Math.max(-8,Math.min(8,Math.floor(S(W)/3)))*3,lt=Math.pow(10,-J),yt=T[8+J/3];return function(mt){return q(lt*mt)+yt}}return{format:H,formatPrefix:F}}var b;_({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function _(A){return b=u(A),c.format=b.format,c.formatPrefix=b.formatPrefix,b}function P(A){return Math.max(0,-S(Math.abs(A)))}function M(A,h){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(S(h)/3)))*3-S(Math.abs(A)))}function C(A,h){return A=Math.abs(A),h=Math.abs(h)-A,Math.max(0,S(h)-S(A))+1}c.FormatSpecifier=n,c.formatDefaultLocale=_,c.formatLocale=u,c.formatSpecifier=a,c.precisionFixed=P,c.precisionPrefix=M,c.precisionRound=C,Object.defineProperty(c,"__esModule",{value:!0})})}),bi=Dt((Q,Z)=>{Z.exports=function(c){for(var g=c.length,I,S=0;S13)&&I!==32&&I!==133&&I!==160&&I!==5760&&I!==6158&&(I<8192||I>8205)&&I!==8232&&I!==8233&&I!==8239&&I!==8287&&I!==8288&&I!==12288&&I!==65279)return!1;return!0}}),Yi=Dt((Q,Z)=>{var c=bi();Z.exports=function(g){var I=typeof g;if(I==="string"){var S=g;if(g=+g,g===0&&c(S))return!1}else if(I!=="number")return!1;return g-g<1}}),Ca=Dt((Q,Z)=>{Z.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}),Ni=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=typeof globalThis<"u"?globalThis:c||self,g(c["base64-arraybuffer"]={}))})(Q,function(c){for(var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=typeof Uint8Array>"u"?[]:new Uint8Array(256),S=0;S>2],i+=g[(a[n]&3)<<4|a[n+1]>>4],i+=g[(a[n+1]&15)<<2|a[n+2]>>6],i+=g[a[n+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e=function(r){var a=r.length*.75,n=r.length,o,i=0,l,f,x,y;r[r.length-1]==="="&&(a--,r[r.length-2]==="="&&a--);var v=new ArrayBuffer(a),T=new Uint8Array(v);for(o=0;o>4,T[i++]=(f&15)<<4|x>>2,T[i++]=(x&3)<<6|y&63;return v};c.decode=e,c.encode=t,Object.defineProperty(c,"__esModule",{value:!0})})}),si=Dt((Q,Z)=>{Z.exports=function(c){return window&&window.process&&window.process.versions?Object.prototype.toString.call(c)==="[object Object]":Object.prototype.toString.call(c)==="[object Object]"&&Object.getPrototypeOf(c).hasOwnProperty("hasOwnProperty")}}),Ma=Dt(Q=>{var Z=Ni().decode,c=si(),g=Array.isArray,I=ArrayBuffer,S=DataView;function t(l){return I.isView(l)&&!(l instanceof S)}Q.isTypedArray=t;function e(l){return g(l)||t(l)}Q.isArrayOrTypedArray=e;function r(l){return!e(l[0])}Q.isArray1D=r,Q.ensureArray=function(l,f){return g(l)||(l=[]),l.length=f,l};var a={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};a.uint8c=a.u1c,a.uint8=a.u1,a.int8=a.i1,a.uint16=a.u2,a.int16=a.i2,a.uint32=a.u4,a.int32=a.i4,a.float32=a.f4,a.float64=a.f8;function n(l){return l.constructor===ArrayBuffer}Q.isArrayBuffer=n,Q.decodeTypedArraySpec=function(l){var f=[],x=o(l),y=x.dtype,v=a[y];if(!v)throw new Error('Error in dtype: "'+y+'"');var T=v.BYTES_PER_ELEMENT,u=x.bdata;n(u)||(u=Z(u));var b=x.shape===void 0?[u.byteLength/T]:(""+x.shape).split(",");b.reverse();var _=b.length,P,M,C=+b[0],A=T*C,h=0;if(_===1)f=new v(u);else if(_===2)for(P=+b[1],M=0;M{var c=Yi(),g=Ma().isArrayOrTypedArray;Z.exports=function(i,l){if(c(l))l=String(l);else if(typeof l!="string"||l.substr(l.length-4)==="[-1]")throw"bad property string";var f=l.split("."),x,y,v,T;for(T=0;T{var c=zo(),g=/^\w*$/,I=0,S=1,t=2,e=3,r=4;Z.exports=function(a,n,o,i){o=o||"name",i=i||"value";var l,f,x,y={};n&&n.length?(x=c(a,n),f=x.get()):f=a,n=n||"";var v={};if(f)for(l=0;l2)return y[_]=y[_]|t,u.set(b,null);if(T){for(l=_;l{var c=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,g=/^[^\.\[\]]+$/;Z.exports=function(I,S){for(;S;){var t=I.match(c);if(t)I=t[1];else if(I.match(g))I="";else throw new Error("bad relativeAttr call:"+[I,S]);if(S.charAt(0)==="^")S=S.slice(1);else break}return I&&S.charAt(0)!=="["?I+"."+S:I+S}}),Ts=Dt((Q,Z)=>{var c=Yi();Z.exports=function(g,I){if(g>0)return Math.log(g)/Math.LN10;var S=Math.log(Math.min(I[0],I[1]))/Math.LN10;return c(S)||(S=Math.log(Math.max(I[0],I[1]))/Math.LN10-6),S}}),xl=Dt((Q,Z)=>{var c=Ma().isArrayOrTypedArray,g=si();Z.exports=function I(S,t){for(var e in t){var r=t[e],a=S[e];if(a!==r)if(e.charAt(0)==="_"||typeof r=="function"){if(e in S)continue;S[e]=r}else if(c(r)&&c(a)&&g(r[0])){if(e==="customdata"||e==="ids")continue;for(var n=Math.min(r.length,a.length),o=0;o{function c(I,S){var t=I%S;return t<0?t+S:t}function g(I,S){return Math.abs(I)>S/2?I-Math.round(I/S)*S:I}Z.exports={mod:c,modHalf:g}}),ro=Dt((Q,Z)=>{(function(c){var g=/^\s+/,I=/\s+$/,S=0,t=c.round,e=c.min,r=c.max,a=c.random;function n(Y,ft){if(Y=Y||"",ft=ft||{},Y instanceof n)return Y;if(!(this instanceof n))return new n(Y,ft);var ut=o(Y);this._originalInput=Y,this._r=ut.r,this._g=ut.g,this._b=ut.b,this._a=ut.a,this._roundA=t(100*this._a)/100,this._format=ft.format||ut.format,this._gradientType=ft.gradientType,this._r<1&&(this._r=t(this._r)),this._g<1&&(this._g=t(this._g)),this._b<1&&(this._b=t(this._b)),this._ok=ut.ok,this._tc_id=S++}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ft,ut,kt,It,Pt,qt;return ft=Y.r/255,ut=Y.g/255,kt=Y.b/255,ft<=.03928?It=ft/12.92:It=c.pow((ft+.055)/1.055,2.4),ut<=.03928?Pt=ut/12.92:Pt=c.pow((ut+.055)/1.055,2.4),kt<=.03928?qt=kt/12.92:qt=c.pow((kt+.055)/1.055,2.4),.2126*It+.7152*Pt+.0722*qt},setAlpha:function(Y){return this._a=U(Y),this._roundA=t(100*this._a)/100,this},toHsv:function(){var Y=x(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=x(this._r,this._g,this._b),ft=t(Y.h*360),ut=t(Y.s*100),kt=t(Y.v*100);return this._a==1?"hsv("+ft+", "+ut+"%, "+kt+"%)":"hsva("+ft+", "+ut+"%, "+kt+"%, "+this._roundA+")"},toHsl:function(){var Y=l(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=l(this._r,this._g,this._b),ft=t(Y.h*360),ut=t(Y.s*100),kt=t(Y.l*100);return this._a==1?"hsl("+ft+", "+ut+"%, "+kt+"%)":"hsla("+ft+", "+ut+"%, "+kt+"%, "+this._roundA+")"},toHex:function(Y){return v(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return T(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:t(this._r),g:t(this._g),b:t(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+t(this._r)+", "+t(this._g)+", "+t(this._b)+")":"rgba("+t(this._r)+", "+t(this._g)+", "+t(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:t(W(this._r,255)*100)+"%",g:t(W(this._g,255)*100)+"%",b:t(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%)":"rgba("+t(W(this._r,255)*100)+"%, "+t(W(this._g,255)*100)+"%, "+t(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[v(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ft="#"+u(this._r,this._g,this._b,this._a),ut=ft,kt=this._gradientType?"GradientType = 1, ":"";if(Y){var It=n(Y);ut="#"+u(It._r,It._g,It._b,It._a)}return"progid:DXImageTransform.Microsoft.gradient("+kt+"startColorstr="+ft+",endColorstr="+ut+")"},toString:function(Y){var ft=!!Y;Y=Y||this._format;var ut=!1,kt=this._a<1&&this._a>=0,It=!ft&&kt&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return It?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(ut=this.toRgbString()),Y==="prgb"&&(ut=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(ut=this.toHexString()),Y==="hex3"&&(ut=this.toHexString(!0)),Y==="hex4"&&(ut=this.toHex8String(!0)),Y==="hex8"&&(ut=this.toHex8String()),Y==="name"&&(ut=this.toName()),Y==="hsl"&&(ut=this.toHslString()),Y==="hsv"&&(ut=this.toHsvString()),ut||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(Y,ft){var ut=Y.apply(null,[this].concat([].slice.call(ft)));return this._r=ut._r,this._g=ut._g,this._b=ut._b,this.setAlpha(ut._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(C,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(P,arguments)},spin:function(){return this._applyModification(h,arguments)},_applyCombination:function(Y,ft){return Y.apply(null,[this].concat([].slice.call(ft)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},n.fromRatio=function(Y,ft){if(typeof Y=="object"){var ut={};for(var kt in Y)Y.hasOwnProperty(kt)&&(kt==="a"?ut[kt]=Y[kt]:ut[kt]=st(Y[kt]));Y=ut}return n(Y,ft)};function o(Y){var ft={r:0,g:0,b:0},ut=1,kt=null,It=null,Pt=null,qt=!1,Wt=!1;return typeof Y=="string"&&(Y=vt(Y)),typeof Y=="object"&&(at(Y.r)&&at(Y.g)&&at(Y.b)?(ft=i(Y.r,Y.g,Y.b),qt=!0,Wt=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):at(Y.h)&&at(Y.s)&&at(Y.v)?(kt=st(Y.s),It=st(Y.v),ft=y(Y.h,kt,It),qt=!0,Wt="hsv"):at(Y.h)&&at(Y.s)&&at(Y.l)&&(kt=st(Y.s),Pt=st(Y.l),ft=f(Y.h,kt,Pt),qt=!0,Wt="hsl"),Y.hasOwnProperty("a")&&(ut=Y.a)),ut=U(ut),{ok:qt,format:Y.format||Wt,r:e(255,r(ft.r,0)),g:e(255,r(ft.g,0)),b:e(255,r(ft.b,0)),a:ut}}function i(Y,ft,ut){return{r:W(Y,255)*255,g:W(ft,255)*255,b:W(ut,255)*255}}function l(Y,ft,ut){Y=W(Y,255),ft=W(ft,255),ut=W(ut,255);var kt=r(Y,ft,ut),It=e(Y,ft,ut),Pt,qt,Wt=(kt+It)/2;if(kt==It)Pt=qt=0;else{var Jt=kt-It;switch(qt=Wt>.5?Jt/(2-kt-It):Jt/(kt+It),kt){case Y:Pt=(ft-ut)/Jt+(ft1&&(pe-=1),pe<1/6?ge+(fe-ge)*6*pe:pe<1/2?fe:pe<2/3?ge+(fe-ge)*(2/3-pe)*6:ge}if(ft===0)kt=It=Pt=ut;else{var Wt=ut<.5?ut*(1+ft):ut+ft-ut*ft,Jt=2*ut-Wt;kt=qt(Jt,Wt,Y+1/3),It=qt(Jt,Wt,Y),Pt=qt(Jt,Wt,Y-1/3)}return{r:kt*255,g:It*255,b:Pt*255}}function x(Y,ft,ut){Y=W(Y,255),ft=W(ft,255),ut=W(ut,255);var kt=r(Y,ft,ut),It=e(Y,ft,ut),Pt,qt,Wt=kt,Jt=kt-It;if(qt=kt===0?0:Jt/kt,kt==It)Pt=0;else{switch(kt){case Y:Pt=(ft-ut)/Jt+(ft>1)+720)%360;--ft;)kt.h=(kt.h+It)%360,Pt.push(n(kt));return Pt}function j(Y,ft){ft=ft||6;for(var ut=n(Y).toHsv(),kt=ut.h,It=ut.s,Pt=ut.v,qt=[],Wt=1/ft;ft--;)qt.push(n({h:kt,s:It,v:Pt})),Pt=(Pt+Wt)%1;return qt}n.mix=function(Y,ft,ut){ut=ut===0?0:ut||50;var kt=n(Y).toRgb(),It=n(ft).toRgb(),Pt=ut/100,qt={r:(It.r-kt.r)*Pt+kt.r,g:(It.g-kt.g)*Pt+kt.g,b:(It.b-kt.b)*Pt+kt.b,a:(It.a-kt.a)*Pt+kt.a};return n(qt)},n.readability=function(Y,ft){var ut=n(Y),kt=n(ft);return(c.max(ut.getLuminance(),kt.getLuminance())+.05)/(c.min(ut.getLuminance(),kt.getLuminance())+.05)},n.isReadable=function(Y,ft,ut){var kt=n.readability(Y,ft),It,Pt;switch(Pt=!1,It=it(ut),It.level+It.size){case"AAsmall":case"AAAlarge":Pt=kt>=4.5;break;case"AAlarge":Pt=kt>=3;break;case"AAAsmall":Pt=kt>=7;break}return Pt},n.mostReadable=function(Y,ft,ut){var kt=null,It=0,Pt,qt,Wt,Jt;ut=ut||{},qt=ut.includeFallbackColors,Wt=ut.level,Jt=ut.size;for(var ge=0;geIt&&(It=Pt,kt=n(ft[ge]));return n.isReadable(Y,kt,{level:Wt,size:Jt})||!qt?kt:(ut.includeFallbackColors=!1,n.mostReadable(Y,["#fff","#000"],ut))};var V=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},H=n.hexNames=F(V);function F(Y){var ft={};for(var ut in Y)Y.hasOwnProperty(ut)&&(ft[Y[ut]]=ut);return ft}function U(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function W(Y,ft){lt(Y)&&(Y="100%");var ut=yt(Y);return Y=e(ft,r(0,parseFloat(Y))),ut&&(Y=parseInt(Y*ft,10)/100),c.abs(Y-ft)<1e-6?1:Y%ft/parseFloat(ft)}function q(Y){return e(1,r(0,Y))}function J(Y){return parseInt(Y,16)}function lt(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function yt(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function mt(Y){return Y.length==1?"0"+Y:""+Y}function st(Y){return Y<=1&&(Y=Y*100+"%"),Y}function tt(Y){return c.round(parseFloat(Y)*255).toString(16)}function dt(Y){return J(Y)/255}var rt=function(){var Y="[-\\+]?\\d+%?",ft="[-\\+]?\\d*\\.\\d+%?",ut="(?:"+ft+")|(?:"+Y+")",kt="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?",It="[\\s|\\(]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")[,|\\s]+("+ut+")\\s*\\)?";return{CSS_UNIT:new RegExp(ut),rgb:new RegExp("rgb"+kt),rgba:new RegExp("rgba"+It),hsl:new RegExp("hsl"+kt),hsla:new RegExp("hsla"+It),hsv:new RegExp("hsv"+kt),hsva:new RegExp("hsva"+It),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function at(Y){return!!rt.CSS_UNIT.exec(Y)}function vt(Y){Y=Y.replace(g,"").replace(I,"").toLowerCase();var ft=!1;if(V[Y])Y=V[Y],ft=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ut;return(ut=rt.rgb.exec(Y))?{r:ut[1],g:ut[2],b:ut[3]}:(ut=rt.rgba.exec(Y))?{r:ut[1],g:ut[2],b:ut[3],a:ut[4]}:(ut=rt.hsl.exec(Y))?{h:ut[1],s:ut[2],l:ut[3]}:(ut=rt.hsla.exec(Y))?{h:ut[1],s:ut[2],l:ut[3],a:ut[4]}:(ut=rt.hsv.exec(Y))?{h:ut[1],s:ut[2],v:ut[3]}:(ut=rt.hsva.exec(Y))?{h:ut[1],s:ut[2],v:ut[3],a:ut[4]}:(ut=rt.hex8.exec(Y))?{r:J(ut[1]),g:J(ut[2]),b:J(ut[3]),a:dt(ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex6.exec(Y))?{r:J(ut[1]),g:J(ut[2]),b:J(ut[3]),format:ft?"name":"hex"}:(ut=rt.hex4.exec(Y))?{r:J(ut[1]+""+ut[1]),g:J(ut[2]+""+ut[2]),b:J(ut[3]+""+ut[3]),a:dt(ut[4]+""+ut[4]),format:ft?"name":"hex8"}:(ut=rt.hex3.exec(Y))?{r:J(ut[1]+""+ut[1]),g:J(ut[2]+""+ut[2]),b:J(ut[3]+""+ut[3]),format:ft?"name":"hex"}:!1}function it(Y){var ft,ut;return Y=Y||{level:"AA",size:"small"},ft=(Y.level||"AA").toUpperCase(),ut=(Y.size||"small").toLowerCase(),ft!=="AA"&&ft!=="AAA"&&(ft="AA"),ut!=="small"&&ut!=="large"&&(ut="small"),{level:ft,size:ut}}typeof Z<"u"&&Z.exports?Z.exports=n:window.tinycolor=n})(Math)}),Ia=Dt(Q=>{var Z=si(),c=Array.isArray;function g(S,t){var e,r;for(e=0;e{Z.exports=function(c){var g=c.variantValues,I=c.editType,S=c.colorEditType;S===void 0&&(S=I);var t={editType:I,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};c.noNumericWeightValues&&(t.valType="enumerated",t.values=t.extras,t.extras=void 0,t.min=void 0,t.max=void 0);var e={family:{valType:"string",noBlank:!0,strict:!0,editType:I},size:{valType:"number",min:1,editType:I},color:{valType:"color",editType:S},weight:t,style:{editType:I,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:c.noFontVariant?void 0:{editType:I,valType:"enumerated",values:g||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:c.noFontTextcase?void 0:{editType:I,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:c.noFontLineposition?void 0:{editType:I,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:c.noFontShadow?void 0:{editType:I,valType:"string",dflt:c.autoShadowDflt?"auto":"none"},editType:I};return c.autoSize&&(e.size.dflt="auto"),c.autoColor&&(e.color.dflt="auto"),c.arrayOk&&(e.family.arrayOk=!0,e.weight.arrayOk=!0,e.style.arrayOk=!0,c.noFontVariant||(e.variant.arrayOk=!0),c.noFontTextcase||(e.textcase.arrayOk=!0),c.noFontLineposition||(e.lineposition.arrayOk=!0),c.noFontShadow||(e.shadow.arrayOk=!0),e.size.arrayOk=!0,e.color.arrayOk=!0),e}}),no=Dt((Q,Z)=>{Z.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}),po=Dt((Q,Z)=>{var c=no(),g=da(),I=g({editType:"none"});I.family.dflt=c.HOVERFONT,I.size.dflt=c.HOVERFONTSIZE,Z.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:I,grouptitlefont:g({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}),us=Dt((Q,Z)=>{var c=da(),g=po().hoverlabel,I=Ia().extendFlat;Z.exports={hoverlabel:{bgcolor:I({},g.bgcolor,{arrayOk:!0}),bordercolor:I({},g.bordercolor,{arrayOk:!0}),font:c({arrayOk:!0,editType:"none"}),align:I({},g.align,{arrayOk:!0}),namelength:I({},g.namelength,{arrayOk:!0}),showarrow:I({},g.showarrow),editType:"none"}}}),Ho=Dt((Q,Z)=>{var c=da(),g=us();Z.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:c({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:g.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}),vi=Dt((Q,Z)=>{var c=ro(),g={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},I=g.RdBu;function S(r,a){if(a||(a=I),!r)return a;function n(){try{r=g[r]||JSON.parse(r)}catch{r=a}}return typeof r=="string"&&(n(),typeof r=="string"&&n()),t(r)?r:a}function t(r){var a=0;if(!Array.isArray(r)||r.length<2||!r[0]||!r[r.length-1]||+r[0][0]!=0||+r[r.length-1][0]!=1)return!1;for(var n=0;n{Q.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Q.defaultLine="#444",Q.lightLine="#eee",Q.background="#fff",Q.borderLine="#BEC8D9",Q.lightFraction=1e3/11}),hi=Dt((Q,Z)=>{var c=ro(),g=Yi(),I=Ma().isTypedArray,S=Z.exports={},t=wi();S.defaults=t.defaults;var e=S.defaultLine=t.defaultLine;S.lightLine=t.lightLine;var r=S.background=t.background;S.tinyRGB=function(n){var o=n.toRgb();return"rgb("+Math.round(o.r)+", "+Math.round(o.g)+", "+Math.round(o.b)+")"},S.rgb=function(n){return S.tinyRGB(c(n))},S.opacity=function(n){return n?c(n).getAlpha():0},S.addOpacity=function(n,o){var i=c(n).toRgb();return"rgba("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+", "+o+")"},S.combine=function(n,o){var i=c(n).toRgb();if(i.a===1)return c(n).toRgbString();var l=c(o||r).toRgb(),f=l.a===1?l:{r:255*(1-l.a)+l.r*l.a,g:255*(1-l.a)+l.g*l.a,b:255*(1-l.a)+l.b*l.a},x={r:f.r*(1-i.a)+i.r*i.a,g:f.g*(1-i.a)+i.g*i.a,b:f.b*(1-i.a)+i.b*i.a};return c(x).toRgbString()},S.interpolate=function(n,o,i){var l=c(n).toRgb(),f=c(o).toRgb(),x={r:i*l.r+(1-i)*f.r,g:i*l.g+(1-i)*f.g,b:i*l.b+(1-i)*f.b};return c(x).toRgbString()},S.contrast=function(n,o,i){var l=c(n);l.getAlpha()!==1&&(l=c(S.combine(n,r)));var f=l.isDark()?o?l.lighten(o):r:i?l.darken(i):e;return f.toString()},S.stroke=function(n,o){var i=c(o);n.style({stroke:S.tinyRGB(i),"stroke-opacity":i.getAlpha()})},S.fill=function(n,o){var i=c(o);n.style({fill:S.tinyRGB(i),"fill-opacity":i.getAlpha()})},S.clean=function(n){if(!(!n||typeof n!="object")){var o=Object.keys(n),i,l,f,x;for(i=0;i=0)))return n;if(x===3)l[x]>1&&(l[x]=1);else if(l[x]>=1)return n}var y=Math.round(l[0]*255)+", "+Math.round(l[1]*255)+", "+Math.round(l[2]*255);return f?"rgba("+y+", "+l[3]+")":"rgb("+y+")"}}),go=Dt((Q,Z)=>{Z.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}),Mo=Dt(Q=>{Q.counter=function(Z,c,g,I){var S=(c||"")+(g?"":"$"),t=I===!1?"":"^";return Z==="xy"?new RegExp(t+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+S):new RegExp(t+Z+"([2-9]|[1-9][0-9]+)?"+S)}}),To=Dt(Q=>{var Z=Yi(),c=ro(),g=Ia().extendFlat,I=Ho(),S=vi(),t=hi(),e=go().DESELECTDIM,r=zo(),a=Mo().counter,n=ko().modHalf,o=Ma().isArrayOrTypedArray,i=Ma().isTypedArraySpec,l=Ma().decodeTypedArraySpec;Q.valObjectMeta={data_array:{coerceFunction:function(x,y,v){y.set(o(x)?x:i(x)?l(x):v)}},enumerated:{coerceFunction:function(x,y,v,T){T.coerceNumber&&(x=+x),T.values.indexOf(x)===-1?y.set(v):y.set(x)},validateFunction:function(x,y){y.coerceNumber&&(x=+x);for(var v=y.values,T=0;TT.max?y.set(v):y.set(+x)}},integer:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}i(x)&&(x=l(x)),x%1||!Z(x)||T.min!==void 0&&xT.max?y.set(v):y.set(+x)}},string:{coerceFunction:function(x,y,v,T){if(typeof x!="string"){var u=typeof x=="number";T.strict===!0||!u?y.set(v):y.set(String(x))}else T.noBlank&&!x?y.set(v):y.set(x)}},color:{coerceFunction:function(x,y,v){i(x)&&(x=l(x)),c(x).isValid()?y.set(x):y.set(v)}},colorlist:{coerceFunction:function(x,y,v){function T(u){return c(u).isValid()}!Array.isArray(x)||!x.length?y.set(v):x.every(T)?y.set(x):y.set(v)}},colorscale:{coerceFunction:function(x,y,v){y.set(S.get(x,v))}},angle:{coerceFunction:function(x,y,v){i(x)&&(x=l(x)),x==="auto"?y.set("auto"):Z(x)?y.set(n(+x,360)):y.set(v)}},subplotid:{coerceFunction:function(x,y,v,T){var u=T.regex||a(v);if(typeof x=="string"&&u.test(x)){y.set(x);return}y.set(v)},validateFunction:function(x,y){var v=y.dflt;return x===v?!0:typeof x!="string"?!1:!!a(v).test(x)}},flaglist:{coerceFunction:function(x,y,v,T){if((T.extras||[]).indexOf(x)!==-1){y.set(x);return}if(typeof x!="string"){y.set(v);return}for(var u=x.split("+"),b=0;b{var c={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},g={};function I(S,t){for(var e in S){var r=S[e];r.valType?t[e]=r.dflt:(t[e]||(t[e]={}),I(r,t[e]))}}I(c,g),Z.exports={configAttributes:c,dfltConfig:g}}),bs=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=[];Z.exports=function(S,t){if(I.indexOf(S)!==-1)return;I.push(S);var e=1e3;g(t)?e=t:t==="long"&&(e=3e3);var r=c.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(I);function n(o){o.duration(700).style("opacity",0).each("end",function(i){var l=I.indexOf(i);l!==-1&&I.splice(l,1),c.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var i=c.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",function(){i.transition().call(n)});for(var l=i.append("p"),f=o.split(//g),x=0;x{var c=ms().dfltConfig,g=bs(),I=Z.exports={};I.log=function(){var S;if(c.logging>1){var t=["LOG:"];for(S=0;S1){var e=[];for(S=0;S"),"long")}},I.warn=function(){var S;if(c.logging>0){var t=["WARN:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}},I.error=function(){var S;if(c.logging>0){var t=["ERROR:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}}}),Yo=Dt((Q,Z)=>{Z.exports=function(){}}),Ol=Dt((Q,Z)=>{Z.exports=function(c,g){if(g instanceof RegExp){for(var I=g.toString(),S=0;S{Z.exports=c;function c(){var g=new Float32Array(16);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),Bl=Dt((Q,Z)=>{Z.exports=c;function c(g){var I=new Float32Array(16);return I[0]=g[0],I[1]=g[1],I[2]=g[2],I[3]=g[3],I[4]=g[4],I[5]=g[5],I[6]=g[6],I[7]=g[7],I[8]=g[8],I[9]=g[9],I[10]=g[10],I[11]=g[11],I[12]=g[12],I[13]=g[13],I[14]=g[14],I[15]=g[15],I}}),vu=Dt((Q,Z)=>{Z.exports=c;function c(g,I){return g[0]=I[0],g[1]=I[1],g[2]=I[2],g[3]=I[3],g[4]=I[4],g[5]=I[5],g[6]=I[6],g[7]=I[7],g[8]=I[8],g[9]=I[9],g[10]=I[10],g[11]=I[11],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15],g}}),tc=Dt((Q,Z)=>{Z.exports=c;function c(g){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),fh=Dt((Q,Z)=>{Z.exports=c;function c(g,I){if(g===I){var S=I[1],t=I[2],e=I[3],r=I[6],a=I[7],n=I[11];g[1]=I[4],g[2]=I[8],g[3]=I[12],g[4]=S,g[6]=I[9],g[7]=I[13],g[8]=t,g[9]=r,g[11]=I[14],g[12]=e,g[13]=a,g[14]=n}else g[0]=I[0],g[1]=I[4],g[2]=I[8],g[3]=I[12],g[4]=I[1],g[5]=I[5],g[6]=I[9],g[7]=I[13],g[8]=I[2],g[9]=I[6],g[10]=I[10],g[11]=I[14],g[12]=I[3],g[13]=I[7],g[14]=I[11],g[15]=I[15];return g}}),Fc=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=I[0],t=I[1],e=I[2],r=I[3],a=I[4],n=I[5],o=I[6],i=I[7],l=I[8],f=I[9],x=I[10],y=I[11],v=I[12],T=I[13],u=I[14],b=I[15],_=S*n-t*a,P=S*o-e*a,M=S*i-r*a,C=t*o-e*n,A=t*i-r*n,h=e*i-r*o,p=l*T-f*v,k=l*u-x*v,w=l*b-y*v,R=f*u-x*T,O=f*b-y*T,j=x*b-y*u,V=_*j-P*O+M*R+C*w-A*k+h*p;return V?(V=1/V,g[0]=(n*j-o*O+i*R)*V,g[1]=(e*O-t*j-r*R)*V,g[2]=(T*h-u*A+b*C)*V,g[3]=(x*A-f*h-y*C)*V,g[4]=(o*w-a*j-i*k)*V,g[5]=(S*j-e*w+r*k)*V,g[6]=(u*M-v*h-b*P)*V,g[7]=(l*h-x*M+y*P)*V,g[8]=(a*O-n*w+i*p)*V,g[9]=(t*w-S*O-r*p)*V,g[10]=(v*A-T*M+b*_)*V,g[11]=(f*M-l*A-y*_)*V,g[12]=(n*k-a*R-o*p)*V,g[13]=(S*R-t*k+e*p)*V,g[14]=(T*P-v*C-u*_)*V,g[15]=(l*C-f*P+x*_)*V,g):null}}),op=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=I[0],t=I[1],e=I[2],r=I[3],a=I[4],n=I[5],o=I[6],i=I[7],l=I[8],f=I[9],x=I[10],y=I[11],v=I[12],T=I[13],u=I[14],b=I[15];return g[0]=n*(x*b-y*u)-f*(o*b-i*u)+T*(o*y-i*x),g[1]=-(t*(x*b-y*u)-f*(e*b-r*u)+T*(e*y-r*x)),g[2]=t*(o*b-i*u)-n*(e*b-r*u)+T*(e*i-r*o),g[3]=-(t*(o*y-i*x)-n*(e*y-r*x)+f*(e*i-r*o)),g[4]=-(a*(x*b-y*u)-l*(o*b-i*u)+v*(o*y-i*x)),g[5]=S*(x*b-y*u)-l*(e*b-r*u)+v*(e*y-r*x),g[6]=-(S*(o*b-i*u)-a*(e*b-r*u)+v*(e*i-r*o)),g[7]=S*(o*y-i*x)-a*(e*y-r*x)+l*(e*i-r*o),g[8]=a*(f*b-y*T)-l*(n*b-i*T)+v*(n*y-i*f),g[9]=-(S*(f*b-y*T)-l*(t*b-r*T)+v*(t*y-r*f)),g[10]=S*(n*b-i*T)-a*(t*b-r*T)+v*(t*i-r*n),g[11]=-(S*(n*y-i*f)-a*(t*y-r*f)+l*(t*i-r*n)),g[12]=-(a*(f*u-x*T)-l*(n*u-o*T)+v*(n*x-o*f)),g[13]=S*(f*u-x*T)-l*(t*u-e*T)+v*(t*x-e*f),g[14]=-(S*(n*u-o*T)-a*(t*u-e*T)+v*(t*o-e*n)),g[15]=S*(n*x-o*f)-a*(t*x-e*f)+l*(t*o-e*n),g}}),Kd=Dt((Q,Z)=>{Z.exports=c;function c(g){var I=g[0],S=g[1],t=g[2],e=g[3],r=g[4],a=g[5],n=g[6],o=g[7],i=g[8],l=g[9],f=g[10],x=g[11],y=g[12],v=g[13],T=g[14],u=g[15],b=I*a-S*r,_=I*n-t*r,P=I*o-e*r,M=S*n-t*a,C=S*o-e*a,A=t*o-e*n,h=i*v-l*y,p=i*T-f*y,k=i*u-x*y,w=l*T-f*v,R=l*u-x*v,O=f*u-x*T;return b*O-_*R+P*w+M*k-C*p+A*h}}),e0=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=I[0],e=I[1],r=I[2],a=I[3],n=I[4],o=I[5],i=I[6],l=I[7],f=I[8],x=I[9],y=I[10],v=I[11],T=I[12],u=I[13],b=I[14],_=I[15],P=S[0],M=S[1],C=S[2],A=S[3];return g[0]=P*t+M*n+C*f+A*T,g[1]=P*e+M*o+C*x+A*u,g[2]=P*r+M*i+C*y+A*b,g[3]=P*a+M*l+C*v+A*_,P=S[4],M=S[5],C=S[6],A=S[7],g[4]=P*t+M*n+C*f+A*T,g[5]=P*e+M*o+C*x+A*u,g[6]=P*r+M*i+C*y+A*b,g[7]=P*a+M*l+C*v+A*_,P=S[8],M=S[9],C=S[10],A=S[11],g[8]=P*t+M*n+C*f+A*T,g[9]=P*e+M*o+C*x+A*u,g[10]=P*r+M*i+C*y+A*b,g[11]=P*a+M*l+C*v+A*_,P=S[12],M=S[13],C=S[14],A=S[15],g[12]=P*t+M*n+C*f+A*T,g[13]=P*e+M*o+C*x+A*u,g[14]=P*r+M*i+C*y+A*b,g[15]=P*a+M*l+C*v+A*_,g}}),d0=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=S[0],e=S[1],r=S[2],a,n,o,i,l,f,x,y,v,T,u,b;return I===g?(g[12]=I[0]*t+I[4]*e+I[8]*r+I[12],g[13]=I[1]*t+I[5]*e+I[9]*r+I[13],g[14]=I[2]*t+I[6]*e+I[10]*r+I[14],g[15]=I[3]*t+I[7]*e+I[11]*r+I[15]):(a=I[0],n=I[1],o=I[2],i=I[3],l=I[4],f=I[5],x=I[6],y=I[7],v=I[8],T=I[9],u=I[10],b=I[11],g[0]=a,g[1]=n,g[2]=o,g[3]=i,g[4]=l,g[5]=f,g[6]=x,g[7]=y,g[8]=v,g[9]=T,g[10]=u,g[11]=b,g[12]=a*t+l*e+v*r+I[12],g[13]=n*t+f*e+T*r+I[13],g[14]=o*t+x*e+u*r+I[14],g[15]=i*t+y*e+b*r+I[15]),g}}),Dm=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=S[0],e=S[1],r=S[2];return g[0]=I[0]*t,g[1]=I[1]*t,g[2]=I[2]*t,g[3]=I[3]*t,g[4]=I[4]*e,g[5]=I[5]*e,g[6]=I[6]*e,g[7]=I[7]*e,g[8]=I[8]*r,g[9]=I[9]*r,g[10]=I[10]*r,g[11]=I[11]*r,g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15],g}}),uv=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t){var e=t[0],r=t[1],a=t[2],n=Math.sqrt(e*e+r*r+a*a),o,i,l,f,x,y,v,T,u,b,_,P,M,C,A,h,p,k,w,R,O,j,V,H;return Math.abs(n)<1e-6?null:(n=1/n,e*=n,r*=n,a*=n,o=Math.sin(S),i=Math.cos(S),l=1-i,f=I[0],x=I[1],y=I[2],v=I[3],T=I[4],u=I[5],b=I[6],_=I[7],P=I[8],M=I[9],C=I[10],A=I[11],h=e*e*l+i,p=r*e*l+a*o,k=a*e*l-r*o,w=e*r*l-a*o,R=r*r*l+i,O=a*r*l+e*o,j=e*a*l+r*o,V=r*a*l-e*o,H=a*a*l+i,g[0]=f*h+T*p+P*k,g[1]=x*h+u*p+M*k,g[2]=y*h+b*p+C*k,g[3]=v*h+_*p+A*k,g[4]=f*w+T*R+P*O,g[5]=x*w+u*R+M*O,g[6]=y*w+b*R+C*O,g[7]=v*w+_*R+A*O,g[8]=f*j+T*V+P*H,g[9]=x*j+u*V+M*H,g[10]=y*j+b*V+C*H,g[11]=v*j+_*V+A*H,I!==g&&(g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g)}}),sp=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=Math.sin(S),e=Math.cos(S),r=I[4],a=I[5],n=I[6],o=I[7],i=I[8],l=I[9],f=I[10],x=I[11];return I!==g&&(g[0]=I[0],g[1]=I[1],g[2]=I[2],g[3]=I[3],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g[4]=r*e+i*t,g[5]=a*e+l*t,g[6]=n*e+f*t,g[7]=o*e+x*t,g[8]=i*e-r*t,g[9]=l*e-a*t,g[10]=f*e-n*t,g[11]=x*e-o*t,g}}),p0=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=Math.sin(S),e=Math.cos(S),r=I[0],a=I[1],n=I[2],o=I[3],i=I[8],l=I[9],f=I[10],x=I[11];return I!==g&&(g[4]=I[4],g[5]=I[5],g[6]=I[6],g[7]=I[7],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g[0]=r*e-i*t,g[1]=a*e-l*t,g[2]=n*e-f*t,g[3]=o*e-x*t,g[8]=r*t+i*e,g[9]=a*t+l*e,g[10]=n*t+f*e,g[11]=o*t+x*e,g}}),Fm=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=Math.sin(S),e=Math.cos(S),r=I[0],a=I[1],n=I[2],o=I[3],i=I[4],l=I[5],f=I[6],x=I[7];return I!==g&&(g[8]=I[8],g[9]=I[9],g[10]=I[10],g[11]=I[11],g[12]=I[12],g[13]=I[13],g[14]=I[14],g[15]=I[15]),g[0]=r*e+i*t,g[1]=a*e+l*t,g[2]=n*e+f*t,g[3]=o*e+x*t,g[4]=i*e-r*t,g[5]=l*e-a*t,g[6]=f*e-n*t,g[7]=x*e-o*t,g}}),Fy=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t,e,r,a=S[0],n=S[1],o=S[2],i=Math.sqrt(a*a+n*n+o*o);return Math.abs(i)<1e-6?null:(i=1/i,a*=i,n*=i,o*=i,t=Math.sin(I),e=Math.cos(I),r=1-e,g[0]=a*a*r+e,g[1]=n*a*r+o*t,g[2]=o*a*r-n*t,g[3]=0,g[4]=a*n*r-o*t,g[5]=n*n*r+e,g[6]=o*n*r+a*t,g[7]=0,g[8]=a*o*r+n*t,g[9]=n*o*r-a*t,g[10]=o*o*r+e,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g)}}),n6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){var t=I[0],e=I[1],r=I[2],a=I[3],n=t+t,o=e+e,i=r+r,l=t*n,f=t*o,x=t*i,y=e*o,v=e*i,T=r*i,u=a*n,b=a*o,_=a*i;return g[0]=1-(y+T),g[1]=f+_,g[2]=x-b,g[3]=0,g[4]=f-_,g[5]=1-(l+T),g[6]=v+u,g[7]=0,g[8]=x+b,g[9]=v-u,g[10]=1-(l+y),g[11]=0,g[12]=S[0],g[13]=S[1],g[14]=S[2],g[15]=1,g}}),fw=Dt((Q,Z)=>{Z.exports=c;function c(g,I){return g[0]=I[0],g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=I[1],g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=I[2],g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),dw=Dt((Q,Z)=>{Z.exports=c;function c(g,I){return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=I[0],g[13]=I[1],g[14]=I[2],g[15]=1,g}}),pw=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=Math.sin(I),t=Math.cos(I);return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=t,g[6]=S,g[7]=0,g[8]=0,g[9]=-S,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),i6=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=Math.sin(I),t=Math.cos(I);return g[0]=t,g[1]=0,g[2]=-S,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=S,g[9]=0,g[10]=t,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),a6=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=Math.sin(I),t=Math.cos(I);return g[0]=t,g[1]=S,g[2]=0,g[3]=0,g[4]=-S,g[5]=t,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=1,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),o6=Dt((Q,Z)=>{Z.exports=c;function c(g,I){var S=I[0],t=I[1],e=I[2],r=I[3],a=S+S,n=t+t,o=e+e,i=S*a,l=t*a,f=t*n,x=e*a,y=e*n,v=e*o,T=r*a,u=r*n,b=r*o;return g[0]=1-f-v,g[1]=l+b,g[2]=x-u,g[3]=0,g[4]=l-b,g[5]=1-i-v,g[6]=y+T,g[7]=0,g[8]=x+u,g[9]=y-T,g[10]=1-i-f,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,g}}),s6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t,e,r,a){var n=1/(S-I),o=1/(e-t),i=1/(r-a);return g[0]=r*2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r*2*o,g[6]=0,g[7]=0,g[8]=(S+I)*n,g[9]=(e+t)*o,g[10]=(a+r)*i,g[11]=-1,g[12]=0,g[13]=0,g[14]=a*r*2*i,g[15]=0,g}}),l6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t,e){var r=1/Math.tan(I/2),a=1/(t-e);return g[0]=r/S,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=r,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=(e+t)*a,g[11]=-1,g[12]=0,g[13]=0,g[14]=2*e*t*a,g[15]=0,g}}),u6=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t){var e=Math.tan(I.upDegrees*Math.PI/180),r=Math.tan(I.downDegrees*Math.PI/180),a=Math.tan(I.leftDegrees*Math.PI/180),n=Math.tan(I.rightDegrees*Math.PI/180),o=2/(a+n),i=2/(e+r);return g[0]=o,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=i,g[6]=0,g[7]=0,g[8]=-((a-n)*o*.5),g[9]=(e-r)*i*.5,g[10]=t/(S-t),g[11]=-1,g[12]=0,g[13]=0,g[14]=t*S/(S-t),g[15]=0,g}}),A_=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S,t,e,r,a){var n=1/(I-S),o=1/(t-e),i=1/(r-a);return g[0]=-2*n,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=-2*o,g[6]=0,g[7]=0,g[8]=0,g[9]=0,g[10]=2*i,g[11]=0,g[12]=(I+S)*n,g[13]=(e+t)*o,g[14]=(a+r)*i,g[15]=1,g}}),c6=Dt((Q,Z)=>{var c=tc();Z.exports=g;function g(I,S,t,e){var r,a,n,o,i,l,f,x,y,v,T=S[0],u=S[1],b=S[2],_=e[0],P=e[1],M=e[2],C=t[0],A=t[1],h=t[2];return Math.abs(T-C)<1e-6&&Math.abs(u-A)<1e-6&&Math.abs(b-h)<1e-6?c(I):(f=T-C,x=u-A,y=b-h,v=1/Math.sqrt(f*f+x*x+y*y),f*=v,x*=v,y*=v,r=P*y-M*x,a=M*f-_*y,n=_*x-P*f,v=Math.sqrt(r*r+a*a+n*n),v?(v=1/v,r*=v,a*=v,n*=v):(r=0,a=0,n=0),o=x*n-y*a,i=y*r-f*n,l=f*a-x*r,v=Math.sqrt(o*o+i*i+l*l),v?(v=1/v,o*=v,i*=v,l*=v):(o=0,i=0,l=0),I[0]=r,I[1]=o,I[2]=f,I[3]=0,I[4]=a,I[5]=i,I[6]=x,I[7]=0,I[8]=n,I[9]=l,I[10]=y,I[11]=0,I[12]=-(r*T+a*u+n*b),I[13]=-(o*T+i*u+l*b),I[14]=-(f*T+x*u+y*b),I[15]=1,I)}}),h6=Dt((Q,Z)=>{Z.exports=c;function c(g){return"mat4("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+", "+g[4]+", "+g[5]+", "+g[6]+", "+g[7]+", "+g[8]+", "+g[9]+", "+g[10]+", "+g[11]+", "+g[12]+", "+g[13]+", "+g[14]+", "+g[15]+")"}}),mw=Dt((Q,Z)=>{Z.exports={create:Ns(),clone:Bl(),copy:vu(),identity:tc(),transpose:fh(),invert:Fc(),adjoint:op(),determinant:Kd(),multiply:e0(),translate:d0(),scale:Dm(),rotate:uv(),rotateX:sp(),rotateY:p0(),rotateZ:Fm(),fromRotation:Fy(),fromRotationTranslation:n6(),fromScaling:fw(),fromTranslation:dw(),fromXRotation:pw(),fromYRotation:i6(),fromZRotation:a6(),fromQuat:o6(),frustum:s6(),perspective:l6(),perspectiveFromFieldOfView:u6(),ortho:A_(),lookAt:c6(),str:h6()}}),M_=Dt(Q=>{var Z=mw();Q.init2dArray=function(c,g){for(var I=new Array(c),S=0;S{var c=qr(),g=as(),I=M_(),S=mw();function t(T){var u;if(typeof T=="string"){if(u=document.getElementById(T),u===null)throw new Error("No DOM element with id '"+T+"' exists on the page.");return u}else if(T==null)throw new Error("DOM element provided is null or undefined");return T}function e(T){var u=c.select(T);return u.node()instanceof HTMLElement&&u.size()&&u.classed("js-plotly-plot")}function r(T){var u=T&&T.parentNode;u&&u.removeChild(T)}function a(T,u){n("global",T,u)}function n(T,u,b){var _="plotly.js-style-"+T,P=document.getElementById(_);if(!(P&&P.matches(".no-inline-styles"))){P||(P=document.createElement("style"),P.setAttribute("id",_),P.appendChild(document.createTextNode("")),document.head.appendChild(P));var M=P.sheet;M?M.insertRule?M.insertRule(u+"{"+b+"}",0):M.addRule?M.addRule(u,b,0):g.warn("addStyleRule failed"):g.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function o(T){var u="plotly.js-style-"+T,b=document.getElementById(u);b&&r(b)}function i(T,u,b,_,P,M){var C=_.split(":"),A=P.split(":"),h="data-btn-style-event-added";M||(M=document),M.querySelectorAll(T).forEach(function(p){p.getAttribute(h)||(p.addEventListener("mouseenter",function(){var k=this.querySelector(b);k&&(k.style[C[0]]=C[1])}),p.addEventListener("mouseleave",function(){var k=this.querySelector(b);k&&(u&&this.matches(u)?k.style[C[0]]=C[1]:k.style[A[0]]=A[1])}),p.setAttribute(h,!0))})}function l(T){var u=x(T),b=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return u.forEach(function(_){var P=f(_);if(P){var M=I.convertCssMatrix(P);b=S.multiply(b,b,M)}}),b}function f(T){var u=window.getComputedStyle(T,null),b=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("-moz-transform")||u.getPropertyValue("-ms-transform")||u.getPropertyValue("-o-transform")||u.getPropertyValue("transform");return b==="none"?null:b.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(_){return+_})}function x(T){for(var u=[];y(T);)u.push(T),T=T.parentNode,typeof ShadowRoot=="function"&&T instanceof ShadowRoot&&(T=T.host);return u}function y(T){return T&&(T instanceof Element||T instanceof HTMLElement)}function v(T,u){return T&&u&&T.top===u.top&&T.left===u.left&&T.right===u.right&&T.bottom===u.bottom}Z.exports={getGraphDiv:t,isPlotDiv:e,removeElement:r,addStyleRule:a,addRelatedStyleRule:n,deleteRelatedStyleRule:o,setStyleOnHover:i,getFullTransformMatrix:l,getElementTransformMatrix:f,getElementAndAncestors:x,equalDomRects:v}}),El=Dt((Q,Z)=>{Z.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}}),Yc=Dt((Q,Z)=>{var c=Ia().extendFlat,g=si(),I={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},S={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},t=I.flags.slice().concat(["fullReplot"]),e=S.flags.slice().concat("layoutReplot");Z.exports={traces:I,layout:S,traceFlags:function(){return r(t)},layoutFlags:function(){return r(e)},update:function(o,i){var l=i.editType;if(l&&l!=="none")for(var f=l.split("+"),x=0;x{Q.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},Q.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}}),S_=Dt((Q,Z)=>{Z.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}}),Zu=Dt(Q=>{var{DATE_FORMAT_LINK:Z,FORMAT_LINK:c}=S_(),g=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function I({supportOther:S}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(S?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,c,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,Z,"for details on the date formatting syntax.",g].join(" ")}Q.templateFormatStringDescription=I,Q.hovertemplateAttrs=({editType:S="none",arrayOk:t}={},e={})=>Mr({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.texttemplateAttrs=({editType:S="calc",arrayOk:t}={},e={})=>Mr({valType:"string",dflt:"",editType:S},t!==!1?{arrayOk:!0}:{}),Q.shapeTexttemplateAttrs=({editType:S="arraydraw",newshape:t}={},e={})=>({valType:"string",dflt:"",editType:S}),Q.templatefallbackAttrs=({editType:S="none"}={})=>({valType:"any",dflt:"-",editType:S})}),_1=Dt((Q,Z)=>{function c(b,_){return _?_.d2l(b):b}function g(b,_){return _?_.l2d(b):b}function I(b){return b.x0}function S(b){return b.x1}function t(b){return b.y0}function e(b){return b.y1}function r(b){return b.x0shift||0}function a(b){return b.x1shift||0}function n(b){return b.y0shift||0}function o(b){return b.y1shift||0}function i(b,_){return c(b.x1,_)+a(b)-c(b.x0,_)-r(b)}function l(b,_,P){return c(b.y1,P)+o(b)-c(b.y0,P)-n(b)}function f(b,_){return Math.abs(i(b,_))}function x(b,_,P){return Math.abs(l(b,_,P))}function y(b,_,P){return b.type!=="line"?void 0:Math.sqrt(Math.pow(i(b,_),2)+Math.pow(l(b,_,P),2))}function v(b,_){return g((c(b.x1,_)+a(b)+c(b.x0,_)+r(b))/2,_)}function T(b,_,P){return g((c(b.y1,P)+o(b)+c(b.y0,P)+n(b))/2,P)}function u(b,_,P){return b.type!=="line"?void 0:l(b,_,P)/i(b,_)}Z.exports={x0:I,x1:S,y0:t,y1:e,slope:u,dx:i,dy:l,width:f,height:x,length:y,xcenter:v,ycenter:T}}),gw=Dt((Q,Z)=>{var c=Yc().overrideAll,g=Ho(),I=da(),S=kd().dash,t=Ia().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=_1();Z.exports=c({newshape:{visible:t({},g.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:t({},g.legend,{}),legendgroup:t({},g.legendgroup,{}),legendgrouptitle:{text:t({},g.legendgrouptitle.text,{}),font:I({})},legendrank:t({},g.legendrank,{}),legendwidth:t({},g.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:t({},S,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:t({},g.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(a)}),texttemplatefallback:r({editType:"arraydraw"}),font:I({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}),cv=Dt((Q,Z)=>{var c=kd().dash,g=Ia().extendFlat;Z.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:g({},c,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}),Ry=Dt((Q,Z)=>{Z.exports=function(c){var g=c.editType;return{t:{valType:"number",dflt:0,editType:g},r:{valType:"number",dflt:0,editType:g},b:{valType:"number",dflt:0,editType:g},l:{valType:"number",dflt:0,editType:g},editType:g}}}),b1=Dt((Q,Z)=>{var c=da(),g=El(),I=wi(),S=gw(),t=cv(),e=Ry(),r=Ia().extendFlat,a=c({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=I.defaultLine,Z.exports={font:a,title:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:c({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:I.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:I.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:I.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:S.newshape,activeshape:S.activeshape,newselection:t.newselection,activeselection:t.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},g.transition,{editType:"none"})}}),f6=Dt(()=>{(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var Q=document.createElement("style");Q.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",Q.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Q)}})()}),Jo=Dt(Q=>{var Z=as(),c=Yo(),g=Ol(),I=si(),S=r0().addStyleRule,t=Ia(),e=Ho(),r=b1(),a=t.extendFlat,n=t.extendDeepAll;Q.modules={},Q.allCategories={},Q.allTypes=[],Q.subplotsRegistry={},Q.componentsRegistry={},Q.layoutArrayContainers=[],Q.layoutArrayRegexes=[],Q.traceLayoutAttributes={},Q.localeRegistry={},Q.apiMethodRegistry={},Q.collectableSubplotTypes=null,Q.register=function(b){if(Q.collectableSubplotTypes=null,b)b&&!Array.isArray(b)&&(b=[b]);else throw new Error("No argument passed to Plotly.register.");for(var _=0;_{var Z=Fi().timeFormat,c=Yi(),g=as(),I=ko().mod,S=Ca(),t=S.BADNUM,e=S.ONEDAY,r=S.ONEHOUR,a=S.ONEMIN,n=S.ONESEC,o=S.EPOCHJD,i=Jo(),l=Fi().utcFormat,f=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=new Date().getFullYear()-70;function v(V){return V&&i.componentsRegistry.calendars&&typeof V=="string"&&V!=="gregorian"}Q.dateTick0=function(V,H){var F=T(V,!!H);if(H<2)return F;var U=Q.dateTime2ms(F,V);return U+=e*(H-1),Q.ms2DateTime(U,0,V)};function T(V,H){return v(V)?H?i.getComponentMethod("calendars","CANONICAL_SUNDAY")[V]:i.getComponentMethod("calendars","CANONICAL_TICK")[V]:H?"2000-01-02":"2000-01-01"}Q.dfltRange=function(V){return v(V)?i.getComponentMethod("calendars","DFLTRANGE")[V]:["2000-01-01","2001-01-01"]},Q.isJSDate=function(V){return typeof V=="object"&&V!==null&&typeof V.getTime=="function"};var u,b;Q.dateTime2ms=function(V,H){if(Q.isJSDate(V)){var F=V.getTimezoneOffset()*a,U=(V.getUTCMinutes()-V.getMinutes())*a+(V.getUTCSeconds()-V.getSeconds())*n+(V.getUTCMilliseconds()-V.getMilliseconds());if(U){var W=3*a;F=F-W/2+I(U-F+W/2,W)}return V=Number(V)-F,V>=u&&V<=b?V:t}if(typeof V!="string"&&typeof V!="number")return t;V=String(V);var q=v(H),J=V.charAt(0);q&&(J==="G"||J==="g")&&(V=V.substr(1),H="");var lt=q&&H.substr(0,7)==="chinese",yt=V.match(lt?x:f);if(!yt)return t;var mt=yt[1],st=yt[3]||"1",tt=Number(yt[5]||1),dt=Number(yt[7]||0),rt=Number(yt[9]||0),at=Number(yt[11]||0);if(q){if(mt.length===2)return t;mt=Number(mt);var vt;try{var it=i.getComponentMethod("calendars","getCal")(H);if(lt){var Y=st.charAt(st.length-1)==="i";st=parseInt(st,10),vt=it.newDate(mt,it.toMonthIndex(mt,st,Y),tt)}else vt=it.newDate(mt,Number(st),tt)}catch{return t}return vt?(vt.toJD()-o)*e+dt*r+rt*a+at*n:t}mt.length===2?mt=(Number(mt)+2e3-y)%100+y:mt=Number(mt),st-=1;var ft=new Date(Date.UTC(2e3,st,tt,dt,rt));return ft.setUTCFullYear(mt),ft.getUTCMonth()!==st||ft.getUTCDate()!==tt?t:ft.getTime()+at*n},u=Q.MIN_MS=Q.dateTime2ms("-9999"),b=Q.MAX_MS=Q.dateTime2ms("9999-12-31 23:59:59.9999"),Q.isDateTime=function(V,H){return Q.dateTime2ms(V,H)!==t};function _(V,H){return String(V+Math.pow(10,H)).substr(1)}var P=90*e,M=3*r,C=5*a;Q.ms2DateTime=function(V,H,F){if(typeof V!="number"||!(V>=u&&V<=b))return t;H||(H=0);var U=Math.floor(I(V+.05,1)*10),W=Math.round(V-U/10),q,J,lt,yt,mt,st;if(v(F)){var tt=Math.floor(W/e)+o,dt=Math.floor(I(V,e));try{q=i.getComponentMethod("calendars","getCal")(F).fromJD(tt).formatDate("yyyy-mm-dd")}catch{q=l("G%Y-%m-%d")(new Date(W))}if(q.charAt(0)==="-")for(;q.length<11;)q="-0"+q.substr(1);else for(;q.length<10;)q="0"+q;J=H=u+e&&V<=b-e))return t;var H=Math.floor(I(V+.05,1)*10),F=new Date(Math.round(V-H/10)),U=Z("%Y-%m-%d")(F),W=F.getHours(),q=F.getMinutes(),J=F.getSeconds(),lt=F.getUTCMilliseconds()*10+H;return A(U,W,q,J,lt)};function A(V,H,F,U,W){if((H||F||U||W)&&(V+=" "+_(H,2)+":"+_(F,2),(U||W)&&(V+=":"+_(U,2),W))){for(var q=4;W%10===0;)q-=1,W/=10;V+="."+_(W,q)}return V}Q.cleanDate=function(V,H,F){if(V===t)return H;if(Q.isJSDate(V)||typeof V=="number"&&isFinite(V)){if(v(F))return g.error("JS Dates and milliseconds are incompatible with world calendars",V),H;if(V=Q.ms2DateTimeLocal(+V),!V&&H!==void 0)return H}else if(!Q.isDateTime(V,F))return g.error("unrecognized date",V),H;return V};var h=/%\d?f/g,p=/%h/g,k={1:"1",2:"1",3:"2",4:"2"};function w(V,H,F,U){V=V.replace(h,function(q){var J=Math.min(+q.charAt(1)||6,6),lt=(H/1e3%1+2).toFixed(J).substr(2).replace(/0+$/,"")||"0";return lt});var W=new Date(Math.floor(H+.05));if(V=V.replace(p,function(){return k[F("%q")(W)]}),v(U))try{V=i.getComponentMethod("calendars","worldCalFmt")(V,H,U)}catch{return"Invalid"}return F(V)(W)}var R=[59,59.9,59.99,59.999,59.9999];function O(V,H){var F=I(V+.05,e),U=_(Math.floor(F/r),2)+":"+_(I(Math.floor(F/a),60),2);if(H!=="M"){c(H)||(H=0);var W=Math.min(I(V/n,60),R[H]),q=(100+W).toFixed(H).substr(1);H>0&&(q=q.replace(/0+$/,"").replace(/[\.]$/,"")),U+=":"+q}return U}Q.formatDate=function(V,H,F,U,W,q){if(W=v(W)&&W,!H)if(F==="y")H=q.year;else if(F==="m")H=q.month;else if(F==="d")H=q.dayMonth+` `+q.year;else return O(V,F)+` -`+w(q.dayMonthYear,V,U,W);return w(H,V,U,W)};var N=3*e;Q.incrementMonth=function(V,H,F){F=v(F)&&F;var U=P(V,e);if(V=Math.round(V-U),F)try{var W=Math.round(V/e)+o,q=i.getComponentMethod("calendars","getCal")(F),X=q.fromJD(W);return H%12?q.add(X,H,"m"):q.add(X,H/12,"y"),(X.toJD()-o)*e+U}catch{g.error("invalid ms "+V+" in calendar "+F)}var lt=new Date(V+N);return lt.setUTCMonth(lt.getUTCMonth()+H)+U-N},Q.findExactDates=function(V,H){for(var F=0,U=0,W=0,q=0,X,lt,yt=v(H)&&i.getComponentMethod("calendars","getCal")(H),pt=0;pt{$.exports=function(c){return c}}),L_=Ft(Q=>{var $=ia(),c=es(),g=w1(),P=Ua().BADNUM,S=1e-9;Q.findBin=function(n,o,i){if($(o.start))return i?Math.ceil((n-o.start)/o.size-S)-1:Math.floor((n-o.start)/o.size+S);var s=0,f=o.length,x=0,y=f>1?(o[f-1]-o[0])/(f-1):1,v,T;for(y>=0?T=i?t:e:T=i?a:r,n+=y*S*(i?-1:1)*(y>=0?1:-1);s90&&c.log("Long binary search..."),s-1};function t(n,o){return no}function a(n,o){return n>=o}Q.sorterAsc=function(n,o){return n-o},Q.sorterDes=function(n,o){return o-n},Q.distinctVals=function(n){var o=n.slice();o.sort(Q.sorterAsc);var i;for(i=o.length-1;i>-1&&o[i]===P;i--);for(var s=o[i]-o[0]||1,f=s/(i||1)/1e4,x=[],y,v=0;v<=i;v++){var T=o[v],u=T-y;y===void 0?(x.push(T),y=T):u>f&&(s=Math.min(s,u),x.push(T),y=T)}return{vals:x,minDiff:s}},Q.roundUp=function(n,o,i){for(var s=0,f=o.length-1,x,y=0,v=i?0:1,T=i?1:0,u=i?Math.ceil:Math.floor;s0&&(s=1),i&&s)return n.sort(o)}return s?n:n.reverse()},Q.findIndexOfMin=function(n,o){o=o||g;for(var i=1/0,s,f=0;f{$.exports=function(c){return Object.keys(c).sort()}}),s6=Ft(Q=>{var $=ia(),c=Va().isArrayOrTypedArray;Q.aggNums=function(g,P,S,t){var e,r;if((!t||t>S.length)&&(t=S.length),$(P)||(P=!1),c(S[0])){for(r=new Array(t),e=0;eg.length-1)return g[g.length-1];var S=P%1;return S*g[Math.ceil(P)]+(1-S)*g[Math.floor(P)]}}),l6=Ft((Q,$)=>{var c=To(),g=c.mod,P=c.modHalf,S=Math.PI,t=2*S;function e(T){return T/180*S}function r(T){return T/S*180}function a(T){return Math.abs(T[1]-T[0])>t-1e-14}function n(T,u){return P(u-T,t)}function o(T,u){return Math.abs(n(T,u))}function i(T,u){if(a(u))return!0;var b,_;u[0]_&&(_+=t);var C=g(T,t),M=C+t;return C>=b&&C<=_||M>=b&&M<=_}function s(T,u,b,_){if(!i(u,_))return!1;var C,M;return b[0]=C&&T<=M}function f(T,u,b,_,C,M,E){C=C||0,M=M||0;var A=a([b,_]),h,p,k,w,R;A?(h=0,p=S,k=t):b<_?(h=b,k=_):(h=_,k=b),T{Q.isLeftAnchor=function($){return $.xanchor==="left"||$.xanchor==="auto"&&$.x<=1/3},Q.isCenterAnchor=function($){return $.xanchor==="center"||$.xanchor==="auto"&&$.x>1/3&&$.x<2/3},Q.isRightAnchor=function($){return $.xanchor==="right"||$.xanchor==="auto"&&$.x>=2/3},Q.isTopAnchor=function($){return $.yanchor==="top"||$.yanchor==="auto"&&$.y>=2/3},Q.isMiddleAnchor=function($){return $.yanchor==="middle"||$.yanchor==="auto"&&$.y>1/3&&$.y<2/3},Q.isBottomAnchor=function($){return $.yanchor==="bottom"||$.yanchor==="auto"&&$.y<=1/3}}),c6=Ft(Q=>{var $=To().mod;Q.segmentsIntersect=c;function c(e,r,a,n,o,i,s,f){var x=a-e,y=o-e,v=s-o,T=n-r,u=i-r,b=f-i,_=x*b-v*T;if(_===0)return null;var C=(y*b-v*u)/_,M=(y*T-x*u)/_;return M<0||M>1||C<0||C>1?null:{x:e+x*C,y:r+T*C}}Q.segmentDistance=function(e,r,a,n,o,i,s,f){if(c(e,r,a,n,o,i,s,f))return 0;var x=a-e,y=n-r,v=s-o,T=f-i,u=x*x+y*y,b=v*v+T*T,_=Math.min(g(x,y,u,o-e,i-r),g(x,y,u,s-e,f-r),g(v,T,b,e-o,r-i),g(v,T,b,a-o,n-i));return Math.sqrt(_)};function g(e,r,a,n,o){var i=n*e+o*r;if(i<0)return n*n+o*o;if(i>a){var s=n-e,f=o-r;return s*s+f*f}else{var x=n*r-o*e;return x*x/a}}var P,S,t;Q.getTextLocation=function(e,r,a,n){if((e!==S||n!==t)&&(P={},S=e,t=n),P[a])return P[a];var o=e.getPointAtLength($(a-n/2,r)),i=e.getPointAtLength($(a+n/2,r)),s=Math.atan((i.y-o.y)/(i.x-o.x)),f=e.getPointAtLength($(a,r)),x=(f.x*4+o.x+i.x)/6,y=(f.y*4+o.y+i.y)/6,v={x,y,theta:s};return P[a]=v,v},Q.clearLocationCache=function(){S=null},Q.getVisibleSegment=function(e,r,a){var n=r.left,o=r.right,i=r.top,s=r.bottom,f=0,x=e.getTotalLength(),y=x,v,T;function u(_){var C=e.getPointAtLength(_);_===0?v=C:_===x&&(T=C);var M=C.xo?C.x-o:0,E=C.ys?C.y-s:0;return Math.sqrt(M*M+E*E)}for(var b=u(f);b;){if(f+=b+a,f>y)return;b=u(f)}for(b=u(y);b;){if(y-=b+a,f>y)return;b=u(y)}return{min:f,max:y,len:y-f,total:x,isClosed:f===0&&y===x&&Math.abs(v.x-T.x)<.1&&Math.abs(v.y-T.y)<.1}},Q.findPointOnPath=function(e,r,a,n){n=n||{};for(var o=n.pathLength||e.getTotalLength(),i=n.tolerance||.001,s=n.iterationLimit||30,f=e.getPointAtLength(0)[a]>e.getPointAtLength(o)[a]?-1:1,x=0,y=0,v=o,T,u,b;x0?v=T:y=T,x++}return u}}),P_=Ft(Q=>{var $={};Q.throttle=function(g,P,S){var t=$[g],e=Date.now();if(!t){for(var r in $)$[r].tst.ts+P){a();return}t.timer=setTimeout(function(){a(),t.timer=null},P)},Q.done=function(g){var P=$[g];return!P||!P.timer?Promise.resolve():new Promise(function(S){var t=P.onDone;P.onDone=function(){t&&t(),S(),P.onDone=null}})},Q.clear=function(g){if(g)c($[g]),delete $[g];else for(var P in $)Q.clear(P)};function c(g){g&&g.timer!==null&&(clearTimeout(g.timer),g.timer=null)}}),z_=Ft((Q,$)=>{$.exports=function(c){c._responsiveChartHandler&&(window.removeEventListener("resize",c._responsiveChartHandler),delete c._responsiveChartHandler)}}),k1=Ft((Q,$)=>{$.exports=S,$.exports.isMobile=S,$.exports.default=S;var c=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,g=/CrOS/,P=/android|ipad|playbook|silk/i;function S(t){t||(t={});let e=t.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let r=c.test(e)&&!g.test(e)||!!t.tablet&&P.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(r=!0),r}}),pw=Ft((Q,$)=>{var c=ia(),g=k1();$.exports=function(S){var t;if(S&&S.hasOwnProperty("userAgent")?t=S.userAgent:t=P(),typeof t!="string")return!0;var e=g({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!e)for(var r=t.split(" "),a=1;a-1;o--){var i=r[o];if(i.substr(0,8)==="Version/"){var s=i.substr(8).split(".")[0];if(c(s)&&(s=+s),s>=13)return!0}}}return e};function P(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}}),mw=Ft((Q,$)=>{var c=En();$.exports=function(g,P,S){var t=g.selectAll("g."+S.replace(/\s/g,".")).data(P,function(r){return r[0].trace.uid});t.exit().remove(),t.enter().append("g").attr("class",S),t.order();var e=g.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(r){r[0][e]=c.select(this)}),t}}),T1=Ft((Q,$)=>{var c=Qo();$.exports=function(g,P){for(var S=g._context.locale,t=0;t<2;t++){for(var e=g._context.locales,r=0;r<2;r++){var a=(e[S]||{}).dictionary;if(a){var n=a[P];if(n)return n}e=c.localeRegistry}var o=S.split("-")[0];if(o===S)break;S=o}return P}}),Lc=Ft((Q,$)=>{$.exports=function(c){for(var g={},P=[],S=0,t=0;t{$.exports=function(S){for(var t=P(S)?g:c,e=[],r=0;r{$.exports=function(c,g){if(!g)return c;var P=1/Math.abs(g),S=P>1?(P*c+P*g)/P:c+g,t=String(S).length;if(t>16){var e=String(g).length,r=String(c).length;if(t>=r+e){var a=parseFloat(S).toPrecision(12);a.indexOf("e+")===-1&&(S=+a)}}return S}}),hv=Ft((Q,$)=>{var c=ia(),g=Ua().BADNUM,P=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;$.exports=function(S){return typeof S=="string"&&(S=S.replace(P,"")),c(S)?Number(S):g}}),_n=Ft((Q,$)=>{var c=En(),g=Sa().utcFormat,P=Ni().format,S=ia(),t=Ua(),e=t.FP_SAFE,r=-e,a=t.BADNUM,n=$.exports={};n.adjustFormat=function(it){return!it||/^\d[.]\df/.test(it)||/[.]\d%/.test(it)?it:it==="0.f"?"~f":/^\d%/.test(it)?"~%":/^\ds/.test(it)?"~s":!/^[~,.0$]/.test(it)&&/[&fps]/.test(it)?"~"+it:it};var o={};n.warnBadFormat=function(it){var Y=String(it);o[Y]||(o[Y]=1,n.warn('encountered bad format: "'+Y+'"'))},n.noFormat=function(it){return String(it)},n.numberFormat=function(it){var Y;try{Y=P(n.adjustFormat(it))}catch{return n.warnBadFormat(it),n.noFormat}return Y},n.nestedProperty=us(),n.keyedContainer=xo(),n.relativeAttr=Mo(),n.isPlainObject=Ei(),n.toLogRange=co(),n.relinkPrivateKeys=Go();var i=Va();n.isArrayBuffer=i.isArrayBuffer,n.isTypedArray=i.isTypedArray,n.isArrayOrTypedArray=i.isArrayOrTypedArray,n.isArray1D=i.isArray1D,n.ensureArray=i.ensureArray,n.concat=i.concat,n.maxRowLength=i.maxRowLength,n.minRowLength=i.minRowLength;var s=To();n.mod=s.mod,n.modHalf=s.modHalf;var f=ko();n.valObjectMeta=f.valObjectMeta,n.coerce=f.coerce,n.coerce2=f.coerce2,n.coerceFont=f.coerceFont,n.coercePattern=f.coercePattern,n.coerceHoverinfo=f.coerceHoverinfo,n.coerceSelectionMarkerOpacity=f.coerceSelectionMarkerOpacity,n.validate=f.validate;var x=o6();n.dateTime2ms=x.dateTime2ms,n.isDateTime=x.isDateTime,n.ms2DateTime=x.ms2DateTime,n.ms2DateTimeLocal=x.ms2DateTimeLocal,n.cleanDate=x.cleanDate,n.isJSDate=x.isJSDate,n.formatDate=x.formatDate,n.incrementMonth=x.incrementMonth,n.dateTick0=x.dateTick0,n.dfltRange=x.dfltRange,n.findExactDates=x.findExactDates,n.MIN_MS=x.MIN_MS,n.MAX_MS=x.MAX_MS;var y=L_();n.findBin=y.findBin,n.sorterAsc=y.sorterAsc,n.sorterDes=y.sorterDes,n.distinctVals=y.distinctVals,n.roundUp=y.roundUp,n.sort=y.sort,n.findIndexOfMin=y.findIndexOfMin,n.sortObjectKeys=X0();var v=s6();n.aggNums=v.aggNums,n.len=v.len,n.mean=v.mean,n.geometricMean=v.geometricMean,n.median=v.median,n.midRange=v.midRange,n.variance=v.variance,n.stdev=v.stdev,n.interp=v.interp;var T=E_();n.init2dArray=T.init2dArray,n.transposeRagged=T.transposeRagged,n.dot=T.dot,n.translationMatrix=T.translationMatrix,n.rotationMatrix=T.rotationMatrix,n.rotationXYMatrix=T.rotationXYMatrix,n.apply3DTransform=T.apply3DTransform,n.apply2DTransform=T.apply2DTransform,n.apply2DTransform2=T.apply2DTransform2,n.convertCssMatrix=T.convertCssMatrix,n.inverseTransformMatrix=T.inverseTransformMatrix;var u=l6();n.deg2rad=u.deg2rad,n.rad2deg=u.rad2deg,n.angleDelta=u.angleDelta,n.angleDist=u.angleDist,n.isFullCircle=u.isFullCircle,n.isAngleInsideSector=u.isAngleInsideSector,n.isPtInsideSector=u.isPtInsideSector,n.pathArc=u.pathArc,n.pathSector=u.pathSector,n.pathAnnulus=u.pathAnnulus;var b=u6();n.isLeftAnchor=b.isLeftAnchor,n.isCenterAnchor=b.isCenterAnchor,n.isRightAnchor=b.isRightAnchor,n.isTopAnchor=b.isTopAnchor,n.isMiddleAnchor=b.isMiddleAnchor,n.isBottomAnchor=b.isBottomAnchor;var _=c6();n.segmentsIntersect=_.segmentsIntersect,n.segmentDistance=_.segmentDistance,n.getTextLocation=_.getTextLocation,n.clearLocationCache=_.clearLocationCache,n.getVisibleSegment=_.getVisibleSegment,n.findPointOnPath=_.findPointOnPath;var C=ya();n.extendFlat=C.extendFlat,n.extendDeep=C.extendDeep,n.extendDeepAll=C.extendDeepAll,n.extendDeepNoArrays=C.extendDeepNoArrays;var M=es();n.log=M.log,n.warn=M.warn,n.error=M.error;var E=So();n.counterRegex=E.counter;var A=P_();n.throttle=A.throttle,n.throttleDone=A.done,n.clearThrottle=A.clear;var h=a0();n.getGraphDiv=h.getGraphDiv,n.isPlotDiv=h.isPlotDiv,n.removeElement=h.removeElement,n.addStyleRule=h.addStyleRule,n.addRelatedStyleRule=h.addRelatedStyleRule,n.deleteRelatedStyleRule=h.deleteRelatedStyleRule,n.setStyleOnHover=h.setStyleOnHover,n.getFullTransformMatrix=h.getFullTransformMatrix,n.getElementTransformMatrix=h.getElementTransformMatrix,n.getElementAndAncestors=h.getElementAndAncestors,n.equalDomRects=h.equalDomRects,n.clearResponsive=z_(),n.preserveDrawingBuffer=pw(),n.makeTraceGroups=mw(),n._=T1(),n.notifier=jo(),n.filterUnique=Lc(),n.filterVisible=Mf(),n.pushUnique=El(),n.increment=Ry(),n.cleanNumber=hv(),n.ensureNumber=function(it){return S(it)?(it=Number(it),it>e||it=Y?!1:S(it)&&it>=0&&it%1===0},n.noop=Uo(),n.identity=w1(),n.repeat=function(it,Y){for(var ft=new Array(Y),ut=0;utft?Math.max(ft,Math.min(Y,it)):Math.max(Y,Math.min(ft,it))},n.bBoxIntersect=function(it,Y,ft){return ft=ft||0,it.left<=Y.right+ft&&Y.left<=it.right+ft&&it.top<=Y.bottom+ft&&Y.top<=it.bottom+ft},n.simpleMap=function(it,Y,ft,ut,wt){for(var zt=it.length,Pt=new Array(zt),Wt=0;Wt=Math.pow(2,ft)?wt>10?(n.warn("randstr failed uniqueness"),Pt):it(Y,ft,ut,(wt||0)+1):Pt},n.OptionControl=function(it,Y){it||(it={}),Y||(Y="opt");var ft={};return ft.optionList=[],ft._newoption=function(ut){ut[Y]=it,ft[ut.name]=ut,ft.optionList.push(ut)},ft["_"+Y]=it,ft},n.smooth=function(it,Y){if(Y=Math.round(Y)||0,Y<2)return it;var ft=it.length,ut=2*ft,wt=2*Y-1,zt=new Array(wt),Pt=new Array(ft),Wt,Ht,Jt,ge;for(Wt=0;Wt=ut&&(Jt-=ut*Math.floor(Jt/ut)),Jt<0?Jt=-1-Jt:Jt>=ft&&(Jt=ut-1-Jt),ge+=it[Jt]*zt[Ht];Pt[Wt]=ge}return Pt},n.syncOrAsync=function(it,Y,ft){var ut,wt;function zt(){return n.syncOrAsync(it,Y,ft)}for(;it.length;)if(wt=it.splice(0,1)[0],ut=wt(Y),ut&&ut.then)return ut.then(zt);return ft&&ft(Y)},n.stripTrailingSlash=function(it){return it.substr(-1)==="/"?it.substr(0,it.length-1):it},n.noneOrAll=function(it,Y,ft){if(it){var ut=!1,wt=!0,zt,Pt;for(zt=0;zt0?wt:0})},n.fillArray=function(it,Y,ft,ut){if(ut=ut||n.identity,n.isArrayOrTypedArray(it))for(var wt=0;wtO.test(window.navigator.userAgent);var N=/Firefox\/(\d+)\.\d+/;n.getFirefoxVersion=function(){var it=N.exec(window.navigator.userAgent);if(it&&it.length===2){var Y=parseInt(it[1]);if(!isNaN(Y))return Y}return null},n.isD3Selection=function(it){return it instanceof c.selection},n.ensureSingle=function(it,Y,ft,ut){var wt=it.select(Y+(ft?"."+ft:""));if(wt.size())return wt;var zt=it.append(Y);return ft&&zt.classed(ft,!0),ut&&zt.call(ut),zt},n.ensureSingleById=function(it,Y,ft,ut){var wt=it.select(Y+"#"+ft);if(wt.size())return wt;var zt=it.append(Y).attr("id",ft);return ut&&zt.call(ut),zt},n.objectFromPath=function(it,Y){for(var ft=it.split("."),ut,wt=ut={},zt=0;zt1?wt+Pt[1]:"";if(zt&&(Pt.length>1||Wt.length>4||ft))for(;ut.test(Wt);)Wt=Wt.replace(ut,"$1"+zt+"$2");return Wt+Ht},n.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var U=/^\w*$/;n.templateString=function(it,Y){var ft={};return it.replace(n.TEMPLATE_STRING_REGEX,function(ut,wt){var zt;return U.test(wt)?zt=Y[wt]:(ft[wt]=ft[wt]||n.nestedProperty(Y,wt).get,zt=ft[wt](!0)),zt!==void 0?zt:""})};var W={max:10,count:0,name:"hovertemplate"};n.hovertemplateString=it=>st(Pr(Ir({},it),{opts:W}));var q={max:10,count:0,name:"texttemplate"};n.texttemplateString=it=>st(Pr(Ir({},it),{opts:q}));var X=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function lt(it){var Y=it.match(X);return Y?{key:Y[1],op:Y[2],number:Number(Y[3])}:{key:it,op:null,number:null}}var yt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};n.texttemplateStringForShapes=it=>st(Pr(Ir({},it),{opts:yt}));var pt=/^[:|\|]/;function st({data:it=[],locale:Y,fallback:ft,labels:ut={},opts:wt,template:zt}){return zt.replace(n.TEMPLATE_STRING_REGEX,(Pt,Wt,Ht)=>{let Jt=["xother","yother"].includes(Wt),ge=["_xother","_yother"].includes(Wt),he=["_xother_","_yother_"].includes(Wt),de=["xother_","yother_"].includes(Wt),se=Jt||ge||de||he;(ge||he)&&(Wt=Wt.substring(1)),(de||he)&&(Wt=Wt.substring(0,Wt.length-1));let Tt=null,Lt=null;if(wt.parseMultDiv){var Mt=lt(Wt);Wt=Mt.key,Tt=Mt.op,Lt=Mt.number}let te;if(se){if(ut[Wt]===void 0)return"";te=ut[Wt]}else for(let He of it)if(He){if(He.hasOwnProperty(Wt)){te=He[Wt];break}if(U.test(Wt)||(te=n.nestedProperty(He,Wt).get(!0)),te!==void 0)break}if(te===void 0){let{count:He,max:Ge,name:cr}=wt,ur=ft===!1?Pt:ft;return He=tt&&Pt<=dt,Jt=Wt>=tt&&Wt<=dt;if(Ht&&(ut=10*ut+Pt-tt),Jt&&(wt=10*wt+Wt-tt),!Ht||!Jt){if(ut!==wt)return ut-wt;if(Pt!==Wt)return Pt-Wt}}return wt-ut};var rt=2e9;n.seedPseudoRandom=function(){rt=2e9},n.pseudoRandom=function(){var it=rt;return rt=(69069*rt+1)%4294967296,Math.abs(rt-it)<429496729?n.pseudoRandom():rt/4294967296},n.fillText=function(it,Y,ft){var ut=Array.isArray(ft)?function(Pt){ft.push(Pt)}:function(Pt){ft.text=Pt},wt=n.extractOption(it,Y,"htx","hovertext");if(n.isValidTextValue(wt))return ut(wt);var zt=n.extractOption(it,Y,"tx","text");if(n.isValidTextValue(zt))return ut(zt)},n.isValidTextValue=function(it){return it||it===0},n.formatPercent=function(it,Y){Y=Y||0;for(var ft=(Math.round(100*it*Math.pow(10,Y))*Math.pow(.1,Y)).toFixed(Y)+"%",ut=0;ut1&&(Jt=1):Jt=0,n.strTranslate(wt-Jt*(ft+Pt),zt-Jt*(ut+Wt))+n.strScale(Jt)+(Ht?"rotate("+Ht+(Y?"":" "+ft+" "+ut)+")":"")},n.setTransormAndDisplay=function(it,Y){it.attr("transform",n.getTextTransform(Y)),it.style("display",Y.scale?null:"none")},n.ensureUniformFontSize=function(it,Y){var ft=n.extendFlat({},Y);return ft.size=Math.max(Y.size,it._fullLayout.uniformtext.minsize||0),ft},n.join2=function(it,Y,ft){var ut=it.length;return ut>1?it.slice(0,-1).join(Y)+ft+it[ut-1]:it.join(Y)},n.bigFont=function(it){return Math.round(1.2*it)};var at=n.getFirefoxVersion(),vt=at!==null&&at<86;n.getPositionFromD3Event=function(){return vt?[c.event.layerX,c.event.layerY]:[c.event.offsetX,c.event.offsetY]}}),I_=Ft(()=>{var Q=_n(),$={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(g in $)c=g.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Q.addStyleRule(c,$[g]);var c,g}),Wu=Ft((Q,$)=>{$.exports=!0}),Nf=Ft((Q,$)=>{var c=Wu(),g;typeof window.matchMedia=="function"?g=!window.matchMedia("(hover: none)").matches:g=c,$.exports=g}),Dm=Ft((Q,$)=>{var c=typeof Reflect=="object"?Reflect:null,g=c&&typeof c.apply=="function"?c.apply:function(C,M,E){return Function.prototype.apply.call(C,M,E)},P;c&&typeof c.ownKeys=="function"?P=c.ownKeys:Object.getOwnPropertySymbols?P=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:P=function(C){return Object.getOwnPropertyNames(C)};function S(C){console&&console.warn&&console.warn(C)}var t=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}$.exports=e,$.exports.once=u,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var r=10;function a(C){if(typeof C!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof C)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(C){if(typeof C!="number"||C<0||t(C))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+C+".");r=C}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||t(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function n(C){return C._maxListeners===void 0?e.defaultMaxListeners:C._maxListeners}e.prototype.getMaxListeners=function(){return n(this)},e.prototype.emit=function(C){for(var M=[],E=1;E0&&(p=M[0]),p instanceof Error)throw p;var k=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw k.context=p,k}var w=h[C];if(w===void 0)return!1;if(typeof w=="function")g(w,this,M);else for(var R=w.length,O=y(w,R),E=0;E0&&k.length>h&&!k.warned){k.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=C,w.type=M,w.count=k.length,S(w)}return C}e.prototype.addListener=function(C,M){return o(this,C,M,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,M){return o(this,C,M,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(C,M,E){var A={fired:!1,wrapFn:void 0,target:C,type:M,listener:E},h=i.bind(A);return h.listener=E,A.wrapFn=h,h}e.prototype.once=function(C,M){return a(M),this.on(C,s(this,C,M)),this},e.prototype.prependOnceListener=function(C,M){return a(M),this.prependListener(C,s(this,C,M)),this},e.prototype.removeListener=function(C,M){var E,A,h,p,k;if(a(M),A=this._events,A===void 0)return this;if(E=A[C],E===void 0)return this;if(E===M||E.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete A[C],A.removeListener&&this.emit("removeListener",C,E.listener||M));else if(typeof E!="function"){for(h=-1,p=E.length-1;p>=0;p--)if(E[p]===M||E[p].listener===M){k=E[p].listener,h=p;break}if(h<0)return this;h===0?E.shift():v(E,h),E.length===1&&(A[C]=E[0]),A.removeListener!==void 0&&this.emit("removeListener",C,k||M)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var M,E,A;if(E=this._events,E===void 0)return this;if(E.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):E[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete E[C]),this;if(arguments.length===0){var h=Object.keys(E),p;for(A=0;A=0;A--)this.removeListener(C,M[A]);return this};function f(C,M,E){var A=C._events;if(A===void 0)return[];var h=A[M];return h===void 0?[]:typeof h=="function"?E?[h.listener||h]:[h]:E?T(h):y(h,h.length)}e.prototype.listeners=function(C){return f(this,C,!0)},e.prototype.rawListeners=function(C){return f(this,C,!1)},e.listenerCount=function(C,M){return typeof C.listenerCount=="function"?C.listenerCount(M):x.call(C,M)},e.prototype.listenerCount=x;function x(C){var M=this._events;if(M!==void 0){var E=M[C];if(typeof E=="function")return 1;if(E!==void 0)return E.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?P(this._events):[]};function y(C,M){for(var E=new Array(M),A=0;A{var c=Dm().EventEmitter,g={init:function(P){if(P._ev instanceof c)return P;var S=new c,t=new c;return P._ev=S,P._internalEv=t,P.on=S.on.bind(S),P.once=S.once.bind(S),P.removeListener=S.removeListener.bind(S),P.removeAllListeners=S.removeAllListeners.bind(S),P._internalOn=t.on.bind(t),P._internalOnce=t.once.bind(t),P._removeInternalListener=t.removeListener.bind(t),P._removeAllInternalListeners=t.removeAllListeners.bind(t),P.emit=function(e,r){S.emit(e,r),t.emit(e,r)},typeof P.addEventListener=="function"&&P.addEventListener("wheel",()=>{},{passive:!0}),P},triggerHandler:function(P,S,t){var e,r=P._ev;if(!r)return;var a=r._events[S];if(!a)return;function n(i){if(i.listener){if(r.removeListener(S,i.listener),!i.fired)return i.fired=!0,i.listener.apply(r,[t])}else return i.apply(r,[t])}a=Array.isArray(a)?a:[a];var o;for(o=0;o{var c=_n(),g=gs().dfltConfig;function P(t,e){for(var r=[],a,n=0;ng.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},S.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},S.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},S.undo=function(t){var e,r;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r{$.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}),Rm=Ft(Q=>{var $=Qo(),c=_n(),g=Yo(),P=b1(),S=gw(),t=Ll(),e=gs().configAttributes,r=Yc(),a=c.extendDeepAll,n=c.isPlainObject,o=c.isArrayOrTypedArray,i=c.nestedProperty,s=c.valObjectMeta,f="_isSubplotObj",x="_isLinkedToArray",y="_arrayAttrRegexps",v="_deprecated",T=[f,x,y,v];Q.IS_SUBPLOT_OBJ=f,Q.IS_LINKED_TO_ARRAY=x,Q.DEPRECATED=v,Q.UNDERSCORE_ATTRS=T,Q.get=function(){var O={};return $.allTypes.forEach(function(N){O[N]=C(N)}),{defs:{valObjects:s,metaKeys:T.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:O,layout:M(),frames:E(),animation:A(t),config:A(e)}},Q.crawl=function(O,N,V,H){var F=V||0;H=H||"",Object.keys(O).forEach(function(U){var W=O[U];if(T.indexOf(U)===-1){var q=(H?H+".":"")+U;N(W,U,O,F,q),!Q.isValObject(W)&&n(W)&&U!=="impliedEdits"&&Q.crawl(W,N,F+1,q)}})},Q.isValObject=function(O){return O&&O.valType!==void 0},Q.findArrayAttributes=function(O){var N=[],V=[],H=[],F,U;function W(X,lt,yt,pt){V=V.slice(0,pt).concat([lt]),H=H.slice(0,pt).concat([X&&X._isLinkedToArray]);var st=X&&(X.valType==="data_array"||X.arrayOk===!0)&&!(V[pt-1]==="colorbar"&&(lt==="ticktext"||lt==="tickvals"));st&&q(F,0,"")}function q(X,lt,yt){var pt=X[V[lt]],st=yt+V[lt];if(lt===V.length-1)o(pt)&&N.push(U+st);else if(H[lt]){if(Array.isArray(pt))for(var tt=0;tt=U.length)return!1;if(O.dimensions===2){if(V++,N.length===V)return O;var W=N[V];if(!_(W))return!1;O=U[F][W]}else O=U[F]}else O=U}}return O}function _(O){return O===Math.round(O)&&O>=0}function C(O){var N,V;N=$.modules[O]._module,V=N.basePlotModule;var H={};H.type=null;var F=a({},g),U=a({},N.attributes);Q.crawl(U,function(X,lt,yt,pt,st){i(F,st).set(void 0),X===void 0&&i(U,st).set(void 0)}),a(H,F),$.traceIs(O,"noOpacity")&&delete H.opacity,$.traceIs(O,"showLegend")||(delete H.showlegend,delete H.legendgroup),$.traceIs(O,"noHover")&&(delete H.hoverinfo,delete H.hoverlabel),N.selectPoints||delete H.selectedpoints,a(H,U),V.attributes&&a(H,V.attributes),H.type=O;var W={meta:N.meta||{},categories:N.categories||{},animatable:!!N.animatable,type:O,attributes:A(H)};if(N.layoutAttributes){var q={};a(q,N.layoutAttributes),W.layoutAttributes=A(q)}return N.animatable||Q.crawl(W,function(X){Q.isValObject(X)&&"anim"in X&&delete X.anim}),W}function M(){var O={},N,V;a(O,P);for(N in $.subplotsRegistry)if(V=$.subplotsRegistry[N],!!V.layoutAttributes)if(Array.isArray(V.attr))for(var H=0;H{var $=_n(),c=Yo(),g="templateitemname",P={name:{valType:"string",editType:"none"}};P[g]={valType:"string",editType:"calc"},Q.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=P.name,r[g]=P[g],r},Q.traceTemplater=function(e){var r={},a,n;for(a in e)n=e[a],Array.isArray(n)&&n.length&&(r[a]=0);function o(i){a=$.coerce(i,{},c,"type");var s={type:a,_template:null};if(a in r){n=e[a];var f=r[a]%n.length;r[a]++,s._template=n[f]}return s}return{newTrace:o}},Q.newContainer=function(e,r,a){var n=e._template,o=n&&(n[r]||a&&n[a]);$.isPlainObject(o)||(o=null);var i=e[r]={_template:o};return i},Q.arrayTemplater=function(e,r,a){var n=e._template,o=n&&n[t(r)],i=n&&n[r];(!Array.isArray(i)||!i.length)&&(i=[]);var s={};function f(y){var v={name:y.name,_input:y},T=v[g]=y[g];if(!S(T))return v._template=o,v;for(var u=0;u=n&&(a._input||{})._templateitemname;i&&(o=n);var s=r+"["+o+"]",f;function x(){f={},i&&(f[s]={},f[s][g]=i)}x();function y(b,_){f[b]=_}function v(b,_){i?$.nestedProperty(f[s],b).set(_):f[s+"."+b]=_}function T(){var b=f;return x(),b}function u(b,_){b&&v(b,_);var C=T();for(var M in C)$.nestedProperty(e,M).set(C[M])}return{modifyBase:y,modifyItem:v,getUpdateObj:T,applyUpdate:u}}}),ac=Ft((Q,$)=>{var c=So().counter;$.exports={idRegex:{x:c("x","( domain)?"),y:c("y","( domain)?")},attrRegex:c("[xy]axis"),xAxisMatch:c("xaxis"),yAxisMatch:c("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}),Rc=Ft(Q=>{var $=Qo(),c=ac();Q.id2name=function(P){if(!(typeof P!="string"||!P.match(c.AX_ID_PATTERN))){var S=P.split(" ")[0].substr(1);return S==="1"&&(S=""),P.charAt(0)+"axis"+S}},Q.name2id=function(P){if(P.match(c.AX_NAME_PATTERN)){var S=P.substr(5);return S==="1"&&(S=""),P.charAt(0)+S}},Q.cleanId=function(P,S,t){var e=/( domain)$/.test(P);if(!(typeof P!="string"||!P.match(c.AX_ID_PATTERN))&&!(S&&P.charAt(0)!==S)&&!(e&&!t)){var r=P.split(" ")[0].substr(1).replace(/^0+/,"");return r==="1"&&(r=""),P.charAt(0)+r+(e&&t?" domain":"")}},Q.list=function(P,S,t){var e=P._fullLayout;if(!e)return[];var r=Q.listIds(P,S),a=new Array(r.length),n;for(n=0;ne?1:-1:+(P.substr(1)||1)-+(S.substr(1)||1)},Q.ref2id=function(P){return/^[xyz]/.test(P)?P.split(" ")[0]:!1};function g(P,S){if(S&&S.length){for(var t=0;t{function c(P){var S=P._fullLayout._zoomlayer;S&&S.selectAll(".outline-controllers").remove()}function g(P){var S=P._fullLayout._zoomlayer;S&&S.selectAll(".select-outline").remove(),P._fullLayout._outlining=!1}$.exports={clearOutlineControllers:c,clearOutline:g}}),vg=Ft((Q,$)=>{$.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}),dd=Ft(Q=>{var $=Qo();ac().SUBPLOT_PATTERN,Q.getSubplotCalcData=function(c,g,P){var S=$.subplotsRegistry[g];if(!S)return[];for(var t=S.attr,e=[],r=0;r{var $=Qo(),c=_n();Q.manageCommandObserver=function(r,a,n,o){var i={},s=!0;a&&a._commandObserver&&(i=a._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var f=Q.hasSimpleAPICommandBindings(r,n,i.lookupTable);if(a&&a._commandObserver){if(f)return i;if(a._commandObserver.remove)return a._commandObserver.remove(),a._commandObserver=null,i}if(f){g(r,f,i.cache),i.check=function(){if(s){var v=g(r,f,i.cache);return v.changed&&o&&i.lookupTable[v.value]!==void 0&&(i.disable(),Promise.resolve(o({value:v.value,type:f.type,prop:f.prop,traces:f.traces,index:i.lookupTable[v.value]})).then(i.enable,i.enable)),v.changed}};for(var x=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],y=0;y0?".":"")+i;c.isPlainObject(s)?e(s,a,f,o+1):a(f,i,s)}})}}),Kc=Ft((Q,$)=>{var c=En(),g=Sa().timeFormatLocale,P=Ni().formatLocale,S=ia(),t=qi(),e=Qo(),r=Rm(),a=mu(),n=_n(),o=ui(),i=Ua().BADNUM,s=Rc(),f=z0().clearOutline,x=vg(),y=Ll(),v=gw(),T=dd().getModuleCalcData,u=n.relinkPrivateKeys,b=n._,_=$.exports={};n.extendFlat(_,e),_.attributes=Yo(),_.attributes.type.values=_.allTypes,_.fontAttrs=ka(),_.layoutAttributes=b1();var C=A1();_.executeAPICommand=C.executeAPICommand,_.computeAPICommandBindings=C.computeAPICommandBindings,_.manageCommandObserver=C.manageCommandObserver,_.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,_.redrawText=function(tt){return tt=n.getGraphDiv(tt),new Promise(function(dt){setTimeout(function(){tt._fullLayout&&(e.getComponentMethod("annotations","draw")(tt),e.getComponentMethod("legend","draw")(tt),e.getComponentMethod("colorbar","draw")(tt),dt(_.previousPromises(tt)))},300)})},_.resize=function(tt){tt=n.getGraphDiv(tt);var dt,rt=new Promise(function(at,vt){(!tt||n.isHidden(tt))&&vt(new Error("Resize must be passed a displayed plot div element.")),tt._redrawTimer&&clearTimeout(tt._redrawTimer),tt._resolveResize&&(dt=tt._resolveResize),tt._resolveResize=at,tt._redrawTimer=setTimeout(function(){if(!tt.layout||tt.layout.width&&tt.layout.height||n.isHidden(tt)){at(tt);return}delete tt.layout.width,delete tt.layout.height;var it=tt.changed;tt.autoplay=!0,e.call("relayout",tt,{autosize:!0}).then(function(){tt.changed=it,tt._resolveResize===at&&(delete tt._resolveResize,at(tt))})},100)});return dt&&dt(rt),rt},_.previousPromises=function(tt){if((tt._promises||[]).length)return Promise.all(tt._promises).then(function(){tt._promises=[]})},_.addLinks=function(tt){if(!(!tt._context.showLink&&!tt._context.showSources)){var dt=tt._fullLayout,rt=n.ensureSingle(dt._paper,"text","js-plot-link-container",function(ut){ut.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:o.defaultLine,"pointer-events":"all"}).each(function(){var wt=c.select(this);wt.append("tspan").classed("js-link-to-tool",!0),wt.append("tspan").classed("js-link-spacer",!0),wt.append("tspan").classed("js-sourcelinks",!0)})}),at=rt.node(),vt={y:dt._paper.attr("height")-9};document.body.contains(at)&&at.getComputedTextLength()>=dt.width-20?(vt["text-anchor"]="start",vt.x=5):(vt["text-anchor"]="end",vt.x=dt._paper.attr("width")-7),rt.attr(vt);var it=rt.select(".js-link-to-tool"),Y=rt.select(".js-link-spacer"),ft=rt.select(".js-sourcelinks");tt._context.showSources&&tt._context.showSources(tt),tt._context.showLink&&M(tt,it),Y.text(it.text()&&ft.text()?" - ":"")}};function M(tt,dt){dt.text("");var rt=dt.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(tt._context.linkText+" »");if(tt._context.sendData)rt.on("click",function(){_.sendDataToCloud(tt)});else{var at=window.location.pathname.split("/"),vt=window.location.search;rt.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+at[2].split(".")[0]+"/"+at[1]+vt})}}_.sendDataToCloud=function(tt){var dt=(window.PLOTLYENV||{}).BASE_URL||tt._context.plotlyServerURL;if(dt){tt.emit("plotly_beforeexport");var rt=c.select(tt).append("div").attr("id","hiddenform").style("display","none"),at=rt.append("form").attr({action:dt+"/external",method:"post",target:"_blank"}),vt=at.append("input").attr({type:"text",name:"data"});return vt.node().value=_.graphJson(tt,!1,"keepdata"),at.node().submit(),rt.remove(),tt.emit("plotly_afterexport"),!1}};var E=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];_.supplyDefaults=function(tt,dt){var rt=dt&&dt.skipUpdateCalc,at=tt._fullLayout||{};if(at._skipDefaults){delete at._skipDefaults;return}var vt=tt._fullLayout={},it=tt.layout||{},Y=tt._fullData||[],ft=tt._fullData=[],ut=tt.data||[],wt=tt.calcdata||[],zt=tt._context||{},Pt;tt._transitionData||_.createTransitionData(tt),vt._dfltTitle={plot:b(tt,"Click to enter Plot title"),subtitle:b(tt,"Click to enter Plot subtitle"),x:b(tt,"Click to enter X axis title"),y:b(tt,"Click to enter Y axis title"),colorbar:b(tt,"Click to enter Colorscale title"),annotation:b(tt,"new text")},vt._traceWord=b(tt,"trace");var Wt=k(tt,E);if(vt._mapboxAccessToken=zt.mapboxAccessToken,at._initialAutoSizeIsDone){var Ht=at.width,Jt=at.height;_.supplyLayoutGlobalDefaults(it,vt,Wt),it.width||(vt.width=Ht),it.height||(vt.height=Jt),_.sanitizeMargins(vt)}else{_.supplyLayoutGlobalDefaults(it,vt,Wt);var ge=!it.width||!it.height,he=vt.autosize,de=zt.autosizable,se=ge&&(he||de);se?_.plotAutoSize(tt,it,vt):ge&&_.sanitizeMargins(vt),!he&&ge&&(it.width=vt.width,it.height=vt.height)}vt._d3locale=w(Wt,vt.separators),vt._extraFormat=k(tt,A),vt._initialAutoSizeIsDone=!0,vt._dataLength=ut.length,vt._modules=[],vt._visibleModules=[],vt._basePlotModules=[];var Tt=vt._subplots=p(),Lt=vt._splomAxes={x:{},y:{}},Mt=vt._splomSubplots={};vt._splomGridDflt={},vt._scatterStackOpts={},vt._firstScatter={},vt._alignmentOpts={},vt._colorAxes={},vt._requestRangeslider={},vt._traceUids=h(Y,ut),_.supplyDataDefaults(ut,ft,it,vt);var te=Object.keys(Lt.x),ve=Object.keys(Lt.y);if(te.length>1&&ve.length>1){for(e.getComponentMethod("grid","sizeDefaults")(it,vt),Pt=0;Pt15&&ve.length>15&&vt.shapes.length===0&&vt.images.length===0,_.linkSubplots(ft,vt,Y,at),_.cleanPlot(ft,vt,Y,at);var cr=!!(at._has&&at._has("cartesian")),ur=!!(vt._has&&vt._has("cartesian")),jr=cr,Hr=ur;jr&&!Hr?at._bgLayer.remove():Hr&&!jr&&(vt._shouldCreateBgLayer=!0),at._zoomlayer&&!tt._dragging&&f({_fullLayout:at}),R(ft,vt),u(vt,at),e.getComponentMethod("colorscale","crossTraceDefaults")(ft,vt),vt._preGUI||(vt._preGUI={}),vt._tracePreGUI||(vt._tracePreGUI={});var br=vt._tracePreGUI,Kr={},rn;for(rn in br)Kr[rn]="old";for(Pt=0;Pt0){var wt=1-2*vt;it=Math.round(wt*it),Y=Math.round(wt*Y)}}var zt=_.layoutAttributes.width.min,Pt=_.layoutAttributes.height.min;it1,Ht=!dt.height&&Math.abs(rt.height-Y)>1;(Ht||Wt)&&(Wt&&(rt.width=it),Ht&&(rt.height=Y)),tt._initialAutoSize||(tt._initialAutoSize={width:it,height:Y}),_.sanitizeMargins(rt)},_.supplyLayoutModuleDefaults=function(tt,dt,rt,at){var vt=e.componentsRegistry,it=dt._basePlotModules,Y,ft,ut,wt=e.subplotsRegistry.cartesian;for(Y in vt)ut=vt[Y],ut.includeBasePlot&&ut.includeBasePlot(tt,dt);it.length||it.push(wt),dt._has("cartesian")&&(e.getComponentMethod("grid","contentDefaults")(tt,dt),wt.finalizeSubplots(tt,dt));for(var zt in dt._subplots)dt._subplots[zt].sort(n.subplotSort);for(ft=0;ft1&&(rt.l/=he,rt.r/=he)}if(Wt){var de=(rt.t+rt.b)/Wt;de>1&&(rt.t/=de,rt.b/=de)}var se=rt.xl!==void 0?rt.xl:rt.x,Tt=rt.xr!==void 0?rt.xr:rt.x,Lt=rt.yt!==void 0?rt.yt:rt.y,Mt=rt.yb!==void 0?rt.yb:rt.y;Ht[dt]={l:{val:se,size:rt.l+ge},r:{val:Tt,size:rt.r+ge},b:{val:Mt,size:rt.b+ge},t:{val:Lt,size:rt.t+ge}},Jt[dt]=1}if(!at._replotting)return _.doAutoMargin(tt)}};function U(tt){if("_redrawFromAutoMarginCount"in tt._fullLayout)return!1;var dt=s.list(tt,"",!0);for(var rt in dt)if(dt[rt].autoshift||dt[rt].shift)return!0;return!1}_.doAutoMargin=function(tt){var dt=tt._fullLayout,rt=dt.width,at=dt.height;dt._size||(dt._size={}),V(dt);var vt=dt._size,it=dt.margin,Y={t:0,b:0,l:0,r:0},ft=n.extendFlat({},vt),ut=it.l,wt=it.r,zt=it.t,Pt=it.b,Wt=dt._pushmargin,Ht=dt._pushmarginIds,Jt=dt.minreducedwidth,ge=dt.minreducedheight;if(it.autoexpand!==!1){for(var he in Wt)Ht[he]||delete Wt[he];var de=tt._fullLayout._reservedMargin;for(var se in de)for(var Tt in de[se]){var Lt=de[se][Tt];Y[Tt]=Math.max(Y[Tt],Lt)}Wt.base={l:{val:0,size:ut},r:{val:1,size:wt},t:{val:1,size:zt},b:{val:0,size:Pt}};for(var Mt in Y){var te=0;for(var ve in Wt)ve!=="base"&&S(Wt[ve][Mt].size)&&(te=Wt[ve][Mt].size>te?Wt[ve][Mt].size:te);var oe=Math.max(0,it[Mt]-te);Y[Mt]=Math.max(0,Y[Mt]-oe)}for(var Te in Wt){var He=Wt[Te].l||{},Ge=Wt[Te].b||{},cr=He.val,ur=He.size,jr=Ge.val,Hr=Ge.size,br=rt-Y.r-Y.l,Kr=at-Y.t-Y.b;for(var rn in Wt){if(S(ur)&&Wt[rn].r){var Ce=Wt[rn].r.val,Gt=Wt[rn].r.size;if(Ce>cr){var ne=(ur*Ce+(Gt-br)*cr)/(Ce-cr),Ct=(Gt*(1-cr)+(ur-br)*(1-Ce))/(Ce-cr);ne+Ct>ut+wt&&(ut=ne,wt=Ct)}}if(S(Hr)&&Wt[rn].t){var gt=Wt[rn].t.val,St=Wt[rn].t.size;if(gt>jr){var Nt=(Hr*gt+(St-Kr)*jr)/(gt-jr),re=(St*(1-jr)+(Hr-Kr)*(1-gt))/(gt-jr);Nt+re>Pt+zt&&(Pt=Nt,zt=re)}}}}}var le=n.constrain(rt-it.l-it.r,H,Jt),we=n.constrain(at-it.t-it.b,F,ge),Ue=Math.max(0,rt-le),qe=Math.max(0,at-we);if(Ue){var or=(ut+wt)/Ue;or>1&&(ut/=or,wt/=or)}if(qe){var Ar=(Pt+zt)/qe;Ar>1&&(Pt/=Ar,zt/=Ar)}if(vt.l=Math.round(ut)+Y.l,vt.r=Math.round(wt)+Y.r,vt.t=Math.round(zt)+Y.t,vt.b=Math.round(Pt)+Y.b,vt.p=Math.round(it.pad),vt.w=Math.round(rt)-vt.l-vt.r,vt.h=Math.round(at)-vt.t-vt.b,!dt._replotting&&(_.didMarginChange(ft,vt)||U(tt))){"_redrawFromAutoMarginCount"in dt?dt._redrawFromAutoMarginCount++:dt._redrawFromAutoMarginCount=1;var Tr=3*(1+Object.keys(Ht).length);if(dt._redrawFromAutoMarginCount1)return!0}return!1},_.graphJson=function(tt,dt,rt,at,vt,it){(vt&&dt&&!tt._fullData||vt&&!dt&&!tt._fullLayout)&&_.supplyDefaults(tt);var Y=vt?tt._fullData:tt.data,ft=vt?tt._fullLayout:tt.layout,ut=(tt._transitionData||{})._frames;function wt(Wt,Ht){if(typeof Wt=="function")return Ht?"_function_":null;if(n.isPlainObject(Wt)){var Jt={},ge;return Object.keys(Wt).sort().forEach(function(Tt){if(["_","["].indexOf(Tt.charAt(0))===-1){if(typeof Wt[Tt]=="function"){Ht&&(Jt[Tt]="_function");return}if(rt==="keepdata"){if(Tt.substr(Tt.length-3)==="src")return}else if(rt==="keepstream"){if(ge=Wt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0&&!n.isPlainObject(Wt.stream))return}else if(rt!=="keepall"&&(ge=Wt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0))return;Jt[Tt]=wt(Wt[Tt],Ht)}}),Jt}var he=Array.isArray(Wt),de=n.isTypedArray(Wt);if((he||de)&&Wt.dtype&&Wt.shape){var se=Wt.bdata;return wt({dtype:Wt.dtype,shape:Wt.shape,bdata:n.isArrayBuffer(se)?t.encode(se):se},Ht)}return he?Wt.map(function(Tt){return wt(Tt,Ht)}):de?n.simpleMap(Wt,n.identity):n.isJSDate(Wt)?n.ms2DateTimeLocal(+Wt):Wt}var zt={data:(Y||[]).map(function(Wt){var Ht=wt(Wt);return dt&&delete Ht.fit,Ht})};if(!dt&&(zt.layout=wt(ft),vt)){var Pt=ft._size;zt.layout.computed={margin:{b:Pt.b,l:Pt.l,r:Pt.r,t:Pt.t}}}return ut&&(zt.frames=wt(ut)),it&&(zt.config=wt(tt._context,!0)),at==="object"?zt:JSON.stringify(zt)},_.modifyFrames=function(tt,dt){var rt,at,vt,it=tt._transitionData._frames,Y=tt._transitionData._frameHash;for(rt=0;rt0&&(tt._transitioningWithDuration=!0),tt._transitionData._interruptCallbacks.push(function(){at=!0}),rt.redraw&&tt._transitionData._interruptCallbacks.push(function(){return e.call("redraw",tt)}),tt._transitionData._interruptCallbacks.push(function(){tt.emit("plotly_transitioninterrupted",[])});var Wt=0,Ht=0;function Jt(){return Wt++,function(){Ht++,!at&&Ht===Wt&&ft(Pt)}}rt.runFn(Jt),setTimeout(Jt())})}function ft(Pt){if(tt._transitionData)return it(tt._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(rt.redraw)return e.call("redraw",tt)}).then(function(){tt._transitioning=!1,tt._transitioningWithDuration=!1,tt.emit("plotly_transitioned",[])}).then(Pt)}function ut(){if(tt._transitionData)return tt._transitioning=!1,vt(tt._transitionData._interruptCallbacks)}var wt=[_.previousPromises,ut,rt.prepareFn,_.rehover,_.reselect,Y],zt=n.syncOrAsync(wt,tt);return(!zt||!zt.then)&&(zt=Promise.resolve()),zt.then(function(){return tt})}_.doCalcdata=function(tt,dt){var rt=s.list(tt),at=tt._fullData,vt=tt._fullLayout,it,Y,ft,ut,wt=new Array(at.length),zt=(tt.calcdata||[]).slice();for(tt.calcdata=wt,vt._numBoxes=0,vt._numViolins=0,vt._violinScaleGroupStats={},tt._hmpixcount=0,tt._hmlumcount=0,vt._piecolormap={},vt._sunburstcolormap={},vt._treemapcolormap={},vt._iciclecolormap={},vt._funnelareacolormap={},ft=0;ft=0;ut--)if(Mt[ut].enabled){it._indexToPoints=Mt[ut]._indexToPoints;break}Y&&Y.calc&&(Lt=Y.calc(tt,it))}(!Array.isArray(Lt)||!Lt[0])&&(Lt=[{x:i,y:i}]),Lt[0].t||(Lt[0].t={}),Lt[0].trace=it,wt[se]=Lt}}for(pt(rt,at,vt),ft=0;ft{Q.xmlns="http://www.w3.org/2000/xmlns/",Q.svg="http://www.w3.org/2000/svg",Q.xlink="http://www.w3.org/1999/xlink",Q.svgAttrs={xmlns:Q.svg,"xmlns:xlink":Q.xlink}}),Sf=Ft((Q,$)=>{$.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}}),tc=Ft(Q=>{var $=En(),c=_n(),g=c.strTranslate,P=Bp(),S=Sf().LINE_SPACING,t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Q.convertToTspans=function(F,U,W){var q=F.text(),X=!F.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&q.match(t),lt=$.select(F.node().parentNode);if(lt.empty())return;var yt=F.attr("class")?F.attr("class").split(" ")[0]:"text";yt+="-math",lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove(),F.style("display",null).attr({"data-unformatted":q,"data-math":"N"});function pt(){lt.empty()||(yt=F.attr("class")+"-math",lt.select("svg."+yt).remove()),F.text("").style("white-space","pre");var st=O(F.node(),q);st&&F.style("pointer-events","all"),Q.positionText(F),W&&W.call(F)}return X?(U&&U._promises||[]).push(new Promise(function(st){F.style("display","none");var tt=parseInt(F.node().style.fontSize,10),dt={fontSize:tt};o(X[2],dt,function(rt,at,vt){lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove();var it=rt&&rt.select("svg");if(!it||!it.node()){pt(),st();return}var Y=lt.append("g").classed(yt+"-group",!0).attr({"pointer-events":"none","data-unformatted":q,"data-math":"Y"});Y.node().appendChild(it.node()),at&&at.node()&&it.node().insertBefore(at.node().cloneNode(!0),it.node().firstChild);var ft=vt.width,ut=vt.height;it.attr({class:yt,height:ut,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var wt=F.node().style.fill||"black",zt=it.select("g");zt.attr({fill:wt,stroke:wt});var Pt=zt.node().getBoundingClientRect(),Wt=Pt.width,Ht=Pt.height;(Wt>ft||Ht>ut)&&(it.style("overflow","hidden"),Pt=it.node().getBoundingClientRect(),Wt=Pt.width,Ht=Pt.height);var Jt=+F.attr("x"),ge=+F.attr("y"),he=tt||F.node().getBoundingClientRect().height,de=-he/4;if(yt[0]==="y")Y.attr({transform:"rotate("+[-90,Jt,ge]+")"+g(-Wt/2,de-Ht/2)});else if(yt[0]==="l")ge=de-Ht/2;else if(yt[0]==="a"&&yt.indexOf("atitle")!==0)Jt=0,ge=de;else{var se=F.attr("text-anchor");Jt=Jt-Wt*(se==="middle"?.5:se==="end"?1:0),ge=ge+de-Ht/2}it.attr({x:Jt,y:ge}),W&&W.call(F,Y),st(Y)})})):pt(),F};var e=/(<|<|<)/g,r=/(>|>|>)/g;function a(F){return F.replace(e,"\\lt ").replace(r,"\\gt ")}var n=[["$","$"],["\\(","\\)"]];function o(F,U,W){var q=parseInt((MathJax.version||"").split(".")[0]);if(q!==2&&q!==3){c.warn("No MathJax version:",MathJax.version);return}var X,lt,yt,pt,st=function(){return lt=c.extendDeepAll({},MathJax.Hub.config),yt=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:n},displayAlign:"left"})},tt=function(){lt=c.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=n},dt=function(){if(X=MathJax.Hub.config.menuSettings.renderer,X!=="SVG")return MathJax.Hub.setRenderer("SVG")},rt=function(){X=MathJax.config.startup.output,X!=="svg"&&(MathJax.config.startup.output="svg")},at=function(){var wt="math-output-"+c.randstr({},64);pt=$.select("body").append("div").attr({id:wt}).style({visibility:"hidden",position:"absolute","font-size":U.fontSize+"px"}).text(a(F));var zt=pt.node();return q===2?MathJax.Hub.Typeset(zt):MathJax.typeset([zt])},vt=function(){var wt=pt.select(q===2?".MathJax_SVG":".MathJax"),zt=!wt.empty()&&pt.select("svg").node();if(!zt)c.log("There was an error in the tex syntax.",F),W();else{var Pt=zt.getBoundingClientRect(),Wt;q===2?Wt=$.select("body").select("#MathJax_SVG_glyphs"):Wt=wt.select("defs"),W(wt,Wt,Pt)}pt.remove()},it=function(){if(X!=="SVG")return MathJax.Hub.setRenderer(X)},Y=function(){X!=="svg"&&(MathJax.config.startup.output=X)},ft=function(){return yt!==void 0&&(MathJax.Hub.processSectionDelay=yt),MathJax.Hub.Config(lt)},ut=function(){MathJax.config=lt};q===2?MathJax.Hub.Queue(st,dt,at,vt,it,ft):q===3&&(tt(),rt(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){at(),vt(),Y(),ut()}))}var i={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},s={sub:"0.3em",sup:"-0.6em"},f={sub:"-0.21em",sup:"0.42em"},x="​",y=["http:","https:","mailto:","",void 0,":"],v=Q.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,u=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;Q.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,C=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,E=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(F,U){if(!F)return null;var W=F.match(U),q=W&&(W[3]||W[4]);return q&&w(q)}var h=/(^|;)\s*color:/;Q.plainText=function(F,U){U=U||{};for(var W=U.len!==void 0&&U.len!==-1?U.len:1/0,q=U.allowedTags!==void 0?U.allowedTags:["br"],X="...",lt=X.length,yt=F.split(T),pt=[],st="",tt=0,dt=0;dtlt?pt.push(rt.substr(0,Y-lt)+X):pt.push(rt.substr(0,Y));break}st=""}}return pt.join("")};var p={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},k=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function w(F){return F.replace(k,function(U,W){var q;return W.charAt(0)==="#"?q=R(W.charAt(1)==="x"?parseInt(W.substr(2),16):parseInt(W.substr(1),10)):q=p[W],q||U})}Q.convertEntities=w;function R(F){if(!(F>1114111)){var U=String.fromCodePoint;if(U)return U(F);var W=String.fromCharCode;return F<=65535?W(F):W((F>>10)+55232,F%1024+56320)}}function O(F,U){U=U.replace(v," ");var W=!1,q=[],X,lt=-1;function yt(){lt++;var Ht=document.createElementNS(P.svg,"tspan");$.select(Ht).attr({class:"line",dy:lt*S+"em"}),F.appendChild(Ht),X=Ht;var Jt=q;if(q=[{node:Ht}],Jt.length>1)for(var ge=1;ge.",U);return}var Jt=q.pop();Ht!==Jt.type&&c.log("Start tag <"+Jt.type+"> doesnt match end tag <"+Ht+">. Pretending it did match.",U),X=q[q.length-1].node}var dt=b.test(U);dt?yt():(X=F,q=[{node:F}]);for(var rt=U.split(T),at=0;at{var c=En(),g=eo(),P=ia(),S=_n(),t=ui(),e=vi().isValid;function r(v,T,u){var b=T?S.nestedProperty(v,T).get()||{}:v,_=b[u||"color"];_&&_._inputArray&&(_=_._inputArray);var C=!1;if(S.isArrayOrTypedArray(_)){for(var M=0;M<_.length;M++)if(P(_[M])){C=!0;break}}return S.isPlainObject(b)&&(C||b.showscale===!0||P(b.cmin)&&P(b.cmax)||e(b.colorscale)||S.isPlainObject(b.colorbar))}var a=["showscale","autocolorscale","colorscale","reversescale","colorbar"],n=["min","max","mid","auto"];function o(v){var T=v._colorAx,u=T||v,b={},_,C,M;for(C=0;C=0;b--,_++){var C=v[b];u[_]=[1-C[0],C[1]]}return u}function f(v,T){T=T||{};for(var u=v.domain,b=v.range,_=b.length,C=new Array(_),M=0;M<_;M++){var E=g(b[M]).toRgb();C[M]=[E.r,E.g,E.b,E.a]}var A=c.scale.linear().domain(u).range(C).clamp(!0),h=T.noNumericCheck,p=T.returnArray,k;return h&&p?k=A:h?k=function(w){return y(A(w))}:p?k=function(w){return P(w)?A(w):g(w).isValid()?w:t.defaultLine}:k=function(w){return P(w)?y(A(w)):g(w).isValid()?w:t.defaultLine},k.domain=A.domain,k.range=function(){return b},k}function x(v,T){return f(i(v),T)}function y(v){var T={r:v[0],g:v[1],b:v[2],a:v[3]};return g(T).toRgbString()}$.exports={hasColorscale:r,extractOpts:o,extractScale:i,flipScale:s,makeColorScaleFunc:f,makeColorScaleFuncFromTrace:x}}),dh=Ft((Q,$)=>{var c=C_(),g=c.FORMAT_LINK,P=c.DATE_FORMAT_LINK;function S(r,a){return{valType:"string",dflt:"",editType:"none",description:(a?t:e)("hover text",r)+["By default the values are formatted using "+(a?"generic number format":"`"+r+"axis.hoverformat`")+"."].join(" ")}}function t(r,a){return["Sets the "+r+" formatting rule"+(a?"for `"+a+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+g+"."].join(" ")}function e(r,a){return t(r,a)+[" And for dates see: "+P+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}$.exports={axisHoverFormat:S,descriptionOnlyNumbers:t,descriptionWithDates:e}}),Cd=Ft((Q,$)=>{var c=ka(),g=yi(),P=Ed().dash,S=ya().extendFlat,t=mu().templatedArray;$u().templateFormatStringDescription;var e=dh().descriptionWithDates,r=Ua().ONEDAY,a=ac(),n=a.HOUR_PATTERN,o=a.WEEKDAY_PATTERN,i={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},s=S({},i,{values:i.values.slice().concat(["sync"])});function f(h){return{valType:"integer",min:0,dflt:h?5:0,editType:"ticks"}}var x={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},v={valType:"data_array",editType:"ticks"},T={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function u(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=5),p}function b(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var _={valType:"color",dflt:g.defaultLine,editType:"ticks"},C={valType:"color",dflt:g.lightLine,editType:"ticks"};function M(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var E=S({},P,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};$.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:g.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:c({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"calc"},rangebreaks:t("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[o,n,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:r},editType:"calc"}),tickmode:s,nticks:f(),tick0:x,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:v,ticktext:{valType:"data_array",editType:"ticks"},ticks:T,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:u(),tickwidth:b(),tickcolor:_,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:S({},P,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:c({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:e("tick label")},tickformatstops:t("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:e("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:C,gridwidth:M(),griddash:E,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:g.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:g.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},minor:{tickmode:i,nticks:f("minor"),tick0:x,dtick:y,tickvals:v,ticks:T,ticklen:u("minor"),tickwidth:b("minor"),tickcolor:_,gridcolor:C,gridwidth:M("minor"),griddash:E,showgrid:A,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}),M1=Ft((Q,$)=>{var c=Cd(),g=ka(),P=ya().extendFlat,S=Yc().overrideAll;$.exports=S({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:c.linecolor,outlinewidth:c.linewidth,bordercolor:c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:c.minor.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:P({},c.ticks,{dflt:""}),ticklabeloverflow:P({},c.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,ticklabelstep:c.ticklabelstep,showticklabels:c.showticklabels,labelalias:c.labelalias,tickfont:g({}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,minexponent:c.minexponent,showexponent:c.showexponent,title:{text:{valType:"string"},font:g({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}),Ac=Ft((Q,$)=>{var c=M1(),g=So().counter,P=X0(),S=vi().scales;P(S);function t(e){return"`"+e+"`"}$.exports=function(e,r){e=e||"",r=r||{};var a=r.cLetter||"c";"onlyIfNumerical"in r&&r.onlyIfNumerical;var n="noScale"in r?r.noScale:e==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:a==="z",i=typeof r.colorscaleDflt=="string"?S[r.colorscaleDflt]:null,s=r.editTypeOverride||"",f=e?e+".":"",x;"colorAttr"in r?(x=r.colorAttr,r.colorAttr):(x={z:"z",c:"color"}[a],""+t(f+x));var y=a+"auto",v=a+"min",T=a+"max",u=a+"mid",b={};b[v]=b[T]=void 0;var _={};_[y]=!1;var C={};return x==="color"&&(C.color={valType:"color",arrayOk:!0,editType:s||"style"},r.anim&&(C.color.anim=!0)),C[y]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:b},C[v]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_},C[T]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_},C[u]={valType:"number",dflt:null,editType:"calc",impliedEdits:b},C.colorscale={valType:"colorscale",editType:"calc",dflt:i,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},C.reversescale={valType:"boolean",dflt:!1,editType:"plot"},n||(C.showscale={valType:"boolean",dflt:o,editType:"calc"},C.colorbar=c),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:g("coloraxis"),dflt:null,editType:"calc"}),C}}),Pu=Ft((Q,$)=>{var c=ya().extendFlat,g=Ac(),P=vi().scales;$.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:P.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:P.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:P.RdBu,editType:"calc"}},coloraxis:c({_isSubplotObj:!0,editType:"calc"},g("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}),I0=Ft((Q,$)=>{var c=_n();$.exports=function(g){return c.isPlainObject(g.colorbar)}}),Nh=Ft(Q=>{var $=ia(),c=_n(),g=Ua(),P=g.ONEDAY,S=g.ONEWEEK;Q.dtick=function(t,e){var r=e==="log",a=e==="date",n=e==="category",o=a?P:1;if(!t)return o;if($(t))return t=Number(t),t<=0?o:n?Math.max(1,Math.round(t)):a?Math.max(.1,t):t;if(typeof t!="string"||!(a||r))return o;var i=t.charAt(0),s=t.substr(1);return s=$(s)?Number(s):0,s<=0||!(a&&i==="M"&&s===Math.round(s)||r&&i==="L"||r&&i==="D"&&(s===1||s===2))?o:t},Q.tick0=function(t,e,r,a){if(e==="date")return c.cleanDate(t,c.dateTick0(r,a%S===0?1:0));if(!(a==="D1"||a==="D2"))return $(t)?Number(t):0}}),yg=Ft((Q,$)=>{var c=Nh(),g=_n().isArrayOrTypedArray,P=Va().isTypedArraySpec,S=Va().decodeTypedArraySpec;$.exports=function(t,e,r,a,n){n||(n={});var o=n.isMinor,i=o?t.minor||{}:t,s=o?e.minor:e,f=o?"minor.":"";function x(M){var E=i[M];return P(E)&&(E=S(E)),E!==void 0?E:(s._template||{})[M]}var y=x("tick0"),v=x("dtick"),T=x("tickvals"),u=g(T)?"array":v?"linear":"auto",b=r(f+"tickmode",u);if(b==="auto"||b==="sync")r(f+"nticks");else if(b==="linear"){var _=s.dtick=c.dtick(v,a);s.tick0=c.tick0(y,a,e.calendar,_)}else if(a!=="multicategory"){var C=r(f+"tickvals");C===void 0?s.tickmode="auto":o||r("ticktext")}}}),xg=Ft((Q,$)=>{var c=_n(),g=Cd();$.exports=function(P,S,t,e){var r=e.isMinor,a=r?P.minor||{}:P,n=r?S.minor:S,o=r?g.minor:g,i=r?"minor.":"",s=c.coerce2(a,n,o,"ticklen",r?(S.ticklen||5)*.6:void 0),f=c.coerce2(a,n,o,"tickwidth",r?S.tickwidth||1:void 0),x=c.coerce2(a,n,o,"tickcolor",(r?S.tickcolor:void 0)||n.color),y=t(i+"ticks",!r&&e.outerTicks||s||f||x?"outside":"");y||(delete n.ticklen,delete n.tickwidth,delete n.tickcolor)}}),By=Ft((Q,$)=>{$.exports=function(c){var g=["showexponent","showtickprefix","showticksuffix"],P=g.filter(function(t){return c[t]!==void 0}),S=function(t){return c[t]===c[P[0]]};if(P.every(S)||P.length===1)return c[P[0]]}}),Ld=Ft((Q,$)=>{var c=_n(),g=mu();$.exports=function(P,S,t){var e=t.name,r=t.inclusionAttr||"visible",a=S[e],n=c.isArrayOrTypedArray(P[e])?P[e]:[],o=S[e]=[],i=g.arrayTemplater(S,e,r),s,f;for(s=0;s{var c=_n(),g=ui().contrast,P=Cd(),S=By(),t=Ld();$.exports=function(r,a,n,o,i){i||(i={});var s=n("labelalias");c.isPlainObject(s)||delete a.labelalias;var f=S(r),x=n("showticklabels");if(x){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var y=i.font||{},v=a.color,T=a.ticklabelposition||"",u=T.indexOf("inside")!==-1?g(i.bgColor):v&&v!==P.color.dflt?v:y.color;if(c.coerceFont(n,"tickfont",y,{overrideDflt:{color:u}}),!i.noTicklabelstep&&o!=="multicategory"&&o!=="log"&&n("ticklabelstep"),!i.noAng){var b=n("tickangle");!i.noAutotickangles&&b==="auto"&&n("autotickangles")}if(o!=="category"){var _=n("tickformat");t(r,a,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:e}),a.tickformatstops.length||delete a.tickformatstops,!i.noExp&&!_&&o!=="date"&&(n("showexponent",f),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&o==="log"&&n("minorloglabels")}};function e(r,a){function n(i,s){return c.coerce(r,a,P.tickformatstops,i,s)}var o=n("enabled");o&&(n("dtickrange"),n("value"))}}),gm=Ft((Q,$)=>{var c=By();$.exports=function(g,P,S,t,e){e||(e={});var r=e.tickSuffixDflt,a=c(g),n=S("tickprefix");n&&S("showtickprefix",a);var o=S("ticksuffix",r);o&&S("showticksuffix",a)}}),fv=Ft((Q,$)=>{var c=_n(),g=mu(),P=yg(),S=xg(),t=o0(),e=gm(),r=M1();$.exports=function(a,n,o){var i=g.newContainer(n,"colorbar"),s=a.colorbar||{};function f(F,U){return c.coerce(s,i,r,F,U)}var x=o.margin||{t:0,b:0,l:0,r:0},y=o.width-x.l-x.r,v=o.height-x.t-x.b,T=f("orientation"),u=T==="v",b=f("thicknessmode");f("thickness",b==="fraction"?30/(u?y:v):30);var _=f("lenmode");f("len",_==="fraction"?1:u?v:y);var C=f("yref"),M=f("xref"),E=C==="paper",A=M==="paper",h,p,k,w="left";u?(k="middle",w=A?"left":"right",h=A?1.02:1,p=.5):(k=E?"bottom":"top",w="center",h=.5,p=E?1.02:1),c.coerce(s,i,{x:{valType:"number",min:A?-2:0,max:A?3:1,dflt:h}},"x"),c.coerce(s,i,{y:{valType:"number",min:E?-2:0,max:E?3:1,dflt:p}},"y"),f("xanchor",w),f("xpad"),f("yanchor",k),f("ypad"),c.noneOrAll(s,i,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var R=c.coerce(s,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",R.indexOf("inside")!==-1?"hide past domain":"hide past div"),P(s,i,f,"linear");var O=o.font,N={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:O};R.indexOf("inside")!==-1&&(N.bgColor="black"),e(s,i,f,"linear",N),t(s,i,f,"linear",N),S(s,i,f,"linear",N),f("title.text",o._dfltTitle.colorbar);var V=i.showticklabels?i.tickfont:O,H=c.extendFlat({},O,{family:V.family,size:c.bigFont(V.size)});c.coerceFont(f,"title.font",H),f("title.side",u?"top":"right")}}),gc=Ft((Q,$)=>{var c=ia(),g=_n(),P=I0(),S=fv(),t=vi().isValid,e=Qo().traceIs;function r(a,n){var o=n.slice(0,n.length-1);return n?g.nestedProperty(a,o).get()||{}:a}$.exports=function a(n,o,i,s,f){var x=f.prefix,y=f.cLetter,v="_module"in o,T=r(n,x),u=r(o,x),b=r(o._template||{},x)||{},_=function(){return delete n.coloraxis,delete o.coloraxis,a(n,o,i,s,f)};if(v){var C=i._colorAxes||{},M=s(x+"coloraxis");if(M){var E=e(o,"contour")&&g.nestedProperty(o,"contours.coloring").get()||"heatmap",A=C[M];A?(A[2].push(_),A[0]!==E&&(A[0]=!1,g.warn(["Ignoring coloraxis:",M,"setting","as it is linked to incompatible colorscales."].join(" ")))):C[M]=[E,o,[_]];return}}var h=T[y+"min"],p=T[y+"max"],k=c(h)&&c(p)&&h{var c=_n(),g=mu(),P=Pu(),S=gc();$.exports=function(t,e){function r(y,v){return c.coerce(t,e,P,y,v)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var a=e._colorAxes,n,o;function i(y,v){return c.coerce(n,o,P.coloraxis,y,v)}for(var s in a){var f=a[s];if(f[0])n=t[s]||{},o=g.newContainer(e,s,"coloraxis"),o._name=s,S(n,o,e,i,{prefix:"",cLetter:"c"});else{for(var x=0;x{var c=_n(),g=Zd().hasColorscale,P=Zd().extractOpts;$.exports=function(S,t){function e(f,x){var y=f["_"+x];y!==void 0&&(f[x]=y)}function r(f,x){var y=x.container?c.nestedProperty(f,x.container).get():f;if(y)if(y.coloraxis)y._colorAx=t[y.coloraxis];else{var v=P(y),T=v.auto;(T||v.min===void 0)&&e(y,x.min),(T||v.max===void 0)&&e(y,x.max),v.autocolorscale&&e(y,"colorscale")}}for(var a=0;a{var c=ia(),g=_n(),P=Zd().extractOpts;$.exports=function(S,t,e){var r=S._fullLayout,a=e.vals,n=e.containerStr,o=n?g.nestedProperty(t,n).get():t,i=P(o),s=i.auto!==!1,f=i.min,x=i.max,y=i.mid,v=function(){return g.aggNums(Math.min,null,a)},T=function(){return g.aggNums(Math.max,null,a)};if(f===void 0?f=v():s&&(o._colorAx&&c(f)?f=Math.min(f,v()):f=v()),x===void 0?x=T():s&&(o._colorAx&&c(x)?x=Math.max(x,T()):x=T()),s&&y!==void 0&&(x-y>y-f?f=y-(x-y):x-y=0?u=r.colorscale.sequential:u=r.colorscale.sequentialminus,i._sync("colorscale",u)}}}),Xc=Ft((Q,$)=>{var c=vi(),g=Zd();$.exports={moduleType:"component",name:"colorscale",attributes:Ac(),layoutAttributes:Pu(),supplyLayoutDefaults:_g(),handleDefaults:gc(),crossTraceDefaults:vw(),calc:ep(),scales:c.scales,defaultScale:c.defaultScale,getScale:c.get,isValidScale:c.isValid,hasColorscale:g.hasColorscale,extractOpts:g.extractOpts,extractScale:g.extractScale,flipScale:g.flipScale,makeColorScaleFunc:g.makeColorScaleFunc,makeColorScaleFuncFromTrace:g.makeColorScaleFuncFromTrace}}),Mc=Ft((Q,$)=>{var c=_n(),g=Va().isTypedArraySpec;$.exports={hasLines:function(P){return P.visible&&P.mode&&P.mode.indexOf("lines")!==-1},hasMarkers:function(P){return P.visible&&(P.mode&&P.mode.indexOf("markers")!==-1||P.type==="splom")},hasText:function(P){return P.visible&&P.mode&&P.mode.indexOf("text")!==-1},isBubble:function(P){var S=P.marker;return c.isPlainObject(S)&&(c.isArrayOrTypedArray(S.size)||g(S.size))}}}),bg=Ft((Q,$)=>{var c=ia();$.exports=function(g,P){P||(P=2);var S=g.marker,t=S.sizeref||1,e=S.sizemin||0,r=S.sizemode==="area"?function(a){return Math.sqrt(a/t)}:function(a){return a/t};return function(a){var n=r(a/P);return c(n)&&n>0?Math.max(n,e):0}}}),Np=Ft(Q=>{var $=_n();Q.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},Q.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var a=e.xaxes||[],n=e.yaxes||[],o=0;o=0&&a.index{$.exports=P;var c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},g=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function P(e){var r=[];return e.replace(g,function(a,n,o){var i=n.toLowerCase();for(o=t(o),i=="m"&&o.length>2&&(r.push([n].concat(o.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(o.length==c[i])return o.unshift(n),r.push(o);if(o.length{var c=S1(),g=function(y,v){return v?Math.round(y*(v=Math.pow(10,v)))/v:Math.round(y)},P="M0,0Z",S=Math.sqrt(2),t=Math.sqrt(3),e=Math.PI,r=Math.cos,a=Math.sin;$.exports={circle:{n:0,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b="M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z";return T?x(v,T,b):b}},square:{n:1,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")}},diamond:{n:2,f:function(y,v,T){if(n(v))return P;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z")}},cross:{n:3,f:function(y,v,T){if(n(v))return P;var u=g(y*.4,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H"+u+"V"+b+"H-"+u+"V"+u+"H-"+b+"V-"+u+"H-"+u+"V-"+b+"H"+u+"V-"+u+"H"+b+"Z")}},x:{n:4,f:function(y,v,T){if(n(v))return P;var u=g(y*.8/S,2),b="l"+u+","+u,_="l"+u+",-"+u,C="l-"+u+",-"+u,M="l-"+u+","+u;return x(v,T,"M0,"+u+b+_+C+_+C+M+C+M+b+M+b+"Z")}},"triangle-up":{n:5,f:function(y,v,T){if(n(v))return P;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+","+b+"H"+u+"L0,-"+_+"Z")}},"triangle-down":{n:6,f:function(y,v,T){if(n(v))return P;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+",-"+b+"H"+u+"L0,"+_+"Z")}},"triangle-left":{n:7,f:function(y,v,T){if(n(v))return P;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M"+b+",-"+u+"V"+u+"L-"+_+",0Z")}},"triangle-right":{n:8,f:function(y,v,T){if(n(v))return P;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+b+",-"+u+"V"+u+"L"+_+",0Z")}},"triangle-ne":{n:9,f:function(y,v,T){if(n(v))return P;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+b+",-"+u+"H"+u+"V"+b+"Z")}},"triangle-se":{n:10,f:function(y,v,T){if(n(v))return P;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+u+",-"+b+"V"+u+"H-"+b+"Z")}},"triangle-sw":{n:11,f:function(y,v,T){if(n(v))return P;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H-"+u+"V-"+b+"Z")}},"triangle-nw":{n:12,f:function(y,v,T){if(n(v))return P;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+u+","+b+"V-"+u+"H"+b+"Z")}},pentagon:{n:13,f:function(y,v,T){if(n(v))return P;var u=g(y*.951,2),b=g(y*.588,2),_=g(-y,2),C=g(y*-.309,2),M=g(y*.809,2);return x(v,T,"M"+u+","+C+"L"+b+","+M+"H-"+b+"L-"+u+","+C+"L0,"+_+"Z")}},hexagon:{n:14,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M"+_+",-"+b+"V"+b+"L0,"+u+"L-"+_+","+b+"V-"+b+"L0,-"+u+"Z")}},hexagon2:{n:15,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M-"+b+","+_+"H"+b+"L"+u+",0L"+b+",-"+_+"H-"+b+"L-"+u+",0Z")}},octagon:{n:16,f:function(y,v,T){if(n(v))return P;var u=g(y*.924,2),b=g(y*.383,2);return x(v,T,"M-"+b+",-"+u+"H"+b+"L"+u+",-"+b+"V"+b+"L"+b+","+u+"H-"+b+"L-"+u+","+b+"V-"+b+"Z")}},star:{n:17,f:function(y,v,T){if(n(v))return P;var u=y*1.4,b=g(u*.225,2),_=g(u*.951,2),C=g(u*.363,2),M=g(u*.588,2),E=g(-u,2),A=g(u*-.309,2),h=g(u*.118,2),p=g(u*.809,2),k=g(u*.382,2);return x(v,T,"M"+b+","+A+"H"+_+"L"+C+","+h+"L"+M+","+p+"L0,"+k+"L-"+M+","+p+"L-"+C+","+h+"L-"+_+","+A+"H-"+b+"L0,"+E+"Z")}},hexagram:{n:18,f:function(y,v,T){if(n(v))return P;var u=g(y*.66,2),b=g(y*.38,2),_=g(y*.76,2);return x(v,T,"M-"+_+",0l-"+b+",-"+u+"h"+_+"l"+b+",-"+u+"l"+b+","+u+"h"+_+"l-"+b+","+u+"l"+b+","+u+"h-"+_+"l-"+b+","+u+"l-"+b+",-"+u+"h-"+_+"Z")}},"star-triangle-up":{n:19,f:function(y,v,T){if(n(v))return P;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),C=g(y*4,2),M="A "+C+","+C+" 0 0 1 ";return x(v,T,"M-"+u+","+b+M+u+","+b+M+"0,-"+_+M+"-"+u+","+b+"Z")}},"star-triangle-down":{n:20,f:function(y,v,T){if(n(v))return P;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),C=g(y*4,2),M="A "+C+","+C+" 0 0 1 ";return x(v,T,"M"+u+",-"+b+M+"-"+u+",-"+b+M+"0,"+_+M+u+",-"+b+"Z")}},"star-square":{n:21,f:function(y,v,T){if(n(v))return P;var u=g(y*1.1,2),b=g(y*2,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",-"+u+_+"-"+u+","+u+_+u+","+u+_+u+",-"+u+_+"-"+u+",-"+u+"Z")}},"star-diamond":{n:22,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2),b=g(y*1.9,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",0"+_+"0,"+u+_+u+",0"+_+"0,-"+u+_+"-"+u+",0Z")}},"diamond-tall":{n:23,f:function(y,v,T){if(n(v))return P;var u=g(y*.7,2),b=g(y*1.4,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},"diamond-wide":{n:24,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2),b=g(y*.7,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},hourglass:{n:25,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z")},noDot:!0},bowtie:{n:26,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z")},noDot:!0},"circle-cross":{n:27,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y/S,2);return x(v,T,"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(y,v,T){if(n(v))return P;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(y,v,T){if(n(v))return P;var u=g(y*1.3,2),b=g(y*.65,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+b+",-"+b+"L"+b+","+b+"M-"+b+","+b+"L"+b+",-"+b)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*.85,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(y,v,T){if(n(v))return P;var u=g(y/2,2),b=g(y,2);return x(v,T,"M"+u+","+b+"V-"+b+"M"+(u-b)+",-"+b+"V"+b+"M"+b+","+u+"H-"+b+"M-"+b+","+(u-b)+"H"+b)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+","+_+"L0,0M"+u+","+_+"L0,0M0,-"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+",-"+_+"L0,0M"+u+",-"+_+"L0,0M0,"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M"+_+","+u+"L0,0M"+_+",-"+u+"L0,0M-"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(y,v,T){if(n(v))return P;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+_+","+u+"L0,0M-"+_+",-"+u+"L0,0M"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2);return x(v,T,"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(y,v,T){if(n(v))return P;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(y,v,T){if(n(v))return P;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+",-"+b+"H"+u+"Z")},noDot:!0},"arrow-left":{n:47,f:function(y,v,T){if(n(v))return P;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-right":{n:48,f:function(y,v,T){if(n(v))return P;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L-"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(y,v,T){if(n(v))return P;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+",-"+b+"H"+u+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(y,v,T){if(n(v))return P;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(y,v,T){if(n(v))return P;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L-"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(y,v,T){if(n(v))return P;var u=e/2.5,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"L"+b+","+_+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(y,v,T){if(n(v))return P;var u=e/4,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"A "+2*y+","+2*y+" 0 0 1 "+b+","+_+"Z")},backoff:.4,noDot:!0}};function n(y){return y===null}var o,i,s,f;function x(y,v,T){if((!y||y%360===0)&&!v)return T;if(s===y&&f===v&&o===T)return i;s=y,f=v,o=T;function u(N,V){var H=r(N),F=a(N),U=V[0],W=V[1]+(v||0);return[U*H-W*F,U*F+W*H]}for(var b=y/180*e,_=0,C=0,M=c(T),E="",A=0;A{var c=En(),g=_n(),P=g.numberFormat,S=ia(),t=eo(),e=Qo(),r=ui(),a=Xc(),n=g.strTranslate,o=tc(),i=Bp(),s=Sf(),f=s.LINE_SPACING,x=ao().DESELECTDIM,y=Mc(),v=bg(),T=Np().appendArrayPointValue,u=$.exports={};u.font=function(Tt,Lt){var Mt=Lt.variant,te=Lt.style,ve=Lt.weight,oe=Lt.color,Te=Lt.size,He=Lt.family,Ge=Lt.shadow,cr=Lt.lineposition,ur=Lt.textcase;He&&Tt.style("font-family",He),Te+1&&Tt.style("font-size",Te+"px"),oe&&Tt.call(r.fill,oe),ve&&Tt.style("font-weight",ve),te&&Tt.style("font-style",te),Mt&&Tt.style("font-variant",Mt),ur&&Tt.style("text-transform",b(C(ur))),Ge&&Tt.style("text-shadow",Ge==="auto"?o.makeTextShadow(r.contrast(oe)):b(Ge)),cr&&Tt.style("text-decoration-line",b(M(cr)))};function b(Tt){return Tt==="none"?void 0:Tt}var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function C(Tt){return _[Tt]}function M(Tt){return Tt.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}u.setPosition=function(Tt,Lt,Mt){Tt.attr("x",Lt).attr("y",Mt)},u.setSize=function(Tt,Lt,Mt){Tt.attr("width",Lt).attr("height",Mt)},u.setRect=function(Tt,Lt,Mt,te,ve){Tt.call(u.setPosition,Lt,Mt).call(u.setSize,te,ve)},u.translatePoint=function(Tt,Lt,Mt,te){var ve=Mt.c2p(Tt.x),oe=te.c2p(Tt.y);if(S(ve)&&S(oe)&&Lt.node())Lt.node().nodeName==="text"?Lt.attr("x",ve).attr("y",oe):Lt.attr("transform",n(ve,oe));else return!1;return!0},u.translatePoints=function(Tt,Lt,Mt){Tt.each(function(te){var ve=c.select(this);u.translatePoint(te,ve,Lt,Mt)})},u.hideOutsideRangePoint=function(Tt,Lt,Mt,te,ve,oe){Lt.attr("display",Mt.isPtWithinRange(Tt,ve)&&te.isPtWithinRange(Tt,oe)?null:"none")},u.hideOutsideRangePoints=function(Tt,Lt){if(Lt._hasClipOnAxisFalse){var Mt=Lt.xaxis,te=Lt.yaxis;Tt.each(function(ve){var oe=ve[0].trace,Te=oe.xcalendar,He=oe.ycalendar,Ge=e.traceIs(oe,"bar-like")?".bartext":".point,.textpoint";Tt.selectAll(Ge).each(function(cr){u.hideOutsideRangePoint(cr,c.select(this),Mt,te,Te,He)})})}},u.crispRound=function(Tt,Lt,Mt){return!Lt||!S(Lt)?Mt||0:Tt._context.staticPlot?Lt:Lt<1?1:Math.round(Lt)},u.singleLineStyle=function(Tt,Lt,Mt,te,ve){Lt.style("fill","none");var oe=(((Tt||[])[0]||{}).trace||{}).line||{},Te=Mt||oe.width||0,He=ve||oe.dash||"";r.stroke(Lt,te||oe.color),u.dashLine(Lt,He,Te)},u.lineGroupStyle=function(Tt,Lt,Mt,te){Tt.style("fill","none").each(function(ve){var oe=(((ve||[])[0]||{}).trace||{}).line||{},Te=Lt||oe.width||0,He=te||oe.dash||"";c.select(this).call(r.stroke,Mt||oe.color).call(u.dashLine,He,Te)})},u.dashLine=function(Tt,Lt,Mt){Mt=+Mt||0,Lt=u.dashStyle(Lt,Mt),Tt.style({"stroke-dasharray":Lt,"stroke-width":Mt+"px"})},u.dashStyle=function(Tt,Lt){Lt=+Lt||1;var Mt=Math.max(Lt,3);return Tt==="solid"?Tt="":Tt==="dot"?Tt=Mt+"px,"+Mt+"px":Tt==="dash"?Tt=3*Mt+"px,"+3*Mt+"px":Tt==="longdash"?Tt=5*Mt+"px,"+5*Mt+"px":Tt==="dashdot"?Tt=3*Mt+"px,"+Mt+"px,"+Mt+"px,"+Mt+"px":Tt==="longdashdot"&&(Tt=5*Mt+"px,"+2*Mt+"px,"+Mt+"px,"+2*Mt+"px"),Tt};function E(Tt,Lt,Mt,te){var ve=Lt.fillpattern,oe=Lt.fillgradient,Te=u.getPatternAttr,He=ve&&(Te(ve.shape,0,"")||Te(ve.path,0,""));if(He){var Ge=Te(ve.bgcolor,0,null),cr=Te(ve.fgcolor,0,null),ur=ve.fgopacity,jr=Te(ve.size,0,8),Hr=Te(ve.solidity,0,.3),br=Lt.uid;u.pattern(Tt,"point",Mt,br,He,jr,Hr,void 0,ve.fillmode,Ge,cr,ur)}else if(oe&&oe.type!=="none"){var Kr=oe.type,rn="scatterfill-"+Lt.uid;if(te&&(rn="legendfill-"+Lt.uid),!te&&(oe.start!==void 0||oe.stop!==void 0)){var Ce,Gt;Kr==="horizontal"?(Ce={x:oe.start,y:0},Gt={x:oe.stop,y:0}):Kr==="vertical"&&(Ce={x:0,y:oe.start},Gt={x:0,y:oe.stop}),Ce.x=Lt._xA.c2p(Ce.x===void 0?Lt._extremes.x.min[0].val:Ce.x,!0),Ce.y=Lt._yA.c2p(Ce.y===void 0?Lt._extremes.y.min[0].val:Ce.y,!0),Gt.x=Lt._xA.c2p(Gt.x===void 0?Lt._extremes.x.max[0].val:Gt.x,!0),Gt.y=Lt._yA.c2p(Gt.y===void 0?Lt._extremes.y.max[0].val:Gt.y,!0),Tt.call(O,Mt,rn,"linear",oe.colorscale,"fill",Ce,Gt,!0,!1)}else Kr==="horizontal"&&(Kr=Kr+"reversed"),Tt.call(u.gradient,Mt,rn,Kr,oe.colorscale,"fill")}else Lt.fillcolor&&Tt.call(r.fill,Lt.fillcolor)}u.singleFillStyle=function(Tt,Lt){var Mt=c.select(Tt.node()),te=Mt.data(),ve=((te[0]||[])[0]||{}).trace||{};E(Tt,ve,Lt,!1)},u.fillGroupStyle=function(Tt,Lt,Mt){Tt.style("stroke-width",0).each(function(te){var ve=c.select(this);te[0].trace&&E(ve,te[0].trace,Lt,Mt)})};var A=Sc();u.symbolNames=[],u.symbolFuncs=[],u.symbolBackOffs=[],u.symbolNeedLines={},u.symbolNoDot={},u.symbolNoFill={},u.symbolList=[],Object.keys(A).forEach(function(Tt){var Lt=A[Tt],Mt=Lt.n;u.symbolList.push(Mt,String(Mt),Tt,Mt+100,String(Mt+100),Tt+"-open"),u.symbolNames[Mt]=Tt,u.symbolFuncs[Mt]=Lt.f,u.symbolBackOffs[Mt]=Lt.backoff||0,Lt.needLine&&(u.symbolNeedLines[Mt]=!0),Lt.noDot?u.symbolNoDot[Mt]=!0:u.symbolList.push(Mt+200,String(Mt+200),Tt+"-dot",Mt+300,String(Mt+300),Tt+"-open-dot"),Lt.noFill&&(u.symbolNoFill[Mt]=!0)});var h=u.symbolNames.length,p="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";u.symbolNumber=function(Tt){if(S(Tt))Tt=+Tt;else if(typeof Tt=="string"){var Lt=0;Tt.indexOf("-open")>0&&(Lt=100,Tt=Tt.replace("-open","")),Tt.indexOf("-dot")>0&&(Lt+=200,Tt=Tt.replace("-dot","")),Tt=u.symbolNames.indexOf(Tt),Tt>=0&&(Tt+=Lt)}return Tt%100>=h||Tt>=400?0:Math.floor(Math.max(Tt,0))};function k(Tt,Lt,Mt,te){var ve=Tt%100;return u.symbolFuncs[ve](Lt,Mt,te)+(Tt>=200?p:"")}var w=P("~f"),R={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};u.gradient=function(Tt,Lt,Mt,te,ve,oe){var Te=R[te];return O(Tt,Lt,Mt,Te.type,ve,oe,Te.start,Te.stop,!1,Te.reversed)};function O(Tt,Lt,Mt,te,ve,oe,Te,He,Ge,cr){var ur=ve.length,jr;te==="linear"?jr={node:"linearGradient",attrs:{x1:Te.x,y1:Te.y,x2:He.x,y2:He.y,gradientUnits:Ge?"userSpaceOnUse":"objectBoundingBox"},reversed:cr}:te==="radial"&&(jr={node:"radialGradient",reversed:cr});for(var Hr=new Array(ur),br=0;br=0&&Tt.i===void 0&&(Tt.i=oe.i),Lt.style("opacity",te.selectedOpacityFn?te.selectedOpacityFn(Tt):Tt.mo===void 0?Te.opacity:Tt.mo),te.ms2mrc){var Ge;Tt.ms==="various"||Te.size==="various"?Ge=3:Ge=te.ms2mrc(Tt.ms),Tt.mrc=Ge,te.selectedSizeFn&&(Ge=Tt.mrc=te.selectedSizeFn(Tt));var cr=u.symbolNumber(Tt.mx||Te.symbol)||0;Tt.om=cr%200>=100;var ur=se(Tt,Mt),jr=ft(Tt,Mt);Lt.attr("d",k(cr,Ge,ur,jr))}var Hr=!1,br,Kr,rn;if(Tt.so)rn=He.outlierwidth,Kr=He.outliercolor,br=Te.outliercolor;else{var Ce=(He||{}).width;rn=(Tt.mlw+1||Ce+1||(Tt.trace?(Tt.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Tt?Kr=Tt.mlcc=te.lineScale(Tt.mlc):g.isArrayOrTypedArray(He.color)?Kr=r.defaultLine:Kr=He.color,g.isArrayOrTypedArray(Te.color)&&(br=r.defaultLine,Hr=!0),"mc"in Tt?br=Tt.mcc=te.markerScale(Tt.mc):br=Te.color||Te.colors||"rgba(0,0,0,0)",te.selectedColorFn&&(br=te.selectedColorFn(Tt))}if(Tt.om)Lt.call(r.stroke,br).style({"stroke-width":(rn||1)+"px",fill:"none"});else{Lt.style("stroke-width",(Tt.isBlank?0:rn)+"px");var Gt=Te.gradient,ne=Tt.mgt;ne?Hr=!0:ne=Gt&&Gt.type,g.isArrayOrTypedArray(ne)&&(ne=ne[0],R[ne]||(ne=0));var Ct=Te.pattern,gt=u.getPatternAttr,St=Ct&&(gt(Ct.shape,Tt.i,"")||gt(Ct.path,Tt.i,""));if(ne&&ne!=="none"){var Nt=Tt.mgc;Nt?Hr=!0:Nt=Gt.color;var re=Mt.uid;Hr&&(re+="-"+Tt.i),u.gradient(Lt,ve,re,ne,[[0,Nt],[1,br]],"fill")}else if(St){var le=!1,we=Ct.fgcolor;!we&&oe&&oe.color&&(we=oe.color,le=!0);var Ue=gt(we,Tt.i,oe&&oe.color||null),qe=gt(Ct.bgcolor,Tt.i,null),or=Ct.fgopacity,Ar=gt(Ct.size,Tt.i,8),Tr=gt(Ct.solidity,Tt.i,.3);le=le||Tt.mcc||g.isArrayOrTypedArray(Ct.shape)||g.isArrayOrTypedArray(Ct.path)||g.isArrayOrTypedArray(Ct.bgcolor)||g.isArrayOrTypedArray(Ct.fgcolor)||g.isArrayOrTypedArray(Ct.size)||g.isArrayOrTypedArray(Ct.solidity);var pr=Mt.uid;le&&(pr+="-"+Tt.i),u.pattern(Lt,"point",ve,pr,St,Ar,Tr,Tt.mcc,Ct.fillmode,qe,Ue,or)}else g.isArrayOrTypedArray(br)?r.fill(Lt,br[Tt.i]):r.fill(Lt,br);rn&&r.stroke(Lt,Kr)}},u.makePointStyleFns=function(Tt){var Lt={},Mt=Tt.marker;return Lt.markerScale=u.tryColorscale(Mt,""),Lt.lineScale=u.tryColorscale(Mt,"line"),e.traceIs(Tt,"symbols")&&(Lt.ms2mrc=y.isBubble(Tt)?v(Tt):function(){return(Mt.size||6)/2}),Tt.selectedpoints&&g.extendFlat(Lt,u.makeSelectedPointStyleFns(Tt)),Lt},u.makeSelectedPointStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},te=Tt.unselected||{},ve=Tt.marker||{},oe=Mt.marker||{},Te=te.marker||{},He=ve.opacity,Ge=oe.opacity,cr=Te.opacity,ur=Ge!==void 0,jr=cr!==void 0;(g.isArrayOrTypedArray(He)||ur||jr)&&(Lt.selectedOpacityFn=function(gt){var St=gt.mo===void 0?ve.opacity:gt.mo;return gt.selected?ur?Ge:St:jr?cr:x*St});var Hr=ve.color,br=oe.color,Kr=Te.color;(br||Kr)&&(Lt.selectedColorFn=function(gt){var St=gt.mcc||Hr;return gt.selected?br||St:Kr||St});var rn=ve.size,Ce=oe.size,Gt=Te.size,ne=Ce!==void 0,Ct=Gt!==void 0;return e.traceIs(Tt,"symbols")&&(ne||Ct)&&(Lt.selectedSizeFn=function(gt){var St=gt.mrc||rn/2;return gt.selected?ne?Ce/2:St:Ct?Gt/2:St}),Lt},u.makeSelectedTextStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},te=Tt.unselected||{},ve=Tt.textfont||{},oe=Mt.textfont||{},Te=te.textfont||{},He=ve.color,Ge=oe.color,cr=Te.color;return Lt.selectedTextColorFn=function(ur){var jr=ur.tc||He;return ur.selected?Ge||jr:cr||(Ge?jr:r.addOpacity(jr,x))},Lt},u.selectedPointStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedPointStyleFns(Lt),te=Lt.marker||{},ve=[];Mt.selectedOpacityFn&&ve.push(function(oe,Te){oe.style("opacity",Mt.selectedOpacityFn(Te))}),Mt.selectedColorFn&&ve.push(function(oe,Te){r.fill(oe,Mt.selectedColorFn(Te))}),Mt.selectedSizeFn&&ve.push(function(oe,Te){var He=Te.mx||te.symbol||0,Ge=Mt.selectedSizeFn(Te);oe.attr("d",k(u.symbolNumber(He),Ge,se(Te,Lt),ft(Te,Lt))),Te.mrc2=Ge}),ve.length&&Tt.each(function(oe){for(var Te=c.select(this),He=0;He0?Mt:0}u.textPointStyle=function(Tt,Lt,Mt){if(Tt.size()){var te;if(Lt.selectedpoints){var ve=u.makeSelectedTextStyleFns(Lt);te=ve.selectedTextColorFn}var oe=Lt.texttemplate,Te=Mt._fullLayout;Tt.each(function(He){var Ge=c.select(this),cr=oe?g.extractOption(He,Lt,"txt","texttemplate"):g.extractOption(He,Lt,"tx","text");if(!cr&&cr!==0){Ge.remove();return}if(oe){var ur=Lt._module.formatLabels,jr=ur?ur(He,Lt,Te):{},Hr={};T(Hr,Lt,He.i),cr=g.texttemplateString({data:[Hr,He,Lt._meta],fallback:Lt.texttemplatefallback,labels:jr,locale:Te._d3locale,template:cr})}var br=He.tp||Lt.textposition,Kr=H(He,Lt),rn=te?te(He):He.tc||Lt.textfont.color;Ge.call(u.font,{family:He.tf||Lt.textfont.family,weight:He.tw||Lt.textfont.weight,style:He.ty||Lt.textfont.style,variant:He.tv||Lt.textfont.variant,textcase:He.tC||Lt.textfont.textcase,lineposition:He.tE||Lt.textfont.lineposition,shadow:He.tS||Lt.textfont.shadow,size:Kr,color:rn}).text(cr).call(o.convertToTspans,Mt).call(V,br,Kr,He.mrc)})}},u.selectedTextStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedTextStyleFns(Lt);Tt.each(function(te){var ve=c.select(this),oe=Mt.selectedTextColorFn(te),Te=te.tp||Lt.textposition,He=H(te,Lt);r.fill(ve,oe);var Ge=e.traceIs(Lt,"bar-like");V(ve,Te,He,te.mrc2||te.mrc,Ge)})}};var F=.5;u.smoothopen=function(Tt,Lt){if(Tt.length<3)return"M"+Tt.join("L");var Mt="M"+Tt[0],te=[],ve;for(ve=1;ve=Ge||gt>=ur&><=Ge)&&(St<=jr&&St>=cr||St>=jr&&St<=cr)&&(Tt=[gt,St])}return Tt}u.applyBackoff=tt,u.makeTester=function(){var Tt=g.ensureSingleById(c.select("body"),"svg","js-plotly-tester",function(Mt){Mt.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Lt=g.ensureSingle(Tt,"path","js-reference-point",function(Mt){Mt.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});u.tester=Tt,u.testref=Lt},u.savedBBoxes={};var dt=0,rt=1e4;u.bBox=function(Tt,Lt,Mt){Mt||(Mt=at(Tt));var te;if(Mt){if(te=u.savedBBoxes[Mt],te)return g.extendFlat({},te)}else if(Tt.childNodes.length===1){var ve=Tt.childNodes[0];if(Mt=at(ve),Mt){var oe=+ve.getAttribute("x")||0,Te=+ve.getAttribute("y")||0,He=ve.getAttribute("transform");if(!He){var Ge=u.bBox(ve,!1,Mt);return oe&&(Ge.left+=oe,Ge.right+=oe),Te&&(Ge.top+=Te,Ge.bottom+=Te),Ge}if(Mt+="~"+oe+"~"+Te+"~"+He,te=u.savedBBoxes[Mt],te)return g.extendFlat({},te)}}var cr,ur;Lt?cr=Tt:(ur=u.tester.node(),cr=Tt.cloneNode(!0),ur.appendChild(cr)),c.select(cr).attr("transform",null).call(o.positionText,0,0);var jr=cr.getBoundingClientRect(),Hr=u.testref.node().getBoundingClientRect();Lt||ur.removeChild(cr);var br={height:jr.height,width:jr.width,left:jr.left-Hr.left,top:jr.top-Hr.top,right:jr.right-Hr.left,bottom:jr.bottom-Hr.top};return dt>=rt&&(u.savedBBoxes={},dt=0),Mt&&(u.savedBBoxes[Mt]=br),dt++,g.extendFlat({},br)};function at(Tt){var Lt=Tt.getAttribute("data-unformatted");if(Lt!==null)return Lt+Tt.getAttribute("data-math")+Tt.getAttribute("text-anchor")+Tt.getAttribute("style")}u.setClipUrl=function(Tt,Lt,Mt){Tt.attr("clip-path",vt(Lt,Mt))};function vt(Tt,Lt){if(!Tt)return null;var Mt=Lt._context,te=Mt._exportedPlot?"":Mt._baseUrl||"";return te?"url('"+te+"#"+Tt+"')":"url(#"+Tt+")"}u.getTranslate=function(Tt){var Lt=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",te=Tt[Mt]("transform")||"",ve=te.replace(Lt,function(oe,Te,He){return[Te,He].join(" ")}).split(" ");return{x:+ve[0]||0,y:+ve[1]||0}},u.setTranslate=function(Tt,Lt,Mt){var te=/(\btranslate\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Te=Tt[ve]("transform")||"";return Lt=Lt||0,Mt=Mt||0,Te=Te.replace(te,"").trim(),Te+=n(Lt,Mt),Te=Te.trim(),Tt[oe]("transform",Te),Te},u.getScale=function(Tt){var Lt=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",te=Tt[Mt]("transform")||"",ve=te.replace(Lt,function(oe,Te,He){return[Te,He].join(" ")}).split(" ");return{x:+ve[0]||1,y:+ve[1]||1}},u.setScale=function(Tt,Lt,Mt){var te=/(\bscale\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Te=Tt[ve]("transform")||"";return Lt=Lt||1,Mt=Mt||1,Te=Te.replace(te,"").trim(),Te+="scale("+Lt+","+Mt+")",Te=Te.trim(),Tt[oe]("transform",Te),Te};var it=/\s*sc.*/;u.setPointGroupScale=function(Tt,Lt,Mt){if(Lt=Lt||1,Mt=Mt||1,!!Tt){var te=Lt===1&&Mt===1?"":"scale("+Lt+","+Mt+")";Tt.each(function(){var ve=(this.getAttribute("transform")||"").replace(it,"");ve+=te,ve=ve.trim(),this.setAttribute("transform",ve)})}};var Y=/translate\([^)]*\)\s*$/;u.setTextPointsScale=function(Tt,Lt,Mt){Tt&&Tt.each(function(){var te,ve=c.select(this),oe=ve.select("text");if(oe.node()){var Te=parseFloat(oe.attr("x")||0),He=parseFloat(oe.attr("y")||0),Ge=(ve.attr("transform")||"").match(Y);Lt===1&&Mt===1?te=[]:te=[n(Te,He),"scale("+Lt+","+Mt+")",n(-Te,-He)],Ge&&te.push(Ge),ve.attr("transform",te.join(""))}})};function ft(Tt,Lt){var Mt;return Tt&&(Mt=Tt.mf),Mt===void 0&&(Mt=Lt.marker&&Lt.marker.standoff||0),!Lt._geo&&!Lt._xA?-Mt:Mt}u.getMarkerStandoff=ft;var ut=Math.atan2,wt=Math.cos,zt=Math.sin;function Pt(Tt,Lt){var Mt=Lt[0],te=Lt[1];return[Mt*wt(Tt)-te*zt(Tt),Mt*zt(Tt)+te*wt(Tt)]}var Wt,Ht,Jt,ge,he,de;function se(Tt,Lt){var Mt=Tt.ma;Mt===void 0&&(Mt=Lt.marker.angle,(!Mt||g.isArrayOrTypedArray(Mt))&&(Mt=0));var te,ve,oe=Lt.marker.angleref;if(oe==="previous"||oe==="north"){if(Lt._geo){var Te=Lt._geo.project(Tt.lonlat);te=Te[0],ve=Te[1]}else{var He=Lt._xA,Ge=Lt._yA;if(He&&Ge)te=He.c2p(Tt.x),ve=Ge.c2p(Tt.y);else return 90}if(Lt._geo){var cr=Tt.lonlat[0],ur=Tt.lonlat[1],jr=Lt._geo.project([cr,ur+1e-5]),Hr=Lt._geo.project([cr+1e-5,ur]),br=ut(Hr[1]-ve,Hr[0]-te),Kr=ut(jr[1]-ve,jr[0]-te),rn;if(oe==="north")rn=Mt/180*Math.PI;else if(oe==="previous"){var Ce=cr/180*Math.PI,Gt=ur/180*Math.PI,ne=Wt/180*Math.PI,Ct=Ht/180*Math.PI,gt=ne-Ce,St=wt(Ct)*zt(gt),Nt=zt(Ct)*wt(Gt)-wt(Ct)*zt(Gt)*wt(gt);rn=-ut(St,Nt)-Math.PI,Wt=cr,Ht=ur}var re=Pt(br,[wt(rn),0]),le=Pt(Kr,[zt(rn),0]);Mt=ut(re[1]+le[1],re[0]+le[0])/Math.PI*180,oe==="previous"&&!(de===Lt.uid&&Tt.i===he+1)&&(Mt=null)}if(oe==="previous"&&!Lt._geo)if(de===Lt.uid&&Tt.i===he+1&&S(te)&&S(ve)){var we=te-Jt,Ue=ve-ge,qe=Lt.line&&Lt.line.shape||"",or=qe.slice(qe.length-1);or==="h"&&(Ue=0),or==="v"&&(we=0),Mt+=ut(Ue,we)/Math.PI*180+90}else Mt=null}return Jt=te,ge=ve,he=Tt.i,de=Lt.uid,Mt}u.getMarkerAngle=se}),cp=Ft((Q,$)=>{var c=En(),g=ia(),P=Kc(),S=Qo(),t=_n(),e=t.strTranslate,r=Vs(),a=ui(),n=tc(),o=ao(),i=Sf().OPPOSITE_SIDE,s=/ [XY][0-9]* /,f=1.6,x=1.6;function y(v,T,u){var b=v._fullLayout,_=u.propContainer,C=u.propName,M=u.placeholder,E=u.traceIndex,A=u.avoid||{},h=u.attributes,p=u.transform,k=u.containerGroup,w=1,R=_.title,O=(R&&R.text?R.text:"").trim(),N=!1,V=R&&R.font?R.font:{},H=V.family,F=V.size,U=V.color,W=V.weight,q=V.style,X=V.variant,lt=V.textcase,yt=V.lineposition,pt=V.shadow,st=u.subtitlePropName,tt=!!st,dt=u.subtitlePlaceholder,rt=(_.title||{}).subtitle||{text:"",font:{}},at=(rt.text||"").trim(),vt=!1,it=1,Y=rt.font,ft=Y.family,ut=Y.size,wt=Y.color,zt=Y.weight,Pt=Y.style,Wt=Y.variant,Ht=Y.textcase,Jt=Y.lineposition,ge=Y.shadow,he;C==="title.text"?he="titleText":C.indexOf("axis")!==-1?he="axisTitleText":C.indexOf("colorbar")!==-1&&(he="colorbarTitleText");var de=v._context.edits[he];function se(Hr,br){return Hr===void 0||br===void 0?!1:Hr.replace(s," % ")===br.replace(s," % ")}O===""?w=0:se(O,M)&&(de||(O=""),w=.2,N=!0),tt&&(at===""?it=0:se(at,dt)&&(de||(at=""),it=.2,vt=!0)),u._meta?O=t.templateString(O,u._meta):b._meta&&(O=t.templateString(O,b._meta));var Tt=O||at||de,Lt;k||(k=t.ensureSingle(b._infolayer,"g","g-"+T),Lt=b._hColorbarMoveTitle);var Mt=k.selectAll("text."+T).data(Tt?[0]:[]);Mt.enter().append("text"),Mt.text(O).attr("class",T),Mt.exit().remove();var te=null,ve=T+"-subtitle",oe=at||de;if(tt&&(te=k.selectAll("text."+ve).data(oe?[0]:[]),te.enter().append("text"),te.text(at).attr("class",ve),te.exit().remove()),!Tt)return k;function Te(Hr,br){t.syncOrAsync([He,Ge],{title:Hr,subtitle:br})}function He(Hr){var br=Hr.title,Kr=Hr.subtitle,rn;!p&&Lt&&(p={}),p?(rn="",p.rotate&&(rn+="rotate("+[p.rotate,h.x,h.y]+")"),(p.offset||Lt)&&(rn+=e(0,(p.offset||0)-(Lt||0)))):rn=null,br.attr("transform",rn);function Ce(Nt){if(Nt){var re=c.select(Nt.node().parentNode).select("."+ve);if(!re.empty()){var le=Nt.node().getBBox();if(le.height){var we=le.y+le.height+f*ut;re.attr("y",we)}}}}if(br.style("opacity",w*a.opacity(U)).call(r.font,{color:a.rgb(U),size:c.round(F,2),family:H,weight:W,style:q,variant:X,textcase:lt,shadow:pt,lineposition:yt}).attr(h).call(n.convertToTspans,v,Ce),Kr&&!Kr.empty()){var Gt=k.select("."+T+"-math-group"),ne=br.node().getBBox(),Ct=Gt.node()?Gt.node().getBBox():void 0,gt=Ct?Ct.y+Ct.height+f*ut:ne.y+ne.height+x*ut,St=t.extendFlat({},h,{y:gt});Kr.attr("transform",rn),Kr.style("opacity",it*a.opacity(wt)).call(r.font,{color:a.rgb(wt),size:c.round(ut,2),family:ft,weight:zt,style:Pt,variant:Wt,textcase:Ht,shadow:ge,lineposition:Jt}).attr(St).call(n.convertToTspans,v)}return P.previousPromises(v)}function Ge(Hr){var br=Hr.title,Kr=c.select(br.node().parentNode);if(A&&A.selection&&A.side&&O){Kr.attr("transform",null);var rn=i[A.side],Ce=A.side==="left"||A.side==="top"?-1:1,Gt=g(A.pad)?A.pad:2,ne=r.bBox(Kr.node()),Ct={t:0,b:0,l:0,r:0},gt=v._fullLayout._reservedMargin;for(var St in gt)for(var Nt in gt[St]){var re=gt[St][Nt];Ct[Nt]=Math.max(Ct[Nt],re)}var le={left:Ct.l,top:Ct.t,right:b.width-Ct.r,bottom:b.height-Ct.b},we=A.maxShift||Ce*(le[A.side]-ne[A.side]),Ue=0;if(we<0)Ue=we;else{var qe=A.offsetLeft||0,or=A.offsetTop||0;ne.left-=qe,ne.right-=qe,ne.top-=or,ne.bottom-=or,A.selection.each(function(){var Tr=r.bBox(this);t.bBoxIntersect(ne,Tr,Gt)&&(Ue=Math.max(Ue,Ce*(Tr[A.side]-ne[rn])+Gt))}),Ue=Math.min(we,Ue),_._titleScoot=Math.abs(Ue)}if(Ue>0||we<0){var Ar={left:[-Ue,0],right:[Ue,0],top:[0,-Ue],bottom:[0,Ue]}[A.side];Kr.attr("transform",e(Ar[0],Ar[1]))}}}Mt.call(Te,te);function cr(Hr,br){Hr.text(br).on("mouseover.opacity",function(){c.select(this).transition().duration(o.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){c.select(this).transition().duration(o.HIDE_PLACEHOLDER).style("opacity",0)})}if(de&&(O?Mt.on(".opacity",null):(cr(Mt,M),N=!0),Mt.call(n.makeEditable,{gd:v}).on("edit",function(Hr){E!==void 0?S.call("_guiRestyle",v,C,Hr,E):S.call("_guiRelayout",v,C,Hr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Te)}).on("input",function(Hr){this.text(Hr||" ").call(n.positionText,h.x,h.y)}),tt)){if(tt&&!O){var ur=Mt.node().getBBox(),jr=ur.y+ur.height+x*ut;te.attr("y",jr)}at?te.on(".opacity",null):(cr(te,dt),vt=!0),te.call(n.makeEditable,{gd:v}).on("edit",function(Hr){S.call("_guiRelayout",v,"title.subtitle.text",Hr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Te)}).on("input",function(Hr){this.text(Hr||" ").call(n.positionText,te.attr("x"),te.attr("y"))})}return Mt.classed("js-placeholder",N),te&&!te.empty()&&te.classed("js-placeholder",vt),k}$.exports={draw:y,SUBTITLE_PADDING_EM:x,SUBTITLE_PADDING_MATHJAX_EM:f}}),s0=Ft((Q,$)=>{var c=En(),g=Sa().utcFormat,P=_n(),S=P.numberFormat,t=ia(),e=P.cleanNumber,r=P.ms2DateTime,a=P.dateTime2ms,n=P.ensureNumber,o=P.isArrayOrTypedArray,i=Ua(),s=i.FP_SAFE,f=i.BADNUM,x=i.LOG_CLIP,y=i.ONEWEEK,v=i.ONEDAY,T=i.ONEHOUR,u=i.ONEMIN,b=i.ONESEC,_=Rc(),C=ac(),M=C.HOUR_PATTERN,E=C.WEEKDAY_PATTERN;function A(p){return Math.pow(10,p)}function h(p){return p!=null}$.exports=function(p,k){k=k||{};var w=p._id||"x",R=w.charAt(0);function O(rt,at){if(rt>0)return Math.log(rt)/Math.LN10;if(rt<=0&&at&&p.range&&p.range.length===2){var vt=p.range[0],it=p.range[1];return .5*(vt+it-2*x*Math.abs(vt-it))}else return f}function N(rt,at,vt,it){if((it||{}).msUTC&&t(rt))return+rt;var Y=a(rt,vt||p.calendar);if(Y===f)if(t(rt)){rt=+rt;var ft=Math.floor(P.mod(rt+.05,1)*10),ut=Math.round(rt-ft/10);Y=a(new Date(ut))+ft/10}else return f;return Y}function V(rt,at,vt){return r(rt,at,vt||p.calendar)}function H(rt){return p._categories[Math.round(rt)]}function F(rt){if(h(rt)){if(p._categoriesMap===void 0&&(p._categoriesMap={}),p._categoriesMap[rt]!==void 0)return p._categoriesMap[rt];p._categories.push(typeof rt=="number"?String(rt):rt);var at=p._categories.length-1;return p._categoriesMap[rt]=at,at}return f}function U(rt,at){for(var vt=new Array(at),it=0;itp.range[1]&&(vt=!vt);for(var it=vt?-1:1,Y=it*rt,ft=0,ut=0;utzt)ft=ut+1;else{ft=Y<(wt+zt)/2?ut:ut+1;break}}var Pt=p._B[ft]||0;return isFinite(Pt)?lt(rt,p._m2,Pt):0},st=function(rt){var at=p._rangebreaks.length;if(!at)return yt(rt,p._m,p._b);for(var vt=0,it=0;itp._rangebreaks[it].pmax&&(vt=it+1);return yt(rt,p._m2,p._B[vt])}}p.c2l=p.type==="log"?O:n,p.l2c=p.type==="log"?A:n,p.l2p=pt,p.p2l=st,p.c2p=p.type==="log"?function(rt,at){return pt(O(rt,at))}:pt,p.p2c=p.type==="log"?function(rt){return A(st(rt))}:st,["linear","-"].indexOf(p.type)!==-1?(p.d2r=p.r2d=p.d2c=p.r2c=p.d2l=p.r2l=e,p.c2d=p.c2r=p.l2d=p.l2r=n,p.d2p=p.r2p=function(rt){return p.l2p(e(rt))},p.p2d=p.p2r=st,p.cleanPos=n):p.type==="log"?(p.d2r=p.d2l=function(rt,at){return O(e(rt),at)},p.r2d=p.r2c=function(rt){return A(e(rt))},p.d2c=p.r2l=e,p.c2d=p.l2r=n,p.c2r=O,p.l2d=A,p.d2p=function(rt,at){return p.l2p(p.d2r(rt,at))},p.p2d=function(rt){return A(st(rt))},p.r2p=function(rt){return p.l2p(e(rt))},p.p2r=st,p.cleanPos=n):p.type==="date"?(p.d2r=p.r2d=P.identity,p.d2c=p.r2c=p.d2l=p.r2l=N,p.c2d=p.c2r=p.l2d=p.l2r=V,p.d2p=p.r2p=function(rt,at,vt){return p.l2p(N(rt,0,vt))},p.p2d=p.p2r=function(rt,at,vt){return V(st(rt),at,vt)},p.cleanPos=function(rt){return P.cleanDate(rt,f,p.calendar)}):p.type==="category"?(p.d2c=p.d2l=F,p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=X(rt);return at!==void 0?at:p.fraction2r(.5)},p.l2r=p.c2r=n,p.r2l=X,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return typeof rt=="string"&&rt!==""?rt:n(rt)}):p.type==="multicategory"&&(p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=q(rt);return at!==void 0?at:p.fraction2r(.5)},p.r2c_just_indices=W,p.l2r=p.c2r=n,p.r2l=q,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return Array.isArray(rt)||typeof rt=="string"&&rt!==""?rt:n(rt)},p.setupMultiCategory=function(rt){var at=p._traceIndices,vt,it,Y=p._matchGroup;if(Y&&p._categories.length===0){for(var ft in Y)if(ft!==w){var ut=k[_.id2name(ft)];at=at.concat(ut._traceIndices)}}var wt=[[0,{}],[0,{}]],zt=[];for(vt=0;vtut[1]&&(it[ft?0:1]=vt),it[0]===it[1]){var wt=p.l2r(at),zt=p.l2r(vt);if(at!==void 0){var Pt=wt+1;vt!==void 0&&(Pt=Math.min(Pt,zt)),it[ft?1:0]=Pt}if(vt!==void 0){var Wt=zt+1;at!==void 0&&(Wt=Math.max(Wt,wt)),it[ft?0:1]=Wt}}}},p.cleanRange=function(rt,at){p._cleanRange(rt,at),p.limitRange(rt)},p._cleanRange=function(rt,at){at||(at={}),rt||(rt="range");var vt=P.nestedProperty(p,rt).get(),it,Y;if(p.type==="date"?Y=P.dfltRange(p.calendar):R==="y"?Y=C.DFLTRANGEY:p._name==="realaxis"?Y=[0,1]:Y=at.dfltRange||C.DFLTRANGEX,Y=Y.slice(),(p.rangemode==="tozero"||p.rangemode==="nonnegative")&&(Y[0]=0),!vt||vt.length!==2){P.nestedProperty(p,rt).set(Y);return}var ft=vt[0]===null,ut=vt[1]===null;for(p.type==="date"&&!p.autorange&&(vt[0]=P.cleanDate(vt[0],f,p.calendar),vt[1]=P.cleanDate(vt[1],f,p.calendar)),it=0;it<2;it++)if(p.type==="date"){if(!P.isDateTime(vt[it],p.calendar)){p[rt]=Y;break}if(p.r2l(vt[0])===p.r2l(vt[1])){var wt=P.constrain(p.r2l(vt[0]),P.MIN_MS+1e3,P.MAX_MS-1e3);vt[0]=p.l2r(wt-1e3),vt[1]=p.l2r(wt+1e3);break}}else{if(!t(vt[it]))if(!(ft||ut)&&t(vt[1-it]))vt[it]=vt[1-it]*(it?10:.1);else{p[rt]=Y;break}if(vt[it]<-s?vt[it]=-s:vt[it]>s&&(vt[it]=s),vt[0]===vt[1]){var zt=Math.max(1,Math.abs(vt[0]*1e-6));vt[0]-=zt,vt[1]+=zt}}},p.setScale=function(rt){var at=k._size;if(p.overlaying){var vt=_.getFromId({_fullLayout:k},p.overlaying);p.domain=vt.domain}var it=rt&&p._r?"_r":"range",Y=p.calendar;p.cleanRange(it);var ft=p.r2l(p[it][0],Y),ut=p.r2l(p[it][1],Y),wt=R==="y";if(wt?(p._offset=at.t+(1-p.domain[1])*at.h,p._length=at.h*(p.domain[1]-p.domain[0]),p._m=p._length/(ft-ut),p._b=-p._m*ut):(p._offset=at.l+p.domain[0]*at.w,p._length=at.w*(p.domain[1]-p.domain[0]),p._m=p._length/(ut-ft),p._b=-p._m*ft),p._rangebreaks=[],p._lBreaks=0,p._m2=0,p._B=[],p.rangebreaks){var zt,Pt;if(p._rangebreaks=p.locateBreaks(Math.min(ft,ut),Math.max(ft,ut)),p._rangebreaks.length){for(zt=0;ztut&&(Wt=!Wt),Wt&&p._rangebreaks.reverse();var Ht=Wt?-1:1;for(p._m2=Ht*p._length/(Math.abs(ut-ft)-p._lBreaks),p._B.push(-p._m2*(wt?ut:ft)),zt=0;ztY&&(Y+=7,ftY&&(Y+=24,ft=it&&ft=it&&rt=oe.min&&(Ltoe.max&&(oe.max=Mt),te=!1)}te&&ut.push({min:Lt,max:Mt})}};for(vt=0;vt{var c=ia(),g=_n(),P=Ua().BADNUM,S=g.isArrayOrTypedArray,t=g.isDateTime,e=g.cleanNumber,r=Math.round;$.exports=function(x,y,v){var T=x,u=v.noMultiCategory;if(S(T)&&!T.length)return"-";if(!u&&f(T))return"multicategory";if(u&&Array.isArray(T[0])){for(var b=[],_=0;_b*2}function i(x){return Math.max(1,(x-1)/1e3)}function s(x,y){for(var v=x.length,T=i(v),u=0,b=0,_={},C=0;Cu*2}function f(x){return S(x[0])&&S(x[1])}}),J0=Ft((Q,$)=>{var c=En(),g=ia(),P=_n(),S=Ua().FP_SAFE,t=Qo(),e=Vs(),r=Rc(),a=r.getFromId,n=r.isLinked;$.exports={applyAutorangeOptions:k,getAutoRange:o,makePadFn:s,doAutoRange:v,findExtremes:T,concatExtremes:y};function o(w,R){var O,N,V=[],H=w._fullLayout,F=s(H,R,0),U=s(H,R,1),W=y(w,R),q=W.min,X=W.max;if(q.length===0||X.length===0)return P.simpleMap(R.range,R.r2l);var lt=q[0].val,yt=X[0].val;for(O=1;O0&&(Pt=vt-F(ft)-U(ut),Pt>it?Wt/Pt>Y&&(wt=ft,zt=ut,Y=Wt/Pt):Wt/vt>Y&&(wt={val:ft.val,nopad:1},zt={val:ut.val,nopad:1},Y=Wt/vt));function Ht(se,Tt){return Math.max(se,U(Tt))}if(lt===yt){var Jt=lt-1,ge=lt+1;if(rt)if(lt===0)V=[0,1];else{var he=(lt>0?X:q).reduce(Ht,0),de=lt/(1-Math.min(.5,he/vt));V=lt>0?[0,de]:[de,0]}else at?V=[Math.max(0,Jt),Math.max(1,ge)]:V=[Jt,ge]}else rt?(wt.val>=0&&(wt={val:0,nopad:1}),zt.val<=0&&(zt={val:0,nopad:1})):at&&(wt.val-Y*F(wt)<0&&(wt={val:0,nopad:1}),zt.val<=0&&(zt={val:1,nopad:1})),Y=(zt.val-wt.val-i(R,ft.val,ut.val))/(vt-F(wt)-U(zt)),V=[wt.val-Y*F(wt),zt.val+Y*U(zt)];return V=k(V,R),R.limitRange&&R.limitRange(),st&&V.reverse(),P.simpleMap(V,R.l2r||Number)}function i(w,R,O){var N=0;if(w.rangebreaks)for(var V=w.locateBreaks(R,O),H=0;H0?O.ppadplus:O.ppadminus)||O.ppad||0),ft=it((w._m>0?O.ppadminus:O.ppadplus)||O.ppad||0),ut=it(O.vpadplus||O.vpad),wt=it(O.vpadminus||O.vpad);if(!q){if(at=1/0,vt=-1/0,W)for(lt=0;lt0&&(at=yt),yt>vt&&yt-S&&(at=yt),yt>vt&&yt=Wt;lt--)Pt(lt);return{min:N,max:V,opts:O}}function u(w,R,O,N){_(w,R,O,N,M)}function b(w,R,O,N){_(w,R,O,N,E)}function _(w,R,O,N,V){for(var H=N.tozero,F=N.extrapad,U=!0,W=0;W=O&&(q.extrapad||!F)){U=!1;break}else V(R,q.val)&&q.pad<=O&&(F||!q.extrapad)&&(w.splice(W,1),W--)}if(U){var X=H&&R===0;w.push({val:R,pad:X?0:O,extrapad:X?!1:F})}}function C(w){return g(w)&&Math.abs(w)=R}function A(w,R){var O=R.autorangeoptions;return O&&O.minallowed!==void 0&&p(R,O.minallowed,O.maxallowed)?O.minallowed:O&&O.clipmin!==void 0&&p(R,O.clipmin,O.clipmax)?Math.max(w,R.d2l(O.clipmin)):w}function h(w,R){var O=R.autorangeoptions;return O&&O.maxallowed!==void 0&&p(R,O.minallowed,O.maxallowed)?O.maxallowed:O&&O.clipmax!==void 0&&p(R,O.clipmin,O.clipmax)?Math.min(w,R.d2l(O.clipmax)):w}function p(w,R,O){return R!==void 0&&O!==void 0?(R=w.d2l(R),O=w.d2l(O),R=W&&(H=W,O=W),F<=W&&(F=W,N=W)}}return O=A(O,R),N=h(N,R),[O,N]}}),Ls=Ft((Q,$)=>{var c=En(),g=ia(),P=Kc(),S=Qo(),t=_n(),e=t.strTranslate,r=tc(),a=cp(),n=ui(),o=Vs(),i=Cd(),s=Nh(),f=Ua(),x=f.ONEMAXYEAR,y=f.ONEAVGYEAR,v=f.ONEMINYEAR,T=f.ONEMAXQUARTER,u=f.ONEAVGQUARTER,b=f.ONEMINQUARTER,_=f.ONEMAXMONTH,C=f.ONEAVGMONTH,M=f.ONEMINMONTH,E=f.ONEWEEK,A=f.ONEDAY,h=A/2,p=f.ONEHOUR,k=f.ONEMIN,w=f.ONESEC,R=f.ONEMILLI,O=f.ONEMICROSEC,N=f.MINUS_SIGN,V=f.BADNUM,H={K:"zeroline"},F={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},W={K:"tick",L:"path"},q={K:"tick",L:"text"},X={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},lt=Sf(),yt=lt.MID_SHIFT,pt=lt.CAP_SHIFT,st=lt.LINE_SPACING,tt=lt.OPPOSITE_SIDE,dt=3,rt=$.exports={};rt.setConvert=s0();var at=dv(),vt=Rc(),it=vt.idSort,Y=vt.isLinked;rt.id2name=vt.id2name,rt.name2id=vt.name2id,rt.cleanId=vt.cleanId,rt.list=vt.list,rt.listIds=vt.listIds,rt.getFromId=vt.getFromId,rt.getFromTrace=vt.getFromTrace;var ft=J0();rt.getAutoRange=ft.getAutoRange,rt.findExtremes=ft.findExtremes;var ut=1e-4;function wt(ze){var Pe=(ze[1]-ze[0])*ut;return[ze[0]-Pe,ze[1]+Pe]}rt.coerceRef=function(ze,Pe,Rr,qr,$r,Br){var Gr=qr.charAt(qr.length-1),fn=Rr._fullLayout._subplots[Gr+"axis"],an=qr+"ref",Ee={};return $r||($r=fn[0]||(typeof Br=="string"?Br:Br[0])),Br||(Br=$r),fn=fn.concat(fn.map(function(dr){return dr+" domain"})),Ee[an]={valType:"enumerated",values:fn.concat(Br?typeof Br=="string"?[Br]:Br:[]),dflt:$r},t.coerce(ze,Pe,Ee,an)},rt.getRefType=function(ze){return ze===void 0?ze:ze==="paper"?"paper":ze==="pixel"?"pixel":/( domain)$/.test(ze)?"domain":"range"},rt.coercePosition=function(ze,Pe,Rr,qr,$r,Br){var Gr,fn,an=rt.getRefType(qr);if(an!=="range")Gr=t.ensureNumber,fn=Rr($r,Br);else{var Ee=rt.getFromId(Pe,qr);Br=Ee.fraction2r(Br),fn=Rr($r,Br),Gr=Ee.cleanPos}ze[$r]=Gr(fn)},rt.cleanPosition=function(ze,Pe,Rr){var qr=Rr==="paper"||Rr==="pixel"?t.ensureNumber:rt.getFromId(Pe,Rr).cleanPos;return qr(ze)},rt.redrawComponents=function(ze,Pe){Pe=Pe||rt.listIds(ze);var Rr=ze._fullLayout;function qr($r,Br,Gr,fn){for(var an=S.getComponentMethod($r,Br),Ee={},dr=0;dr2e-6||((Rr-ze._forceTick0)/ze._minDtick%1+1.000001)%1>2e-6)&&(ze._minDtick=0))},rt.saveRangeInitial=function(ze,Pe){for(var Rr=rt.list(ze,"",!0),qr=!1,$r=0;$rVr*.3||Ee(qr)||Ee($r))){var vn=Rr.dtick/2;ze+=ze+vnGr){var fn=Number(Rr.substr(1));Br.exactYears>Gr&&fn%12===0?ze=rt.tickIncrement(ze,"M6","reverse")+A*1.5:Br.exactMonths>Gr?ze=rt.tickIncrement(ze,"M1","reverse")+A*15.5:ze-=h;var an=rt.tickIncrement(ze,Rr);if(an<=qr)return an}return ze}rt.prepMinorTicks=function(ze,Pe,Rr){if(!Pe.minor.dtick){delete ze.dtick;var qr=Pe.dtick&&g(Pe._tmin),$r;if(qr){var Br=rt.tickIncrement(Pe._tmin,Pe.dtick,!0);$r=[Pe._tmin,Br*.99+Pe._tmin*.01]}else{var Gr=t.simpleMap(Pe.range,Pe.r2l);$r=[Gr[0],.8*Gr[0]+.2*Gr[1]]}if(ze.range=t.simpleMap($r,Pe.l2r),ze._isMinor=!0,rt.prepTicks(ze,Rr),qr){var fn=g(Pe.dtick),an=g(ze.dtick),Ee=fn?Pe.dtick:+Pe.dtick.substring(1),dr=an?ze.dtick:+ze.dtick.substring(1);fn&&an?ge(Ee,dr)?Ee===2*E&&dr===2*A&&(ze.dtick=E):Ee===2*E&&dr===3*A?ze.dtick=E:Ee===E&&!(Pe._input.minor||{}).nticks?ze.dtick=A:he(Ee/dr,2.5)?ze.dtick=Ee/2:ze.dtick=Ee:String(Pe.dtick).charAt(0)==="M"?an?ze.dtick="M1":ge(Ee,dr)?Ee>=12&&dr===2&&(ze.dtick="M3"):ze.dtick=Pe.dtick:String(ze.dtick).charAt(0)==="L"?String(Pe.dtick).charAt(0)==="L"?ge(Ee,dr)||(ze.dtick=he(Ee/dr,2.5)?Pe.dtick/2:Pe.dtick):ze.dtick="D1":ze.dtick==="D2"&&+Pe.dtick>1&&(ze.dtick=1)}ze.range=Pe.range}Pe.minor._tick0Init===void 0&&(ze.tick0=Pe.tick0)};function ge(ze,Pe){return Math.abs((ze/Pe+.5)%1-.5)<.001}function he(ze,Pe){return Math.abs(ze/Pe-1)<.001}rt.prepTicks=function(ze,Pe){var Rr=t.simpleMap(ze.range,ze.r2l,void 0,void 0,Pe);if(ze.tickmode==="auto"||!ze.dtick){var qr=ze.nticks,$r;qr||(ze.type==="category"||ze.type==="multicategory"?($r=ze.tickfont?t.bigFont(ze.tickfont.size||12):15,qr=ze._length/$r):($r=ze._id.charAt(0)==="y"?40:80,qr=t.constrain(ze._length/$r,4,9)+1),ze._name==="radialaxis"&&(qr*=2)),ze.minor&&ze.minor.tickmode!=="array"||ze.tickmode==="array"&&(qr*=100),ze._roughDTick=Math.abs(Rr[1]-Rr[0])/qr,rt.autoTicks(ze,ze._roughDTick),ze._minDtick>0&&ze.dtick0?(Br=qr-1,Gr=qr):(Br=qr,Gr=qr);var fn=ze[Br].value,an=ze[Gr].value,Ee=Math.abs(an-fn),dr=Rr||Ee,Vr=0;dr>=v?Ee>=v&&Ee<=x?Vr=Ee:Vr=y:Rr===u&&dr>=b?Ee>=b&&Ee<=T?Vr=Ee:Vr=u:dr>=M?Ee>=M&&Ee<=_?Vr=Ee:Vr=C:Rr===E&&dr>=E?Vr=E:dr>=A?Vr=A:Rr===h&&dr>=h?Vr=h:Rr===p&&dr>=p&&(Vr=p);var vn;Vr>=Ee&&(Vr=Ee,vn=!0);var Fn=$r+Vr;if(Pe.rangebreaks&&Vr>0){for(var Xn=84,Pn=0,Sn=0;SnE&&(Vr=Ee)}(Vr>0||qr===0)&&(ze[qr].periodX=$r+Vr/2)}}rt.calcTicks=function(ze,Pe){for(var Rr=ze.type,qr=ze.calendar,$r=ze.ticklabelstep,Br=ze.ticklabelmode==="period",Gr=ze.range[0]>ze.range[1],fn=!ze.ticklabelindex||t.isArrayOrTypedArray(ze.ticklabelindex)?ze.ticklabelindex:[ze.ticklabelindex],an=t.simpleMap(ze.range,ze.r2l,void 0,void 0,Pe),Ee=an[1]=(Ea?0:1);Ri--){var Ja=!Ri;Ri?(ze._dtickInit=ze.dtick,ze._tick0Init=ze.tick0):(ze.minor._dtickInit=ze.minor.dtick,ze.minor._tick0Init=ze.minor.tick0);var Xa=Ri?ze:t.extendFlat({},ze,ze.minor);if(Ja?rt.prepMinorTicks(Xa,ze,Pe):rt.prepTicks(Xa,Pe),Xa.tickmode==="array"){Ri?(Pn=[],Fn=te(ze,!Ja)):(Sn=[],Xn=te(ze,!Ja));continue}if(Xa.tickmode==="sync"){Pn=[],Fn=Mt(ze);continue}var Do=wt(an),go=Do[0],Fo=Do[1],za=g(Xa.dtick),xs=Rr==="log"&&!(za||Xa.dtick.charAt(0)==="L"),os=rt.tickFirst(Xa,Pe);if(Ri){if(ze._tmin=os,os=Fo:Zo<=Fo;Zo=rt.tickIncrement(Zo,hl,Ee,qr)){if(Ri&&Ks++,Xa.rangebreaks&&!Ee){if(Zo=Vr)break}if(Pn.length>vn||Zo===cl)break;cl=Zo;var tl={value:Zo};Ri?(xs&&Zo!==(Zo|0)&&(tl.simpleLabel=!0),$r>1&&Ks%$r&&(tl.skipLabel=!0),Pn.push(tl)):(tl.minor=!0,Sn.push(tl))}}if(!Sn||Sn.length<2)fn=!1;else{var Bl=(Sn[1].value-Sn[0].value)*(Gr?-1:1);Wa(Bl,ze.tickformat)||(fn=!1)}if(!fn)Zn=Pn;else{var cs=Pn.concat(Sn);Br&&Pn.length&&(cs=cs.slice(1)),cs=cs.sort(function(fl,rs){return fl.value-rs.value}).filter(function(fl,rs,Mu){return rs===0||fl.value!==Mu[rs-1].value});var Ps=cs.map(function(fl,rs){return fl.minor===void 0&&!fl.skipLabel?rs:null}).filter(function(fl){return fl!==null});Ps.forEach(function(fl){fn.map(function(rs){var Mu=fl+rs;Mu>=0&&Mu-1;qs--){if(Pn[qs].drop){Pn.splice(qs,1);continue}Pn[qs].value=Li(Pn[qs].value,ze);var ol=ze.c2p(Pn[qs].value);(Jl?$l>ol-Jo:$lVr||GuVr&&(Mu.periodX=Vr),Gu$r&&vny)Pe/=y,qr=$r(10),ze.dtick="M"+12*jr(Pe,qr,ve);else if(Br>C)Pe/=C,ze.dtick="M"+jr(Pe,1,oe);else if(Br>A){if(ze.dtick=jr(Pe,A,ze._hasDayOfWeekBreaks?[1,2,7,14]:He),!Rr){var Gr=rt.getTickFormat(ze),fn=ze.ticklabelmode==="period";fn&&(ze._rawTick0=ze.tick0),/%[uVW]/.test(Gr)?ze.tick0=t.dateTick0(ze.calendar,2):ze.tick0=t.dateTick0(ze.calendar,1),fn&&(ze._dowTick0=ze.tick0)}}else Br>p?ze.dtick=jr(Pe,p,oe):Br>k?ze.dtick=jr(Pe,k,Te):Br>w?ze.dtick=jr(Pe,w,Te):(qr=$r(10),ze.dtick=jr(Pe,qr,ve))}else if(ze.type==="log"){ze.tick0=0;var an=t.simpleMap(ze.range,ze.r2l);if(ze._isMinor&&(Pe*=1.5),Pe>.7)ze.dtick=Math.ceil(Pe);else if(Math.abs(an[1]-an[0])<1){var Ee=1.5*Math.abs((an[1]-an[0])/Pe);Pe=Math.abs(Math.pow(10,an[1])-Math.pow(10,an[0]))/Ee,qr=$r(10),ze.dtick="L"+jr(Pe,qr,ve)}else ze.dtick=Pe>.3?"D2":"D1"}else ze.type==="category"||ze.type==="multicategory"?(ze.tick0=0,ze.dtick=Math.ceil(Math.max(Pe,1))):xi(ze)?(ze.tick0=0,qr=1,ze.dtick=jr(Pe,qr,ur)):(ze.tick0=0,qr=$r(10),ze.dtick=jr(Pe,qr,ve));if(ze.dtick===0&&(ze.dtick=1),!g(ze.dtick)&&typeof ze.dtick!="string"){var dr=ze.dtick;throw ze.dtick=1,"ax.dtick error: "+String(dr)}};function Hr(ze){var Pe=ze.dtick;if(ze._tickexponent=0,!g(Pe)&&typeof Pe!="string"&&(Pe=1),(ze.type==="category"||ze.type==="multicategory")&&(ze._tickround=null),ze.type==="date"){var Rr=ze.r2l(ze.tick0),qr=ze.l2r(Rr).replace(/(^-|i)/g,""),$r=qr.length;if(String(Pe).charAt(0)==="M")$r>10||qr.substr(5)!=="01-01"?ze._tickround="d":ze._tickround=+Pe.substr(1)%12===0?"y":"m";else if(Pe>=A&&$r<=10||Pe>=A*15)ze._tickround="d";else if(Pe>=k&&$r<=16||Pe>=p)ze._tickround="M";else if(Pe>=w&&$r<=19||Pe>=k)ze._tickround="S";else{var Br=ze.l2r(Rr+Pe).replace(/^-/,"").length;ze._tickround=Math.max($r,Br)-20,ze._tickround<0&&(ze._tickround=4)}}else if(g(Pe)||Pe.charAt(0)==="L"){var Gr=ze.range.map(ze.r2d||Number);g(Pe)||(Pe=Number(Pe.substr(1))),ze._tickround=2-Math.floor(Math.log(Pe)/Math.LN10+.01);var fn=Math.max(Math.abs(Gr[0]),Math.abs(Gr[1])),an=Math.floor(Math.log(fn)/Math.LN10+.01),Ee=ze.minexponent===void 0?3:ze.minexponent;Math.abs(an)>Ee&&(re(ze.exponentformat)&&ze.exponentformat!=="SI extended"&&!le(an)||re(ze.exponentformat)&&ze.exponentformat==="SI extended"&&!we(an)?ze._tickexponent=3*Math.round((an-1)/3):ze._tickexponent=an)}else ze._tickround=null}rt.tickIncrement=function(ze,Pe,Rr,qr){var $r=Rr?-1:1;if(g(Pe))return t.increment(ze,$r*Pe);var Br=Pe.charAt(0),Gr=$r*Number(Pe.substr(1));if(Br==="M")return t.incrementMonth(ze,Gr,qr);if(Br==="L")return Math.log(Math.pow(10,ze)+Gr)/Math.LN10;if(Br==="D"){var fn=Pe==="D2"?cr:Ge,an=ze+$r*.01,Ee=t.roundUp(t.mod(an,1),fn,Rr);return Math.floor(an)+Math.log(c.round(Math.pow(10,Ee),1))/Math.LN10}throw"unrecognized dtick "+String(Pe)},rt.tickFirst=function(ze,Pe){var Rr=ze.r2l||Number,qr=t.simpleMap(ze.range,Rr,void 0,void 0,Pe),$r=qr[1]=0&&Zn<=ze._length?Sn:null};if(Br&&t.isArrayOrTypedArray(ze.ticktext)){var Vr=t.simpleMap(ze.range,ze.r2l),vn=(Math.abs(Vr[1]-Vr[0])-(ze._lBreaks||0))/1e4;for(Ee=0;Ee"+fn;else{var Ee=Oi(ze),dr=ze._trueSide||ze.side;(!Ee&&dr==="top"||Ee&&dr==="bottom")&&(Gr+="
")}Pe.text=Gr}function rn(ze,Pe,Rr,qr,$r){var Br=ze.dtick,Gr=Pe.x,fn=ze.tickformat,an=typeof Br=="string"&&Br.charAt(0);if($r==="never"&&($r=""),qr&&an!=="L"&&(Br="L3",an="L"),fn||an==="L")Pe.text=qe(Math.pow(10,Gr),ze,$r,qr);else if(g(Br)||an==="D"&&(ze.minorloglabels==="complete"||t.mod(Gr+.01,1)<.1)){ze.minorloglabels==="complete"&&!(t.mod(Gr+.01,1)<.1)&&(Pe.fontSize*=.75);var Ee=Math.pow(10,Gr).toExponential(0),dr=Ee.split("e"),Vr=+dr[1],vn=Math.abs(Vr),Fn=ze.exponentformat;Fn==="power"||re(Fn)&&Fn!=="SI extended"&&le(Vr)||re(Fn)&&Fn==="SI extended"&&we(Vr)?(Pe.text=dr[0],vn>0&&(Pe.text+="x10"),Pe.text==="1x10"&&(Pe.text="10"),Vr!==0&&Vr!==1&&(Pe.text+=""+(Vr>0?"":N)+vn+""),Pe.fontSize*=1.25):(Fn==="e"||Fn==="E")&&vn>2?Pe.text=dr[0]+Fn+(Vr>0?"+":N)+vn:(Pe.text=qe(Math.pow(10,Gr),ze,"","fakehover"),Br==="D1"&&ze._id.charAt(0)==="y"&&(Pe.dy-=Pe.fontSize/6))}else if(an==="D")Pe.text=ze.minorloglabels==="none"?"":String(Math.round(Math.pow(10,t.mod(Gr,1)))),Pe.fontSize*=.75;else throw"unrecognized dtick "+String(Br);if(ze.dtick==="D1"){var Xn=String(Pe.text).charAt(0);(Xn==="0"||Xn==="1")&&(ze._id.charAt(0)==="y"?Pe.dx-=Pe.fontSize/4:(Pe.dy+=Pe.fontSize/2,Pe.dx+=(ze.range[1]>ze.range[0]?1:-1)*Pe.fontSize*(Gr<0?.5:.25)))}}function Ce(ze,Pe){var Rr=ze._categories[Math.round(Pe.x)];Rr===void 0&&(Rr=""),Pe.text=String(Rr)}function Gt(ze,Pe,Rr){var qr=Math.round(Pe.x),$r=ze._categories[qr]||[],Br=$r[1]===void 0?"":String($r[1]),Gr=$r[0]===void 0?"":String($r[0]);Rr?Pe.text=Gr+" - "+Br:(Pe.text=Br,Pe.text2=Gr)}function ne(ze,Pe,Rr,qr,$r){$r==="never"?$r="":ze.showexponent==="all"&&Math.abs(Pe.x/ze.dtick)<1e-6&&($r="hide"),Pe.text=qe(Pe.x,ze,$r,qr)}function Ct(ze,Pe,Rr,qr,$r){if(ze.thetaunit==="radians"&&!Rr){var Br=Pe.x/180;if(Br===0)Pe.text="0";else{var Gr=gt(Br);if(Gr[1]>=100)Pe.text=qe(t.deg2rad(Pe.x),ze,$r,qr);else{var fn=Pe.x<0;Gr[1]===1?Gr[0]===1?Pe.text="π":Pe.text=Gr[0]+"π":Pe.text=["",Gr[0],"","⁄","",Gr[1],"","π"].join(""),fn&&(Pe.text=N+Pe.text)}}}else Pe.text=qe(Pe.x,ze,$r,qr)}function gt(ze){function Pe(fn,an){return Math.abs(fn-an)<=1e-6}function Rr(fn,an){return Pe(an,0)?fn:Rr(an,fn%an)}function qr(fn){for(var an=1;!Pe(Math.round(fn*an)/an,fn);)an*=10;return an}var $r=qr(ze),Br=ze*$r,Gr=Math.abs(Rr(Br,$r));return[Math.round(Br/Gr),Math.round($r/Gr)]}var St=["f","p","n","μ","m","","k","M","G","T"],Nt=["q","r","y","z","a",...St,"P","E","Z","Y","R","Q"],re=ze=>["SI","SI extended","B"].includes(ze);function le(ze){return ze>14||ze<-15}function we(ze){return ze>32||ze<-30}function Ue(ze,Pe){return re(Pe)?!!(Pe==="SI extended"&&we(ze)||Pe!=="SI extended"&&le(ze)):!1}function qe(ze,Pe,Rr,qr){var $r=ze<0,Br=Pe._tickround,Gr=Rr||Pe.exponentformat||"B",fn=Pe._tickexponent,an=rt.getTickFormat(Pe),Ee=Pe.separatethousands;if(qr){var dr={exponentformat:Gr,minexponent:Pe.minexponent,dtick:Pe.showexponent==="none"?Pe.dtick:g(ze)&&Math.abs(ze)||1,range:Pe.showexponent==="none"?Pe.range.map(Pe.r2d):[0,ze||1]};Hr(dr),Br=(Number(dr._tickround)||0)+4,fn=dr._tickexponent,Pe.hoverformat&&(an=Pe.hoverformat)}if(an)return Pe._numFormat(an)(ze).replace(/-/g,N);var Vr=Math.pow(10,-Br)/2;if(Gr==="none"&&(fn=0),ze=Math.abs(ze),ze"+Xn+"":Gr==="B"&&fn===9?ze+="B":re(Gr)&&(ze+=Gr==="SI extended"?Nt[fn/3+10]:St[fn/3+5])}return $r?N+ze:ze}rt.getTickFormat=function(ze){var Pe;function Rr(an){return typeof an!="string"?an:Number(an.replace("M",""))*C}function qr(an,Ee){var dr=["L","D"];if(typeof an==typeof Ee){if(typeof an=="number")return an-Ee;var Vr=dr.indexOf(an.charAt(0)),vn=dr.indexOf(Ee.charAt(0));return Vr===vn?Number(an.replace(/(L|D)/g,""))-Number(Ee.replace(/(L|D)/g,"")):Vr-vn}else return typeof an=="number"?1:-1}function $r(an,Ee,dr){var Vr=dr||function(Xn){return Xn},vn=Ee[0],Fn=Ee[1];return(!vn&&typeof vn!="number"||Vr(vn)<=Vr(an))&&(!Fn&&typeof Fn!="number"||Vr(Fn)>=Vr(an))}function Br(an,Ee){var dr=Ee[0]===null,Vr=Ee[1]===null,vn=qr(an,Ee[0])>=0,Fn=qr(an,Ee[1])<=0;return(dr||vn)&&(Vr||Fn)}var Gr,fn;if(ze.tickformatstops&&ze.tickformatstops.length>0)switch(ze.type){case"date":case"linear":{for(Pe=0;Pe=0&&$r.unshift($r.splice(dr,1).shift())}});var fn={false:{left:0,right:0}};return t.syncOrAsync($r.map(function(an){return function(){if(an){var Ee=rt.getFromId(ze,an);Rr||(Rr={}),Rr.axShifts=fn,Rr.overlayingShiftedAx=Gr;var dr=rt.drawOne(ze,Ee,Rr);return Ee._shiftPusher&&li(Ee,Ee._fullDepth||0,fn,!0),Ee._r=Ee.range.slice(),Ee._rl=t.simpleMap(Ee._r,Ee.r2l),dr}}}))},rt.drawOne=function(ze,Pe,Rr){Rr=Rr||{};var qr=Rr.axShifts||{},$r=Rr.overlayingShiftedAx||[],Br,Gr,fn;Pe.setScale();var an=ze._fullLayout,Ee=Pe._id,dr=Ee.charAt(0),Vr=rt.counterLetter(Ee),vn=an._plots[Pe._mainSubplot],Fn=Pe.zerolinelayer==="above traces";if(!vn)return;if(Pe._shiftPusher=Pe.autoshift||$r.indexOf(Pe._id)!==-1||$r.indexOf(Pe.overlaying)!==-1,Pe._shiftPusher&Pe.anchor==="free"){var Xn=Pe.linewidth/2||0;Pe.ticks==="inside"&&(Xn+=Pe.ticklen),li(Pe,Xn,qr,!0),li(Pe,Pe.shift||0,qr,!1)}(Rr.skipTitle!==!0||Pe._shift===void 0)&&(Pe._shift=La(Pe,qr));var Pn=vn[dr+"axislayer"],Sn=Pe._mainLinePosition,Zn=Sn+=Pe._shift,Ea=Pe._mainMirrorPosition,Ri=Pe._vals=rt.calcTicks(Pe),Ja=[Pe.mirror,Zn,Ea].join("_");for(Br=0;Br0?bl.bottom-Mu:0,Gu))));var oc=0,mh=0;if(Pe._shiftPusher&&(oc=Math.max(Gu,bl.height>0?fl==="l"?Mu-bl.left:bl.right-Mu:0),Pe.title.text!==an._dfltTitle[dr]&&(mh=(Pe._titleStandoff||0)+(Pe._titleScoot||0),fl==="l"&&(mh+=ii(Pe))),Pe._fullDepth=Math.max(oc,mh)),Pe.automargin){Dl={x:0,y:0,r:0,l:0,t:0,b:0};var Jc=[0,1],oh=typeof Pe._shift=="number"?Pe._shift:0;if(dr==="x"){if(fl==="b"?Dl[fl]=Pe._depth:(Dl[fl]=Pe._depth=Math.max(bl.width>0?Mu-bl.top:0,Gu),Jc.reverse()),bl.width>0){var Uf=bl.right-(Pe._offset+Pe._length);Uf>0&&(Dl.xr=1,Dl.r=Uf);var Cf=Pe._offset-bl.left;Cf>0&&(Dl.xl=0,Dl.l=Cf)}}else if(fl==="l"?(Pe._depth=Math.max(bl.height>0?Mu-bl.left:0,Gu),Dl[fl]=Pe._depth-oh):(Pe._depth=Math.max(bl.height>0?bl.right-Mu:0,Gu),Dl[fl]=Pe._depth+oh,Jc.reverse()),bl.height>0){var Fl=bl.bottom-(Pe._offset+Pe._length);Fl>0&&(Dl.yb=0,Dl.b=Fl);var Bc=Pe._offset-bl.top;Bc>0&&(Dl.yt=1,Dl.t=Bc)}Dl[Vr]=Pe.anchor==="free"?Pe.position:Pe._anchorAxis.domain[Jc[0]],Pe.title.text!==an._dfltTitle[dr]&&(Dl[fl]+=ii(Pe)+(Pe.title.standoff||0)),Pe.mirror&&Pe.anchor!=="free"&&(Ql={x:0,y:0,r:0,l:0,t:0,b:0},Ql[rs]=Pe.linewidth,Pe.mirror&&Pe.mirror!==!0&&(Ql[rs]+=Gu),Pe.mirror===!0||Pe.mirror==="ticks"?Ql[Vr]=Pe._anchorAxis.domain[Jc[1]]:(Pe.mirror==="all"||Pe.mirror==="allticks")&&(Ql[Vr]=[Pe._counterDomainMin,Pe._counterDomainMax][Jc[1]]))}au&&(ru=S.getComponentMethod("rangeslider","autoMarginOpts")(ze,Pe)),typeof Pe.automargin=="string"&&(or(Dl,Pe.automargin),or(Ql,Pe.automargin)),P.autoMargin(ze,fr(Pe),Dl),P.autoMargin(ze,_r(Pe),Ql),P.autoMargin(ze,Qr(Pe),ru)}),t.syncOrAsync(As)}};function or(ze,Pe){if(ze){var Rr=Object.keys(X).reduce(function(qr,$r){return Pe.indexOf($r)!==-1&&X[$r].forEach(function(Br){qr[Br]=1}),qr},{});Object.keys(ze).forEach(function(qr){Rr[qr]||(qr.length===1?ze[qr]=0:delete ze[qr])})}}function Ar(ze,Pe){var Rr=[],qr,$r=function(Br,Gr){var fn=Br.xbnd[Gr];fn!==null&&Rr.push(t.extendFlat({},Br,{x:fn}))};if(Pe.length){for(qr=0;qrze.range[1],fn=ze.ticklabelposition&&ze.ticklabelposition.indexOf("inside")!==-1,an=!fn;if(Rr){var Ee=Gr?-1:1;Rr=Rr*Ee}if(qr){var dr=ze.side,Vr=fn&&(dr==="top"||dr==="left")||an&&(dr==="bottom"||dr==="right")?1:-1;qr=qr*Vr}return ze._id.charAt(0)==="x"?function(vn){return e($r+ze._offset+ze.l2p(Vn(vn))+Rr,Br+qr)}:function(vn){return e(Br+qr,$r+ze._offset+ze.l2p(Vn(vn))+Rr)}};function Vn(ze){return ze.periodX!==void 0?ze.periodX:ze.x}function Hn(ze){var Pe=ze.ticklabelposition||"",Rr=ze.tickson||"",qr=function(Xn){return Pe.indexOf(Xn)!==-1},$r=qr("top"),Br=qr("left"),Gr=qr("right"),fn=qr("bottom"),an=qr("inside"),Ee=Rr!=="boundaries"&&(fn||Br||$r||Gr);if(!Ee&&!an)return[0,0];var dr=ze.side,Vr=Ee?(ze.tickwidth||0)/2:0,vn=dt,Fn=ze.tickfont?ze.tickfont.size:12;return(fn||$r)&&(Vr+=Fn*pt,vn+=(ze.linewidth||0)/2),(Br||Gr)&&(Vr+=(ze.linewidth||0)/2,vn+=dt),an&&dr==="top"&&(vn-=Fn*(1-pt)),(Br||$r)&&(Vr=-Vr),(dr==="bottom"||dr==="right")&&(vn=-vn),[Ee?Vr:0,an?vn:0]}rt.makeTickPath=function(ze,Pe,Rr,qr){qr||(qr={});var $r=qr.minor;if($r&&!ze.minor)return"";var Br=qr.len!==void 0?qr.len:$r?ze.minor.ticklen:ze.ticklen,Gr=ze._id.charAt(0),fn=(ze.linewidth||1)/2;return Gr==="x"?"M0,"+(Pe+fn*Rr)+"v"+Br*Rr:"M"+(Pe+fn*Rr)+",0h"+Br*Rr},rt.makeLabelFns=function(ze,Pe,Rr){var qr=ze.ticklabelposition||"",$r=ze.tickson||"",Br=function(Zo){return qr.indexOf(Zo)!==-1},Gr=Br("top"),fn=Br("left"),an=Br("right"),Ee=Br("bottom"),dr=$r!=="boundaries"&&(Ee||fn||Gr||an),Vr=Br("inside"),vn=qr==="inside"&&ze.ticks==="inside"||!Vr&&ze.ticks==="outside"&&$r!=="boundaries",Fn=0,Xn=0,Pn=vn?ze.ticklen:0;if(Vr?Pn*=-1:dr&&(Pn=0),vn&&(Fn+=Pn,Rr)){var Sn=t.deg2rad(Rr);Fn=Pn*Math.cos(Sn)+1,Xn=Pn*Math.sin(Sn)}ze.showticklabels&&(vn||ze.showline)&&(Fn+=.2*ze.tickfont.size),Fn+=(ze.linewidth||1)/2*(Vr?-1:1);var Zn={labelStandoff:Fn,labelShift:Xn},Ea,Ri,Ja,Xa,Do=0,go=ze.side,Fo=ze._id.charAt(0),za=ze.tickangle,xs;if(Fo==="x")xs=!Vr&&go==="bottom"||Vr&&go==="top",Xa=xs?1:-1,Vr&&(Xa*=-1),Ea=Xn*Xa,Ri=Pe+Fn*Xa,Ja=xs?1:-.2,Math.abs(za)===90&&(Vr?Ja+=yt:za===-90&&go==="bottom"?Ja=pt:za===90&&go==="top"?Ja=yt:Ja=.5,Do=yt/2*(za/90)),Zn.xFn=function(Zo){return Zo.dx+Ea+Do*Zo.fontSize},Zn.yFn=function(Zo){return Zo.dy+Ri+Zo.fontSize*Ja},Zn.anchorFn=function(Zo,Ks){if(dr){if(fn)return"end";if(an)return"start"}return!g(Ks)||Ks===0||Ks===180?"middle":Ks*Xa<0!==Vr?"end":"start"},Zn.heightFn=function(Zo,Ks,ss){return Ks<-60||Ks>60?-.5*ss:ze.side==="top"!==Vr?-ss:0};else if(Fo==="y"){if(xs=!Vr&&go==="left"||Vr&&go==="right",Xa=xs?1:-1,Vr&&(Xa*=-1),Ea=Fn,Ri=Xn*Xa,Ja=0,!Vr&&Math.abs(za)===90&&(za===-90&&go==="left"||za===90&&go==="right"?Ja=pt:Ja=.5),Vr){var os=g(za)?+za:0;if(os!==0){var cl=t.deg2rad(os);Do=Math.abs(Math.sin(cl))*pt*Xa,Ja=0}}Zn.xFn=function(Zo){return Zo.dx+Pe-(Ea+Zo.fontSize*Ja)*Xa+Do*Zo.fontSize},Zn.yFn=function(Zo){return Zo.dy+Ri+Zo.fontSize*yt},Zn.anchorFn=function(Zo,Ks){return g(Ks)&&Math.abs(Ks)===90?"middle":xs?"end":"start"},Zn.heightFn=function(Zo,Ks,ss){return ze.side==="right"&&(Ks*=-1),Ks<-30?-ss:Ks<30?-.5*ss:0}}return Zn};function Kn(ze){return[ze.text,ze.x,ze.axInfo,ze.font,ze.fontSize,ze.fontColor].join("_")}rt.drawTicks=function(ze,Pe,Rr){Rr=Rr||{};var qr=Pe._id+"tick",$r=[].concat(Pe.minor&&Pe.minor.ticks?Rr.vals.filter(function(Gr){return Gr.minor&&!Gr.noTick}):[]).concat(Pe.ticks?Rr.vals.filter(function(Gr){return!Gr.minor&&!Gr.noTick}):[]),Br=Rr.layer.selectAll("path."+qr).data($r,Kn);Br.exit().remove(),Br.enter().append("path").classed(qr,1).classed("ticks",1).classed("crisp",Rr.crisp!==!1).each(function(Gr){return n.stroke(c.select(this),Gr.minor?Pe.minor.tickcolor:Pe.tickcolor)}).style("stroke-width",function(Gr){return o.crispRound(ze,Gr.minor?Pe.minor.tickwidth:Pe.tickwidth,1)+"px"}).attr("d",Rr.path).style("display",null),Zi(Pe,[W]),Br.attr("transform",Rr.transFn)},rt.drawGrid=function(ze,Pe,Rr){if(Rr=Rr||{},Pe.tickmode!=="sync"){var qr=Pe._id+"grid",$r=Pe.minor&&Pe.minor.showgrid,Br=$r?Rr.vals.filter(function(Zn){return Zn.minor}):[],Gr=Pe.showgrid?Rr.vals.filter(function(Zn){return!Zn.minor}):[],fn=Rr.counterAxis;if(fn&&rt.shouldShowZeroLine(ze,Pe,fn))for(var an=Pe.tickmode==="array",Ee=0;Ee=0;Xn--){var Pn=Xn?vn:Fn;if(Pn){var Sn=Pn.selectAll("path."+qr).data(Xn?Gr:Br,Kn);Sn.exit().remove(),Sn.enter().append("path").classed(qr,1).classed("crisp",Rr.crisp!==!1),Sn.attr("transform",Rr.transFn).attr("d",Rr.path).each(function(Zn){return n.stroke(c.select(this),Zn.minor?Pe.minor.gridcolor:Pe.gridcolor||"#ddd")}).style("stroke-dasharray",function(Zn){return o.dashStyle(Zn.minor?Pe.minor.griddash:Pe.griddash,Zn.minor?Pe.minor.gridwidth:Pe.gridwidth)}).style("stroke-width",function(Zn){return(Zn.minor?Vr:Pe._gw)+"px"}).style("display",null),typeof Rr.path=="function"&&Sn.attr("d",Rr.path)}}Zi(Pe,[F,U])}},rt.drawZeroLine=function(ze,Pe,Rr){Rr=Rr||Rr;var qr=Pe._id+"zl",$r=rt.shouldShowZeroLine(ze,Pe,Rr.counterAxis),Br=Rr.layer.selectAll("path."+qr).data($r?[{x:0,id:Pe._id}]:[]);Br.exit().remove(),Br.enter().append("path").classed(qr,1).classed("zl",1).classed("crisp",Rr.crisp!==!1).each(function(){Rr.layer.selectAll("path").sort(function(Gr,fn){return it(Gr.id,fn.id)})}),Br.attr("transform",Rr.transFn).attr("d",Rr.path).call(n.stroke,Pe.zerolinecolor||n.defaultLine).style("stroke-width",o.crispRound(ze,Pe.zerolinewidth,Pe._gw||1)+"px").style("display",null),Zi(Pe,[H])},rt.drawLabels=function(ze,Pe,Rr){Rr=Rr||{};var qr=ze._fullLayout,$r=Pe._id,Br=Pe.zerolinelayer==="above traces",Gr=Rr.cls||$r+"tick",fn=Rr.vals.filter(function(cs){return cs.text}),an=Rr.labelFns,Ee=Rr.secondary?0:Pe.tickangle,dr=(Pe._prevTickAngles||{})[Gr],Vr=Rr.layer.selectAll("g."+Gr).data(Pe.showticklabels?fn:[],Kn),vn=[];Vr.enter().append("g").classed(Gr,1).append("text").attr("text-anchor","middle").each(function(cs){var Ps=c.select(this),Po=ze._promises.length;Ps.call(r.positionText,an.xFn(cs),an.yFn(cs)).call(o.font,{family:cs.font,size:cs.fontSize,color:cs.fontColor,weight:cs.fontWeight,style:cs.fontStyle,variant:cs.fontVariant,textcase:cs.fontTextcase,lineposition:cs.fontLineposition,shadow:cs.fontShadow}).text(cs.text).call(r.convertToTspans,ze),ze._promises[Po]?vn.push(ze._promises.pop().then(function(){Fn(Ps,Ee)})):Fn(Ps,Ee)}),Zi(Pe,[q]),Vr.exit().remove(),Rr.repositionOnUpdate&&Vr.each(function(cs){c.select(this).select("text").call(r.positionText,an.xFn(cs),an.yFn(cs))});function Fn(cs,Ps){cs.each(function(Po){var Ts=c.select(this),kl=Ts.select(".text-math-group"),Hl=an.anchorFn(Po,Ps),Xl=Rr.transFn.call(Ts.node(),Po)+(g(Ps)&&+Ps!=0?" rotate("+Ps+","+an.xFn(Po)+","+(an.yFn(Po)-Po.fontSize/2)+")":""),Us=r.lineCount(Ts),Ca=st*Po.fontSize,fo=an.heightFn(Po,g(Ps)?+Ps:0,(Us-1)*Ca);if(fo&&(Xl+=e(0,fo)),kl.empty()){var qs=Ts.select("text");qs.attr({transform:Xl,"text-anchor":Hl}),qs.style("display",null),Pe._adjustTickLabelsOverflow&&Pe._adjustTickLabelsOverflow()}else{var Jl=o.bBox(kl.node()).width,Jo=Jl*{end:-.5,start:.5}[Hl];kl.attr("transform",Xl+e(Jo,0))}})}Pe._adjustTickLabelsOverflow=function(){var cs=Pe.ticklabeloverflow;if(!(!cs||cs==="allow")){var Ps=cs.indexOf("hide")!==-1,Po=Pe._id.charAt(0)==="x",Ts=0,kl=Po?ze._fullLayout.width:ze._fullLayout.height;if(cs.indexOf("domain")!==-1){var Hl=t.simpleMap(Pe.range,Pe.r2l);Ts=Pe.l2p(Hl[0])+Pe._offset,kl=Pe.l2p(Hl[1])+Pe._offset}var Xl=Math.min(Ts,kl),Us=Math.max(Ts,kl),Ca=Pe.side,fo=1/0,qs=-1/0;Vr.each(function(ol){var Pl=c.select(this),Ru=Pl.select(".text-math-group");if(Ru.empty()){var lo=o.bBox(Pl.node()),As=0;Po?(lo.right>Us||lo.leftUs||lo.top+(Pe.tickangle?0:ol.fontSize/4)Pe["_visibleLabelMin_"+Hl._id]?Pl.style("display","none"):Us.K==="tick"&&!Xl&&Pl.node().style.display!=="none"&&Pl.style("display",null)})})})})},Fn(Vr,dr+1?dr:Ee);function Xn(){return vn.length&&Promise.all(vn)}var Pn=null;function Sn(){if(Fn(Vr,Ee),fn.length&&Pe.autotickangles&&(Pe.type!=="log"||String(Pe.dtick).charAt(0)!=="D")){Pn=Pe.autotickangles[0];var cs=0,Ps=[],Po,Ts=1;Vr.each(function(Dl){cs=Math.max(cs,Dl.fontSize);var Ql=Pe.l2p(Dl.x),ru=rr(this),oc=o.bBox(ru.node());Ts=Math.max(Ts,r.lineCount(ru)),Ps.push({top:0,bottom:10,height:10,left:Ql-oc.width/2,right:Ql+oc.width/2+2,width:oc.width+2})});var kl=(Pe.tickson==="boundaries"||Pe.showdividers)&&!Rr.secondary,Hl=fn.length,Xl=Math.abs((fn[Hl-1].x-fn[0].x)*Pe._m)/(Hl-1),Us=kl?Xl/2:Xl,Ca=kl?Pe.ticklen:cs*1.25*Ts,fo=Math.sqrt(Math.pow(Us,2)+Math.pow(Ca,2)),qs=Us/fo,Jl=Pe.autotickangles.map(function(Dl){return Dl*Math.PI/180}),Jo=Jl.find(function(Dl){return Math.abs(Math.cos(Dl))<=qs});Jo===void 0&&(Jo=Jl.reduce(function(Dl,Ql){return Math.abs(Math.cos(Dl))hl*ss&&(cl=ss,za[Fo]=xs[Fo]=Zo[Fo])}var tl=Math.abs(cl-os);tl-Xa>0?(tl-=Xa,Xa*=1+Xa/tl):Xa=0,Pe._id.charAt(0)!=="y"&&(Xa=-Xa),za[go]=Ri.p2r(Ri.r2p(xs[go])+Do*Xa),Ri.autorange==="min"||Ri.autorange==="max reversed"?(za[0]=null,Ri._rangeInitial0=void 0,Ri._rangeInitial1=void 0):(Ri.autorange==="max"||Ri.autorange==="min reversed")&&(za[1]=null,Ri._rangeInitial0=void 0,Ri._rangeInitial1=void 0),qr._insideTickLabelsUpdaterange[Ri._name+".range"]=za}var Bl=t.syncOrAsync(Zn);return Bl&&Bl.then&&ze._promises.push(Bl),Bl};function Ci(ze,Pe,Rr){var qr=Pe._id+"divider",$r=Rr.vals,Br=Rr.layer.selectAll("path."+qr).data($r,Kn);Br.exit().remove(),Br.enter().insert("path",":first-child").classed(qr,1).classed("crisp",1).call(n.stroke,Pe.dividercolor).style("stroke-width",o.crispRound(ze,Pe.dividerwidth,1)+"px"),Br.attr("transform",Rr.transFn).attr("d",Rr.path)}rt.getPxPosition=function(ze,Pe){var Rr=ze._fullLayout._size,qr=Pe._id.charAt(0),$r=Pe.side,Br;if(Pe.anchor!=="free"?Br=Pe._anchorAxis:qr==="x"?Br={_offset:Rr.t+(1-(Pe.position||0))*Rr.h,_length:0}:qr==="y"&&(Br={_offset:Rr.l+(Pe.position||0)*Rr.w+Pe._shift,_length:0}),$r==="top"||$r==="left")return Br._offset;if($r==="bottom"||$r==="right")return Br._offset+Br._length};function ii(ze){var Pe=ze.title.font.size,Rr=(ze.title.text.match(r.BR_TAG_ALL)||[]).length;return ze.title.hasOwnProperty("standoff")?Pe*(pt+Rr*st):Rr?Pe*(Rr+1)*st:Pe}function qn(ze,Pe){var Rr=ze._fullLayout,qr=Pe._id,$r=qr.charAt(0),Br=Pe.title.font.size,Gr,fn=(Pe.title.text.match(r.BR_TAG_ALL)||[]).length;if(Pe.title.hasOwnProperty("standoff"))Pe.side==="bottom"||Pe.side==="right"?Gr=Pe._depth+Pe.title.standoff+Br*pt:(Pe.side==="top"||Pe.side==="left")&&(Gr=Pe._depth+Pe.title.standoff+Br*(yt+fn*st));else{var an=Oi(Pe);if(Pe.type==="multicategory")Gr=Pe._depth;else{var Ee=1.5*Br;an&&(Ee=.5*Br,Pe.ticks==="outside"&&(Ee+=Pe.ticklen)),Gr=10+Ee+(Pe.linewidth?Pe.linewidth-1:0)}an||($r==="x"?Gr+=Pe.side==="top"?Br*(Pe.showticklabels?1:0):Br*(Pe.showticklabels?1.5:.5):Gr+=Pe.side==="right"?Br*(Pe.showticklabels?1:.5):Br*(Pe.showticklabels?.5:0))}var dr=rt.getPxPosition(ze,Pe),Vr,vn,Fn;$r==="x"?(vn=Pe._offset+Pe._length/2,Fn=Pe.side==="top"?dr-Gr:dr+Gr):(Fn=Pe._offset+Pe._length/2,vn=Pe.side==="right"?dr+Gr:dr-Gr,Vr={rotate:"-90",offset:0});var Xn;if(Pe.type!=="multicategory"){var Pn=Pe._selections[Pe._id+"tick"];if(Xn={selection:Pn,side:Pe.side},Pn&&Pn.node()&&Pn.node().parentNode){var Sn=o.getTranslate(Pn.node().parentNode);Xn.offsetLeft=Sn.x,Xn.offsetTop=Sn.y}Pe.title.hasOwnProperty("standoff")&&(Xn.pad=0)}return Pe._titleStandoff=Gr,a.draw(ze,qr+"title",{propContainer:Pe,propName:Pe._name+".title.text",placeholder:Rr._dfltTitle[$r],avoid:Xn,transform:Vr,attributes:{x:vn,y:Fn,"text-anchor":"middle"}})}rt.shouldShowZeroLine=function(ze,Pe,Rr){var qr=t.simpleMap(Pe.range,Pe.r2l);return qr[0]*qr[1]<=0&&Pe.zeroline&&(Pe.type==="linear"||Pe.type==="-")&&!(Pe.rangebreaks&&Pe.maskBreaks(0)===V)&&(aa(Pe,0)||!Vi(ze,Pe,Rr,qr)||We(ze,Pe))},rt.clipEnds=function(ze,Pe){return Pe.filter(function(Rr){return aa(ze,Rr.x)})};function aa(ze,Pe){var Rr=ze.l2p(Pe);return Rr>1&&Rr1)for($r=1;$r=$r.min&&ze<$r.max)return $r.max}return ze}function Oi(ze){return(ze.ticklabelposition||"").indexOf("inside")!==-1}function Zi(ze,Pe){Oi(ze._anchorAxis||{})&&ze._hideCounterAxisInsideTickLabels&&ze._hideCounterAxisInsideTickLabels(Pe)}function li(ze,Pe,Rr,qr){var $r=ze.anchor!=="free"&&(ze.overlaying===void 0||ze.overlaying===!1)?ze._id:ze.overlaying,Br;qr?Br=ze.side==="right"?Pe:-Pe:Br=Pe,$r in Rr||(Rr[$r]={}),ze.side in Rr[$r]||(Rr[$r][ze.side]=0),Rr[$r][ze.side]+=Br}function La(ze,Pe){return ze.autoshift?Pe[ze.overlaying][ze.side]:ze.shift||0}function Wa(ze,Pe){return/%f/.test(Pe)?ze>=O:/%L/.test(Pe)?ze>=R:/%[SX]/.test(Pe)?ze>=w:/%M/.test(Pe)?ze>=k:/%[HI]/.test(Pe)?ze>=p:/%p/.test(Pe)?ze>=h:/%[Aadejuwx]/.test(Pe)?ze>=A:/%[UVW]/.test(Pe)?ze>=E:/%[Bbm]/.test(Pe)?ze>=M:/%[q]/.test(Pe)?ze>=b:/%[Yy]/.test(Pe)?ze>=v:!0}}),yw=Ft((Q,$)=>{$.exports=function(c,g,P){var S,t;if(P){var e=g==="reversed"||g==="min reversed"||g==="max reversed";S=P[e?1:0],t=P[e?0:1]}var r=c("autorangeoptions.minallowed",t===null?S:void 0),a=c("autorangeoptions.maxallowed",S===null?t:void 0);r===void 0&&c("autorangeoptions.clipmin"),a===void 0&&c("autorangeoptions.clipmax"),c("autorangeoptions.include")}}),O_=Ft((Q,$)=>{var c=yw();$.exports=function(g,P,S,t){var e=P._template||{},r=P.type||e.type||"-";S("minallowed"),S("maxallowed");var a=S("range");if(!a){var n;!t.noInsiderange&&r!=="log"&&(n=S("insiderange"),n&&(n[0]===null||n[1]===null)&&(P.insiderange=!1,n=void 0),n&&(a=S("range",n)))}var o=P.getAutorangeDflt(a,t),i=S("autorange",o),s;a&&(a[0]===null&&a[1]===null||(a[0]===null||a[1]===null)&&(i==="reversed"||i===!0)||a[0]!==null&&(i==="min"||i==="max reversed")||a[1]!==null&&(i==="max"||i==="min reversed"))&&(a=void 0,delete P.range,P.autorange=!0,s=!0),s||(o=P.getAutorangeDflt(a,t),i=S("autorange",o)),i&&(c(S,i,a),(r==="linear"||r==="-")&&S("rangemode")),P.cleanRange()}}),h6=Ft((Q,$)=>{var c={left:0,top:0};$.exports=g;function g(S,t,e){t=t||S.currentTarget||S.srcElement,Array.isArray(e)||(e=[0,0]);var r=S.clientX||0,a=S.clientY||0,n=P(t);return e[0]=r-n.left,e[1]=a-n.top,e}function P(S){return S===window||S===document||S===document.body?c:S.getBoundingClientRect()}}),D_=Ft((Q,$)=>{var c=Wu();function g(){var P=!1;try{var S=Object.defineProperty({},"passive",{get:function(){P=!0}});window.addEventListener("test",null,S),window.removeEventListener("test",null,S)}catch{P=!1}return P}$.exports=c&&g()}),F_=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){var e=(c-P)/(S-P),r=e+g/(S-P),a=(e+r)/2;return t==="left"||t==="bottom"?e:t==="center"||t==="middle"?a:t==="right"||t==="top"?r:e<2/3-a?e:r>4/3-a?r:a}}),f6=Ft((Q,$)=>{var c=_n(),g=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];$.exports=function(P,S,t,e){return t==="left"?P=0:t==="center"?P=1:t==="right"?P=2:P=c.constrain(Math.floor(P*3),0,2),e==="bottom"?S=0:e==="middle"?S=1:e==="top"?S=2:S=c.constrain(Math.floor(S*3),0,2),g[S][P]}}),Q0=Ft((Q,$)=>{var c=Fm(),g=P_(),P=a0().getGraphDiv,S=mo(),t=$.exports={};t.wrapped=function(e,r,a){e=P(e),e._fullLayout&&g.clear(e._fullLayout._uid+S.HOVERID),t.raw(e,r,a)},t.raw=function(e,r){var a=e._fullLayout,n=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&c.triggerHandler(e,"plotly_beforehover",r)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,r.target&&n&&e.emit("plotly_unhover",{event:r,points:n}))}}),hp=Ft((Q,$)=>{var c=h6(),g=Nf(),P=D_(),S=_n().removeElement,t=ac(),e=$.exports={};e.align=F_(),e.getCursor=f6();var r=Q0();e.unhover=r.wrapped,e.unhoverRaw=r.raw,e.init=function(o){var i=o.gd,s=1,f=i._context.doubleClickDelay,x=o.element,y,v,T,u,b,_,C,M;i._mouseDownTime||(i._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=h,P?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=h,x.addEventListener("touchstart",h,{passive:!1})):x.ontouchstart=h;function E(w,R,O){return Math.abs(w)"u"&&typeof w.clientY>"u"&&(w.clientX=y,w.clientY=v),T=new Date().getTime(),T-i._mouseDownTimef&&(s=Math.max(s-1,1)),i._dragged)o.doneFn&&o.doneFn();else{var R;_.target===C?R=_:(R={target:C,srcElement:C,toElement:C},Object.keys(_).concat(Object.keys(_.__proto__)).forEach(O=>{var N=_[O];!R[O]&&typeof N!="function"&&(R[O]=N)})),o.clickFn&&o.clickFn(s,R),M||C.dispatchEvent(new MouseEvent("click",w))}i._dragging=!1,i._dragged=!1}};function a(){var o=document.createElement("div");o.className="dragcover";var i=o.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(o),o}e.coverSlip=a;function n(o){return c(o.changedTouches?o.changedTouches[0]:o,document.body)}}),O0=Ft((Q,$)=>{$.exports=function(c,g){(c.attr("class")||"").split(" ").forEach(function(P){P.indexOf("cursor-")===0&&c.classed(P,!1)}),g&&c.classed("cursor-"+g,!0)}}),Bm=Ft((Q,$)=>{var c=O0(),g="data-savedcursor",P="!!";$.exports=function(S,t){var e=S.attr(g);if(t){if(!e){for(var r=(S.attr("class")||"").split(" "),a=0;a{var c=ka(),g=yi();$.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:c({editType:"legend"}),grouptitlefont:c({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:c({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}),Ny=Ft(Q=>{Q.isGrouped=function($){return($.traceorder||"").indexOf("grouped")!==-1},Q.isVertical=function($){return $.orientation!=="h"},Q.isReversed=function($){return($.traceorder||"").indexOf("reversed")!==-1}}),jy=Ft((Q,$)=>{var c=Qo(),g=_n(),P=mu(),S=Yo(),t=R_(),e=b1(),r=Ny();function a(n,o,i,s){var f=o[n]||{},x=P.newContainer(i,n);function y(st,tt){return g.coerce(f,x,t,st,tt)}var v=g.coerceFont(y,"font",i.font);y("bgcolor",i.paper_bgcolor),y("bordercolor");var T=y("visible");if(T){for(var u,b=function(st,tt){var dt=u._input,rt=u;return g.coerce(dt,rt,S,st,tt)},_=i.font||{},C=g.coerceFont(y,"grouptitlefont",_,{overrideDflt:{size:Math.round(_.size*1.1)}}),M=0,E=!1,A="normal",h=(i.shapes||[]).filter(function(st){return st.showlegend}),p=s.concat(h).filter(function(st){return n===(st.legend||"legend")}),k=0;k(n==="legend"?1:0));if(R===!1&&(i[n]=void 0),!(R===!1&&!f.uirevision)&&(y("uirevision",i.uirevision),R!==!1)){y("borderwidth");var O=y("orientation"),N=y("yref"),V=y("xref"),H=O==="h",F=N==="paper",U=V==="paper",W,q,X,lt="left";H?(W=0,c.getComponentMethod("rangeslider","isVisible")(o.xaxis)?F?(q=1.1,X="bottom"):(q=1,X="top"):F?(q=-.1,X="top"):(q=0,X="bottom")):(q=1,X="auto",U?W=1.02:(W=1,lt="right")),g.coerce(f,x,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:W}},"x"),g.coerce(f,x,{y:{valType:"number",editType:"legend",min:F?-2:0,max:F?3:1,dflt:q}},"y"),y("traceorder",A),r.isGrouped(i[n])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("xanchor",lt),y("yanchor",X),y("maxheight"),y("valign"),g.noneOrAll(f,x,["x","y"]);var yt=y("title.text");if(yt){y("title.side",H?"left":"top");var pt=g.extendFlat({},v,{size:g.bigFont(v.size)});g.coerceFont(y,"title.font",pt)}}}}$.exports=function(n,o,i){var s,f=i.slice(),x=o.shapes;if(x)for(s=0;s{var c=Qo(),g=_n(),P=g.pushUnique,S=!0;$.exports=function(t,e,r){var a=e._fullLayout;if(e._dragged||e._editing)return;var n=a.legend.itemclick,o=a.legend.itemdoubleclick,i=a.legend.groupclick;r===1&&n==="toggle"&&o==="toggleothers"&&S&&e.data&&e._context.showTips&&g.notifier(g._(e,"Double-click on legend to isolate one trace"),"long"),S=!1;var s;if(r===1?s=n:r===2&&(s=o),!s)return;var f=i==="togglegroup",x=a.hiddenlabels?a.hiddenlabels.slice():[],y=t.data()[0][0];if(y.groupTitle&&y.noClick)return;var v=e._fullData,T=(a.shapes||[]).filter(function(se){return se.showlegend}),u=v.concat(T),b=y.trace;b._isShape&&(b=b._fullInput);var _=b.legendgroup,C,M,E,A,h,p,k={},w=[],R=[],O=[];function N(se,Tt){var Lt=w.indexOf(se),Mt=k.visible;return Mt||(Mt=k.visible=[]),w.indexOf(se)===-1&&(w.push(se),Lt=w.length-1),Mt[Lt]=Tt,Lt}var V=(a.shapes||[]).map(function(se){return se._input}),H=!1;function F(se,Tt){V[se].visible=Tt,H=!0}function U(se,Tt){if(!(y.groupTitle&&!f)){var Lt=se._fullInput||se,Mt=Lt._isShape,te=Lt.index;te===void 0&&(te=Lt._index);var ve=Lt.visible===!1?!1:Tt;Mt?F(te,ve):N(te,ve)}}var W=b.legend,q=b._fullInput,X=q&&q._isShape;if(!X&&c.traceIs(b,"pie-like")){var lt=y.label,yt=x.indexOf(lt);if(s==="toggle")yt===-1?x.push(lt):x.splice(yt,1);else if(s==="toggleothers"){var pt=yt!==-1,st=[];for(C=0;C{$.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}),xw=Ft((Q,$)=>{var c=Qo(),g=Ny();$.exports=function(P,S,t){var e=S._inHover,r=g.isGrouped(S),a=g.isReversed(S),n={},o=[],i=!1,s={},f=0,x=0,y,v;function T(U,W,q){if(S.visible!==!1&&!(t&&U!==S._id))if(W===""||!g.isGrouped(S)){var X="~~i"+f;o.push(X),n[X]=[q],f++}else o.indexOf(W)===-1?(o.push(W),i=!0,n[W]=[q]):n[W].push(q)}for(y=0;yw&&(k=w)}h[y][0]._groupMinRank=k,h[y][0]._preGroupSort=y}var R=function(U,W){return U[0]._groupMinRank-W[0]._groupMinRank||U[0]._preGroupSort-W[0]._preGroupSort},O=function(U,W){return U.trace.legendrank-W.trace.legendrank||U._preSort-W._preSort};for(h.forEach(function(U,W){U[0]._preGroupSort=W}),h.sort(R),y=0;y{var $=_n();function c(g){return g.indexOf("e")!==-1?g.replace(/[.]?0+e/,"e"):g.indexOf(".")!==-1?g.replace(/[.]?0+$/,""):g}Q.formatPiePercent=function(g,P){var S=c((g*100).toPrecision(3));return $.numSeparate(S,P)+"%"},Q.formatPieValue=function(g,P){var S=c(g.toPrecision(10));return $.numSeparate(S,P)},Q.getFirstFilled=function(g,P){if($.isArrayOrTypedArray(g))for(var S=0;S{var c=Vs(),g=ui();$.exports=function(P,S,t,e){var r=t.marker.pattern;r&&r.shape?c.pointStyle(P,t,e,S):g.fill(P,S.color)}}),kg=Ft((Q,$)=>{var c=ui(),g=wg().castOption,P=p6();$.exports=function(S,t,e,r){var a=e.marker.line,n=g(a.color,t.pts)||c.defaultLine,o=g(a.width,t.pts)||0;S.call(P,t,e,r).style("stroke-width",o).call(c.stroke,n)}}),_w=Ft((Q,$)=>{var c=En(),g=Qo(),P=_n(),S=P.strTranslate,t=Vs(),e=ui(),r=Zd().extractOpts,a=Mc(),n=kg(),o=wg().castOption,i=B_(),s=12,f=5,x=2,y=10,v=5;$.exports=function(_,C,M){var E=C._fullLayout;M||(M=E.legend);var A=M.itemsizing==="constant",h=M.itemwidth,p=(h+i.itemGap*2)/2,k=S(p,0),w=function(st,tt,dt,rt){var at;if(st+1)at=st;else if(tt&&tt.width>0)at=tt.width;else return 0;return A?rt:Math.min(at,dt)};_.each(function(st){var tt=c.select(this),dt=P.ensureSingle(tt,"g","layers");dt.style("opacity",st[0].trace.opacity);var rt=M.indentation,at=M.valign,vt=st[0].lineHeight,it=st[0].height;if(at==="middle"&&rt===0||!vt||!it)dt.attr("transform",null);else{var Y={top:1,bottom:-1}[at],ft=Y*(.5*(vt-it+3))||0,ut=M.indentation;dt.attr("transform",S(ut,ft))}var wt=dt.selectAll("g.legendfill").data([st]);wt.enter().append("g").classed("legendfill",!0);var zt=dt.selectAll("g.legendlines").data([st]);zt.enter().append("g").classed("legendlines",!0);var Pt=dt.selectAll("g.legendsymbols").data([st]);Pt.enter().append("g").classed("legendsymbols",!0),Pt.selectAll("g.legendpoints").data([st]).enter().append("g").classed("legendpoints",!0)}).each(pt).each(N).each(H).each(V).each(U).each(lt).each(X).each(R).each(O).each(W).each(q);function R(st){var tt=u(st),dt=tt.showFill,rt=tt.showLine,at=tt.showGradientLine,vt=tt.showGradientFill,it=tt.anyFill,Y=tt.anyLine,ft=st[0],ut=ft.trace,wt,zt,Pt=r(ut),Wt=Pt.colorscale,Ht=Pt.reversescale,Jt=function(Mt){if(Mt.size())if(dt)t.fillGroupStyle(Mt,C,!0);else{var te="legendfill-"+ut.uid;t.gradient(Mt,C,te,T(Ht),Wt,"fill")}},ge=function(Mt){if(Mt.size()){var te="legendline-"+ut.uid;t.lineGroupStyle(Mt),t.gradient(Mt,C,te,T(Ht),Wt,"stroke")}},he=a.hasMarkers(ut)||!it?"M5,0":Y?"M5,-2":"M5,-3",de=c.select(this),se=de.select(".legendfill").selectAll("path").data(dt||vt?[st]:[]);if(se.enter().append("path").classed("js-fill",!0),se.exit().remove(),se.attr("d",he+"h"+h+"v6h-"+h+"z").call(Jt),rt||at){var Tt=w(void 0,ut.line,y,f);zt=P.minExtend(ut,{line:{width:Tt}}),wt=[P.minExtend(ft,{trace:zt})]}var Lt=de.select(".legendlines").selectAll("path").data(rt||at?[wt]:[]);Lt.enter().append("path").classed("js-line",!0),Lt.exit().remove(),Lt.attr("d",he+(at?"l"+h+",0.0001":"h"+h)).call(rt?t.lineGroupStyle:ge)}function O(st){var tt=u(st),dt=tt.anyFill,rt=tt.anyLine,at=tt.showLine,vt=tt.showMarker,it=st[0],Y=it.trace,ft=!vt&&!rt&&!dt&&a.hasText(Y),ut,wt;function zt(se,Tt,Lt,Mt){var te=P.nestedProperty(Y,se).get(),ve=P.isArrayOrTypedArray(te)&&Tt?Tt(te):te;if(A&&ve&&Mt!==void 0&&(ve=Mt),Lt){if(veLt[1])return Lt[1]}return ve}function Pt(se){return it._distinct&&it.index&&se[it.index]?se[it.index]:se[0]}if(vt||ft||at){var Wt={},Ht={};if(vt){Wt.mc=zt("marker.color",Pt),Wt.mx=zt("marker.symbol",Pt),Wt.mo=zt("marker.opacity",P.mean,[.2,1]),Wt.mlc=zt("marker.line.color",Pt),Wt.mlw=zt("marker.line.width",P.mean,[0,5],x),Ht.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Jt=zt("marker.size",P.mean,[2,16],s);Wt.ms=Jt,Ht.marker.size=Jt}at&&(Ht.line={width:zt("line.width",Pt,[0,10],f)}),ft&&(Wt.tx="Aa",Wt.tp=zt("textposition",Pt),Wt.ts=10,Wt.tc=zt("textfont.color",Pt),Wt.tf=zt("textfont.family",Pt),Wt.tw=zt("textfont.weight",Pt),Wt.ty=zt("textfont.style",Pt),Wt.tv=zt("textfont.variant",Pt),Wt.tC=zt("textfont.textcase",Pt),Wt.tE=zt("textfont.lineposition",Pt),Wt.tS=zt("textfont.shadow",Pt)),ut=[P.minExtend(it,Wt)],wt=P.minExtend(Y,Ht),wt.selectedpoints=null,wt.texttemplate=null}var ge=c.select(this).select("g.legendpoints"),he=ge.selectAll("path.scatterpts").data(vt?ut:[]);he.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",k),he.exit().remove(),he.call(t.pointStyle,wt,C),vt&&(ut[0].mrc=3);var de=ge.selectAll("g.pointtext").data(ft?ut:[]);de.enter().append("g").classed("pointtext",!0).append("text").attr("transform",k),de.exit().remove(),de.selectAll("text").call(t.textPointStyle,wt,C)}function N(st){var tt=st[0].trace,dt=tt.type==="waterfall";if(st[0]._distinct&&dt){var rt=st[0].trace[st[0].dir].marker;return st[0].mc=rt.color,st[0].mlw=rt.line.width,st[0].mlc=rt.line.color,F(st,this,"waterfall")}var at=[];tt.visible&&dt&&(at=st[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var vt=c.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(at);vt.enter().append("path").classed("legendwaterfall",!0).attr("transform",k).style("stroke-miterlimit",1),vt.exit().remove(),vt.each(function(it){var Y=c.select(this),ft=tt[it[0]].marker,ut=w(void 0,ft.line,v,x);Y.attr("d",it[1]).style("stroke-width",ut+"px").call(e.fill,ft.color),ut&&Y.call(e.stroke,ft.line.color)})}function V(st){F(st,this)}function H(st){F(st,this,"funnel")}function F(st,tt,dt){var rt=st[0].trace,at=rt.marker||{},vt=at.line||{},it=at.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Y=dt?rt.visible&&rt.type===dt:g.traceIs(rt,"bar"),ft=c.select(tt).select("g.legendpoints").selectAll("path.legend"+dt).data(Y?[st]:[]);ft.enter().append("path").classed("legend"+dt,!0).attr("d",it).attr("transform",k),ft.exit().remove(),ft.each(function(ut){var wt=c.select(this),zt=ut[0],Pt=w(zt.mlw,at.line,v,x);wt.style("stroke-width",Pt+"px");var Wt=zt.mcc;if(!M._inHover&&"mc"in zt){var Ht=r(at),Jt=Ht.mid;Jt===void 0&&(Jt=(Ht.max+Ht.min)/2),Wt=t.tryColorscale(at,"")(Jt)}var ge=Wt||zt.mc||at.color,he=at.pattern,de=t.getPatternAttr,se=he&&(de(he.shape,0,"")||de(he.path,0,""));if(se){var Tt=de(he.bgcolor,0,null),Lt=de(he.fgcolor,0,null),Mt=he.fgopacity,te=b(he.size,8,10),ve=b(he.solidity,.5,1),oe="legend-"+rt.uid;wt.call(t.pattern,"legend",C,oe,se,te,ve,Wt,he.fillmode,Tt,Lt,Mt)}else wt.call(e.fill,ge);Pt&&e.stroke(wt,zt.mlc||vt.color)})}function U(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendbox").data(tt.visible&&g.traceIs(tt,"box-violin")?[st]:[]);dt.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),dt.exit().remove(),dt.each(function(){var rt=c.select(this);if((tt.boxpoints==="all"||tt.points==="all")&&e.opacity(tt.fillcolor)===0&&e.opacity((tt.line||{}).color)===0){var at=P.minExtend(tt,{marker:{size:A?s:P.constrain(tt.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});dt.call(t.pointStyle,at,C)}else{var vt=w(void 0,tt.line,v,x);rt.style("stroke-width",vt+"px").call(e.fill,tt.fillcolor),vt&&e.stroke(rt,tt.line.color)}})}function W(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(tt.visible&&tt.type==="candlestick"?[st,st]:[]);dt.enter().append("path").classed("legendcandle",!0).attr("d",function(rt,at){return at?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",k).style("stroke-miterlimit",1),dt.exit().remove(),dt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],Y=w(void 0,it.line,v,x);vt.style("stroke-width",Y+"px").call(e.fill,it.fillcolor),Y&&e.stroke(vt,it.line.color)})}function q(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(tt.visible&&tt.type==="ohlc"?[st,st]:[]);dt.enter().append("path").classed("legendohlc",!0).attr("d",function(rt,at){return at?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",k).style("stroke-miterlimit",1),dt.exit().remove(),dt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],Y=w(void 0,it.line,v,x);vt.style("fill","none").call(t.dashLine,it.line.dash,Y),Y&&e.stroke(vt,it.line.color)})}function X(st){yt(st,this,"pie")}function lt(st){yt(st,this,"funnelarea")}function yt(st,tt,dt){var rt=st[0],at=rt.trace,vt=dt?at.visible&&at.type===dt:g.traceIs(at,dt),it=c.select(tt).select("g.legendpoints").selectAll("path.legend"+dt).data(vt?[st]:[]);if(it.enter().append("path").classed("legend"+dt,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),it.exit().remove(),it.size()){var Y=at.marker||{},ft=w(o(Y.line.width,rt.pts),Y.line,v,x),ut="pieLike",wt=P.minExtend(at,{marker:{line:{width:ft}}},ut),zt=P.minExtend(rt,{trace:wt},ut);n(it,zt,wt,C)}}function pt(st){var tt=st[0].trace,dt,rt=[];if(tt.visible)switch(tt.type){case"histogram2d":case"heatmap":rt=[["M-15,-2V4H15V-2Z"]],dt=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":rt=[["M-6,-6V6H6V-6Z"]],dt=!0;break;case"densitymapbox":case"densitymap":rt=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],dt="radial";break;case"cone":rt=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],dt=!1;break;case"streamtube":rt=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],dt=!1;break;case"surface":rt=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],dt=!0;break;case"mesh3d":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],dt=!1;break;case"volume":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],dt=!0;break;case"isosurface":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],dt=!1;break}var at=c.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(rt);at.enter().append("path").classed("legend3dandfriends",!0).attr("transform",k).style("stroke-miterlimit",1),at.exit().remove(),at.each(function(vt,it){var Y=c.select(this),ft=r(tt),ut=ft.colorscale,wt=ft.reversescale,zt=function(Jt){if(Jt.size()){var ge="legendfill-"+tt.uid;t.gradient(Jt,C,ge,T(wt,dt==="radial"),ut,"fill")}},Pt;if(ut){if(!dt){var Wt=ut.length;Pt=it===0?ut[wt?Wt-1:0][1]:it===1?ut[wt?0:Wt-1][1]:ut[Math.floor((Wt-1)/2)][1]}}else{var Ht=tt.vertexcolor||tt.facecolor||tt.color;Pt=P.isArrayOrTypedArray(Ht)?Ht[it]||Ht[0]:Ht}Y.attr("d",vt[0]),Pt?Y.call(e.fill,Pt):Y.call(zt)})}};function T(_,C){var M=C?"radial":"horizontal";return M+(_?"":"reversed")}function u(_){var C=_[0].trace,M=C.contours,E=a.hasLines(C),A=a.hasMarkers(C),h=C.visible&&C.fill&&C.fill!=="none",p=!1,k=!1;if(M){var w=M.coloring;w==="lines"?p=!0:E=w==="none"||w==="heatmap"||M.showlines,M.type==="constraint"?h=M._operation!=="=":(w==="fill"||w==="heatmap")&&(k=!0)}return{showMarker:A,showLine:E,showFill:h,showGradientLine:p,showGradientFill:k,anyLine:E||p,anyFill:h||k}}function b(_,C,M){return _&&P.isArrayOrTypedArray(_)?C:_>M?M:_}}),N_=Ft((Q,$)=>{var c=En(),g=_n(),P=Kc(),S=Qo(),t=Fm(),e=hp(),r=Vs(),a=ui(),n=tc(),o=d6(),i=B_(),s=Sf(),f=s.LINE_SPACING,x=s.FROM_TL,y=s.FROM_BR,v=xw(),T=_w(),u=Ny(),b=1,_=/^legend[0-9]*$/;$.exports=function(W,q){if(q)M(W,q);else{var X=W._fullLayout,lt=X._legends,yt=X._infolayer.selectAll('[class^="legend"]');yt.each(function(){var dt=c.select(this),rt=dt.attr("class"),at=rt.split(" ")[0];at.match(_)&<.indexOf(at)===-1&&dt.remove()});for(var pt=0;pt1)}var ft=lt.hiddenlabels||[];if(!tt&&(!lt.showlegend||!dt.length))return st.selectAll("."+yt).remove(),lt._topdefs.select("#"+pt).remove(),P.autoMargin(W,yt);var ut=g.ensureSingle(st,"g",yt,function(de){tt||de.attr("pointer-events","all")}),wt=g.ensureSingleById(lt._topdefs,"clipPath",pt,function(de){de.append("rect")}),zt=g.ensureSingle(ut,"rect","bg",function(de){de.attr("shape-rendering","crispEdges")});zt.call(a.stroke,X.bordercolor).call(a.fill,X.bgcolor).style("stroke-width",X.borderwidth+"px");var Pt=g.ensureSingle(ut,"g","scrollbox"),Wt=X.title;X._titleWidth=0,X._titleHeight=0;var Ht;Wt.text?(Ht=g.ensureSingle(Pt,"text",yt+"titletext"),Ht.attr("text-anchor","start").call(r.font,Wt.font).text(Wt.text),w(Ht,Pt,W,X,b)):Pt.selectAll("."+yt+"titletext").remove();var Jt=g.ensureSingle(ut,"rect","scrollbar",function(de){de.attr(i.scrollBarEnterAttrs).call(a.fill,i.scrollBarColor)}),ge=Pt.selectAll("g.groups").data(dt);ge.enter().append("g").attr("class","groups"),ge.exit().remove();var he=ge.selectAll("g.traces").data(g.identity);he.enter().append("g").attr("class","traces"),he.exit().remove(),he.style("opacity",function(de){var se=de[0].trace;return S.traceIs(se,"pie-like")?ft.indexOf(de[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){c.select(this).call(h,W,X)}).call(T,W,X).each(function(){tt||c.select(this).call(k,W,yt)}),g.syncOrAsync([P.previousPromises,function(){return N(W,ge,he,X)},function(){var de=lt._size,se=X.borderwidth,Tt=X.xref==="paper",Lt=X.yref==="paper";if(Wt.text&&C(Ht,X,se),!tt){var Mt,te;Tt?Mt=de.l+de.w*X.x-x[H(X)]*X._width:Mt=lt.width*X.x-x[H(X)]*X._width,Lt?te=de.t+de.h*(1-X.y)-x[F(X)]*X._effHeight:te=lt.height*(1-X.y)-x[F(X)]*X._effHeight;var ve=V(W,yt,Mt,te);if(ve)return;if(lt.margin.autoexpand){var oe=Mt,Te=te;Mt=Tt?g.constrain(Mt,0,lt.width-X._width):oe,te=Lt?g.constrain(te,0,lt.height-X._effHeight):Te,Mt!==oe&&g.log("Constrain "+yt+".x to make legend fit inside graph"),te!==Te&&g.log("Constrain "+yt+".y to make legend fit inside graph")}r.setTranslate(ut,Mt,te)}if(Jt.on(".drag",null),ut.on("wheel",null),tt||X._height<=X._maxHeight||W._context.staticPlot){var He=X._effHeight;tt&&(He=X._height),zt.attr({width:X._width-se,height:He-se,x:se/2,y:se/2}),r.setTranslate(Pt,0,0),wt.select("rect").attr({width:X._width-2*se,height:He-2*se,x:se,y:se}),r.setClipUrl(Pt,pt,W),r.setRect(Jt,0,0,0,0),delete X._scrollY}else{var Ge=Math.max(i.scrollBarMinHeight,X._effHeight*X._effHeight/X._height),cr=X._effHeight-Ge-2*i.scrollBarMargin,ur=X._height-X._effHeight,jr=cr/ur,Hr=Math.min(X._scrollY||0,ur);zt.attr({width:X._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:X._effHeight-se,x:se/2,y:se/2}),wt.select("rect").attr({width:X._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:X._effHeight-2*se,x:se,y:se+Hr}),r.setClipUrl(Pt,pt,W),gt(Hr,Ge,jr),ut.on("wheel",function(){Hr=g.constrain(X._scrollY+c.event.deltaY/ur*cr,0,ur),gt(Hr,Ge,jr),Hr!==0&&Hr!==ur&&c.event.preventDefault()});var br,Kr,rn,Ce=function(we,Ue,qe){var or=(qe-Ue)/jr+we;return g.constrain(or,0,ur)},Gt=function(we,Ue,qe){var or=(Ue-qe)/jr+we;return g.constrain(or,0,ur)},ne=c.behavior.drag().on("dragstart",function(){var we=c.event.sourceEvent;we.type==="touchstart"?br=we.changedTouches[0].clientY:br=we.clientY,rn=Hr}).on("drag",function(){var we=c.event.sourceEvent;we.buttons===2||we.ctrlKey||(we.type==="touchmove"?Kr=we.changedTouches[0].clientY:Kr=we.clientY,Hr=Ce(rn,br,Kr),gt(Hr,Ge,jr))});Jt.call(ne);var Ct=c.behavior.drag().on("dragstart",function(){var we=c.event.sourceEvent;we.type==="touchstart"&&(br=we.changedTouches[0].clientY,rn=Hr)}).on("drag",function(){var we=c.event.sourceEvent;we.type==="touchmove"&&(Kr=we.changedTouches[0].clientY,Hr=Gt(rn,br,Kr),gt(Hr,Ge,jr))});Pt.call(Ct)}function gt(we,Ue,qe){X._scrollY=W._fullLayout[yt]._scrollY=we,r.setTranslate(Pt,0,-we),r.setRect(Jt,X._width,i.scrollBarMargin+we*qe,i.scrollBarWidth,Ue),wt.select("rect").attr("y",se+we)}if(W._context.edits.legendPosition){var St,Nt,re,le;ut.classed("cursor-move",!0),e.init({element:ut.node(),gd:W,prepFn:function(we){if(we.target!==Jt.node()){var Ue=r.getTranslate(ut);re=Ue.x,le=Ue.y}},moveFn:function(we,Ue){if(re!==void 0&&le!==void 0){var qe=re+we,or=le+Ue;r.setTranslate(ut,qe,or),St=e.align(qe,X._width,de.l,de.l+de.w,X.xanchor),Nt=e.align(or+X._height,-X._height,de.t+de.h,de.t,X.yanchor)}},doneFn:function(){if(St!==void 0&&Nt!==void 0){var we={};we[yt+".x"]=St,we[yt+".y"]=Nt,S.call("_guiRelayout",W,we)}},clickFn:function(we,Ue){var qe=st.selectAll("g.traces").filter(function(){var or=this.getBoundingClientRect();return Ue.clientX>=or.left&&Ue.clientX<=or.right&&Ue.clientY>=or.top&&Ue.clientY<=or.bottom});qe.size()>0&&A(W,ut,qe,we,Ue)}})}}],W)}}function E(W,q,X){var lt=W[0],yt=lt.width,pt=q.entrywidthmode,st=lt.trace.legendwidth||q.entrywidth;return pt==="fraction"?q._maxWidth*st:X+(st||yt)}function A(W,q,X,lt,yt){var pt=X.data()[0][0].trace,st={event:yt,node:X.node(),curveNumber:pt.index,expandedIndex:pt.index,data:W.data,layout:W.layout,frames:W._transitionData._frames,config:W._context,fullData:W._fullData,fullLayout:W._fullLayout};pt._group&&(st.group=pt._group),S.traceIs(pt,"pie-like")&&(st.label=X.datum()[0].label);var tt=t.triggerHandler(W,"plotly_legendclick",st);if(lt===1){if(tt===!1)return;q._clickTimeout=setTimeout(function(){W._fullLayout&&o(X,W,lt)},W._context.doubleClickDelay)}else if(lt===2){q._clickTimeout&&clearTimeout(q._clickTimeout),W._legendMouseDownTime=0;var dt=t.triggerHandler(W,"plotly_legenddoubleclick",st);dt!==!1&&tt!==!1&&o(X,W,lt)}}function h(W,q,X){var lt=U(X),yt=W.data()[0][0],pt=yt.trace,st=S.traceIs(pt,"pie-like"),tt=!X._inHover&&q._context.edits.legendText&&!st,dt=X._maxNameLength,rt,at;yt.groupTitle?(rt=yt.groupTitle.text,at=yt.groupTitle.font):(at=X.font,X.entries?rt=yt.text:(rt=st?yt.label:pt.name,pt._meta&&(rt=g.templateString(rt,pt._meta))));var vt=g.ensureSingle(W,"text",lt+"text");vt.attr("text-anchor","start").call(r.font,at).text(tt?p(rt,dt):rt);var it=X.indentation+X.itemwidth+i.itemGap*2;n.positionText(vt,it,0),tt?vt.call(n.makeEditable,{gd:q,text:rt}).call(w,W,q,X).on("edit",function(Y){this.text(p(Y,dt)).call(w,W,q,X);var ft=yt.trace._fullInput||{},ut={};return ut.name=Y,ft._isShape?S.call("_guiRelayout",q,"shapes["+pt.index+"].name",ut.name):S.call("_guiRestyle",q,ut,pt.index)}):w(vt,W,q,X)}function p(W,q){var X=Math.max(4,q);if(W&&W.trim().length>=X/2)return W;W=W||"";for(var lt=X-W.length;lt>0;lt--)W+=" ";return W}function k(W,q,X){var lt=q._context.doubleClickDelay,yt,pt=1,st=g.ensureSingle(W,"rect",X+"toggle",function(tt){q._context.staticPlot||tt.style("cursor","pointer").attr("pointer-events","all"),tt.call(a.fill,"rgba(0,0,0,0)")});q._context.staticPlot||(st.on("mousedown",function(){yt=new Date().getTime(),yt-q._legendMouseDownTimelt&&(pt=Math.max(pt-1,1)),A(q,tt,W,pt,c.event)}}))}function w(W,q,X,lt,yt){lt._inHover&&W.attr("data-notex",!0),n.convertToTspans(W,X,function(){R(q,X,lt,yt)})}function R(W,q,X,lt){var yt=W.data()[0][0];if(!X._inHover&&yt&&!yt.trace.showlegend){W.remove();return}var pt=W.select("g[class*=math-group]"),st=pt.node(),tt=U(X);X||(X=q._fullLayout[tt]);var dt=X.borderwidth,rt;lt===b?rt=X.title.font:yt.groupTitle?rt=yt.groupTitle.font:rt=X.font;var at=rt.size*f,vt,it;if(st){var Y=r.bBox(st);vt=Y.height,it=Y.width,lt===b?r.setTranslate(pt,dt,dt+vt*.75):r.setTranslate(pt,0,vt*.25)}else{var ft="."+tt+(lt===b?"title":"")+"text",ut=W.select(ft),wt=n.lineCount(ut),zt=ut.node();if(vt=at*wt,it=zt?r.bBox(zt).width:0,lt===b)X.title.side==="left"&&(it+=i.itemGap*2),n.positionText(ut,dt+i.titlePad,dt+at);else{var Pt=i.itemGap*2+X.indentation+X.itemwidth;yt.groupTitle&&(Pt=i.itemGap,it-=X.indentation+X.itemwidth),n.positionText(ut,Pt,-at*((wt-1)/2-.3))}}lt===b?(X._titleWidth=it,X._titleHeight=vt):(yt.lineHeight=at,yt.height=Math.max(vt,16)+3,yt.width=it)}function O(W){var q=0,X=0,lt=W.title.side;return lt&&(lt.indexOf("left")!==-1&&(q=W._titleWidth),lt.indexOf("top")!==-1&&(X=W._titleHeight)),[q,X]}function N(W,q,X,lt){var yt=W._fullLayout,pt=U(lt);lt||(lt=yt[pt]);var st=yt._size,tt=u.isVertical(lt),dt=u.isGrouped(lt),rt=lt.entrywidthmode==="fraction",at=lt.borderwidth,vt=2*at,it=i.itemGap,Y=lt.indentation+lt.itemwidth+it*2,ft=2*(at+it),ut=F(lt),wt=lt.y<0||lt.y===0&&ut==="top",zt=lt.y>1||lt.y===1&&ut==="bottom",Pt=lt.tracegroupgap,Wt={};let{orientation:Ht,yref:Jt}=lt,{maxheight:ge}=lt,he=wt||zt||Ht!=="v"||Jt!=="paper";ge||(ge=he?.5:1);let de=he?yt.height:st.h;lt._maxHeight=Math.max(ge>1?ge:ge*de,30);var se=0;lt._width=0,lt._height=0;var Tt=O(lt);if(tt)X.each(function(gt){var St=gt[0].height;r.setTranslate(this,at+Tt[0],at+Tt[1]+lt._height+St/2+it),lt._height+=St,lt._width=Math.max(lt._width,gt[0].width)}),se=Y+lt._width,lt._width+=it+Y+vt,lt._height+=ft,dt&&(q.each(function(gt,St){r.setTranslate(this,0,St*lt.tracegroupgap)}),lt._height+=(lt._lgroupsLength-1)*lt.tracegroupgap);else{var Lt=H(lt),Mt=lt.x<0||lt.x===0&&Lt==="right",te=lt.x>1||lt.x===1&&Lt==="left",ve=zt||wt,oe=yt.width/2;lt._maxWidth=Math.max(Mt?ve&&Lt==="left"?st.l+st.w:oe:te?ve&&Lt==="right"?st.r+st.w:oe:st.w,2*Y);var Te=0,He=0;X.each(function(gt){var St=E(gt,lt,Y);Te=Math.max(Te,St),He+=St}),se=null;var Ge=0;if(dt){var cr=0,ur=0,jr=0;q.each(function(){var gt=0,St=0;c.select(this).selectAll("g.traces").each(function(re){var le=E(re,lt,Y),we=re[0].height;r.setTranslate(this,Tt[0],Tt[1]+at+it+we/2+St),St+=we,gt=Math.max(gt,le),Wt[re[0].trace.legendgroup]=gt});var Nt=gt+it;ur>0&&Nt+at+ur>lt._maxWidth?(Ge=Math.max(Ge,ur),ur=0,jr+=cr+Pt,cr=St):cr=Math.max(cr,St),r.setTranslate(this,ur,jr),ur+=Nt}),lt._width=Math.max(Ge,ur)+at,lt._height=jr+cr+ft}else{var Hr=X.size(),br=He+vt+(Hr-1)*it=lt._maxWidth&&(Ge=Math.max(Ge,Gt),rn=0,Ce+=Kr,lt._height+=Kr,Kr=0),r.setTranslate(this,Tt[0]+at+rn,Tt[1]+at+Ce+St/2+it),Gt=rn+Nt+it,rn+=re,Kr=Math.max(Kr,St)}),br?(lt._width=rn+vt,lt._height=Kr+ft):(lt._width=Math.max(Ge,Gt)+vt,lt._height+=Kr+ft)}}lt._width=Math.ceil(Math.max(lt._width+Tt[0],lt._titleWidth+2*(at+i.titlePad))),lt._height=Math.ceil(Math.max(lt._height+Tt[1],lt._titleHeight+2*(at+i.itemGap))),lt._effHeight=Math.min(lt._height,lt._maxHeight);var ne=W._context.edits,Ct=ne.legendText||ne.legendPosition;X.each(function(gt){var St=c.select(this).select("."+pt+"toggle"),Nt=gt[0].height,re=gt[0].trace.legendgroup,le=E(gt,lt,Y);dt&&re!==""&&(le=Wt[re]);var we=Ct?Y:se||le;!tt&&!rt&&(we+=it/2),r.setRect(St,0,-Nt/2,we,Nt)})}function V(W,q,X,lt){var yt=W._fullLayout,pt=yt[q],st=H(pt),tt=F(pt),dt=pt.xref==="paper",rt=pt.yref==="paper";W._fullLayout._reservedMargin[q]={};var at=pt.y<.5?"b":"t",vt=pt.x<.5?"l":"r",it={r:yt.width-X,l:X+pt._width,b:yt.height-lt,t:lt+pt._effHeight};if(dt&&rt)return P.autoMargin(W,q,{x:pt.x,y:pt.y,l:pt._width*x[st],r:pt._width*y[st],b:pt._effHeight*y[tt],t:pt._effHeight*x[tt]});dt?W._fullLayout._reservedMargin[q][at]=it[at]:rt||pt.orientation==="v"?W._fullLayout._reservedMargin[q][vt]=it[vt]:W._fullLayout._reservedMargin[q][at]=it[at]}function H(W){return g.isRightAnchor(W)?"right":g.isCenterAnchor(W)?"center":"left"}function F(W){return g.isBottomAnchor(W)?"bottom":g.isMiddleAnchor(W)?"middle":"top"}function U(W){return W._id||"legend"}}),j_=Ft(Q=>{var $=En(),c=ia(),g=eo(),P=_n(),S=P.pushUnique,t=P.strTranslate,e=P.strRotate,r=Fm(),a=tc(),n=Bm(),o=Vs(),i=ui(),s=hp(),f=Ls(),x=ac().zindexSeparator,y=Qo(),v=Np(),T=mo(),u=jy(),b=N_(),_=T.YANGLE,C=Math.PI*_/180,M=1/Math.sin(C),E=Math.cos(C),A=Math.sin(C),h=T.HOVERARROWSIZE,p=T.HOVERTEXTPAD,k={box:!0,ohlc:!0,violin:!0,candlestick:!0},w={scatter:!0,scattergl:!0,splom:!0};function R(Y,ft){return Y.distance-ft.distance}Q.hover=function(Y,ft,ut,wt){Y=P.getGraphDiv(Y);var zt=ft.target;P.throttle(Y._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){O(Y,ft,ut,wt,zt)})},Q.loneHover=function(Y,ft){var ut=!0;Array.isArray(Y)||(ut=!1,Y=[Y]);var wt=ft.gd,zt=at(wt),Pt=vt(wt),Wt=Y.map(function(Mt){var te=Mt._x0||Mt.x0||Mt.x||0,ve=Mt._x1||Mt.x1||Mt.x||0,oe=Mt._y0||Mt.y0||Mt.y||0,Te=Mt._y1||Mt.y1||Mt.y||0,He=Mt.eventData;if(He){var Ge=Math.min(te,ve),cr=Math.max(te,ve),ur=Math.min(oe,Te),jr=Math.max(oe,Te),Hr=Mt.trace;if(y.traceIs(Hr,"gl3d")){var br=wt._fullLayout[Hr.scene]._scene.container,Kr=br.offsetLeft,rn=br.offsetTop;Ge+=Kr,cr+=Kr,ur+=rn,jr+=rn}He.bbox={x0:Ge+Pt,x1:cr+Pt,y0:ur+zt,y1:jr+zt},ft.inOut_bbox&&ft.inOut_bbox.push(He.bbox)}else He=!1;return{color:Mt.color||i.defaultLine,x0:Mt.x0||Mt.x||0,x1:Mt.x1||Mt.x||0,y0:Mt.y0||Mt.y||0,y1:Mt.y1||Mt.y||0,xLabel:Mt.xLabel,yLabel:Mt.yLabel,zLabel:Mt.zLabel,text:Mt.text,name:Mt.name,idealAlign:Mt.idealAlign,borderColor:Mt.borderColor,fontFamily:Mt.fontFamily,fontSize:Mt.fontSize,fontColor:Mt.fontColor,fontWeight:Mt.fontWeight,fontStyle:Mt.fontStyle,fontVariant:Mt.fontVariant,nameLength:Mt.nameLength,textAlign:Mt.textAlign,trace:Mt.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Mt.hovertemplate||!1,hovertemplateLabels:Mt.hovertemplateLabels||!1,eventData:He}}),Ht=!1,Jt=H(Wt,{gd:wt,hovermode:"closest",rotateLabels:Ht,bgColor:ft.bgColor||i.background,container:$.select(ft.container),outerContainer:ft.outerContainer||ft.container}),ge=Jt.hoverLabels,he=5,de=0,se=0;ge.sort(function(Mt,te){return Mt.y0-te.y0}).each(function(Mt,te){var ve=Mt.y0-Mt.by/2;ve-heur[0]._length||ii<0||ii>jr[0]._length)return s.unhoverRaw(Y,ft)}if(ft.pointerX=Ci+ur[0]._offset,ft.pointerY=ii+jr[0]._offset,"xval"in ft?Ct=v.flat(Pt,ft.xval):Ct=v.p2c(ur,Ci),"yval"in ft?gt=v.flat(Pt,ft.yval):gt=v.p2c(jr,ii),!c(Ct[0])||!c(gt[0]))return P.warn("Fx.hover failed",ft,Y),s.unhoverRaw(Y,ft)}var Vi=1/0;function We(za,xs){for(Nt=0;Ntpr&&(Gt.splice(0,pr),Vi=Gt[0].distance),de&&Ce!==0&&Gt.length===0){Tr.distance=Ce,Tr.index=!1;var ss=le._module.hoverPoints(Tr,or,Ar,"closest",{hoverLayer:Ht._hoverlayer});if(ss&&(ss=ss.filter(function(Po){return Po.spikeDistance<=Ce})),ss&&ss.length){var hl,tl=ss.filter(function(Po){return Po.xa.showspikes&&Po.xa.spikesnap!=="hovered data"});if(tl.length){var Bl=tl[0];c(Bl.x0)&&c(Bl.y0)&&(hl=fr(Bl),(!Jr.vLinePoint||Jr.vLinePoint.spikeDistance>hl.spikeDistance)&&(Jr.vLinePoint=hl))}var cs=ss.filter(function(Po){return Po.ya.showspikes&&Po.ya.spikesnap!=="hovered data"});if(cs.length){var Ps=cs[0];c(Ps.x0)&&c(Ps.y0)&&(hl=fr(Ps),(!Jr.hLinePoint||Jr.hLinePoint.spikeDistance>hl.spikeDistance)&&(Jr.hLinePoint=hl))}}}}}We();function rr(za,xs,os){for(var cl=null,Zo=1/0,Ks,ss=0;ssza.trace.index===li.trace.index):Gt=[li];var La=Gt.length,Wa=rt("x",li,Ht),ze=rt("y",li,Ht);We(Wa,ze);var Pe=[],Rr={},qr=0,$r=function(za){var xs=k[za.trace.type]?N(za):za.trace.index;if(!Rr[xs])qr++,Rr[xs]=qr,Pe.push(za);else{var os=Rr[xs]-1,cl=Pe[os];os>0&&Math.abs(za.distance)La-1;Br--)$r(Gt[Br]);Gt=Pe,Cn()}var Gr=Y._hoverdata,fn=[],an=at(Y),Ee=vt(Y);for(let za of Gt){var dr=v.makeEventData(za,za.trace,za.cd);if(za.hovertemplate!==!1){var Vr=!1;za.cd[za.index]&&za.cd[za.index].ht&&(Vr=za.cd[za.index].ht),za.hovertemplate=Vr||za.trace.hovertemplate||!1}if(za.xa&&za.ya){var vn=za.x0+za.xa._offset,Fn=za.x1+za.xa._offset,Xn=za.y0+za.ya._offset,Pn=za.y1+za.ya._offset,Sn=Math.min(vn,Fn),Zn=Math.max(vn,Fn),Ea=Math.min(Xn,Pn),Ri=Math.max(Xn,Pn);dr.bbox={x0:Sn+Ee,x1:Zn+Ee,y0:Ea+an,y1:Ri+an}}za.eventData=[dr],fn.push(dr)}Y._hoverdata=fn;var Ja=se==="y"&&(ne.length>1||Gt.length>1)||se==="closest"&&Vn&&Gt.length>1,Xa=i.combine(Ht.plot_bgcolor||i.background,Ht.paper_bgcolor),Do=H(Gt,{gd:Y,hovermode:se,rotateLabels:Ja,bgColor:Xa,container:Ht._hoverlayer,outerContainer:Ht._paper.node(),commonLabelOpts:Ht.hoverlabel,hoverdistance:Ht.hoverdistance}),go=Do.hoverLabels;if(v.isUnifiedHover(se)||(U(go,Ja,Ht,Do.commonLabelBoundingBox),X(go,Ja,Ht._invScaleX,Ht._invScaleY)),zt&&zt.tagName){var Fo=y.getComponentMethod("annotations","hasClickToShow")(Y,fn);n($.select(zt),Fo?"pointer":"")}!zt||wt||!pt(Y,ft,Gr)||(Gr&&Y.emit("plotly_unhover",{event:ft,points:Gr}),Y.emit("plotly_hover",{event:ft,points:Y._hoverdata,xaxes:ur,yaxes:jr,xvals:Ct,yvals:gt}))}function N(Y){return[Y.trace.index,Y.index,Y.x0,Y.y0,Y.name,Y.attr,Y.xa?Y.xa._id:"",Y.ya?Y.ya._id:""].join(",")}var V=/([\s\S]*)<\/extra>/;function H(Y,ft){var ut=ft.gd,wt=ut._fullLayout,zt=ft.hovermode,Pt=ft.rotateLabels,Wt=ft.bgColor,Ht=ft.container,Jt=ft.outerContainer,ge=ft.commonLabelOpts||{};if(Y.length===0)return[[]];var he=ft.fontFamily||T.HOVERFONT,de=ft.fontSize||T.HOVERFONTSIZE,se=ft.fontWeight||wt.font.weight,Tt=ft.fontStyle||wt.font.style,Lt=ft.fontVariant||wt.font.variant,Mt=ft.fontTextcase||wt.font.textcase,te=ft.fontLineposition||wt.font.lineposition,ve=ft.fontShadow||wt.font.shadow,oe=Y[0],Te=oe.xa,He=oe.ya,Ge=zt.charAt(0),cr=Ge+"Label",ur=oe[cr];if(ur===void 0&&Te.type==="multicategory")for(var jr=0;jrwt.width-Ee&&(dr=wt.width-Ee),La.attr("d","M"+(Gr-dr)+",0L"+(Gr-dr+h)+","+an+h+"H"+Ee+"v"+an+(p*2+Br.height)+"H"+-Ee+"V"+an+h+"H"+(Gr-dr-h)+"Z"),Gr=dr,Nt.minX=Gr-Ee,Nt.maxX=Gr+Ee,Te.side==="top"?(Nt.minY=fn-(p*2+Br.height),Nt.maxY=fn-p):(Nt.minY=fn+p,Nt.maxY=fn+(p*2+Br.height))}else{var Vr,vn,Fn;He.side==="right"?(Vr="start",vn=1,Fn="",Gr=Te._offset+Te._length):(Vr="end",vn=-1,Fn="-",Gr=Te._offset),fn=He._offset+(oe.y0+oe.y1)/2,Wa.attr("text-anchor",Vr),La.attr("d","M0,0L"+Fn+h+","+h+"V"+(p+Br.height/2)+"h"+Fn+(p*2+Br.width)+"V-"+(p+Br.height/2)+"H"+Fn+h+"V-"+h+"Z"),Nt.minY=fn-(p+Br.height/2),Nt.maxY=fn+(p+Br.height/2),He.side==="right"?(Nt.minX=Gr+h,Nt.maxX=Gr+h+(p*2+Br.width)):(Nt.minX=Gr-h-(p*2+Br.width),Nt.maxX=Gr-h);var Xn=Br.height/2,Pn=br-Br.top-Xn,Sn="clip"+wt._uid+"commonlabel"+He._id,Zn;if(GrLa.hoverinfo!=="none");if(li.length===0)return[];var re=wt.hoverlabel,le=re.font,we=li[0],Ue=((zt==="x unified"?we.xa:we.ya).unifiedhovertitle||{}).text,qe=Ue?P.hovertemplateString({data:zt==="x unified"?[{xa:we.xa,x:we.xVal}]:[{ya:we.ya,y:we.yVal}],fallback:we.trace.hovertemplatefallback,locale:wt._d3locale,template:Ue}):ur,or={showlegend:!0,legend:{title:{text:qe,font:le},font:le,bgcolor:re.bgcolor,bordercolor:re.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:wt.legend?wt.legend.traceorder:void 0,orientation:"v"}},Ar={font:le};u(or,Ar,ut._fullData);var Tr=Ar.legend;Tr.entries=[];for(var pr=0;pr=0?Li=bn:An+aa=0?Li=An:ci+aa=0?Oi=Qr:Cn+Vi=0?Oi=Cn:xi+Vi=0,(li.idealAlign==="top"||!Ja)&&Xa?(Fn-=Pn/2,li.anchor="end"):Ja?(Fn+=Pn/2,li.anchor="start"):li.anchor="middle",li.crossPos=Fn;else{if(li.pos=Fn,Ja=vn+Xn/2+Ri<=Kr,Xa=vn-Xn/2-Ri>=0,(li.idealAlign==="left"||!Ja)&&Xa)vn-=Xn/2,li.anchor="end";else if(Ja)vn+=Xn/2,li.anchor="start";else{li.anchor="middle";var Do=Ri/2,go=vn+Do-Kr,Fo=vn-Do;go>0&&(vn-=go),Fo<0&&(vn+=-Fo)}li.crossPos=vn}fn.attr("text-anchor",li.anchor),Ee&&an.attr("text-anchor",li.anchor),La.attr("transform",t(vn,Fn)+(Pt?e(_):""))}),{hoverLabels:Zi,commonLabelBoundingBox:Nt}}function F(Y,ft,ut,wt,zt,Pt){var Wt="",Ht="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=P.templateString(Y.name,Y.trace._meta)),Wt=tt(Y.name,Y.nameLength));var Jt=ut.charAt(0),ge=Jt==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(Ht+="x: "+Y.xLabel+"
"),Y.yLabel!==void 0&&(Ht+="y: "+Y.yLabel+"
"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&Y.trace.type!=="choroplethmap"&&(Ht+=(Ht?"z: ":"")+Y.zLabel)):ft&&Y[Jt+"Label"]===zt?Ht=Y[ge+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(Ht=Y.yLabel):Y.yLabel===void 0?Ht=Y.xLabel:Ht="("+Y.xLabel+", "+Y.yLabel+")",(Y.text||Y.text===0)&&!Array.isArray(Y.text)&&(Ht+=(Ht?"
":"")+Y.text),Y.extraText!==void 0&&(Ht+=(Ht?"
":"")+Y.extraText),Pt&&Ht===""&&!Y.hovertemplate&&(Wt===""&&Pt.remove(),Ht=Wt);let{hovertemplate:he=!1}=Y;if(he){let de=Y.hovertemplateLabels||Y;Y[Jt+"Label"]!==zt&&(de[Jt+"other"]=de[Jt+"Val"],de[Jt+"otherLabel"]=de[Jt+"Label"]),Ht=P.hovertemplateString({data:[Y.eventData[0]||{},Y.trace._meta],fallback:Y.trace.hovertemplatefallback,labels:de,locale:wt._d3locale,template:he}),Ht=Ht.replace(V,(se,Tt)=>(Wt=tt(Tt,Y.nameLength),""))}return[Ht,Wt]}function U(Y,ft,ut,wt){var zt=ft?"xa":"ya",Pt=ft?"ya":"xa",Wt=0,Ht=1,Jt=Y.size(),ge=new Array(Jt),he=0,de=wt.minX,se=wt.maxX,Tt=wt.minY,Lt=wt.maxY,Mt=function(Ct){return Ct*ut._invScaleX},te=function(Ct){return Ct*ut._invScaleY};Y.each(function(Ct){var gt=Ct[zt],St=Ct[Pt],Nt=gt._id.charAt(0)==="x",re=gt.range;he===0&&re&&re[0]>re[1]!==Nt&&(Ht=-1);var le=0,we=Nt?ut.width:ut.height;if(ut.hovermode==="x"||ut.hovermode==="y"){var Ue=W(Ct,ft),qe=Ct.anchor,or=qe==="end"?-1:1,Ar,Tr;if(qe==="middle")Ar=Ct.crossPos+(Nt?te(Ue.y-Ct.by/2):Mt(Ct.bx/2+Ct.tx2width/2)),Tr=Ar+(Nt?te(Ct.by):Mt(Ct.bx));else if(Nt)Ar=Ct.crossPos+te(h+Ue.y)-te(Ct.by/2-h),Tr=Ar+te(Ct.by);else{var pr=Mt(or*h+Ue.x),Jr=pr+Mt(or*Ct.bx);Ar=Ct.crossPos+Math.min(pr,Jr),Tr=Ct.crossPos+Math.max(pr,Jr)}Nt?Tt!==void 0&&Lt!==void 0&&Math.min(Tr,Lt)-Math.max(Ar,Tt)>1&&(St.side==="left"?(le=St._mainLinePosition,we=ut.width):we=St._mainLinePosition):de!==void 0&&se!==void 0&&Math.min(Tr,se)-Math.max(Ar,de)>1&&(St.side==="top"?(le=St._mainLinePosition,we=ut.height):we=St._mainLinePosition)}ge[he++]=[{datum:Ct,traceIndex:Ct.trace.index,dp:0,pos:Ct.pos,posref:Ct.posref,size:Ct.by*(Nt?M:1)/2,pmin:le,pmax:we}]}),ge.sort(function(Ct,gt){return Ct[0].posref-gt[0].posref||Ht*(gt[0].traceIndex-Ct[0].traceIndex)});var ve,oe,Te,He,Ge,cr,ur;function jr(Ct){var gt=Ct[0],St=Ct[Ct.length-1];if(oe=gt.pmin-gt.pos-gt.dp+gt.size,Te=St.pos+St.dp+St.size-gt.pmax,oe>.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp+=oe;ve=!1}if(!(Te<.01)){if(oe<-.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp-=Te;ve=!1}if(ve){var Nt=0;for(He=0;Hegt.pmax&&Nt++;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos>gt.pmax-1&&(cr.del=!0,Nt--);for(He=0;He=0;Ge--)Ct[Ge].dp-=Te;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos+cr.dp+cr.size>gt.pmax&&(cr.del=!0,Nt--)}}}for(;!ve&&Wt<=Jt;){for(Wt++,ve=!0,He=0;He.01){for(Ge=br.length-1;Ge>=0;Ge--)br[Ge].dp+=oe;for(Hr.push.apply(Hr,br),ge.splice(He+1,1),ur=0,Ge=Hr.length-1;Ge>=0;Ge--)ur+=Hr[Ge].dp;for(Te=ur/Hr.length,Ge=Hr.length-1;Ge>=0;Ge--)Hr[Ge].dp-=Te;ve=!1}else He++}ge.forEach(jr)}for(He=ge.length-1;He>=0;He--){var Ce=ge[He];for(Ge=Ce.length-1;Ge>=0;Ge--){var Gt=Ce[Ge],ne=Gt.datum;ne.offset=Gt.dp,ne.del=Gt.del}}}function W(Y,ft){var ut=0,wt=Y.offset;return ft&&(wt*=-A,ut=Y.offset*E),{x:ut,y:wt}}function q(Y){var ft={start:1,end:-1,middle:0}[Y.anchor],ut=ft*(h+p),wt=ut+ft*(Y.txwidth+p),zt=Y.anchor==="middle";return zt&&(ut-=Y.tx2width/2,wt+=Y.txwidth/2+p),{alignShift:ft,textShiftX:ut,text2ShiftX:wt}}function X(Y,ft,ut,wt){var zt=function(Wt){return Wt*ut},Pt=function(Wt){return Wt*wt};Y.each(function(Wt){var Ht=$.select(this);if(Wt.del)return Ht.remove();var Jt=Ht.select("text.nums"),ge=Wt.anchor,he=ge==="end"?-1:1,de=q(Wt),se=W(Wt,ft),Tt=se.x,Lt=se.y,Mt=ge==="middle",te="hoverlabel"in Wt.trace?Wt.trace.hoverlabel.showarrow:!0,ve;Mt?ve="M-"+zt(Wt.bx/2+Wt.tx2width/2)+","+Pt(Lt-Wt.by/2)+"h"+zt(Wt.bx)+"v"+Pt(Wt.by)+"h-"+zt(Wt.bx)+"Z":te?ve="M0,0L"+zt(he*h+Tt)+","+Pt(h+Lt)+"v"+Pt(Wt.by/2-h)+"h"+zt(he*Wt.bx)+"v-"+Pt(Wt.by)+"H"+zt(he*h+Tt)+"V"+Pt(Lt-h)+"Z":ve="M"+zt(he*h+Tt)+","+Pt(Lt-Wt.by/2)+"h"+zt(he*Wt.bx)+"v"+Pt(Wt.by)+"h"+zt(-he*Wt.bx)+"Z",Ht.select("path").attr("d",ve);var oe=Tt+de.textShiftX,Te=Lt+Wt.ty0-Wt.by/2+p,He=Wt.textAlign||"auto";He!=="auto"&&(He==="left"&&ge!=="start"?(Jt.attr("text-anchor","start"),oe=Mt?-Wt.bx/2-Wt.tx2width/2+p:-Wt.bx-p):He==="right"&&ge!=="end"&&(Jt.attr("text-anchor","end"),oe=Mt?Wt.bx/2-Wt.tx2width/2-p:Wt.bx+p)),Jt.call(a.positionText,zt(oe),Pt(Te)),Wt.tx2width&&(Ht.select("text.name").call(a.positionText,zt(de.text2ShiftX+de.alignShift*p+Tt),Pt(Lt+Wt.ty0-Wt.by/2+p)),Ht.select("rect").call(o.setRect,zt(de.text2ShiftX+(de.alignShift-1)*Wt.tx2width/2+Tt),Pt(Lt-Wt.by/2-1),zt(Wt.tx2width),Pt(Wt.by+2)))})}function lt(Y,ft){var ut=Y.index,wt=Y.trace||{},zt=Y.cd[0],Pt=Y.cd[ut]||{};function Wt(se){return se||c(se)&&se===0}var Ht=Array.isArray(ut)?function(se,Tt){var Lt=P.castOption(zt,ut,se);return Wt(Lt)?Lt:P.extractOption({},wt,"",Tt)}:function(se,Tt){return P.extractOption(Pt,wt,se,Tt)};function Jt(se,Tt,Lt){var Mt=Ht(Tt,Lt);Wt(Mt)&&(Y[se]=Mt)}if(Jt("hoverinfo","hi","hoverinfo"),Jt("bgcolor","hbg","hoverlabel.bgcolor"),Jt("borderColor","hbc","hoverlabel.bordercolor"),Jt("fontFamily","htf","hoverlabel.font.family"),Jt("fontSize","hts","hoverlabel.font.size"),Jt("fontColor","htc","hoverlabel.font.color"),Jt("fontWeight","htw","hoverlabel.font.weight"),Jt("fontStyle","hty","hoverlabel.font.style"),Jt("fontVariant","htv","hoverlabel.font.variant"),Jt("nameLength","hnl","hoverlabel.namelength"),Jt("textAlign","hta","hoverlabel.align"),Y.posref=ft==="y"||ft==="closest"&&wt.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=P.constrain(Y.x0,0,Y.xa._length),Y.x1=P.constrain(Y.x1,0,Y.xa._length),Y.y0=P.constrain(Y.y0,0,Y.ya._length),Y.y1=P.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:f.hoverLabelText(Y.xa,Y.xLabelVal,wt.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:f.hoverLabelText(Y.ya,Y.yLabelVal,wt.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!isNaN(Y.xerr)&&!(Y.xa.type==="log"&&Y.xerr<=0)){var ge=f.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+ge+" / -"+f.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+ge,ft==="x"&&(Y.distance+=1)}if(!isNaN(Y.yerr)&&!(Y.ya.type==="log"&&Y.yerr<=0)){var he=f.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+he+" / -"+f.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+he,ft==="y"&&(Y.distance+=1)}var de=Y.hoverinfo||Y.trace.hoverinfo;return de&&de!=="all"&&(de=Array.isArray(de)?de:de.split("+"),de.indexOf("x")===-1&&(Y.xLabel=void 0),de.indexOf("y")===-1&&(Y.yLabel=void 0),de.indexOf("z")===-1&&(Y.zLabel=void 0),de.indexOf("text")===-1&&(Y.text=void 0),de.indexOf("name")===-1&&(Y.name=void 0)),Y}function yt(Y,ft,ut){var wt=ut.container,zt=ut.fullLayout,Pt=zt._size,Wt=ut.event,Ht=!!ft.hLinePoint,Jt=!!ft.vLinePoint,ge,he;if(wt.selectAll(".spikeline").remove(),!!(Jt||Ht)){var de=i.combine(zt.plot_bgcolor,zt.paper_bgcolor);if(Ht){var se=ft.hLinePoint,Tt,Lt;ge=se&&se.xa,he=se&&se.ya;var Mt=he.spikesnap;Mt==="cursor"?(Tt=Wt.pointerX,Lt=Wt.pointerY):(Tt=ge._offset+se.x,Lt=he._offset+se.y);var te=g.readability(se.color,de)<1.5?i.contrast(de):se.color,ve=he.spikemode,oe=he.spikethickness,Te=he.spikecolor||te,He=f.getPxPosition(Y,he),Ge,cr;if(ve.indexOf("toaxis")!==-1||ve.indexOf("across")!==-1){if(ve.indexOf("toaxis")!==-1&&(Ge=He,cr=Tt),ve.indexOf("across")!==-1){var ur=he._counterDomainMin,jr=he._counterDomainMax;he.anchor==="free"&&(ur=Math.min(ur,he.position),jr=Math.max(jr,he.position)),Ge=Pt.l+ur*Pt.w,cr=Pt.l+jr*Pt.w}wt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe,stroke:Te,"stroke-dasharray":o.dashStyle(he.spikedash,oe)}).classed("spikeline",!0).classed("crisp",!0),wt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe+2,stroke:de}).classed("spikeline",!0).classed("crisp",!0)}ve.indexOf("marker")!==-1&&wt.insert("circle",":first-child").attr({cx:He+(he.side!=="right"?oe:-oe),cy:Lt,r:oe,fill:Te}).classed("spikeline",!0)}if(Jt){var Hr=ft.vLinePoint,br,Kr;ge=Hr&&Hr.xa,he=Hr&&Hr.ya;var rn=ge.spikesnap;rn==="cursor"?(br=Wt.pointerX,Kr=Wt.pointerY):(br=ge._offset+Hr.x,Kr=he._offset+Hr.y);var Ce=g.readability(Hr.color,de)<1.5?i.contrast(de):Hr.color,Gt=ge.spikemode,ne=ge.spikethickness,Ct=ge.spikecolor||Ce,gt=f.getPxPosition(Y,ge),St,Nt;if(Gt.indexOf("toaxis")!==-1||Gt.indexOf("across")!==-1){if(Gt.indexOf("toaxis")!==-1&&(St=gt,Nt=Kr),Gt.indexOf("across")!==-1){var re=ge._counterDomainMin,le=ge._counterDomainMax;ge.anchor==="free"&&(re=Math.min(re,ge.position),le=Math.max(le,ge.position)),St=Pt.t+(1-le)*Pt.h,Nt=Pt.t+(1-re)*Pt.h}wt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne,stroke:Ct,"stroke-dasharray":o.dashStyle(ge.spikedash,ne)}).classed("spikeline",!0).classed("crisp",!0),wt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne+2,stroke:de}).classed("spikeline",!0).classed("crisp",!0)}Gt.indexOf("marker")!==-1&&wt.insert("circle",":first-child").attr({cx:br,cy:gt-(ge.side!=="top"?ne:-ne),r:ne,fill:Ct}).classed("spikeline",!0)}}}function pt(Y,ft,ut){if(!ut||ut.length!==Y._hoverdata.length)return!0;for(var wt=ut.length-1;wt>=0;wt--){var zt=ut[wt],Pt=Y._hoverdata[wt];if(zt.curveNumber!==Pt.curveNumber||String(zt.pointNumber)!==String(Pt.pointNumber)||String(zt.pointNumbers)!==String(Pt.pointNumbers)||zt.binNumber!==Pt.binNumber)return!0}return!1}function st(Y,ft){return!0}function tt(Y,ft){return a.plainText(Y||"",{len:ft,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function dt(Y,ft){for(var ut=ft.charAt(0),wt=[],zt=[],Pt=[],Wt=0;WtY.offsetTop+Y.clientTop,vt=Y=>Y.offsetLeft+Y.clientLeft;function it(Y,ft){var ut=Y._fullLayout,wt=ft.getBoundingClientRect(),zt=wt.left,Pt=wt.top,Wt=zt+wt.width,Ht=Pt+wt.height,Jt=P.apply3DTransform(ut._invTransform)(zt,Pt),ge=P.apply3DTransform(ut._invTransform)(Wt,Ht),he=Jt[0],de=Jt[1],se=ge[0],Tt=ge[1];return{x:he,y:de,width:se-he,height:Tt-de,top:Math.min(de,Tt),left:Math.min(he,se),right:Math.max(he,se),bottom:Math.max(de,Tt)}}}),Tg=Ft((Q,$)=>{var c=_n(),g=ui(),P=Np().isUnifiedHover;$.exports=function(S,t,e,r){r=r||{};var a=t.legend;function n(o){r.font[o]||(r.font[o]=a?t.legend.font[o]:t.font[o])}t&&P(t.hovermode)&&(r.font||(r.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),a?(r.bgcolor||(r.bgcolor=g.combine(t.legend.bgcolor,t.paper_bgcolor)),r.bordercolor||(r.bordercolor=t.legend.bordercolor)):r.bgcolor||(r.bgcolor=t.paper_bgcolor)),e("hoverlabel.bgcolor",r.bgcolor),e("hoverlabel.bordercolor",r.bordercolor),e("hoverlabel.namelength",r.namelength),e("hoverlabel.showarrow",r.showarrow),c.coerceFont(e,"hoverlabel.font",r.font),e("hoverlabel.align",r.align)}}),Ag=Ft((Q,$)=>{var c=_n(),g=Tg(),P=vo();$.exports=function(S,t){function e(r,a){return c.coerce(S,t,P,r,a)}g(S,t,e)}}),m6=Ft((Q,$)=>{var c=_n(),g=Ss(),P=Tg();$.exports=function(S,t,e,r){function a(o,i){return c.coerce(S,t,g,o,i)}var n=c.extendFlat({},r.hoverlabel);t.hovertemplate&&(n.namelength=-1),P(S,t,a,n)}}),pv=Ft((Q,$)=>{var c=_n(),g=vo();$.exports=function(P,S){function t(e,r){return S[e]!==void 0?S[e]:c.coerce(P,S,g,e,r)}return t("clickmode"),t("hoversubplots"),t("hovermode")}}),y0=Ft((Q,$)=>{var c=_n(),g=vo(),P=pv(),S=Tg();$.exports=function(t,e){function r(x,y){return c.coerce(t,e,g,x,y)}var a=P(t,e);a&&(r("hoverdistance"),r("spikedistance"));var n=r("dragmode");n==="select"&&r("selectdirection");var o=e._has("mapbox"),i=e._has("map"),s=e._has("geo"),f=e._basePlotModules.length;e.dragmode==="zoom"&&((o||i||s)&&f===1||(o||i)&&s&&f===2)&&(e.dragmode="pan"),S(t,e,r),c.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}}),bw=Ft((Q,$)=>{var c=_n(),g=Qo();$.exports=function(S){var t=S.calcdata,e=S._fullLayout;function r(s){return function(f){return c.coerceHoverinfo({hoverinfo:f},{_module:s._module},e)}}for(var a=0;a{var c=Qo(),g=j_().hover;$.exports=function(P,S,t){var e=c.getComponentMethod("annotations","onClick")(P,P._hoverdata);t!==void 0&&g(P,S,t,!0);function r(){P.emit("plotly_click",{points:P._hoverdata,event:S})}P._hoverdata&&S&&S.target&&(e&&e.then?e.then(r):r(),S.stopImmediatePropagation&&S.stopImmediatePropagation())}}),Qh=Ft((Q,$)=>{var c=En(),g=_n(),P=hp(),S=Np(),t=vo(),e=j_();$.exports={moduleType:"component",name:"fx",constants:mo(),schema:{layout:t},attributes:Ss(),layoutAttributes:t,supplyLayoutGlobalDefaults:Ag(),supplyDefaults:m6(),supplyLayoutDefaults:y0(),calc:bw(),getDistanceFunction:S.getDistanceFunction,getClosest:S.getClosest,inbox:S.inbox,quadrature:S.quadrature,appendArrayPointValue:S.appendArrayPointValue,castHoverOption:a,castHoverinfo:n,hover:e.hover,unhover:P.unhover,loneHover:e.loneHover,loneUnhover:r,click:ww()};function r(o){var i=g.isD3Selection(o)?o:c.select(o);i.selectAll("g.hovertext").remove(),i.selectAll(".spikeline").remove()}function a(o,i,s){return g.castOption(o,i,"hoverlabel."+s)}function n(o,i,s){function f(x){return g.coerceHoverinfo({hoverinfo:x},{_module:o._module},i)}return g.castOption(o,s,"hoverinfo",f)}}),x0=Ft(Q=>{Q.selectMode=function($){return $==="lasso"||$==="select"},Q.drawMode=function($){return $==="drawclosedpath"||$==="drawopenpath"||$==="drawline"||$==="drawrect"||$==="drawcircle"},Q.openMode=function($){return $==="drawline"||$==="drawopenpath"},Q.rectMode=function($){return $==="select"||$==="drawline"||$==="drawrect"||$==="drawcircle"},Q.freeMode=function($){return $==="lasso"||$==="drawclosedpath"||$==="drawopenpath"},Q.selectingOrDrawing=function($){return Q.freeMode($)||Q.rectMode($)}}),mv=Ft((Q,$)=>{$.exports=function(c){var g=c._fullLayout;g._glcanvas&&g._glcanvas.size()&&g._glcanvas.each(function(P){P.regl&&P.regl.clear({color:!0,depth:!0})})}}),U_=Ft((Q,$)=>{$.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}),V_=Ft((Q,$)=>{var c=32;$.exports={CIRCLE_SIDES:c,i000:0,i090:c/4,i180:c/2,i270:c/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}),Uy=Ft((Q,$)=>{var c=_n().strTranslate;function g(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function P(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function S(e){var r=e._id.charAt(0)==="y"?1:0;return function(a){return g(e,a[r])}}function t(e){return c(e.xaxis._offset,e.yaxis._offset)}$.exports={p2r:g,r2p:P,axValue:S,getTransform:t}}),Mg=Ft(Q=>{var $=S1(),c=V_(),g=c.CIRCLE_SIDES,P=c.SQRT2,S=Uy(),t=S.p2r,e=S.r2p,r=[0,3,4,5,6,1,2],a=[0,3,4,1,2];Q.writePaths=function(i){var s=i.length;if(!s)return"M0,0Z";for(var f="",x=0;x0&&b{var c=Rc(),g=x0(),P=g.drawMode,S=g.openMode,t=V_(),e=t.i000,r=t.i090,a=t.i180,n=t.i270,o=t.cos45,i=t.sin45,s=Uy(),f=s.p2r,x=s.r2p,y=z0(),v=y.clearOutline,T=Mg(),u=T.readPaths,b=T.writePaths,_=T.ellipseOver,C=T.fixDatesForPaths;function M(A,h){if(A.length){var p=A[0][0];if(p){var k=h.gd,w=h.isActiveShape,R=h.dragmode,O=(k.layout||{}).shapes||[];if(!P(R)&&w!==void 0){var N=k._fullLayout._activeShapeIndex;if(N{var c=x0(),g=c.selectMode,P=z0(),S=P.clearOutline,t=Mg(),e=t.readPaths,r=t.writePaths,a=t.fixDatesForPaths;$.exports=function(n,o){if(n.length){var i=n[0][0];if(i){var s=i.getAttribute("d"),f=o.gd,x=f._fullLayout.newselection,y=o.plotinfo,v=y.xaxis,T=y.yaxis,u=o.isActiveSelection,b=o.dragmode,_=(f.layout||{}).selections||[];if(!g(b)&&u!==void 0){var C=f._fullLayout._activeSelectionIndex;if(C<_.length)switch(f._fullLayout.selections[C].type){case"rect":b="select";break;case"path":b="lasso";break}}var M=e(s,f,y,u),E={xref:v._id,yref:T._id,opacity:x.opacity,line:{color:x.line.color,width:x.line.width,dash:x.line.dash}},A;M.length===1&&(A=M[0]),A&&A.length===5&&b==="select"?(E.type="rect",E.x0=A[0][1],E.y0=A[0][2],E.x1=A[2][1],E.y1=A[2][2]):(E.type="path",v&&T&&a(M,v,T),E.path=r(M),A=null),S(f);for(var h=o.editHelpers,p=(h||{}).modifyItem,k=[],w=0;w<_.length;w++){var R=f._fullLayout.selections[w];if(!R){k[w]=R;continue}if(k[w]=R._input,u!==void 0&&w===f._fullLayout._activeSelectionIndex){var O=E;switch(R.type){case"rect":p("x0",O.x0),p("x1",O.x1),p("y0",O.y0),p("y1",O.y1);break;case"path":p("path",O.path);break}}}return u===void 0?(k.push(E),k):h?h.getUpdateObj():{}}}}}),Vy=Ft((Q,$)=>{$.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}}),kp=Ft(Q=>{var $=Vy(),c=_n(),g=Ls();Q.rangeToShapePosition=function(t){return t.type==="log"?t.r2d:function(e){return e}},Q.shapePositionToRange=function(t){return t.type==="log"?t.d2r:function(e){return e}},Q.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},Q.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},Q.extractPathCoords=function(t,e,r){var a=[],n=t.match($.segmentRE);return n.forEach(function(o){var i=e[o.charAt(0)].drawn;if(i!==void 0){var s=o.substr(1).match($.paramRE);if(!(!s||s.lengthu&&(_="X"),_});return x>u&&(b=b.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+f)),y+b})}function S(t,e){e=e||0;var r=0;return e&&t&&(t.type==="category"||t.type==="multicategory")&&(r=(t.r2p(1)-t.r2p(0))*e),r}}),kw=Ft((Q,$)=>{var c=_n(),g=Ls(),P=tc(),S=Vs(),t=Mg().readPaths,e=kp(),r=e.getPathString,a=_1(),n=Sf().FROM_TL;$.exports=function(s,f,x,y){if(y.selectAll(".shape-label").remove(),!!(x.label.text||x.label.texttemplate)){var v;if(x.label.texttemplate){var T={};if(x.type!=="path"){var u=g.getFromId(s,x.xref),b=g.getFromId(s,x.yref);for(var _ in a){var C=a[_](x,u,b);C!==void 0&&(T[_]=C)}}v=c.texttemplateStringForShapes({data:[T],fallback:x.label.texttemplatefallback,locale:s._fullLayout._d3locale,template:x.label.texttemplate})}else v=x.label.text;var M={"data-index":f},E=x.label.font,A={"data-notex":1},h=y.append("g").attr(M).classed("shape-label",!0),p=h.append("text").attr(A).classed("shape-label-text",!0).text(v),k,w,R,O;if(x.path){var N=r(s,x),V=t(N,s);k=1/0,R=1/0,w=-1/0,O=-1/0;for(var H=0;H=s?v=f-y:v=y-f,-180/Math.PI*Math.atan2(v,T)}function i(s,f,x,y,v,T,u){var b=v.label.textposition,_=v.label.textangle,C=v.label.padding,M=v.type,E=Math.PI/180*T,A=Math.sin(E),h=Math.cos(E),p=v.label.xanchor,k=v.label.yanchor,w,R,O,N;if(M==="line"){b==="start"?(w=s,R=f):b==="end"?(w=x,R=y):(w=(s+x)/2,R=(f+y)/2),p==="auto"&&(b==="start"?_==="auto"?x>s?p="left":xs?p="right":xs?p="right":xs?p="left":x{var c=_n(),g=c.strTranslate,P=hp(),S=x0(),t=S.drawMode,e=S.selectMode,r=Qo(),a=ui(),n=V_(),o=n.i000,i=n.i090,s=n.i180,f=n.i270,x=z0(),y=x.clearOutlineControllers,v=Mg(),T=v.pointsOnRectangle,u=v.pointsOnEllipse,b=v.writePaths,_=l0().newShapes,C=l0().createShapeObj,M=Sg(),E=kw();$.exports=function k(w,R,O,N){N||(N=0);var V=O.gd;function H(){k(w,R,O,N++),(u(w[0])||O.hasText)&&F({redrawing:!0})}function F(de){var se={};O.isActiveShape!==void 0&&(O.isActiveShape=!1,se=_(R,O)),O.isActiveSelection!==void 0&&(O.isActiveSelection=!1,se=M(R,O),V._fullLayout._reselect=!0),Object.keys(se).length&&r.call((de||{}).redrawing?"relayout":"_guiRelayout",V,se)}var U=V._fullLayout,W=U._zoomlayer,q=O.dragmode,X=t(q),lt=e(q);(X||lt)&&(V._fullLayout._outlining=!0),y(V),R.attr("d",b(w));var yt,pt,st,tt,dt;if(!N&&(O.isActiveShape||O.isActiveSelection)){dt=A([],w);var rt=W.append("g").attr("class","outline-controllers");zt(rt),he()}if(X&&O.hasText){var at=W.select(".label-temp"),vt=C(R,O,O.dragmode);E(V,"label-temp",vt,at)}function it(de){st=+de.srcElement.getAttribute("data-i"),tt=+de.srcElement.getAttribute("data-j"),yt[st][tt].moveFn=Y}function Y(de,se){if(w.length){var Tt=dt[st][tt][1],Lt=dt[st][tt][2],Mt=w[st],te=Mt.length;if(T(Mt)){var ve=de,oe=se;if(O.isActiveSelection){var Te=h(Mt,tt);Te[1]===Mt[tt][1]?oe=0:ve=0}for(var He=0;He1&&!(de.length===2&&de[1][0]==="Z")&&(tt===0&&(de[0][0]="M"),w[st]=de,H(),F())}}function wt(de,se){if(de===2){st=+se.srcElement.getAttribute("data-i"),tt=+se.srcElement.getAttribute("data-j");var Tt=w[st];!T(Tt)&&!u(Tt)&&ut()}}function zt(de){yt=[];for(var se=0;se{var c=En(),g=Qo(),P=_n(),S=Ls(),t=Mg().readPaths,e=Nm(),r=kw(),a=z0().clearOutlineControllers,n=ui(),o=Vs(),i=mu().arrayEditor,s=hp(),f=O0(),x=Vy(),y=kp(),v=y.getPathString;$.exports={draw:T,drawOne:_,eraseActiveShape:p,drawLabel:r};function T(k){var w=k._fullLayout;w._shapeUpperLayer.selectAll("path").remove(),w._shapeLowerLayer.selectAll("path").remove(),w._shapeUpperLayer.selectAll("text").remove(),w._shapeLowerLayer.selectAll("text").remove();for(var R in w._plots){var O=w._plots[R].shapelayer;O&&(O.selectAll("path").remove(),O.selectAll("text").remove())}for(var N=0;NH&&re>F&&!gt.shiftKey?s.getCursor(le/Nt,1-we/re):"move";f(w,Ue),Ge=Ue.split("-")[0]}}function Hr(gt){u(k)||(U&&(dt=Mt(R.xanchor)),W&&(rt=te(R.yanchor)),R.type==="path"?Pt=R.path:(yt=U?R.x0:Mt(R.x0),pt=W?R.y0:te(R.y0),st=U?R.x1:Mt(R.x1),tt=W?R.y1:te(R.y1)),yttt?(at=pt,ft="y0",vt=tt,ut="y1"):(at=tt,ft="y1",vt=pt,ut="y0"),jr(gt),Gt(N,R),Ct(w,R,k),He.moveFn=Ge==="move"?rn:Ce,He.altKey=gt.altKey)}function br(){u(k)||(f(w),ne(N),C(w,k,R),g.call("_guiRelayout",k,V.getUpdateObj()))}function Kr(){u(k)||ne(N)}function rn(gt,St){if(R.type==="path"){var Nt=function(we){return we},re=Nt,le=Nt;U?lt("xanchor",R.xanchor=ve(dt+gt)):(re=function(we){return ve(Mt(we)+gt)},Ht&&Ht.type==="date"&&(re=y.encodeDate(re))),W?lt("yanchor",R.yanchor=oe(rt+St)):(le=function(we){return oe(te(we)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",R.path=E(Pt,re,le))}else U?lt("xanchor",R.xanchor=ve(dt+gt)):(lt("x0",R.x0=ve(yt+gt)),lt("x1",R.x1=ve(st+gt))),W?lt("yanchor",R.yanchor=oe(rt+St)):(lt("y0",R.y0=oe(pt+St)),lt("y1",R.y1=oe(tt+St)));w.attr("d",v(k,R)),Gt(N,R),r(k,O,R,Wt)}function Ce(gt,St){if(X){var Nt=function(qn){return qn},re=Nt,le=Nt;U?lt("xanchor",R.xanchor=ve(dt+gt)):(re=function(qn){return ve(Mt(qn)+gt)},Ht&&Ht.type==="date"&&(re=y.encodeDate(re))),W?lt("yanchor",R.yanchor=oe(rt+St)):(le=function(qn){return oe(te(qn)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",R.path=E(Pt,re,le))}else if(q){if(Ge==="resize-over-start-point"){var we=yt+gt,Ue=W?pt-St:pt+St;lt("x0",R.x0=U?we:ve(we)),lt("y0",R.y0=W?Ue:oe(Ue))}else if(Ge==="resize-over-end-point"){var qe=st+gt,or=W?tt-St:tt+St;lt("x1",R.x1=U?qe:ve(qe)),lt("y1",R.y1=W?or:oe(or))}}else{var Ar=function(qn){return Ge.indexOf(qn)!==-1},Tr=Ar("n"),pr=Ar("s"),Jr=Ar("w"),Vn=Ar("e"),Hn=Tr?at+St:at,Kn=pr?vt+St:vt,Ci=Jr?it+gt:it,ii=Vn?Y+gt:Y;W&&(Tr&&(Hn=at-St),pr&&(Kn=vt-St)),(!W&&Kn-Hn>F||W&&Hn-Kn>F)&&(lt(ft,R[ft]=W?Hn:oe(Hn)),lt(ut,R[ut]=W?Kn:oe(Kn))),ii-Ci>H&&(lt(wt,R[wt]=U?Ci:ve(Ci)),lt(zt,R[zt]=U?ii:ve(ii)))}w.attr("d",v(k,R)),Gt(N,R),r(k,O,R,Wt)}function Gt(gt,St){(U||W)&&Nt();function Nt(){var re=St.type!=="path",le=gt.selectAll(".visual-cue").data([0]),we=1;le.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":we}).classed("visual-cue",!0);var Ue=Mt(U?St.xanchor:P.midRange(re?[St.x0,St.x1]:y.extractPathCoords(St.path,x.paramIsX))),qe=te(W?St.yanchor:P.midRange(re?[St.y0,St.y1]:y.extractPathCoords(St.path,x.paramIsY)));if(Ue=y.roundPositionForSharpStrokeRendering(Ue,we),qe=y.roundPositionForSharpStrokeRendering(qe,we),U&&W){var or="M"+(Ue-1-we)+","+(qe-1-we)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";le.attr("d",or)}else if(U){var Ar="M"+(Ue-1-we)+","+(qe-9-we)+"v18 h2 v-18 Z";le.attr("d",Ar)}else{var Tr="M"+(Ue-9-we)+","+(qe-1-we)+"h18 v2 h-18 Z";le.attr("d",Tr)}}}function ne(gt){gt.selectAll(".visual-cue").remove()}function Ct(gt,St,Nt){var re=St.xref,le=St.yref,we=S.getFromId(Nt,re),Ue=S.getFromId(Nt,le),qe="";re!=="paper"&&!we.autorange&&(qe+=re),le!=="paper"&&!Ue.autorange&&(qe+=le),o.setClipUrl(gt,qe?"clip"+Nt._fullLayout._uid+qe:null,Nt)}}function E(k,w,R){return k.replace(x.segmentRE,function(O){var N=0,V=O.charAt(0),H=x.paramIsX[V],F=x.paramIsY[V],U=x.numParams[V],W=O.substr(1).replace(x.paramRE,function(q){return N>=U||(H[N]?q=w(q):F[N]&&(q=R(q)),N++),q});return V+W})}function A(k,w){if(b(k)){var R=w.node(),O=+R.getAttribute("data-index");if(O>=0){if(O===k._fullLayout._activeShapeIndex){h(k);return}k._fullLayout._activeShapeIndex=O,k._fullLayout._deactivateShape=h,T(k)}}}function h(k){if(b(k)){var w=k._fullLayout._activeShapeIndex;w>=0&&(a(k),delete k._fullLayout._activeShapeIndex,T(k))}}function p(k){if(b(k)){a(k);var w=k._fullLayout._activeShapeIndex,R=(k.layout||{}).shapes||[];if(w{var c=Qo(),g=Kc(),P=Rc(),S=U_(),t=H_().eraseActiveShape,e=_n(),r=e._,a=$.exports={};a.toImage={name:"toImage",title:function(M){var E=M._context.toImageButtonOptions||{},A=E.format||"png";return A==="png"?r(M,"Download plot as a PNG"):r(M,"Download plot")},icon:S.camera,click:function(M){var E=M._context.toImageButtonOptions,A={format:E.format||"png"};e.notifier(r(M,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(h){h in E&&(A[h]=E[h])}),c.call("downloadImage",M,A).then(function(h){e.notifier(r(M,"Snapshot succeeded")+" - "+h,"long")}).catch(function(){e.notifier(r(M,"Sorry, there was a problem downloading your snapshot!"),"long")})}},a.sendDataToCloud={name:"sendDataToCloud",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.disk,click:function(M){g.sendDataToCloud(M)}},a.editInChartStudio={name:"editInChartStudio",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.pencil,click:function(M){g.sendDataToCloud(M)}},a.zoom2d={name:"zoom2d",_cat:"zoom",title:function(M){return r(M,"Zoom")},attr:"dragmode",val:"zoom",icon:S.zoombox,click:n},a.pan2d={name:"pan2d",_cat:"pan",title:function(M){return r(M,"Pan")},attr:"dragmode",val:"pan",icon:S.pan,click:n},a.select2d={name:"select2d",_cat:"select",title:function(M){return r(M,"Box Select")},attr:"dragmode",val:"select",icon:S.selectbox,click:n},a.lasso2d={name:"lasso2d",_cat:"lasso",title:function(M){return r(M,"Lasso Select")},attr:"dragmode",val:"lasso",icon:S.lasso,click:n},a.drawclosedpath={name:"drawclosedpath",title:function(M){return r(M,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:S.drawclosedpath,click:n},a.drawopenpath={name:"drawopenpath",title:function(M){return r(M,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:S.drawopenpath,click:n},a.drawline={name:"drawline",title:function(M){return r(M,"Draw line")},attr:"dragmode",val:"drawline",icon:S.drawline,click:n},a.drawrect={name:"drawrect",title:function(M){return r(M,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:S.drawrect,click:n},a.drawcircle={name:"drawcircle",title:function(M){return r(M,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:S.drawcircle,click:n},a.eraseshape={name:"eraseshape",title:function(M){return r(M,"Erase active shape")},icon:S.eraseshape,click:t},a.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(M){return r(M,"Zoom in")},attr:"zoom",val:"in",icon:S.zoom_plus,click:n},a.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:S.zoom_minus,click:n},a.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(M){return r(M,"Autoscale")},attr:"zoom",val:"auto",icon:S.autoscale,click:n},a.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(M){return r(M,"Reset axes")},attr:"zoom",val:"reset",icon:S.home,click:n},a.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(M){return r(M,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:S.tooltip_basic,gravity:"ne",click:n},a.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(M){return r(M,"Compare data on hover")},attr:"hovermode",val:function(M){return M._fullLayout._isHoriz?"y":"x"},icon:S.tooltip_compare,gravity:"ne",click:n};function n(M,E){var A=E.currentTarget,h=A.getAttribute("data-attr"),p=A.getAttribute("data-val")||!0,k=M._fullLayout,w={},R=P.list(M,null,!0),O=k._cartesianSpikesEnabled,N,V;if(h==="zoom"){var H=p==="in"?.5:2,F=(1+H)/2,U=(1-H)/2,W,q;for(V=0;V{var c=gv(),g=Object.keys(c),P=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],S=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(P),t=[],e=function(r){if(S.indexOf(r._cat||r.name)===-1){var a=r.name,n=(r._cat||r.name).toLowerCase();t.indexOf(a)===-1&&t.push(a),t.indexOf(n)===-1&&t.push(n)}};g.forEach(function(r){e(c[r])}),t.sort(),$.exports={DRAW_MODES:P,backButtons:S,foreButtons:t}}),E1=Ft((Q,$)=>{W_(),$.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}}),g6=Ft((Q,$)=>{var c=_n(),g=ui(),P=mu(),S=E1();$.exports=function(t,e){var r=t.modebar||{},a=P.newContainer(e,"modebar");function n(i,s){return c.coerce(r,a,S,i,s)}n("orientation"),n("bgcolor",g.addOpacity(e.paper_bgcolor,.5));var o=g.contrast(g.rgb(e.modebar.bgcolor));n("color",g.addOpacity(o,.3)),n("activecolor",g.addOpacity(o,.7)),n("uirevision",e.uirevision),n("add"),n("remove")}}),jm=Ft((Q,$)=>{var c=En(),g=ia(),P=_n(),S=U_(),t=Qi().version,e=new DOMParser;function r(i){this.container=i.container,this.element=document.createElement("div"),this.update(i.graphInfo,i.buttons),this.container.appendChild(this.element)}var a=r.prototype;a.update=function(i,s){this.graphInfo=i;var f=this.graphInfo._context,x=this.graphInfo._fullLayout,y="modebar-"+x._uid;this.element.setAttribute("id",y),this.element.setAttribute("role","toolbar"),this._uid=y,this.element.className="modebar modebar--custom",f.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),x.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var v=x.modebar,T="#"+y+" .modebar-group";document.querySelectorAll(T).forEach(function(M){M.style.backgroundColor=v.bgcolor});var u=!this.hasButtons(s),b=this.hasLogo!==f.displaylogo,_=this.locale!==f.locale;if(this.locale=f.locale,(u||b||_)&&(this.removeAllButtons(),this.updateButtons(s),f.watermark||f.displaylogo)){var C=this.getLogo();f.watermark&&(C.className=C.className+" watermark"),x.modebar.orientation==="v"?this.element.insertBefore(C,this.element.childNodes[0]):this.element.appendChild(C),this.hasLogo=!0}this.updateActiveButton(),P.setStyleOnHover("#"+y+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},a.updateButtons=function(i){var s=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(f){var x=s.createGroup();f.forEach(function(y){var v=y.name;if(!v)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");s.buttonsNames.push(v);var T=s.createButton(y);s.buttonElements.push(T),x.appendChild(T)}),s.element.appendChild(x)})},a.createGroup=function(){var i=document.createElement("div");i.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return i.style.backgroundColor=s.bgcolor,i},a.createButton=function(i){var s=this,f=document.createElement("button");f.setAttribute("type","button"),f.setAttribute("rel","tooltip"),f.className="modebar-btn";var x=i.title;x===void 0?x=i.name:typeof x=="function"&&(x=x(this.graphInfo)),(x||x===0)&&(f.setAttribute("data-title",x),f.setAttribute("aria-label",x)),i.attr!==void 0&&f.setAttribute("data-attr",i.attr);var y=i.val;y!==void 0&&(typeof y=="function"&&(y=y(this.graphInfo)),f.setAttribute("data-val",y));var v=i.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");f.addEventListener("click",function(u){i.click(s.graphInfo,u),s.updateActiveButton(u.currentTarget)}),f.setAttribute("data-toggle",i.toggle||!1),i.toggle&&c.select(f).classed("active",!0);var T=i.icon;return typeof T=="function"?f.appendChild(T()):f.appendChild(this.createIcon(T||S.question)),f.setAttribute("data-gravity",i.gravity||"n"),f},a.createIcon=function(i){var s=g(i.height)?Number(i.height):i.ascent-i.descent,f="http://www.w3.org/2000/svg",x;if(i.path){x=document.createElementNS(f,"svg"),x.setAttribute("viewBox",[0,0,i.width,s].join(" ")),x.setAttribute("class","icon");var y=document.createElementNS(f,"path");y.setAttribute("d",i.path),i.transform?y.setAttribute("transform",i.transform):i.ascent!==void 0&&y.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),x.appendChild(y)}if(i.svg){var v=e.parseFromString(i.svg,"application/xml");x=v.childNodes[0]}return x.setAttribute("height","1em"),x.setAttribute("width","1em"),x},a.updateActiveButton=function(i){var s=this.graphInfo._fullLayout,f=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(x){var y=x.getAttribute("data-val")||!0,v=x.getAttribute("data-attr"),T=x.getAttribute("data-toggle")==="true",u=c.select(x),b=function(M,E){var A=s.modebar,h=M.querySelector(".icon path");h&&(E||M.matches(":hover")?h.style.fill=A.activecolor:h.style.fill=A.color)};if(T){if(v===f){var _=!u.classed("active");u.classed("active",_),b(x,_)}}else{var C=v===null?v:P.nestedProperty(s,v).get();u.classed("active",C===y),b(x,C===y)}})},a.hasButtons=function(i){var s=this.buttons;if(!s||i.length!==s.length)return!1;for(var f=0;f{var c=Rc(),g=Mc(),P=Qo(),S=Np().isUnifiedHover,t=jm(),e=gv(),r=W_().DRAW_MODES,a=_n().extendDeep;$.exports=function(y){var v=y._fullLayout,T=y._context,u=v._modeBar;if(!T.displayModeBar&&!T.watermark){u&&(u.destroy(),delete v._modeBar);return}if(!Array.isArray(T.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(T.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var b=T.modeBarButtons,_;Array.isArray(b)&&b.length?_=x(b):!T.displayModeBar&&T.watermark?_=[]:_=n(y),u?u.update(y,_):v._modeBar=t(y,_)};function n(y){var v=y._fullLayout,T=y._fullData,u=y._context;function b(Y,ft){if(typeof ft=="string"){if(ft.toLowerCase()===Y.toLowerCase())return!0}else{var ut=ft.name,wt=ft._cat||ft.name;if(ut===Y||wt===Y.toLowerCase())return!0}return!1}var _=v.modebar.add;typeof _=="string"&&(_=[_]);var C=v.modebar.remove;typeof C=="string"&&(C=[C]);var M=u.modeBarButtonsToAdd.concat(_.filter(function(Y){for(var ft=0;ft1?(pt=["toggleHover"],st=["resetViews"]):p?(yt=["zoomInGeo","zoomOutGeo"],pt=["hoverClosestGeo"],st=["resetGeo"]):h?(pt=["hoverClosest3d"],st=["resetCameraDefault3d","resetCameraLastSave3d"]):O?(yt=["zoomInMapbox","zoomOutMapbox"],pt=["toggleHover"],st=["resetViewMapbox"]):N?(yt=["zoomInMap","zoomOutMap"],pt=["toggleHover"],st=["resetViewMap"]):k?pt=["hoverClosestPie"]:F?(pt=["hoverClosestCartesian","hoverCompareCartesian"],st=["resetViewSankey"]):pt=["toggleHover"],A&&pt.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||W)&&(pt=[]),A&&!U&&(yt=["zoomIn2d","zoomOut2d","autoScale2d"],st[0]!=="resetViews"&&(st=["resetScale2d"])),h?tt=["zoom3d","pan3d","orbitRotation","tableRotation"]:A&&!U||R?tt=["zoom2d","pan2d"]:O||N||p?tt=["pan2d"]:V&&(tt=["zoom2d"]),i(T)&&tt.push("select2d","lasso2d");var dt=[],rt=function(Y){dt.indexOf(Y)===-1&&pt.indexOf(Y)!==-1&&dt.push(Y)};if(Array.isArray(M)){for(var at=[],vt=0;vt{$.exports={moduleType:"component",name:"modebar",layoutAttributes:E1(),supplyLayoutDefaults:g6(),manage:Hy()}}),Wy=Ft((Q,$)=>{var c=Sf().FROM_BL;$.exports=function(g,P,S){S===void 0&&(S=c[g.constraintoward||"center"]);var t=[g.r2l(g.range[0]),g.r2l(g.range[1])],e=t[0]+(t[1]-t[0])*S;g.range=g._input.range=[g.l2r(e+(t[0]-e)*P),g.l2r(e+(t[1]-e)*P)],g.setScale()}}),vv=Ft(Q=>{var $=_n(),c=J0(),g=Rc().id2name,P=Cd(),S=Wy(),t=s0(),e=Ua().ALMOST_EQUAL,r=Sf().FROM_BL;Q.handleDefaults=function(y,v,T){var u=T.axIds,b=T.axHasImage,_=v._axisConstraintGroups=[],C=v._axisMatchGroups=[],M,E,A,h,p,k,w,R;for(M=0;M_?T.substr(_):u.substr(b))+C}function f(y,v){for(var T=v._size,u=T.h/T.w,b={},_=Object.keys(y),C=0;C<_.length;C++){var M=_[C],E=y[M];if(typeof E=="string"){var A=E.match(/^[xy]*/)[0],h=A.length;E=+E.substr(h);for(var p=A.charAt(0)==="y"?u:1/u,k=0;ke*w&&!V)){for(b=0;bst&&ftyt&&(yt=ft);var wt=(yt-lt)/(2*pt);h/=wt,lt=M.l2r(lt),yt=M.l2r(yt),M.range=M._input.range=W{var $=En(),c=Qo(),g=Kc(),P=_n(),S=tc(),t=mv(),e=ui(),r=Vs(),a=cp(),n=Tw(),o=Ls(),i=Sf(),s=vv(),f=s.enforce,x=s.clean,y=J0().doAutoRange,v="start",T="middle",u="end",b=ac().zindexSeparator;Q.layoutStyles=function(F){return P.syncOrAsync([g.doAutoMargin,C],F)};function _(F,U,W){for(var q=0;q=F[1]||X[1]<=F[0])&<[0]U[0])return!0}return!1}function C(F){var U=F._fullLayout,W=U._size,q=W.p,X=o.list(F,"",!0),lt,yt,pt,st,tt,dt;if(U._paperdiv.style({width:F._context.responsive&&U.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":U.width+"px",height:F._context.responsive&&U.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":U.height+"px"}).selectAll(".main-svg").call(r.setSize,U.width,U.height),F._context.setBackground(F,U.paper_bgcolor),Q.drawMainTitle(F),n.manage(F),!U._has("cartesian"))return g.previousPromises(F);function rt(Ct,gt,St){var Nt=Ct._lw/2;if(Ct._id.charAt(0)==="x"){if(gt){if(St==="top")return gt._offset-q-Nt}else return W.t+W.h*(1-(Ct.position||0))+Nt%1;return gt._offset+gt._length+q+Nt}if(gt){if(St==="right")return gt._offset+gt._length+q+Nt}else return W.l+W.w*(Ct.position||0)+Nt%1;return gt._offset-q-Nt}for(lt=0;lt0){w(F,lt,tt,st),pt.attr({x:yt,y:lt,"text-anchor":q,dy:N(U.yanchor)}).call(S.positionText,yt,lt);var dt=(U.text.match(S.BR_TAG_ALL)||[]).length;if(dt){var rt=i.LINE_SPACING*dt+i.MID_SHIFT;U.y===0&&(rt=-rt),pt.selectAll(".line").each(function(){var ft=+this.getAttribute("dy").slice(0,-2)-rt+"em";this.setAttribute("dy",ft)})}var at=$.select(F).selectAll(".gtitle-subtitle");if(at.node()){var vt=pt.node().getBBox(),it=vt.y+vt.height,Y=it+a.SUBTITLE_PADDING_EM*U.subtitle.font.size;at.attr({x:yt,y:Y,"text-anchor":q,dy:N(U.yanchor)}).call(S.positionText,yt,Y)}}}};function h(F,U,W,q,X){var lt=U.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,yt=P.isTopAnchor(U)?q:q-X,pt=W==="b"?lt-yt:yt;return P.isTopAnchor(U)&&W==="t"||P.isBottomAnchor(U)&&W==="b"?!1:pt.5?"t":"b",yt=F._fullLayout.margin[lt],pt=0;return U.yref==="paper"?pt=W+U.pad.t+U.pad.b:U.yref==="container"&&(pt=p(lt,q,X,F._fullLayout.height,W)+U.pad.t+U.pad.b),pt>yt?pt:0}function w(F,U,W,q){var X="title.automargin",lt=F._fullLayout.title,yt=lt.y>.5?"t":"b",pt={x:lt.x,y:lt.y,t:0,b:0},st={};lt.yref==="paper"&&h(F,lt,yt,U,q)?pt[yt]=W:lt.yref==="container"&&(st[yt]=W,F._fullLayout._reservedMargin[X]=st),g.allowAutoMargin(F,X),g.autoMargin(F,X,pt)}function R(F,U){var W=F.title,q=F._size,X=0;switch(U===v?X=W.pad.l:U===u&&(X=-W.pad.r),W.xref){case"paper":return q.l+q.w*W.x+X;case"container":default:return F.width*W.x+X}}function O(F,U){var W=F.title,q=F._size,X=0;if(U==="0em"||!U?X=-W.pad.b:U===i.CAP_SHIFT+"em"&&(X=W.pad.t),W.y==="auto")return q.t/2;switch(W.yref){case"paper":return q.t+q.h-q.h*W.y+X;case"container":default:return F.height-F.height*W.y+X}}function N(F){return F==="top"?i.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function V(F){var U=F.title,W=T;return P.isRightAnchor(U)?W=u:P.isLeftAnchor(U)&&(W=v),W}function H(F){var U=F.title,W="0em";return P.isTopAnchor(U)?W=i.CAP_SHIFT+"em":P.isMiddleAnchor(U)&&(W=i.MID_SHIFT+"em"),W}Q.doTraceStyle=function(F){var U=F.calcdata,W=[],q;for(q=0;q{var c=Mg().readPaths,g=Nm(),P=z0().clearOutlineControllers,S=ui(),t=Vs(),e=mu().arrayEditor,r=kp(),a=r.getPathString;$.exports={draw:n,drawOne:i,activateLastSelection:x};function n(v){var T=v._fullLayout;P(v),T._selectionLayer.selectAll("path").remove();for(var u in T._plots){var b=T._plots[u].selectionLayer;b&&b.selectAll("path").remove()}for(var _=0;_=0;V--){var H=M.append("path").attr(A).style("opacity",V?.1:h).call(S.stroke,k).call(S.fill,p).call(t.dashLine,V?"solid":R,V?4+w:w);if(s(H,v,b),O){var F=e(v.layout,"selections",b);H.style({cursor:"move"});var U={element:H.node(),plotinfo:_,gd:v,editHelpers:F,isActiveSelection:!0},W=c(E,v);g(W,H,U)}else H.style("pointer-events",V?"all":"none");N[V]=H}var q=N[0],X=N[1];X.node().addEventListener("click",function(){return f(v,q)})}}function s(v,T,u){var b=u.xref+u.yref;t.setClipUrl(v,"clip"+T._fullLayout._uid+b,T)}function f(v,T){if(o(v)){var u=T.node(),b=+u.getAttribute("data-index");if(b>=0){if(b===v._fullLayout._activeSelectionIndex){y(v);return}v._fullLayout._activeSelectionIndex=b,v._fullLayout._deactivateSelection=y,n(v)}}}function x(v){if(o(v)){var T=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=T,v._fullLayout._deactivateSelection=y,n(v)}}function y(v){if(o(v)){var T=v._fullLayout._activeSelectionIndex;T>=0&&(P(v),delete v._fullLayout._activeSelectionIndex,n(v))}}}),yv=Ft((Q,$)=>{function c(){var g,P=0,S=!1;function t(e,r){return g.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),g}return g={list:[],segmentId:function(){return P++},checkIntersection:function(e,r){return t("check",{seg1:e,seg2:r})},segmentChop:function(e,r){return t("div_seg",{seg:e,pt:r}),t("chop",{seg:e,pt:r})},statusRemove:function(e){return t("pop_seg",{seg:e})},segmentUpdate:function(e){return t("seg_update",{seg:e})},segmentNew:function(e,r){return t("new_seg",{seg:e,primary:r})},segmentRemove:function(e){return t("rem_seg",{seg:e})},tempStatus:function(e,r,a){return t("temp_status",{seg:e,above:r,below:a})},rewind:function(e){return t("rewind",{seg:e})},status:function(e,r,a){return t("status",{seg:e,above:r,below:a})},vert:function(e){return e===S?g:(S=e,t("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),t("log",{txt:e})},reset:function(){return t("reset")},selected:function(e){return t("selected",{segs:e})},chainStart:function(e){return t("chain_start",{seg:e})},chainRemoveHead:function(e,r){return t("chain_rem_head",{index:e,pt:r})},chainRemoveTail:function(e,r){return t("chain_rem_tail",{index:e,pt:r})},chainNew:function(e,r){return t("chain_new",{pt1:e,pt2:r})},chainMatch:function(e){return t("chain_match",{index:e})},chainClose:function(e){return t("chain_close",{index:e})},chainAddHead:function(e,r){return t("chain_add_head",{index:e,pt:r})},chainAddTail:function(e,r){return t("chain_add_tail",{index:e,pt:r})},chainConnect:function(e,r){return t("chain_con",{index1:e,index2:r})},chainReverse:function(e){return t("chain_rev",{index:e})},chainJoin:function(e,r){return t("chain_join",{index1:e,index2:r})},done:function(){return t("done")}},g}$.exports=c}),v6=Ft((Q,$)=>{function c(g){typeof g!="number"&&(g=1e-10);var P={epsilon:function(S){return typeof S=="number"&&(g=S),g},pointAboveOrOnLine:function(S,t,e){var r=t[0],a=t[1],n=e[0],o=e[1],i=S[0],s=S[1];return(n-r)*(s-a)-(o-a)*(i-r)>=-g},pointBetween:function(S,t,e){var r=S[1]-t[1],a=e[0]-t[0],n=S[0]-t[0],o=e[1]-t[1],i=n*a+r*o;if(i-g)},pointsSameX:function(S,t){return Math.abs(S[0]-t[0])g!=n-r>g&&(a-s)*(r-f)/(n-f)+s-e>g&&(o=!o),a=s,n=f}return o}};return P}$.exports=c}),vm=Ft((Q,$)=>{var c={create:function(){var g={root:{root:!0,next:null},exists:function(P){return!(P===null||P===g.root)},isEmpty:function(){return g.root.next===null},getHead:function(){return g.root.next},insertBefore:function(P,S){for(var t=g.root,e=g.root.next;e!==null;){if(S(e)){P.prev=e.prev,P.next=e,e.prev.next=P,e.prev=P;return}t=e,e=e.next}t.next=P,P.prev=t,P.next=null},findTransition:function(P){for(var S=g.root,t=g.root.next;t!==null&&!P(t);)S=t,t=t.next;return{before:S===g.root?null:S,after:t,insert:function(e){return e.prev=S,e.next=t,S.next=e,t!==null&&(t.prev=e),e}}}};return g},node:function(g){return g.prev=null,g.next=null,g.remove=function(){g.prev.next=g.next,g.next&&(g.next.prev=g.prev),g.prev=null,g.next=null},g}};$.exports=c}),qy=Ft((Q,$)=>{var c=vm();function g(P,S,t){function e(T,u){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:null,below:null},otherFill:null}}function r(T,u,b){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=c.create();function n(T,u,b,_,C,M){var E=S.pointsCompare(u,C);return E!==0?E:S.pointsSame(b,M)?0:T!==_?T?1:-1:S.pointAboveOrOnLine(b,_?C:M,_?M:C)?1:-1}function o(T,u){a.insertBefore(T,function(b){var _=n(T.isStart,T.pt,u,b.isStart,b.pt,b.other.pt);return _<0})}function i(T,u){var b=c.node({isStart:!0,pt:T.start,seg:T,primary:u,other:null,status:null});return o(b,T.end),b}function s(T,u,b){var _=c.node({isStart:!1,pt:u.end,seg:u,primary:b,other:T,status:null});T.other=_,o(_,T.pt)}function f(T,u){var b=i(T,u);return s(b,T,u),b}function x(T,u){t&&t.segmentChop(T.seg,u),T.other.remove(),T.seg.end=u,T.other.pt=u,o(T.other,T.pt)}function y(T,u){var b=r(u,T.seg.end,T.seg);return x(T,u),f(b,T.primary)}function v(T,u){var b=c.create();function _(H,F){var U=H.seg.start,W=H.seg.end,q=F.seg.start,X=F.seg.end;return S.pointsCollinear(U,q,X)?S.pointsCollinear(W,q,X)||S.pointAboveOrOnLine(W,q,X)?1:-1:S.pointAboveOrOnLine(U,q,X)?1:-1}function C(H){return b.findTransition(function(F){var U=_(H,F.ev);return U>0})}function M(H,F){var U=H.seg,W=F.seg,q=U.start,X=U.end,lt=W.start,yt=W.end;t&&t.checkIntersection(U,W);var pt=S.linesIntersect(q,X,lt,yt);if(pt===!1){if(!S.pointsCollinear(q,X,lt)||S.pointsSame(q,yt)||S.pointsSame(X,lt))return!1;var st=S.pointsSame(q,lt),tt=S.pointsSame(X,yt);if(st&&tt)return F;var dt=!st&&S.pointBetween(q,lt,yt),rt=!tt&&S.pointBetween(X,lt,yt);if(st)return rt?y(F,X):y(H,yt),F;dt&&(tt||(rt?y(F,X):y(H,yt)),y(F,q))}else pt.alongA===0&&(pt.alongB===-1?y(H,lt):pt.alongB===0?y(H,pt.pt):pt.alongB===1&&y(H,yt)),pt.alongB===0&&(pt.alongA===-1?y(F,q):pt.alongA===0?y(F,pt.pt):pt.alongA===1&&y(F,X));return!1}for(var E=[];!a.isEmpty();){var A=a.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let H=function(){if(p){var F=M(A,p);if(F)return F}return k?M(A,k):!1};t&&t.segmentNew(A.seg,A.primary);var h=C(A),p=h.before?h.before.ev:null,k=h.after?h.after.ev:null;t&&t.tempStatus(A.seg,p?p.seg:!1,k?k.seg:!1);var w=H();if(w){if(P){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,R&&(w.seg.myFill.above=!w.seg.myFill.above)}else w.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(w.seg),A.other.remove(),A.remove()}if(a.getHead()!==A){t&&t.rewind(A.seg);continue}if(P){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,k?A.seg.myFill.below=k.seg.myFill.above:A.seg.myFill.below=T,R?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var O;k?A.primary===k.primary?O=k.seg.otherFill.above:O=k.seg.myFill.above:O=A.primary?u:T,A.seg.otherFill={above:O,below:O}}t&&t.status(A.seg,p?p.seg:!1,k?k.seg:!1),A.other.status=h.insert(c.node({ev:A}))}else{var N=A.status;if(N===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(N.prev)&&b.exists(N.next)&&M(N.prev.ev,N.next.ev),t&&t.statusRemove(N.ev.seg),N.remove(),!A.primary){var V=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=V}E.push(A.seg)}a.getHead().remove()}return t&&t.done(),E}return P?{addRegion:function(T){for(var u,b=T[T.length-1],_=0;_{function c(g,P,S){var t=[],e=[];return g.forEach(function(r){var a=r.start,n=r.end;if(P.pointsSame(a,n)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}S&&S.chainStart(r);var o={index:0,matches_head:!1,matches_pt1:!1},i={index:0,matches_head:!1,matches_pt1:!1},s=o;function f(O,N,V){return s.index=O,s.matches_head=N,s.matches_pt1=V,s===o?(s=i,!1):(s=null,!0)}for(var x=0;x{function c(P,S,t){var e=[];return P.forEach(function(r){var a=(r.myFill.above?8:0)+(r.myFill.below?4:0)+(r.otherFill&&r.otherFill.above?2:0)+(r.otherFill&&r.otherFill.below?1:0);S[a]!==0&&e.push({id:t?t.segmentId():-1,start:r.start,end:r.end,myFill:{above:S[a]===1,below:S[a]===2},otherFill:null})}),t&&t.selected(e),e}var g={union:function(P,S){return c(P,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],S)},intersect:function(P,S){return c(P,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],S)},difference:function(P,S){return c(P,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],S)},differenceRev:function(P,S){return c(P,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],S)},xor:function(P,S){return c(P,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],S)}};$.exports=g}),Zy=Ft((Q,$)=>{var c={toPolygon:function(g,P){function S(r){if(r.length<=0)return g.segments({inverted:!1,regions:[]});function a(i){var s=i.slice(0,i.length-1);return g.segments({inverted:!1,regions:[s]})}for(var n=a(r[0]),o=1;o{var c=yv(),g=v6(),P=qy(),S=Mw(),t=q_(),e=Zy(),r=!1,a=g(),n;n={buildLog:function(i){return i===!0?r=c():i===!1&&(r=!1),r===!1?!1:r.list},epsilon:function(i){return a.epsilon(i)},segments:function(i){var s=P(!0,a,r);return i.regions.forEach(s.addRegion),{segments:s.calculate(i.inverted),inverted:i.inverted}},combine:function(i,s){var f=P(!1,a,r);return{combined:f.calculate(i.segments,i.inverted,s.segments,s.inverted),inverted1:i.inverted,inverted2:s.inverted}},selectUnion:function(i){return{segments:t.union(i.combined,r),inverted:i.inverted1||i.inverted2}},selectIntersect:function(i){return{segments:t.intersect(i.combined,r),inverted:i.inverted1&&i.inverted2}},selectDifference:function(i){return{segments:t.difference(i.combined,r),inverted:i.inverted1&&!i.inverted2}},selectDifferenceRev:function(i){return{segments:t.differenceRev(i.combined,r),inverted:!i.inverted1&&i.inverted2}},selectXor:function(i){return{segments:t.xor(i.combined,r),inverted:i.inverted1!==i.inverted2}},polygon:function(i){return{regions:S(i.segments,a,r),inverted:i.inverted}},polygonFromGeoJSON:function(i){return e.toPolygon(n,i)},polygonToGeoJSON:function(i){return e.fromPolygon(n,a,i)},union:function(i,s){return o(i,s,n.selectUnion)},intersect:function(i,s){return o(i,s,n.selectIntersect)},difference:function(i,s){return o(i,s,n.selectDifference)},differenceRev:function(i,s){return o(i,s,n.selectDifferenceRev)},xor:function(i,s){return o(i,s,n.selectXor)}};function o(i,s,f){var x=n.segments(i),y=n.segments(s),v=n.combine(x,y),T=f(v);return n.polygon(T)}typeof window=="object"&&(window.PolyBool=n),$.exports=n}),$y=Ft((Q,$)=>{$.exports=function(c,g,P,S){var t=c[0],e=c[1],r=!1;P===void 0&&(P=0),S===void 0&&(S=g.length);for(var a=S-P,n=0,o=a-1;ne!=x>e&&t<(f-i)*(e-s)/(x-s)+i;y&&(r=!r)}return r}}),ym=Ft((Q,$)=>{var c=E_().dot,g=Ua().BADNUM,P=$.exports={};P.tester=function(S){var t=S.slice(),e=t[0][0],r=e,a=t[0][1],n=a,o;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),o=1;or||_===g||_n||u&&s(T))}function x(T,u){var b=T[0],_=T[1];if(b===g||br||_===g||_n)return!1;var C=t.length,M=t[0][0],E=t[0][1],A=0,h,p,k,w,R;for(h=1;hMath.max(p,M)||_>Math.max(k,E)))if(_o||Math.abs(c(x,s))>r)return!0;return!1},P.filter=function(S,t){var e=[S[0]],r=0,a=0;function n(i){S.push(i);var s=e.length,f=r;e.splice(a+1);for(var x=f+1;x1){var o=S.pop();n(o)}return{addPt:n,raw:S,filtered:e}}}),Gy=Ft((Q,$)=>{$.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}),$_=Ft((Q,$)=>{var c=Z_(),g=$y(),P=Qo(),S=Vs().dashStyle,t=ui(),e=Qh(),r=Np().makeEventData,a=x0(),n=a.freeMode,o=a.rectMode,i=a.drawMode,s=a.openMode,f=a.selectMode,x=kp(),y=Vy(),v=Nm(),T=z0().clearOutline,u=Mg(),b=u.handleEllipse,_=u.readPaths,C=l0().newShapes,M=Sg(),E=Aw().activateLastSelection,A=_n(),h=A.sorterAsc,p=ym(),k=P_(),w=Rc().getFromId,R=mv(),O=_0().redrawReglTraces,N=Gy(),V=N.MINSELECT,H=p.filter,F=p.tester,U=Uy(),W=U.p2r,q=U.axValue,X=U.getTransform;function lt(Gt){return Gt.subplot!==void 0}function yt(Gt,ne,Ct,gt,St){var Nt=!lt(gt),re=n(St),le=o(St),we=s(St),Ue=i(St),qe=f(St),or=St==="drawline",Ar=St==="drawcircle",Tr=or||Ar,pr=gt.gd,Jr=pr._fullLayout,Vn=qe&&Jr.newselection.mode==="immediate"&&Nt,Hn=Jr._zoomlayer,Kn=gt.element.getBoundingClientRect(),Ci=gt.plotinfo,ii=X(Ci),qn=ne-Kn.left,aa=Ct-Kn.top;Jr._calcInverseTransform(pr);var Vi=A.apply3DTransform(Jr._invTransform)(qn,aa);qn=Vi[0],aa=Vi[1];var We=Jr._invScaleX,rr=Jr._invScaleY,fr=qn,_r=aa,Qr="M"+qn+","+aa,Cn=gt.xaxes[0],bn=gt.yaxes[0],An=Cn._length,ci=bn._length,xi=Gt.altKey&&!(i(St)&&we),Li,Oi,Zi,li,La,Wa,ze;at(Gt,pr,gt),re&&(Li=H([[qn,aa]],N.BENDPX));var Pe=Hn.selectAll("path.select-outline-"+Ci.id).data([1]),Rr=Ue?Jr.newshape:Jr.newselection;Ue&&(gt.hasText=Rr.label.text||Rr.label.texttemplate);var qr=Ue&&!we?Rr.fillcolor:"rgba(0,0,0,0)",$r=Rr.line.color||(Nt?t.contrast(pr._fullLayout.plot_bgcolor):"#7f7f7f");Pe.enter().append("path").attr("class","select-outline select-outline-"+Ci.id).style({opacity:Ue?Rr.opacity/2:1,"stroke-dasharray":S(Rr.line.dash,Rr.line.width),"stroke-width":Rr.line.width+"px","shape-rendering":"crispEdges"}).call(t.stroke,$r).call(t.fill,qr).attr("fill-rule","evenodd").classed("cursor-move",!!Ue).attr("transform",ii).attr("d",Qr+"Z");var Br=Hn.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1}).attr("transform",ii).attr("d","M0,0Z");if(Ue&>.hasText){var Gr=Hn.select(".label-temp");Gr.empty()&&(Gr=Hn.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var fn=Jr._uid+N.SELECTID,an=[],Ee=ut(pr,gt.xaxes,gt.yaxes,gt.subplot);Vn&&!Gt.shiftKey&&(gt._clearSubplotSelections=function(){if(Nt){var Vr=Cn._id,vn=bn._id;oe(pr,Vr,vn,Ee);for(var Fn=(pr.layout||{}).selections||[],Xn=[],Pn=!1,Sn=0;Sn=0){pr._fullLayout._deactivateShape(pr);return}if(!Ue){var Fn=Jr.clickmode;k.done(fn).then(function(){if(k.clear(fn),Vr===2){for(Pe.remove(),La=0;La-1&&pt(vn,pr,gt.xaxes,gt.yaxes,gt.subplot,gt,Pe),Fn==="event"&&rn(pr,void 0);e.click(pr,vn,Ci.id)}).catch(A.error)}},gt.doneFn=function(){Br.remove(),k.done(fn).then(function(){k.clear(fn),!Vn&&li&>.selectionDefs&&(li.subtract=xi,gt.selectionDefs.push(li),gt.mergedPolygons.length=0,[].push.apply(gt.mergedPolygons,Zi)),(Vn||Ue)&&Y(gt,Vn),gt.doneFnCompleted&>.doneFnCompleted(an),qe&&rn(pr,ze)}).catch(A.error)}}function pt(Gt,ne,Ct,gt,St,Nt,re){var le=ne._hoverdata,we=ne._fullLayout,Ue=we.clickmode,qe=Ue.indexOf("event")>-1,or=[],Ar,Tr,pr,Jr,Vn,Hn,Kn,Ci,ii,qn;if(zt(le)){at(Gt,ne,Nt),Ar=ut(ne,Ct,gt,St);var aa=Pt(le,Ar),Vi=aa.pointNumbers.length>0;if(Vi?Ht(Ar,aa):Jt(Ar)&&(Kn=Wt(aa))){for(re&&re.remove(),qn=0;qn=0}function it(Gt){return Gt._fullLayout._activeSelectionIndex>=0}function Y(Gt,ne){var Ct=Gt.dragmode,gt=Gt.plotinfo,St=Gt.gd;vt(St)&&St._fullLayout._deactivateShape(St),it(St)&&St._fullLayout._deactivateSelection(St);var Nt=St._fullLayout,re=Nt._zoomlayer,le=i(Ct),we=f(Ct);if(le||we){var Ue=re.selectAll(".select-outline-"+gt.id);if(Ue&&St._fullLayout._outlining){var qe;le&&(qe=C(Ue,Gt)),qe&&P.call("_guiRelayout",St,{shapes:qe});var or;we&&!lt(Gt)&&(or=M(Ue,Gt)),or&&(St._fullLayout._noEmitSelectedAtStart=!0,P.call("_guiRelayout",St,{selections:or}).then(function(){ne&&E(St)})),St._fullLayout._outlining=!1}}gt.selection={},gt.selection.selectionDefs=Gt.selectionDefs=[],gt.selection.mergedPolygons=Gt.mergedPolygons=[]}function ft(Gt){return Gt._id}function ut(Gt,ne,Ct,gt){if(!Gt.calcdata)return[];var St=[],Nt=ne.map(ft),re=Ct.map(ft),le,we,Ue;for(Ue=0;Ue0,Nt=St?gt[0]:Ct;return ne.selectedpoints?ne.selectedpoints.indexOf(Nt)>-1:!1}function Ht(Gt,ne){var Ct=[],gt,St,Nt,re;for(re=0;re0&&Ct.push(gt);if(Ct.length===1&&(Nt=Ct[0]===ne.searchInfo,Nt&&(St=ne.searchInfo.cd[0].trace,St.selectedpoints.length===ne.pointNumbers.length))){for(re=0;re1||(ne+=gt.selectedpoints.length,ne>1)))return!1;return ne===1}function ge(Gt,ne,Ct){var gt;for(gt=0;gt-1&≠if(!re&&ne){var Vr=He(Gt,!0);if(Vr.length){var vn=Vr[0].xref,Fn=Vr[0].yref;if(vn&&Fn){var Xn=ur(Vr),Pn=Hr([w(Gt,vn,"x"),w(Gt,Fn,"y")]);Pn(an,Xn)}}Gt._fullLayout._noEmitSelectedAtStart?Gt._fullLayout._noEmitSelectedAtStart=!1:dr&&rn(Gt,an),Ar._reselect=!1}if(!re&&Ar._deselect){var Sn=Ar._deselect;le=Sn.xref,we=Sn.yref,ve(le,we,qe)||oe(Gt,le,we,gt),dr&&(an.points.length?rn(Gt,an):Ce(Gt)),Ar._deselect=!1}return{eventData:an,selectionTesters:Ct}}function te(Gt){var ne=Gt.calcdata;if(ne)for(var Ct=0;Ct{$.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]}),Yy=Ft((Q,$)=>{$.exports={axisRefDescription:function(c,g,P){return["If set to a",c,"axis id (e.g. *"+c+"* or","*"+c+"2*), the `"+c+"` position refers to a",c,"coordinate. If set to *paper*, the `"+c+"`","position refers to the distance from the",g,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",g,"("+P+"). If set to a",c,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",g,"of the domain of that axis: e.g.,","*"+c+"2 domain* refers to the domain of the second",c," axis and a",c,"position of 0.5 refers to the","point between the",g,"and the",P,"of the domain of the","second",c,"axis."].join(" ")}}}),xm=Ft((Q,$)=>{var c=G_(),g=ka(),P=ac(),S=mu().templatedArray;Yy(),$.exports=S("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:g({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:c.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:c.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",P.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",P.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",P.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",P.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:g({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}),_m=Ft((Q,$)=>{$.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}),D0=Ft((Q,$)=>{$.exports=function(c){return{valType:"color",editType:"style",anim:!0}}}),tf=Ft((Q,$)=>{var c=dh().axisHoverFormat,{hovertemplateAttrs:g,texttemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=Ac(),e=ka(),r=Ed().dash,a=Ed().pattern,n=Vs(),o=_m(),i=ya().extendFlat,s=D0();function f(v){return{valType:"any",dflt:0,editType:"calc"}}function x(v){return{valType:"any",editType:"calc"}}function y(v){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}$.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:f(),yperiod:f(),xperiod0:x(),yperiod0:x(),xperiodalignment:y(),yperiodalignment:y(),xhoverformat:c("x"),yhoverformat:c("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:P(),texttemplatefallback:S({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:g({},{keys:o.eventDataKeys}),hovertemplatefallback:S(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:i({},r,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:s(!0),fillgradient:i({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:a,marker:i({symbol:{valType:"enumerated",values:n.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:i({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},t("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},t("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:e({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}),Y_=Ft((Q,$)=>{var c=xm(),g=tf().line,P=Ed().dash,S=ya().extendFlat,t=Yc().overrideAll,e=mu().templatedArray;Yy(),$.exports=t(e("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:S({},c.xref,{}),yref:S({},c.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:g.color,width:S({},g.width,{min:1,dflt:1}),dash:S({},P,{dflt:"dot"})}}),"arraydraw","from-root")}),y6=Ft((Q,$)=>{var c=_n(),g=Ls(),P=Ld(),S=Y_(),t=kp();$.exports=function(r,a){P(r,a,{name:"selections",handleItemDefaults:e});for(var n=a.selections,o=0;o{$.exports=function(c,g,P){P("newselection.mode");var S=P("newselection.line.width");S&&(P("newselection.line.color"),P("newselection.line.dash")),P("activeselection.fillcolor"),P("activeselection.opacity")}}),Eg=Ft((Q,$)=>{var c=Qo(),g=_n(),P=Rc();$.exports=function(S){return function(t,e){var r=t[S];if(Array.isArray(r))for(var a=c.subplotsRegistry.cartesian,n=a.idRegex,o=e._subplots,i=o.xaxis,s=o.yaxis,f=o.cartesian,x=e._has("cartesian"),y=0;y{var c=Aw(),g=$_();$.exports={moduleType:"component",name:"selections",layoutAttributes:Y_(),supplyLayoutDefaults:y6(),supplyDrawNewSelectionDefaults:tm(),includeBasePlot:Eg()("selections"),draw:c.draw,drawOne:c.drawOne,reselect:g.reselect,prepSelect:g.prepSelect,clearOutline:g.clearOutline,clearSelectionsCache:g.clearSelectionsCache,selectOnClick:g.selectOnClick}}),C1=Ft((Q,$)=>{var c=En(),g=_n(),P=g.numberFormat,S=eo(),t=D_(),e=Qo(),r=g.strTranslate,a=tc(),n=ui(),o=Vs(),i=Qh(),s=Ls(),f=O0(),x=hp(),y=x0(),v=y.selectingOrDrawing,T=y.freeMode,u=Sf().FROM_TL,b=mv(),_=_0().redrawReglTraces,C=Kc(),M=Rc().getFromId,E=yf().prepSelect,A=yf().clearOutline,h=yf().selectOnClick,p=Wy(),k=ac(),w=k.MINDRAG,R=k.MINZOOM,O=!0;function N(wt,zt,Pt,Wt,Ht,Jt,ge,he){var de=wt._fullLayout._zoomlayer,se=ge+he==="nsew",Tt=(ge+he).length===1,Lt,Mt,te,ve,oe,Te,He,Ge,cr,ur,jr,Hr,br,Kr,rn,Ce,Gt,ne,Ct,gt,St,Nt,re;Pt+=zt.yaxis._shift;function le(){if(Lt=zt.xaxis,Mt=zt.yaxis,cr=Lt._length,ur=Mt._length,He=Lt._offset,Ge=Mt._offset,te={},te[Lt._id]=Lt,ve={},ve[Mt._id]=Mt,ge&&he)for(var Pe=zt.overlays,Rr=0;Rr=0){qr._fullLayout._deactivateShape(qr);return}var $r=qr._fullLayout.clickmode;if(dt(qr),Pe===2&&!Tt&&Oi(),se)$r.indexOf("select")>-1&&h(Rr,qr,oe,Te,zt.id,qe),$r.indexOf("event")>-1&&i.click(qr,Rr,zt.id);else if(Pe===1&&Tt){var Br=ge?Mt:Lt,Gr=ge==="s"||he==="w"?0:1,fn=Br._name+".range["+Gr+"]",an=U(Br,Gr),Ee="left",dr="middle";if(Br.fixedrange)return;ge?(dr=ge==="n"?"top":"bottom",Br.side==="right"&&(Ee="right")):he==="e"&&(Ee="right"),qr._context.showAxisRangeEntryBoxes&&c.select(Ue).call(a.makeEditable,{gd:qr,immediate:!0,background:qr._fullLayout.paper_bgcolor,text:String(an),fill:Br.tickfont?Br.tickfont.color:"#444",horizontalAlign:Ee,verticalAlign:dr}).on("edit",function(Vr){var vn=Br.d2r(Vr);vn!==void 0&&e.call("_guiRelayout",qr,fn,vn)})}}x.init(qe);var Tr,pr,Jr,Vn,Hn,Kn,Ci,ii,qn,aa;function Vi(Pe,Rr,qr){var $r=Ue.getBoundingClientRect();Tr=Rr-$r.left,pr=qr-$r.top,wt._fullLayout._calcInverseTransform(wt);var Br=g.apply3DTransform(wt._fullLayout._invTransform)(Tr,pr);Tr=Br[0],pr=Br[1],Jr={l:Tr,r:Tr,w:0,t:pr,b:pr,h:0},Vn=wt._hmpixcount?wt._hmlumcount/wt._hmpixcount:S(wt._fullLayout.plot_bgcolor).getLuminance(),Hn="M0,0H"+cr+"V"+ur+"H0V0",Kn=!1,Ci="xy",aa=!1,ii=yt(de,Vn,He,Ge,Hn),qn=pt(de,He,Ge)}function We(Pe,Rr){if(wt._transitioningWithDuration)return!1;var qr=Math.max(0,Math.min(cr,Nt*Pe+Tr)),$r=Math.max(0,Math.min(ur,re*Rr+pr)),Br=Math.abs(qr-Tr),Gr=Math.abs($r-pr);Jr.l=Math.min(Tr,qr),Jr.r=Math.max(Tr,qr),Jr.t=Math.min(pr,$r),Jr.b=Math.max(pr,$r);function fn(){Ci="",Jr.r=Jr.l,Jr.t=Jr.b,qn.attr("d","M0,0Z")}if(jr.isSubplotConstrained)Br>R||Gr>R?(Ci="xy",Br/cr>Gr/ur?(Gr=Br*ur/cr,pr>$r?Jr.t=pr-Gr:Jr.b=pr+Gr):(Br=Gr*cr/ur,Tr>qr?Jr.l=Tr-Br:Jr.r=Tr+Br),qn.attr("d",it(Jr))):fn();else if(Hr.isSubplotConstrained)if(Br>R||Gr>R){Ci="xy";var an=Math.min(Jr.l/cr,(ur-Jr.b)/ur),Ee=Math.max(Jr.r/cr,(ur-Jr.t)/ur);Jr.l=an*cr,Jr.r=Ee*cr,Jr.b=(1-an)*ur,Jr.t=(1-Ee)*ur,qn.attr("d",it(Jr))}else fn();else!Kr||Gr0){var Vr;if(Hr.isSubplotConstrained||!br&&Kr.length===1){for(Vr=0;Vr1&&(fn.maxallowed!==void 0&&Ce===(fn.range[0]1&&(an.maxallowed!==void 0&&Gt===(an.range[0]=0?Math.min(wt,.9):1/(1/Math.max(wt,-.3)+3.222))}function lt(wt,zt,Pt){return wt?wt==="nsew"?Pt?"":zt==="pan"?"move":"crosshair":wt.toLowerCase()+"-resize":"pointer"}function yt(wt,zt,Pt,Wt,Ht){return wt.append("path").attr("class","zoombox").style({fill:zt>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Pt,Wt)).attr("d",Ht+"Z")}function pt(wt,zt,Pt){return wt.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(zt,Pt)).attr("d","M0,0Z")}function st(wt,zt,Pt,Wt,Ht,Jt){wt.attr("d",Wt+"M"+Pt.l+","+Pt.t+"v"+Pt.h+"h"+Pt.w+"v-"+Pt.h+"h-"+Pt.w+"Z"),tt(wt,zt,Ht,Jt)}function tt(wt,zt,Pt,Wt){Pt||(wt.transition().style("fill",Wt>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),zt.transition().style("opacity",1).duration(200))}function dt(wt){c.select(wt).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function rt(wt){O&&wt.data&&wt._context.showTips&&(g.notifier(g._(wt,"Double-click to zoom back out"),"long"),O=!1)}function at(wt,zt){return"M"+(wt.l-.5)+","+(zt-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(wt.r+.5)+","+(zt-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function vt(wt,zt){return"M"+(zt-R-.5)+","+(wt.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(zt-R-.5)+","+(wt.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function it(wt){var zt=Math.floor(Math.min(wt.b-wt.t,wt.r-wt.l,R)/2);return"M"+(wt.l-3.5)+","+(wt.t-.5+zt)+"h3v"+-zt+"h"+zt+"v-3h-"+(zt+3)+"ZM"+(wt.r+3.5)+","+(wt.t-.5+zt)+"h-3v"+-zt+"h"+-zt+"v-3h"+(zt+3)+"ZM"+(wt.r+3.5)+","+(wt.b+.5-zt)+"h-3v"+zt+"h"+-zt+"v3h"+(zt+3)+"ZM"+(wt.l-3.5)+","+(wt.b+.5-zt)+"h3v"+zt+"h"+zt+"v3h-"+(zt+3)+"Z"}function Y(wt,zt,Pt,Wt,Ht){for(var Jt=!1,ge={},he={},de,se,Tt,Lt,Mt=(Ht||{}).xaHash,te=(Ht||{}).yaHash,ve=0;ve{var $=En(),c=Qh(),g=hp(),P=O0(),S=C1().makeDragBox,t=ac().DRAGGERSIZE;Q.initInteractions=function(e){var r=e._fullLayout;if(e._context.staticPlot){$.select(e).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var a=Object.keys(r._plots||{}).sort(function(o,i){if((r._plots[o].mainplot&&!0)===(r._plots[i].mainplot&&!0)){var s=o.split("y"),f=i.split("y");return s[0]===f[0]?Number(s[1]||1)-Number(f[1]||1):Number(s[0]||1)-Number(f[0]||1)}return r._plots[o].mainplot?1:-1});a.forEach(function(o){var i=r._plots[o],s=i.xaxis,f=i.yaxis;if(!i.mainplot){var x=S(e,i,s._offset,f._offset,s._length,f._length,"ns","ew");x.onmousemove=function(T){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===o&&e._fullLayout._plots[o]&&c.hover(e,T,o)},c.hover(e,T,o),e._fullLayout._lasthover=x,e._fullLayout._hoversubplot=o},x.onmouseout=function(T){e._dragging||(e._fullLayout._hoversubplot=null,g.unhover(e,T))},e._context.showAxisDragHandles&&(S(e,i,s._offset-t,f._offset-t,t,t,"n","w"),S(e,i,s._offset+s._length,f._offset-t,t,t,"n","e"),S(e,i,s._offset-t,f._offset+f._length,t,t,"s","w"),S(e,i,s._offset+s._length,f._offset+f._length,t,t,"s","e"))}if(e._context.showAxisDragHandles){if(o===s._mainSubplot){var y=s._mainLinePosition;s.side==="top"&&(y-=t),S(e,i,s._offset+s._length*.1,y,s._length*.8,t,"","ew"),S(e,i,s._offset,y,s._length*.1,t,"","w"),S(e,i,s._offset+s._length*.9,y,s._length*.1,t,"","e")}if(o===f._mainSubplot){var v=f._mainLinePosition;f.side!=="right"&&(v-=t),S(e,i,v,f._offset+f._length*.1,t,f._length*.8,"ns",""),S(e,i,v,f._offset+f._length*.9,t,f._length*.1,"s",""),S(e,i,v,f._offset,t,f._length*.1,"n","")}}});var n=r._hoverlayer.node();n.onmousemove=function(o){o.target=e._fullLayout._lasthover,c.hover(e,o,r._hoversubplot)},n.onclick=function(o){o.target=e._fullLayout._lasthover,c.click(e,o)},n.onmousedown=function(o){e._fullLayout._lasthover.onmousedown(o)},Q.updateFx(e)}},Q.updateFx=function(e){var r=e._fullLayout,a=r.dragmode==="pan"?"move":"crosshair";P(r._draggers,a)}}),Ew=Ft((Q,$)=>{var c=Qo();$.exports=function(g){for(var P=c.layoutArrayContainers,S=c.layoutArrayRegexes,t=g.split("[")[0],e,r,a=0;a{var $=Ei(),c=Uo(),g=es(),P=L_().sorterAsc,S=Qo();Q.containerArrayMatch=Ew();var t=Q.isAddVal=function(r){return r==="add"||$(r)},e=Q.isRemoveVal=function(r){return r===null||r==="remove"};Q.applyContainerArrayChanges=function(r,a,n,o,i){var s=a.astr,f=S.getComponentMethod(s,"supplyLayoutDefaults"),x=S.getComponentMethod(s,"draw"),y=S.getComponentMethod(s,"drawOne"),v=o.replot||o.recalc||f===c||x===c,T=r.layout,u=r._fullLayout;if(n[""]){Object.keys(n).length>1&&g.warn("Full array edits are incompatible with other edits",s);var b=n[""][""];if(e(b))a.set(null);else if(Array.isArray(b))a.set(b);else return g.warn("Unrecognized full array edit value",s,b),!0;return v?!1:(f(T,u),x(r),!0)}var _=Object.keys(n).map(Number).sort(P),C=a.get(),M=C||[],E=i(u,s).get(),A=[],h=-1,p=M.length,k,w,R,O,N,V,H,F;for(k=0;k<_.length;k++){if(R=_[k],O=n[R],N=Object.keys(O),V=O[""],H=t(V),R<0||R>M.length-(H?0:1)){g.warn("index out of range",s,R);continue}if(V!==void 0)N.length>1&&g.warn("Insertion & removal are incompatible with edits to the same index.",s,R),e(V)?A.push(R):H?(V==="add"&&(V={}),M.splice(R,0,V),E&&E.splice(R,0,{})):g.warn("Unrecognized full object edit value",s,R,V),h===-1&&(h=R);else for(w=0;w=0;k--)M.splice(A[k],1),E&&E.splice(A[k],1);if(M.length?C||a.set(M):a.set(null),v)return!1;if(f(T,u),y!==c){var U;if(h===-1)U=_;else{for(p=Math.max(M.length,p),U=[],k=0;k<_.length&&(R=_[k],!(R>=h));k++)U.push(R);for(k=h;k{var $=ia(),c=Qo(),g=_n(),P=Kc(),S=Rc(),t=ui(),e=S.cleanId,r=S.getFromTrace,a=c.traceIs,n=["x","y","z"];Q.clearPromiseQueue=function(u){Array.isArray(u._promises)&&u._promises.length>0&&g.log("Clearing previous rejected promises from queue."),u._promises=[]},Q.cleanLayout=function(u){var b;u||(u={}),u.xaxis1&&(u.xaxis||(u.xaxis=u.xaxis1),delete u.xaxis1),u.yaxis1&&(u.yaxis||(u.yaxis=u.yaxis1),delete u.yaxis1),u.scene1&&(u.scene||(u.scene=u.scene1),delete u.scene1);var _=(P.subplotsRegistry.cartesian||{}).attrRegex;(P.subplotsRegistry.polar||{}).attrRegex,(P.subplotsRegistry.ternary||{}).attrRegex,(P.subplotsRegistry.gl3d||{}).attrRegex;var C=Object.keys(u);for(b=0;b3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),u.dragmode==="rotate"&&(u.dragmode="orbit"),t.clean(u),u.template&&u.template.layout&&Q.cleanLayout(u.template.layout),u};function o(u,b){var _=u[b],C=b.charAt(0);_&&_!=="paper"&&(u[b]=e(_,C,!0))}Q.cleanData=function(u){for(var b=0;b0)return u.substr(0,b)}Q.hasParent=function(u,b){for(var _=v(b);_;){if(_ in u)return!0;_=v(_)}return!1},Q.clearAxisTypes=function(u,b,_){for(var C=0;C{let _=(...C)=>C.every(M=>g.isPlainObject(M))||C.every(M=>Array.isArray(M));if([u,b].every(C=>Array.isArray(C))){if(u.length!==b.length)return!1;for(let C=0;Cg.isPlainObject(C))){if(Object.keys(u).length!==Object.keys(b).length)return!1;for(let C in u){if(C.startsWith("_"))continue;let M=u[C],E=b[C];if(M!==E&&!(_(M,E)&&T(M,E)))return!1}return!0}return!1};Q.collectionsAreEqual=T}),K_=Ft(Q=>{var $=En(),c=ia(),g=Nf(),P=_n(),S=P.nestedProperty,t=Fm(),e=v0(),r=Qo(),a=Rm(),n=Kc(),o=Ls(),i=O_(),s=Cd(),f=Vs(),x=ui(),y=Sw().initInteractions,v=Bp(),T=yf().clearOutline,u=gs().dfltConfig,b=x6(),_=L1(),C=_0(),M=Yc(),E=ac().AX_NAME_PATTERN,A=0,h=5;function p(Ct,gt,St,Nt){var re;if(Ct=P.getGraphDiv(Ct),t.init(Ct),P.isPlainObject(gt)){var le=gt;gt=le.data,St=le.layout,Nt=le.config,re=le.frames}var we=t.triggerHandler(Ct,"plotly_beforeplot",[gt,St,Nt]);if(we===!1)return Promise.reject();!gt&&!St&&!P.isPlotDiv(Ct)&&P.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Ct);function Ue(){if(re)return Q.addFrames(Ct,re)}N(Ct,Nt),St||(St={}),$.select(Ct).classed("js-plotly-plot",!0),f.makeTester(),Array.isArray(Ct._promises)||(Ct._promises=[]);var qe=(Ct.data||[]).length===0&&Array.isArray(gt);Array.isArray(gt)&&(_.cleanData(gt),qe?Ct.data=gt:Ct.data.push.apply(Ct.data,gt),Ct.empty=!1),(!Ct.layout||qe)&&(Ct.layout=_.cleanLayout(St)),n.supplyDefaults(Ct);var or=Ct._fullLayout,Ar=or._has("cartesian");or._replotting=!0,(qe||or._shouldCreateBgLayer)&&(ne(Ct),or._shouldCreateBgLayer&&delete or._shouldCreateBgLayer),f.initGradients(Ct),f.initPatterns(Ct),qe&&o.saveShowSpikeInitial(Ct);var Tr=!Ct.calcdata||Ct.calcdata.length!==(Ct._fullData||[]).length;Tr&&n.doCalcdata(Ct);for(var pr=0;pr=Ct.data.length||re<-Ct.data.length)throw new Error(St+" must be valid indices for gd.data.");if(gt.indexOf(re,Nt+1)>-1||re>=0&>.indexOf(-Ct.data.length+re)>-1||re<0&>.indexOf(Ct.data.length+re)>-1)throw new Error("each index in "+St+" must be unique.")}}function W(Ct,gt,St){if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"currentIndices"),typeof St<"u"&&!Array.isArray(St)&&(St=[St]),typeof St<"u"&&U(Ct,St,"newIndices"),typeof St<"u"&>.length!==St.length)throw new Error("current and new indices must be of equal length.")}function q(Ct,gt,St){var Nt,re;if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("traces must be defined.");for(Array.isArray(gt)||(gt=[gt]),Nt=0;Nt"u")throw new Error("indices must be an integer or array of integers");U(Ct,St,"indices");for(var le in gt){if(!Array.isArray(gt[le])||gt[le].length!==St.length)throw new Error("attribute "+le+" must be an array of length equal to indices array length");if(re&&(!(le in Nt)||!Array.isArray(Nt[le])||Nt[le].length!==gt[le].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function lt(Ct,gt,St,Nt){var re=P.isPlainObject(Nt),le=[],we,Ue,qe,or,Ar;Array.isArray(St)||(St=[St]),St=F(St,Ct.data.length-1);for(var Tr in gt)for(var pr=0;pr=0&&Ar=0&&Ar"u")return or=Q.redraw(Ct),e.add(Ct,re,we,le,Ue),or;Array.isArray(St)||(St=[St]);try{W(Ct,Nt,St)}catch(Ar){throw Ct.data.splice(Ct.data.length-gt.length,gt.length),Ar}return e.startSequence(Ct),e.add(Ct,re,we,le,Ue),or=Q.moveTraces(Ct,Nt,St),e.stopSequence(Ct),or}function rt(Ct,gt){Ct=P.getGraphDiv(Ct);var St=[],Nt=Q.addTraces,re=rt,le=[Ct,St,gt],we=[Ct,gt],Ue,qe;if(typeof gt>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"indices"),gt=F(gt,Ct.data.length-1),gt.sort(P.sorterDes),Ue=0;Ue"u")for(St=[],or=0;or0&&typeof fr.parts[Cn]!="string";)Cn--;var bn=fr.parts[Cn],An=fr.parts[Cn-1]+"."+bn,ci=fr.parts.slice(0,Cn).join("."),xi=S(Ct.layout,ci).get(),Li=S(Nt,ci).get(),Oi=fr.get();if(_r!==void 0){Ci[rr]=_r,ii[rr]=bn==="reverse"?_r:it(Oi);var Zi=a.getLayoutValObject(Nt,fr.parts);if(Zi&&Zi.impliedEdits&&_r!==null)for(var li in Zi.impliedEdits)qn(P.relativeAttr(rr,li),Zi.impliedEdits[li]);if(["width","height"].indexOf(rr)!==-1)if(_r){qn("autosize",null);var La=rr==="height"?"width":"height";qn(La,Nt[La])}else Nt[rr]=Ct._initialAutoSize[rr];else if(rr==="autosize")qn("width",_r?null:Nt.width),qn("height",_r?null:Nt.height);else if(An.match(Ht))We(An),S(Nt,ci+"._inputRange").set(null);else if(An.match(Jt)){We(An),S(Nt,ci+"._inputRange").set(null);var Wa=S(Nt,ci).get();Wa._inputDomain&&(Wa._input.domain=Wa._inputDomain.slice())}else An.match(ge)&&S(Nt,ci+"._inputDomain").set(null);if(bn==="type"){Vi=xi;var ze=Li.type==="linear"&&_r==="log",Pe=Li.type==="log"&&_r==="linear";if(ze||Pe){if(!Vi||!Vi.range)qn(ci+".autorange",!0);else if(Li.autorange)ze&&(Vi.range=Vi.range[1]>Vi.range[0]?[1,2]:[2,1]);else{var Rr=Vi.range[0],qr=Vi.range[1];ze?(Rr<=0&&qr<=0&&qn(ci+".autorange",!0),Rr<=0?Rr=qr/1e6:qr<=0&&(qr=Rr/1e6),qn(ci+".range[0]",Math.log(Rr)/Math.LN10),qn(ci+".range[1]",Math.log(qr)/Math.LN10)):(qn(ci+".range[0]",Math.pow(10,Rr)),qn(ci+".range[1]",Math.pow(10,qr)))}Array.isArray(Nt._subplots.polar)&&Nt._subplots.polar.length&&Nt[fr.parts[0]]&&fr.parts[1]==="radialaxis"&&delete Nt[fr.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Ct,Li,_r,qn),r.getComponentMethod("images","convertCoords")(Ct,Li,_r,qn)}else qn(ci+".autorange",!0),qn(ci+".range",null);S(Nt,ci+"._inputRange").set(null)}else if(bn.match(E)){var $r=S(Nt,rr).get(),Br=(_r||{}).type;(!Br||Br==="-")&&(Br="linear"),r.getComponentMethod("annotations","convertCoords")(Ct,$r,Br,qn),r.getComponentMethod("images","convertCoords")(Ct,$r,Br,qn)}var Gr=b.containerArrayMatch(rr);if(Gr){Ar=Gr.array,Tr=Gr.index;var fn=Gr.property,an=Zi||{editType:"calc"};Tr!==""&&fn===""&&(b.isAddVal(_r)?ii[rr]=null:b.isRemoveVal(_r)?ii[rr]=(S(St,Ar).get()||[])[Tr]:P.warn("unrecognized full object value",gt)),M.update(Kn,an),or[Ar]||(or[Ar]={});var Ee=or[Ar][Tr];Ee||(Ee=or[Ar][Tr]={}),Ee[fn]=_r,delete gt[rr]}else bn==="reverse"?(xi.range?xi.range.reverse():(qn(ci+".autorange",!0),xi.range=[1,0]),Li.autorange?Kn.calc=!0:Kn.plot=!0):(rr==="dragmode"&&(_r===!1&&Oi!==!1||_r!==!1&&Oi===!1)||Nt._has("scatter-like")&&Nt._has("regl")&&rr==="dragmode"&&(_r==="lasso"||_r==="select")&&!(Oi==="lasso"||Oi==="select")?Kn.plot=!0:Zi?M.update(Kn,Zi):Kn.calc=!0,fr.set(_r))}}for(Ar in or){var dr=b.applyContainerArrayChanges(Ct,le(St,Ar),or[Ar],Kn,le);dr||(Kn.plot=!0)}for(var Vr in aa){Vi=o.getFromId(Ct,Vr);var vn=Vi&&Vi._constraintGroup;if(vn){Kn.calc=!0;for(var Fn in vn)aa[Fn]||(o.getFromId(Ct,Fn)._constraintShrinkable=!0)}}(de(Ct)||gt.height||gt.width)&&(Kn.plot=!0);var Xn=Nt.shapes;for(Tr=0;Tr1;)if(Nt.pop(),St=S(gt,Nt.join(".")+".uirevision").get(),St!==void 0)return St;return gt.uirevision}function oe(Ct,gt){for(var St=0;St[ci,Ct._ev.listeners(ci)]);le=Q.newPlot(Ct,gt,St,Nt).then(()=>{for(let[ci,xi]of An)xi.forEach(Li=>Ct.on(ci,Li));return Q.react(Ct,gt,St,Nt)})}else{Ct.data=gt||[],_.cleanData(Ct.data),Ct.layout=St||{},_.cleanLayout(Ct.layout),Ge(Ct.data,Ct.layout,Ue,qe),n.supplyDefaults(Ct,{skipUpdateCalc:!0});var Tr=Ct._fullData,pr=Ct._fullLayout,Jr=pr.datarevision===void 0,Vn=pr.transition,Hn=jr(Ct,qe,pr,Jr,Vn),Kn=Hn.newDataRevision,Ci=ur(Ct,Ue,Tr,Jr,Vn,Kn);if(de(Ct)&&(Hn.layoutReplot=!0),Ci.calc||Hn.calc){Ct.calcdata=void 0;for(var ii=Object.getOwnPropertyNames(pr),qn=0;qn(Ar||Ct.emit("plotly_react",{config:Nt,data:gt,layout:St}),Ct))}function ur(Ct,gt,St,Nt,re,le){var we=gt.length===St.length;if(!re&&!we)return{fullReplot:!0,calc:!0};var Ue=M.traceFlags();Ue.arrays={},Ue.nChanges=0,Ue.nChangesAnim=0;var qe,or;function Ar(Jr){var Vn=a.getTraceValObject(or,Jr);return!or._module.animatable&&Vn.anim&&(Vn.anim=!1),Vn}var Tr={getValObject:Ar,flags:Ue,immutable:Nt,transition:re,newDataRevision:le,gd:Ct},pr={};for(qe=0;qe=re.length?re[0]:re[or]:re}function Ue(or){return Array.isArray(le)?or>=le.length?le[0]:le[or]:le}function qe(or,Ar){var Tr=0;return function(){if(or&&++Tr===Ar)return or()}}return new Promise(function(or,Ar){function Tr(){if(Nt._frameQueue.length!==0){for(;Nt._frameQueue.length;){var bn=Nt._frameQueue.pop();bn.onInterrupt&&bn.onInterrupt()}Ct.emit("plotly_animationinterrupted",[])}}function pr(bn){if(bn.length!==0){for(var An=0;AnNt._timeToNext&&Vn()};bn()}var Kn=0;function Ci(bn){return Array.isArray(re)?Kn>=re.length?bn.transitionOpts=re[Kn]:bn.transitionOpts=re[0]:bn.transitionOpts=re,Kn++,bn}var ii,qn,aa=[],Vi=gt==null,We=Array.isArray(gt),rr=!Vi&&!We&&P.isPlainObject(gt);if(rr)aa.push({type:"object",data:Ci(P.extendFlat({},gt))});else if(Vi||["string","number"].indexOf(typeof gt)!==-1)for(ii=0;ii0&&QrQr)&&Cn.push(qn);aa=Cn}}aa.length>0?pr(aa):(Ct.emit("plotly_animated"),or())})}function Kr(Ct,gt,St){if(Ct=P.getGraphDiv(Ct),gt==null)return Promise.resolve();if(!P.isPlotDiv(Ct))throw new Error("This element is not a Plotly plot: "+Ct+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Nt,re,le,we,Ue=Ct._transitionData._frames,qe=Ct._transitionData._frameHash;if(!Array.isArray(gt))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+gt);var or=Ue.length+gt.length*2,Ar=[],Tr={};for(Nt=gt.length-1;Nt>=0;Nt--)if(P.isPlainObject(gt[Nt])){var pr=gt[Nt].name,Jr=(qe[pr]||Tr[pr]||{}).name,Vn=gt[Nt].name,Hn=qe[Jr]||Tr[Jr];Jr&&Vn&&typeof Vn=="number"&&Hn&&Afr.index?-1:rr.index=0;Nt--){if(re=Ar[Nt].frame,typeof re.name=="number"&&P.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!re.name)for(;qe[re.name="frame "+Ct._transitionData._counter++];);if(qe[re.name]){for(le=0;le=0;St--)Nt=gt[St],le.push({type:"delete",index:Nt}),we.unshift({type:"insert",index:Nt,value:re[Nt]});var Ue=n.modifyFrames,qe=n.modifyFrames,or=[Ct,we],Ar=[Ct,le];return e&&e.add(Ct,Ue,or,qe,Ar),n.modifyFrames(Ct,le)}function Ce(Ct){Ct=P.getGraphDiv(Ct);var gt=Ct._fullLayout||{},St=Ct._fullData||[];return n.cleanPlot([],{},St,gt),n.purge(Ct),t.purge(Ct),gt._container&>._container.remove(),delete Ct._context,Ct}function Gt(Ct){var gt=Ct._fullLayout,St=Ct.getBoundingClientRect();if(!P.equalDomRects(St,gt._lastBBox)){var Nt=gt._invTransform=P.inverseTransformMatrix(P.getFullTransformMatrix(Ct));gt._invScaleX=Math.sqrt(Nt[0][0]*Nt[0][0]+Nt[0][1]*Nt[0][1]+Nt[0][2]*Nt[0][2]),gt._invScaleY=Math.sqrt(Nt[1][0]*Nt[1][0]+Nt[1][1]*Nt[1][1]+Nt[1][2]*Nt[1][2]),gt._lastBBox=St}}function ne(Ct){var gt=$.select(Ct),St=Ct._fullLayout;if(St._calcInverseTransform=Gt,St._calcInverseTransform(Ct),St._container=gt.selectAll(".plot-container").data([0]),St._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),St._paperdiv=St._container.selectAll(".svg-container").data([0]),St._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),St._glcontainer=St._paperdiv.selectAll(".gl-container").data([{}]),St._glcontainer.enter().append("div").classed("gl-container",!0),St._paperdiv.selectAll(".main-svg").remove(),St._paperdiv.select(".modebar-container").remove(),St._paper=St._paperdiv.insert("svg",":first-child").classed("main-svg",!0),St._toppaper=St._paperdiv.append("svg").classed("main-svg",!0),St._modebardiv=St._paperdiv.append("div"),delete St._modeBar,St._hoverpaper=St._paperdiv.append("svg").classed("main-svg",!0),!St._uid){var Nt={};$.selectAll("defs").each(function(){this.id&&(Nt[this.id.split("-")[1]]=1)}),St._uid=P.randstr(Nt)}St._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),St._defs=St._paper.append("defs").attr("id","defs-"+St._uid),St._clips=St._defs.append("g").classed("clips",!0),St._topdefs=St._toppaper.append("defs").attr("id","topdefs-"+St._uid),St._topclips=St._topdefs.append("g").classed("clips",!0),St._bgLayer=St._paper.append("g").classed("bglayer",!0),St._draggers=St._paper.append("g").classed("draglayer",!0);var re=St._paper.append("g").classed("layer-below",!0);St._imageLowerLayer=re.append("g").classed("imagelayer",!0),St._shapeLowerLayer=re.append("g").classed("shapelayer",!0),St._cartesianlayer=St._paper.append("g").classed("cartesianlayer",!0),St._polarlayer=St._paper.append("g").classed("polarlayer",!0),St._smithlayer=St._paper.append("g").classed("smithlayer",!0),St._ternarylayer=St._paper.append("g").classed("ternarylayer",!0),St._geolayer=St._paper.append("g").classed("geolayer",!0),St._funnelarealayer=St._paper.append("g").classed("funnelarealayer",!0),St._pielayer=St._paper.append("g").classed("pielayer",!0),St._iciclelayer=St._paper.append("g").classed("iciclelayer",!0),St._treemaplayer=St._paper.append("g").classed("treemaplayer",!0),St._sunburstlayer=St._paper.append("g").classed("sunburstlayer",!0),St._indicatorlayer=St._toppaper.append("g").classed("indicatorlayer",!0),St._glimages=St._paper.append("g").classed("glimages",!0);var le=St._toppaper.append("g").classed("layer-above",!0);St._imageUpperLayer=le.append("g").classed("imagelayer",!0),St._shapeUpperLayer=le.append("g").classed("shapelayer",!0),St._selectionLayer=St._toppaper.append("g").classed("selectionlayer",!0),St._infolayer=St._toppaper.append("g").classed("infolayer",!0),St._menulayer=St._toppaper.append("g").classed("menulayer",!0),St._zoomlayer=St._toppaper.append("g").classed("zoomlayer",!0),St._hoverlayer=St._hoverpaper.append("g").classed("hoverlayer",!0),St._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ct.emit("plotly_framework")}Q.animate=br,Q.addFrames=Kr,Q.deleteFrames=rn,Q.addTraces=dt,Q.deleteTraces=rt,Q.extendTraces=st,Q.moveTraces=at,Q.prependTraces=tt,Q.newPlot=H,Q._doPlot=p,Q.purge=Ce,Q.react=cr,Q.redraw=V,Q.relayout=zt,Q.restyle=vt,Q.setPlotConfig=w,Q.update=se,Q._guiRelayout=Tt(zt),Q._guiRestyle=Tt(vt),Q._guiUpdate=Tt(se),Q._storeDirectGUIEdit=ut}),u0=Ft(Q=>{var $=Qo();Q.getDelay=function(P){return P._has&&(P._has("gl3d")||P._has("mapbox")||P._has("map"))?500:0},Q.getRedrawFunc=function(P){return function(){$.getComponentMethod("colorbar","draw")(P)}},Q.encodeSVG=function(P){return"data:image/svg+xml,"+encodeURIComponent(P)},Q.encodeJSON=function(P){return"data:application/json,"+encodeURIComponent(P)};var c=window.URL||window.webkitURL;Q.createObjectURL=function(P){return c.createObjectURL(P)},Q.revokeObjectURL=function(P){return c.revokeObjectURL(P)},Q.createBlob=function(P,S){if(S==="svg")return new window.Blob([P],{type:"image/svg+xml;charset=utf-8"});if(S==="full-json")return new window.Blob([P],{type:"application/json;charset=utf-8"});var t=g(window.atob(P));return new window.Blob([t],{type:"image/"+S})},Q.octetStream=function(P){document.location.href="data:application/octet-stream"+P};function g(P){for(var S=P.length,t=new ArrayBuffer(S),e=new Uint8Array(t),r=0;r{var c=En();_n();var g=Vs(),P=ui();Bp();var S=/"/g,t="TOBESTRIPPED",e=new RegExp('("'+t+")|("+t+'")',"g");function r(n){var o=c.select("body").append("div").style({display:"none"}).html(""),i=n.replace(/(&[^;]*;)/gi,function(s){return s==="<"?"<":s==="&rt;"?">":s.indexOf("<")!==-1||s.indexOf(">")!==-1?"":o.html(s).text()});return o.remove(),i}function a(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}$.exports=function(n,o,i){var s=n._fullLayout,f=s._paper,x=s._toppaper,y=s.width,v=s.height,T;f.insert("rect",":first-child").call(g.setRect,0,0,y,v).call(P.fill,s.paper_bgcolor);var u=s._basePlotModules||[];for(T=0;T{var c=_n(),g=Dm().EventEmitter,P=u0();function S(t){var e=t.emitter||new g,r=new Promise(function(a,n){var o=window.Image,i=t.svg,s=t.format||"png",f=t.canvas,x=t.scale||1,y=t.width||300,v=t.height||150,T=x*y,u=x*v,b=f.getContext("2d",{willReadFrequently:!0}),_=new o,C,M;s==="svg"||c.isSafari()?M=P.encodeSVG(i):(C=P.createBlob(i,"svg"),M=P.createObjectURL(C)),f.width=T,f.height=u,_.onload=function(){var E;switch(C=null,P.revokeObjectURL(M),s!=="svg"&&b.drawImage(_,0,0,T,u),s){case"jpeg":E=f.toDataURL("image/jpeg");break;case"png":E=f.toDataURL("image/png");break;case"webp":E=f.toDataURL("image/webp");break;case"svg":E=M;break;default:var A="Image format is not jpeg, png, svg or webp.";if(n(new Error(A)),!t.promise)return e.emit("error",A)}a(E),t.promise||e.emit("success",E)},_.onerror=function(E){if(C=null,P.revokeObjectURL(M),n(E),!t.promise)return e.emit("error",E)},_.src=M});return t.promise?r:e}$.exports=S}),Cw=Ft((Q,$)=>{var c=ia(),g=K_(),P=Kc(),S=_n(),t=u0(),e=Ky(),r=Xy(),a=Qi().version,n={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function o(i,s){s=s||{};var f,x,y,v;S.isPlainObject(i)?(f=i.data||[],x=i.layout||{},y=i.config||{},v={}):(i=S.getGraphDiv(i),f=S.extendDeep([],i.data),x=S.extendDeep({},i.layout),y=i._context,v=i._fullLayout||{});function T(H){return!(H in s)||S.validate(s[H],n[H])}if(!T("width")&&s.width!==null||!T("height")&&s.height!==null)throw new Error("Height and width should be pixel values.");if(!T("format"))throw new Error("Export format is not "+S.join2(n.format.values,", "," or ")+".");var u={};function b(H,F){return S.coerce(s,u,n,H,F)}var _=b("format"),C=b("width"),M=b("height"),E=b("scale"),A=b("setBackground"),h=b("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var k=S.extendFlat({},x);C?k.width=C:s.width===null&&c(v.width)&&(k.width=v.width),M?k.height=M:s.height===null&&c(v.height)&&(k.height=v.height);var w=S.extendFlat({},y,{_exportedPlot:!0,staticPlot:!0,setBackground:A}),R=t.getRedrawFunc(p);function O(){return new Promise(function(H){setTimeout(H,t.getDelay(p._fullLayout))})}function N(){return new Promise(function(H,F){var U=e(p,_,E),W=p._fullLayout.width,q=p._fullLayout.height;function X(){g.purge(p),document.body.removeChild(p)}if(_==="full-json"){var lt=P.graphJson(p,!1,"keepdata","object",!0,!0);return lt.version=a,lt=JSON.stringify(lt),X(),H(h?lt:t.encodeJSON(lt))}if(X(),_==="svg")return H(h?U:t.encodeSVG(U));var yt=document.createElement("canvas");yt.id=S.randstr(),r({format:_,width:W,height:q,scale:E,canvas:yt,svg:U,promise:!0}).then(H).catch(F)})}function V(H){return h?H.replace(t.IMAGE_URL_PREFIX,""):H}return new Promise(function(H,F){g.newPlot(p,f,k,w).then(R).then(O).then(N).then(function(U){H(V(U))}).catch(function(U){F(U)})})}$.exports=o}),bm=Ft((Q,$)=>{var c=_n(),g=Kc(),P=Rm(),S=gs().dfltConfig,t=c.isPlainObject,e=Array.isArray,r=c.isArrayOrTypedArray;$.exports=function(u,b){u===void 0&&(u=[]),b===void 0&&(b={});var _=P.get(),C=[],M={_context:c.extendFlat({},S)},E,A;e(u)?(M.data=c.extendDeep([],u),E=u):(M.data=[],E=[],C.push(s("array","data"))),t(b)?(M.layout=c.extendDeep({},b),A=b):(M.layout={},A={},arguments.length>1&&C.push(s("object","layout"))),g.supplyDefaults(M);for(var h=M._fullData,p=E.length,k=0;kR.length&&C.push(s("unused",M,k.concat(R.length)));var U=R.length,W=Array.isArray(F);W&&(U=Math.min(U,F.length));var q,X,lt,yt,pt;if(O.dimensions===2)for(X=0;XR[X].length&&C.push(s("unused",M,k.concat(X,R[X].length)));var st=R[X].length;for(q=0;q<(W?Math.min(st,F[X].length):st);q++)lt=W?F[X][q]:F,yt=w[X][q],pt=R[X][q],c.validate(yt,lt)?pt!==yt&&pt!==+yt&&C.push(s("dynamic",M,k.concat(X,q),yt,pt)):C.push(s("value",M,k.concat(X,q),yt))}else C.push(s("array",M,k.concat(X),w[X]));else for(X=0;X{var c=_n(),g=u0();function P(S,t,e){var r=document.createElement("a"),a="download"in r,n=new Promise(function(o,i){var s,f;if(a)return s=g.createBlob(S,e),f=g.createObjectURL(s),r.href=f,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),g.revokeObjectURL(f),s=null,o(t);if(c.isSafari()){var x=e==="svg"?",":";base64,";return g.octetStream(x+encodeURIComponent(S)),o(t)}i(new Error("download error"))});return n}$.exports=P}),X_=Ft((Q,$)=>{var c=_n(),g=Cw(),P=Lw();u0();function S(t,e){var r;return c.isPlainObject(t)||(r=c.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,n){r&&r._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var o=g(t,e),i=e.filename||t.fn||"newplot";i+="."+e.format.replace("-","."),o.then(function(s){return r&&(r._snapshotInProgress=!1),P(s,i,e.format)}).then(function(s){a(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),n(s)})})}$.exports=S}),P1=Ft(Q=>{var $=_n(),c=$.isPlainObject,g=Rm(),P=Kc(),S=Yo(),t=mu(),e=gs().dfltConfig;Q.makeTemplate=function(y){y=$.isPlainObject(y)?y:$.getGraphDiv(y),y=$.extendDeep({_context:e},{data:y.data,layout:y.layout}),P.supplyDefaults(y);var v=y.data||[],T=y.layout||{};T._basePlotModules=y._fullLayout._basePlotModules,T._modules=y._fullLayout._modules;var u={data:{},layout:{}};v.forEach(function(w){var R={};n(w,R,i.bind(null,w));var O=$.coerce(w,{},S,"type"),N=u.data[O];N||(N=u.data[O]=[]),N.push(R)}),n(T,u.layout,o.bind(null,T)),delete u.layout.template;var b=T.template;if(c(b)){var _=b.layout,C,M,E,A,h,p;c(_)&&r(_,u.layout);var k=b.data;if(c(k)){for(M in u.data)if(E=k[M],Array.isArray(E)){for(h=u.data[M],p=h.length,A=E.length,C=0;CV?C.push({code:"unused",traceType:w,templateCount:N,dataCount:V}):V>N&&C.push({code:"reused",traceType:w,templateCount:N,dataCount:V})}}function H(F,U){for(var W in F)if(W.charAt(0)!=="_"){var q=F[W],X=s(F,W,U);c(q)?(Array.isArray(F)&&q._template===!1&&q.templateitemname&&C.push({code:"missing",path:X,templateitemname:q.templateitemname}),H(q,X)):Array.isArray(q)&&f(q)&&H(q,X)}}if(H({data:E,layout:M},""),C.length)return C.map(x)};function f(y){for(var v=0;v{var $=K_();Q._doPlot=$._doPlot,Q.newPlot=$.newPlot,Q.restyle=$.restyle,Q.relayout=$.relayout,Q.redraw=$.redraw,Q.update=$.update,Q._guiRestyle=$._guiRestyle,Q._guiRelayout=$._guiRelayout,Q._guiUpdate=$._guiUpdate,Q._storeDirectGUIEdit=$._storeDirectGUIEdit,Q.react=$.react,Q.extendTraces=$.extendTraces,Q.prependTraces=$.prependTraces,Q.addTraces=$.addTraces,Q.deleteTraces=$.deleteTraces,Q.moveTraces=$.moveTraces,Q.purge=$.purge,Q.addFrames=$.addFrames,Q.deleteFrames=$.deleteFrames,Q.animate=$.animate,Q.setPlotConfig=$.setPlotConfig;var c=a0().getGraphDiv,g=H_().eraseActiveShape;Q.deleteActiveShape=function(S){return g(c(S))},Q.toImage=Cw(),Q.validate=bm(),Q.downloadImage=X_();var P=P1();Q.makeTemplate=P.makeTemplate,Q.validateTemplate=P.validateTemplate}),Um=Ft((Q,$)=>{var c=_n(),g=Qo();$.exports=function(P,S,t,e){var r=e("x"),a=e("y"),n,o=g.getComponentMethod("calendars","handleTraceDefaults");if(o(P,S,["x","y"],t),r){var i=c.minRowLength(r);a?n=Math.min(i,c.minRowLength(a)):(n=i,e("y0"),e("dy"))}else{if(!a)return 0;n=c.minRowLength(a),e("x0"),e("dx")}return S._length=n,n}}),jp=Ft((Q,$)=>{var c=_n().dateTick0,g=Ua(),P=g.ONEWEEK;function S(t,e){return t%P===0?c(e,1):c(e,0)}$.exports=function(t,e,r,a,n){if(n||(n={x:!0,y:!0}),n.x){var o=a("xperiod");o&&(a("xperiod0",S(o,e.xcalendar)),a("xperiodalignment"))}if(n.y){var i=a("yperiod");i&&(a("yperiod0",S(i,e.ycalendar)),a("yperiodalignment"))}}}),Pw=Ft((Q,$)=>{var c=["orientation","groupnorm","stackgaps"];$.exports=function(g,P,S,t){var e=S._scatterStackOpts,r=t("stackgroup");if(r){var a=P.xaxis+P.yaxis,n=e[a];n||(n=e[a]={});var o=n[r],i=!1;o?o.traces.push(P):(o=n[r]={traceIndices:[],traces:[P]},i=!0);for(var s={orientation:P.x&&!P.y?"h":"v"},f=0;f{var c=ui(),g=Zd().hasColorscale,P=gc(),S=Mc();$.exports=function(t,e,r,a,n,o){var i=S.isBubble(t),s=(t.line||{}).color,f;if(o=o||{},s&&(r=s),n("marker.symbol"),n("marker.opacity",i?.7:1),n("marker.size"),o.noAngle||(n("marker.angle"),o.noAngleRef||n("marker.angleref"),o.noStandOff||n("marker.standoff")),n("marker.color",r),g(t,"marker")&&P(t,e,a,n,{prefix:"marker.",cLetter:"c"}),o.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&e.marker.color!==s?f=s:i?f=c.background:f=c.defaultLine,n("marker.line.color",f),g(t,"marker.line")&&P(t,e,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",i?1:0)),i&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),o.gradient){var x=n("marker.gradient.type");x!=="none"&&n("marker.gradient.color")}}}),F0=Ft((Q,$)=>{var c=_n().isArrayOrTypedArray,g=Zd().hasColorscale,P=gc();$.exports=function(S,t,e,r,a,n){n||(n={});var o=(S.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),a("line.color",e),g(S,"line"))P(S,t,r,a,{prefix:"line.",cLetter:"c"});else{var i=(c(o)?!1:o)||e;a("line.color",i)}a("line.width"),n.noDash||a("line.dash"),n.backoff&&a("line.backoff")}}),xv=Ft((Q,$)=>{$.exports=function(c,g,P){var S=P("line.shape");S==="spline"&&P("line.smoothing")}}),b0=Ft((Q,$)=>{var c=_n();$.exports=function(g,P,S,t,e){e=e||{},t("textposition"),c.coerceFont(t,"textfont",e.font||S.font,e),e.noSelect||(t("selected.textfont.color"),t("unselected.textfont.color"))}}),R0=Ft((Q,$)=>{var c=ui(),g=_n().isArrayOrTypedArray;function P(S){for(var t=c.interpolate(S[0][1],S[1][1],.5),e=2;e{var c=_n(),g=Qo(),P=tf(),S=_m(),t=Mc(),e=Um(),r=jp(),a=Pw(),n=c0(),o=F0(),i=xv(),s=b0(),f=R0(),x=_n().coercePattern;$.exports=function(y,v,T,u){function b(k,w){return c.coerce(y,v,P,k,w)}var _=e(y,v,u,b);if(_||(v.visible=!1),!!v.visible){r(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder");var C=a(y,v,u,b);u.scattermode==="group"&&v.orientation===void 0&&b("orientation","v");var M=!C&&_{var c=vv().getAxisGroup;$.exports=function(g,P,S,t,e){var r=P.orientation,a=P[{v:"x",h:"y"}[r]+"axis"],n=c(S,a)+r,o=S._alignmentOpts||{},i=t("alignmentgroup"),s=o[n];s||(s=o[n]={});var f=s[i];f?f.traces.push(P):f=s[i]={traces:[P],alignmentIndex:Object.keys(s).length,offsetGroups:{}};var x=t("offsetgroup")||"",y=f.offsetGroups,v=y[x];P._offsetIndex=0,(e!=="group"||x)&&(v||(v=y[x]={offsetIndex:Object.keys(y).length}),P._offsetIndex=v.offsetIndex)}}),Iw=Ft((Q,$)=>{var c=_n(),g=Cg(),P=tf();$.exports=function(S,t){var e,r,a,n=t.scattermode;function o(y){return c.coerce(r._input,r,P,y)}if(t.scattermode==="group")for(a=0;a=0;f--){var x=S[f];if(x.type==="scatter"&&x.xaxis===i.xaxis&&x.yaxis===i.yaxis){x.opacity=void 0;break}}}}}}),Ow=Ft((Q,$)=>{var c=_n(),g=vg();$.exports=function(P,S){function t(r,a){return c.coerce(P,S,g,r,a)}var e=S.barmode==="group";S.scattermode==="group"&&t("scattergap",e?S.bargap:.2)}}),B0=Ft((Q,$)=>{var c=ia(),g=_n(),P=g.dateTime2ms,S=g.incrementMonth,t=Ua(),e=t.ONEAVGMONTH;$.exports=function(r,a,n,o){if(a.type!=="date")return{vals:o};var i=r[n+"periodalignment"];if(!i)return{vals:o};var s=r[n+"period"],f;if(c(s)){if(s=+s,s<=0)return{vals:o}}else if(typeof s=="string"&&s.charAt(0)==="M"){var x=+s.substring(1);if(x>0&&Math.round(x)===x)f=x;else return{vals:o}}for(var y=a.calendar,v=i==="start",T=i==="end",u=r[n+"period0"],b=P(u,y)||0,_=[],C=[],M=[],E=o.length,A=0;Ah;)w=S(w,-f,y);for(;w<=h;)w=S(w,f,y);k=S(w,-f,y)}else{for(p=Math.round((h-b)/s),w=b+p*s;w>h;)w-=s;for(;w<=h;)w+=s;k=w-s}_[A]=v?k:T?w:(k+w)/2,C[A]=k,M[A]=w}return{vals:_,starts:C,ends:M}}}),N0=Ft((Q,$)=>{var c=Zd().hasColorscale,g=ep(),P=Mc();$.exports=function(S,t){P.hasLines(t)&&c(t,"line")&&g(S,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),P.hasMarkers(t)&&(c(t,"marker")&&g(S,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),c(t,"marker.line")&&g(S,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}),ct=Ft((Q,$)=>{var c=_n();$.exports=function(g,P){for(var S=0;S{var c=_n();$.exports=function(g,P){c.isArrayOrTypedArray(P.selectedpoints)&&c.tagSelected(g,P)}}),me=Ft((Q,$)=>{var c=ia(),g=_n(),P=Ls(),S=B0(),t=Ua().BADNUM,e=Mc(),r=N0(),a=ct(),n=Bt();function o(v,T){var u=v._fullLayout,b=T._xA=P.getFromId(v,T.xaxis||"x","x"),_=T._yA=P.getFromId(v,T.yaxis||"y","y"),C=b.makeCalcdata(T,"x"),M=_.makeCalcdata(T,"y"),E=S(T,b,"x",C),A=S(T,_,"y",M),h=E.vals,p=A.vals,k=T._length,w=new Array(k),R=T.ids,O=y(T,u,b,_),N=!1,V,H,F,U,W,q;f(u,T);var X="x",lt="y",yt;if(O)g.pushUnique(O.traceIndices,T.index),V=O.orientation==="v",V?(lt="s",yt="x"):(X="s",yt="y"),W=O.stackgaps==="interpolate";else{var pt=s(T,k);i(v,T,b,_,h,p,pt)}var st=!!T.xperiodalignment,tt=!!T.yperiodalignment;for(H=0;HH&&w[U].gap;)U--;for(q=w[U].s,F=w.length-1;F>U;F--)w[F].s=q;for(;H{$.exports=g;var c=_n().distinctVals;function g(P,S){this.traces=P,this.sepNegVal=S.sepNegVal,this.overlapNoMerge=S.overlapNoMerge;for(var t=1/0,e=S.posAxis._id.charAt(0),r=[],a=0;a{var c=ia(),g=_n().isArrayOrTypedArray,P=Ua().BADNUM,S=Qo(),t=Ls(),e=vv().getAxisGroup,r=Qe();function a(w,R){for(var O=R.xaxis,N=R.yaxis,V=w._fullLayout,H=w._fullData,F=w.calcdata,U=[],W=[],q=0;qW+F||!c(U))}for(var X=0;X{var c=me(),g=zr().setGroupPositions;function P(e,r){for(var a=r.xaxis,n=r.yaxis,o=e._fullLayout,i=e._fullData,s=e.calcdata,f=[],x=[],y=0;yO[y]&&y{var c=Vs(),g=Ua(),P=g.BADNUM,S=g.LOG_CLIP,t=S+.5,e=S-.5,r=_n(),a=r.segmentsIntersect,n=r.constrain,o=_m();$.exports=function(i,s){var f=s.trace||{},x=s.xaxis,y=s.yaxis,v=x.type==="log",T=y.type==="log",u=x._length,b=y._length,_=s.backoff,C=f.marker,M=s.connectGaps,E=s.baseTolerance,A=s.shape,h=A==="linear",p=f.fill&&f.fill!=="none",k=[],w=o.minTolerance,R=i.length,O=new Array(R),N=0,V,H,F,U,W,q,X,lt,yt,pt,st,tt,dt,rt,at,vt;function it(we){var Ue=i[we];if(!Ue)return!1;var qe=s.linearized?x.l2p(Ue.x):x.c2p(Ue.x),or=s.linearized?y.l2p(Ue.y):y.c2p(Ue.y);if(qe===P){if(v&&(qe=x.c2p(Ue.x,!0)),qe===P)return!1;T&&or===P&&(qe*=Math.abs(x._m*b*(x._m>0?t:e)/(y._m*u*(y._m>0?t:e)))),qe*=1e3}if(or===P){if(T&&(or=y.c2p(Ue.y,!0)),or===P)return!1;or*=1e3}return[qe,or]}function Y(we,Ue,qe,or){var Ar=qe-we,Tr=or-Ue,pr=.5-we,Jr=.5-Ue,Vn=Ar*Ar+Tr*Tr,Hn=Ar*pr+Tr*Jr;if(Hn>0&&Hn1||Math.abs(pr.y-qe[0][1])>1)&&(pr=[pr.x,pr.y],or&&zt(pr,we)Ht||we[1]ge)return[n(we[0],Wt,Ht),n(we[1],Jt,ge)]}function Te(we,Ue){if(we[0]===Ue[0]&&(we[0]===Wt||we[0]===Ht)||we[1]===Ue[1]&&(we[1]===Jt||we[1]===ge))return!0}function He(we,Ue){var qe=[],or=oe(we),Ar=oe(Ue);return or&&Ar&&Te(or,Ar)||(or&&qe.push(or),Ar&&qe.push(Ar)),qe}function Ge(we,Ue,qe){return function(or,Ar){var Tr=oe(or),pr=oe(Ar),Jr=[];if(Tr&&pr&&Te(Tr,pr))return Jr;Tr&&Jr.push(Tr),pr&&Jr.push(pr);var Vn=2*r.constrain((or[we]+Ar[we])/2,Ue,qe)-((Tr||or)[we]+(pr||Ar)[we]);if(Vn){var Hn;Tr&&pr?Hn=Vn>0==Tr[we]>pr[we]?Tr:pr:Hn=Tr||pr,Hn[we]+=Vn}return Jr}}var cr;A==="linear"||A==="spline"?cr=ve:A==="hv"||A==="vh"?cr=He:A==="hvh"?cr=Ge(0,Wt,Ht):A==="vhv"&&(cr=Ge(1,Jt,ge));function ur(we,Ue){var qe=Ue[0]-we[0],or=(Ue[1]-we[1])/qe,Ar=(we[1]*Ue[0]-Ue[1]*we[0])/qe;return Ar>0?[or>0?Wt:Ht,ge]:[or>0?Ht:Wt,Jt]}function jr(we){var Ue=we[0],qe=we[1],or=Ue===O[N-1][0],Ar=qe===O[N-1][1];if(!(or&&Ar))if(N>1){var Tr=Ue===O[N-2][0],pr=qe===O[N-2][1];or&&(Ue===Wt||Ue===Ht)&&Tr?pr?N--:O[N-1]=we:Ar&&(qe===Jt||qe===ge)&&pr?Tr?N--:O[N-1]=we:O[N++]=we}else O[N++]=we}function Hr(we){O[N-1][0]!==we[0]&&O[N-1][1]!==we[1]&&jr([Tt,Lt]),jr(we),Mt=null,Tt=Lt=0}var br=r.isArrayOrTypedArray(C);function Kr(we){if(we&&_&&(we.i=V,we.d=i,we.trace=f,we.marker=br?C[we.i]:C,we.backoff=_),ft=we[0]/u,ut=we[1]/b,de=we[0]Ht?Ht:0,se=we[1]ge?ge:0,de||se){if(!N)O[N++]=[de||we[0],se||we[1]];else if(Mt){var Ue=cr(Mt,we);Ue.length>1&&(Hr(Ue[0]),O[N++]=Ue[1])}else te=cr(O[N-1],we)[0],O[N++]=te;var qe=O[N-1];de&&se&&(qe[0]!==de||qe[1]!==se)?(Mt&&(Tt!==de&&Lt!==se?jr(Tt&&Lt?ur(Mt,we):[Tt||de,Lt||se]):Tt&&Lt&&jr([Tt,Lt])),jr([de,se])):Tt-de&&Lt-se&&jr([de||Tt,se||Lt]),Mt=we,Tt=de,Lt=se}else Mt&&Hr(cr(Mt,we)[0]),O[N++]=we}for(V=0;Vwt(q,rn))break;F=q,dt=yt[0]*lt[0]+yt[1]*lt[1],dt>st?(st=dt,U=q,X=!1):dt=i.length||!q)break;Kr(q),H=q}}Mt&&jr([Tt||Mt[0],Lt||Mt[1]]),k.push(O.slice(0,N))}var Ce=A.slice(A.length-1);if(_&&Ce!=="h"&&Ce!=="v"){for(var Gt=!1,ne=-1,Ct=[],gt=0;gt{var c={tonextx:1,tonexty:1,tonext:1};$.exports=function(g,P,S){var t,e,r,a,n,o={},i=!1,s=-1,f=0,x=-1;for(e=0;e=0?n=x:(n=x=f,f++),n{var c=En(),g=Qo(),P=_n(),S=P.ensureSingle,t=P.identity,e=Vs(),r=Mc(),a=ji(),n=Ba(),o=ym().tester;$.exports=function(x,y,v,T,u,b){var _,C,M=!u,E=!!u&&u.duration>0,A=n(x,y,v);if(_=T.selectAll("g.trace").data(A,function(p){return p[0].trace.uid}),_.enter().append("g").attr("class",function(p){return"trace scatter trace"+p[0].trace.uid}).style("stroke-miterlimit",2),_.order(),i(x,_,y),E){b&&(C=b());var h=c.transition().duration(u.duration).ease(u.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});h.each(function(){T.selectAll("g.trace").each(function(p,k){s(x,k,y,p,A,this,u)})})}else _.each(function(p,k){s(x,k,y,p,A,this,u)});M&&_.exit().remove(),T.selectAll("path:not([d])").remove()};function i(x,y,v){y.each(function(T){var u=S(c.select(this),"g","fills");e.setClipUrl(u,v.layerClipId,x);var b=T[0].trace,_=[];b._ownfill&&_.push("_ownFill"),b._nexttrace&&_.push("_nextFill");var C=u.selectAll("g").data(_,t);C.enter().append("g"),C.exit().each(function(M){b[M]=null}).remove(),C.order().each(function(M){b[M]=S(c.select(this),"path","js-fill")})})}function s(x,y,v,T,u,b,_){var C=x._context.staticPlot,M;f(x,y,v,T,u);var E=!!_&&_.duration>0;function A(Hr){return E?Hr.transition():Hr}var h=v.xaxis,p=v.yaxis,k=T[0].trace,w=k.line,R=c.select(b),O=S(R,"g","errorbars"),N=S(R,"g","lines"),V=S(R,"g","points"),H=S(R,"g","text");if(g.getComponentMethod("errorbars","plot")(x,O,v,_),k.visible!==!0)return;A(R).style("opacity",k.opacity);var F,U,W=k.fill.charAt(k.fill.length-1);W!=="x"&&W!=="y"&&(W="");var q,X;W==="y"?(q=1,X=p.c2p(0,!0)):W==="x"&&(q=0,X=h.c2p(0,!0)),T[0][v.isRangePlot?"nodeRangePlot3":"node3"]=R;var lt="",yt=[],pt=k._prevtrace,st=null,tt=null;pt&&(lt=pt._prevRevpath||"",U=pt._nextFill,yt=pt._ownPolygons,st=pt._fillsegments,tt=pt._fillElement);var dt,rt,at="",vt="",it,Y,ft,ut,wt,zt,Pt=[];k._polygons=[];var Wt=[],Ht=[],Jt=P.noop;if(F=k._ownFill,r.hasLines(k)||k.fill!=="none"){U&&U.datum(T),["hv","vh","hvh","vhv"].indexOf(w.shape)!==-1?(it=e.steps(w.shape),Y=e.steps(w.shape.split("").reverse().join(""))):w.shape==="spline"?it=Y=function(Hr){var br=Hr[Hr.length-1];return Hr.length>1&&Hr[0][0]===br[0]&&Hr[0][1]===br[1]?e.smoothclosed(Hr.slice(1),w.smoothing):e.smoothopen(Hr,w.smoothing)}:it=Y=function(Hr){return"M"+Hr.join("L")},ft=function(Hr){return Y(Hr.reverse())},Ht=a(T,{xaxis:h,yaxis:p,trace:k,connectGaps:k.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:k.fill}),Wt=new Array(Ht.length);var ge=0;for(M=0;M=C[0]&&R.x<=C[1]&&R.y>=M[0]&&R.y<=M[1]}),p=Math.ceil(h.length/A),k=0;u.forEach(function(R,O){var N=R[0].trace;r.hasMarkers(N)&&N.marker.maxdisplayed>0&&O{$.exports={container:"marker",min:"cmin",max:"cmax"}}),Ws=Ft((Q,$)=>{var c=Ls();$.exports=function(g,P,S){var t={},e={_fullLayout:S},r=c.getFromTrace(e,P,"x"),a=c.getFromTrace(e,P,"y"),n=g.orig_x;n===void 0&&(n=g.x);var o=g.orig_y;return o===void 0&&(o=g.y),t.xLabel=c.tickText(r,r.c2l(n),!0).text,t.yLabel=c.tickText(a,a.c2l(o),!0).text,t}}),_l=Ft((Q,$)=>{var c=En(),g=Vs(),P=Qo();function S(a){var n=c.select(a).selectAll("g.trace.scatter");n.style("opacity",function(o){return o[0].trace.opacity}),n.selectAll("g.points").each(function(o){var i=c.select(this),s=o.trace||o[0].trace;t(i,s,a)}),n.selectAll("g.text").each(function(o){var i=c.select(this),s=o.trace||o[0].trace;e(i,s,a)}),n.selectAll("g.trace path.js-line").call(g.lineGroupStyle),n.selectAll("g.trace path.js-fill").call(g.fillGroupStyle,a,!1),P.getComponentMethod("errorbars","style")(n)}function t(a,n,o){g.pointStyle(a.selectAll("path.point"),n,o)}function e(a,n,o){g.textPointStyle(a.selectAll("text"),n,o)}function r(a,n,o){var i=n[0].trace;i.selectedpoints?(g.selectedPointStyle(o.selectAll("path.point"),i),g.selectedTextStyle(o.selectAll("text"),i)):(t(o,i,a),e(o,i,a))}$.exports={style:S,stylePoints:t,styleText:e,styleOnSelect:r}}),Fu=Ft((Q,$)=>{var c=ui(),g=Mc();$.exports=function(P,S){var t,e;if(P.mode==="lines")return t=P.line.color,t&&c.opacity(t)?t:P.fillcolor;if(P.mode==="none")return P.fill?P.fillcolor:"";var r=S.mcc||(P.marker||{}).color,a=S.mlcc||((P.marker||{}).line||{}).color;return e=r&&c.opacity(r)?r:a&&c.opacity(a)&&(S.mlw||((P.marker||{}).line||{}).width)?a:"",e?c.opacity(e)<.3?c.addOpacity(e,.3):e:(t=(P.line||{}).color,t&&c.opacity(t)&&g.hasLines(P)&&P.line.width?t:P.fillcolor)}}),Pd=Ft((Q,$)=>{var c=_n(),g=Qh(),P=Qo(),S=Fu(),t=ui(),e=c.fillText;$.exports=function(r,a,n,o){var i=r.cd,s=i[0].trace,f=r.xa,x=r.ya,y=f.c2p(a),v=x.c2p(n),T=[y,v],u=s.hoveron||"",b=s.mode.indexOf("markers")!==-1?3:.5,_=!!s.xperiodalignment,C=!!s.yperiodalignment;if(u.indexOf("points")!==-1){var M=function(lt){if(_){var yt=f.c2p(lt.xStart),pt=f.c2p(lt.xEnd);return y>=Math.min(yt,pt)&&y<=Math.max(yt,pt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,dt=Math.abs(f.c2p(lt.x)-y);return dt=Math.min(yt,pt)&&v<=Math.max(yt,pt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,dt=Math.abs(x.c2p(lt.y)-v);return dtat!=Pt>=at&&(ut=Y[it-1][0],wt=Y[it][0],Pt-zt&&(ft=ut+(wt-ut)*(at-zt)/(Pt-zt),st=Math.min(st,ft),tt=Math.max(tt,ft)));return st=Math.max(st,0),tt=Math.min(tt,f._length),{x0:st,x1:tt,y0:at,y1:at}}if(u.indexOf("fills")!==-1&&s._fillElement){var W=F(s._fillElement)&&!F(s._fillExclusionElement);if(W){var q=U(s._polygons);q===null&&(q={x0:T[0],x1:T[0],y0:T[1],y1:T[1]});var X=t.defaultLine;return t.opacity(s.fillcolor)?X=s.fillcolor:t.opacity((s.line||{}).color)&&(X=s.line.color),c.extendFlat(r,{distance:r.maxHoverDistance,x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1,color:X,hovertemplate:!1}),delete r.index,s.text&&!c.isArrayOrTypedArray(s.text)?r.text=String(s.text):r.text=s.name,[r]}}}}),jf=Ft((Q,$)=>{var c=Mc();$.exports=function(g,P){var S=g.cd,t=g.xaxis,e=g.yaxis,r=[],a=S[0].trace,n,o,i,s,f=!c.hasMarkers(a)&&!c.hasText(a);if(f)return[];if(P===!1)for(n=0;n{$.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}),Tp=Ft((Q,$)=>{var c=Qo().traceIs,g=dv();$.exports=function(r,a,n,o){n("autotypenumbers",o.autotypenumbersDflt);var i=n("type",(o.splomStash||{}).type);i==="-"&&(P(a,o.data),a.type==="-"?a.type="linear":r.type=a.type)};function P(r,a){if(r.type==="-"){var n=r._id,o=n.charAt(0),i;n.indexOf("scene")!==-1&&(n=o);var s=S(a,n,o);if(s){if(s.type==="histogram"&&o==={v:"y",h:"x"}[s.orientation||"v"]){r.type="linear";return}var f=o+"calendar",x=s[f],y={noMultiCategory:!c(s,"cartesian")||c(s,"noMultiCategory")};if(s.type==="box"&&s._hasPreCompStats&&o==={h:"x",v:"y"}[s.orientation||"v"]&&(y.noMultiCategory=!0),y.autotypenumbers=r.autotypenumbers,e(s,o)){var v=t(s),T=[];for(i=0;i0&&(i["_"+n+"axes"]||{})[a]||(i[n+"axis"]||n)===a&&(e(i,n)||(i[n]||[]).length||i[n+"0"]))return i}}function t(r){return{v:"x",h:"y"}[r.orientation||"v"]}function e(r,a){var n=t(r),o=c(r,"box-violin"),i=c(r._fullInput||{},"candlestick");return o&&!i&&a===n&&r[n]===void 0&&r[n+"0"]===void 0}}),Vm=Ft((Q,$)=>{var c=Va().isTypedArraySpec;function g(P,S){var t=S.dataAttr||P._id.charAt(0),e={},r,a,n;if(S.axData)r=S.axData;else for(r=[],a=0;a0||c(r),n;a&&(n="array");var o=t("categoryorder",n),i;o==="array"&&(i=t("categoryarray")),!a&&o==="array"&&(o=S.categoryorder="trace"),o==="trace"?S._initialCategories=[]:o==="array"?S._initialCategories=i.slice():(i=g(S,e).sort(),o==="category ascending"?S._initialCategories=i:o==="category descending"&&(S._initialCategories=i.reverse()))}}}),Jy=Ft((Q,$)=>{var c=eo().mix,g=yi(),P=_n();$.exports=function(S,t,e,r){r=r||{};var a=r.dfltColor;function n(p,k){return P.coerce2(S,t,r.attributes,p,k)}var o=n("linecolor",a),i=n("linewidth"),s=e("showline",r.showLine||!!o||!!i);s||(delete t.linecolor,delete t.linewidth);var f=c(a,r.bgColor,r.blend||g.lightFraction).toRgbString(),x=n("gridcolor",f),y=n("gridwidth"),v=n("griddash"),T=e("showgrid",r.showGrid||!!x||!!y||!!v);if(T||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),r.hasMinor){var u=c(t.gridcolor,r.bgColor,67).toRgbString(),b=n("minor.gridcolor",u),_=n("minor.gridwidth",t.gridwidth||1),C=n("minor.griddash",t.griddash||"solid"),M=e("minor.showgrid",!!b||!!_||!!C);M||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!r.noZeroLine){n("zerolinelayer");var E=n("zerolinecolor",a),A=n("zerolinewidth"),h=e("zeroline",r.showGrid||!!E||!!A);h||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}),Qy=Ft((Q,$)=>{var c=ia(),g=Qo(),P=_n(),S=mu(),t=Ld(),e=Cd(),r=yg(),a=xg(),n=o0(),o=gm(),i=Vm(),s=Jy(),f=O_(),x=s0(),y=ac().WEEKDAY_PATTERN,v=ac().HOUR_PATTERN;$.exports=function(_,C,M,E,A){var h=E.letter,p=E.font||{},k=E.splomStash||{},w=M("visible",!E.visibleDflt),R=C._template||{},O=C.type||R.type||"-",N;if(O==="date"){var V=g.getComponentMethod("calendars","handleDefaults");V(_,C,"calendar",E.calendar),E.noTicklabelmode||(N=M("ticklabelmode"))}!E.noTicklabelindex&&(O==="date"||O==="linear")&&M("ticklabelindex");var H="";(!E.noTicklabelposition||O==="multicategory")&&(H=P.coerce(_,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:N==="period"?["outside","inside"]:h==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),E.noTicklabeloverflow||M("ticklabeloverflow",H.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),x(C,A),f(_,C,M,E),i(_,C,M,E),E.noHover||(O!=="category"&&M("hoverformat"),E.noUnifiedhovertitle||M("unifiedhovertitle.text"));var F=M("color"),U=F!==e.color.dflt?F:p.color,W=k.label||A._dfltTitle[h];if(o(_,C,M,O,E),!w)return C;M("title.text",W),P.coerceFont(M,"title.font",p,{overrideDflt:{size:P.bigFont(p.size),color:U}}),r(_,C,M,O);var q=E.hasMinor;if(q&&(S.newContainer(C,"minor"),r(_,C,M,O,{isMinor:!0})),n(_,C,M,O,E),a(_,C,M,E),q){var X=E.isMinor;E.isMinor=!0,a(_,C,M,E),E.isMinor=X}s(_,C,M,{dfltColor:F,bgColor:E.bgColor,showGrid:E.showGrid,hasMinor:q,attributes:e}),q&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&M("mirror");var lt=O==="multicategory";if(!E.noTickson&&(O==="category"||lt)&&(C.ticks||C.showgrid)&&(lt?(M("tickson","boundaries"),delete C.ticklabelposition):M("tickson")),lt){var yt=M("showdividers");yt&&(M("dividercolor"),M("dividerwidth"))}if(O==="date")if(t(_,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var pt=0;pt=2){var p="",k,w;if(h.length===2){for(k=0;k<2;k++)if(w=b(h[k]),w){p=y;break}}var R=E("pattern",p);if(R===y)for(k=0;k<2;k++)w=b(h[k]),w&&(C.bounds[k]=h[k]=w-1);if(R)for(k=0;k<2;k++)switch(w=h[k],R){case y:if(!c(w)){C.enabled=!1;return}if(w=+w,w!==Math.floor(w)||w<0||w>=7){C.enabled=!1;return}C.bounds[k]=h[k]=w;break;case v:if(!c(w)){C.enabled=!1;return}if(w=+w,w<0||w>24){C.enabled=!1;return}C.bounds[k]=h[k]=w;break}if(M.autorange===!1){var O=M.range;if(O[0]O[1]){C.enabled=!1;return}}else if(h[0]>O[0]&&h[1]{var c=ia(),g=_n();$.exports=function(P,S,t,e){var r=e.counterAxes||[],a=e.overlayableAxes||[],n=e.letter,o=e.grid,i=e.overlayingDomain,s,f,x,y,v,T;o&&(f=o._domains[n][o._axisMap[S._id]],s=o._anchors[S._id],f&&(x=o[n+"side"].split(" ")[0],y=o.domain[n][x==="right"||x==="top"?1:0])),f=f||[0,1],s=s||(c(P.position)?"free":r[0]||"free"),x=x||(n==="x"?"bottom":"left"),y=y||0,v=0,T=!1;var u=g.coerce(P,S,{anchor:{valType:"enumerated",values:["free"].concat(r),dflt:s}},"anchor"),b=g.coerce(P,S,{side:{valType:"enumerated",values:n==="x"?["bottom","top"]:["left","right"],dflt:x}},"side");if(u==="free"){if(n==="y"){var _=t("autoshift");_&&(y=b==="left"?i[0]:i[1],T=S.automargin?S.automargin:!0,v=b==="left"?-3:3),t("shift",v)}t("position",y)}t("automargin",T);var C=!1;if(a.length&&(C=g.coerce(P,S,{overlaying:{valType:"enumerated",values:[!1].concat(a),dflt:!1}},"overlaying")),!C){var M=t("domain",f);M[0]>M[1]-1/4096&&(S.domain=f),g.noneOrAll(P.domain,S.domain,f),S.tickmode==="sync"&&(S.tickmode="auto")}return t("layer"),S}}),Dw=Ft((Q,$)=>{var c=_n(),g=ui(),P=Np().isUnifiedHover,S=pv(),t=mu(),e=b1(),r=Cd(),a=Tp(),n=Qy(),o=vv(),i=J_(),s=Rc(),f=s.id2name,x=s.name2id,y=ac().AX_ID_PATTERN,v=Qo(),T=v.traceIs,u=v.getComponentMethod;function b(_,C,M){Array.isArray(_[C])?_[C].push(M):_[C]=[M]}$.exports=function(_,C,M){var E=C.autotypenumbers,A={},h={},p={},k={},w={},R={},O={},N={},V={},H={},F,U;for(F=0;F{var c=En(),g=Qo(),P=_n(),S=Vs(),t=Ls();$.exports=function(e,r,a,n){var o=e._fullLayout;if(r.length===0){t.redrawComponents(e);return}function i(C){var M=C.xaxis,E=C.yaxis;o._defs.select("#"+C.clipId+"> rect").call(S.setTranslate,0,0).call(S.setScale,1,1),C.plot.call(S.setTranslate,M._offset,E._offset).call(S.setScale,1,1);var A=C.plot.selectAll(".scatterlayer .trace");A.selectAll(".point").call(S.setPointGroupScale,1,1),A.selectAll(".textpoint").call(S.setTextPointsScale,1,1),A.call(S.hideOutsideRangePoints,C)}function s(C,M){var E=C.plotinfo,A=E.xaxis,h=E.yaxis,p=A._length,k=h._length,w=!!C.xr1,R=!!C.yr1,O=[];if(w){var N=P.simpleMap(C.xr0,A.r2l),V=P.simpleMap(C.xr1,A.r2l),H=N[1]-N[0],F=V[1]-V[0];O[0]=(N[0]*(1-M)+M*V[0]-N[0])/(N[1]-N[0])*p,O[2]=p*(1-M+M*F/H),A.range[0]=A.l2r(N[0]*(1-M)+M*V[0]),A.range[1]=A.l2r(N[1]*(1-M)+M*V[1])}else O[0]=0,O[2]=p;if(R){var U=P.simpleMap(C.yr0,h.r2l),W=P.simpleMap(C.yr1,h.r2l),q=U[1]-U[0],X=W[1]-W[0];O[1]=(U[1]*(1-M)+M*W[1]-U[1])/(U[0]-U[1])*k,O[3]=k*(1-M+M*X/q),h.range[0]=A.l2r(U[0]*(1-M)+M*W[0]),h.range[1]=h.l2r(U[1]*(1-M)+M*W[1])}else O[1]=0,O[3]=k;t.drawOne(e,A,{skipTitle:!0}),t.drawOne(e,h,{skipTitle:!0}),t.redrawComponents(e,[A._id,h._id]);var lt=w?p/O[2]:1,yt=R?k/O[3]:1,pt=w?O[0]:0,st=R?O[1]:0,tt=w?O[0]/O[2]*p:0,dt=R?O[1]/O[3]*k:0,rt=A._offset-tt,at=h._offset-dt;E.clipRect.call(S.setTranslate,pt,st).call(S.setScale,1/lt,1/yt),E.plot.call(S.setTranslate,rt,at).call(S.setScale,lt,yt),S.setPointGroupScale(E.zoomScalePts,1/lt,1/yt),S.setTextPointsScale(E.zoomScaleTxt,1/lt,1/yt)}var f;n&&(f=n());function x(){for(var C={},M=0;Ma.duration?(x(),u=window.cancelAnimationFrame(_)):u=window.requestAnimationFrame(_)}return v=Date.now(),u=window.requestAnimationFrame(_),Promise.resolve()}}),Ef=Ft(Q=>{var $=En(),c=Qo(),g=_n(),P=Kc(),S=Vs(),t=dd().getModuleCalcData,e=Rc(),r=ac(),a=Bp(),n=g.ensureSingle;function o(T,u,b){return g.ensureSingle(T,u,b,function(_){_.datum(b)})}var i=r.zindexSeparator;Q.name="cartesian",Q.attr=["xaxis","yaxis"],Q.idRoot=["x","y"],Q.idRegex=r.idRegex,Q.attrRegex=r.attrRegex,Q.attributes=w0(),Q.layoutAttributes=Cd(),Q.supplyLayoutDefaults=Dw(),Q.transitionAxes=b6(),Q.finalizeSubplots=function(T,u){var b=u._subplots,_=b.xaxis,C=b.yaxis,M=b.cartesian,E=M,A={},h={},p,k,w;for(p=0;p0){var O=R.id;if(O.indexOf(i)!==-1)continue;O+=i+(p+1),R=g.extendFlat({},R,{id:O,plot:C._cartesianlayer.selectAll(".subplot").select("."+O)})}for(var N=[],V,H=0;H1&&(X+=i+q),W.push(A+X),E=0;E1,w=u.mainplotinfo;if(!u.mainplot||k)if(p)u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.xaxislayer=n(_,"g","xaxislayer-above"),u.yaxislayer=n(_,"g","yaxislayer-above");else{if(!E){var R=n(_,"g","layer-subplot");u.shapelayer=n(R,"g","shapelayer"),u.imagelayer=n(R,"g","imagelayer"),w&&k?(u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer):(u.minorGridlayer=n(_,"g","minor-gridlayer"),u.gridlayer=n(_,"g","gridlayer"),u.zerolinelayer=n(_,"g","zerolinelayer"));var O=n(_,"g","layer-between");u.shapelayerBetween=n(O,"g","shapelayer"),u.imagelayerBetween=n(O,"g","imagelayer"),n(_,"path","xlines-below"),n(_,"path","ylines-below"),u.overlinesBelow=n(_,"g","overlines-below"),n(_,"g","xaxislayer-below"),n(_,"g","yaxislayer-below"),u.overaxesBelow=n(_,"g","overaxes-below")}u.overplot=n(_,"g","overplot"),u.plot=n(u.overplot,"g",C),w&&k?u.zerolinelayerAbove=w.zerolinelayerAbove:u.zerolinelayerAbove=n(_,"g","zerolinelayer-above"),E||(u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.overlinesAbove=n(_,"g","overlines-above"),n(_,"g","xaxislayer-above"),n(_,"g","yaxislayer-above"),u.overaxesAbove=n(_,"g","overaxes-above"),u.xlines=_.select(".xlines-"+A),u.ylines=_.select(".ylines-"+h),u.xaxislayer=_.select(".xaxislayer-"+A),u.yaxislayer=_.select(".yaxislayer-"+h))}else{var N=w.plotgroup,V=C+"-x",H=C+"-y";u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer,u.zerolinelayerAbove=w.zerolinelayerAbove,n(w.overlinesBelow,"path",V),n(w.overlinesBelow,"path",H),n(w.overaxesBelow,"g",V),n(w.overaxesBelow,"g",H),u.plot=n(w.overplot,"g",C),n(w.overlinesAbove,"path",V),n(w.overlinesAbove,"path",H),n(w.overaxesAbove,"g",V),n(w.overaxesAbove,"g",H),u.xlines=N.select(".overlines-"+A).select("."+V),u.ylines=N.select(".overlines-"+h).select("."+H),u.xaxislayer=N.select(".overaxes-"+A).select("."+V),u.yaxislayer=N.select(".overaxes-"+h).select("."+H)}E||(p||(o(u.minorGridlayer,"g",u.xaxis._id),o(u.minorGridlayer,"g",u.yaxis._id),u.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),o(u.gridlayer,"g",u.xaxis._id),o(u.gridlayer,"g",u.yaxis._id),u.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),u.xlines.style("fill","none").classed("crisp",!0),u.ylines.style("fill","none").classed("crisp",!0))}function y(T,u){if(T){var b={};T.each(function(h){var p=h[0],k=$.select(this);k.remove(),v(p,u),b[p]=!0});for(var _ in u._plots)for(var C=u._plots[_],M=C.overlays||[],E=0;E{var c=Mc();$.exports={hasLines:c.hasLines,hasMarkers:c.hasMarkers,hasText:c.hasText,isBubble:c.isBubble,attributes:tf(),layoutAttributes:vg(),supplyDefaults:zw(),crossTraceDefaults:Iw(),supplyLayoutDefaults:Ow(),calc:me().calc,crossTraceCalc:kn(),arraysToCalcdata:ct(),plot:Ya(),colorbar:yo(),formatLabels:Ws(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:Pd(),selectPoints:jf(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Ef(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}),tx=Ft((Q,$)=>{var c=En(),g=ui(),P=G_(),S=_n(),t=S.strScale,e=S.strRotate,r=S.strTranslate;$.exports=function(a,n,o){var i=a.node(),s=P[o.arrowhead||0],f=P[o.startarrowhead||0],x=(o.arrowwidth||1)*(o.arrowsize||1),y=(o.arrowwidth||1)*(o.startarrowsize||1),v=n.indexOf("start")>=0,T=n.indexOf("end")>=0,u=s.backoff*x+o.standoff,b=f.backoff*y+o.startstandoff,_,C,M,E;if(i.nodeName==="line"){_={x:+a.attr("x1"),y:+a.attr("y1")},C={x:+a.attr("x2"),y:+a.attr("y2")};var A=_.x-C.x,h=_.y-C.y;if(M=Math.atan2(h,A),E=M+Math.PI,u&&b&&u+b>Math.sqrt(A*A+h*h)){q();return}if(u){if(u*u>A*A+h*h){q();return}var p=u*Math.cos(M),k=u*Math.sin(M);C.x+=p,C.y+=k,a.attr({x2:C.x,y2:C.y})}if(b){if(b*b>A*A+h*h){q();return}var w=b*Math.cos(M),R=b*Math.sin(M);_.x-=w,_.y-=R,a.attr({x1:_.x,y1:_.y})}}else if(i.nodeName==="path"){var O=i.getTotalLength(),N="";if(O{var c=En(),g=Qo(),P=Kc(),S=_n(),t=S.strTranslate,e=Ls(),r=ui(),a=Vs(),n=Qh(),o=tc(),i=O0(),s=hp(),f=mu().arrayEditor,x=tx();$.exports={draw:y,drawOne:v,drawRaw:u};function y(b){var _=b._fullLayout;_._infolayer.selectAll(".annotation").remove();for(var C=0;C<_.annotations.length;C++)_.annotations[C].visible&&v(b,C);return P.previousPromises(b)}function v(b,_){var C=b._fullLayout,M=C.annotations[_]||{},E=e.getFromId(b,M.xref),A=e.getFromId(b,M.yref);E&&E.setScale(),A&&A.setScale(),u(b,M,_,!1,E,A)}function T(b,_,C,M,E){var A=E[C],h=E[C+"ref"],p=C.indexOf("y")!==-1,k=e.getRefType(h)==="domain",w=p?M.h:M.w;return b?k?A+(p?-_:_)/b._length:b.p2r(b.r2p(A)+_):A+(p?-_:_)/w}function u(b,_,C,M,E,A){var h=b._fullLayout,p=b._fullLayout._size,k=b._context.edits,w,R;M?(w="annotation-"+M,R=M+".annotations"):(w="annotation",R="annotations");var O=f(b.layout,R,_),N=O.modifyBase,V=O.modifyItem,H=O.getUpdateObj;h._infolayer.selectAll("."+w+'[data-index="'+C+'"]').remove();var F="clip"+h._uid+"_ann"+C;if(!_._input||_.visible===!1){c.selectAll("#"+F).remove();return}var U={x:{},y:{}},W=+_.textangle||0,q=h._infolayer.append("g").classed(w,!0).attr("data-index",String(C)).style("opacity",_.opacity),X=q.append("g").classed("annotation-text-g",!0),lt=k[_.showarrow?"annotationTail":"annotationPosition"],yt=_.captureevents||k.annotationText||lt;function pt(Pt){var Wt={index:C,annotation:_._input,fullAnnotation:_,event:Pt};return M&&(Wt.subplotId=M),Wt}var st=X.append("g").style("pointer-events",yt?"all":null).call(i,"pointer").on("click",function(){b._dragging=!1,b.emit("plotly_clickannotation",pt(c.event))});_.hovertext&&st.on("mouseover",function(){var Pt=_.hoverlabel,Wt=Pt.font,Ht=this.getBoundingClientRect(),Jt=b.getBoundingClientRect();n.loneHover({x0:Ht.left-Jt.left,x1:Ht.right-Jt.left,y:(Ht.top+Ht.bottom)/2-Jt.top,text:_.hovertext,color:Pt.bgcolor,borderColor:Pt.bordercolor,fontFamily:Wt.family,fontSize:Wt.size,fontColor:Wt.color,fontWeight:Wt.weight,fontStyle:Wt.style,fontVariant:Wt.variant,fontShadow:Wt.fontShadow,fontLineposition:Wt.fontLineposition,fontTextcase:Wt.fontTextcase},{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:b})}).on("mouseout",function(){n.loneUnhover(h._hoverlayer.node())});var tt=_.borderwidth,dt=_.borderpad,rt=tt+dt,at=st.append("rect").attr("class","bg").style("stroke-width",tt+"px").call(r.stroke,_.bordercolor).call(r.fill,_.bgcolor),vt=_.width||_.height,it=h._topclips.selectAll("#"+F).data(vt?[0]:[]);it.enter().append("clipPath").classed("annclip",!0).attr("id",F).append("rect"),it.exit().remove();var Y=_.font,ft=h._meta?S.templateString(_.text,h._meta):_.text,ut=st.append("text").classed("annotation-text",!0).text(ft);function wt(Pt){return Pt.call(a.font,Y).attr({"text-anchor":{left:"start",right:"end"}[_.align]||"middle"}),o.convertToTspans(Pt,b,zt),Pt}function zt(){var Pt=ut.selectAll("a");if(Pt.size()===1&&Pt.text()===ut.text()){var Wt=st.insert("a",":first-child").attr({"xlink:xlink:href":Pt.attr("xlink:href"),"xlink:xlink:show":Pt.attr("xlink:show")}).style({cursor:"pointer"});Wt.node().appendChild(at.node())}var Ht=st.select(".annotation-text-math-group"),Jt=!Ht.empty(),ge=a.bBox((Jt?Ht:ut).node()),he=ge.width,de=ge.height,se=_.width||he,Tt=_.height||de,Lt=Math.round(se+2*rt),Mt=Math.round(Tt+2*rt);function te(ii,qn){return qn==="auto"&&(ii<1/3?qn="left":ii>2/3?qn="right":qn="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[qn]}for(var ve=!1,oe=["x","y"],Te=0;Te1)&&(cr===Ge?(le=ur.r2fraction(_["a"+He]),(le<0||le>1)&&(ve=!0)):ve=!0),ne=ur._offset+ur.r2p(_[He]),St=.5}else{var we=re==="domain";He==="x"?(gt=_[He],ne=we?ur._offset+ur._length*gt:ne=p.l+p.w*gt):(gt=1-_[He],ne=we?ur._offset+ur._length*gt:ne=p.t+p.h*gt),St=_.showarrow?.5:gt}if(_.showarrow){Gt.head=ne;var Ue=_["a"+He];if(Nt=Hr*te(.5,_.xanchor)-br*te(.5,_.yanchor),cr===Ge){var qe=e.getRefType(cr);qe==="domain"?(He==="y"&&(Ue=1-Ue),Gt.tail=ur._offset+ur._length*Ue):qe==="paper"?He==="y"?(Ue=1-Ue,Gt.tail=p.t+p.h*Ue):Gt.tail=p.l+p.w*Ue:Gt.tail=ur._offset+ur.r2p(Ue),Ct=Nt}else Gt.tail=ne+Ue,Ct=Nt+Ue;Gt.text=Gt.tail+Nt;var or=h[He==="x"?"width":"height"];if(Ge==="paper"&&(Gt.head=S.constrain(Gt.head,1,or-1)),cr==="pixel"){var Ar=-Math.max(Gt.tail-3,Gt.text),Tr=Math.min(Gt.tail+3,Gt.text)-or;Ar>0?(Gt.tail+=Ar,Gt.text+=Ar):Tr>0&&(Gt.tail-=Tr,Gt.text-=Tr)}Gt.tail+=Ce,Gt.head+=Ce}else Nt=Kr*te(St,rn),Ct=Nt,Gt.text=ne+Nt;Gt.text+=Ce,Nt+=Ce,Ct+=Ce,_["_"+He+"padplus"]=Kr/2+Ct,_["_"+He+"padminus"]=Kr/2-Ct,_["_"+He+"size"]=Kr,_["_"+He+"shift"]=Nt}if(ve){st.remove();return}var pr=0,Jr=0;if(_.align!=="left"&&(pr=(se-he)*(_.align==="center"?.5:1)),_.valign!=="top"&&(Jr=(Tt-de)*(_.valign==="middle"?.5:1)),Jt)Ht.select("svg").attr({x:rt+pr-1,y:rt+Jr}).call(a.setClipUrl,vt?F:null,b);else{var Vn=rt+Jr-ge.top,Hn=rt+pr-ge.left;ut.call(o.positionText,Hn,Vn).call(a.setClipUrl,vt?F:null,b)}it.select("rect").call(a.setRect,rt,rt,se,Tt),at.call(a.setRect,tt/2,tt/2,Lt-tt,Mt-tt),st.call(a.setTranslate,Math.round(U.x.text-Lt/2),Math.round(U.y.text-Mt/2)),X.attr({transform:"rotate("+W+","+U.x.text+","+U.y.text+")"});var Kn=function(ii,qn){q.selectAll(".annotation-arrow-g").remove();var aa=U.x.head,Vi=U.y.head,We=U.x.tail+ii,rr=U.y.tail+qn,fr=U.x.text+ii,_r=U.y.text+qn,Qr=S.rotationXYMatrix(W,fr,_r),Cn=S.apply2DTransform(Qr),bn=S.apply2DTransform2(Qr),An=+at.attr("width"),ci=+at.attr("height"),xi=fr-.5*An,Li=xi+An,Oi=_r-.5*ci,Zi=Oi+ci,li=[[xi,Oi,xi,Zi],[xi,Zi,Li,Zi],[Li,Zi,Li,Oi],[Li,Oi,xi,Oi]].map(bn);if(!li.reduce(function(Ee,dr){return Ee^!!S.segmentsIntersect(aa,Vi,aa+1e6,Vi+1e6,dr[0],dr[1],dr[2],dr[3])},!1)){li.forEach(function(Ee){var dr=S.segmentsIntersect(We,rr,aa,Vi,Ee[0],Ee[1],Ee[2],Ee[3]);dr&&(We=dr.x,rr=dr.y)});var La=_.arrowwidth,Wa=_.arrowcolor,ze=_.arrowside,Pe=q.append("g").style({opacity:r.opacity(Wa)}).classed("annotation-arrow-g",!0),Rr=Pe.append("path").attr("d","M"+We+","+rr+"L"+aa+","+Vi).style("stroke-width",La+"px").call(r.stroke,r.rgb(Wa));if(x(Rr,ze,_),k.annotationPosition&&Rr.node().parentNode&&!M){var qr=aa,$r=Vi;if(_.standoff){var Br=Math.sqrt(Math.pow(aa-We,2)+Math.pow(Vi-rr,2));qr+=_.standoff*(We-aa)/Br,$r+=_.standoff*(rr-Vi)/Br}var Gr=Pe.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(We-qr)+","+(rr-$r),transform:t(qr,$r)}).style("stroke-width",La+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),fn,an;s.init({element:Gr.node(),gd:b,prepFn:function(){var Ee=a.getTranslate(st);fn=Ee.x,an=Ee.y,E&&E.autorange&&N(E._name+".autorange",!0),A&&A.autorange&&N(A._name+".autorange",!0)},moveFn:function(Ee,dr){var Vr=Cn(fn,an),vn=Vr[0]+Ee,Fn=Vr[1]+dr;st.call(a.setTranslate,vn,Fn),V("x",T(E,Ee,"x",p,_)),V("y",T(A,dr,"y",p,_)),_.axref===_.xref&&V("ax",T(E,Ee,"ax",p,_)),_.ayref===_.yref&&V("ay",T(A,dr,"ay",p,_)),Pe.attr("transform",t(Ee,dr)),X.attr({transform:"rotate("+W+","+vn+","+Fn+")"})},doneFn:function(){g.call("_guiRelayout",b,H());var Ee=document.querySelector(".js-notes-box-panel");Ee&&Ee.redraw(Ee.selectedObj)}})}}};if(_.showarrow&&Kn(0,0),lt){var Ci;s.init({element:st.node(),gd:b,prepFn:function(){Ci=X.attr("transform")},moveFn:function(ii,qn){var aa="pointer";if(_.showarrow)_.axref===_.xref?V("ax",T(E,ii,"ax",p,_)):V("ax",_.ax+ii),_.ayref===_.yref?V("ay",T(A,qn,"ay",p.w,_)):V("ay",_.ay+qn),Kn(ii,qn);else{if(M)return;var Vi,We;if(E)Vi=T(E,ii,"x",p,_);else{var rr=_._xsize/p.w,fr=_.x+(_._xshift-_.xshift)/p.w-rr/2;Vi=s.align(fr+ii/p.w,rr,0,1,_.xanchor)}if(A)We=T(A,qn,"y",p,_);else{var _r=_._ysize/p.h,Qr=_.y-(_._yshift+_.yshift)/p.h-_r/2;We=s.align(Qr-qn/p.h,_r,0,1,_.yanchor)}V("x",Vi),V("y",We),(!E||!A)&&(aa=s.getCursor(E?.5:Vi,A?.5:We,_.xanchor,_.yanchor))}X.attr({transform:t(ii,qn)+Ci}),i(st,aa)},clickFn:function(ii,qn){_.captureevents&&b.emit("plotly_clickannotation",pt(qn))},doneFn:function(){i(st),g.call("_guiRelayout",b,H());var ii=document.querySelector(".js-notes-box-panel");ii&&ii.redraw(ii.selectedObj)}})}}k.annotationText?ut.call(o.makeEditable,{delegate:st,gd:b}).call(wt).on("edit",function(Pt){_.text=Pt,this.call(wt),V("text",Pt),E&&E.autorange&&N(E._name+".autorange",!0),A&&A.autorange&&N(A._name+".autorange",!0),g.call("_guiRelayout",b,H())}):ut.call(wt)}}),w6=Ft((Q,$)=>{var c=_n(),g=Qo(),P=mu().arrayEditor;$.exports={hasClickToShow:S,onClick:t};function S(a,n){var o=e(a,n);return o.on.length>0||o.explicitOff.length>0}function t(a,n){var o=e(a,n),i=o.on,s=o.off.concat(o.explicitOff),f={},x=a._fullLayout.annotations,y,v;if(i.length||s.length){for(y=0;y{var c=_n(),g=ui();$.exports=function(P,S,t,e){e("opacity");var r=e("bgcolor"),a=e("bordercolor"),n=g.opacity(a);e("borderpad");var o=e("borderwidth"),i=e("showarrow");e("text",i?" ":t._dfltTitle.annotation),e("textangle"),c.coerceFont(e,"font",t.font),e("width"),e("align");var s=e("height");if(s&&e("valign"),i){var f=e("arrowside"),x,y;f.indexOf("end")!==-1&&(x=e("arrowhead"),y=e("arrowsize")),f.indexOf("start")!==-1&&(e("startarrowhead",x),e("startarrowsize",y)),e("arrowcolor",n?S.bordercolor:g.defaultLine),e("arrowwidth",(n&&o||1)*2),e("standoff"),e("startstandoff")}var v=e("hovertext"),T=t.hoverlabel||{};if(v){var u=e("hoverlabel.bgcolor",T.bgcolor||(g.opacity(r)?g.rgb(r):g.defaultLine)),b=e("hoverlabel.bordercolor",T.bordercolor||g.contrast(u)),_=c.extendFlat({},T.font);_.color||(_.color=b),c.coerceFont(e,"hoverlabel.font",_)}e("captureevents",!!v)}}),tb=Ft((Q,$)=>{var c=_n(),g=Ls(),P=Ld(),S=Fw(),t=xm();$.exports=function(r,a){P(r,a,{name:"annotations",handleItemDefaults:e})};function e(r,a,n){function o(p,k){return c.coerce(r,a,t,p,k)}var i=o("visible"),s=o("clicktoshow");if(i||s){S(r,a,n,o);for(var f=a.showarrow,x=["x","y"],y=[-10,-30],v={_fullLayout:n},T=0;T<2;T++){var u=x[T],b=g.coerceRef(r,a,v,u,"","paper");if(b!=="paper"){var _=g.getFromId(v,b);_._annIndices.push(a._index)}if(g.coercePosition(a,v,o,b,u,.5),f){var C="a"+u,M=g.coerceRef(r,a,v,C,"pixel",["pixel","paper"]);M!=="pixel"&&M!==b&&(M=a[C]="pixel");var E=M==="pixel"?y[T]:.4;g.coercePosition(a,v,o,M,C,E)}o(u+"anchor"),o(u+"shift")}if(c.noneOrAll(r,a,["x","y"]),f&&c.noneOrAll(r,a,["ax","ay"]),s){var A=o("xclick"),h=o("yclick");a._xclick=A===void 0?a.x:g.cleanPosition(A,v,a.xref),a._yclick=h===void 0?a.y:g.cleanPosition(h,v,a.yref)}}}}),Rw=Ft((Q,$)=>{var c=_n(),g=Ls(),P=Q_().draw;$.exports=function(e){var r=e._fullLayout,a=c.filterVisible(r.annotations);if(a.length&&e._fullData.length)return c.syncOrAsync([P,S],e)};function S(e){var r=e._fullLayout;c.filterVisible(r.annotations).forEach(function(a){var n=g.getFromId(e,a.xref),o=g.getFromId(e,a.yref),i=g.getRefType(a.xref),s=g.getRefType(a.yref);a._extremes={},i==="range"&&t(a,n),s==="range"&&t(a,o)})}function t(e,r){var a=r._id,n=a.charAt(0),o=e[n],i=e["a"+n],s=e[n+"ref"],f=e["a"+n+"ref"],x=e["_"+n+"padplus"],y=e["_"+n+"padminus"],v={x:1,y:-1}[n]*e[n+"shift"],T=3*e.arrowsize*e.arrowwidth||0,u=T+v,b=T-v,_=3*e.startarrowsize*e.arrowwidth||0,C=_+v,M=_-v,E;if(f===s){var A=g.findExtremes(r,[r.r2c(o)],{ppadplus:u,ppadminus:b}),h=g.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(x,C),ppadminus:Math.max(y,M)});E={min:[A.min[0],h.min[0]],max:[A.max[0],h.max[0]]}}else C=i?C+i:C,M=i?M-i:M,E=g.findExtremes(r,[r.r2c(o)],{ppadplus:Math.max(x,u,C),ppadminus:Math.max(y,b,M)});e._extremes[a]=E}}),k6=Ft((Q,$)=>{var c=ia(),g=co();$.exports=function(P,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(!(r||a))return;var n=P._fullLayout.annotations,o=S._id.charAt(0),i,s;function f(y){var v=i[y],T=null;r?T=g(v,S.range):T=Math.pow(10,v),c(T)||(T=null),e(s+y,T)}for(var x=0;x{var c=Q_(),g=w6();$.exports={moduleType:"component",name:"annotations",layoutAttributes:xm(),supplyLayoutDefaults:tb(),includeBasePlot:Eg()("annotations"),calcAutorange:Rw(),draw:c.draw,drawOne:c.drawOne,drawRaw:c.drawRaw,hasClickToShow:g.hasClickToShow,onClick:g.onClick,convertCoords:k6()}}),T6=Ft((Q,$)=>{var c=xm(),g=Yc().overrideAll,P=mu().templatedArray;$.exports=g(P("annotation",{visible:c.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:c.xanchor,xshift:c.xshift,yanchor:c.yanchor,yshift:c.yshift,text:c.text,textangle:c.textangle,font:c.font,width:c.width,height:c.height,opacity:c.opacity,align:c.align,valign:c.valign,bgcolor:c.bgcolor,bordercolor:c.bordercolor,borderpad:c.borderpad,borderwidth:c.borderwidth,showarrow:c.showarrow,arrowcolor:c.arrowcolor,arrowhead:c.arrowhead,startarrowhead:c.startarrowhead,arrowside:c.arrowside,arrowsize:c.arrowsize,startarrowsize:c.startarrowsize,arrowwidth:c.arrowwidth,standoff:c.standoff,startstandoff:c.startstandoff,hovertext:c.hovertext,hoverlabel:c.hoverlabel,captureevents:c.captureevents}),"calc","from-root")}),ZD=Ft((Q,$)=>{var c=_n(),g=Ls(),P=Ld(),S=Fw(),t=T6();$.exports=function(r,a,n){P(r,a,{name:"annotations",handleItemDefaults:e,fullLayout:n.fullLayout})};function e(r,a,n,o){function i(x,y){return c.coerce(r,a,t,x,y)}function s(x){var y=x+"axis",v={_fullLayout:{}};return v._fullLayout[y]=n[y],g.coercePosition(a,v,i,x,x,.5)}var f=i("visible");f&&(S(r,a,o.fullLayout,i),s("x"),s("y"),s("z"),c.noneOrAll(r,a,["x","y","z"]),a.xref="x",a.yref="y",a.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),a.showarrow&&(a.axref="pixel",a.ayref="pixel",i("ax",-10),i("ay",-30),c.noneOrAll(r,a,["ax","ay"])))}}),$D=Ft((Q,$)=>{var c=_n(),g=Ls();$.exports=function(S){for(var t=S.fullSceneLayout,e=t.annotations,r=0;r{function c(P,S){var t=[0,0,0,0],e,r;for(e=0;e<4;++e)for(r=0;r<4;++r)t[r]+=P[4*e+r]*S[e];return t}function g(P,S){var t=c(P.projection,c(P.view,c(P.model,[S[0],S[1],S[2],1])));return t}$.exports=g}),GD=Ft((Q,$)=>{var c=Q_().drawRaw,g=TM(),P=["x","y","z"];$.exports=function(S){for(var t=S.fullSceneLayout,e=S.dataScale,r=t.annotations,a=0;a1){o=!0;break}}o?S.fullLayout._infolayer.select(".annotation-"+S.id+'[data-index="'+a+'"]').remove():(n._pdata=g(S.glplot.cameraParams,[t.xaxis.r2l(n.x)*e[0],t.yaxis.r2l(n.y)*e[1],t.zaxis.r2l(n.z)*e[2]]),c(S.graphDiv,n,a,S.id,n._xa,n._ya))}}}),YD=Ft((Q,$)=>{var c=Qo(),g=_n();$.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:T6()}}},layoutAttributes:T6(),handleDefaults:ZD(),includeBasePlot:P,convert:$D(),draw:GD()};function P(S,t){var e=c.subplotsRegistry.gl3d;if(e)for(var r=e.attrRegex,a=Object.keys(S),n=0;n{var c=xm(),g=ka(),P=tf().line,S=Ed().dash,t=ya().extendFlat,e=mu().templatedArray;Yy();var r=Yo(),{shapeTexttemplateAttrs:a,templatefallbackAttrs:n}=$u(),o=_1();$.exports=e("shape",{visible:t({},r.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:t({},r.legend,{editType:"calc+arraydraw"}),legendgroup:t({},r.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:t({},r.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:g({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:t({},r.legendrank,{editType:"calc+arraydraw"}),legendwidth:t({},r.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:t({},c.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:t({},c.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:t({},P.color,{editType:"arraydraw"}),width:t({},P.width,{editType:"calc+arraydraw"}),dash:t({},S,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:a({},{keys:Object.keys(o)}),texttemplatefallback:n({editType:"arraydraw"}),font:g({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})}),KD=Ft((Q,$)=>{var c=_n(),g=Ls(),P=Ld(),S=AM(),t=kp();$.exports=function(a,n){P(a,n,{name:"shapes",handleItemDefaults:r})};function e(a,n){return a?"bottom":n.indexOf("top")!==-1?"top":n.indexOf("bottom")!==-1?"bottom":"middle"}function r(a,n,o){function i(tt,dt){return c.coerce(a,n,S,tt,dt)}n._isShape=!0;var s=i("visible");if(s){var f=i("showlegend");f&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),c.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var x=i("path"),y=x?"path":"rect",v=i("type",y),T=v!=="path";T&&delete n.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var u=i("line.width");u&&(i("line.color"),i("line.dash"));for(var b=i("xsizemode"),_=i("ysizemode"),C=["x","y"],M=0;M<2;M++){var E=C[M],A=E+"anchor",h=E==="x"?b:_,p={_fullLayout:o},k,w,R,O=g.coerceRef(a,n,p,E,void 0,"paper"),N=g.getRefType(O);if(N==="range"?(k=g.getFromId(p,O),k._shapeIndices.push(n._index),R=t.rangeToShapePosition(k),w=t.shapePositionToRange(k),(k.type==="category"||k.type==="multicategory")&&(i(E+"0shift"),i(E+"1shift"))):w=R=c.identity,T){var V=.25,H=.75,F=E+"0",U=E+"1",W=a[F],q=a[U];a[F]=w(a[F],!0),a[U]=w(a[U],!0),h==="pixel"?(i(F,0),i(U,10)):(g.coercePosition(n,p,i,O,F,V),g.coercePosition(n,p,i,O,U,H)),n[F]=R(n[F]),n[U]=R(n[U]),a[F]=W,a[U]=q}if(h==="pixel"){var X=a[A];a[A]=w(a[A],!0),g.coercePosition(n,p,i,O,A,.25),n[A]=R(n[A]),a[A]=X}}T&&c.noneOrAll(a,n,["x0","x1","y0","y1"]);var lt=v==="line",yt,pt;if(T&&(yt=i("label.texttemplate"),i("label.texttemplatefallback")),yt||(pt=i("label.text")),pt||yt){i("label.textangle");var st=i("label.textposition",lt?"middle":"middle center");i("label.xanchor"),i("label.yanchor",e(lt,st)),i("label.padding"),c.coerceFont(i,"label.font",o.font)}}}}),XD=Ft((Q,$)=>{var c=ui(),g=_n();function P(S,t){return S?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}$.exports=function(S,t,e){e("newshape.visible"),e("newshape.name"),e("newshape.showlegend"),e("newshape.legend"),e("newshape.legendwidth"),e("newshape.legendgroup"),e("newshape.legendgrouptitle.text"),g.coerceFont(e,"newshape.legendgrouptitle.font"),e("newshape.legendrank"),e("newshape.drawdirection"),e("newshape.layer"),e("newshape.fillcolor"),e("newshape.fillrule"),e("newshape.opacity");var r=e("newshape.line.width");if(r){var a=(S||{}).plot_bgcolor||"#FFF";e("newshape.line.color",c.contrast(a)),e("newshape.line.dash")}var n=S.dragmode==="drawline",o=e("newshape.label.text"),i=e("newshape.label.texttemplate");if(e("newshape.label.texttemplatefallback"),o||i){e("newshape.label.textangle");var s=e("newshape.label.textposition",n?"middle":"middle center");e("newshape.label.xanchor"),e("newshape.label.yanchor",P(n,s)),e("newshape.label.padding"),g.coerceFont(e,"newshape.label.font",t.font)}e("activeshape.fillcolor"),e("activeshape.opacity")}}),JD=Ft((Q,$)=>{var c=_n(),g=Ls(),P=Vy(),S=kp();$.exports=function(n){var o=n._fullLayout,i=c.filterVisible(o.shapes);if(!(!i.length||!n._fullData.length))for(var s=0;s0?u+y:y;return{ppad:y,ppadplus:v?_:C,ppadminus:v?C:_}}else return{ppad:y}}function a(n,o,i){var s=n._id.charAt(0)==="x"?"x":"y",f=n.type==="category"||n.type==="multicategory",x,y,v=0,T=0,u=f?n.r2c:n.d2c,b=o[s+"sizemode"]==="scaled";if(b?(x=o[s+"0"],y=o[s+"1"],f&&(v=o[s+"0shift"],T=o[s+"1shift"])):(x=o[s+"anchor"],y=o[s+"anchor"]),x!==void 0)return[u(x)+v,u(y)+T];if(o.path){var _=1/0,C=-1/0,M=o.path.match(P.segmentRE),E,A,h,p,k;for(n.type==="date"&&(u=S.decodeDate(u)),E=0;EC&&(C=k)));if(C>=_)return[_,C]}}}),QD=Ft((Q,$)=>{var c=H_();$.exports={moduleType:"component",name:"shapes",layoutAttributes:AM(),supplyLayoutDefaults:KD(),supplyDrawNewShapeDefaults:XD(),includeBasePlot:Eg()("shapes"),calcAutorange:JD(),draw:c.draw,drawOne:c.drawOne}}),MM=Ft((Q,$)=>{var c=ac(),g=mu().templatedArray;Yy(),$.exports=g("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",c.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",c.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}),tF=Ft((Q,$)=>{var c=_n(),g=Ls(),P=Ld(),S=MM(),t="images";$.exports=function(r,a){var n={name:t,handleItemDefaults:e};P(r,a,n)};function e(r,a,n){function o(b,_){return c.coerce(r,a,S,b,_)}var i=o("source"),s=o("visible",!!i);if(!s)return a;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var f={_fullLayout:n},x=["x","y"],y=0;y<2;y++){var v=x[y],T=g.coerceRef(r,a,f,v,"paper",void 0);if(T!=="paper"){var u=g.getFromId(f,T);u._imgIndices.push(a._index)}g.coercePosition(a,f,o,T,v,0)}return a}}),eF=Ft((Q,$)=>{var c=En(),g=Vs(),P=Ls(),S=Rc(),t=Bp();$.exports=function(e){var r=e._fullLayout,a=[],n={},o=[],i,s;for(s=0;s{var c=ia(),g=co();$.exports=function(P,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(r||a){for(var n=P._fullLayout.images,o=S._id.charAt(0),i,s,f=0;f{$.exports={moduleType:"component",name:"images",layoutAttributes:MM(),supplyLayoutDefaults:tF(),includeBasePlot:Eg()("images"),draw:eF(),convertCoords:rF()}}),A6=Ft((Q,$)=>{$.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}}),SM=Ft((Q,$)=>{var c=ka(),g=yi(),P=ya().extendFlat,S=Yc().overrideAll,t=Fy(),e=mu().templatedArray,r=e("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});$.exports=S(e("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:r,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:P(t({editType:"arraydraw"}),{}),font:c({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:g.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}),iF=Ft((Q,$)=>{var c=_n(),g=Ld(),P=SM(),S=A6(),t=S.name,e=P.buttons;$.exports=function(n,o){var i={name:t,handleItemDefaults:r};g(n,o,i)};function r(n,o,i){function s(y,v){return c.coerce(n,o,P,y,v)}var f=g(n,o,{name:"buttons",handleItemDefaults:a}),x=s("visible",f.length>0);x&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),c.noneOrAll(n,o,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),c.coerceFont(s,"font",i.font),s("bgcolor",i.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function a(n,o){function i(f,x){return c.coerce(n,o,e,f,x)}var s=i("visible",n.method==="skip"||Array.isArray(n.args));s&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}),aF=Ft((Q,$)=>{$.exports=t;var c=En(),g=ui(),P=Vs(),S=_n();function t(e,r,a){this.gd=e,this.container=r,this.id=a,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}t.barWidth=2,t.barLength=20,t.barRadius=2,t.barPad=1,t.barColor="#808BA4",t.prototype.enable=function(e,r,a){var n=this.gd._fullLayout,o=n.width,i=n.height;this.position=e;var s=this.position.l,f=this.position.w,x=this.position.t,y=this.position.h,v=this.position.direction,T=v==="down",u=v==="left",b=v==="right",_=v==="up",C=f,M=y,E,A,h,p;!T&&!u&&!b&&!_&&(this.position.direction="down",T=!0);var k=T||_;k?(E=s,A=E+C,T?(h=x,p=Math.min(h+M,i),M=p-h):(p=x+M,h=Math.max(p-M,0),M=p-h)):(h=x,p=h+M,u?(A=s+C,E=Math.max(A-C,0),C=A-E):(E=s,A=Math.min(E+C,o),C=A-E)),this._box={l:E,t:h,w:C,h:M};var w=f>C,R=t.barLength+2*t.barPad,O=t.barWidth+2*t.barPad,N=s,V=x+y;V+O>i&&(V=i-O);var H=this.container.selectAll("rect.scrollbar-horizontal").data(w?[0]:[]);H.exit().on(".drag",null).remove(),H.enter().append("rect").classed("scrollbar-horizontal",!0).call(g.fill,t.barColor),w?(this.hbar=H.attr({rx:t.barRadius,ry:t.barRadius,x:N,y:V,width:R,height:O}),this._hbarXMin=N+R/2,this._hbarTranslateMax=C-R):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var F=y>M,U=t.barWidth+2*t.barPad,W=t.barLength+2*t.barPad,q=s+f,X=x;q+U>o&&(q=o-U);var lt=this.container.selectAll("rect.scrollbar-vertical").data(F?[0]:[]);lt.exit().on(".drag",null).remove(),lt.enter().append("rect").classed("scrollbar-vertical",!0).call(g.fill,t.barColor),F?(this.vbar=lt.attr({rx:t.barRadius,ry:t.barRadius,x:q,y:X,width:U,height:W}),this._vbarYMin=X+W/2,this._vbarTranslateMax=M-W):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var yt=this.id,pt=E-.5,st=F?A+U+.5:A+.5,tt=h-.5,dt=w?p+O+.5:p+.5,rt=n._topdefs.selectAll("#"+yt).data(w||F?[0]:[]);if(rt.exit().remove(),rt.enter().append("clipPath").attr("id",yt).append("rect"),w||F?(this._clipRect=rt.select("rect").attr({x:Math.floor(pt),y:Math.floor(tt),width:Math.ceil(st)-Math.floor(pt),height:Math.ceil(dt)-Math.floor(tt)}),this.container.call(P.setClipUrl,yt,this.gd),this.bg.attr({x:s,y:x,width:f,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(P.setClipUrl,null),delete this._clipRect),w||F){var at=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(at);var vt=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault(),c.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));w&&this.hbar.on(".drag",null).call(vt),F&&this.vbar.on(".drag",null).call(vt)}this.setTranslate(r,a)},t.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(P.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},t.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=c.event.dx),this.vbar&&(r-=c.event.dy),this.setTranslate(e,r)},t.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=c.event.deltaY),this.vbar&&(r+=c.event.deltaY),this.setTranslate(e,r)},t.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,n=a+this._hbarTranslateMax,o=S.constrain(c.event.x,a,n),i=(o-a)/(n-a),s=this.position.w-this._box.w;e=i*s}if(this.vbar){var f=r+this._vbarYMin,x=f+this._vbarTranslateMax,y=S.constrain(c.event.y,f,x),v=(y-f)/(x-f),T=this.position.h-this._box.h;r=v*T}this.setTranslate(e,r)},t.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=S.constrain(e||0,0,a),r=S.constrain(r||0,0,n),this.translateX=e,this.translateY=r,this.container.call(P.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var o=e/a;this.hbar.call(P.setTranslate,e+o*this._hbarTranslateMax,r)}if(this.vbar){var i=r/n;this.vbar.call(P.setTranslate,e,r+i*this._vbarTranslateMax)}}}),oF=Ft((Q,$)=>{var c=En(),g=Kc(),P=ui(),S=Vs(),t=_n(),e=tc(),r=mu().arrayEditor,a=Sf().LINE_SPACING,n=A6(),o=aF();$.exports=function(R){var O=R._fullLayout,N=t.filterVisible(O[n.name]);function V(yt){g.autoMargin(R,p(yt))}var H=O._menulayer.selectAll("g."+n.containerClassName).data(N.length>0?[0]:[]);if(H.enter().append("g").classed(n.containerClassName,!0).style("cursor","pointer"),H.exit().each(function(){c.select(this).selectAll("g."+n.headerGroupClassName).each(V)}).remove(),N.length!==0){var F=H.selectAll("g."+n.headerGroupClassName).data(N,i);F.enter().append("g").classed(n.headerGroupClassName,!0);for(var U=t.ensureSingle(H,"g",n.dropdownButtonGroupClassName,function(yt){yt.style("pointer-events","all")}),W=0;W{var c=A6();$.exports={moduleType:"component",name:c.name,layoutAttributes:SM(),supplyLayoutDefaults:iF(),draw:oF()}}),Bw=Ft((Q,$)=>{$.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}}),EM=Ft((Q,$)=>{var c=ka(),g=Fy(),P=ya().extendDeepAll,S=Yc().overrideAll,t=Ll(),e=mu().templatedArray,r=Bw(),a=e("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});$.exports=S(e("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:a,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:P(g({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:t.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:c({})},font:c({}),activebgcolor:{valType:"color",dflt:r.gripBgActiveColor},bgcolor:{valType:"color",dflt:r.railBgColor},bordercolor:{valType:"color",dflt:r.railBorderColor},borderwidth:{valType:"number",min:0,dflt:r.railBorderWidth},ticklen:{valType:"number",min:0,dflt:r.tickLength},tickcolor:{valType:"color",dflt:r.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:r.minorTickLength}}),"arraydraw","from-root")}),lF=Ft((Q,$)=>{var c=_n(),g=Ld(),P=EM(),S=Bw(),t=S.name,e=P.steps;$.exports=function(n,o){g(n,o,{name:t,handleItemDefaults:r})};function r(n,o,i){function s(_,C){return c.coerce(n,o,P,_,C)}for(var f=g(n,o,{name:"steps",handleItemDefaults:a}),x=0,y=0;y{var c=En(),g=Kc(),P=ui(),S=Vs(),t=_n(),e=t.strTranslate,r=tc(),a=mu().arrayEditor,n=Bw(),o=Sf(),i=o.LINE_SPACING,s=o.FROM_TL,f=o.FROM_BR;$.exports=function(H){var F=H._context.staticPlot,U=H._fullLayout,W=y(U,H),q=U._infolayer.selectAll("g."+n.containerClassName).data(W.length>0?[0]:[]);q.enter().append("g").classed(n.containerClassName,!0).style("cursor",F?null:"ew-resize");function X(st){st._commandObserver&&(st._commandObserver.remove(),delete st._commandObserver),g.autoMargin(H,x(st))}if(q.exit().each(function(){c.select(this).selectAll("g."+n.groupClassName).each(X)}).remove(),W.length!==0){var lt=q.selectAll("g."+n.groupClassName).data(W,v);lt.enter().append("g").classed(n.groupClassName,!0),lt.exit().each(X).remove();for(var yt=0;yt0&&(yt=yt.transition().duration(F.transition.duration).ease(F.transition.easing)),yt.attr("transform",e(lt-n.gripWidth*.5,F._dims.currentValueTotalHeight))}}function R(H,F){var U=H._dims;return U.inputAreaStart+n.stepInset+(U.inputAreaLength-2*n.stepInset)*Math.min(1,Math.max(0,F))}function O(H,F){var U=H._dims;return Math.min(1,Math.max(0,(F-n.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*n.stepInset-2*U.inputAreaStart)))}function N(H,F,U){var W=U._dims,q=t.ensureSingle(H,"rect",n.railTouchRectClass,function(X){X.call(h,F,H,U).style("pointer-events","all")});q.attr({width:W.inputAreaLength,height:Math.max(W.inputAreaWidth,n.tickOffset+U.ticklen+W.labelHeight)}).call(P.fill,U.bgcolor).attr("opacity",0),S.setTranslate(q,0,W.currentValueTotalHeight)}function V(H,F){var U=F._dims,W=U.inputAreaLength-n.railInset*2,q=t.ensureSingle(H,"rect",n.railRectClass);q.attr({width:W,height:n.railWidth,rx:n.railRadius,ry:n.railRadius,"shape-rendering":"crispEdges"}).call(P.stroke,F.bordercolor).call(P.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),S.setTranslate(q,n.railInset,(U.inputAreaWidth-n.railWidth)*.5+U.currentValueTotalHeight)}}),cF=Ft((Q,$)=>{var c=Bw();$.exports={moduleType:"component",name:c.name,layoutAttributes:EM(),supplyLayoutDefaults:lF(),draw:uF()}}),M6=Ft((Q,$)=>{var c=yi();$.exports={bgcolor:{valType:"color",dflt:c.background,editType:"plot"},bordercolor:{valType:"color",dflt:c.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}),CM=Ft((Q,$)=>{$.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}),S6=Ft((Q,$)=>{$.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}),hF=Ft(Q=>{var $=Rc(),c=tc(),g=S6(),P=Sf().LINE_SPACING,S=g.name;function t(e){var r=e&&e[S];return r&&r.visible}Q.isVisible=t,Q.makeData=function(e){for(var r=$.list({_fullLayout:e},"x",!0),a=e.margin,n=[],o=0;o{var c=_n(),g=mu(),P=Rc(),S=M6(),t=CM();$.exports=function(e,r,a){var n=e[a],o=r[a];if(!(n.rangeslider||r._requestRangeslider[o._id]))return;c.isPlainObject(n.rangeslider)||(n.rangeslider={});var i=n.rangeslider,s=g.newContainer(o,"rangeslider");function f(p,k){return c.coerce(i,s,S,p,k)}var x,y;function v(p,k){return c.coerce(x,y,t,p,k)}var T=f("visible");if(T){f("bgcolor",r.plot_bgcolor),f("bordercolor"),f("borderwidth"),f("thickness"),f("autorange",!o.isValidRange(i.range)),f("range");var u=r._subplots;if(u)for(var b=u.cartesian.filter(function(p){return p.substr(0,p.indexOf("y"))===P.name2id(a)}).map(function(p){return p.substr(p.indexOf("y"),p.length)}),_=c.simpleMap(b,P.id2name),C=0;C<_.length;C++){var M=_[C];x=i[M]||{},y=g.newContainer(s,M,"yaxis");var E=r[M],A;x.range&&E.isValidRange(x.range)&&(A="fixed");var h=v("rangemode",A);h!=="match"&&v("range",E.range.slice())}s._input=i}}}),dF=Ft((Q,$)=>{var c=Rc().list,g=J0().getAutoRange,P=S6();$.exports=function(S){for(var t=c(S,"x",!0),e=0;e{var c=En(),g=Qo(),P=Kc(),S=_n(),t=S.strTranslate,e=Vs(),r=ui(),a=cp(),n=Ef(),o=Rc(),i=hp(),s=O0(),f=S6();$.exports=function(h){for(var p=h._fullLayout,k=p._rangeSliderData,w=0;w=he.max)Jt=wt[ge+1];else if(Ht=he.pmax)Jt=wt[ge+1];else if(Ht0?h.touches[0].clientX:0}function y(h,p,k,w){if(p._context.staticPlot)return;var R=h.select("rect."+f.slideBoxClassName).node(),O=h.select("rect."+f.grabAreaMinClassName).node(),N=h.select("rect."+f.grabAreaMaxClassName).node();function V(){var H=c.event,F=H.target,U=x(H),W=U-h.node().getBoundingClientRect().left,q=w.d2p(k._rl[0]),X=w.d2p(k._rl[1]),lt=i.coverSlip();this.addEventListener("touchmove",yt),this.addEventListener("touchend",pt),lt.addEventListener("mousemove",yt),lt.addEventListener("mouseup",pt);function yt(st){var tt=x(st),dt=+tt-U,rt,at,vt;switch(F){case R:if(vt="ew-resize",q+dt>k._length||X+dt<0)return;rt=q+dt,at=X+dt;break;case O:if(vt="col-resize",q+dt>k._length)return;rt=q+dt,at=X;break;case N:if(vt="col-resize",X+dt<0)return;rt=q,at=X+dt;break;default:vt="ew-resize",rt=W,at=W+dt;break}if(at{var c=_n(),g=M6(),P=CM(),S=hF();$.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:c.extendFlat({},g,{yaxis:P})}}},layoutAttributes:M6(),handleDefaults:fF(),calcAutorange:dF(),draw:pF(),isVisible:S.isVisible,makeData:S.makeData,autoMarginOpts:S.autoMarginOpts}}),E6=Ft((Q,$)=>{var c=ka(),g=yi(),P=mu().templatedArray,S=P("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});$.exports={visible:{valType:"boolean",editType:"plot"},buttons:S,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:c({editType:"plot"}),bgcolor:{valType:"color",dflt:g.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}),LM=Ft((Q,$)=>{$.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}),gF=Ft((Q,$)=>{var c=_n(),g=ui(),P=mu(),S=Ld(),t=E6(),e=LM();$.exports=function(n,o,i,s,f){var x=n.rangeselector||{},y=P.newContainer(o,"rangeselector");function v(C,M){return c.coerce(x,y,t,C,M)}var T=S(x,y,{name:"buttons",handleItemDefaults:r,calendar:f}),u=v("visible",T.length>0);if(u){var b=a(o,i,s);v("x",b[0]),v("y",b[1]),c.noneOrAll(n,o,["x","y"]),v("xanchor"),v("yanchor"),c.coerceFont(v,"font",i.font);var _=v("bgcolor");v("activecolor",g.contrast(_,e.lightAmount,e.darkAmount)),v("bordercolor"),v("borderwidth")}};function r(n,o,i,s){var f=s.calendar;function x(T,u){return c.coerce(n,o,t.buttons,T,u)}var y=x("visible");if(y){var v=x("step");v!=="all"&&(f&&f!=="gregorian"&&(v==="month"||v==="year")?o.stepmode="backward":x("stepmode"),x("count")),x("label")}}function a(n,o,i){for(var s=i.filter(function(v){return o[v].anchor===n._id}),f=0,x=0;x{var c=Fa(),g=_n().titleCase;$.exports=function(S,t){var e=S._name,r={};if(t.step==="all")r[e+".autorange"]=!0;else{var a=P(S,t);r[e+".range[0]"]=a[0],r[e+".range[1]"]=a[1]}return r};function P(S,t){var e=S.range,r=new Date(S.r2l(e[1])),a=t.step,n=c["utc"+g(a)],o=t.count,i;switch(t.stepmode){case"backward":i=S.l2r(+n.offset(r,-o));break;case"todate":var s=n.offset(r,-o);i=S.l2r(+n.ceil(s));break}var f=e[1];return[i,f]}}),yF=Ft((Q,$)=>{var c=En(),g=Qo(),P=Kc(),S=ui(),t=Vs(),e=_n(),r=e.strTranslate,a=tc(),n=Rc(),o=Sf(),i=o.LINE_SPACING,s=o.FROM_TL,f=o.FROM_BR,x=LM(),y=vF();$.exports=function(A){var h=A._fullLayout,p=h._infolayer.selectAll(".rangeselector").data(v(A),T);p.enter().append("g").classed("rangeselector",!0),p.exit().remove(),p.style({cursor:"pointer","pointer-events":"all"}),p.each(function(k){var w=c.select(this),R=k,O=R.rangeselector,N=w.selectAll("g.button").data(e.filterVisible(O.buttons));N.enter().append("g").classed("button",!0),N.exit().remove(),N.each(function(V){var H=c.select(this),F=y(R,V);V._isActive=u(R,V,F),H.call(b,O,V),H.call(C,O,V,A),H.on("click",function(){A._dragged||g.call("_guiRelayout",A,F)}),H.on("mouseover",function(){V._isHovered=!0,H.call(b,O,V)}),H.on("mouseout",function(){V._isHovered=!1,H.call(b,O,V)})}),E(A,N,O,R._name,w)})};function v(A){for(var h=n.list(A,"x",!0),p=[],k=0;k{$.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:E6()}}},layoutAttributes:E6(),handleDefaults:gF(),draw:yF()}}),jh=Ft(Q=>{var $=ya().extendFlat;Q.attributes=function(c,g){c=c||{},g=g||{};var P={valType:"info_array",editType:c.editType,items:[{valType:"number",min:0,max:1,editType:c.editType},{valType:"number",min:0,max:1,editType:c.editType}],dflt:[0,1]};c.name&&c.name+"",c.trace,g.description&&""+g.description;var S={x:$({},P,{}),y:$({},P,{}),editType:c.editType};return c.noGridCell||(S.row={valType:"integer",min:0,dflt:0,editType:c.editType},S.column={valType:"integer",min:0,dflt:0,editType:c.editType}),S},Q.defaults=function(c,g,P,S){var t=S&&S.x||[0,1],e=S&&S.y||[0,1],r=g.grid;if(r){var a=P("domain.column");a!==void 0&&(a{var c=_n(),g=So().counter,P=jh().attributes,S=ac().idRegex,t=mu(),e={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[g("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:P({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function r(s,f,x){var y=f[x+"axes"],v=Object.keys((s._splomAxes||{})[x]||{});if(Array.isArray(y))return y;if(v.length)return v}function a(s,f){var x=s.grid||{},y=r(f,x,"x"),v=r(f,x,"y");if(!s.grid&&!y&&!v)return;var T=Array.isArray(x.subplots)&&Array.isArray(x.subplots[0]),u=Array.isArray(y),b=Array.isArray(v),_=u&&y!==x.xaxes&&b&&v!==x.yaxes,C,M;T?(C=x.subplots.length,M=x.subplots[0].length):(b&&(C=v.length),u&&(M=y.length));var E=t.newContainer(f,"grid");function A(F,U){return c.coerce(x,E,e,F,U)}var h=A("rows",C),p=A("columns",M);if(!(h*p>1)){delete f.grid;return}if(!T&&!u&&!b){var k=A("pattern")==="independent";k&&(T=!0)}E._hasSubplotGrid=T;var w=A("roworder"),R=w==="top to bottom",O=T?.2:.1,N=T?.3:.1,V,H;_&&f._splomGridDflt&&(V=f._splomGridDflt.xside,H=f._splomGridDflt.yside),E._domains={x:n("x",A,O,V,p),y:n("y",A,N,H,h,R)}}function n(s,f,x,y,v,T){var u=f(s+"gap",x),b=f("domain."+s);f(s+"side",y);for(var _=new Array(v),C=b[0],M=(b[1]-C)/(v-u),E=M*(1-u),A=0;A{$.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}}),_F=Ft((Q,$)=>{var c=ia(),g=Qo(),P=_n(),S=mu(),t=zM();$.exports=function(e,r,a,n){var o="error_"+n.axis,i=S.newContainer(r,o),s=e[o]||{};function f(_,C){return P.coerce(s,i,t,_,C)}var x=s.array!==void 0||s.value!==void 0||s.type==="sqrt",y=f("visible",x);if(y!==!1){var v=f("type","array"in s?"data":"percent"),T=!0;v!=="sqrt"&&(T=f("symmetric",!((v==="data"?"arrayminus":"valueminus")in s))),v==="data"?(f("array"),f("traceref"),T||(f("arrayminus"),f("tracerefminus"))):(v==="percent"||v==="constant")&&(f("value"),T||f("valueminus"));var u="copy_"+n.inherit+"style";if(n.inherit){var b=r["error_"+n.inherit];(b||{}).visible&&f(u,!(s.color||c(s.thickness)||c(s.width)))}(!n.inherit||!i[u])&&(f("color",a),f("thickness"),f("width",g.traceIs(r,"gl3d")?0:4))}}}),IM=Ft((Q,$)=>{$.exports=function(g){var P=g.type,S=g.symmetric;if(P==="data"){var t=g.array||[];if(S)return function(n,o){var i=+t[o];return[i,i]};var e=g.arrayminus||[];return function(n,o){var i=+t[o],s=+e[o];return!isNaN(i)||!isNaN(s)?[s||0,i||0]:[NaN,NaN]}}else{var r=c(P,g.value),a=c(P,g.valueminus);return S||g.valueminus===void 0?function(n){var o=r(n);return[o,o]}:function(n){return[a(n),r(n)]}}};function c(g,P){if(g==="percent")return function(S){return Math.abs(S*P/100)};if(g==="constant")return function(){return Math.abs(P)};if(g==="sqrt")return function(S){return Math.sqrt(Math.abs(S))}}}),bF=Ft((Q,$)=>{var c=ia(),g=Qo(),P=Ls(),S=_n(),t=IM();$.exports=function(r){for(var a=r.calcdata,n=0;n{var c=En(),g=ia(),P=Vs(),S=Mc();$.exports=function(e,r,a,n){var o,i=a.xaxis,s=a.yaxis,f=n&&n.duration>0,x=e._context.staticPlot;r.each(function(y){var v=y[0].trace,T=v.error_x||{},u=v.error_y||{},b;v.ids&&(b=function(E){return E.id});var _=S.hasMarkers(v)&&v.marker.maxdisplayed>0;!u.visible&&!T.visible&&(y=[]);var C=c.select(this).selectAll("g.errorbar").data(y,b);if(C.exit().remove(),!!y.length){T.visible||C.selectAll("path.xerror").remove(),u.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var M=C.enter().append("g").classed("errorbar",!0);f&&M.style("opacity",0).transition().duration(n.duration).style("opacity",1),P.setClipUrl(C,a.layerClipId,e),C.each(function(E){var A=c.select(this),h=t(E,i,s);if(!(_&&!E.vis)){var p,k=A.select("path.yerror");if(u.visible&&g(h.x)&&g(h.yh)&&g(h.ys)){var w=u.width;p="M"+(h.x-w)+","+h.yh+"h"+2*w+"m-"+w+",0V"+h.ys,h.noYS||(p+="m-"+w+",0h"+2*w),o=!k.size(),o?k=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("yerror",!0):f&&(k=k.transition().duration(n.duration).ease(n.easing)),k.attr("d",p)}else k.remove();var R=A.select("path.xerror");if(T.visible&&g(h.y)&&g(h.xh)&&g(h.xs)){var O=(T.copy_ystyle?u:T).width;p="M"+h.xh+","+(h.y-O)+"v"+2*O+"m0,-"+O+"H"+h.xs,h.noXS||(p+="m0,-"+O+"v"+2*O),o=!R.size(),o?R=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("xerror",!0):f&&(R=R.transition().duration(n.duration).ease(n.easing)),R.attr("d",p)}else R.remove()}})}})};function t(e,r,a){var n={x:r.c2p(e.x),y:a.c2p(e.y)};return e.yh!==void 0&&(n.yh=a.c2p(e.yh),n.ys=a.c2p(e.ys),g(n.ys)||(n.noYS=!0,n.ys=a.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=r.c2p(e.xh),n.xs=r.c2p(e.xs),g(n.xs)||(n.noXS=!0,n.xs=r.c2p(e.xs,!0))),n}}),kF=Ft((Q,$)=>{var c=En(),g=ui();$.exports=function(P){P.each(function(S){var t=S[0].trace,e=t.error_y||{},r=t.error_x||{},a=c.select(this);a.selectAll("path.yerror").style("stroke-width",e.thickness+"px").call(g.stroke,e.color),r.copy_ystyle&&(r=e),a.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(g.stroke,r.color)})}}),TF=Ft((Q,$)=>{var c=_n(),g=Yc().overrideAll,P=zM(),S={error_x:c.extendFlat({},P),error_y:c.extendFlat({},P)};delete S.error_x.copy_zstyle,delete S.error_y.copy_zstyle,delete S.error_y.copy_ystyle;var t={error_x:c.extendFlat({},P),error_y:c.extendFlat({},P),error_z:c.extendFlat({},P)};delete t.error_x.copy_ystyle,delete t.error_y.copy_ystyle,delete t.error_z.copy_ystyle,delete t.error_z.copy_zstyle,$.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:S,bar:S,histogram:S,scatter3d:g(t,"calc","nested"),scattergl:g(S,"calc","nested")}},supplyDefaults:_F(),calc:bF(),makeComputeError:IM(),plot:wF(),style:kF(),hoverInfo:e};function e(r,a,n){(a.error_y||{}).visible&&(n.yerr=r.yh-r.y,a.error_y.symmetric||(n.yerrneg=r.y-r.ys)),(a.error_x||{}).visible&&(n.xerr=r.xh-r.x,a.error_x.symmetric||(n.xerrneg=r.x-r.xs))}}),AF=Ft((Q,$)=>{$.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}),MF=Ft((Q,$)=>{var c=En(),g=eo(),P=Kc(),S=Qo(),t=Ls(),e=hp(),r=_n(),a=r.strTranslate,n=ya().extendFlat,o=O0(),i=Vs(),s=ui(),f=cp(),x=tc(),y=Zd().flipScale,v=Qy(),T=J_(),u=Cd(),b=Sf(),_=b.LINE_SPACING,C=b.FROM_TL,M=b.FROM_BR,E=AF().cn;function A(O){var N=O._fullLayout,V=N._infolayer.selectAll("g."+E.colorbar).data(h(O),function(H){return H._id});V.enter().append("g").attr("class",function(H){return H._id}).classed(E.colorbar,!0),V.each(function(H){var F=c.select(this);r.ensureSingle(F,"rect",E.cbbg),r.ensureSingle(F,"g",E.cbfills),r.ensureSingle(F,"g",E.cblines),r.ensureSingle(F,"g",E.cbaxis,function(W){W.classed(E.crisp,!0)}),r.ensureSingle(F,"g",E.cbtitleunshift,function(W){W.append("g").classed(E.cbtitle,!0)}),r.ensureSingle(F,"rect",E.cboutline);var U=p(F,H,O);U&&U.then&&(O._promises||[]).push(U),O._context.edits.colorbarPosition&&k(F,H,O)}),V.exit().each(function(H){P.autoMargin(O,H._id)}).remove(),V.order()}function h(O){var N=O._fullLayout,V=O.calcdata,H=[],F,U,W,q;function X(Y){return n(Y,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function lt(){typeof q.calc=="function"?q.calc(O,W,F):(F._fillgradient=U.reversescale?y(U.colorscale):U.colorscale,F._zrange=[U[q.min],U[q.max]])}for(var yt=0;yt1){var Gt=Math.pow(10,Math.floor(Math.log(Ce)/Math.LN10));Kr*=Gt*r.roundUp(Ce/Gt,[2,5,10]),(Math.abs(ge.start)/ge.size+1e-6)%1<2e-6&&(Hr.tick0=0)}Hr.dtick=Kr}Hr.domain=H?[ur+dt/ft.h,ur+te-dt/ft.h]:[ur+tt/ft.w,ur+te-tt/ft.w],Hr.setScale(),O.attr("transform",a(Math.round(ft.l),Math.round(ft.t)));var ne=O.select("."+E.cbtitleunshift).attr("transform",a(-Math.round(ft.l),-Math.round(ft.t))),Ct=Hr.ticklabelposition,gt=Hr.title.font.size,St=O.select("."+E.cbaxis),Nt,re=0,le=0;function we(Tr,pr){var Jr={propContainer:Hr,propName:N._propPrefix+"title.text",traceIndex:N._traceIndex,_meta:N._meta,placeholder:Y._dfltTitle.colorbar,containerGroup:O.select("."+E.cbtitle)},Vn=Tr.charAt(0)==="h"?Tr.substr(1):"h"+Tr;O.selectAll("."+Vn+",."+Vn+"-math-group").remove(),f.draw(V,Tr,n(Jr,pr||{}))}function Ue(){if(H&&br||!H&&!br){var Tr,pr;Pt==="top"&&(Tr=tt+ft.l+ve*rt,pr=dt+ft.t+oe*(1-ur-te)+3+gt*.75),Pt==="bottom"&&(Tr=tt+ft.l+ve*rt,pr=dt+ft.t+oe*(1-ur)-3-gt*.25),Pt==="right"&&(pr=dt+ft.t+oe*at+3+gt*.75,Tr=tt+ft.l+ve*ur),we(Hr._id+"title",{attributes:{x:Tr,y:pr,"text-anchor":H?"start":"middle"}})}}function qe(){if(H&&!br||!H&&br){var Tr=Hr.position||0,pr=Hr._offset+Hr._length/2,Jr,Vn;if(Pt==="right")Vn=pr,Jr=ft.l+ve*Tr+10+gt*(Hr.showticklabels?1:.5);else if(Jr=pr,Pt==="bottom"&&(Vn=ft.t+oe*Tr+10+(Ct.indexOf("inside")===-1?Hr.tickfont.size:0)+(Hr.ticks!=="inside"&&N.ticklen||0)),Pt==="top"){var Hn=zt.text.split("
").length;Vn=ft.t+oe*Tr+10-Tt-_*gt*Hn}we((H?"h":"v")+Hr._id+"title",{avoid:{selection:c.select(V).selectAll("g."+Hr._id+"tick"),side:Pt,offsetTop:H?0:ft.t,offsetLeft:H?ft.l:0,maxShift:H?Y.width:Y.height},attributes:{x:Jr,y:Vn,"text-anchor":"middle"},transform:{rotate:H?-90:0,offset:0}})}}function or(){if(!H&&!br||H&&br){var Tr=O.select("."+E.cbtitle),pr=Tr.select("text"),Jr=[-X/2,X/2],Vn=Tr.select(".h"+Hr._id+"title-math-group").node(),Hn=15.6;pr.node()&&(Hn=parseInt(pr.node().style.fontSize,10)*_);var Kn;if(Vn?(Kn=i.bBox(Vn),le=Kn.width,re=Kn.height,re>Hn&&(Jr[1]-=(re-Hn)/2)):pr.node()&&!pr.classed(E.jsPlaceholder)&&(Kn=i.bBox(pr.node()),le=Kn.width,re=Kn.height),H){if(re){if(re+=5,Pt==="top")Hr.domain[1]-=re/ft.h,Jr[1]*=-1;else{Hr.domain[0]+=re/ft.h;var Ci=x.lineCount(pr);Jr[1]+=(1-Ci)*Hn}Tr.attr("transform",a(Jr[0],Jr[1])),Hr.setScale()}}else le&&(Pt==="right"&&(Hr.domain[0]+=(le+gt/2)/ft.w),Tr.attr("transform",a(Jr[0],Jr[1])),Hr.setScale())}O.selectAll("."+E.cbfills+",."+E.cblines).attr("transform",H?a(0,Math.round(ft.h*(1-Hr.domain[1]))):a(Math.round(ft.w*Hr.domain[0]),0)),St.attr("transform",H?a(0,Math.round(-ft.t)):a(Math.round(-ft.l),0));var ii=O.select("."+E.cbfills).selectAll("rect."+E.cbfill).attr("style","").data(de);ii.enter().append("rect").classed(E.cbfill,!0).attr("style",""),ii.exit().remove();var qn=Wt.map(Hr.c2p).map(Math.round).sort(function(fr,_r){return fr-_r});ii.each(function(fr,_r){var Qr=[_r===0?Wt[0]:(de[_r]+de[_r-1])/2,_r===de.length-1?Wt[1]:(de[_r]+de[_r+1])/2].map(Hr.c2p).map(Math.round);H&&(Qr[1]=r.constrain(Qr[1]+(Qr[1]>Qr[0])?1:-1,qn[0],qn[1]));var Cn=c.select(this).attr(H?"x":"y",Te).attr(H?"y":"x",c.min(Qr)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(c.max(Qr)-c.min(Qr),2));if(N._fillgradient)i.gradient(Cn,V,N._id,H?"vertical":"horizontalreversed",N._fillgradient,"fill");else{var bn=Jt(fr).replace("e-","");Cn.attr("fill",g(bn).toHexString())}});var aa=O.select("."+E.cblines).selectAll("path."+E.cbline).data(wt.color&&wt.width?se:[]);aa.enter().append("path").classed(E.cbline,!0),aa.exit().remove(),aa.each(function(fr){var _r=Te,Qr=Math.round(Hr.c2p(fr))+wt.width/2%1;c.select(this).attr("d","M"+(H?_r+","+Qr:Qr+","+_r)+(H?"h":"v")+Tt).call(i.lineGroupStyle,wt.width,Ht(fr),wt.dash)}),St.selectAll("g."+Hr._id+"tick,path").remove();var Vi=Te+Tt+(X||0)/2-(N.ticks==="outside"?1:0),We=t.calcTicks(Hr),rr=t.getTickSigns(Hr)[2];return t.drawTicks(V,Hr,{vals:Hr.ticks==="inside"?t.clipEnds(Hr,We):We,layer:St,path:t.makeTickPath(Hr,Vi,rr),transFn:t.makeTransTickFn(Hr)}),t.drawLabels(V,Hr,{vals:We,layer:St,transFn:t.makeTransTickLabelFn(Hr),labelFns:t.makeLabelFns(Hr,Vi)})}function Ar(){var Tr,pr=Tt+X/2;Ct.indexOf("inside")===-1&&(Tr=i.bBox(St.node()),pr+=H?Tr.width:Tr.height),Nt=ne.select("text");var Jr=0,Vn=H&&Pt==="top",Hn=!H&&Pt==="right",Kn=0;if(Nt.node()&&!Nt.classed(E.jsPlaceholder)){var Ci,ii=ne.select(".h"+Hr._id+"title-math-group").node();ii&&(H&&br||!H&&!br)?(Tr=i.bBox(ii),Jr=Tr.width,Ci=Tr.height):(Tr=i.bBox(ne.node()),Jr=Tr.right-ft.l-(H?Te:jr),Ci=Tr.bottom-ft.t-(H?jr:Te),!H&&Pt==="top"&&(pr+=Tr.height,Kn=Tr.height)),Hn&&(Nt.attr("transform",a(Jr/2+gt/2,0)),Jr*=2),pr=Math.max(pr,H?Jr:Ci)}var qn=(H?tt:dt)*2+pr+lt+X/2,aa=0;!H&&zt.text&&st==="bottom"&&at<=0&&(aa=qn/2,qn+=aa,Kn+=aa),Y._hColorbarMoveTitle=aa,Y._hColorbarMoveCBTitle=Kn;var Vi=lt+X,We=(H?Te:jr)-Vi/2-(H?tt:0),rr=(H?jr:Te)-(H?Mt:dt+Kn-aa);O.select("."+E.cbbg).attr("x",We).attr("y",rr).attr(H?"width":"height",Math.max(qn-aa,2)).attr(H?"height":"width",Math.max(Mt+Vi,2)).call(s.fill,yt).call(s.stroke,N.bordercolor).style("stroke-width",lt);var fr=Hn?Math.max(Jr-10,0):0;O.selectAll("."+E.cboutline).attr("x",(H?Te:jr+tt)+fr).attr("y",(H?jr+dt-Mt:Te)+(Vn?re:0)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(Mt-(H?2*dt+re:2*tt+fr),2)).call(s.stroke,N.outlinecolor).style({fill:"none","stroke-width":X});var _r=H?He*qn:0,Qr=H?0:(1-Ge)*qn-Kn;if(_r=it?ft.l-_r:-_r,Qr=vt?ft.t-Qr:-Qr,O.attr("transform",a(_r,Qr)),!H&&(lt||g(yt).getAlpha()&&!g.equals(Y.paper_bgcolor,yt))){var Cn=St.selectAll("text"),bn=Cn[0].length,An=O.select("."+E.cbbg).node(),ci=i.bBox(An),xi=i.getTranslate(O),Li=2;Cn.each(function($r,Br){var Gr=0,fn=bn-1;if(Br===Gr||Br===fn){var an=i.bBox(this),Ee=i.getTranslate(this),dr;if(Br===fn){var Vr=an.right+Ee.x,vn=ci.right+xi.x+jr-lt-Li+rt;dr=vn-Vr,dr>0&&(dr=0)}else if(Br===Gr){var Fn=an.left+Ee.x,Xn=ci.left+xi.x+jr+lt+Li;dr=Xn-Fn,dr<0&&(dr=0)}dr&&(bn<3?this.setAttribute("transform","translate("+dr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Oi={},Zi=C[pt],li=M[pt],La=C[st],Wa=M[st],ze=qn-Tt;H?(U==="pixels"?(Oi.y=at,Oi.t=Mt*La,Oi.b=Mt*Wa):(Oi.t=Oi.b=0,Oi.yt=at+F*La,Oi.yb=at-F*Wa),q==="pixels"?(Oi.x=rt,Oi.l=qn*Zi,Oi.r=qn*li):(Oi.l=ze*Zi,Oi.r=ze*li,Oi.xl=rt-W*Zi,Oi.xr=rt+W*li)):(U==="pixels"?(Oi.x=rt,Oi.l=Mt*Zi,Oi.r=Mt*li):(Oi.l=Oi.r=0,Oi.xl=rt+F*Zi,Oi.xr=rt-F*li),q==="pixels"?(Oi.y=1-at,Oi.t=qn*La,Oi.b=qn*Wa):(Oi.t=ze*La,Oi.b=ze*Wa,Oi.yt=at-W*La,Oi.yb=at+W*Wa));var Pe=N.y<.5?"b":"t",Rr=N.x<.5?"l":"r";V._fullLayout._reservedMargin[N._id]={};var qr={r:Y.width-We-_r,l:We+Oi.r,b:Y.height-rr-Qr,t:rr+Oi.b};it&&vt?P.autoMargin(V,N._id,Oi):it?V._fullLayout._reservedMargin[N._id][Pe]=qr[Pe]:vt||H?V._fullLayout._reservedMargin[N._id][Rr]=qr[Rr]:V._fullLayout._reservedMargin[N._id][Pe]=qr[Pe]}return r.syncOrAsync([P.previousPromises,Ue,or,qe,P.previousPromises,Ar],V)}function k(O,N,V){var H=N.orientation==="v",F=V._fullLayout,U=F._size,W,q,X;e.init({element:O.node(),gd:V,prepFn:function(){W=O.attr("transform"),o(O)},moveFn:function(lt,yt){O.attr("transform",W+a(lt,yt)),q=e.align((H?N._uFrac:N._vFrac)+lt/U.w,H?N._thickFrac:N._lenFrac,0,1,N.xanchor),X=e.align((H?N._vFrac:1-N._uFrac)-yt/U.h,H?N._lenFrac:N._thickFrac,0,1,N.yanchor);var pt=e.getCursor(q,X,N.xanchor,N.yanchor);o(O,pt)},doneFn:function(){if(o(O),q!==void 0&&X!==void 0){var lt={};lt[N._propPrefix+"x"]=q,lt[N._propPrefix+"y"]=X,N._traceIndex!==void 0?S.call("_guiRestyle",V,lt,N._traceIndex):S.call("_guiRelayout",V,lt)}}})}function w(O,N,V){var H=N._levels,F=[],U=[],W,q,X=H.end+H.size/100,lt=H.size,yt=1.001*V[0]-.001*V[1],pt=1.001*V[1]-.001*V[0];for(q=0;q<1e5&&(W=H.start+q*lt,!(lt>0?W>=X:W<=X));q++)W>yt&&W0?W>=X:W<=X));q++)W>V[0]&&W{$.exports={moduleType:"component",name:"colorbar",attributes:M1(),supplyDefaults:fv(),draw:MF().draw,hasColorbar:I0()}}),EF=Ft((Q,$)=>{$.exports={moduleType:"component",name:"legend",layoutAttributes:R_(),supplyLayoutDefaults:jy(),draw:N_(),style:_w()}}),CF=Ft((Q,$)=>{$.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}}),LF=Ft((Q,$)=>{$.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}),OM=Ft((Q,$)=>{var c=Qo(),g=_n(),P=g.extendFlat,S=g.extendDeep;function t(r){var a;switch(r){case"themes__thumb":a={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":a={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:a={}}return a}function e(r){var a=["xaxis","yaxis","zaxis"];return a.indexOf(r.slice(0,5))>-1}$.exports=function(r,a){var n,o=r.data,i=r.layout,s=S([],o),f=S({},i,t(a.tileClass)),x=r._context||{};if(a.width&&(f.width=a.width),a.height&&(f.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){f.annotations=[];var y=Object.keys(f);for(n=0;n{var c=Dm().EventEmitter,g=Qo(),P=_n(),S=u0(),t=OM(),e=Ky(),r=Xy();function a(n,o){var i=new c,s=t(n,{format:"png"}),f=s.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);function x(){var v=S.getDelay(f._fullLayout);setTimeout(function(){var T=e(f),u=document.createElement("canvas");u.id=P.randstr(),i=r({format:o.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:u,emitter:i,svg:T}),i.clean=function(){f&&document.body.removeChild(f)}},v)}var y=S.getRedrawFunc(f);return g.call("_doPlot",f,s.data,s.layout,s.config).then(y).then(x).catch(function(v){i.emit("error",v)}),i}$.exports=a}),zF=Ft((Q,$)=>{var c=u0(),g={getDelay:c.getDelay,getRedrawFunc:c.getRedrawFunc,clone:OM(),toSVG:Ky(),svgToImg:Xy(),toImage:PF(),downloadImage:X_()};$.exports=g}),IF=Ft(Q=>{Q.version=Qi().version,Gi(),I_();var $=Qo(),c=Q.register=$.register,g=_6(),P=Object.keys(g);for(t=0;t{$.exports=IF()}),ex=Ft((Q,$)=>{$.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}),Lg=Ft((Q,$)=>{var c=tf(),g=dh().axisHoverFormat,{hovertemplateAttrs:P,texttemplateAttrs:S,templatefallbackAttrs:t}=$u(),e=Ac(),r=ka(),a=ex(),n=Ed().pattern,o=ya().extendFlat,i=r({editType:"calc",arrayOk:!0,colorEditType:"style"}),s=c.marker,f=s.line,x=o({},f.width,{dflt:0}),y=o({width:x,editType:"calc"},e("marker.line")),v=o({line:y,editType:"calc"},e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:n,cornerradius:{valType:"any",editType:"calc"}});$.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),text:c.text,texttemplate:S({editType:"plot"},{keys:a.eventDataKeys}),texttemplatefallback:t({editType:"plot"}),hovertext:c.hovertext,hovertemplate:P({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:o({},c.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:v,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:{marker:{opacity:c.selected.marker.opacity,color:c.selected.marker.color,editType:"style"},textfont:c.selected.textfont,editType:"style"},unselected:{marker:{opacity:c.unselected.marker.opacity,color:c.unselected.marker.color,editType:"style"},textfont:c.unselected.textfont,editType:"style"},zorder:c.zorder}}),C6=Ft((Q,$)=>{$.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}}),L6=Ft((Q,$)=>{var c=ui(),g=Zd().hasColorscale,P=gc(),S=_n().coercePattern;$.exports=function(t,e,r,a,n){var o=r("marker.color",a),i=g(t,"marker");i&&P(t,e,n,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",c.defaultLine),g(t,"marker.line")&&P(t,e,n,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),S(r,"marker.pattern",o,i),r("selected.marker.color"),r("unselected.marker.color")}}),em=Ft((Q,$)=>{var c=ia(),g=_n(),P=ui(),S=Qo(),t=Um(),e=jp(),r=L6(),a=Cg(),n=Lg(),o=g.coerceFont;function i(y,v,T,u){function b(A,h){return g.coerce(y,v,n,A,h)}var _=t(y,v,u,b);if(!_){v.visible=!1;return}e(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var C=b("textposition");x(y,v,u,b,C,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r(y,v,b,T,u);var M=(v.marker.line||{}).color,E=S.getComponentMethod("errorbars","supplyDefaults");E(y,v,M||P.defaultLine,{axis:"y"}),E(y,v,M||P.defaultLine,{axis:"x",inherit:"y"}),g.coerceSelectionMarkerOpacity(v,b)}function s(y,v){var T,u;function b(M,E){return g.coerce(u._input,u,n,M,E)}for(var _=0;_=0)return y}else if(typeof y=="string"&&(y=y.trim(),y.slice(-1)==="%"&&c(y.slice(0,-1))&&(y=+y.slice(0,-1),y>=0)))return y+"%"}function x(y,v,T,u,b,_){_=_||{};var C=_.moduleHasSelected!==!1,M=_.moduleHasUnselected!==!1,E=_.moduleHasConstrain!==!1,A=_.moduleHasCliponaxis!==!1,h=_.moduleHasTextangle!==!1,p=_.moduleHasInsideanchor!==!1,k=!!_.hasPathbar,w=Array.isArray(b)||b==="auto",R=w||b==="inside",O=w||b==="outside";if(R||O){var N=o(u,"textfont",T.font),V=g.extendFlat({},N),H=y.textfont&&y.textfont.color,F=!H;if(F&&delete V.color,o(u,"insidetextfont",V),k){var U=g.extendFlat({},N);F&&delete U.color,o(u,"pathbar.textfont",U)}O&&o(u,"outsidetextfont",N),C&&u("selected.textfont.color"),M&&u("unselected.textfont.color"),E&&u("constraintext"),A&&u("cliponaxis"),h&&u("textangle"),u("texttemplate"),u("texttemplatefallback")}R&&p&&u("insidetextanchor")}$.exports={supplyDefaults:i,crossTraceDefaults:s,handleText:x,validateCornerradius:f}}),DM=Ft((Q,$)=>{var c=Qo(),g=Ls(),P=_n(),S=C6(),t=em().validateCornerradius;$.exports=function(e,r,a){function n(C,M){return P.coerce(e,r,S,C,M)}for(var o=!1,i=!1,s=!1,f={},x=n("barmode"),y=x==="group",v=0;v0&&!f[u]&&(s=!0),f[u]=!0),T.visible&&T.type==="histogram"){var b=g.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);b.type!=="category"&&(i=!0)}}if(!o){delete r.barmode;return}x!=="overlay"&&n("barnorm"),n("bargap",i&&!s?0:.2),n("bargroupgap");var _=n("barcornerradius");r.barcornerradius=t(_)}}),Nw=Ft((Q,$)=>{var c=_n();$.exports=function(g,P){for(var S=0;S{var c=Ls(),g=B0(),P=Zd().hasColorscale,S=ep(),t=Nw(),e=Bt();$.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,s,f,x,y,v,T={msUTC:!!(a.base||a.base===0)};a.orientation==="h"?(i=n.makeCalcdata(a,"x",T),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y",T),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),s=x.vals;for(var u=Math.min(s.length,i.length),b=new Array(u),_=0;_{var c=En(),g=_n();function P(r,a,n){var o=r._fullLayout,i=o["_"+n+"Text_minsize"];if(i){var s=o.uniformtext.mode==="hide",f;switch(n){case"funnelarea":case"pie":case"sunburst":f="g.slice";break;case"treemap":case"icicle":f="g.slice, g.pathbar";break;default:f="g.points > g.point"}a.selectAll(f).each(function(x){var y=x.transform;if(y){y.scale=s&&y.hide?0:i/y.fontSize;var v=c.select(this).select("text");g.setTransormAndDisplay(v,y)}})}}function S(r,a,n){if(n.uniformtext.mode){var o=e(r),i=n.uniformtext.minsize,s=a.scale*a.fontSize;a.hide=s{var $=ia(),c=eo(),g=_n().isArrayOrTypedArray;Q.coerceString=function(P,S,t){if(typeof S=="string"){if(S||!P.noBlank)return S}else if((typeof S=="number"||S===!0)&&!P.strict)return String(S);return t!==void 0?t:P.dflt},Q.coerceNumber=function(P,S,t){if($(S)){S=+S;var e=P.min,r=P.max,a=e!==void 0&&Sr;if(!a)return S}return t!==void 0?t:P.dflt},Q.coerceColor=function(P,S,t){return c(S).isValid()?S:t!==void 0?t:P.dflt},Q.coerceEnumerated=function(P,S,t){return P.coerceNumber&&(S=+S),P.values.indexOf(S)!==-1?S:t!==void 0?t:P.dflt},Q.getValue=function(P,S){var t;return g(P)?S{var c=En(),g=ui(),P=Vs(),S=_n(),t=Qo(),e=Up().resizeText,r=Lg(),a=r.textfont,n=r.insidetextfont,o=r.outsidetextfont,i=P6();function s(A){var h=c.select(A).selectAll('g[class^="barlayer"]').selectAll("g.trace");e(A,h,"bar");var p=h.size(),k=A._fullLayout;h.style("opacity",function(w){return w[0].trace.opacity}).each(function(w){(k.barmode==="stack"&&p>1||k.bargap===0&&k.bargroupgap===0&&!w[0].trace.marker.line.width)&&c.select(this).attr("shape-rendering","crispEdges")}),h.selectAll("g.points").each(function(w){var R=c.select(this),O=w[0].trace;f(R,O,A)}),t.getComponentMethod("errorbars","style")(h)}function f(A,h,p){P.pointStyle(A.selectAll("path"),h,p),x(A,h,p)}function x(A,h,p){A.selectAll("text").each(function(k){var w=c.select(this),R=S.ensureUniformFontSize(p,u(w,k,h,p));P.font(w,R)})}function y(A,h,p){var k=h[0].trace;k.selectedpoints?v(p,k,A):(f(p,k,A),t.getComponentMethod("errorbars","style")(p))}function v(A,h,p){P.selectedPointStyle(A.selectAll("path"),h),T(A.selectAll("text"),h,p)}function T(A,h,p){A.each(function(k){var w=c.select(this),R;if(k.selected){R=S.ensureUniformFontSize(p,u(w,k,h,p));var O=h.selected.textfont&&h.selected.textfont.color;O&&(R.color=O),P.font(w,R)}else P.selectedTextStyle(w,h)})}function u(A,h,p,k){var w=k._fullLayout.font,R=p.textfont;if(A.classed("bartext-inside")){var O=E(h,p);R=_(p,h.i,w,O)}else A.classed("bartext-outside")&&(R=C(p,h.i,w));return R}function b(A,h,p){return M(a,A.textfont,h,p)}function _(A,h,p,k){var w=b(A,h,p),R=A._input.textfont===void 0||A._input.textfont.color===void 0||Array.isArray(A.textfont.color)&&A.textfont.color[h]===void 0;return R&&(w={color:g.contrast(k),family:w.family,size:w.size,weight:w.weight,style:w.style,variant:w.variant,textcase:w.textcase,lineposition:w.lineposition,shadow:w.shadow}),M(n,A.insidetextfont,h,w)}function C(A,h,p){var k=b(A,h,p);return M(o,A.outsidetextfont,h,k)}function M(A,h,p,k){h=h||{};var w=i.getValue(h.family,p),R=i.getValue(h.size,p),O=i.getValue(h.color,p),N=i.getValue(h.weight,p),V=i.getValue(h.style,p),H=i.getValue(h.variant,p),F=i.getValue(h.textcase,p),U=i.getValue(h.lineposition,p),W=i.getValue(h.shadow,p);return{family:i.coerceString(A.family,w,k.family),size:i.coerceNumber(A.size,R,k.size),color:i.coerceColor(A.color,O,k.color),weight:i.coerceString(A.weight,N,k.weight),style:i.coerceString(A.style,V,k.style),variant:i.coerceString(A.variant,H,k.variant),textcase:i.coerceString(A.variant,F,k.textcase),lineposition:i.coerceString(A.variant,U,k.lineposition),shadow:i.coerceString(A.variant,W,k.shadow)}}function E(A,h){return h.type==="waterfall"?h[A.dir].marker.color:A.mcc||A.mc||h.marker.color}$.exports={style:s,styleTextPoints:x,styleOnSelect:y,getInsideTextFont:_,getOutsideTextFont:C,getBarColor:E,resizeText:e}}),rx=Ft((Q,$)=>{var c=En(),g=ia(),P=_n(),S=tc(),t=ui(),e=Vs(),r=Qo(),a=Ls().tickText,n=Up(),o=n.recordMinTextSize,i=n.clearMinTextSize,s=wm(),f=P6(),x=ex(),y=Lg(),v=y.text,T=y.textposition,u=Np().appendArrayPointValue,b=x.TEXTPAD;function _(lt){return lt.id}function C(lt){if(lt.ids)return _}function M(lt){return(lt>0)-(lt<0)}function E(lt,yt){return lt0}function k(lt,yt,pt,st,tt,dt){var rt=yt.xaxis,at=yt.yaxis,vt=lt._fullLayout,it=lt._context.staticPlot;tt||(tt={mode:vt.barmode,norm:vt.barmode,gap:vt.bargap,groupgap:vt.bargroupgap},i("bar",vt));var Y=P.makeTraceGroups(st,pt,"trace bars").each(function(ft){var ut=c.select(this),wt=ft[0].trace,zt=ft[0].t,Pt=wt.type==="waterfall",Wt=wt.type==="funnel",Ht=wt.type==="histogram",Jt=wt.type==="bar",ge=Jt||Wt,he=0;Pt&&wt.connector.visible&&wt.connector.mode==="between"&&(he=wt.connector.line.width/2);var de=wt.orientation==="h",se=p(tt),Tt=P.ensureSingle(ut,"g","points"),Lt=C(wt),Mt=Tt.selectAll("g.point").data(P.identity,Lt);Mt.enter().append("g").classed("point",!0),Mt.exit().remove(),Mt.each(function(ve,oe){var Te=c.select(this),He=A(ve,rt,at,de),Ge=He[0][0],cr=He[0][1],ur=He[1][0],jr=He[1][1],Hr=(de?cr-Ge:jr-ur)===0;Hr&&ge&&f.getLineWidth(wt,ve)&&(Hr=!1),Hr||(Hr=!g(Ge)||!g(cr)||!g(ur)||!g(jr)),ve.isBlank=Hr,Hr&&(de?cr=Ge:jr=ur),he&&!Hr&&(de?(Ge-=E(Ge,cr)*he,cr+=E(Ge,cr)*he):(ur-=E(ur,jr)*he,jr+=E(ur,jr)*he));var br,Kr;if(wt.type==="waterfall"){if(!Hr){var rn=wt[ve.dir].marker;br=rn.line.width,Kr=rn.color}}else br=f.getLineWidth(wt,ve),Kr=ve.mc||wt.marker.color;function Ce(Vi){var We=c.round(br/2%1,2);return tt.gap===0&&tt.groupgap===0?c.round(Math.round(Vi)-We,2):Vi}function Gt(Vi,We,rr){return rr&&Vi===We?Vi:Math.abs(Vi-We)>=2?Ce(Vi):Vi>We?Math.ceil(Vi):Math.floor(Vi)}var ne=t.opacity(Kr),Ct=ne<1||br>.01?Ce:Gt;lt._context.staticPlot||(Ge=Ct(Ge,cr,de),cr=Ct(cr,Ge,de),ur=Ct(ur,jr,!de),jr=Ct(jr,ur,!de));var gt=de?rt.c2p:at.c2p,St;ve.s0>0?St=ve._sMax:ve.s0<0?St=ve._sMin:St=ve.s1>0?ve._sMax:ve._sMin;function Nt(Vi,We){if(!Vi)return 0;var rr=Math.abs(de?jr-ur:cr-Ge),fr=Math.abs(de?cr-Ge:jr-ur),_r=Ct(Math.abs(gt(St,!0)-gt(0,!0))),Qr=ve.hasB?Math.min(rr/2,fr/2):Math.min(rr/2,_r),Cn;if(We==="%"){var bn=Math.min(50,Vi);Cn=rr*(bn/100)}else Cn=Vi;return Ct(Math.max(Math.min(Cn,Qr),0))}var re=Jt||Ht?Nt(zt.cornerradiusvalue,zt.cornerradiusform):0,le,we,Ue="M"+Ge+","+ur+"V"+jr+"H"+cr+"V"+ur+"Z",qe=0;if(re&&ve.s){var or=M(ve.s0)===0||M(ve.s)===M(ve.s0)?ve.s1:ve.s0;if(qe=Ct(ve.hasB?0:Math.abs(gt(St,!0)-gt(or,!0))),qe0?Math.sqrt(qe*(2*re-qe)):0,Hn=Ar>0?Math.max:Math.min;le="M"+Ge+","+ur+"V"+(jr-Jr*Tr)+"H"+Hn(cr-(re-qe)*Ar,Ge)+"A "+re+","+re+" 0 0 "+pr+" "+cr+","+(jr-re*Tr-Vn)+"V"+(ur+re*Tr+Vn)+"A "+re+","+re+" 0 0 "+pr+" "+Hn(cr-(re-qe)*Ar,Ge)+","+(ur+Jr*Tr)+"Z"}else if(ve.hasB)le="M"+(Ge+re*Ar)+","+ur+"A "+re+","+re+" 0 0 "+pr+" "+Ge+","+(ur+re*Tr)+"V"+(jr-re*Tr)+"A "+re+","+re+" 0 0 "+pr+" "+(Ge+re*Ar)+","+jr+"H"+(cr-re*Ar)+"A "+re+","+re+" 0 0 "+pr+" "+cr+","+(jr-re*Tr)+"V"+(ur+re*Tr)+"A "+re+","+re+" 0 0 "+pr+" "+(cr-re*Ar)+","+ur+"Z";else{we=Math.abs(jr-ur)+qe;var Kn=we0?Math.sqrt(qe*(2*re-qe)):0,ii=Tr>0?Math.max:Math.min;le="M"+(Ge+Kn*Ar)+","+ur+"V"+ii(jr-(re-qe)*Tr,ur)+"A "+re+","+re+" 0 0 "+pr+" "+(Ge+re*Ar-Ci)+","+jr+"H"+(cr-re*Ar+Ci)+"A "+re+","+re+" 0 0 "+pr+" "+(cr-Kn*Ar)+","+ii(jr-(re-qe)*Tr,ur)+"V"+ur+"Z"}}else le=Ue}else le=Ue;var qn=h(P.ensureSingle(Te,"path"),vt,tt,dt);if(qn.style("vector-effect",it?"none":"non-scaling-stroke").attr("d",isNaN((cr-Ge)*(jr-ur))||Hr&<._context.staticPlot?"M0,0Z":le).call(e.setClipUrl,yt.layerClipId,lt),!vt.uniformtext.mode&&se){var aa=e.makePointStyleFns(wt);e.singlePointStyle(ve,qn,wt,aa,lt)}w(lt,yt,Te,ft,oe,Ge,cr,ur,jr,re,qe,tt,dt),yt.layerClipId&&e.hideOutsideRangePoint(ve,Te.select("text"),rt,at,wt.xcalendar,wt.ycalendar)});var te=wt.cliponaxis===!1;e.setClipUrl(ut,te?null:yt.layerClipId,lt)});r.getComponentMethod("errorbars","plot")(lt,Y,yt,tt)}function w(lt,yt,pt,st,tt,dt,rt,at,vt,it,Y,ft,ut){var wt=yt.xaxis,zt=yt.yaxis,Pt=lt._fullLayout,Wt;function Ht(we,Ue,qe){var or=P.ensureSingle(we,"text").text(Ue).attr({class:"bartext bartext-"+Wt,"text-anchor":"middle","data-notex":1}).call(e.font,qe).call(S.convertToTspans,lt);return or}var Jt=st[0].trace,ge=Jt.orientation==="h",he=U(Pt,st,tt,wt,zt);Wt=W(Jt,tt);var de=ft.mode==="stack"||ft.mode==="relative",se=st[tt],Tt=!de||se._outmost,Lt=se.hasB,Mt=it&&it-Y>b;if(!he||Wt==="none"||(se.isBlank||dt===rt||at===vt)&&(Wt==="auto"||Wt==="inside")){pt.select("text").remove();return}var te=Pt.font,ve=s.getBarColor(st[tt],Jt),oe=s.getInsideTextFont(Jt,tt,te,ve),Te=s.getOutsideTextFont(Jt,tt,te),He=Jt.insidetextanchor||"end",Ge=pt.datum();ge?wt.type==="log"&&Ge.s0<=0&&(wt.range[0]0&&Ce>0,Ct;Mt?Lt?Ct=R(jr-2*it,Hr,rn,Ce,ge)||R(jr,Hr-2*it,rn,Ce,ge):ge?Ct=R(jr-(it-Y),Hr,rn,Ce,ge)||R(jr,Hr-2*(it-Y),rn,Ce,ge):Ct=R(jr,Hr-(it-Y),rn,Ce,ge)||R(jr-2*(it-Y),Hr,rn,Ce,ge):Ct=R(jr,Hr,rn,Ce,ge),ne&&Ct?Wt="inside":(Wt="outside",br.remove(),br=null)}else Wt="inside";if(!br){Gt=P.ensureUniformFontSize(lt,Wt==="outside"?Te:oe),br=Ht(pt,he,Gt);var gt=br.attr("transform");if(br.attr("transform",""),Kr=e.bBox(br.node()),rn=Kr.width,Ce=Kr.height,br.attr("transform",gt),rn<=0||Ce<=0){br.remove();return}}var St=Jt.textangle,Nt,re;Wt==="outside"?(re=Jt.constraintext==="both"||Jt.constraintext==="outside",Nt=F(dt,rt,at,vt,Kr,{isHorizontal:ge,constrained:re,angle:St})):(re=Jt.constraintext==="both"||Jt.constraintext==="inside",Nt=V(dt,rt,at,vt,Kr,{isHorizontal:ge,constrained:re,angle:St,anchor:He,hasB:Lt,r:it,overhead:Y})),Nt.fontSize=Gt.size,o(Jt.type==="histogram"?"bar":Jt.type,Nt,Pt),se.transform=Nt;var le=h(br,Pt,ft,ut);P.setTransormAndDisplay(le,Nt)}function R(lt,yt,pt,st,tt){if(lt<0||yt<0)return!1;var dt=pt<=lt&&st<=yt,rt=pt<=yt&&st<=lt,at=tt?lt>=pt*(yt/st):yt>=st*(lt/pt);return dt||rt||at}function O(lt){return lt==="auto"?0:lt}function N(lt,yt){var pt=Math.PI/180*yt,st=Math.abs(Math.sin(pt)),tt=Math.abs(Math.cos(pt));return{x:lt.width*tt+lt.height*st,y:lt.width*st+lt.height*tt}}function V(lt,yt,pt,st,tt,dt){var rt=!!dt.isHorizontal,at=!!dt.constrained,vt=dt.angle||0,it=dt.anchor,Y=it==="end",ft=it==="start",ut=dt.leftToRight||0,wt=(ut+1)/2,zt=1-wt,Pt=dt.hasB,Wt=dt.r,Ht=dt.overhead,Jt=tt.width,ge=tt.height,he=Math.abs(yt-lt),de=Math.abs(st-pt),se=he>2*b&&de>2*b?b:0;he-=2*se,de-=2*se;var Tt=O(vt);vt==="auto"&&!(Jt<=he&&ge<=de)&&(Jt>he||ge>de)&&(!(Jt>de||ge>he)||Jtb){var ve=H(lt,yt,pt,st,Lt,Wt,Ht,rt,Pt);Mt=ve.scale,te=ve.pad}else Mt=1,at&&(Mt=Math.min(1,he/Lt.x,de/Lt.y)),te=0;var oe=tt.left*zt+tt.right*wt,Te=(tt.top+tt.bottom)/2,He=(lt+b)*zt+(yt-b)*wt,Ge=(pt+st)/2,cr=0,ur=0;if(ft||Y){var jr=(rt?Lt.x:Lt.y)/2;Wt&&(Y||Pt)&&(se+=te);var Hr=rt?E(lt,yt):E(pt,st);rt?ft?(He=lt+Hr*se,cr=-Hr*jr):(He=yt-Hr*se,cr=Hr*jr):ft?(Ge=pt+Hr*se,ur=-Hr*jr):(Ge=st-Hr*se,ur=Hr*jr)}return{textX:oe,textY:Te,targetX:He,targetY:Ge,anchorX:cr,anchorY:ur,scale:Mt,rotate:Tt}}function H(lt,yt,pt,st,tt,dt,rt,at,vt){var it=Math.max(0,Math.abs(yt-lt)-2*b),Y=Math.max(0,Math.abs(st-pt)-2*b),ft=dt-b,ut=rt?ft-Math.sqrt(ft*ft-(ft-rt)*(ft-rt)):ft,wt=vt?ft*2:at?ft-rt:2*ut,zt=vt?ft*2:at?2*ut:ft-rt,Pt,Wt,Ht,Jt,ge;return tt.y/tt.x>=Y/(it-wt)?Jt=Y/tt.y:tt.y/tt.x<=(Y-zt)/it?Jt=it/tt.x:!vt&&at?(Pt=tt.x*tt.x+tt.y*tt.y/4,Wt=-2*tt.x*(it-ft)-tt.y*(Y/2-ft),Ht=(it-ft)*(it-ft)+(Y/2-ft)*(Y/2-ft)-ft*ft,Jt=(-Wt+Math.sqrt(Wt*Wt-4*Pt*Ht))/(2*Pt)):vt?(Pt=(tt.x*tt.x+tt.y*tt.y)/4,Wt=-tt.x*(it/2-ft)-tt.y*(Y/2-ft),Ht=(it/2-ft)*(it/2-ft)+(Y/2-ft)*(Y/2-ft)-ft*ft,Jt=(-Wt+Math.sqrt(Wt*Wt-4*Pt*Ht))/(2*Pt)):(Pt=tt.x*tt.x/4+tt.y*tt.y,Wt=-tt.x*(it/2-ft)-2*tt.y*(Y-ft),Ht=(it/2-ft)*(it/2-ft)+(Y-ft)*(Y-ft)-ft*ft,Jt=(-Wt+Math.sqrt(Wt*Wt-4*Pt*Ht))/(2*Pt)),Jt=Math.min(1,Jt),at?ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(Y-tt.y*Jt)/2)*(ft-(Y-tt.y*Jt)/2)))-rt):ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(it-tt.x*Jt)/2)*(ft-(it-tt.x*Jt)/2)))-rt),{scale:Jt,pad:ge}}function F(lt,yt,pt,st,tt,dt){var rt=!!dt.isHorizontal,at=!!dt.constrained,vt=dt.angle||0,it=tt.width,Y=tt.height,ft=Math.abs(yt-lt),ut=Math.abs(st-pt),wt;rt?wt=ut>2*b?b:0:wt=ft>2*b?b:0;var zt=1;at&&(zt=rt?Math.min(1,ut/Y):Math.min(1,ft/it));var Pt=O(vt),Wt=N(tt,Pt),Ht=(rt?Wt.x:Wt.y)/2,Jt=(tt.left+tt.right)/2,ge=(tt.top+tt.bottom)/2,he=(lt+yt)/2,de=(pt+st)/2,se=0,Tt=0,Lt=rt?E(yt,lt):E(pt,st);return rt?(he=yt-Lt*wt,se=Lt*Ht):(de=st+Lt*wt,Tt=-Lt*Ht),{textX:Jt,textY:ge,targetX:he,targetY:de,anchorX:se,anchorY:Tt,scale:zt,rotate:Pt}}function U(lt,yt,pt,st,tt){var dt=yt[0].trace,rt=dt.texttemplate,at;return rt?at=q(lt,yt,pt,st,tt):dt.textinfo?at=X(yt,pt,st,tt):at=f.getValue(dt.text,pt),f.coerceString(v,at)}function W(lt,yt){var pt=f.getValue(lt.textposition,yt);return f.coerceEnumerated(T,pt)}function q(lt,yt,pt,st,tt){var dt=yt[0].trace,rt=P.castOption(dt,pt,"texttemplate");if(!rt)return"";var at=dt.type==="histogram",vt=dt.type==="waterfall",it=dt.type==="funnel",Y=dt.orientation==="h",ft,ut,wt,zt;Y?(ft="y",ut=tt,wt="x",zt=st):(ft="x",ut=st,wt="y",zt=tt);function Pt(se){return a(ut,ut.c2l(se),!0).text}function Wt(se){return a(zt,zt.c2l(se),!0).text}var Ht=yt[pt],Jt={};Jt.label=Ht.p,Jt.labelLabel=Jt[ft+"Label"]=Pt(Ht.p);var ge=P.castOption(dt,Ht.i,"text");(ge===0||ge)&&(Jt.text=ge),Jt.value=Ht.s,Jt.valueLabel=Jt[wt+"Label"]=Wt(Ht.s);var he={};u(he,dt,Ht.i),(at||he.x===void 0)&&(he.x=Y?Jt.value:Jt.label),(at||he.y===void 0)&&(he.y=Y?Jt.label:Jt.value),(at||he.xLabel===void 0)&&(he.xLabel=Y?Jt.valueLabel:Jt.labelLabel),(at||he.yLabel===void 0)&&(he.yLabel=Y?Jt.labelLabel:Jt.valueLabel),vt&&(Jt.delta=+Ht.rawS||Ht.s,Jt.deltaLabel=Wt(Jt.delta),Jt.final=Ht.v,Jt.finalLabel=Wt(Jt.final),Jt.initial=Jt.final-Jt.delta,Jt.initialLabel=Wt(Jt.initial)),it&&(Jt.value=Ht.s,Jt.valueLabel=Wt(Jt.value),Jt.percentInitial=Ht.begR,Jt.percentInitialLabel=P.formatPercent(Ht.begR),Jt.percentPrevious=Ht.difR,Jt.percentPreviousLabel=P.formatPercent(Ht.difR),Jt.percentTotal=Ht.sumR,Jt.percenTotalLabel=P.formatPercent(Ht.sumR));var de=P.castOption(dt,Ht.i,"customdata");return de&&(Jt.customdata=de),P.texttemplateString({data:[he,Jt,dt._meta],fallback:dt.texttemplatefallback,labels:Jt,locale:lt._d3locale,template:rt})}function X(lt,yt,pt,st){var tt=lt[0].trace,dt=tt.orientation==="h",rt=tt.type==="waterfall",at=tt.type==="funnel";function vt(de){var se=dt?st:pt;return a(se,de,!0).text}function it(de){var se=dt?pt:st;return a(se,+de,!0).text}var Y=tt.textinfo,ft=lt[yt],ut=Y.split("+"),wt=[],zt,Pt=function(de){return ut.indexOf(de)!==-1};if(Pt("label")&&wt.push(vt(lt[yt].p)),Pt("text")&&(zt=P.castOption(tt,ft.i,"text"),(zt===0||zt)&&wt.push(zt)),rt){var Wt=+ft.rawS||ft.s,Ht=ft.v,Jt=Ht-Wt;Pt("initial")&&wt.push(it(Jt)),Pt("delta")&&wt.push(it(Wt)),Pt("final")&&wt.push(it(Ht))}if(at){Pt("value")&&wt.push(it(ft.s));var ge=0;Pt("percent initial")&&ge++,Pt("percent previous")&&ge++,Pt("percent total")&&ge++;var he=ge>1;Pt("percent initial")&&(zt=P.formatPercent(ft.begR),he&&(zt+=" of initial"),wt.push(zt)),Pt("percent previous")&&(zt=P.formatPercent(ft.difR),he&&(zt+=" of previous"),wt.push(zt)),Pt("percent total")&&(zt=P.formatPercent(ft.sumR),he&&(zt+=" of total"),wt.push(zt))}return wt.join("
")}$.exports={plot:k,toMoveInsideBar:V}}),eb=Ft((Q,$)=>{var c=Qh(),g=Qo(),P=ui(),S=_n().fillText,t=P6().getLineWidth,e=Ls().hoverLabelText,r=Ua().BADNUM;function a(i,s,f,x,y){var v=n(i,s,f,x,y);if(v){var T=v.cd,u=T[0].trace,b=T[v.index];return v.color=o(u,b),g.getComponentMethod("errorbars","hoverInfo")(b,u,v),[v]}}function n(i,s,f,x,y){var v=i.cd,T=v[0].trace,u=v[0].t,b=x==="closest",_=T.type==="waterfall",C=i.maxHoverDistance,M=i.maxSpikeDistance,E,A,h,p,k,w,R;T.orientation==="h"?(E=f,A=s,h="y",p="x",k=st,w=lt):(E=s,A=f,h="x",p="y",w=st,k=lt);var O=T[h+"period"],N=b||O;function V(zt){return F(zt,-1)}function H(zt){return F(zt,1)}function F(zt,Pt){var Wt=zt.w;return zt[h]+Pt*Wt/2}function U(zt){return zt[h+"End"]-zt[h+"Start"]}var W=b?V:O?function(zt){return zt.p-U(zt)/2}:function(zt){return Math.min(V(zt),zt.p-u.bardelta/2)},q=b?H:O?function(zt){return zt.p+U(zt)/2}:function(zt){return Math.max(H(zt),zt.p+u.bardelta/2)};function X(zt,Pt,Wt){return y.finiteRange&&(Wt=0),c.inbox(zt-E,Pt-E,Wt+Math.min(1,Math.abs(Pt-zt)/R)-1)}function lt(zt){return X(W(zt),q(zt),C)}function yt(zt){return X(V(zt),H(zt),M)}function pt(zt){var Pt=zt[p];if(_){var Wt=Math.abs(zt.rawS)||0;A>0?Pt+=Wt:A<0&&(Pt-=Wt)}return Pt}function st(zt){var Pt=A,Wt=zt.b,Ht=pt(zt);return c.inbox(Wt-Pt,Ht-Pt,C+(Ht-Pt)/(Ht-Wt)-1)}function tt(zt){var Pt=A,Wt=zt.b,Ht=pt(zt);return c.inbox(Wt-Pt,Ht-Pt,M+(Ht-Pt)/(Ht-Wt)-1)}var dt=i[h+"a"],rt=i[p+"a"];R=Math.abs(dt.r2c(dt.range[1])-dt.r2c(dt.range[0]));function at(zt){return(k(zt)+w(zt))/2}var vt=c.getDistanceFunction(x,k,w,at);if(c.getClosest(v,vt,i),i.index!==!1&&v[i.index].p!==r){N||(W=function(zt){return Math.min(V(zt),zt.p-u.bargroupwidth/2)},q=function(zt){return Math.max(H(zt),zt.p+u.bargroupwidth/2)});var it=i.index,Y=v[it],ft=T.base?Y.b+Y.s:Y.s;i[p+"0"]=i[p+"1"]=rt.c2p(Y[p],!0),i[p+"LabelVal"]=ft;var ut=u.extents[u.extents.round(Y.p)];i[h+"0"]=dt.c2p(b?W(Y):ut[0],!0),i[h+"1"]=dt.c2p(b?q(Y):ut[1],!0);var wt=Y.orig_p!==void 0;return i[h+"LabelVal"]=wt?Y.orig_p:Y.p,i.labelLabel=e(dt,i[h+"LabelVal"],T[h+"hoverformat"]),i.valueLabel=e(rt,i[p+"LabelVal"],T[p+"hoverformat"]),i.baseLabel=e(rt,Y.b,T[p+"hoverformat"]),i.spikeDistance=(tt(Y)+yt(Y))/2,i[h+"Spike"]=dt.c2p(Y.p,!0),S(Y,T,i),i.hovertemplate=T.hovertemplate,i}}function o(i,s){var f=s.mcc||i.marker.color,x=s.mlcc||i.marker.line.color,y=t(i,s);if(P.opacity(f))return f;if(P.opacity(x)&&y)return x}$.exports={hoverPoints:a,hoverOnBars:n,getTraceColor:o}}),FF=Ft((Q,$)=>{$.exports=function(c,g,P){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),P.orientation==="h"?(c.label=c.y,c.value=c.x):(c.label=c.x,c.value=c.y),c}}),rb=Ft((Q,$)=>{$.exports=function(g,P){var S=g.cd,t=g.xaxis,e=g.yaxis,r=S[0].trace,a=r.type==="funnel",n=r.orientation==="h",o=[],i;if(P===!1)for(i=0;i{$.exports={attributes:Lg(),layoutAttributes:C6(),supplyDefaults:em().supplyDefaults,crossTraceDefaults:em().crossTraceDefaults,supplyLayoutDefaults:DM(),calc:DF(),crossTraceCalc:zr().crossTraceCalc,colorbar:yo(),arraysToCalcdata:Nw(),plot:rx().plot,style:wm().style,styleOnSelect:wm().styleOnSelect,hoverPoints:eb().hoverPoints,eventData:FF(),selectPoints:rb(),moduleType:"trace",name:"bar",basePlotModule:Ef(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}),BF=Ft((Q,$)=>{$.exports=RF()}),jw=Ft((Q,$)=>{var c=D0(),g=tf(),P=Lg(),S=yi(),t=dh().axisHoverFormat,{hovertemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=ya().extendFlat,n=g.marker,o=n.line;$.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:g.xperiod,yperiod:g.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:g.xperiodalignment,yperiodalignment:g.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:a({},n.symbol,{arrayOk:!1,editType:"plot"}),opacity:a({},n.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:a({},n.angle,{arrayOk:!1,editType:"calc"}),size:a({},n.size,{arrayOk:!1,editType:"calc"}),color:a({},n.color,{arrayOk:!1,editType:"style"}),line:{color:a({},o.color,{arrayOk:!1,dflt:S.defaultLine,editType:"style"}),width:a({},o.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:c(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:P.offsetgroup,alignmentgroup:P.alignmentgroup,selected:{marker:g.selected.marker,editType:"style"},unselected:{marker:g.unselected.marker,editType:"style"},text:a({},g.text,{}),hovertext:a({},g.hovertext,{}),hovertemplate:e({}),hovertemplatefallback:r(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:g.zorder}}),Uw=Ft((Q,$)=>{$.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}}),Vw=Ft((Q,$)=>{var c=_n(),g=Qo(),P=ui(),S=jp(),t=Cg(),e=dv(),r=jw();function a(s,f,x,y){function v(p,k){return c.coerce(s,f,r,p,k)}if(n(s,f,v,y),f.visible!==!1){S(s,f,y,v),v("xhoverformat"),v("yhoverformat");var T=f._hasPreCompStats;T&&(v("lowerfence"),v("upperfence")),v("line.color",(s.marker||{}).color||x),v("line.width"),v("fillcolor",P.addOpacity(f.line.color,.5));var u=!1;if(T){var b=v("mean"),_=v("sd");b&&b.length&&(u=!0,_&&_.length&&(u="sd"))}v("whiskerwidth");var C=v("sizemode"),M;C==="quartiles"&&(M=v("boxmean",u)),v("showwhiskers",C==="quartiles"),(C==="sd"||M==="sd")&&v("sdmultiple"),v("width"),v("quartilemethod");var E=!1;if(T){var A=v("notchspan");A&&A.length&&(E=!0)}else c.validate(s.notchwidth,r.notchwidth)&&(E=!0);var h=v("notched",E);h&&v("notchwidth"),o(s,f,v,{prefix:"box"}),v("zorder")}}function n(s,f,x,y){function v(X){var lt=0;return X&&X.length&&(lt+=1,c.isArrayOrTypedArray(X[0])&&X[0].length&&(lt+=1)),lt}function T(X){return c.validate(s[X],r[X])}var u=x("y"),b=x("x"),_;if(f.type==="box"){var C=x("q1"),M=x("median"),E=x("q3");f._hasPreCompStats=C&&C.length&&M&&M.length&&E&&E.length,_=Math.min(c.minRowLength(C),c.minRowLength(M),c.minRowLength(E))}var A=v(u),h=v(b),p=A&&c.minRowLength(u),k=h&&c.minRowLength(b),w=y.calendar,R={autotypenumbers:y.autotypenumbers},O,N;if(f._hasPreCompStats)switch(String(h)+String(A)){case"00":var V=T("x0")||T("dx"),H=T("y0")||T("dy");H&&!V?O="h":O="v",N=_;break;case"10":O="v",N=Math.min(_,k);break;case"20":O="h",N=Math.min(_,b.length);break;case"01":O="h",N=Math.min(_,p);break;case"02":O="v",N=Math.min(_,u.length);break;case"12":O="v",N=Math.min(_,k,u.length);break;case"21":O="h",N=Math.min(_,b.length,p);break;case"11":N=0;break;case"22":var F=!1,U;for(U=0;U0?(O="v",h>0?N=Math.min(k,p):N=Math.min(p)):h>0?(O="h",N=Math.min(k)):N=0;if(!N){f.visible=!1;return}f._length=N;var W=x("orientation",O);f._hasPreCompStats?W==="v"&&h===0?(x("x0",0),x("dx",1)):W==="h"&&A===0&&(x("y0",0),x("dy",1)):W==="v"&&h===0?x("x0"):W==="h"&&A===0&&x("y0");var q=g.getComponentMethod("calendars","handleTraceDefaults");q(s,f,["x","y"],y)}function o(s,f,x,y){var v=y.prefix,T=c.coerce2(s,f,r,"marker.outliercolor"),u=x("marker.line.outliercolor"),b="outliers";f._hasPreCompStats?b="all":(T||u)&&(b="suspectedoutliers");var _=x(v+"points",b);_?(x("jitter",_==="all"?.3:0),x("pointpos",_==="all"?-1.5:0),x("marker.symbol"),x("marker.opacity"),x("marker.size"),x("marker.angle"),x("marker.color",f.line.color),x("marker.line.color"),x("marker.line.width"),_==="suspectedoutliers"&&(x("marker.line.outliercolor",f.marker.color),x("marker.line.outlierwidth")),x("selected.marker.color"),x("unselected.marker.color"),x("selected.marker.size"),x("unselected.marker.size"),x("text"),x("hovertext")):delete f.marker;var C=x("hoveron");(C==="all"||C.indexOf("points")!==-1)&&(x("hovertemplate"),x("hovertemplatefallback")),c.coerceSelectionMarkerOpacity(f,x)}function i(s,f){var x,y;function v(_){return c.coerce(y._input,y,r,_)}for(var T=0;T{var c=Qo(),g=_n(),P=Uw();function S(e,r,a,n,o){for(var i=o+"Layout",s=!1,f=0;f{var c=ia(),g=Ls(),P=B0(),S=_n(),t=Ua().BADNUM,e=S._;$.exports=function(_,C){var M=_._fullLayout,E=g.getFromId(_,C.xaxis||"x"),A=g.getFromId(_,C.yaxis||"y"),h=[],p=C.type==="violin"?"_numViolins":"_numBoxes",k,w,R,O,N,V,H;C.orientation==="h"?(R=E,O="x",N=A,V="y",H=!!C.yperiodalignment):(R=A,O="y",N=E,V="x",H=!!C.xperiodalignment);var F=r(C,V,N,M[p]),U=F[0],W=F[1],q=S.distinctVals(U,N),X=q.vals,lt=q.minDiff/2,yt,pt,st,tt,dt,rt,at=(C.boxpoints||C.points)==="all"?S.identity:function(jr){return jr.vyt.uf};if(C._hasPreCompStats){var vt=C[O],it=function(jr){return R.d2c((C[jr]||[])[k])},Y=1/0,ft=-1/0;for(k=0;k=yt.q1&&yt.q3>=yt.med){var wt=it("lowerfence");yt.lf=wt!==t&&wt<=yt.q1?wt:y(yt,st,tt);var zt=it("upperfence");yt.uf=zt!==t&&zt>=yt.q3?zt:v(yt,st,tt);var Pt=it("mean");yt.mean=Pt!==t?Pt:tt?S.mean(st,tt):(yt.q1+yt.q3)/2;var Wt=it("sd");yt.sd=Pt!==t&&Wt>=0?Wt:tt?S.stdev(st,tt,yt.mean):yt.q3-yt.q1,yt.lo=T(yt),yt.uo=u(yt);var Ht=it("notchspan");Ht=Ht!==t&&Ht>0?Ht:b(yt,tt),yt.ln=yt.med-Ht,yt.un=yt.med+Ht;var Jt=yt.lf,ge=yt.uf;C.boxpoints&&st.length&&(Jt=Math.min(Jt,st[0]),ge=Math.max(ge,st[tt-1])),C.notched&&(Jt=Math.min(Jt,yt.ln),ge=Math.max(ge,yt.un)),yt.min=Jt,yt.max=ge}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+yt.q1,"median = "+yt.med,"q3 = "+yt.q3].join(` -`));var he;yt.med!==t?he=yt.med:yt.q1!==t?yt.q3!==t?he=(yt.q1+yt.q3)/2:he=yt.q1:yt.q3!==t?he=yt.q3:he=0,yt.med=he,yt.q1=yt.q3=he,yt.lf=yt.uf=he,yt.mean=yt.sd=he,yt.ln=yt.un=he,yt.min=yt.max=he}Y=Math.min(Y,yt.min),ft=Math.max(ft,yt.max),yt.pts2=pt.filter(at),h.push(yt)}}C._extremes[R._id]=g.findExtremes(R,[Y,ft],{padded:!0})}else{var de=R.makeCalcdata(C,O),se=a(X,lt),Tt=X.length,Lt=n(Tt);for(k=0;k=0&&Mt0){if(yt={},yt.pos=yt[V]=X[k],pt=yt.pts=Lt[k].sort(f),st=yt[O]=pt.map(x),tt=st.length,yt.min=st[0],yt.max=st[tt-1],yt.mean=S.mean(st,tt),yt.sd=S.stdev(st,tt,yt.mean)*C.sdmultiple,yt.med=S.interp(st,.5),tt%2&&(Te||He)){var Ge,cr;Te?(Ge=st.slice(0,tt/2),cr=st.slice(tt/2+1)):He&&(Ge=st.slice(0,tt/2+1),cr=st.slice(tt/2)),yt.q1=S.interp(Ge,.5),yt.q3=S.interp(cr,.5)}else yt.q1=S.interp(st,.25),yt.q3=S.interp(st,.75);yt.lf=y(yt,st,tt),yt.uf=v(yt,st,tt),yt.lo=T(yt),yt.uo=u(yt);var ur=b(yt,tt);yt.ln=yt.med-ur,yt.un=yt.med+ur,te=Math.min(te,yt.ln),ve=Math.max(ve,yt.un),yt.pts2=pt.filter(at),h.push(yt)}C.notched&&S.isTypedArray(de)&&(de=Array.from(de)),C._extremes[R._id]=g.findExtremes(R,C.notched?de.concat([te,ve]):de,{padded:!0})}return s(h,C),h.length>0?(h[0].t={num:M[p],dPos:lt,posLetter:V,valLetter:O,labels:{med:e(_,"median:"),min:e(_,"min:"),q1:e(_,"q1:"),q3:e(_,"q3:"),max:e(_,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(_,"mean ± σ:").replace("σ",C.sdmultiple===1?"σ":C.sdmultiple+"σ"):e(_,"mean:"),lf:e(_,"lower fence:"),uf:e(_,"upper fence:")}},M[p]++,h):[{t:{empty:!0}}]};function r(_,C,M,E){var A=C in _,h=C+"0"in _,p="d"+C in _;if(A||h&&p){var k=M.makeCalcdata(_,C),w=P(_,M,C,k).vals;return[w,k]}var R;h?R=_[C+"0"]:"name"in _&&(M.type==="category"||c(_.name)&&["linear","log"].indexOf(M.type)!==-1||S.isDateTime(_.name)&&M.type==="date")?R=_.name:R=E;for(var O=M.type==="multicategory"?M.r2c_just_indices(R):M.d2c(R,0,_[C+"calendar"]),N=_._length,V=new Array(N),H=0;H{var c=Ls(),g=_n(),P=vv().getAxisGroup,S=["v","h"];function t(r,a){for(var n=r.calcdata,o=a.xaxis,i=a.yaxis,s=0;s1,h=1-s[r+"gap"],p=1-s[r+"groupgap"];for(y=0;y0;if(O==="positive"?(pt=N*(R?1:.5),dt=tt,st=dt=H):O==="negative"?(pt=dt=H,st=N*(R?1:.5),rt=tt):(pt=st=N,dt=rt=tt),ut){var wt=k.pointpos,zt=k.jitter,Pt=k.marker.size/2,Wt=0;wt+zt>=0&&(Wt=tt*(wt+zt),Wt>pt?(ft=!0,it=Pt,at=Wt):Wt>dt&&(it=Pt,at=pt)),Wt<=pt&&(at=pt);var Ht=0;wt-zt<=0&&(Ht=-tt*(wt-zt),Ht>st?(ft=!0,Y=Pt,vt=Ht):Ht>rt&&(Y=Pt,vt=st)),Ht<=st&&(vt=st)}else at=pt,vt=st;var Jt=new Array(T.length);for(v=0;v{var c=En(),g=_n(),P=Vs(),S=5,t=.01;function e(o,i,s,f){var x=o._context.staticPlot,y=i.xaxis,v=i.yaxis;g.makeTraceGroups(f,s,"trace boxes").each(function(T){var u=c.select(this),b=T[0],_=b.t,C=b.trace;if(_.wdPos=_.bdPos*C.whiskerwidth,C.visible!==!0||_.empty){u.remove();return}var M,E;C.orientation==="h"?(M=v,E=y):(M=y,E=v),r(u,{pos:M,val:E},C,_,x),a(u,{x:y,y:v},C,_),n(u,{pos:M,val:E},C,_)})}function r(o,i,s,f,x){var y=s.orientation==="h",v=i.val,T=i.pos,u=!!T.rangebreaks,b=f.bPos,_=f.wdPos||0,C=f.bPosPxOffset||0,M=s.whiskerwidth||0,E=s.showwhiskers!==!1,A=s.notched||!1,h=A?1-2*s.notchwidth:1,p,k;Array.isArray(f.bdPos)?(p=f.bdPos[0],k=f.bdPos[1]):(p=f.bdPos,k=f.bdPos);var w=o.selectAll("path.box").data(s.type!=="violin"||s.box.visible?g.identity:[]);w.enter().append("path").style("vector-effect",x?"none":"non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(R){if(R.empty)return c.select(this).attr("d","M0,0Z");var O=T.c2l(R.pos+b,!0),N=T.l2p(O-p)+C,V=T.l2p(O+k)+C,H=u?(N+V)/2:T.l2p(O)+C,F=s.whiskerwidth,U=u?N*F+(1-F)*H:T.l2p(O-_)+C,W=u?V*F+(1-F)*H:T.l2p(O+_)+C,q=T.l2p(O-p*h)+C,X=T.l2p(O+k*h)+C,lt=s.sizemode==="sd",yt=v.c2p(lt?R.mean-R.sd:R.q1,!0),pt=lt?v.c2p(R.mean+R.sd,!0):v.c2p(R.q3,!0),st=g.constrain(lt?v.c2p(R.mean,!0):v.c2p(R.med,!0),Math.min(yt,pt)+1,Math.max(yt,pt)-1),tt=R.lf===void 0||s.boxpoints===!1||lt,dt=v.c2p(tt?R.min:R.lf,!0),rt=v.c2p(tt?R.max:R.uf,!0),at=v.c2p(R.ln,!0),vt=v.c2p(R.un,!0);y?c.select(this).attr("d","M"+st+","+q+"V"+X+"M"+yt+","+N+"V"+V+(A?"H"+at+"L"+st+","+X+"L"+vt+","+V:"")+"H"+pt+"V"+N+(A?"H"+vt+"L"+st+","+q+"L"+at+","+N:"")+"Z"+(E?"M"+yt+","+H+"H"+dt+"M"+pt+","+H+"H"+rt+(M===0?"":"M"+dt+","+U+"V"+W+"M"+rt+","+U+"V"+W):"")):c.select(this).attr("d","M"+q+","+st+"H"+X+"M"+N+","+yt+"H"+V+(A?"V"+at+"L"+X+","+st+"L"+V+","+vt:"")+"V"+pt+"H"+N+(A?"V"+vt+"L"+q+","+st+"L"+N+","+at:"")+"Z"+(E?"M"+H+","+yt+"V"+dt+"M"+H+","+pt+"V"+rt+(M===0?"":"M"+U+","+dt+"H"+W+"M"+U+","+rt+"H"+W):""))})}function a(o,i,s,f){var x=i.x,y=i.y,v=f.bdPos,T=f.bPos,u=s.boxpoints||s.points;g.seedPseudoRandom();var b=function(M){return M.forEach(function(E){E.t=f,E.trace=s}),M},_=o.selectAll("g.points").data(u?b:[]);_.enter().append("g").attr("class","points"),_.exit().remove();var C=_.selectAll("path").data(function(M){var E,A=M.pts2,h=Math.max((M.max-M.min)/10,M.q3-M.q1),p=h*1e-9,k=h*t,w=[],R=0,O;if(s.jitter){if(h===0)for(R=1,w=new Array(A.length),E=0;EM.lo&&(W.so=!0)}return A});C.enter().append("path").classed("point",!0),C.exit().remove(),C.call(P.translatePoints,x,y)}function n(o,i,s,f){var x=i.val,y=i.pos,v=!!y.rangebreaks,T=f.bPos,u=f.bPosPxOffset||0,b=s.boxmean||(s.meanline||{}).visible,_,C;Array.isArray(f.bdPos)?(_=f.bdPos[0],C=f.bdPos[1]):(_=f.bdPos,C=f.bdPos);var M=o.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?g.identity:[]);M.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),M.exit().remove(),M.each(function(E){var A=y.c2l(E.pos+T,!0),h=y.l2p(A-_)+u,p=y.l2p(A+C)+u,k=v?(h+p)/2:y.l2p(A)+u,w=x.c2p(E.mean,!0),R=x.c2p(E.mean-E.sd,!0),O=x.c2p(E.mean+E.sd,!0);s.orientation==="h"?c.select(this).attr("d","M"+w+","+h+"V"+p+(b==="sd"?"m0,0L"+R+","+k+"L"+w+","+h+"L"+O+","+k+"Z":"")):c.select(this).attr("d","M"+h+","+w+"H"+p+(b==="sd"?"m0,0L"+k+","+R+"L"+h+","+w+"L"+k+","+O+"Z":""))})}$.exports={plot:e,plotBoxAndWhiskers:r,plotPoints:a,plotBoxMean:n}}),D6=Ft((Q,$)=>{var c=En(),g=ui(),P=Vs();function S(e,r,a){var n=a||c.select(e).selectAll("g.trace.boxes");n.style("opacity",function(o){return o[0].trace.opacity}),n.each(function(o){var i=c.select(this),s=o[0].trace,f=s.line.width;function x(T,u,b,_){T.style("stroke-width",u+"px").call(g.stroke,b).call(g.fill,_)}var y=i.selectAll("path.box");if(s.type==="candlestick")y.each(function(T){if(!T.empty){var u=c.select(this),b=s[T.dir];x(u,b.line.width,b.line.color,b.fillcolor),u.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{x(y,f,s.line.color,s.fillcolor),i.selectAll("path.mean").style({"stroke-width":f,"stroke-dasharray":2*f+"px,"+f+"px"}).call(g.stroke,s.line.color);var v=i.selectAll("path.point");P.pointStyle(v,s,e)}})}function t(e,r,a){var n=r[0].trace,o=a.selectAll("path.point");n.selectedpoints?P.selectedPointStyle(o,n):P.pointStyle(o,n,e)}$.exports={style:S,styleOnSelect:t}}),RM=Ft((Q,$)=>{var c=Ls(),g=_n(),P=Qh(),S=ui(),t=g.fillText;function e(n,o,i,s){var f=n.cd,x=f[0].trace,y=x.hoveron,v=[],T;return y.indexOf("boxes")!==-1&&(v=v.concat(r(n,o,i,s))),y.indexOf("points")!==-1&&(T=a(n,o,i)),s==="closest"?T?[T]:v:(T&&v.push(T),v)}function r(n,o,i,s){var f=n.cd,x=n.xa,y=n.ya,v=f[0].trace,T=f[0].t,u=v.type==="violin",b,_,C,M,E,A,h,p,k,w,R,O=T.bdPos,N,V,H=T.wHover,F=function(Ht){return C.c2l(Ht.pos)+T.bPos-C.c2l(A)};u&&v.side!=="both"?(v.side==="positive"&&(k=function(Ht){var Jt=F(Ht);return P.inbox(Jt,Jt+H,w)},N=O,V=0),v.side==="negative"&&(k=function(Ht){var Jt=F(Ht);return P.inbox(Jt-H,Jt,w)},N=0,V=O)):(k=function(Ht){var Jt=F(Ht);return P.inbox(Jt-H,Jt+H,w)},N=V=O);var U;u?U=function(Ht){return P.inbox(Ht.span[0]-E,Ht.span[1]-E,w)}:U=function(Ht){return P.inbox(Ht.min-E,Ht.max-E,w)},v.orientation==="h"?(E=o,A=i,h=U,p=k,b="y",C=y,_="x",M=x):(E=i,A=o,h=k,p=U,b="x",C=x,_="y",M=y);var W=Math.min(1,O/Math.abs(C.r2c(C.range[1])-C.r2c(C.range[0])));w=n.maxHoverDistance-W,R=n.maxSpikeDistance-W;function q(Ht){return(h(Ht)+p(Ht))/2}var X=P.getDistanceFunction(s,h,p,q);if(P.getClosest(f,X,n),n.index===!1)return[];var lt=f[n.index],yt=v.line.color,pt=(v.marker||{}).color;S.opacity(yt)&&v.line.width?n.color=yt:S.opacity(pt)&&v.boxpoints?n.color=pt:n.color=v.fillcolor,n[b+"0"]=C.c2p(lt.pos+T.bPos-V,!0),n[b+"1"]=C.c2p(lt.pos+T.bPos+N,!0),n[b+"LabelVal"]=lt.orig_p!==void 0?lt.orig_p:lt.pos;var st=b+"Spike";n.spikeDistance=q(lt)*R/w,n[st]=C.c2p(lt.pos,!0);var tt=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,dt=v.boxpoints||v.points,rt=dt&&tt?["max","uf","q3","med","mean","q1","lf","min"]:dt&&!tt?["max","uf","q3","med","q1","lf","min"]:!dt&&tt?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],at=M.range[1]{$.exports=function(c,g){return g.hoverOnBox&&(c.hoverOnBox=g.hoverOnBox),"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),BM=Ft((Q,$)=>{$.exports=function(c,g){var P=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a;if(g===!1)for(r=0;r{$.exports={attributes:jw(),layoutAttributes:Uw(),supplyDefaults:Vw().supplyDefaults,crossTraceDefaults:Vw().crossTraceDefaults,supplyLayoutDefaults:z6().supplyLayoutDefaults,calc:FM(),crossTraceCalc:I6().crossTraceCalc,plot:O6().plot,style:D6().style,styleOnSelect:D6().styleOnSelect,hoverPoints:RM().hoverPoints,eventData:NF(),selectPoints:BM(),moduleType:"trace",name:"box",basePlotModule:Ef(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}),UF=Ft((Q,$)=>{$.exports=jF()}),nb=Ft((Q,$)=>{var c=Ac(),{extendFlat:g}=ya(),P=Yo(),{axisHoverFormat:S}=dh(),t=ka(),{hovertemplateAttrs:e,templatefallbackAttrs:r,texttemplateAttrs:a}=$u(),n=tf();$.exports=g({z:{valType:"data_array",editType:"calc"},x:g({},n.x,{impliedEdits:{xtype:"array"}}),x0:g({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:g({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:g({},n.y,{impliedEdits:{ytype:"array"}}),y0:g({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:g({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:g({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:g({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:g({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:g({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:g({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:g({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:e(),hovertemplatefallback:r(),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:r({editType:"plot"}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:g({},P.showlegend,{dflt:!1}),zorder:n.zorder},c("",{cLetter:"z",autoColorDflt:!1}))}),F6=Ft((Q,$)=>{var c=ia(),g=_n(),P=Qo();$.exports=function(e,r,a,n,o,i){var s=a("z");o=o||"x",i=i||"y";var f,x;if(s===void 0||!s.length)return 0;if(g.isArray1D(s)){f=a(o),x=a(i);var y=g.minRowLength(f),v=g.minRowLength(x);if(y===0||v===0)return 0;r._length=Math.min(y,v,s.length)}else{if(f=S(o,a),x=S(i,a),!t(s))return 0;a("transpose"),r._length=null}var T=P.getComponentMethod("calendars","handleTraceDefaults");return T(e,r,[o,i],n),!0};function S(e,r){var a=r(e),n=a?r(e+"type","array"):"scaled";return n==="scaled"&&(r(e+"0"),r("d"+e)),a}function t(e){for(var r=!0,a=!1,n=!1,o,i=0;i0&&(a=!0);for(var s=0;s{var c=_n();$.exports=function(g,P){g("texttemplate"),g("texttemplatefallback");var S=c.extendFlat({},P.font,{color:"auto",size:"auto"});c.coerceFont(g,"textfont",S)}}),NM=Ft((Q,$)=>{$.exports=function(c,g,P){var S=P("zsmooth");S===!1&&(P("xgap"),P("ygap")),P("zhoverformat")}}),VF=Ft((Q,$)=>{var c=_n(),g=F6(),P=Hw(),S=jp(),t=NM(),e=gc(),r=nb();$.exports=function(a,n,o,i){function s(x,y){return c.coerce(a,n,r,x,y)}var f=g(a,n,s,i);if(!f){n.visible=!1;return}S(a,n,i,s),s("xhoverformat"),s("yhoverformat"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),P(s,i),t(a,n,s,i),s("hoverongaps"),s("connectgaps",c.isArray1D(n.z)&&n.zsmooth!==!1),e(a,n,i,s,{prefix:"",cLetter:"z"}),s("zorder")}}),jM=Ft((Q,$)=>{var c=ia();$.exports={count:function(g,P,S){return S[g]++,1},sum:function(g,P,S,t){var e=t[P];return c(e)?(e=Number(e),S[g]+=e,e):0},avg:function(g,P,S,t,e){var r=t[P];return c(r)&&(r=Number(r),S[g]+=r,e[g]++),0},min:function(g,P,S,t){var e=t[P];if(c(e))if(e=Number(e),c(S[g])){if(S[g]>e){var r=e-S[g];return S[g]=e,r}}else return S[g]=e,e;return 0},max:function(g,P,S,t){var e=t[P];if(c(e))if(e=Number(e),c(S[g])){if(S[g]{$.exports={percent:function(c,g){for(var P=c.length,S=100/g,t=0;t{$.exports=function(c,g){for(var P=c.length,S=0,t=0;t{var c=Ua(),g=c.ONEAVGYEAR,P=c.ONEAVGMONTH,S=c.ONEDAY,t=c.ONEHOUR,e=c.ONEMIN,r=c.ONESEC,a=Ls().tickIncrement;$.exports=function(f,x,y,v,T){var u=-1.1*x,b=-.1*x,_=f-b,C=y[0],M=y[1],E=Math.min(n(C+b,C+_,v,T),n(M+b,M+_,v,T)),A=Math.min(n(C+u,C+b,v,T),n(M+u,M+b,v,T)),h,p;if(E>A&&AS){var k=h===g?1:6,w=h===g?"M12":"M1";return function(R,O){var N=v.c2d(R,g,T),V=N.indexOf("-",k);V>0&&(N=N.substr(0,V));var H=v.d2c(N,0,T);if(Hr?f>S?f>g*1.1?g:f>P*1.1?P:S:f>t?t:f>e?e:r:Math.pow(10,Math.floor(Math.log(f)/Math.LN10))}function i(f,x,y,v,T,u){if(v&&f>S){var b=s(x,T,u),_=s(y,T,u),C=f===g?0:1;return b[C]!==_[C]}return Math.floor(y/f)-Math.floor(x/f)>.1}function s(f,x,y){var v=x.c2d(f,g,y).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}),WM=Ft((Q,$)=>{var c=ia(),g=_n(),P=Qo(),S=Ls(),{hasColorscale:t}=Zd(),e=ep(),r=Nw(),a=jM(),n=UM(),o=VM(),i=HM();function s(T,u){var b=[],_=[],C=u.orientation==="h",M=S.getFromId(T,C?u.yaxis:u.xaxis),E=C?"y":"x",A={x:"y",y:"x"}[E],h=u[E+"calendar"],p=u.cumulative,k,w=f(T,u,M,E),R=w[0],O=w[1],N=typeof R.size=="string",V=[],H=N?V:R,F=[],U=[],W=[],q=0,X=u.histnorm,lt=u.histfunc,yt=X.indexOf("density")!==-1,pt,st,tt;p.enabled&&yt&&(X=X.replace(/ ?density$/,""),yt=!1);var dt=lt==="max"||lt==="min",rt=dt?null:0,at=a.count,vt=n[X],it=!1,Y=function(te){return M.r2c(te,0,h)},ft;for(g.isArrayOrTypedArray(u[A])&<!=="count"&&(ft=u[A],it=lt==="avg",at=a[lt]),k=Y(R.start),st=Y(R.end)+(k-S.tickIncrement(k,R.size,!1,h))/1e6;k=0&&tt=Tt;k--)if(_[k]){Lt=k;break}for(k=Tt;k<=Lt;k++)if(c(b[k])&&c(_[k])){var Mt={p:b[k],s:_[k],b:0};p.enabled||(Mt.pts=W[k],Pt?Mt.ph0=Mt.ph1=W[k].length?O[W[k][0]]:b[k]:(u._computePh=!0,Mt.ph0=he(V[k]),Mt.ph1=he(V[k+1],!0))),se.push(Mt)}return se.length===1&&(se[0].width1=S.tickIncrement(se[0].p,R.size,!1,h)-se[0].p),t(u,"marker")&&e(T,u,{vals:u.marker.color,containerStr:"marker",cLetter:"c"}),t(u,"marker.line")&&e(T,u,{vals:u.marker.line.color,containerStr:"marker.line",cLetter:"c"}),r(se,u),g.isArrayOrTypedArray(u.selectedpoints)&&g.tagSelected(se,u,Jt),se}function f(T,u,b,_,C){var M=_+"bins",E=T._fullLayout,A=u["_"+_+"bingroup"],h=E._histogramBinOpts[A],p=E.barmode==="overlay",k,w,R,O,N,V,H,F=function(ge){return b.r2c(ge,0,O)},U=function(ge){return b.c2r(ge,0,O)},W=b.type==="date"?function(ge){return ge||ge===0?g.cleanDate(ge,null,O):null}:function(ge){return c(ge)?Number(ge):null};function q(ge,he,de){he[ge+"Found"]?(he[ge]=W(he[ge]),he[ge]===null&&(he[ge]=de[ge])):(V[ge]=he[ge]=de[ge],g.nestedProperty(w[0],M+"."+ge).set(de[ge]))}if(u["_"+_+"autoBinFinished"])delete u["_"+_+"autoBinFinished"];else{w=h.traces;var X=[],lt=!0,yt=!1,pt=!1;for(k=0;k"u"){if(C)return[tt,N,!0];tt=x(T,u,b,_,M)}H=R.cumulative||{},H.enabled&&H.currentbin!=="include"&&(H.direction==="decreasing"?tt.start=U(S.tickIncrement(F(tt.start),tt.size,!0,O)):tt.end=U(S.tickIncrement(F(tt.end),tt.size,!1,O))),h.size=tt.size,h.sizeFound||(V.size=tt.size,g.nestedProperty(w[0],M+".size").set(tt.size)),q("start",h,tt),q("end",h,tt)}N=u["_"+_+"pos0"],delete u["_"+_+"pos0"];var rt=u._input[M]||{},at=g.extendFlat({},h),vt=h.start,it=b.r2l(rt.start),Y=it!==void 0;if((h.startFound||Y)&&it!==b.r2l(vt)){var ft=Y?it:g.aggNums(Math.min,null,N),ut={type:b.type==="category"||b.type==="multicategory"?"linear":b.type,r2l:b.r2l,dtick:h.size,tick0:vt,calendar:O,range:[ft,S.tickIncrement(ft,h.size,!1,O)].map(b.l2r)},wt=S.tickFirst(ut);wt>b.r2l(ft)&&(wt=S.tickIncrement(wt,h.size,!0,O)),at.start=b.l2r(wt),Y||g.nestedProperty(u,M+".start").set(at.start)}var zt=h.end,Pt=b.r2l(rt.end),Wt=Pt!==void 0;if((h.endFound||Wt)&&Pt!==b.r2l(zt)){var Ht=Wt?Pt:g.aggNums(Math.max,null,N);at.end=b.l2r(Ht),Wt||g.nestedProperty(u,M+".start").set(at.end)}var Jt="autobin"+_;return u._input[Jt]===!1&&(u._input[M]=g.extendFlat({},u[M]||{}),delete u._input[Jt],delete u[Jt]),[at,N]}function x(T,u,b,_,C){var M=T._fullLayout,E=y(T,u),A=!1,h=1/0,p=[u],k,w,R;for(k=0;k=0;_--)A(_);else if(u==="increasing"){for(_=1;_=0;_--)T[_]+=T[_+1];b==="exclude"&&(T.push(0),T.shift())}}$.exports={calc:s,calcAllAutoBins:f}}),HF=Ft((Q,$)=>{var c=_n(),g=Ls(),P=jM(),S=UM(),t=VM(),e=HM(),r=WM().calcAllAutoBins;$.exports=function(i,s){var f=g.getFromId(i,s.xaxis),x=g.getFromId(i,s.yaxis),y=s.xcalendar,v=s.ycalendar,T=function(Ce){return f.r2c(Ce,0,y)},u=function(Ce){return x.r2c(Ce,0,v)},b=function(Ce){return f.c2r(Ce,0,y)},_=function(Ce){return x.c2r(Ce,0,v)},C,M,E,A,h=r(i,s,f,"x"),p=h[0],k=h[1],w=r(i,s,x,"y"),R=w[0],O=w[1],N=s._length;k.length>N&&k.splice(N,k.length-N),O.length>N&&O.splice(N,O.length-N);var V=[],H=[],F=[],U=typeof p.size=="string",W=typeof R.size=="string",q=[],X=[],lt=U?q:p,yt=W?X:R,pt=0,st=[],tt=[],dt=s.histnorm,rt=s.histfunc,at=dt.indexOf("density")!==-1,vt=rt==="max"||rt==="min",it=vt?null:0,Y=P.count,ft=S[dt],ut=!1,wt=[],zt=[],Pt="z"in s?s.z:"marker"in s&&Array.isArray(s.marker.color)?s.marker.color:"";Pt&&rt!=="count"&&(ut=rt==="avg",Y=P[rt]);var Wt=p.size,Ht=T(p.start),Jt=T(p.end)+(Ht-g.tickIncrement(Ht,Wt,!1,y))/1e6;for(C=Ht;C=0&&E=0&&A{var c=_n(),g=Ua().BADNUM,P=B0();$.exports=function(S,t,e,r,a,n){var o=S._length,i=t.makeCalcdata(S,r),s=e.makeCalcdata(S,a);i=P(S,t,r,i).vals,s=P(S,e,a,s).vals;var f=S.text,x=f!==void 0&&c.isArray1D(f),y=S.hovertext,v=y!==void 0&&c.isArray1D(y),T,u,b=c.distinctVals(i),_=b.vals,C=c.distinctVals(s),M=C.vals,E=[],A,h,p=M.length,k=_.length;for(T=0;T{var c=ia(),g=_n(),P=Ua().BADNUM;$.exports=function(S,t,e,r){var a,n,o,i,s,f;function x(_){if(c(_))return+_}if(t&&t.transpose){for(a=0,s=0;s{var c=_n(),g=.01,P=[[-1,0],[1,0],[0,-1],[0,1]];function S(e){return .5-.25*Math.min(1,e*.5)}$.exports=function(e,r){var a=1,n;for(t(e,r),n=0;ng;n++)a=t(e,r,S(a));return a>g&&c.log("interp2d didn't converge quickly",a),e};function t(e,r,a){var n=0,o,i,s,f,x,y,v,T,u,b,_,C,M;for(f=0;fC&&(n=Math.max(n,Math.abs(e[i][s]-_)/(M-C))))}return n}}),j6=Ft((Q,$)=>{var c=_n().maxRowLength;$.exports=function(g){var P=[],S={},t=[],e=g[0],r=[],a=[0,0,0],n=c(g),o,i,s,f,x,y,v,T;for(i=0;i=0;x--)f=t[x],i=f[0],s=f[1],y=((S[[i-1,s]]||a)[2]+(S[[i+1,s]]||a)[2]+(S[[i,s-1]]||a)[2]+(S[[i,s+1]]||a)[2])/20,y&&(v[f]=[i,s,y],t.splice(x,1),T=!0);if(!T)throw"findEmpties iterated with no new neighbors";for(f in v)S[f]=v[f],P.push(v[f])}return P.sort(function(u,b){return b[2]-u[2]})}}),qM=Ft((Q,$)=>{var c=Qo(),g=_n().isArrayOrTypedArray;$.exports=function(P,S,t,e,r,a){var n=[],o=c.traceIs(P,"contour"),i=c.traceIs(P,"histogram"),s,f,x,y=g(S)&&S.length>1;if(y&&!i&&a.type!=="category"){var v=S.length;if(v<=r){if(o)n=Array.from(S).slice(0,r);else if(r===1)a.type==="log"?n=[.5*S[0],2*S[0]]:n=[S[0]-.5,S[0]+.5];else if(a.type==="log"){for(n=[Math.pow(S[0],1.5)/Math.pow(S[1],.5)],x=1;x{var c=Qo(),g=_n(),P=Ls(),S=B0(),t=HF(),e=ep(),r=R6(),a=B6(),n=N6(),o=j6(),i=qM(),s=Ua().BADNUM;$.exports=function(y,v){var T=P.getFromId(y,v.xaxis||"x"),u=P.getFromId(y,v.yaxis||"y"),b=c.traceIs(v,"contour"),_=c.traceIs(v,"histogram"),C=b?"best":v.zsmooth,M,E,A,h,p,k,w,R,O,N,V;if(T._minDtick=0,u._minDtick=0,_)V=t(y,v),h=V.orig_x,M=V.x,E=V.x0,A=V.dx,R=V.orig_y,p=V.y,k=V.y0,w=V.dy,O=V.z;else{var H=v.z;g.isArray1D(H)?(r(v,T,u,"x","y",["z"]),M=v._x,p=v._y,H=v._z):(h=v.x?T.makeCalcdata(v,"x"):[],R=v.y?u.makeCalcdata(v,"y"):[],M=S(v,T,"x",h).vals,p=S(v,u,"y",R).vals,v._x=M,v._y=p),E=v.x0,A=v.dx,k=v.y0,w=v.dy,O=a(H,v,T,u)}(T.rangebreaks||u.rangebreaks)&&(O=x(M,p,O),_||(M=f(M),p=f(p),v._x=M,v._y=p)),!_&&(b||v.connectgaps)&&(v._emptypoints=o(O),n(O,v._emptypoints));function F(tt){C=v._input.zsmooth=v.zsmooth=!1,g.warn('cannot use zsmooth: "fast": '+tt)}function U(tt){if(tt.length>1){var dt=(tt[tt.length-1]-tt[0])/(tt.length-1),rt=Math.abs(dt/100);for(N=0;Nrt)return!1}return!0}v._islinear=!1,T.type==="log"||u.type==="log"?C==="fast"&&F("log axis found"):U(M)?U(p)?v._islinear=!0:C==="fast"&&F("y scale is not linear"):C==="fast"&&F("x scale is not linear");var W=g.maxRowLength(O),q=v.xtype==="scaled"?"":M,X=i(v,q,E,A,W,T),lt=v.ytype==="scaled"?"":p,yt=i(v,lt,k,w,O.length,u);v._extremes[T._id]=P.findExtremes(T,X),v._extremes[u._id]=P.findExtremes(u,yt);var pt={x:X,y:yt,z:O,text:v._text||v.text,hovertext:v._hovertext||v.hovertext};if(v.xperiodalignment&&h&&(pt.orig_x=h),v.yperiodalignment&&R&&(pt.orig_y=R),q&&q.length===X.length-1&&(pt.xCenter=q),lt&<.length===yt.length-1&&(pt.yCenter=lt),_&&(pt.xRanges=V.xRanges,pt.yRanges=V.yRanges,pt.pts=V.pts),b||e(y,v,{vals:O,cLetter:"z"}),b&&v.contours&&v.contours.coloring==="heatmap"){var st={type:v.type==="contour"?"heatmap":"histogram2d",xcalendar:v.xcalendar,ycalendar:v.ycalendar};pt.xfill=i(st,q,E,A,W,T),pt.yfill=i(st,lt,k,w,O.length,u)}return[pt]};function f(y){for(var v=[],T=y.length,u=0;u{Q.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],Q.STYLE=Q.CSS_DECLARATIONS.map(function($){return $.join(": ")+"; "}).join("")}),ZM=Ft((Q,$)=>{var c=V6(),g=Vs(),P=_n(),S=null;function t(){if(S!==null)return S;S=!1;var e=P.isSafari()||P.isMacWKWebView()||P.isIOS();if(window.navigator.userAgent&&!e){var r=Array.from(c.CSS_DECLARATIONS).reverse(),a=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof a=="function")S=r.some(function(s){return a.apply(null,s)});else{var n=g.tester.append("image").attr("style",c.STYLE),o=window.getComputedStyle(n.node()),i=o.imageRendering;S=r.some(function(s){var f=s[1];return i===f||i===f.toLowerCase()}),n.remove()}}return S}$.exports=t}),H6=Ft((Q,$)=>{var c=En(),g=eo(),P=Qo(),S=Vs(),t=Ls(),e=_n(),r=tc(),a=Ws(),n=ui(),o=Xc().extractOpts,i=Xc().makeColorScaleFuncFromTrace,s=Bp(),f=Sf(),x=f.LINE_SPACING,y=ZM(),v=V6().STYLE,T="heatmap-label";function u(E){return E.selectAll("g."+T)}function b(E){u(E).remove()}$.exports=function(E,A,h,p){var k=A.xaxis,w=A.yaxis;e.makeTraceGroups(p,h,"hm").each(function(R){var O=c.select(this),N=R[0],V=N.trace,H=V.xgap||0,F=V.ygap||0,U=N.z,W=N.x,q=N.y,X=N.xCenter,lt=N.yCenter,yt=P.traceIs(V,"contour"),pt=yt?"best":V.zsmooth,st=U.length,tt=e.maxRowLength(U),dt=!1,rt=!1,at,vt,it,Y,ft,ut,wt,zt;for(ut=0;at===void 0&&ut0;)vt=k.c2p(W[ut]),ut--;for(vt0;)ft=w.c2p(q[ut]),ut--;ft=k._length||vt<=0||Y>=w._length||ft<=0;if(ge){var he=O.selectAll("image").data([]);he.exit().remove(),b(O);return}var de,se;Pt==="fast"?(de=tt,se=st):(de=Ht,se=Jt);var Tt=document.createElement("canvas");Tt.width=de,Tt.height=se;var Lt=Tt.getContext("2d",{willReadFrequently:!0}),Mt=i(V,{noNumericCheck:!0,returnArray:!0}),te,ve;Pt==="fast"?(te=dt?function(Zn){return tt-1-Zn}:e.identity,ve=rt?function(Zn){return st-1-Zn}:e.identity):(te=function(Zn){return e.constrain(Math.round(k.c2p(W[Zn])-at),0,Ht)},ve=function(Zn){return e.constrain(Math.round(w.c2p(q[Zn])-Y),0,Jt)});var oe=ve(0),Te=[oe,oe],He=dt?0:1,Ge=rt?0:1,cr=0,ur=0,jr=0,Hr=0,br,Kr,rn,Ce,Gt;function ne(Zn,Ea){if(Zn!==void 0){var Ri=Mt(Zn);return Ri[0]=Math.round(Ri[0]),Ri[1]=Math.round(Ri[1]),Ri[2]=Math.round(Ri[2]),cr+=Ea,ur+=Ri[0]*Ea,jr+=Ri[1]*Ea,Hr+=Ri[2]*Ea,Ri}return[0,0,0,0]}function Ct(Zn,Ea,Ri,Ja){var Xa=Zn[Ri.bin0];if(Xa===void 0)return ne(void 0,1);var Do=Zn[Ri.bin1],go=Ea[Ri.bin0],Fo=Ea[Ri.bin1],za=Do-Xa||0,xs=go-Xa||0,os;return Do===void 0?Fo===void 0?os=0:go===void 0?os=2*(Fo-Xa):os=(2*Fo-go-Xa)*2/3:Fo===void 0?go===void 0?os=0:os=(2*Xa-Do-go)*2/3:go===void 0?os=(2*Fo-Do-Xa)*2/3:os=Fo+Xa-Do-go,ne(Xa+Ri.frac*za+Ja.frac*(xs+Ri.frac*os))}if(Pt!=="default"){var gt=0,St;try{St=new Uint8Array(de*se*4)}catch{St=new Array(de*se*4)}if(Pt==="smooth"){var Nt=X||W,re=lt||q,le=new Array(Nt.length),we=new Array(re.length),Ue=new Array(Ht),qe=X?C:_,or=lt?C:_,Ar,Tr,pr;for(ut=0;utxi||xi>w._length))for(wt=Cn;wtOi||Oi>k._length)){var Zi=a({x:Li,y:ci},V,E._fullLayout);Zi.x=Li,Zi.y=ci;var li=N.z[ut][wt];li===void 0?(Zi.z="",Zi.zLabel=""):(Zi.z=li,Zi.zLabel=t.tickText(We,li,"hover").text);var La=N.text&&N.text[ut]&&N.text[ut][wt];(La===void 0||La===!1)&&(La=""),Zi.text=La;var Wa=e.texttemplateString({data:[Zi,V._meta],fallback:V.texttemplatefallback,labels:Zi,locale:E._fullLayout._d3locale,template:aa});if(Wa){var ze=Wa.split("
"),Pe=ze.length,Rr=0;for(zt=0;zt{$.exports={min:"zmin",max:"zmax"}}),W6=Ft((Q,$)=>{var c=En();$.exports=function(g){c.select(g).selectAll(".hm image").style("opacity",function(P){return P.trace.opacity})}}),q6=Ft((Q,$)=>{var c=Qh(),g=_n(),P=g.isArrayOrTypedArray,S=Ls(),t=Xc().extractOpts;$.exports=function(e,r,a,n,o){o||(o={});var i=o.isContour,s=e.cd[0],f=s.trace,x=e.xa,y=e.ya,v=s.x,T=s.y,u=s.z,b=s.xCenter,_=s.yCenter,C=s.zmask,M=f.zhoverformat,E=v,A=T,h,p,k,w;if(e.index!==!1){try{k=Math.round(e.index[1]),w=Math.round(e.index[0])}catch{g.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index);return}if(k<0||k>=u[0].length||w<0||w>u.length)return}else{if(c.inbox(r-v[0],r-v[v.length-1],0)>0||c.inbox(a-T[0],a-T[T.length-1],0)>0)return;if(i){var R;for(E=[2*v[0]-v[1]],R=1;R{$.exports={attributes:nb(),supplyDefaults:VF(),calc:U6(),plot:H6(),colorbar:z1(),style:W6(),hoverPoints:q6(),moduleType:"trace",name:"heatmap",basePlotModule:Ef(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}),qF=Ft((Q,$)=>{$.exports=WF()}),$M=Ft((Q,$)=>{$.exports=function(c,g){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}),ZF=Ft((Q,$)=>{$.exports={eventDataKeys:["binNumber"]}}),Z6=Ft((Q,$)=>{var c=Lg(),g=dh().axisHoverFormat,{hovertemplateAttrs:P,texttemplateAttrs:S,templatefallbackAttrs:t}=$u(),e=ka(),r=$M(),a=ZF(),n=ya().extendFlat;$.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:g("x"),yhoverformat:g("y"),text:n({},c.text,{}),hovertext:n({},c.hovertext,{}),orientation:c.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:r("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:r("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:P({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),texttemplate:S({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:t({editType:"plot"}),textposition:n({},c.textposition,{arrayOk:!1}),textfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:c.insidetextanchor,textangle:c.textangle,cliponaxis:c.cliponaxis,constraintext:c.constraintext,marker:c.marker,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,zorder:c.zorder}}),$F=Ft((Q,$)=>{var c=Qo(),g=_n(),P=ui(),S=em().handleText,t=L6(),e=Z6();$.exports=function(r,a,n,o){function i(A,h){return g.coerce(r,a,e,A,h)}var s=i("x"),f=i("y"),x=i("cumulative.enabled");x&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var y=i("textposition");S(r,a,o,i,y,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var v=i("orientation",f&&!s?"h":"v"),T=v==="v"?"x":"y",u=v==="v"?"y":"x",b=s&&f?Math.min(g.minRowLength(s)&&g.minRowLength(f)):g.minRowLength(a[T]||[]);if(!b){a.visible=!1;return}a._length=b;var _=c.getComponentMethod("calendars","handleTraceDefaults");_(r,a,["x","y"],o);var C=a[u];C&&i("histfunc"),i("histnorm"),i("autobin"+T),t(r,a,i,n,o),g.coerceSelectionMarkerOpacity(a,i);var M=(a.marker.line||{}).color,E=c.getComponentMethod("errorbars","supplyDefaults");E(r,a,M||P.defaultLine,{axis:"y"}),E(r,a,M||P.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}}),$6=Ft((Q,$)=>{var c=_n(),g=Rc(),P=Qo().traceIs,S=Cg(),t=em().validateCornerradius,e=c.nestedProperty,r=vv().getAxisGroup,a=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],n=["x","y"];$.exports=function(o,i){var s=i._histogramBinOpts={},f=[],x={},y=[],v,T,u,b,_,C,M;function E(yt,pt){return c.coerce(v._input,v,v._module.attributes,yt,pt)}function A(yt){return yt.orientation==="v"?"x":"y"}function h(yt,pt){var st=g.getFromTrace({_fullLayout:i},yt,pt);return st.type}function p(yt,pt,st){var tt=yt.uid+"__"+st;pt||(pt=tt);var dt=h(yt,st),rt=yt[st+"calendar"]||"",at=s[pt],vt=!0;at&&(dt===at.axType&&rt===at.calendar?(vt=!1,at.traces.push(yt),at.dirs.push(st)):(pt=tt,dt!==at.axType&&c.warn(["Attempted to group the bins of trace",yt.index,"set on a","type:"+dt,"axis","with bins on","type:"+at.axType,"axis."].join(" ")),rt!==at.calendar&&c.warn(["Attempted to group the bins of trace",yt.index,"set with a",rt,"calendar","with bins",at.calendar?"on a "+at.calendar+" calendar":"w/o a set calendar"].join(" ")))),vt&&(s[pt]={traces:[yt],dirs:[st],axType:dt,calendar:yt[st+"calendar"]||""}),yt["_"+st+"bingroup"]=pt}for(_=0;_{var c=eb().hoverPoints,g=Ls().hoverLabelText;$.exports=function(P,S,t,e,r){var a=c(P,S,t,e,r);if(a){P=a[0];var n=P.cd[P.index],o=P.cd[0].trace;if(!o.cumulative.enabled){var i=o.orientation==="h"?"y":"x";P[i+"Label"]=g(P[i+"a"],[n.ph0,n.ph1],o[i+"hoverformat"])}return a}}}),GM=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){if(c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"zLabelVal"in g&&(c.z=g.zLabelVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),!(P.cumulative||{}).enabled){var e=Array.isArray(t)?S[0].pts[t[0]][t[1]]:S[t].pts;c.pointNumbers=e,c.binNumber=c.pointNumber,delete c.pointNumber,delete c.pointIndex;var r;if(P._indexToPoints){r=[];for(var a=0;a{$.exports={attributes:Z6(),layoutAttributes:C6(),supplyDefaults:$F(),crossTraceDefaults:$6(),supplyLayoutDefaults:DM(),calc:WM().calc,crossTraceCalc:zr().crossTraceCalc,plot:rx().plot,layerName:"barlayer",style:wm().style,styleOnSelect:wm().styleOnSelect,colorbar:yo(),hoverPoints:GF(),selectPoints:rb(),eventData:GM(),moduleType:"trace",name:"histogram",basePlotModule:Ef(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}),KF=Ft((Q,$)=>{$.exports=YF()}),G6=Ft((Q,$)=>{var c=Z6(),g=$M(),P=nb(),S=Yo(),t=dh().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:r,templatefallbackAttrs:a}=$u(),n=Ac(),o=ya().extendFlat;$.exports=o({x:c.x,y:c.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:g("x"),nbinsy:c.nbinsy,ybins:g("y"),autobinx:c.autobinx,autobiny:c.autobiny,bingroup:o({},c.bingroup,{}),xbingroup:o({},c.bingroup,{}),ybingroup:o({},c.bingroup,{}),xgap:P.xgap,ygap:P.ygap,zsmooth:P.zsmooth,xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z",1),hovertemplate:e({},{keys:["z"]}),hovertemplatefallback:a(),texttemplate:r({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:a({editType:"plot"}),textfont:P.textfont,showlegend:o({},S.showlegend,{dflt:!1})},n("",{cLetter:"z",autoColorDflt:!1}))}),YM=Ft((Q,$)=>{var c=Qo(),g=_n();$.exports=function(P,S,t,e){var r=t("x"),a=t("y"),n=g.minRowLength(r),o=g.minRowLength(a);if(!n||!o){S.visible=!1;return}S._length=Math.min(n,o);var i=c.getComponentMethod("calendars","handleTraceDefaults");i(P,S,["x","y"],e);var s=t("z")||t("marker.color");s&&t("histfunc"),t("histnorm"),t("autobinx"),t("autobiny")}}),XF=Ft((Q,$)=>{var c=_n(),g=YM(),P=NM(),S=gc(),t=Hw(),e=G6();$.exports=function(r,a,n,o){function i(s,f){return c.coerce(r,a,e,s,f)}g(r,a,i,o),a.visible!==!1&&(P(r,a,i,o),S(r,a,o,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),t(i,o),i("xhoverformat"),i("yhoverformat"))}}),JF=Ft((Q,$)=>{var c=q6(),g=Ls().hoverLabelText;$.exports=function(P,S,t,e,r){var a=c(P,S,t,e,r);if(a){P=a[0];var n=P.index,o=n[0],i=n[1],s=P.cd[0],f=s.trace,x=s.xRanges[i],y=s.yRanges[o];return P.xLabel=g(P.xa,[x[0],x[1]],f.xhoverformat),P.yLabel=g(P.ya,[y[0],y[1]],f.yhoverformat),a}}}),QF=Ft((Q,$)=>{$.exports={attributes:G6(),supplyDefaults:XF(),crossTraceDefaults:$6(),calc:U6(),plot:H6(),layerName:"heatmaplayer",colorbar:z1(),style:W6(),hoverPoints:JF(),eventData:GM(),moduleType:"trace",name:"histogram2d",basePlotModule:Ef(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}),tR=Ft((Q,$)=>{$.exports=QF()}),Y6=Ft((Q,$)=>{$.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}),Ww=Ft((Q,$)=>{var c=nb(),g=tf(),P=dh(),S=P.axisHoverFormat,t=P.descriptionOnlyNumbers,e=Ac(),r=Ed().dash,a=ka(),n=ya().extendFlat,o=Y6(),i=o.COMPARISON_OPS2,s=o.INTERVAL_OPS,f=g.line;$.exports=n({z:c.z,x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,text:c.text,hovertext:c.hovertext,transpose:c.transpose,xtype:c.xtype,ytype:c.ytype,xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:n({},c.texttemplate,{}),texttemplatefallback:c.texttemplatefallback,textfont:n({},c.textfont,{}),hoverongaps:c.hoverongaps,connectgaps:n({},c.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:a({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:t("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:n({},f.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:n({},f.smoothing,{}),editType:"plot"},zorder:g.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}),KM=Ft((Q,$)=>{var c=G6(),g=Ww(),P=Ac(),S=dh().axisHoverFormat,t=ya().extendFlat;$.exports=t({x:c.x,y:c.y,z:c.z,marker:c.marker,histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:c.xbins,nbinsy:c.nbinsy,ybins:c.ybins,autobinx:c.autobinx,autobiny:c.autobiny,bingroup:c.bingroup,xbingroup:c.xbingroup,ybingroup:c.ybingroup,autocontour:g.autocontour,ncontours:g.ncontours,contours:g.contours,line:{color:g.line.color,width:t({},g.line.width,{dflt:.5}),dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:g.texttemplate,texttemplatefallback:g.texttemplatefallback,textfont:g.textfont},P("",{cLetter:"z",editTypeOverride:"calc"}))}),K6=Ft((Q,$)=>{$.exports=function(c,g,P,S){var t=S("contours.start"),e=S("contours.end"),r=t===!1||e===!1,a=P("contours.size"),n;r?n=g.autocontour=!0:n=P("autocontour",!1),(n||!a)&&P("ncontours")}}),XM=Ft((Q,$)=>{var c=_n();$.exports=function(g,P,S,t){t||(t={});var e=g("contours.showlabels");if(e){var r=P.font;c.coerceFont(g,"contours.labelfont",r,{overrideDflt:{color:S}}),g("contours.labelformat")}t.hasHover!==!1&&g("zhoverformat")}}),X6=Ft((Q,$)=>{var c=gc(),g=XM();$.exports=function(P,S,t,e,r){var a=t("contours.coloring"),n,o="";a==="fill"&&(n=t("contours.showlines")),n!==!1&&(a!=="lines"&&(o=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(P.showlegend!==!0&&(S.showlegend=!1),S._dfltShowLegend=!1,c(P,S,e,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),g(t,e,o,r)}}),eR=Ft((Q,$)=>{var c=_n(),g=YM(),P=K6(),S=X6(),t=Hw(),e=KM();$.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,e,f,x)}function s(f){return c.coerce2(r,a,e,f)}g(r,a,i,o),a.visible!==!1&&(P(r,a,i,s),S(r,a,i,o),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&t(i,o))}}),JM=Ft((Q,$)=>{var c=Ls(),g=_n();$.exports=function(S,t){var e=S.contours;if(S.autocontour){var r=S.zmin,a=S.zmax;(S.zauto||r===void 0)&&(r=g.aggNums(Math.min,null,t)),(S.zauto||a===void 0)&&(a=g.aggNums(Math.max,null,t));var n=P(r,a,S.ncontours);e.size=n.dtick,e.start=c.tickFirst(n),n.range.reverse(),e.end=c.tickFirst(n),e.start===r&&(e.start+=e.size),e.end===a&&(e.end-=e.size),e.start>e.end&&(e.start=e.end=(e.start+e.end)/2),S._input.contours||(S._input.contours={}),g.extendFlat(S._input.contours,{start:e.start,end:e.end,size:e.size}),S._input.autocontour=!0}else if(e.type!=="constraint"){var o=e.start,i=e.end,s=S._input.contours;if(o>i&&(e.start=s.start=i,i=e.end=s.end=o,o=e.start),!(e.size>0)){var f;o===i?f=1:f=P(o,i,S.ncontours).dtick,s.size=e.size=f}}};function P(S,t,e){var r={type:"linear",range:[S,t]};return c.autoTicks(r,(t-S)/(e||15)),r}}),qw=Ft((Q,$)=>{$.exports=function(c){return c.end+c.size/1e6}}),QM=Ft((Q,$)=>{var c=Xc(),g=U6(),P=JM(),S=qw();$.exports=function(t,e){var r=g(t,e),a=r[0].z;P(e,a);var n=e.contours,o=c.extractOpts(e),i;if(n.coloring==="heatmap"&&o.auto&&e.autocontour===!1){var s=n.start,f=S(n),x=n.size||1,y=Math.floor((f-s)/x)+1;isFinite(x)||(x=1,y=1);var v=s-x/2,T=v+y*x;i=[v,T]}else i=a;return c.calc(t,e,{vals:i,cLetter:"z"}),r}}),Zw=Ft((Q,$)=>{$.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}),t7=Ft((Q,$)=>{var c=Zw();$.exports=function(P){var S=P[0].z,t=S.length,e=S[0].length,r=t===2||e===2,a,n,o,i,s,f,x,y,v;for(n=0;nP?0:1)+(S[0][1]>P?0:2)+(S[1][1]>P?0:4)+(S[1][0]>P?0:8);if(t===5||t===10){var e=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return P>e?t===5?713:1114:t===5?104:208}return t===15?0:t}}),e7=Ft((Q,$)=>{var c=_n(),g=Zw();$.exports=function(a,n,o){var i,s,f,x,y;for(n=n||.01,o=o||.01,f=0;f20?(x=g.CHOOSESADDLE[x][(y[0]||y[1])<0?0:1],a.crossings[f]=g.SADDLEREMAINDER[x]):delete a.crossings[f],y=g.NEWDELTA[x],!y){c.log("Found bad marching index:",x,n,a.level);break}v.push(r(a,n,y)),n[0]+=y[0],n[1]+=y[1],f=n.join(","),P(v[v.length-1],v[v.length-2],i,s)&&v.pop();var M=y[0]&&(n[0]<0||n[0]>u-2)||y[1]&&(n[1]<0||n[1]>T-2),E=n[0]===b[0]&&n[1]===b[1]&&y[0]===_[0]&&y[1]===_[1];if(E||o&&M)break;x=a.crossings[f]}C===1e4&&c.log("Infinite loop in contour?");var A=P(v[0],v[v.length-1],i,s),h=0,p=.2*a.smoothing,k=[],w=0,R,O,N,V,H,F,U,W,q,X,lt;for(C=1;C=w;C--)if(R=k[C],R=w&&R+k[O]W&&q--,a.edgepaths[q]=lt.concat(v,X));break}tt||(a.edgepaths[W]=v.concat(X))}for(W=0;W20&&n?a===208||a===1114?i=o[0]===0?1:-1:s=o[1]===0?1:-1:g.BOTTOMSTART.indexOf(a)!==-1?s=1:g.LEFTSTART.indexOf(a)!==-1?i=1:g.TOPSTART.indexOf(a)!==-1?s=-1:i=-1,[i,s]}function r(a,n,o){var i=n[0]+Math.max(o[0],0),s=n[1]+Math.max(o[1],0),f=a.z[s][i],x=a.xaxis,y=a.yaxis;if(o[1]){var v=(a.level-f)/(a.z[s][i+1]-f),T=(v!==1?(1-v)*x.c2l(a.x[i]):0)+(v!==0?v*x.c2l(a.x[i+1]):0);return[x.c2p(x.l2c(T),!0),y.c2p(a.y[s],!0),i+v,s]}else{var u=(a.level-f)/(a.z[s+1][i]-f),b=(u!==1?(1-u)*y.c2l(a.y[s]):0)+(u!==0?u*y.c2l(a.y[s+1]):0);return[x.c2p(a.x[i],!0),y.c2p(y.l2c(b),!0),i,s+u]}}}),rR=Ft((Q,$)=>{var c=Y6(),g=ia();$.exports={"[]":S("[]"),"][":S("]["),">":t(">"),"<":t("<"),"=":t("=")};function P(e,r){var a=Array.isArray(r),n;function o(i){return g(i)?+i:null}return c.COMPARISON_OPS2.indexOf(e)!==-1?n=o(a?r[0]:r):c.INTERVAL_OPS.indexOf(e)!==-1?n=a?[o(r[0]),o(r[1])]:[o(r),o(r)]:c.SET_OPS.indexOf(e)!==-1&&(n=a?r.map(o):[o(r)]),n}function S(e){return function(r){r=P(e,r);var a=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]);return{start:a,end:n,size:n-a}}}function t(e){return function(r){return r=P(e,r),{start:r,end:1/0,size:1/0}}}}),r7=Ft((Q,$)=>{var c=_n(),g=rR(),P=qw();$.exports=function(S,t,e){for(var r=S.type==="constraint"?g[S._operation](S.value):S,a=r.size,n=[],o=P(r),i=e.trace._carpetTrace,s=i?{xaxis:i.aaxis,yaxis:i.baxis,x:e.a,y:e.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:e.x,y:e.y},f=r.start;f1e3){c.warn("Too many contours, clipping at 1000",S);break}return n}}),n7=Ft((Q,$)=>{var c=_n();$.exports=function(P,S){var t,e,r,a=function(i){return i.reverse()},n=function(i){return i};switch(S){case"=":case"<":return P;case">":for(P.length!==1&&c.warn("Contour data invalid for the specified inequality operation."),e=P[0],t=0;t{$.exports=function(c,g){var P=c[0],S=P.z,t;switch(g.type){case"levels":var e=Math.min(S[0][0],S[0][1]);for(t=0;tr.level||r.starts.length&&e===r.level)}break;case"constraint":if(P.prefixBoundary=!1,P.edgepaths.length)return;var a=P.x.length,n=P.y.length,o=-1/0,i=1/0;for(t=0;t":s>o&&(P.prefixBoundary=!0);break;case"<":(so||P.starts.length&&x===i)&&(P.prefixBoundary=!0);break;case"][":f=Math.min(s[0],s[1]),x=Math.max(s[0],s[1]),fo&&(P.prefixBoundary=!0);break}break}}}),J6=Ft(Q=>{var $=En(),c=_n(),g=Vs(),P=Xc(),S=tc(),t=Ls(),e=s0(),r=H6(),a=t7(),n=e7(),o=r7(),i=n7(),s=i7(),f=Zw(),x=f.LABELOPTIMIZER;Q.plot=function(M,E,A,h){var p=E.xaxis,k=E.yaxis;c.makeTraceGroups(h,A,"contour").each(function(w){var R=$.select(this),O=w[0],N=O.trace,V=O.x,H=O.y,F=N.contours,U=o(F,E,O),W=c.ensureSingle(R,"g","heatmapcoloring"),q=[];F.coloring==="heatmap"&&(q=[w]),r(M,E,q,W),a(U),n(U);var X=p.c2p(V[0],!0),lt=p.c2p(V[V.length-1],!0),yt=k.c2p(H[0],!0),pt=k.c2p(H[H.length-1],!0),st=[[X,pt],[lt,pt],[lt,yt],[X,yt]],tt=U;F.type==="constraint"&&(tt=i(U,F._operation)),y(R,st,F),v(R,tt,st,F),u(R,U,M,O,F),_(R,E,M,O,st)})};function y(M,E,A){var h=c.ensureSingle(M,"g","contourbg"),p=h.selectAll("path").data(A.coloring==="fill"?[0]:[]);p.enter().append("path"),p.exit().remove(),p.attr("d","M"+E.join("L")+"Z").style("stroke","none")}function v(M,E,A,h){var p=h.coloring==="fill"||h.type==="constraint"&&h._operation!=="=",k="M"+A.join("L")+"Z";p&&s(E,h);var w=c.ensureSingle(M,"g","contourfill"),R=w.selectAll("path").data(p?E:[]);R.enter().append("path"),R.exit().remove(),R.each(function(O){var N=(O.prefixBoundary?k:"")+T(O,A);N?$.select(this).attr("d",N).style("stroke","none"):$.select(this).remove()})}function T(M,E){var A="",h=0,p=M.edgepaths.map(function(lt,yt){return yt}),k=!0,w,R,O,N,V,H;function F(lt){return Math.abs(lt[1]-E[0][1])<.01}function U(lt){return Math.abs(lt[1]-E[2][1])<.01}function W(lt){return Math.abs(lt[0]-E[0][0])<.01}function q(lt){return Math.abs(lt[0]-E[2][0])<.01}for(;p.length;){for(H=g.smoothopen(M.edgepaths[h],M.smoothing),A+=k?H:H.replace(/^M/,"L"),p.splice(p.indexOf(h),1),w=M.edgepaths[h][M.edgepaths[h].length-1],N=-1,O=0;O<4;O++){if(!w){c.log("Missing end?",h,M);break}for(F(w)&&!q(w)?R=E[1]:W(w)?R=E[0]:U(w)?R=E[3]:q(w)&&(R=E[2]),V=0;V=0&&(R=X,N=V):Math.abs(w[1]-R[1])<.01?Math.abs(w[1]-X[1])<.01&&(X[0]-w[0])*(R[0]-X[0])>=0&&(R=X,N=V):c.log("endpt to newendpt is not vert. or horz.",w,R,X)}if(w=R,N>=0)break;A+="L"+R}if(N===M.edgepaths.length){c.log("unclosed perimeter path");break}h=N,k=p.indexOf(h)===-1,k&&(h=p[0],A+="Z")}for(h=0;hx.MAXCOST*2)break;F&&(R/=2),w=N-R/2,O=w+R*1.5}if(H<=x.MAXCOST)return V};function b(M,E,A,h){var p=E.width/2,k=E.height/2,w=M.x,R=M.y,O=M.theta,N=Math.cos(O)*p,V=Math.sin(O)*p,H=(w>h.center?h.right-w:w-h.left)/(N+Math.abs(Math.sin(O)*k)),F=(R>h.middle?h.bottom-R:R-h.top)/(Math.abs(V)+Math.cos(O)*k);if(H<1||F<1)return 1/0;var U=x.EDGECOST*(1/(H-1)+1/(F-1));U+=x.ANGLECOST*O*O;for(var W=w-N,q=R-V,X=w+N,lt=R+V,yt=0;yt{var c=En(),g=Xc(),P=qw();$.exports=function(S){var t=S.contours,e=t.start,r=P(t),a=t.size||1,n=Math.floor((r-e)/a)+1,o=t.coloring==="lines"?0:1,i=g.extractOpts(S);isFinite(a)||(a=1,n=1);var s=i.reversescale?g.flipScale(i.colorscale):i.colorscale,f=s.length,x=new Array(f),y=new Array(f),v,T,u=i.min,b=i.max;if(t.coloring==="heatmap"){for(T=0;T=b)&&(e<=u&&(e=u),r>=b&&(r=b),n=Math.floor((r-e)/a)+1,o=0),T=0;Tu&&(x.unshift(u),y.unshift(y[0])),x[x.length-1]{var c=En(),g=Vs(),P=W6(),S=a7();$.exports=function(t){var e=c.select(t).selectAll("g.contour");e.style("opacity",function(r){return r[0].trace.opacity}),e.each(function(r){var a=c.select(this),n=r[0].trace,o=n.contours,i=n.line,s=o.size||1,f=o.start,x=o.type==="constraint",y=!x&&o.coloring==="lines",v=!x&&o.coloring==="fill",T=y||v?S(n):null;a.selectAll("g.contourlevel").each(function(_){c.select(this).selectAll("path").call(g.lineGroupStyle,i.width,y?T(_.level):i.color,i.dash)});var u=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(_){g.font(c.select(this),{weight:u.weight,style:u.style,variant:u.variant,textcase:u.textcase,lineposition:u.lineposition,shadow:u.shadow,family:u.family,size:u.size,color:u.color||(y?T(_.level):i.color)})}),x)a.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(v){var b;a.selectAll("g.contourfill path").style("fill",function(_){return b===void 0&&(b=_.level),T(_.level+.5*s)}),b===void 0&&(b=f),a.selectAll("g.contourbg path").style("fill",T(b-.5*s))}}),P(t)}}),tk=Ft((Q,$)=>{var c=Xc(),g=a7(),P=qw();function S(t,e,r){var a=e.contours,n=e.line,o=a.size||1,i=a.coloring,s=g(e,{isColorbar:!0});if(i==="heatmap"){var f=c.extractOpts(e);r._fillgradient=f.reversescale?c.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else i==="fill"&&(r._fillcolor=s);r._line={color:i==="lines"?s:n.color,width:a.showlines!==!1?n.width:0,dash:n.dash},r._levels={start:a.start,end:P(a),size:o}}$.exports={min:"zmin",max:"zmax",calc:S}}),o7=Ft((Q,$)=>{var c=ui(),g=q6();$.exports=function(P,S,t,e,r){r||(r={}),r.isContour=!0;var a=g(P,S,t,e,r);return a&&a.forEach(function(n){var o=n.trace;o.contours.type==="constraint"&&(o.fillcolor&&c.opacity(o.fillcolor)?n.color=c.addOpacity(o.fillcolor,1):o.contours.showlines&&c.opacity(o.line.color)&&(n.color=c.addOpacity(o.line.color,1)))}),a}}),nR=Ft((Q,$)=>{$.exports={attributes:KM(),supplyDefaults:eR(),crossTraceDefaults:$6(),calc:QM(),plot:J6().plot,layerName:"contourlayer",style:Q6(),colorbar:tk(),hoverPoints:o7(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Ef(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}),iR=Ft((Q,$)=>{$.exports=nR()}),s7=Ft((Q,$)=>{var c=ia(),g=XM(),P=ui(),S=P.addOpacity,t=P.opacity,e=Y6(),r=_n().isArrayOrTypedArray,a=e.CONSTRAINT_REDUCTION,n=e.COMPARISON_OPS2;$.exports=function(i,s,f,x,y,v){var T=s.contours,u,b,_,C=f("contours.operation");if(T._operation=a[C],o(f,T),C==="="?u=T.showlines=!0:(u=f("contours.showlines"),_=f("fillcolor",S((i.line||{}).color||y,.5))),u){var M=_&&t(_)?S(s.fillcolor,1):y;b=f("line.color",M),f("line.width",2),f("line.dash")}f("line.smoothing"),g(f,x,b,v)};function o(i,s){var f;n.indexOf(s.operation)===-1?(i("contours.value",[0,1]),r(s.value)?s.value.length>2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(f=parseFloat(s.value[0]),s.value=[f,f+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:c(s.value)&&(f=parseFloat(s.value),s.value=[f,f+1])):(i("contours.value",0),c(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}),aR=Ft((Q,$)=>{var c=_n(),g=F6(),P=jp(),S=s7(),t=K6(),e=X6(),r=Hw(),a=Ww();$.exports=function(n,o,i,s){function f(T,u){return c.coerce(n,o,a,T,u)}function x(T){return c.coerce2(n,o,a,T)}var y=g(n,o,f,s);if(!y){o.visible=!1;return}P(n,o,s,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var v=f("contours.type")==="constraint";f("connectgaps",c.isArray1D(o.z)),v?S(n,o,f,s,i):(t(n,o,f,x),e(n,o,f,s)),o.contours&&o.contours.coloring==="heatmap"&&r(f,s),f("zorder")}}),oR=Ft((Q,$)=>{$.exports={attributes:Ww(),supplyDefaults:aR(),calc:QM(),plot:J6().plot,style:Q6(),colorbar:tk(),hoverPoints:o7(),moduleType:"trace",name:"contour",basePlotModule:Ef(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}),sR=Ft((Q,$)=>{$.exports=oR()}),l7=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=D0(),t=tf(),e=Yo(),r=Ac(),a=Ed().dash,n=ya().extendFlat,o=t.marker,i=t.line,s=o.line;$.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:i.color,width:i.width,dash:a,backoff:i.backoff,shape:n({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:t.connectgaps,cliponaxis:t.cliponaxis,fill:n({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),marker:n({symbol:o.symbol,opacity:o.opacity,angle:o.angle,angleref:o.angleref,standoff:o.standoff,maxdisplayed:o.maxdisplayed,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,line:n({width:s.width,editType:"calc"},r("marker.line")),gradient:o.gradient,editType:"calc"},r("marker")),textfont:t.textfont,textposition:t.textposition,selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:t.hoveron,hovertemplate:c(),hovertemplatefallback:P()}}),lR=Ft((Q,$)=>{var c=_n(),g=_m(),P=Mc(),S=c0(),t=F0(),e=xv(),r=b0(),a=R0(),n=l7();$.exports=function(o,i,s,f){function x(C,M){return c.coerce(o,i,n,C,M)}var y=x("a"),v=x("b"),T=x("c"),u;if(y?(u=y.length,v?(u=Math.min(u,v.length),T&&(u=Math.min(u,T.length))):T?u=Math.min(u,T.length):u=0):v&&T&&(u=Math.min(v.length,T.length)),!u){i.visible=!1;return}i._length=u,x("sum"),x("text"),x("hovertext"),i.hoveron!=="fills"&&(x("hovertemplate"),x("hovertemplatefallback"));var b=u{var c=Ls();$.exports=function(g,P,S){var t={},e=S[P.subplot]._subplot;return t.aLabel=c.tickText(e.aaxis,g.a,!0).text,t.bLabel=c.tickText(e.baxis,g.b,!0).text,t.cLabel=c.tickText(e.caxis,g.c,!0).text,t}}),cR=Ft((Q,$)=>{var c=ia(),g=N0(),P=ct(),S=Bt(),t=me().calcMarkerSize,e=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};$.exports=function(a,n){var o=a._fullLayout[n.subplot],i=o.sum,s=n.sum||i,f={a:n.a,b:n.b,c:n.c},x=n.ids,y,v,T,u,b,_;for(y=0;y{var c=Ya();$.exports=function(g,P,S){var t=P.plotContainer;t.select(".scatterlayer").selectAll("*").remove();for(var e=P.xaxis,r=P.yaxis,a={xaxis:e,yaxis:r,plot:t,layerClipId:P._hasClipOnAxisFalse?P.clipIdRelative:null},n=P.layers.frontplot.select("g.scatterlayer"),o=0;o{var c=Pd();$.exports=function(g,P,S,t){var e=c(g,P,S,t);if(!e||e[0].index===!1)return;var r=e[0];if(r.index===void 0){var a=1-r.y0/g.ya._length,n=g.xa._length,o=n*a/2,i=n-o;return r.x0=Math.max(Math.min(r.x0,i),o),r.x1=Math.max(Math.min(r.x1,i),o),e}var s=r.cd[r.index],f=r.trace,x=r.subplot;r.a=s.a,r.b=s.b,r.c=s.c,r.xLabelVal=void 0,r.yLabelVal=void 0;var y={};y[f.subplot]={_subplot:x};var v=f._module.formatLabels(s,f,y);r.aLabel=v.aLabel,r.bLabel=v.bLabel,r.cLabel=v.cLabel;var T=s.hi||f.hoverinfo,u=[];function b(C,M){u.push(C._hovertitle+": "+M)}if(!f.hovertemplate){var _=T.split("+");_.indexOf("all")!==-1&&(_=["a","b","c"]),_.indexOf("a")!==-1&&b(x.aaxis,r.aLabel),_.indexOf("b")!==-1&&b(x.baxis,r.bLabel),_.indexOf("c")!==-1&&b(x.caxis,r.cLabel)}return r.extraText=u.join("
"),r.hovertemplate=f.hovertemplate,e}}),dR=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){if(g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),S[t]){var e=S[t];c.a=e.a,c.b=e.b,c.c=e.c}else c.a=g.a,c.b=g.b,c.c=g.c;return c}}),pR=Ft((Q,$)=>{var c=En(),g=eo(),P=Qo(),S=_n(),t=S.strTranslate,e=S._,r=ui(),a=Vs(),n=s0(),o=ya().extendFlat,i=Kc(),s=Ls(),f=hp(),x=Qh(),y=x0(),v=y.freeMode,T=y.rectMode,u=cp(),b=yf().prepSelect,_=yf().selectOnClick,C=yf().clearOutline,M=yf().clearSelectionsCache,E=ac();function A(U,W){this.id=U.id,this.graphDiv=U.graphDiv,this.init(W),this.makeFramework(W),this.updateFx(W),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}$.exports=A;var h=A.prototype;h.init=function(U){this.container=U._ternarylayer,this.defs=U._defs,this.layoutId=U._uid,this.traceHash={},this.layers={}},h.plot=function(U,W){var q=this,X=W[q.id],lt=W._size;q._hasClipOnAxisFalse=!1;for(var yt=0;ytp*dt?(wt=dt,ut=wt*p):(ut=tt,wt=ut/p),zt=pt*ut/tt,Pt=st*wt/dt,Y=W.l+W.w*lt-ut/2,ft=W.t+W.h*(1-yt)-wt/2,q.x0=Y,q.y0=ft,q.w=ut,q.h=wt,q.sum=rt,q.xaxis={type:"linear",range:[at+2*it-rt,rt-at-2*vt],domain:[lt-zt/2,lt+zt/2],_id:"x"},n(q.xaxis,q.graphDiv._fullLayout),q.xaxis.setScale(),q.xaxis.isPtWithinRange=function(te){return te.a>=q.aaxis.range[0]&&te.a<=q.aaxis.range[1]&&te.b>=q.baxis.range[1]&&te.b<=q.baxis.range[0]&&te.c>=q.caxis.range[1]&&te.c<=q.caxis.range[0]},q.yaxis={type:"linear",range:[at,rt-vt-it],domain:[yt-Pt/2,yt+Pt/2],_id:"y"},n(q.yaxis,q.graphDiv._fullLayout),q.yaxis.setScale(),q.yaxis.isPtWithinRange=function(){return!0};var Wt=q.yaxis.domain[0],Ht=q.aaxis=o({},U.aaxis,{range:[at,rt-vt-it],side:"left",tickangle:(+U.aaxis.tickangle||0)-30,domain:[Wt,Wt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(Ht,q.graphDiv._fullLayout),Ht.setScale();var Jt=q.baxis=o({},U.baxis,{range:[rt-at-it,vt],side:"bottom",domain:q.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ut});n(Jt,q.graphDiv._fullLayout),Jt.setScale();var ge=q.caxis=o({},U.caxis,{range:[rt-at-vt,it],side:"right",tickangle:(+U.caxis.tickangle||0)+30,domain:[Wt,Wt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(ge,q.graphDiv._fullLayout),ge.setScale();var he="M"+Y+","+(ft+wt)+"h"+ut+"l-"+ut/2+",-"+wt+"Z";q.clipDef.select("path").attr("d",he),q.layers.plotbg.select("path").attr("d",he);var de="M0,"+wt+"h"+ut+"l-"+ut/2+",-"+wt+"Z";q.clipDefRelative.select("path").attr("d",de);var se=t(Y,ft);q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",se),q.clipDefRelative.select("path").attr("transform",null);var Tt=t(Y-Jt._offset,ft+wt);q.layers.baxis.attr("transform",Tt),q.layers.bgrid.attr("transform",Tt);var Lt=t(Y+ut/2,ft)+"rotate(30)"+t(0,-Ht._offset);q.layers.aaxis.attr("transform",Lt),q.layers.agrid.attr("transform",Lt);var Mt=t(Y+ut/2,ft)+"rotate(-30)"+t(0,-ge._offset);q.layers.caxis.attr("transform",Mt),q.layers.cgrid.attr("transform",Mt),q.drawAxes(!0),q.layers.aline.select("path").attr("d",Ht.showline?"M"+Y+","+(ft+wt)+"l"+ut/2+",-"+wt:"M0,0").call(r.stroke,Ht.linecolor||"#000").style("stroke-width",(Ht.linewidth||0)+"px"),q.layers.bline.select("path").attr("d",Jt.showline?"M"+Y+","+(ft+wt)+"h"+ut:"M0,0").call(r.stroke,Jt.linecolor||"#000").style("stroke-width",(Jt.linewidth||0)+"px"),q.layers.cline.select("path").attr("d",ge.showline?"M"+(Y+ut/2)+","+ft+"l"+ut/2+","+wt:"M0,0").call(r.stroke,ge.linecolor||"#000").style("stroke-width",(ge.linewidth||0)+"px"),q.graphDiv._context.staticPlot||q.initInteractions(),a.setClipUrl(q.layers.frontplot,q._hasClipOnAxisFalse?null:q.clipId,q.graphDiv)},h.drawAxes=function(U){var W=this,q=W.graphDiv,X=W.id.substr(7)+"title",lt=W.layers,yt=W.aaxis,pt=W.baxis,st=W.caxis;if(W.drawAx(yt),W.drawAx(pt),W.drawAx(st),U){var tt=Math.max(yt.showticklabels?yt.tickfont.size/2:0,(st.showticklabels?st.tickfont.size*.75:0)+(st.ticks==="outside"?st.ticklen*.87:0)),dt=(pt.showticklabels?pt.tickfont.size:0)+(pt.ticks==="outside"?pt.ticklen:0)+3;lt["a-title"]=u.draw(q,"a"+X,{propContainer:yt,propName:W.id+".aaxis.title.text",placeholder:e(q,"Click to enter Component A title"),attributes:{x:W.x0+W.w/2,y:W.y0-yt.title.font.size/3-tt,"text-anchor":"middle"}}),lt["b-title"]=u.draw(q,"b"+X,{propContainer:pt,propName:W.id+".baxis.title.text",placeholder:e(q,"Click to enter Component B title"),attributes:{x:W.x0-dt,y:W.y0+W.h+pt.title.font.size*.83+dt,"text-anchor":"middle"}}),lt["c-title"]=u.draw(q,"c"+X,{propContainer:st,propName:W.id+".caxis.title.text",placeholder:e(q,"Click to enter Component C title"),attributes:{x:W.x0+W.w+dt,y:W.y0+W.h+st.title.font.size*.83+dt,"text-anchor":"middle"}})}},h.drawAx=function(U){var W=this,q=W.graphDiv,X=U._name,lt=X.charAt(0),yt=U._id,pt=W.layers[X],st=30,tt=lt+"tickLayout",dt=k(U);W[tt]!==dt&&(pt.selectAll("."+yt+"tick").remove(),W[tt]=dt),U.setScale();var rt=s.calcTicks(U),at=s.clipEnds(U,rt),vt=s.makeTransTickFn(U),it=s.getTickSigns(U)[2],Y=S.deg2rad(st),ft=it*(U.linewidth||1)/2,ut=it*U.ticklen,wt=W.w,zt=W.h,Pt=lt==="b"?"M0,"+ft+"l"+Math.sin(Y)*ut+","+Math.cos(Y)*ut:"M"+ft+",0l"+Math.cos(Y)*ut+","+-Math.sin(Y)*ut,Wt={a:"M0,0l"+zt+",-"+wt/2,b:"M0,0l-"+wt/2+",-"+zt,c:"M0,0l-"+zt+","+wt/2}[lt];s.drawTicks(q,U,{vals:U.ticks==="inside"?at:rt,layer:pt,path:Pt,transFn:vt,crisp:!1}),s.drawGrid(q,U,{vals:at,layer:W.layers[lt+"grid"],path:Wt,transFn:vt,crisp:!1}),s.drawLabels(q,U,{vals:rt,layer:pt,transFn:vt,labelFns:s.makeLabelFns(U,0,st)})};function k(U){return U.ticks+String(U.ticklen)+String(U.showticklabels)}var w=E.MINZOOM/2+.87,R="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(w*.87+4.5)+"l2.6,1.5l-"+w/2+","+w*.87+"Z",O="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-2.6,1.5l"+w/2+","+w*.87+"Z",N="m0,1l"+w/2+","+w*.87+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-"+(w/2+2.6)+","+(w*.87+4.5)+"l2.6,1.5l"+w/2+",-"+w*.87+"Z",V="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",H=!0;h.clearOutline=function(){M(this.dragOptions),C(this.dragOptions.gd)},h.initInteractions=function(){var U=this,W=U.layers.plotbg.select("path").node(),q=U.graphDiv,X=q._fullLayout._zoomlayer,lt,yt;this.dragOptions={element:W,gd:q,plotinfo:{id:U.id,domain:q._fullLayout[U.id].domain,xaxis:U.xaxis,yaxis:U.yaxis},subplot:U.id,prepFn:function(Tt,Lt,Mt){U.dragOptions.xaxes=[U.xaxis],U.dragOptions.yaxes=[U.yaxis],lt=q._fullLayout._invScaleX,yt=q._fullLayout._invScaleY;var te=U.dragOptions.dragmode=q._fullLayout.dragmode;v(te)?U.dragOptions.minDrag=1:U.dragOptions.minDrag=void 0,te==="zoom"?(U.dragOptions.moveFn=Jt,U.dragOptions.clickFn=wt,U.dragOptions.doneFn=ge,zt(Tt,Lt,Mt)):te==="pan"?(U.dragOptions.moveFn=de,U.dragOptions.clickFn=wt,U.dragOptions.doneFn=se,he(),U.clearOutline(q)):(T(te)||v(te))&&b(Tt,Lt,Mt,U.dragOptions,te)}};var pt,st,tt,dt,rt,at,vt,it,Y,ft;function ut(Tt){var Lt={};return Lt[U.id+".aaxis.min"]=Tt.a,Lt[U.id+".baxis.min"]=Tt.b,Lt[U.id+".caxis.min"]=Tt.c,Lt}function wt(Tt,Lt){var Mt=q._fullLayout.clickmode;F(q),Tt===2&&(q.emit("plotly_doubleclick",null),P.call("_guiRelayout",q,ut({a:0,b:0,c:0}))),Mt.indexOf("select")>-1&&Tt===1&&_(Lt,q,[U.xaxis],[U.yaxis],U.id,U.dragOptions),Mt.indexOf("event")>-1&&x.click(q,Lt,U.id)}function zt(Tt,Lt,Mt){var te=W.getBoundingClientRect();pt=Lt-te.left,st=Mt-te.top,q._fullLayout._calcInverseTransform(q);var ve=q._fullLayout._invTransform,oe=S.apply3DTransform(ve)(pt,st);pt=oe[0],st=oe[1],tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt,dt=U.aaxis.range[1]-tt.a,at=g(U.graphDiv._fullLayout[U.id].bgcolor).getLuminance(),vt="M0,"+U.h+"L"+U.w/2+", 0L"+U.w+","+U.h+"Z",it=!1,Y=X.append("path").attr("class","zoombox").attr("transform",t(U.x0,U.y0)).style({fill:at>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",vt),ft=X.append("path").attr("class","zoombox-corners").attr("transform",t(U.x0,U.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),U.clearOutline(q)}function Pt(Tt,Lt){return 1-Lt/U.h}function Wt(Tt,Lt){return 1-(Tt+(U.h-Lt)/Math.sqrt(3))/U.w}function Ht(Tt,Lt){return(Tt-(U.h-Lt)/Math.sqrt(3))/U.w}function Jt(Tt,Lt){var Mt=pt+Tt*lt,te=st+Lt*yt,ve=Math.max(0,Math.min(1,Pt(pt,st),Pt(Mt,te))),oe=Math.max(0,Math.min(1,Wt(pt,st),Wt(Mt,te))),Te=Math.max(0,Math.min(1,Ht(pt,st),Ht(Mt,te))),He=(ve/2+Te)*U.w,Ge=(1-ve/2-oe)*U.w,cr=(He+Ge)/2,ur=Ge-He,jr=(1-ve)*U.h,Hr=jr-ur/p;ur.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ft.transition().style("opacity",1).duration(200),it=!0),q.emit("plotly_relayouting",ut(rt))}function ge(){F(q),rt!==tt&&(P.call("_guiRelayout",q,ut(rt)),H&&q.data&&q._context.showTips&&(S.notifier(e(q,"Double-click to zoom back out"),"long"),H=!1))}function he(){tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt}function de(Tt,Lt){var Mt=Tt/U.xaxis._m,te=Lt/U.yaxis._m;rt={a:tt.a-te,b:tt.b+(Mt+te)/2,c:tt.c-(Mt-te)/2};var ve=[rt.a,rt.b,rt.c].sort(S.sorterAsc),oe={a:ve.indexOf(rt.a),b:ve.indexOf(rt.b),c:ve.indexOf(rt.c)};ve[0]<0&&(ve[1]+ve[0]/2<0?(ve[2]+=ve[0]+ve[1],ve[0]=ve[1]=0):(ve[2]+=ve[0]/2,ve[1]+=ve[0]/2,ve[0]=0),rt={a:ve[oe.a],b:ve[oe.b],c:ve[oe.c]},Lt=(tt.a-rt.a)*U.yaxis._m,Tt=(tt.c-rt.c-tt.b+rt.b)*U.xaxis._m);var Te=t(U.x0+Tt,U.y0+Lt);U.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Te);var He=t(-Tt,-Lt);U.clipDefRelative.select("path").attr("transform",He),U.aaxis.range=[rt.a,U.sum-rt.b-rt.c],U.baxis.range=[U.sum-rt.a-rt.c,rt.b],U.caxis.range=[U.sum-rt.a-rt.b,rt.c],U.drawAxes(!1),U._hasClipOnAxisFalse&&U.plotContainer.select(".scatterlayer").selectAll(".trace").call(a.hideOutsideRangePoints,U),q.emit("plotly_relayouting",ut(rt))}function se(){P.call("_guiRelayout",q,ut(rt))}W.onmousemove=function(Tt){x.hover(q,Tt,U.id),q._fullLayout._lasthover=W,q._fullLayout._hoversubplot=U.id},W.onmouseout=function(Tt){q._dragging||f.unhover(q,Tt)},f.init(this.dragOptions)};function F(U){c.select(U).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}),u7=Ft((Q,$)=>{var c=yi(),g=jh().attributes,P=Cd(),S=Yc().overrideAll,t=ya().extendFlat,e={title:{text:P.title.text,font:P.title.font},color:P.color,tickmode:P.minor.tickmode,nticks:t({},P.nticks,{dflt:6,min:1}),tick0:P.tick0,dtick:P.dtick,tickvals:P.tickvals,ticktext:P.ticktext,ticks:P.ticks,ticklen:P.ticklen,tickwidth:P.tickwidth,tickcolor:P.tickcolor,ticklabelstep:P.ticklabelstep,showticklabels:P.showticklabels,labelalias:P.labelalias,showtickprefix:P.showtickprefix,tickprefix:P.tickprefix,showticksuffix:P.showticksuffix,ticksuffix:P.ticksuffix,showexponent:P.showexponent,exponentformat:P.exponentformat,minexponent:P.minexponent,separatethousands:P.separatethousands,tickfont:P.tickfont,tickangle:P.tickangle,tickformat:P.tickformat,tickformatstops:P.tickformatstops,hoverformat:P.hoverformat,showline:t({},P.showline,{dflt:!0}),linecolor:P.linecolor,linewidth:P.linewidth,showgrid:t({},P.showgrid,{dflt:!0}),gridcolor:P.gridcolor,gridwidth:P.gridwidth,griddash:P.griddash,layer:P.layer,min:{valType:"number",dflt:0,min:0}},r=$.exports=S({domain:g({name:"ternary"}),bgcolor:{valType:"color",dflt:c.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");r.uirevision={valType:"any",editType:"none"},r.aaxis.uirevision=r.baxis.uirevision=r.caxis.uirevision={valType:"any",editType:"none"}}),I1=Ft((Q,$)=>{var c=_n(),g=mu(),P=jh().defaults;$.exports=function(S,t,e,r){var a=r.type,n=r.attributes,o=r.handleDefaults,i=r.partition||"x",s=t._subplots[a],f=s.length,x=f&&s[0].replace(/\d+$/,""),y,v;function T(C,M){return c.coerce(y,v,n,C,M)}for(var u=0;u{var c=ui(),g=mu(),P=_n(),S=I1(),t=o0(),e=gm(),r=xg(),a=yg(),n=Jy(),o=u7(),i=["aaxis","baxis","caxis"];$.exports=function(x,y,v){S(x,y,v,{type:"ternary",attributes:o,handleDefaults:s,font:y.font,paper_bgcolor:y.paper_bgcolor})};function s(x,y,v,T){var u=v("bgcolor"),b=v("sum");T.bgColor=c.combine(u,T.paper_bgcolor);for(var _,C,M,E=0;E=b&&(A.min=0,h.min=0,p.min=0,x.aaxis&&delete x.aaxis.min,x.baxis&&delete x.baxis.min,x.caxis&&delete x.caxis.min)}function f(x,y,v,T){var u=o[y._name];function b(k,w){return P.coerce(x,y,u,k,w)}b("uirevision",T.uirevision),y.type="linear";var _=b("color"),C=_!==u.color.dflt?_:v.font.color,M=y._name,E=M.charAt(0).toUpperCase(),A="Component "+E,h=b("title.text",A);y._hovertitle=h===A?h:E,P.coerceFont(b,"title.font",v.font,{overrideDflt:{size:P.bigFont(v.font.size),color:C}}),b("min"),a(x,y,b,"linear"),e(x,y,b,"linear"),t(x,y,b,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(x,y,b,{outerTicks:!0});var p=b("showticklabels");p&&(P.coerceFont(b,"tickfont",v.font,{overrideDflt:{color:C}}),b("tickangle"),b("tickformat")),n(x,y,b,{dfltColor:_,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u}),b("hoverformat"),b("layer")}}),gR=Ft(Q=>{var $=pR(),c=dd().getSubplotCalcData,g=_n().counterRegex,P="ternary";Q.name=P;var S=Q.attr="subplot";Q.idRoot=P,Q.idRegex=Q.attrRegex=g(P);var t=Q.attributes={};t[S]={valType:"subplotid",dflt:"ternary",editType:"calc"},Q.layoutAttributes=u7(),Q.supplyLayoutDefaults=mR(),Q.plot=function(e){for(var r=e._fullLayout,a=e.calcdata,n=r._subplots[P],o=0;o{$.exports={attributes:l7(),supplyDefaults:lR(),colorbar:yo(),formatLabels:uR(),calc:cR(),plot:hR(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:fR(),selectPoints:jf(),eventData:dR(),moduleType:"trace",name:"scatterternary",basePlotModule:gR(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}),yR=Ft((Q,$)=>{$.exports=vR()}),c7=Ft((Q,$)=>{var c=jw(),g=ya().extendFlat,P=dh().axisHoverFormat;$.exports={y:c.y,x:c.x,x0:c.x0,y0:c.y0,xhoverformat:P("x"),yhoverformat:P("y"),name:g({},c.name,{}),orientation:g({},c.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:c.fillcolor,points:g({},c.boxpoints,{}),jitter:g({},c.jitter,{}),pointpos:g({},c.pointpos,{}),width:g({},c.width,{}),marker:c.marker,text:c.text,hovertext:c.hovertext,hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,quartilemethod:c.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:c.zorder}}),h7=Ft((Q,$)=>{var c=Uw(),g=_n().extendFlat;$.exports={violinmode:g({},c.boxmode,{}),violingap:g({},c.boxgap,{}),violingroupgap:g({},c.boxgroupgap,{})}}),xR=Ft((Q,$)=>{var c=_n(),g=ui(),P=Vw(),S=c7();$.exports=function(t,e,r,a){function n(h,p){return c.coerce(t,e,S,h,p)}function o(h,p){return c.coerce2(t,e,S,h,p)}if(P.handleSampleDefaults(t,e,n,a),e.visible!==!1){n("bandwidth"),n("side");var i=n("width");i||(n("scalegroup",e.name),n("scalemode"));var s=n("span"),f;Array.isArray(s)&&(f="manual"),n("spanmode",f);var x=n("line.color",(t.marker||{}).color||r),y=n("line.width"),v=n("fillcolor",g.addOpacity(e.line.color,.5));P.handlePointsDefaults(t,e,n,{prefix:""});var T=o("box.width"),u=o("box.fillcolor",v),b=o("box.line.color",x),_=o("box.line.width",y),C=n("box.visible",!!(T||u||b||_));C||(e.box={visible:!1});var M=o("meanline.color",x),E=o("meanline.width",y),A=n("meanline.visible",!!(M||E));A||(e.meanline={visible:!1}),n("quartilemethod"),n("zorder")}}}),_R=Ft((Q,$)=>{var c=_n(),g=h7(),P=z6();$.exports=function(S,t,e){function r(a,n){return c.coerce(S,t,g,a,n)}P._supply(S,t,e,r,"violin")}}),ek=Ft(Q=>{var $=_n(),c={gaussian:function(g){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*g*g)}};Q.makeKDE=function(g,P,S){var t=S.length,e=c.gaussian,r=g.bandwidth,a=1/(t*r);return function(n){for(var o=0,i=0;i{var c=_n(),g=Ls(),P=FM(),S=ek(),t=Ua().BADNUM;$.exports=function(n,o){var i=P(n,o);if(i[0].t.empty)return i;for(var s=n._fullLayout,f=g.getFromId(n,o[o.orientation==="h"?"xaxis":"yaxis"]),x=1/0,y=-1/0,v=0,T=0,u=0;u{var c=I6().setPositionOffset,g=["v","h"];$.exports=function(P,S){for(var t=P.calcdata,e=S.xaxis,r=S.yaxis,a=0;a{var c=En(),g=_n(),P=Vs(),S=O6(),t=ji(),e=ek();$.exports=function(r,a,n,o){var i=r._context.staticPlot,s=r._fullLayout,f=a.xaxis,x=a.yaxis;function y(v,T){var u=t(v,{xaxis:f,yaxis:x,trace:T,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return P.smoothopen(u[0],1)}g.makeTraceGroups(o,n,"trace violins").each(function(v){var T=c.select(this),u=v[0],b=u.t,_=u.trace;if(_.visible!==!0||b.empty){T.remove();return}var C=b.bPos,M=b.bdPos,E=a[b.valLetter+"axis"],A=a[b.posLetter+"axis"],h=_.side==="both",p=h||_.side==="positive",k=h||_.side==="negative",w=T.selectAll("path.violin").data(g.identity);w.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),w.exit().remove(),w.each(function(W){var q=c.select(this),X=W.density,lt=X.length,yt=A.c2l(W.pos+C,!0),pt=A.l2p(yt),st;if(_.width)st=b.maxKDE/M;else{var tt=s._violinScaleGroupStats[_.scalegroup];st=_.scalemode==="count"?tt.maxKDE/M*(tt.maxCount/W.pts.length):tt.maxKDE/M}var dt,rt,at,vt,it,Y,ft;if(p){for(Y=new Array(lt),vt=0;vt{var c=En(),g=ui(),P=_l().stylePoints;$.exports=function(S){var t=c.select(S).selectAll("g.trace.violins");t.style("opacity",function(e){return e[0].trace.opacity}),t.each(function(e){var r=e[0].trace,a=c.select(this),n=r.box||{},o=n.line||{},i=r.meanline||{},s=i.width;a.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(g.stroke,r.line.color).call(g.fill,r.fillcolor),a.selectAll("path.box").style("stroke-width",o.width+"px").call(g.stroke,o.color).call(g.fill,n.fillcolor);var f={"stroke-width":s+"px","stroke-dasharray":2*s+"px,"+s+"px"};a.selectAll("path.mean").style(f).call(g.stroke,i.color),a.selectAll("path.meanline").style(f).call(g.stroke,i.color),P(a,r,S)})}}),AR=Ft((Q,$)=>{var c=ui(),g=_n(),P=Ls(),S=RM(),t=ek();$.exports=function(e,r,a,n,o){o||(o={});var i=o.hoverLayer,s=e.cd,f=s[0].trace,x=f.hoveron,y=x.indexOf("violins")!==-1,v=x.indexOf("kde")!==-1,T=[],u,b;if(y||v){var _=S.hoverOnBoxes(e,r,a,n);if(v&&_.length>0){var C=e.xa,M=e.ya,E,A,h,p,k;f.orientation==="h"?(k=r,E="y",h=M,A="x",p=C):(k=a,E="x",h=C,A="y",p=M);var w=s[e.index];if(k>=w.span[0]&&k<=w.span[1]){var R=g.extendFlat({},e),O=p.c2p(k,!0),N=t.getKdeValue(w,f,k),V=t.getPositionOnKdePath(w,f,O),H=h._offset,F=h._length;R[E+"0"]=V[0],R[E+"1"]=V[1],R[A+"0"]=R[A+"1"]=O,R[A+"Label"]=A+": "+P.hoverLabelText(p,k,f[A+"hoverformat"])+", "+s[0].t.labels.kde+" "+N.toFixed(3);for(var U=0,W=0;W<_.length;W++)if(_[W].attr==="med"){U=W;break}R.spikeDistance=_[U].spikeDistance;var q=E+"Spike";R[q]=_[U][q],_[U].spikeDistance=void 0,_[U][q]=void 0,R.hovertemplate=!1,T.push(R),b={},b[E+"1"]=g.constrain(H+V[0],H,H+F),b[E+"2"]=g.constrain(H+V[1],H,H+F),b[A+"1"]=b[A+"2"]=p._offset+O}}y&&(T=T.concat(_))}x.indexOf("points")!==-1&&(u=S.hoverOnPoints(e,r,a));var X=i.selectAll(".violinline-"+f.uid).data(b?[0]:[]);return X.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),X.exit().remove(),X.attr(b).call(c.stroke,e.color),n==="closest"?u?[u]:T:(u&&T.push(u),T)}}),MR=Ft((Q,$)=>{$.exports={attributes:c7(),layoutAttributes:h7(),supplyDefaults:xR(),crossTraceDefaults:Vw().crossTraceDefaults,supplyLayoutDefaults:_R(),calc:bR(),crossTraceCalc:wR(),plot:kR(),style:TR(),styleOnSelect:_l().styleOnSelect,hoverPoints:AR(),selectPoints:BM(),moduleType:"trace",name:"violin",basePlotModule:Ef(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}),SR=Ft((Q,$)=>{$.exports=MR()}),ER=Ft((Q,$)=>{$.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}),f7=Ft((Q,$)=>{var c=Lg(),g=tf().line,P=Yo(),S=dh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=ER(),n=ya().extendFlat,o=ui();$.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},P.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:n({},c.insidetextanchor,{dflt:"middle"}),textangle:n({},c.textangle,{dflt:0}),textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:n({},c.orientation,{}),offset:n({},c.offset,{arrayOk:!1}),width:n({},c.width,{arrayOk:!1}),marker:i(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{dflt:0,editType:"plot"}),dash:g.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder};function i(){var s=n({},c.marker);return delete s.pattern,delete s.cornerradius,s}}),d7=Ft((Q,$)=>{$.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}),p7=Ft((Q,$)=>{var c=_n(),g=Cg(),P=em().handleText,S=Um(),t=jp(),e=f7(),r=ui();function a(i,s,f,x){function y(M,E){return c.coerce(i,s,e,M,E)}var v=S(i,s,x,y);if(!v){s.visible=!1;return}t(i,s,x,y),y("xhoverformat"),y("yhoverformat"),y("orientation",s.y&&!s.x?"v":"h"),y("offset"),y("width");var T=y("text");y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var u=y("textposition");P(i,s,x,y,u,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s.textposition!=="none"&&!s.texttemplate&&y("textinfo",c.isArrayOrTypedArray(T)?"text+value":"value");var b=y("marker.color",f);y("marker.line.color",r.defaultLine),y("marker.line.width");var _=y("connector.visible");if(_){y("connector.fillcolor",n(b));var C=y("connector.line.width");C&&(y("connector.line.color"),y("connector.line.dash"))}y("zorder")}function n(i){var s=c.isArrayOrTypedArray(i)?"#000":i;return r.addOpacity(s,.5*r.opacity(s))}function o(i,s){var f,x;function y(T){return c.coerce(x._input,x,e,T)}for(var v=0;v{var c=_n(),g=d7();$.exports=function(P,S,t){var e=!1;function r(o,i){return c.coerce(P,S,g,o,i)}for(var a=0;a{var c=_n();$.exports=function(g,P){for(var S=0;S{var c=Ls(),g=B0(),P=LR(),S=Bt(),t=Ua().BADNUM;$.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,s,f,x,y,v,T,u;a.orientation==="h"?(i=n.makeCalcdata(a,"x"),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y"),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),s=x.vals;var b=Math.min(s.length,i.length),_=new Array(b);for(a._base=[],T=0;T{var c=zr().setGroupPositions;$.exports=function(g,P){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=P.xaxis,a=P.yaxis,n=[],o=[],i=[],s,f;for(f=0;f{var c=En(),g=_n(),P=Vs(),S=Ua().BADNUM,t=rx(),e=Up().clearMinTextSize;$.exports=function(o,i,s,f){var x=o._fullLayout;e("funnel",x),r(o,i,s,f),a(o,i,s,f),t.plot(o,i,s,f,{mode:x.funnelmode,norm:x.funnelmode,gap:x.funnelgap,groupgap:x.funnelgroupgap})};function r(o,i,s,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,s,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","regions");if(!u.connector||!u.connector.visible){b.remove();return}var _=u.orientation==="h",C=b.selectAll("g.region").data(g.identity);C.enter().append("g").classed("region",!0),C.exit().remove();var M=C.size();C.each(function(E,A){if(!(A!==M-1&&!E.cNext)){var h=n(E,x,y,_),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&p[2]!==S&&k[2]!==S&&p[3]!==S&&k[3]!==S&&(_?w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2]+"H"+p[3]+"L"+p[1]+","+k[1]+"Z":w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3]+"V"+k[2]+"L"+p[1]+","+k[0]+"Z"),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(P.setClipUrl,i.layerClipId,o)}})})}function a(o,i,s,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,s,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","lines");if(!u.connector||!u.connector.visible||!u.connector.line.width){b.remove();return}var _=u.orientation==="h",C=b.selectAll("g.line").data(g.identity);C.enter().append("g").classed("line",!0),C.exit().remove();var M=C.size();C.each(function(E,A){if(!(A!==M-1&&!E.cNext)){var h=n(E,x,y,_),p=h[0],k=h[1],w="";p[3]!==void 0&&k[3]!==void 0&&(_?(w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2],w+="M"+p[1]+","+k[1]+"L"+p[3]+","+k[2]):(w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3],w+="M"+p[1]+","+k[0]+"L"+p[2]+","+k[2])),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(P.setClipUrl,i.layerClipId,o)}})})}function n(o,i,s,f){var x=[],y=[],v=f?i:s,T=f?s:i;return x[0]=v.c2p(o.s0,!0),y[0]=T.c2p(o.p0,!0),x[1]=v.c2p(o.s1,!0),y[1]=T.c2p(o.p1,!0),x[2]=v.c2p(o.nextS0,!0),y[2]=T.c2p(o.nextP0,!0),x[3]=v.c2p(o.nextS1,!0),y[3]=T.c2p(o.nextP1,!0),f?[x,y]:[y,x]}}),OR=Ft((Q,$)=>{var c=En(),g=Vs(),P=ui(),S=ao().DESELECTDIM,t=wm(),e=Up().resizeText,r=t.styleTextPoints;function a(n,o,i){var s=i||c.select(n).selectAll('g[class^="funnellayer"]').selectAll("g.trace");e(n,s,"funnel"),s.style("opacity",function(f){return f[0].trace.opacity}),s.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y.marker;c.select(this).call(P.fill,v.mc||T.color).call(P.stroke,v.mlc||T.line.color).call(g.dashLine,T.line.dash,v.mlw||T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".regions").each(function(){c.select(this).selectAll("path").style("stroke-width",0).call(P.fill,y.connector.fillcolor)}),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}$.exports={style:a}}),DR=Ft((Q,$)=>{var c=ui().opacity,g=eb().hoverOnBars,P=_n().formatPercent;$.exports=function(t,e,r,a,n){var o=g(t,e,r,a,n);if(o){var i=o.cd,s=i[0].trace,f=s.orientation==="h",x=o.index,y=i[x],v=f?"x":"y";o[v+"LabelVal"]=y.s,o.percentInitial=y.begR,o.percentInitialLabel=P(y.begR,1),o.percentPrevious=y.difR,o.percentPreviousLabel=P(y.difR,1),o.percentTotal=y.sumR,o.percentTotalLabel=P(y.sumR,1);var T=y.hi||s.hoverinfo,u=[];if(T&&T!=="none"&&T!=="skip"){var b=T==="all",_=T.split("+"),C=function(M){return b||_.indexOf(M)!==-1};C("percent initial")&&u.push(o.percentInitialLabel+" of initial"),C("percent previous")&&u.push(o.percentPreviousLabel+" of previous"),C("percent total")&&u.push(o.percentTotalLabel+" of total")}return o.extraText=u.join("
"),o.color=S(s,y),[o]}};function S(t,e){var r=t.marker,a=e.mc||r.color,n=e.mlc||r.line.color,o=e.mlw||r.line.width;if(c(a))return a;if(c(n)&&o)return n}}),FR=Ft((Q,$)=>{$.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"percentInitial"in g&&(c.percentInitial=g.percentInitial),"percentPrevious"in g&&(c.percentPrevious=g.percentPrevious),"percentTotal"in g&&(c.percentTotal=g.percentTotal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),RR=Ft((Q,$)=>{$.exports={attributes:f7(),layoutAttributes:d7(),supplyDefaults:p7().supplyDefaults,crossTraceDefaults:p7().crossTraceDefaults,supplyLayoutDefaults:CR(),calc:PR(),crossTraceCalc:zR(),plot:IR(),style:OR().style,hoverPoints:DR(),eventData:FR(),selectPoints:rb(),moduleType:"trace",name:"funnel",basePlotModule:Ef(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),BR=Ft((Q,$)=>{$.exports=RR()}),NR=Ft((Q,$)=>{$.exports={eventDataKeys:["initial","delta","final"]}}),m7=Ft((Q,$)=>{var c=Lg(),g=tf().line,P=Yo(),S=dh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=NR(),n=ya().extendFlat,o=ui();function i(s){return{marker:{color:n({},c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:n({},c.marker.line.color,{arrayOk:!1,editType:"style"}),width:n({},c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}$.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},P.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:c.insidetextanchor,textangle:c.textangle,textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:c.orientation,offset:c.offset,width:c.width,increasing:i(),decreasing:i(),totals:i(),connector:{line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{editType:"plot"}),dash:g.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder}}),g7=Ft((Q,$)=>{$.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}),ib=Ft((Q,$)=>{$.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}),v7=Ft((Q,$)=>{var c=_n(),g=Cg(),P=em().handleText,S=Um(),t=jp(),e=m7(),r=ui(),a=ib(),n=a.INCREASING.COLOR,o=a.DECREASING.COLOR,i="#4499FF";function s(y,v,T){y(v+".marker.color",T),y(v+".marker.line.color",r.defaultLine),y(v+".marker.line.width")}function f(y,v,T,u){function b(A,h){return c.coerce(y,v,e,A,h)}var _=S(y,v,u,b);if(!_){v.visible=!1;return}t(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("measure"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var C=b("textposition");P(y,v,u,b,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(b("texttemplate"),b("texttemplatefallback"),v.texttemplate||b("textinfo")),s(b,"increasing",n),s(b,"decreasing",o),s(b,"totals",i);var M=b("connector.visible");if(M){b("connector.mode");var E=b("connector.line.width");E&&(b("connector.line.color"),b("connector.line.dash"))}b("zorder")}function x(y,v){var T,u;function b(C){return c.coerce(u._input,u,e,C)}if(v.waterfallmode==="group")for(var _=0;_{var c=_n(),g=g7();$.exports=function(P,S,t){var e=!1;function r(o,i){return c.coerce(P,S,g,o,i)}for(var a=0;a{var c=Ls(),g=B0(),P=_n().mergeArray,S=Bt(),t=Ua().BADNUM;function e(a){return a==="a"||a==="absolute"}function r(a){return a==="t"||a==="total"}$.exports=function(a,n){var o=c.getFromId(a,n.xaxis||"x"),i=c.getFromId(a,n.yaxis||"y"),s,f,x,y,v,T;n.orientation==="h"?(s=o.makeCalcdata(n,"x"),x=i.makeCalcdata(n,"y"),y=g(n,i,"y",x),v=!!n.yperiodalignment,T="y"):(s=i.makeCalcdata(n,"y"),x=o.makeCalcdata(n,"x"),y=g(n,o,"x",x),v=!!n.xperiodalignment,T="x"),f=y.vals;for(var u=Math.min(f.length,s.length),b=new Array(u),_=0,C,M=!1,E=0;E{var c=zr().setGroupPositions;$.exports=function(g,P){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=P.xaxis,a=P.yaxis,n=[],o=[],i=[],s,f;for(f=0;f{var c=En(),g=_n(),P=Vs(),S=Ua().BADNUM,t=rx(),e=Up().clearMinTextSize;$.exports=function(n,o,i,s){var f=n._fullLayout;e("waterfall",f),t.plot(n,o,i,s,{mode:f.waterfallmode,norm:f.waterfallmode,gap:f.waterfallgap,groupgap:f.waterfallgroupgap}),r(n,o,i,s)};function r(n,o,i,s){var f=o.xaxis,x=o.yaxis;g.makeTraceGroups(s,i,"trace bars").each(function(y){var v=c.select(this),T=y[0].trace,u=g.ensureSingle(v,"g","lines");if(!T.connector||!T.connector.visible){u.remove();return}var b=T.orientation==="h",_=T.connector.mode,C=u.selectAll("g.line").data(g.identity);C.enter().append("g").classed("line",!0),C.exit().remove();var M=C.size();C.each(function(E,A){if(!(A!==M-1&&!E.cNext)){var h=a(E,f,x,b),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&(_==="spanning"&&!E.isSum&&A>0&&(b?w+="M"+p[0]+","+k[1]+"V"+k[0]:w+="M"+p[1]+","+k[0]+"H"+p[0]),_!=="between"&&(E.isSum||A{var c=En(),g=Vs(),P=ui(),S=ao().DESELECTDIM,t=wm(),e=Up().resizeText,r=t.styleTextPoints;function a(n,o,i){var s=i||c.select(n).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");e(n,s,"waterfall"),s.style("opacity",function(f){return f[0].trace.opacity}),s.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y[v.dir].marker;c.select(this).call(P.fill,T.color).call(P.stroke,T.line.color).call(g.dashLine,T.line.dash,T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}$.exports={style:a}}),qR=Ft((Q,$)=>{var c=Ls().hoverLabelText,g=ui().opacity,P=eb().hoverOnBars,S=ib(),t={increasing:S.INCREASING.SYMBOL,decreasing:S.DECREASING.SYMBOL};$.exports=function(r,a,n,o,i){var s=P(r,a,n,o,i);if(!s)return;var f=s.cd,x=f[0].trace,y=x.orientation==="h",v=y?"x":"y",T=y?r.xa:r.ya;function u(w){return c(T,w,x[v+"hoverformat"])}var b=s.index,_=f[b],C=_.isSum?_.b+_.s:_.rawS;s.initial=_.b+_.s-C,s.delta=C,s.final=s.initial+s.delta;var M=u(Math.abs(s.delta));s.deltaLabel=C<0?"("+M+")":M,s.finalLabel=u(s.final),s.initialLabel=u(s.initial);var E=_.hi||x.hoverinfo,A=[];if(E&&E!=="none"&&E!=="skip"){var h=E==="all",p=E.split("+"),k=function(w){return h||p.indexOf(w)!==-1};_.isSum||(k("final")&&(y?!k("x"):!k("y"))&&A.push(s.finalLabel),k("delta")&&(C<0?A.push(s.deltaLabel+" "+t.decreasing):A.push(s.deltaLabel+" "+t.increasing)),k("initial")&&A.push("Initial: "+s.initialLabel))}return A.length&&(s.extraText=A.join("
")),s.color=e(x,_),[s]};function e(r,a){var n=r[a.dir].marker,o=n.color,i=n.line.color,s=n.line.width;if(g(o))return o;if(g(i)&&s)return i}}),ZR=Ft((Q,$)=>{$.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"initial"in g&&(c.initial=g.initial),"delta"in g&&(c.delta=g.delta),"final"in g&&(c.final=g.final),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),$R=Ft((Q,$)=>{$.exports={attributes:m7(),layoutAttributes:g7(),supplyDefaults:v7().supplyDefaults,crossTraceDefaults:v7().crossTraceDefaults,supplyLayoutDefaults:jR(),calc:UR(),crossTraceCalc:VR(),plot:HR(),style:WR().style,hoverPoints:qR(),eventData:ZR(),selectPoints:rb(),moduleType:"trace",name:"waterfall",basePlotModule:Ef(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),GR=Ft((Q,$)=>{$.exports=$R()}),ab=Ft((Q,$)=>{$.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(c){return c.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(c){return c.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(c){return c.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(c){var g=c.slice(0,3);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(c){var g=c.slice(0,4);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%",""]}}}}),y7=Ft((Q,$)=>{var c=Yo(),g=tf().zorder,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=ya().extendFlat,e=ab().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],a=[],n=[];for(i=0;i{var c=_n(),g=y7(),P=ab(),S=u0().IMAGE_URL_PREFIX;$.exports=function(t,e){function r(o,i){return c.coerce(t,e,g,o,i)}r("source"),e.source&&!e.source.match(S)&&delete e.source,e._hasSource=!!e.source;var a=r("z");if(e._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!e._hasZ&&!e._hasSource){e.visible=!1;return}r("x0"),r("y0"),r("dx"),r("dy");var n;e._hasZ?(r("colormodel","rgb"),n=P.colormodel[e.colormodel],r("zmin",n.zminDflt||n.min),r("zmax",n.zmaxDflt||n.max)):e._hasSource&&(e.colormodel="rgba256",n=P.colormodel[e.colormodel],e.zmin=n.zminDflt,e.zmax=n.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),e._length=null,r("zorder")}}),_v=Ft((Q,$)=>{typeof Object.create=="function"?$.exports=function(c,g){g&&(c.super_=g,c.prototype=Object.create(g.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:$.exports=function(c,g){if(g){c.super_=g;var P=function(){};P.prototype=g.prototype,c.prototype=new P,c.prototype.constructor=c}}}),x7=Ft((Q,$)=>{$.exports=Dm().EventEmitter}),KR=Ft(Q=>{Q.byteLength=r,Q.toByteArray=n,Q.fromByteArray=s;var $=[],c=[],g=typeof Uint8Array<"u"?Uint8Array:Array,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,t=P.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var y=f.indexOf("=");y===-1&&(y=x);var v=y===x?0:4-y%4;return[y,v]}function r(f){var x=e(f),y=x[0],v=x[1];return(y+v)*3/4-v}function a(f,x,y){return(x+y)*3/4-y}function n(f){var x,y=e(f),v=y[0],T=y[1],u=new g(a(f,v,T)),b=0,_=T>0?v-4:v,C;for(C=0;C<_;C+=4)x=c[f.charCodeAt(C)]<<18|c[f.charCodeAt(C+1)]<<12|c[f.charCodeAt(C+2)]<<6|c[f.charCodeAt(C+3)],u[b++]=x>>16&255,u[b++]=x>>8&255,u[b++]=x&255;return T===2&&(x=c[f.charCodeAt(C)]<<2|c[f.charCodeAt(C+1)]>>4,u[b++]=x&255),T===1&&(x=c[f.charCodeAt(C)]<<10|c[f.charCodeAt(C+1)]<<4|c[f.charCodeAt(C+2)]>>2,u[b++]=x>>8&255,u[b++]=x&255),u}function o(f){return $[f>>18&63]+$[f>>12&63]+$[f>>6&63]+$[f&63]}function i(f,x,y){for(var v,T=[],u=x;u_?_:b+u));return v===1?(x=f[y-1],T.push($[x>>2]+$[x<<4&63]+"==")):v===2&&(x=(f[y-2]<<8)+f[y-1],T.push($[x>>10]+$[x>>4&63]+$[x<<2&63]+"=")),T.join("")}}),XR=Ft(Q=>{Q.read=function($,c,g,P,S){var t,e,r=S*8-P-1,a=(1<>1,o=-7,i=g?S-1:0,s=g?-1:1,f=$[c+i];for(i+=s,t=f&(1<<-o)-1,f>>=-o,o+=r;o>0;t=t*256+$[c+i],i+=s,o-=8);for(e=t&(1<<-o)-1,t>>=-o,o+=P;o>0;e=e*256+$[c+i],i+=s,o-=8);if(t===0)t=1-n;else{if(t===a)return e?NaN:(f?-1:1)*(1/0);e=e+Math.pow(2,P),t=t-n}return(f?-1:1)*e*Math.pow(2,t-P)},Q.write=function($,c,g,P,S,t){var e,r,a,n=t*8-S-1,o=(1<>1,s=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=P?0:t-1,x=P?1:-1,y=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(r=isNaN(c)?1:0,e=o):(e=Math.floor(Math.log(c)/Math.LN2),c*(a=Math.pow(2,-e))<1&&(e--,a*=2),e+i>=1?c+=s/a:c+=s*Math.pow(2,1-i),c*a>=2&&(e++,a/=2),e+i>=o?(r=0,e=o):e+i>=1?(r=(c*a-1)*Math.pow(2,S),e=e+i):(r=c*Math.pow(2,i-1)*Math.pow(2,S),e=0));S>=8;$[g+f]=r&255,f+=x,r/=256,S-=8);for(e=e<0;$[g+f]=e&255,f+=x,e/=256,n-=8);$[g+f-x]|=y*128}}),nx=Ft(Q=>{var $=KR(),c=XR(),g=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Q.Buffer=e,Q.SlowBuffer=T,Q.INSPECT_MAX_BYTES=50;var P=2147483647;Q.kMaxLength=P,e.TYPED_ARRAY_SUPPORT=S(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function S(){try{let Tt=new Uint8Array(1),Lt={foo:function(){return 42}};return Object.setPrototypeOf(Lt,Uint8Array.prototype),Object.setPrototypeOf(Tt,Lt),Tt.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function t(Tt){if(Tt>P)throw new RangeError('The value "'+Tt+'" is invalid for option "size"');let Lt=new Uint8Array(Tt);return Object.setPrototypeOf(Lt,e.prototype),Lt}function e(Tt,Lt,Mt){if(typeof Tt=="number"){if(typeof Lt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return o(Tt)}return r(Tt,Lt,Mt)}e.poolSize=8192;function r(Tt,Lt,Mt){if(typeof Tt=="string")return i(Tt,Lt);if(ArrayBuffer.isView(Tt))return f(Tt);if(Tt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt);if(Jt(Tt,ArrayBuffer)||Tt&&Jt(Tt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Jt(Tt,SharedArrayBuffer)||Tt&&Jt(Tt.buffer,SharedArrayBuffer)))return x(Tt,Lt,Mt);if(typeof Tt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let te=Tt.valueOf&&Tt.valueOf();if(te!=null&&te!==Tt)return e.from(te,Lt,Mt);let ve=y(Tt);if(ve)return ve;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Tt[Symbol.toPrimitive]=="function")return e.from(Tt[Symbol.toPrimitive]("string"),Lt,Mt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt)}e.from=function(Tt,Lt,Mt){return r(Tt,Lt,Mt)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function a(Tt){if(typeof Tt!="number")throw new TypeError('"size" argument must be of type number');if(Tt<0)throw new RangeError('The value "'+Tt+'" is invalid for option "size"')}function n(Tt,Lt,Mt){return a(Tt),Tt<=0?t(Tt):Lt!==void 0?typeof Mt=="string"?t(Tt).fill(Lt,Mt):t(Tt).fill(Lt):t(Tt)}e.alloc=function(Tt,Lt,Mt){return n(Tt,Lt,Mt)};function o(Tt){return a(Tt),t(Tt<0?0:v(Tt)|0)}e.allocUnsafe=function(Tt){return o(Tt)},e.allocUnsafeSlow=function(Tt){return o(Tt)};function i(Tt,Lt){if((typeof Lt!="string"||Lt==="")&&(Lt="utf8"),!e.isEncoding(Lt))throw new TypeError("Unknown encoding: "+Lt);let Mt=u(Tt,Lt)|0,te=t(Mt),ve=te.write(Tt,Lt);return ve!==Mt&&(te=te.slice(0,ve)),te}function s(Tt){let Lt=Tt.length<0?0:v(Tt.length)|0,Mt=t(Lt);for(let te=0;te=P)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P.toString(16)+" bytes");return Tt|0}function T(Tt){return+Tt!=Tt&&(Tt=0),e.alloc(+Tt)}e.isBuffer=function(Tt){return Tt!=null&&Tt._isBuffer===!0&&Tt!==e.prototype},e.compare=function(Tt,Lt){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),Jt(Lt,Uint8Array)&&(Lt=e.from(Lt,Lt.offset,Lt.byteLength)),!e.isBuffer(Tt)||!e.isBuffer(Lt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Tt===Lt)return 0;let Mt=Tt.length,te=Lt.length;for(let ve=0,oe=Math.min(Mt,te);vete.length?(e.isBuffer(oe)||(oe=e.from(oe)),oe.copy(te,ve)):Uint8Array.prototype.set.call(te,oe,ve);else if(e.isBuffer(oe))oe.copy(te,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=oe.length}return te};function u(Tt,Lt){if(e.isBuffer(Tt))return Tt.length;if(ArrayBuffer.isView(Tt)||Jt(Tt,ArrayBuffer))return Tt.byteLength;if(typeof Tt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Tt);let Mt=Tt.length,te=arguments.length>2&&arguments[2]===!0;if(!te&&Mt===0)return 0;let ve=!1;for(;;)switch(Lt){case"ascii":case"latin1":case"binary":return Mt;case"utf8":case"utf-8":return wt(Tt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mt*2;case"hex":return Mt>>>1;case"base64":return Wt(Tt).length;default:if(ve)return te?-1:wt(Tt).length;Lt=(""+Lt).toLowerCase(),ve=!0}}e.byteLength=u;function b(Tt,Lt,Mt){let te=!1;if((Lt===void 0||Lt<0)&&(Lt=0),Lt>this.length||((Mt===void 0||Mt>this.length)&&(Mt=this.length),Mt<=0)||(Mt>>>=0,Lt>>>=0,Mt<=Lt))return"";for(Tt||(Tt="utf8");;)switch(Tt){case"hex":return F(this,Lt,Mt);case"utf8":case"utf-8":return R(this,Lt,Mt);case"ascii":return V(this,Lt,Mt);case"latin1":case"binary":return H(this,Lt,Mt);case"base64":return w(this,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,Lt,Mt);default:if(te)throw new TypeError("Unknown encoding: "+Tt);Tt=(Tt+"").toLowerCase(),te=!0}}e.prototype._isBuffer=!0;function _(Tt,Lt,Mt){let te=Tt[Lt];Tt[Lt]=Tt[Mt],Tt[Mt]=te}e.prototype.swap16=function(){let Tt=this.length;if(Tt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Lt=0;LtLt&&(Tt+=" ... "),""},g&&(e.prototype[g]=e.prototype.inspect),e.prototype.compare=function(Tt,Lt,Mt,te,ve){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),!e.isBuffer(Tt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Tt);if(Lt===void 0&&(Lt=0),Mt===void 0&&(Mt=Tt?Tt.length:0),te===void 0&&(te=0),ve===void 0&&(ve=this.length),Lt<0||Mt>Tt.length||te<0||ve>this.length)throw new RangeError("out of range index");if(te>=ve&&Lt>=Mt)return 0;if(te>=ve)return-1;if(Lt>=Mt)return 1;if(Lt>>>=0,Mt>>>=0,te>>>=0,ve>>>=0,this===Tt)return 0;let oe=ve-te,Te=Mt-Lt,He=Math.min(oe,Te),Ge=this.slice(te,ve),cr=Tt.slice(Lt,Mt);for(let ur=0;ur2147483647?Mt=2147483647:Mt<-2147483648&&(Mt=-2147483648),Mt=+Mt,ge(Mt)&&(Mt=ve?0:Tt.length-1),Mt<0&&(Mt=Tt.length+Mt),Mt>=Tt.length){if(ve)return-1;Mt=Tt.length-1}else if(Mt<0)if(ve)Mt=0;else return-1;if(typeof Lt=="string"&&(Lt=e.from(Lt,te)),e.isBuffer(Lt))return Lt.length===0?-1:M(Tt,Lt,Mt,te,ve);if(typeof Lt=="number")return Lt=Lt&255,typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(Tt,Lt,Mt):Uint8Array.prototype.lastIndexOf.call(Tt,Lt,Mt):M(Tt,[Lt],Mt,te,ve);throw new TypeError("val must be string, number or Buffer")}function M(Tt,Lt,Mt,te,ve){let oe=1,Te=Tt.length,He=Lt.length;if(te!==void 0&&(te=String(te).toLowerCase(),te==="ucs2"||te==="ucs-2"||te==="utf16le"||te==="utf-16le")){if(Tt.length<2||Lt.length<2)return-1;oe=2,Te/=2,He/=2,Mt/=2}function Ge(ur,jr){return oe===1?ur[jr]:ur.readUInt16BE(jr*oe)}let cr;if(ve){let ur=-1;for(cr=Mt;crTe&&(Mt=Te-He),cr=Mt;cr>=0;cr--){let ur=!0;for(let jr=0;jrve&&(te=ve)):te=ve;let oe=Lt.length;te>oe/2&&(te=oe/2);let Te;for(Te=0;Te>>0,isFinite(Mt)?(Mt=Mt>>>0,te===void 0&&(te="utf8")):(te=Mt,Mt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ve=this.length-Lt;if((Mt===void 0||Mt>ve)&&(Mt=ve),Tt.length>0&&(Mt<0||Lt<0)||Lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");let oe=!1;for(;;)switch(te){case"hex":return E(this,Tt,Lt,Mt);case"utf8":case"utf-8":return A(this,Tt,Lt,Mt);case"ascii":case"latin1":case"binary":return h(this,Tt,Lt,Mt);case"base64":return p(this,Tt,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,Tt,Lt,Mt);default:if(oe)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),oe=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(Tt,Lt,Mt){return Lt===0&&Mt===Tt.length?$.fromByteArray(Tt):$.fromByteArray(Tt.slice(Lt,Mt))}function R(Tt,Lt,Mt){Mt=Math.min(Tt.length,Mt);let te=[],ve=Lt;for(;ve239?4:oe>223?3:oe>191?2:1;if(ve+He<=Mt){let Ge,cr,ur,jr;switch(He){case 1:oe<128&&(Te=oe);break;case 2:Ge=Tt[ve+1],(Ge&192)===128&&(jr=(oe&31)<<6|Ge&63,jr>127&&(Te=jr));break;case 3:Ge=Tt[ve+1],cr=Tt[ve+2],(Ge&192)===128&&(cr&192)===128&&(jr=(oe&15)<<12|(Ge&63)<<6|cr&63,jr>2047&&(jr<55296||jr>57343)&&(Te=jr));break;case 4:Ge=Tt[ve+1],cr=Tt[ve+2],ur=Tt[ve+3],(Ge&192)===128&&(cr&192)===128&&(ur&192)===128&&(jr=(oe&15)<<18|(Ge&63)<<12|(cr&63)<<6|ur&63,jr>65535&&jr<1114112&&(Te=jr))}}Te===null?(Te=65533,He=1):Te>65535&&(Te-=65536,te.push(Te>>>10&1023|55296),Te=56320|Te&1023),te.push(Te),ve+=He}return N(te)}var O=4096;function N(Tt){let Lt=Tt.length;if(Lt<=O)return String.fromCharCode.apply(String,Tt);let Mt="",te=0;for(;tete)&&(Mt=te);let ve="";for(let oe=Lt;oeMt&&(Tt=Mt),Lt<0?(Lt+=Mt,Lt<0&&(Lt=0)):Lt>Mt&&(Lt=Mt),LtMt)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let te=this[Tt],ve=1,oe=0;for(;++oe>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let te=this[Tt+--Lt],ve=1;for(;Lt>0&&(ve*=256);)te+=this[Tt+--Lt]*ve;return te},e.prototype.readUint8=e.prototype.readUInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]|this[Tt+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]<<8|this[Tt+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),(this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16)+this[Tt+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]*16777216+(this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3])},e.prototype.readBigUInt64LE=de(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let te=Lt+this[++Tt]*2**8+this[++Tt]*2**16+this[++Tt]*2**24,ve=this[++Tt]+this[++Tt]*2**8+this[++Tt]*2**16+Mt*2**24;return BigInt(te)+(BigInt(ve)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let te=Lt*2**24+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt],ve=this[++Tt]*2**24+this[++Tt]*2**16+this[++Tt]*2**8+Mt;return(BigInt(te)<>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let te=this[Tt],ve=1,oe=0;for(;++oe=ve&&(te-=Math.pow(2,8*Lt)),te},e.prototype.readIntBE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let te=Lt,ve=1,oe=this[Tt+--te];for(;te>0&&(ve*=256);)oe+=this[Tt+--te]*ve;return ve*=128,oe>=ve&&(oe-=Math.pow(2,8*Lt)),oe},e.prototype.readInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]&128?(255-this[Tt]+1)*-1:this[Tt]},e.prototype.readInt16LE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt]|this[Tt+1]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt16BE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt+1]|this[Tt]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16|this[Tt+3]<<24},e.prototype.readInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]<<24|this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3]},e.prototype.readBigInt64LE=de(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let te=this[Tt+4]+this[Tt+5]*2**8+this[Tt+6]*2**16+(Mt<<24);return(BigInt(te)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let te=(Lt<<24)+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt];return(BigInt(te)<>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!0,23,4)},e.prototype.readFloatBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!1,23,4)},e.prototype.readDoubleLE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!0,52,8)},e.prototype.readDoubleBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!1,52,8)};function q(Tt,Lt,Mt,te,ve,oe){if(!e.isBuffer(Tt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Lt>ve||LtTt.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(Tt,Lt,Mt,te){if(Tt=+Tt,Lt=Lt>>>0,Mt=Mt>>>0,!te){let Te=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Te,0)}let ve=1,oe=0;for(this[Lt]=Tt&255;++oe>>0,Mt=Mt>>>0,!te){let Te=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Te,0)}let ve=Mt-1,oe=1;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)this[Lt+ve]=Tt/oe&255;return Lt+Mt},e.prototype.writeUint8=e.prototype.writeUInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,255,0),this[Lt]=Tt&255,Lt+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt+3]=Tt>>>24,this[Lt+2]=Tt>>>16,this[Lt+1]=Tt>>>8,this[Lt]=Tt&255,Lt+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4};function X(Tt,Lt,Mt,te,ve){vt(Lt,te,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe;let Te=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Mt}function lt(Tt,Lt,Mt,te,ve){vt(Lt,te,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt+7]=oe,oe=oe>>8,Tt[Mt+6]=oe,oe=oe>>8,Tt[Mt+5]=oe,oe=oe>>8,Tt[Mt+4]=oe;let Te=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt+3]=Te,Te=Te>>8,Tt[Mt+2]=Te,Te=Te>>8,Tt[Mt+1]=Te,Te=Te>>8,Tt[Mt]=Te,Mt+8}e.prototype.writeBigUInt64LE=de(function(Tt,Lt=0){return X(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=de(function(Tt,Lt=0){return lt(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(Tt,Lt,Mt,te){if(Tt=+Tt,Lt=Lt>>>0,!te){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=0,oe=1,Te=0;for(this[Lt]=Tt&255;++ve>0)-Te&255;return Lt+Mt},e.prototype.writeIntBE=function(Tt,Lt,Mt,te){if(Tt=+Tt,Lt=Lt>>>0,!te){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=Mt-1,oe=1,Te=0;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)Tt<0&&Te===0&&this[Lt+ve+1]!==0&&(Te=1),this[Lt+ve]=(Tt/oe>>0)-Te&255;return Lt+Mt},e.prototype.writeInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,127,-128),Tt<0&&(Tt=255+Tt+1),this[Lt]=Tt&255,Lt+1},e.prototype.writeInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,this[Lt+2]=Tt>>>16,this[Lt+3]=Tt>>>24,Lt+4},e.prototype.writeInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),Tt<0&&(Tt=4294967295+Tt+1),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4},e.prototype.writeBigInt64LE=de(function(Tt,Lt=0){return X(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=de(function(Tt,Lt=0){return lt(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function yt(Tt,Lt,Mt,te,ve,oe){if(Mt+te>Tt.length)throw new RangeError("Index out of range");if(Mt<0)throw new RangeError("Index out of range")}function pt(Tt,Lt,Mt,te,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,4),c.write(Tt,Lt,Mt,te,23,4),Mt+4}e.prototype.writeFloatLE=function(Tt,Lt,Mt){return pt(this,Tt,Lt,!0,Mt)},e.prototype.writeFloatBE=function(Tt,Lt,Mt){return pt(this,Tt,Lt,!1,Mt)};function st(Tt,Lt,Mt,te,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,8),c.write(Tt,Lt,Mt,te,52,8),Mt+8}e.prototype.writeDoubleLE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!0,Mt)},e.prototype.writeDoubleBE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!1,Mt)},e.prototype.copy=function(Tt,Lt,Mt,te){if(!e.isBuffer(Tt))throw new TypeError("argument should be a Buffer");if(Mt||(Mt=0),!te&&te!==0&&(te=this.length),Lt>=Tt.length&&(Lt=Tt.length),Lt||(Lt=0),te>0&&te=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),Tt.length-Lt>>0,Mt=Mt===void 0?this.length:Mt>>>0,Tt||(Tt=0);let ve;if(typeof Tt=="number")for(ve=Lt;ve2**32?ve=rt(String(Mt)):typeof Mt=="bigint"&&(ve=String(Mt),(Mt>BigInt(2)**BigInt(32)||Mt<-(BigInt(2)**BigInt(32)))&&(ve=rt(ve)),ve+="n"),te+=` It must be ${Lt}. Received ${ve}`,te},RangeError);function rt(Tt){let Lt="",Mt=Tt.length,te=Tt[0]==="-"?1:0;for(;Mt>=te+4;Mt-=3)Lt=`_${Tt.slice(Mt-3,Mt)}${Lt}`;return`${Tt.slice(0,Mt)}${Lt}`}function at(Tt,Lt,Mt){it(Lt,"offset"),(Tt[Lt]===void 0||Tt[Lt+Mt]===void 0)&&Y(Lt,Tt.length-(Mt+1))}function vt(Tt,Lt,Mt,te,ve,oe){if(Tt>Mt||Tt= 0${Te} and < 2${Te} ** ${(oe+1)*8}${Te}`:He=`>= -(2${Te} ** ${(oe+1)*8-1}${Te}) and < 2 ** ${(oe+1)*8-1}${Te}`,new tt.ERR_OUT_OF_RANGE("value",He,Tt)}at(te,ve,oe)}function it(Tt,Lt){if(typeof Tt!="number")throw new tt.ERR_INVALID_ARG_TYPE(Lt,"number",Tt)}function Y(Tt,Lt,Mt){throw Math.floor(Tt)!==Tt?(it(Tt,Mt),new tt.ERR_OUT_OF_RANGE("offset","an integer",Tt)):Lt<0?new tt.ERR_BUFFER_OUT_OF_BOUNDS:new tt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Lt}`,Tt)}var ft=/[^+/0-9A-Za-z-_]/g;function ut(Tt){if(Tt=Tt.split("=")[0],Tt=Tt.trim().replace(ft,""),Tt.length<2)return"";for(;Tt.length%4!==0;)Tt=Tt+"=";return Tt}function wt(Tt,Lt){Lt=Lt||1/0;let Mt,te=Tt.length,ve=null,oe=[];for(let Te=0;Te55295&&Mt<57344){if(!ve){if(Mt>56319){(Lt-=3)>-1&&oe.push(239,191,189);continue}else if(Te+1===te){(Lt-=3)>-1&&oe.push(239,191,189);continue}ve=Mt;continue}if(Mt<56320){(Lt-=3)>-1&&oe.push(239,191,189),ve=Mt;continue}Mt=(ve-55296<<10|Mt-56320)+65536}else ve&&(Lt-=3)>-1&&oe.push(239,191,189);if(ve=null,Mt<128){if((Lt-=1)<0)break;oe.push(Mt)}else if(Mt<2048){if((Lt-=2)<0)break;oe.push(Mt>>6|192,Mt&63|128)}else if(Mt<65536){if((Lt-=3)<0)break;oe.push(Mt>>12|224,Mt>>6&63|128,Mt&63|128)}else if(Mt<1114112){if((Lt-=4)<0)break;oe.push(Mt>>18|240,Mt>>12&63|128,Mt>>6&63|128,Mt&63|128)}else throw new Error("Invalid code point")}return oe}function zt(Tt){let Lt=[];for(let Mt=0;Mt>8,ve=Mt%256,oe.push(ve),oe.push(te);return oe}function Wt(Tt){return $.toByteArray(ut(Tt))}function Ht(Tt,Lt,Mt,te){let ve;for(ve=0;ve=Lt.length||ve>=Tt.length);++ve)Lt[ve+Mt]=Tt[ve];return ve}function Jt(Tt,Lt){return Tt instanceof Lt||Tt!=null&&Tt.constructor!=null&&Tt.constructor.name!=null&&Tt.constructor.name===Lt.name}function ge(Tt){return Tt!==Tt}var he=function(){let Tt="0123456789abcdef",Lt=new Array(256);for(let Mt=0;Mt<16;++Mt){let te=Mt*16;for(let ve=0;ve<16;++ve)Lt[te+ve]=Tt[Mt]+Tt[ve]}return Lt}();function de(Tt){return typeof BigInt>"u"?se:Tt}function se(){throw new Error("BigInt not supported")}}),rk=Ft((Q,$)=>{$.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var c={},g=Symbol("test"),P=Object(g);if(typeof g=="string"||Object.prototype.toString.call(g)!=="[object Symbol]"||Object.prototype.toString.call(P)!=="[object Symbol]")return!1;var S=42;c[g]=S;for(var t in c)return!1;if(typeof Object.keys=="function"&&Object.keys(c).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(c).length!==0)return!1;var e=Object.getOwnPropertySymbols(c);if(e.length!==1||e[0]!==g||!Object.prototype.propertyIsEnumerable.call(c,g))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(c,g);if(r.value!==S||r.enumerable!==!0)return!1}return!0}}),$w=Ft((Q,$)=>{var c=rk();$.exports=function(){return c()&&!!Symbol.toStringTag}}),_7=Ft((Q,$)=>{$.exports=Object}),JR=Ft((Q,$)=>{$.exports=Error}),QR=Ft((Q,$)=>{$.exports=EvalError}),tB=Ft((Q,$)=>{$.exports=RangeError}),eB=Ft((Q,$)=>{$.exports=ReferenceError}),b7=Ft((Q,$)=>{$.exports=SyntaxError}),ob=Ft((Q,$)=>{$.exports=TypeError}),rB=Ft((Q,$)=>{$.exports=URIError}),nB=Ft((Q,$)=>{$.exports=Math.abs}),iB=Ft((Q,$)=>{$.exports=Math.floor}),aB=Ft((Q,$)=>{$.exports=Math.max}),oB=Ft((Q,$)=>{$.exports=Math.min}),sB=Ft((Q,$)=>{$.exports=Math.pow}),lB=Ft((Q,$)=>{$.exports=Math.round}),uB=Ft((Q,$)=>{$.exports=Number.isNaN||function(c){return c!==c}}),cB=Ft((Q,$)=>{var c=uB();$.exports=function(g){return c(g)||g===0?g:g<0?-1:1}}),hB=Ft((Q,$)=>{$.exports=Object.getOwnPropertyDescriptor}),ix=Ft((Q,$)=>{var c=hB();if(c)try{c([],"length")}catch{c=null}$.exports=c}),Gw=Ft((Q,$)=>{var c=Object.defineProperty||!1;if(c)try{c({},"a",{value:1})}catch{c=!1}$.exports=c}),fB=Ft((Q,$)=>{var c=typeof Symbol<"u"&&Symbol,g=rk();$.exports=function(){return typeof c!="function"||typeof Symbol!="function"||typeof c("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()}}),w7=Ft((Q,$)=>{$.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),k7=Ft((Q,$)=>{var c=_7();$.exports=c.getPrototypeOf||null}),dB=Ft((Q,$)=>{var c="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,P=Math.max,S="[object Function]",t=function(a,n){for(var o=[],i=0;i{var c=dB();$.exports=Function.prototype.bind||c}),nk=Ft((Q,$)=>{$.exports=Function.prototype.call}),T7=Ft((Q,$)=>{$.exports=Function.prototype.apply}),pB=Ft((Q,$)=>{$.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),mB=Ft((Q,$)=>{var c=sb(),g=T7(),P=nk(),S=pB();$.exports=S||c.call(P,g)}),gB=Ft((Q,$)=>{var c=sb(),g=ob(),P=nk(),S=mB();$.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new g("a function is required");return S(c,P,t)}}),vB=Ft((Q,$)=>{var c=gB(),g=ix(),P;try{P=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var S=!!P&&g&&g(Object.prototype,"__proto__"),t=Object,e=t.getPrototypeOf;$.exports=S&&typeof S.get=="function"?c([S.get]):typeof e=="function"?function(r){return e(r==null?r:t(r))}:!1}),yB=Ft((Q,$)=>{var c=w7(),g=k7(),P=vB();$.exports=c?function(S){return c(S)}:g?function(S){if(!S||typeof S!="object"&&typeof S!="function")throw new TypeError("getProto: not an object");return g(S)}:P?function(S){return P(S)}:null}),xB=Ft((Q,$)=>{var c=Function.prototype.call,g=Object.prototype.hasOwnProperty,P=sb();$.exports=P.call(c,g)}),ik=Ft((Q,$)=>{var c,g=_7(),P=JR(),S=QR(),t=tB(),e=eB(),r=b7(),a=ob(),n=rB(),o=nB(),i=iB(),s=aB(),f=oB(),x=sB(),y=lB(),v=cB(),T=Function,u=function(at){try{return T('"use strict"; return ('+at+").constructor;")()}catch{}},b=ix(),_=Gw(),C=function(){throw new a},M=b?function(){try{return arguments.callee,C}catch{try{return b(arguments,"callee").get}catch{return C}}}():C,E=fB()(),A=yB(),h=k7(),p=w7(),k=T7(),w=nk(),R={},O=typeof Uint8Array>"u"||!A?c:A(Uint8Array),N={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?c:ArrayBuffer,"%ArrayIteratorPrototype%":E&&A?A([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?c:Atomics,"%BigInt%":typeof BigInt>"u"?c:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?c:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?c:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":P,"%eval%":eval,"%EvalError%":S,"%Float16Array%":typeof Float16Array>"u"?c:Float16Array,"%Float32Array%":typeof Float32Array>"u"?c:Float32Array,"%Float64Array%":typeof Float64Array>"u"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?c:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?c:Int8Array,"%Int16Array%":typeof Int16Array>"u"?c:Int16Array,"%Int32Array%":typeof Int32Array>"u"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&A?A(A([][Symbol.iterator]())):c,"%JSON%":typeof JSON=="object"?JSON:c,"%Map%":typeof Map>"u"?c:Map,"%MapIteratorPrototype%":typeof Map>"u"||!E||!A?c:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":g,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?c:Promise,"%Proxy%":typeof Proxy>"u"?c:Proxy,"%RangeError%":t,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?c:Set,"%SetIteratorPrototype%":typeof Set>"u"||!E||!A?c:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&A?A(""[Symbol.iterator]()):c,"%Symbol%":E?Symbol:c,"%SyntaxError%":r,"%ThrowTypeError%":M,"%TypedArray%":O,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?c:Uint32Array,"%URIError%":n,"%WeakMap%":typeof WeakMap>"u"?c:WeakMap,"%WeakRef%":typeof WeakRef>"u"?c:WeakRef,"%WeakSet%":typeof WeakSet>"u"?c:WeakSet,"%Function.prototype.call%":w,"%Function.prototype.apply%":k,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":h,"%Math.abs%":o,"%Math.floor%":i,"%Math.max%":s,"%Math.min%":f,"%Math.pow%":x,"%Math.round%":y,"%Math.sign%":v,"%Reflect.getPrototypeOf%":p};if(A)try{null.error}catch(at){V=A(A(at)),N["%Error.prototype%"]=V}var V,H=function at(vt){var it;if(vt==="%AsyncFunction%")it=u("async function () {}");else if(vt==="%GeneratorFunction%")it=u("function* () {}");else if(vt==="%AsyncGeneratorFunction%")it=u("async function* () {}");else if(vt==="%AsyncGenerator%"){var Y=at("%AsyncGeneratorFunction%");Y&&(it=Y.prototype)}else if(vt==="%AsyncIteratorPrototype%"){var ft=at("%AsyncGenerator%");ft&&A&&(it=A(ft.prototype))}return N[vt]=it,it},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=sb(),W=xB(),q=U.call(w,Array.prototype.concat),X=U.call(k,Array.prototype.splice),lt=U.call(w,String.prototype.replace),yt=U.call(w,String.prototype.slice),pt=U.call(w,RegExp.prototype.exec),st=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tt=/\\(\\)?/g,dt=function(at){var vt=yt(at,0,1),it=yt(at,-1);if(vt==="%"&&it!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(it==="%"&&vt!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var Y=[];return lt(at,st,function(ft,ut,wt,zt){Y[Y.length]=wt?lt(zt,tt,"$1"):ut||ft}),Y},rt=function(at,vt){var it=at,Y;if(W(F,it)&&(Y=F[it],it="%"+Y[0]+"%"),W(N,it)){var ft=N[it];if(ft===R&&(ft=H(it)),typeof ft>"u"&&!vt)throw new a("intrinsic "+at+" exists, but is not available. Please file an issue!");return{alias:Y,name:it,value:ft}}throw new r("intrinsic "+at+" does not exist!")};$.exports=function(at,vt){if(typeof at!="string"||at.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof vt!="boolean")throw new a('"allowMissing" argument must be a boolean');if(pt(/^%?[^%]*%?$/,at)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var it=dt(at),Y=it.length>0?it[0]:"",ft=rt("%"+Y+"%",vt),ut=ft.name,wt=ft.value,zt=!1,Pt=ft.alias;Pt&&(Y=Pt[0],X(it,q([0,1],Pt)));for(var Wt=1,Ht=!0;Wt=it.length){var de=b(wt,Jt);Ht=!!de,Ht&&"get"in de&&!("originalValue"in de.get)?wt=de.get:wt=wt[Jt]}else Ht=W(wt,Jt),wt=wt[Jt];Ht&&!zt&&(N[ut]=wt)}}return wt}}),_B=Ft((Q,$)=>{var c=Gw(),g=b7(),P=ob(),S=ix();$.exports=function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new P("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new P("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new P("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new P("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new P("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new P("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,i=arguments.length>6?arguments[6]:!1,s=!!S&&S(t,e);if(c)c(t,e,{configurable:o===null&&s?s.configurable:!o,enumerable:a===null&&s?s.enumerable:!a,value:r,writable:n===null&&s?s.writable:!n});else if(i||!a&&!n&&!o)t[e]=r;else throw new g("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),A7=Ft((Q,$)=>{var c=Gw(),g=function(){return!!c};g.hasArrayLengthDefineBug=function(){if(!c)return null;try{return c([],"length",{value:1}).length!==1}catch{return!0}},$.exports=g}),bB=Ft((Q,$)=>{var c=ik(),g=_B(),P=A7()(),S=ix(),t=ob(),e=c("%Math.floor%");$.exports=function(r,a){if(typeof r!="function")throw new t("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||e(a)!==a)throw new t("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in r&&S){var s=S(r,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!n)&&(P?g(r,"length",a,!0,!0):g(r,"length",a)),r}}),Yw=Ft((Q,$)=>{var c=sb(),g=ik(),P=bB(),S=ob(),t=g("%Function.prototype.apply%"),e=g("%Function.prototype.call%"),r=g("%Reflect.apply%",!0)||c.call(e,t),a=Gw(),n=g("%Math.max%");$.exports=function(i){if(typeof i!="function")throw new S("a function is required");var s=r(c,e,arguments);return P(s,1+n(0,i.length-(arguments.length-1)),!0)};var o=function(){return r(c,t,arguments)};a?a($.exports,"apply",{value:o}):$.exports.apply=o}),lb=Ft((Q,$)=>{var c=ik(),g=Yw(),P=g(c("String.prototype.indexOf"));$.exports=function(S,t){var e=c(S,!!t);return typeof e=="function"&&P(S,".prototype.")>-1?g(e):e}}),wB=Ft((Q,$)=>{var c=$w()(),g=lb(),P=g("Object.prototype.toString"),S=function(r){return c&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:P(r)==="[object Arguments]"},t=function(r){return S(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&P(r)!=="[object Array]"&&P(r.callee)==="[object Function]"},e=function(){return S(arguments)}();S.isLegacyArguments=t,$.exports=e?S:t}),kB=Ft((Q,$)=>{var c=Object.prototype.toString,g=Function.prototype.toString,P=/^\s*(?:function)?\*/,S=$w()(),t=Object.getPrototypeOf,e=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},r;$.exports=function(a){if(typeof a!="function")return!1;if(P.test(g.call(a)))return!0;if(!S){var n=c.call(a);return n==="[object GeneratorFunction]"}if(!t)return!1;if(typeof r>"u"){var o=e();r=o?t(o):!1}return t(a)===r}}),TB=Ft((Q,$)=>{var c=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,P,S;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{P=Object.defineProperty({},"length",{get:function(){throw S}}),S={},g(function(){throw 42},null,P)}catch(b){b!==S&&(g=null)}else g=null;var t=/^\s*class\b/,e=function(b){try{var _=c.call(b);return t.test(_)}catch{return!1}},r=function(b){try{return e(b)?!1:(c.call(b),!0)}catch{return!1}},a=Object.prototype.toString,n="[object Object]",o="[object Function]",i="[object GeneratorFunction]",s="[object HTMLAllCollection]",f="[object HTML document.all class]",x="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(u=document.all,a.call(u)===a.call(document.all)&&(T=function(b){if((v||!b)&&(typeof b>"u"||typeof b=="object"))try{var _=a.call(b);return(_===s||_===f||_===x||_===n)&&b("")==null}catch{}return!1}));var u;$.exports=g?function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;try{g(b,null,P)}catch(_){if(_!==S)return!1}return!e(b)&&r(b)}:function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;if(y)return r(b);if(e(b))return!1;var _=a.call(b);return _!==o&&_!==i&&!/^\[object HTML/.test(_)?!1:r(b)}}),M7=Ft((Q,$)=>{var c=TB(),g=Object.prototype.toString,P=Object.prototype.hasOwnProperty,S=function(a,n,o){for(var i=0,s=a.length;i=3&&(i=o),g.call(a)==="[object Array]"?S(a,n,i):typeof a=="string"?t(a,n,i):e(a,n,i)};$.exports=r}),S7=Ft((Q,$)=>{var c=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g=typeof globalThis>"u"?window:globalThis;$.exports=function(){for(var P=[],S=0;S{var c=M7(),g=S7(),P=Yw(),S=lb(),t=ix(),e=S("Object.prototype.toString"),r=$w()(),a=typeof globalThis>"u"?window:globalThis,n=g(),o=S("String.prototype.slice"),i=Object.getPrototypeOf,s=S("Array.prototype.indexOf",!0)||function(v,T){for(var u=0;u-1?T:T!=="Object"?!1:y(v)}return t?x(v):null}}),MB=Ft((Q,$)=>{var c=M7(),g=S7(),P=lb(),S=P("Object.prototype.toString"),t=$w()(),e=ix(),r=typeof globalThis>"u"?window:globalThis,a=g(),n=P("Array.prototype.indexOf",!0)||function(x,y){for(var v=0;v-1}return e?f(x):!1}}),E7=Ft(Q=>{var $=wB(),c=kB(),g=AB(),P=MB();function S(Pt){return Pt.call.bind(Pt)}var t=typeof BigInt<"u",e=typeof Symbol<"u",r=S(Object.prototype.toString),a=S(Number.prototype.valueOf),n=S(String.prototype.valueOf),o=S(Boolean.prototype.valueOf);t&&(i=S(BigInt.prototype.valueOf));var i;e&&(s=S(Symbol.prototype.valueOf));var s;function f(Pt,Wt){if(typeof Pt!="object")return!1;try{return Wt(Pt),!0}catch{return!1}}Q.isArgumentsObject=$,Q.isGeneratorFunction=c,Q.isTypedArray=P;function x(Pt){return typeof Promise<"u"&&Pt instanceof Promise||Pt!==null&&typeof Pt=="object"&&typeof Pt.then=="function"&&typeof Pt.catch=="function"}Q.isPromise=x;function y(Pt){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Pt):P(Pt)||X(Pt)}Q.isArrayBufferView=y;function v(Pt){return g(Pt)==="Uint8Array"}Q.isUint8Array=v;function T(Pt){return g(Pt)==="Uint8ClampedArray"}Q.isUint8ClampedArray=T;function u(Pt){return g(Pt)==="Uint16Array"}Q.isUint16Array=u;function b(Pt){return g(Pt)==="Uint32Array"}Q.isUint32Array=b;function _(Pt){return g(Pt)==="Int8Array"}Q.isInt8Array=_;function C(Pt){return g(Pt)==="Int16Array"}Q.isInt16Array=C;function M(Pt){return g(Pt)==="Int32Array"}Q.isInt32Array=M;function E(Pt){return g(Pt)==="Float32Array"}Q.isFloat32Array=E;function A(Pt){return g(Pt)==="Float64Array"}Q.isFloat64Array=A;function h(Pt){return g(Pt)==="BigInt64Array"}Q.isBigInt64Array=h;function p(Pt){return g(Pt)==="BigUint64Array"}Q.isBigUint64Array=p;function k(Pt){return r(Pt)==="[object Map]"}k.working=typeof Map<"u"&&k(new Map);function w(Pt){return typeof Map>"u"?!1:k.working?k(Pt):Pt instanceof Map}Q.isMap=w;function R(Pt){return r(Pt)==="[object Set]"}R.working=typeof Set<"u"&&R(new Set);function O(Pt){return typeof Set>"u"?!1:R.working?R(Pt):Pt instanceof Set}Q.isSet=O;function N(Pt){return r(Pt)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function V(Pt){return typeof WeakMap>"u"?!1:N.working?N(Pt):Pt instanceof WeakMap}Q.isWeakMap=V;function H(Pt){return r(Pt)==="[object WeakSet]"}H.working=typeof WeakSet<"u"&&H(new WeakSet);function F(Pt){return H(Pt)}Q.isWeakSet=F;function U(Pt){return r(Pt)==="[object ArrayBuffer]"}U.working=typeof ArrayBuffer<"u"&&U(new ArrayBuffer);function W(Pt){return typeof ArrayBuffer>"u"?!1:U.working?U(Pt):Pt instanceof ArrayBuffer}Q.isArrayBuffer=W;function q(Pt){return r(Pt)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function X(Pt){return typeof DataView>"u"?!1:q.working?q(Pt):Pt instanceof DataView}Q.isDataView=X;var lt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function yt(Pt){return r(Pt)==="[object SharedArrayBuffer]"}function pt(Pt){return typeof lt>"u"?!1:(typeof yt.working>"u"&&(yt.working=yt(new lt)),yt.working?yt(Pt):Pt instanceof lt)}Q.isSharedArrayBuffer=pt;function st(Pt){return r(Pt)==="[object AsyncFunction]"}Q.isAsyncFunction=st;function tt(Pt){return r(Pt)==="[object Map Iterator]"}Q.isMapIterator=tt;function dt(Pt){return r(Pt)==="[object Set Iterator]"}Q.isSetIterator=dt;function rt(Pt){return r(Pt)==="[object Generator]"}Q.isGeneratorObject=rt;function at(Pt){return r(Pt)==="[object WebAssembly.Module]"}Q.isWebAssemblyCompiledModule=at;function vt(Pt){return f(Pt,a)}Q.isNumberObject=vt;function it(Pt){return f(Pt,n)}Q.isStringObject=it;function Y(Pt){return f(Pt,o)}Q.isBooleanObject=Y;function ft(Pt){return t&&f(Pt,i)}Q.isBigIntObject=ft;function ut(Pt){return e&&f(Pt,s)}Q.isSymbolObject=ut;function wt(Pt){return vt(Pt)||it(Pt)||Y(Pt)||ft(Pt)||ut(Pt)}Q.isBoxedPrimitive=wt;function zt(Pt){return typeof Uint8Array<"u"&&(W(Pt)||pt(Pt))}Q.isAnyArrayBuffer=zt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Pt){Object.defineProperty(Q,Pt,{enumerable:!1,value:function(){throw new Error(Pt+" is not supported in userland")}})})}),C7=Ft((Q,$)=>{$.exports=function(c){return c&&typeof c=="object"&&typeof c.copy=="function"&&typeof c.fill=="function"&&typeof c.readUInt8=="function"}}),L7=Ft(Q=>{var $=Object.getOwnPropertyDescriptors||function(q){for(var X=Object.keys(q),lt={},yt=0;yt=pt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,X).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),lt=!0}return q.apply(this,arguments)}return yt};var g={},P=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),P=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(P.test(q)){var X=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,X,lt)}}else g[q]=function(){};return g[q]};function t(q,X){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(X)?lt.showHidden=X:X&&Q._extend(lt,X),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,X){var lt=t.styles[X];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,X){return q}function a(q){var X={};return q.forEach(function(lt,yt){X[lt]=!0}),X}function n(q,X,lt){if(q.customInspect&&X&&k(X.inspect)&&X.inspect!==Q.inspect&&!(X.constructor&&X.constructor.prototype===X)){var yt=X.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var pt=o(q,X);if(pt)return pt;var st=Object.keys(X),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(X)),p(X)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(X);if(st.length===0){if(k(X)){var dt=X.name?": "+X.name:"";return q.stylize("[Function"+dt+"]","special")}if(E(X))return q.stylize(RegExp.prototype.toString.call(X),"regexp");if(h(X))return q.stylize(Date.prototype.toString.call(X),"date");if(p(X))return i(X)}var rt="",at=!1,vt=["{","}"];if(y(X)&&(at=!0,vt=["[","]"]),k(X)){var it=X.name?": "+X.name:"";rt=" [Function"+it+"]"}if(E(X)&&(rt=" "+RegExp.prototype.toString.call(X)),h(X)&&(rt=" "+Date.prototype.toUTCString.call(X)),p(X)&&(rt=" "+i(X)),st.length===0&&(!at||X.length==0))return vt[0]+rt+vt[1];if(lt<0)return E(X)?q.stylize(RegExp.prototype.toString.call(X),"regexp"):q.stylize("[Object]","special");q.seen.push(X);var Y;return at?Y=s(q,X,lt,tt,st):Y=st.map(function(ft){return f(q,X,lt,tt,ft,at)}),q.seen.pop(),x(Y,rt,vt)}function o(q,X){if(M(X))return q.stylize("undefined","undefined");if(_(X)){var lt="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(X))return q.stylize(""+X,"number");if(v(X))return q.stylize(""+X,"boolean");if(T(X))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function s(q,X,lt,yt,pt){for(var st=[],tt=0,dt=X.length;tt{Z.exports=function(c){return c}}),E_=Dt(Q=>{var Z=Yi(),c=as(),g=w1(),I=Ca().BADNUM,S=1e-9;Q.findBin=function(n,o,i){if(Z(o.start))return i?Math.ceil((n-o.start)/o.size-S)-1:Math.floor((n-o.start)/o.size+S);var l=0,f=o.length,x=0,y=f>1?(o[f-1]-o[0])/(f-1):1,v,T;for(y>=0?T=i?t:e:T=i?a:r,n+=y*S*(i?-1:1)*(y>=0?1:-1);l90&&c.log("Long binary search..."),l-1};function t(n,o){return no}function a(n,o){return n>=o}Q.sorterAsc=function(n,o){return n-o},Q.sorterDes=function(n,o){return o-n},Q.distinctVals=function(n){var o=n.slice();o.sort(Q.sorterAsc);var i;for(i=o.length-1;i>-1&&o[i]===I;i--);for(var l=o[i]-o[0]||1,f=l/(i||1)/1e4,x=[],y,v=0;v<=i;v++){var T=o[v],u=T-y;y===void 0?(x.push(T),y=T):u>f&&(l=Math.min(l,u),x.push(T),y=T)}return{vals:x,minDiff:l}},Q.roundUp=function(n,o,i){for(var l=0,f=o.length-1,x,y=0,v=i?0:1,T=i?1:0,u=i?Math.ceil:Math.floor;l0&&(l=1),i&&l)return n.sort(o)}return l?n:n.reverse()},Q.findIndexOfMin=function(n,o){o=o||g;for(var i=1/0,l,f=0;f{Z.exports=function(c){return Object.keys(c).sort()}}),p6=Dt(Q=>{var Z=Yi(),c=Ma().isArrayOrTypedArray;Q.aggNums=function(g,I,S,t){var e,r;if((!t||t>S.length)&&(t=S.length),Z(I)||(I=!1),c(S[0])){for(r=new Array(t),e=0;eg.length-1)return g[g.length-1];var S=I%1;return S*g[Math.ceil(I)]+(1-S)*g[Math.floor(I)]}}),m6=Dt((Q,Z)=>{var c=ko(),g=c.mod,I=c.modHalf,S=Math.PI,t=2*S;function e(T){return T/180*S}function r(T){return T/S*180}function a(T){return Math.abs(T[1]-T[0])>t-1e-14}function n(T,u){return I(u-T,t)}function o(T,u){return Math.abs(n(T,u))}function i(T,u){if(a(u))return!0;var b,_;u[0]_&&(_+=t);var P=g(T,t),M=P+t;return P>=b&&P<=_||M>=b&&M<=_}function l(T,u,b,_){if(!i(u,_))return!1;var P,M;return b[0]=P&&T<=M}function f(T,u,b,_,P,M,C){P=P||0,M=M||0;var A=a([b,_]),h,p,k,w,R;A?(h=0,p=S,k=t):b<_?(h=b,k=_):(h=_,k=b),T{Q.isLeftAnchor=function(Z){return Z.xanchor==="left"||Z.xanchor==="auto"&&Z.x<=1/3},Q.isCenterAnchor=function(Z){return Z.xanchor==="center"||Z.xanchor==="auto"&&Z.x>1/3&&Z.x<2/3},Q.isRightAnchor=function(Z){return Z.xanchor==="right"||Z.xanchor==="auto"&&Z.x>=2/3},Q.isTopAnchor=function(Z){return Z.yanchor==="top"||Z.yanchor==="auto"&&Z.y>=2/3},Q.isMiddleAnchor=function(Z){return Z.yanchor==="middle"||Z.yanchor==="auto"&&Z.y>1/3&&Z.y<2/3},Q.isBottomAnchor=function(Z){return Z.yanchor==="bottom"||Z.yanchor==="auto"&&Z.y<=1/3}}),v6=Dt(Q=>{var Z=ko().mod;Q.segmentsIntersect=c;function c(e,r,a,n,o,i,l,f){var x=a-e,y=o-e,v=l-o,T=n-r,u=i-r,b=f-i,_=x*b-v*T;if(_===0)return null;var P=(y*b-v*u)/_,M=(y*T-x*u)/_;return M<0||M>1||P<0||P>1?null:{x:e+x*P,y:r+T*P}}Q.segmentDistance=function(e,r,a,n,o,i,l,f){if(c(e,r,a,n,o,i,l,f))return 0;var x=a-e,y=n-r,v=l-o,T=f-i,u=x*x+y*y,b=v*v+T*T,_=Math.min(g(x,y,u,o-e,i-r),g(x,y,u,l-e,f-r),g(v,T,b,e-o,r-i),g(v,T,b,a-o,n-i));return Math.sqrt(_)};function g(e,r,a,n,o){var i=n*e+o*r;if(i<0)return n*n+o*o;if(i>a){var l=n-e,f=o-r;return l*l+f*f}else{var x=n*r-o*e;return x*x/a}}var I,S,t;Q.getTextLocation=function(e,r,a,n){if((e!==S||n!==t)&&(I={},S=e,t=n),I[a])return I[a];var o=e.getPointAtLength(Z(a-n/2,r)),i=e.getPointAtLength(Z(a+n/2,r)),l=Math.atan((i.y-o.y)/(i.x-o.x)),f=e.getPointAtLength(Z(a,r)),x=(f.x*4+o.x+i.x)/6,y=(f.y*4+o.y+i.y)/6,v={x,y,theta:l};return I[a]=v,v},Q.clearLocationCache=function(){S=null},Q.getVisibleSegment=function(e,r,a){var n=r.left,o=r.right,i=r.top,l=r.bottom,f=0,x=e.getTotalLength(),y=x,v,T;function u(_){var P=e.getPointAtLength(_);_===0?v=P:_===x&&(T=P);var M=P.xo?P.x-o:0,C=P.yl?P.y-l:0;return Math.sqrt(M*M+C*C)}for(var b=u(f);b;){if(f+=b+a,f>y)return;b=u(f)}for(b=u(y);b;){if(y-=b+a,f>y)return;b=u(y)}return{min:f,max:y,len:y-f,total:x,isClosed:f===0&&y===x&&Math.abs(v.x-T.x)<.1&&Math.abs(v.y-T.y)<.1}},Q.findPointOnPath=function(e,r,a,n){n=n||{};for(var o=n.pathLength||e.getTotalLength(),i=n.tolerance||.001,l=n.iterationLimit||30,f=e.getPointAtLength(0)[a]>e.getPointAtLength(o)[a]?-1:1,x=0,y=0,v=o,T,u,b;x0?v=T:y=T,x++}return u}}),C_=Dt(Q=>{var Z={};Q.throttle=function(g,I,S){var t=Z[g],e=Date.now();if(!t){for(var r in Z)Z[r].tst.ts+I){a();return}t.timer=setTimeout(function(){a(),t.timer=null},I)},Q.done=function(g){var I=Z[g];return!I||!I.timer?Promise.resolve():new Promise(function(S){var t=I.onDone;I.onDone=function(){t&&t(),S(),I.onDone=null}})},Q.clear=function(g){if(g)c(Z[g]),delete Z[g];else for(var I in Z)Q.clear(I)};function c(g){g&&g.timer!==null&&(clearTimeout(g.timer),g.timer=null)}}),L_=Dt((Q,Z)=>{Z.exports=function(c){c._responsiveChartHandler&&(window.removeEventListener("resize",c._responsiveChartHandler),delete c._responsiveChartHandler)}}),k1=Dt((Q,Z)=>{Z.exports=S,Z.exports.isMobile=S,Z.exports.default=S;var c=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,g=/CrOS/,I=/android|ipad|playbook|silk/i;function S(t){t||(t={});let e=t.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let r=c.test(e)&&!g.test(e)||!!t.tablet&&I.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(r=!0),r}}),vw=Dt((Q,Z)=>{var c=Yi(),g=k1();Z.exports=function(S){var t;if(S&&S.hasOwnProperty("userAgent")?t=S.userAgent:t=I(),typeof t!="string")return!0;var e=g({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!e)for(var r=t.split(" "),a=1;a-1;o--){var i=r[o];if(i.substr(0,8)==="Version/"){var l=i.substr(8).split(".")[0];if(c(l)&&(l=+l),l>=13)return!0}}}return e};function I(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}}),yw=Dt((Q,Z)=>{var c=qr();Z.exports=function(g,I,S){var t=g.selectAll("g."+S.replace(/\s/g,".")).data(I,function(r){return r[0].trace.uid});t.exit().remove(),t.enter().append("g").attr("class",S),t.order();var e=g.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(r){r[0][e]=c.select(this)}),t}}),T1=Dt((Q,Z)=>{var c=Jo();Z.exports=function(g,I){for(var S=g._context.locale,t=0;t<2;t++){for(var e=g._context.locales,r=0;r<2;r++){var a=(e[S]||{}).dictionary;if(a){var n=a[I];if(n)return n}e=c.localeRegistry}var o=S.split("-")[0];if(o===S)break;S=o}return I}}),Ec=Dt((Q,Z)=>{Z.exports=function(c){for(var g={},I=[],S=0,t=0;t{Z.exports=function(S){for(var t=I(S)?g:c,e=[],r=0;r{Z.exports=function(c,g){if(!g)return c;var I=1/Math.abs(g),S=I>1?(I*c+I*g)/I:c+g,t=String(S).length;if(t>16){var e=String(g).length,r=String(c).length;if(t>=r+e){var a=parseFloat(S).toPrecision(12);a.indexOf("e+")===-1&&(S=+a)}}return S}}),hv=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Z.exports=function(S){return typeof S=="string"&&(S=S.replace(I,"")),c(S)?Number(S):g}}),kn=Dt((Q,Z)=>{var c=qr(),g=Fi().utcFormat,I=Pi().format,S=Yi(),t=Ca(),e=t.FP_SAFE,r=-e,a=t.BADNUM,n=Z.exports={};n.adjustFormat=function(it){return!it||/^\d[.]\df/.test(it)||/[.]\d%/.test(it)?it:it==="0.f"?"~f":/^\d%/.test(it)?"~%":/^\ds/.test(it)?"~s":!/^[~,.0$]/.test(it)&&/[&fps]/.test(it)?"~"+it:it};var o={};n.warnBadFormat=function(it){var Y=String(it);o[Y]||(o[Y]=1,n.warn('encountered bad format: "'+Y+'"'))},n.noFormat=function(it){return String(it)},n.numberFormat=function(it){var Y;try{Y=I(n.adjustFormat(it))}catch{return n.warnBadFormat(it),n.noFormat}return Y},n.nestedProperty=zo(),n.keyedContainer=ho(),n.relativeAttr=mo(),n.isPlainObject=si(),n.toLogRange=Ts(),n.relinkPrivateKeys=xl();var i=Ma();n.isArrayBuffer=i.isArrayBuffer,n.isTypedArray=i.isTypedArray,n.isArrayOrTypedArray=i.isArrayOrTypedArray,n.isArray1D=i.isArray1D,n.ensureArray=i.ensureArray,n.concat=i.concat,n.maxRowLength=i.maxRowLength,n.minRowLength=i.minRowLength;var l=ko();n.mod=l.mod,n.modHalf=l.modHalf;var f=To();n.valObjectMeta=f.valObjectMeta,n.coerce=f.coerce,n.coerce2=f.coerce2,n.coerceFont=f.coerceFont,n.coercePattern=f.coercePattern,n.coerceHoverinfo=f.coerceHoverinfo,n.coerceSelectionMarkerOpacity=f.coerceSelectionMarkerOpacity,n.validate=f.validate;var x=d6();n.dateTime2ms=x.dateTime2ms,n.isDateTime=x.isDateTime,n.ms2DateTime=x.ms2DateTime,n.ms2DateTimeLocal=x.ms2DateTimeLocal,n.cleanDate=x.cleanDate,n.isJSDate=x.isJSDate,n.formatDate=x.formatDate,n.incrementMonth=x.incrementMonth,n.dateTick0=x.dateTick0,n.dfltRange=x.dfltRange,n.findExactDates=x.findExactDates,n.MIN_MS=x.MIN_MS,n.MAX_MS=x.MAX_MS;var y=E_();n.findBin=y.findBin,n.sorterAsc=y.sorterAsc,n.sorterDes=y.sorterDes,n.distinctVals=y.distinctVals,n.roundUp=y.roundUp,n.sort=y.sort,n.findIndexOfMin=y.findIndexOfMin,n.sortObjectKeys=G0();var v=p6();n.aggNums=v.aggNums,n.len=v.len,n.mean=v.mean,n.geometricMean=v.geometricMean,n.median=v.median,n.midRange=v.midRange,n.variance=v.variance,n.stdev=v.stdev,n.interp=v.interp;var T=M_();n.init2dArray=T.init2dArray,n.transposeRagged=T.transposeRagged,n.dot=T.dot,n.translationMatrix=T.translationMatrix,n.rotationMatrix=T.rotationMatrix,n.rotationXYMatrix=T.rotationXYMatrix,n.apply3DTransform=T.apply3DTransform,n.apply2DTransform=T.apply2DTransform,n.apply2DTransform2=T.apply2DTransform2,n.convertCssMatrix=T.convertCssMatrix,n.inverseTransformMatrix=T.inverseTransformMatrix;var u=m6();n.deg2rad=u.deg2rad,n.rad2deg=u.rad2deg,n.angleDelta=u.angleDelta,n.angleDist=u.angleDist,n.isFullCircle=u.isFullCircle,n.isAngleInsideSector=u.isAngleInsideSector,n.isPtInsideSector=u.isPtInsideSector,n.pathArc=u.pathArc,n.pathSector=u.pathSector,n.pathAnnulus=u.pathAnnulus;var b=g6();n.isLeftAnchor=b.isLeftAnchor,n.isCenterAnchor=b.isCenterAnchor,n.isRightAnchor=b.isRightAnchor,n.isTopAnchor=b.isTopAnchor,n.isMiddleAnchor=b.isMiddleAnchor,n.isBottomAnchor=b.isBottomAnchor;var _=v6();n.segmentsIntersect=_.segmentsIntersect,n.segmentDistance=_.segmentDistance,n.getTextLocation=_.getTextLocation,n.clearLocationCache=_.clearLocationCache,n.getVisibleSegment=_.getVisibleSegment,n.findPointOnPath=_.findPointOnPath;var P=Ia();n.extendFlat=P.extendFlat,n.extendDeep=P.extendDeep,n.extendDeepAll=P.extendDeepAll,n.extendDeepNoArrays=P.extendDeepNoArrays;var M=as();n.log=M.log,n.warn=M.warn,n.error=M.error;var C=Mo();n.counterRegex=C.counter;var A=C_();n.throttle=A.throttle,n.throttleDone=A.done,n.clearThrottle=A.clear;var h=r0();n.getGraphDiv=h.getGraphDiv,n.isPlotDiv=h.isPlotDiv,n.removeElement=h.removeElement,n.addStyleRule=h.addStyleRule,n.addRelatedStyleRule=h.addRelatedStyleRule,n.deleteRelatedStyleRule=h.deleteRelatedStyleRule,n.setStyleOnHover=h.setStyleOnHover,n.getFullTransformMatrix=h.getFullTransformMatrix,n.getElementTransformMatrix=h.getElementTransformMatrix,n.getElementAndAncestors=h.getElementAndAncestors,n.equalDomRects=h.equalDomRects,n.clearResponsive=L_(),n.preserveDrawingBuffer=vw(),n.makeTraceGroups=yw(),n._=T1(),n.notifier=bs(),n.filterUnique=Ec(),n.filterVisible=Tf(),n.pushUnique=Ol(),n.increment=By(),n.cleanNumber=hv(),n.ensureNumber=function(it){return S(it)?(it=Number(it),it>e||it=Y?!1:S(it)&&it>=0&&it%1===0},n.noop=Yo(),n.identity=w1(),n.repeat=function(it,Y){for(var ft=new Array(Y),ut=0;utft?Math.max(ft,Math.min(Y,it)):Math.max(Y,Math.min(ft,it))},n.bBoxIntersect=function(it,Y,ft){return ft=ft||0,it.left<=Y.right+ft&&Y.left<=it.right+ft&&it.top<=Y.bottom+ft&&Y.top<=it.bottom+ft},n.simpleMap=function(it,Y,ft,ut,kt){for(var It=it.length,Pt=new Array(It),qt=0;qt=Math.pow(2,ft)?kt>10?(n.warn("randstr failed uniqueness"),Pt):it(Y,ft,ut,(kt||0)+1):Pt},n.OptionControl=function(it,Y){it||(it={}),Y||(Y="opt");var ft={};return ft.optionList=[],ft._newoption=function(ut){ut[Y]=it,ft[ut.name]=ut,ft.optionList.push(ut)},ft["_"+Y]=it,ft},n.smooth=function(it,Y){if(Y=Math.round(Y)||0,Y<2)return it;var ft=it.length,ut=2*ft,kt=2*Y-1,It=new Array(kt),Pt=new Array(ft),qt,Wt,Jt,ge;for(qt=0;qt=ut&&(Jt-=ut*Math.floor(Jt/ut)),Jt<0?Jt=-1-Jt:Jt>=ft&&(Jt=ut-1-Jt),ge+=it[Jt]*It[Wt];Pt[qt]=ge}return Pt},n.syncOrAsync=function(it,Y,ft){var ut,kt;function It(){return n.syncOrAsync(it,Y,ft)}for(;it.length;)if(kt=it.splice(0,1)[0],ut=kt(Y),ut&&ut.then)return ut.then(It);return ft&&ft(Y)},n.stripTrailingSlash=function(it){return it.substr(-1)==="/"?it.substr(0,it.length-1):it},n.noneOrAll=function(it,Y,ft){if(it){var ut=!1,kt=!0,It,Pt;for(It=0;It0?kt:0})},n.fillArray=function(it,Y,ft,ut){if(ut=ut||n.identity,n.isArrayOrTypedArray(it))for(var kt=0;ktO.test(window.navigator.userAgent);var j=/Firefox\/(\d+)\.\d+/;n.getFirefoxVersion=function(){var it=j.exec(window.navigator.userAgent);if(it&&it.length===2){var Y=parseInt(it[1]);if(!isNaN(Y))return Y}return null},n.isD3Selection=function(it){return it instanceof c.selection},n.ensureSingle=function(it,Y,ft,ut){var kt=it.select(Y+(ft?"."+ft:""));if(kt.size())return kt;var It=it.append(Y);return ft&&It.classed(ft,!0),ut&&It.call(ut),It},n.ensureSingleById=function(it,Y,ft,ut){var kt=it.select(Y+"#"+ft);if(kt.size())return kt;var It=it.append(Y).attr("id",ft);return ut&&It.call(ut),It},n.objectFromPath=function(it,Y){for(var ft=it.split("."),ut,kt=ut={},It=0;It1?kt+Pt[1]:"";if(It&&(Pt.length>1||qt.length>4||ft))for(;ut.test(qt);)qt=qt.replace(ut,"$1"+It+"$2");return qt+Wt},n.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var U=/^\w*$/;n.templateString=function(it,Y){var ft={};return it.replace(n.TEMPLATE_STRING_REGEX,function(ut,kt){var It;return U.test(kt)?It=Y[kt]:(ft[kt]=ft[kt]||n.nestedProperty(Y,kt).get,It=ft[kt](!0)),It!==void 0?It:""})};var W={max:10,count:0,name:"hovertemplate"};n.hovertemplateString=it=>st(Tr(Mr({},it),{opts:W}));var q={max:10,count:0,name:"texttemplate"};n.texttemplateString=it=>st(Tr(Mr({},it),{opts:q}));var J=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function lt(it){var Y=it.match(J);return Y?{key:Y[1],op:Y[2],number:Number(Y[3])}:{key:it,op:null,number:null}}var yt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};n.texttemplateStringForShapes=it=>st(Tr(Mr({},it),{opts:yt}));var mt=/^[:|\|]/;function st({data:it=[],locale:Y,fallback:ft,labels:ut={},opts:kt,template:It}){return It.replace(n.TEMPLATE_STRING_REGEX,(Pt,qt,Wt)=>{let Jt=["xother","yother"].includes(qt),ge=["_xother","_yother"].includes(qt),fe=["_xother_","_yother_"].includes(qt),pe=["xother_","yother_"].includes(qt),se=Jt||ge||pe||fe;(ge||fe)&&(qt=qt.substring(1)),(pe||fe)&&(qt=qt.substring(0,qt.length-1));let Tt=null,Lt=null;if(kt.parseMultDiv){var Mt=lt(qt);qt=Mt.key,Tt=Mt.op,Lt=Mt.number}let ee;if(se){if(ut[qt]===void 0)return"";ee=ut[qt]}else for(let He of it)if(He){if(He.hasOwnProperty(qt)){ee=He[qt];break}if(U.test(qt)||(ee=n.nestedProperty(He,qt).get(!0)),ee!==void 0)break}if(ee===void 0){let{count:He,max:Ge,name:cr}=kt,ur=ft===!1?Pt:ft;return He=tt&&Pt<=dt,Jt=qt>=tt&&qt<=dt;if(Wt&&(ut=10*ut+Pt-tt),Jt&&(kt=10*kt+qt-tt),!Wt||!Jt){if(ut!==kt)return ut-kt;if(Pt!==qt)return Pt-qt}}return kt-ut};var rt=2e9;n.seedPseudoRandom=function(){rt=2e9},n.pseudoRandom=function(){var it=rt;return rt=(69069*rt+1)%4294967296,Math.abs(rt-it)<429496729?n.pseudoRandom():rt/4294967296},n.fillText=function(it,Y,ft){var ut=Array.isArray(ft)?function(Pt){ft.push(Pt)}:function(Pt){ft.text=Pt},kt=n.extractOption(it,Y,"htx","hovertext");if(n.isValidTextValue(kt))return ut(kt);var It=n.extractOption(it,Y,"tx","text");if(n.isValidTextValue(It))return ut(It)},n.isValidTextValue=function(it){return it||it===0},n.formatPercent=function(it,Y){Y=Y||0;for(var ft=(Math.round(100*it*Math.pow(10,Y))*Math.pow(.1,Y)).toFixed(Y)+"%",ut=0;ut1&&(Jt=1):Jt=0,n.strTranslate(kt-Jt*(ft+Pt),It-Jt*(ut+qt))+n.strScale(Jt)+(Wt?"rotate("+Wt+(Y?"":" "+ft+" "+ut)+")":"")},n.setTransormAndDisplay=function(it,Y){it.attr("transform",n.getTextTransform(Y)),it.style("display",Y.scale?null:"none")},n.ensureUniformFontSize=function(it,Y){var ft=n.extendFlat({},Y);return ft.size=Math.max(Y.size,it._fullLayout.uniformtext.minsize||0),ft},n.join2=function(it,Y,ft){var ut=it.length;return ut>1?it.slice(0,-1).join(Y)+ft+it[ut-1]:it.join(Y)},n.bigFont=function(it){return Math.round(1.2*it)};var at=n.getFirefoxVersion(),vt=at!==null&&at<86;n.getPositionFromD3Event=function(){return vt?[c.event.layerX,c.event.layerY]:[c.event.offsetX,c.event.offsetY]}}),P_=Dt(()=>{var Q=kn(),Z={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(g in Z)c=g.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Q.addStyleRule(c,Z[g]);var c,g}),Wu=Dt((Q,Z)=>{Z.exports=!0}),Ff=Dt((Q,Z)=>{var c=Wu(),g;typeof window.matchMedia=="function"?g=!window.matchMedia("(hover: none)").matches:g=c,Z.exports=g}),Rm=Dt((Q,Z)=>{var c=typeof Reflect=="object"?Reflect:null,g=c&&typeof c.apply=="function"?c.apply:function(P,M,C){return Function.prototype.apply.call(P,M,C)},I;c&&typeof c.ownKeys=="function"?I=c.ownKeys:Object.getOwnPropertySymbols?I=function(P){return Object.getOwnPropertyNames(P).concat(Object.getOwnPropertySymbols(P))}:I=function(P){return Object.getOwnPropertyNames(P)};function S(P){console&&console.warn&&console.warn(P)}var t=Number.isNaN||function(P){return P!==P};function e(){e.init.call(this)}Z.exports=e,Z.exports.once=u,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var r=10;function a(P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(P){if(typeof P!="number"||P<0||t(P))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+P+".");r=P}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(P){if(typeof P!="number"||P<0||t(P))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+P+".");return this._maxListeners=P,this};function n(P){return P._maxListeners===void 0?e.defaultMaxListeners:P._maxListeners}e.prototype.getMaxListeners=function(){return n(this)},e.prototype.emit=function(P){for(var M=[],C=1;C0&&(p=M[0]),p instanceof Error)throw p;var k=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw k.context=p,k}var w=h[P];if(w===void 0)return!1;if(typeof w=="function")g(w,this,M);else for(var R=w.length,O=y(w,R),C=0;C0&&k.length>h&&!k.warned){k.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=P,w.type=M,w.count=k.length,S(w)}return P}e.prototype.addListener=function(P,M){return o(this,P,M,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(P,M){return o(this,P,M,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(P,M,C){var A={fired:!1,wrapFn:void 0,target:P,type:M,listener:C},h=i.bind(A);return h.listener=C,A.wrapFn=h,h}e.prototype.once=function(P,M){return a(M),this.on(P,l(this,P,M)),this},e.prototype.prependOnceListener=function(P,M){return a(M),this.prependListener(P,l(this,P,M)),this},e.prototype.removeListener=function(P,M){var C,A,h,p,k;if(a(M),A=this._events,A===void 0)return this;if(C=A[P],C===void 0)return this;if(C===M||C.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete A[P],A.removeListener&&this.emit("removeListener",P,C.listener||M));else if(typeof C!="function"){for(h=-1,p=C.length-1;p>=0;p--)if(C[p]===M||C[p].listener===M){k=C[p].listener,h=p;break}if(h<0)return this;h===0?C.shift():v(C,h),C.length===1&&(A[P]=C[0]),A.removeListener!==void 0&&this.emit("removeListener",P,k||M)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(P){var M,C,A;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[P]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[P]),this;if(arguments.length===0){var h=Object.keys(C),p;for(A=0;A=0;A--)this.removeListener(P,M[A]);return this};function f(P,M,C){var A=P._events;if(A===void 0)return[];var h=A[M];return h===void 0?[]:typeof h=="function"?C?[h.listener||h]:[h]:C?T(h):y(h,h.length)}e.prototype.listeners=function(P){return f(this,P,!0)},e.prototype.rawListeners=function(P){return f(this,P,!1)},e.listenerCount=function(P,M){return typeof P.listenerCount=="function"?P.listenerCount(M):x.call(P,M)},e.prototype.listenerCount=x;function x(P){var M=this._events;if(M!==void 0){var C=M[P];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};function y(P,M){for(var C=new Array(M),A=0;A{var c=Rm().EventEmitter,g={init:function(I){if(I._ev instanceof c)return I;var S=new c,t=new c;return I._ev=S,I._internalEv=t,I.on=S.on.bind(S),I.once=S.once.bind(S),I.removeListener=S.removeListener.bind(S),I.removeAllListeners=S.removeAllListeners.bind(S),I._internalOn=t.on.bind(t),I._internalOnce=t.once.bind(t),I._removeInternalListener=t.removeListener.bind(t),I._removeAllInternalListeners=t.removeAllListeners.bind(t),I.emit=function(e,r){S.emit(e,r),t.emit(e,r)},typeof I.addEventListener=="function"&&I.addEventListener("wheel",()=>{},{passive:!0}),I},triggerHandler:function(I,S,t){var e,r=I._ev;if(!r)return;var a=r._events[S];if(!a)return;function n(i){if(i.listener){if(r.removeListener(S,i.listener),!i.fired)return i.fired=!0,i.listener.apply(r,[t])}else return i.apply(r,[t])}a=Array.isArray(a)?a:[a];var o;for(o=0;o{var c=kn(),g=ms().dfltConfig;function I(t,e){for(var r=[],a,n=0;ng.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},S.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},S.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},S.undo=function(t){var e,r;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r{Z.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}),Nm=Dt(Q=>{var Z=Jo(),c=kn(),g=Ho(),I=b1(),S=xw(),t=El(),e=ms().configAttributes,r=Yc(),a=c.extendDeepAll,n=c.isPlainObject,o=c.isArrayOrTypedArray,i=c.nestedProperty,l=c.valObjectMeta,f="_isSubplotObj",x="_isLinkedToArray",y="_arrayAttrRegexps",v="_deprecated",T=[f,x,y,v];Q.IS_SUBPLOT_OBJ=f,Q.IS_LINKED_TO_ARRAY=x,Q.DEPRECATED=v,Q.UNDERSCORE_ATTRS=T,Q.get=function(){var O={};return Z.allTypes.forEach(function(j){O[j]=P(j)}),{defs:{valObjects:l,metaKeys:T.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:O,layout:M(),frames:C(),animation:A(t),config:A(e)}},Q.crawl=function(O,j,V,H){var F=V||0;H=H||"",Object.keys(O).forEach(function(U){var W=O[U];if(T.indexOf(U)===-1){var q=(H?H+".":"")+U;j(W,U,O,F,q),!Q.isValObject(W)&&n(W)&&U!=="impliedEdits"&&Q.crawl(W,j,F+1,q)}})},Q.isValObject=function(O){return O&&O.valType!==void 0},Q.findArrayAttributes=function(O){var j=[],V=[],H=[],F,U;function W(J,lt,yt,mt){V=V.slice(0,mt).concat([lt]),H=H.slice(0,mt).concat([J&&J._isLinkedToArray]);var st=J&&(J.valType==="data_array"||J.arrayOk===!0)&&!(V[mt-1]==="colorbar"&&(lt==="ticktext"||lt==="tickvals"));st&&q(F,0,"")}function q(J,lt,yt){var mt=J[V[lt]],st=yt+V[lt];if(lt===V.length-1)o(mt)&&j.push(U+st);else if(H[lt]){if(Array.isArray(mt))for(var tt=0;tt=U.length)return!1;if(O.dimensions===2){if(V++,j.length===V)return O;var W=j[V];if(!_(W))return!1;O=U[F][W]}else O=U[F]}else O=U}}return O}function _(O){return O===Math.round(O)&&O>=0}function P(O){var j,V;j=Z.modules[O]._module,V=j.basePlotModule;var H={};H.type=null;var F=a({},g),U=a({},j.attributes);Q.crawl(U,function(J,lt,yt,mt,st){i(F,st).set(void 0),J===void 0&&i(U,st).set(void 0)}),a(H,F),Z.traceIs(O,"noOpacity")&&delete H.opacity,Z.traceIs(O,"showLegend")||(delete H.showlegend,delete H.legendgroup),Z.traceIs(O,"noHover")&&(delete H.hoverinfo,delete H.hoverlabel),j.selectPoints||delete H.selectedpoints,a(H,U),V.attributes&&a(H,V.attributes),H.type=O;var W={meta:j.meta||{},categories:j.categories||{},animatable:!!j.animatable,type:O,attributes:A(H)};if(j.layoutAttributes){var q={};a(q,j.layoutAttributes),W.layoutAttributes=A(q)}return j.animatable||Q.crawl(W,function(J){Q.isValObject(J)&&"anim"in J&&delete J.anim}),W}function M(){var O={},j,V;a(O,I);for(j in Z.subplotsRegistry)if(V=Z.subplotsRegistry[j],!!V.layoutAttributes)if(Array.isArray(V.attr))for(var H=0;H{var Z=kn(),c=Ho(),g="templateitemname",I={name:{valType:"string",editType:"none"}};I[g]={valType:"string",editType:"calc"},Q.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=I.name,r[g]=I[g],r},Q.traceTemplater=function(e){var r={},a,n;for(a in e)n=e[a],Array.isArray(n)&&n.length&&(r[a]=0);function o(i){a=Z.coerce(i,{},c,"type");var l={type:a,_template:null};if(a in r){n=e[a];var f=r[a]%n.length;r[a]++,l._template=n[f]}return l}return{newTrace:o}},Q.newContainer=function(e,r,a){var n=e._template,o=n&&(n[r]||a&&n[a]);Z.isPlainObject(o)||(o=null);var i=e[r]={_template:o};return i},Q.arrayTemplater=function(e,r,a){var n=e._template,o=n&&n[t(r)],i=n&&n[r];(!Array.isArray(i)||!i.length)&&(i=[]);var l={};function f(y){var v={name:y.name,_input:y},T=v[g]=y[g];if(!S(T))return v._template=o,v;for(var u=0;u=n&&(a._input||{})._templateitemname;i&&(o=n);var l=r+"["+o+"]",f;function x(){f={},i&&(f[l]={},f[l][g]=i)}x();function y(b,_){f[b]=_}function v(b,_){i?Z.nestedProperty(f[l],b).set(_):f[l+"."+b]=_}function T(){var b=f;return x(),b}function u(b,_){b&&v(b,_);var P=T();for(var M in P)Z.nestedProperty(e,M).set(P[M])}return{modifyBase:y,modifyItem:v,getUpdateObj:T,applyUpdate:u}}}),ic=Dt((Q,Z)=>{var c=Mo().counter;Z.exports={idRegex:{x:c("x","( domain)?"),y:c("y","( domain)?")},attrRegex:c("[xy]axis"),xAxisMatch:c("xaxis"),yAxisMatch:c("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}),Rc=Dt(Q=>{var Z=Jo(),c=ic();Q.id2name=function(I){if(!(typeof I!="string"||!I.match(c.AX_ID_PATTERN))){var S=I.split(" ")[0].substr(1);return S==="1"&&(S=""),I.charAt(0)+"axis"+S}},Q.name2id=function(I){if(I.match(c.AX_NAME_PATTERN)){var S=I.substr(5);return S==="1"&&(S=""),I.charAt(0)+S}},Q.cleanId=function(I,S,t){var e=/( domain)$/.test(I);if(!(typeof I!="string"||!I.match(c.AX_ID_PATTERN))&&!(S&&I.charAt(0)!==S)&&!(e&&!t)){var r=I.split(" ")[0].substr(1).replace(/^0+/,"");return r==="1"&&(r=""),I.charAt(0)+r+(e&&t?" domain":"")}},Q.list=function(I,S,t){var e=I._fullLayout;if(!e)return[];var r=Q.listIds(I,S),a=new Array(r.length),n;for(n=0;ne?1:-1:+(I.substr(1)||1)-+(S.substr(1)||1)},Q.ref2id=function(I){return/^[xyz]/.test(I)?I.split(" ")[0]:!1};function g(I,S){if(S&&S.length){for(var t=0;t{function c(I){var S=I._fullLayout._zoomlayer;S&&S.selectAll(".outline-controllers").remove()}function g(I){var S=I._fullLayout._zoomlayer;S&&S.selectAll(".select-outline").remove(),I._fullLayout._outlining=!1}Z.exports={clearOutlineControllers:c,clearOutline:g}}),vg=Dt((Q,Z)=>{Z.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}),ud=Dt(Q=>{var Z=Jo();ic().SUBPLOT_PATTERN,Q.getSubplotCalcData=function(c,g,I){var S=Z.subplotsRegistry[g];if(!S)return[];for(var t=S.attr,e=[],r=0;r{var Z=Jo(),c=kn();Q.manageCommandObserver=function(r,a,n,o){var i={},l=!0;a&&a._commandObserver&&(i=a._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var f=Q.hasSimpleAPICommandBindings(r,n,i.lookupTable);if(a&&a._commandObserver){if(f)return i;if(a._commandObserver.remove)return a._commandObserver.remove(),a._commandObserver=null,i}if(f){g(r,f,i.cache),i.check=function(){if(l){var v=g(r,f,i.cache);return v.changed&&o&&i.lookupTable[v.value]!==void 0&&(i.disable(),Promise.resolve(o({value:v.value,type:f.type,prop:f.prop,traces:f.traces,index:i.lookupTable[v.value]})).then(i.enable,i.enable)),v.changed}};for(var x=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],y=0;y0?".":"")+i;c.isPlainObject(l)?e(l,a,f,o+1):a(f,i,l)}})}}),Kc=Dt((Q,Z)=>{var c=qr(),g=Fi().timeFormatLocale,I=Pi().formatLocale,S=Yi(),t=Ni(),e=Jo(),r=Nm(),a=mu(),n=kn(),o=hi(),i=Ca().BADNUM,l=Rc(),f=C0().clearOutline,x=vg(),y=El(),v=xw(),T=ud().getModuleCalcData,u=n.relinkPrivateKeys,b=n._,_=Z.exports={};n.extendFlat(_,e),_.attributes=Ho(),_.attributes.type.values=_.allTypes,_.fontAttrs=da(),_.layoutAttributes=b1();var P=A1();_.executeAPICommand=P.executeAPICommand,_.computeAPICommandBindings=P.computeAPICommandBindings,_.manageCommandObserver=P.manageCommandObserver,_.hasSimpleAPICommandBindings=P.hasSimpleAPICommandBindings,_.redrawText=function(tt){return tt=n.getGraphDiv(tt),new Promise(function(dt){setTimeout(function(){tt._fullLayout&&(e.getComponentMethod("annotations","draw")(tt),e.getComponentMethod("legend","draw")(tt),e.getComponentMethod("colorbar","draw")(tt),dt(_.previousPromises(tt)))},300)})},_.resize=function(tt){tt=n.getGraphDiv(tt);var dt,rt=new Promise(function(at,vt){(!tt||n.isHidden(tt))&&vt(new Error("Resize must be passed a displayed plot div element.")),tt._redrawTimer&&clearTimeout(tt._redrawTimer),tt._resolveResize&&(dt=tt._resolveResize),tt._resolveResize=at,tt._redrawTimer=setTimeout(function(){if(!tt.layout||tt.layout.width&&tt.layout.height||n.isHidden(tt)){at(tt);return}delete tt.layout.width,delete tt.layout.height;var it=tt.changed;tt.autoplay=!0,e.call("relayout",tt,{autosize:!0}).then(function(){tt.changed=it,tt._resolveResize===at&&(delete tt._resolveResize,at(tt))})},100)});return dt&&dt(rt),rt},_.previousPromises=function(tt){if((tt._promises||[]).length)return Promise.all(tt._promises).then(function(){tt._promises=[]})},_.addLinks=function(tt){if(!(!tt._context.showLink&&!tt._context.showSources)){var dt=tt._fullLayout,rt=n.ensureSingle(dt._paper,"text","js-plot-link-container",function(ut){ut.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:o.defaultLine,"pointer-events":"all"}).each(function(){var kt=c.select(this);kt.append("tspan").classed("js-link-to-tool",!0),kt.append("tspan").classed("js-link-spacer",!0),kt.append("tspan").classed("js-sourcelinks",!0)})}),at=rt.node(),vt={y:dt._paper.attr("height")-9};document.body.contains(at)&&at.getComputedTextLength()>=dt.width-20?(vt["text-anchor"]="start",vt.x=5):(vt["text-anchor"]="end",vt.x=dt._paper.attr("width")-7),rt.attr(vt);var it=rt.select(".js-link-to-tool"),Y=rt.select(".js-link-spacer"),ft=rt.select(".js-sourcelinks");tt._context.showSources&&tt._context.showSources(tt),tt._context.showLink&&M(tt,it),Y.text(it.text()&&ft.text()?" - ":"")}};function M(tt,dt){dt.text("");var rt=dt.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(tt._context.linkText+" »");if(tt._context.sendData)rt.on("click",function(){_.sendDataToCloud(tt)});else{var at=window.location.pathname.split("/"),vt=window.location.search;rt.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+at[2].split(".")[0]+"/"+at[1]+vt})}}_.sendDataToCloud=function(tt){var dt=(window.PLOTLYENV||{}).BASE_URL||tt._context.plotlyServerURL;if(dt){tt.emit("plotly_beforeexport");var rt=c.select(tt).append("div").attr("id","hiddenform").style("display","none"),at=rt.append("form").attr({action:dt+"/external",method:"post",target:"_blank"}),vt=at.append("input").attr({type:"text",name:"data"});return vt.node().value=_.graphJson(tt,!1,"keepdata"),at.node().submit(),rt.remove(),tt.emit("plotly_afterexport"),!1}};var C=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];_.supplyDefaults=function(tt,dt){var rt=dt&&dt.skipUpdateCalc,at=tt._fullLayout||{};if(at._skipDefaults){delete at._skipDefaults;return}var vt=tt._fullLayout={},it=tt.layout||{},Y=tt._fullData||[],ft=tt._fullData=[],ut=tt.data||[],kt=tt.calcdata||[],It=tt._context||{},Pt;tt._transitionData||_.createTransitionData(tt),vt._dfltTitle={plot:b(tt,"Click to enter Plot title"),subtitle:b(tt,"Click to enter Plot subtitle"),x:b(tt,"Click to enter X axis title"),y:b(tt,"Click to enter Y axis title"),colorbar:b(tt,"Click to enter Colorscale title"),annotation:b(tt,"new text")},vt._traceWord=b(tt,"trace");var qt=k(tt,C);if(vt._mapboxAccessToken=It.mapboxAccessToken,at._initialAutoSizeIsDone){var Wt=at.width,Jt=at.height;_.supplyLayoutGlobalDefaults(it,vt,qt),it.width||(vt.width=Wt),it.height||(vt.height=Jt),_.sanitizeMargins(vt)}else{_.supplyLayoutGlobalDefaults(it,vt,qt);var ge=!it.width||!it.height,fe=vt.autosize,pe=It.autosizable,se=ge&&(fe||pe);se?_.plotAutoSize(tt,it,vt):ge&&_.sanitizeMargins(vt),!fe&&ge&&(it.width=vt.width,it.height=vt.height)}vt._d3locale=w(qt,vt.separators),vt._extraFormat=k(tt,A),vt._initialAutoSizeIsDone=!0,vt._dataLength=ut.length,vt._modules=[],vt._visibleModules=[],vt._basePlotModules=[];var Tt=vt._subplots=p(),Lt=vt._splomAxes={x:{},y:{}},Mt=vt._splomSubplots={};vt._splomGridDflt={},vt._scatterStackOpts={},vt._firstScatter={},vt._alignmentOpts={},vt._colorAxes={},vt._requestRangeslider={},vt._traceUids=h(Y,ut),_.supplyDataDefaults(ut,ft,it,vt);var ee=Object.keys(Lt.x),ve=Object.keys(Lt.y);if(ee.length>1&&ve.length>1){for(e.getComponentMethod("grid","sizeDefaults")(it,vt),Pt=0;Pt15&&ve.length>15&&vt.shapes.length===0&&vt.images.length===0,_.linkSubplots(ft,vt,Y,at),_.cleanPlot(ft,vt,Y,at);var cr=!!(at._has&&at._has("cartesian")),ur=!!(vt._has&&vt._has("cartesian")),jr=cr,Wr=ur;jr&&!Wr?at._bgLayer.remove():Wr&&!jr&&(vt._shouldCreateBgLayer=!0),at._zoomlayer&&!tt._dragging&&f({_fullLayout:at}),R(ft,vt),u(vt,at),e.getComponentMethod("colorscale","crossTraceDefaults")(ft,vt),vt._preGUI||(vt._preGUI={}),vt._tracePreGUI||(vt._tracePreGUI={});var br=vt._tracePreGUI,Xr={},nn;for(nn in br)Xr[nn]="old";for(Pt=0;Pt0){var kt=1-2*vt;it=Math.round(kt*it),Y=Math.round(kt*Y)}}var It=_.layoutAttributes.width.min,Pt=_.layoutAttributes.height.min;it1,Wt=!dt.height&&Math.abs(rt.height-Y)>1;(Wt||qt)&&(qt&&(rt.width=it),Wt&&(rt.height=Y)),tt._initialAutoSize||(tt._initialAutoSize={width:it,height:Y}),_.sanitizeMargins(rt)},_.supplyLayoutModuleDefaults=function(tt,dt,rt,at){var vt=e.componentsRegistry,it=dt._basePlotModules,Y,ft,ut,kt=e.subplotsRegistry.cartesian;for(Y in vt)ut=vt[Y],ut.includeBasePlot&&ut.includeBasePlot(tt,dt);it.length||it.push(kt),dt._has("cartesian")&&(e.getComponentMethod("grid","contentDefaults")(tt,dt),kt.finalizeSubplots(tt,dt));for(var It in dt._subplots)dt._subplots[It].sort(n.subplotSort);for(ft=0;ft1&&(rt.l/=fe,rt.r/=fe)}if(qt){var pe=(rt.t+rt.b)/qt;pe>1&&(rt.t/=pe,rt.b/=pe)}var se=rt.xl!==void 0?rt.xl:rt.x,Tt=rt.xr!==void 0?rt.xr:rt.x,Lt=rt.yt!==void 0?rt.yt:rt.y,Mt=rt.yb!==void 0?rt.yb:rt.y;Wt[dt]={l:{val:se,size:rt.l+ge},r:{val:Tt,size:rt.r+ge},b:{val:Mt,size:rt.b+ge},t:{val:Lt,size:rt.t+ge}},Jt[dt]=1}if(!at._replotting)return _.doAutoMargin(tt)}};function U(tt){if("_redrawFromAutoMarginCount"in tt._fullLayout)return!1;var dt=l.list(tt,"",!0);for(var rt in dt)if(dt[rt].autoshift||dt[rt].shift)return!0;return!1}_.doAutoMargin=function(tt){var dt=tt._fullLayout,rt=dt.width,at=dt.height;dt._size||(dt._size={}),V(dt);var vt=dt._size,it=dt.margin,Y={t:0,b:0,l:0,r:0},ft=n.extendFlat({},vt),ut=it.l,kt=it.r,It=it.t,Pt=it.b,qt=dt._pushmargin,Wt=dt._pushmarginIds,Jt=dt.minreducedwidth,ge=dt.minreducedheight;if(it.autoexpand!==!1){for(var fe in qt)Wt[fe]||delete qt[fe];var pe=tt._fullLayout._reservedMargin;for(var se in pe)for(var Tt in pe[se]){var Lt=pe[se][Tt];Y[Tt]=Math.max(Y[Tt],Lt)}qt.base={l:{val:0,size:ut},r:{val:1,size:kt},t:{val:1,size:It},b:{val:0,size:Pt}};for(var Mt in Y){var ee=0;for(var ve in qt)ve!=="base"&&S(qt[ve][Mt].size)&&(ee=qt[ve][Mt].size>ee?qt[ve][Mt].size:ee);var oe=Math.max(0,it[Mt]-ee);Y[Mt]=Math.max(0,Y[Mt]-oe)}for(var Te in qt){var He=qt[Te].l||{},Ge=qt[Te].b||{},cr=He.val,ur=He.size,jr=Ge.val,Wr=Ge.size,br=rt-Y.r-Y.l,Xr=at-Y.t-Y.b;for(var nn in qt){if(S(ur)&&qt[nn].r){var Le=qt[nn].r.val,Gt=qt[nn].r.size;if(Le>cr){var ne=(ur*Le+(Gt-br)*cr)/(Le-cr),Ct=(Gt*(1-cr)+(ur-br)*(1-Le))/(Le-cr);ne+Ct>ut+kt&&(ut=ne,kt=Ct)}}if(S(Wr)&&qt[nn].t){var gt=qt[nn].t.val,St=qt[nn].t.size;if(gt>jr){var Nt=(Wr*gt+(St-Xr)*jr)/(gt-jr),re=(St*(1-jr)+(Wr-Xr)*(1-gt))/(gt-jr);Nt+re>Pt+It&&(Pt=Nt,It=re)}}}}}var le=n.constrain(rt-it.l-it.r,H,Jt),we=n.constrain(at-it.t-it.b,F,ge),Ue=Math.max(0,rt-le),qe=Math.max(0,at-we);if(Ue){var or=(ut+kt)/Ue;or>1&&(ut/=or,kt/=or)}if(qe){var Sr=(Pt+It)/qe;Sr>1&&(Pt/=Sr,It/=Sr)}if(vt.l=Math.round(ut)+Y.l,vt.r=Math.round(kt)+Y.r,vt.t=Math.round(It)+Y.t,vt.b=Math.round(Pt)+Y.b,vt.p=Math.round(it.pad),vt.w=Math.round(rt)-vt.l-vt.r,vt.h=Math.round(at)-vt.t-vt.b,!dt._replotting&&(_.didMarginChange(ft,vt)||U(tt))){"_redrawFromAutoMarginCount"in dt?dt._redrawFromAutoMarginCount++:dt._redrawFromAutoMarginCount=1;var Ar=3*(1+Object.keys(Wt).length);if(dt._redrawFromAutoMarginCount1)return!0}return!1},_.graphJson=function(tt,dt,rt,at,vt,it){(vt&&dt&&!tt._fullData||vt&&!dt&&!tt._fullLayout)&&_.supplyDefaults(tt);var Y=vt?tt._fullData:tt.data,ft=vt?tt._fullLayout:tt.layout,ut=(tt._transitionData||{})._frames;function kt(qt,Wt){if(typeof qt=="function")return Wt?"_function_":null;if(n.isPlainObject(qt)){var Jt={},ge;return Object.keys(qt).sort().forEach(function(Tt){if(["_","["].indexOf(Tt.charAt(0))===-1){if(typeof qt[Tt]=="function"){Wt&&(Jt[Tt]="_function");return}if(rt==="keepdata"){if(Tt.substr(Tt.length-3)==="src")return}else if(rt==="keepstream"){if(ge=qt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0&&!n.isPlainObject(qt.stream))return}else if(rt!=="keepall"&&(ge=qt[Tt+"src"],typeof ge=="string"&&ge.indexOf(":")>0))return;Jt[Tt]=kt(qt[Tt],Wt)}}),Jt}var fe=Array.isArray(qt),pe=n.isTypedArray(qt);if((fe||pe)&&qt.dtype&&qt.shape){var se=qt.bdata;return kt({dtype:qt.dtype,shape:qt.shape,bdata:n.isArrayBuffer(se)?t.encode(se):se},Wt)}return fe?qt.map(function(Tt){return kt(Tt,Wt)}):pe?n.simpleMap(qt,n.identity):n.isJSDate(qt)?n.ms2DateTimeLocal(+qt):qt}var It={data:(Y||[]).map(function(qt){var Wt=kt(qt);return dt&&delete Wt.fit,Wt})};if(!dt&&(It.layout=kt(ft),vt)){var Pt=ft._size;It.layout.computed={margin:{b:Pt.b,l:Pt.l,r:Pt.r,t:Pt.t}}}return ut&&(It.frames=kt(ut)),it&&(It.config=kt(tt._context,!0)),at==="object"?It:JSON.stringify(It)},_.modifyFrames=function(tt,dt){var rt,at,vt,it=tt._transitionData._frames,Y=tt._transitionData._frameHash;for(rt=0;rt0&&(tt._transitioningWithDuration=!0),tt._transitionData._interruptCallbacks.push(function(){at=!0}),rt.redraw&&tt._transitionData._interruptCallbacks.push(function(){return e.call("redraw",tt)}),tt._transitionData._interruptCallbacks.push(function(){tt.emit("plotly_transitioninterrupted",[])});var qt=0,Wt=0;function Jt(){return qt++,function(){Wt++,!at&&Wt===qt&&ft(Pt)}}rt.runFn(Jt),setTimeout(Jt())})}function ft(Pt){if(tt._transitionData)return it(tt._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(rt.redraw)return e.call("redraw",tt)}).then(function(){tt._transitioning=!1,tt._transitioningWithDuration=!1,tt.emit("plotly_transitioned",[])}).then(Pt)}function ut(){if(tt._transitionData)return tt._transitioning=!1,vt(tt._transitionData._interruptCallbacks)}var kt=[_.previousPromises,ut,rt.prepareFn,_.rehover,_.reselect,Y],It=n.syncOrAsync(kt,tt);return(!It||!It.then)&&(It=Promise.resolve()),It.then(function(){return tt})}_.doCalcdata=function(tt,dt){var rt=l.list(tt),at=tt._fullData,vt=tt._fullLayout,it,Y,ft,ut,kt=new Array(at.length),It=(tt.calcdata||[]).slice();for(tt.calcdata=kt,vt._numBoxes=0,vt._numViolins=0,vt._violinScaleGroupStats={},tt._hmpixcount=0,tt._hmlumcount=0,vt._piecolormap={},vt._sunburstcolormap={},vt._treemapcolormap={},vt._iciclecolormap={},vt._funnelareacolormap={},ft=0;ft=0;ut--)if(Mt[ut].enabled){it._indexToPoints=Mt[ut]._indexToPoints;break}Y&&Y.calc&&(Lt=Y.calc(tt,it))}(!Array.isArray(Lt)||!Lt[0])&&(Lt=[{x:i,y:i}]),Lt[0].t||(Lt[0].t={}),Lt[0].trace=it,kt[se]=Lt}}for(mt(rt,at,vt),ft=0;ft{Q.xmlns="http://www.w3.org/2000/xmlns/",Q.svg="http://www.w3.org/2000/svg",Q.xlink="http://www.w3.org/1999/xlink",Q.svgAttrs={xmlns:Q.svg,"xmlns:xlink":Q.xlink}}),Af=Dt((Q,Z)=>{Z.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}}),ec=Dt(Q=>{var Z=qr(),c=kn(),g=c.strTranslate,I=Dp(),S=Af().LINE_SPACING,t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Q.convertToTspans=function(F,U,W){var q=F.text(),J=!F.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&q.match(t),lt=Z.select(F.node().parentNode);if(lt.empty())return;var yt=F.attr("class")?F.attr("class").split(" ")[0]:"text";yt+="-math",lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove(),F.style("display",null).attr({"data-unformatted":q,"data-math":"N"});function mt(){lt.empty()||(yt=F.attr("class")+"-math",lt.select("svg."+yt).remove()),F.text("").style("white-space","pre");var st=O(F.node(),q);st&&F.style("pointer-events","all"),Q.positionText(F),W&&W.call(F)}return J?(U&&U._promises||[]).push(new Promise(function(st){F.style("display","none");var tt=parseInt(F.node().style.fontSize,10),dt={fontSize:tt};o(J[2],dt,function(rt,at,vt){lt.selectAll("svg."+yt).remove(),lt.selectAll("g."+yt+"-group").remove();var it=rt&&rt.select("svg");if(!it||!it.node()){mt(),st();return}var Y=lt.append("g").classed(yt+"-group",!0).attr({"pointer-events":"none","data-unformatted":q,"data-math":"Y"});Y.node().appendChild(it.node()),at&&at.node()&&it.node().insertBefore(at.node().cloneNode(!0),it.node().firstChild);var ft=vt.width,ut=vt.height;it.attr({class:yt,height:ut,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var kt=F.node().style.fill||"black",It=it.select("g");It.attr({fill:kt,stroke:kt});var Pt=It.node().getBoundingClientRect(),qt=Pt.width,Wt=Pt.height;(qt>ft||Wt>ut)&&(it.style("overflow","hidden"),Pt=it.node().getBoundingClientRect(),qt=Pt.width,Wt=Pt.height);var Jt=+F.attr("x"),ge=+F.attr("y"),fe=tt||F.node().getBoundingClientRect().height,pe=-fe/4;if(yt[0]==="y")Y.attr({transform:"rotate("+[-90,Jt,ge]+")"+g(-qt/2,pe-Wt/2)});else if(yt[0]==="l")ge=pe-Wt/2;else if(yt[0]==="a"&&yt.indexOf("atitle")!==0)Jt=0,ge=pe;else{var se=F.attr("text-anchor");Jt=Jt-qt*(se==="middle"?.5:se==="end"?1:0),ge=ge+pe-Wt/2}it.attr({x:Jt,y:ge}),W&&W.call(F,Y),st(Y)})})):mt(),F};var e=/(<|<|<)/g,r=/(>|>|>)/g;function a(F){return F.replace(e,"\\lt ").replace(r,"\\gt ")}var n=[["$","$"],["\\(","\\)"]];function o(F,U,W){var q=parseInt((MathJax.version||"").split(".")[0]);if(q!==2&&q!==3){c.warn("No MathJax version:",MathJax.version);return}var J,lt,yt,mt,st=function(){return lt=c.extendDeepAll({},MathJax.Hub.config),yt=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:n},displayAlign:"left"})},tt=function(){lt=c.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=n},dt=function(){if(J=MathJax.Hub.config.menuSettings.renderer,J!=="SVG")return MathJax.Hub.setRenderer("SVG")},rt=function(){J=MathJax.config.startup.output,J!=="svg"&&(MathJax.config.startup.output="svg")},at=function(){var kt="math-output-"+c.randstr({},64);mt=Z.select("body").append("div").attr({id:kt}).style({visibility:"hidden",position:"absolute","font-size":U.fontSize+"px"}).text(a(F));var It=mt.node();return q===2?MathJax.Hub.Typeset(It):MathJax.typeset([It])},vt=function(){var kt=mt.select(q===2?".MathJax_SVG":".MathJax"),It=!kt.empty()&&mt.select("svg").node();if(!It)c.log("There was an error in the tex syntax.",F),W();else{var Pt=It.getBoundingClientRect(),qt;q===2?qt=Z.select("body").select("#MathJax_SVG_glyphs"):qt=kt.select("defs"),W(kt,qt,Pt)}mt.remove()},it=function(){if(J!=="SVG")return MathJax.Hub.setRenderer(J)},Y=function(){J!=="svg"&&(MathJax.config.startup.output=J)},ft=function(){return yt!==void 0&&(MathJax.Hub.processSectionDelay=yt),MathJax.Hub.Config(lt)},ut=function(){MathJax.config=lt};q===2?MathJax.Hub.Queue(st,dt,at,vt,it,ft):q===3&&(tt(),rt(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){at(),vt(),Y(),ut()}))}var i={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},l={sub:"0.3em",sup:"-0.6em"},f={sub:"-0.21em",sup:"0.42em"},x="​",y=["http:","https:","mailto:","",void 0,":"],v=Q.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,u=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;Q.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,P=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,C=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(F,U){if(!F)return null;var W=F.match(U),q=W&&(W[3]||W[4]);return q&&w(q)}var h=/(^|;)\s*color:/;Q.plainText=function(F,U){U=U||{};for(var W=U.len!==void 0&&U.len!==-1?U.len:1/0,q=U.allowedTags!==void 0?U.allowedTags:["br"],J="...",lt=J.length,yt=F.split(T),mt=[],st="",tt=0,dt=0;dtlt?mt.push(rt.substr(0,Y-lt)+J):mt.push(rt.substr(0,Y));break}st=""}}return mt.join("")};var p={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},k=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function w(F){return F.replace(k,function(U,W){var q;return W.charAt(0)==="#"?q=R(W.charAt(1)==="x"?parseInt(W.substr(2),16):parseInt(W.substr(1),10)):q=p[W],q||U})}Q.convertEntities=w;function R(F){if(!(F>1114111)){var U=String.fromCodePoint;if(U)return U(F);var W=String.fromCharCode;return F<=65535?W(F):W((F>>10)+55232,F%1024+56320)}}function O(F,U){U=U.replace(v," ");var W=!1,q=[],J,lt=-1;function yt(){lt++;var Wt=document.createElementNS(I.svg,"tspan");Z.select(Wt).attr({class:"line",dy:lt*S+"em"}),F.appendChild(Wt),J=Wt;var Jt=q;if(q=[{node:Wt}],Jt.length>1)for(var ge=1;ge.",U);return}var Jt=q.pop();Wt!==Jt.type&&c.log("Start tag <"+Jt.type+"> doesnt match end tag <"+Wt+">. Pretending it did match.",U),J=q[q.length-1].node}var dt=b.test(U);dt?yt():(J=F,q=[{node:F}]);for(var rt=U.split(T),at=0;at{var c=qr(),g=ro(),I=Yi(),S=kn(),t=hi(),e=vi().isValid;function r(v,T,u){var b=T?S.nestedProperty(v,T).get()||{}:v,_=b[u||"color"];_&&_._inputArray&&(_=_._inputArray);var P=!1;if(S.isArrayOrTypedArray(_)){for(var M=0;M<_.length;M++)if(I(_[M])){P=!0;break}}return S.isPlainObject(b)&&(P||b.showscale===!0||I(b.cmin)&&I(b.cmax)||e(b.colorscale)||S.isPlainObject(b.colorbar))}var a=["showscale","autocolorscale","colorscale","reversescale","colorbar"],n=["min","max","mid","auto"];function o(v){var T=v._colorAx,u=T||v,b={},_,P,M;for(P=0;P=0;b--,_++){var P=v[b];u[_]=[1-P[0],P[1]]}return u}function f(v,T){T=T||{};for(var u=v.domain,b=v.range,_=b.length,P=new Array(_),M=0;M<_;M++){var C=g(b[M]).toRgb();P[M]=[C.r,C.g,C.b,C.a]}var A=c.scale.linear().domain(u).range(P).clamp(!0),h=T.noNumericCheck,p=T.returnArray,k;return h&&p?k=A:h?k=function(w){return y(A(w))}:p?k=function(w){return I(w)?A(w):g(w).isValid()?w:t.defaultLine}:k=function(w){return I(w)?y(A(w)):g(w).isValid()?w:t.defaultLine},k.domain=A.domain,k.range=function(){return b},k}function x(v,T){return f(i(v),T)}function y(v){var T={r:v[0],g:v[1],b:v[2],a:v[3]};return g(T).toRgbString()}Z.exports={hasColorscale:r,extractOpts:o,extractScale:i,flipScale:l,makeColorScaleFunc:f,makeColorScaleFuncFromTrace:x}}),dh=Dt((Q,Z)=>{var c=S_(),g=c.FORMAT_LINK,I=c.DATE_FORMAT_LINK;function S(r,a){return{valType:"string",dflt:"",editType:"none",description:(a?t:e)("hover text",r)+["By default the values are formatted using "+(a?"generic number format":"`"+r+"axis.hoverformat`")+"."].join(" ")}}function t(r,a){return["Sets the "+r+" formatting rule"+(a?"for `"+a+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+g+"."].join(" ")}function e(r,a){return t(r,a)+[" And for dates see: "+I+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}Z.exports={axisHoverFormat:S,descriptionOnlyNumbers:t,descriptionWithDates:e}}),Td=Dt((Q,Z)=>{var c=da(),g=wi(),I=kd().dash,S=Ia().extendFlat,t=mu().templatedArray;Zu().templateFormatStringDescription;var e=dh().descriptionWithDates,r=Ca().ONEDAY,a=ic(),n=a.HOUR_PATTERN,o=a.WEEKDAY_PATTERN,i={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},l=S({},i,{values:i.values.slice().concat(["sync"])});function f(h){return{valType:"integer",min:0,dflt:h?5:0,editType:"ticks"}}var x={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},v={valType:"data_array",editType:"ticks"},T={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function u(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=5),p}function b(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var _={valType:"color",dflt:g.defaultLine,editType:"ticks"},P={valType:"color",dflt:g.lightLine,editType:"ticks"};function M(h){var p={valType:"number",min:0,editType:"ticks"};return h||(p.dflt=1),p}var C=S({},I,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};Z.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:g.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:c({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"calc"},rangebreaks:t("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[o,n,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:r},editType:"calc"}),tickmode:l,nticks:f(),tick0:x,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:v,ticktext:{valType:"data_array",editType:"ticks"},ticks:T,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:u(),tickwidth:b(),tickcolor:_,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:S({},I,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:c({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:e("tick label")},tickformatstops:t("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:e("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:P,gridwidth:M(),griddash:C,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:g.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:g.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},minor:{tickmode:i,nticks:f("minor"),tick0:x,dtick:y,tickvals:v,ticks:T,ticklen:u("minor"),tickwidth:b("minor"),tickcolor:_,gridcolor:P,gridwidth:M("minor"),griddash:C,showgrid:A,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}),M1=Dt((Q,Z)=>{var c=Td(),g=da(),I=Ia().extendFlat,S=Yc().overrideAll;Z.exports=S({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:c.linecolor,outlinewidth:c.linewidth,bordercolor:c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:c.minor.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:I({},c.ticks,{dflt:""}),ticklabeloverflow:I({},c.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,ticklabelstep:c.ticklabelstep,showticklabels:c.showticklabels,labelalias:c.labelalias,tickfont:g({}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,minexponent:c.minexponent,showexponent:c.showexponent,title:{text:{valType:"string"},font:g({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}),kc=Dt((Q,Z)=>{var c=M1(),g=Mo().counter,I=G0(),S=vi().scales;I(S);function t(e){return"`"+e+"`"}Z.exports=function(e,r){e=e||"",r=r||{};var a=r.cLetter||"c";"onlyIfNumerical"in r&&r.onlyIfNumerical;var n="noScale"in r?r.noScale:e==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:a==="z",i=typeof r.colorscaleDflt=="string"?S[r.colorscaleDflt]:null,l=r.editTypeOverride||"",f=e?e+".":"",x;"colorAttr"in r?(x=r.colorAttr,r.colorAttr):(x={z:"z",c:"color"}[a],""+t(f+x));var y=a+"auto",v=a+"min",T=a+"max",u=a+"mid",b={};b[v]=b[T]=void 0;var _={};_[y]=!1;var P={};return x==="color"&&(P.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(P.color.anim=!0)),P[y]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:b},P[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},P[T]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},P[u]={valType:"number",dflt:null,editType:"calc",impliedEdits:b},P.colorscale={valType:"colorscale",editType:"calc",dflt:i,impliedEdits:{autocolorscale:!1}},P.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},P.reversescale={valType:"boolean",dflt:!1,editType:"plot"},n||(P.showscale={valType:"boolean",dflt:o,editType:"calc"},P.colorbar=c),r.noColorAxis||(P.coloraxis={valType:"subplotid",regex:g("coloraxis"),dflt:null,editType:"calc"}),P}}),zu=Dt((Q,Z)=>{var c=Ia().extendFlat,g=kc(),I=vi().scales;Z.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:I.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:I.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:I.RdBu,editType:"calc"}},coloraxis:c({_isSubplotObj:!0,editType:"calc"},g("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}),L0=Dt((Q,Z)=>{var c=kn();Z.exports=function(g){return c.isPlainObject(g.colorbar)}}),Nh=Dt(Q=>{var Z=Yi(),c=kn(),g=Ca(),I=g.ONEDAY,S=g.ONEWEEK;Q.dtick=function(t,e){var r=e==="log",a=e==="date",n=e==="category",o=a?I:1;if(!t)return o;if(Z(t))return t=Number(t),t<=0?o:n?Math.max(1,Math.round(t)):a?Math.max(.1,t):t;if(typeof t!="string"||!(a||r))return o;var i=t.charAt(0),l=t.substr(1);return l=Z(l)?Number(l):0,l<=0||!(a&&i==="M"&&l===Math.round(l)||r&&i==="L"||r&&i==="D"&&(l===1||l===2))?o:t},Q.tick0=function(t,e,r,a){if(e==="date")return c.cleanDate(t,c.dateTick0(r,a%S===0?1:0));if(!(a==="D1"||a==="D2"))return Z(t)?Number(t):0}}),yg=Dt((Q,Z)=>{var c=Nh(),g=kn().isArrayOrTypedArray,I=Ma().isTypedArraySpec,S=Ma().decodeTypedArraySpec;Z.exports=function(t,e,r,a,n){n||(n={});var o=n.isMinor,i=o?t.minor||{}:t,l=o?e.minor:e,f=o?"minor.":"";function x(M){var C=i[M];return I(C)&&(C=S(C)),C!==void 0?C:(l._template||{})[M]}var y=x("tick0"),v=x("dtick"),T=x("tickvals"),u=g(T)?"array":v?"linear":"auto",b=r(f+"tickmode",u);if(b==="auto"||b==="sync")r(f+"nticks");else if(b==="linear"){var _=l.dtick=c.dtick(v,a);l.tick0=c.tick0(y,a,e.calendar,_)}else if(a!=="multicategory"){var P=r(f+"tickvals");P===void 0?l.tickmode="auto":o||r("ticktext")}}}),xg=Dt((Q,Z)=>{var c=kn(),g=Td();Z.exports=function(I,S,t,e){var r=e.isMinor,a=r?I.minor||{}:I,n=r?S.minor:S,o=r?g.minor:g,i=r?"minor.":"",l=c.coerce2(a,n,o,"ticklen",r?(S.ticklen||5)*.6:void 0),f=c.coerce2(a,n,o,"tickwidth",r?S.tickwidth||1:void 0),x=c.coerce2(a,n,o,"tickcolor",(r?S.tickcolor:void 0)||n.color),y=t(i+"ticks",!r&&e.outerTicks||l||f||x?"outside":"");y||(delete n.ticklen,delete n.tickwidth,delete n.tickcolor)}}),Ny=Dt((Q,Z)=>{Z.exports=function(c){var g=["showexponent","showtickprefix","showticksuffix"],I=g.filter(function(t){return c[t]!==void 0}),S=function(t){return c[t]===c[I[0]]};if(I.every(S)||I.length===1)return c[I[0]]}}),Ad=Dt((Q,Z)=>{var c=kn(),g=mu();Z.exports=function(I,S,t){var e=t.name,r=t.inclusionAttr||"visible",a=S[e],n=c.isArrayOrTypedArray(I[e])?I[e]:[],o=S[e]=[],i=g.arrayTemplater(S,e,r),l,f;for(l=0;l{var c=kn(),g=hi().contrast,I=Td(),S=Ny(),t=Ad();Z.exports=function(r,a,n,o,i){i||(i={});var l=n("labelalias");c.isPlainObject(l)||delete a.labelalias;var f=S(r),x=n("showticklabels");if(x){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var y=i.font||{},v=a.color,T=a.ticklabelposition||"",u=T.indexOf("inside")!==-1?g(i.bgColor):v&&v!==I.color.dflt?v:y.color;if(c.coerceFont(n,"tickfont",y,{overrideDflt:{color:u}}),!i.noTicklabelstep&&o!=="multicategory"&&o!=="log"&&n("ticklabelstep"),!i.noAng){var b=n("tickangle");!i.noAutotickangles&&b==="auto"&&n("autotickangles")}if(o!=="category"){var _=n("tickformat");t(r,a,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:e}),a.tickformatstops.length||delete a.tickformatstops,!i.noExp&&!_&&o!=="date"&&(n("showexponent",f),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&o==="log"&&n("minorloglabels")}};function e(r,a){function n(i,l){return c.coerce(r,a,I.tickformatstops,i,l)}var o=n("enabled");o&&(n("dtickrange"),n("value"))}}),dm=Dt((Q,Z)=>{var c=Ny();Z.exports=function(g,I,S,t,e){e||(e={});var r=e.tickSuffixDflt,a=c(g),n=S("tickprefix");n&&S("showtickprefix",a);var o=S("ticksuffix",r);o&&S("showticksuffix",a)}}),fv=Dt((Q,Z)=>{var c=kn(),g=mu(),I=yg(),S=xg(),t=n0(),e=dm(),r=M1();Z.exports=function(a,n,o){var i=g.newContainer(n,"colorbar"),l=a.colorbar||{};function f(F,U){return c.coerce(l,i,r,F,U)}var x=o.margin||{t:0,b:0,l:0,r:0},y=o.width-x.l-x.r,v=o.height-x.t-x.b,T=f("orientation"),u=T==="v",b=f("thicknessmode");f("thickness",b==="fraction"?30/(u?y:v):30);var _=f("lenmode");f("len",_==="fraction"?1:u?v:y);var P=f("yref"),M=f("xref"),C=P==="paper",A=M==="paper",h,p,k,w="left";u?(k="middle",w=A?"left":"right",h=A?1.02:1,p=.5):(k=C?"bottom":"top",w="center",h=.5,p=C?1.02:1),c.coerce(l,i,{x:{valType:"number",min:A?-2:0,max:A?3:1,dflt:h}},"x"),c.coerce(l,i,{y:{valType:"number",min:C?-2:0,max:C?3:1,dflt:p}},"y"),f("xanchor",w),f("xpad"),f("yanchor",k),f("ypad"),c.noneOrAll(l,i,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var R=c.coerce(l,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",R.indexOf("inside")!==-1?"hide past domain":"hide past div"),I(l,i,f,"linear");var O=o.font,j={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:O};R.indexOf("inside")!==-1&&(j.bgColor="black"),e(l,i,f,"linear",j),t(l,i,f,"linear",j),S(l,i,f,"linear",j),f("title.text",o._dfltTitle.colorbar);var V=i.showticklabels?i.tickfont:O,H=c.extendFlat({},O,{family:V.family,size:c.bigFont(V.size)});c.coerceFont(f,"title.font",H),f("title.side",u?"top":"right")}}),mc=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=L0(),S=fv(),t=vi().isValid,e=Jo().traceIs;function r(a,n){var o=n.slice(0,n.length-1);return n?g.nestedProperty(a,o).get()||{}:a}Z.exports=function a(n,o,i,l,f){var x=f.prefix,y=f.cLetter,v="_module"in o,T=r(n,x),u=r(o,x),b=r(o._template||{},x)||{},_=function(){return delete n.coloraxis,delete o.coloraxis,a(n,o,i,l,f)};if(v){var P=i._colorAxes||{},M=l(x+"coloraxis");if(M){var C=e(o,"contour")&&g.nestedProperty(o,"contours.coloring").get()||"heatmap",A=P[M];A?(A[2].push(_),A[0]!==C&&(A[0]=!1,g.warn(["Ignoring coloraxis:",M,"setting","as it is linked to incompatible colorscales."].join(" ")))):P[M]=[C,o,[_]];return}}var h=T[y+"min"],p=T[y+"max"],k=c(h)&&c(p)&&h{var c=kn(),g=mu(),I=zu(),S=mc();Z.exports=function(t,e){function r(y,v){return c.coerce(t,e,I,y,v)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var a=e._colorAxes,n,o;function i(y,v){return c.coerce(n,o,I.coloraxis,y,v)}for(var l in a){var f=a[l];if(f[0])n=t[l]||{},o=g.newContainer(e,l,"coloraxis"),o._name=l,S(n,o,e,i,{prefix:"",cLetter:"c"});else{for(var x=0;x{var c=kn(),g=Ud().hasColorscale,I=Ud().extractOpts;Z.exports=function(S,t){function e(f,x){var y=f["_"+x];y!==void 0&&(f[x]=y)}function r(f,x){var y=x.container?c.nestedProperty(f,x.container).get():f;if(y)if(y.coloraxis)y._colorAx=t[y.coloraxis];else{var v=I(y),T=v.auto;(T||v.min===void 0)&&e(y,x.min),(T||v.max===void 0)&&e(y,x.max),v.autocolorscale&&e(y,"colorscale")}}for(var a=0;a{var c=Yi(),g=kn(),I=Ud().extractOpts;Z.exports=function(S,t,e){var r=S._fullLayout,a=e.vals,n=e.containerStr,o=n?g.nestedProperty(t,n).get():t,i=I(o),l=i.auto!==!1,f=i.min,x=i.max,y=i.mid,v=function(){return g.aggNums(Math.min,null,a)},T=function(){return g.aggNums(Math.max,null,a)};if(f===void 0?f=v():l&&(o._colorAx&&c(f)?f=Math.min(f,v()):f=v()),x===void 0?x=T():l&&(o._colorAx&&c(x)?x=Math.max(x,T()):x=T()),l&&y!==void 0&&(x-y>y-f?f=y-(x-y):x-y=0?u=r.colorscale.sequential:u=r.colorscale.sequentialminus,i._sync("colorscale",u)}}}),Xc=Dt((Q,Z)=>{var c=vi(),g=Ud();Z.exports={moduleType:"component",name:"colorscale",attributes:kc(),layoutAttributes:zu(),supplyLayoutDefaults:_g(),handleDefaults:mc(),crossTraceDefaults:_w(),calc:Xd(),scales:c.scales,defaultScale:c.defaultScale,getScale:c.get,isValidScale:c.isValid,hasColorscale:g.hasColorscale,extractOpts:g.extractOpts,extractScale:g.extractScale,flipScale:g.flipScale,makeColorScaleFunc:g.makeColorScaleFunc,makeColorScaleFuncFromTrace:g.makeColorScaleFuncFromTrace}}),Tc=Dt((Q,Z)=>{var c=kn(),g=Ma().isTypedArraySpec;Z.exports={hasLines:function(I){return I.visible&&I.mode&&I.mode.indexOf("lines")!==-1},hasMarkers:function(I){return I.visible&&(I.mode&&I.mode.indexOf("markers")!==-1||I.type==="splom")},hasText:function(I){return I.visible&&I.mode&&I.mode.indexOf("text")!==-1},isBubble:function(I){var S=I.marker;return c.isPlainObject(S)&&(c.isArrayOrTypedArray(S.size)||g(S.size))}}}),bg=Dt((Q,Z)=>{var c=Yi();Z.exports=function(g,I){I||(I=2);var S=g.marker,t=S.sizeref||1,e=S.sizemin||0,r=S.sizemode==="area"?function(a){return Math.sqrt(a/t)}:function(a){return a/t};return function(a){var n=r(a/I);return c(n)&&n>0?Math.max(n,e):0}}}),Fp=Dt(Q=>{var Z=kn();Q.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},Q.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var a=e.xaxes||[],n=e.yaxes||[],o=0;o=0&&a.index{Z.exports=I;var c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},g=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function I(e){var r=[];return e.replace(g,function(a,n,o){var i=n.toLowerCase();for(o=t(o),i=="m"&&o.length>2&&(r.push([n].concat(o.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(o.length==c[i])return o.unshift(n),r.push(o);if(o.length{var c=S1(),g=function(y,v){return v?Math.round(y*(v=Math.pow(10,v)))/v:Math.round(y)},I="M0,0Z",S=Math.sqrt(2),t=Math.sqrt(3),e=Math.PI,r=Math.cos,a=Math.sin;Z.exports={circle:{n:0,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b="M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z";return T?x(v,T,b):b}},square:{n:1,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")}},diamond:{n:2,f:function(y,v,T){if(n(v))return I;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z")}},cross:{n:3,f:function(y,v,T){if(n(v))return I;var u=g(y*.4,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H"+u+"V"+b+"H-"+u+"V"+u+"H-"+b+"V-"+u+"H-"+u+"V-"+b+"H"+u+"V-"+u+"H"+b+"Z")}},x:{n:4,f:function(y,v,T){if(n(v))return I;var u=g(y*.8/S,2),b="l"+u+","+u,_="l"+u+",-"+u,P="l-"+u+",-"+u,M="l-"+u+","+u;return x(v,T,"M0,"+u+b+_+P+_+P+M+P+M+b+M+b+"Z")}},"triangle-up":{n:5,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+","+b+"H"+u+"L0,-"+_+"Z")}},"triangle-down":{n:6,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+u+",-"+b+"H"+u+"L0,"+_+"Z")}},"triangle-left":{n:7,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M"+b+",-"+u+"V"+u+"L-"+_+",0Z")}},"triangle-right":{n:8,f:function(y,v,T){if(n(v))return I;var u=g(y*2/t,2),b=g(y/2,2),_=g(y,2);return x(v,T,"M-"+b+",-"+u+"V"+u+"L"+_+",0Z")}},"triangle-ne":{n:9,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+b+",-"+u+"H"+u+"V"+b+"Z")}},"triangle-se":{n:10,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+u+",-"+b+"V"+u+"H-"+b+"Z")}},"triangle-sw":{n:11,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M"+b+","+u+"H-"+u+"V-"+b+"Z")}},"triangle-nw":{n:12,f:function(y,v,T){if(n(v))return I;var u=g(y*.6,2),b=g(y*1.2,2);return x(v,T,"M-"+u+","+b+"V-"+u+"H"+b+"Z")}},pentagon:{n:13,f:function(y,v,T){if(n(v))return I;var u=g(y*.951,2),b=g(y*.588,2),_=g(-y,2),P=g(y*-.309,2),M=g(y*.809,2);return x(v,T,"M"+u+","+P+"L"+b+","+M+"H-"+b+"L-"+u+","+P+"L0,"+_+"Z")}},hexagon:{n:14,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M"+_+",-"+b+"V"+b+"L0,"+u+"L-"+_+","+b+"V-"+b+"L0,-"+u+"Z")}},hexagon2:{n:15,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y/2,2),_=g(y*t/2,2);return x(v,T,"M-"+b+","+_+"H"+b+"L"+u+",0L"+b+",-"+_+"H-"+b+"L-"+u+",0Z")}},octagon:{n:16,f:function(y,v,T){if(n(v))return I;var u=g(y*.924,2),b=g(y*.383,2);return x(v,T,"M-"+b+",-"+u+"H"+b+"L"+u+",-"+b+"V"+b+"L"+b+","+u+"H-"+b+"L-"+u+","+b+"V-"+b+"Z")}},star:{n:17,f:function(y,v,T){if(n(v))return I;var u=y*1.4,b=g(u*.225,2),_=g(u*.951,2),P=g(u*.363,2),M=g(u*.588,2),C=g(-u,2),A=g(u*-.309,2),h=g(u*.118,2),p=g(u*.809,2),k=g(u*.382,2);return x(v,T,"M"+b+","+A+"H"+_+"L"+P+","+h+"L"+M+","+p+"L0,"+k+"L-"+M+","+p+"L-"+P+","+h+"L-"+_+","+A+"H-"+b+"L0,"+C+"Z")}},hexagram:{n:18,f:function(y,v,T){if(n(v))return I;var u=g(y*.66,2),b=g(y*.38,2),_=g(y*.76,2);return x(v,T,"M-"+_+",0l-"+b+",-"+u+"h"+_+"l"+b+",-"+u+"l"+b+","+u+"h"+_+"l-"+b+","+u+"l"+b+","+u+"h-"+_+"l-"+b+","+u+"l-"+b+",-"+u+"h-"+_+"Z")}},"star-triangle-up":{n:19,f:function(y,v,T){if(n(v))return I;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),P=g(y*4,2),M="A "+P+","+P+" 0 0 1 ";return x(v,T,"M-"+u+","+b+M+u+","+b+M+"0,-"+_+M+"-"+u+","+b+"Z")}},"star-triangle-down":{n:20,f:function(y,v,T){if(n(v))return I;var u=g(y*t*.8,2),b=g(y*.8,2),_=g(y*1.6,2),P=g(y*4,2),M="A "+P+","+P+" 0 0 1 ";return x(v,T,"M"+u+",-"+b+M+"-"+u+",-"+b+M+"0,"+_+M+u+",-"+b+"Z")}},"star-square":{n:21,f:function(y,v,T){if(n(v))return I;var u=g(y*1.1,2),b=g(y*2,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",-"+u+_+"-"+u+","+u+_+u+","+u+_+u+",-"+u+_+"-"+u+",-"+u+"Z")}},"star-diamond":{n:22,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2),b=g(y*1.9,2),_="A "+b+","+b+" 0 0 1 ";return x(v,T,"M-"+u+",0"+_+"0,"+u+_+u+",0"+_+"0,-"+u+_+"-"+u+",0Z")}},"diamond-tall":{n:23,f:function(y,v,T){if(n(v))return I;var u=g(y*.7,2),b=g(y*1.4,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},"diamond-wide":{n:24,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2),b=g(y*.7,2);return x(v,T,"M0,"+b+"L"+u+",0L0,-"+b+"L-"+u+",0Z")}},hourglass:{n:25,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z")},noDot:!0},bowtie:{n:26,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z")},noDot:!0},"circle-cross":{n:27,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y/S,2);return x(v,T,"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(y,v,T){if(n(v))return I;var u=g(y*1.3,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(y,v,T){if(n(v))return I;var u=g(y*1.3,2),b=g(y*.65,2);return x(v,T,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+b+",-"+b+"L"+b+","+b+"M-"+b+","+b+"L"+b+",-"+b)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*.85,2);return x(v,T,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(y,v,T){if(n(v))return I;var u=g(y/2,2),b=g(y,2);return x(v,T,"M"+u+","+b+"V-"+b+"M"+(u-b)+",-"+b+"V"+b+"M"+b+","+u+"H-"+b+"M-"+b+","+(u-b)+"H"+b)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+","+_+"L0,0M"+u+","+_+"L0,0M0,-"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+u+",-"+_+"L0,0M"+u+",-"+_+"L0,0M0,"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M"+_+","+u+"L0,0M"+_+",-"+u+"L0,0M-"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(y,v,T){if(n(v))return I;var u=g(y*1.2,2),b=g(y*1.6,2),_=g(y*.8,2);return x(v,T,"M-"+_+","+u+"L0,0M-"+_+",-"+u+"L0,0M"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2);return x(v,T,"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(y,v,T){if(n(v))return I;var u=g(y*1.4,2);return x(v,T,"M0,"+u+"V-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(y,v,T){if(n(v))return I;var u=g(y,2);return x(v,T,"M"+u+","+u+"L-"+u+",-"+u)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M0,0L-"+u+",-"+b+"H"+u+"Z")},noDot:!0},"arrow-left":{n:47,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-right":{n:48,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,0L-"+u+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+","+b+"H"+u+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(y,v,T){if(n(v))return I;var u=g(y,2),b=g(y*2,2);return x(v,T,"M-"+u+",0H"+u+"M0,0L-"+u+",-"+b+"H"+u+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(y,v,T){if(n(v))return I;var u=g(y*2,2),b=g(y,2);return x(v,T,"M0,-"+b+"V"+b+"M0,0L-"+u+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(y,v,T){if(n(v))return I;var u=e/2.5,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"L"+b+","+_+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(y,v,T){if(n(v))return I;var u=e/4,b=2*y*r(u),_=2*y*a(u);return x(v,T,"M0,0L"+-b+","+_+"A "+2*y+","+2*y+" 0 0 1 "+b+","+_+"Z")},backoff:.4,noDot:!0}};function n(y){return y===null}var o,i,l,f;function x(y,v,T){if((!y||y%360===0)&&!v)return T;if(l===y&&f===v&&o===T)return i;l=y,f=v,o=T;function u(j,V){var H=r(j),F=a(j),U=V[0],W=V[1]+(v||0);return[U*H-W*F,U*F+W*H]}for(var b=y/180*e,_=0,P=0,M=c(T),C="",A=0;A{var c=qr(),g=kn(),I=g.numberFormat,S=Yi(),t=ro(),e=Jo(),r=hi(),a=Xc(),n=g.strTranslate,o=ec(),i=Dp(),l=Af(),f=l.LINE_SPACING,x=go().DESELECTDIM,y=Tc(),v=bg(),T=Fp().appendArrayPointValue,u=Z.exports={};u.font=function(Tt,Lt){var Mt=Lt.variant,ee=Lt.style,ve=Lt.weight,oe=Lt.color,Te=Lt.size,He=Lt.family,Ge=Lt.shadow,cr=Lt.lineposition,ur=Lt.textcase;He&&Tt.style("font-family",He),Te+1&&Tt.style("font-size",Te+"px"),oe&&Tt.call(r.fill,oe),ve&&Tt.style("font-weight",ve),ee&&Tt.style("font-style",ee),Mt&&Tt.style("font-variant",Mt),ur&&Tt.style("text-transform",b(P(ur))),Ge&&Tt.style("text-shadow",Ge==="auto"?o.makeTextShadow(r.contrast(oe)):b(Ge)),cr&&Tt.style("text-decoration-line",b(M(cr)))};function b(Tt){return Tt==="none"?void 0:Tt}var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function P(Tt){return _[Tt]}function M(Tt){return Tt.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}u.setPosition=function(Tt,Lt,Mt){Tt.attr("x",Lt).attr("y",Mt)},u.setSize=function(Tt,Lt,Mt){Tt.attr("width",Lt).attr("height",Mt)},u.setRect=function(Tt,Lt,Mt,ee,ve){Tt.call(u.setPosition,Lt,Mt).call(u.setSize,ee,ve)},u.translatePoint=function(Tt,Lt,Mt,ee){var ve=Mt.c2p(Tt.x),oe=ee.c2p(Tt.y);if(S(ve)&&S(oe)&&Lt.node())Lt.node().nodeName==="text"?Lt.attr("x",ve).attr("y",oe):Lt.attr("transform",n(ve,oe));else return!1;return!0},u.translatePoints=function(Tt,Lt,Mt){Tt.each(function(ee){var ve=c.select(this);u.translatePoint(ee,ve,Lt,Mt)})},u.hideOutsideRangePoint=function(Tt,Lt,Mt,ee,ve,oe){Lt.attr("display",Mt.isPtWithinRange(Tt,ve)&&ee.isPtWithinRange(Tt,oe)?null:"none")},u.hideOutsideRangePoints=function(Tt,Lt){if(Lt._hasClipOnAxisFalse){var Mt=Lt.xaxis,ee=Lt.yaxis;Tt.each(function(ve){var oe=ve[0].trace,Te=oe.xcalendar,He=oe.ycalendar,Ge=e.traceIs(oe,"bar-like")?".bartext":".point,.textpoint";Tt.selectAll(Ge).each(function(cr){u.hideOutsideRangePoint(cr,c.select(this),Mt,ee,Te,He)})})}},u.crispRound=function(Tt,Lt,Mt){return!Lt||!S(Lt)?Mt||0:Tt._context.staticPlot?Lt:Lt<1?1:Math.round(Lt)},u.singleLineStyle=function(Tt,Lt,Mt,ee,ve){Lt.style("fill","none");var oe=(((Tt||[])[0]||{}).trace||{}).line||{},Te=Mt||oe.width||0,He=ve||oe.dash||"";r.stroke(Lt,ee||oe.color),u.dashLine(Lt,He,Te)},u.lineGroupStyle=function(Tt,Lt,Mt,ee){Tt.style("fill","none").each(function(ve){var oe=(((ve||[])[0]||{}).trace||{}).line||{},Te=Lt||oe.width||0,He=ee||oe.dash||"";c.select(this).call(r.stroke,Mt||oe.color).call(u.dashLine,He,Te)})},u.dashLine=function(Tt,Lt,Mt){Mt=+Mt||0,Lt=u.dashStyle(Lt,Mt),Tt.style({"stroke-dasharray":Lt,"stroke-width":Mt+"px"})},u.dashStyle=function(Tt,Lt){Lt=+Lt||1;var Mt=Math.max(Lt,3);return Tt==="solid"?Tt="":Tt==="dot"?Tt=Mt+"px,"+Mt+"px":Tt==="dash"?Tt=3*Mt+"px,"+3*Mt+"px":Tt==="longdash"?Tt=5*Mt+"px,"+5*Mt+"px":Tt==="dashdot"?Tt=3*Mt+"px,"+Mt+"px,"+Mt+"px,"+Mt+"px":Tt==="longdashdot"&&(Tt=5*Mt+"px,"+2*Mt+"px,"+Mt+"px,"+2*Mt+"px"),Tt};function C(Tt,Lt,Mt,ee){var ve=Lt.fillpattern,oe=Lt.fillgradient,Te=u.getPatternAttr,He=ve&&(Te(ve.shape,0,"")||Te(ve.path,0,""));if(He){var Ge=Te(ve.bgcolor,0,null),cr=Te(ve.fgcolor,0,null),ur=ve.fgopacity,jr=Te(ve.size,0,8),Wr=Te(ve.solidity,0,.3),br=Lt.uid;u.pattern(Tt,"point",Mt,br,He,jr,Wr,void 0,ve.fillmode,Ge,cr,ur)}else if(oe&&oe.type!=="none"){var Xr=oe.type,nn="scatterfill-"+Lt.uid;if(ee&&(nn="legendfill-"+Lt.uid),!ee&&(oe.start!==void 0||oe.stop!==void 0)){var Le,Gt;Xr==="horizontal"?(Le={x:oe.start,y:0},Gt={x:oe.stop,y:0}):Xr==="vertical"&&(Le={x:0,y:oe.start},Gt={x:0,y:oe.stop}),Le.x=Lt._xA.c2p(Le.x===void 0?Lt._extremes.x.min[0].val:Le.x,!0),Le.y=Lt._yA.c2p(Le.y===void 0?Lt._extremes.y.min[0].val:Le.y,!0),Gt.x=Lt._xA.c2p(Gt.x===void 0?Lt._extremes.x.max[0].val:Gt.x,!0),Gt.y=Lt._yA.c2p(Gt.y===void 0?Lt._extremes.y.max[0].val:Gt.y,!0),Tt.call(O,Mt,nn,"linear",oe.colorscale,"fill",Le,Gt,!0,!1)}else Xr==="horizontal"&&(Xr=Xr+"reversed"),Tt.call(u.gradient,Mt,nn,Xr,oe.colorscale,"fill")}else Lt.fillcolor&&Tt.call(r.fill,Lt.fillcolor)}u.singleFillStyle=function(Tt,Lt){var Mt=c.select(Tt.node()),ee=Mt.data(),ve=((ee[0]||[])[0]||{}).trace||{};C(Tt,ve,Lt,!1)},u.fillGroupStyle=function(Tt,Lt,Mt){Tt.style("stroke-width",0).each(function(ee){var ve=c.select(this);ee[0].trace&&C(ve,ee[0].trace,Lt,Mt)})};var A=Ac();u.symbolNames=[],u.symbolFuncs=[],u.symbolBackOffs=[],u.symbolNeedLines={},u.symbolNoDot={},u.symbolNoFill={},u.symbolList=[],Object.keys(A).forEach(function(Tt){var Lt=A[Tt],Mt=Lt.n;u.symbolList.push(Mt,String(Mt),Tt,Mt+100,String(Mt+100),Tt+"-open"),u.symbolNames[Mt]=Tt,u.symbolFuncs[Mt]=Lt.f,u.symbolBackOffs[Mt]=Lt.backoff||0,Lt.needLine&&(u.symbolNeedLines[Mt]=!0),Lt.noDot?u.symbolNoDot[Mt]=!0:u.symbolList.push(Mt+200,String(Mt+200),Tt+"-dot",Mt+300,String(Mt+300),Tt+"-open-dot"),Lt.noFill&&(u.symbolNoFill[Mt]=!0)});var h=u.symbolNames.length,p="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";u.symbolNumber=function(Tt){if(S(Tt))Tt=+Tt;else if(typeof Tt=="string"){var Lt=0;Tt.indexOf("-open")>0&&(Lt=100,Tt=Tt.replace("-open","")),Tt.indexOf("-dot")>0&&(Lt+=200,Tt=Tt.replace("-dot","")),Tt=u.symbolNames.indexOf(Tt),Tt>=0&&(Tt+=Lt)}return Tt%100>=h||Tt>=400?0:Math.floor(Math.max(Tt,0))};function k(Tt,Lt,Mt,ee){var ve=Tt%100;return u.symbolFuncs[ve](Lt,Mt,ee)+(Tt>=200?p:"")}var w=I("~f"),R={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};u.gradient=function(Tt,Lt,Mt,ee,ve,oe){var Te=R[ee];return O(Tt,Lt,Mt,Te.type,ve,oe,Te.start,Te.stop,!1,Te.reversed)};function O(Tt,Lt,Mt,ee,ve,oe,Te,He,Ge,cr){var ur=ve.length,jr;ee==="linear"?jr={node:"linearGradient",attrs:{x1:Te.x,y1:Te.y,x2:He.x,y2:He.y,gradientUnits:Ge?"userSpaceOnUse":"objectBoundingBox"},reversed:cr}:ee==="radial"&&(jr={node:"radialGradient",reversed:cr});for(var Wr=new Array(ur),br=0;br=0&&Tt.i===void 0&&(Tt.i=oe.i),Lt.style("opacity",ee.selectedOpacityFn?ee.selectedOpacityFn(Tt):Tt.mo===void 0?Te.opacity:Tt.mo),ee.ms2mrc){var Ge;Tt.ms==="various"||Te.size==="various"?Ge=3:Ge=ee.ms2mrc(Tt.ms),Tt.mrc=Ge,ee.selectedSizeFn&&(Ge=Tt.mrc=ee.selectedSizeFn(Tt));var cr=u.symbolNumber(Tt.mx||Te.symbol)||0;Tt.om=cr%200>=100;var ur=se(Tt,Mt),jr=ft(Tt,Mt);Lt.attr("d",k(cr,Ge,ur,jr))}var Wr=!1,br,Xr,nn;if(Tt.so)nn=He.outlierwidth,Xr=He.outliercolor,br=Te.outliercolor;else{var Le=(He||{}).width;nn=(Tt.mlw+1||Le+1||(Tt.trace?(Tt.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Tt?Xr=Tt.mlcc=ee.lineScale(Tt.mlc):g.isArrayOrTypedArray(He.color)?Xr=r.defaultLine:Xr=He.color,g.isArrayOrTypedArray(Te.color)&&(br=r.defaultLine,Wr=!0),"mc"in Tt?br=Tt.mcc=ee.markerScale(Tt.mc):br=Te.color||Te.colors||"rgba(0,0,0,0)",ee.selectedColorFn&&(br=ee.selectedColorFn(Tt))}if(Tt.om)Lt.call(r.stroke,br).style({"stroke-width":(nn||1)+"px",fill:"none"});else{Lt.style("stroke-width",(Tt.isBlank?0:nn)+"px");var Gt=Te.gradient,ne=Tt.mgt;ne?Wr=!0:ne=Gt&&Gt.type,g.isArrayOrTypedArray(ne)&&(ne=ne[0],R[ne]||(ne=0));var Ct=Te.pattern,gt=u.getPatternAttr,St=Ct&&(gt(Ct.shape,Tt.i,"")||gt(Ct.path,Tt.i,""));if(ne&&ne!=="none"){var Nt=Tt.mgc;Nt?Wr=!0:Nt=Gt.color;var re=Mt.uid;Wr&&(re+="-"+Tt.i),u.gradient(Lt,ve,re,ne,[[0,Nt],[1,br]],"fill")}else if(St){var le=!1,we=Ct.fgcolor;!we&&oe&&oe.color&&(we=oe.color,le=!0);var Ue=gt(we,Tt.i,oe&&oe.color||null),qe=gt(Ct.bgcolor,Tt.i,null),or=Ct.fgopacity,Sr=gt(Ct.size,Tt.i,8),Ar=gt(Ct.solidity,Tt.i,.3);le=le||Tt.mcc||g.isArrayOrTypedArray(Ct.shape)||g.isArrayOrTypedArray(Ct.path)||g.isArrayOrTypedArray(Ct.bgcolor)||g.isArrayOrTypedArray(Ct.fgcolor)||g.isArrayOrTypedArray(Ct.size)||g.isArrayOrTypedArray(Ct.solidity);var mr=Mt.uid;le&&(mr+="-"+Tt.i),u.pattern(Lt,"point",ve,mr,St,Sr,Ar,Tt.mcc,Ct.fillmode,qe,Ue,or)}else g.isArrayOrTypedArray(br)?r.fill(Lt,br[Tt.i]):r.fill(Lt,br);nn&&r.stroke(Lt,Xr)}},u.makePointStyleFns=function(Tt){var Lt={},Mt=Tt.marker;return Lt.markerScale=u.tryColorscale(Mt,""),Lt.lineScale=u.tryColorscale(Mt,"line"),e.traceIs(Tt,"symbols")&&(Lt.ms2mrc=y.isBubble(Tt)?v(Tt):function(){return(Mt.size||6)/2}),Tt.selectedpoints&&g.extendFlat(Lt,u.makeSelectedPointStyleFns(Tt)),Lt},u.makeSelectedPointStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},ee=Tt.unselected||{},ve=Tt.marker||{},oe=Mt.marker||{},Te=ee.marker||{},He=ve.opacity,Ge=oe.opacity,cr=Te.opacity,ur=Ge!==void 0,jr=cr!==void 0;(g.isArrayOrTypedArray(He)||ur||jr)&&(Lt.selectedOpacityFn=function(gt){var St=gt.mo===void 0?ve.opacity:gt.mo;return gt.selected?ur?Ge:St:jr?cr:x*St});var Wr=ve.color,br=oe.color,Xr=Te.color;(br||Xr)&&(Lt.selectedColorFn=function(gt){var St=gt.mcc||Wr;return gt.selected?br||St:Xr||St});var nn=ve.size,Le=oe.size,Gt=Te.size,ne=Le!==void 0,Ct=Gt!==void 0;return e.traceIs(Tt,"symbols")&&(ne||Ct)&&(Lt.selectedSizeFn=function(gt){var St=gt.mrc||nn/2;return gt.selected?ne?Le/2:St:Ct?Gt/2:St}),Lt},u.makeSelectedTextStyleFns=function(Tt){var Lt={},Mt=Tt.selected||{},ee=Tt.unselected||{},ve=Tt.textfont||{},oe=Mt.textfont||{},Te=ee.textfont||{},He=ve.color,Ge=oe.color,cr=Te.color;return Lt.selectedTextColorFn=function(ur){var jr=ur.tc||He;return ur.selected?Ge||jr:cr||(Ge?jr:r.addOpacity(jr,x))},Lt},u.selectedPointStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedPointStyleFns(Lt),ee=Lt.marker||{},ve=[];Mt.selectedOpacityFn&&ve.push(function(oe,Te){oe.style("opacity",Mt.selectedOpacityFn(Te))}),Mt.selectedColorFn&&ve.push(function(oe,Te){r.fill(oe,Mt.selectedColorFn(Te))}),Mt.selectedSizeFn&&ve.push(function(oe,Te){var He=Te.mx||ee.symbol||0,Ge=Mt.selectedSizeFn(Te);oe.attr("d",k(u.symbolNumber(He),Ge,se(Te,Lt),ft(Te,Lt))),Te.mrc2=Ge}),ve.length&&Tt.each(function(oe){for(var Te=c.select(this),He=0;He0?Mt:0}u.textPointStyle=function(Tt,Lt,Mt){if(Tt.size()){var ee;if(Lt.selectedpoints){var ve=u.makeSelectedTextStyleFns(Lt);ee=ve.selectedTextColorFn}var oe=Lt.texttemplate,Te=Mt._fullLayout;Tt.each(function(He){var Ge=c.select(this),cr=oe?g.extractOption(He,Lt,"txt","texttemplate"):g.extractOption(He,Lt,"tx","text");if(!cr&&cr!==0){Ge.remove();return}if(oe){var ur=Lt._module.formatLabels,jr=ur?ur(He,Lt,Te):{},Wr={};T(Wr,Lt,He.i),cr=g.texttemplateString({data:[Wr,He,Lt._meta],fallback:Lt.texttemplatefallback,labels:jr,locale:Te._d3locale,template:cr})}var br=He.tp||Lt.textposition,Xr=H(He,Lt),nn=ee?ee(He):He.tc||Lt.textfont.color;Ge.call(u.font,{family:He.tf||Lt.textfont.family,weight:He.tw||Lt.textfont.weight,style:He.ty||Lt.textfont.style,variant:He.tv||Lt.textfont.variant,textcase:He.tC||Lt.textfont.textcase,lineposition:He.tE||Lt.textfont.lineposition,shadow:He.tS||Lt.textfont.shadow,size:Xr,color:nn}).text(cr).call(o.convertToTspans,Mt).call(V,br,Xr,He.mrc)})}},u.selectedTextStyle=function(Tt,Lt){if(!(!Tt.size()||!Lt.selectedpoints)){var Mt=u.makeSelectedTextStyleFns(Lt);Tt.each(function(ee){var ve=c.select(this),oe=Mt.selectedTextColorFn(ee),Te=ee.tp||Lt.textposition,He=H(ee,Lt);r.fill(ve,oe);var Ge=e.traceIs(Lt,"bar-like");V(ve,Te,He,ee.mrc2||ee.mrc,Ge)})}};var F=.5;u.smoothopen=function(Tt,Lt){if(Tt.length<3)return"M"+Tt.join("L");var Mt="M"+Tt[0],ee=[],ve;for(ve=1;ve=Ge||gt>=ur&><=Ge)&&(St<=jr&&St>=cr||St>=jr&&St<=cr)&&(Tt=[gt,St])}return Tt}u.applyBackoff=tt,u.makeTester=function(){var Tt=g.ensureSingleById(c.select("body"),"svg","js-plotly-tester",function(Mt){Mt.attr(i.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Lt=g.ensureSingle(Tt,"path","js-reference-point",function(Mt){Mt.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});u.tester=Tt,u.testref=Lt},u.savedBBoxes={};var dt=0,rt=1e4;u.bBox=function(Tt,Lt,Mt){Mt||(Mt=at(Tt));var ee;if(Mt){if(ee=u.savedBBoxes[Mt],ee)return g.extendFlat({},ee)}else if(Tt.childNodes.length===1){var ve=Tt.childNodes[0];if(Mt=at(ve),Mt){var oe=+ve.getAttribute("x")||0,Te=+ve.getAttribute("y")||0,He=ve.getAttribute("transform");if(!He){var Ge=u.bBox(ve,!1,Mt);return oe&&(Ge.left+=oe,Ge.right+=oe),Te&&(Ge.top+=Te,Ge.bottom+=Te),Ge}if(Mt+="~"+oe+"~"+Te+"~"+He,ee=u.savedBBoxes[Mt],ee)return g.extendFlat({},ee)}}var cr,ur;Lt?cr=Tt:(ur=u.tester.node(),cr=Tt.cloneNode(!0),ur.appendChild(cr)),c.select(cr).attr("transform",null).call(o.positionText,0,0);var jr=cr.getBoundingClientRect(),Wr=u.testref.node().getBoundingClientRect();Lt||ur.removeChild(cr);var br={height:jr.height,width:jr.width,left:jr.left-Wr.left,top:jr.top-Wr.top,right:jr.right-Wr.left,bottom:jr.bottom-Wr.top};return dt>=rt&&(u.savedBBoxes={},dt=0),Mt&&(u.savedBBoxes[Mt]=br),dt++,g.extendFlat({},br)};function at(Tt){var Lt=Tt.getAttribute("data-unformatted");if(Lt!==null)return Lt+Tt.getAttribute("data-math")+Tt.getAttribute("text-anchor")+Tt.getAttribute("style")}u.setClipUrl=function(Tt,Lt,Mt){Tt.attr("clip-path",vt(Lt,Mt))};function vt(Tt,Lt){if(!Tt)return null;var Mt=Lt._context,ee=Mt._exportedPlot?"":Mt._baseUrl||"";return ee?"url('"+ee+"#"+Tt+"')":"url(#"+Tt+")"}u.getTranslate=function(Tt){var Lt=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",ee=Tt[Mt]("transform")||"",ve=ee.replace(Lt,function(oe,Te,He){return[Te,He].join(" ")}).split(" ");return{x:+ve[0]||0,y:+ve[1]||0}},u.setTranslate=function(Tt,Lt,Mt){var ee=/(\btranslate\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Te=Tt[ve]("transform")||"";return Lt=Lt||0,Mt=Mt||0,Te=Te.replace(ee,"").trim(),Te+=n(Lt,Mt),Te=Te.trim(),Tt[oe]("transform",Te),Te},u.getScale=function(Tt){var Lt=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,Mt=Tt.attr?"attr":"getAttribute",ee=Tt[Mt]("transform")||"",ve=ee.replace(Lt,function(oe,Te,He){return[Te,He].join(" ")}).split(" ");return{x:+ve[0]||1,y:+ve[1]||1}},u.setScale=function(Tt,Lt,Mt){var ee=/(\bscale\(.*?\);?)/,ve=Tt.attr?"attr":"getAttribute",oe=Tt.attr?"attr":"setAttribute",Te=Tt[ve]("transform")||"";return Lt=Lt||1,Mt=Mt||1,Te=Te.replace(ee,"").trim(),Te+="scale("+Lt+","+Mt+")",Te=Te.trim(),Tt[oe]("transform",Te),Te};var it=/\s*sc.*/;u.setPointGroupScale=function(Tt,Lt,Mt){if(Lt=Lt||1,Mt=Mt||1,!!Tt){var ee=Lt===1&&Mt===1?"":"scale("+Lt+","+Mt+")";Tt.each(function(){var ve=(this.getAttribute("transform")||"").replace(it,"");ve+=ee,ve=ve.trim(),this.setAttribute("transform",ve)})}};var Y=/translate\([^)]*\)\s*$/;u.setTextPointsScale=function(Tt,Lt,Mt){Tt&&Tt.each(function(){var ee,ve=c.select(this),oe=ve.select("text");if(oe.node()){var Te=parseFloat(oe.attr("x")||0),He=parseFloat(oe.attr("y")||0),Ge=(ve.attr("transform")||"").match(Y);Lt===1&&Mt===1?ee=[]:ee=[n(Te,He),"scale("+Lt+","+Mt+")",n(-Te,-He)],Ge&&ee.push(Ge),ve.attr("transform",ee.join(""))}})};function ft(Tt,Lt){var Mt;return Tt&&(Mt=Tt.mf),Mt===void 0&&(Mt=Lt.marker&&Lt.marker.standoff||0),!Lt._geo&&!Lt._xA?-Mt:Mt}u.getMarkerStandoff=ft;var ut=Math.atan2,kt=Math.cos,It=Math.sin;function Pt(Tt,Lt){var Mt=Lt[0],ee=Lt[1];return[Mt*kt(Tt)-ee*It(Tt),Mt*It(Tt)+ee*kt(Tt)]}var qt,Wt,Jt,ge,fe,pe;function se(Tt,Lt){var Mt=Tt.ma;Mt===void 0&&(Mt=Lt.marker.angle,(!Mt||g.isArrayOrTypedArray(Mt))&&(Mt=0));var ee,ve,oe=Lt.marker.angleref;if(oe==="previous"||oe==="north"){if(Lt._geo){var Te=Lt._geo.project(Tt.lonlat);ee=Te[0],ve=Te[1]}else{var He=Lt._xA,Ge=Lt._yA;if(He&&Ge)ee=He.c2p(Tt.x),ve=Ge.c2p(Tt.y);else return 90}if(Lt._geo){var cr=Tt.lonlat[0],ur=Tt.lonlat[1],jr=Lt._geo.project([cr,ur+1e-5]),Wr=Lt._geo.project([cr+1e-5,ur]),br=ut(Wr[1]-ve,Wr[0]-ee),Xr=ut(jr[1]-ve,jr[0]-ee),nn;if(oe==="north")nn=Mt/180*Math.PI;else if(oe==="previous"){var Le=cr/180*Math.PI,Gt=ur/180*Math.PI,ne=qt/180*Math.PI,Ct=Wt/180*Math.PI,gt=ne-Le,St=kt(Ct)*It(gt),Nt=It(Ct)*kt(Gt)-kt(Ct)*It(Gt)*kt(gt);nn=-ut(St,Nt)-Math.PI,qt=cr,Wt=ur}var re=Pt(br,[kt(nn),0]),le=Pt(Xr,[It(nn),0]);Mt=ut(re[1]+le[1],re[0]+le[0])/Math.PI*180,oe==="previous"&&!(pe===Lt.uid&&Tt.i===fe+1)&&(Mt=null)}if(oe==="previous"&&!Lt._geo)if(pe===Lt.uid&&Tt.i===fe+1&&S(ee)&&S(ve)){var we=ee-Jt,Ue=ve-ge,qe=Lt.line&&Lt.line.shape||"",or=qe.slice(qe.length-1);or==="h"&&(Ue=0),or==="v"&&(we=0),Mt+=ut(Ue,we)/Math.PI*180+90}else Mt=null}return Jt=ee,ge=ve,fe=Tt.i,pe=Lt.uid,Mt}u.getMarkerAngle=se}),lp=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=Kc(),S=Jo(),t=kn(),e=t.strTranslate,r=Vs(),a=hi(),n=ec(),o=go(),i=Af().OPPOSITE_SIDE,l=/ [XY][0-9]* /,f=1.6,x=1.6;function y(v,T,u){var b=v._fullLayout,_=u.propContainer,P=u.propName,M=u.placeholder,C=u.traceIndex,A=u.avoid||{},h=u.attributes,p=u.transform,k=u.containerGroup,w=1,R=_.title,O=(R&&R.text?R.text:"").trim(),j=!1,V=R&&R.font?R.font:{},H=V.family,F=V.size,U=V.color,W=V.weight,q=V.style,J=V.variant,lt=V.textcase,yt=V.lineposition,mt=V.shadow,st=u.subtitlePropName,tt=!!st,dt=u.subtitlePlaceholder,rt=(_.title||{}).subtitle||{text:"",font:{}},at=(rt.text||"").trim(),vt=!1,it=1,Y=rt.font,ft=Y.family,ut=Y.size,kt=Y.color,It=Y.weight,Pt=Y.style,qt=Y.variant,Wt=Y.textcase,Jt=Y.lineposition,ge=Y.shadow,fe;P==="title.text"?fe="titleText":P.indexOf("axis")!==-1?fe="axisTitleText":P.indexOf("colorbar")!==-1&&(fe="colorbarTitleText");var pe=v._context.edits[fe];function se(Wr,br){return Wr===void 0||br===void 0?!1:Wr.replace(l," % ")===br.replace(l," % ")}O===""?w=0:se(O,M)&&(pe||(O=""),w=.2,j=!0),tt&&(at===""?it=0:se(at,dt)&&(pe||(at=""),it=.2,vt=!0)),u._meta?O=t.templateString(O,u._meta):b._meta&&(O=t.templateString(O,b._meta));var Tt=O||at||pe,Lt;k||(k=t.ensureSingle(b._infolayer,"g","g-"+T),Lt=b._hColorbarMoveTitle);var Mt=k.selectAll("text."+T).data(Tt?[0]:[]);Mt.enter().append("text"),Mt.text(O).attr("class",T),Mt.exit().remove();var ee=null,ve=T+"-subtitle",oe=at||pe;if(tt&&(ee=k.selectAll("text."+ve).data(oe?[0]:[]),ee.enter().append("text"),ee.text(at).attr("class",ve),ee.exit().remove()),!Tt)return k;function Te(Wr,br){t.syncOrAsync([He,Ge],{title:Wr,subtitle:br})}function He(Wr){var br=Wr.title,Xr=Wr.subtitle,nn;!p&&Lt&&(p={}),p?(nn="",p.rotate&&(nn+="rotate("+[p.rotate,h.x,h.y]+")"),(p.offset||Lt)&&(nn+=e(0,(p.offset||0)-(Lt||0)))):nn=null,br.attr("transform",nn);function Le(Nt){if(Nt){var re=c.select(Nt.node().parentNode).select("."+ve);if(!re.empty()){var le=Nt.node().getBBox();if(le.height){var we=le.y+le.height+f*ut;re.attr("y",we)}}}}if(br.style("opacity",w*a.opacity(U)).call(r.font,{color:a.rgb(U),size:c.round(F,2),family:H,weight:W,style:q,variant:J,textcase:lt,shadow:mt,lineposition:yt}).attr(h).call(n.convertToTspans,v,Le),Xr&&!Xr.empty()){var Gt=k.select("."+T+"-math-group"),ne=br.node().getBBox(),Ct=Gt.node()?Gt.node().getBBox():void 0,gt=Ct?Ct.y+Ct.height+f*ut:ne.y+ne.height+x*ut,St=t.extendFlat({},h,{y:gt});Xr.attr("transform",nn),Xr.style("opacity",it*a.opacity(kt)).call(r.font,{color:a.rgb(kt),size:c.round(ut,2),family:ft,weight:It,style:Pt,variant:qt,textcase:Wt,shadow:ge,lineposition:Jt}).attr(St).call(n.convertToTspans,v)}return I.previousPromises(v)}function Ge(Wr){var br=Wr.title,Xr=c.select(br.node().parentNode);if(A&&A.selection&&A.side&&O){Xr.attr("transform",null);var nn=i[A.side],Le=A.side==="left"||A.side==="top"?-1:1,Gt=g(A.pad)?A.pad:2,ne=r.bBox(Xr.node()),Ct={t:0,b:0,l:0,r:0},gt=v._fullLayout._reservedMargin;for(var St in gt)for(var Nt in gt[St]){var re=gt[St][Nt];Ct[Nt]=Math.max(Ct[Nt],re)}var le={left:Ct.l,top:Ct.t,right:b.width-Ct.r,bottom:b.height-Ct.b},we=A.maxShift||Le*(le[A.side]-ne[A.side]),Ue=0;if(we<0)Ue=we;else{var qe=A.offsetLeft||0,or=A.offsetTop||0;ne.left-=qe,ne.right-=qe,ne.top-=or,ne.bottom-=or,A.selection.each(function(){var Ar=r.bBox(this);t.bBoxIntersect(ne,Ar,Gt)&&(Ue=Math.max(Ue,Le*(Ar[A.side]-ne[nn])+Gt))}),Ue=Math.min(we,Ue),_._titleScoot=Math.abs(Ue)}if(Ue>0||we<0){var Sr={left:[-Ue,0],right:[Ue,0],top:[0,-Ue],bottom:[0,Ue]}[A.side];Xr.attr("transform",e(Sr[0],Sr[1]))}}}Mt.call(Te,ee);function cr(Wr,br){Wr.text(br).on("mouseover.opacity",function(){c.select(this).transition().duration(o.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){c.select(this).transition().duration(o.HIDE_PLACEHOLDER).style("opacity",0)})}if(pe&&(O?Mt.on(".opacity",null):(cr(Mt,M),j=!0),Mt.call(n.makeEditable,{gd:v}).on("edit",function(Wr){C!==void 0?S.call("_guiRestyle",v,P,Wr,C):S.call("_guiRelayout",v,P,Wr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Te)}).on("input",function(Wr){this.text(Wr||" ").call(n.positionText,h.x,h.y)}),tt)){if(tt&&!O){var ur=Mt.node().getBBox(),jr=ur.y+ur.height+x*ut;ee.attr("y",jr)}at?ee.on(".opacity",null):(cr(ee,dt),vt=!0),ee.call(n.makeEditable,{gd:v}).on("edit",function(Wr){S.call("_guiRelayout",v,"title.subtitle.text",Wr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Te)}).on("input",function(Wr){this.text(Wr||" ").call(n.positionText,ee.attr("x"),ee.attr("y"))})}return Mt.classed("js-placeholder",j),ee&&!ee.empty()&&ee.classed("js-placeholder",vt),k}Z.exports={draw:y,SUBTITLE_PADDING_EM:x,SUBTITLE_PADDING_MATHJAX_EM:f}}),i0=Dt((Q,Z)=>{var c=qr(),g=Fi().utcFormat,I=kn(),S=I.numberFormat,t=Yi(),e=I.cleanNumber,r=I.ms2DateTime,a=I.dateTime2ms,n=I.ensureNumber,o=I.isArrayOrTypedArray,i=Ca(),l=i.FP_SAFE,f=i.BADNUM,x=i.LOG_CLIP,y=i.ONEWEEK,v=i.ONEDAY,T=i.ONEHOUR,u=i.ONEMIN,b=i.ONESEC,_=Rc(),P=ic(),M=P.HOUR_PATTERN,C=P.WEEKDAY_PATTERN;function A(p){return Math.pow(10,p)}function h(p){return p!=null}Z.exports=function(p,k){k=k||{};var w=p._id||"x",R=w.charAt(0);function O(rt,at){if(rt>0)return Math.log(rt)/Math.LN10;if(rt<=0&&at&&p.range&&p.range.length===2){var vt=p.range[0],it=p.range[1];return .5*(vt+it-2*x*Math.abs(vt-it))}else return f}function j(rt,at,vt,it){if((it||{}).msUTC&&t(rt))return+rt;var Y=a(rt,vt||p.calendar);if(Y===f)if(t(rt)){rt=+rt;var ft=Math.floor(I.mod(rt+.05,1)*10),ut=Math.round(rt-ft/10);Y=a(new Date(ut))+ft/10}else return f;return Y}function V(rt,at,vt){return r(rt,at,vt||p.calendar)}function H(rt){return p._categories[Math.round(rt)]}function F(rt){if(h(rt)){if(p._categoriesMap===void 0&&(p._categoriesMap={}),p._categoriesMap[rt]!==void 0)return p._categoriesMap[rt];p._categories.push(typeof rt=="number"?String(rt):rt);var at=p._categories.length-1;return p._categoriesMap[rt]=at,at}return f}function U(rt,at){for(var vt=new Array(at),it=0;itp.range[1]&&(vt=!vt);for(var it=vt?-1:1,Y=it*rt,ft=0,ut=0;utIt)ft=ut+1;else{ft=Y<(kt+It)/2?ut:ut+1;break}}var Pt=p._B[ft]||0;return isFinite(Pt)?lt(rt,p._m2,Pt):0},st=function(rt){var at=p._rangebreaks.length;if(!at)return yt(rt,p._m,p._b);for(var vt=0,it=0;itp._rangebreaks[it].pmax&&(vt=it+1);return yt(rt,p._m2,p._B[vt])}}p.c2l=p.type==="log"?O:n,p.l2c=p.type==="log"?A:n,p.l2p=mt,p.p2l=st,p.c2p=p.type==="log"?function(rt,at){return mt(O(rt,at))}:mt,p.p2c=p.type==="log"?function(rt){return A(st(rt))}:st,["linear","-"].indexOf(p.type)!==-1?(p.d2r=p.r2d=p.d2c=p.r2c=p.d2l=p.r2l=e,p.c2d=p.c2r=p.l2d=p.l2r=n,p.d2p=p.r2p=function(rt){return p.l2p(e(rt))},p.p2d=p.p2r=st,p.cleanPos=n):p.type==="log"?(p.d2r=p.d2l=function(rt,at){return O(e(rt),at)},p.r2d=p.r2c=function(rt){return A(e(rt))},p.d2c=p.r2l=e,p.c2d=p.l2r=n,p.c2r=O,p.l2d=A,p.d2p=function(rt,at){return p.l2p(p.d2r(rt,at))},p.p2d=function(rt){return A(st(rt))},p.r2p=function(rt){return p.l2p(e(rt))},p.p2r=st,p.cleanPos=n):p.type==="date"?(p.d2r=p.r2d=I.identity,p.d2c=p.r2c=p.d2l=p.r2l=j,p.c2d=p.c2r=p.l2d=p.l2r=V,p.d2p=p.r2p=function(rt,at,vt){return p.l2p(j(rt,0,vt))},p.p2d=p.p2r=function(rt,at,vt){return V(st(rt),at,vt)},p.cleanPos=function(rt){return I.cleanDate(rt,f,p.calendar)}):p.type==="category"?(p.d2c=p.d2l=F,p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=J(rt);return at!==void 0?at:p.fraction2r(.5)},p.l2r=p.c2r=n,p.r2l=J,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return typeof rt=="string"&&rt!==""?rt:n(rt)}):p.type==="multicategory"&&(p.r2d=p.c2d=p.l2d=H,p.d2r=p.d2l_noadd=q,p.r2c=function(rt){var at=q(rt);return at!==void 0?at:p.fraction2r(.5)},p.r2c_just_indices=W,p.l2r=p.c2r=n,p.r2l=q,p.d2p=function(rt){return p.l2p(p.r2c(rt))},p.p2d=function(rt){return H(st(rt))},p.r2p=p.d2p,p.p2r=st,p.cleanPos=function(rt){return Array.isArray(rt)||typeof rt=="string"&&rt!==""?rt:n(rt)},p.setupMultiCategory=function(rt){var at=p._traceIndices,vt,it,Y=p._matchGroup;if(Y&&p._categories.length===0){for(var ft in Y)if(ft!==w){var ut=k[_.id2name(ft)];at=at.concat(ut._traceIndices)}}var kt=[[0,{}],[0,{}]],It=[];for(vt=0;vtut[1]&&(it[ft?0:1]=vt),it[0]===it[1]){var kt=p.l2r(at),It=p.l2r(vt);if(at!==void 0){var Pt=kt+1;vt!==void 0&&(Pt=Math.min(Pt,It)),it[ft?1:0]=Pt}if(vt!==void 0){var qt=It+1;at!==void 0&&(qt=Math.max(qt,kt)),it[ft?0:1]=qt}}}},p.cleanRange=function(rt,at){p._cleanRange(rt,at),p.limitRange(rt)},p._cleanRange=function(rt,at){at||(at={}),rt||(rt="range");var vt=I.nestedProperty(p,rt).get(),it,Y;if(p.type==="date"?Y=I.dfltRange(p.calendar):R==="y"?Y=P.DFLTRANGEY:p._name==="realaxis"?Y=[0,1]:Y=at.dfltRange||P.DFLTRANGEX,Y=Y.slice(),(p.rangemode==="tozero"||p.rangemode==="nonnegative")&&(Y[0]=0),!vt||vt.length!==2){I.nestedProperty(p,rt).set(Y);return}var ft=vt[0]===null,ut=vt[1]===null;for(p.type==="date"&&!p.autorange&&(vt[0]=I.cleanDate(vt[0],f,p.calendar),vt[1]=I.cleanDate(vt[1],f,p.calendar)),it=0;it<2;it++)if(p.type==="date"){if(!I.isDateTime(vt[it],p.calendar)){p[rt]=Y;break}if(p.r2l(vt[0])===p.r2l(vt[1])){var kt=I.constrain(p.r2l(vt[0]),I.MIN_MS+1e3,I.MAX_MS-1e3);vt[0]=p.l2r(kt-1e3),vt[1]=p.l2r(kt+1e3);break}}else{if(!t(vt[it]))if(!(ft||ut)&&t(vt[1-it]))vt[it]=vt[1-it]*(it?10:.1);else{p[rt]=Y;break}if(vt[it]<-l?vt[it]=-l:vt[it]>l&&(vt[it]=l),vt[0]===vt[1]){var It=Math.max(1,Math.abs(vt[0]*1e-6));vt[0]-=It,vt[1]+=It}}},p.setScale=function(rt){var at=k._size;if(p.overlaying){var vt=_.getFromId({_fullLayout:k},p.overlaying);p.domain=vt.domain}var it=rt&&p._r?"_r":"range",Y=p.calendar;p.cleanRange(it);var ft=p.r2l(p[it][0],Y),ut=p.r2l(p[it][1],Y),kt=R==="y";if(kt?(p._offset=at.t+(1-p.domain[1])*at.h,p._length=at.h*(p.domain[1]-p.domain[0]),p._m=p._length/(ft-ut),p._b=-p._m*ut):(p._offset=at.l+p.domain[0]*at.w,p._length=at.w*(p.domain[1]-p.domain[0]),p._m=p._length/(ut-ft),p._b=-p._m*ft),p._rangebreaks=[],p._lBreaks=0,p._m2=0,p._B=[],p.rangebreaks){var It,Pt;if(p._rangebreaks=p.locateBreaks(Math.min(ft,ut),Math.max(ft,ut)),p._rangebreaks.length){for(It=0;Itut&&(qt=!qt),qt&&p._rangebreaks.reverse();var Wt=qt?-1:1;for(p._m2=Wt*p._length/(Math.abs(ut-ft)-p._lBreaks),p._B.push(-p._m2*(kt?ut:ft)),It=0;ItY&&(Y+=7,ftY&&(Y+=24,ft=it&&ft=it&&rt=oe.min&&(Ltoe.max&&(oe.max=Mt),ee=!1)}ee&&ut.push({min:Lt,max:Mt})}};for(vt=0;vt{var c=Yi(),g=kn(),I=Ca().BADNUM,S=g.isArrayOrTypedArray,t=g.isDateTime,e=g.cleanNumber,r=Math.round;Z.exports=function(x,y,v){var T=x,u=v.noMultiCategory;if(S(T)&&!T.length)return"-";if(!u&&f(T))return"multicategory";if(u&&Array.isArray(T[0])){for(var b=[],_=0;_b*2}function i(x){return Math.max(1,(x-1)/1e3)}function l(x,y){for(var v=x.length,T=i(v),u=0,b=0,_={},P=0;Pu*2}function f(x){return S(x[0])&&S(x[1])}}),Y0=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=kn(),S=Ca().FP_SAFE,t=Jo(),e=Vs(),r=Rc(),a=r.getFromId,n=r.isLinked;Z.exports={applyAutorangeOptions:k,getAutoRange:o,makePadFn:l,doAutoRange:v,findExtremes:T,concatExtremes:y};function o(w,R){var O,j,V=[],H=w._fullLayout,F=l(H,R,0),U=l(H,R,1),W=y(w,R),q=W.min,J=W.max;if(q.length===0||J.length===0)return I.simpleMap(R.range,R.r2l);var lt=q[0].val,yt=J[0].val;for(O=1;O0&&(Pt=vt-F(ft)-U(ut),Pt>it?qt/Pt>Y&&(kt=ft,It=ut,Y=qt/Pt):qt/vt>Y&&(kt={val:ft.val,nopad:1},It={val:ut.val,nopad:1},Y=qt/vt));function Wt(se,Tt){return Math.max(se,U(Tt))}if(lt===yt){var Jt=lt-1,ge=lt+1;if(rt)if(lt===0)V=[0,1];else{var fe=(lt>0?J:q).reduce(Wt,0),pe=lt/(1-Math.min(.5,fe/vt));V=lt>0?[0,pe]:[pe,0]}else at?V=[Math.max(0,Jt),Math.max(1,ge)]:V=[Jt,ge]}else rt?(kt.val>=0&&(kt={val:0,nopad:1}),It.val<=0&&(It={val:0,nopad:1})):at&&(kt.val-Y*F(kt)<0&&(kt={val:0,nopad:1}),It.val<=0&&(It={val:1,nopad:1})),Y=(It.val-kt.val-i(R,ft.val,ut.val))/(vt-F(kt)-U(It)),V=[kt.val-Y*F(kt),It.val+Y*U(It)];return V=k(V,R),R.limitRange&&R.limitRange(),st&&V.reverse(),I.simpleMap(V,R.l2r||Number)}function i(w,R,O){var j=0;if(w.rangebreaks)for(var V=w.locateBreaks(R,O),H=0;H0?O.ppadplus:O.ppadminus)||O.ppad||0),ft=it((w._m>0?O.ppadminus:O.ppadplus)||O.ppad||0),ut=it(O.vpadplus||O.vpad),kt=it(O.vpadminus||O.vpad);if(!q){if(at=1/0,vt=-1/0,W)for(lt=0;lt0&&(at=yt),yt>vt&&yt-S&&(at=yt),yt>vt&&yt=qt;lt--)Pt(lt);return{min:j,max:V,opts:O}}function u(w,R,O,j){_(w,R,O,j,M)}function b(w,R,O,j){_(w,R,O,j,C)}function _(w,R,O,j,V){for(var H=j.tozero,F=j.extrapad,U=!0,W=0;W=O&&(q.extrapad||!F)){U=!1;break}else V(R,q.val)&&q.pad<=O&&(F||!q.extrapad)&&(w.splice(W,1),W--)}if(U){var J=H&&R===0;w.push({val:R,pad:J?0:O,extrapad:J?!1:F})}}function P(w){return g(w)&&Math.abs(w)=R}function A(w,R){var O=R.autorangeoptions;return O&&O.minallowed!==void 0&&p(R,O.minallowed,O.maxallowed)?O.minallowed:O&&O.clipmin!==void 0&&p(R,O.clipmin,O.clipmax)?Math.max(w,R.d2l(O.clipmin)):w}function h(w,R){var O=R.autorangeoptions;return O&&O.maxallowed!==void 0&&p(R,O.minallowed,O.maxallowed)?O.maxallowed:O&&O.clipmax!==void 0&&p(R,O.clipmin,O.clipmax)?Math.min(w,R.d2l(O.clipmax)):w}function p(w,R,O){return R!==void 0&&O!==void 0?(R=w.d2l(R),O=w.d2l(O),R=W&&(H=W,O=W),F<=W&&(F=W,j=W)}}return O=A(O,R),j=h(j,R),[O,j]}}),Ls=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=Kc(),S=Jo(),t=kn(),e=t.strTranslate,r=ec(),a=lp(),n=hi(),o=Vs(),i=Td(),l=Nh(),f=Ca(),x=f.ONEMAXYEAR,y=f.ONEAVGYEAR,v=f.ONEMINYEAR,T=f.ONEMAXQUARTER,u=f.ONEAVGQUARTER,b=f.ONEMINQUARTER,_=f.ONEMAXMONTH,P=f.ONEAVGMONTH,M=f.ONEMINMONTH,C=f.ONEWEEK,A=f.ONEDAY,h=A/2,p=f.ONEHOUR,k=f.ONEMIN,w=f.ONESEC,R=f.ONEMILLI,O=f.ONEMICROSEC,j=f.MINUS_SIGN,V=f.BADNUM,H={K:"zeroline"},F={K:"gridline",L:"path"},U={K:"minor-gridline",L:"path"},W={K:"tick",L:"path"},q={K:"tick",L:"text"},J={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},lt=Af(),yt=lt.MID_SHIFT,mt=lt.CAP_SHIFT,st=lt.LINE_SPACING,tt=lt.OPPOSITE_SIDE,dt=3,rt=Z.exports={};rt.setConvert=i0();var at=dv(),vt=Rc(),it=vt.idSort,Y=vt.isLinked;rt.id2name=vt.id2name,rt.name2id=vt.name2id,rt.cleanId=vt.cleanId,rt.list=vt.list,rt.listIds=vt.listIds,rt.getFromId=vt.getFromId,rt.getFromTrace=vt.getFromTrace;var ft=Y0();rt.getAutoRange=ft.getAutoRange,rt.findExtremes=ft.findExtremes;var ut=1e-4;function kt(ze){var Ie=(ze[1]-ze[0])*ut;return[ze[0]-Ie,ze[1]+Ie]}rt.coerceRef=function(ze,Ie,Rr,$r,Gr,Br){var Yr=$r.charAt($r.length-1),pn=Rr._fullLayout._subplots[Yr+"axis"],on=$r+"ref",Ce={};return Gr||(Gr=pn[0]||(typeof Br=="string"?Br:Br[0])),Br||(Br=Gr),pn=pn.concat(pn.map(function(dr){return dr+" domain"})),Ce[on]={valType:"enumerated",values:pn.concat(Br?typeof Br=="string"?[Br]:Br:[]),dflt:Gr},t.coerce(ze,Ie,Ce,on)},rt.getRefType=function(ze){return ze===void 0?ze:ze==="paper"?"paper":ze==="pixel"?"pixel":/( domain)$/.test(ze)?"domain":"range"},rt.coercePosition=function(ze,Ie,Rr,$r,Gr,Br){var Yr,pn,on=rt.getRefType($r);if(on!=="range")Yr=t.ensureNumber,pn=Rr(Gr,Br);else{var Ce=rt.getFromId(Ie,$r);Br=Ce.fraction2r(Br),pn=Rr(Gr,Br),Yr=Ce.cleanPos}ze[Gr]=Yr(pn)},rt.cleanPosition=function(ze,Ie,Rr){var $r=Rr==="paper"||Rr==="pixel"?t.ensureNumber:rt.getFromId(Ie,Rr).cleanPos;return $r(ze)},rt.redrawComponents=function(ze,Ie){Ie=Ie||rt.listIds(ze);var Rr=ze._fullLayout;function $r(Gr,Br,Yr,pn){for(var on=S.getComponentMethod(Gr,Br),Ce={},dr=0;dr2e-6||((Rr-ze._forceTick0)/ze._minDtick%1+1.000001)%1>2e-6)&&(ze._minDtick=0))},rt.saveRangeInitial=function(ze,Ie){for(var Rr=rt.list(ze,"",!0),$r=!1,Gr=0;GrHr*.3||Ce($r)||Ce(Gr))){var _n=Rr.dtick/2;ze+=ze+_n<$r?_n:-_n}return ze}function Jt(ze,Ie,Rr,$r,Gr){var Br=t.findExactDates(Ie,Gr),Yr=.8;if(Br.exactDays>Yr){var pn=Number(Rr.substr(1));Br.exactYears>Yr&&pn%12===0?ze=rt.tickIncrement(ze,"M6","reverse")+A*1.5:Br.exactMonths>Yr?ze=rt.tickIncrement(ze,"M1","reverse")+A*15.5:ze-=h;var on=rt.tickIncrement(ze,Rr);if(on<=$r)return on}return ze}rt.prepMinorTicks=function(ze,Ie,Rr){if(!Ie.minor.dtick){delete ze.dtick;var $r=Ie.dtick&&g(Ie._tmin),Gr;if($r){var Br=rt.tickIncrement(Ie._tmin,Ie.dtick,!0);Gr=[Ie._tmin,Br*.99+Ie._tmin*.01]}else{var Yr=t.simpleMap(Ie.range,Ie.r2l);Gr=[Yr[0],.8*Yr[0]+.2*Yr[1]]}if(ze.range=t.simpleMap(Gr,Ie.l2r),ze._isMinor=!0,rt.prepTicks(ze,Rr),$r){var pn=g(Ie.dtick),on=g(ze.dtick),Ce=pn?Ie.dtick:+Ie.dtick.substring(1),dr=on?ze.dtick:+ze.dtick.substring(1);pn&&on?ge(Ce,dr)?Ce===2*C&&dr===2*A&&(ze.dtick=C):Ce===2*C&&dr===3*A?ze.dtick=C:Ce===C&&!(Ie._input.minor||{}).nticks?ze.dtick=A:fe(Ce/dr,2.5)?ze.dtick=Ce/2:ze.dtick=Ce:String(Ie.dtick).charAt(0)==="M"?on?ze.dtick="M1":ge(Ce,dr)?Ce>=12&&dr===2&&(ze.dtick="M3"):ze.dtick=Ie.dtick:String(ze.dtick).charAt(0)==="L"?String(Ie.dtick).charAt(0)==="L"?ge(Ce,dr)||(ze.dtick=fe(Ce/dr,2.5)?Ie.dtick/2:Ie.dtick):ze.dtick="D1":ze.dtick==="D2"&&+Ie.dtick>1&&(ze.dtick=1)}ze.range=Ie.range}Ie.minor._tick0Init===void 0&&(ze.tick0=Ie.tick0)};function ge(ze,Ie){return Math.abs((ze/Ie+.5)%1-.5)<.001}function fe(ze,Ie){return Math.abs(ze/Ie-1)<.001}rt.prepTicks=function(ze,Ie){var Rr=t.simpleMap(ze.range,ze.r2l,void 0,void 0,Ie);if(ze.tickmode==="auto"||!ze.dtick){var $r=ze.nticks,Gr;$r||(ze.type==="category"||ze.type==="multicategory"?(Gr=ze.tickfont?t.bigFont(ze.tickfont.size||12):15,$r=ze._length/Gr):(Gr=ze._id.charAt(0)==="y"?40:80,$r=t.constrain(ze._length/Gr,4,9)+1),ze._name==="radialaxis"&&($r*=2)),ze.minor&&ze.minor.tickmode!=="array"||ze.tickmode==="array"&&($r*=100),ze._roughDTick=Math.abs(Rr[1]-Rr[0])/$r,rt.autoTicks(ze,ze._roughDTick),ze._minDtick>0&&ze.dtick0?(Br=$r-1,Yr=$r):(Br=$r,Yr=$r);var pn=ze[Br].value,on=ze[Yr].value,Ce=Math.abs(on-pn),dr=Rr||Ce,Hr=0;dr>=v?Ce>=v&&Ce<=x?Hr=Ce:Hr=y:Rr===u&&dr>=b?Ce>=b&&Ce<=T?Hr=Ce:Hr=u:dr>=M?Ce>=M&&Ce<=_?Hr=Ce:Hr=P:Rr===C&&dr>=C?Hr=C:dr>=A?Hr=A:Rr===h&&dr>=h?Hr=h:Rr===p&&dr>=p&&(Hr=p);var _n;Hr>=Ce&&(Hr=Ce,_n=!0);var Fn=Gr+Hr;if(Ie.rangebreaks&&Hr>0){for(var Qn=84,Pn=0,En=0;EnC&&(Hr=Ce)}(Hr>0||$r===0)&&(ze[$r].periodX=Gr+Hr/2)}}rt.calcTicks=function(ze,Ie){for(var Rr=ze.type,$r=ze.calendar,Gr=ze.ticklabelstep,Br=ze.ticklabelmode==="period",Yr=ze.range[0]>ze.range[1],pn=!ze.ticklabelindex||t.isArrayOrTypedArray(ze.ticklabelindex)?ze.ticklabelindex:[ze.ticklabelindex],on=t.simpleMap(ze.range,ze.r2l,void 0,void 0,Ie),Ce=on[1]=(La?0:1);Vi--){var Qa=!Vi;Vi?(ze._dtickInit=ze.dtick,ze._tick0Init=ze.tick0):(ze.minor._dtickInit=ze.minor.dtick,ze.minor._tick0Init=ze.minor.tick0);var Ja=Vi?ze:t.extendFlat({},ze,ze.minor);if(Qa?rt.prepMinorTicks(Ja,ze,Ie):rt.prepTicks(Ja,Ie),Ja.tickmode==="array"){Vi?(Pn=[],Fn=ee(ze,!Qa)):(En=[],Qn=ee(ze,!Qa));continue}if(Ja.tickmode==="sync"){Pn=[],Fn=Mt(ze);continue}var Do=kt(on),yo=Do[0],Fo=Do[1],Da=g(Ja.dtick),ys=Rr==="log"&&!(Da||Ja.dtick.charAt(0)==="L"),os=rt.tickFirst(Ja,Ie);if(Vi){if(ze._tmin=os,os=Fo:Zo<=Fo;Zo=rt.tickIncrement(Zo,cl,Ce,$r)){if(Vi&&Ks++,Ja.rangebreaks&&!Ce){if(Zo=Hr)break}if(Pn.length>_n||Zo===ul)break;ul=Zo;var Qs={value:Zo};Vi?(ys&&Zo!==(Zo|0)&&(Qs.simpleLabel=!0),Gr>1&&Ks%Gr&&(Qs.skipLabel=!0),Pn.push(Qs)):(Qs.minor=!0,En.push(Qs))}}if(!En||En.length<2)pn=!1;else{var Nl=(En[1].value-En[0].value)*(Yr?-1:1);Wa(Nl,ze.tickformat)||(pn=!1)}if(!pn)Zn=Pn;else{var cs=Pn.concat(En);Br&&Pn.length&&(cs=cs.slice(1)),cs=cs.sort(function(hl,ts){return hl.value-ts.value}).filter(function(hl,ts,Su){return ts===0||hl.value!==Su[ts-1].value});var Ps=cs.map(function(hl,ts){return hl.minor===void 0&&!hl.skipLabel?ts:null}).filter(function(hl){return hl!==null});Ps.forEach(function(hl){pn.map(function(ts){var Su=hl+ts;Su>=0&&Su-1;qs--){if(Pn[qs].drop){Pn.splice(qs,1);continue}Pn[qs].value=Oi(Pn[qs].value,ze);var al=ze.c2p(Pn[qs].value);(Ql?Gl>al-Xo:GlHr||GuHr&&(Su.periodX=Hr),GuGr&&_ny)Ie/=y,$r=Gr(10),ze.dtick="M"+12*jr(Ie,$r,ve);else if(Br>P)Ie/=P,ze.dtick="M"+jr(Ie,1,oe);else if(Br>A){if(ze.dtick=jr(Ie,A,ze._hasDayOfWeekBreaks?[1,2,7,14]:He),!Rr){var Yr=rt.getTickFormat(ze),pn=ze.ticklabelmode==="period";pn&&(ze._rawTick0=ze.tick0),/%[uVW]/.test(Yr)?ze.tick0=t.dateTick0(ze.calendar,2):ze.tick0=t.dateTick0(ze.calendar,1),pn&&(ze._dowTick0=ze.tick0)}}else Br>p?ze.dtick=jr(Ie,p,oe):Br>k?ze.dtick=jr(Ie,k,Te):Br>w?ze.dtick=jr(Ie,w,Te):($r=Gr(10),ze.dtick=jr(Ie,$r,ve))}else if(ze.type==="log"){ze.tick0=0;var on=t.simpleMap(ze.range,ze.r2l);if(ze._isMinor&&(Ie*=1.5),Ie>.7)ze.dtick=Math.ceil(Ie);else if(Math.abs(on[1]-on[0])<1){var Ce=1.5*Math.abs((on[1]-on[0])/Ie);Ie=Math.abs(Math.pow(10,on[1])-Math.pow(10,on[0]))/Ce,$r=Gr(10),ze.dtick="L"+jr(Ie,$r,ve)}else ze.dtick=Ie>.3?"D2":"D1"}else ze.type==="category"||ze.type==="multicategory"?(ze.tick0=0,ze.dtick=Math.ceil(Math.max(Ie,1))):ki(ze)?(ze.tick0=0,$r=1,ze.dtick=jr(Ie,$r,ur)):(ze.tick0=0,$r=Gr(10),ze.dtick=jr(Ie,$r,ve));if(ze.dtick===0&&(ze.dtick=1),!g(ze.dtick)&&typeof ze.dtick!="string"){var dr=ze.dtick;throw ze.dtick=1,"ax.dtick error: "+String(dr)}};function Wr(ze){var Ie=ze.dtick;if(ze._tickexponent=0,!g(Ie)&&typeof Ie!="string"&&(Ie=1),(ze.type==="category"||ze.type==="multicategory")&&(ze._tickround=null),ze.type==="date"){var Rr=ze.r2l(ze.tick0),$r=ze.l2r(Rr).replace(/(^-|i)/g,""),Gr=$r.length;if(String(Ie).charAt(0)==="M")Gr>10||$r.substr(5)!=="01-01"?ze._tickround="d":ze._tickround=+Ie.substr(1)%12===0?"y":"m";else if(Ie>=A&&Gr<=10||Ie>=A*15)ze._tickround="d";else if(Ie>=k&&Gr<=16||Ie>=p)ze._tickround="M";else if(Ie>=w&&Gr<=19||Ie>=k)ze._tickround="S";else{var Br=ze.l2r(Rr+Ie).replace(/^-/,"").length;ze._tickround=Math.max(Gr,Br)-20,ze._tickround<0&&(ze._tickround=4)}}else if(g(Ie)||Ie.charAt(0)==="L"){var Yr=ze.range.map(ze.r2d||Number);g(Ie)||(Ie=Number(Ie.substr(1))),ze._tickround=2-Math.floor(Math.log(Ie)/Math.LN10+.01);var pn=Math.max(Math.abs(Yr[0]),Math.abs(Yr[1])),on=Math.floor(Math.log(pn)/Math.LN10+.01),Ce=ze.minexponent===void 0?3:ze.minexponent;Math.abs(on)>Ce&&(re(ze.exponentformat)&&ze.exponentformat!=="SI extended"&&!le(on)||re(ze.exponentformat)&&ze.exponentformat==="SI extended"&&!we(on)?ze._tickexponent=3*Math.round((on-1)/3):ze._tickexponent=on)}else ze._tickround=null}rt.tickIncrement=function(ze,Ie,Rr,$r){var Gr=Rr?-1:1;if(g(Ie))return t.increment(ze,Gr*Ie);var Br=Ie.charAt(0),Yr=Gr*Number(Ie.substr(1));if(Br==="M")return t.incrementMonth(ze,Yr,$r);if(Br==="L")return Math.log(Math.pow(10,ze)+Yr)/Math.LN10;if(Br==="D"){var pn=Ie==="D2"?cr:Ge,on=ze+Gr*.01,Ce=t.roundUp(t.mod(on,1),pn,Rr);return Math.floor(on)+Math.log(c.round(Math.pow(10,Ce),1))/Math.LN10}throw"unrecognized dtick "+String(Ie)},rt.tickFirst=function(ze,Ie){var Rr=ze.r2l||Number,$r=t.simpleMap(ze.range,Rr,void 0,void 0,Ie),Gr=$r[1]<$r[0],Br=Gr?Math.floor:Math.ceil,Yr=kt($r)[0],pn=ze.dtick,on=Rr(ze.tick0);if(g(pn)){var Ce=Br((Yr-on)/pn)*pn+on;return(ze.type==="category"||ze.type==="multicategory")&&(Ce=t.constrain(Ce,0,ze._categories.length-1)),Ce}var dr=pn.charAt(0),Hr=Number(pn.substr(1));if(dr==="M"){for(var _n=0,Fn=on,Qn,Pn,En;_n<10;){if(Qn=rt.tickIncrement(Fn,pn,Gr,ze.calendar),(Qn-Yr)*(Fn-Yr)<=0)return Gr?Math.min(Fn,Qn):Math.max(Fn,Qn);Pn=(Yr-(Fn+Qn)/2)/(Qn-Fn),En=dr+(Math.abs(Math.round(Pn))||1)*Hr,Fn=rt.tickIncrement(Fn,En,Pn<0?!Gr:Gr,ze.calendar),_n++}return t.error("tickFirst did not converge",ze),Fn}else{if(dr==="L")return Math.log(Br((Math.pow(10,Yr)-on)/Hr)*Hr+on)/Math.LN10;if(dr==="D"){var Zn=pn==="D2"?cr:Ge,La=t.roundUp(t.mod(Yr,1),Zn,Gr);return Math.floor(Yr)+Math.log(c.round(Math.pow(10,La),1))/Math.LN10}else throw"unrecognized dtick "+String(pn)}},rt.tickText=function(ze,Ie,Rr,$r){var Gr=br(ze,Ie),Br=ze.tickmode==="array",Yr=Rr||Br,pn=ze.type,on=pn==="category"?ze.d2l_noadd:ze.d2l,Ce,dr=function(En){var Zn=ze.l2p(En);return Zn>=0&&Zn<=ze._length?En:null};if(Br&&t.isArrayOrTypedArray(ze.ticktext)){var Hr=t.simpleMap(ze.range,ze.r2l),_n=(Math.abs(Hr[1]-Hr[0])-(ze._lBreaks||0))/1e4;for(Ce=0;Ce"+pn;else{var Ce=ji(ze),dr=ze._trueSide||ze.side;(!Ce&&dr==="top"||Ce&&dr==="bottom")&&(Yr+="
")}Ie.text=Yr}function nn(ze,Ie,Rr,$r,Gr){var Br=ze.dtick,Yr=Ie.x,pn=ze.tickformat,on=typeof Br=="string"&&Br.charAt(0);if(Gr==="never"&&(Gr=""),$r&&on!=="L"&&(Br="L3",on="L"),pn||on==="L")Ie.text=qe(Math.pow(10,Yr),ze,Gr,$r);else if(g(Br)||on==="D"&&(ze.minorloglabels==="complete"||t.mod(Yr+.01,1)<.1)){ze.minorloglabels==="complete"&&!(t.mod(Yr+.01,1)<.1)&&(Ie.fontSize*=.75);var Ce=Math.pow(10,Yr).toExponential(0),dr=Ce.split("e"),Hr=+dr[1],_n=Math.abs(Hr),Fn=ze.exponentformat;Fn==="power"||re(Fn)&&Fn!=="SI extended"&&le(Hr)||re(Fn)&&Fn==="SI extended"&&we(Hr)?(Ie.text=dr[0],_n>0&&(Ie.text+="x10"),Ie.text==="1x10"&&(Ie.text="10"),Hr!==0&&Hr!==1&&(Ie.text+=""+(Hr>0?"":j)+_n+""),Ie.fontSize*=1.25):(Fn==="e"||Fn==="E")&&_n>2?Ie.text=dr[0]+Fn+(Hr>0?"+":j)+_n:(Ie.text=qe(Math.pow(10,Yr),ze,"","fakehover"),Br==="D1"&&ze._id.charAt(0)==="y"&&(Ie.dy-=Ie.fontSize/6))}else if(on==="D")Ie.text=ze.minorloglabels==="none"?"":String(Math.round(Math.pow(10,t.mod(Yr,1)))),Ie.fontSize*=.75;else throw"unrecognized dtick "+String(Br);if(ze.dtick==="D1"){var Qn=String(Ie.text).charAt(0);(Qn==="0"||Qn==="1")&&(ze._id.charAt(0)==="y"?Ie.dx-=Ie.fontSize/4:(Ie.dy+=Ie.fontSize/2,Ie.dx+=(ze.range[1]>ze.range[0]?1:-1)*Ie.fontSize*(Yr<0?.5:.25)))}}function Le(ze,Ie){var Rr=ze._categories[Math.round(Ie.x)];Rr===void 0&&(Rr=""),Ie.text=String(Rr)}function Gt(ze,Ie,Rr){var $r=Math.round(Ie.x),Gr=ze._categories[$r]||[],Br=Gr[1]===void 0?"":String(Gr[1]),Yr=Gr[0]===void 0?"":String(Gr[0]);Rr?Ie.text=Yr+" - "+Br:(Ie.text=Br,Ie.text2=Yr)}function ne(ze,Ie,Rr,$r,Gr){Gr==="never"?Gr="":ze.showexponent==="all"&&Math.abs(Ie.x/ze.dtick)<1e-6&&(Gr="hide"),Ie.text=qe(Ie.x,ze,Gr,$r)}function Ct(ze,Ie,Rr,$r,Gr){if(ze.thetaunit==="radians"&&!Rr){var Br=Ie.x/180;if(Br===0)Ie.text="0";else{var Yr=gt(Br);if(Yr[1]>=100)Ie.text=qe(t.deg2rad(Ie.x),ze,Gr,$r);else{var pn=Ie.x<0;Yr[1]===1?Yr[0]===1?Ie.text="π":Ie.text=Yr[0]+"π":Ie.text=["",Yr[0],"","⁄","",Yr[1],"","π"].join(""),pn&&(Ie.text=j+Ie.text)}}}else Ie.text=qe(Ie.x,ze,Gr,$r)}function gt(ze){function Ie(pn,on){return Math.abs(pn-on)<=1e-6}function Rr(pn,on){return Ie(on,0)?pn:Rr(on,pn%on)}function $r(pn){for(var on=1;!Ie(Math.round(pn*on)/on,pn);)on*=10;return on}var Gr=$r(ze),Br=ze*Gr,Yr=Math.abs(Rr(Br,Gr));return[Math.round(Br/Yr),Math.round(Gr/Yr)]}var St=["f","p","n","μ","m","","k","M","G","T"],Nt=["q","r","y","z","a",...St,"P","E","Z","Y","R","Q"],re=ze=>["SI","SI extended","B"].includes(ze);function le(ze){return ze>14||ze<-15}function we(ze){return ze>32||ze<-30}function Ue(ze,Ie){return re(Ie)?!!(Ie==="SI extended"&&we(ze)||Ie!=="SI extended"&&le(ze)):!1}function qe(ze,Ie,Rr,$r){var Gr=ze<0,Br=Ie._tickround,Yr=Rr||Ie.exponentformat||"B",pn=Ie._tickexponent,on=rt.getTickFormat(Ie),Ce=Ie.separatethousands;if($r){var dr={exponentformat:Yr,minexponent:Ie.minexponent,dtick:Ie.showexponent==="none"?Ie.dtick:g(ze)&&Math.abs(ze)||1,range:Ie.showexponent==="none"?Ie.range.map(Ie.r2d):[0,ze||1]};Wr(dr),Br=(Number(dr._tickround)||0)+4,pn=dr._tickexponent,Ie.hoverformat&&(on=Ie.hoverformat)}if(on)return Ie._numFormat(on)(ze).replace(/-/g,j);var Hr=Math.pow(10,-Br)/2;if(Yr==="none"&&(pn=0),ze=Math.abs(ze),ze"+Qn+"":Yr==="B"&&pn===9?ze+="B":re(Yr)&&(ze+=Yr==="SI extended"?Nt[pn/3+10]:St[pn/3+5])}return Gr?j+ze:ze}rt.getTickFormat=function(ze){var Ie;function Rr(on){return typeof on!="string"?on:Number(on.replace("M",""))*P}function $r(on,Ce){var dr=["L","D"];if(typeof on==typeof Ce){if(typeof on=="number")return on-Ce;var Hr=dr.indexOf(on.charAt(0)),_n=dr.indexOf(Ce.charAt(0));return Hr===_n?Number(on.replace(/(L|D)/g,""))-Number(Ce.replace(/(L|D)/g,"")):Hr-_n}else return typeof on=="number"?1:-1}function Gr(on,Ce,dr){var Hr=dr||function(Qn){return Qn},_n=Ce[0],Fn=Ce[1];return(!_n&&typeof _n!="number"||Hr(_n)<=Hr(on))&&(!Fn&&typeof Fn!="number"||Hr(Fn)>=Hr(on))}function Br(on,Ce){var dr=Ce[0]===null,Hr=Ce[1]===null,_n=$r(on,Ce[0])>=0,Fn=$r(on,Ce[1])<=0;return(dr||_n)&&(Hr||Fn)}var Yr,pn;if(ze.tickformatstops&&ze.tickformatstops.length>0)switch(ze.type){case"date":case"linear":{for(Ie=0;Ie=0&&Gr.unshift(Gr.splice(dr,1).shift())}});var pn={false:{left:0,right:0}};return t.syncOrAsync(Gr.map(function(on){return function(){if(on){var Ce=rt.getFromId(ze,on);Rr||(Rr={}),Rr.axShifts=pn,Rr.overlayingShiftedAx=Yr;var dr=rt.drawOne(ze,Ce,Rr);return Ce._shiftPusher&&ci(Ce,Ce._fullDepth||0,pn,!0),Ce._r=Ce.range.slice(),Ce._rl=t.simpleMap(Ce._r,Ce.r2l),dr}}}))},rt.drawOne=function(ze,Ie,Rr){Rr=Rr||{};var $r=Rr.axShifts||{},Gr=Rr.overlayingShiftedAx||[],Br,Yr,pn;Ie.setScale();var on=ze._fullLayout,Ce=Ie._id,dr=Ce.charAt(0),Hr=rt.counterLetter(Ce),_n=on._plots[Ie._mainSubplot],Fn=Ie.zerolinelayer==="above traces";if(!_n)return;if(Ie._shiftPusher=Ie.autoshift||Gr.indexOf(Ie._id)!==-1||Gr.indexOf(Ie.overlaying)!==-1,Ie._shiftPusher&Ie.anchor==="free"){var Qn=Ie.linewidth/2||0;Ie.ticks==="inside"&&(Qn+=Ie.ticklen),ci(Ie,Qn,$r,!0),ci(Ie,Ie.shift||0,$r,!1)}(Rr.skipTitle!==!0||Ie._shift===void 0)&&(Ie._shift=za(Ie,$r));var Pn=_n[dr+"axislayer"],En=Ie._mainLinePosition,Zn=En+=Ie._shift,La=Ie._mainMirrorPosition,Vi=Ie._vals=rt.calcTicks(Ie),Qa=[Ie.mirror,Zn,La].join("_");for(Br=0;Br0?bl.bottom-Su:0,Gu))));var ac=0,mh=0;if(Ie._shiftPusher&&(ac=Math.max(Gu,bl.height>0?hl==="l"?Su-bl.left:bl.right-Su:0),Ie.title.text!==on._dfltTitle[dr]&&(mh=(Ie._titleStandoff||0)+(Ie._titleScoot||0),hl==="l"&&(mh+=oi(Ie))),Ie._fullDepth=Math.max(ac,mh)),Ie.automargin){Dl={x:0,y:0,r:0,l:0,t:0,b:0};var Jc=[0,1],ah=typeof Ie._shift=="number"?Ie._shift:0;if(dr==="x"){if(hl==="b"?Dl[hl]=Ie._depth:(Dl[hl]=Ie._depth=Math.max(bl.width>0?Su-bl.top:0,Gu),Jc.reverse()),bl.width>0){var Bf=bl.right-(Ie._offset+Ie._length);Bf>0&&(Dl.xr=1,Dl.r=Bf);var Sf=Ie._offset-bl.left;Sf>0&&(Dl.xl=0,Dl.l=Sf)}}else if(hl==="l"?(Ie._depth=Math.max(bl.height>0?Su-bl.left:0,Gu),Dl[hl]=Ie._depth-ah):(Ie._depth=Math.max(bl.height>0?bl.right-Su:0,Gu),Dl[hl]=Ie._depth+ah,Jc.reverse()),bl.height>0){var Fl=bl.bottom-(Ie._offset+Ie._length);Fl>0&&(Dl.yb=0,Dl.b=Fl);var Bc=Ie._offset-bl.top;Bc>0&&(Dl.yt=1,Dl.t=Bc)}Dl[Hr]=Ie.anchor==="free"?Ie.position:Ie._anchorAxis.domain[Jc[0]],Ie.title.text!==on._dfltTitle[dr]&&(Dl[hl]+=oi(Ie)+(Ie.title.standoff||0)),Ie.mirror&&Ie.anchor!=="free"&&(tu={x:0,y:0,r:0,l:0,t:0,b:0},tu[ts]=Ie.linewidth,Ie.mirror&&Ie.mirror!==!0&&(tu[ts]+=Gu),Ie.mirror===!0||Ie.mirror==="ticks"?tu[Hr]=Ie._anchorAxis.domain[Jc[1]]:(Ie.mirror==="all"||Ie.mirror==="allticks")&&(tu[Hr]=[Ie._counterDomainMin,Ie._counterDomainMax][Jc[1]]))}ou&&(nu=S.getComponentMethod("rangeslider","autoMarginOpts")(ze,Ie)),typeof Ie.automargin=="string"&&(or(Dl,Ie.automargin),or(tu,Ie.automargin)),I.autoMargin(ze,fr(Ie),Dl),I.autoMargin(ze,_r(Ie),tu),I.autoMargin(ze,tn(Ie),nu)}),t.syncOrAsync(Ms)}};function or(ze,Ie){if(ze){var Rr=Object.keys(J).reduce(function($r,Gr){return Ie.indexOf(Gr)!==-1&&J[Gr].forEach(function(Br){$r[Br]=1}),$r},{});Object.keys(ze).forEach(function($r){Rr[$r]||($r.length===1?ze[$r]=0:delete ze[$r])})}}function Sr(ze,Ie){var Rr=[],$r,Gr=function(Br,Yr){var pn=Br.xbnd[Yr];pn!==null&&Rr.push(t.extendFlat({},Br,{x:pn}))};if(Ie.length){for($r=0;$rze.range[1],pn=ze.ticklabelposition&&ze.ticklabelposition.indexOf("inside")!==-1,on=!pn;if(Rr){var Ce=Yr?-1:1;Rr=Rr*Ce}if($r){var dr=ze.side,Hr=pn&&(dr==="top"||dr==="left")||on&&(dr==="bottom"||dr==="right")?1:-1;$r=$r*Hr}return ze._id.charAt(0)==="x"?function(_n){return e(Gr+ze._offset+ze.l2p(Hn(_n))+Rr,Br+$r)}:function(_n){return e(Br+$r,Gr+ze._offset+ze.l2p(Hn(_n))+Rr)}};function Hn(ze){return ze.periodX!==void 0?ze.periodX:ze.x}function Wn(ze){var Ie=ze.ticklabelposition||"",Rr=ze.tickson||"",$r=function(Qn){return Ie.indexOf(Qn)!==-1},Gr=$r("top"),Br=$r("left"),Yr=$r("right"),pn=$r("bottom"),on=$r("inside"),Ce=Rr!=="boundaries"&&(pn||Br||Gr||Yr);if(!Ce&&!on)return[0,0];var dr=ze.side,Hr=Ce?(ze.tickwidth||0)/2:0,_n=dt,Fn=ze.tickfont?ze.tickfont.size:12;return(pn||Gr)&&(Hr+=Fn*mt,_n+=(ze.linewidth||0)/2),(Br||Yr)&&(Hr+=(ze.linewidth||0)/2,_n+=dt),on&&dr==="top"&&(_n-=Fn*(1-mt)),(Br||Gr)&&(Hr=-Hr),(dr==="bottom"||dr==="right")&&(_n=-_n),[Ce?Hr:0,on?_n:0]}rt.makeTickPath=function(ze,Ie,Rr,$r){$r||($r={});var Gr=$r.minor;if(Gr&&!ze.minor)return"";var Br=$r.len!==void 0?$r.len:Gr?ze.minor.ticklen:ze.ticklen,Yr=ze._id.charAt(0),pn=(ze.linewidth||1)/2;return Yr==="x"?"M0,"+(Ie+pn*Rr)+"v"+Br*Rr:"M"+(Ie+pn*Rr)+",0h"+Br*Rr},rt.makeLabelFns=function(ze,Ie,Rr){var $r=ze.ticklabelposition||"",Gr=ze.tickson||"",Br=function(Zo){return $r.indexOf(Zo)!==-1},Yr=Br("top"),pn=Br("left"),on=Br("right"),Ce=Br("bottom"),dr=Gr!=="boundaries"&&(Ce||pn||Yr||on),Hr=Br("inside"),_n=$r==="inside"&&ze.ticks==="inside"||!Hr&&ze.ticks==="outside"&&Gr!=="boundaries",Fn=0,Qn=0,Pn=_n?ze.ticklen:0;if(Hr?Pn*=-1:dr&&(Pn=0),_n&&(Fn+=Pn,Rr)){var En=t.deg2rad(Rr);Fn=Pn*Math.cos(En)+1,Qn=Pn*Math.sin(En)}ze.showticklabels&&(_n||ze.showline)&&(Fn+=.2*ze.tickfont.size),Fn+=(ze.linewidth||1)/2*(Hr?-1:1);var Zn={labelStandoff:Fn,labelShift:Qn},La,Vi,Qa,Ja,Do=0,yo=ze.side,Fo=ze._id.charAt(0),Da=ze.tickangle,ys;if(Fo==="x")ys=!Hr&&yo==="bottom"||Hr&&yo==="top",Ja=ys?1:-1,Hr&&(Ja*=-1),La=Qn*Ja,Vi=Ie+Fn*Ja,Qa=ys?1:-.2,Math.abs(Da)===90&&(Hr?Qa+=yt:Da===-90&&yo==="bottom"?Qa=mt:Da===90&&yo==="top"?Qa=yt:Qa=.5,Do=yt/2*(Da/90)),Zn.xFn=function(Zo){return Zo.dx+La+Do*Zo.fontSize},Zn.yFn=function(Zo){return Zo.dy+Vi+Zo.fontSize*Qa},Zn.anchorFn=function(Zo,Ks){if(dr){if(pn)return"end";if(on)return"start"}return!g(Ks)||Ks===0||Ks===180?"middle":Ks*Ja<0!==Hr?"end":"start"},Zn.heightFn=function(Zo,Ks,ss){return Ks<-60||Ks>60?-.5*ss:ze.side==="top"!==Hr?-ss:0};else if(Fo==="y"){if(ys=!Hr&&yo==="left"||Hr&&yo==="right",Ja=ys?1:-1,Hr&&(Ja*=-1),La=Fn,Vi=Qn*Ja,Qa=0,!Hr&&Math.abs(Da)===90&&(Da===-90&&yo==="left"||Da===90&&yo==="right"?Qa=mt:Qa=.5),Hr){var os=g(Da)?+Da:0;if(os!==0){var ul=t.deg2rad(os);Do=Math.abs(Math.sin(ul))*mt*Ja,Qa=0}}Zn.xFn=function(Zo){return Zo.dx+Ie-(La+Zo.fontSize*Qa)*Ja+Do*Zo.fontSize},Zn.yFn=function(Zo){return Zo.dy+Vi+Zo.fontSize*yt},Zn.anchorFn=function(Zo,Ks){return g(Ks)&&Math.abs(Ks)===90?"middle":ys?"end":"start"},Zn.heightFn=function(Zo,Ks,ss){return ze.side==="right"&&(Ks*=-1),Ks<-30?-ss:Ks<30?-.5*ss:0}}return Zn};function Xn(ze){return[ze.text,ze.x,ze.axInfo,ze.font,ze.fontSize,ze.fontColor].join("_")}rt.drawTicks=function(ze,Ie,Rr){Rr=Rr||{};var $r=Ie._id+"tick",Gr=[].concat(Ie.minor&&Ie.minor.ticks?Rr.vals.filter(function(Yr){return Yr.minor&&!Yr.noTick}):[]).concat(Ie.ticks?Rr.vals.filter(function(Yr){return!Yr.minor&&!Yr.noTick}):[]),Br=Rr.layer.selectAll("path."+$r).data(Gr,Xn);Br.exit().remove(),Br.enter().append("path").classed($r,1).classed("ticks",1).classed("crisp",Rr.crisp!==!1).each(function(Yr){return n.stroke(c.select(this),Yr.minor?Ie.minor.tickcolor:Ie.tickcolor)}).style("stroke-width",function(Yr){return o.crispRound(ze,Yr.minor?Ie.minor.tickwidth:Ie.tickwidth,1)+"px"}).attr("d",Rr.path).style("display",null),Xi(Ie,[W]),Br.attr("transform",Rr.transFn)},rt.drawGrid=function(ze,Ie,Rr){if(Rr=Rr||{},Ie.tickmode!=="sync"){var $r=Ie._id+"grid",Gr=Ie.minor&&Ie.minor.showgrid,Br=Gr?Rr.vals.filter(function(Zn){return Zn.minor}):[],Yr=Ie.showgrid?Rr.vals.filter(function(Zn){return!Zn.minor}):[],pn=Rr.counterAxis;if(pn&&rt.shouldShowZeroLine(ze,Ie,pn))for(var on=Ie.tickmode==="array",Ce=0;Ce=0;Qn--){var Pn=Qn?_n:Fn;if(Pn){var En=Pn.selectAll("path."+$r).data(Qn?Yr:Br,Xn);En.exit().remove(),En.enter().append("path").classed($r,1).classed("crisp",Rr.crisp!==!1),En.attr("transform",Rr.transFn).attr("d",Rr.path).each(function(Zn){return n.stroke(c.select(this),Zn.minor?Ie.minor.gridcolor:Ie.gridcolor||"#ddd")}).style("stroke-dasharray",function(Zn){return o.dashStyle(Zn.minor?Ie.minor.griddash:Ie.griddash,Zn.minor?Ie.minor.gridwidth:Ie.gridwidth)}).style("stroke-width",function(Zn){return(Zn.minor?Hr:Ie._gw)+"px"}).style("display",null),typeof Rr.path=="function"&&En.attr("d",Rr.path)}}Xi(Ie,[F,U])}},rt.drawZeroLine=function(ze,Ie,Rr){Rr=Rr||Rr;var $r=Ie._id+"zl",Gr=rt.shouldShowZeroLine(ze,Ie,Rr.counterAxis),Br=Rr.layer.selectAll("path."+$r).data(Gr?[{x:0,id:Ie._id}]:[]);Br.exit().remove(),Br.enter().append("path").classed($r,1).classed("zl",1).classed("crisp",Rr.crisp!==!1).each(function(){Rr.layer.selectAll("path").sort(function(Yr,pn){return it(Yr.id,pn.id)})}),Br.attr("transform",Rr.transFn).attr("d",Rr.path).call(n.stroke,Ie.zerolinecolor||n.defaultLine).style("stroke-width",o.crispRound(ze,Ie.zerolinewidth,Ie._gw||1)+"px").style("display",null),Xi(Ie,[H])},rt.drawLabels=function(ze,Ie,Rr){Rr=Rr||{};var $r=ze._fullLayout,Gr=Ie._id,Br=Ie.zerolinelayer==="above traces",Yr=Rr.cls||Gr+"tick",pn=Rr.vals.filter(function(cs){return cs.text}),on=Rr.labelFns,Ce=Rr.secondary?0:Ie.tickangle,dr=(Ie._prevTickAngles||{})[Yr],Hr=Rr.layer.selectAll("g."+Yr).data(Ie.showticklabels?pn:[],Xn),_n=[];Hr.enter().append("g").classed(Yr,1).append("text").attr("text-anchor","middle").each(function(cs){var Ps=c.select(this),Lo=ze._promises.length;Ps.call(r.positionText,on.xFn(cs),on.yFn(cs)).call(o.font,{family:cs.font,size:cs.fontSize,color:cs.fontColor,weight:cs.fontWeight,style:cs.fontStyle,variant:cs.fontVariant,textcase:cs.fontTextcase,lineposition:cs.fontLineposition,shadow:cs.fontShadow}).text(cs.text).call(r.convertToTspans,ze),ze._promises[Lo]?_n.push(ze._promises.pop().then(function(){Fn(Ps,Ce)})):Fn(Ps,Ce)}),Xi(Ie,[q]),Hr.exit().remove(),Rr.repositionOnUpdate&&Hr.each(function(cs){c.select(this).select("text").call(r.positionText,on.xFn(cs),on.yFn(cs))});function Fn(cs,Ps){cs.each(function(Lo){var As=c.select(this),kl=As.select(".text-math-group"),ql=on.anchorFn(Lo,Ps),Jl=Rr.transFn.call(As.node(),Lo)+(g(Ps)&&+Ps!=0?" rotate("+Ps+","+on.xFn(Lo)+","+(on.yFn(Lo)-Lo.fontSize/2)+")":""),Us=r.lineCount(As),Pa=st*Lo.fontSize,fo=on.heightFn(Lo,g(Ps)?+Ps:0,(Us-1)*Pa);if(fo&&(Jl+=e(0,fo)),kl.empty()){var qs=As.select("text");qs.attr({transform:Jl,"text-anchor":ql}),qs.style("display",null),Ie._adjustTickLabelsOverflow&&Ie._adjustTickLabelsOverflow()}else{var Ql=o.bBox(kl.node()).width,Xo=Ql*{end:-.5,start:.5}[ql];kl.attr("transform",Jl+e(Xo,0))}})}Ie._adjustTickLabelsOverflow=function(){var cs=Ie.ticklabeloverflow;if(!(!cs||cs==="allow")){var Ps=cs.indexOf("hide")!==-1,Lo=Ie._id.charAt(0)==="x",As=0,kl=Lo?ze._fullLayout.width:ze._fullLayout.height;if(cs.indexOf("domain")!==-1){var ql=t.simpleMap(Ie.range,Ie.r2l);As=Ie.l2p(ql[0])+Ie._offset,kl=Ie.l2p(ql[1])+Ie._offset}var Jl=Math.min(As,kl),Us=Math.max(As,kl),Pa=Ie.side,fo=1/0,qs=-1/0;Hr.each(function(al){var Cl=c.select(this),Ru=Cl.select(".text-math-group");if(Ru.empty()){var lo=o.bBox(Cl.node()),Ms=0;Lo?(lo.right>Us||lo.leftUs||lo.top+(Ie.tickangle?0:al.fontSize/4)Ie["_visibleLabelMin_"+ql._id]?Cl.style("display","none"):Us.K==="tick"&&!Jl&&Cl.node().style.display!=="none"&&Cl.style("display",null)})})})})},Fn(Hr,dr+1?dr:Ce);function Qn(){return _n.length&&Promise.all(_n)}var Pn=null;function En(){if(Fn(Hr,Ce),pn.length&&Ie.autotickangles&&(Ie.type!=="log"||String(Ie.dtick).charAt(0)!=="D")){Pn=Ie.autotickangles[0];var cs=0,Ps=[],Lo,As=1;Hr.each(function(Dl){cs=Math.max(cs,Dl.fontSize);var tu=Ie.l2p(Dl.x),nu=nr(this),ac=o.bBox(nu.node());As=Math.max(As,r.lineCount(nu)),Ps.push({top:0,bottom:10,height:10,left:tu-ac.width/2,right:tu+ac.width/2+2,width:ac.width+2})});var kl=(Ie.tickson==="boundaries"||Ie.showdividers)&&!Rr.secondary,ql=pn.length,Jl=Math.abs((pn[ql-1].x-pn[0].x)*Ie._m)/(ql-1),Us=kl?Jl/2:Jl,Pa=kl?Ie.ticklen:cs*1.25*As,fo=Math.sqrt(Math.pow(Us,2)+Math.pow(Pa,2)),qs=Us/fo,Ql=Ie.autotickangles.map(function(Dl){return Dl*Math.PI/180}),Xo=Ql.find(function(Dl){return Math.abs(Math.cos(Dl))<=qs});Xo===void 0&&(Xo=Ql.reduce(function(Dl,tu){return Math.abs(Math.cos(Dl))cl*ss&&(ul=ss,Da[Fo]=ys[Fo]=Zo[Fo])}var Qs=Math.abs(ul-os);Qs-Ja>0?(Qs-=Ja,Ja*=1+Ja/Qs):Ja=0,Ie._id.charAt(0)!=="y"&&(Ja=-Ja),Da[yo]=Vi.p2r(Vi.r2p(ys[yo])+Do*Ja),Vi.autorange==="min"||Vi.autorange==="max reversed"?(Da[0]=null,Vi._rangeInitial0=void 0,Vi._rangeInitial1=void 0):(Vi.autorange==="max"||Vi.autorange==="min reversed")&&(Da[1]=null,Vi._rangeInitial0=void 0,Vi._rangeInitial1=void 0),$r._insideTickLabelsUpdaterange[Vi._name+".range"]=Da}var Nl=t.syncOrAsync(Zn);return Nl&&Nl.then&&ze._promises.push(Nl),Nl};function Ii(ze,Ie,Rr){var $r=Ie._id+"divider",Gr=Rr.vals,Br=Rr.layer.selectAll("path."+$r).data(Gr,Xn);Br.exit().remove(),Br.enter().insert("path",":first-child").classed($r,1).classed("crisp",1).call(n.stroke,Ie.dividercolor).style("stroke-width",o.crispRound(ze,Ie.dividerwidth,1)+"px"),Br.attr("transform",Rr.transFn).attr("d",Rr.path)}rt.getPxPosition=function(ze,Ie){var Rr=ze._fullLayout._size,$r=Ie._id.charAt(0),Gr=Ie.side,Br;if(Ie.anchor!=="free"?Br=Ie._anchorAxis:$r==="x"?Br={_offset:Rr.t+(1-(Ie.position||0))*Rr.h,_length:0}:$r==="y"&&(Br={_offset:Rr.l+(Ie.position||0)*Rr.w+Ie._shift,_length:0}),Gr==="top"||Gr==="left")return Br._offset;if(Gr==="bottom"||Gr==="right")return Br._offset+Br._length};function oi(ze){var Ie=ze.title.font.size,Rr=(ze.title.text.match(r.BR_TAG_ALL)||[]).length;return ze.title.hasOwnProperty("standoff")?Ie*(mt+Rr*st):Rr?Ie*(Rr+1)*st:Ie}function $n(ze,Ie){var Rr=ze._fullLayout,$r=Ie._id,Gr=$r.charAt(0),Br=Ie.title.font.size,Yr,pn=(Ie.title.text.match(r.BR_TAG_ALL)||[]).length;if(Ie.title.hasOwnProperty("standoff"))Ie.side==="bottom"||Ie.side==="right"?Yr=Ie._depth+Ie.title.standoff+Br*mt:(Ie.side==="top"||Ie.side==="left")&&(Yr=Ie._depth+Ie.title.standoff+Br*(yt+pn*st));else{var on=ji(Ie);if(Ie.type==="multicategory")Yr=Ie._depth;else{var Ce=1.5*Br;on&&(Ce=.5*Br,Ie.ticks==="outside"&&(Ce+=Ie.ticklen)),Yr=10+Ce+(Ie.linewidth?Ie.linewidth-1:0)}on||(Gr==="x"?Yr+=Ie.side==="top"?Br*(Ie.showticklabels?1:0):Br*(Ie.showticklabels?1.5:.5):Yr+=Ie.side==="right"?Br*(Ie.showticklabels?1:.5):Br*(Ie.showticklabels?.5:0))}var dr=rt.getPxPosition(ze,Ie),Hr,_n,Fn;Gr==="x"?(_n=Ie._offset+Ie._length/2,Fn=Ie.side==="top"?dr-Yr:dr+Yr):(Fn=Ie._offset+Ie._length/2,_n=Ie.side==="right"?dr+Yr:dr-Yr,Hr={rotate:"-90",offset:0});var Qn;if(Ie.type!=="multicategory"){var Pn=Ie._selections[Ie._id+"tick"];if(Qn={selection:Pn,side:Ie.side},Pn&&Pn.node()&&Pn.node().parentNode){var En=o.getTranslate(Pn.node().parentNode);Qn.offsetLeft=En.x,Qn.offsetTop=En.y}Ie.title.hasOwnProperty("standoff")&&(Qn.pad=0)}return Ie._titleStandoff=Yr,a.draw(ze,$r+"title",{propContainer:Ie,propName:Ie._name+".title.text",placeholder:Rr._dfltTitle[Gr],avoid:Qn,transform:Hr,attributes:{x:_n,y:Fn,"text-anchor":"middle"}})}rt.shouldShowZeroLine=function(ze,Ie,Rr){var $r=t.simpleMap(Ie.range,Ie.r2l);return $r[0]*$r[1]<=0&&Ie.zeroline&&(Ie.type==="linear"||Ie.type==="-")&&!(Ie.rangebreaks&&Ie.maskBreaks(0)===V)&&(sa(Ie,0)||!Zi(ze,Ie,Rr,$r)||We(ze,Ie))},rt.clipEnds=function(ze,Ie){return Ie.filter(function(Rr){return sa(ze,Rr.x)})};function sa(ze,Ie){var Rr=ze.l2p(Ie);return Rr>1&&Rr1)for(Gr=1;Gr=Gr.min&&ze=O:/%L/.test(Ie)?ze>=R:/%[SX]/.test(Ie)?ze>=w:/%M/.test(Ie)?ze>=k:/%[HI]/.test(Ie)?ze>=p:/%p/.test(Ie)?ze>=h:/%[Aadejuwx]/.test(Ie)?ze>=A:/%[UVW]/.test(Ie)?ze>=C:/%[Bbm]/.test(Ie)?ze>=M:/%[q]/.test(Ie)?ze>=b:/%[Yy]/.test(Ie)?ze>=v:!0}}),bw=Dt((Q,Z)=>{Z.exports=function(c,g,I){var S,t;if(I){var e=g==="reversed"||g==="min reversed"||g==="max reversed";S=I[e?1:0],t=I[e?0:1]}var r=c("autorangeoptions.minallowed",t===null?S:void 0),a=c("autorangeoptions.maxallowed",S===null?t:void 0);r===void 0&&c("autorangeoptions.clipmin"),a===void 0&&c("autorangeoptions.clipmax"),c("autorangeoptions.include")}}),I_=Dt((Q,Z)=>{var c=bw();Z.exports=function(g,I,S,t){var e=I._template||{},r=I.type||e.type||"-";S("minallowed"),S("maxallowed");var a=S("range");if(!a){var n;!t.noInsiderange&&r!=="log"&&(n=S("insiderange"),n&&(n[0]===null||n[1]===null)&&(I.insiderange=!1,n=void 0),n&&(a=S("range",n)))}var o=I.getAutorangeDflt(a,t),i=S("autorange",o),l;a&&(a[0]===null&&a[1]===null||(a[0]===null||a[1]===null)&&(i==="reversed"||i===!0)||a[0]!==null&&(i==="min"||i==="max reversed")||a[1]!==null&&(i==="max"||i==="min reversed"))&&(a=void 0,delete I.range,I.autorange=!0,l=!0),l||(o=I.getAutorangeDflt(a,t),i=S("autorange",o)),i&&(c(S,i,a),(r==="linear"||r==="-")&&S("rangemode")),I.cleanRange()}}),y6=Dt((Q,Z)=>{var c={left:0,top:0};Z.exports=g;function g(S,t,e){t=t||S.currentTarget||S.srcElement,Array.isArray(e)||(e=[0,0]);var r=S.clientX||0,a=S.clientY||0,n=I(t);return e[0]=r-n.left,e[1]=a-n.top,e}function I(S){return S===window||S===document||S===document.body?c:S.getBoundingClientRect()}}),z_=Dt((Q,Z)=>{var c=Wu();function g(){var I=!1;try{var S=Object.defineProperty({},"passive",{get:function(){I=!0}});window.addEventListener("test",null,S),window.removeEventListener("test",null,S)}catch{I=!1}return I}Z.exports=c&&g()}),O_=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){var e=(c-I)/(S-I),r=e+g/(S-I),a=(e+r)/2;return t==="left"||t==="bottom"?e:t==="center"||t==="middle"?a:t==="right"||t==="top"?r:e<2/3-a?e:r>4/3-a?r:a}}),x6=Dt((Q,Z)=>{var c=kn(),g=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Z.exports=function(I,S,t,e){return t==="left"?I=0:t==="center"?I=1:t==="right"?I=2:I=c.constrain(Math.floor(I*3),0,2),e==="bottom"?S=0:e==="middle"?S=1:e==="top"?S=2:S=c.constrain(Math.floor(S*3),0,2),g[S][I]}}),K0=Dt((Q,Z)=>{var c=Bm(),g=C_(),I=r0().getGraphDiv,S=no(),t=Z.exports={};t.wrapped=function(e,r,a){e=I(e),e._fullLayout&&g.clear(e._fullLayout._uid+S.HOVERID),t.raw(e,r,a)},t.raw=function(e,r){var a=e._fullLayout,n=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&c.triggerHandler(e,"plotly_beforehover",r)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,r.target&&n&&e.emit("plotly_unhover",{event:r,points:n}))}}),up=Dt((Q,Z)=>{var c=y6(),g=Ff(),I=z_(),S=kn().removeElement,t=ic(),e=Z.exports={};e.align=O_(),e.getCursor=x6();var r=K0();e.unhover=r.wrapped,e.unhoverRaw=r.raw,e.init=function(o){var i=o.gd,l=1,f=i._context.doubleClickDelay,x=o.element,y,v,T,u,b,_,P,M;i._mouseDownTime||(i._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=h,I?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=h,x.addEventListener("touchstart",h,{passive:!1})):x.ontouchstart=h;function C(w,R,O){return Math.abs(w)"u"&&typeof w.clientY>"u"&&(w.clientX=y,w.clientY=v),T=new Date().getTime(),T-i._mouseDownTimef&&(l=Math.max(l-1,1)),i._dragged)o.doneFn&&o.doneFn();else{var R;_.target===P?R=_:(R={target:P,srcElement:P,toElement:P},Object.keys(_).concat(Object.keys(_.__proto__)).forEach(O=>{var j=_[O];!R[O]&&typeof j!="function"&&(R[O]=j)})),o.clickFn&&o.clickFn(l,R),M||P.dispatchEvent(new MouseEvent("click",w))}i._dragging=!1,i._dragged=!1}};function a(){var o=document.createElement("div");o.className="dragcover";var i=o.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(o),o}e.coverSlip=a;function n(o){return c(o.changedTouches?o.changedTouches[0]:o,document.body)}}),P0=Dt((Q,Z)=>{Z.exports=function(c,g){(c.attr("class")||"").split(" ").forEach(function(I){I.indexOf("cursor-")===0&&c.classed(I,!1)}),g&&c.classed("cursor-"+g,!0)}}),jm=Dt((Q,Z)=>{var c=P0(),g="data-savedcursor",I="!!";Z.exports=function(S,t){var e=S.attr(g);if(t){if(!e){for(var r=(S.attr("class")||"").split(" "),a=0;a{var c=da(),g=wi();Z.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:c({editType:"legend"}),grouptitlefont:c({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:c({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}),jy=Dt(Q=>{Q.isGrouped=function(Z){return(Z.traceorder||"").indexOf("grouped")!==-1},Q.isVertical=function(Z){return Z.orientation!=="h"},Q.isReversed=function(Z){return(Z.traceorder||"").indexOf("reversed")!==-1}}),Uy=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=mu(),S=Ho(),t=D_(),e=b1(),r=jy();function a(n,o,i,l){var f=o[n]||{},x=I.newContainer(i,n);function y(st,tt){return g.coerce(f,x,t,st,tt)}var v=g.coerceFont(y,"font",i.font);y("bgcolor",i.paper_bgcolor),y("bordercolor");var T=y("visible");if(T){for(var u,b=function(st,tt){var dt=u._input,rt=u;return g.coerce(dt,rt,S,st,tt)},_=i.font||{},P=g.coerceFont(y,"grouptitlefont",_,{overrideDflt:{size:Math.round(_.size*1.1)}}),M=0,C=!1,A="normal",h=(i.shapes||[]).filter(function(st){return st.showlegend}),p=l.concat(h).filter(function(st){return n===(st.legend||"legend")}),k=0;k(n==="legend"?1:0));if(R===!1&&(i[n]=void 0),!(R===!1&&!f.uirevision)&&(y("uirevision",i.uirevision),R!==!1)){y("borderwidth");var O=y("orientation"),j=y("yref"),V=y("xref"),H=O==="h",F=j==="paper",U=V==="paper",W,q,J,lt="left";H?(W=0,c.getComponentMethod("rangeslider","isVisible")(o.xaxis)?F?(q=1.1,J="bottom"):(q=1,J="top"):F?(q=-.1,J="top"):(q=0,J="bottom")):(q=1,J="auto",U?W=1.02:(W=1,lt="right")),g.coerce(f,x,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:W}},"x"),g.coerce(f,x,{y:{valType:"number",editType:"legend",min:F?-2:0,max:F?3:1,dflt:q}},"y"),y("traceorder",A),r.isGrouped(i[n])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("xanchor",lt),y("yanchor",J),y("maxheight"),y("valign"),g.noneOrAll(f,x,["x","y"]);var yt=y("title.text");if(yt){y("title.side",H?"left":"top");var mt=g.extendFlat({},v,{size:g.bigFont(v.size)});g.coerceFont(y,"title.font",mt)}}}}Z.exports=function(n,o,i){var l,f=i.slice(),x=o.shapes;if(x)for(l=0;l{var c=Jo(),g=kn(),I=g.pushUnique,S=!0;Z.exports=function(t,e,r){var a=e._fullLayout;if(e._dragged||e._editing)return;var n=a.legend.itemclick,o=a.legend.itemdoubleclick,i=a.legend.groupclick;r===1&&n==="toggle"&&o==="toggleothers"&&S&&e.data&&e._context.showTips&&g.notifier(g._(e,"Double-click on legend to isolate one trace"),"long"),S=!1;var l;if(r===1?l=n:r===2&&(l=o),!l)return;var f=i==="togglegroup",x=a.hiddenlabels?a.hiddenlabels.slice():[],y=t.data()[0][0];if(y.groupTitle&&y.noClick)return;var v=e._fullData,T=(a.shapes||[]).filter(function(se){return se.showlegend}),u=v.concat(T),b=y.trace;b._isShape&&(b=b._fullInput);var _=b.legendgroup,P,M,C,A,h,p,k={},w=[],R=[],O=[];function j(se,Tt){var Lt=w.indexOf(se),Mt=k.visible;return Mt||(Mt=k.visible=[]),w.indexOf(se)===-1&&(w.push(se),Lt=w.length-1),Mt[Lt]=Tt,Lt}var V=(a.shapes||[]).map(function(se){return se._input}),H=!1;function F(se,Tt){V[se].visible=Tt,H=!0}function U(se,Tt){if(!(y.groupTitle&&!f)){var Lt=se._fullInput||se,Mt=Lt._isShape,ee=Lt.index;ee===void 0&&(ee=Lt._index);var ve=Lt.visible===!1?!1:Tt;Mt?F(ee,ve):j(ee,ve)}}var W=b.legend,q=b._fullInput,J=q&&q._isShape;if(!J&&c.traceIs(b,"pie-like")){var lt=y.label,yt=x.indexOf(lt);if(l==="toggle")yt===-1?x.push(lt):x.splice(yt,1);else if(l==="toggleothers"){var mt=yt!==-1,st=[];for(P=0;P{Z.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}),ww=Dt((Q,Z)=>{var c=Jo(),g=jy();Z.exports=function(I,S,t){var e=S._inHover,r=g.isGrouped(S),a=g.isReversed(S),n={},o=[],i=!1,l={},f=0,x=0,y,v;function T(U,W,q){if(S.visible!==!1&&!(t&&U!==S._id))if(W===""||!g.isGrouped(S)){var J="~~i"+f;o.push(J),n[J]=[q],f++}else o.indexOf(W)===-1?(o.push(W),i=!0,n[W]=[q]):n[W].push(q)}for(y=0;yw&&(k=w)}h[y][0]._groupMinRank=k,h[y][0]._preGroupSort=y}var R=function(U,W){return U[0]._groupMinRank-W[0]._groupMinRank||U[0]._preGroupSort-W[0]._preGroupSort},O=function(U,W){return U.trace.legendrank-W.trace.legendrank||U._preSort-W._preSort};for(h.forEach(function(U,W){U[0]._preGroupSort=W}),h.sort(R),y=0;y{var Z=kn();function c(g){return g.indexOf("e")!==-1?g.replace(/[.]?0+e/,"e"):g.indexOf(".")!==-1?g.replace(/[.]?0+$/,""):g}Q.formatPiePercent=function(g,I){var S=c((g*100).toPrecision(3));return Z.numSeparate(S,I)+"%"},Q.formatPieValue=function(g,I){var S=c(g.toPrecision(10));return Z.numSeparate(S,I)},Q.getFirstFilled=function(g,I){if(Z.isArrayOrTypedArray(g))for(var S=0;S{var c=Vs(),g=hi();Z.exports=function(I,S,t,e){var r=t.marker.pattern;r&&r.shape?c.pointStyle(I,t,e,S):g.fill(I,S.color)}}),kg=Dt((Q,Z)=>{var c=hi(),g=wg().castOption,I=b6();Z.exports=function(S,t,e,r){var a=e.marker.line,n=g(a.color,t.pts)||c.defaultLine,o=g(a.width,t.pts)||0;S.call(I,t,e,r).style("stroke-width",o).call(c.stroke,n)}}),kw=Dt((Q,Z)=>{var c=qr(),g=Jo(),I=kn(),S=I.strTranslate,t=Vs(),e=hi(),r=Ud().extractOpts,a=Tc(),n=kg(),o=wg().castOption,i=F_(),l=12,f=5,x=2,y=10,v=5;Z.exports=function(_,P,M){var C=P._fullLayout;M||(M=C.legend);var A=M.itemsizing==="constant",h=M.itemwidth,p=(h+i.itemGap*2)/2,k=S(p,0),w=function(st,tt,dt,rt){var at;if(st+1)at=st;else if(tt&&tt.width>0)at=tt.width;else return 0;return A?rt:Math.min(at,dt)};_.each(function(st){var tt=c.select(this),dt=I.ensureSingle(tt,"g","layers");dt.style("opacity",st[0].trace.opacity);var rt=M.indentation,at=M.valign,vt=st[0].lineHeight,it=st[0].height;if(at==="middle"&&rt===0||!vt||!it)dt.attr("transform",null);else{var Y={top:1,bottom:-1}[at],ft=Y*(.5*(vt-it+3))||0,ut=M.indentation;dt.attr("transform",S(ut,ft))}var kt=dt.selectAll("g.legendfill").data([st]);kt.enter().append("g").classed("legendfill",!0);var It=dt.selectAll("g.legendlines").data([st]);It.enter().append("g").classed("legendlines",!0);var Pt=dt.selectAll("g.legendsymbols").data([st]);Pt.enter().append("g").classed("legendsymbols",!0),Pt.selectAll("g.legendpoints").data([st]).enter().append("g").classed("legendpoints",!0)}).each(mt).each(j).each(H).each(V).each(U).each(lt).each(J).each(R).each(O).each(W).each(q);function R(st){var tt=u(st),dt=tt.showFill,rt=tt.showLine,at=tt.showGradientLine,vt=tt.showGradientFill,it=tt.anyFill,Y=tt.anyLine,ft=st[0],ut=ft.trace,kt,It,Pt=r(ut),qt=Pt.colorscale,Wt=Pt.reversescale,Jt=function(Mt){if(Mt.size())if(dt)t.fillGroupStyle(Mt,P,!0);else{var ee="legendfill-"+ut.uid;t.gradient(Mt,P,ee,T(Wt),qt,"fill")}},ge=function(Mt){if(Mt.size()){var ee="legendline-"+ut.uid;t.lineGroupStyle(Mt),t.gradient(Mt,P,ee,T(Wt),qt,"stroke")}},fe=a.hasMarkers(ut)||!it?"M5,0":Y?"M5,-2":"M5,-3",pe=c.select(this),se=pe.select(".legendfill").selectAll("path").data(dt||vt?[st]:[]);if(se.enter().append("path").classed("js-fill",!0),se.exit().remove(),se.attr("d",fe+"h"+h+"v6h-"+h+"z").call(Jt),rt||at){var Tt=w(void 0,ut.line,y,f);It=I.minExtend(ut,{line:{width:Tt}}),kt=[I.minExtend(ft,{trace:It})]}var Lt=pe.select(".legendlines").selectAll("path").data(rt||at?[kt]:[]);Lt.enter().append("path").classed("js-line",!0),Lt.exit().remove(),Lt.attr("d",fe+(at?"l"+h+",0.0001":"h"+h)).call(rt?t.lineGroupStyle:ge)}function O(st){var tt=u(st),dt=tt.anyFill,rt=tt.anyLine,at=tt.showLine,vt=tt.showMarker,it=st[0],Y=it.trace,ft=!vt&&!rt&&!dt&&a.hasText(Y),ut,kt;function It(se,Tt,Lt,Mt){var ee=I.nestedProperty(Y,se).get(),ve=I.isArrayOrTypedArray(ee)&&Tt?Tt(ee):ee;if(A&&ve&&Mt!==void 0&&(ve=Mt),Lt){if(veLt[1])return Lt[1]}return ve}function Pt(se){return it._distinct&&it.index&&se[it.index]?se[it.index]:se[0]}if(vt||ft||at){var qt={},Wt={};if(vt){qt.mc=It("marker.color",Pt),qt.mx=It("marker.symbol",Pt),qt.mo=It("marker.opacity",I.mean,[.2,1]),qt.mlc=It("marker.line.color",Pt),qt.mlw=It("marker.line.width",I.mean,[0,5],x),Wt.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Jt=It("marker.size",I.mean,[2,16],l);qt.ms=Jt,Wt.marker.size=Jt}at&&(Wt.line={width:It("line.width",Pt,[0,10],f)}),ft&&(qt.tx="Aa",qt.tp=It("textposition",Pt),qt.ts=10,qt.tc=It("textfont.color",Pt),qt.tf=It("textfont.family",Pt),qt.tw=It("textfont.weight",Pt),qt.ty=It("textfont.style",Pt),qt.tv=It("textfont.variant",Pt),qt.tC=It("textfont.textcase",Pt),qt.tE=It("textfont.lineposition",Pt),qt.tS=It("textfont.shadow",Pt)),ut=[I.minExtend(it,qt)],kt=I.minExtend(Y,Wt),kt.selectedpoints=null,kt.texttemplate=null}var ge=c.select(this).select("g.legendpoints"),fe=ge.selectAll("path.scatterpts").data(vt?ut:[]);fe.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",k),fe.exit().remove(),fe.call(t.pointStyle,kt,P),vt&&(ut[0].mrc=3);var pe=ge.selectAll("g.pointtext").data(ft?ut:[]);pe.enter().append("g").classed("pointtext",!0).append("text").attr("transform",k),pe.exit().remove(),pe.selectAll("text").call(t.textPointStyle,kt,P)}function j(st){var tt=st[0].trace,dt=tt.type==="waterfall";if(st[0]._distinct&&dt){var rt=st[0].trace[st[0].dir].marker;return st[0].mc=rt.color,st[0].mlw=rt.line.width,st[0].mlc=rt.line.color,F(st,this,"waterfall")}var at=[];tt.visible&&dt&&(at=st[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var vt=c.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(at);vt.enter().append("path").classed("legendwaterfall",!0).attr("transform",k).style("stroke-miterlimit",1),vt.exit().remove(),vt.each(function(it){var Y=c.select(this),ft=tt[it[0]].marker,ut=w(void 0,ft.line,v,x);Y.attr("d",it[1]).style("stroke-width",ut+"px").call(e.fill,ft.color),ut&&Y.call(e.stroke,ft.line.color)})}function V(st){F(st,this)}function H(st){F(st,this,"funnel")}function F(st,tt,dt){var rt=st[0].trace,at=rt.marker||{},vt=at.line||{},it=at.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Y=dt?rt.visible&&rt.type===dt:g.traceIs(rt,"bar"),ft=c.select(tt).select("g.legendpoints").selectAll("path.legend"+dt).data(Y?[st]:[]);ft.enter().append("path").classed("legend"+dt,!0).attr("d",it).attr("transform",k),ft.exit().remove(),ft.each(function(ut){var kt=c.select(this),It=ut[0],Pt=w(It.mlw,at.line,v,x);kt.style("stroke-width",Pt+"px");var qt=It.mcc;if(!M._inHover&&"mc"in It){var Wt=r(at),Jt=Wt.mid;Jt===void 0&&(Jt=(Wt.max+Wt.min)/2),qt=t.tryColorscale(at,"")(Jt)}var ge=qt||It.mc||at.color,fe=at.pattern,pe=t.getPatternAttr,se=fe&&(pe(fe.shape,0,"")||pe(fe.path,0,""));if(se){var Tt=pe(fe.bgcolor,0,null),Lt=pe(fe.fgcolor,0,null),Mt=fe.fgopacity,ee=b(fe.size,8,10),ve=b(fe.solidity,.5,1),oe="legend-"+rt.uid;kt.call(t.pattern,"legend",P,oe,se,ee,ve,qt,fe.fillmode,Tt,Lt,Mt)}else kt.call(e.fill,ge);Pt&&e.stroke(kt,It.mlc||vt.color)})}function U(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendbox").data(tt.visible&&g.traceIs(tt,"box-violin")?[st]:[]);dt.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),dt.exit().remove(),dt.each(function(){var rt=c.select(this);if((tt.boxpoints==="all"||tt.points==="all")&&e.opacity(tt.fillcolor)===0&&e.opacity((tt.line||{}).color)===0){var at=I.minExtend(tt,{marker:{size:A?l:I.constrain(tt.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});dt.call(t.pointStyle,at,P)}else{var vt=w(void 0,tt.line,v,x);rt.style("stroke-width",vt+"px").call(e.fill,tt.fillcolor),vt&&e.stroke(rt,tt.line.color)}})}function W(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(tt.visible&&tt.type==="candlestick"?[st,st]:[]);dt.enter().append("path").classed("legendcandle",!0).attr("d",function(rt,at){return at?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",k).style("stroke-miterlimit",1),dt.exit().remove(),dt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],Y=w(void 0,it.line,v,x);vt.style("stroke-width",Y+"px").call(e.fill,it.fillcolor),Y&&e.stroke(vt,it.line.color)})}function q(st){var tt=st[0].trace,dt=c.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(tt.visible&&tt.type==="ohlc"?[st,st]:[]);dt.enter().append("path").classed("legendohlc",!0).attr("d",function(rt,at){return at?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",k).style("stroke-miterlimit",1),dt.exit().remove(),dt.each(function(rt,at){var vt=c.select(this),it=tt[at?"increasing":"decreasing"],Y=w(void 0,it.line,v,x);vt.style("fill","none").call(t.dashLine,it.line.dash,Y),Y&&e.stroke(vt,it.line.color)})}function J(st){yt(st,this,"pie")}function lt(st){yt(st,this,"funnelarea")}function yt(st,tt,dt){var rt=st[0],at=rt.trace,vt=dt?at.visible&&at.type===dt:g.traceIs(at,dt),it=c.select(tt).select("g.legendpoints").selectAll("path.legend"+dt).data(vt?[st]:[]);if(it.enter().append("path").classed("legend"+dt,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",k),it.exit().remove(),it.size()){var Y=at.marker||{},ft=w(o(Y.line.width,rt.pts),Y.line,v,x),ut="pieLike",kt=I.minExtend(at,{marker:{line:{width:ft}}},ut),It=I.minExtend(rt,{trace:kt},ut);n(it,It,kt,P)}}function mt(st){var tt=st[0].trace,dt,rt=[];if(tt.visible)switch(tt.type){case"histogram2d":case"heatmap":rt=[["M-15,-2V4H15V-2Z"]],dt=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":rt=[["M-6,-6V6H6V-6Z"]],dt=!0;break;case"densitymapbox":case"densitymap":rt=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],dt="radial";break;case"cone":rt=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],dt=!1;break;case"streamtube":rt=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],dt=!1;break;case"surface":rt=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],dt=!0;break;case"mesh3d":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],dt=!1;break;case"volume":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],dt=!0;break;case"isosurface":rt=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],dt=!1;break}var at=c.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(rt);at.enter().append("path").classed("legend3dandfriends",!0).attr("transform",k).style("stroke-miterlimit",1),at.exit().remove(),at.each(function(vt,it){var Y=c.select(this),ft=r(tt),ut=ft.colorscale,kt=ft.reversescale,It=function(Jt){if(Jt.size()){var ge="legendfill-"+tt.uid;t.gradient(Jt,P,ge,T(kt,dt==="radial"),ut,"fill")}},Pt;if(ut){if(!dt){var qt=ut.length;Pt=it===0?ut[kt?qt-1:0][1]:it===1?ut[kt?0:qt-1][1]:ut[Math.floor((qt-1)/2)][1]}}else{var Wt=tt.vertexcolor||tt.facecolor||tt.color;Pt=I.isArrayOrTypedArray(Wt)?Wt[it]||Wt[0]:Wt}Y.attr("d",vt[0]),Pt?Y.call(e.fill,Pt):Y.call(It)})}};function T(_,P){var M=P?"radial":"horizontal";return M+(_?"":"reversed")}function u(_){var P=_[0].trace,M=P.contours,C=a.hasLines(P),A=a.hasMarkers(P),h=P.visible&&P.fill&&P.fill!=="none",p=!1,k=!1;if(M){var w=M.coloring;w==="lines"?p=!0:C=w==="none"||w==="heatmap"||M.showlines,M.type==="constraint"?h=M._operation!=="=":(w==="fill"||w==="heatmap")&&(k=!0)}return{showMarker:A,showLine:C,showFill:h,showGradientLine:p,showGradientFill:k,anyLine:C||p,anyFill:h||k}}function b(_,P,M){return _&&I.isArrayOrTypedArray(_)?P:_>M?M:_}}),R_=Dt((Q,Z)=>{var c=qr(),g=kn(),I=Kc(),S=Jo(),t=Bm(),e=up(),r=Vs(),a=hi(),n=ec(),o=_6(),i=F_(),l=Af(),f=l.LINE_SPACING,x=l.FROM_TL,y=l.FROM_BR,v=ww(),T=kw(),u=jy(),b=1,_=/^legend[0-9]*$/;Z.exports=function(W,q){if(q)M(W,q);else{var J=W._fullLayout,lt=J._legends,yt=J._infolayer.selectAll('[class^="legend"]');yt.each(function(){var dt=c.select(this),rt=dt.attr("class"),at=rt.split(" ")[0];at.match(_)&<.indexOf(at)===-1&&dt.remove()});for(var mt=0;mt1)}var ft=lt.hiddenlabels||[];if(!tt&&(!lt.showlegend||!dt.length))return st.selectAll("."+yt).remove(),lt._topdefs.select("#"+mt).remove(),I.autoMargin(W,yt);var ut=g.ensureSingle(st,"g",yt,function(pe){tt||pe.attr("pointer-events","all")}),kt=g.ensureSingleById(lt._topdefs,"clipPath",mt,function(pe){pe.append("rect")}),It=g.ensureSingle(ut,"rect","bg",function(pe){pe.attr("shape-rendering","crispEdges")});It.call(a.stroke,J.bordercolor).call(a.fill,J.bgcolor).style("stroke-width",J.borderwidth+"px");var Pt=g.ensureSingle(ut,"g","scrollbox"),qt=J.title;J._titleWidth=0,J._titleHeight=0;var Wt;qt.text?(Wt=g.ensureSingle(Pt,"text",yt+"titletext"),Wt.attr("text-anchor","start").call(r.font,qt.font).text(qt.text),w(Wt,Pt,W,J,b)):Pt.selectAll("."+yt+"titletext").remove();var Jt=g.ensureSingle(ut,"rect","scrollbar",function(pe){pe.attr(i.scrollBarEnterAttrs).call(a.fill,i.scrollBarColor)}),ge=Pt.selectAll("g.groups").data(dt);ge.enter().append("g").attr("class","groups"),ge.exit().remove();var fe=ge.selectAll("g.traces").data(g.identity);fe.enter().append("g").attr("class","traces"),fe.exit().remove(),fe.style("opacity",function(pe){var se=pe[0].trace;return S.traceIs(se,"pie-like")?ft.indexOf(pe[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){c.select(this).call(h,W,J)}).call(T,W,J).each(function(){tt||c.select(this).call(k,W,yt)}),g.syncOrAsync([I.previousPromises,function(){return j(W,ge,fe,J)},function(){var pe=lt._size,se=J.borderwidth,Tt=J.xref==="paper",Lt=J.yref==="paper";if(qt.text&&P(Wt,J,se),!tt){var Mt,ee;Tt?Mt=pe.l+pe.w*J.x-x[H(J)]*J._width:Mt=lt.width*J.x-x[H(J)]*J._width,Lt?ee=pe.t+pe.h*(1-J.y)-x[F(J)]*J._effHeight:ee=lt.height*(1-J.y)-x[F(J)]*J._effHeight;var ve=V(W,yt,Mt,ee);if(ve)return;if(lt.margin.autoexpand){var oe=Mt,Te=ee;Mt=Tt?g.constrain(Mt,0,lt.width-J._width):oe,ee=Lt?g.constrain(ee,0,lt.height-J._effHeight):Te,Mt!==oe&&g.log("Constrain "+yt+".x to make legend fit inside graph"),ee!==Te&&g.log("Constrain "+yt+".y to make legend fit inside graph")}r.setTranslate(ut,Mt,ee)}if(Jt.on(".drag",null),ut.on("wheel",null),tt||J._height<=J._maxHeight||W._context.staticPlot){var He=J._effHeight;tt&&(He=J._height),It.attr({width:J._width-se,height:He-se,x:se/2,y:se/2}),r.setTranslate(Pt,0,0),kt.select("rect").attr({width:J._width-2*se,height:He-2*se,x:se,y:se}),r.setClipUrl(Pt,mt,W),r.setRect(Jt,0,0,0,0),delete J._scrollY}else{var Ge=Math.max(i.scrollBarMinHeight,J._effHeight*J._effHeight/J._height),cr=J._effHeight-Ge-2*i.scrollBarMargin,ur=J._height-J._effHeight,jr=cr/ur,Wr=Math.min(J._scrollY||0,ur);It.attr({width:J._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:J._effHeight-se,x:se/2,y:se/2}),kt.select("rect").attr({width:J._width-2*se+i.scrollBarWidth+i.scrollBarMargin,height:J._effHeight-2*se,x:se,y:se+Wr}),r.setClipUrl(Pt,mt,W),gt(Wr,Ge,jr),ut.on("wheel",function(){Wr=g.constrain(J._scrollY+c.event.deltaY/ur*cr,0,ur),gt(Wr,Ge,jr),Wr!==0&&Wr!==ur&&c.event.preventDefault()});var br,Xr,nn,Le=function(we,Ue,qe){var or=(qe-Ue)/jr+we;return g.constrain(or,0,ur)},Gt=function(we,Ue,qe){var or=(Ue-qe)/jr+we;return g.constrain(or,0,ur)},ne=c.behavior.drag().on("dragstart",function(){var we=c.event.sourceEvent;we.type==="touchstart"?br=we.changedTouches[0].clientY:br=we.clientY,nn=Wr}).on("drag",function(){var we=c.event.sourceEvent;we.buttons===2||we.ctrlKey||(we.type==="touchmove"?Xr=we.changedTouches[0].clientY:Xr=we.clientY,Wr=Le(nn,br,Xr),gt(Wr,Ge,jr))});Jt.call(ne);var Ct=c.behavior.drag().on("dragstart",function(){var we=c.event.sourceEvent;we.type==="touchstart"&&(br=we.changedTouches[0].clientY,nn=Wr)}).on("drag",function(){var we=c.event.sourceEvent;we.type==="touchmove"&&(Xr=we.changedTouches[0].clientY,Wr=Gt(nn,br,Xr),gt(Wr,Ge,jr))});Pt.call(Ct)}function gt(we,Ue,qe){J._scrollY=W._fullLayout[yt]._scrollY=we,r.setTranslate(Pt,0,-we),r.setRect(Jt,J._width,i.scrollBarMargin+we*qe,i.scrollBarWidth,Ue),kt.select("rect").attr("y",se+we)}if(W._context.edits.legendPosition){var St,Nt,re,le;ut.classed("cursor-move",!0),e.init({element:ut.node(),gd:W,prepFn:function(we){if(we.target!==Jt.node()){var Ue=r.getTranslate(ut);re=Ue.x,le=Ue.y}},moveFn:function(we,Ue){if(re!==void 0&&le!==void 0){var qe=re+we,or=le+Ue;r.setTranslate(ut,qe,or),St=e.align(qe,J._width,pe.l,pe.l+pe.w,J.xanchor),Nt=e.align(or+J._height,-J._height,pe.t+pe.h,pe.t,J.yanchor)}},doneFn:function(){if(St!==void 0&&Nt!==void 0){var we={};we[yt+".x"]=St,we[yt+".y"]=Nt,S.call("_guiRelayout",W,we)}},clickFn:function(we,Ue){var qe=st.selectAll("g.traces").filter(function(){var or=this.getBoundingClientRect();return Ue.clientX>=or.left&&Ue.clientX<=or.right&&Ue.clientY>=or.top&&Ue.clientY<=or.bottom});qe.size()>0&&A(W,ut,qe,we,Ue)}})}}],W)}}function C(W,q,J){var lt=W[0],yt=lt.width,mt=q.entrywidthmode,st=lt.trace.legendwidth||q.entrywidth;return mt==="fraction"?q._maxWidth*st:J+(st||yt)}function A(W,q,J,lt,yt){var mt=J.data()[0][0].trace,st={event:yt,node:J.node(),curveNumber:mt.index,expandedIndex:mt.index,data:W.data,layout:W.layout,frames:W._transitionData._frames,config:W._context,fullData:W._fullData,fullLayout:W._fullLayout};mt._group&&(st.group=mt._group),S.traceIs(mt,"pie-like")&&(st.label=J.datum()[0].label);var tt=t.triggerHandler(W,"plotly_legendclick",st);if(lt===1){if(tt===!1)return;q._clickTimeout=setTimeout(function(){W._fullLayout&&o(J,W,lt)},W._context.doubleClickDelay)}else if(lt===2){q._clickTimeout&&clearTimeout(q._clickTimeout),W._legendMouseDownTime=0;var dt=t.triggerHandler(W,"plotly_legenddoubleclick",st);dt!==!1&&tt!==!1&&o(J,W,lt)}}function h(W,q,J){var lt=U(J),yt=W.data()[0][0],mt=yt.trace,st=S.traceIs(mt,"pie-like"),tt=!J._inHover&&q._context.edits.legendText&&!st,dt=J._maxNameLength,rt,at;yt.groupTitle?(rt=yt.groupTitle.text,at=yt.groupTitle.font):(at=J.font,J.entries?rt=yt.text:(rt=st?yt.label:mt.name,mt._meta&&(rt=g.templateString(rt,mt._meta))));var vt=g.ensureSingle(W,"text",lt+"text");vt.attr("text-anchor","start").call(r.font,at).text(tt?p(rt,dt):rt);var it=J.indentation+J.itemwidth+i.itemGap*2;n.positionText(vt,it,0),tt?vt.call(n.makeEditable,{gd:q,text:rt}).call(w,W,q,J).on("edit",function(Y){this.text(p(Y,dt)).call(w,W,q,J);var ft=yt.trace._fullInput||{},ut={};return ut.name=Y,ft._isShape?S.call("_guiRelayout",q,"shapes["+mt.index+"].name",ut.name):S.call("_guiRestyle",q,ut,mt.index)}):w(vt,W,q,J)}function p(W,q){var J=Math.max(4,q);if(W&&W.trim().length>=J/2)return W;W=W||"";for(var lt=J-W.length;lt>0;lt--)W+=" ";return W}function k(W,q,J){var lt=q._context.doubleClickDelay,yt,mt=1,st=g.ensureSingle(W,"rect",J+"toggle",function(tt){q._context.staticPlot||tt.style("cursor","pointer").attr("pointer-events","all"),tt.call(a.fill,"rgba(0,0,0,0)")});q._context.staticPlot||(st.on("mousedown",function(){yt=new Date().getTime(),yt-q._legendMouseDownTimelt&&(mt=Math.max(mt-1,1)),A(q,tt,W,mt,c.event)}}))}function w(W,q,J,lt,yt){lt._inHover&&W.attr("data-notex",!0),n.convertToTspans(W,J,function(){R(q,J,lt,yt)})}function R(W,q,J,lt){var yt=W.data()[0][0];if(!J._inHover&&yt&&!yt.trace.showlegend){W.remove();return}var mt=W.select("g[class*=math-group]"),st=mt.node(),tt=U(J);J||(J=q._fullLayout[tt]);var dt=J.borderwidth,rt;lt===b?rt=J.title.font:yt.groupTitle?rt=yt.groupTitle.font:rt=J.font;var at=rt.size*f,vt,it;if(st){var Y=r.bBox(st);vt=Y.height,it=Y.width,lt===b?r.setTranslate(mt,dt,dt+vt*.75):r.setTranslate(mt,0,vt*.25)}else{var ft="."+tt+(lt===b?"title":"")+"text",ut=W.select(ft),kt=n.lineCount(ut),It=ut.node();if(vt=at*kt,it=It?r.bBox(It).width:0,lt===b)J.title.side==="left"&&(it+=i.itemGap*2),n.positionText(ut,dt+i.titlePad,dt+at);else{var Pt=i.itemGap*2+J.indentation+J.itemwidth;yt.groupTitle&&(Pt=i.itemGap,it-=J.indentation+J.itemwidth),n.positionText(ut,Pt,-at*((kt-1)/2-.3))}}lt===b?(J._titleWidth=it,J._titleHeight=vt):(yt.lineHeight=at,yt.height=Math.max(vt,16)+3,yt.width=it)}function O(W){var q=0,J=0,lt=W.title.side;return lt&&(lt.indexOf("left")!==-1&&(q=W._titleWidth),lt.indexOf("top")!==-1&&(J=W._titleHeight)),[q,J]}function j(W,q,J,lt){var yt=W._fullLayout,mt=U(lt);lt||(lt=yt[mt]);var st=yt._size,tt=u.isVertical(lt),dt=u.isGrouped(lt),rt=lt.entrywidthmode==="fraction",at=lt.borderwidth,vt=2*at,it=i.itemGap,Y=lt.indentation+lt.itemwidth+it*2,ft=2*(at+it),ut=F(lt),kt=lt.y<0||lt.y===0&&ut==="top",It=lt.y>1||lt.y===1&&ut==="bottom",Pt=lt.tracegroupgap,qt={};let{orientation:Wt,yref:Jt}=lt,{maxheight:ge}=lt,fe=kt||It||Wt!=="v"||Jt!=="paper";ge||(ge=fe?.5:1);let pe=fe?yt.height:st.h;lt._maxHeight=Math.max(ge>1?ge:ge*pe,30);var se=0;lt._width=0,lt._height=0;var Tt=O(lt);if(tt)J.each(function(gt){var St=gt[0].height;r.setTranslate(this,at+Tt[0],at+Tt[1]+lt._height+St/2+it),lt._height+=St,lt._width=Math.max(lt._width,gt[0].width)}),se=Y+lt._width,lt._width+=it+Y+vt,lt._height+=ft,dt&&(q.each(function(gt,St){r.setTranslate(this,0,St*lt.tracegroupgap)}),lt._height+=(lt._lgroupsLength-1)*lt.tracegroupgap);else{var Lt=H(lt),Mt=lt.x<0||lt.x===0&&Lt==="right",ee=lt.x>1||lt.x===1&&Lt==="left",ve=It||kt,oe=yt.width/2;lt._maxWidth=Math.max(Mt?ve&&Lt==="left"?st.l+st.w:oe:ee?ve&&Lt==="right"?st.r+st.w:oe:st.w,2*Y);var Te=0,He=0;J.each(function(gt){var St=C(gt,lt,Y);Te=Math.max(Te,St),He+=St}),se=null;var Ge=0;if(dt){var cr=0,ur=0,jr=0;q.each(function(){var gt=0,St=0;c.select(this).selectAll("g.traces").each(function(re){var le=C(re,lt,Y),we=re[0].height;r.setTranslate(this,Tt[0],Tt[1]+at+it+we/2+St),St+=we,gt=Math.max(gt,le),qt[re[0].trace.legendgroup]=gt});var Nt=gt+it;ur>0&&Nt+at+ur>lt._maxWidth?(Ge=Math.max(Ge,ur),ur=0,jr+=cr+Pt,cr=St):cr=Math.max(cr,St),r.setTranslate(this,ur,jr),ur+=Nt}),lt._width=Math.max(Ge,ur)+at,lt._height=jr+cr+ft}else{var Wr=J.size(),br=He+vt+(Wr-1)*it=lt._maxWidth&&(Ge=Math.max(Ge,Gt),nn=0,Le+=Xr,lt._height+=Xr,Xr=0),r.setTranslate(this,Tt[0]+at+nn,Tt[1]+at+Le+St/2+it),Gt=nn+Nt+it,nn+=re,Xr=Math.max(Xr,St)}),br?(lt._width=nn+vt,lt._height=Xr+ft):(lt._width=Math.max(Ge,Gt)+vt,lt._height+=Xr+ft)}}lt._width=Math.ceil(Math.max(lt._width+Tt[0],lt._titleWidth+2*(at+i.titlePad))),lt._height=Math.ceil(Math.max(lt._height+Tt[1],lt._titleHeight+2*(at+i.itemGap))),lt._effHeight=Math.min(lt._height,lt._maxHeight);var ne=W._context.edits,Ct=ne.legendText||ne.legendPosition;J.each(function(gt){var St=c.select(this).select("."+mt+"toggle"),Nt=gt[0].height,re=gt[0].trace.legendgroup,le=C(gt,lt,Y);dt&&re!==""&&(le=qt[re]);var we=Ct?Y:se||le;!tt&&!rt&&(we+=it/2),r.setRect(St,0,-Nt/2,we,Nt)})}function V(W,q,J,lt){var yt=W._fullLayout,mt=yt[q],st=H(mt),tt=F(mt),dt=mt.xref==="paper",rt=mt.yref==="paper";W._fullLayout._reservedMargin[q]={};var at=mt.y<.5?"b":"t",vt=mt.x<.5?"l":"r",it={r:yt.width-J,l:J+mt._width,b:yt.height-lt,t:lt+mt._effHeight};if(dt&&rt)return I.autoMargin(W,q,{x:mt.x,y:mt.y,l:mt._width*x[st],r:mt._width*y[st],b:mt._effHeight*y[tt],t:mt._effHeight*x[tt]});dt?W._fullLayout._reservedMargin[q][at]=it[at]:rt||mt.orientation==="v"?W._fullLayout._reservedMargin[q][vt]=it[vt]:W._fullLayout._reservedMargin[q][at]=it[at]}function H(W){return g.isRightAnchor(W)?"right":g.isCenterAnchor(W)?"center":"left"}function F(W){return g.isBottomAnchor(W)?"bottom":g.isMiddleAnchor(W)?"middle":"top"}function U(W){return W._id||"legend"}}),B_=Dt(Q=>{var Z=qr(),c=Yi(),g=ro(),I=kn(),S=I.pushUnique,t=I.strTranslate,e=I.strRotate,r=Bm(),a=ec(),n=jm(),o=Vs(),i=hi(),l=up(),f=Ls(),x=ic().zindexSeparator,y=Jo(),v=Fp(),T=no(),u=Uy(),b=R_(),_=T.YANGLE,P=Math.PI*_/180,M=1/Math.sin(P),C=Math.cos(P),A=Math.sin(P),h=T.HOVERARROWSIZE,p=T.HOVERTEXTPAD,k={box:!0,ohlc:!0,violin:!0,candlestick:!0},w={scatter:!0,scattergl:!0,splom:!0};function R(Y,ft){return Y.distance-ft.distance}Q.hover=function(Y,ft,ut,kt){Y=I.getGraphDiv(Y);var It=ft.target;I.throttle(Y._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){O(Y,ft,ut,kt,It)})},Q.loneHover=function(Y,ft){var ut=!0;Array.isArray(Y)||(ut=!1,Y=[Y]);var kt=ft.gd,It=at(kt),Pt=vt(kt),qt=Y.map(function(Mt){var ee=Mt._x0||Mt.x0||Mt.x||0,ve=Mt._x1||Mt.x1||Mt.x||0,oe=Mt._y0||Mt.y0||Mt.y||0,Te=Mt._y1||Mt.y1||Mt.y||0,He=Mt.eventData;if(He){var Ge=Math.min(ee,ve),cr=Math.max(ee,ve),ur=Math.min(oe,Te),jr=Math.max(oe,Te),Wr=Mt.trace;if(y.traceIs(Wr,"gl3d")){var br=kt._fullLayout[Wr.scene]._scene.container,Xr=br.offsetLeft,nn=br.offsetTop;Ge+=Xr,cr+=Xr,ur+=nn,jr+=nn}He.bbox={x0:Ge+Pt,x1:cr+Pt,y0:ur+It,y1:jr+It},ft.inOut_bbox&&ft.inOut_bbox.push(He.bbox)}else He=!1;return{color:Mt.color||i.defaultLine,x0:Mt.x0||Mt.x||0,x1:Mt.x1||Mt.x||0,y0:Mt.y0||Mt.y||0,y1:Mt.y1||Mt.y||0,xLabel:Mt.xLabel,yLabel:Mt.yLabel,zLabel:Mt.zLabel,text:Mt.text,name:Mt.name,idealAlign:Mt.idealAlign,borderColor:Mt.borderColor,fontFamily:Mt.fontFamily,fontSize:Mt.fontSize,fontColor:Mt.fontColor,fontWeight:Mt.fontWeight,fontStyle:Mt.fontStyle,fontVariant:Mt.fontVariant,nameLength:Mt.nameLength,textAlign:Mt.textAlign,trace:Mt.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Mt.hovertemplate||!1,hovertemplateLabels:Mt.hovertemplateLabels||!1,eventData:He}}),Wt=!1,Jt=H(qt,{gd:kt,hovermode:"closest",rotateLabels:Wt,bgColor:ft.bgColor||i.background,container:Z.select(ft.container),outerContainer:ft.outerContainer||ft.container}),ge=Jt.hoverLabels,fe=5,pe=0,se=0;ge.sort(function(Mt,ee){return Mt.y0-ee.y0}).each(function(Mt,ee){var ve=Mt.y0-Mt.by/2;ve-feur[0]._length||oi<0||oi>jr[0]._length)return l.unhoverRaw(Y,ft)}if(ft.pointerX=Ii+ur[0]._offset,ft.pointerY=oi+jr[0]._offset,"xval"in ft?Ct=v.flat(Pt,ft.xval):Ct=v.p2c(ur,Ii),"yval"in ft?gt=v.flat(Pt,ft.yval):gt=v.p2c(jr,oi),!c(Ct[0])||!c(gt[0]))return I.warn("Fx.hover failed",ft,Y),l.unhoverRaw(Y,ft)}var Zi=1/0;function We(Da,ys){for(Nt=0;Ntmr&&(Gt.splice(0,mr),Zi=Gt[0].distance),pe&&Le!==0&&Gt.length===0){Ar.distance=Le,Ar.index=!1;var ss=le._module.hoverPoints(Ar,or,Sr,"closest",{hoverLayer:Wt._hoverlayer});if(ss&&(ss=ss.filter(function(Lo){return Lo.spikeDistance<=Le})),ss&&ss.length){var cl,Qs=ss.filter(function(Lo){return Lo.xa.showspikes&&Lo.xa.spikesnap!=="hovered data"});if(Qs.length){var Nl=Qs[0];c(Nl.x0)&&c(Nl.y0)&&(cl=fr(Nl),(!Qr.vLinePoint||Qr.vLinePoint.spikeDistance>cl.spikeDistance)&&(Qr.vLinePoint=cl))}var cs=ss.filter(function(Lo){return Lo.ya.showspikes&&Lo.ya.spikesnap!=="hovered data"});if(cs.length){var Ps=cs[0];c(Ps.x0)&&c(Ps.y0)&&(cl=fr(Ps),(!Qr.hLinePoint||Qr.hLinePoint.spikeDistance>cl.spikeDistance)&&(Qr.hLinePoint=cl))}}}}}We();function nr(Da,ys,os){for(var ul=null,Zo=1/0,Ks,ss=0;ssDa.trace.index===ci.trace.index):Gt=[ci];var za=Gt.length,Wa=rt("x",ci,Wt),ze=rt("y",ci,Wt);We(Wa,ze);var Ie=[],Rr={},$r=0,Gr=function(Da){var ys=k[Da.trace.type]?j(Da):Da.trace.index;if(!Rr[ys])$r++,Rr[ys]=$r,Ie.push(Da);else{var os=Rr[ys]-1,ul=Ie[os];os>0&&Math.abs(Da.distance)za-1;Br--)Gr(Gt[Br]);Gt=Ie,Cn()}var Yr=Y._hoverdata,pn=[],on=at(Y),Ce=vt(Y);for(let Da of Gt){var dr=v.makeEventData(Da,Da.trace,Da.cd);if(Da.hovertemplate!==!1){var Hr=!1;Da.cd[Da.index]&&Da.cd[Da.index].ht&&(Hr=Da.cd[Da.index].ht),Da.hovertemplate=Hr||Da.trace.hovertemplate||!1}if(Da.xa&&Da.ya){var _n=Da.x0+Da.xa._offset,Fn=Da.x1+Da.xa._offset,Qn=Da.y0+Da.ya._offset,Pn=Da.y1+Da.ya._offset,En=Math.min(_n,Fn),Zn=Math.max(_n,Fn),La=Math.min(Qn,Pn),Vi=Math.max(Qn,Pn);dr.bbox={x0:En+Ce,x1:Zn+Ce,y0:La+on,y1:Vi+on}}Da.eventData=[dr],pn.push(dr)}Y._hoverdata=pn;var Qa=se==="y"&&(ne.length>1||Gt.length>1)||se==="closest"&&Hn&&Gt.length>1,Ja=i.combine(Wt.plot_bgcolor||i.background,Wt.paper_bgcolor),Do=H(Gt,{gd:Y,hovermode:se,rotateLabels:Qa,bgColor:Ja,container:Wt._hoverlayer,outerContainer:Wt._paper.node(),commonLabelOpts:Wt.hoverlabel,hoverdistance:Wt.hoverdistance}),yo=Do.hoverLabels;if(v.isUnifiedHover(se)||(U(yo,Qa,Wt,Do.commonLabelBoundingBox),J(yo,Qa,Wt._invScaleX,Wt._invScaleY)),It&&It.tagName){var Fo=y.getComponentMethod("annotations","hasClickToShow")(Y,pn);n(Z.select(It),Fo?"pointer":"")}!It||kt||!mt(Y,ft,Yr)||(Yr&&Y.emit("plotly_unhover",{event:ft,points:Yr}),Y.emit("plotly_hover",{event:ft,points:Y._hoverdata,xaxes:ur,yaxes:jr,xvals:Ct,yvals:gt}))}function j(Y){return[Y.trace.index,Y.index,Y.x0,Y.y0,Y.name,Y.attr,Y.xa?Y.xa._id:"",Y.ya?Y.ya._id:""].join(",")}var V=/([\s\S]*)<\/extra>/;function H(Y,ft){var ut=ft.gd,kt=ut._fullLayout,It=ft.hovermode,Pt=ft.rotateLabels,qt=ft.bgColor,Wt=ft.container,Jt=ft.outerContainer,ge=ft.commonLabelOpts||{};if(Y.length===0)return[[]];var fe=ft.fontFamily||T.HOVERFONT,pe=ft.fontSize||T.HOVERFONTSIZE,se=ft.fontWeight||kt.font.weight,Tt=ft.fontStyle||kt.font.style,Lt=ft.fontVariant||kt.font.variant,Mt=ft.fontTextcase||kt.font.textcase,ee=ft.fontLineposition||kt.font.lineposition,ve=ft.fontShadow||kt.font.shadow,oe=Y[0],Te=oe.xa,He=oe.ya,Ge=It.charAt(0),cr=Ge+"Label",ur=oe[cr];if(ur===void 0&&Te.type==="multicategory")for(var jr=0;jrkt.width-Ce&&(dr=kt.width-Ce),za.attr("d","M"+(Yr-dr)+",0L"+(Yr-dr+h)+","+on+h+"H"+Ce+"v"+on+(p*2+Br.height)+"H"+-Ce+"V"+on+h+"H"+(Yr-dr-h)+"Z"),Yr=dr,Nt.minX=Yr-Ce,Nt.maxX=Yr+Ce,Te.side==="top"?(Nt.minY=pn-(p*2+Br.height),Nt.maxY=pn-p):(Nt.minY=pn+p,Nt.maxY=pn+(p*2+Br.height))}else{var Hr,_n,Fn;He.side==="right"?(Hr="start",_n=1,Fn="",Yr=Te._offset+Te._length):(Hr="end",_n=-1,Fn="-",Yr=Te._offset),pn=He._offset+(oe.y0+oe.y1)/2,Wa.attr("text-anchor",Hr),za.attr("d","M0,0L"+Fn+h+","+h+"V"+(p+Br.height/2)+"h"+Fn+(p*2+Br.width)+"V-"+(p+Br.height/2)+"H"+Fn+h+"V-"+h+"Z"),Nt.minY=pn-(p+Br.height/2),Nt.maxY=pn+(p+Br.height/2),He.side==="right"?(Nt.minX=Yr+h,Nt.maxX=Yr+h+(p*2+Br.width)):(Nt.minX=Yr-h-(p*2+Br.width),Nt.maxX=Yr-h);var Qn=Br.height/2,Pn=br-Br.top-Qn,En="clip"+kt._uid+"commonlabel"+He._id,Zn;if(Yrza.hoverinfo!=="none");if(ci.length===0)return[];var re=kt.hoverlabel,le=re.font,we=ci[0],Ue=((It==="x unified"?we.xa:we.ya).unifiedhovertitle||{}).text,qe=Ue?I.hovertemplateString({data:It==="x unified"?[{xa:we.xa,x:we.xVal}]:[{ya:we.ya,y:we.yVal}],fallback:we.trace.hovertemplatefallback,locale:kt._d3locale,template:Ue}):ur,or={showlegend:!0,legend:{title:{text:qe,font:le},font:le,bgcolor:re.bgcolor,bordercolor:re.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:kt.legend?kt.legend.traceorder:void 0,orientation:"v"}},Sr={font:le};u(or,Sr,ut._fullData);var Ar=Sr.legend;Ar.entries=[];for(var mr=0;mr=0?Oi=Tn:Mn+sa=0?Oi=Mn:fi+sa=0?ji=tn:Cn+Zi=0?ji=Cn:ki+Zi=0,(ci.idealAlign==="top"||!Qa)&&Ja?(Fn-=Pn/2,ci.anchor="end"):Qa?(Fn+=Pn/2,ci.anchor="start"):ci.anchor="middle",ci.crossPos=Fn;else{if(ci.pos=Fn,Qa=_n+Qn/2+Vi<=Xr,Ja=_n-Qn/2-Vi>=0,(ci.idealAlign==="left"||!Qa)&&Ja)_n-=Qn/2,ci.anchor="end";else if(Qa)_n+=Qn/2,ci.anchor="start";else{ci.anchor="middle";var Do=Vi/2,yo=_n+Do-Xr,Fo=_n-Do;yo>0&&(_n-=yo),Fo<0&&(_n+=-Fo)}ci.crossPos=_n}pn.attr("text-anchor",ci.anchor),Ce&&on.attr("text-anchor",ci.anchor),za.attr("transform",t(_n,Fn)+(Pt?e(_):""))}),{hoverLabels:Xi,commonLabelBoundingBox:Nt}}function F(Y,ft,ut,kt,It,Pt){var qt="",Wt="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=I.templateString(Y.name,Y.trace._meta)),qt=tt(Y.name,Y.nameLength));var Jt=ut.charAt(0),ge=Jt==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(Wt+="x: "+Y.xLabel+"
"),Y.yLabel!==void 0&&(Wt+="y: "+Y.yLabel+"
"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&Y.trace.type!=="choroplethmap"&&(Wt+=(Wt?"z: ":"")+Y.zLabel)):ft&&Y[Jt+"Label"]===It?Wt=Y[ge+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(Wt=Y.yLabel):Y.yLabel===void 0?Wt=Y.xLabel:Wt="("+Y.xLabel+", "+Y.yLabel+")",(Y.text||Y.text===0)&&!Array.isArray(Y.text)&&(Wt+=(Wt?"
":"")+Y.text),Y.extraText!==void 0&&(Wt+=(Wt?"
":"")+Y.extraText),Pt&&Wt===""&&!Y.hovertemplate&&(qt===""&&Pt.remove(),Wt=qt);let{hovertemplate:fe=!1}=Y;if(fe){let pe=Y.hovertemplateLabels||Y;Y[Jt+"Label"]!==It&&(pe[Jt+"other"]=pe[Jt+"Val"],pe[Jt+"otherLabel"]=pe[Jt+"Label"]),Wt=I.hovertemplateString({data:[Y.eventData[0]||{},Y.trace._meta],fallback:Y.trace.hovertemplatefallback,labels:pe,locale:kt._d3locale,template:fe}),Wt=Wt.replace(V,(se,Tt)=>(qt=tt(Tt,Y.nameLength),""))}return[Wt,qt]}function U(Y,ft,ut,kt){var It=ft?"xa":"ya",Pt=ft?"ya":"xa",qt=0,Wt=1,Jt=Y.size(),ge=new Array(Jt),fe=0,pe=kt.minX,se=kt.maxX,Tt=kt.minY,Lt=kt.maxY,Mt=function(Ct){return Ct*ut._invScaleX},ee=function(Ct){return Ct*ut._invScaleY};Y.each(function(Ct){var gt=Ct[It],St=Ct[Pt],Nt=gt._id.charAt(0)==="x",re=gt.range;fe===0&&re&&re[0]>re[1]!==Nt&&(Wt=-1);var le=0,we=Nt?ut.width:ut.height;if(ut.hovermode==="x"||ut.hovermode==="y"){var Ue=W(Ct,ft),qe=Ct.anchor,or=qe==="end"?-1:1,Sr,Ar;if(qe==="middle")Sr=Ct.crossPos+(Nt?ee(Ue.y-Ct.by/2):Mt(Ct.bx/2+Ct.tx2width/2)),Ar=Sr+(Nt?ee(Ct.by):Mt(Ct.bx));else if(Nt)Sr=Ct.crossPos+ee(h+Ue.y)-ee(Ct.by/2-h),Ar=Sr+ee(Ct.by);else{var mr=Mt(or*h+Ue.x),Qr=mr+Mt(or*Ct.bx);Sr=Ct.crossPos+Math.min(mr,Qr),Ar=Ct.crossPos+Math.max(mr,Qr)}Nt?Tt!==void 0&&Lt!==void 0&&Math.min(Ar,Lt)-Math.max(Sr,Tt)>1&&(St.side==="left"?(le=St._mainLinePosition,we=ut.width):we=St._mainLinePosition):pe!==void 0&&se!==void 0&&Math.min(Ar,se)-Math.max(Sr,pe)>1&&(St.side==="top"?(le=St._mainLinePosition,we=ut.height):we=St._mainLinePosition)}ge[fe++]=[{datum:Ct,traceIndex:Ct.trace.index,dp:0,pos:Ct.pos,posref:Ct.posref,size:Ct.by*(Nt?M:1)/2,pmin:le,pmax:we}]}),ge.sort(function(Ct,gt){return Ct[0].posref-gt[0].posref||Wt*(gt[0].traceIndex-Ct[0].traceIndex)});var ve,oe,Te,He,Ge,cr,ur;function jr(Ct){var gt=Ct[0],St=Ct[Ct.length-1];if(oe=gt.pmin-gt.pos-gt.dp+gt.size,Te=St.pos+St.dp+St.size-gt.pmax,oe>.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp+=oe;ve=!1}if(!(Te<.01)){if(oe<-.01){for(Ge=Ct.length-1;Ge>=0;Ge--)Ct[Ge].dp-=Te;ve=!1}if(ve){var Nt=0;for(He=0;Hegt.pmax&&Nt++;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos>gt.pmax-1&&(cr.del=!0,Nt--);for(He=0;He=0;Ge--)Ct[Ge].dp-=Te;for(He=Ct.length-1;He>=0&&!(Nt<=0);He--)cr=Ct[He],cr.pos+cr.dp+cr.size>gt.pmax&&(cr.del=!0,Nt--)}}}for(;!ve&&qt<=Jt;){for(qt++,ve=!0,He=0;He.01){for(Ge=br.length-1;Ge>=0;Ge--)br[Ge].dp+=oe;for(Wr.push.apply(Wr,br),ge.splice(He+1,1),ur=0,Ge=Wr.length-1;Ge>=0;Ge--)ur+=Wr[Ge].dp;for(Te=ur/Wr.length,Ge=Wr.length-1;Ge>=0;Ge--)Wr[Ge].dp-=Te;ve=!1}else He++}ge.forEach(jr)}for(He=ge.length-1;He>=0;He--){var Le=ge[He];for(Ge=Le.length-1;Ge>=0;Ge--){var Gt=Le[Ge],ne=Gt.datum;ne.offset=Gt.dp,ne.del=Gt.del}}}function W(Y,ft){var ut=0,kt=Y.offset;return ft&&(kt*=-A,ut=Y.offset*C),{x:ut,y:kt}}function q(Y){var ft={start:1,end:-1,middle:0}[Y.anchor],ut=ft*(h+p),kt=ut+ft*(Y.txwidth+p),It=Y.anchor==="middle";return It&&(ut-=Y.tx2width/2,kt+=Y.txwidth/2+p),{alignShift:ft,textShiftX:ut,text2ShiftX:kt}}function J(Y,ft,ut,kt){var It=function(qt){return qt*ut},Pt=function(qt){return qt*kt};Y.each(function(qt){var Wt=Z.select(this);if(qt.del)return Wt.remove();var Jt=Wt.select("text.nums"),ge=qt.anchor,fe=ge==="end"?-1:1,pe=q(qt),se=W(qt,ft),Tt=se.x,Lt=se.y,Mt=ge==="middle",ee="hoverlabel"in qt.trace?qt.trace.hoverlabel.showarrow:!0,ve;Mt?ve="M-"+It(qt.bx/2+qt.tx2width/2)+","+Pt(Lt-qt.by/2)+"h"+It(qt.bx)+"v"+Pt(qt.by)+"h-"+It(qt.bx)+"Z":ee?ve="M0,0L"+It(fe*h+Tt)+","+Pt(h+Lt)+"v"+Pt(qt.by/2-h)+"h"+It(fe*qt.bx)+"v-"+Pt(qt.by)+"H"+It(fe*h+Tt)+"V"+Pt(Lt-h)+"Z":ve="M"+It(fe*h+Tt)+","+Pt(Lt-qt.by/2)+"h"+It(fe*qt.bx)+"v"+Pt(qt.by)+"h"+It(-fe*qt.bx)+"Z",Wt.select("path").attr("d",ve);var oe=Tt+pe.textShiftX,Te=Lt+qt.ty0-qt.by/2+p,He=qt.textAlign||"auto";He!=="auto"&&(He==="left"&&ge!=="start"?(Jt.attr("text-anchor","start"),oe=Mt?-qt.bx/2-qt.tx2width/2+p:-qt.bx-p):He==="right"&&ge!=="end"&&(Jt.attr("text-anchor","end"),oe=Mt?qt.bx/2-qt.tx2width/2-p:qt.bx+p)),Jt.call(a.positionText,It(oe),Pt(Te)),qt.tx2width&&(Wt.select("text.name").call(a.positionText,It(pe.text2ShiftX+pe.alignShift*p+Tt),Pt(Lt+qt.ty0-qt.by/2+p)),Wt.select("rect").call(o.setRect,It(pe.text2ShiftX+(pe.alignShift-1)*qt.tx2width/2+Tt),Pt(Lt-qt.by/2-1),It(qt.tx2width),Pt(qt.by+2)))})}function lt(Y,ft){var ut=Y.index,kt=Y.trace||{},It=Y.cd[0],Pt=Y.cd[ut]||{};function qt(se){return se||c(se)&&se===0}var Wt=Array.isArray(ut)?function(se,Tt){var Lt=I.castOption(It,ut,se);return qt(Lt)?Lt:I.extractOption({},kt,"",Tt)}:function(se,Tt){return I.extractOption(Pt,kt,se,Tt)};function Jt(se,Tt,Lt){var Mt=Wt(Tt,Lt);qt(Mt)&&(Y[se]=Mt)}if(Jt("hoverinfo","hi","hoverinfo"),Jt("bgcolor","hbg","hoverlabel.bgcolor"),Jt("borderColor","hbc","hoverlabel.bordercolor"),Jt("fontFamily","htf","hoverlabel.font.family"),Jt("fontSize","hts","hoverlabel.font.size"),Jt("fontColor","htc","hoverlabel.font.color"),Jt("fontWeight","htw","hoverlabel.font.weight"),Jt("fontStyle","hty","hoverlabel.font.style"),Jt("fontVariant","htv","hoverlabel.font.variant"),Jt("nameLength","hnl","hoverlabel.namelength"),Jt("textAlign","hta","hoverlabel.align"),Y.posref=ft==="y"||ft==="closest"&&kt.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=I.constrain(Y.x0,0,Y.xa._length),Y.x1=I.constrain(Y.x1,0,Y.xa._length),Y.y0=I.constrain(Y.y0,0,Y.ya._length),Y.y1=I.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:f.hoverLabelText(Y.xa,Y.xLabelVal,kt.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:f.hoverLabelText(Y.ya,Y.yLabelVal,kt.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!isNaN(Y.xerr)&&!(Y.xa.type==="log"&&Y.xerr<=0)){var ge=f.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+ge+" / -"+f.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+ge,ft==="x"&&(Y.distance+=1)}if(!isNaN(Y.yerr)&&!(Y.ya.type==="log"&&Y.yerr<=0)){var fe=f.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+fe+" / -"+f.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+fe,ft==="y"&&(Y.distance+=1)}var pe=Y.hoverinfo||Y.trace.hoverinfo;return pe&&pe!=="all"&&(pe=Array.isArray(pe)?pe:pe.split("+"),pe.indexOf("x")===-1&&(Y.xLabel=void 0),pe.indexOf("y")===-1&&(Y.yLabel=void 0),pe.indexOf("z")===-1&&(Y.zLabel=void 0),pe.indexOf("text")===-1&&(Y.text=void 0),pe.indexOf("name")===-1&&(Y.name=void 0)),Y}function yt(Y,ft,ut){var kt=ut.container,It=ut.fullLayout,Pt=It._size,qt=ut.event,Wt=!!ft.hLinePoint,Jt=!!ft.vLinePoint,ge,fe;if(kt.selectAll(".spikeline").remove(),!!(Jt||Wt)){var pe=i.combine(It.plot_bgcolor,It.paper_bgcolor);if(Wt){var se=ft.hLinePoint,Tt,Lt;ge=se&&se.xa,fe=se&&se.ya;var Mt=fe.spikesnap;Mt==="cursor"?(Tt=qt.pointerX,Lt=qt.pointerY):(Tt=ge._offset+se.x,Lt=fe._offset+se.y);var ee=g.readability(se.color,pe)<1.5?i.contrast(pe):se.color,ve=fe.spikemode,oe=fe.spikethickness,Te=fe.spikecolor||ee,He=f.getPxPosition(Y,fe),Ge,cr;if(ve.indexOf("toaxis")!==-1||ve.indexOf("across")!==-1){if(ve.indexOf("toaxis")!==-1&&(Ge=He,cr=Tt),ve.indexOf("across")!==-1){var ur=fe._counterDomainMin,jr=fe._counterDomainMax;fe.anchor==="free"&&(ur=Math.min(ur,fe.position),jr=Math.max(jr,fe.position)),Ge=Pt.l+ur*Pt.w,cr=Pt.l+jr*Pt.w}kt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe,stroke:Te,"stroke-dasharray":o.dashStyle(fe.spikedash,oe)}).classed("spikeline",!0).classed("crisp",!0),kt.insert("line",":first-child").attr({x1:Ge,x2:cr,y1:Lt,y2:Lt,"stroke-width":oe+2,stroke:pe}).classed("spikeline",!0).classed("crisp",!0)}ve.indexOf("marker")!==-1&&kt.insert("circle",":first-child").attr({cx:He+(fe.side!=="right"?oe:-oe),cy:Lt,r:oe,fill:Te}).classed("spikeline",!0)}if(Jt){var Wr=ft.vLinePoint,br,Xr;ge=Wr&&Wr.xa,fe=Wr&&Wr.ya;var nn=ge.spikesnap;nn==="cursor"?(br=qt.pointerX,Xr=qt.pointerY):(br=ge._offset+Wr.x,Xr=fe._offset+Wr.y);var Le=g.readability(Wr.color,pe)<1.5?i.contrast(pe):Wr.color,Gt=ge.spikemode,ne=ge.spikethickness,Ct=ge.spikecolor||Le,gt=f.getPxPosition(Y,ge),St,Nt;if(Gt.indexOf("toaxis")!==-1||Gt.indexOf("across")!==-1){if(Gt.indexOf("toaxis")!==-1&&(St=gt,Nt=Xr),Gt.indexOf("across")!==-1){var re=ge._counterDomainMin,le=ge._counterDomainMax;ge.anchor==="free"&&(re=Math.min(re,ge.position),le=Math.max(le,ge.position)),St=Pt.t+(1-le)*Pt.h,Nt=Pt.t+(1-re)*Pt.h}kt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne,stroke:Ct,"stroke-dasharray":o.dashStyle(ge.spikedash,ne)}).classed("spikeline",!0).classed("crisp",!0),kt.insert("line",":first-child").attr({x1:br,x2:br,y1:St,y2:Nt,"stroke-width":ne+2,stroke:pe}).classed("spikeline",!0).classed("crisp",!0)}Gt.indexOf("marker")!==-1&&kt.insert("circle",":first-child").attr({cx:br,cy:gt-(ge.side!=="top"?ne:-ne),r:ne,fill:Ct}).classed("spikeline",!0)}}}function mt(Y,ft,ut){if(!ut||ut.length!==Y._hoverdata.length)return!0;for(var kt=ut.length-1;kt>=0;kt--){var It=ut[kt],Pt=Y._hoverdata[kt];if(It.curveNumber!==Pt.curveNumber||String(It.pointNumber)!==String(Pt.pointNumber)||String(It.pointNumbers)!==String(Pt.pointNumbers)||It.binNumber!==Pt.binNumber)return!0}return!1}function st(Y,ft){return!0}function tt(Y,ft){return a.plainText(Y||"",{len:ft,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function dt(Y,ft){for(var ut=ft.charAt(0),kt=[],It=[],Pt=[],qt=0;qtY.offsetTop+Y.clientTop,vt=Y=>Y.offsetLeft+Y.clientLeft;function it(Y,ft){var ut=Y._fullLayout,kt=ft.getBoundingClientRect(),It=kt.left,Pt=kt.top,qt=It+kt.width,Wt=Pt+kt.height,Jt=I.apply3DTransform(ut._invTransform)(It,Pt),ge=I.apply3DTransform(ut._invTransform)(qt,Wt),fe=Jt[0],pe=Jt[1],se=ge[0],Tt=ge[1];return{x:fe,y:pe,width:se-fe,height:Tt-pe,top:Math.min(pe,Tt),left:Math.min(fe,se),right:Math.max(fe,se),bottom:Math.max(pe,Tt)}}}),Tg=Dt((Q,Z)=>{var c=kn(),g=hi(),I=Fp().isUnifiedHover;Z.exports=function(S,t,e,r){r=r||{};var a=t.legend;function n(o){r.font[o]||(r.font[o]=a?t.legend.font[o]:t.font[o])}t&&I(t.hovermode)&&(r.font||(r.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),a?(r.bgcolor||(r.bgcolor=g.combine(t.legend.bgcolor,t.paper_bgcolor)),r.bordercolor||(r.bordercolor=t.legend.bordercolor)):r.bgcolor||(r.bgcolor=t.paper_bgcolor)),e("hoverlabel.bgcolor",r.bgcolor),e("hoverlabel.bordercolor",r.bordercolor),e("hoverlabel.namelength",r.namelength),e("hoverlabel.showarrow",r.showarrow),c.coerceFont(e,"hoverlabel.font",r.font),e("hoverlabel.align",r.align)}}),Ag=Dt((Q,Z)=>{var c=kn(),g=Tg(),I=po();Z.exports=function(S,t){function e(r,a){return c.coerce(S,t,I,r,a)}g(S,t,e)}}),w6=Dt((Q,Z)=>{var c=kn(),g=us(),I=Tg();Z.exports=function(S,t,e,r){function a(o,i){return c.coerce(S,t,g,o,i)}var n=c.extendFlat({},r.hoverlabel);t.hovertemplate&&(n.namelength=-1),I(S,t,a,n)}}),pv=Dt((Q,Z)=>{var c=kn(),g=po();Z.exports=function(I,S){function t(e,r){return S[e]!==void 0?S[e]:c.coerce(I,S,g,e,r)}return t("clickmode"),t("hoversubplots"),t("hovermode")}}),g0=Dt((Q,Z)=>{var c=kn(),g=po(),I=pv(),S=Tg();Z.exports=function(t,e){function r(x,y){return c.coerce(t,e,g,x,y)}var a=I(t,e);a&&(r("hoverdistance"),r("spikedistance"));var n=r("dragmode");n==="select"&&r("selectdirection");var o=e._has("mapbox"),i=e._has("map"),l=e._has("geo"),f=e._basePlotModules.length;e.dragmode==="zoom"&&((o||i||l)&&f===1||(o||i)&&l&&f===2)&&(e.dragmode="pan"),S(t,e,r),c.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}}),Tw=Dt((Q,Z)=>{var c=kn(),g=Jo();Z.exports=function(S){var t=S.calcdata,e=S._fullLayout;function r(l){return function(f){return c.coerceHoverinfo({hoverinfo:f},{_module:l._module},e)}}for(var a=0;a{var c=Jo(),g=B_().hover;Z.exports=function(I,S,t){var e=c.getComponentMethod("annotations","onClick")(I,I._hoverdata);t!==void 0&&g(I,S,t,!0);function r(){I.emit("plotly_click",{points:I._hoverdata,event:S})}I._hoverdata&&S&&S.target&&(e&&e.then?e.then(r):r(),S.stopImmediatePropagation&&S.stopImmediatePropagation())}}),tf=Dt((Q,Z)=>{var c=qr(),g=kn(),I=up(),S=Fp(),t=po(),e=B_();Z.exports={moduleType:"component",name:"fx",constants:no(),schema:{layout:t},attributes:us(),layoutAttributes:t,supplyLayoutGlobalDefaults:Ag(),supplyDefaults:w6(),supplyLayoutDefaults:g0(),calc:Tw(),getDistanceFunction:S.getDistanceFunction,getClosest:S.getClosest,inbox:S.inbox,quadrature:S.quadrature,appendArrayPointValue:S.appendArrayPointValue,castHoverOption:a,castHoverinfo:n,hover:e.hover,unhover:I.unhover,loneHover:e.loneHover,loneUnhover:r,click:Aw()};function r(o){var i=g.isD3Selection(o)?o:c.select(o);i.selectAll("g.hovertext").remove(),i.selectAll(".spikeline").remove()}function a(o,i,l){return g.castOption(o,i,"hoverlabel."+l)}function n(o,i,l){function f(x){return g.coerceHoverinfo({hoverinfo:x},{_module:o._module},i)}return g.castOption(o,l,"hoverinfo",f)}}),v0=Dt(Q=>{Q.selectMode=function(Z){return Z==="lasso"||Z==="select"},Q.drawMode=function(Z){return Z==="drawclosedpath"||Z==="drawopenpath"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},Q.openMode=function(Z){return Z==="drawline"||Z==="drawopenpath"},Q.rectMode=function(Z){return Z==="select"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},Q.freeMode=function(Z){return Z==="lasso"||Z==="drawclosedpath"||Z==="drawopenpath"},Q.selectingOrDrawing=function(Z){return Q.freeMode(Z)||Q.rectMode(Z)}}),mv=Dt((Q,Z)=>{Z.exports=function(c){var g=c._fullLayout;g._glcanvas&&g._glcanvas.size()&&g._glcanvas.each(function(I){I.regl&&I.regl.clear({color:!0,depth:!0})})}}),N_=Dt((Q,Z)=>{Z.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}),j_=Dt((Q,Z)=>{var c=32;Z.exports={CIRCLE_SIDES:c,i000:0,i090:c/4,i180:c/2,i270:c/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}),Vy=Dt((Q,Z)=>{var c=kn().strTranslate;function g(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function I(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function S(e){var r=e._id.charAt(0)==="y"?1:0;return function(a){return g(e,a[r])}}function t(e){return c(e.xaxis._offset,e.yaxis._offset)}Z.exports={p2r:g,r2p:I,axValue:S,getTransform:t}}),Mg=Dt(Q=>{var Z=S1(),c=j_(),g=c.CIRCLE_SIDES,I=c.SQRT2,S=Vy(),t=S.p2r,e=S.r2p,r=[0,3,4,5,6,1,2],a=[0,3,4,1,2];Q.writePaths=function(i){var l=i.length;if(!l)return"M0,0Z";for(var f="",x=0;x0&&b{var c=Rc(),g=v0(),I=g.drawMode,S=g.openMode,t=j_(),e=t.i000,r=t.i090,a=t.i180,n=t.i270,o=t.cos45,i=t.sin45,l=Vy(),f=l.p2r,x=l.r2p,y=C0(),v=y.clearOutline,T=Mg(),u=T.readPaths,b=T.writePaths,_=T.ellipseOver,P=T.fixDatesForPaths;function M(A,h){if(A.length){var p=A[0][0];if(p){var k=h.gd,w=h.isActiveShape,R=h.dragmode,O=(k.layout||{}).shapes||[];if(!I(R)&&w!==void 0){var j=k._fullLayout._activeShapeIndex;if(j{var c=v0(),g=c.selectMode,I=C0(),S=I.clearOutline,t=Mg(),e=t.readPaths,r=t.writePaths,a=t.fixDatesForPaths;Z.exports=function(n,o){if(n.length){var i=n[0][0];if(i){var l=i.getAttribute("d"),f=o.gd,x=f._fullLayout.newselection,y=o.plotinfo,v=y.xaxis,T=y.yaxis,u=o.isActiveSelection,b=o.dragmode,_=(f.layout||{}).selections||[];if(!g(b)&&u!==void 0){var P=f._fullLayout._activeSelectionIndex;if(P<_.length)switch(f._fullLayout.selections[P].type){case"rect":b="select";break;case"path":b="lasso";break}}var M=e(l,f,y,u),C={xref:v._id,yref:T._id,opacity:x.opacity,line:{color:x.line.color,width:x.line.width,dash:x.line.dash}},A;M.length===1&&(A=M[0]),A&&A.length===5&&b==="select"?(C.type="rect",C.x0=A[0][1],C.y0=A[0][2],C.x1=A[2][1],C.y1=A[2][2]):(C.type="path",v&&T&&a(M,v,T),C.path=r(M),A=null),S(f);for(var h=o.editHelpers,p=(h||{}).modifyItem,k=[],w=0;w<_.length;w++){var R=f._fullLayout.selections[w];if(!R){k[w]=R;continue}if(k[w]=R._input,u!==void 0&&w===f._fullLayout._activeSelectionIndex){var O=C;switch(R.type){case"rect":p("x0",O.x0),p("x1",O.x1),p("y0",O.y0),p("y1",O.y1);break;case"path":p("path",O.path);break}}}return u===void 0?(k.push(C),k):h?h.getUpdateObj():{}}}}}),Hy=Dt((Q,Z)=>{Z.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}}),wp=Dt(Q=>{var Z=Hy(),c=kn(),g=Ls();Q.rangeToShapePosition=function(t){return t.type==="log"?t.r2d:function(e){return e}},Q.shapePositionToRange=function(t){return t.type==="log"?t.d2r:function(e){return e}},Q.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},Q.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},Q.extractPathCoords=function(t,e,r){var a=[],n=t.match(Z.segmentRE);return n.forEach(function(o){var i=e[o.charAt(0)].drawn;if(i!==void 0){var l=o.substr(1).match(Z.paramRE);if(!(!l||l.lengthu&&(_="X"),_});return x>u&&(b=b.replace(/[\s,]*X.*/,""),c.log("Ignoring extra params in segment "+f)),y+b})}function S(t,e){e=e||0;var r=0;return e&&t&&(t.type==="category"||t.type==="multicategory")&&(r=(t.r2p(1)-t.r2p(0))*e),r}}),Mw=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=ec(),S=Vs(),t=Mg().readPaths,e=wp(),r=e.getPathString,a=_1(),n=Af().FROM_TL;Z.exports=function(l,f,x,y){if(y.selectAll(".shape-label").remove(),!!(x.label.text||x.label.texttemplate)){var v;if(x.label.texttemplate){var T={};if(x.type!=="path"){var u=g.getFromId(l,x.xref),b=g.getFromId(l,x.yref);for(var _ in a){var P=a[_](x,u,b);P!==void 0&&(T[_]=P)}}v=c.texttemplateStringForShapes({data:[T],fallback:x.label.texttemplatefallback,locale:l._fullLayout._d3locale,template:x.label.texttemplate})}else v=x.label.text;var M={"data-index":f},C=x.label.font,A={"data-notex":1},h=y.append("g").attr(M).classed("shape-label",!0),p=h.append("text").attr(A).classed("shape-label-text",!0).text(v),k,w,R,O;if(x.path){var j=r(l,x),V=t(j,l);k=1/0,R=1/0,w=-1/0,O=-1/0;for(var H=0;H=l?v=f-y:v=y-f,-180/Math.PI*Math.atan2(v,T)}function i(l,f,x,y,v,T,u){var b=v.label.textposition,_=v.label.textangle,P=v.label.padding,M=v.type,C=Math.PI/180*T,A=Math.sin(C),h=Math.cos(C),p=v.label.xanchor,k=v.label.yanchor,w,R,O,j;if(M==="line"){b==="start"?(w=l,R=f):b==="end"?(w=x,R=y):(w=(l+x)/2,R=(f+y)/2),p==="auto"&&(b==="start"?_==="auto"?x>l?p="left":xl?p="right":xl?p="right":xl?p="left":x{var c=kn(),g=c.strTranslate,I=up(),S=v0(),t=S.drawMode,e=S.selectMode,r=Jo(),a=hi(),n=j_(),o=n.i000,i=n.i090,l=n.i180,f=n.i270,x=C0(),y=x.clearOutlineControllers,v=Mg(),T=v.pointsOnRectangle,u=v.pointsOnEllipse,b=v.writePaths,_=a0().newShapes,P=a0().createShapeObj,M=Sg(),C=Mw();Z.exports=function k(w,R,O,j){j||(j=0);var V=O.gd;function H(){k(w,R,O,j++),(u(w[0])||O.hasText)&&F({redrawing:!0})}function F(pe){var se={};O.isActiveShape!==void 0&&(O.isActiveShape=!1,se=_(R,O)),O.isActiveSelection!==void 0&&(O.isActiveSelection=!1,se=M(R,O),V._fullLayout._reselect=!0),Object.keys(se).length&&r.call((pe||{}).redrawing?"relayout":"_guiRelayout",V,se)}var U=V._fullLayout,W=U._zoomlayer,q=O.dragmode,J=t(q),lt=e(q);(J||lt)&&(V._fullLayout._outlining=!0),y(V),R.attr("d",b(w));var yt,mt,st,tt,dt;if(!j&&(O.isActiveShape||O.isActiveSelection)){dt=A([],w);var rt=W.append("g").attr("class","outline-controllers");It(rt),fe()}if(J&&O.hasText){var at=W.select(".label-temp"),vt=P(R,O,O.dragmode);C(V,"label-temp",vt,at)}function it(pe){st=+pe.srcElement.getAttribute("data-i"),tt=+pe.srcElement.getAttribute("data-j"),yt[st][tt].moveFn=Y}function Y(pe,se){if(w.length){var Tt=dt[st][tt][1],Lt=dt[st][tt][2],Mt=w[st],ee=Mt.length;if(T(Mt)){var ve=pe,oe=se;if(O.isActiveSelection){var Te=h(Mt,tt);Te[1]===Mt[tt][1]?oe=0:ve=0}for(var He=0;He1&&!(pe.length===2&&pe[1][0]==="Z")&&(tt===0&&(pe[0][0]="M"),w[st]=pe,H(),F())}}function kt(pe,se){if(pe===2){st=+se.srcElement.getAttribute("data-i"),tt=+se.srcElement.getAttribute("data-j");var Tt=w[st];!T(Tt)&&!u(Tt)&&ut()}}function It(pe){yt=[];for(var se=0;se{var c=qr(),g=Jo(),I=kn(),S=Ls(),t=Mg().readPaths,e=Um(),r=Mw(),a=C0().clearOutlineControllers,n=hi(),o=Vs(),i=mu().arrayEditor,l=up(),f=P0(),x=Hy(),y=wp(),v=y.getPathString;Z.exports={draw:T,drawOne:_,eraseActiveShape:p,drawLabel:r};function T(k){var w=k._fullLayout;w._shapeUpperLayer.selectAll("path").remove(),w._shapeLowerLayer.selectAll("path").remove(),w._shapeUpperLayer.selectAll("text").remove(),w._shapeLowerLayer.selectAll("text").remove();for(var R in w._plots){var O=w._plots[R].shapelayer;O&&(O.selectAll("path").remove(),O.selectAll("text").remove())}for(var j=0;jH&&re>F&&!gt.shiftKey?l.getCursor(le/Nt,1-we/re):"move";f(w,Ue),Ge=Ue.split("-")[0]}}function Wr(gt){u(k)||(U&&(dt=Mt(R.xanchor)),W&&(rt=ee(R.yanchor)),R.type==="path"?Pt=R.path:(yt=U?R.x0:Mt(R.x0),mt=W?R.y0:ee(R.y0),st=U?R.x1:Mt(R.x1),tt=W?R.y1:ee(R.y1)),yttt?(at=mt,ft="y0",vt=tt,ut="y1"):(at=tt,ft="y1",vt=mt,ut="y0"),jr(gt),Gt(j,R),Ct(w,R,k),He.moveFn=Ge==="move"?nn:Le,He.altKey=gt.altKey)}function br(){u(k)||(f(w),ne(j),P(w,k,R),g.call("_guiRelayout",k,V.getUpdateObj()))}function Xr(){u(k)||ne(j)}function nn(gt,St){if(R.type==="path"){var Nt=function(we){return we},re=Nt,le=Nt;U?lt("xanchor",R.xanchor=ve(dt+gt)):(re=function(we){return ve(Mt(we)+gt)},Wt&&Wt.type==="date"&&(re=y.encodeDate(re))),W?lt("yanchor",R.yanchor=oe(rt+St)):(le=function(we){return oe(ee(we)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",R.path=C(Pt,re,le))}else U?lt("xanchor",R.xanchor=ve(dt+gt)):(lt("x0",R.x0=ve(yt+gt)),lt("x1",R.x1=ve(st+gt))),W?lt("yanchor",R.yanchor=oe(rt+St)):(lt("y0",R.y0=oe(mt+St)),lt("y1",R.y1=oe(tt+St)));w.attr("d",v(k,R)),Gt(j,R),r(k,O,R,qt)}function Le(gt,St){if(J){var Nt=function($n){return $n},re=Nt,le=Nt;U?lt("xanchor",R.xanchor=ve(dt+gt)):(re=function($n){return ve(Mt($n)+gt)},Wt&&Wt.type==="date"&&(re=y.encodeDate(re))),W?lt("yanchor",R.yanchor=oe(rt+St)):(le=function($n){return oe(ee($n)+St)},ge&&ge.type==="date"&&(le=y.encodeDate(le))),lt("path",R.path=C(Pt,re,le))}else if(q){if(Ge==="resize-over-start-point"){var we=yt+gt,Ue=W?mt-St:mt+St;lt("x0",R.x0=U?we:ve(we)),lt("y0",R.y0=W?Ue:oe(Ue))}else if(Ge==="resize-over-end-point"){var qe=st+gt,or=W?tt-St:tt+St;lt("x1",R.x1=U?qe:ve(qe)),lt("y1",R.y1=W?or:oe(or))}}else{var Sr=function($n){return Ge.indexOf($n)!==-1},Ar=Sr("n"),mr=Sr("s"),Qr=Sr("w"),Hn=Sr("e"),Wn=Ar?at+St:at,Xn=mr?vt+St:vt,Ii=Qr?it+gt:it,oi=Hn?Y+gt:Y;W&&(Ar&&(Wn=at-St),mr&&(Xn=vt-St)),(!W&&Xn-Wn>F||W&&Wn-Xn>F)&&(lt(ft,R[ft]=W?Wn:oe(Wn)),lt(ut,R[ut]=W?Xn:oe(Xn))),oi-Ii>H&&(lt(kt,R[kt]=U?Ii:ve(Ii)),lt(It,R[It]=U?oi:ve(oi)))}w.attr("d",v(k,R)),Gt(j,R),r(k,O,R,qt)}function Gt(gt,St){(U||W)&&Nt();function Nt(){var re=St.type!=="path",le=gt.selectAll(".visual-cue").data([0]),we=1;le.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":we}).classed("visual-cue",!0);var Ue=Mt(U?St.xanchor:I.midRange(re?[St.x0,St.x1]:y.extractPathCoords(St.path,x.paramIsX))),qe=ee(W?St.yanchor:I.midRange(re?[St.y0,St.y1]:y.extractPathCoords(St.path,x.paramIsY)));if(Ue=y.roundPositionForSharpStrokeRendering(Ue,we),qe=y.roundPositionForSharpStrokeRendering(qe,we),U&&W){var or="M"+(Ue-1-we)+","+(qe-1-we)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";le.attr("d",or)}else if(U){var Sr="M"+(Ue-1-we)+","+(qe-9-we)+"v18 h2 v-18 Z";le.attr("d",Sr)}else{var Ar="M"+(Ue-9-we)+","+(qe-1-we)+"h18 v2 h-18 Z";le.attr("d",Ar)}}}function ne(gt){gt.selectAll(".visual-cue").remove()}function Ct(gt,St,Nt){var re=St.xref,le=St.yref,we=S.getFromId(Nt,re),Ue=S.getFromId(Nt,le),qe="";re!=="paper"&&!we.autorange&&(qe+=re),le!=="paper"&&!Ue.autorange&&(qe+=le),o.setClipUrl(gt,qe?"clip"+Nt._fullLayout._uid+qe:null,Nt)}}function C(k,w,R){return k.replace(x.segmentRE,function(O){var j=0,V=O.charAt(0),H=x.paramIsX[V],F=x.paramIsY[V],U=x.numParams[V],W=O.substr(1).replace(x.paramRE,function(q){return j>=U||(H[j]?q=w(q):F[j]&&(q=R(q)),j++),q});return V+W})}function A(k,w){if(b(k)){var R=w.node(),O=+R.getAttribute("data-index");if(O>=0){if(O===k._fullLayout._activeShapeIndex){h(k);return}k._fullLayout._activeShapeIndex=O,k._fullLayout._deactivateShape=h,T(k)}}}function h(k){if(b(k)){var w=k._fullLayout._activeShapeIndex;w>=0&&(a(k),delete k._fullLayout._activeShapeIndex,T(k))}}function p(k){if(b(k)){a(k);var w=k._fullLayout._activeShapeIndex,R=(k.layout||{}).shapes||[];if(w{var c=Jo(),g=Kc(),I=Rc(),S=N_(),t=U_().eraseActiveShape,e=kn(),r=e._,a=Z.exports={};a.toImage={name:"toImage",title:function(M){var C=M._context.toImageButtonOptions||{},A=C.format||"png";return A==="png"?r(M,"Download plot as a PNG"):r(M,"Download plot")},icon:S.camera,click:function(M){var C=M._context.toImageButtonOptions,A={format:C.format||"png"};e.notifier(r(M,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(h){h in C&&(A[h]=C[h])}),c.call("downloadImage",M,A).then(function(h){e.notifier(r(M,"Snapshot succeeded")+" - "+h,"long")}).catch(function(){e.notifier(r(M,"Sorry, there was a problem downloading your snapshot!"),"long")})}},a.sendDataToCloud={name:"sendDataToCloud",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.disk,click:function(M){g.sendDataToCloud(M)}},a.editInChartStudio={name:"editInChartStudio",title:function(M){return r(M,"Edit in Chart Studio")},icon:S.pencil,click:function(M){g.sendDataToCloud(M)}},a.zoom2d={name:"zoom2d",_cat:"zoom",title:function(M){return r(M,"Zoom")},attr:"dragmode",val:"zoom",icon:S.zoombox,click:n},a.pan2d={name:"pan2d",_cat:"pan",title:function(M){return r(M,"Pan")},attr:"dragmode",val:"pan",icon:S.pan,click:n},a.select2d={name:"select2d",_cat:"select",title:function(M){return r(M,"Box Select")},attr:"dragmode",val:"select",icon:S.selectbox,click:n},a.lasso2d={name:"lasso2d",_cat:"lasso",title:function(M){return r(M,"Lasso Select")},attr:"dragmode",val:"lasso",icon:S.lasso,click:n},a.drawclosedpath={name:"drawclosedpath",title:function(M){return r(M,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:S.drawclosedpath,click:n},a.drawopenpath={name:"drawopenpath",title:function(M){return r(M,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:S.drawopenpath,click:n},a.drawline={name:"drawline",title:function(M){return r(M,"Draw line")},attr:"dragmode",val:"drawline",icon:S.drawline,click:n},a.drawrect={name:"drawrect",title:function(M){return r(M,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:S.drawrect,click:n},a.drawcircle={name:"drawcircle",title:function(M){return r(M,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:S.drawcircle,click:n},a.eraseshape={name:"eraseshape",title:function(M){return r(M,"Erase active shape")},icon:S.eraseshape,click:t},a.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(M){return r(M,"Zoom in")},attr:"zoom",val:"in",icon:S.zoom_plus,click:n},a.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(M){return r(M,"Zoom out")},attr:"zoom",val:"out",icon:S.zoom_minus,click:n},a.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(M){return r(M,"Autoscale")},attr:"zoom",val:"auto",icon:S.autoscale,click:n},a.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(M){return r(M,"Reset axes")},attr:"zoom",val:"reset",icon:S.home,click:n},a.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(M){return r(M,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:S.tooltip_basic,gravity:"ne",click:n},a.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(M){return r(M,"Compare data on hover")},attr:"hovermode",val:function(M){return M._fullLayout._isHoriz?"y":"x"},icon:S.tooltip_compare,gravity:"ne",click:n};function n(M,C){var A=C.currentTarget,h=A.getAttribute("data-attr"),p=A.getAttribute("data-val")||!0,k=M._fullLayout,w={},R=I.list(M,null,!0),O=k._cartesianSpikesEnabled,j,V;if(h==="zoom"){var H=p==="in"?.5:2,F=(1+H)/2,U=(1-H)/2,W,q;for(V=0;V{var c=gv(),g=Object.keys(c),I=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],S=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(I),t=[],e=function(r){if(S.indexOf(r._cat||r.name)===-1){var a=r.name,n=(r._cat||r.name).toLowerCase();t.indexOf(a)===-1&&t.push(a),t.indexOf(n)===-1&&t.push(n)}};g.forEach(function(r){e(c[r])}),t.sort(),Z.exports={DRAW_MODES:I,backButtons:S,foreButtons:t}}),E1=Dt((Q,Z)=>{V_(),Z.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}}),k6=Dt((Q,Z)=>{var c=kn(),g=hi(),I=mu(),S=E1();Z.exports=function(t,e){var r=t.modebar||{},a=I.newContainer(e,"modebar");function n(i,l){return c.coerce(r,a,S,i,l)}n("orientation"),n("bgcolor",g.addOpacity(e.paper_bgcolor,.5));var o=g.contrast(g.rgb(e.modebar.bgcolor));n("color",g.addOpacity(o,.3)),n("activecolor",g.addOpacity(o,.7)),n("uirevision",e.uirevision),n("add"),n("remove")}}),Vm=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=kn(),S=N_(),t=Wi().version,e=new DOMParser;function r(i){this.container=i.container,this.element=document.createElement("div"),this.update(i.graphInfo,i.buttons),this.container.appendChild(this.element)}var a=r.prototype;a.update=function(i,l){this.graphInfo=i;var f=this.graphInfo._context,x=this.graphInfo._fullLayout,y="modebar-"+x._uid;this.element.setAttribute("id",y),this.element.setAttribute("role","toolbar"),this._uid=y,this.element.className="modebar modebar--custom",f.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),x.modebar.orientation==="v"&&(this.element.className+=" vertical",l=l.reverse());var v=x.modebar,T="#"+y+" .modebar-group";document.querySelectorAll(T).forEach(function(M){M.style.backgroundColor=v.bgcolor});var u=!this.hasButtons(l),b=this.hasLogo!==f.displaylogo,_=this.locale!==f.locale;if(this.locale=f.locale,(u||b||_)&&(this.removeAllButtons(),this.updateButtons(l),f.watermark||f.displaylogo)){var P=this.getLogo();f.watermark&&(P.className=P.className+" watermark"),x.modebar.orientation==="v"?this.element.insertBefore(P,this.element.childNodes[0]):this.element.appendChild(P),this.hasLogo=!0}this.updateActiveButton(),I.setStyleOnHover("#"+y+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},a.updateButtons=function(i){var l=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(f){var x=l.createGroup();f.forEach(function(y){var v=y.name;if(!v)throw new Error("must provide button 'name' in button config");if(l.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");l.buttonsNames.push(v);var T=l.createButton(y);l.buttonElements.push(T),x.appendChild(T)}),l.element.appendChild(x)})},a.createGroup=function(){var i=document.createElement("div");i.className="modebar-group";var l=this.graphInfo._fullLayout.modebar;return i.style.backgroundColor=l.bgcolor,i},a.createButton=function(i){var l=this,f=document.createElement("button");f.setAttribute("type","button"),f.setAttribute("rel","tooltip"),f.className="modebar-btn";var x=i.title;x===void 0?x=i.name:typeof x=="function"&&(x=x(this.graphInfo)),(x||x===0)&&(f.setAttribute("data-title",x),f.setAttribute("aria-label",x)),i.attr!==void 0&&f.setAttribute("data-attr",i.attr);var y=i.val;y!==void 0&&(typeof y=="function"&&(y=y(this.graphInfo)),f.setAttribute("data-val",y));var v=i.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");f.addEventListener("click",function(u){i.click(l.graphInfo,u),l.updateActiveButton(u.currentTarget)}),f.setAttribute("data-toggle",i.toggle||!1),i.toggle&&c.select(f).classed("active",!0);var T=i.icon;return typeof T=="function"?f.appendChild(T()):f.appendChild(this.createIcon(T||S.question)),f.setAttribute("data-gravity",i.gravity||"n"),f},a.createIcon=function(i){var l=g(i.height)?Number(i.height):i.ascent-i.descent,f="http://www.w3.org/2000/svg",x;if(i.path){x=document.createElementNS(f,"svg"),x.setAttribute("viewBox",[0,0,i.width,l].join(" ")),x.setAttribute("class","icon");var y=document.createElementNS(f,"path");y.setAttribute("d",i.path),i.transform?y.setAttribute("transform",i.transform):i.ascent!==void 0&&y.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),x.appendChild(y)}if(i.svg){var v=e.parseFromString(i.svg,"application/xml");x=v.childNodes[0]}return x.setAttribute("height","1em"),x.setAttribute("width","1em"),x},a.updateActiveButton=function(i){var l=this.graphInfo._fullLayout,f=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(x){var y=x.getAttribute("data-val")||!0,v=x.getAttribute("data-attr"),T=x.getAttribute("data-toggle")==="true",u=c.select(x),b=function(M,C){var A=l.modebar,h=M.querySelector(".icon path");h&&(C||M.matches(":hover")?h.style.fill=A.activecolor:h.style.fill=A.color)};if(T){if(v===f){var _=!u.classed("active");u.classed("active",_),b(x,_)}}else{var P=v===null?v:I.nestedProperty(l,v).get();u.classed("active",P===y),b(x,P===y)}})},a.hasButtons=function(i){var l=this.buttons;if(!l||i.length!==l.length)return!1;for(var f=0;f{var c=Rc(),g=Tc(),I=Jo(),S=Fp().isUnifiedHover,t=Vm(),e=gv(),r=V_().DRAW_MODES,a=kn().extendDeep;Z.exports=function(y){var v=y._fullLayout,T=y._context,u=v._modeBar;if(!T.displayModeBar&&!T.watermark){u&&(u.destroy(),delete v._modeBar);return}if(!Array.isArray(T.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(T.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var b=T.modeBarButtons,_;Array.isArray(b)&&b.length?_=x(b):!T.displayModeBar&&T.watermark?_=[]:_=n(y),u?u.update(y,_):v._modeBar=t(y,_)};function n(y){var v=y._fullLayout,T=y._fullData,u=y._context;function b(Y,ft){if(typeof ft=="string"){if(ft.toLowerCase()===Y.toLowerCase())return!0}else{var ut=ft.name,kt=ft._cat||ft.name;if(ut===Y||kt===Y.toLowerCase())return!0}return!1}var _=v.modebar.add;typeof _=="string"&&(_=[_]);var P=v.modebar.remove;typeof P=="string"&&(P=[P]);var M=u.modeBarButtonsToAdd.concat(_.filter(function(Y){for(var ft=0;ft1?(mt=["toggleHover"],st=["resetViews"]):p?(yt=["zoomInGeo","zoomOutGeo"],mt=["hoverClosestGeo"],st=["resetGeo"]):h?(mt=["hoverClosest3d"],st=["resetCameraDefault3d","resetCameraLastSave3d"]):O?(yt=["zoomInMapbox","zoomOutMapbox"],mt=["toggleHover"],st=["resetViewMapbox"]):j?(yt=["zoomInMap","zoomOutMap"],mt=["toggleHover"],st=["resetViewMap"]):k?mt=["hoverClosestPie"]:F?(mt=["hoverClosestCartesian","hoverCompareCartesian"],st=["resetViewSankey"]):mt=["toggleHover"],A&&mt.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(l(T)||W)&&(mt=[]),A&&!U&&(yt=["zoomIn2d","zoomOut2d","autoScale2d"],st[0]!=="resetViews"&&(st=["resetScale2d"])),h?tt=["zoom3d","pan3d","orbitRotation","tableRotation"]:A&&!U||R?tt=["zoom2d","pan2d"]:O||j||p?tt=["pan2d"]:V&&(tt=["zoom2d"]),i(T)&&tt.push("select2d","lasso2d");var dt=[],rt=function(Y){dt.indexOf(Y)===-1&&mt.indexOf(Y)!==-1&&dt.push(Y)};if(Array.isArray(M)){for(var at=[],vt=0;vt{Z.exports={moduleType:"component",name:"modebar",layoutAttributes:E1(),supplyLayoutDefaults:k6(),manage:Wy()}}),qy=Dt((Q,Z)=>{var c=Af().FROM_BL;Z.exports=function(g,I,S){S===void 0&&(S=c[g.constraintoward||"center"]);var t=[g.r2l(g.range[0]),g.r2l(g.range[1])],e=t[0]+(t[1]-t[0])*S;g.range=g._input.range=[g.l2r(e+(t[0]-e)*I),g.l2r(e+(t[1]-e)*I)],g.setScale()}}),vv=Dt(Q=>{var Z=kn(),c=Y0(),g=Rc().id2name,I=Td(),S=qy(),t=i0(),e=Ca().ALMOST_EQUAL,r=Af().FROM_BL;Q.handleDefaults=function(y,v,T){var u=T.axIds,b=T.axHasImage,_=v._axisConstraintGroups=[],P=v._axisMatchGroups=[],M,C,A,h,p,k,w,R;for(M=0;M_?T.substr(_):u.substr(b))+P}function f(y,v){for(var T=v._size,u=T.h/T.w,b={},_=Object.keys(y),P=0;P<_.length;P++){var M=_[P],C=y[M];if(typeof C=="string"){var A=C.match(/^[xy]*/)[0],h=A.length;C=+C.substr(h);for(var p=A.charAt(0)==="y"?u:1/u,k=0;ke*w&&!V)){for(b=0;bst&&ftyt&&(yt=ft);var kt=(yt-lt)/(2*mt);h/=kt,lt=M.l2r(lt),yt=M.l2r(yt),M.range=M._input.range=W{var Z=qr(),c=Jo(),g=Kc(),I=kn(),S=ec(),t=mv(),e=hi(),r=Vs(),a=lp(),n=Sw(),o=Ls(),i=Af(),l=vv(),f=l.enforce,x=l.clean,y=Y0().doAutoRange,v="start",T="middle",u="end",b=ic().zindexSeparator;Q.layoutStyles=function(F){return I.syncOrAsync([g.doAutoMargin,P],F)};function _(F,U,W){for(var q=0;q=F[1]||J[1]<=F[0])&<[0]U[0])return!0}return!1}function P(F){var U=F._fullLayout,W=U._size,q=W.p,J=o.list(F,"",!0),lt,yt,mt,st,tt,dt;if(U._paperdiv.style({width:F._context.responsive&&U.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":U.width+"px",height:F._context.responsive&&U.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":U.height+"px"}).selectAll(".main-svg").call(r.setSize,U.width,U.height),F._context.setBackground(F,U.paper_bgcolor),Q.drawMainTitle(F),n.manage(F),!U._has("cartesian"))return g.previousPromises(F);function rt(Ct,gt,St){var Nt=Ct._lw/2;if(Ct._id.charAt(0)==="x"){if(gt){if(St==="top")return gt._offset-q-Nt}else return W.t+W.h*(1-(Ct.position||0))+Nt%1;return gt._offset+gt._length+q+Nt}if(gt){if(St==="right")return gt._offset+gt._length+q+Nt}else return W.l+W.w*(Ct.position||0)+Nt%1;return gt._offset-q-Nt}for(lt=0;lt0){w(F,lt,tt,st),mt.attr({x:yt,y:lt,"text-anchor":q,dy:j(U.yanchor)}).call(S.positionText,yt,lt);var dt=(U.text.match(S.BR_TAG_ALL)||[]).length;if(dt){var rt=i.LINE_SPACING*dt+i.MID_SHIFT;U.y===0&&(rt=-rt),mt.selectAll(".line").each(function(){var ft=+this.getAttribute("dy").slice(0,-2)-rt+"em";this.setAttribute("dy",ft)})}var at=Z.select(F).selectAll(".gtitle-subtitle");if(at.node()){var vt=mt.node().getBBox(),it=vt.y+vt.height,Y=it+a.SUBTITLE_PADDING_EM*U.subtitle.font.size;at.attr({x:yt,y:Y,"text-anchor":q,dy:j(U.yanchor)}).call(S.positionText,yt,Y)}}}};function h(F,U,W,q,J){var lt=U.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,yt=I.isTopAnchor(U)?q:q-J,mt=W==="b"?lt-yt:yt;return I.isTopAnchor(U)&&W==="t"||I.isBottomAnchor(U)&&W==="b"?!1:mt.5?"t":"b",yt=F._fullLayout.margin[lt],mt=0;return U.yref==="paper"?mt=W+U.pad.t+U.pad.b:U.yref==="container"&&(mt=p(lt,q,J,F._fullLayout.height,W)+U.pad.t+U.pad.b),mt>yt?mt:0}function w(F,U,W,q){var J="title.automargin",lt=F._fullLayout.title,yt=lt.y>.5?"t":"b",mt={x:lt.x,y:lt.y,t:0,b:0},st={};lt.yref==="paper"&&h(F,lt,yt,U,q)?mt[yt]=W:lt.yref==="container"&&(st[yt]=W,F._fullLayout._reservedMargin[J]=st),g.allowAutoMargin(F,J),g.autoMargin(F,J,mt)}function R(F,U){var W=F.title,q=F._size,J=0;switch(U===v?J=W.pad.l:U===u&&(J=-W.pad.r),W.xref){case"paper":return q.l+q.w*W.x+J;case"container":default:return F.width*W.x+J}}function O(F,U){var W=F.title,q=F._size,J=0;if(U==="0em"||!U?J=-W.pad.b:U===i.CAP_SHIFT+"em"&&(J=W.pad.t),W.y==="auto")return q.t/2;switch(W.yref){case"paper":return q.t+q.h-q.h*W.y+J;case"container":default:return F.height-F.height*W.y+J}}function j(F){return F==="top"?i.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function V(F){var U=F.title,W=T;return I.isRightAnchor(U)?W=u:I.isLeftAnchor(U)&&(W=v),W}function H(F){var U=F.title,W="0em";return I.isTopAnchor(U)?W=i.CAP_SHIFT+"em":I.isMiddleAnchor(U)&&(W=i.MID_SHIFT+"em"),W}Q.doTraceStyle=function(F){var U=F.calcdata,W=[],q;for(q=0;q{var c=Mg().readPaths,g=Um(),I=C0().clearOutlineControllers,S=hi(),t=Vs(),e=mu().arrayEditor,r=wp(),a=r.getPathString;Z.exports={draw:n,drawOne:i,activateLastSelection:x};function n(v){var T=v._fullLayout;I(v),T._selectionLayer.selectAll("path").remove();for(var u in T._plots){var b=T._plots[u].selectionLayer;b&&b.selectAll("path").remove()}for(var _=0;_=0;V--){var H=M.append("path").attr(A).style("opacity",V?.1:h).call(S.stroke,k).call(S.fill,p).call(t.dashLine,V?"solid":R,V?4+w:w);if(l(H,v,b),O){var F=e(v.layout,"selections",b);H.style({cursor:"move"});var U={element:H.node(),plotinfo:_,gd:v,editHelpers:F,isActiveSelection:!0},W=c(C,v);g(W,H,U)}else H.style("pointer-events",V?"all":"none");j[V]=H}var q=j[0],J=j[1];J.node().addEventListener("click",function(){return f(v,q)})}}function l(v,T,u){var b=u.xref+u.yref;t.setClipUrl(v,"clip"+T._fullLayout._uid+b,T)}function f(v,T){if(o(v)){var u=T.node(),b=+u.getAttribute("data-index");if(b>=0){if(b===v._fullLayout._activeSelectionIndex){y(v);return}v._fullLayout._activeSelectionIndex=b,v._fullLayout._deactivateSelection=y,n(v)}}}function x(v){if(o(v)){var T=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=T,v._fullLayout._deactivateSelection=y,n(v)}}function y(v){if(o(v)){var T=v._fullLayout._activeSelectionIndex;T>=0&&(I(v),delete v._fullLayout._activeSelectionIndex,n(v))}}}),yv=Dt((Q,Z)=>{function c(){var g,I=0,S=!1;function t(e,r){return g.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),g}return g={list:[],segmentId:function(){return I++},checkIntersection:function(e,r){return t("check",{seg1:e,seg2:r})},segmentChop:function(e,r){return t("div_seg",{seg:e,pt:r}),t("chop",{seg:e,pt:r})},statusRemove:function(e){return t("pop_seg",{seg:e})},segmentUpdate:function(e){return t("seg_update",{seg:e})},segmentNew:function(e,r){return t("new_seg",{seg:e,primary:r})},segmentRemove:function(e){return t("rem_seg",{seg:e})},tempStatus:function(e,r,a){return t("temp_status",{seg:e,above:r,below:a})},rewind:function(e){return t("rewind",{seg:e})},status:function(e,r,a){return t("status",{seg:e,above:r,below:a})},vert:function(e){return e===S?g:(S=e,t("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),t("log",{txt:e})},reset:function(){return t("reset")},selected:function(e){return t("selected",{segs:e})},chainStart:function(e){return t("chain_start",{seg:e})},chainRemoveHead:function(e,r){return t("chain_rem_head",{index:e,pt:r})},chainRemoveTail:function(e,r){return t("chain_rem_tail",{index:e,pt:r})},chainNew:function(e,r){return t("chain_new",{pt1:e,pt2:r})},chainMatch:function(e){return t("chain_match",{index:e})},chainClose:function(e){return t("chain_close",{index:e})},chainAddHead:function(e,r){return t("chain_add_head",{index:e,pt:r})},chainAddTail:function(e,r){return t("chain_add_tail",{index:e,pt:r})},chainConnect:function(e,r){return t("chain_con",{index1:e,index2:r})},chainReverse:function(e){return t("chain_rev",{index:e})},chainJoin:function(e,r){return t("chain_join",{index1:e,index2:r})},done:function(){return t("done")}},g}Z.exports=c}),T6=Dt((Q,Z)=>{function c(g){typeof g!="number"&&(g=1e-10);var I={epsilon:function(S){return typeof S=="number"&&(g=S),g},pointAboveOrOnLine:function(S,t,e){var r=t[0],a=t[1],n=e[0],o=e[1],i=S[0],l=S[1];return(n-r)*(l-a)-(o-a)*(i-r)>=-g},pointBetween:function(S,t,e){var r=S[1]-t[1],a=e[0]-t[0],n=S[0]-t[0],o=e[1]-t[1],i=n*a+r*o;if(i-g)},pointsSameX:function(S,t){return Math.abs(S[0]-t[0])g!=n-r>g&&(a-l)*(r-f)/(n-f)+l-e>g&&(o=!o),a=l,n=f}return o}};return I}Z.exports=c}),pm=Dt((Q,Z)=>{var c={create:function(){var g={root:{root:!0,next:null},exists:function(I){return!(I===null||I===g.root)},isEmpty:function(){return g.root.next===null},getHead:function(){return g.root.next},insertBefore:function(I,S){for(var t=g.root,e=g.root.next;e!==null;){if(S(e)){I.prev=e.prev,I.next=e,e.prev.next=I,e.prev=I;return}t=e,e=e.next}t.next=I,I.prev=t,I.next=null},findTransition:function(I){for(var S=g.root,t=g.root.next;t!==null&&!I(t);)S=t,t=t.next;return{before:S===g.root?null:S,after:t,insert:function(e){return e.prev=S,e.next=t,S.next=e,t!==null&&(t.prev=e),e}}}};return g},node:function(g){return g.prev=null,g.next=null,g.remove=function(){g.prev.next=g.next,g.next&&(g.next.prev=g.prev),g.prev=null,g.next=null},g}};Z.exports=c}),$y=Dt((Q,Z)=>{var c=pm();function g(I,S,t){function e(T,u){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:null,below:null},otherFill:null}}function r(T,u,b){return{id:t?t.segmentId():-1,start:T,end:u,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=c.create();function n(T,u,b,_,P,M){var C=S.pointsCompare(u,P);return C!==0?C:S.pointsSame(b,M)?0:T!==_?T?1:-1:S.pointAboveOrOnLine(b,_?P:M,_?M:P)?1:-1}function o(T,u){a.insertBefore(T,function(b){var _=n(T.isStart,T.pt,u,b.isStart,b.pt,b.other.pt);return _<0})}function i(T,u){var b=c.node({isStart:!0,pt:T.start,seg:T,primary:u,other:null,status:null});return o(b,T.end),b}function l(T,u,b){var _=c.node({isStart:!1,pt:u.end,seg:u,primary:b,other:T,status:null});T.other=_,o(_,T.pt)}function f(T,u){var b=i(T,u);return l(b,T,u),b}function x(T,u){t&&t.segmentChop(T.seg,u),T.other.remove(),T.seg.end=u,T.other.pt=u,o(T.other,T.pt)}function y(T,u){var b=r(u,T.seg.end,T.seg);return x(T,u),f(b,T.primary)}function v(T,u){var b=c.create();function _(H,F){var U=H.seg.start,W=H.seg.end,q=F.seg.start,J=F.seg.end;return S.pointsCollinear(U,q,J)?S.pointsCollinear(W,q,J)||S.pointAboveOrOnLine(W,q,J)?1:-1:S.pointAboveOrOnLine(U,q,J)?1:-1}function P(H){return b.findTransition(function(F){var U=_(H,F.ev);return U>0})}function M(H,F){var U=H.seg,W=F.seg,q=U.start,J=U.end,lt=W.start,yt=W.end;t&&t.checkIntersection(U,W);var mt=S.linesIntersect(q,J,lt,yt);if(mt===!1){if(!S.pointsCollinear(q,J,lt)||S.pointsSame(q,yt)||S.pointsSame(J,lt))return!1;var st=S.pointsSame(q,lt),tt=S.pointsSame(J,yt);if(st&&tt)return F;var dt=!st&&S.pointBetween(q,lt,yt),rt=!tt&&S.pointBetween(J,lt,yt);if(st)return rt?y(F,J):y(H,yt),F;dt&&(tt||(rt?y(F,J):y(H,yt)),y(F,q))}else mt.alongA===0&&(mt.alongB===-1?y(H,lt):mt.alongB===0?y(H,mt.pt):mt.alongB===1&&y(H,yt)),mt.alongB===0&&(mt.alongA===-1?y(F,q):mt.alongA===0?y(F,mt.pt):mt.alongA===1&&y(F,J));return!1}for(var C=[];!a.isEmpty();){var A=a.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let H=function(){if(p){var F=M(A,p);if(F)return F}return k?M(A,k):!1};t&&t.segmentNew(A.seg,A.primary);var h=P(A),p=h.before?h.before.ev:null,k=h.after?h.after.ev:null;t&&t.tempStatus(A.seg,p?p.seg:!1,k?k.seg:!1);var w=H();if(w){if(I){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,R&&(w.seg.myFill.above=!w.seg.myFill.above)}else w.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(w.seg),A.other.remove(),A.remove()}if(a.getHead()!==A){t&&t.rewind(A.seg);continue}if(I){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,k?A.seg.myFill.below=k.seg.myFill.above:A.seg.myFill.below=T,R?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var O;k?A.primary===k.primary?O=k.seg.otherFill.above:O=k.seg.myFill.above:O=A.primary?u:T,A.seg.otherFill={above:O,below:O}}t&&t.status(A.seg,p?p.seg:!1,k?k.seg:!1),A.other.status=h.insert(c.node({ev:A}))}else{var j=A.status;if(j===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(j.prev)&&b.exists(j.next)&&M(j.prev.ev,j.next.ev),t&&t.statusRemove(j.ev.seg),j.remove(),!A.primary){var V=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=V}C.push(A.seg)}a.getHead().remove()}return t&&t.done(),C}return I?{addRegion:function(T){for(var u,b=T[T.length-1],_=0;_{function c(g,I,S){var t=[],e=[];return g.forEach(function(r){var a=r.start,n=r.end;if(I.pointsSame(a,n)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}S&&S.chainStart(r);var o={index:0,matches_head:!1,matches_pt1:!1},i={index:0,matches_head:!1,matches_pt1:!1},l=o;function f(O,j,V){return l.index=O,l.matches_head=j,l.matches_pt1=V,l===o?(l=i,!1):(l=null,!0)}for(var x=0;x{function c(I,S,t){var e=[];return I.forEach(function(r){var a=(r.myFill.above?8:0)+(r.myFill.below?4:0)+(r.otherFill&&r.otherFill.above?2:0)+(r.otherFill&&r.otherFill.below?1:0);S[a]!==0&&e.push({id:t?t.segmentId():-1,start:r.start,end:r.end,myFill:{above:S[a]===1,below:S[a]===2},otherFill:null})}),t&&t.selected(e),e}var g={union:function(I,S){return c(I,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],S)},intersect:function(I,S){return c(I,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],S)},difference:function(I,S){return c(I,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],S)},differenceRev:function(I,S){return c(I,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],S)},xor:function(I,S){return c(I,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],S)}};Z.exports=g}),Zy=Dt((Q,Z)=>{var c={toPolygon:function(g,I){function S(r){if(r.length<=0)return g.segments({inverted:!1,regions:[]});function a(i){var l=i.slice(0,i.length-1);return g.segments({inverted:!1,regions:[l]})}for(var n=a(r[0]),o=1;o{var c=yv(),g=T6(),I=$y(),S=Cw(),t=H_(),e=Zy(),r=!1,a=g(),n;n={buildLog:function(i){return i===!0?r=c():i===!1&&(r=!1),r===!1?!1:r.list},epsilon:function(i){return a.epsilon(i)},segments:function(i){var l=I(!0,a,r);return i.regions.forEach(l.addRegion),{segments:l.calculate(i.inverted),inverted:i.inverted}},combine:function(i,l){var f=I(!1,a,r);return{combined:f.calculate(i.segments,i.inverted,l.segments,l.inverted),inverted1:i.inverted,inverted2:l.inverted}},selectUnion:function(i){return{segments:t.union(i.combined,r),inverted:i.inverted1||i.inverted2}},selectIntersect:function(i){return{segments:t.intersect(i.combined,r),inverted:i.inverted1&&i.inverted2}},selectDifference:function(i){return{segments:t.difference(i.combined,r),inverted:i.inverted1&&!i.inverted2}},selectDifferenceRev:function(i){return{segments:t.differenceRev(i.combined,r),inverted:!i.inverted1&&i.inverted2}},selectXor:function(i){return{segments:t.xor(i.combined,r),inverted:i.inverted1!==i.inverted2}},polygon:function(i){return{regions:S(i.segments,a,r),inverted:i.inverted}},polygonFromGeoJSON:function(i){return e.toPolygon(n,i)},polygonToGeoJSON:function(i){return e.fromPolygon(n,a,i)},union:function(i,l){return o(i,l,n.selectUnion)},intersect:function(i,l){return o(i,l,n.selectIntersect)},difference:function(i,l){return o(i,l,n.selectDifference)},differenceRev:function(i,l){return o(i,l,n.selectDifferenceRev)},xor:function(i,l){return o(i,l,n.selectXor)}};function o(i,l,f){var x=n.segments(i),y=n.segments(l),v=n.combine(x,y),T=f(v);return n.polygon(T)}typeof window=="object"&&(window.PolyBool=n),Z.exports=n}),Gy=Dt((Q,Z)=>{Z.exports=function(c,g,I,S){var t=c[0],e=c[1],r=!1;I===void 0&&(I=0),S===void 0&&(S=g.length);for(var a=S-I,n=0,o=a-1;ne!=x>e&&t<(f-i)*(e-l)/(x-l)+i;y&&(r=!r)}return r}}),mm=Dt((Q,Z)=>{var c=M_().dot,g=Ca().BADNUM,I=Z.exports={};I.tester=function(S){var t=S.slice(),e=t[0][0],r=e,a=t[0][1],n=a,o;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),o=1;or||_===g||_n||u&&l(T))}function x(T,u){var b=T[0],_=T[1];if(b===g||br||_===g||_n)return!1;var P=t.length,M=t[0][0],C=t[0][1],A=0,h,p,k,w,R;for(h=1;hMath.max(p,M)||_>Math.max(k,C)))if(_o||Math.abs(c(x,l))>r)return!0;return!1},I.filter=function(S,t){var e=[S[0]],r=0,a=0;function n(i){S.push(i);var l=e.length,f=r;e.splice(a+1);for(var x=f+1;x1){var o=S.pop();n(o)}return{addPt:n,raw:S,filtered:e}}}),Yy=Dt((Q,Z)=>{Z.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}),q_=Dt((Q,Z)=>{var c=W_(),g=Gy(),I=Jo(),S=Vs().dashStyle,t=hi(),e=tf(),r=Fp().makeEventData,a=v0(),n=a.freeMode,o=a.rectMode,i=a.drawMode,l=a.openMode,f=a.selectMode,x=wp(),y=Hy(),v=Um(),T=C0().clearOutline,u=Mg(),b=u.handleEllipse,_=u.readPaths,P=a0().newShapes,M=Sg(),C=Ew().activateLastSelection,A=kn(),h=A.sorterAsc,p=mm(),k=C_(),w=Rc().getFromId,R=mv(),O=y0().redrawReglTraces,j=Yy(),V=j.MINSELECT,H=p.filter,F=p.tester,U=Vy(),W=U.p2r,q=U.axValue,J=U.getTransform;function lt(Gt){return Gt.subplot!==void 0}function yt(Gt,ne,Ct,gt,St){var Nt=!lt(gt),re=n(St),le=o(St),we=l(St),Ue=i(St),qe=f(St),or=St==="drawline",Sr=St==="drawcircle",Ar=or||Sr,mr=gt.gd,Qr=mr._fullLayout,Hn=qe&&Qr.newselection.mode==="immediate"&&Nt,Wn=Qr._zoomlayer,Xn=gt.element.getBoundingClientRect(),Ii=gt.plotinfo,oi=J(Ii),$n=ne-Xn.left,sa=Ct-Xn.top;Qr._calcInverseTransform(mr);var Zi=A.apply3DTransform(Qr._invTransform)($n,sa);$n=Zi[0],sa=Zi[1];var We=Qr._invScaleX,nr=Qr._invScaleY,fr=$n,_r=sa,tn="M"+$n+","+sa,Cn=gt.xaxes[0],Tn=gt.yaxes[0],Mn=Cn._length,fi=Tn._length,ki=Gt.altKey&&!(i(St)&&we),Oi,ji,Xi,ci,za,Wa,ze;at(Gt,mr,gt),re&&(Oi=H([[$n,sa]],j.BENDPX));var Ie=Wn.selectAll("path.select-outline-"+Ii.id).data([1]),Rr=Ue?Qr.newshape:Qr.newselection;Ue&&(gt.hasText=Rr.label.text||Rr.label.texttemplate);var $r=Ue&&!we?Rr.fillcolor:"rgba(0,0,0,0)",Gr=Rr.line.color||(Nt?t.contrast(mr._fullLayout.plot_bgcolor):"#7f7f7f");Ie.enter().append("path").attr("class","select-outline select-outline-"+Ii.id).style({opacity:Ue?Rr.opacity/2:1,"stroke-dasharray":S(Rr.line.dash,Rr.line.width),"stroke-width":Rr.line.width+"px","shape-rendering":"crispEdges"}).call(t.stroke,Gr).call(t.fill,$r).attr("fill-rule","evenodd").classed("cursor-move",!!Ue).attr("transform",oi).attr("d",tn+"Z");var Br=Wn.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1}).attr("transform",oi).attr("d","M0,0Z");if(Ue&>.hasText){var Yr=Wn.select(".label-temp");Yr.empty()&&(Yr=Wn.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var pn=Qr._uid+j.SELECTID,on=[],Ce=ut(mr,gt.xaxes,gt.yaxes,gt.subplot);Hn&&!Gt.shiftKey&&(gt._clearSubplotSelections=function(){if(Nt){var Hr=Cn._id,_n=Tn._id;oe(mr,Hr,_n,Ce);for(var Fn=(mr.layout||{}).selections||[],Qn=[],Pn=!1,En=0;En=0){mr._fullLayout._deactivateShape(mr);return}if(!Ue){var Fn=Qr.clickmode;k.done(pn).then(function(){if(k.clear(pn),Hr===2){for(Ie.remove(),za=0;za-1&&mt(_n,mr,gt.xaxes,gt.yaxes,gt.subplot,gt,Ie),Fn==="event"&&nn(mr,void 0);e.click(mr,_n,Ii.id)}).catch(A.error)}},gt.doneFn=function(){Br.remove(),k.done(pn).then(function(){k.clear(pn),!Hn&&ci&>.selectionDefs&&(ci.subtract=ki,gt.selectionDefs.push(ci),gt.mergedPolygons.length=0,[].push.apply(gt.mergedPolygons,Xi)),(Hn||Ue)&&Y(gt,Hn),gt.doneFnCompleted&>.doneFnCompleted(on),qe&&nn(mr,ze)}).catch(A.error)}}function mt(Gt,ne,Ct,gt,St,Nt,re){var le=ne._hoverdata,we=ne._fullLayout,Ue=we.clickmode,qe=Ue.indexOf("event")>-1,or=[],Sr,Ar,mr,Qr,Hn,Wn,Xn,Ii,oi,$n;if(It(le)){at(Gt,ne,Nt),Sr=ut(ne,Ct,gt,St);var sa=Pt(le,Sr),Zi=sa.pointNumbers.length>0;if(Zi?Wt(Sr,sa):Jt(Sr)&&(Xn=qt(sa))){for(re&&re.remove(),$n=0;$n=0}function it(Gt){return Gt._fullLayout._activeSelectionIndex>=0}function Y(Gt,ne){var Ct=Gt.dragmode,gt=Gt.plotinfo,St=Gt.gd;vt(St)&&St._fullLayout._deactivateShape(St),it(St)&&St._fullLayout._deactivateSelection(St);var Nt=St._fullLayout,re=Nt._zoomlayer,le=i(Ct),we=f(Ct);if(le||we){var Ue=re.selectAll(".select-outline-"+gt.id);if(Ue&&St._fullLayout._outlining){var qe;le&&(qe=P(Ue,Gt)),qe&&I.call("_guiRelayout",St,{shapes:qe});var or;we&&!lt(Gt)&&(or=M(Ue,Gt)),or&&(St._fullLayout._noEmitSelectedAtStart=!0,I.call("_guiRelayout",St,{selections:or}).then(function(){ne&&C(St)})),St._fullLayout._outlining=!1}}gt.selection={},gt.selection.selectionDefs=Gt.selectionDefs=[],gt.selection.mergedPolygons=Gt.mergedPolygons=[]}function ft(Gt){return Gt._id}function ut(Gt,ne,Ct,gt){if(!Gt.calcdata)return[];var St=[],Nt=ne.map(ft),re=Ct.map(ft),le,we,Ue;for(Ue=0;Ue0,Nt=St?gt[0]:Ct;return ne.selectedpoints?ne.selectedpoints.indexOf(Nt)>-1:!1}function Wt(Gt,ne){var Ct=[],gt,St,Nt,re;for(re=0;re0&&Ct.push(gt);if(Ct.length===1&&(Nt=Ct[0]===ne.searchInfo,Nt&&(St=ne.searchInfo.cd[0].trace,St.selectedpoints.length===ne.pointNumbers.length))){for(re=0;re1||(ne+=gt.selectedpoints.length,ne>1)))return!1;return ne===1}function ge(Gt,ne,Ct){var gt;for(gt=0;gt-1&≠if(!re&&ne){var Hr=He(Gt,!0);if(Hr.length){var _n=Hr[0].xref,Fn=Hr[0].yref;if(_n&&Fn){var Qn=ur(Hr),Pn=Wr([w(Gt,_n,"x"),w(Gt,Fn,"y")]);Pn(on,Qn)}}Gt._fullLayout._noEmitSelectedAtStart?Gt._fullLayout._noEmitSelectedAtStart=!1:dr&&nn(Gt,on),Sr._reselect=!1}if(!re&&Sr._deselect){var En=Sr._deselect;le=En.xref,we=En.yref,ve(le,we,qe)||oe(Gt,le,we,gt),dr&&(on.points.length?nn(Gt,on):Le(Gt)),Sr._deselect=!1}return{eventData:on,selectionTesters:Ct}}function ee(Gt){var ne=Gt.calcdata;if(ne)for(var Ct=0;Ct{Z.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]}),Ky=Dt((Q,Z)=>{Z.exports={axisRefDescription:function(c,g,I){return["If set to a",c,"axis id (e.g. *"+c+"* or","*"+c+"2*), the `"+c+"` position refers to a",c,"coordinate. If set to *paper*, the `"+c+"`","position refers to the distance from the",g,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",g,"("+I+"). If set to a",c,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",g,"of the domain of that axis: e.g.,","*"+c+"2 domain* refers to the domain of the second",c," axis and a",c,"position of 0.5 refers to the","point between the",g,"and the",I,"of the domain of the","second",c,"axis."].join(" ")}}}),gm=Dt((Q,Z)=>{var c=$_(),g=da(),I=ic(),S=mu().templatedArray;Ky(),Z.exports=S("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:g({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:c.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:c.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",I.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",I.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",I.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",I.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:g({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}),vm=Dt((Q,Z)=>{Z.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}),I0=Dt((Q,Z)=>{Z.exports=function(c){return{valType:"color",editType:"style",anim:!0}}}),ef=Dt((Q,Z)=>{var c=dh().axisHoverFormat,{hovertemplateAttrs:g,texttemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=kc(),e=da(),r=kd().dash,a=kd().pattern,n=Vs(),o=vm(),i=Ia().extendFlat,l=I0();function f(v){return{valType:"any",dflt:0,editType:"calc"}}function x(v){return{valType:"any",editType:"calc"}}function y(v){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Z.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:f(),yperiod:f(),xperiod0:x(),yperiod0:x(),xperiodalignment:y(),yperiodalignment:y(),xhoverformat:c("x"),yhoverformat:c("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:I(),texttemplatefallback:S({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:g({},{keys:o.eventDataKeys}),hovertemplatefallback:S(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:i({},r,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:l(!0),fillgradient:i({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:a,marker:i({symbol:{valType:"enumerated",values:n.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:i({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},t("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},t("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:e({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}),Z_=Dt((Q,Z)=>{var c=gm(),g=ef().line,I=kd().dash,S=Ia().extendFlat,t=Yc().overrideAll,e=mu().templatedArray;Ky(),Z.exports=t(e("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:S({},c.xref,{}),yref:S({},c.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:g.color,width:S({},g.width,{min:1,dflt:1}),dash:S({},I,{dflt:"dot"})}}),"arraydraw","from-root")}),A6=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=Z_(),t=wp();Z.exports=function(r,a){I(r,a,{name:"selections",handleItemDefaults:e});for(var n=a.selections,o=0;o{Z.exports=function(c,g,I){I("newselection.mode");var S=I("newselection.line.width");S&&(I("newselection.line.color"),I("newselection.line.dash")),I("activeselection.fillcolor"),I("activeselection.opacity")}}),Eg=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=Rc();Z.exports=function(S){return function(t,e){var r=t[S];if(Array.isArray(r))for(var a=c.subplotsRegistry.cartesian,n=a.idRegex,o=e._subplots,i=o.xaxis,l=o.yaxis,f=o.cartesian,x=e._has("cartesian"),y=0;y{var c=Ew(),g=q_();Z.exports={moduleType:"component",name:"selections",layoutAttributes:Z_(),supplyLayoutDefaults:A6(),supplyDrawNewSelectionDefaults:X0(),includeBasePlot:Eg()("selections"),draw:c.draw,drawOne:c.drawOne,reselect:g.reselect,prepSelect:g.prepSelect,clearOutline:g.clearOutline,clearSelectionsCache:g.clearSelectionsCache,selectOnClick:g.selectOnClick}}),C1=Dt((Q,Z)=>{var c=qr(),g=kn(),I=g.numberFormat,S=ro(),t=z_(),e=Jo(),r=g.strTranslate,a=ec(),n=hi(),o=Vs(),i=tf(),l=Ls(),f=P0(),x=up(),y=v0(),v=y.selectingOrDrawing,T=y.freeMode,u=Af().FROM_TL,b=mv(),_=y0().redrawReglTraces,P=Kc(),M=Rc().getFromId,C=vf().prepSelect,A=vf().clearOutline,h=vf().selectOnClick,p=qy(),k=ic(),w=k.MINDRAG,R=k.MINZOOM,O=!0;function j(kt,It,Pt,qt,Wt,Jt,ge,fe){var pe=kt._fullLayout._zoomlayer,se=ge+fe==="nsew",Tt=(ge+fe).length===1,Lt,Mt,ee,ve,oe,Te,He,Ge,cr,ur,jr,Wr,br,Xr,nn,Le,Gt,ne,Ct,gt,St,Nt,re;Pt+=It.yaxis._shift;function le(){if(Lt=It.xaxis,Mt=It.yaxis,cr=Lt._length,ur=Mt._length,He=Lt._offset,Ge=Mt._offset,ee={},ee[Lt._id]=Lt,ve={},ve[Mt._id]=Mt,ge&&fe)for(var Ie=It.overlays,Rr=0;Rr=0){$r._fullLayout._deactivateShape($r);return}var Gr=$r._fullLayout.clickmode;if(dt($r),Ie===2&&!Tt&&ji(),se)Gr.indexOf("select")>-1&&h(Rr,$r,oe,Te,It.id,qe),Gr.indexOf("event")>-1&&i.click($r,Rr,It.id);else if(Ie===1&&Tt){var Br=ge?Mt:Lt,Yr=ge==="s"||fe==="w"?0:1,pn=Br._name+".range["+Yr+"]",on=U(Br,Yr),Ce="left",dr="middle";if(Br.fixedrange)return;ge?(dr=ge==="n"?"top":"bottom",Br.side==="right"&&(Ce="right")):fe==="e"&&(Ce="right"),$r._context.showAxisRangeEntryBoxes&&c.select(Ue).call(a.makeEditable,{gd:$r,immediate:!0,background:$r._fullLayout.paper_bgcolor,text:String(on),fill:Br.tickfont?Br.tickfont.color:"#444",horizontalAlign:Ce,verticalAlign:dr}).on("edit",function(Hr){var _n=Br.d2r(Hr);_n!==void 0&&e.call("_guiRelayout",$r,pn,_n)})}}x.init(qe);var Ar,mr,Qr,Hn,Wn,Xn,Ii,oi,$n,sa;function Zi(Ie,Rr,$r){var Gr=Ue.getBoundingClientRect();Ar=Rr-Gr.left,mr=$r-Gr.top,kt._fullLayout._calcInverseTransform(kt);var Br=g.apply3DTransform(kt._fullLayout._invTransform)(Ar,mr);Ar=Br[0],mr=Br[1],Qr={l:Ar,r:Ar,w:0,t:mr,b:mr,h:0},Hn=kt._hmpixcount?kt._hmlumcount/kt._hmpixcount:S(kt._fullLayout.plot_bgcolor).getLuminance(),Wn="M0,0H"+cr+"V"+ur+"H0V0",Xn=!1,Ii="xy",sa=!1,oi=yt(pe,Hn,He,Ge,Wn),$n=mt(pe,He,Ge)}function We(Ie,Rr){if(kt._transitioningWithDuration)return!1;var $r=Math.max(0,Math.min(cr,Nt*Ie+Ar)),Gr=Math.max(0,Math.min(ur,re*Rr+mr)),Br=Math.abs($r-Ar),Yr=Math.abs(Gr-mr);Qr.l=Math.min(Ar,$r),Qr.r=Math.max(Ar,$r),Qr.t=Math.min(mr,Gr),Qr.b=Math.max(mr,Gr);function pn(){Ii="",Qr.r=Qr.l,Qr.t=Qr.b,$n.attr("d","M0,0Z")}if(jr.isSubplotConstrained)Br>R||Yr>R?(Ii="xy",Br/cr>Yr/ur?(Yr=Br*ur/cr,mr>Gr?Qr.t=mr-Yr:Qr.b=mr+Yr):(Br=Yr*cr/ur,Ar>$r?Qr.l=Ar-Br:Qr.r=Ar+Br),$n.attr("d",it(Qr))):pn();else if(Wr.isSubplotConstrained)if(Br>R||Yr>R){Ii="xy";var on=Math.min(Qr.l/cr,(ur-Qr.b)/ur),Ce=Math.max(Qr.r/cr,(ur-Qr.t)/ur);Qr.l=on*cr,Qr.r=Ce*cr,Qr.b=(1-on)*ur,Qr.t=(1-Ce)*ur,$n.attr("d",it(Qr))}else pn();else!Xr||Yr0){var Hr;if(Wr.isSubplotConstrained||!br&&Xr.length===1){for(Hr=0;Hr1&&(pn.maxallowed!==void 0&&Le===(pn.range[0]1&&(on.maxallowed!==void 0&&Gt===(on.range[0]=0?Math.min(kt,.9):1/(1/Math.max(kt,-.3)+3.222))}function lt(kt,It,Pt){return kt?kt==="nsew"?Pt?"":It==="pan"?"move":"crosshair":kt.toLowerCase()+"-resize":"pointer"}function yt(kt,It,Pt,qt,Wt){return kt.append("path").attr("class","zoombox").style({fill:It>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Pt,qt)).attr("d",Wt+"Z")}function mt(kt,It,Pt){return kt.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(It,Pt)).attr("d","M0,0Z")}function st(kt,It,Pt,qt,Wt,Jt){kt.attr("d",qt+"M"+Pt.l+","+Pt.t+"v"+Pt.h+"h"+Pt.w+"v-"+Pt.h+"h-"+Pt.w+"Z"),tt(kt,It,Wt,Jt)}function tt(kt,It,Pt,qt){Pt||(kt.transition().style("fill",qt>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),It.transition().style("opacity",1).duration(200))}function dt(kt){c.select(kt).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function rt(kt){O&&kt.data&&kt._context.showTips&&(g.notifier(g._(kt,"Double-click to zoom back out"),"long"),O=!1)}function at(kt,It){return"M"+(kt.l-.5)+","+(It-R-.5)+"h-3v"+(2*R+1)+"h3ZM"+(kt.r+.5)+","+(It-R-.5)+"h3v"+(2*R+1)+"h-3Z"}function vt(kt,It){return"M"+(It-R-.5)+","+(kt.t-.5)+"v-3h"+(2*R+1)+"v3ZM"+(It-R-.5)+","+(kt.b+.5)+"v3h"+(2*R+1)+"v-3Z"}function it(kt){var It=Math.floor(Math.min(kt.b-kt.t,kt.r-kt.l,R)/2);return"M"+(kt.l-3.5)+","+(kt.t-.5+It)+"h3v"+-It+"h"+It+"v-3h-"+(It+3)+"ZM"+(kt.r+3.5)+","+(kt.t-.5+It)+"h-3v"+-It+"h"+-It+"v-3h"+(It+3)+"ZM"+(kt.r+3.5)+","+(kt.b+.5-It)+"h-3v"+It+"h"+-It+"v3h"+(It+3)+"ZM"+(kt.l-3.5)+","+(kt.b+.5-It)+"h3v"+It+"h"+It+"v3h-"+(It+3)+"Z"}function Y(kt,It,Pt,qt,Wt){for(var Jt=!1,ge={},fe={},pe,se,Tt,Lt,Mt=(Wt||{}).xaHash,ee=(Wt||{}).yaHash,ve=0;ve{var Z=qr(),c=tf(),g=up(),I=P0(),S=C1().makeDragBox,t=ic().DRAGGERSIZE;Q.initInteractions=function(e){var r=e._fullLayout;if(e._context.staticPlot){Z.select(e).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var a=Object.keys(r._plots||{}).sort(function(o,i){if((r._plots[o].mainplot&&!0)===(r._plots[i].mainplot&&!0)){var l=o.split("y"),f=i.split("y");return l[0]===f[0]?Number(l[1]||1)-Number(f[1]||1):Number(l[0]||1)-Number(f[0]||1)}return r._plots[o].mainplot?1:-1});a.forEach(function(o){var i=r._plots[o],l=i.xaxis,f=i.yaxis;if(!i.mainplot){var x=S(e,i,l._offset,f._offset,l._length,f._length,"ns","ew");x.onmousemove=function(T){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===o&&e._fullLayout._plots[o]&&c.hover(e,T,o)},c.hover(e,T,o),e._fullLayout._lasthover=x,e._fullLayout._hoversubplot=o},x.onmouseout=function(T){e._dragging||(e._fullLayout._hoversubplot=null,g.unhover(e,T))},e._context.showAxisDragHandles&&(S(e,i,l._offset-t,f._offset-t,t,t,"n","w"),S(e,i,l._offset+l._length,f._offset-t,t,t,"n","e"),S(e,i,l._offset-t,f._offset+f._length,t,t,"s","w"),S(e,i,l._offset+l._length,f._offset+f._length,t,t,"s","e"))}if(e._context.showAxisDragHandles){if(o===l._mainSubplot){var y=l._mainLinePosition;l.side==="top"&&(y-=t),S(e,i,l._offset+l._length*.1,y,l._length*.8,t,"","ew"),S(e,i,l._offset,y,l._length*.1,t,"","w"),S(e,i,l._offset+l._length*.9,y,l._length*.1,t,"","e")}if(o===f._mainSubplot){var v=f._mainLinePosition;f.side!=="right"&&(v-=t),S(e,i,v,f._offset+f._length*.1,t,f._length*.8,"ns",""),S(e,i,v,f._offset+f._length*.9,t,f._length*.1,"s",""),S(e,i,v,f._offset,t,f._length*.1,"n","")}}});var n=r._hoverlayer.node();n.onmousemove=function(o){o.target=e._fullLayout._lasthover,c.hover(e,o,r._hoversubplot)},n.onclick=function(o){o.target=e._fullLayout._lasthover,c.click(e,o)},n.onmousedown=function(o){e._fullLayout._lasthover.onmousedown(o)},Q.updateFx(e)}},Q.updateFx=function(e){var r=e._fullLayout,a=r.dragmode==="pan"?"move":"crosshair";I(r._draggers,a)}}),Pw=Dt((Q,Z)=>{var c=Jo();Z.exports=function(g){for(var I=c.layoutArrayContainers,S=c.layoutArrayRegexes,t=g.split("[")[0],e,r,a=0;a{var Z=si(),c=Yo(),g=as(),I=E_().sorterAsc,S=Jo();Q.containerArrayMatch=Pw();var t=Q.isAddVal=function(r){return r==="add"||Z(r)},e=Q.isRemoveVal=function(r){return r===null||r==="remove"};Q.applyContainerArrayChanges=function(r,a,n,o,i){var l=a.astr,f=S.getComponentMethod(l,"supplyLayoutDefaults"),x=S.getComponentMethod(l,"draw"),y=S.getComponentMethod(l,"drawOne"),v=o.replot||o.recalc||f===c||x===c,T=r.layout,u=r._fullLayout;if(n[""]){Object.keys(n).length>1&&g.warn("Full array edits are incompatible with other edits",l);var b=n[""][""];if(e(b))a.set(null);else if(Array.isArray(b))a.set(b);else return g.warn("Unrecognized full array edit value",l,b),!0;return v?!1:(f(T,u),x(r),!0)}var _=Object.keys(n).map(Number).sort(I),P=a.get(),M=P||[],C=i(u,l).get(),A=[],h=-1,p=M.length,k,w,R,O,j,V,H,F;for(k=0;k<_.length;k++){if(R=_[k],O=n[R],j=Object.keys(O),V=O[""],H=t(V),R<0||R>M.length-(H?0:1)){g.warn("index out of range",l,R);continue}if(V!==void 0)j.length>1&&g.warn("Insertion & removal are incompatible with edits to the same index.",l,R),e(V)?A.push(R):H?(V==="add"&&(V={}),M.splice(R,0,V),C&&C.splice(R,0,{})):g.warn("Unrecognized full object edit value",l,R,V),h===-1&&(h=R);else for(w=0;w=0;k--)M.splice(A[k],1),C&&C.splice(A[k],1);if(M.length?P||a.set(M):a.set(null),v)return!1;if(f(T,u),y!==c){var U;if(h===-1)U=_;else{for(p=Math.max(M.length,p),U=[],k=0;k<_.length&&(R=_[k],!(R>=h));k++)U.push(R);for(k=h;k{var Z=Yi(),c=Jo(),g=kn(),I=Kc(),S=Rc(),t=hi(),e=S.cleanId,r=S.getFromTrace,a=c.traceIs,n=["x","y","z"];Q.clearPromiseQueue=function(u){Array.isArray(u._promises)&&u._promises.length>0&&g.log("Clearing previous rejected promises from queue."),u._promises=[]},Q.cleanLayout=function(u){var b;u||(u={}),u.xaxis1&&(u.xaxis||(u.xaxis=u.xaxis1),delete u.xaxis1),u.yaxis1&&(u.yaxis||(u.yaxis=u.yaxis1),delete u.yaxis1),u.scene1&&(u.scene||(u.scene=u.scene1),delete u.scene1);var _=(I.subplotsRegistry.cartesian||{}).attrRegex;(I.subplotsRegistry.polar||{}).attrRegex,(I.subplotsRegistry.ternary||{}).attrRegex,(I.subplotsRegistry.gl3d||{}).attrRegex;var P=Object.keys(u);for(b=0;b3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),u.dragmode==="rotate"&&(u.dragmode="orbit"),t.clean(u),u.template&&u.template.layout&&Q.cleanLayout(u.template.layout),u};function o(u,b){var _=u[b],P=b.charAt(0);_&&_!=="paper"&&(u[b]=e(_,P,!0))}Q.cleanData=function(u){for(var b=0;b0)return u.substr(0,b)}Q.hasParent=function(u,b){for(var _=v(b);_;){if(_ in u)return!0;_=v(_)}return!1},Q.clearAxisTypes=function(u,b,_){for(var P=0;P{let _=(...P)=>P.every(M=>g.isPlainObject(M))||P.every(M=>Array.isArray(M));if([u,b].every(P=>Array.isArray(P))){if(u.length!==b.length)return!1;for(let P=0;Pg.isPlainObject(P))){if(Object.keys(u).length!==Object.keys(b).length)return!1;for(let P in u){if(P.startsWith("_"))continue;let M=u[P],C=b[P];if(M!==C&&!(_(M,C)&&T(M,C)))return!1}return!0}return!1};Q.collectionsAreEqual=T}),G_=Dt(Q=>{var Z=qr(),c=Yi(),g=Ff(),I=kn(),S=I.nestedProperty,t=Bm(),e=m0(),r=Jo(),a=Nm(),n=Kc(),o=Ls(),i=I_(),l=Td(),f=Vs(),x=hi(),y=Lw().initInteractions,v=Dp(),T=vf().clearOutline,u=ms().dfltConfig,b=M6(),_=L1(),P=y0(),M=Yc(),C=ic().AX_NAME_PATTERN,A=0,h=5;function p(Ct,gt,St,Nt){var re;if(Ct=I.getGraphDiv(Ct),t.init(Ct),I.isPlainObject(gt)){var le=gt;gt=le.data,St=le.layout,Nt=le.config,re=le.frames}var we=t.triggerHandler(Ct,"plotly_beforeplot",[gt,St,Nt]);if(we===!1)return Promise.reject();!gt&&!St&&!I.isPlotDiv(Ct)&&I.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Ct);function Ue(){if(re)return Q.addFrames(Ct,re)}j(Ct,Nt),St||(St={}),Z.select(Ct).classed("js-plotly-plot",!0),f.makeTester(),Array.isArray(Ct._promises)||(Ct._promises=[]);var qe=(Ct.data||[]).length===0&&Array.isArray(gt);Array.isArray(gt)&&(_.cleanData(gt),qe?Ct.data=gt:Ct.data.push.apply(Ct.data,gt),Ct.empty=!1),(!Ct.layout||qe)&&(Ct.layout=_.cleanLayout(St)),n.supplyDefaults(Ct);var or=Ct._fullLayout,Sr=or._has("cartesian");or._replotting=!0,(qe||or._shouldCreateBgLayer)&&(ne(Ct),or._shouldCreateBgLayer&&delete or._shouldCreateBgLayer),f.initGradients(Ct),f.initPatterns(Ct),qe&&o.saveShowSpikeInitial(Ct);var Ar=!Ct.calcdata||Ct.calcdata.length!==(Ct._fullData||[]).length;Ar&&n.doCalcdata(Ct);for(var mr=0;mr=Ct.data.length||re<-Ct.data.length)throw new Error(St+" must be valid indices for gd.data.");if(gt.indexOf(re,Nt+1)>-1||re>=0&>.indexOf(-Ct.data.length+re)>-1||re<0&>.indexOf(Ct.data.length+re)>-1)throw new Error("each index in "+St+" must be unique.")}}function W(Ct,gt,St){if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"currentIndices"),typeof St<"u"&&!Array.isArray(St)&&(St=[St]),typeof St<"u"&&U(Ct,St,"newIndices"),typeof St<"u"&>.length!==St.length)throw new Error("current and new indices must be of equal length.")}function q(Ct,gt,St){var Nt,re;if(!Array.isArray(Ct.data))throw new Error("gd.data must be an array.");if(typeof gt>"u")throw new Error("traces must be defined.");for(Array.isArray(gt)||(gt=[gt]),Nt=0;Nt"u")throw new Error("indices must be an integer or array of integers");U(Ct,St,"indices");for(var le in gt){if(!Array.isArray(gt[le])||gt[le].length!==St.length)throw new Error("attribute "+le+" must be an array of length equal to indices array length");if(re&&(!(le in Nt)||!Array.isArray(Nt[le])||Nt[le].length!==gt[le].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function lt(Ct,gt,St,Nt){var re=I.isPlainObject(Nt),le=[],we,Ue,qe,or,Sr;Array.isArray(St)||(St=[St]),St=F(St,Ct.data.length-1);for(var Ar in gt)for(var mr=0;mr=0&&Sr=0&&Sr"u")return or=Q.redraw(Ct),e.add(Ct,re,we,le,Ue),or;Array.isArray(St)||(St=[St]);try{W(Ct,Nt,St)}catch(Sr){throw Ct.data.splice(Ct.data.length-gt.length,gt.length),Sr}return e.startSequence(Ct),e.add(Ct,re,we,le,Ue),or=Q.moveTraces(Ct,Nt,St),e.stopSequence(Ct),or}function rt(Ct,gt){Ct=I.getGraphDiv(Ct);var St=[],Nt=Q.addTraces,re=rt,le=[Ct,St,gt],we=[Ct,gt],Ue,qe;if(typeof gt>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(gt)||(gt=[gt]),U(Ct,gt,"indices"),gt=F(gt,Ct.data.length-1),gt.sort(I.sorterDes),Ue=0;Ue"u")for(St=[],or=0;or0&&typeof fr.parts[Cn]!="string";)Cn--;var Tn=fr.parts[Cn],Mn=fr.parts[Cn-1]+"."+Tn,fi=fr.parts.slice(0,Cn).join("."),ki=S(Ct.layout,fi).get(),Oi=S(Nt,fi).get(),ji=fr.get();if(_r!==void 0){Ii[nr]=_r,oi[nr]=Tn==="reverse"?_r:it(ji);var Xi=a.getLayoutValObject(Nt,fr.parts);if(Xi&&Xi.impliedEdits&&_r!==null)for(var ci in Xi.impliedEdits)$n(I.relativeAttr(nr,ci),Xi.impliedEdits[ci]);if(["width","height"].indexOf(nr)!==-1)if(_r){$n("autosize",null);var za=nr==="height"?"width":"height";$n(za,Nt[za])}else Nt[nr]=Ct._initialAutoSize[nr];else if(nr==="autosize")$n("width",_r?null:Nt.width),$n("height",_r?null:Nt.height);else if(Mn.match(Wt))We(Mn),S(Nt,fi+"._inputRange").set(null);else if(Mn.match(Jt)){We(Mn),S(Nt,fi+"._inputRange").set(null);var Wa=S(Nt,fi).get();Wa._inputDomain&&(Wa._input.domain=Wa._inputDomain.slice())}else Mn.match(ge)&&S(Nt,fi+"._inputDomain").set(null);if(Tn==="type"){Zi=ki;var ze=Oi.type==="linear"&&_r==="log",Ie=Oi.type==="log"&&_r==="linear";if(ze||Ie){if(!Zi||!Zi.range)$n(fi+".autorange",!0);else if(Oi.autorange)ze&&(Zi.range=Zi.range[1]>Zi.range[0]?[1,2]:[2,1]);else{var Rr=Zi.range[0],$r=Zi.range[1];ze?(Rr<=0&&$r<=0&&$n(fi+".autorange",!0),Rr<=0?Rr=$r/1e6:$r<=0&&($r=Rr/1e6),$n(fi+".range[0]",Math.log(Rr)/Math.LN10),$n(fi+".range[1]",Math.log($r)/Math.LN10)):($n(fi+".range[0]",Math.pow(10,Rr)),$n(fi+".range[1]",Math.pow(10,$r)))}Array.isArray(Nt._subplots.polar)&&Nt._subplots.polar.length&&Nt[fr.parts[0]]&&fr.parts[1]==="radialaxis"&&delete Nt[fr.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Ct,Oi,_r,$n),r.getComponentMethod("images","convertCoords")(Ct,Oi,_r,$n)}else $n(fi+".autorange",!0),$n(fi+".range",null);S(Nt,fi+"._inputRange").set(null)}else if(Tn.match(C)){var Gr=S(Nt,nr).get(),Br=(_r||{}).type;(!Br||Br==="-")&&(Br="linear"),r.getComponentMethod("annotations","convertCoords")(Ct,Gr,Br,$n),r.getComponentMethod("images","convertCoords")(Ct,Gr,Br,$n)}var Yr=b.containerArrayMatch(nr);if(Yr){Sr=Yr.array,Ar=Yr.index;var pn=Yr.property,on=Xi||{editType:"calc"};Ar!==""&&pn===""&&(b.isAddVal(_r)?oi[nr]=null:b.isRemoveVal(_r)?oi[nr]=(S(St,Sr).get()||[])[Ar]:I.warn("unrecognized full object value",gt)),M.update(Xn,on),or[Sr]||(or[Sr]={});var Ce=or[Sr][Ar];Ce||(Ce=or[Sr][Ar]={}),Ce[pn]=_r,delete gt[nr]}else Tn==="reverse"?(ki.range?ki.range.reverse():($n(fi+".autorange",!0),ki.range=[1,0]),Oi.autorange?Xn.calc=!0:Xn.plot=!0):(nr==="dragmode"&&(_r===!1&&ji!==!1||_r!==!1&&ji===!1)||Nt._has("scatter-like")&&Nt._has("regl")&&nr==="dragmode"&&(_r==="lasso"||_r==="select")&&!(ji==="lasso"||ji==="select")?Xn.plot=!0:Xi?M.update(Xn,Xi):Xn.calc=!0,fr.set(_r))}}for(Sr in or){var dr=b.applyContainerArrayChanges(Ct,le(St,Sr),or[Sr],Xn,le);dr||(Xn.plot=!0)}for(var Hr in sa){Zi=o.getFromId(Ct,Hr);var _n=Zi&&Zi._constraintGroup;if(_n){Xn.calc=!0;for(var Fn in _n)sa[Fn]||(o.getFromId(Ct,Fn)._constraintShrinkable=!0)}}(pe(Ct)||gt.height||gt.width)&&(Xn.plot=!0);var Qn=Nt.shapes;for(Ar=0;Ar1;)if(Nt.pop(),St=S(gt,Nt.join(".")+".uirevision").get(),St!==void 0)return St;return gt.uirevision}function oe(Ct,gt){for(var St=0;St[fi,Ct._ev.listeners(fi)]);le=Q.newPlot(Ct,gt,St,Nt).then(()=>{for(let[fi,ki]of Mn)ki.forEach(Oi=>Ct.on(fi,Oi));return Q.react(Ct,gt,St,Nt)})}else{Ct.data=gt||[],_.cleanData(Ct.data),Ct.layout=St||{},_.cleanLayout(Ct.layout),Ge(Ct.data,Ct.layout,Ue,qe),n.supplyDefaults(Ct,{skipUpdateCalc:!0});var Ar=Ct._fullData,mr=Ct._fullLayout,Qr=mr.datarevision===void 0,Hn=mr.transition,Wn=jr(Ct,qe,mr,Qr,Hn),Xn=Wn.newDataRevision,Ii=ur(Ct,Ue,Ar,Qr,Hn,Xn);if(pe(Ct)&&(Wn.layoutReplot=!0),Ii.calc||Wn.calc){Ct.calcdata=void 0;for(var oi=Object.getOwnPropertyNames(mr),$n=0;$n(Sr||Ct.emit("plotly_react",{config:Nt,data:gt,layout:St}),Ct))}function ur(Ct,gt,St,Nt,re,le){var we=gt.length===St.length;if(!re&&!we)return{fullReplot:!0,calc:!0};var Ue=M.traceFlags();Ue.arrays={},Ue.nChanges=0,Ue.nChangesAnim=0;var qe,or;function Sr(Qr){var Hn=a.getTraceValObject(or,Qr);return!or._module.animatable&&Hn.anim&&(Hn.anim=!1),Hn}var Ar={getValObject:Sr,flags:Ue,immutable:Nt,transition:re,newDataRevision:le,gd:Ct},mr={};for(qe=0;qe=re.length?re[0]:re[or]:re}function Ue(or){return Array.isArray(le)?or>=le.length?le[0]:le[or]:le}function qe(or,Sr){var Ar=0;return function(){if(or&&++Ar===Sr)return or()}}return new Promise(function(or,Sr){function Ar(){if(Nt._frameQueue.length!==0){for(;Nt._frameQueue.length;){var Tn=Nt._frameQueue.pop();Tn.onInterrupt&&Tn.onInterrupt()}Ct.emit("plotly_animationinterrupted",[])}}function mr(Tn){if(Tn.length!==0){for(var Mn=0;MnNt._timeToNext&&Hn()};Tn()}var Xn=0;function Ii(Tn){return Array.isArray(re)?Xn>=re.length?Tn.transitionOpts=re[Xn]:Tn.transitionOpts=re[0]:Tn.transitionOpts=re,Xn++,Tn}var oi,$n,sa=[],Zi=gt==null,We=Array.isArray(gt),nr=!Zi&&!We&&I.isPlainObject(gt);if(nr)sa.push({type:"object",data:Ii(I.extendFlat({},gt))});else if(Zi||["string","number"].indexOf(typeof gt)!==-1)for(oi=0;oi0&&tntn)&&Cn.push($n);sa=Cn}}sa.length>0?mr(sa):(Ct.emit("plotly_animated"),or())})}function Xr(Ct,gt,St){if(Ct=I.getGraphDiv(Ct),gt==null)return Promise.resolve();if(!I.isPlotDiv(Ct))throw new Error("This element is not a Plotly plot: "+Ct+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Nt,re,le,we,Ue=Ct._transitionData._frames,qe=Ct._transitionData._frameHash;if(!Array.isArray(gt))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+gt);var or=Ue.length+gt.length*2,Sr=[],Ar={};for(Nt=gt.length-1;Nt>=0;Nt--)if(I.isPlainObject(gt[Nt])){var mr=gt[Nt].name,Qr=(qe[mr]||Ar[mr]||{}).name,Hn=gt[Nt].name,Wn=qe[Qr]||Ar[Qr];Qr&&Hn&&typeof Hn=="number"&&Wn&&Afr.index?-1:nr.index=0;Nt--){if(re=Sr[Nt].frame,typeof re.name=="number"&&I.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!re.name)for(;qe[re.name="frame "+Ct._transitionData._counter++];);if(qe[re.name]){for(le=0;le=0;St--)Nt=gt[St],le.push({type:"delete",index:Nt}),we.unshift({type:"insert",index:Nt,value:re[Nt]});var Ue=n.modifyFrames,qe=n.modifyFrames,or=[Ct,we],Sr=[Ct,le];return e&&e.add(Ct,Ue,or,qe,Sr),n.modifyFrames(Ct,le)}function Le(Ct){Ct=I.getGraphDiv(Ct);var gt=Ct._fullLayout||{},St=Ct._fullData||[];return n.cleanPlot([],{},St,gt),n.purge(Ct),t.purge(Ct),gt._container&>._container.remove(),delete Ct._context,Ct}function Gt(Ct){var gt=Ct._fullLayout,St=Ct.getBoundingClientRect();if(!I.equalDomRects(St,gt._lastBBox)){var Nt=gt._invTransform=I.inverseTransformMatrix(I.getFullTransformMatrix(Ct));gt._invScaleX=Math.sqrt(Nt[0][0]*Nt[0][0]+Nt[0][1]*Nt[0][1]+Nt[0][2]*Nt[0][2]),gt._invScaleY=Math.sqrt(Nt[1][0]*Nt[1][0]+Nt[1][1]*Nt[1][1]+Nt[1][2]*Nt[1][2]),gt._lastBBox=St}}function ne(Ct){var gt=Z.select(Ct),St=Ct._fullLayout;if(St._calcInverseTransform=Gt,St._calcInverseTransform(Ct),St._container=gt.selectAll(".plot-container").data([0]),St._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),St._paperdiv=St._container.selectAll(".svg-container").data([0]),St._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),St._glcontainer=St._paperdiv.selectAll(".gl-container").data([{}]),St._glcontainer.enter().append("div").classed("gl-container",!0),St._paperdiv.selectAll(".main-svg").remove(),St._paperdiv.select(".modebar-container").remove(),St._paper=St._paperdiv.insert("svg",":first-child").classed("main-svg",!0),St._toppaper=St._paperdiv.append("svg").classed("main-svg",!0),St._modebardiv=St._paperdiv.append("div"),delete St._modeBar,St._hoverpaper=St._paperdiv.append("svg").classed("main-svg",!0),!St._uid){var Nt={};Z.selectAll("defs").each(function(){this.id&&(Nt[this.id.split("-")[1]]=1)}),St._uid=I.randstr(Nt)}St._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),St._defs=St._paper.append("defs").attr("id","defs-"+St._uid),St._clips=St._defs.append("g").classed("clips",!0),St._topdefs=St._toppaper.append("defs").attr("id","topdefs-"+St._uid),St._topclips=St._topdefs.append("g").classed("clips",!0),St._bgLayer=St._paper.append("g").classed("bglayer",!0),St._draggers=St._paper.append("g").classed("draglayer",!0);var re=St._paper.append("g").classed("layer-below",!0);St._imageLowerLayer=re.append("g").classed("imagelayer",!0),St._shapeLowerLayer=re.append("g").classed("shapelayer",!0),St._cartesianlayer=St._paper.append("g").classed("cartesianlayer",!0),St._polarlayer=St._paper.append("g").classed("polarlayer",!0),St._smithlayer=St._paper.append("g").classed("smithlayer",!0),St._ternarylayer=St._paper.append("g").classed("ternarylayer",!0),St._geolayer=St._paper.append("g").classed("geolayer",!0),St._funnelarealayer=St._paper.append("g").classed("funnelarealayer",!0),St._pielayer=St._paper.append("g").classed("pielayer",!0),St._iciclelayer=St._paper.append("g").classed("iciclelayer",!0),St._treemaplayer=St._paper.append("g").classed("treemaplayer",!0),St._sunburstlayer=St._paper.append("g").classed("sunburstlayer",!0),St._indicatorlayer=St._toppaper.append("g").classed("indicatorlayer",!0),St._glimages=St._paper.append("g").classed("glimages",!0);var le=St._toppaper.append("g").classed("layer-above",!0);St._imageUpperLayer=le.append("g").classed("imagelayer",!0),St._shapeUpperLayer=le.append("g").classed("shapelayer",!0),St._selectionLayer=St._toppaper.append("g").classed("selectionlayer",!0),St._infolayer=St._toppaper.append("g").classed("infolayer",!0),St._menulayer=St._toppaper.append("g").classed("menulayer",!0),St._zoomlayer=St._toppaper.append("g").classed("zoomlayer",!0),St._hoverlayer=St._hoverpaper.append("g").classed("hoverlayer",!0),St._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Ct.emit("plotly_framework")}Q.animate=br,Q.addFrames=Xr,Q.deleteFrames=nn,Q.addTraces=dt,Q.deleteTraces=rt,Q.extendTraces=st,Q.moveTraces=at,Q.prependTraces=tt,Q.newPlot=H,Q._doPlot=p,Q.purge=Le,Q.react=cr,Q.redraw=V,Q.relayout=It,Q.restyle=vt,Q.setPlotConfig=w,Q.update=se,Q._guiRelayout=Tt(It),Q._guiRestyle=Tt(vt),Q._guiUpdate=Tt(se),Q._storeDirectGUIEdit=ut}),o0=Dt(Q=>{var Z=Jo();Q.getDelay=function(I){return I._has&&(I._has("gl3d")||I._has("mapbox")||I._has("map"))?500:0},Q.getRedrawFunc=function(I){return function(){Z.getComponentMethod("colorbar","draw")(I)}},Q.encodeSVG=function(I){return"data:image/svg+xml,"+encodeURIComponent(I)},Q.encodeJSON=function(I){return"data:application/json,"+encodeURIComponent(I)};var c=window.URL||window.webkitURL;Q.createObjectURL=function(I){return c.createObjectURL(I)},Q.revokeObjectURL=function(I){return c.revokeObjectURL(I)},Q.createBlob=function(I,S){if(S==="svg")return new window.Blob([I],{type:"image/svg+xml;charset=utf-8"});if(S==="full-json")return new window.Blob([I],{type:"application/json;charset=utf-8"});var t=g(window.atob(I));return new window.Blob([t],{type:"image/"+S})},Q.octetStream=function(I){document.location.href="data:application/octet-stream"+I};function g(I){for(var S=I.length,t=new ArrayBuffer(S),e=new Uint8Array(t),r=0;r{var c=qr();kn();var g=Vs(),I=hi();Dp();var S=/"/g,t="TOBESTRIPPED",e=new RegExp('("'+t+")|("+t+'")',"g");function r(n){var o=c.select("body").append("div").style({display:"none"}).html(""),i=n.replace(/(&[^;]*;)/gi,function(l){return l==="<"?"<":l==="&rt;"?">":l.indexOf("<")!==-1||l.indexOf(">")!==-1?"":o.html(l).text()});return o.remove(),i}function a(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}Z.exports=function(n,o,i){var l=n._fullLayout,f=l._paper,x=l._toppaper,y=l.width,v=l.height,T;f.insert("rect",":first-child").call(g.setRect,0,0,y,v).call(I.fill,l.paper_bgcolor);var u=l._basePlotModules||[];for(T=0;T{var c=kn(),g=Rm().EventEmitter,I=o0();function S(t){var e=t.emitter||new g,r=new Promise(function(a,n){var o=window.Image,i=t.svg,l=t.format||"png",f=t.canvas,x=t.scale||1,y=t.width||300,v=t.height||150,T=x*y,u=x*v,b=f.getContext("2d",{willReadFrequently:!0}),_=new o,P,M;l==="svg"||c.isSafari()?M=I.encodeSVG(i):(P=I.createBlob(i,"svg"),M=I.createObjectURL(P)),f.width=T,f.height=u,_.onload=function(){var C;switch(P=null,I.revokeObjectURL(M),l!=="svg"&&b.drawImage(_,0,0,T,u),l){case"jpeg":C=f.toDataURL("image/jpeg");break;case"png":C=f.toDataURL("image/png");break;case"webp":C=f.toDataURL("image/webp");break;case"svg":C=M;break;default:var A="Image format is not jpeg, png, svg or webp.";if(n(new Error(A)),!t.promise)return e.emit("error",A)}a(C),t.promise||e.emit("success",C)},_.onerror=function(C){if(P=null,I.revokeObjectURL(M),n(C),!t.promise)return e.emit("error",C)},_.src=M});return t.promise?r:e}Z.exports=S}),Iw=Dt((Q,Z)=>{var c=Yi(),g=G_(),I=Kc(),S=kn(),t=o0(),e=Xy(),r=Jy(),a=Wi().version,n={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function o(i,l){l=l||{};var f,x,y,v;S.isPlainObject(i)?(f=i.data||[],x=i.layout||{},y=i.config||{},v={}):(i=S.getGraphDiv(i),f=S.extendDeep([],i.data),x=S.extendDeep({},i.layout),y=i._context,v=i._fullLayout||{});function T(H){return!(H in l)||S.validate(l[H],n[H])}if(!T("width")&&l.width!==null||!T("height")&&l.height!==null)throw new Error("Height and width should be pixel values.");if(!T("format"))throw new Error("Export format is not "+S.join2(n.format.values,", "," or ")+".");var u={};function b(H,F){return S.coerce(l,u,n,H,F)}var _=b("format"),P=b("width"),M=b("height"),C=b("scale"),A=b("setBackground"),h=b("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var k=S.extendFlat({},x);P?k.width=P:l.width===null&&c(v.width)&&(k.width=v.width),M?k.height=M:l.height===null&&c(v.height)&&(k.height=v.height);var w=S.extendFlat({},y,{_exportedPlot:!0,staticPlot:!0,setBackground:A}),R=t.getRedrawFunc(p);function O(){return new Promise(function(H){setTimeout(H,t.getDelay(p._fullLayout))})}function j(){return new Promise(function(H,F){var U=e(p,_,C),W=p._fullLayout.width,q=p._fullLayout.height;function J(){g.purge(p),document.body.removeChild(p)}if(_==="full-json"){var lt=I.graphJson(p,!1,"keepdata","object",!0,!0);return lt.version=a,lt=JSON.stringify(lt),J(),H(h?lt:t.encodeJSON(lt))}if(J(),_==="svg")return H(h?U:t.encodeSVG(U));var yt=document.createElement("canvas");yt.id=S.randstr(),r({format:_,width:W,height:q,scale:C,canvas:yt,svg:U,promise:!0}).then(H).catch(F)})}function V(H){return h?H.replace(t.IMAGE_URL_PREFIX,""):H}return new Promise(function(H,F){g.newPlot(p,f,k,w).then(R).then(O).then(j).then(function(U){H(V(U))}).catch(function(U){F(U)})})}Z.exports=o}),ym=Dt((Q,Z)=>{var c=kn(),g=Kc(),I=Nm(),S=ms().dfltConfig,t=c.isPlainObject,e=Array.isArray,r=c.isArrayOrTypedArray;Z.exports=function(u,b){u===void 0&&(u=[]),b===void 0&&(b={});var _=I.get(),P=[],M={_context:c.extendFlat({},S)},C,A;e(u)?(M.data=c.extendDeep([],u),C=u):(M.data=[],C=[],P.push(l("array","data"))),t(b)?(M.layout=c.extendDeep({},b),A=b):(M.layout={},A={},arguments.length>1&&P.push(l("object","layout"))),g.supplyDefaults(M);for(var h=M._fullData,p=C.length,k=0;kR.length&&P.push(l("unused",M,k.concat(R.length)));var U=R.length,W=Array.isArray(F);W&&(U=Math.min(U,F.length));var q,J,lt,yt,mt;if(O.dimensions===2)for(J=0;JR[J].length&&P.push(l("unused",M,k.concat(J,R[J].length)));var st=R[J].length;for(q=0;q<(W?Math.min(st,F[J].length):st);q++)lt=W?F[J][q]:F,yt=w[J][q],mt=R[J][q],c.validate(yt,lt)?mt!==yt&&mt!==+yt&&P.push(l("dynamic",M,k.concat(J,q),yt,mt)):P.push(l("value",M,k.concat(J,q),yt))}else P.push(l("array",M,k.concat(J),w[J]));else for(J=0;J{var c=kn(),g=o0();function I(S,t,e){var r=document.createElement("a"),a="download"in r,n=new Promise(function(o,i){var l,f;if(a)return l=g.createBlob(S,e),f=g.createObjectURL(l),r.href=f,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),g.revokeObjectURL(f),l=null,o(t);if(c.isSafari()){var x=e==="svg"?",":";base64,";return g.octetStream(x+encodeURIComponent(S)),o(t)}i(new Error("download error"))});return n}Z.exports=I}),Y_=Dt((Q,Z)=>{var c=kn(),g=Iw(),I=zw();o0();function S(t,e){var r;return c.isPlainObject(t)||(r=c.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,n){r&&r._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var o=g(t,e),i=e.filename||t.fn||"newplot";i+="."+e.format.replace("-","."),o.then(function(l){return r&&(r._snapshotInProgress=!1),I(l,i,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),n(l)})})}Z.exports=S}),P1=Dt(Q=>{var Z=kn(),c=Z.isPlainObject,g=Nm(),I=Kc(),S=Ho(),t=mu(),e=ms().dfltConfig;Q.makeTemplate=function(y){y=Z.isPlainObject(y)?y:Z.getGraphDiv(y),y=Z.extendDeep({_context:e},{data:y.data,layout:y.layout}),I.supplyDefaults(y);var v=y.data||[],T=y.layout||{};T._basePlotModules=y._fullLayout._basePlotModules,T._modules=y._fullLayout._modules;var u={data:{},layout:{}};v.forEach(function(w){var R={};n(w,R,i.bind(null,w));var O=Z.coerce(w,{},S,"type"),j=u.data[O];j||(j=u.data[O]=[]),j.push(R)}),n(T,u.layout,o.bind(null,T)),delete u.layout.template;var b=T.template;if(c(b)){var _=b.layout,P,M,C,A,h,p;c(_)&&r(_,u.layout);var k=b.data;if(c(k)){for(M in u.data)if(C=k[M],Array.isArray(C)){for(h=u.data[M],p=h.length,A=C.length,P=0;PV?P.push({code:"unused",traceType:w,templateCount:j,dataCount:V}):V>j&&P.push({code:"reused",traceType:w,templateCount:j,dataCount:V})}}function H(F,U){for(var W in F)if(W.charAt(0)!=="_"){var q=F[W],J=l(F,W,U);c(q)?(Array.isArray(F)&&q._template===!1&&q.templateitemname&&P.push({code:"missing",path:J,templateitemname:q.templateitemname}),H(q,J)):Array.isArray(q)&&f(q)&&H(q,J)}}if(H({data:C,layout:M},""),P.length)return P.map(x)};function f(y){for(var v=0;v{var Z=G_();Q._doPlot=Z._doPlot,Q.newPlot=Z.newPlot,Q.restyle=Z.restyle,Q.relayout=Z.relayout,Q.redraw=Z.redraw,Q.update=Z.update,Q._guiRestyle=Z._guiRestyle,Q._guiRelayout=Z._guiRelayout,Q._guiUpdate=Z._guiUpdate,Q._storeDirectGUIEdit=Z._storeDirectGUIEdit,Q.react=Z.react,Q.extendTraces=Z.extendTraces,Q.prependTraces=Z.prependTraces,Q.addTraces=Z.addTraces,Q.deleteTraces=Z.deleteTraces,Q.moveTraces=Z.moveTraces,Q.purge=Z.purge,Q.addFrames=Z.addFrames,Q.deleteFrames=Z.deleteFrames,Q.animate=Z.animate,Q.setPlotConfig=Z.setPlotConfig;var c=r0().getGraphDiv,g=U_().eraseActiveShape;Q.deleteActiveShape=function(S){return g(c(S))},Q.toImage=Iw(),Q.validate=ym(),Q.downloadImage=Y_();var I=P1();Q.makeTemplate=I.makeTemplate,Q.validateTemplate=I.validateTemplate}),Hm=Dt((Q,Z)=>{var c=kn(),g=Jo();Z.exports=function(I,S,t,e){var r=e("x"),a=e("y"),n,o=g.getComponentMethod("calendars","handleTraceDefaults");if(o(I,S,["x","y"],t),r){var i=c.minRowLength(r);a?n=Math.min(i,c.minRowLength(a)):(n=i,e("y0"),e("dy"))}else{if(!a)return 0;n=c.minRowLength(a),e("x0"),e("dx")}return S._length=n,n}}),Rp=Dt((Q,Z)=>{var c=kn().dateTick0,g=Ca(),I=g.ONEWEEK;function S(t,e){return t%I===0?c(e,1):c(e,0)}Z.exports=function(t,e,r,a,n){if(n||(n={x:!0,y:!0}),n.x){var o=a("xperiod");o&&(a("xperiod0",S(o,e.xcalendar)),a("xperiodalignment"))}if(n.y){var i=a("yperiod");i&&(a("yperiod0",S(i,e.ycalendar)),a("yperiodalignment"))}}}),Ow=Dt((Q,Z)=>{var c=["orientation","groupnorm","stackgaps"];Z.exports=function(g,I,S,t){var e=S._scatterStackOpts,r=t("stackgroup");if(r){var a=I.xaxis+I.yaxis,n=e[a];n||(n=e[a]={});var o=n[r],i=!1;o?o.traces.push(I):(o=n[r]={traceIndices:[],traces:[I]},i=!0);for(var l={orientation:I.x&&!I.y?"h":"v"},f=0;f{var c=hi(),g=Ud().hasColorscale,I=mc(),S=Tc();Z.exports=function(t,e,r,a,n,o){var i=S.isBubble(t),l=(t.line||{}).color,f;if(o=o||{},l&&(r=l),n("marker.symbol"),n("marker.opacity",i?.7:1),n("marker.size"),o.noAngle||(n("marker.angle"),o.noAngleRef||n("marker.angleref"),o.noStandOff||n("marker.standoff")),n("marker.color",r),g(t,"marker")&&I(t,e,a,n,{prefix:"marker.",cLetter:"c"}),o.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&e.marker.color!==l?f=l:i?f=c.background:f=c.defaultLine,n("marker.line.color",f),g(t,"marker.line")&&I(t,e,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",i?1:0)),i&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),o.gradient){var x=n("marker.gradient.type");x!=="none"&&n("marker.gradient.color")}}}),z0=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray,g=Ud().hasColorscale,I=mc();Z.exports=function(S,t,e,r,a,n){n||(n={});var o=(S.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),a("line.color",e),g(S,"line"))I(S,t,r,a,{prefix:"line.",cLetter:"c"});else{var i=(c(o)?!1:o)||e;a("line.color",i)}a("line.width"),n.noDash||a("line.dash"),n.backoff&&a("line.backoff")}}),xv=Dt((Q,Z)=>{Z.exports=function(c,g,I){var S=I("line.shape");S==="spline"&&I("line.smoothing")}}),x0=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I,S,t,e){e=e||{},t("textposition"),c.coerceFont(t,"textfont",e.font||S.font,e),e.noSelect||(t("selected.textfont.color"),t("unselected.textfont.color"))}}),O0=Dt((Q,Z)=>{var c=hi(),g=kn().isArrayOrTypedArray;function I(S){for(var t=c.interpolate(S[0][1],S[1][1],.5),e=2;e{var c=kn(),g=Jo(),I=ef(),S=vm(),t=Tc(),e=Hm(),r=Rp(),a=Ow(),n=s0(),o=z0(),i=xv(),l=x0(),f=O0(),x=kn().coercePattern;Z.exports=function(y,v,T,u){function b(k,w){return c.coerce(y,v,I,k,w)}var _=e(y,v,u,b);if(_||(v.visible=!1),!!v.visible){r(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder");var P=a(y,v,u,b);u.scattermode==="group"&&v.orientation===void 0&&b("orientation","v");var M=!P&&_{var c=vv().getAxisGroup;Z.exports=function(g,I,S,t,e){var r=I.orientation,a=I[{v:"x",h:"y"}[r]+"axis"],n=c(S,a)+r,o=S._alignmentOpts||{},i=t("alignmentgroup"),l=o[n];l||(l=o[n]={});var f=l[i];f?f.traces.push(I):f=l[i]={traces:[I],alignmentIndex:Object.keys(l).length,offsetGroups:{}};var x=t("offsetgroup")||"",y=f.offsetGroups,v=y[x];I._offsetIndex=0,(e!=="group"||x)&&(v||(v=y[x]={offsetIndex:Object.keys(y).length}),I._offsetIndex=v.offsetIndex)}}),Fw=Dt((Q,Z)=>{var c=kn(),g=Cg(),I=ef();Z.exports=function(S,t){var e,r,a,n=t.scattermode;function o(y){return c.coerce(r._input,r,I,y)}if(t.scattermode==="group")for(a=0;a=0;f--){var x=S[f];if(x.type==="scatter"&&x.xaxis===i.xaxis&&x.yaxis===i.yaxis){x.opacity=void 0;break}}}}}}),Rw=Dt((Q,Z)=>{var c=kn(),g=vg();Z.exports=function(I,S){function t(r,a){return c.coerce(I,S,g,r,a)}var e=S.barmode==="group";S.scattermode==="group"&&t("scattergap",e?S.bargap:.2)}}),D0=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=g.dateTime2ms,S=g.incrementMonth,t=Ca(),e=t.ONEAVGMONTH;Z.exports=function(r,a,n,o){if(a.type!=="date")return{vals:o};var i=r[n+"periodalignment"];if(!i)return{vals:o};var l=r[n+"period"],f;if(c(l)){if(l=+l,l<=0)return{vals:o}}else if(typeof l=="string"&&l.charAt(0)==="M"){var x=+l.substring(1);if(x>0&&Math.round(x)===x)f=x;else return{vals:o}}for(var y=a.calendar,v=i==="start",T=i==="end",u=r[n+"period0"],b=I(u,y)||0,_=[],P=[],M=[],C=o.length,A=0;Ah;)w=S(w,-f,y);for(;w<=h;)w=S(w,f,y);k=S(w,-f,y)}else{for(p=Math.round((h-b)/l),w=b+p*l;w>h;)w-=l;for(;w<=h;)w+=l;k=w-l}_[A]=v?k:T?w:(k+w)/2,P[A]=k,M[A]=w}return{vals:_,starts:P,ends:M}}}),F0=Dt((Q,Z)=>{var c=Ud().hasColorscale,g=Xd(),I=Tc();Z.exports=function(S,t){I.hasLines(t)&&c(t,"line")&&g(S,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),I.hasMarkers(t)&&(c(t,"marker")&&g(S,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),c(t,"marker.line")&&g(S,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}),ct=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){for(var S=0;S{var c=kn();Z.exports=function(g,I){c.isArrayOrTypedArray(I.selectedpoints)&&c.tagSelected(g,I)}}),me=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Ls(),S=D0(),t=Ca().BADNUM,e=Tc(),r=F0(),a=ct(),n=Bt();function o(v,T){var u=v._fullLayout,b=T._xA=I.getFromId(v,T.xaxis||"x","x"),_=T._yA=I.getFromId(v,T.yaxis||"y","y"),P=b.makeCalcdata(T,"x"),M=_.makeCalcdata(T,"y"),C=S(T,b,"x",P),A=S(T,_,"y",M),h=C.vals,p=A.vals,k=T._length,w=new Array(k),R=T.ids,O=y(T,u,b,_),j=!1,V,H,F,U,W,q;f(u,T);var J="x",lt="y",yt;if(O)g.pushUnique(O.traceIndices,T.index),V=O.orientation==="v",V?(lt="s",yt="x"):(J="s",yt="y"),W=O.stackgaps==="interpolate";else{var mt=l(T,k);i(v,T,b,_,h,p,mt)}var st=!!T.xperiodalignment,tt=!!T.yperiodalignment;for(H=0;HH&&w[U].gap;)U--;for(q=w[U].s,F=w.length-1;F>U;F--)w[F].s=q;for(;H{Z.exports=g;var c=kn().distinctVals;function g(I,S){this.traces=I,this.sepNegVal=S.sepNegVal,this.overlapNoMerge=S.overlapNoMerge;for(var t=1/0,e=S.posAxis._id.charAt(0),r=[],a=0;a{var c=Yi(),g=kn().isArrayOrTypedArray,I=Ca().BADNUM,S=Jo(),t=Ls(),e=vv().getAxisGroup,r=Qe();function a(w,R){for(var O=R.xaxis,j=R.yaxis,V=w._fullLayout,H=w._fullData,F=w.calcdata,U=[],W=[],q=0;qW+F||!c(U))}for(var J=0;J{var c=me(),g=zr().setGroupPositions;function I(e,r){for(var a=r.xaxis,n=r.yaxis,o=e._fullLayout,i=e._fullData,l=e.calcdata,f=[],x=[],y=0;yO[y]&&y{var c=Vs(),g=Ca(),I=g.BADNUM,S=g.LOG_CLIP,t=S+.5,e=S-.5,r=kn(),a=r.segmentsIntersect,n=r.constrain,o=vm();Z.exports=function(i,l){var f=l.trace||{},x=l.xaxis,y=l.yaxis,v=x.type==="log",T=y.type==="log",u=x._length,b=y._length,_=l.backoff,P=f.marker,M=l.connectGaps,C=l.baseTolerance,A=l.shape,h=A==="linear",p=f.fill&&f.fill!=="none",k=[],w=o.minTolerance,R=i.length,O=new Array(R),j=0,V,H,F,U,W,q,J,lt,yt,mt,st,tt,dt,rt,at,vt;function it(we){var Ue=i[we];if(!Ue)return!1;var qe=l.linearized?x.l2p(Ue.x):x.c2p(Ue.x),or=l.linearized?y.l2p(Ue.y):y.c2p(Ue.y);if(qe===I){if(v&&(qe=x.c2p(Ue.x,!0)),qe===I)return!1;T&&or===I&&(qe*=Math.abs(x._m*b*(x._m>0?t:e)/(y._m*u*(y._m>0?t:e)))),qe*=1e3}if(or===I){if(T&&(or=y.c2p(Ue.y,!0)),or===I)return!1;or*=1e3}return[qe,or]}function Y(we,Ue,qe,or){var Sr=qe-we,Ar=or-Ue,mr=.5-we,Qr=.5-Ue,Hn=Sr*Sr+Ar*Ar,Wn=Sr*mr+Ar*Qr;if(Wn>0&&Wn1||Math.abs(mr.y-qe[0][1])>1)&&(mr=[mr.x,mr.y],or&&It(mr,we)Wt||we[1]ge)return[n(we[0],qt,Wt),n(we[1],Jt,ge)]}function Te(we,Ue){if(we[0]===Ue[0]&&(we[0]===qt||we[0]===Wt)||we[1]===Ue[1]&&(we[1]===Jt||we[1]===ge))return!0}function He(we,Ue){var qe=[],or=oe(we),Sr=oe(Ue);return or&&Sr&&Te(or,Sr)||(or&&qe.push(or),Sr&&qe.push(Sr)),qe}function Ge(we,Ue,qe){return function(or,Sr){var Ar=oe(or),mr=oe(Sr),Qr=[];if(Ar&&mr&&Te(Ar,mr))return Qr;Ar&&Qr.push(Ar),mr&&Qr.push(mr);var Hn=2*r.constrain((or[we]+Sr[we])/2,Ue,qe)-((Ar||or)[we]+(mr||Sr)[we]);if(Hn){var Wn;Ar&&mr?Wn=Hn>0==Ar[we]>mr[we]?Ar:mr:Wn=Ar||mr,Wn[we]+=Hn}return Qr}}var cr;A==="linear"||A==="spline"?cr=ve:A==="hv"||A==="vh"?cr=He:A==="hvh"?cr=Ge(0,qt,Wt):A==="vhv"&&(cr=Ge(1,Jt,ge));function ur(we,Ue){var qe=Ue[0]-we[0],or=(Ue[1]-we[1])/qe,Sr=(we[1]*Ue[0]-Ue[1]*we[0])/qe;return Sr>0?[or>0?qt:Wt,ge]:[or>0?Wt:qt,Jt]}function jr(we){var Ue=we[0],qe=we[1],or=Ue===O[j-1][0],Sr=qe===O[j-1][1];if(!(or&&Sr))if(j>1){var Ar=Ue===O[j-2][0],mr=qe===O[j-2][1];or&&(Ue===qt||Ue===Wt)&&Ar?mr?j--:O[j-1]=we:Sr&&(qe===Jt||qe===ge)&&mr?Ar?j--:O[j-1]=we:O[j++]=we}else O[j++]=we}function Wr(we){O[j-1][0]!==we[0]&&O[j-1][1]!==we[1]&&jr([Tt,Lt]),jr(we),Mt=null,Tt=Lt=0}var br=r.isArrayOrTypedArray(P);function Xr(we){if(we&&_&&(we.i=V,we.d=i,we.trace=f,we.marker=br?P[we.i]:P,we.backoff=_),ft=we[0]/u,ut=we[1]/b,pe=we[0]Wt?Wt:0,se=we[1]ge?ge:0,pe||se){if(!j)O[j++]=[pe||we[0],se||we[1]];else if(Mt){var Ue=cr(Mt,we);Ue.length>1&&(Wr(Ue[0]),O[j++]=Ue[1])}else ee=cr(O[j-1],we)[0],O[j++]=ee;var qe=O[j-1];pe&&se&&(qe[0]!==pe||qe[1]!==se)?(Mt&&(Tt!==pe&&Lt!==se?jr(Tt&&Lt?ur(Mt,we):[Tt||pe,Lt||se]):Tt&&Lt&&jr([Tt,Lt])),jr([pe,se])):Tt-pe&&Lt-se&&jr([pe||Tt,se||Lt]),Mt=we,Tt=pe,Lt=se}else Mt&&Wr(cr(Mt,we)[0]),O[j++]=we}for(V=0;Vkt(q,nn))break;F=q,dt=yt[0]*lt[0]+yt[1]*lt[1],dt>st?(st=dt,U=q,J=!1):dt=i.length||!q)break;Xr(q),H=q}}Mt&&jr([Tt||Mt[0],Lt||Mt[1]]),k.push(O.slice(0,j))}var Le=A.slice(A.length-1);if(_&&Le!=="h"&&Le!=="v"){for(var Gt=!1,ne=-1,Ct=[],gt=0;gt{var c={tonextx:1,tonexty:1,tonext:1};Z.exports=function(g,I,S){var t,e,r,a,n,o={},i=!1,l=-1,f=0,x=-1;for(e=0;e=0?n=x:(n=x=f,f++),n{var c=qr(),g=Jo(),I=kn(),S=I.ensureSingle,t=I.identity,e=Vs(),r=Tc(),a=qi(),n=ja(),o=mm().tester;Z.exports=function(x,y,v,T,u,b){var _,P,M=!u,C=!!u&&u.duration>0,A=n(x,y,v);if(_=T.selectAll("g.trace").data(A,function(p){return p[0].trace.uid}),_.enter().append("g").attr("class",function(p){return"trace scatter trace"+p[0].trace.uid}).style("stroke-miterlimit",2),_.order(),i(x,_,y),C){b&&(P=b());var h=c.transition().duration(u.duration).ease(u.easing).each("end",function(){P&&P()}).each("interrupt",function(){P&&P()});h.each(function(){T.selectAll("g.trace").each(function(p,k){l(x,k,y,p,A,this,u)})})}else _.each(function(p,k){l(x,k,y,p,A,this,u)});M&&_.exit().remove(),T.selectAll("path:not([d])").remove()};function i(x,y,v){y.each(function(T){var u=S(c.select(this),"g","fills");e.setClipUrl(u,v.layerClipId,x);var b=T[0].trace,_=[];b._ownfill&&_.push("_ownFill"),b._nexttrace&&_.push("_nextFill");var P=u.selectAll("g").data(_,t);P.enter().append("g"),P.exit().each(function(M){b[M]=null}).remove(),P.order().each(function(M){b[M]=S(c.select(this),"path","js-fill")})})}function l(x,y,v,T,u,b,_){var P=x._context.staticPlot,M;f(x,y,v,T,u);var C=!!_&&_.duration>0;function A(Wr){return C?Wr.transition():Wr}var h=v.xaxis,p=v.yaxis,k=T[0].trace,w=k.line,R=c.select(b),O=S(R,"g","errorbars"),j=S(R,"g","lines"),V=S(R,"g","points"),H=S(R,"g","text");if(g.getComponentMethod("errorbars","plot")(x,O,v,_),k.visible!==!0)return;A(R).style("opacity",k.opacity);var F,U,W=k.fill.charAt(k.fill.length-1);W!=="x"&&W!=="y"&&(W="");var q,J;W==="y"?(q=1,J=p.c2p(0,!0)):W==="x"&&(q=0,J=h.c2p(0,!0)),T[0][v.isRangePlot?"nodeRangePlot3":"node3"]=R;var lt="",yt=[],mt=k._prevtrace,st=null,tt=null;mt&&(lt=mt._prevRevpath||"",U=mt._nextFill,yt=mt._ownPolygons,st=mt._fillsegments,tt=mt._fillElement);var dt,rt,at="",vt="",it,Y,ft,ut,kt,It,Pt=[];k._polygons=[];var qt=[],Wt=[],Jt=I.noop;if(F=k._ownFill,r.hasLines(k)||k.fill!=="none"){U&&U.datum(T),["hv","vh","hvh","vhv"].indexOf(w.shape)!==-1?(it=e.steps(w.shape),Y=e.steps(w.shape.split("").reverse().join(""))):w.shape==="spline"?it=Y=function(Wr){var br=Wr[Wr.length-1];return Wr.length>1&&Wr[0][0]===br[0]&&Wr[0][1]===br[1]?e.smoothclosed(Wr.slice(1),w.smoothing):e.smoothopen(Wr,w.smoothing)}:it=Y=function(Wr){return"M"+Wr.join("L")},ft=function(Wr){return Y(Wr.reverse())},Wt=a(T,{xaxis:h,yaxis:p,trace:k,connectGaps:k.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:k.fill}),qt=new Array(Wt.length);var ge=0;for(M=0;M=P[0]&&R.x<=P[1]&&R.y>=M[0]&&R.y<=M[1]}),p=Math.ceil(h.length/A),k=0;u.forEach(function(R,O){var j=R[0].trace;r.hasMarkers(j)&&j.marker.maxdisplayed>0&&O{Z.exports={container:"marker",min:"cmin",max:"cmax"}}),Ws=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e={_fullLayout:S},r=c.getFromTrace(e,I,"x"),a=c.getFromTrace(e,I,"y"),n=g.orig_x;n===void 0&&(n=g.x);var o=g.orig_y;return o===void 0&&(o=g.y),t.xLabel=c.tickText(r,r.c2l(n),!0).text,t.yLabel=c.tickText(a,a.c2l(o),!0).text,t}}),_l=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=Jo();function S(a){var n=c.select(a).selectAll("g.trace.scatter");n.style("opacity",function(o){return o[0].trace.opacity}),n.selectAll("g.points").each(function(o){var i=c.select(this),l=o.trace||o[0].trace;t(i,l,a)}),n.selectAll("g.text").each(function(o){var i=c.select(this),l=o.trace||o[0].trace;e(i,l,a)}),n.selectAll("g.trace path.js-line").call(g.lineGroupStyle),n.selectAll("g.trace path.js-fill").call(g.fillGroupStyle,a,!1),I.getComponentMethod("errorbars","style")(n)}function t(a,n,o){g.pointStyle(a.selectAll("path.point"),n,o)}function e(a,n,o){g.textPointStyle(a.selectAll("text"),n,o)}function r(a,n,o){var i=n[0].trace;i.selectedpoints?(g.selectedPointStyle(o.selectAll("path.point"),i),g.selectedTextStyle(o.selectAll("text"),i)):(t(o,i,a),e(o,i,a))}Z.exports={style:S,stylePoints:t,styleText:e,styleOnSelect:r}}),Fu=Dt((Q,Z)=>{var c=hi(),g=Tc();Z.exports=function(I,S){var t,e;if(I.mode==="lines")return t=I.line.color,t&&c.opacity(t)?t:I.fillcolor;if(I.mode==="none")return I.fill?I.fillcolor:"";var r=S.mcc||(I.marker||{}).color,a=S.mlcc||((I.marker||{}).line||{}).color;return e=r&&c.opacity(r)?r:a&&c.opacity(a)&&(S.mlw||((I.marker||{}).line||{}).width)?a:"",e?c.opacity(e)<.3?c.addOpacity(e,.3):e:(t=(I.line||{}).color,t&&c.opacity(t)&&g.hasLines(I)&&I.line.width?t:I.fillcolor)}}),Md=Dt((Q,Z)=>{var c=kn(),g=tf(),I=Jo(),S=Fu(),t=hi(),e=c.fillText;Z.exports=function(r,a,n,o){var i=r.cd,l=i[0].trace,f=r.xa,x=r.ya,y=f.c2p(a),v=x.c2p(n),T=[y,v],u=l.hoveron||"",b=l.mode.indexOf("markers")!==-1?3:.5,_=!!l.xperiodalignment,P=!!l.yperiodalignment;if(u.indexOf("points")!==-1){var M=function(lt){if(_){var yt=f.c2p(lt.xStart),mt=f.c2p(lt.xEnd);return y>=Math.min(yt,mt)&&y<=Math.max(yt,mt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,dt=Math.abs(f.c2p(lt.x)-y);return dt=Math.min(yt,mt)&&v<=Math.max(yt,mt)?0:1/0}var st=Math.max(3,lt.mrc||0),tt=1-1/st,dt=Math.abs(x.c2p(lt.y)-v);return dtat!=Pt>=at&&(ut=Y[it-1][0],kt=Y[it][0],Pt-It&&(ft=ut+(kt-ut)*(at-It)/(Pt-It),st=Math.min(st,ft),tt=Math.max(tt,ft)));return st=Math.max(st,0),tt=Math.min(tt,f._length),{x0:st,x1:tt,y0:at,y1:at}}if(u.indexOf("fills")!==-1&&l._fillElement){var W=F(l._fillElement)&&!F(l._fillExclusionElement);if(W){var q=U(l._polygons);q===null&&(q={x0:T[0],x1:T[0],y0:T[1],y1:T[1]});var J=t.defaultLine;return t.opacity(l.fillcolor)?J=l.fillcolor:t.opacity((l.line||{}).color)&&(J=l.line.color),c.extendFlat(r,{distance:r.maxHoverDistance,x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1,color:J,hovertemplate:!1}),delete r.index,l.text&&!c.isArrayOrTypedArray(l.text)?r.text=String(l.text):r.text=l.name,[r]}}}}),Rf=Dt((Q,Z)=>{var c=Tc();Z.exports=function(g,I){var S=g.cd,t=g.xaxis,e=g.yaxis,r=[],a=S[0].trace,n,o,i,l,f=!c.hasMarkers(a)&&!c.hasText(a);if(f)return[];if(I===!1)for(n=0;n{Z.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}),kp=Dt((Q,Z)=>{var c=Jo().traceIs,g=dv();Z.exports=function(r,a,n,o){n("autotypenumbers",o.autotypenumbersDflt);var i=n("type",(o.splomStash||{}).type);i==="-"&&(I(a,o.data),a.type==="-"?a.type="linear":r.type=a.type)};function I(r,a){if(r.type==="-"){var n=r._id,o=n.charAt(0),i;n.indexOf("scene")!==-1&&(n=o);var l=S(a,n,o);if(l){if(l.type==="histogram"&&o==={v:"y",h:"x"}[l.orientation||"v"]){r.type="linear";return}var f=o+"calendar",x=l[f],y={noMultiCategory:!c(l,"cartesian")||c(l,"noMultiCategory")};if(l.type==="box"&&l._hasPreCompStats&&o==={h:"x",v:"y"}[l.orientation||"v"]&&(y.noMultiCategory=!0),y.autotypenumbers=r.autotypenumbers,e(l,o)){var v=t(l),T=[];for(i=0;i0&&(i["_"+n+"axes"]||{})[a]||(i[n+"axis"]||n)===a&&(e(i,n)||(i[n]||[]).length||i[n+"0"]))return i}}function t(r){return{v:"x",h:"y"}[r.orientation||"v"]}function e(r,a){var n=t(r),o=c(r,"box-violin"),i=c(r._fullInput||{},"candlestick");return o&&!i&&a===n&&r[n]===void 0&&r[n+"0"]===void 0}}),Wm=Dt((Q,Z)=>{var c=Ma().isTypedArraySpec;function g(I,S){var t=S.dataAttr||I._id.charAt(0),e={},r,a,n;if(S.axData)r=S.axData;else for(r=[],a=0;a0||c(r),n;a&&(n="array");var o=t("categoryorder",n),i;o==="array"&&(i=t("categoryarray")),!a&&o==="array"&&(o=S.categoryorder="trace"),o==="trace"?S._initialCategories=[]:o==="array"?S._initialCategories=i.slice():(i=g(S,e).sort(),o==="category ascending"?S._initialCategories=i:o==="category descending"&&(S._initialCategories=i.reverse()))}}}),Qy=Dt((Q,Z)=>{var c=ro().mix,g=wi(),I=kn();Z.exports=function(S,t,e,r){r=r||{};var a=r.dfltColor;function n(p,k){return I.coerce2(S,t,r.attributes,p,k)}var o=n("linecolor",a),i=n("linewidth"),l=e("showline",r.showLine||!!o||!!i);l||(delete t.linecolor,delete t.linewidth);var f=c(a,r.bgColor,r.blend||g.lightFraction).toRgbString(),x=n("gridcolor",f),y=n("gridwidth"),v=n("griddash"),T=e("showgrid",r.showGrid||!!x||!!y||!!v);if(T||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),r.hasMinor){var u=c(t.gridcolor,r.bgColor,67).toRgbString(),b=n("minor.gridcolor",u),_=n("minor.gridwidth",t.gridwidth||1),P=n("minor.griddash",t.griddash||"solid"),M=e("minor.showgrid",!!b||!!_||!!P);M||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!r.noZeroLine){n("zerolinelayer");var C=n("zerolinecolor",a),A=n("zerolinewidth"),h=e("zeroline",r.showGrid||!!C||!!A);h||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}),tx=Dt((Q,Z)=>{var c=Yi(),g=Jo(),I=kn(),S=mu(),t=Ad(),e=Td(),r=yg(),a=xg(),n=n0(),o=dm(),i=Wm(),l=Qy(),f=I_(),x=i0(),y=ic().WEEKDAY_PATTERN,v=ic().HOUR_PATTERN;Z.exports=function(_,P,M,C,A){var h=C.letter,p=C.font||{},k=C.splomStash||{},w=M("visible",!C.visibleDflt),R=P._template||{},O=P.type||R.type||"-",j;if(O==="date"){var V=g.getComponentMethod("calendars","handleDefaults");V(_,P,"calendar",C.calendar),C.noTicklabelmode||(j=M("ticklabelmode"))}!C.noTicklabelindex&&(O==="date"||O==="linear")&&M("ticklabelindex");var H="";(!C.noTicklabelposition||O==="multicategory")&&(H=I.coerce(_,P,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:j==="period"?["outside","inside"]:h==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),C.noTicklabeloverflow||M("ticklabeloverflow",H.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),x(P,A),f(_,P,M,C),i(_,P,M,C),C.noHover||(O!=="category"&&M("hoverformat"),C.noUnifiedhovertitle||M("unifiedhovertitle.text"));var F=M("color"),U=F!==e.color.dflt?F:p.color,W=k.label||A._dfltTitle[h];if(o(_,P,M,O,C),!w)return P;M("title.text",W),I.coerceFont(M,"title.font",p,{overrideDflt:{size:I.bigFont(p.size),color:U}}),r(_,P,M,O);var q=C.hasMinor;if(q&&(S.newContainer(P,"minor"),r(_,P,M,O,{isMinor:!0})),n(_,P,M,O,C),a(_,P,M,C),q){var J=C.isMinor;C.isMinor=!0,a(_,P,M,C),C.isMinor=J}l(_,P,M,{dfltColor:F,bgColor:C.bgColor,showGrid:C.showGrid,hasMinor:q,attributes:e}),q&&!P.minor.ticks&&!P.minor.showgrid&&delete P.minor,(P.showline||P.ticks)&&M("mirror");var lt=O==="multicategory";if(!C.noTickson&&(O==="category"||lt)&&(P.ticks||P.showgrid)&&(lt?(M("tickson","boundaries"),delete P.ticklabelposition):M("tickson")),lt){var yt=M("showdividers");yt&&(M("dividercolor"),M("dividerwidth"))}if(O==="date")if(t(_,P,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!P.rangebreaks.length)delete P.rangebreaks;else{for(var mt=0;mt=2){var p="",k,w;if(h.length===2){for(k=0;k<2;k++)if(w=b(h[k]),w){p=y;break}}var R=C("pattern",p);if(R===y)for(k=0;k<2;k++)w=b(h[k]),w&&(P.bounds[k]=h[k]=w-1);if(R)for(k=0;k<2;k++)switch(w=h[k],R){case y:if(!c(w)){P.enabled=!1;return}if(w=+w,w!==Math.floor(w)||w<0||w>=7){P.enabled=!1;return}P.bounds[k]=h[k]=w;break;case v:if(!c(w)){P.enabled=!1;return}if(w=+w,w<0||w>24){P.enabled=!1;return}P.bounds[k]=h[k]=w;break}if(M.autorange===!1){var O=M.range;if(O[0]O[1]){P.enabled=!1;return}}else if(h[0]>O[0]&&h[1]{var c=Yi(),g=kn();Z.exports=function(I,S,t,e){var r=e.counterAxes||[],a=e.overlayableAxes||[],n=e.letter,o=e.grid,i=e.overlayingDomain,l,f,x,y,v,T;o&&(f=o._domains[n][o._axisMap[S._id]],l=o._anchors[S._id],f&&(x=o[n+"side"].split(" ")[0],y=o.domain[n][x==="right"||x==="top"?1:0])),f=f||[0,1],l=l||(c(I.position)?"free":r[0]||"free"),x=x||(n==="x"?"bottom":"left"),y=y||0,v=0,T=!1;var u=g.coerce(I,S,{anchor:{valType:"enumerated",values:["free"].concat(r),dflt:l}},"anchor"),b=g.coerce(I,S,{side:{valType:"enumerated",values:n==="x"?["bottom","top"]:["left","right"],dflt:x}},"side");if(u==="free"){if(n==="y"){var _=t("autoshift");_&&(y=b==="left"?i[0]:i[1],T=S.automargin?S.automargin:!0,v=b==="left"?-3:3),t("shift",v)}t("position",y)}t("automargin",T);var P=!1;if(a.length&&(P=g.coerce(I,S,{overlaying:{valType:"enumerated",values:[!1].concat(a),dflt:!1}},"overlaying")),!P){var M=t("domain",f);M[0]>M[1]-1/4096&&(S.domain=f),g.noneOrAll(I.domain,S.domain,f),S.tickmode==="sync"&&(S.tickmode="auto")}return t("layer"),S}}),Bw=Dt((Q,Z)=>{var c=kn(),g=hi(),I=Fp().isUnifiedHover,S=pv(),t=mu(),e=b1(),r=Td(),a=kp(),n=tx(),o=vv(),i=K_(),l=Rc(),f=l.id2name,x=l.name2id,y=ic().AX_ID_PATTERN,v=Jo(),T=v.traceIs,u=v.getComponentMethod;function b(_,P,M){Array.isArray(_[P])?_[P].push(M):_[P]=[M]}Z.exports=function(_,P,M){var C=P.autotypenumbers,A={},h={},p={},k={},w={},R={},O={},j={},V={},H={},F,U;for(F=0;F{var c=qr(),g=Jo(),I=kn(),S=Vs(),t=Ls();Z.exports=function(e,r,a,n){var o=e._fullLayout;if(r.length===0){t.redrawComponents(e);return}function i(P){var M=P.xaxis,C=P.yaxis;o._defs.select("#"+P.clipId+"> rect").call(S.setTranslate,0,0).call(S.setScale,1,1),P.plot.call(S.setTranslate,M._offset,C._offset).call(S.setScale,1,1);var A=P.plot.selectAll(".scatterlayer .trace");A.selectAll(".point").call(S.setPointGroupScale,1,1),A.selectAll(".textpoint").call(S.setTextPointsScale,1,1),A.call(S.hideOutsideRangePoints,P)}function l(P,M){var C=P.plotinfo,A=C.xaxis,h=C.yaxis,p=A._length,k=h._length,w=!!P.xr1,R=!!P.yr1,O=[];if(w){var j=I.simpleMap(P.xr0,A.r2l),V=I.simpleMap(P.xr1,A.r2l),H=j[1]-j[0],F=V[1]-V[0];O[0]=(j[0]*(1-M)+M*V[0]-j[0])/(j[1]-j[0])*p,O[2]=p*(1-M+M*F/H),A.range[0]=A.l2r(j[0]*(1-M)+M*V[0]),A.range[1]=A.l2r(j[1]*(1-M)+M*V[1])}else O[0]=0,O[2]=p;if(R){var U=I.simpleMap(P.yr0,h.r2l),W=I.simpleMap(P.yr1,h.r2l),q=U[1]-U[0],J=W[1]-W[0];O[1]=(U[1]*(1-M)+M*W[1]-U[1])/(U[0]-U[1])*k,O[3]=k*(1-M+M*J/q),h.range[0]=A.l2r(U[0]*(1-M)+M*W[0]),h.range[1]=h.l2r(U[1]*(1-M)+M*W[1])}else O[1]=0,O[3]=k;t.drawOne(e,A,{skipTitle:!0}),t.drawOne(e,h,{skipTitle:!0}),t.redrawComponents(e,[A._id,h._id]);var lt=w?p/O[2]:1,yt=R?k/O[3]:1,mt=w?O[0]:0,st=R?O[1]:0,tt=w?O[0]/O[2]*p:0,dt=R?O[1]/O[3]*k:0,rt=A._offset-tt,at=h._offset-dt;C.clipRect.call(S.setTranslate,mt,st).call(S.setScale,1/lt,1/yt),C.plot.call(S.setTranslate,rt,at).call(S.setScale,lt,yt),S.setPointGroupScale(C.zoomScalePts,1/lt,1/yt),S.setTextPointsScale(C.zoomScaleTxt,1/lt,1/yt)}var f;n&&(f=n());function x(){for(var P={},M=0;Ma.duration?(x(),u=window.cancelAnimationFrame(_)):u=window.requestAnimationFrame(_)}return v=Date.now(),u=window.requestAnimationFrame(_),Promise.resolve()}}),Mf=Dt(Q=>{var Z=qr(),c=Jo(),g=kn(),I=Kc(),S=Vs(),t=ud().getModuleCalcData,e=Rc(),r=ic(),a=Dp(),n=g.ensureSingle;function o(T,u,b){return g.ensureSingle(T,u,b,function(_){_.datum(b)})}var i=r.zindexSeparator;Q.name="cartesian",Q.attr=["xaxis","yaxis"],Q.idRoot=["x","y"],Q.idRegex=r.idRegex,Q.attrRegex=r.attrRegex,Q.attributes=_0(),Q.layoutAttributes=Td(),Q.supplyLayoutDefaults=Bw(),Q.transitionAxes=E6(),Q.finalizeSubplots=function(T,u){var b=u._subplots,_=b.xaxis,P=b.yaxis,M=b.cartesian,C=M,A={},h={},p,k,w;for(p=0;p0){var O=R.id;if(O.indexOf(i)!==-1)continue;O+=i+(p+1),R=g.extendFlat({},R,{id:O,plot:P._cartesianlayer.selectAll(".subplot").select("."+O)})}for(var j=[],V,H=0;H1&&(J+=i+q),W.push(A+J),C=0;C1,w=u.mainplotinfo;if(!u.mainplot||k)if(p)u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.xaxislayer=n(_,"g","xaxislayer-above"),u.yaxislayer=n(_,"g","yaxislayer-above");else{if(!C){var R=n(_,"g","layer-subplot");u.shapelayer=n(R,"g","shapelayer"),u.imagelayer=n(R,"g","imagelayer"),w&&k?(u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer):(u.minorGridlayer=n(_,"g","minor-gridlayer"),u.gridlayer=n(_,"g","gridlayer"),u.zerolinelayer=n(_,"g","zerolinelayer"));var O=n(_,"g","layer-between");u.shapelayerBetween=n(O,"g","shapelayer"),u.imagelayerBetween=n(O,"g","imagelayer"),n(_,"path","xlines-below"),n(_,"path","ylines-below"),u.overlinesBelow=n(_,"g","overlines-below"),n(_,"g","xaxislayer-below"),n(_,"g","yaxislayer-below"),u.overaxesBelow=n(_,"g","overaxes-below")}u.overplot=n(_,"g","overplot"),u.plot=n(u.overplot,"g",P),w&&k?u.zerolinelayerAbove=w.zerolinelayerAbove:u.zerolinelayerAbove=n(_,"g","zerolinelayer-above"),C||(u.xlines=n(_,"path","xlines-above"),u.ylines=n(_,"path","ylines-above"),u.overlinesAbove=n(_,"g","overlines-above"),n(_,"g","xaxislayer-above"),n(_,"g","yaxislayer-above"),u.overaxesAbove=n(_,"g","overaxes-above"),u.xlines=_.select(".xlines-"+A),u.ylines=_.select(".ylines-"+h),u.xaxislayer=_.select(".xaxislayer-"+A),u.yaxislayer=_.select(".yaxislayer-"+h))}else{var j=w.plotgroup,V=P+"-x",H=P+"-y";u.minorGridlayer=w.minorGridlayer,u.gridlayer=w.gridlayer,u.zerolinelayer=w.zerolinelayer,u.zerolinelayerAbove=w.zerolinelayerAbove,n(w.overlinesBelow,"path",V),n(w.overlinesBelow,"path",H),n(w.overaxesBelow,"g",V),n(w.overaxesBelow,"g",H),u.plot=n(w.overplot,"g",P),n(w.overlinesAbove,"path",V),n(w.overlinesAbove,"path",H),n(w.overaxesAbove,"g",V),n(w.overaxesAbove,"g",H),u.xlines=j.select(".overlines-"+A).select("."+V),u.ylines=j.select(".overlines-"+h).select("."+H),u.xaxislayer=j.select(".overaxes-"+A).select("."+V),u.yaxislayer=j.select(".overaxes-"+h).select("."+H)}C||(p||(o(u.minorGridlayer,"g",u.xaxis._id),o(u.minorGridlayer,"g",u.yaxis._id),u.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),o(u.gridlayer,"g",u.xaxis._id),o(u.gridlayer,"g",u.yaxis._id),u.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),u.xlines.style("fill","none").classed("crisp",!0),u.ylines.style("fill","none").classed("crisp",!0))}function y(T,u){if(T){var b={};T.each(function(h){var p=h[0],k=Z.select(this);k.remove(),v(p,u),b[p]=!0});for(var _ in u._plots)for(var P=u._plots[_],M=P.overlays||[],C=0;C{var c=Tc();Z.exports={hasLines:c.hasLines,hasMarkers:c.hasMarkers,hasText:c.hasText,isBubble:c.isBubble,attributes:ef(),layoutAttributes:vg(),supplyDefaults:Dw(),crossTraceDefaults:Fw(),supplyLayoutDefaults:Rw(),calc:me().calc,crossTraceCalc:An(),arraysToCalcdata:ct(),plot:Ka(),colorbar:xo(),formatLabels:Ws(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:Md(),selectPoints:Rf(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Mf(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}),ex=Dt((Q,Z)=>{var c=qr(),g=hi(),I=$_(),S=kn(),t=S.strScale,e=S.strRotate,r=S.strTranslate;Z.exports=function(a,n,o){var i=a.node(),l=I[o.arrowhead||0],f=I[o.startarrowhead||0],x=(o.arrowwidth||1)*(o.arrowsize||1),y=(o.arrowwidth||1)*(o.startarrowsize||1),v=n.indexOf("start")>=0,T=n.indexOf("end")>=0,u=l.backoff*x+o.standoff,b=f.backoff*y+o.startstandoff,_,P,M,C;if(i.nodeName==="line"){_={x:+a.attr("x1"),y:+a.attr("y1")},P={x:+a.attr("x2"),y:+a.attr("y2")};var A=_.x-P.x,h=_.y-P.y;if(M=Math.atan2(h,A),C=M+Math.PI,u&&b&&u+b>Math.sqrt(A*A+h*h)){q();return}if(u){if(u*u>A*A+h*h){q();return}var p=u*Math.cos(M),k=u*Math.sin(M);P.x+=p,P.y+=k,a.attr({x2:P.x,y2:P.y})}if(b){if(b*b>A*A+h*h){q();return}var w=b*Math.cos(M),R=b*Math.sin(M);_.x-=w,_.y-=R,a.attr({x1:_.x,y1:_.y})}}else if(i.nodeName==="path"){var O=i.getTotalLength(),j="";if(O{var c=qr(),g=Jo(),I=Kc(),S=kn(),t=S.strTranslate,e=Ls(),r=hi(),a=Vs(),n=tf(),o=ec(),i=P0(),l=up(),f=mu().arrayEditor,x=ex();Z.exports={draw:y,drawOne:v,drawRaw:u};function y(b){var _=b._fullLayout;_._infolayer.selectAll(".annotation").remove();for(var P=0;P<_.annotations.length;P++)_.annotations[P].visible&&v(b,P);return I.previousPromises(b)}function v(b,_){var P=b._fullLayout,M=P.annotations[_]||{},C=e.getFromId(b,M.xref),A=e.getFromId(b,M.yref);C&&C.setScale(),A&&A.setScale(),u(b,M,_,!1,C,A)}function T(b,_,P,M,C){var A=C[P],h=C[P+"ref"],p=P.indexOf("y")!==-1,k=e.getRefType(h)==="domain",w=p?M.h:M.w;return b?k?A+(p?-_:_)/b._length:b.p2r(b.r2p(A)+_):A+(p?-_:_)/w}function u(b,_,P,M,C,A){var h=b._fullLayout,p=b._fullLayout._size,k=b._context.edits,w,R;M?(w="annotation-"+M,R=M+".annotations"):(w="annotation",R="annotations");var O=f(b.layout,R,_),j=O.modifyBase,V=O.modifyItem,H=O.getUpdateObj;h._infolayer.selectAll("."+w+'[data-index="'+P+'"]').remove();var F="clip"+h._uid+"_ann"+P;if(!_._input||_.visible===!1){c.selectAll("#"+F).remove();return}var U={x:{},y:{}},W=+_.textangle||0,q=h._infolayer.append("g").classed(w,!0).attr("data-index",String(P)).style("opacity",_.opacity),J=q.append("g").classed("annotation-text-g",!0),lt=k[_.showarrow?"annotationTail":"annotationPosition"],yt=_.captureevents||k.annotationText||lt;function mt(Pt){var qt={index:P,annotation:_._input,fullAnnotation:_,event:Pt};return M&&(qt.subplotId=M),qt}var st=J.append("g").style("pointer-events",yt?"all":null).call(i,"pointer").on("click",function(){b._dragging=!1,b.emit("plotly_clickannotation",mt(c.event))});_.hovertext&&st.on("mouseover",function(){var Pt=_.hoverlabel,qt=Pt.font,Wt=this.getBoundingClientRect(),Jt=b.getBoundingClientRect();n.loneHover({x0:Wt.left-Jt.left,x1:Wt.right-Jt.left,y:(Wt.top+Wt.bottom)/2-Jt.top,text:_.hovertext,color:Pt.bgcolor,borderColor:Pt.bordercolor,fontFamily:qt.family,fontSize:qt.size,fontColor:qt.color,fontWeight:qt.weight,fontStyle:qt.style,fontVariant:qt.variant,fontShadow:qt.fontShadow,fontLineposition:qt.fontLineposition,fontTextcase:qt.fontTextcase},{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:b})}).on("mouseout",function(){n.loneUnhover(h._hoverlayer.node())});var tt=_.borderwidth,dt=_.borderpad,rt=tt+dt,at=st.append("rect").attr("class","bg").style("stroke-width",tt+"px").call(r.stroke,_.bordercolor).call(r.fill,_.bgcolor),vt=_.width||_.height,it=h._topclips.selectAll("#"+F).data(vt?[0]:[]);it.enter().append("clipPath").classed("annclip",!0).attr("id",F).append("rect"),it.exit().remove();var Y=_.font,ft=h._meta?S.templateString(_.text,h._meta):_.text,ut=st.append("text").classed("annotation-text",!0).text(ft);function kt(Pt){return Pt.call(a.font,Y).attr({"text-anchor":{left:"start",right:"end"}[_.align]||"middle"}),o.convertToTspans(Pt,b,It),Pt}function It(){var Pt=ut.selectAll("a");if(Pt.size()===1&&Pt.text()===ut.text()){var qt=st.insert("a",":first-child").attr({"xlink:xlink:href":Pt.attr("xlink:href"),"xlink:xlink:show":Pt.attr("xlink:show")}).style({cursor:"pointer"});qt.node().appendChild(at.node())}var Wt=st.select(".annotation-text-math-group"),Jt=!Wt.empty(),ge=a.bBox((Jt?Wt:ut).node()),fe=ge.width,pe=ge.height,se=_.width||fe,Tt=_.height||pe,Lt=Math.round(se+2*rt),Mt=Math.round(Tt+2*rt);function ee(oi,$n){return $n==="auto"&&(oi<1/3?$n="left":oi>2/3?$n="right":$n="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[$n]}for(var ve=!1,oe=["x","y"],Te=0;Te1)&&(cr===Ge?(le=ur.r2fraction(_["a"+He]),(le<0||le>1)&&(ve=!0)):ve=!0),ne=ur._offset+ur.r2p(_[He]),St=.5}else{var we=re==="domain";He==="x"?(gt=_[He],ne=we?ur._offset+ur._length*gt:ne=p.l+p.w*gt):(gt=1-_[He],ne=we?ur._offset+ur._length*gt:ne=p.t+p.h*gt),St=_.showarrow?.5:gt}if(_.showarrow){Gt.head=ne;var Ue=_["a"+He];if(Nt=Wr*ee(.5,_.xanchor)-br*ee(.5,_.yanchor),cr===Ge){var qe=e.getRefType(cr);qe==="domain"?(He==="y"&&(Ue=1-Ue),Gt.tail=ur._offset+ur._length*Ue):qe==="paper"?He==="y"?(Ue=1-Ue,Gt.tail=p.t+p.h*Ue):Gt.tail=p.l+p.w*Ue:Gt.tail=ur._offset+ur.r2p(Ue),Ct=Nt}else Gt.tail=ne+Ue,Ct=Nt+Ue;Gt.text=Gt.tail+Nt;var or=h[He==="x"?"width":"height"];if(Ge==="paper"&&(Gt.head=S.constrain(Gt.head,1,or-1)),cr==="pixel"){var Sr=-Math.max(Gt.tail-3,Gt.text),Ar=Math.min(Gt.tail+3,Gt.text)-or;Sr>0?(Gt.tail+=Sr,Gt.text+=Sr):Ar>0&&(Gt.tail-=Ar,Gt.text-=Ar)}Gt.tail+=Le,Gt.head+=Le}else Nt=Xr*ee(St,nn),Ct=Nt,Gt.text=ne+Nt;Gt.text+=Le,Nt+=Le,Ct+=Le,_["_"+He+"padplus"]=Xr/2+Ct,_["_"+He+"padminus"]=Xr/2-Ct,_["_"+He+"size"]=Xr,_["_"+He+"shift"]=Nt}if(ve){st.remove();return}var mr=0,Qr=0;if(_.align!=="left"&&(mr=(se-fe)*(_.align==="center"?.5:1)),_.valign!=="top"&&(Qr=(Tt-pe)*(_.valign==="middle"?.5:1)),Jt)Wt.select("svg").attr({x:rt+mr-1,y:rt+Qr}).call(a.setClipUrl,vt?F:null,b);else{var Hn=rt+Qr-ge.top,Wn=rt+mr-ge.left;ut.call(o.positionText,Wn,Hn).call(a.setClipUrl,vt?F:null,b)}it.select("rect").call(a.setRect,rt,rt,se,Tt),at.call(a.setRect,tt/2,tt/2,Lt-tt,Mt-tt),st.call(a.setTranslate,Math.round(U.x.text-Lt/2),Math.round(U.y.text-Mt/2)),J.attr({transform:"rotate("+W+","+U.x.text+","+U.y.text+")"});var Xn=function(oi,$n){q.selectAll(".annotation-arrow-g").remove();var sa=U.x.head,Zi=U.y.head,We=U.x.tail+oi,nr=U.y.tail+$n,fr=U.x.text+oi,_r=U.y.text+$n,tn=S.rotationXYMatrix(W,fr,_r),Cn=S.apply2DTransform(tn),Tn=S.apply2DTransform2(tn),Mn=+at.attr("width"),fi=+at.attr("height"),ki=fr-.5*Mn,Oi=ki+Mn,ji=_r-.5*fi,Xi=ji+fi,ci=[[ki,ji,ki,Xi],[ki,Xi,Oi,Xi],[Oi,Xi,Oi,ji],[Oi,ji,ki,ji]].map(Tn);if(!ci.reduce(function(Ce,dr){return Ce^!!S.segmentsIntersect(sa,Zi,sa+1e6,Zi+1e6,dr[0],dr[1],dr[2],dr[3])},!1)){ci.forEach(function(Ce){var dr=S.segmentsIntersect(We,nr,sa,Zi,Ce[0],Ce[1],Ce[2],Ce[3]);dr&&(We=dr.x,nr=dr.y)});var za=_.arrowwidth,Wa=_.arrowcolor,ze=_.arrowside,Ie=q.append("g").style({opacity:r.opacity(Wa)}).classed("annotation-arrow-g",!0),Rr=Ie.append("path").attr("d","M"+We+","+nr+"L"+sa+","+Zi).style("stroke-width",za+"px").call(r.stroke,r.rgb(Wa));if(x(Rr,ze,_),k.annotationPosition&&Rr.node().parentNode&&!M){var $r=sa,Gr=Zi;if(_.standoff){var Br=Math.sqrt(Math.pow(sa-We,2)+Math.pow(Zi-nr,2));$r+=_.standoff*(We-sa)/Br,Gr+=_.standoff*(nr-Zi)/Br}var Yr=Ie.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(We-$r)+","+(nr-Gr),transform:t($r,Gr)}).style("stroke-width",za+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),pn,on;l.init({element:Yr.node(),gd:b,prepFn:function(){var Ce=a.getTranslate(st);pn=Ce.x,on=Ce.y,C&&C.autorange&&j(C._name+".autorange",!0),A&&A.autorange&&j(A._name+".autorange",!0)},moveFn:function(Ce,dr){var Hr=Cn(pn,on),_n=Hr[0]+Ce,Fn=Hr[1]+dr;st.call(a.setTranslate,_n,Fn),V("x",T(C,Ce,"x",p,_)),V("y",T(A,dr,"y",p,_)),_.axref===_.xref&&V("ax",T(C,Ce,"ax",p,_)),_.ayref===_.yref&&V("ay",T(A,dr,"ay",p,_)),Ie.attr("transform",t(Ce,dr)),J.attr({transform:"rotate("+W+","+_n+","+Fn+")"})},doneFn:function(){g.call("_guiRelayout",b,H());var Ce=document.querySelector(".js-notes-box-panel");Ce&&Ce.redraw(Ce.selectedObj)}})}}};if(_.showarrow&&Xn(0,0),lt){var Ii;l.init({element:st.node(),gd:b,prepFn:function(){Ii=J.attr("transform")},moveFn:function(oi,$n){var sa="pointer";if(_.showarrow)_.axref===_.xref?V("ax",T(C,oi,"ax",p,_)):V("ax",_.ax+oi),_.ayref===_.yref?V("ay",T(A,$n,"ay",p.w,_)):V("ay",_.ay+$n),Xn(oi,$n);else{if(M)return;var Zi,We;if(C)Zi=T(C,oi,"x",p,_);else{var nr=_._xsize/p.w,fr=_.x+(_._xshift-_.xshift)/p.w-nr/2;Zi=l.align(fr+oi/p.w,nr,0,1,_.xanchor)}if(A)We=T(A,$n,"y",p,_);else{var _r=_._ysize/p.h,tn=_.y-(_._yshift+_.yshift)/p.h-_r/2;We=l.align(tn-$n/p.h,_r,0,1,_.yanchor)}V("x",Zi),V("y",We),(!C||!A)&&(sa=l.getCursor(C?.5:Zi,A?.5:We,_.xanchor,_.yanchor))}J.attr({transform:t(oi,$n)+Ii}),i(st,sa)},clickFn:function(oi,$n){_.captureevents&&b.emit("plotly_clickannotation",mt($n))},doneFn:function(){i(st),g.call("_guiRelayout",b,H());var oi=document.querySelector(".js-notes-box-panel");oi&&oi.redraw(oi.selectedObj)}})}}k.annotationText?ut.call(o.makeEditable,{delegate:st,gd:b}).call(kt).on("edit",function(Pt){_.text=Pt,this.call(kt),V("text",Pt),C&&C.autorange&&j(C._name+".autorange",!0),A&&A.autorange&&j(A._name+".autorange",!0),g.call("_guiRelayout",b,H())}):ut.call(kt)}}),C6=Dt((Q,Z)=>{var c=kn(),g=Jo(),I=mu().arrayEditor;Z.exports={hasClickToShow:S,onClick:t};function S(a,n){var o=e(a,n);return o.on.length>0||o.explicitOff.length>0}function t(a,n){var o=e(a,n),i=o.on,l=o.off.concat(o.explicitOff),f={},x=a._fullLayout.annotations,y,v;if(i.length||l.length){for(y=0;y{var c=kn(),g=hi();Z.exports=function(I,S,t,e){e("opacity");var r=e("bgcolor"),a=e("bordercolor"),n=g.opacity(a);e("borderpad");var o=e("borderwidth"),i=e("showarrow");e("text",i?" ":t._dfltTitle.annotation),e("textangle"),c.coerceFont(e,"font",t.font),e("width"),e("align");var l=e("height");if(l&&e("valign"),i){var f=e("arrowside"),x,y;f.indexOf("end")!==-1&&(x=e("arrowhead"),y=e("arrowsize")),f.indexOf("start")!==-1&&(e("startarrowhead",x),e("startarrowsize",y)),e("arrowcolor",n?S.bordercolor:g.defaultLine),e("arrowwidth",(n&&o||1)*2),e("standoff"),e("startstandoff")}var v=e("hovertext"),T=t.hoverlabel||{};if(v){var u=e("hoverlabel.bgcolor",T.bgcolor||(g.opacity(r)?g.rgb(r):g.defaultLine)),b=e("hoverlabel.bordercolor",T.bordercolor||g.contrast(u)),_=c.extendFlat({},T.font);_.color||(_.color=b),c.coerceFont(e,"hoverlabel.font",_)}e("captureevents",!!v)}}),J_=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=Nw(),t=gm();Z.exports=function(r,a){I(r,a,{name:"annotations",handleItemDefaults:e})};function e(r,a,n){function o(p,k){return c.coerce(r,a,t,p,k)}var i=o("visible"),l=o("clicktoshow");if(i||l){S(r,a,n,o);for(var f=a.showarrow,x=["x","y"],y=[-10,-30],v={_fullLayout:n},T=0;T<2;T++){var u=x[T],b=g.coerceRef(r,a,v,u,"","paper");if(b!=="paper"){var _=g.getFromId(v,b);_._annIndices.push(a._index)}if(g.coercePosition(a,v,o,b,u,.5),f){var P="a"+u,M=g.coerceRef(r,a,v,P,"pixel",["pixel","paper"]);M!=="pixel"&&M!==b&&(M=a[P]="pixel");var C=M==="pixel"?y[T]:.4;g.coercePosition(a,v,o,M,P,C)}o(u+"anchor"),o(u+"shift")}if(c.noneOrAll(r,a,["x","y"]),f&&c.noneOrAll(r,a,["ax","ay"]),l){var A=o("xclick"),h=o("yclick");a._xclick=A===void 0?a.x:g.cleanPosition(A,v,a.xref),a._yclick=h===void 0?a.y:g.cleanPosition(h,v,a.yref)}}}}),jw=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=X_().draw;Z.exports=function(e){var r=e._fullLayout,a=c.filterVisible(r.annotations);if(a.length&&e._fullData.length)return c.syncOrAsync([I,S],e)};function S(e){var r=e._fullLayout;c.filterVisible(r.annotations).forEach(function(a){var n=g.getFromId(e,a.xref),o=g.getFromId(e,a.yref),i=g.getRefType(a.xref),l=g.getRefType(a.yref);a._extremes={},i==="range"&&t(a,n),l==="range"&&t(a,o)})}function t(e,r){var a=r._id,n=a.charAt(0),o=e[n],i=e["a"+n],l=e[n+"ref"],f=e["a"+n+"ref"],x=e["_"+n+"padplus"],y=e["_"+n+"padminus"],v={x:1,y:-1}[n]*e[n+"shift"],T=3*e.arrowsize*e.arrowwidth||0,u=T+v,b=T-v,_=3*e.startarrowsize*e.arrowwidth||0,P=_+v,M=_-v,C;if(f===l){var A=g.findExtremes(r,[r.r2c(o)],{ppadplus:u,ppadminus:b}),h=g.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(x,P),ppadminus:Math.max(y,M)});C={min:[A.min[0],h.min[0]],max:[A.max[0],h.max[0]]}}else P=i?P+i:P,M=i?M-i:M,C=g.findExtremes(r,[r.r2c(o)],{ppadplus:Math.max(x,u,P),ppadminus:Math.max(y,b,M)});e._extremes[a]=C}}),L6=Dt((Q,Z)=>{var c=Yi(),g=Ts();Z.exports=function(I,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(!(r||a))return;var n=I._fullLayout.annotations,o=S._id.charAt(0),i,l;function f(y){var v=i[y],T=null;r?T=g(v,S.range):T=Math.pow(10,v),c(T)||(T=null),e(l+y,T)}for(var x=0;x{var c=X_(),g=C6();Z.exports={moduleType:"component",name:"annotations",layoutAttributes:gm(),supplyLayoutDefaults:J_(),includeBasePlot:Eg()("annotations"),calcAutorange:jw(),draw:c.draw,drawOne:c.drawOne,drawRaw:c.drawRaw,hasClickToShow:g.hasClickToShow,onClick:g.onClick,convertCoords:L6()}}),P6=Dt((Q,Z)=>{var c=gm(),g=Yc().overrideAll,I=mu().templatedArray;Z.exports=g(I("annotation",{visible:c.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:c.xanchor,xshift:c.xshift,yanchor:c.yanchor,yshift:c.yshift,text:c.text,textangle:c.textangle,font:c.font,width:c.width,height:c.height,opacity:c.opacity,align:c.align,valign:c.valign,bgcolor:c.bgcolor,bordercolor:c.bordercolor,borderpad:c.borderpad,borderwidth:c.borderwidth,showarrow:c.showarrow,arrowcolor:c.arrowcolor,arrowhead:c.arrowhead,startarrowhead:c.startarrowhead,arrowside:c.arrowside,arrowsize:c.arrowsize,startarrowsize:c.startarrowsize,arrowwidth:c.arrowwidth,standoff:c.standoff,startstandoff:c.startstandoff,hovertext:c.hovertext,hoverlabel:c.hoverlabel,captureevents:c.captureevents}),"calc","from-root")}),mF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=Nw(),t=P6();Z.exports=function(r,a,n){I(r,a,{name:"annotations",handleItemDefaults:e,fullLayout:n.fullLayout})};function e(r,a,n,o){function i(x,y){return c.coerce(r,a,t,x,y)}function l(x){var y=x+"axis",v={_fullLayout:{}};return v._fullLayout[y]=n[y],g.coercePosition(a,v,i,x,x,.5)}var f=i("visible");f&&(S(r,a,o.fullLayout,i),l("x"),l("y"),l("z"),c.noneOrAll(r,a,["x","y","z"]),a.xref="x",a.yref="y",a.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),a.showarrow&&(a.axref="pixel",a.ayref="pixel",i("ax",-10),i("ay",-30),c.noneOrAll(r,a,["ax","ay"])))}}),gF=Dt((Q,Z)=>{var c=kn(),g=Ls();Z.exports=function(S){for(var t=S.fullSceneLayout,e=t.annotations,r=0;r{function c(I,S){var t=[0,0,0,0],e,r;for(e=0;e<4;++e)for(r=0;r<4;++r)t[r]+=I[4*e+r]*S[e];return t}function g(I,S){var t=c(I.projection,c(I.view,c(I.model,[S[0],S[1],S[2],1])));return t}Z.exports=g}),vF=Dt((Q,Z)=>{var c=X_().drawRaw,g=FM(),I=["x","y","z"];Z.exports=function(S){for(var t=S.fullSceneLayout,e=S.dataScale,r=t.annotations,a=0;a1){o=!0;break}}o?S.fullLayout._infolayer.select(".annotation-"+S.id+'[data-index="'+a+'"]').remove():(n._pdata=g(S.glplot.cameraParams,[t.xaxis.r2l(n.x)*e[0],t.yaxis.r2l(n.y)*e[1],t.zaxis.r2l(n.z)*e[2]]),c(S.graphDiv,n,a,S.id,n._xa,n._ya))}}}),yF=Dt((Q,Z)=>{var c=Jo(),g=kn();Z.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:P6()}}},layoutAttributes:P6(),handleDefaults:mF(),includeBasePlot:I,convert:gF(),draw:vF()};function I(S,t){var e=c.subplotsRegistry.gl3d;if(e)for(var r=e.attrRegex,a=Object.keys(S),n=0;n{var c=gm(),g=da(),I=ef().line,S=kd().dash,t=Ia().extendFlat,e=mu().templatedArray;Ky();var r=Ho(),{shapeTexttemplateAttrs:a,templatefallbackAttrs:n}=Zu(),o=_1();Z.exports=e("shape",{visible:t({},r.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:t({},r.legend,{editType:"calc+arraydraw"}),legendgroup:t({},r.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:t({},r.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:g({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:t({},r.legendrank,{editType:"calc+arraydraw"}),legendwidth:t({},r.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:t({},c.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:t({},c.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:t({},I.color,{editType:"arraydraw"}),width:t({},I.width,{editType:"calc+arraydraw"}),dash:t({},S,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:a({},{keys:Object.keys(o)}),texttemplatefallback:n({editType:"arraydraw"}),font:g({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})}),xF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=RM(),t=wp();Z.exports=function(a,n){I(a,n,{name:"shapes",handleItemDefaults:r})};function e(a,n){return a?"bottom":n.indexOf("top")!==-1?"top":n.indexOf("bottom")!==-1?"bottom":"middle"}function r(a,n,o){function i(tt,dt){return c.coerce(a,n,S,tt,dt)}n._isShape=!0;var l=i("visible");if(l){var f=i("showlegend");f&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),c.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var x=i("path"),y=x?"path":"rect",v=i("type",y),T=v!=="path";T&&delete n.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var u=i("line.width");u&&(i("line.color"),i("line.dash"));for(var b=i("xsizemode"),_=i("ysizemode"),P=["x","y"],M=0;M<2;M++){var C=P[M],A=C+"anchor",h=C==="x"?b:_,p={_fullLayout:o},k,w,R,O=g.coerceRef(a,n,p,C,void 0,"paper"),j=g.getRefType(O);if(j==="range"?(k=g.getFromId(p,O),k._shapeIndices.push(n._index),R=t.rangeToShapePosition(k),w=t.shapePositionToRange(k),(k.type==="category"||k.type==="multicategory")&&(i(C+"0shift"),i(C+"1shift"))):w=R=c.identity,T){var V=.25,H=.75,F=C+"0",U=C+"1",W=a[F],q=a[U];a[F]=w(a[F],!0),a[U]=w(a[U],!0),h==="pixel"?(i(F,0),i(U,10)):(g.coercePosition(n,p,i,O,F,V),g.coercePosition(n,p,i,O,U,H)),n[F]=R(n[F]),n[U]=R(n[U]),a[F]=W,a[U]=q}if(h==="pixel"){var J=a[A];a[A]=w(a[A],!0),g.coercePosition(n,p,i,O,A,.25),n[A]=R(n[A]),a[A]=J}}T&&c.noneOrAll(a,n,["x0","x1","y0","y1"]);var lt=v==="line",yt,mt;if(T&&(yt=i("label.texttemplate"),i("label.texttemplatefallback")),yt||(mt=i("label.text")),mt||yt){i("label.textangle");var st=i("label.textposition",lt?"middle":"middle center");i("label.xanchor"),i("label.yanchor",e(lt,st)),i("label.padding"),c.coerceFont(i,"label.font",o.font)}}}}),_F=Dt((Q,Z)=>{var c=hi(),g=kn();function I(S,t){return S?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Z.exports=function(S,t,e){e("newshape.visible"),e("newshape.name"),e("newshape.showlegend"),e("newshape.legend"),e("newshape.legendwidth"),e("newshape.legendgroup"),e("newshape.legendgrouptitle.text"),g.coerceFont(e,"newshape.legendgrouptitle.font"),e("newshape.legendrank"),e("newshape.drawdirection"),e("newshape.layer"),e("newshape.fillcolor"),e("newshape.fillrule"),e("newshape.opacity");var r=e("newshape.line.width");if(r){var a=(S||{}).plot_bgcolor||"#FFF";e("newshape.line.color",c.contrast(a)),e("newshape.line.dash")}var n=S.dragmode==="drawline",o=e("newshape.label.text"),i=e("newshape.label.texttemplate");if(e("newshape.label.texttemplatefallback"),o||i){e("newshape.label.textangle");var l=e("newshape.label.textposition",n?"middle":"middle center");e("newshape.label.xanchor"),e("newshape.label.yanchor",I(n,l)),e("newshape.label.padding"),g.coerceFont(e,"newshape.label.font",t.font)}e("activeshape.fillcolor"),e("activeshape.opacity")}}),bF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Hy(),S=wp();Z.exports=function(n){var o=n._fullLayout,i=c.filterVisible(o.shapes);if(!(!i.length||!n._fullData.length))for(var l=0;l0?u+y:y;return{ppad:y,ppadplus:v?_:P,ppadminus:v?P:_}}else return{ppad:y}}function a(n,o,i){var l=n._id.charAt(0)==="x"?"x":"y",f=n.type==="category"||n.type==="multicategory",x,y,v=0,T=0,u=f?n.r2c:n.d2c,b=o[l+"sizemode"]==="scaled";if(b?(x=o[l+"0"],y=o[l+"1"],f&&(v=o[l+"0shift"],T=o[l+"1shift"])):(x=o[l+"anchor"],y=o[l+"anchor"]),x!==void 0)return[u(x)+v,u(y)+T];if(o.path){var _=1/0,P=-1/0,M=o.path.match(I.segmentRE),C,A,h,p,k;for(n.type==="date"&&(u=S.decodeDate(u)),C=0;CP&&(P=k)));if(P>=_)return[_,P]}}}),wF=Dt((Q,Z)=>{var c=U_();Z.exports={moduleType:"component",name:"shapes",layoutAttributes:RM(),supplyLayoutDefaults:xF(),supplyDrawNewShapeDefaults:_F(),includeBasePlot:Eg()("shapes"),calcAutorange:bF(),draw:c.draw,drawOne:c.drawOne}}),BM=Dt((Q,Z)=>{var c=ic(),g=mu().templatedArray;Ky(),Z.exports=g("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",c.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",c.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}),kF=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=Ad(),S=BM(),t="images";Z.exports=function(r,a){var n={name:t,handleItemDefaults:e};I(r,a,n)};function e(r,a,n){function o(b,_){return c.coerce(r,a,S,b,_)}var i=o("source"),l=o("visible",!!i);if(!l)return a;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var f={_fullLayout:n},x=["x","y"],y=0;y<2;y++){var v=x[y],T=g.coerceRef(r,a,f,v,"paper",void 0);if(T!=="paper"){var u=g.getFromId(f,T);u._imgIndices.push(a._index)}g.coercePosition(a,f,o,T,v,0)}return a}}),TF=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=Ls(),S=Rc(),t=Dp();Z.exports=function(e){var r=e._fullLayout,a=[],n={},o=[],i,l;for(l=0;l{var c=Yi(),g=Ts();Z.exports=function(I,S,t,e){S=S||{};var r=t==="log"&&S.type==="linear",a=t==="linear"&&S.type==="log";if(r||a){for(var n=I._fullLayout.images,o=S._id.charAt(0),i,l,f=0;f{Z.exports={moduleType:"component",name:"images",layoutAttributes:BM(),supplyLayoutDefaults:kF(),includeBasePlot:Eg()("images"),draw:TF(),convertCoords:AF()}}),I6=Dt((Q,Z)=>{Z.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}}),NM=Dt((Q,Z)=>{var c=da(),g=wi(),I=Ia().extendFlat,S=Yc().overrideAll,t=Ry(),e=mu().templatedArray,r=e("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});Z.exports=S(e("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:r,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:I(t({editType:"arraydraw"}),{}),font:c({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:g.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}),SF=Dt((Q,Z)=>{var c=kn(),g=Ad(),I=NM(),S=I6(),t=S.name,e=I.buttons;Z.exports=function(n,o){var i={name:t,handleItemDefaults:r};g(n,o,i)};function r(n,o,i){function l(y,v){return c.coerce(n,o,I,y,v)}var f=g(n,o,{name:"buttons",handleItemDefaults:a}),x=l("visible",f.length>0);x&&(l("active"),l("direction"),l("type"),l("showactive"),l("x"),l("y"),c.noneOrAll(n,o,["x","y"]),l("xanchor"),l("yanchor"),l("pad.t"),l("pad.r"),l("pad.b"),l("pad.l"),c.coerceFont(l,"font",i.font),l("bgcolor",i.paper_bgcolor),l("bordercolor"),l("borderwidth"))}function a(n,o){function i(f,x){return c.coerce(n,o,e,f,x)}var l=i("visible",n.method==="skip"||Array.isArray(n.args));l&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}),EF=Dt((Q,Z)=>{Z.exports=t;var c=qr(),g=hi(),I=Vs(),S=kn();function t(e,r,a){this.gd=e,this.container=r,this.id=a,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}t.barWidth=2,t.barLength=20,t.barRadius=2,t.barPad=1,t.barColor="#808BA4",t.prototype.enable=function(e,r,a){var n=this.gd._fullLayout,o=n.width,i=n.height;this.position=e;var l=this.position.l,f=this.position.w,x=this.position.t,y=this.position.h,v=this.position.direction,T=v==="down",u=v==="left",b=v==="right",_=v==="up",P=f,M=y,C,A,h,p;!T&&!u&&!b&&!_&&(this.position.direction="down",T=!0);var k=T||_;k?(C=l,A=C+P,T?(h=x,p=Math.min(h+M,i),M=p-h):(p=x+M,h=Math.max(p-M,0),M=p-h)):(h=x,p=h+M,u?(A=l+P,C=Math.max(A-P,0),P=A-C):(C=l,A=Math.min(C+P,o),P=A-C)),this._box={l:C,t:h,w:P,h:M};var w=f>P,R=t.barLength+2*t.barPad,O=t.barWidth+2*t.barPad,j=l,V=x+y;V+O>i&&(V=i-O);var H=this.container.selectAll("rect.scrollbar-horizontal").data(w?[0]:[]);H.exit().on(".drag",null).remove(),H.enter().append("rect").classed("scrollbar-horizontal",!0).call(g.fill,t.barColor),w?(this.hbar=H.attr({rx:t.barRadius,ry:t.barRadius,x:j,y:V,width:R,height:O}),this._hbarXMin=j+R/2,this._hbarTranslateMax=P-R):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var F=y>M,U=t.barWidth+2*t.barPad,W=t.barLength+2*t.barPad,q=l+f,J=x;q+U>o&&(q=o-U);var lt=this.container.selectAll("rect.scrollbar-vertical").data(F?[0]:[]);lt.exit().on(".drag",null).remove(),lt.enter().append("rect").classed("scrollbar-vertical",!0).call(g.fill,t.barColor),F?(this.vbar=lt.attr({rx:t.barRadius,ry:t.barRadius,x:q,y:J,width:U,height:W}),this._vbarYMin=J+W/2,this._vbarTranslateMax=M-W):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var yt=this.id,mt=C-.5,st=F?A+U+.5:A+.5,tt=h-.5,dt=w?p+O+.5:p+.5,rt=n._topdefs.selectAll("#"+yt).data(w||F?[0]:[]);if(rt.exit().remove(),rt.enter().append("clipPath").attr("id",yt).append("rect"),w||F?(this._clipRect=rt.select("rect").attr({x:Math.floor(mt),y:Math.floor(tt),width:Math.ceil(st)-Math.floor(mt),height:Math.ceil(dt)-Math.floor(tt)}),this.container.call(I.setClipUrl,yt,this.gd),this.bg.attr({x:l,y:x,width:f,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(I.setClipUrl,null),delete this._clipRect),w||F){var at=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(at);var vt=c.behavior.drag().on("dragstart",function(){c.event.sourceEvent.preventDefault(),c.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));w&&this.hbar.on(".drag",null).call(vt),F&&this.vbar.on(".drag",null).call(vt)}this.setTranslate(r,a)},t.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(I.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},t.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=c.event.dx),this.vbar&&(r-=c.event.dy),this.setTranslate(e,r)},t.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=c.event.deltaY),this.vbar&&(r+=c.event.deltaY),this.setTranslate(e,r)},t.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,n=a+this._hbarTranslateMax,o=S.constrain(c.event.x,a,n),i=(o-a)/(n-a),l=this.position.w-this._box.w;e=i*l}if(this.vbar){var f=r+this._vbarYMin,x=f+this._vbarTranslateMax,y=S.constrain(c.event.y,f,x),v=(y-f)/(x-f),T=this.position.h-this._box.h;r=v*T}this.setTranslate(e,r)},t.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=S.constrain(e||0,0,a),r=S.constrain(r||0,0,n),this.translateX=e,this.translateY=r,this.container.call(I.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var o=e/a;this.hbar.call(I.setTranslate,e+o*this._hbarTranslateMax,r)}if(this.vbar){var i=r/n;this.vbar.call(I.setTranslate,e,r+i*this._vbarTranslateMax)}}}),CF=Dt((Q,Z)=>{var c=qr(),g=Kc(),I=hi(),S=Vs(),t=kn(),e=ec(),r=mu().arrayEditor,a=Af().LINE_SPACING,n=I6(),o=EF();Z.exports=function(R){var O=R._fullLayout,j=t.filterVisible(O[n.name]);function V(yt){g.autoMargin(R,p(yt))}var H=O._menulayer.selectAll("g."+n.containerClassName).data(j.length>0?[0]:[]);if(H.enter().append("g").classed(n.containerClassName,!0).style("cursor","pointer"),H.exit().each(function(){c.select(this).selectAll("g."+n.headerGroupClassName).each(V)}).remove(),j.length!==0){var F=H.selectAll("g."+n.headerGroupClassName).data(j,i);F.enter().append("g").classed(n.headerGroupClassName,!0);for(var U=t.ensureSingle(H,"g",n.dropdownButtonGroupClassName,function(yt){yt.style("pointer-events","all")}),W=0;W{var c=I6();Z.exports={moduleType:"component",name:c.name,layoutAttributes:NM(),supplyLayoutDefaults:SF(),draw:CF()}}),Uw=Dt((Q,Z)=>{Z.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}}),jM=Dt((Q,Z)=>{var c=da(),g=Ry(),I=Ia().extendDeepAll,S=Yc().overrideAll,t=El(),e=mu().templatedArray,r=Uw(),a=e("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});Z.exports=S(e("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:a,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:I(g({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:t.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:c({})},font:c({}),activebgcolor:{valType:"color",dflt:r.gripBgActiveColor},bgcolor:{valType:"color",dflt:r.railBgColor},bordercolor:{valType:"color",dflt:r.railBorderColor},borderwidth:{valType:"number",min:0,dflt:r.railBorderWidth},ticklen:{valType:"number",min:0,dflt:r.tickLength},tickcolor:{valType:"color",dflt:r.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:r.minorTickLength}}),"arraydraw","from-root")}),PF=Dt((Q,Z)=>{var c=kn(),g=Ad(),I=jM(),S=Uw(),t=S.name,e=I.steps;Z.exports=function(n,o){g(n,o,{name:t,handleItemDefaults:r})};function r(n,o,i){function l(_,P){return c.coerce(n,o,I,_,P)}for(var f=g(n,o,{name:"steps",handleItemDefaults:a}),x=0,y=0;y{var c=qr(),g=Kc(),I=hi(),S=Vs(),t=kn(),e=t.strTranslate,r=ec(),a=mu().arrayEditor,n=Uw(),o=Af(),i=o.LINE_SPACING,l=o.FROM_TL,f=o.FROM_BR;Z.exports=function(H){var F=H._context.staticPlot,U=H._fullLayout,W=y(U,H),q=U._infolayer.selectAll("g."+n.containerClassName).data(W.length>0?[0]:[]);q.enter().append("g").classed(n.containerClassName,!0).style("cursor",F?null:"ew-resize");function J(st){st._commandObserver&&(st._commandObserver.remove(),delete st._commandObserver),g.autoMargin(H,x(st))}if(q.exit().each(function(){c.select(this).selectAll("g."+n.groupClassName).each(J)}).remove(),W.length!==0){var lt=q.selectAll("g."+n.groupClassName).data(W,v);lt.enter().append("g").classed(n.groupClassName,!0),lt.exit().each(J).remove();for(var yt=0;yt0&&(yt=yt.transition().duration(F.transition.duration).ease(F.transition.easing)),yt.attr("transform",e(lt-n.gripWidth*.5,F._dims.currentValueTotalHeight))}}function R(H,F){var U=H._dims;return U.inputAreaStart+n.stepInset+(U.inputAreaLength-2*n.stepInset)*Math.min(1,Math.max(0,F))}function O(H,F){var U=H._dims;return Math.min(1,Math.max(0,(F-n.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*n.stepInset-2*U.inputAreaStart)))}function j(H,F,U){var W=U._dims,q=t.ensureSingle(H,"rect",n.railTouchRectClass,function(J){J.call(h,F,H,U).style("pointer-events","all")});q.attr({width:W.inputAreaLength,height:Math.max(W.inputAreaWidth,n.tickOffset+U.ticklen+W.labelHeight)}).call(I.fill,U.bgcolor).attr("opacity",0),S.setTranslate(q,0,W.currentValueTotalHeight)}function V(H,F){var U=F._dims,W=U.inputAreaLength-n.railInset*2,q=t.ensureSingle(H,"rect",n.railRectClass);q.attr({width:W,height:n.railWidth,rx:n.railRadius,ry:n.railRadius,"shape-rendering":"crispEdges"}).call(I.stroke,F.bordercolor).call(I.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),S.setTranslate(q,n.railInset,(U.inputAreaWidth-n.railWidth)*.5+U.currentValueTotalHeight)}}),zF=Dt((Q,Z)=>{var c=Uw();Z.exports={moduleType:"component",name:c.name,layoutAttributes:jM(),supplyLayoutDefaults:PF(),draw:IF()}}),z6=Dt((Q,Z)=>{var c=wi();Z.exports={bgcolor:{valType:"color",dflt:c.background,editType:"plot"},bordercolor:{valType:"color",dflt:c.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}),UM=Dt((Q,Z)=>{Z.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}),O6=Dt((Q,Z)=>{Z.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}),OF=Dt(Q=>{var Z=Rc(),c=ec(),g=O6(),I=Af().LINE_SPACING,S=g.name;function t(e){var r=e&&e[S];return r&&r.visible}Q.isVisible=t,Q.makeData=function(e){for(var r=Z.list({_fullLayout:e},"x",!0),a=e.margin,n=[],o=0;o{var c=kn(),g=mu(),I=Rc(),S=z6(),t=UM();Z.exports=function(e,r,a){var n=e[a],o=r[a];if(!(n.rangeslider||r._requestRangeslider[o._id]))return;c.isPlainObject(n.rangeslider)||(n.rangeslider={});var i=n.rangeslider,l=g.newContainer(o,"rangeslider");function f(p,k){return c.coerce(i,l,S,p,k)}var x,y;function v(p,k){return c.coerce(x,y,t,p,k)}var T=f("visible");if(T){f("bgcolor",r.plot_bgcolor),f("bordercolor"),f("borderwidth"),f("thickness"),f("autorange",!o.isValidRange(i.range)),f("range");var u=r._subplots;if(u)for(var b=u.cartesian.filter(function(p){return p.substr(0,p.indexOf("y"))===I.name2id(a)}).map(function(p){return p.substr(p.indexOf("y"),p.length)}),_=c.simpleMap(b,I.id2name),P=0;P<_.length;P++){var M=_[P];x=i[M]||{},y=g.newContainer(l,M,"yaxis");var C=r[M],A;x.range&&C.isValidRange(x.range)&&(A="fixed");var h=v("rangemode",A);h!=="match"&&v("range",C.range.slice())}l._input=i}}}),FF=Dt((Q,Z)=>{var c=Rc().list,g=Y0().getAutoRange,I=O6();Z.exports=function(S){for(var t=c(S,"x",!0),e=0;e{var c=qr(),g=Jo(),I=Kc(),S=kn(),t=S.strTranslate,e=Vs(),r=hi(),a=lp(),n=Mf(),o=Rc(),i=up(),l=P0(),f=O6();Z.exports=function(h){for(var p=h._fullLayout,k=p._rangeSliderData,w=0;w=fe.max)Jt=kt[ge+1];else if(Wt=fe.pmax)Jt=kt[ge+1];else if(Wt0?h.touches[0].clientX:0}function y(h,p,k,w){if(p._context.staticPlot)return;var R=h.select("rect."+f.slideBoxClassName).node(),O=h.select("rect."+f.grabAreaMinClassName).node(),j=h.select("rect."+f.grabAreaMaxClassName).node();function V(){var H=c.event,F=H.target,U=x(H),W=U-h.node().getBoundingClientRect().left,q=w.d2p(k._rl[0]),J=w.d2p(k._rl[1]),lt=i.coverSlip();this.addEventListener("touchmove",yt),this.addEventListener("touchend",mt),lt.addEventListener("mousemove",yt),lt.addEventListener("mouseup",mt);function yt(st){var tt=x(st),dt=+tt-U,rt,at,vt;switch(F){case R:if(vt="ew-resize",q+dt>k._length||J+dt<0)return;rt=q+dt,at=J+dt;break;case O:if(vt="col-resize",q+dt>k._length)return;rt=q+dt,at=J;break;case j:if(vt="col-resize",J+dt<0)return;rt=q,at=J+dt;break;default:vt="ew-resize",rt=W,at=W+dt;break}if(at{var c=kn(),g=z6(),I=UM(),S=OF();Z.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:c.extendFlat({},g,{yaxis:I})}}},layoutAttributes:z6(),handleDefaults:DF(),calcAutorange:FF(),draw:RF(),isVisible:S.isVisible,makeData:S.makeData,autoMarginOpts:S.autoMarginOpts}}),D6=Dt((Q,Z)=>{var c=da(),g=wi(),I=mu().templatedArray,S=I("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});Z.exports={visible:{valType:"boolean",editType:"plot"},buttons:S,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:c({editType:"plot"}),bgcolor:{valType:"color",dflt:g.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:g.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}),VM=Dt((Q,Z)=>{Z.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}),NF=Dt((Q,Z)=>{var c=kn(),g=hi(),I=mu(),S=Ad(),t=D6(),e=VM();Z.exports=function(n,o,i,l,f){var x=n.rangeselector||{},y=I.newContainer(o,"rangeselector");function v(P,M){return c.coerce(x,y,t,P,M)}var T=S(x,y,{name:"buttons",handleItemDefaults:r,calendar:f}),u=v("visible",T.length>0);if(u){var b=a(o,i,l);v("x",b[0]),v("y",b[1]),c.noneOrAll(n,o,["x","y"]),v("xanchor"),v("yanchor"),c.coerceFont(v,"font",i.font);var _=v("bgcolor");v("activecolor",g.contrast(_,e.lightAmount,e.darkAmount)),v("bordercolor"),v("borderwidth")}};function r(n,o,i,l){var f=l.calendar;function x(T,u){return c.coerce(n,o,t.buttons,T,u)}var y=x("visible");if(y){var v=x("step");v!=="all"&&(f&&f!=="gregorian"&&(v==="month"||v==="year")?o.stepmode="backward":x("stepmode"),x("count")),x("label")}}function a(n,o,i){for(var l=i.filter(function(v){return o[v].anchor===n._id}),f=0,x=0;x{var c=Di(),g=kn().titleCase;Z.exports=function(S,t){var e=S._name,r={};if(t.step==="all")r[e+".autorange"]=!0;else{var a=I(S,t);r[e+".range[0]"]=a[0],r[e+".range[1]"]=a[1]}return r};function I(S,t){var e=S.range,r=new Date(S.r2l(e[1])),a=t.step,n=c["utc"+g(a)],o=t.count,i;switch(t.stepmode){case"backward":i=S.l2r(+n.offset(r,-o));break;case"todate":var l=n.offset(r,-o);i=S.l2r(+n.ceil(l));break}var f=e[1];return[i,f]}}),UF=Dt((Q,Z)=>{var c=qr(),g=Jo(),I=Kc(),S=hi(),t=Vs(),e=kn(),r=e.strTranslate,a=ec(),n=Rc(),o=Af(),i=o.LINE_SPACING,l=o.FROM_TL,f=o.FROM_BR,x=VM(),y=jF();Z.exports=function(A){var h=A._fullLayout,p=h._infolayer.selectAll(".rangeselector").data(v(A),T);p.enter().append("g").classed("rangeselector",!0),p.exit().remove(),p.style({cursor:"pointer","pointer-events":"all"}),p.each(function(k){var w=c.select(this),R=k,O=R.rangeselector,j=w.selectAll("g.button").data(e.filterVisible(O.buttons));j.enter().append("g").classed("button",!0),j.exit().remove(),j.each(function(V){var H=c.select(this),F=y(R,V);V._isActive=u(R,V,F),H.call(b,O,V),H.call(P,O,V,A),H.on("click",function(){A._dragged||g.call("_guiRelayout",A,F)}),H.on("mouseover",function(){V._isHovered=!0,H.call(b,O,V)}),H.on("mouseout",function(){V._isHovered=!1,H.call(b,O,V)})}),C(A,j,O,R._name,w)})};function v(A){for(var h=n.list(A,"x",!0),p=[],k=0;k{Z.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:D6()}}},layoutAttributes:D6(),handleDefaults:NF(),draw:UF()}}),jh=Dt(Q=>{var Z=Ia().extendFlat;Q.attributes=function(c,g){c=c||{},g=g||{};var I={valType:"info_array",editType:c.editType,items:[{valType:"number",min:0,max:1,editType:c.editType},{valType:"number",min:0,max:1,editType:c.editType}],dflt:[0,1]};c.name&&c.name+"",c.trace,g.description&&""+g.description;var S={x:Z({},I,{}),y:Z({},I,{}),editType:c.editType};return c.noGridCell||(S.row={valType:"integer",min:0,dflt:0,editType:c.editType},S.column={valType:"integer",min:0,dflt:0,editType:c.editType}),S},Q.defaults=function(c,g,I,S){var t=S&&S.x||[0,1],e=S&&S.y||[0,1],r=g.grid;if(r){var a=I("domain.column");a!==void 0&&(a{var c=kn(),g=Mo().counter,I=jh().attributes,S=ic().idRegex,t=mu(),e={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[g("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[S.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:I({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function r(l,f,x){var y=f[x+"axes"],v=Object.keys((l._splomAxes||{})[x]||{});if(Array.isArray(y))return y;if(v.length)return v}function a(l,f){var x=l.grid||{},y=r(f,x,"x"),v=r(f,x,"y");if(!l.grid&&!y&&!v)return;var T=Array.isArray(x.subplots)&&Array.isArray(x.subplots[0]),u=Array.isArray(y),b=Array.isArray(v),_=u&&y!==x.xaxes&&b&&v!==x.yaxes,P,M;T?(P=x.subplots.length,M=x.subplots[0].length):(b&&(P=v.length),u&&(M=y.length));var C=t.newContainer(f,"grid");function A(F,U){return c.coerce(x,C,e,F,U)}var h=A("rows",P),p=A("columns",M);if(!(h*p>1)){delete f.grid;return}if(!T&&!u&&!b){var k=A("pattern")==="independent";k&&(T=!0)}C._hasSubplotGrid=T;var w=A("roworder"),R=w==="top to bottom",O=T?.2:.1,j=T?.3:.1,V,H;_&&f._splomGridDflt&&(V=f._splomGridDflt.xside,H=f._splomGridDflt.yside),C._domains={x:n("x",A,O,V,p),y:n("y",A,j,H,h,R)}}function n(l,f,x,y,v,T){var u=f(l+"gap",x),b=f("domain."+l);f(l+"side",y);for(var _=new Array(v),P=b[0],M=(b[1]-P)/(v-u),C=M*(1-u),A=0;A{Z.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}}),HF=Dt((Q,Z)=>{var c=Yi(),g=Jo(),I=kn(),S=mu(),t=WM();Z.exports=function(e,r,a,n){var o="error_"+n.axis,i=S.newContainer(r,o),l=e[o]||{};function f(_,P){return I.coerce(l,i,t,_,P)}var x=l.array!==void 0||l.value!==void 0||l.type==="sqrt",y=f("visible",x);if(y!==!1){var v=f("type","array"in l?"data":"percent"),T=!0;v!=="sqrt"&&(T=f("symmetric",!((v==="data"?"arrayminus":"valueminus")in l))),v==="data"?(f("array"),f("traceref"),T||(f("arrayminus"),f("tracerefminus"))):(v==="percent"||v==="constant")&&(f("value"),T||f("valueminus"));var u="copy_"+n.inherit+"style";if(n.inherit){var b=r["error_"+n.inherit];(b||{}).visible&&f(u,!(l.color||c(l.thickness)||c(l.width)))}(!n.inherit||!i[u])&&(f("color",a),f("thickness"),f("width",g.traceIs(r,"gl3d")?0:4))}}}),qM=Dt((Q,Z)=>{Z.exports=function(g){var I=g.type,S=g.symmetric;if(I==="data"){var t=g.array||[];if(S)return function(n,o){var i=+t[o];return[i,i]};var e=g.arrayminus||[];return function(n,o){var i=+t[o],l=+e[o];return!isNaN(i)||!isNaN(l)?[l||0,i||0]:[NaN,NaN]}}else{var r=c(I,g.value),a=c(I,g.valueminus);return S||g.valueminus===void 0?function(n){var o=r(n);return[o,o]}:function(n){return[a(n),r(n)]}}};function c(g,I){if(g==="percent")return function(S){return Math.abs(S*I/100)};if(g==="constant")return function(){return Math.abs(I)};if(g==="sqrt")return function(S){return Math.sqrt(Math.abs(S))}}}),WF=Dt((Q,Z)=>{var c=Yi(),g=Jo(),I=Ls(),S=kn(),t=qM();Z.exports=function(r){for(var a=r.calcdata,n=0;n{var c=qr(),g=Yi(),I=Vs(),S=Tc();Z.exports=function(e,r,a,n){var o,i=a.xaxis,l=a.yaxis,f=n&&n.duration>0,x=e._context.staticPlot;r.each(function(y){var v=y[0].trace,T=v.error_x||{},u=v.error_y||{},b;v.ids&&(b=function(C){return C.id});var _=S.hasMarkers(v)&&v.marker.maxdisplayed>0;!u.visible&&!T.visible&&(y=[]);var P=c.select(this).selectAll("g.errorbar").data(y,b);if(P.exit().remove(),!!y.length){T.visible||P.selectAll("path.xerror").remove(),u.visible||P.selectAll("path.yerror").remove(),P.style("opacity",1);var M=P.enter().append("g").classed("errorbar",!0);f&&M.style("opacity",0).transition().duration(n.duration).style("opacity",1),I.setClipUrl(P,a.layerClipId,e),P.each(function(C){var A=c.select(this),h=t(C,i,l);if(!(_&&!C.vis)){var p,k=A.select("path.yerror");if(u.visible&&g(h.x)&&g(h.yh)&&g(h.ys)){var w=u.width;p="M"+(h.x-w)+","+h.yh+"h"+2*w+"m-"+w+",0V"+h.ys,h.noYS||(p+="m-"+w+",0h"+2*w),o=!k.size(),o?k=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("yerror",!0):f&&(k=k.transition().duration(n.duration).ease(n.easing)),k.attr("d",p)}else k.remove();var R=A.select("path.xerror");if(T.visible&&g(h.y)&&g(h.xh)&&g(h.xs)){var O=(T.copy_ystyle?u:T).width;p="M"+h.xh+","+(h.y-O)+"v"+2*O+"m0,-"+O+"H"+h.xs,h.noXS||(p+="m0,-"+O+"v"+2*O),o=!R.size(),o?R=A.append("path").style("vector-effect",x?"none":"non-scaling-stroke").classed("xerror",!0):f&&(R=R.transition().duration(n.duration).ease(n.easing)),R.attr("d",p)}else R.remove()}})}})};function t(e,r,a){var n={x:r.c2p(e.x),y:a.c2p(e.y)};return e.yh!==void 0&&(n.yh=a.c2p(e.yh),n.ys=a.c2p(e.ys),g(n.ys)||(n.noYS=!0,n.ys=a.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=r.c2p(e.xh),n.xs=r.c2p(e.xs),g(n.xs)||(n.noXS=!0,n.xs=r.c2p(e.xs,!0))),n}}),$F=Dt((Q,Z)=>{var c=qr(),g=hi();Z.exports=function(I){I.each(function(S){var t=S[0].trace,e=t.error_y||{},r=t.error_x||{},a=c.select(this);a.selectAll("path.yerror").style("stroke-width",e.thickness+"px").call(g.stroke,e.color),r.copy_ystyle&&(r=e),a.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(g.stroke,r.color)})}}),ZF=Dt((Q,Z)=>{var c=kn(),g=Yc().overrideAll,I=WM(),S={error_x:c.extendFlat({},I),error_y:c.extendFlat({},I)};delete S.error_x.copy_zstyle,delete S.error_y.copy_zstyle,delete S.error_y.copy_ystyle;var t={error_x:c.extendFlat({},I),error_y:c.extendFlat({},I),error_z:c.extendFlat({},I)};delete t.error_x.copy_ystyle,delete t.error_y.copy_ystyle,delete t.error_z.copy_ystyle,delete t.error_z.copy_zstyle,Z.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:S,bar:S,histogram:S,scatter3d:g(t,"calc","nested"),scattergl:g(S,"calc","nested")}},supplyDefaults:HF(),calc:WF(),makeComputeError:qM(),plot:qF(),style:$F(),hoverInfo:e};function e(r,a,n){(a.error_y||{}).visible&&(n.yerr=r.yh-r.y,a.error_y.symmetric||(n.yerrneg=r.y-r.ys)),(a.error_x||{}).visible&&(n.xerr=r.xh-r.x,a.error_x.symmetric||(n.xerrneg=r.x-r.xs))}}),GF=Dt((Q,Z)=>{Z.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}),YF=Dt((Q,Z)=>{var c=qr(),g=ro(),I=Kc(),S=Jo(),t=Ls(),e=up(),r=kn(),a=r.strTranslate,n=Ia().extendFlat,o=P0(),i=Vs(),l=hi(),f=lp(),x=ec(),y=Ud().flipScale,v=tx(),T=K_(),u=Td(),b=Af(),_=b.LINE_SPACING,P=b.FROM_TL,M=b.FROM_BR,C=GF().cn;function A(O){var j=O._fullLayout,V=j._infolayer.selectAll("g."+C.colorbar).data(h(O),function(H){return H._id});V.enter().append("g").attr("class",function(H){return H._id}).classed(C.colorbar,!0),V.each(function(H){var F=c.select(this);r.ensureSingle(F,"rect",C.cbbg),r.ensureSingle(F,"g",C.cbfills),r.ensureSingle(F,"g",C.cblines),r.ensureSingle(F,"g",C.cbaxis,function(W){W.classed(C.crisp,!0)}),r.ensureSingle(F,"g",C.cbtitleunshift,function(W){W.append("g").classed(C.cbtitle,!0)}),r.ensureSingle(F,"rect",C.cboutline);var U=p(F,H,O);U&&U.then&&(O._promises||[]).push(U),O._context.edits.colorbarPosition&&k(F,H,O)}),V.exit().each(function(H){I.autoMargin(O,H._id)}).remove(),V.order()}function h(O){var j=O._fullLayout,V=O.calcdata,H=[],F,U,W,q;function J(Y){return n(Y,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function lt(){typeof q.calc=="function"?q.calc(O,W,F):(F._fillgradient=U.reversescale?y(U.colorscale):U.colorscale,F._zrange=[U[q.min],U[q.max]])}for(var yt=0;yt1){var Gt=Math.pow(10,Math.floor(Math.log(Le)/Math.LN10));Xr*=Gt*r.roundUp(Le/Gt,[2,5,10]),(Math.abs(ge.start)/ge.size+1e-6)%1<2e-6&&(Wr.tick0=0)}Wr.dtick=Xr}Wr.domain=H?[ur+dt/ft.h,ur+ee-dt/ft.h]:[ur+tt/ft.w,ur+ee-tt/ft.w],Wr.setScale(),O.attr("transform",a(Math.round(ft.l),Math.round(ft.t)));var ne=O.select("."+C.cbtitleunshift).attr("transform",a(-Math.round(ft.l),-Math.round(ft.t))),Ct=Wr.ticklabelposition,gt=Wr.title.font.size,St=O.select("."+C.cbaxis),Nt,re=0,le=0;function we(Ar,mr){var Qr={propContainer:Wr,propName:j._propPrefix+"title.text",traceIndex:j._traceIndex,_meta:j._meta,placeholder:Y._dfltTitle.colorbar,containerGroup:O.select("."+C.cbtitle)},Hn=Ar.charAt(0)==="h"?Ar.substr(1):"h"+Ar;O.selectAll("."+Hn+",."+Hn+"-math-group").remove(),f.draw(V,Ar,n(Qr,mr||{}))}function Ue(){if(H&&br||!H&&!br){var Ar,mr;Pt==="top"&&(Ar=tt+ft.l+ve*rt,mr=dt+ft.t+oe*(1-ur-ee)+3+gt*.75),Pt==="bottom"&&(Ar=tt+ft.l+ve*rt,mr=dt+ft.t+oe*(1-ur)-3-gt*.25),Pt==="right"&&(mr=dt+ft.t+oe*at+3+gt*.75,Ar=tt+ft.l+ve*ur),we(Wr._id+"title",{attributes:{x:Ar,y:mr,"text-anchor":H?"start":"middle"}})}}function qe(){if(H&&!br||!H&&br){var Ar=Wr.position||0,mr=Wr._offset+Wr._length/2,Qr,Hn;if(Pt==="right")Hn=mr,Qr=ft.l+ve*Ar+10+gt*(Wr.showticklabels?1:.5);else if(Qr=mr,Pt==="bottom"&&(Hn=ft.t+oe*Ar+10+(Ct.indexOf("inside")===-1?Wr.tickfont.size:0)+(Wr.ticks!=="inside"&&j.ticklen||0)),Pt==="top"){var Wn=It.text.split("
").length;Hn=ft.t+oe*Ar+10-Tt-_*gt*Wn}we((H?"h":"v")+Wr._id+"title",{avoid:{selection:c.select(V).selectAll("g."+Wr._id+"tick"),side:Pt,offsetTop:H?0:ft.t,offsetLeft:H?ft.l:0,maxShift:H?Y.width:Y.height},attributes:{x:Qr,y:Hn,"text-anchor":"middle"},transform:{rotate:H?-90:0,offset:0}})}}function or(){if(!H&&!br||H&&br){var Ar=O.select("."+C.cbtitle),mr=Ar.select("text"),Qr=[-J/2,J/2],Hn=Ar.select(".h"+Wr._id+"title-math-group").node(),Wn=15.6;mr.node()&&(Wn=parseInt(mr.node().style.fontSize,10)*_);var Xn;if(Hn?(Xn=i.bBox(Hn),le=Xn.width,re=Xn.height,re>Wn&&(Qr[1]-=(re-Wn)/2)):mr.node()&&!mr.classed(C.jsPlaceholder)&&(Xn=i.bBox(mr.node()),le=Xn.width,re=Xn.height),H){if(re){if(re+=5,Pt==="top")Wr.domain[1]-=re/ft.h,Qr[1]*=-1;else{Wr.domain[0]+=re/ft.h;var Ii=x.lineCount(mr);Qr[1]+=(1-Ii)*Wn}Ar.attr("transform",a(Qr[0],Qr[1])),Wr.setScale()}}else le&&(Pt==="right"&&(Wr.domain[0]+=(le+gt/2)/ft.w),Ar.attr("transform",a(Qr[0],Qr[1])),Wr.setScale())}O.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",H?a(0,Math.round(ft.h*(1-Wr.domain[1]))):a(Math.round(ft.w*Wr.domain[0]),0)),St.attr("transform",H?a(0,Math.round(-ft.t)):a(Math.round(-ft.l),0));var oi=O.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(pe);oi.enter().append("rect").classed(C.cbfill,!0).attr("style",""),oi.exit().remove();var $n=qt.map(Wr.c2p).map(Math.round).sort(function(fr,_r){return fr-_r});oi.each(function(fr,_r){var tn=[_r===0?qt[0]:(pe[_r]+pe[_r-1])/2,_r===pe.length-1?qt[1]:(pe[_r]+pe[_r+1])/2].map(Wr.c2p).map(Math.round);H&&(tn[1]=r.constrain(tn[1]+(tn[1]>tn[0])?1:-1,$n[0],$n[1]));var Cn=c.select(this).attr(H?"x":"y",Te).attr(H?"y":"x",c.min(tn)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(c.max(tn)-c.min(tn),2));if(j._fillgradient)i.gradient(Cn,V,j._id,H?"vertical":"horizontalreversed",j._fillgradient,"fill");else{var Tn=Jt(fr).replace("e-","");Cn.attr("fill",g(Tn).toHexString())}});var sa=O.select("."+C.cblines).selectAll("path."+C.cbline).data(kt.color&&kt.width?se:[]);sa.enter().append("path").classed(C.cbline,!0),sa.exit().remove(),sa.each(function(fr){var _r=Te,tn=Math.round(Wr.c2p(fr))+kt.width/2%1;c.select(this).attr("d","M"+(H?_r+","+tn:tn+","+_r)+(H?"h":"v")+Tt).call(i.lineGroupStyle,kt.width,Wt(fr),kt.dash)}),St.selectAll("g."+Wr._id+"tick,path").remove();var Zi=Te+Tt+(J||0)/2-(j.ticks==="outside"?1:0),We=t.calcTicks(Wr),nr=t.getTickSigns(Wr)[2];return t.drawTicks(V,Wr,{vals:Wr.ticks==="inside"?t.clipEnds(Wr,We):We,layer:St,path:t.makeTickPath(Wr,Zi,nr),transFn:t.makeTransTickFn(Wr)}),t.drawLabels(V,Wr,{vals:We,layer:St,transFn:t.makeTransTickLabelFn(Wr),labelFns:t.makeLabelFns(Wr,Zi)})}function Sr(){var Ar,mr=Tt+J/2;Ct.indexOf("inside")===-1&&(Ar=i.bBox(St.node()),mr+=H?Ar.width:Ar.height),Nt=ne.select("text");var Qr=0,Hn=H&&Pt==="top",Wn=!H&&Pt==="right",Xn=0;if(Nt.node()&&!Nt.classed(C.jsPlaceholder)){var Ii,oi=ne.select(".h"+Wr._id+"title-math-group").node();oi&&(H&&br||!H&&!br)?(Ar=i.bBox(oi),Qr=Ar.width,Ii=Ar.height):(Ar=i.bBox(ne.node()),Qr=Ar.right-ft.l-(H?Te:jr),Ii=Ar.bottom-ft.t-(H?jr:Te),!H&&Pt==="top"&&(mr+=Ar.height,Xn=Ar.height)),Wn&&(Nt.attr("transform",a(Qr/2+gt/2,0)),Qr*=2),mr=Math.max(mr,H?Qr:Ii)}var $n=(H?tt:dt)*2+mr+lt+J/2,sa=0;!H&&It.text&&st==="bottom"&&at<=0&&(sa=$n/2,$n+=sa,Xn+=sa),Y._hColorbarMoveTitle=sa,Y._hColorbarMoveCBTitle=Xn;var Zi=lt+J,We=(H?Te:jr)-Zi/2-(H?tt:0),nr=(H?jr:Te)-(H?Mt:dt+Xn-sa);O.select("."+C.cbbg).attr("x",We).attr("y",nr).attr(H?"width":"height",Math.max($n-sa,2)).attr(H?"height":"width",Math.max(Mt+Zi,2)).call(l.fill,yt).call(l.stroke,j.bordercolor).style("stroke-width",lt);var fr=Wn?Math.max(Qr-10,0):0;O.selectAll("."+C.cboutline).attr("x",(H?Te:jr+tt)+fr).attr("y",(H?jr+dt-Mt:Te)+(Hn?re:0)).attr(H?"width":"height",Math.max(Tt,2)).attr(H?"height":"width",Math.max(Mt-(H?2*dt+re:2*tt+fr),2)).call(l.stroke,j.outlinecolor).style({fill:"none","stroke-width":J});var _r=H?He*$n:0,tn=H?0:(1-Ge)*$n-Xn;if(_r=it?ft.l-_r:-_r,tn=vt?ft.t-tn:-tn,O.attr("transform",a(_r,tn)),!H&&(lt||g(yt).getAlpha()&&!g.equals(Y.paper_bgcolor,yt))){var Cn=St.selectAll("text"),Tn=Cn[0].length,Mn=O.select("."+C.cbbg).node(),fi=i.bBox(Mn),ki=i.getTranslate(O),Oi=2;Cn.each(function(Gr,Br){var Yr=0,pn=Tn-1;if(Br===Yr||Br===pn){var on=i.bBox(this),Ce=i.getTranslate(this),dr;if(Br===pn){var Hr=on.right+Ce.x,_n=fi.right+ki.x+jr-lt-Oi+rt;dr=_n-Hr,dr>0&&(dr=0)}else if(Br===Yr){var Fn=on.left+Ce.x,Qn=fi.left+ki.x+jr+lt+Oi;dr=Qn-Fn,dr<0&&(dr=0)}dr&&(Tn<3?this.setAttribute("transform","translate("+dr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ji={},Xi=P[mt],ci=M[mt],za=P[st],Wa=M[st],ze=$n-Tt;H?(U==="pixels"?(ji.y=at,ji.t=Mt*za,ji.b=Mt*Wa):(ji.t=ji.b=0,ji.yt=at+F*za,ji.yb=at-F*Wa),q==="pixels"?(ji.x=rt,ji.l=$n*Xi,ji.r=$n*ci):(ji.l=ze*Xi,ji.r=ze*ci,ji.xl=rt-W*Xi,ji.xr=rt+W*ci)):(U==="pixels"?(ji.x=rt,ji.l=Mt*Xi,ji.r=Mt*ci):(ji.l=ji.r=0,ji.xl=rt+F*Xi,ji.xr=rt-F*ci),q==="pixels"?(ji.y=1-at,ji.t=$n*za,ji.b=$n*Wa):(ji.t=ze*za,ji.b=ze*Wa,ji.yt=at-W*za,ji.yb=at+W*Wa));var Ie=j.y<.5?"b":"t",Rr=j.x<.5?"l":"r";V._fullLayout._reservedMargin[j._id]={};var $r={r:Y.width-We-_r,l:We+ji.r,b:Y.height-nr-tn,t:nr+ji.b};it&&vt?I.autoMargin(V,j._id,ji):it?V._fullLayout._reservedMargin[j._id][Ie]=$r[Ie]:vt||H?V._fullLayout._reservedMargin[j._id][Rr]=$r[Rr]:V._fullLayout._reservedMargin[j._id][Ie]=$r[Ie]}return r.syncOrAsync([I.previousPromises,Ue,or,qe,I.previousPromises,Sr],V)}function k(O,j,V){var H=j.orientation==="v",F=V._fullLayout,U=F._size,W,q,J;e.init({element:O.node(),gd:V,prepFn:function(){W=O.attr("transform"),o(O)},moveFn:function(lt,yt){O.attr("transform",W+a(lt,yt)),q=e.align((H?j._uFrac:j._vFrac)+lt/U.w,H?j._thickFrac:j._lenFrac,0,1,j.xanchor),J=e.align((H?j._vFrac:1-j._uFrac)-yt/U.h,H?j._lenFrac:j._thickFrac,0,1,j.yanchor);var mt=e.getCursor(q,J,j.xanchor,j.yanchor);o(O,mt)},doneFn:function(){if(o(O),q!==void 0&&J!==void 0){var lt={};lt[j._propPrefix+"x"]=q,lt[j._propPrefix+"y"]=J,j._traceIndex!==void 0?S.call("_guiRestyle",V,lt,j._traceIndex):S.call("_guiRelayout",V,lt)}}})}function w(O,j,V){var H=j._levels,F=[],U=[],W,q,J=H.end+H.size/100,lt=H.size,yt=1.001*V[0]-.001*V[1],mt=1.001*V[1]-.001*V[0];for(q=0;q<1e5&&(W=H.start+q*lt,!(lt>0?W>=J:W<=J));q++)W>yt&&W0?W>=J:W<=J));q++)W>V[0]&&W{Z.exports={moduleType:"component",name:"colorbar",attributes:M1(),supplyDefaults:fv(),draw:YF().draw,hasColorbar:L0()}}),XF=Dt((Q,Z)=>{Z.exports={moduleType:"component",name:"legend",layoutAttributes:D_(),supplyLayoutDefaults:Uy(),draw:R_(),style:kw()}}),JF=Dt((Q,Z)=>{Z.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}}),QF=Dt((Q,Z)=>{Z.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}),$M=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=g.extendFlat,S=g.extendDeep;function t(r){var a;switch(r){case"themes__thumb":a={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":a={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:a={}}return a}function e(r){var a=["xaxis","yaxis","zaxis"];return a.indexOf(r.slice(0,5))>-1}Z.exports=function(r,a){var n,o=r.data,i=r.layout,l=S([],o),f=S({},i,t(a.tileClass)),x=r._context||{};if(a.width&&(f.width=a.width),a.height&&(f.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){f.annotations=[];var y=Object.keys(f);for(n=0;n{var c=Rm().EventEmitter,g=Jo(),I=kn(),S=o0(),t=$M(),e=Xy(),r=Jy();function a(n,o){var i=new c,l=t(n,{format:"png"}),f=l.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);function x(){var v=S.getDelay(f._fullLayout);setTimeout(function(){var T=e(f),u=document.createElement("canvas");u.id=I.randstr(),i=r({format:o.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:u,emitter:i,svg:T}),i.clean=function(){f&&document.body.removeChild(f)}},v)}var y=S.getRedrawFunc(f);return g.call("_doPlot",f,l.data,l.layout,l.config).then(y).then(x).catch(function(v){i.emit("error",v)}),i}Z.exports=a}),eR=Dt((Q,Z)=>{var c=o0(),g={getDelay:c.getDelay,getRedrawFunc:c.getRedrawFunc,clone:$M(),toSVG:Xy(),svgToImg:Jy(),toImage:tR(),downloadImage:Y_()};Z.exports=g}),rR=Dt(Q=>{Q.version=Wi().version,Un(),P_();var Z=Jo(),c=Q.register=Z.register,g=S6(),I=Object.keys(g);for(t=0;t{Z.exports=rR()}),rx=Dt((Q,Z)=>{Z.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}),Lg=Dt((Q,Z)=>{var c=ef(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,texttemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=kc(),r=da(),a=rx(),n=kd().pattern,o=Ia().extendFlat,i=r({editType:"calc",arrayOk:!0,colorEditType:"style"}),l=c.marker,f=l.line,x=o({},f.width,{dflt:0}),y=o({width:x,editType:"calc"},e("marker.line")),v=o({line:y,editType:"calc"},e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:n,cornerradius:{valType:"any",editType:"calc"}});Z.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),text:c.text,texttemplate:S({editType:"plot"},{keys:a.eventDataKeys}),texttemplatefallback:t({editType:"plot"}),hovertext:c.hovertext,hovertemplate:I({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:o({},i,{}),insidetextfont:o({},i,{}),outsidetextfont:o({},i,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:o({},c.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:v,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:{marker:{opacity:c.selected.marker.opacity,color:c.selected.marker.color,editType:"style"},textfont:c.selected.textfont,editType:"style"},unselected:{marker:{opacity:c.unselected.marker.opacity,color:c.unselected.marker.color,editType:"style"},textfont:c.unselected.textfont,editType:"style"},zorder:c.zorder}}),F6=Dt((Q,Z)=>{Z.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}}),R6=Dt((Q,Z)=>{var c=hi(),g=Ud().hasColorscale,I=mc(),S=kn().coercePattern;Z.exports=function(t,e,r,a,n){var o=r("marker.color",a),i=g(t,"marker");i&&I(t,e,n,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",c.defaultLine),g(t,"marker.line")&&I(t,e,n,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),S(r,"marker.pattern",o,i),r("selected.marker.color"),r("unselected.marker.color")}}),J0=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=hi(),S=Jo(),t=Hm(),e=Rp(),r=R6(),a=Cg(),n=Lg(),o=g.coerceFont;function i(y,v,T,u){function b(A,h){return g.coerce(y,v,n,A,h)}var _=t(y,v,u,b);if(!_){v.visible=!1;return}e(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("zorder"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var P=b("textposition");x(y,v,u,b,P,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r(y,v,b,T,u);var M=(v.marker.line||{}).color,C=S.getComponentMethod("errorbars","supplyDefaults");C(y,v,M||I.defaultLine,{axis:"y"}),C(y,v,M||I.defaultLine,{axis:"x",inherit:"y"}),g.coerceSelectionMarkerOpacity(v,b)}function l(y,v){var T,u;function b(M,C){return g.coerce(u._input,u,n,M,C)}for(var _=0;_=0)return y}else if(typeof y=="string"&&(y=y.trim(),y.slice(-1)==="%"&&c(y.slice(0,-1))&&(y=+y.slice(0,-1),y>=0)))return y+"%"}function x(y,v,T,u,b,_){_=_||{};var P=_.moduleHasSelected!==!1,M=_.moduleHasUnselected!==!1,C=_.moduleHasConstrain!==!1,A=_.moduleHasCliponaxis!==!1,h=_.moduleHasTextangle!==!1,p=_.moduleHasInsideanchor!==!1,k=!!_.hasPathbar,w=Array.isArray(b)||b==="auto",R=w||b==="inside",O=w||b==="outside";if(R||O){var j=o(u,"textfont",T.font),V=g.extendFlat({},j),H=y.textfont&&y.textfont.color,F=!H;if(F&&delete V.color,o(u,"insidetextfont",V),k){var U=g.extendFlat({},j);F&&delete U.color,o(u,"pathbar.textfont",U)}O&&o(u,"outsidetextfont",j),P&&u("selected.textfont.color"),M&&u("unselected.textfont.color"),C&&u("constraintext"),A&&u("cliponaxis"),h&&u("textangle"),u("texttemplate"),u("texttemplatefallback")}R&&p&&u("insidetextanchor")}Z.exports={supplyDefaults:i,crossTraceDefaults:l,handleText:x,validateCornerradius:f}}),ZM=Dt((Q,Z)=>{var c=Jo(),g=Ls(),I=kn(),S=F6(),t=J0().validateCornerradius;Z.exports=function(e,r,a){function n(P,M){return I.coerce(e,r,S,P,M)}for(var o=!1,i=!1,l=!1,f={},x=n("barmode"),y=x==="group",v=0;v0&&!f[u]&&(l=!0),f[u]=!0),T.visible&&T.type==="histogram"){var b=g.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);b.type!=="category"&&(i=!0)}}if(!o){delete r.barmode;return}x!=="overlay"&&n("barnorm"),n("bargap",i&&!l?0:.2),n("bargroupgap");var _=n("barcornerradius");r.barcornerradius=t(_)}}),Vw=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){for(var S=0;S{var c=Ls(),g=D0(),I=Ud().hasColorscale,S=Xd(),t=Vw(),e=Bt();Z.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,l,f,x,y,v,T={msUTC:!!(a.base||a.base===0)};a.orientation==="h"?(i=n.makeCalcdata(a,"x",T),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y",T),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),l=x.vals;for(var u=Math.min(l.length,i.length),b=new Array(u),_=0;_{var c=qr(),g=kn();function I(r,a,n){var o=r._fullLayout,i=o["_"+n+"Text_minsize"];if(i){var l=o.uniformtext.mode==="hide",f;switch(n){case"funnelarea":case"pie":case"sunburst":f="g.slice";break;case"treemap":case"icicle":f="g.slice, g.pathbar";break;default:f="g.points > g.point"}a.selectAll(f).each(function(x){var y=x.transform;if(y){y.scale=l&&y.hide?0:i/y.fontSize;var v=c.select(this).select("text");g.setTransormAndDisplay(v,y)}})}}function S(r,a,n){if(n.uniformtext.mode){var o=e(r),i=n.uniformtext.minsize,l=a.scale*a.fontSize;a.hide=l{var Z=Yi(),c=ro(),g=kn().isArrayOrTypedArray;Q.coerceString=function(I,S,t){if(typeof S=="string"){if(S||!I.noBlank)return S}else if((typeof S=="number"||S===!0)&&!I.strict)return String(S);return t!==void 0?t:I.dflt},Q.coerceNumber=function(I,S,t){if(Z(S)){S=+S;var e=I.min,r=I.max,a=e!==void 0&&Sr;if(!a)return S}return t!==void 0?t:I.dflt},Q.coerceColor=function(I,S,t){return c(S).isValid()?S:t!==void 0?t:I.dflt},Q.coerceEnumerated=function(I,S,t){return I.coerceNumber&&(S=+S),I.values.indexOf(S)!==-1?S:t!==void 0?t:I.dflt},Q.getValue=function(I,S){var t;return g(I)?S{var c=qr(),g=hi(),I=Vs(),S=kn(),t=Jo(),e=Bp().resizeText,r=Lg(),a=r.textfont,n=r.insidetextfont,o=r.outsidetextfont,i=B6();function l(A){var h=c.select(A).selectAll('g[class^="barlayer"]').selectAll("g.trace");e(A,h,"bar");var p=h.size(),k=A._fullLayout;h.style("opacity",function(w){return w[0].trace.opacity}).each(function(w){(k.barmode==="stack"&&p>1||k.bargap===0&&k.bargroupgap===0&&!w[0].trace.marker.line.width)&&c.select(this).attr("shape-rendering","crispEdges")}),h.selectAll("g.points").each(function(w){var R=c.select(this),O=w[0].trace;f(R,O,A)}),t.getComponentMethod("errorbars","style")(h)}function f(A,h,p){I.pointStyle(A.selectAll("path"),h,p),x(A,h,p)}function x(A,h,p){A.selectAll("text").each(function(k){var w=c.select(this),R=S.ensureUniformFontSize(p,u(w,k,h,p));I.font(w,R)})}function y(A,h,p){var k=h[0].trace;k.selectedpoints?v(p,k,A):(f(p,k,A),t.getComponentMethod("errorbars","style")(p))}function v(A,h,p){I.selectedPointStyle(A.selectAll("path"),h),T(A.selectAll("text"),h,p)}function T(A,h,p){A.each(function(k){var w=c.select(this),R;if(k.selected){R=S.ensureUniformFontSize(p,u(w,k,h,p));var O=h.selected.textfont&&h.selected.textfont.color;O&&(R.color=O),I.font(w,R)}else I.selectedTextStyle(w,h)})}function u(A,h,p,k){var w=k._fullLayout.font,R=p.textfont;if(A.classed("bartext-inside")){var O=C(h,p);R=_(p,h.i,w,O)}else A.classed("bartext-outside")&&(R=P(p,h.i,w));return R}function b(A,h,p){return M(a,A.textfont,h,p)}function _(A,h,p,k){var w=b(A,h,p),R=A._input.textfont===void 0||A._input.textfont.color===void 0||Array.isArray(A.textfont.color)&&A.textfont.color[h]===void 0;return R&&(w={color:g.contrast(k),family:w.family,size:w.size,weight:w.weight,style:w.style,variant:w.variant,textcase:w.textcase,lineposition:w.lineposition,shadow:w.shadow}),M(n,A.insidetextfont,h,w)}function P(A,h,p){var k=b(A,h,p);return M(o,A.outsidetextfont,h,k)}function M(A,h,p,k){h=h||{};var w=i.getValue(h.family,p),R=i.getValue(h.size,p),O=i.getValue(h.color,p),j=i.getValue(h.weight,p),V=i.getValue(h.style,p),H=i.getValue(h.variant,p),F=i.getValue(h.textcase,p),U=i.getValue(h.lineposition,p),W=i.getValue(h.shadow,p);return{family:i.coerceString(A.family,w,k.family),size:i.coerceNumber(A.size,R,k.size),color:i.coerceColor(A.color,O,k.color),weight:i.coerceString(A.weight,j,k.weight),style:i.coerceString(A.style,V,k.style),variant:i.coerceString(A.variant,H,k.variant),textcase:i.coerceString(A.variant,F,k.textcase),lineposition:i.coerceString(A.variant,U,k.lineposition),shadow:i.coerceString(A.variant,W,k.shadow)}}function C(A,h){return h.type==="waterfall"?h[A.dir].marker.color:A.mcc||A.mc||h.marker.color}Z.exports={style:l,styleTextPoints:x,styleOnSelect:y,getInsideTextFont:_,getOutsideTextFont:P,getBarColor:C,resizeText:e}}),nx=Dt((Q,Z)=>{var c=qr(),g=Yi(),I=kn(),S=ec(),t=hi(),e=Vs(),r=Jo(),a=Ls().tickText,n=Bp(),o=n.recordMinTextSize,i=n.clearMinTextSize,l=xm(),f=B6(),x=rx(),y=Lg(),v=y.text,T=y.textposition,u=Fp().appendArrayPointValue,b=x.TEXTPAD;function _(lt){return lt.id}function P(lt){if(lt.ids)return _}function M(lt){return(lt>0)-(lt<0)}function C(lt,yt){return lt0}function k(lt,yt,mt,st,tt,dt){var rt=yt.xaxis,at=yt.yaxis,vt=lt._fullLayout,it=lt._context.staticPlot;tt||(tt={mode:vt.barmode,norm:vt.barmode,gap:vt.bargap,groupgap:vt.bargroupgap},i("bar",vt));var Y=I.makeTraceGroups(st,mt,"trace bars").each(function(ft){var ut=c.select(this),kt=ft[0].trace,It=ft[0].t,Pt=kt.type==="waterfall",qt=kt.type==="funnel",Wt=kt.type==="histogram",Jt=kt.type==="bar",ge=Jt||qt,fe=0;Pt&&kt.connector.visible&&kt.connector.mode==="between"&&(fe=kt.connector.line.width/2);var pe=kt.orientation==="h",se=p(tt),Tt=I.ensureSingle(ut,"g","points"),Lt=P(kt),Mt=Tt.selectAll("g.point").data(I.identity,Lt);Mt.enter().append("g").classed("point",!0),Mt.exit().remove(),Mt.each(function(ve,oe){var Te=c.select(this),He=A(ve,rt,at,pe),Ge=He[0][0],cr=He[0][1],ur=He[1][0],jr=He[1][1],Wr=(pe?cr-Ge:jr-ur)===0;Wr&&ge&&f.getLineWidth(kt,ve)&&(Wr=!1),Wr||(Wr=!g(Ge)||!g(cr)||!g(ur)||!g(jr)),ve.isBlank=Wr,Wr&&(pe?cr=Ge:jr=ur),fe&&!Wr&&(pe?(Ge-=C(Ge,cr)*fe,cr+=C(Ge,cr)*fe):(ur-=C(ur,jr)*fe,jr+=C(ur,jr)*fe));var br,Xr;if(kt.type==="waterfall"){if(!Wr){var nn=kt[ve.dir].marker;br=nn.line.width,Xr=nn.color}}else br=f.getLineWidth(kt,ve),Xr=ve.mc||kt.marker.color;function Le(Zi){var We=c.round(br/2%1,2);return tt.gap===0&&tt.groupgap===0?c.round(Math.round(Zi)-We,2):Zi}function Gt(Zi,We,nr){return nr&&Zi===We?Zi:Math.abs(Zi-We)>=2?Le(Zi):Zi>We?Math.ceil(Zi):Math.floor(Zi)}var ne=t.opacity(Xr),Ct=ne<1||br>.01?Le:Gt;lt._context.staticPlot||(Ge=Ct(Ge,cr,pe),cr=Ct(cr,Ge,pe),ur=Ct(ur,jr,!pe),jr=Ct(jr,ur,!pe));var gt=pe?rt.c2p:at.c2p,St;ve.s0>0?St=ve._sMax:ve.s0<0?St=ve._sMin:St=ve.s1>0?ve._sMax:ve._sMin;function Nt(Zi,We){if(!Zi)return 0;var nr=Math.abs(pe?jr-ur:cr-Ge),fr=Math.abs(pe?cr-Ge:jr-ur),_r=Ct(Math.abs(gt(St,!0)-gt(0,!0))),tn=ve.hasB?Math.min(nr/2,fr/2):Math.min(nr/2,_r),Cn;if(We==="%"){var Tn=Math.min(50,Zi);Cn=nr*(Tn/100)}else Cn=Zi;return Ct(Math.max(Math.min(Cn,tn),0))}var re=Jt||Wt?Nt(It.cornerradiusvalue,It.cornerradiusform):0,le,we,Ue="M"+Ge+","+ur+"V"+jr+"H"+cr+"V"+ur+"Z",qe=0;if(re&&ve.s){var or=M(ve.s0)===0||M(ve.s)===M(ve.s0)?ve.s1:ve.s0;if(qe=Ct(ve.hasB?0:Math.abs(gt(St,!0)-gt(or,!0))),qe0?Math.sqrt(qe*(2*re-qe)):0,Wn=Sr>0?Math.max:Math.min;le="M"+Ge+","+ur+"V"+(jr-Qr*Ar)+"H"+Wn(cr-(re-qe)*Sr,Ge)+"A "+re+","+re+" 0 0 "+mr+" "+cr+","+(jr-re*Ar-Hn)+"V"+(ur+re*Ar+Hn)+"A "+re+","+re+" 0 0 "+mr+" "+Wn(cr-(re-qe)*Sr,Ge)+","+(ur+Qr*Ar)+"Z"}else if(ve.hasB)le="M"+(Ge+re*Sr)+","+ur+"A "+re+","+re+" 0 0 "+mr+" "+Ge+","+(ur+re*Ar)+"V"+(jr-re*Ar)+"A "+re+","+re+" 0 0 "+mr+" "+(Ge+re*Sr)+","+jr+"H"+(cr-re*Sr)+"A "+re+","+re+" 0 0 "+mr+" "+cr+","+(jr-re*Ar)+"V"+(ur+re*Ar)+"A "+re+","+re+" 0 0 "+mr+" "+(cr-re*Sr)+","+ur+"Z";else{we=Math.abs(jr-ur)+qe;var Xn=we0?Math.sqrt(qe*(2*re-qe)):0,oi=Ar>0?Math.max:Math.min;le="M"+(Ge+Xn*Sr)+","+ur+"V"+oi(jr-(re-qe)*Ar,ur)+"A "+re+","+re+" 0 0 "+mr+" "+(Ge+re*Sr-Ii)+","+jr+"H"+(cr-re*Sr+Ii)+"A "+re+","+re+" 0 0 "+mr+" "+(cr-Xn*Sr)+","+oi(jr-(re-qe)*Ar,ur)+"V"+ur+"Z"}}else le=Ue}else le=Ue;var $n=h(I.ensureSingle(Te,"path"),vt,tt,dt);if($n.style("vector-effect",it?"none":"non-scaling-stroke").attr("d",isNaN((cr-Ge)*(jr-ur))||Wr&<._context.staticPlot?"M0,0Z":le).call(e.setClipUrl,yt.layerClipId,lt),!vt.uniformtext.mode&&se){var sa=e.makePointStyleFns(kt);e.singlePointStyle(ve,$n,kt,sa,lt)}w(lt,yt,Te,ft,oe,Ge,cr,ur,jr,re,qe,tt,dt),yt.layerClipId&&e.hideOutsideRangePoint(ve,Te.select("text"),rt,at,kt.xcalendar,kt.ycalendar)});var ee=kt.cliponaxis===!1;e.setClipUrl(ut,ee?null:yt.layerClipId,lt)});r.getComponentMethod("errorbars","plot")(lt,Y,yt,tt)}function w(lt,yt,mt,st,tt,dt,rt,at,vt,it,Y,ft,ut){var kt=yt.xaxis,It=yt.yaxis,Pt=lt._fullLayout,qt;function Wt(we,Ue,qe){var or=I.ensureSingle(we,"text").text(Ue).attr({class:"bartext bartext-"+qt,"text-anchor":"middle","data-notex":1}).call(e.font,qe).call(S.convertToTspans,lt);return or}var Jt=st[0].trace,ge=Jt.orientation==="h",fe=U(Pt,st,tt,kt,It);qt=W(Jt,tt);var pe=ft.mode==="stack"||ft.mode==="relative",se=st[tt],Tt=!pe||se._outmost,Lt=se.hasB,Mt=it&&it-Y>b;if(!fe||qt==="none"||(se.isBlank||dt===rt||at===vt)&&(qt==="auto"||qt==="inside")){mt.select("text").remove();return}var ee=Pt.font,ve=l.getBarColor(st[tt],Jt),oe=l.getInsideTextFont(Jt,tt,ee,ve),Te=l.getOutsideTextFont(Jt,tt,ee),He=Jt.insidetextanchor||"end",Ge=mt.datum();ge?kt.type==="log"&&Ge.s0<=0&&(kt.range[0]0&&Le>0,Ct;Mt?Lt?Ct=R(jr-2*it,Wr,nn,Le,ge)||R(jr,Wr-2*it,nn,Le,ge):ge?Ct=R(jr-(it-Y),Wr,nn,Le,ge)||R(jr,Wr-2*(it-Y),nn,Le,ge):Ct=R(jr,Wr-(it-Y),nn,Le,ge)||R(jr-2*(it-Y),Wr,nn,Le,ge):Ct=R(jr,Wr,nn,Le,ge),ne&&Ct?qt="inside":(qt="outside",br.remove(),br=null)}else qt="inside";if(!br){Gt=I.ensureUniformFontSize(lt,qt==="outside"?Te:oe),br=Wt(mt,fe,Gt);var gt=br.attr("transform");if(br.attr("transform",""),Xr=e.bBox(br.node()),nn=Xr.width,Le=Xr.height,br.attr("transform",gt),nn<=0||Le<=0){br.remove();return}}var St=Jt.textangle,Nt,re;qt==="outside"?(re=Jt.constraintext==="both"||Jt.constraintext==="outside",Nt=F(dt,rt,at,vt,Xr,{isHorizontal:ge,constrained:re,angle:St})):(re=Jt.constraintext==="both"||Jt.constraintext==="inside",Nt=V(dt,rt,at,vt,Xr,{isHorizontal:ge,constrained:re,angle:St,anchor:He,hasB:Lt,r:it,overhead:Y})),Nt.fontSize=Gt.size,o(Jt.type==="histogram"?"bar":Jt.type,Nt,Pt),se.transform=Nt;var le=h(br,Pt,ft,ut);I.setTransormAndDisplay(le,Nt)}function R(lt,yt,mt,st,tt){if(lt<0||yt<0)return!1;var dt=mt<=lt&&st<=yt,rt=mt<=yt&&st<=lt,at=tt?lt>=mt*(yt/st):yt>=st*(lt/mt);return dt||rt||at}function O(lt){return lt==="auto"?0:lt}function j(lt,yt){var mt=Math.PI/180*yt,st=Math.abs(Math.sin(mt)),tt=Math.abs(Math.cos(mt));return{x:lt.width*tt+lt.height*st,y:lt.width*st+lt.height*tt}}function V(lt,yt,mt,st,tt,dt){var rt=!!dt.isHorizontal,at=!!dt.constrained,vt=dt.angle||0,it=dt.anchor,Y=it==="end",ft=it==="start",ut=dt.leftToRight||0,kt=(ut+1)/2,It=1-kt,Pt=dt.hasB,qt=dt.r,Wt=dt.overhead,Jt=tt.width,ge=tt.height,fe=Math.abs(yt-lt),pe=Math.abs(st-mt),se=fe>2*b&&pe>2*b?b:0;fe-=2*se,pe-=2*se;var Tt=O(vt);vt==="auto"&&!(Jt<=fe&&ge<=pe)&&(Jt>fe||ge>pe)&&(!(Jt>pe||ge>fe)||Jtb){var ve=H(lt,yt,mt,st,Lt,qt,Wt,rt,Pt);Mt=ve.scale,ee=ve.pad}else Mt=1,at&&(Mt=Math.min(1,fe/Lt.x,pe/Lt.y)),ee=0;var oe=tt.left*It+tt.right*kt,Te=(tt.top+tt.bottom)/2,He=(lt+b)*It+(yt-b)*kt,Ge=(mt+st)/2,cr=0,ur=0;if(ft||Y){var jr=(rt?Lt.x:Lt.y)/2;qt&&(Y||Pt)&&(se+=ee);var Wr=rt?C(lt,yt):C(mt,st);rt?ft?(He=lt+Wr*se,cr=-Wr*jr):(He=yt-Wr*se,cr=Wr*jr):ft?(Ge=mt+Wr*se,ur=-Wr*jr):(Ge=st-Wr*se,ur=Wr*jr)}return{textX:oe,textY:Te,targetX:He,targetY:Ge,anchorX:cr,anchorY:ur,scale:Mt,rotate:Tt}}function H(lt,yt,mt,st,tt,dt,rt,at,vt){var it=Math.max(0,Math.abs(yt-lt)-2*b),Y=Math.max(0,Math.abs(st-mt)-2*b),ft=dt-b,ut=rt?ft-Math.sqrt(ft*ft-(ft-rt)*(ft-rt)):ft,kt=vt?ft*2:at?ft-rt:2*ut,It=vt?ft*2:at?2*ut:ft-rt,Pt,qt,Wt,Jt,ge;return tt.y/tt.x>=Y/(it-kt)?Jt=Y/tt.y:tt.y/tt.x<=(Y-It)/it?Jt=it/tt.x:!vt&&at?(Pt=tt.x*tt.x+tt.y*tt.y/4,qt=-2*tt.x*(it-ft)-tt.y*(Y/2-ft),Wt=(it-ft)*(it-ft)+(Y/2-ft)*(Y/2-ft)-ft*ft,Jt=(-qt+Math.sqrt(qt*qt-4*Pt*Wt))/(2*Pt)):vt?(Pt=(tt.x*tt.x+tt.y*tt.y)/4,qt=-tt.x*(it/2-ft)-tt.y*(Y/2-ft),Wt=(it/2-ft)*(it/2-ft)+(Y/2-ft)*(Y/2-ft)-ft*ft,Jt=(-qt+Math.sqrt(qt*qt-4*Pt*Wt))/(2*Pt)):(Pt=tt.x*tt.x/4+tt.y*tt.y,qt=-tt.x*(it/2-ft)-2*tt.y*(Y-ft),Wt=(it/2-ft)*(it/2-ft)+(Y-ft)*(Y-ft)-ft*ft,Jt=(-qt+Math.sqrt(qt*qt-4*Pt*Wt))/(2*Pt)),Jt=Math.min(1,Jt),at?ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(Y-tt.y*Jt)/2)*(ft-(Y-tt.y*Jt)/2)))-rt):ge=Math.max(0,ft-Math.sqrt(Math.max(0,ft*ft-(ft-(it-tt.x*Jt)/2)*(ft-(it-tt.x*Jt)/2)))-rt),{scale:Jt,pad:ge}}function F(lt,yt,mt,st,tt,dt){var rt=!!dt.isHorizontal,at=!!dt.constrained,vt=dt.angle||0,it=tt.width,Y=tt.height,ft=Math.abs(yt-lt),ut=Math.abs(st-mt),kt;rt?kt=ut>2*b?b:0:kt=ft>2*b?b:0;var It=1;at&&(It=rt?Math.min(1,ut/Y):Math.min(1,ft/it));var Pt=O(vt),qt=j(tt,Pt),Wt=(rt?qt.x:qt.y)/2,Jt=(tt.left+tt.right)/2,ge=(tt.top+tt.bottom)/2,fe=(lt+yt)/2,pe=(mt+st)/2,se=0,Tt=0,Lt=rt?C(yt,lt):C(mt,st);return rt?(fe=yt-Lt*kt,se=Lt*Wt):(pe=st+Lt*kt,Tt=-Lt*Wt),{textX:Jt,textY:ge,targetX:fe,targetY:pe,anchorX:se,anchorY:Tt,scale:It,rotate:Pt}}function U(lt,yt,mt,st,tt){var dt=yt[0].trace,rt=dt.texttemplate,at;return rt?at=q(lt,yt,mt,st,tt):dt.textinfo?at=J(yt,mt,st,tt):at=f.getValue(dt.text,mt),f.coerceString(v,at)}function W(lt,yt){var mt=f.getValue(lt.textposition,yt);return f.coerceEnumerated(T,mt)}function q(lt,yt,mt,st,tt){var dt=yt[0].trace,rt=I.castOption(dt,mt,"texttemplate");if(!rt)return"";var at=dt.type==="histogram",vt=dt.type==="waterfall",it=dt.type==="funnel",Y=dt.orientation==="h",ft,ut,kt,It;Y?(ft="y",ut=tt,kt="x",It=st):(ft="x",ut=st,kt="y",It=tt);function Pt(se){return a(ut,ut.c2l(se),!0).text}function qt(se){return a(It,It.c2l(se),!0).text}var Wt=yt[mt],Jt={};Jt.label=Wt.p,Jt.labelLabel=Jt[ft+"Label"]=Pt(Wt.p);var ge=I.castOption(dt,Wt.i,"text");(ge===0||ge)&&(Jt.text=ge),Jt.value=Wt.s,Jt.valueLabel=Jt[kt+"Label"]=qt(Wt.s);var fe={};u(fe,dt,Wt.i),(at||fe.x===void 0)&&(fe.x=Y?Jt.value:Jt.label),(at||fe.y===void 0)&&(fe.y=Y?Jt.label:Jt.value),(at||fe.xLabel===void 0)&&(fe.xLabel=Y?Jt.valueLabel:Jt.labelLabel),(at||fe.yLabel===void 0)&&(fe.yLabel=Y?Jt.labelLabel:Jt.valueLabel),vt&&(Jt.delta=+Wt.rawS||Wt.s,Jt.deltaLabel=qt(Jt.delta),Jt.final=Wt.v,Jt.finalLabel=qt(Jt.final),Jt.initial=Jt.final-Jt.delta,Jt.initialLabel=qt(Jt.initial)),it&&(Jt.value=Wt.s,Jt.valueLabel=qt(Jt.value),Jt.percentInitial=Wt.begR,Jt.percentInitialLabel=I.formatPercent(Wt.begR),Jt.percentPrevious=Wt.difR,Jt.percentPreviousLabel=I.formatPercent(Wt.difR),Jt.percentTotal=Wt.sumR,Jt.percenTotalLabel=I.formatPercent(Wt.sumR));var pe=I.castOption(dt,Wt.i,"customdata");return pe&&(Jt.customdata=pe),I.texttemplateString({data:[fe,Jt,dt._meta],fallback:dt.texttemplatefallback,labels:Jt,locale:lt._d3locale,template:rt})}function J(lt,yt,mt,st){var tt=lt[0].trace,dt=tt.orientation==="h",rt=tt.type==="waterfall",at=tt.type==="funnel";function vt(pe){var se=dt?st:mt;return a(se,pe,!0).text}function it(pe){var se=dt?mt:st;return a(se,+pe,!0).text}var Y=tt.textinfo,ft=lt[yt],ut=Y.split("+"),kt=[],It,Pt=function(pe){return ut.indexOf(pe)!==-1};if(Pt("label")&&kt.push(vt(lt[yt].p)),Pt("text")&&(It=I.castOption(tt,ft.i,"text"),(It===0||It)&&kt.push(It)),rt){var qt=+ft.rawS||ft.s,Wt=ft.v,Jt=Wt-qt;Pt("initial")&&kt.push(it(Jt)),Pt("delta")&&kt.push(it(qt)),Pt("final")&&kt.push(it(Wt))}if(at){Pt("value")&&kt.push(it(ft.s));var ge=0;Pt("percent initial")&&ge++,Pt("percent previous")&&ge++,Pt("percent total")&&ge++;var fe=ge>1;Pt("percent initial")&&(It=I.formatPercent(ft.begR),fe&&(It+=" of initial"),kt.push(It)),Pt("percent previous")&&(It=I.formatPercent(ft.difR),fe&&(It+=" of previous"),kt.push(It)),Pt("percent total")&&(It=I.formatPercent(ft.sumR),fe&&(It+=" of total"),kt.push(It))}return kt.join("
")}Z.exports={plot:k,toMoveInsideBar:V}}),Q_=Dt((Q,Z)=>{var c=tf(),g=Jo(),I=hi(),S=kn().fillText,t=B6().getLineWidth,e=Ls().hoverLabelText,r=Ca().BADNUM;function a(i,l,f,x,y){var v=n(i,l,f,x,y);if(v){var T=v.cd,u=T[0].trace,b=T[v.index];return v.color=o(u,b),g.getComponentMethod("errorbars","hoverInfo")(b,u,v),[v]}}function n(i,l,f,x,y){var v=i.cd,T=v[0].trace,u=v[0].t,b=x==="closest",_=T.type==="waterfall",P=i.maxHoverDistance,M=i.maxSpikeDistance,C,A,h,p,k,w,R;T.orientation==="h"?(C=f,A=l,h="y",p="x",k=st,w=lt):(C=l,A=f,h="x",p="y",w=st,k=lt);var O=T[h+"period"],j=b||O;function V(It){return F(It,-1)}function H(It){return F(It,1)}function F(It,Pt){var qt=It.w;return It[h]+Pt*qt/2}function U(It){return It[h+"End"]-It[h+"Start"]}var W=b?V:O?function(It){return It.p-U(It)/2}:function(It){return Math.min(V(It),It.p-u.bardelta/2)},q=b?H:O?function(It){return It.p+U(It)/2}:function(It){return Math.max(H(It),It.p+u.bardelta/2)};function J(It,Pt,qt){return y.finiteRange&&(qt=0),c.inbox(It-C,Pt-C,qt+Math.min(1,Math.abs(Pt-It)/R)-1)}function lt(It){return J(W(It),q(It),P)}function yt(It){return J(V(It),H(It),M)}function mt(It){var Pt=It[p];if(_){var qt=Math.abs(It.rawS)||0;A>0?Pt+=qt:A<0&&(Pt-=qt)}return Pt}function st(It){var Pt=A,qt=It.b,Wt=mt(It);return c.inbox(qt-Pt,Wt-Pt,P+(Wt-Pt)/(Wt-qt)-1)}function tt(It){var Pt=A,qt=It.b,Wt=mt(It);return c.inbox(qt-Pt,Wt-Pt,M+(Wt-Pt)/(Wt-qt)-1)}var dt=i[h+"a"],rt=i[p+"a"];R=Math.abs(dt.r2c(dt.range[1])-dt.r2c(dt.range[0]));function at(It){return(k(It)+w(It))/2}var vt=c.getDistanceFunction(x,k,w,at);if(c.getClosest(v,vt,i),i.index!==!1&&v[i.index].p!==r){j||(W=function(It){return Math.min(V(It),It.p-u.bargroupwidth/2)},q=function(It){return Math.max(H(It),It.p+u.bargroupwidth/2)});var it=i.index,Y=v[it],ft=T.base?Y.b+Y.s:Y.s;i[p+"0"]=i[p+"1"]=rt.c2p(Y[p],!0),i[p+"LabelVal"]=ft;var ut=u.extents[u.extents.round(Y.p)];i[h+"0"]=dt.c2p(b?W(Y):ut[0],!0),i[h+"1"]=dt.c2p(b?q(Y):ut[1],!0);var kt=Y.orig_p!==void 0;return i[h+"LabelVal"]=kt?Y.orig_p:Y.p,i.labelLabel=e(dt,i[h+"LabelVal"],T[h+"hoverformat"]),i.valueLabel=e(rt,i[p+"LabelVal"],T[p+"hoverformat"]),i.baseLabel=e(rt,Y.b,T[p+"hoverformat"]),i.spikeDistance=(tt(Y)+yt(Y))/2,i[h+"Spike"]=dt.c2p(Y.p,!0),S(Y,T,i),i.hovertemplate=T.hovertemplate,i}}function o(i,l){var f=l.mcc||i.marker.color,x=l.mlcc||i.marker.line.color,y=t(i,l);if(I.opacity(f))return f;if(I.opacity(x)&&y)return x}Z.exports={hoverPoints:a,hoverOnBars:n,getTraceColor:o}}),aR=Dt((Q,Z)=>{Z.exports=function(c,g,I){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),I.orientation==="h"?(c.label=c.y,c.value=c.x):(c.label=c.x,c.value=c.y),c}}),tb=Dt((Q,Z)=>{Z.exports=function(g,I){var S=g.cd,t=g.xaxis,e=g.yaxis,r=S[0].trace,a=r.type==="funnel",n=r.orientation==="h",o=[],i;if(I===!1)for(i=0;i{Z.exports={attributes:Lg(),layoutAttributes:F6(),supplyDefaults:J0().supplyDefaults,crossTraceDefaults:J0().crossTraceDefaults,supplyLayoutDefaults:ZM(),calc:iR(),crossTraceCalc:zr().crossTraceCalc,colorbar:xo(),arraysToCalcdata:Vw(),plot:nx().plot,style:xm().style,styleOnSelect:xm().styleOnSelect,hoverPoints:Q_().hoverPoints,eventData:aR(),selectPoints:tb(),moduleType:"trace",name:"bar",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}),sR=Dt((Q,Z)=>{Z.exports=oR()}),Hw=Dt((Q,Z)=>{var c=I0(),g=ef(),I=Lg(),S=wi(),t=dh().axisHoverFormat,{hovertemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=Ia().extendFlat,n=g.marker,o=n.line;Z.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:g.xperiod,yperiod:g.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:g.xperiodalignment,yperiodalignment:g.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:a({},n.symbol,{arrayOk:!1,editType:"plot"}),opacity:a({},n.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:a({},n.angle,{arrayOk:!1,editType:"calc"}),size:a({},n.size,{arrayOk:!1,editType:"calc"}),color:a({},n.color,{arrayOk:!1,editType:"style"}),line:{color:a({},o.color,{arrayOk:!1,dflt:S.defaultLine,editType:"style"}),width:a({},o.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:c(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:I.offsetgroup,alignmentgroup:I.alignmentgroup,selected:{marker:g.selected.marker,editType:"style"},unselected:{marker:g.unselected.marker,editType:"style"},text:a({},g.text,{}),hovertext:a({},g.hovertext,{}),hovertemplate:e({}),hovertemplatefallback:r(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:g.zorder}}),Ww=Dt((Q,Z)=>{Z.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}}),qw=Dt((Q,Z)=>{var c=kn(),g=Jo(),I=hi(),S=Rp(),t=Cg(),e=dv(),r=Hw();function a(l,f,x,y){function v(p,k){return c.coerce(l,f,r,p,k)}if(n(l,f,v,y),f.visible!==!1){S(l,f,y,v),v("xhoverformat"),v("yhoverformat");var T=f._hasPreCompStats;T&&(v("lowerfence"),v("upperfence")),v("line.color",(l.marker||{}).color||x),v("line.width"),v("fillcolor",I.addOpacity(f.line.color,.5));var u=!1;if(T){var b=v("mean"),_=v("sd");b&&b.length&&(u=!0,_&&_.length&&(u="sd"))}v("whiskerwidth");var P=v("sizemode"),M;P==="quartiles"&&(M=v("boxmean",u)),v("showwhiskers",P==="quartiles"),(P==="sd"||M==="sd")&&v("sdmultiple"),v("width"),v("quartilemethod");var C=!1;if(T){var A=v("notchspan");A&&A.length&&(C=!0)}else c.validate(l.notchwidth,r.notchwidth)&&(C=!0);var h=v("notched",C);h&&v("notchwidth"),o(l,f,v,{prefix:"box"}),v("zorder")}}function n(l,f,x,y){function v(J){var lt=0;return J&&J.length&&(lt+=1,c.isArrayOrTypedArray(J[0])&&J[0].length&&(lt+=1)),lt}function T(J){return c.validate(l[J],r[J])}var u=x("y"),b=x("x"),_;if(f.type==="box"){var P=x("q1"),M=x("median"),C=x("q3");f._hasPreCompStats=P&&P.length&&M&&M.length&&C&&C.length,_=Math.min(c.minRowLength(P),c.minRowLength(M),c.minRowLength(C))}var A=v(u),h=v(b),p=A&&c.minRowLength(u),k=h&&c.minRowLength(b),w=y.calendar,R={autotypenumbers:y.autotypenumbers},O,j;if(f._hasPreCompStats)switch(String(h)+String(A)){case"00":var V=T("x0")||T("dx"),H=T("y0")||T("dy");H&&!V?O="h":O="v",j=_;break;case"10":O="v",j=Math.min(_,k);break;case"20":O="h",j=Math.min(_,b.length);break;case"01":O="h",j=Math.min(_,p);break;case"02":O="v",j=Math.min(_,u.length);break;case"12":O="v",j=Math.min(_,k,u.length);break;case"21":O="h",j=Math.min(_,b.length,p);break;case"11":j=0;break;case"22":var F=!1,U;for(U=0;U0?(O="v",h>0?j=Math.min(k,p):j=Math.min(p)):h>0?(O="h",j=Math.min(k)):j=0;if(!j){f.visible=!1;return}f._length=j;var W=x("orientation",O);f._hasPreCompStats?W==="v"&&h===0?(x("x0",0),x("dx",1)):W==="h"&&A===0&&(x("y0",0),x("dy",1)):W==="v"&&h===0?x("x0"):W==="h"&&A===0&&x("y0");var q=g.getComponentMethod("calendars","handleTraceDefaults");q(l,f,["x","y"],y)}function o(l,f,x,y){var v=y.prefix,T=c.coerce2(l,f,r,"marker.outliercolor"),u=x("marker.line.outliercolor"),b="outliers";f._hasPreCompStats?b="all":(T||u)&&(b="suspectedoutliers");var _=x(v+"points",b);_?(x("jitter",_==="all"?.3:0),x("pointpos",_==="all"?-1.5:0),x("marker.symbol"),x("marker.opacity"),x("marker.size"),x("marker.angle"),x("marker.color",f.line.color),x("marker.line.color"),x("marker.line.width"),_==="suspectedoutliers"&&(x("marker.line.outliercolor",f.marker.color),x("marker.line.outlierwidth")),x("selected.marker.color"),x("unselected.marker.color"),x("selected.marker.size"),x("unselected.marker.size"),x("text"),x("hovertext")):delete f.marker;var P=x("hoveron");(P==="all"||P.indexOf("points")!==-1)&&(x("hovertemplate"),x("hovertemplatefallback")),c.coerceSelectionMarkerOpacity(f,x)}function i(l,f){var x,y;function v(_){return c.coerce(y._input,y,r,_)}for(var T=0;T{var c=Jo(),g=kn(),I=Ww();function S(e,r,a,n,o){for(var i=o+"Layout",l=!1,f=0;f{var c=Yi(),g=Ls(),I=D0(),S=kn(),t=Ca().BADNUM,e=S._;Z.exports=function(_,P){var M=_._fullLayout,C=g.getFromId(_,P.xaxis||"x"),A=g.getFromId(_,P.yaxis||"y"),h=[],p=P.type==="violin"?"_numViolins":"_numBoxes",k,w,R,O,j,V,H;P.orientation==="h"?(R=C,O="x",j=A,V="y",H=!!P.yperiodalignment):(R=A,O="y",j=C,V="x",H=!!P.xperiodalignment);var F=r(P,V,j,M[p]),U=F[0],W=F[1],q=S.distinctVals(U,j),J=q.vals,lt=q.minDiff/2,yt,mt,st,tt,dt,rt,at=(P.boxpoints||P.points)==="all"?S.identity:function(jr){return jr.vyt.uf};if(P._hasPreCompStats){var vt=P[O],it=function(jr){return R.d2c((P[jr]||[])[k])},Y=1/0,ft=-1/0;for(k=0;k=yt.q1&&yt.q3>=yt.med){var kt=it("lowerfence");yt.lf=kt!==t&&kt<=yt.q1?kt:y(yt,st,tt);var It=it("upperfence");yt.uf=It!==t&&It>=yt.q3?It:v(yt,st,tt);var Pt=it("mean");yt.mean=Pt!==t?Pt:tt?S.mean(st,tt):(yt.q1+yt.q3)/2;var qt=it("sd");yt.sd=Pt!==t&&qt>=0?qt:tt?S.stdev(st,tt,yt.mean):yt.q3-yt.q1,yt.lo=T(yt),yt.uo=u(yt);var Wt=it("notchspan");Wt=Wt!==t&&Wt>0?Wt:b(yt,tt),yt.ln=yt.med-Wt,yt.un=yt.med+Wt;var Jt=yt.lf,ge=yt.uf;P.boxpoints&&st.length&&(Jt=Math.min(Jt,st[0]),ge=Math.max(ge,st[tt-1])),P.notched&&(Jt=Math.min(Jt,yt.ln),ge=Math.max(ge,yt.un)),yt.min=Jt,yt.max=ge}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+yt.q1,"median = "+yt.med,"q3 = "+yt.q3].join(` +`));var fe;yt.med!==t?fe=yt.med:yt.q1!==t?yt.q3!==t?fe=(yt.q1+yt.q3)/2:fe=yt.q1:yt.q3!==t?fe=yt.q3:fe=0,yt.med=fe,yt.q1=yt.q3=fe,yt.lf=yt.uf=fe,yt.mean=yt.sd=fe,yt.ln=yt.un=fe,yt.min=yt.max=fe}Y=Math.min(Y,yt.min),ft=Math.max(ft,yt.max),yt.pts2=mt.filter(at),h.push(yt)}}P._extremes[R._id]=g.findExtremes(R,[Y,ft],{padded:!0})}else{var pe=R.makeCalcdata(P,O),se=a(J,lt),Tt=J.length,Lt=n(Tt);for(k=0;k=0&&Mt0){if(yt={},yt.pos=yt[V]=J[k],mt=yt.pts=Lt[k].sort(f),st=yt[O]=mt.map(x),tt=st.length,yt.min=st[0],yt.max=st[tt-1],yt.mean=S.mean(st,tt),yt.sd=S.stdev(st,tt,yt.mean)*P.sdmultiple,yt.med=S.interp(st,.5),tt%2&&(Te||He)){var Ge,cr;Te?(Ge=st.slice(0,tt/2),cr=st.slice(tt/2+1)):He&&(Ge=st.slice(0,tt/2+1),cr=st.slice(tt/2)),yt.q1=S.interp(Ge,.5),yt.q3=S.interp(cr,.5)}else yt.q1=S.interp(st,.25),yt.q3=S.interp(st,.75);yt.lf=y(yt,st,tt),yt.uf=v(yt,st,tt),yt.lo=T(yt),yt.uo=u(yt);var ur=b(yt,tt);yt.ln=yt.med-ur,yt.un=yt.med+ur,ee=Math.min(ee,yt.ln),ve=Math.max(ve,yt.un),yt.pts2=mt.filter(at),h.push(yt)}P.notched&&S.isTypedArray(pe)&&(pe=Array.from(pe)),P._extremes[R._id]=g.findExtremes(R,P.notched?pe.concat([ee,ve]):pe,{padded:!0})}return l(h,P),h.length>0?(h[0].t={num:M[p],dPos:lt,posLetter:V,valLetter:O,labels:{med:e(_,"median:"),min:e(_,"min:"),q1:e(_,"q1:"),q3:e(_,"q3:"),max:e(_,"max:"),mean:P.boxmean==="sd"||P.sizemode==="sd"?e(_,"mean ± σ:").replace("σ",P.sdmultiple===1?"σ":P.sdmultiple+"σ"):e(_,"mean:"),lf:e(_,"lower fence:"),uf:e(_,"upper fence:")}},M[p]++,h):[{t:{empty:!0}}]};function r(_,P,M,C){var A=P in _,h=P+"0"in _,p="d"+P in _;if(A||h&&p){var k=M.makeCalcdata(_,P),w=I(_,M,P,k).vals;return[w,k]}var R;h?R=_[P+"0"]:"name"in _&&(M.type==="category"||c(_.name)&&["linear","log"].indexOf(M.type)!==-1||S.isDateTime(_.name)&&M.type==="date")?R=_.name:R=C;for(var O=M.type==="multicategory"?M.r2c_just_indices(R):M.d2c(R,0,_[P+"calendar"]),j=_._length,V=new Array(j),H=0;H{var c=Ls(),g=kn(),I=vv().getAxisGroup,S=["v","h"];function t(r,a){for(var n=r.calcdata,o=a.xaxis,i=a.yaxis,l=0;l1,h=1-l[r+"gap"],p=1-l[r+"groupgap"];for(y=0;y0;if(O==="positive"?(mt=j*(R?1:.5),dt=tt,st=dt=H):O==="negative"?(mt=dt=H,st=j*(R?1:.5),rt=tt):(mt=st=j,dt=rt=tt),ut){var kt=k.pointpos,It=k.jitter,Pt=k.marker.size/2,qt=0;kt+It>=0&&(qt=tt*(kt+It),qt>mt?(ft=!0,it=Pt,at=qt):qt>dt&&(it=Pt,at=mt)),qt<=mt&&(at=mt);var Wt=0;kt-It<=0&&(Wt=-tt*(kt-It),Wt>st?(ft=!0,Y=Pt,vt=Wt):Wt>rt&&(Y=Pt,vt=st)),Wt<=st&&(vt=st)}else at=mt,vt=st;var Jt=new Array(T.length);for(v=0;v{var c=qr(),g=kn(),I=Vs(),S=5,t=.01;function e(o,i,l,f){var x=o._context.staticPlot,y=i.xaxis,v=i.yaxis;g.makeTraceGroups(f,l,"trace boxes").each(function(T){var u=c.select(this),b=T[0],_=b.t,P=b.trace;if(_.wdPos=_.bdPos*P.whiskerwidth,P.visible!==!0||_.empty){u.remove();return}var M,C;P.orientation==="h"?(M=v,C=y):(M=y,C=v),r(u,{pos:M,val:C},P,_,x),a(u,{x:y,y:v},P,_),n(u,{pos:M,val:C},P,_)})}function r(o,i,l,f,x){var y=l.orientation==="h",v=i.val,T=i.pos,u=!!T.rangebreaks,b=f.bPos,_=f.wdPos||0,P=f.bPosPxOffset||0,M=l.whiskerwidth||0,C=l.showwhiskers!==!1,A=l.notched||!1,h=A?1-2*l.notchwidth:1,p,k;Array.isArray(f.bdPos)?(p=f.bdPos[0],k=f.bdPos[1]):(p=f.bdPos,k=f.bdPos);var w=o.selectAll("path.box").data(l.type!=="violin"||l.box.visible?g.identity:[]);w.enter().append("path").style("vector-effect",x?"none":"non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(R){if(R.empty)return c.select(this).attr("d","M0,0Z");var O=T.c2l(R.pos+b,!0),j=T.l2p(O-p)+P,V=T.l2p(O+k)+P,H=u?(j+V)/2:T.l2p(O)+P,F=l.whiskerwidth,U=u?j*F+(1-F)*H:T.l2p(O-_)+P,W=u?V*F+(1-F)*H:T.l2p(O+_)+P,q=T.l2p(O-p*h)+P,J=T.l2p(O+k*h)+P,lt=l.sizemode==="sd",yt=v.c2p(lt?R.mean-R.sd:R.q1,!0),mt=lt?v.c2p(R.mean+R.sd,!0):v.c2p(R.q3,!0),st=g.constrain(lt?v.c2p(R.mean,!0):v.c2p(R.med,!0),Math.min(yt,mt)+1,Math.max(yt,mt)-1),tt=R.lf===void 0||l.boxpoints===!1||lt,dt=v.c2p(tt?R.min:R.lf,!0),rt=v.c2p(tt?R.max:R.uf,!0),at=v.c2p(R.ln,!0),vt=v.c2p(R.un,!0);y?c.select(this).attr("d","M"+st+","+q+"V"+J+"M"+yt+","+j+"V"+V+(A?"H"+at+"L"+st+","+J+"L"+vt+","+V:"")+"H"+mt+"V"+j+(A?"H"+vt+"L"+st+","+q+"L"+at+","+j:"")+"Z"+(C?"M"+yt+","+H+"H"+dt+"M"+mt+","+H+"H"+rt+(M===0?"":"M"+dt+","+U+"V"+W+"M"+rt+","+U+"V"+W):"")):c.select(this).attr("d","M"+q+","+st+"H"+J+"M"+j+","+yt+"H"+V+(A?"V"+at+"L"+J+","+st+"L"+V+","+vt:"")+"V"+mt+"H"+j+(A?"V"+vt+"L"+q+","+st+"L"+j+","+at:"")+"Z"+(C?"M"+H+","+yt+"V"+dt+"M"+H+","+mt+"V"+rt+(M===0?"":"M"+U+","+dt+"H"+W+"M"+U+","+rt+"H"+W):""))})}function a(o,i,l,f){var x=i.x,y=i.y,v=f.bdPos,T=f.bPos,u=l.boxpoints||l.points;g.seedPseudoRandom();var b=function(M){return M.forEach(function(C){C.t=f,C.trace=l}),M},_=o.selectAll("g.points").data(u?b:[]);_.enter().append("g").attr("class","points"),_.exit().remove();var P=_.selectAll("path").data(function(M){var C,A=M.pts2,h=Math.max((M.max-M.min)/10,M.q3-M.q1),p=h*1e-9,k=h*t,w=[],R=0,O;if(l.jitter){if(h===0)for(R=1,w=new Array(A.length),C=0;CM.lo&&(W.so=!0)}return A});P.enter().append("path").classed("point",!0),P.exit().remove(),P.call(I.translatePoints,x,y)}function n(o,i,l,f){var x=i.val,y=i.pos,v=!!y.rangebreaks,T=f.bPos,u=f.bPosPxOffset||0,b=l.boxmean||(l.meanline||{}).visible,_,P;Array.isArray(f.bdPos)?(_=f.bdPos[0],P=f.bdPos[1]):(_=f.bdPos,P=f.bdPos);var M=o.selectAll("path.mean").data(l.type==="box"&&l.boxmean||l.type==="violin"&&l.box.visible&&l.meanline.visible?g.identity:[]);M.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),M.exit().remove(),M.each(function(C){var A=y.c2l(C.pos+T,!0),h=y.l2p(A-_)+u,p=y.l2p(A+P)+u,k=v?(h+p)/2:y.l2p(A)+u,w=x.c2p(C.mean,!0),R=x.c2p(C.mean-C.sd,!0),O=x.c2p(C.mean+C.sd,!0);l.orientation==="h"?c.select(this).attr("d","M"+w+","+h+"V"+p+(b==="sd"?"m0,0L"+R+","+k+"L"+w+","+h+"L"+O+","+k+"Z":"")):c.select(this).attr("d","M"+h+","+w+"H"+p+(b==="sd"?"m0,0L"+k+","+R+"L"+h+","+w+"L"+k+","+O+"Z":""))})}Z.exports={plot:e,plotBoxAndWhiskers:r,plotPoints:a,plotBoxMean:n}}),V6=Dt((Q,Z)=>{var c=qr(),g=hi(),I=Vs();function S(e,r,a){var n=a||c.select(e).selectAll("g.trace.boxes");n.style("opacity",function(o){return o[0].trace.opacity}),n.each(function(o){var i=c.select(this),l=o[0].trace,f=l.line.width;function x(T,u,b,_){T.style("stroke-width",u+"px").call(g.stroke,b).call(g.fill,_)}var y=i.selectAll("path.box");if(l.type==="candlestick")y.each(function(T){if(!T.empty){var u=c.select(this),b=l[T.dir];x(u,b.line.width,b.line.color,b.fillcolor),u.style("opacity",l.selectedpoints&&!T.selected?.3:1)}});else{x(y,f,l.line.color,l.fillcolor),i.selectAll("path.mean").style({"stroke-width":f,"stroke-dasharray":2*f+"px,"+f+"px"}).call(g.stroke,l.line.color);var v=i.selectAll("path.point");I.pointStyle(v,l,e)}})}function t(e,r,a){var n=r[0].trace,o=a.selectAll("path.point");n.selectedpoints?I.selectedPointStyle(o,n):I.pointStyle(o,n,e)}Z.exports={style:S,styleOnSelect:t}}),YM=Dt((Q,Z)=>{var c=Ls(),g=kn(),I=tf(),S=hi(),t=g.fillText;function e(n,o,i,l){var f=n.cd,x=f[0].trace,y=x.hoveron,v=[],T;return y.indexOf("boxes")!==-1&&(v=v.concat(r(n,o,i,l))),y.indexOf("points")!==-1&&(T=a(n,o,i)),l==="closest"?T?[T]:v:(T&&v.push(T),v)}function r(n,o,i,l){var f=n.cd,x=n.xa,y=n.ya,v=f[0].trace,T=f[0].t,u=v.type==="violin",b,_,P,M,C,A,h,p,k,w,R,O=T.bdPos,j,V,H=T.wHover,F=function(Wt){return P.c2l(Wt.pos)+T.bPos-P.c2l(A)};u&&v.side!=="both"?(v.side==="positive"&&(k=function(Wt){var Jt=F(Wt);return I.inbox(Jt,Jt+H,w)},j=O,V=0),v.side==="negative"&&(k=function(Wt){var Jt=F(Wt);return I.inbox(Jt-H,Jt,w)},j=0,V=O)):(k=function(Wt){var Jt=F(Wt);return I.inbox(Jt-H,Jt+H,w)},j=V=O);var U;u?U=function(Wt){return I.inbox(Wt.span[0]-C,Wt.span[1]-C,w)}:U=function(Wt){return I.inbox(Wt.min-C,Wt.max-C,w)},v.orientation==="h"?(C=o,A=i,h=U,p=k,b="y",P=y,_="x",M=x):(C=i,A=o,h=k,p=U,b="x",P=x,_="y",M=y);var W=Math.min(1,O/Math.abs(P.r2c(P.range[1])-P.r2c(P.range[0])));w=n.maxHoverDistance-W,R=n.maxSpikeDistance-W;function q(Wt){return(h(Wt)+p(Wt))/2}var J=I.getDistanceFunction(l,h,p,q);if(I.getClosest(f,J,n),n.index===!1)return[];var lt=f[n.index],yt=v.line.color,mt=(v.marker||{}).color;S.opacity(yt)&&v.line.width?n.color=yt:S.opacity(mt)&&v.boxpoints?n.color=mt:n.color=v.fillcolor,n[b+"0"]=P.c2p(lt.pos+T.bPos-V,!0),n[b+"1"]=P.c2p(lt.pos+T.bPos+j,!0),n[b+"LabelVal"]=lt.orig_p!==void 0?lt.orig_p:lt.pos;var st=b+"Spike";n.spikeDistance=q(lt)*R/w,n[st]=P.c2p(lt.pos,!0);var tt=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,dt=v.boxpoints||v.points,rt=dt&&tt?["max","uf","q3","med","mean","q1","lf","min"]:dt&&!tt?["max","uf","q3","med","q1","lf","min"]:!dt&&tt?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],at=M.range[1]{Z.exports=function(c,g){return g.hoverOnBox&&(c.hoverOnBox=g.hoverOnBox),"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),KM=Dt((Q,Z)=>{Z.exports=function(c,g){var I=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a;if(g===!1)for(r=0;r{Z.exports={attributes:Hw(),layoutAttributes:Ww(),supplyDefaults:qw().supplyDefaults,crossTraceDefaults:qw().crossTraceDefaults,supplyLayoutDefaults:N6().supplyLayoutDefaults,calc:GM(),crossTraceCalc:j6().crossTraceCalc,plot:U6().plot,style:V6().style,styleOnSelect:V6().styleOnSelect,hoverPoints:YM().hoverPoints,eventData:lR(),selectPoints:KM(),moduleType:"trace",name:"box",basePlotModule:Mf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}),cR=Dt((Q,Z)=>{Z.exports=uR()}),eb=Dt((Q,Z)=>{var c=kc(),{extendFlat:g}=Ia(),I=Ho(),{axisHoverFormat:S}=dh(),t=da(),{hovertemplateAttrs:e,templatefallbackAttrs:r,texttemplateAttrs:a}=Zu(),n=ef();Z.exports=g({z:{valType:"data_array",editType:"calc"},x:g({},n.x,{impliedEdits:{xtype:"array"}}),x0:g({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:g({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:g({},n.y,{impliedEdits:{ytype:"array"}}),y0:g({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:g({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:g({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:g({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:g({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:g({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:g({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:g({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:e(),hovertemplatefallback:r(),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:r({editType:"plot"}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:g({},I.showlegend,{dflt:!1}),zorder:n.zorder},c("",{cLetter:"z",autoColorDflt:!1}))}),H6=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Jo();Z.exports=function(e,r,a,n,o,i){var l=a("z");o=o||"x",i=i||"y";var f,x;if(l===void 0||!l.length)return 0;if(g.isArray1D(l)){f=a(o),x=a(i);var y=g.minRowLength(f),v=g.minRowLength(x);if(y===0||v===0)return 0;r._length=Math.min(y,v,l.length)}else{if(f=S(o,a),x=S(i,a),!t(l))return 0;a("transpose"),r._length=null}var T=I.getComponentMethod("calendars","handleTraceDefaults");return T(e,r,[o,i],n),!0};function S(e,r){var a=r(e),n=a?r(e+"type","array"):"scaled";return n==="scaled"&&(r(e+"0"),r("d"+e)),a}function t(e){for(var r=!0,a=!1,n=!1,o,i=0;i0&&(a=!0);for(var l=0;l{var c=kn();Z.exports=function(g,I){g("texttemplate"),g("texttemplatefallback");var S=c.extendFlat({},I.font,{color:"auto",size:"auto"});c.coerceFont(g,"textfont",S)}}),XM=Dt((Q,Z)=>{Z.exports=function(c,g,I){var S=I("zsmooth");S===!1&&(I("xgap"),I("ygap")),I("zhoverformat")}}),hR=Dt((Q,Z)=>{var c=kn(),g=H6(),I=$w(),S=Rp(),t=XM(),e=mc(),r=eb();Z.exports=function(a,n,o,i){function l(x,y){return c.coerce(a,n,r,x,y)}var f=g(a,n,l,i);if(!f){n.visible=!1;return}S(a,n,i,l),l("xhoverformat"),l("yhoverformat"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),I(l,i),t(a,n,l,i),l("hoverongaps"),l("connectgaps",c.isArray1D(n.z)&&n.zsmooth!==!1),e(a,n,i,l,{prefix:"",cLetter:"z"}),l("zorder")}}),JM=Dt((Q,Z)=>{var c=Yi();Z.exports={count:function(g,I,S){return S[g]++,1},sum:function(g,I,S,t){var e=t[I];return c(e)?(e=Number(e),S[g]+=e,e):0},avg:function(g,I,S,t,e){var r=t[I];return c(r)&&(r=Number(r),S[g]+=r,e[g]++),0},min:function(g,I,S,t){var e=t[I];if(c(e))if(e=Number(e),c(S[g])){if(S[g]>e){var r=e-S[g];return S[g]=e,r}}else return S[g]=e,e;return 0},max:function(g,I,S,t){var e=t[I];if(c(e))if(e=Number(e),c(S[g])){if(S[g]{Z.exports={percent:function(c,g){for(var I=c.length,S=100/g,t=0;t{Z.exports=function(c,g){for(var I=c.length,S=0,t=0;t{var c=Ca(),g=c.ONEAVGYEAR,I=c.ONEAVGMONTH,S=c.ONEDAY,t=c.ONEHOUR,e=c.ONEMIN,r=c.ONESEC,a=Ls().tickIncrement;Z.exports=function(f,x,y,v,T){var u=-1.1*x,b=-.1*x,_=f-b,P=y[0],M=y[1],C=Math.min(n(P+b,P+_,v,T),n(M+b,M+_,v,T)),A=Math.min(n(P+u,P+b,v,T),n(M+u,M+b,v,T)),h,p;if(C>A&&AS){var k=h===g?1:6,w=h===g?"M12":"M1";return function(R,O){var j=v.c2d(R,g,T),V=j.indexOf("-",k);V>0&&(j=j.substr(0,V));var H=v.d2c(j,0,T);if(Hr?f>S?f>g*1.1?g:f>I*1.1?I:S:f>t?t:f>e?e:r:Math.pow(10,Math.floor(Math.log(f)/Math.LN10))}function i(f,x,y,v,T,u){if(v&&f>S){var b=l(x,T,u),_=l(y,T,u),P=f===g?0:1;return b[P]!==_[P]}return Math.floor(y/f)-Math.floor(x/f)>.1}function l(f,x,y){var v=x.c2d(f,g,y).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}),r7=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Jo(),S=Ls(),{hasColorscale:t}=Ud(),e=Xd(),r=Vw(),a=JM(),n=QM(),o=t7(),i=e7();function l(T,u){var b=[],_=[],P=u.orientation==="h",M=S.getFromId(T,P?u.yaxis:u.xaxis),C=P?"y":"x",A={x:"y",y:"x"}[C],h=u[C+"calendar"],p=u.cumulative,k,w=f(T,u,M,C),R=w[0],O=w[1],j=typeof R.size=="string",V=[],H=j?V:R,F=[],U=[],W=[],q=0,J=u.histnorm,lt=u.histfunc,yt=J.indexOf("density")!==-1,mt,st,tt;p.enabled&&yt&&(J=J.replace(/ ?density$/,""),yt=!1);var dt=lt==="max"||lt==="min",rt=dt?null:0,at=a.count,vt=n[J],it=!1,Y=function(ee){return M.r2c(ee,0,h)},ft;for(g.isArrayOrTypedArray(u[A])&<!=="count"&&(ft=u[A],it=lt==="avg",at=a[lt]),k=Y(R.start),st=Y(R.end)+(k-S.tickIncrement(k,R.size,!1,h))/1e6;k=0&&tt=Tt;k--)if(_[k]){Lt=k;break}for(k=Tt;k<=Lt;k++)if(c(b[k])&&c(_[k])){var Mt={p:b[k],s:_[k],b:0};p.enabled||(Mt.pts=W[k],Pt?Mt.ph0=Mt.ph1=W[k].length?O[W[k][0]]:b[k]:(u._computePh=!0,Mt.ph0=fe(V[k]),Mt.ph1=fe(V[k+1],!0))),se.push(Mt)}return se.length===1&&(se[0].width1=S.tickIncrement(se[0].p,R.size,!1,h)-se[0].p),t(u,"marker")&&e(T,u,{vals:u.marker.color,containerStr:"marker",cLetter:"c"}),t(u,"marker.line")&&e(T,u,{vals:u.marker.line.color,containerStr:"marker.line",cLetter:"c"}),r(se,u),g.isArrayOrTypedArray(u.selectedpoints)&&g.tagSelected(se,u,Jt),se}function f(T,u,b,_,P){var M=_+"bins",C=T._fullLayout,A=u["_"+_+"bingroup"],h=C._histogramBinOpts[A],p=C.barmode==="overlay",k,w,R,O,j,V,H,F=function(ge){return b.r2c(ge,0,O)},U=function(ge){return b.c2r(ge,0,O)},W=b.type==="date"?function(ge){return ge||ge===0?g.cleanDate(ge,null,O):null}:function(ge){return c(ge)?Number(ge):null};function q(ge,fe,pe){fe[ge+"Found"]?(fe[ge]=W(fe[ge]),fe[ge]===null&&(fe[ge]=pe[ge])):(V[ge]=fe[ge]=pe[ge],g.nestedProperty(w[0],M+"."+ge).set(pe[ge]))}if(u["_"+_+"autoBinFinished"])delete u["_"+_+"autoBinFinished"];else{w=h.traces;var J=[],lt=!0,yt=!1,mt=!1;for(k=0;k"u"){if(P)return[tt,j,!0];tt=x(T,u,b,_,M)}H=R.cumulative||{},H.enabled&&H.currentbin!=="include"&&(H.direction==="decreasing"?tt.start=U(S.tickIncrement(F(tt.start),tt.size,!0,O)):tt.end=U(S.tickIncrement(F(tt.end),tt.size,!1,O))),h.size=tt.size,h.sizeFound||(V.size=tt.size,g.nestedProperty(w[0],M+".size").set(tt.size)),q("start",h,tt),q("end",h,tt)}j=u["_"+_+"pos0"],delete u["_"+_+"pos0"];var rt=u._input[M]||{},at=g.extendFlat({},h),vt=h.start,it=b.r2l(rt.start),Y=it!==void 0;if((h.startFound||Y)&&it!==b.r2l(vt)){var ft=Y?it:g.aggNums(Math.min,null,j),ut={type:b.type==="category"||b.type==="multicategory"?"linear":b.type,r2l:b.r2l,dtick:h.size,tick0:vt,calendar:O,range:[ft,S.tickIncrement(ft,h.size,!1,O)].map(b.l2r)},kt=S.tickFirst(ut);kt>b.r2l(ft)&&(kt=S.tickIncrement(kt,h.size,!0,O)),at.start=b.l2r(kt),Y||g.nestedProperty(u,M+".start").set(at.start)}var It=h.end,Pt=b.r2l(rt.end),qt=Pt!==void 0;if((h.endFound||qt)&&Pt!==b.r2l(It)){var Wt=qt?Pt:g.aggNums(Math.max,null,j);at.end=b.l2r(Wt),qt||g.nestedProperty(u,M+".start").set(at.end)}var Jt="autobin"+_;return u._input[Jt]===!1&&(u._input[M]=g.extendFlat({},u[M]||{}),delete u._input[Jt],delete u[Jt]),[at,j]}function x(T,u,b,_,P){var M=T._fullLayout,C=y(T,u),A=!1,h=1/0,p=[u],k,w,R;for(k=0;k=0;_--)A(_);else if(u==="increasing"){for(_=1;_=0;_--)T[_]+=T[_+1];b==="exclude"&&(T.push(0),T.shift())}}Z.exports={calc:l,calcAllAutoBins:f}}),fR=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=JM(),S=QM(),t=t7(),e=e7(),r=r7().calcAllAutoBins;Z.exports=function(i,l){var f=g.getFromId(i,l.xaxis),x=g.getFromId(i,l.yaxis),y=l.xcalendar,v=l.ycalendar,T=function(Le){return f.r2c(Le,0,y)},u=function(Le){return x.r2c(Le,0,v)},b=function(Le){return f.c2r(Le,0,y)},_=function(Le){return x.c2r(Le,0,v)},P,M,C,A,h=r(i,l,f,"x"),p=h[0],k=h[1],w=r(i,l,x,"y"),R=w[0],O=w[1],j=l._length;k.length>j&&k.splice(j,k.length-j),O.length>j&&O.splice(j,O.length-j);var V=[],H=[],F=[],U=typeof p.size=="string",W=typeof R.size=="string",q=[],J=[],lt=U?q:p,yt=W?J:R,mt=0,st=[],tt=[],dt=l.histnorm,rt=l.histfunc,at=dt.indexOf("density")!==-1,vt=rt==="max"||rt==="min",it=vt?null:0,Y=I.count,ft=S[dt],ut=!1,kt=[],It=[],Pt="z"in l?l.z:"marker"in l&&Array.isArray(l.marker.color)?l.marker.color:"";Pt&&rt!=="count"&&(ut=rt==="avg",Y=I[rt]);var qt=p.size,Wt=T(p.start),Jt=T(p.end)+(Wt-g.tickIncrement(Wt,qt,!1,y))/1e6;for(P=Wt;P=0&&C=0&&A{var c=kn(),g=Ca().BADNUM,I=D0();Z.exports=function(S,t,e,r,a,n){var o=S._length,i=t.makeCalcdata(S,r),l=e.makeCalcdata(S,a);i=I(S,t,r,i).vals,l=I(S,e,a,l).vals;var f=S.text,x=f!==void 0&&c.isArray1D(f),y=S.hovertext,v=y!==void 0&&c.isArray1D(y),T,u,b=c.distinctVals(i),_=b.vals,P=c.distinctVals(l),M=P.vals,C=[],A,h,p=M.length,k=_.length;for(T=0;T{var c=Yi(),g=kn(),I=Ca().BADNUM;Z.exports=function(S,t,e,r){var a,n,o,i,l,f;function x(_){if(c(_))return+_}if(t&&t.transpose){for(a=0,l=0;l{var c=kn(),g=.01,I=[[-1,0],[1,0],[0,-1],[0,1]];function S(e){return .5-.25*Math.min(1,e*.5)}Z.exports=function(e,r){var a=1,n;for(t(e,r),n=0;ng;n++)a=t(e,r,S(a));return a>g&&c.log("interp2d didn't converge quickly",a),e};function t(e,r,a){var n=0,o,i,l,f,x,y,v,T,u,b,_,P,M;for(f=0;fP&&(n=Math.max(n,Math.abs(e[i][l]-_)/(M-P))))}return n}}),Z6=Dt((Q,Z)=>{var c=kn().maxRowLength;Z.exports=function(g){var I=[],S={},t=[],e=g[0],r=[],a=[0,0,0],n=c(g),o,i,l,f,x,y,v,T;for(i=0;i=0;x--)f=t[x],i=f[0],l=f[1],y=((S[[i-1,l]]||a)[2]+(S[[i+1,l]]||a)[2]+(S[[i,l-1]]||a)[2]+(S[[i,l+1]]||a)[2])/20,y&&(v[f]=[i,l,y],t.splice(x,1),T=!0);if(!T)throw"findEmpties iterated with no new neighbors";for(f in v)S[f]=v[f],I.push(v[f])}return I.sort(function(u,b){return b[2]-u[2]})}}),n7=Dt((Q,Z)=>{var c=Jo(),g=kn().isArrayOrTypedArray;Z.exports=function(I,S,t,e,r,a){var n=[],o=c.traceIs(I,"contour"),i=c.traceIs(I,"histogram"),l,f,x,y=g(S)&&S.length>1;if(y&&!i&&a.type!=="category"){var v=S.length;if(v<=r){if(o)n=Array.from(S).slice(0,r);else if(r===1)a.type==="log"?n=[.5*S[0],2*S[0]]:n=[S[0]-.5,S[0]+.5];else if(a.type==="log"){for(n=[Math.pow(S[0],1.5)/Math.pow(S[1],.5)],x=1;x{var c=Jo(),g=kn(),I=Ls(),S=D0(),t=fR(),e=Xd(),r=W6(),a=q6(),n=$6(),o=Z6(),i=n7(),l=Ca().BADNUM;Z.exports=function(y,v){var T=I.getFromId(y,v.xaxis||"x"),u=I.getFromId(y,v.yaxis||"y"),b=c.traceIs(v,"contour"),_=c.traceIs(v,"histogram"),P=b?"best":v.zsmooth,M,C,A,h,p,k,w,R,O,j,V;if(T._minDtick=0,u._minDtick=0,_)V=t(y,v),h=V.orig_x,M=V.x,C=V.x0,A=V.dx,R=V.orig_y,p=V.y,k=V.y0,w=V.dy,O=V.z;else{var H=v.z;g.isArray1D(H)?(r(v,T,u,"x","y",["z"]),M=v._x,p=v._y,H=v._z):(h=v.x?T.makeCalcdata(v,"x"):[],R=v.y?u.makeCalcdata(v,"y"):[],M=S(v,T,"x",h).vals,p=S(v,u,"y",R).vals,v._x=M,v._y=p),C=v.x0,A=v.dx,k=v.y0,w=v.dy,O=a(H,v,T,u)}(T.rangebreaks||u.rangebreaks)&&(O=x(M,p,O),_||(M=f(M),p=f(p),v._x=M,v._y=p)),!_&&(b||v.connectgaps)&&(v._emptypoints=o(O),n(O,v._emptypoints));function F(tt){P=v._input.zsmooth=v.zsmooth=!1,g.warn('cannot use zsmooth: "fast": '+tt)}function U(tt){if(tt.length>1){var dt=(tt[tt.length-1]-tt[0])/(tt.length-1),rt=Math.abs(dt/100);for(j=0;jrt)return!1}return!0}v._islinear=!1,T.type==="log"||u.type==="log"?P==="fast"&&F("log axis found"):U(M)?U(p)?v._islinear=!0:P==="fast"&&F("y scale is not linear"):P==="fast"&&F("x scale is not linear");var W=g.maxRowLength(O),q=v.xtype==="scaled"?"":M,J=i(v,q,C,A,W,T),lt=v.ytype==="scaled"?"":p,yt=i(v,lt,k,w,O.length,u);v._extremes[T._id]=I.findExtremes(T,J),v._extremes[u._id]=I.findExtremes(u,yt);var mt={x:J,y:yt,z:O,text:v._text||v.text,hovertext:v._hovertext||v.hovertext};if(v.xperiodalignment&&h&&(mt.orig_x=h),v.yperiodalignment&&R&&(mt.orig_y=R),q&&q.length===J.length-1&&(mt.xCenter=q),lt&<.length===yt.length-1&&(mt.yCenter=lt),_&&(mt.xRanges=V.xRanges,mt.yRanges=V.yRanges,mt.pts=V.pts),b||e(y,v,{vals:O,cLetter:"z"}),b&&v.contours&&v.contours.coloring==="heatmap"){var st={type:v.type==="contour"?"heatmap":"histogram2d",xcalendar:v.xcalendar,ycalendar:v.ycalendar};mt.xfill=i(st,q,C,A,W,T),mt.yfill=i(st,lt,k,w,O.length,u)}return[mt]};function f(y){for(var v=[],T=y.length,u=0;u{Q.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],Q.STYLE=Q.CSS_DECLARATIONS.map(function(Z){return Z.join(": ")+"; "}).join("")}),i7=Dt((Q,Z)=>{var c=Y6(),g=Vs(),I=kn(),S=null;function t(){if(S!==null)return S;S=!1;var e=I.isSafari()||I.isMacWKWebView()||I.isIOS();if(window.navigator.userAgent&&!e){var r=Array.from(c.CSS_DECLARATIONS).reverse(),a=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof a=="function")S=r.some(function(l){return a.apply(null,l)});else{var n=g.tester.append("image").attr("style",c.STYLE),o=window.getComputedStyle(n.node()),i=o.imageRendering;S=r.some(function(l){var f=l[1];return i===f||i===f.toLowerCase()}),n.remove()}}return S}Z.exports=t}),K6=Dt((Q,Z)=>{var c=qr(),g=ro(),I=Jo(),S=Vs(),t=Ls(),e=kn(),r=ec(),a=Ws(),n=hi(),o=Xc().extractOpts,i=Xc().makeColorScaleFuncFromTrace,l=Dp(),f=Af(),x=f.LINE_SPACING,y=i7(),v=Y6().STYLE,T="heatmap-label";function u(C){return C.selectAll("g."+T)}function b(C){u(C).remove()}Z.exports=function(C,A,h,p){var k=A.xaxis,w=A.yaxis;e.makeTraceGroups(p,h,"hm").each(function(R){var O=c.select(this),j=R[0],V=j.trace,H=V.xgap||0,F=V.ygap||0,U=j.z,W=j.x,q=j.y,J=j.xCenter,lt=j.yCenter,yt=I.traceIs(V,"contour"),mt=yt?"best":V.zsmooth,st=U.length,tt=e.maxRowLength(U),dt=!1,rt=!1,at,vt,it,Y,ft,ut,kt,It;for(ut=0;at===void 0&&ut0;)vt=k.c2p(W[ut]),ut--;for(vt0;)ft=w.c2p(q[ut]),ut--;ft=k._length||vt<=0||Y>=w._length||ft<=0;if(ge){var fe=O.selectAll("image").data([]);fe.exit().remove(),b(O);return}var pe,se;Pt==="fast"?(pe=tt,se=st):(pe=Wt,se=Jt);var Tt=document.createElement("canvas");Tt.width=pe,Tt.height=se;var Lt=Tt.getContext("2d",{willReadFrequently:!0}),Mt=i(V,{noNumericCheck:!0,returnArray:!0}),ee,ve;Pt==="fast"?(ee=dt?function(Zn){return tt-1-Zn}:e.identity,ve=rt?function(Zn){return st-1-Zn}:e.identity):(ee=function(Zn){return e.constrain(Math.round(k.c2p(W[Zn])-at),0,Wt)},ve=function(Zn){return e.constrain(Math.round(w.c2p(q[Zn])-Y),0,Jt)});var oe=ve(0),Te=[oe,oe],He=dt?0:1,Ge=rt?0:1,cr=0,ur=0,jr=0,Wr=0,br,Xr,nn,Le,Gt;function ne(Zn,La){if(Zn!==void 0){var Vi=Mt(Zn);return Vi[0]=Math.round(Vi[0]),Vi[1]=Math.round(Vi[1]),Vi[2]=Math.round(Vi[2]),cr+=La,ur+=Vi[0]*La,jr+=Vi[1]*La,Wr+=Vi[2]*La,Vi}return[0,0,0,0]}function Ct(Zn,La,Vi,Qa){var Ja=Zn[Vi.bin0];if(Ja===void 0)return ne(void 0,1);var Do=Zn[Vi.bin1],yo=La[Vi.bin0],Fo=La[Vi.bin1],Da=Do-Ja||0,ys=yo-Ja||0,os;return Do===void 0?Fo===void 0?os=0:yo===void 0?os=2*(Fo-Ja):os=(2*Fo-yo-Ja)*2/3:Fo===void 0?yo===void 0?os=0:os=(2*Ja-Do-yo)*2/3:yo===void 0?os=(2*Fo-Do-Ja)*2/3:os=Fo+Ja-Do-yo,ne(Ja+Vi.frac*Da+Qa.frac*(ys+Vi.frac*os))}if(Pt!=="default"){var gt=0,St;try{St=new Uint8Array(pe*se*4)}catch{St=new Array(pe*se*4)}if(Pt==="smooth"){var Nt=J||W,re=lt||q,le=new Array(Nt.length),we=new Array(re.length),Ue=new Array(Wt),qe=J?P:_,or=lt?P:_,Sr,Ar,mr;for(ut=0;utki||ki>w._length))for(kt=Cn;ktji||ji>k._length)){var Xi=a({x:Oi,y:fi},V,C._fullLayout);Xi.x=Oi,Xi.y=fi;var ci=j.z[ut][kt];ci===void 0?(Xi.z="",Xi.zLabel=""):(Xi.z=ci,Xi.zLabel=t.tickText(We,ci,"hover").text);var za=j.text&&j.text[ut]&&j.text[ut][kt];(za===void 0||za===!1)&&(za=""),Xi.text=za;var Wa=e.texttemplateString({data:[Xi,V._meta],fallback:V.texttemplatefallback,labels:Xi,locale:C._fullLayout._d3locale,template:sa});if(Wa){var ze=Wa.split("
"),Ie=ze.length,Rr=0;for(It=0;It{Z.exports={min:"zmin",max:"zmax"}}),X6=Dt((Q,Z)=>{var c=qr();Z.exports=function(g){c.select(g).selectAll(".hm image").style("opacity",function(I){return I.trace.opacity})}}),J6=Dt((Q,Z)=>{var c=tf(),g=kn(),I=g.isArrayOrTypedArray,S=Ls(),t=Xc().extractOpts;Z.exports=function(e,r,a,n,o){o||(o={});var i=o.isContour,l=e.cd[0],f=l.trace,x=e.xa,y=e.ya,v=l.x,T=l.y,u=l.z,b=l.xCenter,_=l.yCenter,P=l.zmask,M=f.zhoverformat,C=v,A=T,h,p,k,w;if(e.index!==!1){try{k=Math.round(e.index[1]),w=Math.round(e.index[0])}catch{g.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index);return}if(k<0||k>=u[0].length||w<0||w>u.length)return}else{if(c.inbox(r-v[0],r-v[v.length-1],0)>0||c.inbox(a-T[0],a-T[T.length-1],0)>0)return;if(i){var R;for(C=[2*v[0]-v[1]],R=1;R{Z.exports={attributes:eb(),supplyDefaults:hR(),calc:G6(),plot:K6(),colorbar:I1(),style:X6(),hoverPoints:J6(),moduleType:"trace",name:"heatmap",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}),pR=Dt((Q,Z)=>{Z.exports=dR()}),a7=Dt((Q,Z)=>{Z.exports=function(c,g){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}),mR=Dt((Q,Z)=>{Z.exports={eventDataKeys:["binNumber"]}}),Q6=Dt((Q,Z)=>{var c=Lg(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,texttemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=da(),r=a7(),a=mR(),n=Ia().extendFlat;Z.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:g("x"),yhoverformat:g("y"),text:n({},c.text,{}),hovertext:n({},c.hovertext,{}),orientation:c.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:r("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:r("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:I({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),texttemplate:S({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:t({editType:"plot"}),textposition:n({},c.textposition,{arrayOk:!1}),textfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:c.insidetextanchor,textangle:c.textangle,cliponaxis:c.cliponaxis,constraintext:c.constraintext,marker:c.marker,offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,zorder:c.zorder}}),gR=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=hi(),S=J0().handleText,t=R6(),e=Q6();Z.exports=function(r,a,n,o){function i(A,h){return g.coerce(r,a,e,A,h)}var l=i("x"),f=i("y"),x=i("cumulative.enabled");x&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var y=i("textposition");S(r,a,o,i,y,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var v=i("orientation",f&&!l?"h":"v"),T=v==="v"?"x":"y",u=v==="v"?"y":"x",b=l&&f?Math.min(g.minRowLength(l)&&g.minRowLength(f)):g.minRowLength(a[T]||[]);if(!b){a.visible=!1;return}a._length=b;var _=c.getComponentMethod("calendars","handleTraceDefaults");_(r,a,["x","y"],o);var P=a[u];P&&i("histfunc"),i("histnorm"),i("autobin"+T),t(r,a,i,n,o),g.coerceSelectionMarkerOpacity(a,i);var M=(a.marker.line||{}).color,C=c.getComponentMethod("errorbars","supplyDefaults");C(r,a,M||I.defaultLine,{axis:"y"}),C(r,a,M||I.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}}),tk=Dt((Q,Z)=>{var c=kn(),g=Rc(),I=Jo().traceIs,S=Cg(),t=J0().validateCornerradius,e=c.nestedProperty,r=vv().getAxisGroup,a=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],n=["x","y"];Z.exports=function(o,i){var l=i._histogramBinOpts={},f=[],x={},y=[],v,T,u,b,_,P,M;function C(yt,mt){return c.coerce(v._input,v,v._module.attributes,yt,mt)}function A(yt){return yt.orientation==="v"?"x":"y"}function h(yt,mt){var st=g.getFromTrace({_fullLayout:i},yt,mt);return st.type}function p(yt,mt,st){var tt=yt.uid+"__"+st;mt||(mt=tt);var dt=h(yt,st),rt=yt[st+"calendar"]||"",at=l[mt],vt=!0;at&&(dt===at.axType&&rt===at.calendar?(vt=!1,at.traces.push(yt),at.dirs.push(st)):(mt=tt,dt!==at.axType&&c.warn(["Attempted to group the bins of trace",yt.index,"set on a","type:"+dt,"axis","with bins on","type:"+at.axType,"axis."].join(" ")),rt!==at.calendar&&c.warn(["Attempted to group the bins of trace",yt.index,"set with a",rt,"calendar","with bins",at.calendar?"on a "+at.calendar+" calendar":"w/o a set calendar"].join(" ")))),vt&&(l[mt]={traces:[yt],dirs:[st],axType:dt,calendar:yt[st+"calendar"]||""}),yt["_"+st+"bingroup"]=mt}for(_=0;_{var c=Q_().hoverPoints,g=Ls().hoverLabelText;Z.exports=function(I,S,t,e,r){var a=c(I,S,t,e,r);if(a){I=a[0];var n=I.cd[I.index],o=I.cd[0].trace;if(!o.cumulative.enabled){var i=o.orientation==="h"?"y":"x";I[i+"Label"]=g(I[i+"a"],[n.ph0,n.ph1],o[i+"hoverformat"])}return a}}}),o7=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){if(c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"zLabelVal"in g&&(c.z=g.zLabelVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),!(I.cumulative||{}).enabled){var e=Array.isArray(t)?S[0].pts[t[0]][t[1]]:S[t].pts;c.pointNumbers=e,c.binNumber=c.pointNumber,delete c.pointNumber,delete c.pointIndex;var r;if(I._indexToPoints){r=[];for(var a=0;a{Z.exports={attributes:Q6(),layoutAttributes:F6(),supplyDefaults:gR(),crossTraceDefaults:tk(),supplyLayoutDefaults:ZM(),calc:r7().calc,crossTraceCalc:zr().crossTraceCalc,plot:nx().plot,layerName:"barlayer",style:xm().style,styleOnSelect:xm().styleOnSelect,colorbar:xo(),hoverPoints:vR(),selectPoints:tb(),eventData:o7(),moduleType:"trace",name:"histogram",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}),xR=Dt((Q,Z)=>{Z.exports=yR()}),ek=Dt((Q,Z)=>{var c=Q6(),g=a7(),I=eb(),S=Ho(),t=dh().axisHoverFormat,{hovertemplateAttrs:e,texttemplateAttrs:r,templatefallbackAttrs:a}=Zu(),n=kc(),o=Ia().extendFlat;Z.exports=o({x:c.x,y:c.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:g("x"),nbinsy:c.nbinsy,ybins:g("y"),autobinx:c.autobinx,autobiny:c.autobiny,bingroup:o({},c.bingroup,{}),xbingroup:o({},c.bingroup,{}),ybingroup:o({},c.bingroup,{}),xgap:I.xgap,ygap:I.ygap,zsmooth:I.zsmooth,xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z",1),hovertemplate:e({},{keys:["z"]}),hovertemplatefallback:a(),texttemplate:r({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:a({editType:"plot"}),textfont:I.textfont,showlegend:o({},S.showlegend,{dflt:!1})},n("",{cLetter:"z",autoColorDflt:!1}))}),s7=Dt((Q,Z)=>{var c=Jo(),g=kn();Z.exports=function(I,S,t,e){var r=t("x"),a=t("y"),n=g.minRowLength(r),o=g.minRowLength(a);if(!n||!o){S.visible=!1;return}S._length=Math.min(n,o);var i=c.getComponentMethod("calendars","handleTraceDefaults");i(I,S,["x","y"],e);var l=t("z")||t("marker.color");l&&t("histfunc"),t("histnorm"),t("autobinx"),t("autobiny")}}),_R=Dt((Q,Z)=>{var c=kn(),g=s7(),I=XM(),S=mc(),t=$w(),e=ek();Z.exports=function(r,a,n,o){function i(l,f){return c.coerce(r,a,e,l,f)}g(r,a,i,o),a.visible!==!1&&(I(r,a,i,o),S(r,a,o,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),t(i,o),i("xhoverformat"),i("yhoverformat"))}}),bR=Dt((Q,Z)=>{var c=J6(),g=Ls().hoverLabelText;Z.exports=function(I,S,t,e,r){var a=c(I,S,t,e,r);if(a){I=a[0];var n=I.index,o=n[0],i=n[1],l=I.cd[0],f=l.trace,x=l.xRanges[i],y=l.yRanges[o];return I.xLabel=g(I.xa,[x[0],x[1]],f.xhoverformat),I.yLabel=g(I.ya,[y[0],y[1]],f.yhoverformat),a}}}),wR=Dt((Q,Z)=>{Z.exports={attributes:ek(),supplyDefaults:_R(),crossTraceDefaults:tk(),calc:G6(),plot:K6(),layerName:"heatmaplayer",colorbar:I1(),style:X6(),hoverPoints:bR(),eventData:o7(),moduleType:"trace",name:"histogram2d",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}),kR=Dt((Q,Z)=>{Z.exports=wR()}),rk=Dt((Q,Z)=>{Z.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}),Zw=Dt((Q,Z)=>{var c=eb(),g=ef(),I=dh(),S=I.axisHoverFormat,t=I.descriptionOnlyNumbers,e=kc(),r=kd().dash,a=da(),n=Ia().extendFlat,o=rk(),i=o.COMPARISON_OPS2,l=o.INTERVAL_OPS,f=g.line;Z.exports=n({z:c.z,x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:g.xperiod0,yperiod0:g.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,text:c.text,hovertext:c.hovertext,transpose:c.transpose,xtype:c.xtype,ytype:c.ytype,xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:n({},c.texttemplate,{}),texttemplatefallback:c.texttemplatefallback,textfont:n({},c.textfont,{}),hoverongaps:c.hoverongaps,connectgaps:n({},c.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:a({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:t("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(l),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:n({},f.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:n({},f.smoothing,{}),editType:"plot"},zorder:g.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}),l7=Dt((Q,Z)=>{var c=ek(),g=Zw(),I=kc(),S=dh().axisHoverFormat,t=Ia().extendFlat;Z.exports=t({x:c.x,y:c.y,z:c.z,marker:c.marker,histnorm:c.histnorm,histfunc:c.histfunc,nbinsx:c.nbinsx,xbins:c.xbins,nbinsy:c.nbinsy,ybins:c.ybins,autobinx:c.autobinx,autobiny:c.autobiny,bingroup:c.bingroup,xbingroup:c.xbingroup,ybingroup:c.ybingroup,autocontour:g.autocontour,ncontours:g.ncontours,contours:g.contours,line:{color:g.line.color,width:t({},g.line.width,{dflt:.5}),dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,texttemplate:g.texttemplate,texttemplatefallback:g.texttemplatefallback,textfont:g.textfont},I("",{cLetter:"z",editTypeOverride:"calc"}))}),nk=Dt((Q,Z)=>{Z.exports=function(c,g,I,S){var t=S("contours.start"),e=S("contours.end"),r=t===!1||e===!1,a=I("contours.size"),n;r?n=g.autocontour=!0:n=I("autocontour",!1),(n||!a)&&I("ncontours")}}),u7=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I,S,t){t||(t={});var e=g("contours.showlabels");if(e){var r=I.font;c.coerceFont(g,"contours.labelfont",r,{overrideDflt:{color:S}}),g("contours.labelformat")}t.hasHover!==!1&&g("zhoverformat")}}),ik=Dt((Q,Z)=>{var c=mc(),g=u7();Z.exports=function(I,S,t,e,r){var a=t("contours.coloring"),n,o="";a==="fill"&&(n=t("contours.showlines")),n!==!1&&(a!=="lines"&&(o=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(I.showlegend!==!0&&(S.showlegend=!1),S._dfltShowLegend=!1,c(I,S,e,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),g(t,e,o,r)}}),TR=Dt((Q,Z)=>{var c=kn(),g=s7(),I=nk(),S=ik(),t=$w(),e=l7();Z.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,e,f,x)}function l(f){return c.coerce2(r,a,e,f)}g(r,a,i,o),a.visible!==!1&&(I(r,a,i,l),S(r,a,i,o),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),a.contours&&a.contours.coloring==="heatmap"&&t(i,o))}}),c7=Dt((Q,Z)=>{var c=Ls(),g=kn();Z.exports=function(S,t){var e=S.contours;if(S.autocontour){var r=S.zmin,a=S.zmax;(S.zauto||r===void 0)&&(r=g.aggNums(Math.min,null,t)),(S.zauto||a===void 0)&&(a=g.aggNums(Math.max,null,t));var n=I(r,a,S.ncontours);e.size=n.dtick,e.start=c.tickFirst(n),n.range.reverse(),e.end=c.tickFirst(n),e.start===r&&(e.start+=e.size),e.end===a&&(e.end-=e.size),e.start>e.end&&(e.start=e.end=(e.start+e.end)/2),S._input.contours||(S._input.contours={}),g.extendFlat(S._input.contours,{start:e.start,end:e.end,size:e.size}),S._input.autocontour=!0}else if(e.type!=="constraint"){var o=e.start,i=e.end,l=S._input.contours;if(o>i&&(e.start=l.start=i,i=e.end=l.end=o,o=e.start),!(e.size>0)){var f;o===i?f=1:f=I(o,i,S.ncontours).dtick,l.size=e.size=f}}};function I(S,t,e){var r={type:"linear",range:[S,t]};return c.autoTicks(r,(t-S)/(e||15)),r}}),Gw=Dt((Q,Z)=>{Z.exports=function(c){return c.end+c.size/1e6}}),h7=Dt((Q,Z)=>{var c=Xc(),g=G6(),I=c7(),S=Gw();Z.exports=function(t,e){var r=g(t,e),a=r[0].z;I(e,a);var n=e.contours,o=c.extractOpts(e),i;if(n.coloring==="heatmap"&&o.auto&&e.autocontour===!1){var l=n.start,f=S(n),x=n.size||1,y=Math.floor((f-l)/x)+1;isFinite(x)||(x=1,y=1);var v=l-x/2,T=v+y*x;i=[v,T]}else i=a;return c.calc(t,e,{vals:i,cLetter:"z"}),r}}),Yw=Dt((Q,Z)=>{Z.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}),f7=Dt((Q,Z)=>{var c=Yw();Z.exports=function(I){var S=I[0].z,t=S.length,e=S[0].length,r=t===2||e===2,a,n,o,i,l,f,x,y,v;for(n=0;nI?0:1)+(S[0][1]>I?0:2)+(S[1][1]>I?0:4)+(S[1][0]>I?0:8);if(t===5||t===10){var e=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return I>e?t===5?713:1114:t===5?104:208}return t===15?0:t}}),d7=Dt((Q,Z)=>{var c=kn(),g=Yw();Z.exports=function(a,n,o){var i,l,f,x,y;for(n=n||.01,o=o||.01,f=0;f20?(x=g.CHOOSESADDLE[x][(y[0]||y[1])<0?0:1],a.crossings[f]=g.SADDLEREMAINDER[x]):delete a.crossings[f],y=g.NEWDELTA[x],!y){c.log("Found bad marching index:",x,n,a.level);break}v.push(r(a,n,y)),n[0]+=y[0],n[1]+=y[1],f=n.join(","),I(v[v.length-1],v[v.length-2],i,l)&&v.pop();var M=y[0]&&(n[0]<0||n[0]>u-2)||y[1]&&(n[1]<0||n[1]>T-2),C=n[0]===b[0]&&n[1]===b[1]&&y[0]===_[0]&&y[1]===_[1];if(C||o&&M)break;x=a.crossings[f]}P===1e4&&c.log("Infinite loop in contour?");var A=I(v[0],v[v.length-1],i,l),h=0,p=.2*a.smoothing,k=[],w=0,R,O,j,V,H,F,U,W,q,J,lt;for(P=1;P=w;P--)if(R=k[P],R=w&&R+k[O]W&&q--,a.edgepaths[q]=lt.concat(v,J));break}tt||(a.edgepaths[W]=v.concat(J))}for(W=0;W20&&n?a===208||a===1114?i=o[0]===0?1:-1:l=o[1]===0?1:-1:g.BOTTOMSTART.indexOf(a)!==-1?l=1:g.LEFTSTART.indexOf(a)!==-1?i=1:g.TOPSTART.indexOf(a)!==-1?l=-1:i=-1,[i,l]}function r(a,n,o){var i=n[0]+Math.max(o[0],0),l=n[1]+Math.max(o[1],0),f=a.z[l][i],x=a.xaxis,y=a.yaxis;if(o[1]){var v=(a.level-f)/(a.z[l][i+1]-f),T=(v!==1?(1-v)*x.c2l(a.x[i]):0)+(v!==0?v*x.c2l(a.x[i+1]):0);return[x.c2p(x.l2c(T),!0),y.c2p(a.y[l],!0),i+v,l]}else{var u=(a.level-f)/(a.z[l+1][i]-f),b=(u!==1?(1-u)*y.c2l(a.y[l]):0)+(u!==0?u*y.c2l(a.y[l+1]):0);return[x.c2p(a.x[i],!0),y.c2p(y.l2c(b),!0),i,l+u]}}}),AR=Dt((Q,Z)=>{var c=rk(),g=Yi();Z.exports={"[]":S("[]"),"][":S("]["),">":t(">"),"<":t("<"),"=":t("=")};function I(e,r){var a=Array.isArray(r),n;function o(i){return g(i)?+i:null}return c.COMPARISON_OPS2.indexOf(e)!==-1?n=o(a?r[0]:r):c.INTERVAL_OPS.indexOf(e)!==-1?n=a?[o(r[0]),o(r[1])]:[o(r),o(r)]:c.SET_OPS.indexOf(e)!==-1&&(n=a?r.map(o):[o(r)]),n}function S(e){return function(r){r=I(e,r);var a=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]);return{start:a,end:n,size:n-a}}}function t(e){return function(r){return r=I(e,r),{start:r,end:1/0,size:1/0}}}}),p7=Dt((Q,Z)=>{var c=kn(),g=AR(),I=Gw();Z.exports=function(S,t,e){for(var r=S.type==="constraint"?g[S._operation](S.value):S,a=r.size,n=[],o=I(r),i=e.trace._carpetTrace,l=i?{xaxis:i.aaxis,yaxis:i.baxis,x:e.a,y:e.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:e.x,y:e.y},f=r.start;f1e3){c.warn("Too many contours, clipping at 1000",S);break}return n}}),m7=Dt((Q,Z)=>{var c=kn();Z.exports=function(I,S){var t,e,r,a=function(i){return i.reverse()},n=function(i){return i};switch(S){case"=":case"<":return I;case">":for(I.length!==1&&c.warn("Contour data invalid for the specified inequality operation."),e=I[0],t=0;t{Z.exports=function(c,g){var I=c[0],S=I.z,t;switch(g.type){case"levels":var e=Math.min(S[0][0],S[0][1]);for(t=0;tr.level||r.starts.length&&e===r.level)}break;case"constraint":if(I.prefixBoundary=!1,I.edgepaths.length)return;var a=I.x.length,n=I.y.length,o=-1/0,i=1/0;for(t=0;t":l>o&&(I.prefixBoundary=!0);break;case"<":(lo||I.starts.length&&x===i)&&(I.prefixBoundary=!0);break;case"][":f=Math.min(l[0],l[1]),x=Math.max(l[0],l[1]),fo&&(I.prefixBoundary=!0);break}break}}}),ak=Dt(Q=>{var Z=qr(),c=kn(),g=Vs(),I=Xc(),S=ec(),t=Ls(),e=i0(),r=K6(),a=f7(),n=d7(),o=p7(),i=m7(),l=g7(),f=Yw(),x=f.LABELOPTIMIZER;Q.plot=function(M,C,A,h){var p=C.xaxis,k=C.yaxis;c.makeTraceGroups(h,A,"contour").each(function(w){var R=Z.select(this),O=w[0],j=O.trace,V=O.x,H=O.y,F=j.contours,U=o(F,C,O),W=c.ensureSingle(R,"g","heatmapcoloring"),q=[];F.coloring==="heatmap"&&(q=[w]),r(M,C,q,W),a(U),n(U);var J=p.c2p(V[0],!0),lt=p.c2p(V[V.length-1],!0),yt=k.c2p(H[0],!0),mt=k.c2p(H[H.length-1],!0),st=[[J,mt],[lt,mt],[lt,yt],[J,yt]],tt=U;F.type==="constraint"&&(tt=i(U,F._operation)),y(R,st,F),v(R,tt,st,F),u(R,U,M,O,F),_(R,C,M,O,st)})};function y(M,C,A){var h=c.ensureSingle(M,"g","contourbg"),p=h.selectAll("path").data(A.coloring==="fill"?[0]:[]);p.enter().append("path"),p.exit().remove(),p.attr("d","M"+C.join("L")+"Z").style("stroke","none")}function v(M,C,A,h){var p=h.coloring==="fill"||h.type==="constraint"&&h._operation!=="=",k="M"+A.join("L")+"Z";p&&l(C,h);var w=c.ensureSingle(M,"g","contourfill"),R=w.selectAll("path").data(p?C:[]);R.enter().append("path"),R.exit().remove(),R.each(function(O){var j=(O.prefixBoundary?k:"")+T(O,A);j?Z.select(this).attr("d",j).style("stroke","none"):Z.select(this).remove()})}function T(M,C){var A="",h=0,p=M.edgepaths.map(function(lt,yt){return yt}),k=!0,w,R,O,j,V,H;function F(lt){return Math.abs(lt[1]-C[0][1])<.01}function U(lt){return Math.abs(lt[1]-C[2][1])<.01}function W(lt){return Math.abs(lt[0]-C[0][0])<.01}function q(lt){return Math.abs(lt[0]-C[2][0])<.01}for(;p.length;){for(H=g.smoothopen(M.edgepaths[h],M.smoothing),A+=k?H:H.replace(/^M/,"L"),p.splice(p.indexOf(h),1),w=M.edgepaths[h][M.edgepaths[h].length-1],j=-1,O=0;O<4;O++){if(!w){c.log("Missing end?",h,M);break}for(F(w)&&!q(w)?R=C[1]:W(w)?R=C[0]:U(w)?R=C[3]:q(w)&&(R=C[2]),V=0;V=0&&(R=J,j=V):Math.abs(w[1]-R[1])<.01?Math.abs(w[1]-J[1])<.01&&(J[0]-w[0])*(R[0]-J[0])>=0&&(R=J,j=V):c.log("endpt to newendpt is not vert. or horz.",w,R,J)}if(w=R,j>=0)break;A+="L"+R}if(j===M.edgepaths.length){c.log("unclosed perimeter path");break}h=j,k=p.indexOf(h)===-1,k&&(h=p[0],A+="Z")}for(h=0;hx.MAXCOST*2)break;F&&(R/=2),w=j-R/2,O=w+R*1.5}if(H<=x.MAXCOST)return V};function b(M,C,A,h){var p=C.width/2,k=C.height/2,w=M.x,R=M.y,O=M.theta,j=Math.cos(O)*p,V=Math.sin(O)*p,H=(w>h.center?h.right-w:w-h.left)/(j+Math.abs(Math.sin(O)*k)),F=(R>h.middle?h.bottom-R:R-h.top)/(Math.abs(V)+Math.cos(O)*k);if(H<1||F<1)return 1/0;var U=x.EDGECOST*(1/(H-1)+1/(F-1));U+=x.ANGLECOST*O*O;for(var W=w-j,q=R-V,J=w+j,lt=R+V,yt=0;yt{var c=qr(),g=Xc(),I=Gw();Z.exports=function(S){var t=S.contours,e=t.start,r=I(t),a=t.size||1,n=Math.floor((r-e)/a)+1,o=t.coloring==="lines"?0:1,i=g.extractOpts(S);isFinite(a)||(a=1,n=1);var l=i.reversescale?g.flipScale(i.colorscale):i.colorscale,f=l.length,x=new Array(f),y=new Array(f),v,T,u=i.min,b=i.max;if(t.coloring==="heatmap"){for(T=0;T=b)&&(e<=u&&(e=u),r>=b&&(r=b),n=Math.floor((r-e)/a)+1,o=0),T=0;Tu&&(x.unshift(u),y.unshift(y[0])),x[x.length-1]{var c=qr(),g=Vs(),I=X6(),S=v7();Z.exports=function(t){var e=c.select(t).selectAll("g.contour");e.style("opacity",function(r){return r[0].trace.opacity}),e.each(function(r){var a=c.select(this),n=r[0].trace,o=n.contours,i=n.line,l=o.size||1,f=o.start,x=o.type==="constraint",y=!x&&o.coloring==="lines",v=!x&&o.coloring==="fill",T=y||v?S(n):null;a.selectAll("g.contourlevel").each(function(_){c.select(this).selectAll("path").call(g.lineGroupStyle,i.width,y?T(_.level):i.color,i.dash)});var u=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(_){g.font(c.select(this),{weight:u.weight,style:u.style,variant:u.variant,textcase:u.textcase,lineposition:u.lineposition,shadow:u.shadow,family:u.family,size:u.size,color:u.color||(y?T(_.level):i.color)})}),x)a.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(v){var b;a.selectAll("g.contourfill path").style("fill",function(_){return b===void 0&&(b=_.level),T(_.level+.5*l)}),b===void 0&&(b=f),a.selectAll("g.contourbg path").style("fill",T(b-.5*l))}}),I(t)}}),sk=Dt((Q,Z)=>{var c=Xc(),g=v7(),I=Gw();function S(t,e,r){var a=e.contours,n=e.line,o=a.size||1,i=a.coloring,l=g(e,{isColorbar:!0});if(i==="heatmap"){var f=c.extractOpts(e);r._fillgradient=f.reversescale?c.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else i==="fill"&&(r._fillcolor=l);r._line={color:i==="lines"?l:n.color,width:a.showlines!==!1?n.width:0,dash:n.dash},r._levels={start:a.start,end:I(a),size:o}}Z.exports={min:"zmin",max:"zmax",calc:S}}),y7=Dt((Q,Z)=>{var c=hi(),g=J6();Z.exports=function(I,S,t,e,r){r||(r={}),r.isContour=!0;var a=g(I,S,t,e,r);return a&&a.forEach(function(n){var o=n.trace;o.contours.type==="constraint"&&(o.fillcolor&&c.opacity(o.fillcolor)?n.color=c.addOpacity(o.fillcolor,1):o.contours.showlines&&c.opacity(o.line.color)&&(n.color=c.addOpacity(o.line.color,1)))}),a}}),MR=Dt((Q,Z)=>{Z.exports={attributes:l7(),supplyDefaults:TR(),crossTraceDefaults:tk(),calc:h7(),plot:ak().plot,layerName:"contourlayer",style:ok(),colorbar:sk(),hoverPoints:y7(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}),SR=Dt((Q,Z)=>{Z.exports=MR()}),x7=Dt((Q,Z)=>{var c=Yi(),g=u7(),I=hi(),S=I.addOpacity,t=I.opacity,e=rk(),r=kn().isArrayOrTypedArray,a=e.CONSTRAINT_REDUCTION,n=e.COMPARISON_OPS2;Z.exports=function(i,l,f,x,y,v){var T=l.contours,u,b,_,P=f("contours.operation");if(T._operation=a[P],o(f,T),P==="="?u=T.showlines=!0:(u=f("contours.showlines"),_=f("fillcolor",S((i.line||{}).color||y,.5))),u){var M=_&&t(_)?S(l.fillcolor,1):y;b=f("line.color",M),f("line.width",2),f("line.dash")}f("line.smoothing"),g(f,x,b,v)};function o(i,l){var f;n.indexOf(l.operation)===-1?(i("contours.value",[0,1]),r(l.value)?l.value.length>2?l.value=l.value.slice(2):l.length===0?l.value=[0,1]:l.length<2?(f=parseFloat(l.value[0]),l.value=[f,f+1]):l.value=[parseFloat(l.value[0]),parseFloat(l.value[1])]:c(l.value)&&(f=parseFloat(l.value),l.value=[f,f+1])):(i("contours.value",0),c(l.value)||(r(l.value)?l.value=parseFloat(l.value[0]):l.value=0))}}),ER=Dt((Q,Z)=>{var c=kn(),g=H6(),I=Rp(),S=x7(),t=nk(),e=ik(),r=$w(),a=Zw();Z.exports=function(n,o,i,l){function f(T,u){return c.coerce(n,o,a,T,u)}function x(T){return c.coerce2(n,o,a,T)}var y=g(n,o,f,l);if(!y){o.visible=!1;return}I(n,o,l,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var v=f("contours.type")==="constraint";f("connectgaps",c.isArray1D(o.z)),v?S(n,o,f,l,i):(t(n,o,f,x),e(n,o,f,l)),o.contours&&o.contours.coloring==="heatmap"&&r(f,l),f("zorder")}}),CR=Dt((Q,Z)=>{Z.exports={attributes:Zw(),supplyDefaults:ER(),calc:h7(),plot:ak().plot,style:ok(),colorbar:sk(),hoverPoints:y7(),moduleType:"trace",name:"contour",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}),LR=Dt((Q,Z)=>{Z.exports=CR()}),_7=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=I0(),t=ef(),e=Ho(),r=kc(),a=kd().dash,n=Ia().extendFlat,o=t.marker,i=t.line,l=o.line;Z.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:n({},t.hovertext,{}),line:{color:i.color,width:i.width,dash:a,backoff:i.backoff,shape:n({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:t.connectgaps,cliponaxis:t.cliponaxis,fill:n({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),marker:n({symbol:o.symbol,opacity:o.opacity,angle:o.angle,angleref:o.angleref,standoff:o.standoff,maxdisplayed:o.maxdisplayed,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,line:n({width:l.width,editType:"calc"},r("marker.line")),gradient:o.gradient,editType:"calc"},r("marker")),textfont:t.textfont,textposition:t.textposition,selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:t.hoveron,hovertemplate:c(),hovertemplatefallback:I()}}),PR=Dt((Q,Z)=>{var c=kn(),g=vm(),I=Tc(),S=s0(),t=z0(),e=xv(),r=x0(),a=O0(),n=_7();Z.exports=function(o,i,l,f){function x(P,M){return c.coerce(o,i,n,P,M)}var y=x("a"),v=x("b"),T=x("c"),u;if(y?(u=y.length,v?(u=Math.min(u,v.length),T&&(u=Math.min(u,T.length))):T?u=Math.min(u,T.length):u=0):v&&T&&(u=Math.min(v.length,T.length)),!u){i.visible=!1;return}i._length=u,x("sum"),x("text"),x("hovertext"),i.hoveron!=="fills"&&(x("hovertemplate"),x("hovertemplatefallback"));var b=u{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot;return t.aLabel=c.tickText(e.aaxis,g.a,!0).text,t.bLabel=c.tickText(e.baxis,g.b,!0).text,t.cLabel=c.tickText(e.caxis,g.c,!0).text,t}}),zR=Dt((Q,Z)=>{var c=Yi(),g=F0(),I=ct(),S=Bt(),t=me().calcMarkerSize,e=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};Z.exports=function(a,n){var o=a._fullLayout[n.subplot],i=o.sum,l=n.sum||i,f={a:n.a,b:n.b,c:n.c},x=n.ids,y,v,T,u,b,_;for(y=0;y{var c=Ka();Z.exports=function(g,I,S){var t=I.plotContainer;t.select(".scatterlayer").selectAll("*").remove();for(var e=I.xaxis,r=I.yaxis,a={xaxis:e,yaxis:r,plot:t,layerClipId:I._hasClipOnAxisFalse?I.clipIdRelative:null},n=I.layers.frontplot.select("g.scatterlayer"),o=0;o{var c=Md();Z.exports=function(g,I,S,t){var e=c(g,I,S,t);if(!e||e[0].index===!1)return;var r=e[0];if(r.index===void 0){var a=1-r.y0/g.ya._length,n=g.xa._length,o=n*a/2,i=n-o;return r.x0=Math.max(Math.min(r.x0,i),o),r.x1=Math.max(Math.min(r.x1,i),o),e}var l=r.cd[r.index],f=r.trace,x=r.subplot;r.a=l.a,r.b=l.b,r.c=l.c,r.xLabelVal=void 0,r.yLabelVal=void 0;var y={};y[f.subplot]={_subplot:x};var v=f._module.formatLabels(l,f,y);r.aLabel=v.aLabel,r.bLabel=v.bLabel,r.cLabel=v.cLabel;var T=l.hi||f.hoverinfo,u=[];function b(P,M){u.push(P._hovertitle+": "+M)}if(!f.hovertemplate){var _=T.split("+");_.indexOf("all")!==-1&&(_=["a","b","c"]),_.indexOf("a")!==-1&&b(x.aaxis,r.aLabel),_.indexOf("b")!==-1&&b(x.baxis,r.bLabel),_.indexOf("c")!==-1&&b(x.caxis,r.cLabel)}return r.extraText=u.join("
"),r.hovertemplate=f.hovertemplate,e}}),FR=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){if(g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),S[t]){var e=S[t];c.a=e.a,c.b=e.b,c.c=e.c}else c.a=g.a,c.b=g.b,c.c=g.c;return c}}),RR=Dt((Q,Z)=>{var c=qr(),g=ro(),I=Jo(),S=kn(),t=S.strTranslate,e=S._,r=hi(),a=Vs(),n=i0(),o=Ia().extendFlat,i=Kc(),l=Ls(),f=up(),x=tf(),y=v0(),v=y.freeMode,T=y.rectMode,u=lp(),b=vf().prepSelect,_=vf().selectOnClick,P=vf().clearOutline,M=vf().clearSelectionsCache,C=ic();function A(U,W){this.id=U.id,this.graphDiv=U.graphDiv,this.init(W),this.makeFramework(W),this.updateFx(W),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}Z.exports=A;var h=A.prototype;h.init=function(U){this.container=U._ternarylayer,this.defs=U._defs,this.layoutId=U._uid,this.traceHash={},this.layers={}},h.plot=function(U,W){var q=this,J=W[q.id],lt=W._size;q._hasClipOnAxisFalse=!1;for(var yt=0;ytp*dt?(kt=dt,ut=kt*p):(ut=tt,kt=ut/p),It=mt*ut/tt,Pt=st*kt/dt,Y=W.l+W.w*lt-ut/2,ft=W.t+W.h*(1-yt)-kt/2,q.x0=Y,q.y0=ft,q.w=ut,q.h=kt,q.sum=rt,q.xaxis={type:"linear",range:[at+2*it-rt,rt-at-2*vt],domain:[lt-It/2,lt+It/2],_id:"x"},n(q.xaxis,q.graphDiv._fullLayout),q.xaxis.setScale(),q.xaxis.isPtWithinRange=function(ee){return ee.a>=q.aaxis.range[0]&&ee.a<=q.aaxis.range[1]&&ee.b>=q.baxis.range[1]&&ee.b<=q.baxis.range[0]&&ee.c>=q.caxis.range[1]&&ee.c<=q.caxis.range[0]},q.yaxis={type:"linear",range:[at,rt-vt-it],domain:[yt-Pt/2,yt+Pt/2],_id:"y"},n(q.yaxis,q.graphDiv._fullLayout),q.yaxis.setScale(),q.yaxis.isPtWithinRange=function(){return!0};var qt=q.yaxis.domain[0],Wt=q.aaxis=o({},U.aaxis,{range:[at,rt-vt-it],side:"left",tickangle:(+U.aaxis.tickangle||0)-30,domain:[qt,qt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(Wt,q.graphDiv._fullLayout),Wt.setScale();var Jt=q.baxis=o({},U.baxis,{range:[rt-at-it,vt],side:"bottom",domain:q.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ut});n(Jt,q.graphDiv._fullLayout),Jt.setScale();var ge=q.caxis=o({},U.caxis,{range:[rt-at-vt,it],side:"right",tickangle:(+U.caxis.tickangle||0)+30,domain:[qt,qt+Pt*p],anchor:"free",position:0,_id:"y",_length:ut});n(ge,q.graphDiv._fullLayout),ge.setScale();var fe="M"+Y+","+(ft+kt)+"h"+ut+"l-"+ut/2+",-"+kt+"Z";q.clipDef.select("path").attr("d",fe),q.layers.plotbg.select("path").attr("d",fe);var pe="M0,"+kt+"h"+ut+"l-"+ut/2+",-"+kt+"Z";q.clipDefRelative.select("path").attr("d",pe);var se=t(Y,ft);q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",se),q.clipDefRelative.select("path").attr("transform",null);var Tt=t(Y-Jt._offset,ft+kt);q.layers.baxis.attr("transform",Tt),q.layers.bgrid.attr("transform",Tt);var Lt=t(Y+ut/2,ft)+"rotate(30)"+t(0,-Wt._offset);q.layers.aaxis.attr("transform",Lt),q.layers.agrid.attr("transform",Lt);var Mt=t(Y+ut/2,ft)+"rotate(-30)"+t(0,-ge._offset);q.layers.caxis.attr("transform",Mt),q.layers.cgrid.attr("transform",Mt),q.drawAxes(!0),q.layers.aline.select("path").attr("d",Wt.showline?"M"+Y+","+(ft+kt)+"l"+ut/2+",-"+kt:"M0,0").call(r.stroke,Wt.linecolor||"#000").style("stroke-width",(Wt.linewidth||0)+"px"),q.layers.bline.select("path").attr("d",Jt.showline?"M"+Y+","+(ft+kt)+"h"+ut:"M0,0").call(r.stroke,Jt.linecolor||"#000").style("stroke-width",(Jt.linewidth||0)+"px"),q.layers.cline.select("path").attr("d",ge.showline?"M"+(Y+ut/2)+","+ft+"l"+ut/2+","+kt:"M0,0").call(r.stroke,ge.linecolor||"#000").style("stroke-width",(ge.linewidth||0)+"px"),q.graphDiv._context.staticPlot||q.initInteractions(),a.setClipUrl(q.layers.frontplot,q._hasClipOnAxisFalse?null:q.clipId,q.graphDiv)},h.drawAxes=function(U){var W=this,q=W.graphDiv,J=W.id.substr(7)+"title",lt=W.layers,yt=W.aaxis,mt=W.baxis,st=W.caxis;if(W.drawAx(yt),W.drawAx(mt),W.drawAx(st),U){var tt=Math.max(yt.showticklabels?yt.tickfont.size/2:0,(st.showticklabels?st.tickfont.size*.75:0)+(st.ticks==="outside"?st.ticklen*.87:0)),dt=(mt.showticklabels?mt.tickfont.size:0)+(mt.ticks==="outside"?mt.ticklen:0)+3;lt["a-title"]=u.draw(q,"a"+J,{propContainer:yt,propName:W.id+".aaxis.title.text",placeholder:e(q,"Click to enter Component A title"),attributes:{x:W.x0+W.w/2,y:W.y0-yt.title.font.size/3-tt,"text-anchor":"middle"}}),lt["b-title"]=u.draw(q,"b"+J,{propContainer:mt,propName:W.id+".baxis.title.text",placeholder:e(q,"Click to enter Component B title"),attributes:{x:W.x0-dt,y:W.y0+W.h+mt.title.font.size*.83+dt,"text-anchor":"middle"}}),lt["c-title"]=u.draw(q,"c"+J,{propContainer:st,propName:W.id+".caxis.title.text",placeholder:e(q,"Click to enter Component C title"),attributes:{x:W.x0+W.w+dt,y:W.y0+W.h+st.title.font.size*.83+dt,"text-anchor":"middle"}})}},h.drawAx=function(U){var W=this,q=W.graphDiv,J=U._name,lt=J.charAt(0),yt=U._id,mt=W.layers[J],st=30,tt=lt+"tickLayout",dt=k(U);W[tt]!==dt&&(mt.selectAll("."+yt+"tick").remove(),W[tt]=dt),U.setScale();var rt=l.calcTicks(U),at=l.clipEnds(U,rt),vt=l.makeTransTickFn(U),it=l.getTickSigns(U)[2],Y=S.deg2rad(st),ft=it*(U.linewidth||1)/2,ut=it*U.ticklen,kt=W.w,It=W.h,Pt=lt==="b"?"M0,"+ft+"l"+Math.sin(Y)*ut+","+Math.cos(Y)*ut:"M"+ft+",0l"+Math.cos(Y)*ut+","+-Math.sin(Y)*ut,qt={a:"M0,0l"+It+",-"+kt/2,b:"M0,0l-"+kt/2+",-"+It,c:"M0,0l-"+It+","+kt/2}[lt];l.drawTicks(q,U,{vals:U.ticks==="inside"?at:rt,layer:mt,path:Pt,transFn:vt,crisp:!1}),l.drawGrid(q,U,{vals:at,layer:W.layers[lt+"grid"],path:qt,transFn:vt,crisp:!1}),l.drawLabels(q,U,{vals:rt,layer:mt,transFn:vt,labelFns:l.makeLabelFns(U,0,st)})};function k(U){return U.ticks+String(U.ticklen)+String(U.showticklabels)}var w=C.MINZOOM/2+.87,R="m-0.87,.5h"+w+"v3h-"+(w+5.2)+"l"+(w/2+2.6)+",-"+(w*.87+4.5)+"l2.6,1.5l-"+w/2+","+w*.87+"Z",O="m0.87,.5h-"+w+"v3h"+(w+5.2)+"l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-2.6,1.5l"+w/2+","+w*.87+"Z",j="m0,1l"+w/2+","+w*.87+"l2.6,-1.5l-"+(w/2+2.6)+",-"+(w*.87+4.5)+"l-"+(w/2+2.6)+","+(w*.87+4.5)+"l2.6,1.5l"+w/2+",-"+w*.87+"Z",V="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",H=!0;h.clearOutline=function(){M(this.dragOptions),P(this.dragOptions.gd)},h.initInteractions=function(){var U=this,W=U.layers.plotbg.select("path").node(),q=U.graphDiv,J=q._fullLayout._zoomlayer,lt,yt;this.dragOptions={element:W,gd:q,plotinfo:{id:U.id,domain:q._fullLayout[U.id].domain,xaxis:U.xaxis,yaxis:U.yaxis},subplot:U.id,prepFn:function(Tt,Lt,Mt){U.dragOptions.xaxes=[U.xaxis],U.dragOptions.yaxes=[U.yaxis],lt=q._fullLayout._invScaleX,yt=q._fullLayout._invScaleY;var ee=U.dragOptions.dragmode=q._fullLayout.dragmode;v(ee)?U.dragOptions.minDrag=1:U.dragOptions.minDrag=void 0,ee==="zoom"?(U.dragOptions.moveFn=Jt,U.dragOptions.clickFn=kt,U.dragOptions.doneFn=ge,It(Tt,Lt,Mt)):ee==="pan"?(U.dragOptions.moveFn=pe,U.dragOptions.clickFn=kt,U.dragOptions.doneFn=se,fe(),U.clearOutline(q)):(T(ee)||v(ee))&&b(Tt,Lt,Mt,U.dragOptions,ee)}};var mt,st,tt,dt,rt,at,vt,it,Y,ft;function ut(Tt){var Lt={};return Lt[U.id+".aaxis.min"]=Tt.a,Lt[U.id+".baxis.min"]=Tt.b,Lt[U.id+".caxis.min"]=Tt.c,Lt}function kt(Tt,Lt){var Mt=q._fullLayout.clickmode;F(q),Tt===2&&(q.emit("plotly_doubleclick",null),I.call("_guiRelayout",q,ut({a:0,b:0,c:0}))),Mt.indexOf("select")>-1&&Tt===1&&_(Lt,q,[U.xaxis],[U.yaxis],U.id,U.dragOptions),Mt.indexOf("event")>-1&&x.click(q,Lt,U.id)}function It(Tt,Lt,Mt){var ee=W.getBoundingClientRect();mt=Lt-ee.left,st=Mt-ee.top,q._fullLayout._calcInverseTransform(q);var ve=q._fullLayout._invTransform,oe=S.apply3DTransform(ve)(mt,st);mt=oe[0],st=oe[1],tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt,dt=U.aaxis.range[1]-tt.a,at=g(U.graphDiv._fullLayout[U.id].bgcolor).getLuminance(),vt="M0,"+U.h+"L"+U.w/2+", 0L"+U.w+","+U.h+"Z",it=!1,Y=J.append("path").attr("class","zoombox").attr("transform",t(U.x0,U.y0)).style({fill:at>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",vt),ft=J.append("path").attr("class","zoombox-corners").attr("transform",t(U.x0,U.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),U.clearOutline(q)}function Pt(Tt,Lt){return 1-Lt/U.h}function qt(Tt,Lt){return 1-(Tt+(U.h-Lt)/Math.sqrt(3))/U.w}function Wt(Tt,Lt){return(Tt-(U.h-Lt)/Math.sqrt(3))/U.w}function Jt(Tt,Lt){var Mt=mt+Tt*lt,ee=st+Lt*yt,ve=Math.max(0,Math.min(1,Pt(mt,st),Pt(Mt,ee))),oe=Math.max(0,Math.min(1,qt(mt,st),qt(Mt,ee))),Te=Math.max(0,Math.min(1,Wt(mt,st),Wt(Mt,ee))),He=(ve/2+Te)*U.w,Ge=(1-ve/2-oe)*U.w,cr=(He+Ge)/2,ur=Ge-He,jr=(1-ve)*U.h,Wr=jr-ur/p;ur.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ft.transition().style("opacity",1).duration(200),it=!0),q.emit("plotly_relayouting",ut(rt))}function ge(){F(q),rt!==tt&&(I.call("_guiRelayout",q,ut(rt)),H&&q.data&&q._context.showTips&&(S.notifier(e(q,"Double-click to zoom back out"),"long"),H=!1))}function fe(){tt={a:U.aaxis.range[0],b:U.baxis.range[1],c:U.caxis.range[1]},rt=tt}function pe(Tt,Lt){var Mt=Tt/U.xaxis._m,ee=Lt/U.yaxis._m;rt={a:tt.a-ee,b:tt.b+(Mt+ee)/2,c:tt.c-(Mt-ee)/2};var ve=[rt.a,rt.b,rt.c].sort(S.sorterAsc),oe={a:ve.indexOf(rt.a),b:ve.indexOf(rt.b),c:ve.indexOf(rt.c)};ve[0]<0&&(ve[1]+ve[0]/2<0?(ve[2]+=ve[0]+ve[1],ve[0]=ve[1]=0):(ve[2]+=ve[0]/2,ve[1]+=ve[0]/2,ve[0]=0),rt={a:ve[oe.a],b:ve[oe.b],c:ve[oe.c]},Lt=(tt.a-rt.a)*U.yaxis._m,Tt=(tt.c-rt.c-tt.b+rt.b)*U.xaxis._m);var Te=t(U.x0+Tt,U.y0+Lt);U.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Te);var He=t(-Tt,-Lt);U.clipDefRelative.select("path").attr("transform",He),U.aaxis.range=[rt.a,U.sum-rt.b-rt.c],U.baxis.range=[U.sum-rt.a-rt.c,rt.b],U.caxis.range=[U.sum-rt.a-rt.b,rt.c],U.drawAxes(!1),U._hasClipOnAxisFalse&&U.plotContainer.select(".scatterlayer").selectAll(".trace").call(a.hideOutsideRangePoints,U),q.emit("plotly_relayouting",ut(rt))}function se(){I.call("_guiRelayout",q,ut(rt))}W.onmousemove=function(Tt){x.hover(q,Tt,U.id),q._fullLayout._lasthover=W,q._fullLayout._hoversubplot=U.id},W.onmouseout=function(Tt){q._dragging||f.unhover(q,Tt)},f.init(this.dragOptions)};function F(U){c.select(U).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}),b7=Dt((Q,Z)=>{var c=wi(),g=jh().attributes,I=Td(),S=Yc().overrideAll,t=Ia().extendFlat,e={title:{text:I.title.text,font:I.title.font},color:I.color,tickmode:I.minor.tickmode,nticks:t({},I.nticks,{dflt:6,min:1}),tick0:I.tick0,dtick:I.dtick,tickvals:I.tickvals,ticktext:I.ticktext,ticks:I.ticks,ticklen:I.ticklen,tickwidth:I.tickwidth,tickcolor:I.tickcolor,ticklabelstep:I.ticklabelstep,showticklabels:I.showticklabels,labelalias:I.labelalias,showtickprefix:I.showtickprefix,tickprefix:I.tickprefix,showticksuffix:I.showticksuffix,ticksuffix:I.ticksuffix,showexponent:I.showexponent,exponentformat:I.exponentformat,minexponent:I.minexponent,separatethousands:I.separatethousands,tickfont:I.tickfont,tickangle:I.tickangle,tickformat:I.tickformat,tickformatstops:I.tickformatstops,hoverformat:I.hoverformat,showline:t({},I.showline,{dflt:!0}),linecolor:I.linecolor,linewidth:I.linewidth,showgrid:t({},I.showgrid,{dflt:!0}),gridcolor:I.gridcolor,gridwidth:I.gridwidth,griddash:I.griddash,layer:I.layer,min:{valType:"number",dflt:0,min:0}},r=Z.exports=S({domain:g({name:"ternary"}),bgcolor:{valType:"color",dflt:c.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");r.uirevision={valType:"any",editType:"none"},r.aaxis.uirevision=r.baxis.uirevision=r.caxis.uirevision={valType:"any",editType:"none"}}),z1=Dt((Q,Z)=>{var c=kn(),g=mu(),I=jh().defaults;Z.exports=function(S,t,e,r){var a=r.type,n=r.attributes,o=r.handleDefaults,i=r.partition||"x",l=t._subplots[a],f=l.length,x=f&&l[0].replace(/\d+$/,""),y,v;function T(P,M){return c.coerce(y,v,n,P,M)}for(var u=0;u{var c=hi(),g=mu(),I=kn(),S=z1(),t=n0(),e=dm(),r=xg(),a=yg(),n=Qy(),o=b7(),i=["aaxis","baxis","caxis"];Z.exports=function(x,y,v){S(x,y,v,{type:"ternary",attributes:o,handleDefaults:l,font:y.font,paper_bgcolor:y.paper_bgcolor})};function l(x,y,v,T){var u=v("bgcolor"),b=v("sum");T.bgColor=c.combine(u,T.paper_bgcolor);for(var _,P,M,C=0;C=b&&(A.min=0,h.min=0,p.min=0,x.aaxis&&delete x.aaxis.min,x.baxis&&delete x.baxis.min,x.caxis&&delete x.caxis.min)}function f(x,y,v,T){var u=o[y._name];function b(k,w){return I.coerce(x,y,u,k,w)}b("uirevision",T.uirevision),y.type="linear";var _=b("color"),P=_!==u.color.dflt?_:v.font.color,M=y._name,C=M.charAt(0).toUpperCase(),A="Component "+C,h=b("title.text",A);y._hovertitle=h===A?h:C,I.coerceFont(b,"title.font",v.font,{overrideDflt:{size:I.bigFont(v.font.size),color:P}}),b("min"),a(x,y,b,"linear"),e(x,y,b,"linear"),t(x,y,b,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(x,y,b,{outerTicks:!0});var p=b("showticklabels");p&&(I.coerceFont(b,"tickfont",v.font,{overrideDflt:{color:P}}),b("tickangle"),b("tickformat")),n(x,y,b,{dfltColor:_,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u}),b("hoverformat"),b("layer")}}),NR=Dt(Q=>{var Z=RR(),c=ud().getSubplotCalcData,g=kn().counterRegex,I="ternary";Q.name=I;var S=Q.attr="subplot";Q.idRoot=I,Q.idRegex=Q.attrRegex=g(I);var t=Q.attributes={};t[S]={valType:"subplotid",dflt:"ternary",editType:"calc"},Q.layoutAttributes=b7(),Q.supplyLayoutDefaults=BR(),Q.plot=function(e){for(var r=e._fullLayout,a=e.calcdata,n=r._subplots[I],o=0;o{Z.exports={attributes:_7(),supplyDefaults:PR(),colorbar:xo(),formatLabels:IR(),calc:zR(),plot:OR(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:DR(),selectPoints:Rf(),eventData:FR(),moduleType:"trace",name:"scatterternary",basePlotModule:NR(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}),UR=Dt((Q,Z)=>{Z.exports=jR()}),w7=Dt((Q,Z)=>{var c=Hw(),g=Ia().extendFlat,I=dh().axisHoverFormat;Z.exports={y:c.y,x:c.x,x0:c.x0,y0:c.y0,xhoverformat:I("x"),yhoverformat:I("y"),name:g({},c.name,{}),orientation:g({},c.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:c.fillcolor,points:g({},c.boxpoints,{}),jitter:g({},c.jitter,{}),pointpos:g({},c.pointpos,{}),width:g({},c.width,{}),marker:c.marker,text:c.text,hovertext:c.hovertext,hovertemplate:c.hovertemplate,hovertemplatefallback:c.hovertemplatefallback,quartilemethod:c.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,selected:c.selected,unselected:c.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:c.zorder}}),k7=Dt((Q,Z)=>{var c=Ww(),g=kn().extendFlat;Z.exports={violinmode:g({},c.boxmode,{}),violingap:g({},c.boxgap,{}),violingroupgap:g({},c.boxgroupgap,{})}}),VR=Dt((Q,Z)=>{var c=kn(),g=hi(),I=qw(),S=w7();Z.exports=function(t,e,r,a){function n(h,p){return c.coerce(t,e,S,h,p)}function o(h,p){return c.coerce2(t,e,S,h,p)}if(I.handleSampleDefaults(t,e,n,a),e.visible!==!1){n("bandwidth"),n("side");var i=n("width");i||(n("scalegroup",e.name),n("scalemode"));var l=n("span"),f;Array.isArray(l)&&(f="manual"),n("spanmode",f);var x=n("line.color",(t.marker||{}).color||r),y=n("line.width"),v=n("fillcolor",g.addOpacity(e.line.color,.5));I.handlePointsDefaults(t,e,n,{prefix:""});var T=o("box.width"),u=o("box.fillcolor",v),b=o("box.line.color",x),_=o("box.line.width",y),P=n("box.visible",!!(T||u||b||_));P||(e.box={visible:!1});var M=o("meanline.color",x),C=o("meanline.width",y),A=n("meanline.visible",!!(M||C));A||(e.meanline={visible:!1}),n("quartilemethod"),n("zorder")}}}),HR=Dt((Q,Z)=>{var c=kn(),g=k7(),I=N6();Z.exports=function(S,t,e){function r(a,n){return c.coerce(S,t,g,a,n)}I._supply(S,t,e,r,"violin")}}),lk=Dt(Q=>{var Z=kn(),c={gaussian:function(g){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*g*g)}};Q.makeKDE=function(g,I,S){var t=S.length,e=c.gaussian,r=g.bandwidth,a=1/(t*r);return function(n){for(var o=0,i=0;i{var c=kn(),g=Ls(),I=GM(),S=lk(),t=Ca().BADNUM;Z.exports=function(n,o){var i=I(n,o);if(i[0].t.empty)return i;for(var l=n._fullLayout,f=g.getFromId(n,o[o.orientation==="h"?"xaxis":"yaxis"]),x=1/0,y=-1/0,v=0,T=0,u=0;u{var c=j6().setPositionOffset,g=["v","h"];Z.exports=function(I,S){for(var t=I.calcdata,e=S.xaxis,r=S.yaxis,a=0;a{var c=qr(),g=kn(),I=Vs(),S=U6(),t=qi(),e=lk();Z.exports=function(r,a,n,o){var i=r._context.staticPlot,l=r._fullLayout,f=a.xaxis,x=a.yaxis;function y(v,T){var u=t(v,{xaxis:f,yaxis:x,trace:T,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return I.smoothopen(u[0],1)}g.makeTraceGroups(o,n,"trace violins").each(function(v){var T=c.select(this),u=v[0],b=u.t,_=u.trace;if(_.visible!==!0||b.empty){T.remove();return}var P=b.bPos,M=b.bdPos,C=a[b.valLetter+"axis"],A=a[b.posLetter+"axis"],h=_.side==="both",p=h||_.side==="positive",k=h||_.side==="negative",w=T.selectAll("path.violin").data(g.identity);w.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),w.exit().remove(),w.each(function(W){var q=c.select(this),J=W.density,lt=J.length,yt=A.c2l(W.pos+P,!0),mt=A.l2p(yt),st;if(_.width)st=b.maxKDE/M;else{var tt=l._violinScaleGroupStats[_.scalegroup];st=_.scalemode==="count"?tt.maxKDE/M*(tt.maxCount/W.pts.length):tt.maxKDE/M}var dt,rt,at,vt,it,Y,ft;if(p){for(Y=new Array(lt),vt=0;vt{var c=qr(),g=hi(),I=_l().stylePoints;Z.exports=function(S){var t=c.select(S).selectAll("g.trace.violins");t.style("opacity",function(e){return e[0].trace.opacity}),t.each(function(e){var r=e[0].trace,a=c.select(this),n=r.box||{},o=n.line||{},i=r.meanline||{},l=i.width;a.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(g.stroke,r.line.color).call(g.fill,r.fillcolor),a.selectAll("path.box").style("stroke-width",o.width+"px").call(g.stroke,o.color).call(g.fill,n.fillcolor);var f={"stroke-width":l+"px","stroke-dasharray":2*l+"px,"+l+"px"};a.selectAll("path.mean").style(f).call(g.stroke,i.color),a.selectAll("path.meanline").style(f).call(g.stroke,i.color),I(a,r,S)})}}),GR=Dt((Q,Z)=>{var c=hi(),g=kn(),I=Ls(),S=YM(),t=lk();Z.exports=function(e,r,a,n,o){o||(o={});var i=o.hoverLayer,l=e.cd,f=l[0].trace,x=f.hoveron,y=x.indexOf("violins")!==-1,v=x.indexOf("kde")!==-1,T=[],u,b;if(y||v){var _=S.hoverOnBoxes(e,r,a,n);if(v&&_.length>0){var P=e.xa,M=e.ya,C,A,h,p,k;f.orientation==="h"?(k=r,C="y",h=M,A="x",p=P):(k=a,C="x",h=P,A="y",p=M);var w=l[e.index];if(k>=w.span[0]&&k<=w.span[1]){var R=g.extendFlat({},e),O=p.c2p(k,!0),j=t.getKdeValue(w,f,k),V=t.getPositionOnKdePath(w,f,O),H=h._offset,F=h._length;R[C+"0"]=V[0],R[C+"1"]=V[1],R[A+"0"]=R[A+"1"]=O,R[A+"Label"]=A+": "+I.hoverLabelText(p,k,f[A+"hoverformat"])+", "+l[0].t.labels.kde+" "+j.toFixed(3);for(var U=0,W=0;W<_.length;W++)if(_[W].attr==="med"){U=W;break}R.spikeDistance=_[U].spikeDistance;var q=C+"Spike";R[q]=_[U][q],_[U].spikeDistance=void 0,_[U][q]=void 0,R.hovertemplate=!1,T.push(R),b={},b[C+"1"]=g.constrain(H+V[0],H,H+F),b[C+"2"]=g.constrain(H+V[1],H,H+F),b[A+"1"]=b[A+"2"]=p._offset+O}}y&&(T=T.concat(_))}x.indexOf("points")!==-1&&(u=S.hoverOnPoints(e,r,a));var J=i.selectAll(".violinline-"+f.uid).data(b?[0]:[]);return J.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),J.exit().remove(),J.attr(b).call(c.stroke,e.color),n==="closest"?u?[u]:T:(u&&T.push(u),T)}}),YR=Dt((Q,Z)=>{Z.exports={attributes:w7(),layoutAttributes:k7(),supplyDefaults:VR(),crossTraceDefaults:qw().crossTraceDefaults,supplyLayoutDefaults:HR(),calc:WR(),crossTraceCalc:qR(),plot:$R(),style:ZR(),styleOnSelect:_l().styleOnSelect,hoverPoints:GR(),selectPoints:KM(),moduleType:"trace",name:"violin",basePlotModule:Mf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}),KR=Dt((Q,Z)=>{Z.exports=YR()}),XR=Dt((Q,Z)=>{Z.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}),T7=Dt((Q,Z)=>{var c=Lg(),g=ef().line,I=Ho(),S=dh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=XR(),n=Ia().extendFlat,o=hi();Z.exports={x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},I.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:n({},c.insidetextanchor,{dflt:"middle"}),textangle:n({},c.textangle,{dflt:0}),textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:n({},c.orientation,{}),offset:n({},c.offset,{arrayOk:!1}),width:n({},c.width,{arrayOk:!1}),marker:i(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{dflt:0,editType:"plot"}),dash:g.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder};function i(){var l=n({},c.marker);return delete l.pattern,delete l.cornerradius,l}}),A7=Dt((Q,Z)=>{Z.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}),M7=Dt((Q,Z)=>{var c=kn(),g=Cg(),I=J0().handleText,S=Hm(),t=Rp(),e=T7(),r=hi();function a(i,l,f,x){function y(M,C){return c.coerce(i,l,e,M,C)}var v=S(i,l,x,y);if(!v){l.visible=!1;return}t(i,l,x,y),y("xhoverformat"),y("yhoverformat"),y("orientation",l.y&&!l.x?"v":"h"),y("offset"),y("width");var T=y("text");y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var u=y("textposition");I(i,l,x,y,u,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l.textposition!=="none"&&!l.texttemplate&&y("textinfo",c.isArrayOrTypedArray(T)?"text+value":"value");var b=y("marker.color",f);y("marker.line.color",r.defaultLine),y("marker.line.width");var _=y("connector.visible");if(_){y("connector.fillcolor",n(b));var P=y("connector.line.width");P&&(y("connector.line.color"),y("connector.line.dash"))}y("zorder")}function n(i){var l=c.isArrayOrTypedArray(i)?"#000":i;return r.addOpacity(l,.5*r.opacity(l))}function o(i,l){var f,x;function y(T){return c.coerce(x._input,x,e,T)}for(var v=0;v{var c=kn(),g=A7();Z.exports=function(I,S,t){var e=!1;function r(o,i){return c.coerce(I,S,g,o,i)}for(var a=0;a{var c=kn();Z.exports=function(g,I){for(var S=0;S{var c=Ls(),g=D0(),I=QR(),S=Bt(),t=Ca().BADNUM;Z.exports=function(r,a){var n=c.getFromId(r,a.xaxis||"x"),o=c.getFromId(r,a.yaxis||"y"),i,l,f,x,y,v,T,u;a.orientation==="h"?(i=n.makeCalcdata(a,"x"),f=o.makeCalcdata(a,"y"),x=g(a,o,"y",f),y=!!a.yperiodalignment,v="y"):(i=o.makeCalcdata(a,"y"),f=n.makeCalcdata(a,"x"),x=g(a,n,"x",f),y=!!a.xperiodalignment,v="x"),l=x.vals;var b=Math.min(l.length,i.length),_=new Array(b);for(a._base=[],T=0;T{var c=zr().setGroupPositions;Z.exports=function(g,I){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=I.xaxis,a=I.yaxis,n=[],o=[],i=[],l,f;for(f=0;f{var c=qr(),g=kn(),I=Vs(),S=Ca().BADNUM,t=nx(),e=Bp().clearMinTextSize;Z.exports=function(o,i,l,f){var x=o._fullLayout;e("funnel",x),r(o,i,l,f),a(o,i,l,f),t.plot(o,i,l,f,{mode:x.funnelmode,norm:x.funnelmode,gap:x.funnelgap,groupgap:x.funnelgroupgap})};function r(o,i,l,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,l,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","regions");if(!u.connector||!u.connector.visible){b.remove();return}var _=u.orientation==="h",P=b.selectAll("g.region").data(g.identity);P.enter().append("g").classed("region",!0),P.exit().remove();var M=P.size();P.each(function(C,A){if(!(A!==M-1&&!C.cNext)){var h=n(C,x,y,_),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&p[2]!==S&&k[2]!==S&&p[3]!==S&&k[3]!==S&&(_?w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2]+"H"+p[3]+"L"+p[1]+","+k[1]+"Z":w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3]+"V"+k[2]+"L"+p[1]+","+k[0]+"Z"),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(I.setClipUrl,i.layerClipId,o)}})})}function a(o,i,l,f){var x=i.xaxis,y=i.yaxis;g.makeTraceGroups(f,l,"trace bars").each(function(v){var T=c.select(this),u=v[0].trace,b=g.ensureSingle(T,"g","lines");if(!u.connector||!u.connector.visible||!u.connector.line.width){b.remove();return}var _=u.orientation==="h",P=b.selectAll("g.line").data(g.identity);P.enter().append("g").classed("line",!0),P.exit().remove();var M=P.size();P.each(function(C,A){if(!(A!==M-1&&!C.cNext)){var h=n(C,x,y,_),p=h[0],k=h[1],w="";p[3]!==void 0&&k[3]!==void 0&&(_?(w+="M"+p[0]+","+k[1]+"L"+p[2]+","+k[2],w+="M"+p[1]+","+k[1]+"L"+p[3]+","+k[2]):(w+="M"+p[1]+","+k[1]+"L"+p[2]+","+k[3],w+="M"+p[1]+","+k[0]+"L"+p[2]+","+k[2])),w===""&&(w="M0,0Z"),g.ensureSingle(c.select(this),"path").attr("d",w).call(I.setClipUrl,i.layerClipId,o)}})})}function n(o,i,l,f){var x=[],y=[],v=f?i:l,T=f?l:i;return x[0]=v.c2p(o.s0,!0),y[0]=T.c2p(o.p0,!0),x[1]=v.c2p(o.s1,!0),y[1]=T.c2p(o.p1,!0),x[2]=v.c2p(o.nextS0,!0),y[2]=T.c2p(o.nextP0,!0),x[3]=v.c2p(o.nextS1,!0),y[3]=T.c2p(o.nextP1,!0),f?[x,y]:[y,x]}}),nB=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=hi(),S=go().DESELECTDIM,t=xm(),e=Bp().resizeText,r=t.styleTextPoints;function a(n,o,i){var l=i||c.select(n).selectAll('g[class^="funnellayer"]').selectAll("g.trace");e(n,l,"funnel"),l.style("opacity",function(f){return f[0].trace.opacity}),l.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y.marker;c.select(this).call(I.fill,v.mc||T.color).call(I.stroke,v.mlc||T.line.color).call(g.dashLine,T.line.dash,v.mlw||T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".regions").each(function(){c.select(this).selectAll("path").style("stroke-width",0).call(I.fill,y.connector.fillcolor)}),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}Z.exports={style:a}}),iB=Dt((Q,Z)=>{var c=hi().opacity,g=Q_().hoverOnBars,I=kn().formatPercent;Z.exports=function(t,e,r,a,n){var o=g(t,e,r,a,n);if(o){var i=o.cd,l=i[0].trace,f=l.orientation==="h",x=o.index,y=i[x],v=f?"x":"y";o[v+"LabelVal"]=y.s,o.percentInitial=y.begR,o.percentInitialLabel=I(y.begR,1),o.percentPrevious=y.difR,o.percentPreviousLabel=I(y.difR,1),o.percentTotal=y.sumR,o.percentTotalLabel=I(y.sumR,1);var T=y.hi||l.hoverinfo,u=[];if(T&&T!=="none"&&T!=="skip"){var b=T==="all",_=T.split("+"),P=function(M){return b||_.indexOf(M)!==-1};P("percent initial")&&u.push(o.percentInitialLabel+" of initial"),P("percent previous")&&u.push(o.percentPreviousLabel+" of previous"),P("percent total")&&u.push(o.percentTotalLabel+" of total")}return o.extraText=u.join("
"),o.color=S(l,y),[o]}};function S(t,e){var r=t.marker,a=e.mc||r.color,n=e.mlc||r.line.color,o=e.mlw||r.line.width;if(c(a))return a;if(c(n)&&o)return n}}),aB=Dt((Q,Z)=>{Z.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"percentInitial"in g&&(c.percentInitial=g.percentInitial),"percentPrevious"in g&&(c.percentPrevious=g.percentPrevious),"percentTotal"in g&&(c.percentTotal=g.percentTotal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),oB=Dt((Q,Z)=>{Z.exports={attributes:T7(),layoutAttributes:A7(),supplyDefaults:M7().supplyDefaults,crossTraceDefaults:M7().crossTraceDefaults,supplyLayoutDefaults:JR(),calc:tB(),crossTraceCalc:eB(),plot:rB(),style:nB().style,hoverPoints:iB(),eventData:aB(),selectPoints:tb(),moduleType:"trace",name:"funnel",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),sB=Dt((Q,Z)=>{Z.exports=oB()}),lB=Dt((Q,Z)=>{Z.exports={eventDataKeys:["initial","delta","final"]}}),S7=Dt((Q,Z)=>{var c=Lg(),g=ef().line,I=Ho(),S=dh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=lB(),n=Ia().extendFlat,o=hi();function i(l){return{marker:{color:n({},c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:n({},c.marker.line.color,{arrayOk:!1,editType:"style"}),width:n({},c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Z.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:c.x,x0:c.x0,dx:c.dx,y:c.y,y0:c.y0,dy:c.dy,xperiod:c.xperiod,yperiod:c.yperiod,xperiod0:c.xperiod0,yperiod0:c.yperiod0,xperiodalignment:c.xperiodalignment,yperiodalignment:c.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:c.hovertext,hovertemplate:t({},{keys:a.eventDataKeys}),hovertemplatefallback:r(),hoverinfo:n({},I.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),texttemplatefallback:r({editType:"plot"}),text:c.text,textposition:c.textposition,insidetextanchor:c.insidetextanchor,textangle:c.textangle,textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:c.outsidetextfont,constraintext:c.constraintext,cliponaxis:c.cliponaxis,orientation:c.orientation,offset:c.offset,width:c.width,increasing:i(),decreasing:i(),totals:i(),connector:{line:{color:n({},g.color,{dflt:o.defaultLine}),width:n({},g.width,{editType:"plot"}),dash:g.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:c.offsetgroup,alignmentgroup:c.alignmentgroup,zorder:c.zorder}}),E7=Dt((Q,Z)=>{Z.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}),rb=Dt((Q,Z)=>{Z.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}),C7=Dt((Q,Z)=>{var c=kn(),g=Cg(),I=J0().handleText,S=Hm(),t=Rp(),e=S7(),r=hi(),a=rb(),n=a.INCREASING.COLOR,o=a.DECREASING.COLOR,i="#4499FF";function l(y,v,T){y(v+".marker.color",T),y(v+".marker.line.color",r.defaultLine),y(v+".marker.line.width")}function f(y,v,T,u){function b(A,h){return c.coerce(y,v,e,A,h)}var _=S(y,v,u,b);if(!_){v.visible=!1;return}t(y,v,u,b),b("xhoverformat"),b("yhoverformat"),b("measure"),b("orientation",v.x&&!v.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var P=b("textposition");I(y,v,u,b,P,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(b("texttemplate"),b("texttemplatefallback"),v.texttemplate||b("textinfo")),l(b,"increasing",n),l(b,"decreasing",o),l(b,"totals",i);var M=b("connector.visible");if(M){b("connector.mode");var C=b("connector.line.width");C&&(b("connector.line.color"),b("connector.line.dash"))}b("zorder")}function x(y,v){var T,u;function b(P){return c.coerce(u._input,u,e,P)}if(v.waterfallmode==="group")for(var _=0;_{var c=kn(),g=E7();Z.exports=function(I,S,t){var e=!1;function r(o,i){return c.coerce(I,S,g,o,i)}for(var a=0;a{var c=Ls(),g=D0(),I=kn().mergeArray,S=Bt(),t=Ca().BADNUM;function e(a){return a==="a"||a==="absolute"}function r(a){return a==="t"||a==="total"}Z.exports=function(a,n){var o=c.getFromId(a,n.xaxis||"x"),i=c.getFromId(a,n.yaxis||"y"),l,f,x,y,v,T;n.orientation==="h"?(l=o.makeCalcdata(n,"x"),x=i.makeCalcdata(n,"y"),y=g(n,i,"y",x),v=!!n.yperiodalignment,T="y"):(l=i.makeCalcdata(n,"y"),x=o.makeCalcdata(n,"x"),y=g(n,o,"x",x),v=!!n.xperiodalignment,T="x"),f=y.vals;for(var u=Math.min(f.length,l.length),b=new Array(u),_=0,P,M=!1,C=0;C{var c=zr().setGroupPositions;Z.exports=function(g,I){var S=g._fullLayout,t=g._fullData,e=g.calcdata,r=I.xaxis,a=I.yaxis,n=[],o=[],i=[],l,f;for(f=0;f{var c=qr(),g=kn(),I=Vs(),S=Ca().BADNUM,t=nx(),e=Bp().clearMinTextSize;Z.exports=function(n,o,i,l){var f=n._fullLayout;e("waterfall",f),t.plot(n,o,i,l,{mode:f.waterfallmode,norm:f.waterfallmode,gap:f.waterfallgap,groupgap:f.waterfallgroupgap}),r(n,o,i,l)};function r(n,o,i,l){var f=o.xaxis,x=o.yaxis;g.makeTraceGroups(l,i,"trace bars").each(function(y){var v=c.select(this),T=y[0].trace,u=g.ensureSingle(v,"g","lines");if(!T.connector||!T.connector.visible){u.remove();return}var b=T.orientation==="h",_=T.connector.mode,P=u.selectAll("g.line").data(g.identity);P.enter().append("g").classed("line",!0),P.exit().remove();var M=P.size();P.each(function(C,A){if(!(A!==M-1&&!C.cNext)){var h=a(C,f,x,b),p=h[0],k=h[1],w="";p[0]!==S&&k[0]!==S&&p[1]!==S&&k[1]!==S&&(_==="spanning"&&!C.isSum&&A>0&&(b?w+="M"+p[0]+","+k[1]+"V"+k[0]:w+="M"+p[1]+","+k[0]+"H"+p[0]),_!=="between"&&(C.isSum||A{var c=qr(),g=Vs(),I=hi(),S=go().DESELECTDIM,t=xm(),e=Bp().resizeText,r=t.styleTextPoints;function a(n,o,i){var l=i||c.select(n).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");e(n,l,"waterfall"),l.style("opacity",function(f){return f[0].trace.opacity}),l.each(function(f){var x=c.select(this),y=f[0].trace;x.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=y[v.dir].marker;c.select(this).call(I.fill,T.color).call(I.stroke,T.line.color).call(g.dashLine,T.line.dash,T.line.width).style("opacity",y.selectedpoints&&!v.selected?S:1)}}),r(x,y,n),x.selectAll(".lines").each(function(){var v=y.connector.line;g.lineGroupStyle(c.select(this).selectAll("path"),v.width,v.color,v.dash)})})}Z.exports={style:a}}),pB=Dt((Q,Z)=>{var c=Ls().hoverLabelText,g=hi().opacity,I=Q_().hoverOnBars,S=rb(),t={increasing:S.INCREASING.SYMBOL,decreasing:S.DECREASING.SYMBOL};Z.exports=function(r,a,n,o,i){var l=I(r,a,n,o,i);if(!l)return;var f=l.cd,x=f[0].trace,y=x.orientation==="h",v=y?"x":"y",T=y?r.xa:r.ya;function u(w){return c(T,w,x[v+"hoverformat"])}var b=l.index,_=f[b],P=_.isSum?_.b+_.s:_.rawS;l.initial=_.b+_.s-P,l.delta=P,l.final=l.initial+l.delta;var M=u(Math.abs(l.delta));l.deltaLabel=P<0?"("+M+")":M,l.finalLabel=u(l.final),l.initialLabel=u(l.initial);var C=_.hi||x.hoverinfo,A=[];if(C&&C!=="none"&&C!=="skip"){var h=C==="all",p=C.split("+"),k=function(w){return h||p.indexOf(w)!==-1};_.isSum||(k("final")&&(y?!k("x"):!k("y"))&&A.push(l.finalLabel),k("delta")&&(P<0?A.push(l.deltaLabel+" "+t.decreasing):A.push(l.deltaLabel+" "+t.increasing)),k("initial")&&A.push("Initial: "+l.initialLabel))}return A.length&&(l.extraText=A.join("
")),l.color=e(x,_),[l]};function e(r,a){var n=r[a.dir].marker,o=n.color,i=n.line.color,l=n.line.width;if(g(o))return o;if(g(i)&&l)return i}}),mB=Dt((Q,Z)=>{Z.exports=function(c,g){return c.x="xVal"in g?g.xVal:g.x,c.y="yVal"in g?g.yVal:g.y,"initial"in g&&(c.initial=g.initial),"delta"in g&&(c.delta=g.delta),"final"in g&&(c.final=g.final),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c}}),gB=Dt((Q,Z)=>{Z.exports={attributes:S7(),layoutAttributes:E7(),supplyDefaults:C7().supplyDefaults,crossTraceDefaults:C7().crossTraceDefaults,supplyLayoutDefaults:uB(),calc:cB(),crossTraceCalc:hB(),plot:fB(),style:dB().style,hoverPoints:pB(),eventData:mB(),selectPoints:tb(),moduleType:"trace",name:"waterfall",basePlotModule:Mf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}),vB=Dt((Q,Z)=>{Z.exports=gB()}),nb=Dt((Q,Z)=>{Z.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(c){return c.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(c){return c.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(c){return c.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(c){var g=c.slice(0,3);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(c){var g=c.slice(0,4);return g[1]=g[1]+"%",g[2]=g[2]+"%",g},suffix:["°","%","%",""]}}}}),L7=Dt((Q,Z)=>{var c=Ho(),g=ef().zorder,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=Ia().extendFlat,e=nb().colormodel,r=["rgb","rgba","rgba256","hsl","hsla"],a=[],n=[];for(i=0;i{var c=kn(),g=L7(),I=nb(),S=o0().IMAGE_URL_PREFIX;Z.exports=function(t,e){function r(o,i){return c.coerce(t,e,g,o,i)}r("source"),e.source&&!e.source.match(S)&&delete e.source,e._hasSource=!!e.source;var a=r("z");if(e._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!e._hasZ&&!e._hasSource){e.visible=!1;return}r("x0"),r("y0"),r("dx"),r("dy");var n;e._hasZ?(r("colormodel","rgb"),n=I.colormodel[e.colormodel],r("zmin",n.zminDflt||n.min),r("zmax",n.zmaxDflt||n.max)):e._hasSource&&(e.colormodel="rgba256",n=I.colormodel[e.colormodel],e.zmin=n.zminDflt,e.zmax=n.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),e._length=null,r("zorder")}}),_v=Dt((Q,Z)=>{typeof Object.create=="function"?Z.exports=function(c,g){g&&(c.super_=g,c.prototype=Object.create(g.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(c,g){if(g){c.super_=g;var I=function(){};I.prototype=g.prototype,c.prototype=new I,c.prototype.constructor=c}}}),P7=Dt((Q,Z)=>{Z.exports=Rm().EventEmitter}),xB=Dt(Q=>{Q.byteLength=r,Q.toByteArray=n,Q.fromByteArray=l;var Z=[],c=[],g=typeof Uint8Array<"u"?Uint8Array:Array,I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,t=I.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var y=f.indexOf("=");y===-1&&(y=x);var v=y===x?0:4-y%4;return[y,v]}function r(f){var x=e(f),y=x[0],v=x[1];return(y+v)*3/4-v}function a(f,x,y){return(x+y)*3/4-y}function n(f){var x,y=e(f),v=y[0],T=y[1],u=new g(a(f,v,T)),b=0,_=T>0?v-4:v,P;for(P=0;P<_;P+=4)x=c[f.charCodeAt(P)]<<18|c[f.charCodeAt(P+1)]<<12|c[f.charCodeAt(P+2)]<<6|c[f.charCodeAt(P+3)],u[b++]=x>>16&255,u[b++]=x>>8&255,u[b++]=x&255;return T===2&&(x=c[f.charCodeAt(P)]<<2|c[f.charCodeAt(P+1)]>>4,u[b++]=x&255),T===1&&(x=c[f.charCodeAt(P)]<<10|c[f.charCodeAt(P+1)]<<4|c[f.charCodeAt(P+2)]>>2,u[b++]=x>>8&255,u[b++]=x&255),u}function o(f){return Z[f>>18&63]+Z[f>>12&63]+Z[f>>6&63]+Z[f&63]}function i(f,x,y){for(var v,T=[],u=x;u_?_:b+u));return v===1?(x=f[y-1],T.push(Z[x>>2]+Z[x<<4&63]+"==")):v===2&&(x=(f[y-2]<<8)+f[y-1],T.push(Z[x>>10]+Z[x>>4&63]+Z[x<<2&63]+"=")),T.join("")}}),_B=Dt(Q=>{Q.read=function(Z,c,g,I,S){var t,e,r=S*8-I-1,a=(1<>1,o=-7,i=g?S-1:0,l=g?-1:1,f=Z[c+i];for(i+=l,t=f&(1<<-o)-1,f>>=-o,o+=r;o>0;t=t*256+Z[c+i],i+=l,o-=8);for(e=t&(1<<-o)-1,t>>=-o,o+=I;o>0;e=e*256+Z[c+i],i+=l,o-=8);if(t===0)t=1-n;else{if(t===a)return e?NaN:(f?-1:1)*(1/0);e=e+Math.pow(2,I),t=t-n}return(f?-1:1)*e*Math.pow(2,t-I)},Q.write=function(Z,c,g,I,S,t){var e,r,a,n=t*8-S-1,o=(1<>1,l=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=I?0:t-1,x=I?1:-1,y=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(r=isNaN(c)?1:0,e=o):(e=Math.floor(Math.log(c)/Math.LN2),c*(a=Math.pow(2,-e))<1&&(e--,a*=2),e+i>=1?c+=l/a:c+=l*Math.pow(2,1-i),c*a>=2&&(e++,a/=2),e+i>=o?(r=0,e=o):e+i>=1?(r=(c*a-1)*Math.pow(2,S),e=e+i):(r=c*Math.pow(2,i-1)*Math.pow(2,S),e=0));S>=8;Z[g+f]=r&255,f+=x,r/=256,S-=8);for(e=e<0;Z[g+f]=e&255,f+=x,e/=256,n-=8);Z[g+f-x]|=y*128}}),ix=Dt(Q=>{var Z=xB(),c=_B(),g=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Q.Buffer=e,Q.SlowBuffer=T,Q.INSPECT_MAX_BYTES=50;var I=2147483647;Q.kMaxLength=I,e.TYPED_ARRAY_SUPPORT=S(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function S(){try{let Tt=new Uint8Array(1),Lt={foo:function(){return 42}};return Object.setPrototypeOf(Lt,Uint8Array.prototype),Object.setPrototypeOf(Tt,Lt),Tt.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function t(Tt){if(Tt>I)throw new RangeError('The value "'+Tt+'" is invalid for option "size"');let Lt=new Uint8Array(Tt);return Object.setPrototypeOf(Lt,e.prototype),Lt}function e(Tt,Lt,Mt){if(typeof Tt=="number"){if(typeof Lt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return o(Tt)}return r(Tt,Lt,Mt)}e.poolSize=8192;function r(Tt,Lt,Mt){if(typeof Tt=="string")return i(Tt,Lt);if(ArrayBuffer.isView(Tt))return f(Tt);if(Tt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt);if(Jt(Tt,ArrayBuffer)||Tt&&Jt(Tt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Jt(Tt,SharedArrayBuffer)||Tt&&Jt(Tt.buffer,SharedArrayBuffer)))return x(Tt,Lt,Mt);if(typeof Tt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let ee=Tt.valueOf&&Tt.valueOf();if(ee!=null&&ee!==Tt)return e.from(ee,Lt,Mt);let ve=y(Tt);if(ve)return ve;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Tt[Symbol.toPrimitive]=="function")return e.from(Tt[Symbol.toPrimitive]("string"),Lt,Mt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Tt)}e.from=function(Tt,Lt,Mt){return r(Tt,Lt,Mt)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function a(Tt){if(typeof Tt!="number")throw new TypeError('"size" argument must be of type number');if(Tt<0)throw new RangeError('The value "'+Tt+'" is invalid for option "size"')}function n(Tt,Lt,Mt){return a(Tt),Tt<=0?t(Tt):Lt!==void 0?typeof Mt=="string"?t(Tt).fill(Lt,Mt):t(Tt).fill(Lt):t(Tt)}e.alloc=function(Tt,Lt,Mt){return n(Tt,Lt,Mt)};function o(Tt){return a(Tt),t(Tt<0?0:v(Tt)|0)}e.allocUnsafe=function(Tt){return o(Tt)},e.allocUnsafeSlow=function(Tt){return o(Tt)};function i(Tt,Lt){if((typeof Lt!="string"||Lt==="")&&(Lt="utf8"),!e.isEncoding(Lt))throw new TypeError("Unknown encoding: "+Lt);let Mt=u(Tt,Lt)|0,ee=t(Mt),ve=ee.write(Tt,Lt);return ve!==Mt&&(ee=ee.slice(0,ve)),ee}function l(Tt){let Lt=Tt.length<0?0:v(Tt.length)|0,Mt=t(Lt);for(let ee=0;ee=I)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I.toString(16)+" bytes");return Tt|0}function T(Tt){return+Tt!=Tt&&(Tt=0),e.alloc(+Tt)}e.isBuffer=function(Tt){return Tt!=null&&Tt._isBuffer===!0&&Tt!==e.prototype},e.compare=function(Tt,Lt){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),Jt(Lt,Uint8Array)&&(Lt=e.from(Lt,Lt.offset,Lt.byteLength)),!e.isBuffer(Tt)||!e.isBuffer(Lt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Tt===Lt)return 0;let Mt=Tt.length,ee=Lt.length;for(let ve=0,oe=Math.min(Mt,ee);veee.length?(e.isBuffer(oe)||(oe=e.from(oe)),oe.copy(ee,ve)):Uint8Array.prototype.set.call(ee,oe,ve);else if(e.isBuffer(oe))oe.copy(ee,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=oe.length}return ee};function u(Tt,Lt){if(e.isBuffer(Tt))return Tt.length;if(ArrayBuffer.isView(Tt)||Jt(Tt,ArrayBuffer))return Tt.byteLength;if(typeof Tt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Tt);let Mt=Tt.length,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&Mt===0)return 0;let ve=!1;for(;;)switch(Lt){case"ascii":case"latin1":case"binary":return Mt;case"utf8":case"utf-8":return kt(Tt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mt*2;case"hex":return Mt>>>1;case"base64":return qt(Tt).length;default:if(ve)return ee?-1:kt(Tt).length;Lt=(""+Lt).toLowerCase(),ve=!0}}e.byteLength=u;function b(Tt,Lt,Mt){let ee=!1;if((Lt===void 0||Lt<0)&&(Lt=0),Lt>this.length||((Mt===void 0||Mt>this.length)&&(Mt=this.length),Mt<=0)||(Mt>>>=0,Lt>>>=0,Mt<=Lt))return"";for(Tt||(Tt="utf8");;)switch(Tt){case"hex":return F(this,Lt,Mt);case"utf8":case"utf-8":return R(this,Lt,Mt);case"ascii":return V(this,Lt,Mt);case"latin1":case"binary":return H(this,Lt,Mt);case"base64":return w(this,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,Lt,Mt);default:if(ee)throw new TypeError("Unknown encoding: "+Tt);Tt=(Tt+"").toLowerCase(),ee=!0}}e.prototype._isBuffer=!0;function _(Tt,Lt,Mt){let ee=Tt[Lt];Tt[Lt]=Tt[Mt],Tt[Mt]=ee}e.prototype.swap16=function(){let Tt=this.length;if(Tt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Lt=0;LtLt&&(Tt+=" ... "),""},g&&(e.prototype[g]=e.prototype.inspect),e.prototype.compare=function(Tt,Lt,Mt,ee,ve){if(Jt(Tt,Uint8Array)&&(Tt=e.from(Tt,Tt.offset,Tt.byteLength)),!e.isBuffer(Tt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Tt);if(Lt===void 0&&(Lt=0),Mt===void 0&&(Mt=Tt?Tt.length:0),ee===void 0&&(ee=0),ve===void 0&&(ve=this.length),Lt<0||Mt>Tt.length||ee<0||ve>this.length)throw new RangeError("out of range index");if(ee>=ve&&Lt>=Mt)return 0;if(ee>=ve)return-1;if(Lt>=Mt)return 1;if(Lt>>>=0,Mt>>>=0,ee>>>=0,ve>>>=0,this===Tt)return 0;let oe=ve-ee,Te=Mt-Lt,He=Math.min(oe,Te),Ge=this.slice(ee,ve),cr=Tt.slice(Lt,Mt);for(let ur=0;ur2147483647?Mt=2147483647:Mt<-2147483648&&(Mt=-2147483648),Mt=+Mt,ge(Mt)&&(Mt=ve?0:Tt.length-1),Mt<0&&(Mt=Tt.length+Mt),Mt>=Tt.length){if(ve)return-1;Mt=Tt.length-1}else if(Mt<0)if(ve)Mt=0;else return-1;if(typeof Lt=="string"&&(Lt=e.from(Lt,ee)),e.isBuffer(Lt))return Lt.length===0?-1:M(Tt,Lt,Mt,ee,ve);if(typeof Lt=="number")return Lt=Lt&255,typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(Tt,Lt,Mt):Uint8Array.prototype.lastIndexOf.call(Tt,Lt,Mt):M(Tt,[Lt],Mt,ee,ve);throw new TypeError("val must be string, number or Buffer")}function M(Tt,Lt,Mt,ee,ve){let oe=1,Te=Tt.length,He=Lt.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(Tt.length<2||Lt.length<2)return-1;oe=2,Te/=2,He/=2,Mt/=2}function Ge(ur,jr){return oe===1?ur[jr]:ur.readUInt16BE(jr*oe)}let cr;if(ve){let ur=-1;for(cr=Mt;crTe&&(Mt=Te-He),cr=Mt;cr>=0;cr--){let ur=!0;for(let jr=0;jrve&&(ee=ve)):ee=ve;let oe=Lt.length;ee>oe/2&&(ee=oe/2);let Te;for(Te=0;Te>>0,isFinite(Mt)?(Mt=Mt>>>0,ee===void 0&&(ee="utf8")):(ee=Mt,Mt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ve=this.length-Lt;if((Mt===void 0||Mt>ve)&&(Mt=ve),Tt.length>0&&(Mt<0||Lt<0)||Lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");let oe=!1;for(;;)switch(ee){case"hex":return C(this,Tt,Lt,Mt);case"utf8":case"utf-8":return A(this,Tt,Lt,Mt);case"ascii":case"latin1":case"binary":return h(this,Tt,Lt,Mt);case"base64":return p(this,Tt,Lt,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,Tt,Lt,Mt);default:if(oe)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),oe=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(Tt,Lt,Mt){return Lt===0&&Mt===Tt.length?Z.fromByteArray(Tt):Z.fromByteArray(Tt.slice(Lt,Mt))}function R(Tt,Lt,Mt){Mt=Math.min(Tt.length,Mt);let ee=[],ve=Lt;for(;ve239?4:oe>223?3:oe>191?2:1;if(ve+He<=Mt){let Ge,cr,ur,jr;switch(He){case 1:oe<128&&(Te=oe);break;case 2:Ge=Tt[ve+1],(Ge&192)===128&&(jr=(oe&31)<<6|Ge&63,jr>127&&(Te=jr));break;case 3:Ge=Tt[ve+1],cr=Tt[ve+2],(Ge&192)===128&&(cr&192)===128&&(jr=(oe&15)<<12|(Ge&63)<<6|cr&63,jr>2047&&(jr<55296||jr>57343)&&(Te=jr));break;case 4:Ge=Tt[ve+1],cr=Tt[ve+2],ur=Tt[ve+3],(Ge&192)===128&&(cr&192)===128&&(ur&192)===128&&(jr=(oe&15)<<18|(Ge&63)<<12|(cr&63)<<6|ur&63,jr>65535&&jr<1114112&&(Te=jr))}}Te===null?(Te=65533,He=1):Te>65535&&(Te-=65536,ee.push(Te>>>10&1023|55296),Te=56320|Te&1023),ee.push(Te),ve+=He}return j(ee)}var O=4096;function j(Tt){let Lt=Tt.length;if(Lt<=O)return String.fromCharCode.apply(String,Tt);let Mt="",ee=0;for(;eeee)&&(Mt=ee);let ve="";for(let oe=Lt;oeMt&&(Tt=Mt),Lt<0?(Lt+=Mt,Lt<0&&(Lt=0)):Lt>Mt&&(Lt=Mt),LtMt)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=this[Tt],ve=1,oe=0;for(;++oe>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=this[Tt+--Lt],ve=1;for(;Lt>0&&(ve*=256);)ee+=this[Tt+--Lt]*ve;return ee},e.prototype.readUint8=e.prototype.readUInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]|this[Tt+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,2,this.length),this[Tt]<<8|this[Tt+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),(this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16)+this[Tt+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]*16777216+(this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3])},e.prototype.readBigUInt64LE=pe(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let ee=Lt+this[++Tt]*2**8+this[++Tt]*2**16+this[++Tt]*2**24,ve=this[++Tt]+this[++Tt]*2**8+this[++Tt]*2**16+Mt*2**24;return BigInt(ee)+(BigInt(ve)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let ee=Lt*2**24+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt],ve=this[++Tt]*2**24+this[++Tt]*2**16+this[++Tt]*2**8+Mt;return(BigInt(ee)<>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=this[Tt],ve=1,oe=0;for(;++oe=ve&&(ee-=Math.pow(2,8*Lt)),ee},e.prototype.readIntBE=function(Tt,Lt,Mt){Tt=Tt>>>0,Lt=Lt>>>0,Mt||W(Tt,Lt,this.length);let ee=Lt,ve=1,oe=this[Tt+--ee];for(;ee>0&&(ve*=256);)oe+=this[Tt+--ee]*ve;return ve*=128,oe>=ve&&(oe-=Math.pow(2,8*Lt)),oe},e.prototype.readInt8=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,1,this.length),this[Tt]&128?(255-this[Tt]+1)*-1:this[Tt]},e.prototype.readInt16LE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt]|this[Tt+1]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt16BE=function(Tt,Lt){Tt=Tt>>>0,Lt||W(Tt,2,this.length);let Mt=this[Tt+1]|this[Tt]<<8;return Mt&32768?Mt|4294901760:Mt},e.prototype.readInt32LE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]|this[Tt+1]<<8|this[Tt+2]<<16|this[Tt+3]<<24},e.prototype.readInt32BE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),this[Tt]<<24|this[Tt+1]<<16|this[Tt+2]<<8|this[Tt+3]},e.prototype.readBigInt64LE=pe(function(Tt){Tt=Tt>>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let ee=this[Tt+4]+this[Tt+5]*2**8+this[Tt+6]*2**16+(Mt<<24);return(BigInt(ee)<>>0,it(Tt,"offset");let Lt=this[Tt],Mt=this[Tt+7];(Lt===void 0||Mt===void 0)&&Y(Tt,this.length-8);let ee=(Lt<<24)+this[++Tt]*2**16+this[++Tt]*2**8+this[++Tt];return(BigInt(ee)<>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!0,23,4)},e.prototype.readFloatBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,4,this.length),c.read(this,Tt,!1,23,4)},e.prototype.readDoubleLE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!0,52,8)},e.prototype.readDoubleBE=function(Tt,Lt){return Tt=Tt>>>0,Lt||W(Tt,8,this.length),c.read(this,Tt,!1,52,8)};function q(Tt,Lt,Mt,ee,ve,oe){if(!e.isBuffer(Tt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Lt>ve||LtTt.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(Tt,Lt,Mt,ee){if(Tt=+Tt,Lt=Lt>>>0,Mt=Mt>>>0,!ee){let Te=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Te,0)}let ve=1,oe=0;for(this[Lt]=Tt&255;++oe>>0,Mt=Mt>>>0,!ee){let Te=Math.pow(2,8*Mt)-1;q(this,Tt,Lt,Mt,Te,0)}let ve=Mt-1,oe=1;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)this[Lt+ve]=Tt/oe&255;return Lt+Mt},e.prototype.writeUint8=e.prototype.writeUInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,255,0),this[Lt]=Tt&255,Lt+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,65535,0),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt+3]=Tt>>>24,this[Lt+2]=Tt>>>16,this[Lt+1]=Tt>>>8,this[Lt]=Tt&255,Lt+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,4294967295,0),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4};function J(Tt,Lt,Mt,ee,ve){vt(Lt,ee,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe,oe=oe>>8,Tt[Mt++]=oe;let Te=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Te=Te>>8,Tt[Mt++]=Te,Mt}function lt(Tt,Lt,Mt,ee,ve){vt(Lt,ee,ve,Tt,Mt,7);let oe=Number(Lt&BigInt(4294967295));Tt[Mt+7]=oe,oe=oe>>8,Tt[Mt+6]=oe,oe=oe>>8,Tt[Mt+5]=oe,oe=oe>>8,Tt[Mt+4]=oe;let Te=Number(Lt>>BigInt(32)&BigInt(4294967295));return Tt[Mt+3]=Te,Te=Te>>8,Tt[Mt+2]=Te,Te=Te>>8,Tt[Mt+1]=Te,Te=Te>>8,Tt[Mt]=Te,Mt+8}e.prototype.writeBigUInt64LE=pe(function(Tt,Lt=0){return J(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=pe(function(Tt,Lt=0){return lt(this,Tt,Lt,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(Tt,Lt,Mt,ee){if(Tt=+Tt,Lt=Lt>>>0,!ee){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=0,oe=1,Te=0;for(this[Lt]=Tt&255;++ve>0)-Te&255;return Lt+Mt},e.prototype.writeIntBE=function(Tt,Lt,Mt,ee){if(Tt=+Tt,Lt=Lt>>>0,!ee){let He=Math.pow(2,8*Mt-1);q(this,Tt,Lt,Mt,He-1,-He)}let ve=Mt-1,oe=1,Te=0;for(this[Lt+ve]=Tt&255;--ve>=0&&(oe*=256);)Tt<0&&Te===0&&this[Lt+ve+1]!==0&&(Te=1),this[Lt+ve]=(Tt/oe>>0)-Te&255;return Lt+Mt},e.prototype.writeInt8=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,1,127,-128),Tt<0&&(Tt=255+Tt+1),this[Lt]=Tt&255,Lt+1},e.prototype.writeInt16LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,Lt+2},e.prototype.writeInt16BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,2,32767,-32768),this[Lt]=Tt>>>8,this[Lt+1]=Tt&255,Lt+2},e.prototype.writeInt32LE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),this[Lt]=Tt&255,this[Lt+1]=Tt>>>8,this[Lt+2]=Tt>>>16,this[Lt+3]=Tt>>>24,Lt+4},e.prototype.writeInt32BE=function(Tt,Lt,Mt){return Tt=+Tt,Lt=Lt>>>0,Mt||q(this,Tt,Lt,4,2147483647,-2147483648),Tt<0&&(Tt=4294967295+Tt+1),this[Lt]=Tt>>>24,this[Lt+1]=Tt>>>16,this[Lt+2]=Tt>>>8,this[Lt+3]=Tt&255,Lt+4},e.prototype.writeBigInt64LE=pe(function(Tt,Lt=0){return J(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=pe(function(Tt,Lt=0){return lt(this,Tt,Lt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function yt(Tt,Lt,Mt,ee,ve,oe){if(Mt+ee>Tt.length)throw new RangeError("Index out of range");if(Mt<0)throw new RangeError("Index out of range")}function mt(Tt,Lt,Mt,ee,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,4),c.write(Tt,Lt,Mt,ee,23,4),Mt+4}e.prototype.writeFloatLE=function(Tt,Lt,Mt){return mt(this,Tt,Lt,!0,Mt)},e.prototype.writeFloatBE=function(Tt,Lt,Mt){return mt(this,Tt,Lt,!1,Mt)};function st(Tt,Lt,Mt,ee,ve){return Lt=+Lt,Mt=Mt>>>0,ve||yt(Tt,Lt,Mt,8),c.write(Tt,Lt,Mt,ee,52,8),Mt+8}e.prototype.writeDoubleLE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!0,Mt)},e.prototype.writeDoubleBE=function(Tt,Lt,Mt){return st(this,Tt,Lt,!1,Mt)},e.prototype.copy=function(Tt,Lt,Mt,ee){if(!e.isBuffer(Tt))throw new TypeError("argument should be a Buffer");if(Mt||(Mt=0),!ee&&ee!==0&&(ee=this.length),Lt>=Tt.length&&(Lt=Tt.length),Lt||(Lt=0),ee>0&&ee=this.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),Tt.length-Lt>>0,Mt=Mt===void 0?this.length:Mt>>>0,Tt||(Tt=0);let ve;if(typeof Tt=="number")for(ve=Lt;ve2**32?ve=rt(String(Mt)):typeof Mt=="bigint"&&(ve=String(Mt),(Mt>BigInt(2)**BigInt(32)||Mt<-(BigInt(2)**BigInt(32)))&&(ve=rt(ve)),ve+="n"),ee+=` It must be ${Lt}. Received ${ve}`,ee},RangeError);function rt(Tt){let Lt="",Mt=Tt.length,ee=Tt[0]==="-"?1:0;for(;Mt>=ee+4;Mt-=3)Lt=`_${Tt.slice(Mt-3,Mt)}${Lt}`;return`${Tt.slice(0,Mt)}${Lt}`}function at(Tt,Lt,Mt){it(Lt,"offset"),(Tt[Lt]===void 0||Tt[Lt+Mt]===void 0)&&Y(Lt,Tt.length-(Mt+1))}function vt(Tt,Lt,Mt,ee,ve,oe){if(Tt>Mt||Tt= 0${Te} and < 2${Te} ** ${(oe+1)*8}${Te}`:He=`>= -(2${Te} ** ${(oe+1)*8-1}${Te}) and < 2 ** ${(oe+1)*8-1}${Te}`,new tt.ERR_OUT_OF_RANGE("value",He,Tt)}at(ee,ve,oe)}function it(Tt,Lt){if(typeof Tt!="number")throw new tt.ERR_INVALID_ARG_TYPE(Lt,"number",Tt)}function Y(Tt,Lt,Mt){throw Math.floor(Tt)!==Tt?(it(Tt,Mt),new tt.ERR_OUT_OF_RANGE("offset","an integer",Tt)):Lt<0?new tt.ERR_BUFFER_OUT_OF_BOUNDS:new tt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Lt}`,Tt)}var ft=/[^+/0-9A-Za-z-_]/g;function ut(Tt){if(Tt=Tt.split("=")[0],Tt=Tt.trim().replace(ft,""),Tt.length<2)return"";for(;Tt.length%4!==0;)Tt=Tt+"=";return Tt}function kt(Tt,Lt){Lt=Lt||1/0;let Mt,ee=Tt.length,ve=null,oe=[];for(let Te=0;Te55295&&Mt<57344){if(!ve){if(Mt>56319){(Lt-=3)>-1&&oe.push(239,191,189);continue}else if(Te+1===ee){(Lt-=3)>-1&&oe.push(239,191,189);continue}ve=Mt;continue}if(Mt<56320){(Lt-=3)>-1&&oe.push(239,191,189),ve=Mt;continue}Mt=(ve-55296<<10|Mt-56320)+65536}else ve&&(Lt-=3)>-1&&oe.push(239,191,189);if(ve=null,Mt<128){if((Lt-=1)<0)break;oe.push(Mt)}else if(Mt<2048){if((Lt-=2)<0)break;oe.push(Mt>>6|192,Mt&63|128)}else if(Mt<65536){if((Lt-=3)<0)break;oe.push(Mt>>12|224,Mt>>6&63|128,Mt&63|128)}else if(Mt<1114112){if((Lt-=4)<0)break;oe.push(Mt>>18|240,Mt>>12&63|128,Mt>>6&63|128,Mt&63|128)}else throw new Error("Invalid code point")}return oe}function It(Tt){let Lt=[];for(let Mt=0;Mt>8,ve=Mt%256,oe.push(ve),oe.push(ee);return oe}function qt(Tt){return Z.toByteArray(ut(Tt))}function Wt(Tt,Lt,Mt,ee){let ve;for(ve=0;ve=Lt.length||ve>=Tt.length);++ve)Lt[ve+Mt]=Tt[ve];return ve}function Jt(Tt,Lt){return Tt instanceof Lt||Tt!=null&&Tt.constructor!=null&&Tt.constructor.name!=null&&Tt.constructor.name===Lt.name}function ge(Tt){return Tt!==Tt}var fe=function(){let Tt="0123456789abcdef",Lt=new Array(256);for(let Mt=0;Mt<16;++Mt){let ee=Mt*16;for(let ve=0;ve<16;++ve)Lt[ee+ve]=Tt[Mt]+Tt[ve]}return Lt}();function pe(Tt){return typeof BigInt>"u"?se:Tt}function se(){throw new Error("BigInt not supported")}}),uk=Dt((Q,Z)=>{Z.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var c={},g=Symbol("test"),I=Object(g);if(typeof g=="string"||Object.prototype.toString.call(g)!=="[object Symbol]"||Object.prototype.toString.call(I)!=="[object Symbol]")return!1;var S=42;c[g]=S;for(var t in c)return!1;if(typeof Object.keys=="function"&&Object.keys(c).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(c).length!==0)return!1;var e=Object.getOwnPropertySymbols(c);if(e.length!==1||e[0]!==g||!Object.prototype.propertyIsEnumerable.call(c,g))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var r=Object.getOwnPropertyDescriptor(c,g);if(r.value!==S||r.enumerable!==!0)return!1}return!0}}),Kw=Dt((Q,Z)=>{var c=uk();Z.exports=function(){return c()&&!!Symbol.toStringTag}}),I7=Dt((Q,Z)=>{Z.exports=Object}),bB=Dt((Q,Z)=>{Z.exports=Error}),wB=Dt((Q,Z)=>{Z.exports=EvalError}),kB=Dt((Q,Z)=>{Z.exports=RangeError}),TB=Dt((Q,Z)=>{Z.exports=ReferenceError}),z7=Dt((Q,Z)=>{Z.exports=SyntaxError}),ib=Dt((Q,Z)=>{Z.exports=TypeError}),AB=Dt((Q,Z)=>{Z.exports=URIError}),MB=Dt((Q,Z)=>{Z.exports=Math.abs}),SB=Dt((Q,Z)=>{Z.exports=Math.floor}),EB=Dt((Q,Z)=>{Z.exports=Math.max}),CB=Dt((Q,Z)=>{Z.exports=Math.min}),LB=Dt((Q,Z)=>{Z.exports=Math.pow}),PB=Dt((Q,Z)=>{Z.exports=Math.round}),IB=Dt((Q,Z)=>{Z.exports=Number.isNaN||function(c){return c!==c}}),zB=Dt((Q,Z)=>{var c=IB();Z.exports=function(g){return c(g)||g===0?g:g<0?-1:1}}),OB=Dt((Q,Z)=>{Z.exports=Object.getOwnPropertyDescriptor}),ax=Dt((Q,Z)=>{var c=OB();if(c)try{c([],"length")}catch{c=null}Z.exports=c}),Xw=Dt((Q,Z)=>{var c=Object.defineProperty||!1;if(c)try{c({},"a",{value:1})}catch{c=!1}Z.exports=c}),DB=Dt((Q,Z)=>{var c=typeof Symbol<"u"&&Symbol,g=uk();Z.exports=function(){return typeof c!="function"||typeof Symbol!="function"||typeof c("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()}}),O7=Dt((Q,Z)=>{Z.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),D7=Dt((Q,Z)=>{var c=I7();Z.exports=c.getPrototypeOf||null}),FB=Dt((Q,Z)=>{var c="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,I=Math.max,S="[object Function]",t=function(a,n){for(var o=[],i=0;i{var c=FB();Z.exports=Function.prototype.bind||c}),ck=Dt((Q,Z)=>{Z.exports=Function.prototype.call}),F7=Dt((Q,Z)=>{Z.exports=Function.prototype.apply}),RB=Dt((Q,Z)=>{Z.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),BB=Dt((Q,Z)=>{var c=ab(),g=F7(),I=ck(),S=RB();Z.exports=S||c.call(I,g)}),NB=Dt((Q,Z)=>{var c=ab(),g=ib(),I=ck(),S=BB();Z.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new g("a function is required");return S(c,I,t)}}),jB=Dt((Q,Z)=>{var c=NB(),g=ax(),I;try{I=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var S=!!I&&g&&g(Object.prototype,"__proto__"),t=Object,e=t.getPrototypeOf;Z.exports=S&&typeof S.get=="function"?c([S.get]):typeof e=="function"?function(r){return e(r==null?r:t(r))}:!1}),UB=Dt((Q,Z)=>{var c=O7(),g=D7(),I=jB();Z.exports=c?function(S){return c(S)}:g?function(S){if(!S||typeof S!="object"&&typeof S!="function")throw new TypeError("getProto: not an object");return g(S)}:I?function(S){return I(S)}:null}),VB=Dt((Q,Z)=>{var c=Function.prototype.call,g=Object.prototype.hasOwnProperty,I=ab();Z.exports=I.call(c,g)}),hk=Dt((Q,Z)=>{var c,g=I7(),I=bB(),S=wB(),t=kB(),e=TB(),r=z7(),a=ib(),n=AB(),o=MB(),i=SB(),l=EB(),f=CB(),x=LB(),y=PB(),v=zB(),T=Function,u=function(at){try{return T('"use strict"; return ('+at+").constructor;")()}catch{}},b=ax(),_=Xw(),P=function(){throw new a},M=b?function(){try{return arguments.callee,P}catch{try{return b(arguments,"callee").get}catch{return P}}}():P,C=DB()(),A=UB(),h=D7(),p=O7(),k=F7(),w=ck(),R={},O=typeof Uint8Array>"u"||!A?c:A(Uint8Array),j={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?c:ArrayBuffer,"%ArrayIteratorPrototype%":C&&A?A([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?c:Atomics,"%BigInt%":typeof BigInt>"u"?c:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?c:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?c:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":I,"%eval%":eval,"%EvalError%":S,"%Float16Array%":typeof Float16Array>"u"?c:Float16Array,"%Float32Array%":typeof Float32Array>"u"?c:Float32Array,"%Float64Array%":typeof Float64Array>"u"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?c:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?c:Int8Array,"%Int16Array%":typeof Int16Array>"u"?c:Int16Array,"%Int32Array%":typeof Int32Array>"u"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&A?A(A([][Symbol.iterator]())):c,"%JSON%":typeof JSON=="object"?JSON:c,"%Map%":typeof Map>"u"?c:Map,"%MapIteratorPrototype%":typeof Map>"u"||!C||!A?c:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":g,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?c:Promise,"%Proxy%":typeof Proxy>"u"?c:Proxy,"%RangeError%":t,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?c:Set,"%SetIteratorPrototype%":typeof Set>"u"||!C||!A?c:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&A?A(""[Symbol.iterator]()):c,"%Symbol%":C?Symbol:c,"%SyntaxError%":r,"%ThrowTypeError%":M,"%TypedArray%":O,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?c:Uint32Array,"%URIError%":n,"%WeakMap%":typeof WeakMap>"u"?c:WeakMap,"%WeakRef%":typeof WeakRef>"u"?c:WeakRef,"%WeakSet%":typeof WeakSet>"u"?c:WeakSet,"%Function.prototype.call%":w,"%Function.prototype.apply%":k,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":h,"%Math.abs%":o,"%Math.floor%":i,"%Math.max%":l,"%Math.min%":f,"%Math.pow%":x,"%Math.round%":y,"%Math.sign%":v,"%Reflect.getPrototypeOf%":p};if(A)try{null.error}catch(at){V=A(A(at)),j["%Error.prototype%"]=V}var V,H=function at(vt){var it;if(vt==="%AsyncFunction%")it=u("async function () {}");else if(vt==="%GeneratorFunction%")it=u("function* () {}");else if(vt==="%AsyncGeneratorFunction%")it=u("async function* () {}");else if(vt==="%AsyncGenerator%"){var Y=at("%AsyncGeneratorFunction%");Y&&(it=Y.prototype)}else if(vt==="%AsyncIteratorPrototype%"){var ft=at("%AsyncGenerator%");ft&&A&&(it=A(ft.prototype))}return j[vt]=it,it},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U=ab(),W=VB(),q=U.call(w,Array.prototype.concat),J=U.call(k,Array.prototype.splice),lt=U.call(w,String.prototype.replace),yt=U.call(w,String.prototype.slice),mt=U.call(w,RegExp.prototype.exec),st=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,tt=/\\(\\)?/g,dt=function(at){var vt=yt(at,0,1),it=yt(at,-1);if(vt==="%"&&it!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(it==="%"&&vt!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var Y=[];return lt(at,st,function(ft,ut,kt,It){Y[Y.length]=kt?lt(It,tt,"$1"):ut||ft}),Y},rt=function(at,vt){var it=at,Y;if(W(F,it)&&(Y=F[it],it="%"+Y[0]+"%"),W(j,it)){var ft=j[it];if(ft===R&&(ft=H(it)),typeof ft>"u"&&!vt)throw new a("intrinsic "+at+" exists, but is not available. Please file an issue!");return{alias:Y,name:it,value:ft}}throw new r("intrinsic "+at+" does not exist!")};Z.exports=function(at,vt){if(typeof at!="string"||at.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof vt!="boolean")throw new a('"allowMissing" argument must be a boolean');if(mt(/^%?[^%]*%?$/,at)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var it=dt(at),Y=it.length>0?it[0]:"",ft=rt("%"+Y+"%",vt),ut=ft.name,kt=ft.value,It=!1,Pt=ft.alias;Pt&&(Y=Pt[0],J(it,q([0,1],Pt)));for(var qt=1,Wt=!0;qt=it.length){var pe=b(kt,Jt);Wt=!!pe,Wt&&"get"in pe&&!("originalValue"in pe.get)?kt=pe.get:kt=kt[Jt]}else Wt=W(kt,Jt),kt=kt[Jt];Wt&&!It&&(j[ut]=kt)}}return kt}}),HB=Dt((Q,Z)=>{var c=Xw(),g=z7(),I=ib(),S=ax();Z.exports=function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new I("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new I("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new I("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new I("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new I("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new I("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,i=arguments.length>6?arguments[6]:!1,l=!!S&&S(t,e);if(c)c(t,e,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:r,writable:n===null&&l?l.writable:!n});else if(i||!a&&!n&&!o)t[e]=r;else throw new g("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),R7=Dt((Q,Z)=>{var c=Xw(),g=function(){return!!c};g.hasArrayLengthDefineBug=function(){if(!c)return null;try{return c([],"length",{value:1}).length!==1}catch{return!0}},Z.exports=g}),WB=Dt((Q,Z)=>{var c=hk(),g=HB(),I=R7()(),S=ax(),t=ib(),e=c("%Math.floor%");Z.exports=function(r,a){if(typeof r!="function")throw new t("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||e(a)!==a)throw new t("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in r&&S){var l=S(r,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(i=!1)}return(o||i||!n)&&(I?g(r,"length",a,!0,!0):g(r,"length",a)),r}}),Jw=Dt((Q,Z)=>{var c=ab(),g=hk(),I=WB(),S=ib(),t=g("%Function.prototype.apply%"),e=g("%Function.prototype.call%"),r=g("%Reflect.apply%",!0)||c.call(e,t),a=Xw(),n=g("%Math.max%");Z.exports=function(i){if(typeof i!="function")throw new S("a function is required");var l=r(c,e,arguments);return I(l,1+n(0,i.length-(arguments.length-1)),!0)};var o=function(){return r(c,t,arguments)};a?a(Z.exports,"apply",{value:o}):Z.exports.apply=o}),ob=Dt((Q,Z)=>{var c=hk(),g=Jw(),I=g(c("String.prototype.indexOf"));Z.exports=function(S,t){var e=c(S,!!t);return typeof e=="function"&&I(S,".prototype.")>-1?g(e):e}}),qB=Dt((Q,Z)=>{var c=Kw()(),g=ob(),I=g("Object.prototype.toString"),S=function(r){return c&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:I(r)==="[object Arguments]"},t=function(r){return S(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&I(r)!=="[object Array]"&&I(r.callee)==="[object Function]"},e=function(){return S(arguments)}();S.isLegacyArguments=t,Z.exports=e?S:t}),$B=Dt((Q,Z)=>{var c=Object.prototype.toString,g=Function.prototype.toString,I=/^\s*(?:function)?\*/,S=Kw()(),t=Object.getPrototypeOf,e=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},r;Z.exports=function(a){if(typeof a!="function")return!1;if(I.test(g.call(a)))return!0;if(!S){var n=c.call(a);return n==="[object GeneratorFunction]"}if(!t)return!1;if(typeof r>"u"){var o=e();r=o?t(o):!1}return t(a)===r}}),ZB=Dt((Q,Z)=>{var c=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,I,S;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{I=Object.defineProperty({},"length",{get:function(){throw S}}),S={},g(function(){throw 42},null,I)}catch(b){b!==S&&(g=null)}else g=null;var t=/^\s*class\b/,e=function(b){try{var _=c.call(b);return t.test(_)}catch{return!1}},r=function(b){try{return e(b)?!1:(c.call(b),!0)}catch{return!1}},a=Object.prototype.toString,n="[object Object]",o="[object Function]",i="[object GeneratorFunction]",l="[object HTMLAllCollection]",f="[object HTML document.all class]",x="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(u=document.all,a.call(u)===a.call(document.all)&&(T=function(b){if((v||!b)&&(typeof b>"u"||typeof b=="object"))try{var _=a.call(b);return(_===l||_===f||_===x||_===n)&&b("")==null}catch{}return!1}));var u;Z.exports=g?function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;try{g(b,null,I)}catch(_){if(_!==S)return!1}return!e(b)&&r(b)}:function(b){if(T(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;if(y)return r(b);if(e(b))return!1;var _=a.call(b);return _!==o&&_!==i&&!/^\[object HTML/.test(_)?!1:r(b)}}),B7=Dt((Q,Z)=>{var c=ZB(),g=Object.prototype.toString,I=Object.prototype.hasOwnProperty,S=function(a,n,o){for(var i=0,l=a.length;i=3&&(i=o),g.call(a)==="[object Array]"?S(a,n,i):typeof a=="string"?t(a,n,i):e(a,n,i)};Z.exports=r}),N7=Dt((Q,Z)=>{var c=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],g=typeof globalThis>"u"?window:globalThis;Z.exports=function(){for(var I=[],S=0;S{var c=B7(),g=N7(),I=Jw(),S=ob(),t=ax(),e=S("Object.prototype.toString"),r=Kw()(),a=typeof globalThis>"u"?window:globalThis,n=g(),o=S("String.prototype.slice"),i=Object.getPrototypeOf,l=S("Array.prototype.indexOf",!0)||function(v,T){for(var u=0;u-1?T:T!=="Object"?!1:y(v)}return t?x(v):null}}),YB=Dt((Q,Z)=>{var c=B7(),g=N7(),I=ob(),S=I("Object.prototype.toString"),t=Kw()(),e=ax(),r=typeof globalThis>"u"?window:globalThis,a=g(),n=I("Array.prototype.indexOf",!0)||function(x,y){for(var v=0;v-1}return e?f(x):!1}}),j7=Dt(Q=>{var Z=qB(),c=$B(),g=GB(),I=YB();function S(Pt){return Pt.call.bind(Pt)}var t=typeof BigInt<"u",e=typeof Symbol<"u",r=S(Object.prototype.toString),a=S(Number.prototype.valueOf),n=S(String.prototype.valueOf),o=S(Boolean.prototype.valueOf);t&&(i=S(BigInt.prototype.valueOf));var i;e&&(l=S(Symbol.prototype.valueOf));var l;function f(Pt,qt){if(typeof Pt!="object")return!1;try{return qt(Pt),!0}catch{return!1}}Q.isArgumentsObject=Z,Q.isGeneratorFunction=c,Q.isTypedArray=I;function x(Pt){return typeof Promise<"u"&&Pt instanceof Promise||Pt!==null&&typeof Pt=="object"&&typeof Pt.then=="function"&&typeof Pt.catch=="function"}Q.isPromise=x;function y(Pt){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Pt):I(Pt)||J(Pt)}Q.isArrayBufferView=y;function v(Pt){return g(Pt)==="Uint8Array"}Q.isUint8Array=v;function T(Pt){return g(Pt)==="Uint8ClampedArray"}Q.isUint8ClampedArray=T;function u(Pt){return g(Pt)==="Uint16Array"}Q.isUint16Array=u;function b(Pt){return g(Pt)==="Uint32Array"}Q.isUint32Array=b;function _(Pt){return g(Pt)==="Int8Array"}Q.isInt8Array=_;function P(Pt){return g(Pt)==="Int16Array"}Q.isInt16Array=P;function M(Pt){return g(Pt)==="Int32Array"}Q.isInt32Array=M;function C(Pt){return g(Pt)==="Float32Array"}Q.isFloat32Array=C;function A(Pt){return g(Pt)==="Float64Array"}Q.isFloat64Array=A;function h(Pt){return g(Pt)==="BigInt64Array"}Q.isBigInt64Array=h;function p(Pt){return g(Pt)==="BigUint64Array"}Q.isBigUint64Array=p;function k(Pt){return r(Pt)==="[object Map]"}k.working=typeof Map<"u"&&k(new Map);function w(Pt){return typeof Map>"u"?!1:k.working?k(Pt):Pt instanceof Map}Q.isMap=w;function R(Pt){return r(Pt)==="[object Set]"}R.working=typeof Set<"u"&&R(new Set);function O(Pt){return typeof Set>"u"?!1:R.working?R(Pt):Pt instanceof Set}Q.isSet=O;function j(Pt){return r(Pt)==="[object WeakMap]"}j.working=typeof WeakMap<"u"&&j(new WeakMap);function V(Pt){return typeof WeakMap>"u"?!1:j.working?j(Pt):Pt instanceof WeakMap}Q.isWeakMap=V;function H(Pt){return r(Pt)==="[object WeakSet]"}H.working=typeof WeakSet<"u"&&H(new WeakSet);function F(Pt){return H(Pt)}Q.isWeakSet=F;function U(Pt){return r(Pt)==="[object ArrayBuffer]"}U.working=typeof ArrayBuffer<"u"&&U(new ArrayBuffer);function W(Pt){return typeof ArrayBuffer>"u"?!1:U.working?U(Pt):Pt instanceof ArrayBuffer}Q.isArrayBuffer=W;function q(Pt){return r(Pt)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function J(Pt){return typeof DataView>"u"?!1:q.working?q(Pt):Pt instanceof DataView}Q.isDataView=J;var lt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function yt(Pt){return r(Pt)==="[object SharedArrayBuffer]"}function mt(Pt){return typeof lt>"u"?!1:(typeof yt.working>"u"&&(yt.working=yt(new lt)),yt.working?yt(Pt):Pt instanceof lt)}Q.isSharedArrayBuffer=mt;function st(Pt){return r(Pt)==="[object AsyncFunction]"}Q.isAsyncFunction=st;function tt(Pt){return r(Pt)==="[object Map Iterator]"}Q.isMapIterator=tt;function dt(Pt){return r(Pt)==="[object Set Iterator]"}Q.isSetIterator=dt;function rt(Pt){return r(Pt)==="[object Generator]"}Q.isGeneratorObject=rt;function at(Pt){return r(Pt)==="[object WebAssembly.Module]"}Q.isWebAssemblyCompiledModule=at;function vt(Pt){return f(Pt,a)}Q.isNumberObject=vt;function it(Pt){return f(Pt,n)}Q.isStringObject=it;function Y(Pt){return f(Pt,o)}Q.isBooleanObject=Y;function ft(Pt){return t&&f(Pt,i)}Q.isBigIntObject=ft;function ut(Pt){return e&&f(Pt,l)}Q.isSymbolObject=ut;function kt(Pt){return vt(Pt)||it(Pt)||Y(Pt)||ft(Pt)||ut(Pt)}Q.isBoxedPrimitive=kt;function It(Pt){return typeof Uint8Array<"u"&&(W(Pt)||mt(Pt))}Q.isAnyArrayBuffer=It,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Pt){Object.defineProperty(Q,Pt,{enumerable:!1,value:function(){throw new Error(Pt+" is not supported in userland")}})})}),U7=Dt((Q,Z)=>{Z.exports=function(c){return c&&typeof c=="object"&&typeof c.copy=="function"&&typeof c.fill=="function"&&typeof c.readUInt8=="function"}}),V7=Dt(Q=>{var Z=Object.getOwnPropertyDescriptors||function(q){for(var J=Object.keys(q),lt={},yt=0;yt=mt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,J).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),lt=!0}return q.apply(this,arguments)}return yt};var g={},I=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),I=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(I.test(q)){var J=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,J,lt)}}else g[q]=function(){};return g[q]};function t(q,J){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(J)?lt.showHidden=J:J&&Q._extend(lt,J),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,J){var lt=t.styles[J];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,J){return q}function a(q){var J={};return q.forEach(function(lt,yt){J[lt]=!0}),J}function n(q,J,lt){if(q.customInspect&&J&&k(J.inspect)&&J.inspect!==Q.inspect&&!(J.constructor&&J.constructor.prototype===J)){var yt=J.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var mt=o(q,J);if(mt)return mt;var st=Object.keys(J),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(J)),p(J)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(J);if(st.length===0){if(k(J)){var dt=J.name?": "+J.name:"";return q.stylize("[Function"+dt+"]","special")}if(C(J))return q.stylize(RegExp.prototype.toString.call(J),"regexp");if(h(J))return q.stylize(Date.prototype.toString.call(J),"date");if(p(J))return i(J)}var rt="",at=!1,vt=["{","}"];if(y(J)&&(at=!0,vt=["[","]"]),k(J)){var it=J.name?": "+J.name:"";rt=" [Function"+it+"]"}if(C(J)&&(rt=" "+RegExp.prototype.toString.call(J)),h(J)&&(rt=" "+Date.prototype.toUTCString.call(J)),p(J)&&(rt=" "+i(J)),st.length===0&&(!at||J.length==0))return vt[0]+rt+vt[1];if(lt<0)return C(J)?q.stylize(RegExp.prototype.toString.call(J),"regexp"):q.stylize("[Object]","special");q.seen.push(J);var Y;return at?Y=l(q,J,lt,tt,st):Y=st.map(function(ft){return f(q,J,lt,tt,ft,at)}),q.seen.pop(),x(Y,rt,vt)}function o(q,J){if(M(J))return q.stylize("undefined","undefined");if(_(J)){var lt="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(J))return q.stylize(""+J,"number");if(v(J))return q.stylize(""+J,"boolean");if(T(J))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function l(q,J,lt,yt,mt){for(var st=[],tt=0,dt=J.length;tt-1&&(st?dt=dt.split(` `).map(function(at){return" "+at}).join(` `).slice(2):dt=` `+dt.split(` `).map(function(at){return" "+at}).join(` -`))):dt=q.stylize("[Circular]","special")),M(tt)){if(st&&pt.match(/^\d+$/))return dt;tt=JSON.stringify(""+pt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+dt}function x(q,X,lt){var yt=0,pt=q.reduce(function(st,tt){return yt++,tt.indexOf(` -`)>=0&&yt++,st+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return pt>60?lt[0]+(X===""?"":X+` +`))):dt=q.stylize("[Circular]","special")),M(tt)){if(st&&mt.match(/^\d+$/))return dt;tt=JSON.stringify(""+mt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+dt}function x(q,J,lt){var yt=0,mt=q.reduce(function(st,tt){return yt++,tt.indexOf(` +`)>=0&&yt++,st+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return mt>60?lt[0]+(J===""?"":J+` `)+" "+q.join(`, - `)+" "+lt[1]:lt[0]+X+" "+q.join(", ")+" "+lt[1]}Q.types=E7();function y(q){return Array.isArray(q)}Q.isArray=y;function v(q){return typeof q=="boolean"}Q.isBoolean=v;function T(q){return q===null}Q.isNull=T;function u(q){return q==null}Q.isNullOrUndefined=u;function b(q){return typeof q=="number"}Q.isNumber=b;function _(q){return typeof q=="string"}Q.isString=_;function C(q){return typeof q=="symbol"}Q.isSymbol=C;function M(q){return q===void 0}Q.isUndefined=M;function E(q){return A(q)&&R(q)==="[object RegExp]"}Q.isRegExp=E,Q.types.isRegExp=E;function A(q){return typeof q=="object"&&q!==null}Q.isObject=A;function h(q){return A(q)&&R(q)==="[object Date]"}Q.isDate=h,Q.types.isDate=h;function p(q){return A(q)&&(R(q)==="[object Error]"||q instanceof Error)}Q.isError=p,Q.types.isNativeError=p;function k(q){return typeof q=="function"}Q.isFunction=k;function w(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}Q.isPrimitive=w,Q.isBuffer=C7();function R(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,X=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),N[q.getMonth()],X].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=_v(),Q._extend=function(q,X){if(!X||!A(X))return q;for(var lt=Object.keys(X),yt=lt.length;yt--;)q[lt[yt]]=X[lt[yt]];return q};function H(q,X){return Object.prototype.hasOwnProperty.call(q,X)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var X=q[F];if(typeof X!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(X,F,{value:X,enumerable:!1,writable:!1,configurable:!0}),X}function X(){for(var lt,yt,pt=new Promise(function(dt,rt){lt=dt,yt=rt}),st=[],tt=0;tt{function c(f,x){var y=Object.keys(f);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(f);x&&(v=v.filter(function(T){return Object.getOwnPropertyDescriptor(f,T).enumerable})),y.push.apply(y,v)}return y}function g(f){for(var x=1;x0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(x){var y={data:x,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var x=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,x}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(x){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=x+y.data;return v}},{key:"concat",value:function(x){if(this.length===0)return a.alloc(0);for(var y=a.allocUnsafe(x>>>0),v=this.head,T=0;v;)s(v.data,y,T),T+=v.data.length,v=v.next;return y}},{key:"consume",value:function(x,y){var v;return xu.length?u.length:x;if(b===u.length?T+=u:T+=u.slice(0,x),x-=b,x===0){b===u.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=u.slice(b));break}++v}return this.length-=v,T}},{key:"_getBuffer",value:function(x){var y=a.allocUnsafe(x),v=this.head,T=1;for(v.data.copy(y),x-=v.data.length;v=v.next;){var u=v.data,b=x>u.length?u.length:x;if(u.copy(y,y.length-x,0,b),x-=b,x===0){b===u.length?(++T,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=u.slice(b));break}++T}return this.length-=T,y}},{key:i,value:function(x,y){return o(this,g({},y,{depth:0,customInspect:!1}))}}]),f}()}),P7=Ft((Q,$)=>{function c(r,a){var n=this,o=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return o||i?(a?a(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(t,this,r)):process.nextTick(t,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!a&&s?n._writableState?n._writableState.errorEmitted?process.nextTick(P,n):(n._writableState.errorEmitted=!0,process.nextTick(g,n,s)):process.nextTick(g,n,s):a?(process.nextTick(P,n),a(s)):process.nextTick(P,n)}),this)}function g(r,a){t(r,a),P(r)}function P(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function t(r,a){r.emit("error",a)}function e(r,a){var n=r._readableState,o=r._writableState;n&&n.autoDestroy||o&&o.autoDestroy?r.destroy(a):r.emit("error",a)}$.exports={destroy:c,undestroy:S,errorOrDestroy:e}}),ax=Ft((Q,$)=>{function c(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.__proto__=n}var g={};function P(a,n,o){o||(o=Error);function i(f,x,y){return typeof n=="string"?n:n(f,x,y)}var s=function(f){c(x,f);function x(y,v,T){return f.call(this,i(y,v,T))||this}return x}(o);s.prototype.name=o.name,s.prototype.code=a,g[a]=s}function S(a,n){if(Array.isArray(a)){var o=a.length;return a=a.map(function(i){return String(i)}),o>2?"one of ".concat(n," ").concat(a.slice(0,o-1).join(", "),", or ")+a[o-1]:o===2?"one of ".concat(n," ").concat(a[0]," or ").concat(a[1]):"of ".concat(n," ").concat(a[0])}else return"of ".concat(n," ").concat(String(a))}function t(a,n,o){return a.substr(0,n.length)===n}function e(a,n,o){return(o===void 0||o>a.length)&&(o=a.length),a.substring(o-n.length,o)===n}function r(a,n,o){return typeof o!="number"&&(o=0),o+n.length>a.length?!1:a.indexOf(n,o)!==-1}P("ERR_INVALID_OPT_VALUE",function(a,n){return'The value "'+n+'" is invalid for option "'+a+'"'},TypeError),P("ERR_INVALID_ARG_TYPE",function(a,n,o){var i;typeof n=="string"&&t(n,"not ")?(i="must not be",n=n.replace(/^not /,"")):i="must be";var s;if(e(a," argument"))s="The ".concat(a," ").concat(i," ").concat(S(n,"type"));else{var f=r(a,".")?"property":"argument";s='The "'.concat(a,'" ').concat(f," ").concat(i," ").concat(S(n,"type"))}return s+=". Received type ".concat(typeof o),s},TypeError),P("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),P("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),P("ERR_STREAM_PREMATURE_CLOSE","Premature close"),P("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),P("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),P("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),P("ERR_STREAM_WRITE_AFTER_END","write after end"),P("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),P("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),P("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$.exports.codes=g}),z7=Ft((Q,$)=>{var c=ax().codes.ERR_INVALID_OPT_VALUE;function g(S,t,e){return S.highWaterMark!=null?S.highWaterMark:t?S[e]:null}function P(S,t,e,r){var a=g(t,r,e);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=r?e:"highWaterMark";throw new c(n,a)}return Math.floor(a)}return S.objectMode?16:16*1024}$.exports={getHighWaterMark:P}}),EB=Ft((Q,$)=>{$.exports=c;function c(P,S){if(g("noDeprecation"))return P;var t=!1;function e(){if(!t){if(g("throwDeprecation"))throw new Error(S);g("traceDeprecation")?console.trace(S):console.warn(S),t=!0}return P.apply(this,arguments)}return e}function g(P){try{if(!window.localStorage)return!1}catch{return!1}var S=window.localStorage[P];return S==null?!1:String(S).toLowerCase()==="true"}}),I7=Ft((Q,$)=>{$.exports=h;function c(tt){var dt=this;this.next=null,this.entry=null,this.finish=function(){st(dt,tt)}}var g;h.WritableState=E;var P={deprecate:EB()},S=x7(),t=nx().Buffer,e=window.Uint8Array||function(){};function r(tt){return t.from(tt)}function a(tt){return t.isBuffer(tt)||tt instanceof e}var n=P7(),o=z7(),i=o.getHighWaterMark,s=ax().codes,f=s.ERR_INVALID_ARG_TYPE,x=s.ERR_METHOD_NOT_IMPLEMENTED,y=s.ERR_MULTIPLE_CALLBACK,v=s.ERR_STREAM_CANNOT_PIPE,T=s.ERR_STREAM_DESTROYED,u=s.ERR_STREAM_NULL_VALUES,b=s.ERR_STREAM_WRITE_AFTER_END,_=s.ERR_UNKNOWN_ENCODING,C=n.errorOrDestroy;_v()(h,S);function M(){}function E(tt,dt,rt){g=g||ox(),tt=tt||{},typeof rt!="boolean"&&(rt=dt instanceof g),this.objectMode=!!tt.objectMode,rt&&(this.objectMode=this.objectMode||!!tt.writableObjectMode),this.highWaterMark=i(this,tt,"writableHighWaterMark",rt),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var at=tt.decodeStrings===!1;this.decodeStrings=!at,this.defaultEncoding=tt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(vt){H(dt,vt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=tt.emitClose!==!1,this.autoDestroy=!!tt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}E.prototype.getBuffer=function(){for(var tt=this.bufferedRequest,dt=[];tt;)dt.push(tt),tt=tt.next;return dt},function(){try{Object.defineProperty(E.prototype,"buffer",{get:P.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var A;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(h,Symbol.hasInstance,{value:function(tt){return A.call(this,tt)?!0:this!==h?!1:tt&&tt._writableState instanceof E}})):A=function(tt){return tt instanceof this};function h(tt){g=g||ox();var dt=this instanceof g;if(!dt&&!A.call(h,this))return new h(tt);this._writableState=new E(tt,this,dt),this.writable=!0,tt&&(typeof tt.write=="function"&&(this._write=tt.write),typeof tt.writev=="function"&&(this._writev=tt.writev),typeof tt.destroy=="function"&&(this._destroy=tt.destroy),typeof tt.final=="function"&&(this._final=tt.final)),S.call(this)}h.prototype.pipe=function(){C(this,new v)};function p(tt,dt){var rt=new b;C(tt,rt),process.nextTick(dt,rt)}function k(tt,dt,rt,at){var vt;return rt===null?vt=new u:typeof rt!="string"&&!dt.objectMode&&(vt=new f("chunk",["string","Buffer"],rt)),vt?(C(tt,vt),process.nextTick(at,vt),!1):!0}h.prototype.write=function(tt,dt,rt){var at=this._writableState,vt=!1,it=!at.objectMode&&a(tt);return it&&!t.isBuffer(tt)&&(tt=r(tt)),typeof dt=="function"&&(rt=dt,dt=null),it?dt="buffer":dt||(dt=at.defaultEncoding),typeof rt!="function"&&(rt=M),at.ending?p(this,rt):(it||k(this,at,tt,rt))&&(at.pendingcb++,vt=R(this,at,it,tt,dt,rt)),vt},h.prototype.cork=function(){this._writableState.corked++},h.prototype.uncork=function(){var tt=this._writableState;tt.corked&&(tt.corked--,!tt.writing&&!tt.corked&&!tt.bufferProcessing&&tt.bufferedRequest&&W(this,tt))},h.prototype.setDefaultEncoding=function(tt){if(typeof tt=="string"&&(tt=tt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((tt+"").toLowerCase())>-1))throw new _(tt);return this._writableState.defaultEncoding=tt,this},Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function w(tt,dt,rt){return!tt.objectMode&&tt.decodeStrings!==!1&&typeof dt=="string"&&(dt=t.from(dt,rt)),dt}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(tt,dt,rt,at,vt,it){if(!rt){var Y=w(dt,at,vt);at!==Y&&(rt=!0,vt="buffer",at=Y)}var ft=dt.objectMode?1:at.length;dt.length+=ft;var ut=dt.length{var c=Object.keys||function(o){var i=[];for(var s in o)i.push(s);return i};$.exports=r;var g=D7(),P=I7();for(_v()(r,g),S=c(P.prototype),e=0;e{var c=nx(),g=c.Buffer;function P(t,e){for(var r in t)e[r]=t[r]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?$.exports=c:(P(c,Q),Q.Buffer=S);function S(t,e,r){return g(t,e,r)}S.prototype=Object.create(g.prototype),P(g,S),S.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return g(t,e,r)},S.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var a=g(t);return e!==void 0?typeof r=="string"?a.fill(e,r):a.fill(e):a.fill(0),a},S.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return g(t)},S.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(t)}}),O7=Ft(Q=>{var $=CB().Buffer,c=$.isEncoding||function(T){switch(T=""+T,T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g(T){if(!T)return"utf8";for(var u;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(u)return;T=(""+T).toLowerCase(),u=!0}}function P(T){var u=g(T);if(typeof u!="string"&&($.isEncoding===c||!c(T)))throw new Error("Unknown encoding: "+T);return u||T}Q.StringDecoder=S;function S(T){this.encoding=P(T);var u;switch(this.encoding){case"utf16le":this.text=i,this.end=s,u=4;break;case"utf8":this.fillLast=a,u=4;break;case"base64":this.text=f,this.end=x,u=3;break;default:this.write=y,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=$.allocUnsafe(u)}S.prototype.write=function(T){if(T.length===0)return"";var u,b;if(this.lastNeed){if(u=this.fillLast(T),u===void 0)return"";b=this.lastNeed,this.lastNeed=0}else b=0;return b>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function e(T,u,b){var _=u.length-1;if(_=0?(C>0&&(T.lastNeed=C-1),C):--_=0?(C>0&&(T.lastNeed=C-2),C):--_=0?(C>0&&(C===2?C=0:T.lastNeed=C-3),C):0))}function r(T,u,b){if((u[0]&192)!==128)return T.lastNeed=0,"�";if(T.lastNeed>1&&u.length>1){if((u[1]&192)!==128)return T.lastNeed=1,"�";if(T.lastNeed>2&&u.length>2&&(u[2]&192)!==128)return T.lastNeed=2,"�"}}function a(T){var u=this.lastTotal-this.lastNeed,b=r(this,T);if(b!==void 0)return b;if(this.lastNeed<=T.length)return T.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,u,0,T.length),this.lastNeed-=T.length}function n(T,u){var b=e(this,T,u);if(!this.lastNeed)return T.toString("utf8",u);this.lastTotal=b;var _=T.length-(b-this.lastNeed);return T.copy(this.lastChar,0,_),T.toString("utf8",u,_)}function o(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+"�":u}function i(T,u){if((T.length-u)%2===0){var b=T.toString("utf16le",u);if(b){var _=b.charCodeAt(b.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],b.slice(0,-1)}return b}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",u,T.length-1)}function s(T){var u=T&&T.length?this.write(T):"";if(this.lastNeed){var b=this.lastTotal-this.lastNeed;return u+this.lastChar.toString("utf16le",0,b)}return u}function f(T,u){var b=(T.length-u)%3;return b===0?T.toString("base64",u):(this.lastNeed=3-b,this.lastTotal=3,b===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",u,T.length-b))}function x(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function y(T){return T.toString(this.encoding)}function v(T){return T&&T.length?this.write(T):""}}),ak=Ft((Q,$)=>{var c=ax().codes.ERR_STREAM_PREMATURE_CLOSE;function g(e){var r=!1;return function(){if(!r){r=!0;for(var a=arguments.length,n=new Array(a),o=0;o{var c;function g(u,b,_){return b in u?Object.defineProperty(u,b,{value:_,enumerable:!0,configurable:!0,writable:!0}):u[b]=_,u}var P=ak(),S=Symbol("lastResolve"),t=Symbol("lastReject"),e=Symbol("error"),r=Symbol("ended"),a=Symbol("lastPromise"),n=Symbol("handlePromise"),o=Symbol("stream");function i(u,b){return{value:u,done:b}}function s(u){var b=u[S];if(b!==null){var _=u[o].read();_!==null&&(u[a]=null,u[S]=null,u[t]=null,b(i(_,!1)))}}function f(u){process.nextTick(s,u)}function x(u,b){return function(_,C){u.then(function(){if(b[r]){_(i(void 0,!0));return}b[n](_,C)},C)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((c={get stream(){return this[o]},next:function(){var u=this,b=this[e];if(b!==null)return Promise.reject(b);if(this[r])return Promise.resolve(i(void 0,!0));if(this[o].destroyed)return new Promise(function(E,A){process.nextTick(function(){u[e]?A(u[e]):E(i(void 0,!0))})});var _=this[a],C;if(_)C=new Promise(x(_,this));else{var M=this[o].read();if(M!==null)return Promise.resolve(i(M,!1));C=new Promise(this[n])}return this[a]=C,C}},g(c,Symbol.asyncIterator,function(){return this}),g(c,"return",function(){var u=this;return new Promise(function(b,_){u[o].destroy(null,function(C){if(C){_(C);return}b(i(void 0,!0))})})}),c),y),T=function(u){var b,_=Object.create(v,(b={},g(b,o,{value:u,writable:!0}),g(b,S,{value:null,writable:!0}),g(b,t,{value:null,writable:!0}),g(b,e,{value:null,writable:!0}),g(b,r,{value:u._readableState.endEmitted,writable:!0}),g(b,n,{value:function(C,M){var E=_[o].read();E?(_[a]=null,_[S]=null,_[t]=null,C(i(E,!1))):(_[S]=C,_[t]=M)},writable:!0}),b));return _[a]=null,P(u,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var M=_[t];M!==null&&(_[a]=null,_[S]=null,_[t]=null,M(C)),_[e]=C;return}var E=_[S];E!==null&&(_[a]=null,_[S]=null,_[t]=null,E(i(void 0,!0))),_[r]=!0}),u.on("readable",f.bind(null,_)),_};$.exports=T}),PB=Ft((Q,$)=>{$.exports=function(){throw new Error("Readable.from is not available in the browser")}}),D7=Ft((Q,$)=>{$.exports=p;var c;p.ReadableState=h,Dm().EventEmitter;var g=function(it,Y){return it.listeners(Y).length},P=x7(),S=nx().Buffer,t=window.Uint8Array||function(){};function e(it){return S.from(it)}function r(it){return S.isBuffer(it)||it instanceof t}var a=L7(),n;a&&a.debuglog?n=a.debuglog("stream"):n=function(){};var o=SB(),i=P7(),s=z7(),f=s.getHighWaterMark,x=ax().codes,y=x.ERR_INVALID_ARG_TYPE,v=x.ERR_STREAM_PUSH_AFTER_EOF,T=x.ERR_METHOD_NOT_IMPLEMENTED,u=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,_,C;_v()(p,P);var M=i.errorOrDestroy,E=["error","close","destroy","pause","resume"];function A(it,Y,ft){if(typeof it.prependListener=="function")return it.prependListener(Y,ft);!it._events||!it._events[Y]?it.on(Y,ft):Array.isArray(it._events[Y])?it._events[Y].unshift(ft):it._events[Y]=[ft,it._events[Y]]}function h(it,Y,ft){c=c||ox(),it=it||{},typeof ft!="boolean"&&(ft=Y instanceof c),this.objectMode=!!it.objectMode,ft&&(this.objectMode=this.objectMode||!!it.readableObjectMode),this.highWaterMark=f(this,it,"readableHighWaterMark",ft),this.buffer=new o,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=it.emitClose!==!1,this.autoDestroy=!!it.autoDestroy,this.destroyed=!1,this.defaultEncoding=it.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,it.encoding&&(b||(b=O7().StringDecoder),this.decoder=new b(it.encoding),this.encoding=it.encoding)}function p(it){if(c=c||ox(),!(this instanceof p))return new p(it);var Y=this instanceof c;this._readableState=new h(it,this,Y),this.readable=!0,it&&(typeof it.read=="function"&&(this._read=it.read),typeof it.destroy=="function"&&(this._destroy=it.destroy)),P.call(this)}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(it){this._readableState&&(this._readableState.destroyed=it)}}),p.prototype.destroy=i.destroy,p.prototype._undestroy=i.undestroy,p.prototype._destroy=function(it,Y){Y(it)},p.prototype.push=function(it,Y){var ft=this._readableState,ut;return ft.objectMode?ut=!0:typeof it=="string"&&(Y=Y||ft.defaultEncoding,Y!==ft.encoding&&(it=S.from(it,Y),Y=""),ut=!0),k(this,it,Y,!1,ut)},p.prototype.unshift=function(it){return k(this,it,null,!0,!1)};function k(it,Y,ft,ut,wt){n("readableAddChunk",Y);var zt=it._readableState;if(Y===null)zt.reading=!1,H(it,zt);else{var Pt;if(wt||(Pt=R(zt,Y)),Pt)M(it,Pt);else if(zt.objectMode||Y&&Y.length>0)if(typeof Y!="string"&&!zt.objectMode&&Object.getPrototypeOf(Y)!==S.prototype&&(Y=e(Y)),ut)zt.endEmitted?M(it,new u):w(it,zt,Y,!0);else if(zt.ended)M(it,new v);else{if(zt.destroyed)return!1;zt.reading=!1,zt.decoder&&!ft?(Y=zt.decoder.write(Y),zt.objectMode||Y.length!==0?w(it,zt,Y,!1):W(it,zt)):w(it,zt,Y,!1)}else ut||(zt.reading=!1,W(it,zt))}return!zt.ended&&(zt.length=O?it=O:(it--,it|=it>>>1,it|=it>>>2,it|=it>>>4,it|=it>>>8,it|=it>>>16,it++),it}function V(it,Y){return it<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:it!==it?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(it>Y.highWaterMark&&(Y.highWaterMark=N(it)),it<=Y.length?it:Y.ended?Y.length:(Y.needReadable=!0,0))}p.prototype.read=function(it){n("read",it),it=parseInt(it,10);var Y=this._readableState,ft=it;if(it!==0&&(Y.emittedReadable=!1),it===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return n("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?rt(this):F(this),null;if(it=V(it,Y),it===0&&Y.ended)return Y.length===0&&rt(this),null;var ut=Y.needReadable;n("need readable",ut),(Y.length===0||Y.length-it0?wt=dt(it,Y):wt=null,wt===null?(Y.needReadable=Y.length<=Y.highWaterMark,it=0):(Y.length-=it,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),ft!==it&&Y.ended&&rt(this)),wt!==null&&this.emit("data",wt),wt};function H(it,Y){if(n("onEofChunk"),!Y.ended){if(Y.decoder){var ft=Y.decoder.end();ft&&ft.length&&(Y.buffer.push(ft),Y.length+=Y.objectMode?1:ft.length)}Y.ended=!0,Y.sync?F(it):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,U(it)))}}function F(it){var Y=it._readableState;n("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(n("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(U,it))}function U(it){var Y=it._readableState;n("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(it.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,tt(it)}function W(it,Y){Y.readingMore||(Y.readingMore=!0,process.nextTick(q,it,Y))}function q(it,Y){for(;!Y.reading&&!Y.ended&&(Y.length1&&vt(ut.pipes,it)!==-1)&&!Jt&&(n("false write response, pause",ut.awaitDrain),ut.awaitDrain++),ft.pause())}function de(Mt){n("onerror",Mt),Lt(),it.removeListener("error",de),g(it,"error")===0&&M(it,Mt)}A(it,"error",de);function se(){it.removeListener("finish",Tt),Lt()}it.once("close",se);function Tt(){n("onfinish"),it.removeListener("close",se),Lt()}it.once("finish",Tt);function Lt(){n("unpipe"),ft.unpipe(it)}return it.emit("pipe",ft),ut.flowing||(n("pipe resume"),ft.resume()),it};function X(it){return function(){var Y=it._readableState;n("pipeOnDrain",Y.awaitDrain),Y.awaitDrain&&Y.awaitDrain--,Y.awaitDrain===0&&g(it,"data")&&(Y.flowing=!0,tt(it))}}p.prototype.unpipe=function(it){var Y=this._readableState,ft={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return it&&it!==Y.pipes?this:(it||(it=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,it&&it.emit("unpipe",this,ft),this);if(!it){var ut=Y.pipes,wt=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var zt=0;zt0,ut.flowing!==!1&&this.resume()):it==="readable"&&!ut.endEmitted&&!ut.readableListening&&(ut.readableListening=ut.needReadable=!0,ut.flowing=!1,ut.emittedReadable=!1,n("on readable",ut.length,ut.reading),ut.length?F(this):ut.reading||process.nextTick(yt,this)),ft},p.prototype.addListener=p.prototype.on,p.prototype.removeListener=function(it,Y){var ft=P.prototype.removeListener.call(this,it,Y);return it==="readable"&&process.nextTick(lt,this),ft},p.prototype.removeAllListeners=function(it){var Y=P.prototype.removeAllListeners.apply(this,arguments);return(it==="readable"||it===void 0)&&process.nextTick(lt,this),Y};function lt(it){var Y=it._readableState;Y.readableListening=it.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:it.listenerCount("data")>0&&it.resume()}function yt(it){n("readable nexttick read 0"),it.read(0)}p.prototype.resume=function(){var it=this._readableState;return it.flowing||(n("resume"),it.flowing=!it.readableListening,pt(this,it)),it.paused=!1,this};function pt(it,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,process.nextTick(st,it,Y))}function st(it,Y){n("resume",Y.reading),Y.reading||it.read(0),Y.resumeScheduled=!1,it.emit("resume"),tt(it),Y.flowing&&!Y.reading&&it.read(0)}p.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function tt(it){var Y=it._readableState;for(n("flow",Y.flowing);Y.flowing&&it.read()!==null;);}p.prototype.wrap=function(it){var Y=this,ft=this._readableState,ut=!1;it.on("end",function(){if(n("wrapped end"),ft.decoder&&!ft.ended){var Pt=ft.decoder.end();Pt&&Pt.length&&Y.push(Pt)}Y.push(null)}),it.on("data",function(Pt){if(n("wrapped data"),ft.decoder&&(Pt=ft.decoder.write(Pt)),!(ft.objectMode&&Pt==null)&&!(!ft.objectMode&&(!Pt||!Pt.length))){var Wt=Y.push(Pt);Wt||(ut=!0,it.pause())}});for(var wt in it)this[wt]===void 0&&typeof it[wt]=="function"&&(this[wt]=function(Pt){return function(){return it[Pt].apply(it,arguments)}}(wt));for(var zt=0;zt=Y.length?(Y.decoder?ft=Y.buffer.join(""):Y.buffer.length===1?ft=Y.buffer.first():ft=Y.buffer.concat(Y.length),Y.buffer.clear()):ft=Y.buffer.consume(it,Y.decoder),ft}function rt(it){var Y=it._readableState;n("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,process.nextTick(at,Y,it))}function at(it,Y){if(n("endReadableNT",it.endEmitted,it.length),!it.endEmitted&&it.length===0&&(it.endEmitted=!0,Y.readable=!1,Y.emit("end"),it.autoDestroy)){var ft=Y._writableState;(!ft||ft.autoDestroy&&ft.finished)&&Y.destroy()}}typeof Symbol=="function"&&(p.from=function(it,Y){return C===void 0&&(C=PB()),C(p,it,Y)});function vt(it,Y){for(var ft=0,ut=it.length;ft{$.exports=a;var c=ax().codes,g=c.ERR_METHOD_NOT_IMPLEMENTED,P=c.ERR_MULTIPLE_CALLBACK,S=c.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=c.ERR_TRANSFORM_WITH_LENGTH_0,e=ox();_v()(a,e);function r(i,s){var f=this._transformState;f.transforming=!1;var x=f.writecb;if(x===null)return this.emit("error",new P);f.writechunk=null,f.writecb=null,s!=null&&this.push(s),x(i);var y=this._readableState;y.reading=!1,(y.needReadable||y.length{$.exports=g;var c=F7();_v()(g,c);function g(P){if(!(this instanceof g))return new g(P);c.call(this,P)}g.prototype._transform=function(P,S,t){t(null,P)}}),IB=Ft((Q,$)=>{var c;function g(f){var x=!1;return function(){x||(x=!0,f.apply(void 0,arguments))}}var P=ax().codes,S=P.ERR_MISSING_ARGS,t=P.ERR_STREAM_DESTROYED;function e(f){if(f)throw f}function r(f){return f.setHeader&&typeof f.abort=="function"}function a(f,x,y,v){v=g(v);var T=!1;f.on("close",function(){T=!0}),c===void 0&&(c=ak()),c(f,{readable:x,writable:y},function(b){if(b)return v(b);T=!0,v()});var u=!1;return function(b){if(!T&&!u){if(u=!0,r(f))return f.abort();if(typeof f.destroy=="function")return f.destroy();v(b||new t("pipe"))}}}function n(f){f()}function o(f,x){return f.pipe(x)}function i(f){return!f.length||typeof f[f.length-1]!="function"?e:f.pop()}function s(){for(var f=arguments.length,x=new Array(f),y=0;y0;return a(b,C,M,function(E){T||(T=E),E&&u.forEach(n),!C&&(u.forEach(n),v(T))})});return x.reduce(o)}$.exports=s}),OB=Ft((Q,$)=>{$.exports=P;var c=Dm().EventEmitter,g=_v();g(P,c),P.Readable=D7(),P.Writable=I7(),P.Duplex=ox(),P.Transform=F7(),P.PassThrough=zB(),P.finished=ak(),P.pipeline=IB(),P.Stream=P;function P(){c.call(this)}P.prototype.pipe=function(S,t){var e=this;function r(x){S.writable&&S.write(x)===!1&&e.pause&&e.pause()}e.on("data",r);function a(){e.readable&&e.resume&&e.resume()}S.on("drain",a),!S._isStdio&&(!t||t.end!==!1)&&(e.on("end",o),e.on("close",i));var n=!1;function o(){n||(n=!0,S.end())}function i(){n||(n=!0,typeof S.destroy=="function"&&S.destroy())}function s(x){if(f(),c.listenerCount(this,"error")===0)throw x}e.on("error",s),S.on("error",s);function f(){e.removeListener("data",r),S.removeListener("drain",a),e.removeListener("end",o),e.removeListener("close",i),e.removeListener("error",s),S.removeListener("error",s),e.removeListener("end",f),e.removeListener("close",f),S.removeListener("close",f)}return e.on("end",f),e.on("close",f),S.on("close",f),S.emit("pipe",e),S}}),ub=Ft(Q=>{var $=Object.getOwnPropertyDescriptors||function(q){for(var X=Object.keys(q),lt={},yt=0;yt=pt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,X).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(X);process.traceDeprecation?console.trace(X):console.error(X),lt=!0}return q.apply(this,arguments)}return yt};var g={},P=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),P=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(P.test(q)){var X=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,X,lt)}}else g[q]=function(){};return g[q]};function t(q,X){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(X)?lt.showHidden=X:X&&Q._extend(lt,X),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,X){var lt=t.styles[X];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,X){return q}function a(q){var X={};return q.forEach(function(lt,yt){X[lt]=!0}),X}function n(q,X,lt){if(q.customInspect&&X&&k(X.inspect)&&X.inspect!==Q.inspect&&!(X.constructor&&X.constructor.prototype===X)){var yt=X.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var pt=o(q,X);if(pt)return pt;var st=Object.keys(X),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(X)),p(X)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(X);if(st.length===0){if(k(X)){var dt=X.name?": "+X.name:"";return q.stylize("[Function"+dt+"]","special")}if(E(X))return q.stylize(RegExp.prototype.toString.call(X),"regexp");if(h(X))return q.stylize(Date.prototype.toString.call(X),"date");if(p(X))return i(X)}var rt="",at=!1,vt=["{","}"];if(y(X)&&(at=!0,vt=["[","]"]),k(X)){var it=X.name?": "+X.name:"";rt=" [Function"+it+"]"}if(E(X)&&(rt=" "+RegExp.prototype.toString.call(X)),h(X)&&(rt=" "+Date.prototype.toUTCString.call(X)),p(X)&&(rt=" "+i(X)),st.length===0&&(!at||X.length==0))return vt[0]+rt+vt[1];if(lt<0)return E(X)?q.stylize(RegExp.prototype.toString.call(X),"regexp"):q.stylize("[Object]","special");q.seen.push(X);var Y;return at?Y=s(q,X,lt,tt,st):Y=st.map(function(ft){return f(q,X,lt,tt,ft,at)}),q.seen.pop(),x(Y,rt,vt)}function o(q,X){if(M(X))return q.stylize("undefined","undefined");if(_(X)){var lt="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(X))return q.stylize(""+X,"number");if(v(X))return q.stylize(""+X,"boolean");if(T(X))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function s(q,X,lt,yt,pt){for(var st=[],tt=0,dt=X.length;tt"u"}Q.isPrimitive=w,Q.isBuffer=U7();function R(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,J=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),j[q.getMonth()],J].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=_v(),Q._extend=function(q,J){if(!J||!A(J))return q;for(var lt=Object.keys(J),yt=lt.length;yt--;)q[lt[yt]]=J[lt[yt]];return q};function H(q,J){return Object.prototype.hasOwnProperty.call(q,J)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var J=q[F];if(typeof J!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(J,F,{value:J,enumerable:!1,writable:!1,configurable:!0}),J}function J(){for(var lt,yt,mt=new Promise(function(dt,rt){lt=dt,yt=rt}),st=[],tt=0;tt{function c(f,x){var y=Object.keys(f);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(f);x&&(v=v.filter(function(T){return Object.getOwnPropertyDescriptor(f,T).enumerable})),y.push.apply(y,v)}return y}function g(f){for(var x=1;x0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(x){var y={data:x,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var x=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,x}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(x){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=x+y.data;return v}},{key:"concat",value:function(x){if(this.length===0)return a.alloc(0);for(var y=a.allocUnsafe(x>>>0),v=this.head,T=0;v;)l(v.data,y,T),T+=v.data.length,v=v.next;return y}},{key:"consume",value:function(x,y){var v;return xu.length?u.length:x;if(b===u.length?T+=u:T+=u.slice(0,x),x-=b,x===0){b===u.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=u.slice(b));break}++v}return this.length-=v,T}},{key:"_getBuffer",value:function(x){var y=a.allocUnsafe(x),v=this.head,T=1;for(v.data.copy(y),x-=v.data.length;v=v.next;){var u=v.data,b=x>u.length?u.length:x;if(u.copy(y,y.length-x,0,b),x-=b,x===0){b===u.length?(++T,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=u.slice(b));break}++T}return this.length-=T,y}},{key:i,value:function(x,y){return o(this,g({},y,{depth:0,customInspect:!1}))}}]),f}()}),H7=Dt((Q,Z)=>{function c(r,a){var n=this,o=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return o||i?(a?a(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(t,this,r)):process.nextTick(t,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(l){!a&&l?n._writableState?n._writableState.errorEmitted?process.nextTick(I,n):(n._writableState.errorEmitted=!0,process.nextTick(g,n,l)):process.nextTick(g,n,l):a?(process.nextTick(I,n),a(l)):process.nextTick(I,n)}),this)}function g(r,a){t(r,a),I(r)}function I(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function t(r,a){r.emit("error",a)}function e(r,a){var n=r._readableState,o=r._writableState;n&&n.autoDestroy||o&&o.autoDestroy?r.destroy(a):r.emit("error",a)}Z.exports={destroy:c,undestroy:S,errorOrDestroy:e}}),ox=Dt((Q,Z)=>{function c(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.__proto__=n}var g={};function I(a,n,o){o||(o=Error);function i(f,x,y){return typeof n=="string"?n:n(f,x,y)}var l=function(f){c(x,f);function x(y,v,T){return f.call(this,i(y,v,T))||this}return x}(o);l.prototype.name=o.name,l.prototype.code=a,g[a]=l}function S(a,n){if(Array.isArray(a)){var o=a.length;return a=a.map(function(i){return String(i)}),o>2?"one of ".concat(n," ").concat(a.slice(0,o-1).join(", "),", or ")+a[o-1]:o===2?"one of ".concat(n," ").concat(a[0]," or ").concat(a[1]):"of ".concat(n," ").concat(a[0])}else return"of ".concat(n," ").concat(String(a))}function t(a,n,o){return a.substr(0,n.length)===n}function e(a,n,o){return(o===void 0||o>a.length)&&(o=a.length),a.substring(o-n.length,o)===n}function r(a,n,o){return typeof o!="number"&&(o=0),o+n.length>a.length?!1:a.indexOf(n,o)!==-1}I("ERR_INVALID_OPT_VALUE",function(a,n){return'The value "'+n+'" is invalid for option "'+a+'"'},TypeError),I("ERR_INVALID_ARG_TYPE",function(a,n,o){var i;typeof n=="string"&&t(n,"not ")?(i="must not be",n=n.replace(/^not /,"")):i="must be";var l;if(e(a," argument"))l="The ".concat(a," ").concat(i," ").concat(S(n,"type"));else{var f=r(a,".")?"property":"argument";l='The "'.concat(a,'" ').concat(f," ").concat(i," ").concat(S(n,"type"))}return l+=". Received type ".concat(typeof o),l},TypeError),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),I("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),I("ERR_STREAM_PREMATURE_CLOSE","Premature close"),I("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),I("ERR_STREAM_WRITE_AFTER_END","write after end"),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Z.exports.codes=g}),W7=Dt((Q,Z)=>{var c=ox().codes.ERR_INVALID_OPT_VALUE;function g(S,t,e){return S.highWaterMark!=null?S.highWaterMark:t?S[e]:null}function I(S,t,e,r){var a=g(t,r,e);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=r?e:"highWaterMark";throw new c(n,a)}return Math.floor(a)}return S.objectMode?16:16*1024}Z.exports={getHighWaterMark:I}}),XB=Dt((Q,Z)=>{Z.exports=c;function c(I,S){if(g("noDeprecation"))return I;var t=!1;function e(){if(!t){if(g("throwDeprecation"))throw new Error(S);g("traceDeprecation")?console.trace(S):console.warn(S),t=!0}return I.apply(this,arguments)}return e}function g(I){try{if(!window.localStorage)return!1}catch{return!1}var S=window.localStorage[I];return S==null?!1:String(S).toLowerCase()==="true"}}),q7=Dt((Q,Z)=>{Z.exports=h;function c(tt){var dt=this;this.next=null,this.entry=null,this.finish=function(){st(dt,tt)}}var g;h.WritableState=C;var I={deprecate:XB()},S=P7(),t=ix().Buffer,e=window.Uint8Array||function(){};function r(tt){return t.from(tt)}function a(tt){return t.isBuffer(tt)||tt instanceof e}var n=H7(),o=W7(),i=o.getHighWaterMark,l=ox().codes,f=l.ERR_INVALID_ARG_TYPE,x=l.ERR_METHOD_NOT_IMPLEMENTED,y=l.ERR_MULTIPLE_CALLBACK,v=l.ERR_STREAM_CANNOT_PIPE,T=l.ERR_STREAM_DESTROYED,u=l.ERR_STREAM_NULL_VALUES,b=l.ERR_STREAM_WRITE_AFTER_END,_=l.ERR_UNKNOWN_ENCODING,P=n.errorOrDestroy;_v()(h,S);function M(){}function C(tt,dt,rt){g=g||sx(),tt=tt||{},typeof rt!="boolean"&&(rt=dt instanceof g),this.objectMode=!!tt.objectMode,rt&&(this.objectMode=this.objectMode||!!tt.writableObjectMode),this.highWaterMark=i(this,tt,"writableHighWaterMark",rt),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var at=tt.decodeStrings===!1;this.decodeStrings=!at,this.defaultEncoding=tt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(vt){H(dt,vt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=tt.emitClose!==!1,this.autoDestroy=!!tt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}C.prototype.getBuffer=function(){for(var tt=this.bufferedRequest,dt=[];tt;)dt.push(tt),tt=tt.next;return dt},function(){try{Object.defineProperty(C.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var A;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(h,Symbol.hasInstance,{value:function(tt){return A.call(this,tt)?!0:this!==h?!1:tt&&tt._writableState instanceof C}})):A=function(tt){return tt instanceof this};function h(tt){g=g||sx();var dt=this instanceof g;if(!dt&&!A.call(h,this))return new h(tt);this._writableState=new C(tt,this,dt),this.writable=!0,tt&&(typeof tt.write=="function"&&(this._write=tt.write),typeof tt.writev=="function"&&(this._writev=tt.writev),typeof tt.destroy=="function"&&(this._destroy=tt.destroy),typeof tt.final=="function"&&(this._final=tt.final)),S.call(this)}h.prototype.pipe=function(){P(this,new v)};function p(tt,dt){var rt=new b;P(tt,rt),process.nextTick(dt,rt)}function k(tt,dt,rt,at){var vt;return rt===null?vt=new u:typeof rt!="string"&&!dt.objectMode&&(vt=new f("chunk",["string","Buffer"],rt)),vt?(P(tt,vt),process.nextTick(at,vt),!1):!0}h.prototype.write=function(tt,dt,rt){var at=this._writableState,vt=!1,it=!at.objectMode&&a(tt);return it&&!t.isBuffer(tt)&&(tt=r(tt)),typeof dt=="function"&&(rt=dt,dt=null),it?dt="buffer":dt||(dt=at.defaultEncoding),typeof rt!="function"&&(rt=M),at.ending?p(this,rt):(it||k(this,at,tt,rt))&&(at.pendingcb++,vt=R(this,at,it,tt,dt,rt)),vt},h.prototype.cork=function(){this._writableState.corked++},h.prototype.uncork=function(){var tt=this._writableState;tt.corked&&(tt.corked--,!tt.writing&&!tt.corked&&!tt.bufferProcessing&&tt.bufferedRequest&&W(this,tt))},h.prototype.setDefaultEncoding=function(tt){if(typeof tt=="string"&&(tt=tt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((tt+"").toLowerCase())>-1))throw new _(tt);return this._writableState.defaultEncoding=tt,this},Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function w(tt,dt,rt){return!tt.objectMode&&tt.decodeStrings!==!1&&typeof dt=="string"&&(dt=t.from(dt,rt)),dt}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R(tt,dt,rt,at,vt,it){if(!rt){var Y=w(dt,at,vt);at!==Y&&(rt=!0,vt="buffer",at=Y)}var ft=dt.objectMode?1:at.length;dt.length+=ft;var ut=dt.length{var c=Object.keys||function(o){var i=[];for(var l in o)i.push(l);return i};Z.exports=r;var g=Z7(),I=q7();for(_v()(r,g),S=c(I.prototype),e=0;e{var c=ix(),g=c.Buffer;function I(t,e){for(var r in t)e[r]=t[r]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?Z.exports=c:(I(c,Q),Q.Buffer=S);function S(t,e,r){return g(t,e,r)}S.prototype=Object.create(g.prototype),I(g,S),S.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return g(t,e,r)},S.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var a=g(t);return e!==void 0?typeof r=="string"?a.fill(e,r):a.fill(e):a.fill(0),a},S.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return g(t)},S.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(t)}}),$7=Dt(Q=>{var Z=JB().Buffer,c=Z.isEncoding||function(T){switch(T=""+T,T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g(T){if(!T)return"utf8";for(var u;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(u)return;T=(""+T).toLowerCase(),u=!0}}function I(T){var u=g(T);if(typeof u!="string"&&(Z.isEncoding===c||!c(T)))throw new Error("Unknown encoding: "+T);return u||T}Q.StringDecoder=S;function S(T){this.encoding=I(T);var u;switch(this.encoding){case"utf16le":this.text=i,this.end=l,u=4;break;case"utf8":this.fillLast=a,u=4;break;case"base64":this.text=f,this.end=x,u=3;break;default:this.write=y,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Z.allocUnsafe(u)}S.prototype.write=function(T){if(T.length===0)return"";var u,b;if(this.lastNeed){if(u=this.fillLast(T),u===void 0)return"";b=this.lastNeed,this.lastNeed=0}else b=0;return b>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function e(T,u,b){var _=u.length-1;if(_=0?(P>0&&(T.lastNeed=P-1),P):--_=0?(P>0&&(T.lastNeed=P-2),P):--_=0?(P>0&&(P===2?P=0:T.lastNeed=P-3),P):0))}function r(T,u,b){if((u[0]&192)!==128)return T.lastNeed=0,"�";if(T.lastNeed>1&&u.length>1){if((u[1]&192)!==128)return T.lastNeed=1,"�";if(T.lastNeed>2&&u.length>2&&(u[2]&192)!==128)return T.lastNeed=2,"�"}}function a(T){var u=this.lastTotal-this.lastNeed,b=r(this,T);if(b!==void 0)return b;if(this.lastNeed<=T.length)return T.copy(this.lastChar,u,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,u,0,T.length),this.lastNeed-=T.length}function n(T,u){var b=e(this,T,u);if(!this.lastNeed)return T.toString("utf8",u);this.lastTotal=b;var _=T.length-(b-this.lastNeed);return T.copy(this.lastChar,0,_),T.toString("utf8",u,_)}function o(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+"�":u}function i(T,u){if((T.length-u)%2===0){var b=T.toString("utf16le",u);if(b){var _=b.charCodeAt(b.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],b.slice(0,-1)}return b}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",u,T.length-1)}function l(T){var u=T&&T.length?this.write(T):"";if(this.lastNeed){var b=this.lastTotal-this.lastNeed;return u+this.lastChar.toString("utf16le",0,b)}return u}function f(T,u){var b=(T.length-u)%3;return b===0?T.toString("base64",u):(this.lastNeed=3-b,this.lastTotal=3,b===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",u,T.length-b))}function x(T){var u=T&&T.length?this.write(T):"";return this.lastNeed?u+this.lastChar.toString("base64",0,3-this.lastNeed):u}function y(T){return T.toString(this.encoding)}function v(T){return T&&T.length?this.write(T):""}}),fk=Dt((Q,Z)=>{var c=ox().codes.ERR_STREAM_PREMATURE_CLOSE;function g(e){var r=!1;return function(){if(!r){r=!0;for(var a=arguments.length,n=new Array(a),o=0;o{var c;function g(u,b,_){return b in u?Object.defineProperty(u,b,{value:_,enumerable:!0,configurable:!0,writable:!0}):u[b]=_,u}var I=fk(),S=Symbol("lastResolve"),t=Symbol("lastReject"),e=Symbol("error"),r=Symbol("ended"),a=Symbol("lastPromise"),n=Symbol("handlePromise"),o=Symbol("stream");function i(u,b){return{value:u,done:b}}function l(u){var b=u[S];if(b!==null){var _=u[o].read();_!==null&&(u[a]=null,u[S]=null,u[t]=null,b(i(_,!1)))}}function f(u){process.nextTick(l,u)}function x(u,b){return function(_,P){u.then(function(){if(b[r]){_(i(void 0,!0));return}b[n](_,P)},P)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((c={get stream(){return this[o]},next:function(){var u=this,b=this[e];if(b!==null)return Promise.reject(b);if(this[r])return Promise.resolve(i(void 0,!0));if(this[o].destroyed)return new Promise(function(C,A){process.nextTick(function(){u[e]?A(u[e]):C(i(void 0,!0))})});var _=this[a],P;if(_)P=new Promise(x(_,this));else{var M=this[o].read();if(M!==null)return Promise.resolve(i(M,!1));P=new Promise(this[n])}return this[a]=P,P}},g(c,Symbol.asyncIterator,function(){return this}),g(c,"return",function(){var u=this;return new Promise(function(b,_){u[o].destroy(null,function(P){if(P){_(P);return}b(i(void 0,!0))})})}),c),y),T=function(u){var b,_=Object.create(v,(b={},g(b,o,{value:u,writable:!0}),g(b,S,{value:null,writable:!0}),g(b,t,{value:null,writable:!0}),g(b,e,{value:null,writable:!0}),g(b,r,{value:u._readableState.endEmitted,writable:!0}),g(b,n,{value:function(P,M){var C=_[o].read();C?(_[a]=null,_[S]=null,_[t]=null,P(i(C,!1))):(_[S]=P,_[t]=M)},writable:!0}),b));return _[a]=null,I(u,function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var M=_[t];M!==null&&(_[a]=null,_[S]=null,_[t]=null,M(P)),_[e]=P;return}var C=_[S];C!==null&&(_[a]=null,_[S]=null,_[t]=null,C(i(void 0,!0))),_[r]=!0}),u.on("readable",f.bind(null,_)),_};Z.exports=T}),tN=Dt((Q,Z)=>{Z.exports=function(){throw new Error("Readable.from is not available in the browser")}}),Z7=Dt((Q,Z)=>{Z.exports=p;var c;p.ReadableState=h,Rm().EventEmitter;var g=function(it,Y){return it.listeners(Y).length},I=P7(),S=ix().Buffer,t=window.Uint8Array||function(){};function e(it){return S.from(it)}function r(it){return S.isBuffer(it)||it instanceof t}var a=V7(),n;a&&a.debuglog?n=a.debuglog("stream"):n=function(){};var o=KB(),i=H7(),l=W7(),f=l.getHighWaterMark,x=ox().codes,y=x.ERR_INVALID_ARG_TYPE,v=x.ERR_STREAM_PUSH_AFTER_EOF,T=x.ERR_METHOD_NOT_IMPLEMENTED,u=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,_,P;_v()(p,I);var M=i.errorOrDestroy,C=["error","close","destroy","pause","resume"];function A(it,Y,ft){if(typeof it.prependListener=="function")return it.prependListener(Y,ft);!it._events||!it._events[Y]?it.on(Y,ft):Array.isArray(it._events[Y])?it._events[Y].unshift(ft):it._events[Y]=[ft,it._events[Y]]}function h(it,Y,ft){c=c||sx(),it=it||{},typeof ft!="boolean"&&(ft=Y instanceof c),this.objectMode=!!it.objectMode,ft&&(this.objectMode=this.objectMode||!!it.readableObjectMode),this.highWaterMark=f(this,it,"readableHighWaterMark",ft),this.buffer=new o,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=it.emitClose!==!1,this.autoDestroy=!!it.autoDestroy,this.destroyed=!1,this.defaultEncoding=it.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,it.encoding&&(b||(b=$7().StringDecoder),this.decoder=new b(it.encoding),this.encoding=it.encoding)}function p(it){if(c=c||sx(),!(this instanceof p))return new p(it);var Y=this instanceof c;this._readableState=new h(it,this,Y),this.readable=!0,it&&(typeof it.read=="function"&&(this._read=it.read),typeof it.destroy=="function"&&(this._destroy=it.destroy)),I.call(this)}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(it){this._readableState&&(this._readableState.destroyed=it)}}),p.prototype.destroy=i.destroy,p.prototype._undestroy=i.undestroy,p.prototype._destroy=function(it,Y){Y(it)},p.prototype.push=function(it,Y){var ft=this._readableState,ut;return ft.objectMode?ut=!0:typeof it=="string"&&(Y=Y||ft.defaultEncoding,Y!==ft.encoding&&(it=S.from(it,Y),Y=""),ut=!0),k(this,it,Y,!1,ut)},p.prototype.unshift=function(it){return k(this,it,null,!0,!1)};function k(it,Y,ft,ut,kt){n("readableAddChunk",Y);var It=it._readableState;if(Y===null)It.reading=!1,H(it,It);else{var Pt;if(kt||(Pt=R(It,Y)),Pt)M(it,Pt);else if(It.objectMode||Y&&Y.length>0)if(typeof Y!="string"&&!It.objectMode&&Object.getPrototypeOf(Y)!==S.prototype&&(Y=e(Y)),ut)It.endEmitted?M(it,new u):w(it,It,Y,!0);else if(It.ended)M(it,new v);else{if(It.destroyed)return!1;It.reading=!1,It.decoder&&!ft?(Y=It.decoder.write(Y),It.objectMode||Y.length!==0?w(it,It,Y,!1):W(it,It)):w(it,It,Y,!1)}else ut||(It.reading=!1,W(it,It))}return!It.ended&&(It.length=O?it=O:(it--,it|=it>>>1,it|=it>>>2,it|=it>>>4,it|=it>>>8,it|=it>>>16,it++),it}function V(it,Y){return it<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:it!==it?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(it>Y.highWaterMark&&(Y.highWaterMark=j(it)),it<=Y.length?it:Y.ended?Y.length:(Y.needReadable=!0,0))}p.prototype.read=function(it){n("read",it),it=parseInt(it,10);var Y=this._readableState,ft=it;if(it!==0&&(Y.emittedReadable=!1),it===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return n("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?rt(this):F(this),null;if(it=V(it,Y),it===0&&Y.ended)return Y.length===0&&rt(this),null;var ut=Y.needReadable;n("need readable",ut),(Y.length===0||Y.length-it0?kt=dt(it,Y):kt=null,kt===null?(Y.needReadable=Y.length<=Y.highWaterMark,it=0):(Y.length-=it,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),ft!==it&&Y.ended&&rt(this)),kt!==null&&this.emit("data",kt),kt};function H(it,Y){if(n("onEofChunk"),!Y.ended){if(Y.decoder){var ft=Y.decoder.end();ft&&ft.length&&(Y.buffer.push(ft),Y.length+=Y.objectMode?1:ft.length)}Y.ended=!0,Y.sync?F(it):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,U(it)))}}function F(it){var Y=it._readableState;n("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(n("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(U,it))}function U(it){var Y=it._readableState;n("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(it.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,tt(it)}function W(it,Y){Y.readingMore||(Y.readingMore=!0,process.nextTick(q,it,Y))}function q(it,Y){for(;!Y.reading&&!Y.ended&&(Y.length1&&vt(ut.pipes,it)!==-1)&&!Jt&&(n("false write response, pause",ut.awaitDrain),ut.awaitDrain++),ft.pause())}function pe(Mt){n("onerror",Mt),Lt(),it.removeListener("error",pe),g(it,"error")===0&&M(it,Mt)}A(it,"error",pe);function se(){it.removeListener("finish",Tt),Lt()}it.once("close",se);function Tt(){n("onfinish"),it.removeListener("close",se),Lt()}it.once("finish",Tt);function Lt(){n("unpipe"),ft.unpipe(it)}return it.emit("pipe",ft),ut.flowing||(n("pipe resume"),ft.resume()),it};function J(it){return function(){var Y=it._readableState;n("pipeOnDrain",Y.awaitDrain),Y.awaitDrain&&Y.awaitDrain--,Y.awaitDrain===0&&g(it,"data")&&(Y.flowing=!0,tt(it))}}p.prototype.unpipe=function(it){var Y=this._readableState,ft={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return it&&it!==Y.pipes?this:(it||(it=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,it&&it.emit("unpipe",this,ft),this);if(!it){var ut=Y.pipes,kt=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var It=0;It0,ut.flowing!==!1&&this.resume()):it==="readable"&&!ut.endEmitted&&!ut.readableListening&&(ut.readableListening=ut.needReadable=!0,ut.flowing=!1,ut.emittedReadable=!1,n("on readable",ut.length,ut.reading),ut.length?F(this):ut.reading||process.nextTick(yt,this)),ft},p.prototype.addListener=p.prototype.on,p.prototype.removeListener=function(it,Y){var ft=I.prototype.removeListener.call(this,it,Y);return it==="readable"&&process.nextTick(lt,this),ft},p.prototype.removeAllListeners=function(it){var Y=I.prototype.removeAllListeners.apply(this,arguments);return(it==="readable"||it===void 0)&&process.nextTick(lt,this),Y};function lt(it){var Y=it._readableState;Y.readableListening=it.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:it.listenerCount("data")>0&&it.resume()}function yt(it){n("readable nexttick read 0"),it.read(0)}p.prototype.resume=function(){var it=this._readableState;return it.flowing||(n("resume"),it.flowing=!it.readableListening,mt(this,it)),it.paused=!1,this};function mt(it,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,process.nextTick(st,it,Y))}function st(it,Y){n("resume",Y.reading),Y.reading||it.read(0),Y.resumeScheduled=!1,it.emit("resume"),tt(it),Y.flowing&&!Y.reading&&it.read(0)}p.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function tt(it){var Y=it._readableState;for(n("flow",Y.flowing);Y.flowing&&it.read()!==null;);}p.prototype.wrap=function(it){var Y=this,ft=this._readableState,ut=!1;it.on("end",function(){if(n("wrapped end"),ft.decoder&&!ft.ended){var Pt=ft.decoder.end();Pt&&Pt.length&&Y.push(Pt)}Y.push(null)}),it.on("data",function(Pt){if(n("wrapped data"),ft.decoder&&(Pt=ft.decoder.write(Pt)),!(ft.objectMode&&Pt==null)&&!(!ft.objectMode&&(!Pt||!Pt.length))){var qt=Y.push(Pt);qt||(ut=!0,it.pause())}});for(var kt in it)this[kt]===void 0&&typeof it[kt]=="function"&&(this[kt]=function(Pt){return function(){return it[Pt].apply(it,arguments)}}(kt));for(var It=0;It=Y.length?(Y.decoder?ft=Y.buffer.join(""):Y.buffer.length===1?ft=Y.buffer.first():ft=Y.buffer.concat(Y.length),Y.buffer.clear()):ft=Y.buffer.consume(it,Y.decoder),ft}function rt(it){var Y=it._readableState;n("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,process.nextTick(at,Y,it))}function at(it,Y){if(n("endReadableNT",it.endEmitted,it.length),!it.endEmitted&&it.length===0&&(it.endEmitted=!0,Y.readable=!1,Y.emit("end"),it.autoDestroy)){var ft=Y._writableState;(!ft||ft.autoDestroy&&ft.finished)&&Y.destroy()}}typeof Symbol=="function"&&(p.from=function(it,Y){return P===void 0&&(P=tN()),P(p,it,Y)});function vt(it,Y){for(var ft=0,ut=it.length;ft{Z.exports=a;var c=ox().codes,g=c.ERR_METHOD_NOT_IMPLEMENTED,I=c.ERR_MULTIPLE_CALLBACK,S=c.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=c.ERR_TRANSFORM_WITH_LENGTH_0,e=sx();_v()(a,e);function r(i,l){var f=this._transformState;f.transforming=!1;var x=f.writecb;if(x===null)return this.emit("error",new I);f.writechunk=null,f.writecb=null,l!=null&&this.push(l),x(i);var y=this._readableState;y.reading=!1,(y.needReadable||y.length{Z.exports=g;var c=G7();_v()(g,c);function g(I){if(!(this instanceof g))return new g(I);c.call(this,I)}g.prototype._transform=function(I,S,t){t(null,I)}}),rN=Dt((Q,Z)=>{var c;function g(f){var x=!1;return function(){x||(x=!0,f.apply(void 0,arguments))}}var I=ox().codes,S=I.ERR_MISSING_ARGS,t=I.ERR_STREAM_DESTROYED;function e(f){if(f)throw f}function r(f){return f.setHeader&&typeof f.abort=="function"}function a(f,x,y,v){v=g(v);var T=!1;f.on("close",function(){T=!0}),c===void 0&&(c=fk()),c(f,{readable:x,writable:y},function(b){if(b)return v(b);T=!0,v()});var u=!1;return function(b){if(!T&&!u){if(u=!0,r(f))return f.abort();if(typeof f.destroy=="function")return f.destroy();v(b||new t("pipe"))}}}function n(f){f()}function o(f,x){return f.pipe(x)}function i(f){return!f.length||typeof f[f.length-1]!="function"?e:f.pop()}function l(){for(var f=arguments.length,x=new Array(f),y=0;y0;return a(b,P,M,function(C){T||(T=C),C&&u.forEach(n),!P&&(u.forEach(n),v(T))})});return x.reduce(o)}Z.exports=l}),nN=Dt((Q,Z)=>{Z.exports=I;var c=Rm().EventEmitter,g=_v();g(I,c),I.Readable=Z7(),I.Writable=q7(),I.Duplex=sx(),I.Transform=G7(),I.PassThrough=eN(),I.finished=fk(),I.pipeline=rN(),I.Stream=I;function I(){c.call(this)}I.prototype.pipe=function(S,t){var e=this;function r(x){S.writable&&S.write(x)===!1&&e.pause&&e.pause()}e.on("data",r);function a(){e.readable&&e.resume&&e.resume()}S.on("drain",a),!S._isStdio&&(!t||t.end!==!1)&&(e.on("end",o),e.on("close",i));var n=!1;function o(){n||(n=!0,S.end())}function i(){n||(n=!0,typeof S.destroy=="function"&&S.destroy())}function l(x){if(f(),c.listenerCount(this,"error")===0)throw x}e.on("error",l),S.on("error",l);function f(){e.removeListener("data",r),S.removeListener("drain",a),e.removeListener("end",o),e.removeListener("close",i),e.removeListener("error",l),S.removeListener("error",l),e.removeListener("end",f),e.removeListener("close",f),S.removeListener("close",f)}return e.on("end",f),e.on("close",f),S.on("close",f),S.emit("pipe",e),S}}),sb=Dt(Q=>{var Z=Object.getOwnPropertyDescriptors||function(q){for(var J=Object.keys(q),lt={},yt=0;yt=mt)return rt;switch(rt){case"%s":return String(yt[lt++]);case"%d":return Number(yt[lt++]);case"%j":try{return JSON.stringify(yt[lt++])}catch{return"[Circular]"}default:return rt}}),tt=yt[lt];lt"u")return function(){return Q.deprecate(q,J).apply(this,arguments)};var lt=!1;function yt(){if(!lt){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),lt=!0}return q.apply(this,arguments)}return yt};var g={},I=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),I=new RegExp("^"+S+"$","i");var S;Q.debuglog=function(q){if(q=q.toUpperCase(),!g[q])if(I.test(q)){var J=process.pid;g[q]=function(){var lt=Q.format.apply(Q,arguments);console.error("%s %d: %s",q,J,lt)}}else g[q]=function(){};return g[q]};function t(q,J){var lt={seen:[],stylize:r};return arguments.length>=3&&(lt.depth=arguments[2]),arguments.length>=4&&(lt.colors=arguments[3]),v(J)?lt.showHidden=J:J&&Q._extend(lt,J),M(lt.showHidden)&&(lt.showHidden=!1),M(lt.depth)&&(lt.depth=2),M(lt.colors)&&(lt.colors=!1),M(lt.customInspect)&&(lt.customInspect=!0),lt.colors&&(lt.stylize=e),n(lt,q,lt.depth)}Q.inspect=t,t.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(q,J){var lt=t.styles[J];return lt?"\x1B["+t.colors[lt][0]+"m"+q+"\x1B["+t.colors[lt][1]+"m":q}function r(q,J){return q}function a(q){var J={};return q.forEach(function(lt,yt){J[lt]=!0}),J}function n(q,J,lt){if(q.customInspect&&J&&k(J.inspect)&&J.inspect!==Q.inspect&&!(J.constructor&&J.constructor.prototype===J)){var yt=J.inspect(lt,q);return _(yt)||(yt=n(q,yt,lt)),yt}var mt=o(q,J);if(mt)return mt;var st=Object.keys(J),tt=a(st);if(q.showHidden&&(st=Object.getOwnPropertyNames(J)),p(J)&&(st.indexOf("message")>=0||st.indexOf("description")>=0))return i(J);if(st.length===0){if(k(J)){var dt=J.name?": "+J.name:"";return q.stylize("[Function"+dt+"]","special")}if(C(J))return q.stylize(RegExp.prototype.toString.call(J),"regexp");if(h(J))return q.stylize(Date.prototype.toString.call(J),"date");if(p(J))return i(J)}var rt="",at=!1,vt=["{","}"];if(y(J)&&(at=!0,vt=["[","]"]),k(J)){var it=J.name?": "+J.name:"";rt=" [Function"+it+"]"}if(C(J)&&(rt=" "+RegExp.prototype.toString.call(J)),h(J)&&(rt=" "+Date.prototype.toUTCString.call(J)),p(J)&&(rt=" "+i(J)),st.length===0&&(!at||J.length==0))return vt[0]+rt+vt[1];if(lt<0)return C(J)?q.stylize(RegExp.prototype.toString.call(J),"regexp"):q.stylize("[Object]","special");q.seen.push(J);var Y;return at?Y=l(q,J,lt,tt,st):Y=st.map(function(ft){return f(q,J,lt,tt,ft,at)}),q.seen.pop(),x(Y,rt,vt)}function o(q,J){if(M(J))return q.stylize("undefined","undefined");if(_(J)){var lt="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(lt,"string")}if(b(J))return q.stylize(""+J,"number");if(v(J))return q.stylize(""+J,"boolean");if(T(J))return q.stylize("null","null")}function i(q){return"["+Error.prototype.toString.call(q)+"]"}function l(q,J,lt,yt,mt){for(var st=[],tt=0,dt=J.length;tt-1&&(st?dt=dt.split(` `).map(function(at){return" "+at}).join(` `).slice(2):dt=` `+dt.split(` `).map(function(at){return" "+at}).join(` -`))):dt=q.stylize("[Circular]","special")),M(tt)){if(st&&pt.match(/^\d+$/))return dt;tt=JSON.stringify(""+pt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+dt}function x(q,X,lt){var yt=0,pt=q.reduce(function(st,tt){return yt++,tt.indexOf(` -`)>=0&&yt++,st+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return pt>60?lt[0]+(X===""?"":X+` +`))):dt=q.stylize("[Circular]","special")),M(tt)){if(st&&mt.match(/^\d+$/))return dt;tt=JSON.stringify(""+mt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=q.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=q.stylize(tt,"string"))}return tt+": "+dt}function x(q,J,lt){var yt=0,mt=q.reduce(function(st,tt){return yt++,tt.indexOf(` +`)>=0&&yt++,st+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return mt>60?lt[0]+(J===""?"":J+` `)+" "+q.join(`, - `)+" "+lt[1]:lt[0]+X+" "+q.join(", ")+" "+lt[1]}Q.types=E7();function y(q){return Array.isArray(q)}Q.isArray=y;function v(q){return typeof q=="boolean"}Q.isBoolean=v;function T(q){return q===null}Q.isNull=T;function u(q){return q==null}Q.isNullOrUndefined=u;function b(q){return typeof q=="number"}Q.isNumber=b;function _(q){return typeof q=="string"}Q.isString=_;function C(q){return typeof q=="symbol"}Q.isSymbol=C;function M(q){return q===void 0}Q.isUndefined=M;function E(q){return A(q)&&R(q)==="[object RegExp]"}Q.isRegExp=E,Q.types.isRegExp=E;function A(q){return typeof q=="object"&&q!==null}Q.isObject=A;function h(q){return A(q)&&R(q)==="[object Date]"}Q.isDate=h,Q.types.isDate=h;function p(q){return A(q)&&(R(q)==="[object Error]"||q instanceof Error)}Q.isError=p,Q.types.isNativeError=p;function k(q){return typeof q=="function"}Q.isFunction=k;function w(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}Q.isPrimitive=w,Q.isBuffer=C7();function R(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,X=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),N[q.getMonth()],X].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=_v(),Q._extend=function(q,X){if(!X||!A(X))return q;for(var lt=Object.keys(X),yt=lt.length;yt--;)q[lt[yt]]=X[lt[yt]];return q};function H(q,X){return Object.prototype.hasOwnProperty.call(q,X)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var X=q[F];if(typeof X!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(X,F,{value:X,enumerable:!1,writable:!1,configurable:!0}),X}function X(){for(var lt,yt,pt=new Promise(function(dt,rt){lt=dt,yt=rt}),st=[],tt=0;tt{function c(b){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},c(b)}function g(b,_,C){return Object.defineProperty(b,"prototype",{writable:!1}),b}function P(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function S(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),Object.defineProperty(b,"prototype",{writable:!1}),_&&t(b,_)}function t(b,_){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,M){return C.__proto__=M,C},t(b,_)}function e(b){var _=n();return function(){var C=o(b),M;if(_){var E=o(this).constructor;M=Reflect.construct(C,arguments,E)}else M=C.apply(this,arguments);return r(this,M)}}function r(b,_){if(_&&(c(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(b)}function a(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function n(){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 o(b){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(_){return _.__proto__||Object.getPrototypeOf(_)},o(b)}var i={},s,f;function x(b,_,C){C||(C=Error);function M(A,h,p){return typeof _=="string"?_:_(A,h,p)}var E=function(A){S(p,A);var h=e(p);function p(k,w,R){var O;return P(this,p),O=h.call(this,M(k,w,R)),O.code=b,O}return g(p)}(C);i[b]=E}function y(b,_){if(Array.isArray(b)){var C=b.length;return b=b.map(function(M){return String(M)}),C>2?"one of ".concat(_," ").concat(b.slice(0,C-1).join(", "),", or ")+b[C-1]:C===2?"one of ".concat(_," ").concat(b[0]," or ").concat(b[1]):"of ".concat(_," ").concat(b[0])}else return"of ".concat(_," ").concat(String(b))}function v(b,_,C){return b.substr(0,_.length)===_}function T(b,_,C){return(C===void 0||C>b.length)&&(C=b.length),b.substring(C-_.length,C)===_}function u(b,_,C){return typeof C!="number"&&(C=0),C+_.length>b.length?!1:b.indexOf(_,C)!==-1}x("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),x("ERR_INVALID_ARG_TYPE",function(b,_,C){s===void 0&&(s=Xw()),s(typeof b=="string","'name' must be a string");var M;typeof _=="string"&&v(_,"not ")?(M="must not be",_=_.replace(/^not /,"")):M="must be";var E;if(T(b," argument"))E="The ".concat(b," ").concat(M," ").concat(y(_,"type"));else{var A=u(b,".")?"property":"argument";E='The "'.concat(b,'" ').concat(A," ").concat(M," ").concat(y(_,"type"))}return E+=". Received type ".concat(c(C)),E},TypeError),x("ERR_INVALID_ARG_VALUE",function(b,_){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";f===void 0&&(f=ub());var M=f.inspect(_);return M.length>128&&(M="".concat(M.slice(0,128),"...")),"The argument '".concat(b,"' ").concat(C,". Received ").concat(M)},TypeError),x("ERR_INVALID_RETURN_VALUE",function(b,_,C){var M;return C&&C.constructor&&C.constructor.name?M="instance of ".concat(C.constructor.name):M="type ".concat(c(C)),"Expected ".concat(b,' to be returned from the "').concat(_,'"')+" function but got ".concat(M,".")},TypeError),x("ERR_MISSING_ARGS",function(){for(var b=arguments.length,_=new Array(b),C=0;C0,"At least one arg needs to be specified");var M="The ",E=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),E){case 1:M+="".concat(_[0]," argument");break;case 2:M+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:M+=_.slice(0,E-1).join(", "),M+=", and ".concat(_[E-1]," arguments");break}return"".concat(M," must be specified")},TypeError),$.exports.codes=i}),DB=Ft((Q,$)=>{function c(W,q){var X=Object.keys(W);if(Object.getOwnPropertySymbols){var lt=Object.getOwnPropertySymbols(W);q&&(lt=lt.filter(function(yt){return Object.getOwnPropertyDescriptor(W,yt).enumerable})),X.push.apply(X,lt)}return X}function g(W){for(var q=1;q"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 v(W){return Function.toString.call(W).indexOf("[native code]")!==-1}function T(W,q){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(X,lt){return X.__proto__=lt,X},T(W,q)}function u(W){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)},u(W)}function b(W){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},b(W)}var _=ub(),C=_.inspect,M=R7(),E=M.codes.ERR_INVALID_ARG_TYPE;function A(W,q,X){return(X===void 0||X>W.length)&&(X=W.length),W.substring(X-q.length,X)===q}function h(W,q){if(q=Math.floor(q),W.length==0||q==0)return"";var X=W.length*q;for(q=Math.floor(Math.log(q)/Math.log(2));q;)W+=W,q--;return W+=W.substring(0,X-W.length),W}var p="",k="",w="",R="",O={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},N=10;function V(W){var q=Object.keys(W),X=Object.create(Object.getPrototypeOf(W));return q.forEach(function(lt){X[lt]=W[lt]}),Object.defineProperty(X,"message",{value:W.message}),X}function H(W){return C(W,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(W,q,X){var lt="",yt="",pt=0,st="",tt=!1,dt=H(W),rt=dt.split(` + `)+" "+lt[1]:lt[0]+J+" "+q.join(", ")+" "+lt[1]}Q.types=j7();function y(q){return Array.isArray(q)}Q.isArray=y;function v(q){return typeof q=="boolean"}Q.isBoolean=v;function T(q){return q===null}Q.isNull=T;function u(q){return q==null}Q.isNullOrUndefined=u;function b(q){return typeof q=="number"}Q.isNumber=b;function _(q){return typeof q=="string"}Q.isString=_;function P(q){return typeof q=="symbol"}Q.isSymbol=P;function M(q){return q===void 0}Q.isUndefined=M;function C(q){return A(q)&&R(q)==="[object RegExp]"}Q.isRegExp=C,Q.types.isRegExp=C;function A(q){return typeof q=="object"&&q!==null}Q.isObject=A;function h(q){return A(q)&&R(q)==="[object Date]"}Q.isDate=h,Q.types.isDate=h;function p(q){return A(q)&&(R(q)==="[object Error]"||q instanceof Error)}Q.isError=p,Q.types.isNativeError=p;function k(q){return typeof q=="function"}Q.isFunction=k;function w(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}Q.isPrimitive=w,Q.isBuffer=U7();function R(q){return Object.prototype.toString.call(q)}function O(q){return q<10?"0"+q.toString(10):q.toString(10)}var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function V(){var q=new Date,J=[O(q.getHours()),O(q.getMinutes()),O(q.getSeconds())].join(":");return[q.getDate(),j[q.getMonth()],J].join(" ")}Q.log=function(){console.log("%s - %s",V(),Q.format.apply(Q,arguments))},Q.inherits=_v(),Q._extend=function(q,J){if(!J||!A(J))return q;for(var lt=Object.keys(J),yt=lt.length;yt--;)q[lt[yt]]=J[lt[yt]];return q};function H(q,J){return Object.prototype.hasOwnProperty.call(q,J)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Q.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&q[F]){var J=q[F];if(typeof J!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(J,F,{value:J,enumerable:!1,writable:!1,configurable:!0}),J}function J(){for(var lt,yt,mt=new Promise(function(dt,rt){lt=dt,yt=rt}),st=[],tt=0;tt{function c(b){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},c(b)}function g(b,_,P){return Object.defineProperty(b,"prototype",{writable:!1}),b}function I(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function S(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),Object.defineProperty(b,"prototype",{writable:!1}),_&&t(b,_)}function t(b,_){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(P,M){return P.__proto__=M,P},t(b,_)}function e(b){var _=n();return function(){var P=o(b),M;if(_){var C=o(this).constructor;M=Reflect.construct(P,arguments,C)}else M=P.apply(this,arguments);return r(this,M)}}function r(b,_){if(_&&(c(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(b)}function a(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function n(){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 o(b){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(_){return _.__proto__||Object.getPrototypeOf(_)},o(b)}var i={},l,f;function x(b,_,P){P||(P=Error);function M(A,h,p){return typeof _=="string"?_:_(A,h,p)}var C=function(A){S(p,A);var h=e(p);function p(k,w,R){var O;return I(this,p),O=h.call(this,M(k,w,R)),O.code=b,O}return g(p)}(P);i[b]=C}function y(b,_){if(Array.isArray(b)){var P=b.length;return b=b.map(function(M){return String(M)}),P>2?"one of ".concat(_," ").concat(b.slice(0,P-1).join(", "),", or ")+b[P-1]:P===2?"one of ".concat(_," ").concat(b[0]," or ").concat(b[1]):"of ".concat(_," ").concat(b[0])}else return"of ".concat(_," ").concat(String(b))}function v(b,_,P){return b.substr(0,_.length)===_}function T(b,_,P){return(P===void 0||P>b.length)&&(P=b.length),b.substring(P-_.length,P)===_}function u(b,_,P){return typeof P!="number"&&(P=0),P+_.length>b.length?!1:b.indexOf(_,P)!==-1}x("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),x("ERR_INVALID_ARG_TYPE",function(b,_,P){l===void 0&&(l=t3()),l(typeof b=="string","'name' must be a string");var M;typeof _=="string"&&v(_,"not ")?(M="must not be",_=_.replace(/^not /,"")):M="must be";var C;if(T(b," argument"))C="The ".concat(b," ").concat(M," ").concat(y(_,"type"));else{var A=u(b,".")?"property":"argument";C='The "'.concat(b,'" ').concat(A," ").concat(M," ").concat(y(_,"type"))}return C+=". Received type ".concat(c(P)),C},TypeError),x("ERR_INVALID_ARG_VALUE",function(b,_){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";f===void 0&&(f=sb());var M=f.inspect(_);return M.length>128&&(M="".concat(M.slice(0,128),"...")),"The argument '".concat(b,"' ").concat(P,". Received ").concat(M)},TypeError),x("ERR_INVALID_RETURN_VALUE",function(b,_,P){var M;return P&&P.constructor&&P.constructor.name?M="instance of ".concat(P.constructor.name):M="type ".concat(c(P)),"Expected ".concat(b,' to be returned from the "').concat(_,'"')+" function but got ".concat(M,".")},TypeError),x("ERR_MISSING_ARGS",function(){for(var b=arguments.length,_=new Array(b),P=0;P0,"At least one arg needs to be specified");var M="The ",C=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),C){case 1:M+="".concat(_[0]," argument");break;case 2:M+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:M+=_.slice(0,C-1).join(", "),M+=", and ".concat(_[C-1]," arguments");break}return"".concat(M," must be specified")},TypeError),Z.exports.codes=i}),iN=Dt((Q,Z)=>{function c(W,q){var J=Object.keys(W);if(Object.getOwnPropertySymbols){var lt=Object.getOwnPropertySymbols(W);q&&(lt=lt.filter(function(yt){return Object.getOwnPropertyDescriptor(W,yt).enumerable})),J.push.apply(J,lt)}return J}function g(W){for(var q=1;q"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 v(W){return Function.toString.call(W).indexOf("[native code]")!==-1}function T(W,q){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,lt){return J.__proto__=lt,J},T(W,q)}function u(W){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)},u(W)}function b(W){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},b(W)}var _=sb(),P=_.inspect,M=Y7(),C=M.codes.ERR_INVALID_ARG_TYPE;function A(W,q,J){return(J===void 0||J>W.length)&&(J=W.length),W.substring(J-q.length,J)===q}function h(W,q){if(q=Math.floor(q),W.length==0||q==0)return"";var J=W.length*q;for(q=Math.floor(Math.log(q)/Math.log(2));q;)W+=W,q--;return W+=W.substring(0,J-W.length),W}var p="",k="",w="",R="",O={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},j=10;function V(W){var q=Object.keys(W),J=Object.create(Object.getPrototypeOf(W));return q.forEach(function(lt){J[lt]=W[lt]}),Object.defineProperty(J,"message",{value:W.message}),J}function H(W){return P(W,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(W,q,J){var lt="",yt="",mt=0,st="",tt=!1,dt=H(W),rt=dt.split(` `),at=H(q).split(` -`),vt=0,it="";if(X==="strictEqual"&&b(W)==="object"&&b(q)==="object"&&W!==null&&q!==null&&(X="strictEqualObject"),rt.length===1&&at.length===1&&rt[0]!==at[0]){var Y=rt[0].length+at[0].length;if(Y<=N){if((b(W)!=="object"||W===null)&&(b(q)!=="object"||q===null)&&(W!==0||q!==0))return"".concat(O[X],` +`),vt=0,it="";if(J==="strictEqual"&&b(W)==="object"&&b(q)==="object"&&W!==null&&q!==null&&(J="strictEqualObject"),rt.length===1&&at.length===1&&rt[0]!==at[0]){var Y=rt[0].length+at[0].length;if(Y<=j){if((b(W)!=="object"||W===null)&&(b(q)!=="object"||q===null)&&(W!==0||q!==0))return"".concat(O[J],` `)+"".concat(rt[0]," !== ").concat(at[0],` -`)}else if(X!=="strictEqualObject"){var ft=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Y2&&(it=` - `.concat(h(" ",vt),"^"),vt=0)}}}for(var ut=rt[rt.length-1],wt=at[at.length-1];ut===wt&&(vt++<2?st=` - `.concat(ut).concat(st):lt=ut,rt.pop(),at.pop(),!(rt.length===0||at.length===0));)ut=rt[rt.length-1],wt=at[at.length-1];var zt=Math.max(rt.length,at.length);if(zt===0){var Pt=dt.split(` +`)}else if(J!=="strictEqualObject"){var ft=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Y2&&(it=` + `.concat(h(" ",vt),"^"),vt=0)}}}for(var ut=rt[rt.length-1],kt=at[at.length-1];ut===kt&&(vt++<2?st=` + `.concat(ut).concat(st):lt=ut,rt.pop(),at.pop(),!(rt.length===0||at.length===0));)ut=rt[rt.length-1],kt=at[at.length-1];var It=Math.max(rt.length,at.length);if(It===0){var Pt=dt.split(` `);if(Pt.length>30)for(Pt[26]="".concat(p,"...").concat(R);Pt.length>27;)Pt.pop();return"".concat(O.notIdentical,` `).concat(Pt.join(` `),` `)}vt>3&&(st=` `.concat(p,"...").concat(R).concat(st),tt=!0),lt!==""&&(st=` - `.concat(lt).concat(st),lt="");var Wt=0,Ht=O[X]+` -`.concat(k,"+ actual").concat(R," ").concat(w,"- expected").concat(R),Jt=" ".concat(p,"...").concat(R," Lines skipped");for(vt=0;vt1&&vt>2&&(ge>4?(yt+=` + `.concat(lt).concat(st),lt="");var qt=0,Wt=O[J]+` +`.concat(k,"+ actual").concat(R," ").concat(w,"- expected").concat(R),Jt=" ".concat(p,"...").concat(R," Lines skipped");for(vt=0;vt1&&vt>2&&(ge>4?(yt+=` `.concat(p,"...").concat(R),tt=!0):ge>3&&(yt+=` - `.concat(at[vt-2]),Wt++),yt+=` - `.concat(at[vt-1]),Wt++),pt=vt,lt+=` -`.concat(w,"-").concat(R," ").concat(at[vt]),Wt++;else if(at.length1&&vt>2&&(ge>4?(yt+=` + `.concat(at[vt-2]),qt++),yt+=` + `.concat(at[vt-1]),qt++),mt=vt,lt+=` +`.concat(w,"-").concat(R," ").concat(at[vt]),qt++;else if(at.length1&&vt>2&&(ge>4?(yt+=` `.concat(p,"...").concat(R),tt=!0):ge>3&&(yt+=` - `.concat(rt[vt-2]),Wt++),yt+=` - `.concat(rt[vt-1]),Wt++),pt=vt,yt+=` -`.concat(k,"+").concat(R," ").concat(rt[vt]),Wt++;else{var he=at[vt],de=rt[vt],se=de!==he&&(!A(de,",")||de.slice(0,-1)!==he);se&&A(he,",")&&he.slice(0,-1)===de&&(se=!1,de+=","),se?(ge>1&&vt>2&&(ge>4?(yt+=` + `.concat(rt[vt-2]),qt++),yt+=` + `.concat(rt[vt-1]),qt++),mt=vt,yt+=` +`.concat(k,"+").concat(R," ").concat(rt[vt]),qt++;else{var fe=at[vt],pe=rt[vt],se=pe!==fe&&(!A(pe,",")||pe.slice(0,-1)!==fe);se&&A(fe,",")&&fe.slice(0,-1)===pe&&(se=!1,pe+=","),se?(ge>1&&vt>2&&(ge>4?(yt+=` `.concat(p,"...").concat(R),tt=!0):ge>3&&(yt+=` - `.concat(rt[vt-2]),Wt++),yt+=` - `.concat(rt[vt-1]),Wt++),pt=vt,yt+=` -`.concat(k,"+").concat(R," ").concat(de),lt+=` -`.concat(w,"-").concat(R," ").concat(he),Wt+=2):(yt+=lt,lt="",(ge===1||vt===0)&&(yt+=` - `.concat(de),Wt++))}if(Wt>20&&vt20&&vt30)for(Y[26]="".concat(p,"...").concat(R);Y.length>27;)Y.pop();Y.length===1?pt=X.call(this,"".concat(it," ").concat(Y[0])):pt=X.call(this,"".concat(it,` +`)+"".concat(p,"...").concat(R)}return"".concat(Wt).concat(tt?Jt:"",` +`).concat(yt).concat(lt).concat(st).concat(it)}var U=function(W,q){n(lt,W);var J=o(lt);function lt(yt){var mt;if(S(this,lt),b(yt)!=="object"||yt===null)throw new C("options","Object",yt);var st=yt.message,tt=yt.operator,dt=yt.stackStartFn,rt=yt.actual,at=yt.expected,vt=Error.stackTraceLimit;if(Error.stackTraceLimit=0,st!=null)mt=J.call(this,String(st));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(p="\x1B[34m",k="\x1B[32m",R="\x1B[39m",w="\x1B[31m"):(p="",k="",R="",w="")),b(rt)==="object"&&rt!==null&&b(at)==="object"&&at!==null&&"stack"in rt&&rt instanceof Error&&"stack"in at&&at instanceof Error&&(rt=V(rt),at=V(at)),tt==="deepStrictEqual"||tt==="strictEqual")mt=J.call(this,F(rt,at,tt));else if(tt==="notDeepStrictEqual"||tt==="notStrictEqual"){var it=O[tt],Y=H(rt).split(` +`);if(tt==="notStrictEqual"&&b(rt)==="object"&&rt!==null&&(it=O.notStrictEqualObject),Y.length>30)for(Y[26]="".concat(p,"...").concat(R);Y.length>27;)Y.pop();Y.length===1?mt=J.call(this,"".concat(it," ").concat(Y[0])):mt=J.call(this,"".concat(it,` `).concat(Y.join(` `),` -`))}else{var ft=H(rt),ut="",wt=O[tt];tt==="notDeepEqual"||tt==="notEqual"?(ft="".concat(O[tt],` +`))}else{var ft=H(rt),ut="",kt=O[tt];tt==="notDeepEqual"||tt==="notEqual"?(ft="".concat(O[tt],` -`).concat(ft),ft.length>1024&&(ft="".concat(ft.slice(0,1021),"..."))):(ut="".concat(H(at)),ft.length>512&&(ft="".concat(ft.slice(0,509),"...")),ut.length>512&&(ut="".concat(ut.slice(0,509),"...")),tt==="deepEqual"||tt==="equal"?ft="".concat(wt,` +`).concat(ft),ft.length>1024&&(ft="".concat(ft.slice(0,1021),"..."))):(ut="".concat(H(at)),ft.length>512&&(ft="".concat(ft.slice(0,509),"...")),ut.length>512&&(ut="".concat(ut.slice(0,509),"...")),tt==="deepEqual"||tt==="equal"?ft="".concat(kt,` `).concat(ft,` should equal -`):ut=" ".concat(tt," ").concat(ut)),pt=X.call(this,"".concat(ft).concat(ut))}return Error.stackTraceLimit=vt,pt.generatedMessage=!st,Object.defineProperty(s(pt),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),pt.code="ERR_ASSERTION",pt.actual=rt,pt.expected=at,pt.operator=tt,Error.captureStackTrace&&Error.captureStackTrace(s(pt),dt),pt.stack,pt.name="AssertionError",i(pt)}return e(lt,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:q,value:function(yt,pt){return C(this,g(g({},pt),{},{customInspect:!1,depth:0}))}}]),lt}(f(Error),C.custom);$.exports=U}),B7=Ft((Q,$)=>{var c=Object.prototype.toString;$.exports=function(g){var P=c.call(g),S=P==="[object Arguments]";return S||(S=P!=="[object Array]"&&g!==null&&typeof g=="object"&&typeof g.length=="number"&&g.length>=0&&c.call(g.callee)==="[object Function]"),S}}),FB=Ft((Q,$)=>{var c;Object.keys||(g=Object.prototype.hasOwnProperty,P=Object.prototype.toString,S=B7(),t=Object.prototype.propertyIsEnumerable,e=!t.call({toString:null},"toString"),r=t.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=function(f){var x=f.constructor;return x&&x.prototype===f},o={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},i=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!o["$"+f]&&g.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{n(window[f])}catch{return!0}}catch{return!0}return!1}(),s=function(f){if(typeof window>"u"||!i)return n(f);try{return n(f)}catch{return!1}},c=function(f){var x=f!==null&&typeof f=="object",y=P.call(f)==="[object Function]",v=S(f),T=x&&P.call(f)==="[object String]",u=[];if(!x&&!y&&!v)throw new TypeError("Object.keys called on a non-object");var b=r&&y;if(T&&f.length>0&&!g.call(f,0))for(var _=0;_0)for(var C=0;C{var c=Array.prototype.slice,g=B7(),P=Object.keys,S=P?function(e){return P(e)}:FB(),t=Object.keys;S.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(r){return g(r)?t(c.call(r)):t(r)})}else Object.keys=S;return Object.keys||S},$.exports=S}),RB=Ft((Q,$)=>{var c=N7(),g=rk()(),P=lb(),S=Object,t=P("Array.prototype.push"),e=P("Object.prototype.propertyIsEnumerable"),r=g?Object.getOwnPropertySymbols:null;$.exports=function(a,n){if(a==null)throw new TypeError("target must be an object");var o=S(a);if(arguments.length===1)return o;for(var i=1;i{var c=RB(),g=function(){if(!Object.assign)return!1;for(var S="abcdefghijklmnopqrst",t=S.split(""),e={},r=0;r{var c=function(g){return g!==g};$.exports=function(g,P){return g===0&&P===0?1/g===1/P:!!(g===P||c(g)&&c(P))}}),ok=Ft((Q,$)=>{var c=j7();$.exports=function(){return typeof Object.is=="function"?Object.is:c}}),Kw=Ft((Q,$)=>{var c=N7(),g=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",P=Object.prototype.toString,S=Array.prototype.concat,t=Object.defineProperty,e=function(i){return typeof i=="function"&&P.call(i)==="[object Function]"},r=A7()(),a=t&&r,n=function(i,s,f,x){if(s in i){if(x===!0){if(i[s]===f)return}else if(!e(x)||!x())return}a?t(i,s,{configurable:!0,enumerable:!1,value:f,writable:!0}):i[s]=f},o=function(i,s){var f=arguments.length>2?arguments[2]:{},x=c(s);g&&(x=S.call(x,Object.getOwnPropertySymbols(s)));for(var y=0;y{var c=ok(),g=Kw();$.exports=function(){var P=c();return g(Object,{is:P},{is:function(){return Object.is!==P}}),P}}),jB=Ft((Q,$)=>{var c=Kw(),g=Yw(),P=j7(),S=ok(),t=NB(),e=g(S(),Object);c(e,{getPolyfill:S,implementation:P,shim:t}),$.exports=e}),U7=Ft((Q,$)=>{$.exports=function(c){return c!==c}}),V7=Ft((Q,$)=>{var c=U7();$.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}}),UB=Ft((Q,$)=>{var c=Kw(),g=V7();$.exports=function(){var P=g();return c(Number,{isNaN:P},{isNaN:function(){return Number.isNaN!==P}}),P}}),VB=Ft((Q,$)=>{var c=Yw(),g=Kw(),P=U7(),S=V7(),t=UB(),e=c(S(),Number);g(e,{getPolyfill:S,implementation:P,shim:t}),$.exports=e}),HB=Ft((Q,$)=>{function c(se,Tt){return e(se)||t(se,Tt)||P(se,Tt)||g()}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(se,Tt){if(se){if(typeof se=="string")return S(se,Tt);var Lt=Object.prototype.toString.call(se).slice(8,-1);if(Lt==="Object"&&se.constructor&&(Lt=se.constructor.name),Lt==="Map"||Lt==="Set")return Array.from(se);if(Lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Lt))return S(se,Tt)}}function S(se,Tt){(Tt==null||Tt>se.length)&&(Tt=se.length);for(var Lt=0,Mt=new Array(Tt);Lt10)return!0;for(var Tt=0;Tt57)return!0}return se.length===10&&se>=Math.pow(2,32)}function U(se){return Object.keys(se).filter(F).concat(s(se).filter(Object.prototype.propertyIsEnumerable.bind(se)))}function W(se,Tt){if(se===Tt)return 0;for(var Lt=se.length,Mt=Tt.length,te=0,ve=Math.min(Lt,Mt);te{function c(pt){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st},c(pt)}function g(pt,st,tt){return Object.defineProperty(pt,"prototype",{writable:!1}),pt}function P(pt,st){if(!(pt instanceof st))throw new TypeError("Cannot call a class as a function")}var S=R7(),t=S.codes,e=t.ERR_AMBIGUOUS_ARGUMENT,r=t.ERR_INVALID_ARG_TYPE,a=t.ERR_INVALID_ARG_VALUE,n=t.ERR_INVALID_RETURN_VALUE,o=t.ERR_MISSING_ARGS,i=DB(),s=ub(),f=s.inspect,x=ub().types,y=x.isPromise,v=x.isRegExp,T=BB()(),u=ok()(),b=lb()("RegExp.prototype.test"),_,C;function M(){var pt=HB();_=pt.isDeepEqual,C=pt.isDeepStrictEqual}var E=!1,A=$.exports=R,h={};function p(pt){throw pt.message instanceof Error?pt.message:new i(pt)}function k(pt,st,tt,dt,rt){var at=arguments.length,vt;if(at===0)vt="Failed";else if(at===1)tt=pt,pt=void 0;else{if(E===!1){E=!0;var it=process.emitWarning?process.emitWarning:console.warn.bind(console);it("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}at===2&&(dt="!=")}if(tt instanceof Error)throw tt;var Y={actual:pt,expected:st,operator:dt===void 0?"fail":dt,stackStartFn:rt||k};tt!==void 0&&(Y.message=tt);var ft=new i(Y);throw vt&&(ft.message=vt,ft.generatedMessage=!0),ft}A.fail=k,A.AssertionError=i;function w(pt,st,tt,dt){if(!tt){var rt=!1;if(st===0)rt=!0,dt="No value argument passed to `assert.ok()`";else if(dt instanceof Error)throw dt;var at=new i({actual:tt,expected:!0,message:dt,operator:"==",stackStartFn:pt});throw at.generatedMessage=rt,at}}function R(){for(var pt=arguments.length,st=new Array(pt),tt=0;tt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt{var c=Object.prototype.toString;Z.exports=function(g){var I=c.call(g),S=I==="[object Arguments]";return S||(S=I!=="[object Array]"&&g!==null&&typeof g=="object"&&typeof g.length=="number"&&g.length>=0&&c.call(g.callee)==="[object Function]"),S}}),aN=Dt((Q,Z)=>{var c;Object.keys||(g=Object.prototype.hasOwnProperty,I=Object.prototype.toString,S=K7(),t=Object.prototype.propertyIsEnumerable,e=!t.call({toString:null},"toString"),r=t.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=function(f){var x=f.constructor;return x&&x.prototype===f},o={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},i=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!o["$"+f]&&g.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{n(window[f])}catch{return!0}}catch{return!0}return!1}(),l=function(f){if(typeof window>"u"||!i)return n(f);try{return n(f)}catch{return!1}},c=function(f){var x=f!==null&&typeof f=="object",y=I.call(f)==="[object Function]",v=S(f),T=x&&I.call(f)==="[object String]",u=[];if(!x&&!y&&!v)throw new TypeError("Object.keys called on a non-object");var b=r&&y;if(T&&f.length>0&&!g.call(f,0))for(var _=0;_0)for(var P=0;P{var c=Array.prototype.slice,g=K7(),I=Object.keys,S=I?function(e){return I(e)}:aN(),t=Object.keys;S.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(r){return g(r)?t(c.call(r)):t(r)})}else Object.keys=S;return Object.keys||S},Z.exports=S}),oN=Dt((Q,Z)=>{var c=X7(),g=uk()(),I=ob(),S=Object,t=I("Array.prototype.push"),e=I("Object.prototype.propertyIsEnumerable"),r=g?Object.getOwnPropertySymbols:null;Z.exports=function(a,n){if(a==null)throw new TypeError("target must be an object");var o=S(a);if(arguments.length===1)return o;for(var i=1;i{var c=oN(),g=function(){if(!Object.assign)return!1;for(var S="abcdefghijklmnopqrst",t=S.split(""),e={},r=0;r{var c=function(g){return g!==g};Z.exports=function(g,I){return g===0&&I===0?1/g===1/I:!!(g===I||c(g)&&c(I))}}),dk=Dt((Q,Z)=>{var c=J7();Z.exports=function(){return typeof Object.is=="function"?Object.is:c}}),Qw=Dt((Q,Z)=>{var c=X7(),g=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",I=Object.prototype.toString,S=Array.prototype.concat,t=Object.defineProperty,e=function(i){return typeof i=="function"&&I.call(i)==="[object Function]"},r=R7()(),a=t&&r,n=function(i,l,f,x){if(l in i){if(x===!0){if(i[l]===f)return}else if(!e(x)||!x())return}a?t(i,l,{configurable:!0,enumerable:!1,value:f,writable:!0}):i[l]=f},o=function(i,l){var f=arguments.length>2?arguments[2]:{},x=c(l);g&&(x=S.call(x,Object.getOwnPropertySymbols(l)));for(var y=0;y{var c=dk(),g=Qw();Z.exports=function(){var I=c();return g(Object,{is:I},{is:function(){return Object.is!==I}}),I}}),uN=Dt((Q,Z)=>{var c=Qw(),g=Jw(),I=J7(),S=dk(),t=lN(),e=g(S(),Object);c(e,{getPolyfill:S,implementation:I,shim:t}),Z.exports=e}),Q7=Dt((Q,Z)=>{Z.exports=function(c){return c!==c}}),t9=Dt((Q,Z)=>{var c=Q7();Z.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}}),cN=Dt((Q,Z)=>{var c=Qw(),g=t9();Z.exports=function(){var I=g();return c(Number,{isNaN:I},{isNaN:function(){return Number.isNaN!==I}}),I}}),hN=Dt((Q,Z)=>{var c=Jw(),g=Qw(),I=Q7(),S=t9(),t=cN(),e=c(S(),Number);g(e,{getPolyfill:S,implementation:I,shim:t}),Z.exports=e}),fN=Dt((Q,Z)=>{function c(se,Tt){return e(se)||t(se,Tt)||I(se,Tt)||g()}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I(se,Tt){if(se){if(typeof se=="string")return S(se,Tt);var Lt=Object.prototype.toString.call(se).slice(8,-1);if(Lt==="Object"&&se.constructor&&(Lt=se.constructor.name),Lt==="Map"||Lt==="Set")return Array.from(se);if(Lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Lt))return S(se,Tt)}}function S(se,Tt){(Tt==null||Tt>se.length)&&(Tt=se.length);for(var Lt=0,Mt=new Array(Tt);Lt10)return!0;for(var Tt=0;Tt57)return!0}return se.length===10&&se>=Math.pow(2,32)}function U(se){return Object.keys(se).filter(F).concat(l(se).filter(Object.prototype.propertyIsEnumerable.bind(se)))}function W(se,Tt){if(se===Tt)return 0;for(var Lt=se.length,Mt=Tt.length,ee=0,ve=Math.min(Lt,Mt);ee{function c(mt){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st},c(mt)}function g(mt,st,tt){return Object.defineProperty(mt,"prototype",{writable:!1}),mt}function I(mt,st){if(!(mt instanceof st))throw new TypeError("Cannot call a class as a function")}var S=Y7(),t=S.codes,e=t.ERR_AMBIGUOUS_ARGUMENT,r=t.ERR_INVALID_ARG_TYPE,a=t.ERR_INVALID_ARG_VALUE,n=t.ERR_INVALID_RETURN_VALUE,o=t.ERR_MISSING_ARGS,i=iN(),l=sb(),f=l.inspect,x=sb().types,y=x.isPromise,v=x.isRegExp,T=sN()(),u=dk()(),b=ob()("RegExp.prototype.test"),_,P;function M(){var mt=fN();_=mt.isDeepEqual,P=mt.isDeepStrictEqual}var C=!1,A=Z.exports=R,h={};function p(mt){throw mt.message instanceof Error?mt.message:new i(mt)}function k(mt,st,tt,dt,rt){var at=arguments.length,vt;if(at===0)vt="Failed";else if(at===1)tt=mt,mt=void 0;else{if(C===!1){C=!0;var it=process.emitWarning?process.emitWarning:console.warn.bind(console);it("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}at===2&&(dt="!=")}if(tt instanceof Error)throw tt;var Y={actual:mt,expected:st,operator:dt===void 0?"fail":dt,stackStartFn:rt||k};tt!==void 0&&(Y.message=tt);var ft=new i(Y);throw vt&&(ft.message=vt,ft.generatedMessage=!0),ft}A.fail=k,A.AssertionError=i;function w(mt,st,tt,dt){if(!tt){var rt=!1;if(st===0)rt=!0,dt="No value argument passed to `assert.ok()`";else if(dt instanceof Error)throw dt;var at=new i({actual:tt,expected:!0,message:dt,operator:"==",stackStartFn:mt});throw at.generatedMessage=rt,at}}function R(){for(var mt=arguments.length,st=new Array(mt),tt=0;tt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt1?tt-1:0),rt=1;rt{var c=1e3,g=c*60,P=g*60,S=P*24,t=S*365.25;$.exports=function(o,i){i=i||{};var s=typeof o;if(s==="string"&&o.length>0)return e(o);if(s==="number"&&isNaN(o)===!1)return i.long?a(o):r(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function e(o){if(o=String(o),!(o.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(i){var s=parseFloat(i[1]),f=(i[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return s*t;case"days":case"day":case"d":return s*S;case"hours":case"hour":case"hrs":case"hr":case"h":return s*P;case"minutes":case"minute":case"mins":case"min":case"m":return s*g;case"seconds":case"second":case"secs":case"sec":case"s":return s*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function r(o){return o>=S?Math.round(o/S)+"d":o>=P?Math.round(o/P)+"h":o>=g?Math.round(o/g)+"m":o>=c?Math.round(o/c)+"s":o+"ms"}function a(o){return n(o,S,"day")||n(o,P,"hour")||n(o,g,"minute")||n(o,c,"second")||o+" ms"}function n(o,i,s){if(!(o{Q=$.exports=P.debug=P.default=P,Q.coerce=r,Q.disable=t,Q.enable=S,Q.enabled=e,Q.humanize=WB(),Q.names=[],Q.skips=[],Q.formatters={};var c;function g(a){var n=0,o;for(o in a)n=(n<<5)-n+a.charCodeAt(o),n|=0;return Q.colors[Math.abs(n)%Q.colors.length]}function P(a){function n(){if(n.enabled){var o=n,i=+new Date,s=i-(c||i);o.diff=s,o.prev=c,o.curr=i,c=i;for(var f=new Array(arguments.length),x=0;x{Q=$.exports=qB(),Q.log=P,Q.formatArgs=g,Q.save=S,Q.load=t,Q.useColors=c,Q.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:e(),Q.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function c(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Q.formatters.j=function(r){try{return JSON.stringify(r)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}};function g(r){var a=this.useColors;if(r[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+r[0]+(a?"%c ":" ")+"+"+Q.humanize(this.diff),!!a){var n="color: "+this.color;r.splice(1,0,n,"color: inherit");var o=0,i=0;r[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(o++,s==="%c"&&(i=o))}),r.splice(i,0,n)}}function P(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function S(r){try{r==null?Q.storage.removeItem("debug"):Q.storage.debug=r}catch{}}function t(){var r;try{r=Q.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=l.DEBUG),r}Q.enable(t());function e(){try{return window.localStorage}catch{}}}),$B=Ft((Q,$)=>{var c=Xw(),g=ZB()("stream-parser");$.exports=r;var P=-1,S=0,t=1,e=2;function r(u){var b=u&&typeof u._transform=="function",_=u&&typeof u._write=="function";if(!b&&!_)throw new Error("must pass a Writable or Transform stream in");g("extending Parser into stream"),u._bytes=n,u._skipBytes=o,b&&(u._passthrough=i),b?u._transform=f:u._write=s}function a(u){g("initializing parser stream"),u._parserBytesLeft=0,u._parserBuffers=[],u._parserBuffered=0,u._parserState=P,u._parserCallback=null,typeof u.push=="function"&&(u._parserOutput=u.push.bind(u)),u._parserInit=!0}function n(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(isFinite(u)&&u>0,'can only buffer a finite number of bytes > 0, got "'+u+'"'),this._parserInit||a(this),g("buffering %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=S}function o(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(u>0,'can only skip > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("skipping %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=t}function i(u,b){c(!this._parserCallback,'There is already a "callback" set!'),c(u>0,'can only pass through > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("passing through %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=e}function s(u,b,_){this._parserInit||a(this),g("write(%o bytes)",u.length),typeof b=="function"&&(_=b),v(this,u,null,_)}function f(u,b,_){this._parserInit||a(this),g("transform(%o bytes)",u.length),typeof b!="function"&&(b=this._parserOutput),v(this,u,b,_)}function x(u,b,_,C){return u._parserBytesLeft<=0?C(new Error("got data but not currently parsing anything")):b.length<=u._parserBytesLeft?function(){return y(u,b,_,C)}:function(){var M=b.slice(0,u._parserBytesLeft);return y(u,M,_,function(E){if(E)return C(E);if(b.length>M.length)return function(){return x(u,b.slice(M.length),_,C)}})}}function y(u,b,_,C){if(u._parserBytesLeft-=b.length,g("%o bytes left for stream piece",u._parserBytesLeft),u._parserState===S?(u._parserBuffers.push(b),u._parserBuffered+=b.length):u._parserState===e&&_(b),u._parserBytesLeft===0){var M=u._parserCallback;if(M&&u._parserState===S&&u._parserBuffers.length>1&&(b=Buffer.concat(u._parserBuffers,u._parserBuffered)),u._parserState!==S&&(b=null),u._parserCallback=null,u._parserBuffered=0,u._parserState=P,u._parserBuffers.splice(0),M){var E=[];b&&E.push(b),_&&E.push(_);var A=M.length>E.length;A&&E.push(T(C));var h=M.apply(u,E);if(!A||C===h)return C}}else return C}var v=T(x);function T(u){return function(){for(var b=u.apply(this,arguments);typeof b=="function";)b=b();return b}}}),ph=Ft(Q=>{var $=OB().Transform,c=$B();function g(){$.call(this,{readableObjectMode:!0})}g.prototype=Object.create($.prototype),g.prototype.constructor=g,c(g.prototype),Q.ParserStream=g,Q.sliceEq=function(S,t,e){for(var r=t,a=0;a{var c=ph().readUInt16BE,g=ph().readUInt32BE;function P(i,s){if(i.length<4+s)return null;var f=g(i,s);return i.length>4&15,x=i[4]&15,y=i[5]>>4&15,v=c(i,6),T=8,u=0;uv.width||y.width===v.width&&y.height>v.height?y:v}),f=i.reduce(function(y,v){return y.height>v.height||y.height===v.height&&y.width>v.width?y:v}),x;return s.width>f.height||s.width===f.height&&s.height>f.width?x=s:x=f,x}$.exports.readSizeFromMeta=function(i){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(n(i,s),!!s.sizes.length){var f=o(s.sizes),x=1;s.transforms.forEach(function(v){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},u={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?x=u[x]:(x=u[x],x=T[x],x=T[x])),v.type==="irot")for(var b=0;b{function c(S,t){var e=new Error(S);return e.code=t,e}function g(S){try{return decodeURIComponent(escape(S))}catch{return S}}function P(S,t,e){this.input=S.subarray(t,e),this.start=t;var r=String.fromCharCode.apply(null,this.input.subarray(0,4));if(r!=="II*\0"&&r!=="MM\0*")throw c("invalid TIFF signature","EBADDATA");this.big_endian=r[0]==="M"}P.prototype.each=function(S){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,S)}},P.prototype.read_uint16=function(S){var t=this.input;if(S+2>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*256+t[S+1]:t[S]+t[S+1]*256},P.prototype.read_uint32=function(S){var t=this.input;if(S+4>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*16777216+t[S+1]*65536+t[S+2]*256+t[S+3]:t[S]+t[S+1]*256+t[S+2]*65536+t[S+3]*16777216},P.prototype.is_subifd_link=function(S,t){return S===0&&t===34665||S===0&&t===34853||S===34665&&t===40965},P.prototype.exif_format_length=function(S){switch(S){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},P.prototype.exif_format_read=function(S,t){var e;switch(S){case 1:case 2:return e=this.input[t],e;case 6:return e=this.input[t],e|(e&128)*33554430;case 3:return e=this.read_uint16(t),e;case 8:return e=this.read_uint16(t),e|(e&32768)*131070;case 4:return e=this.read_uint32(t),e;case 9:return e=this.read_uint32(t),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},P.prototype.scan_ifd=function(S,t,e){var r=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw c("unexpected EOF","EBADDATA");for(var v=[],T=x,u=0;u0&&(this.ifds_to_read.push({id:n,offset:v[0]}),y=!0);var _={is_big_endian:this.big_endian,ifd:S,tag:n,format:o,count:i,entry_offset:t+this.start,data_length:f,data_offset:x+this.start,value:v,is_subifd_link:y};if(e(_)===!1){this.aborted=!0;return}t+=12}S===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},$.exports.ExifParser=P,$.exports.get_orientation=function(S){var t=0;try{return new P(S,0,S.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch{return-1}}}),YB=Ft((Q,$)=>{var c=ph().str2arr,g=ph().sliceEq,P=ph().readUInt32BE,S=GB(),t=sk(),e=c("ftyp");$.exports=function(r){if(g(r,4,e)){var a=S.unbox(r,0);if(a){var n=S.getMimeType(a.data);if(n){for(var o,i=a.end;;){var s=S.unbox(r,i);if(!s)break;if(i=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){o=s.data;break}}if(o){var f=S.readSizeFromMeta(o);if(f){var x={width:f.width,height:f.height,type:n.type,mime:n.mime,wUnits:"px",hUnits:"px"};if(f.variants.length>1&&(x.variants=f.variants),f.orientation&&(x.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=r.length){var y=P(r,f.exif_location.offset),v=r.slice(f.exif_location.offset+y+4,f.exif_location.offset+f.exif_location.length),T=t.get_orientation(v);T>0&&(x.orientation=T)}return x}}}}}}}),KB=Ft((Q,$)=>{var c=ph().str2arr,g=ph().sliceEq,P=ph().readUInt16LE,S=c("BM");$.exports=function(t){if(!(t.length<26)&&g(t,0,S))return{width:P(t,18),height:P(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}),XB=Ft((Q,$)=>{var c=ph().str2arr,g=ph().sliceEq,P=ph().readUInt16LE,S=c("GIF87a"),t=c("GIF89a");$.exports=function(e){if(!(e.length<10)&&!(!g(e,0,S)&&!g(e,0,t)))return{width:P(e,6),height:P(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}),JB=Ft((Q,$)=>{var c=ph().readUInt16LE,g=0,P=1,S=16;$.exports=function(t){var e=c(t,0),r=c(t,2),a=c(t,4);if(!(e!==g||r!==P||!a)){for(var n=[],o={width:0,height:0},i=0;io.width||f>o.height)&&(o=x)}return{width:o.width,height:o.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}),QB=Ft((Q,$)=>{var c=ph().readUInt16BE,g=ph().str2arr,P=ph().sliceEq,S=sk(),t=g("Exif\0\0");$.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var r=2;;){for(;;){if(e.length-r<2)return;if(e[r++]===255)break}for(var a=e[r++],n;a===255;)a=e[r++];if(208<=a&&a<=217||a===1)n=0;else if(192<=a&&a<=254){if(e.length-r<2)return;n=c(e,r)-2,r+=2}else return;if(a===217||a===218)return;var o;if(a===225&&n>=10&&P(e,r,t)&&(o=S.get_orientation(e.slice(r+6,r+n))),n>=5&&192<=a&&a<=207&&a!==196&&a!==200&&a!==204){if(e.length-r0&&(i.orientation=o),i}r+=n}}}),tN=Ft((Q,$)=>{var c=ph().str2arr,g=ph().sliceEq,P=ph().readUInt32BE,S=c(`‰PNG\r +`).concat(f(mt),` +`));var it=new i({actual:mt,expected:st,message:tt,operator:rt,stackStartFn:dt});throw it.generatedMessage=vt,it}}A.match=function mt(st,tt,dt){lt(st,tt,dt,mt,"match")},A.doesNotMatch=function mt(st,tt,dt){lt(st,tt,dt,mt,"doesNotMatch")};function yt(){for(var mt=arguments.length,st=new Array(mt),tt=0;tt{var c=1e3,g=c*60,I=g*60,S=I*24,t=S*365.25;Z.exports=function(o,i){i=i||{};var l=typeof o;if(l==="string"&&o.length>0)return e(o);if(l==="number"&&isNaN(o)===!1)return i.long?a(o):r(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function e(o){if(o=String(o),!(o.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(i){var l=parseFloat(i[1]),f=(i[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return l*t;case"days":case"day":case"d":return l*S;case"hours":case"hour":case"hrs":case"hr":case"h":return l*I;case"minutes":case"minute":case"mins":case"min":case"m":return l*g;case"seconds":case"second":case"secs":case"sec":case"s":return l*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function r(o){return o>=S?Math.round(o/S)+"d":o>=I?Math.round(o/I)+"h":o>=g?Math.round(o/g)+"m":o>=c?Math.round(o/c)+"s":o+"ms"}function a(o){return n(o,S,"day")||n(o,I,"hour")||n(o,g,"minute")||n(o,c,"second")||o+" ms"}function n(o,i,l){if(!(o{Q=Z.exports=I.debug=I.default=I,Q.coerce=r,Q.disable=t,Q.enable=S,Q.enabled=e,Q.humanize=dN(),Q.names=[],Q.skips=[],Q.formatters={};var c;function g(a){var n=0,o;for(o in a)n=(n<<5)-n+a.charCodeAt(o),n|=0;return Q.colors[Math.abs(n)%Q.colors.length]}function I(a){function n(){if(n.enabled){var o=n,i=+new Date,l=i-(c||i);o.diff=l,o.prev=c,o.curr=i,c=i;for(var f=new Array(arguments.length),x=0;x{Q=Z.exports=pN(),Q.log=I,Q.formatArgs=g,Q.save=S,Q.load=t,Q.useColors=c,Q.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:e(),Q.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function c(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Q.formatters.j=function(r){try{return JSON.stringify(r)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}};function g(r){var a=this.useColors;if(r[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+r[0]+(a?"%c ":" ")+"+"+Q.humanize(this.diff),!!a){var n="color: "+this.color;r.splice(1,0,n,"color: inherit");var o=0,i=0;r[0].replace(/%[a-zA-Z%]/g,function(l){l!=="%%"&&(o++,l==="%c"&&(i=o))}),r.splice(i,0,n)}}function I(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function S(r){try{r==null?Q.storage.removeItem("debug"):Q.storage.debug=r}catch{}}function t(){var r;try{r=Q.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=s.DEBUG),r}Q.enable(t());function e(){try{return window.localStorage}catch{}}}),gN=Dt((Q,Z)=>{var c=t3(),g=mN()("stream-parser");Z.exports=r;var I=-1,S=0,t=1,e=2;function r(u){var b=u&&typeof u._transform=="function",_=u&&typeof u._write=="function";if(!b&&!_)throw new Error("must pass a Writable or Transform stream in");g("extending Parser into stream"),u._bytes=n,u._skipBytes=o,b&&(u._passthrough=i),b?u._transform=f:u._write=l}function a(u){g("initializing parser stream"),u._parserBytesLeft=0,u._parserBuffers=[],u._parserBuffered=0,u._parserState=I,u._parserCallback=null,typeof u.push=="function"&&(u._parserOutput=u.push.bind(u)),u._parserInit=!0}function n(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(isFinite(u)&&u>0,'can only buffer a finite number of bytes > 0, got "'+u+'"'),this._parserInit||a(this),g("buffering %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=S}function o(u,b){c(!this._parserCallback,'there is already a "callback" set!'),c(u>0,'can only skip > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("skipping %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=t}function i(u,b){c(!this._parserCallback,'There is already a "callback" set!'),c(u>0,'can only pass through > 0 bytes, got "'+u+'"'),this._parserInit||a(this),g("passing through %o bytes",u),this._parserBytesLeft=u,this._parserCallback=b,this._parserState=e}function l(u,b,_){this._parserInit||a(this),g("write(%o bytes)",u.length),typeof b=="function"&&(_=b),v(this,u,null,_)}function f(u,b,_){this._parserInit||a(this),g("transform(%o bytes)",u.length),typeof b!="function"&&(b=this._parserOutput),v(this,u,b,_)}function x(u,b,_,P){return u._parserBytesLeft<=0?P(new Error("got data but not currently parsing anything")):b.length<=u._parserBytesLeft?function(){return y(u,b,_,P)}:function(){var M=b.slice(0,u._parserBytesLeft);return y(u,M,_,function(C){if(C)return P(C);if(b.length>M.length)return function(){return x(u,b.slice(M.length),_,P)}})}}function y(u,b,_,P){if(u._parserBytesLeft-=b.length,g("%o bytes left for stream piece",u._parserBytesLeft),u._parserState===S?(u._parserBuffers.push(b),u._parserBuffered+=b.length):u._parserState===e&&_(b),u._parserBytesLeft===0){var M=u._parserCallback;if(M&&u._parserState===S&&u._parserBuffers.length>1&&(b=Buffer.concat(u._parserBuffers,u._parserBuffered)),u._parserState!==S&&(b=null),u._parserCallback=null,u._parserBuffered=0,u._parserState=I,u._parserBuffers.splice(0),M){var C=[];b&&C.push(b),_&&C.push(_);var A=M.length>C.length;A&&C.push(T(P));var h=M.apply(u,C);if(!A||P===h)return P}}else return P}var v=T(x);function T(u){return function(){for(var b=u.apply(this,arguments);typeof b=="function";)b=b();return b}}}),ph=Dt(Q=>{var Z=nN().Transform,c=gN();function g(){Z.call(this,{readableObjectMode:!0})}g.prototype=Object.create(Z.prototype),g.prototype.constructor=g,c(g.prototype),Q.ParserStream=g,Q.sliceEq=function(S,t,e){for(var r=t,a=0;a{var c=ph().readUInt16BE,g=ph().readUInt32BE;function I(i,l){if(i.length<4+l)return null;var f=g(i,l);return i.length>4&15,x=i[4]&15,y=i[5]>>4&15,v=c(i,6),T=8,u=0;uv.width||y.width===v.width&&y.height>v.height?y:v}),f=i.reduce(function(y,v){return y.height>v.height||y.height===v.height&&y.width>v.width?y:v}),x;return l.width>f.height||l.width===f.height&&l.height>f.width?x=l:x=f,x}Z.exports.readSizeFromMeta=function(i){var l={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(n(i,l),!!l.sizes.length){var f=o(l.sizes),x=1;l.transforms.forEach(function(v){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},u={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?x=u[x]:(x=u[x],x=T[x],x=T[x])),v.type==="irot")for(var b=0;b{function c(S,t){var e=new Error(S);return e.code=t,e}function g(S){try{return decodeURIComponent(escape(S))}catch{return S}}function I(S,t,e){this.input=S.subarray(t,e),this.start=t;var r=String.fromCharCode.apply(null,this.input.subarray(0,4));if(r!=="II*\0"&&r!=="MM\0*")throw c("invalid TIFF signature","EBADDATA");this.big_endian=r[0]==="M"}I.prototype.each=function(S){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,S)}},I.prototype.read_uint16=function(S){var t=this.input;if(S+2>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*256+t[S+1]:t[S]+t[S+1]*256},I.prototype.read_uint32=function(S){var t=this.input;if(S+4>t.length)throw c("unexpected EOF","EBADDATA");return this.big_endian?t[S]*16777216+t[S+1]*65536+t[S+2]*256+t[S+3]:t[S]+t[S+1]*256+t[S+2]*65536+t[S+3]*16777216},I.prototype.is_subifd_link=function(S,t){return S===0&&t===34665||S===0&&t===34853||S===34665&&t===40965},I.prototype.exif_format_length=function(S){switch(S){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},I.prototype.exif_format_read=function(S,t){var e;switch(S){case 1:case 2:return e=this.input[t],e;case 6:return e=this.input[t],e|(e&128)*33554430;case 3:return e=this.read_uint16(t),e;case 8:return e=this.read_uint16(t),e|(e&32768)*131070;case 4:return e=this.read_uint32(t),e;case 9:return e=this.read_uint32(t),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},I.prototype.scan_ifd=function(S,t,e){var r=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw c("unexpected EOF","EBADDATA");for(var v=[],T=x,u=0;u0&&(this.ifds_to_read.push({id:n,offset:v[0]}),y=!0);var _={is_big_endian:this.big_endian,ifd:S,tag:n,format:o,count:i,entry_offset:t+this.start,data_length:f,data_offset:x+this.start,value:v,is_subifd_link:y};if(e(_)===!1){this.aborted=!0;return}t+=12}S===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},Z.exports.ExifParser=I,Z.exports.get_orientation=function(S){var t=0;try{return new I(S,0,S.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch{return-1}}}),yN=Dt((Q,Z)=>{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt32BE,S=vN(),t=pk(),e=c("ftyp");Z.exports=function(r){if(g(r,4,e)){var a=S.unbox(r,0);if(a){var n=S.getMimeType(a.data);if(n){for(var o,i=a.end;;){var l=S.unbox(r,i);if(!l)break;if(i=l.end,l.boxtype==="mdat")return;if(l.boxtype==="meta"){o=l.data;break}}if(o){var f=S.readSizeFromMeta(o);if(f){var x={width:f.width,height:f.height,type:n.type,mime:n.mime,wUnits:"px",hUnits:"px"};if(f.variants.length>1&&(x.variants=f.variants),f.orientation&&(x.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=r.length){var y=I(r,f.exif_location.offset),v=r.slice(f.exif_location.offset+y+4,f.exif_location.offset+f.exif_location.length),T=t.get_orientation(v);T>0&&(x.orientation=T)}return x}}}}}}}),xN=Dt((Q,Z)=>{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt16LE,S=c("BM");Z.exports=function(t){if(!(t.length<26)&&g(t,0,S))return{width:I(t,18),height:I(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}),_N=Dt((Q,Z)=>{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt16LE,S=c("GIF87a"),t=c("GIF89a");Z.exports=function(e){if(!(e.length<10)&&!(!g(e,0,S)&&!g(e,0,t)))return{width:I(e,6),height:I(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}),bN=Dt((Q,Z)=>{var c=ph().readUInt16LE,g=0,I=1,S=16;Z.exports=function(t){var e=c(t,0),r=c(t,2),a=c(t,4);if(!(e!==g||r!==I||!a)){for(var n=[],o={width:0,height:0},i=0;io.width||f>o.height)&&(o=x)}return{width:o.width,height:o.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}),wN=Dt((Q,Z)=>{var c=ph().readUInt16BE,g=ph().str2arr,I=ph().sliceEq,S=pk(),t=g("Exif\0\0");Z.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var r=2;;){for(;;){if(e.length-r<2)return;if(e[r++]===255)break}for(var a=e[r++],n;a===255;)a=e[r++];if(208<=a&&a<=217||a===1)n=0;else if(192<=a&&a<=254){if(e.length-r<2)return;n=c(e,r)-2,r+=2}else return;if(a===217||a===218)return;var o;if(a===225&&n>=10&&I(e,r,t)&&(o=S.get_orientation(e.slice(r+6,r+n))),n>=5&&192<=a&&a<=207&&a!==196&&a!==200&&a!==204){if(e.length-r0&&(i.orientation=o),i}r+=n}}}),kN=Dt((Q,Z)=>{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt32BE,S=c(`‰PNG\r  -`),t=c("IHDR");$.exports=function(e){if(!(e.length<24)&&g(e,0,S)&&g(e,12,t))return{width:P(e,16),height:P(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}),eN=Ft((Q,$)=>{var c=ph().str2arr,g=ph().sliceEq,P=ph().readUInt32BE,S=c("8BPS\0");$.exports=function(t){if(!(t.length<22)&&g(t,0,S))return{width:P(t,18),height:P(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}),rN=Ft((Q,$)=>{function c(s){return s===32||s===9||s===13||s===10}function g(s){return typeof s=="number"&&isFinite(s)&&s>0}function P(s){var f=0,x=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(f=3);f]*>/,t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,r=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,n=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function o(s){var f=s.match(e),x=s.match(r),y=s.match(a);return{width:f&&(f[1]||f[2]),height:x&&(x[1]||x[2]),viewbox:y&&(y[1]||y[2])}}function i(s){return n.test(s)?s.match(n)[0]:"px"}$.exports=function(s){if(P(s)){for(var f="",x=0;x{var c=ph().str2arr,g=ph().sliceEq,P=ph().readUInt16LE,S=ph().readUInt16BE,t=ph().readUInt32LE,e=ph().readUInt32BE,r=c("II*\0"),a=c("MM\0*");function n(s,f,x){return x?S(s,f):P(s,f)}function o(s,f,x){return x?e(s,f):t(s,f)}function i(s,f,x){var y=n(s,f+2,x),v=o(s,f+4,x);return v!==1||y!==3&&y!==4?null:y===3?n(s,f+8,x):o(s,f+8,x)}$.exports=function(s){if(!(s.length<8)&&!(!g(s,0,r)&&!g(s,0,a))){var f=s[0]===77,x=o(s,4,f)-8;if(!(x<0)){var y=x+8;if(!(s.length-y<2)){var v=n(s,y+0,f)*12;if(!(v<=0)&&(y+=2,!(s.length-y{var c=ph().str2arr,g=ph().sliceEq,P=ph().readUInt16LE,S=ph().readUInt32LE,t=sk(),e=c("RIFF"),r=c("WEBP");function a(i,s){if(!(i[s+3]!==157||i[s+4]!==1||i[s+5]!==42))return{width:P(i,s+6)&16383,height:P(i,s+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function n(i,s){if(i[s]===47){var f=S(i,s+1);return{width:(f&16383)+1,height:(f>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function o(i,s){return{width:(i[s+6]<<16|i[s+5]<<8|i[s+4])+1,height:(i[s+9]<i.length)){for(;s+8=10?f=f||a(i,s+8):v==="VP8L"&&T>=9?f=f||n(i,s+8):v==="VP8X"&&T>=10?f=f||o(i,s+8):v==="EXIF"&&(x=t.get_orientation(i.slice(s+8,s+8+T)),s=1/0),s+=8+T}if(f)return x>0&&(f.orientation=x),f}}}}),aN=Ft((Q,$)=>{$.exports={avif:YB(),bmp:KB(),gif:XB(),ico:JB(),jpeg:QB(),png:tN(),psd:eN(),svg:rN(),tiff:nN(),webp:iN()}}),oN=Ft((Q,$)=>{var c=aN();function g(P){for(var S=Object.keys(c),t=0;t{var $=oN(),c=u0().IMAGE_URL_PREFIX,g=nx().Buffer;Q.getImageSize=function(P){var S=P.replace(c,""),t=new g(S,"base64");return $(t)}}),lN=Ft((Q,$)=>{var c=_n(),g=ab(),P=ia(),S=Ls(),t=_n().maxRowLength,e=sN().getImageSize;$.exports=function(o,i){var s,f;if(i._hasZ)s=i.z.length,f=t(i.z);else if(i._hasSource){var x=e(i.source);s=x.height,f=x.width}var y=S.getFromId(o,i.xaxis||"x"),v=S.getFromId(o,i.yaxis||"y"),T=y.d2c(i.x0)-i.dx/2,u=v.d2c(i.y0)-i.dy/2,b,_=[T,T+f*i.dx],C=[u,u+s*i.dy];if(y&&y.type==="log")for(b=0;b{var c=En(),g=_n(),P=g.strTranslate,S=Bp(),t=ab(),e=ZM(),r=V6().STYLE;$.exports=function(a,n,o,i){var s=n.xaxis,f=n.yaxis,x=!a._context._exportedPlot&&e();g.makeTraceGroups(i,o,"im").each(function(y){var v=c.select(this),T=y[0],u=T.trace,b=(u.zsmooth==="fast"||u.zsmooth===!1&&x)&&!u._hasZ&&u._hasSource&&s.type==="linear"&&f.type==="linear";u._realImage=b;var _=T.z,C=T.x0,M=T.y0,E=T.w,A=T.h,h=u.dx,p=u.dy,k,w,R,O,N,V;for(V=0;k===void 0&&V0;)w=s.c2p(C+V*h),V--;for(V=0;O===void 0&&V0;)N=f.c2p(M+V*p),V--;if(wst[0];if(tt||dt){var rt=k+F/2,at=O+U/2;yt+="transform:"+P(rt+"px",at+"px")+"scale("+(tt?-1:1)+","+(dt?-1:1)+")"+P(-rt+"px",-at+"px")+";"}}lt.attr("style",yt);var vt=new Promise(function(it){if(u._hasZ)it();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===E&&u._canvas.el.height===A&&u._canvas.source===u.source)it();else{var Y=document.createElement("canvas");Y.width=E,Y.height=A;var ft=Y.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var ut=u._image;ut.onload=function(){ft.drawImage(ut,0,0),u._canvas={el:Y,source:u.source},it()},ut.setAttribute("src",u.source)}}).then(function(){var it,Y;if(u._hasZ)Y=X(function(wt,zt){var Pt=_[zt][wt];return g.isTypedArray(Pt)&&(Pt=Array.from(Pt)),Pt}),it=Y.toDataURL("image/png");else if(u._hasSource)if(b)it=u.source;else{var ft=u._canvas.el.getContext("2d",{willReadFrequently:!0}),ut=ft.getImageData(0,0,E,A).data;Y=X(function(wt,zt){var Pt=4*(zt*E+wt);return[ut[Pt],ut[Pt+1],ut[Pt+2],ut[Pt+3]]}),it=Y.toDataURL("image/png")}lt.attr({"xlink:href":it,height:U,width:F,x:k,y:O})});a._promises.push(vt)})}}),cN=Ft((Q,$)=>{var c=En();$.exports=function(g){c.select(g).selectAll(".im image").style("opacity",function(P){return P[0].trace.opacity})}}),hN=Ft((Q,$)=>{var c=Qh(),g=_n(),P=g.isArrayOrTypedArray,S=ab();$.exports=function(t,e,r){var a=t.cd[0],n=a.trace,o=t.xa,i=t.ya;if(!(c.inbox(e-a.x0,e-(a.x0+a.w*n.dx),0)>0||c.inbox(r-a.y0,r-(a.y0+a.h*n.dy),0)>0)){var s=Math.floor((e-a.x0)/n.dx),f=Math.floor(Math.abs(r-a.y0)/n.dy),x;if(n._hasZ?x=a.z[f][s]:n._hasSource&&(x=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(s,f,1,1).data),!!x){var y=a.hi||n.hoverinfo,v;if(y){var T=y.split("+");T.indexOf("all")!==-1&&(T=["color"]),T.indexOf("color")!==-1&&(v=!0)}var u=S.colormodel[n.colormodel],b=u.colormodel||n.colormodel,_=b.length,C=n._scaler(x),M=u.suffix,E=[];(n.hovertemplate||v)&&(E.push("["+[C[0]+M[0],C[1]+M[1],C[2]+M[2]].join(", ")),_===4&&E.push(", "+C[3]+M[3]),E.push("]"),E=E.join(""),t.extraText=b.toUpperCase()+": "+E);var A;P(n.hovertext)&&P(n.hovertext[f])?A=n.hovertext[f][s]:P(n.text)&&P(n.text[f])&&(A=n.text[f][s]);var h=i.c2p(a.y0+(f+.5)*n.dy),p=a.x0+(s+.5)*n.dx,k=a.y0+(f+.5)*n.dy,w="["+x.slice(0,n.colormodel.length).join(", ")+"]";return[g.extendFlat(t,{index:[f,s],x0:o.c2p(a.x0+s*n.dx),x1:o.c2p(a.x0+(s+1)*n.dx),y0:h,y1:h,color:C,xVal:p,xLabelVal:p,yVal:k,yLabelVal:k,zLabelVal:w,text:A,hovertemplateLabels:{zLabel:w,colorLabel:E,"color[0]Label":C[0]+M[0],"color[1]Label":C[1]+M[1],"color[2]Label":C[2]+M[2],"color[3]Label":C[3]+M[3]}})]}}}}),fN=Ft((Q,$)=>{$.exports=function(c,g){return"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c.color=g.color,c.colormodel=g.trace.colormodel,c.z||(c.z=g.color),c}}),dN=Ft((Q,$)=>{$.exports={attributes:y7(),supplyDefaults:YR(),calc:lN(),plot:uN(),style:cN(),hoverPoints:hN(),eventData:fN(),moduleType:"trace",name:"image",basePlotModule:Ef(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}),pN=Ft((Q,$)=>{$.exports=dN()}),sx=Ft((Q,$)=>{var c=Yo(),g=jh().attributes,P=ka(),S=yi(),{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=ya().extendFlat,n=Ed().pattern,o=P({editType:"plot",arrayOk:!0,colorEditType:"plot"});$.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:n,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:a({},c.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:t({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:r(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:r({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:a({},o,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:a({},o,{}),outsidetextfont:a({},o,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:a({},o,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:g({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}),lx=Ft((Q,$)=>{var c=ia(),g=_n(),P=sx(),S=jh().defaults,t=em().handleText,e=_n().coercePattern;function r(o,i){var s=g.isArrayOrTypedArray(o),f=g.isArrayOrTypedArray(i),x=Math.min(s?o.length:1/0,f?i.length:1/0);if(isFinite(x)||(x=0),x&&f){for(var y,v=0;v0){y=!0;break}}y||(x=0)}return{hasLabels:s,hasValues:f,len:x}}function a(o,i,s,f,x){var y=f("marker.line.width");y&&f("marker.line.color",x?void 0:s.paper_bgcolor);var v=f("marker.colors");e(f,"marker.pattern",v),o.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=o.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=s.paper_bgcolor)}function n(o,i,s,f){function x(w,R){return g.coerce(o,i,P,w,R)}var y=x("labels"),v=x("values"),T=r(y,v),u=T.len;if(i._hasLabels=T.hasLabels,i._hasValues=T.hasValues,!i._hasLabels&&i._hasValues&&(x("label0"),x("dlabel")),!u){i.visible=!1;return}i._length=u,a(o,i,f,x,!0),x("scalegroup");var b=x("text"),_=x("texttemplate");x("texttemplatefallback");var C;if(_||(C=x("textinfo",g.isArrayOrTypedArray(b)?"text+percent":"percent")),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),_||C&&C!=="none"){var M=x("textposition");t(o,i,f,x,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var E=Array.isArray(M)||M==="auto",A=E||M==="outside";A&&x("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&x("insidetextorientation")}else C==="none"&&x("textposition","none");S(i,f,x);var h=x("hole"),p=x("title.text");if(p){var k=x("title.position",h?"middle center":"top center");!h&&k==="middle center"&&(i.title.position="top center"),g.coerceFont(x,"title.font",f.font)}x("sort"),x("direction"),x("rotation"),x("pull")}$.exports={handleLabelsAndValues:r,handleMarkerDefaults:a,supplyDefaults:n}}),lk=Ft((Q,$)=>{$.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),mN=Ft((Q,$)=>{var c=_n(),g=lk();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("hiddenlabels"),t("piecolorway",S.colorway),t("extendpiecolors")}}),cb=Ft((Q,$)=>{var c=ia(),g=eo(),P=ui(),S={};function t(n,o){var i=[],s=n._fullLayout,f=s.hiddenlabels||[],x=o.labels,y=o.marker.colors||[],v=o.values,T=o._length,u=o._hasValues&&T,b,_;if(o.dlabel)for(x=new Array(T),b=0;b=0});var R=o.type==="funnelarea"?A:o.sort;return R&&i.sort(function(O,N){return N.v-O.v}),i[0]&&(i[0].vTotal=E),i}function e(n){return function(o,i){return!o||(o=g(o),!o.isValid())?!1:(o=P.addOpacity(o,o.getAlpha()),n[i]||(n[i]=o),o)}}function r(n,o){var i=(o||{}).type;i||(i="pie");var s=n._fullLayout,f=n.calcdata,x=s[i+"colorway"],y=s["_"+i+"colormap"];s["extend"+i+"colors"]&&(x=a(x,S));for(var v=0,T=0;T{var c=Np().appendArrayMultiPointValues;$.exports=function(g,P){var S={curveNumber:P.index,pointNumbers:g.pts,data:P._input,fullData:P,label:g.label,color:g.color,value:g.v,percent:g.percent,text:g.text,bbox:g.bbox,v:g.v};return g.pts.length===1&&(S.pointNumber=S.i=g.pts[0]),c(S,P,g.pts),P.type==="funnelarea"&&(delete S.v,delete S.i),S}}),uk=Ft((Q,$)=>{var c=En(),g=Kc(),P=Qh(),S=ui(),t=Vs(),e=_n(),r=e.strScale,a=e.strTranslate,n=tc(),o=Up(),i=o.recordMinTextSize,s=o.clearMinTextSize,f=ex().TEXTPAD,x=wg(),y=gN(),v=_n().isValidTextValue;function T(dt,rt){var at=dt._context.staticPlot,vt=dt._fullLayout,it=vt._size;s("pie",vt),M(rt,dt),X(rt,it);var Y=e.makeTraceGroups(vt._pielayer,rt,"trace").each(function(ft){var ut=c.select(this),wt=ft[0],zt=wt.trace;yt(ft),ut.attr("stroke-linejoin","round"),ut.each(function(){var Pt=c.select(this).selectAll("g.slice").data(ft);Pt.enter().append("g").classed("slice",!0),Pt.exit().remove();var Wt=[[[],[]],[[],[]]],Ht=!1;Pt.each(function(Mt,te){if(Mt.hidden){c.select(this).selectAll("path,g").remove();return}Mt.pointNumber=Mt.i,Mt.curveNumber=zt.index,Wt[Mt.pxmid[1]<0?0:1][Mt.pxmid[0]<0?0:1].push(Mt);var ve=wt.cx,oe=wt.cy,Te=c.select(this),He=Te.selectAll("path.surface").data([Mt]);if(He.enter().append("path").classed("surface",!0).style({"pointer-events":at?"none":"all"}),Te.call(b,dt,ft),zt.pull){var Ge=+x.castOption(zt.pull,Mt.pts)||0;Ge>0&&(ve+=Ge*Mt.pxmid[0],oe+=Ge*Mt.pxmid[1])}Mt.cxFinal=ve,Mt.cyFinal=oe;function cr(Ce,Gt,ne,Ct){var gt=Ct*(Gt[0]-Ce[0]),St=Ct*(Gt[1]-Ce[1]);return"a"+Ct*wt.r+","+Ct*wt.r+" 0 "+Mt.largeArc+(ne?" 1 ":" 0 ")+gt+","+St}var ur=zt.hole;if(Mt.v===wt.vTotal){var jr="M"+(ve+Mt.px0[0])+","+(oe+Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!0,1)+cr(Mt.pxmid,Mt.px0,!0,1)+"Z";ur?He.attr("d","M"+(ve+ur*Mt.px0[0])+","+(oe+ur*Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!1,ur)+cr(Mt.pxmid,Mt.px0,!1,ur)+"Z"+jr):He.attr("d",jr)}else{var Hr=cr(Mt.px0,Mt.px1,!0,1);if(ur){var br=1-ur;He.attr("d","M"+(ve+ur*Mt.px1[0])+","+(oe+ur*Mt.px1[1])+cr(Mt.px1,Mt.px0,!1,ur)+"l"+br*Mt.px0[0]+","+br*Mt.px0[1]+Hr+"Z")}else He.attr("d","M"+ve+","+oe+"l"+Mt.px0[0]+","+Mt.px0[1]+Hr+"Z")}st(dt,Mt,wt);var Kr=x.castOption(zt.textposition,Mt.pts),rn=Te.selectAll("g.slicetext").data(Mt.text&&Kr!=="none"?[0]:[]);rn.enter().append("g").classed("slicetext",!0),rn.exit().remove(),rn.each(function(){var Ce=e.ensureSingle(c.select(this),"text","",function(le){le.attr("data-notex",1)}),Gt=e.ensureUniformFontSize(dt,Kr==="outside"?_(zt,Mt,vt.font):C(zt,Mt,vt.font));Ce.text(Mt.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(t.font,Gt).call(n.convertToTspans,dt);var ne=t.bBox(Ce.node()),Ct;if(Kr==="outside")Ct=N(ne,Mt);else if(Ct=E(ne,Mt,wt),Kr==="auto"&&Ct.scale<1){var gt=e.ensureUniformFontSize(dt,zt.outsidetextfont);Ce.call(t.font,gt),ne=t.bBox(Ce.node()),Ct=N(ne,Mt)}var St=Ct.textPosAngle,Nt=St===void 0?Mt.pxmid:pt(wt.r,St);if(Ct.targetX=ve+Nt[0]*Ct.rCenter+(Ct.x||0),Ct.targetY=oe+Nt[1]*Ct.rCenter+(Ct.y||0),tt(Ct,ne),Ct.outside){var re=Ct.targetY;Mt.yLabelMin=re-ne.height/2,Mt.yLabelMid=re,Mt.yLabelMax=re+ne.height/2,Mt.labelExtraX=0,Mt.labelExtraY=0,Ht=!0}Ct.fontSize=Gt.size,i(zt.type,Ct,vt),ft[te].transform=Ct,e.setTransormAndDisplay(Ce,Ct)})});var Jt=c.select(this).selectAll("g.titletext").data(zt.title.text?[0]:[]);if(Jt.enter().append("g").classed("titletext",!0),Jt.exit().remove(),Jt.each(function(){var Mt=e.ensureSingle(c.select(this),"text","",function(oe){oe.attr("data-notex",1)}),te=zt.title.text;zt._meta&&(te=e.templateString(te,zt._meta)),Mt.text(te).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(t.font,zt.title.font).call(n.convertToTspans,dt);var ve;zt.title.position==="middle center"?ve=V(wt):ve=H(wt,it),Mt.attr("transform",a(ve.x,ve.y)+r(Math.min(1,ve.scale))+a(ve.tx,ve.ty))}),Ht&&q(Wt,zt),u(Pt,zt),Ht&&zt.automargin){var ge=t.bBox(ut.node()),he=zt.domain,de=it.w*(he.x[1]-he.x[0]),se=it.h*(he.y[1]-he.y[0]),Tt=(.5*de-wt.r)/it.w,Lt=(.5*se-wt.r)/it.h;g.autoMargin(dt,"pie."+zt.uid+".automargin",{xl:he.x[0]-Tt,xr:he.x[1]+Tt,yb:he.y[0]-Lt,yt:he.y[1]+Lt,l:Math.max(wt.cx-wt.r-ge.left,0),r:Math.max(ge.right-(wt.cx+wt.r),0),b:Math.max(ge.bottom-(wt.cy+wt.r),0),t:Math.max(wt.cy-wt.r-ge.top,0),pad:5})}})});setTimeout(function(){Y.selectAll("tspan").each(function(){var ft=c.select(this);ft.attr("dy")&&ft.attr("dy",ft.attr("dy"))})},0)}function u(dt,rt){dt.each(function(at){var vt=c.select(this);if(!at.labelExtraX&&!at.labelExtraY){vt.select("path.textline").remove();return}var it=vt.select("g.slicetext text");at.transform.targetX+=at.labelExtraX,at.transform.targetY+=at.labelExtraY,e.setTransormAndDisplay(it,at.transform);var Y=at.cxFinal+at.pxmid[0],ft=at.cyFinal+at.pxmid[1],ut="M"+Y+","+ft,wt=(at.yLabelMax-at.yLabelMin)*(at.pxmid[0]<0?-1:1)/4;if(at.labelExtraX){var zt=at.labelExtraX*at.pxmid[1]/at.pxmid[0],Pt=at.yLabelMid+at.labelExtraY-(at.cyFinal+at.pxmid[1]);Math.abs(zt)>Math.abs(Pt)?ut+="l"+Pt*at.pxmid[0]/at.pxmid[1]+","+Pt+"H"+(Y+at.labelExtraX+wt):ut+="l"+at.labelExtraX+","+zt+"v"+(Pt-zt)+"h"+wt}else ut+="V"+(at.yLabelMid+at.labelExtraY)+"h"+wt;e.ensureSingle(vt,"path","textline").call(S.stroke,rt.outsidetextfont.color).attr({"stroke-width":Math.min(2,rt.outsidetextfont.size/8),d:ut,fill:"none"})})}function b(dt,rt,at){var vt=at[0],it=vt.cx,Y=vt.cy,ft=vt.trace,ut=ft.type==="funnelarea";"_hasHoverLabel"in ft||(ft._hasHoverLabel=!1),"_hasHoverEvent"in ft||(ft._hasHoverEvent=!1),dt.on("mouseover",function(wt){var zt=rt._fullLayout,Pt=rt._fullData[ft.index];if(!(rt._dragging||zt.hovermode===!1)){var Wt=Pt.hoverinfo;if(Array.isArray(Wt)&&(Wt=P.castHoverinfo({hoverinfo:[x.castOption(Wt,wt.pts)],_module:ft._module},zt,0)),Wt==="all"&&(Wt="label+text+value+percent+name"),Pt.hovertemplate||Wt!=="none"&&Wt!=="skip"&&Wt){var Ht=wt.rInscribed||0,Jt=it+wt.pxmid[0]*(1-Ht),ge=Y+wt.pxmid[1]*(1-Ht),he=zt.separators,de=[];if(Wt&&Wt.indexOf("label")!==-1&&de.push(wt.label),wt.text=x.castOption(Pt.hovertext||Pt.text,wt.pts),Wt&&Wt.indexOf("text")!==-1){var se=wt.text;e.isValidTextValue(se)&&de.push(se)}wt.value=wt.v,wt.valueLabel=x.formatPieValue(wt.v,he),Wt&&Wt.indexOf("value")!==-1&&de.push(wt.valueLabel),wt.percent=wt.v/vt.vTotal,wt.percentLabel=x.formatPiePercent(wt.percent,he),Wt&&Wt.indexOf("percent")!==-1&&de.push(wt.percentLabel);var Tt=Pt.hoverlabel,Lt=Tt.font,Mt=[];P.loneHover({trace:ft,x0:Jt-Ht*vt.r,x1:Jt+Ht*vt.r,y:ge,_x0:ut?it+wt.TL[0]:Jt-Ht*vt.r,_x1:ut?it+wt.TR[0]:Jt+Ht*vt.r,_y0:ut?Y+wt.TL[1]:ge-Ht*vt.r,_y1:ut?Y+wt.BL[1]:ge+Ht*vt.r,text:de.join("
"),name:Pt.hovertemplate||Wt.indexOf("name")!==-1?Pt.name:void 0,idealAlign:wt.pxmid[0]<0?"left":"right",color:x.castOption(Tt.bgcolor,wt.pts)||wt.color,borderColor:x.castOption(Tt.bordercolor,wt.pts),fontFamily:x.castOption(Lt.family,wt.pts),fontSize:x.castOption(Lt.size,wt.pts),fontColor:x.castOption(Lt.color,wt.pts),nameLength:x.castOption(Tt.namelength,wt.pts),textAlign:x.castOption(Tt.align,wt.pts),hovertemplate:x.castOption(Pt.hovertemplate,wt.pts),hovertemplateLabels:wt,eventData:[y(wt,Pt)]},{container:zt._hoverlayer.node(),outerContainer:zt._paper.node(),gd:rt,inOut_bbox:Mt}),wt.bbox=Mt[0],ft._hasHoverLabel=!0}ft._hasHoverEvent=!0,rt.emit("plotly_hover",{points:[y(wt,Pt)],event:c.event})}}),dt.on("mouseout",function(wt){var zt=rt._fullLayout,Pt=rt._fullData[ft.index],Wt=c.select(this).datum();ft._hasHoverEvent&&(wt.originalEvent=c.event,rt.emit("plotly_unhover",{points:[y(Wt,Pt)],event:c.event}),ft._hasHoverEvent=!1),ft._hasHoverLabel&&(P.loneUnhover(zt._hoverlayer.node()),ft._hasHoverLabel=!1)}),dt.on("click",function(wt){var zt=rt._fullLayout,Pt=rt._fullData[ft.index];rt._dragging||zt.hovermode===!1||(rt._hoverdata=[y(wt,Pt)],P.click(rt,c.event))})}function _(dt,rt,at){var vt=x.castOption(dt.outsidetextfont.color,rt.pts)||x.castOption(dt.textfont.color,rt.pts)||at.color,it=x.castOption(dt.outsidetextfont.family,rt.pts)||x.castOption(dt.textfont.family,rt.pts)||at.family,Y=x.castOption(dt.outsidetextfont.size,rt.pts)||x.castOption(dt.textfont.size,rt.pts)||at.size,ft=x.castOption(dt.outsidetextfont.weight,rt.pts)||x.castOption(dt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(dt.outsidetextfont.style,rt.pts)||x.castOption(dt.textfont.style,rt.pts)||at.style,wt=x.castOption(dt.outsidetextfont.variant,rt.pts)||x.castOption(dt.textfont.variant,rt.pts)||at.variant,zt=x.castOption(dt.outsidetextfont.textcase,rt.pts)||x.castOption(dt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(dt.outsidetextfont.lineposition,rt.pts)||x.castOption(dt.textfont.lineposition,rt.pts)||at.lineposition,Wt=x.castOption(dt.outsidetextfont.shadow,rt.pts)||x.castOption(dt.textfont.shadow,rt.pts)||at.shadow;return{color:vt,family:it,size:Y,weight:ft,style:ut,variant:wt,textcase:zt,lineposition:Pt,shadow:Wt}}function C(dt,rt,at){var vt=x.castOption(dt.insidetextfont.color,rt.pts);!vt&&dt._input.textfont&&(vt=x.castOption(dt._input.textfont.color,rt.pts));var it=x.castOption(dt.insidetextfont.family,rt.pts)||x.castOption(dt.textfont.family,rt.pts)||at.family,Y=x.castOption(dt.insidetextfont.size,rt.pts)||x.castOption(dt.textfont.size,rt.pts)||at.size,ft=x.castOption(dt.insidetextfont.weight,rt.pts)||x.castOption(dt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(dt.insidetextfont.style,rt.pts)||x.castOption(dt.textfont.style,rt.pts)||at.style,wt=x.castOption(dt.insidetextfont.variant,rt.pts)||x.castOption(dt.textfont.variant,rt.pts)||at.variant,zt=x.castOption(dt.insidetextfont.textcase,rt.pts)||x.castOption(dt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(dt.insidetextfont.lineposition,rt.pts)||x.castOption(dt.textfont.lineposition,rt.pts)||at.lineposition,Wt=x.castOption(dt.insidetextfont.shadow,rt.pts)||x.castOption(dt.textfont.shadow,rt.pts)||at.shadow;return{color:vt||S.contrast(rt.color),family:it,size:Y,weight:ft,style:ut,variant:wt,textcase:zt,lineposition:Pt,shadow:Wt}}function M(dt,rt){for(var at,vt,it=0;it=-4;Tt-=2)se(Math.PI*Tt,"tan");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1),"tan")}if(Wt||Jt){for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1.5),"rad");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+.5),"rad")}}if(ut||ge||Wt){var Lt=Math.sqrt(dt.width*dt.width+dt.height*dt.height);if(de={scale:it*vt*2/Lt,rCenter:1-it,rotate:0},de.textPosAngle=(rt.startangle+rt.stopangle)/2,de.scale>=1)return de;he.push(de)}(ge||Jt)&&(de=h(dt,vt,ft,wt,zt),de.textPosAngle=(rt.startangle+rt.stopangle)/2,he.push(de)),(ge||Ht)&&(de=p(dt,vt,ft,wt,zt),de.textPosAngle=(rt.startangle+rt.stopangle)/2,he.push(de));for(var Mt=0,te=0,ve=0;ve=1)break}return he[Mt]}function A(dt,rt){var at=dt.startangle,vt=dt.stopangle;return at>rt&&rt>vt||at0?1:-1)/2,y:Y/(1+at*at/(vt*vt)),outside:!0}}function V(dt){var rt=Math.sqrt(dt.titleBox.width*dt.titleBox.width+dt.titleBox.height*dt.titleBox.height);return{x:dt.cx,y:dt.cy,scale:dt.trace.hole*dt.r*2/rt,tx:0,ty:-dt.titleBox.height/2+dt.trace.title.font.size}}function H(dt,rt){var at=1,vt=1,it,Y=dt.trace,ft={x:dt.cx,y:dt.cy},ut={tx:0,ty:0};ut.ty+=Y.title.font.size,it=W(Y),Y.title.position.indexOf("top")!==-1?(ft.y-=(1+it)*dt.r,ut.ty-=dt.titleBox.height):Y.title.position.indexOf("bottom")!==-1&&(ft.y+=(1+it)*dt.r);var wt=F(dt.r,dt.trace.aspectratio),zt=rt.w*(Y.domain.x[1]-Y.domain.x[0])/2;return Y.title.position.indexOf("left")!==-1?(zt=zt+wt,ft.x-=(1+it)*wt,ut.tx+=dt.titleBox.width/2):Y.title.position.indexOf("center")!==-1?zt*=2:Y.title.position.indexOf("right")!==-1&&(zt=zt+wt,ft.x+=(1+it)*wt,ut.tx-=dt.titleBox.width/2),at=zt/dt.titleBox.width,vt=U(dt,rt)/dt.titleBox.height,{x:ft.x,y:ft.y,scale:Math.min(at,vt),tx:ut.tx,ty:ut.ty}}function F(dt,rt){return dt/(rt===void 0?1:rt)}function U(dt,rt){var at=dt.trace,vt=rt.h*(at.domain.y[1]-at.domain.y[0]);return Math.min(dt.titleBox.height,vt/2)}function W(dt){var rt=dt.pull;if(!rt)return 0;var at;if(e.isArrayOrTypedArray(rt))for(rt=0,at=0;atrt&&(rt=dt.pull[at]);return rt}function q(dt,rt){var at,vt,it,Y,ft,ut,wt,zt,Pt,Wt,Ht,Jt,ge;function he(Lt,Mt){return Lt.pxmid[1]-Mt.pxmid[1]}function de(Lt,Mt){return Mt.pxmid[1]-Lt.pxmid[1]}function se(Lt,Mt){Mt||(Mt={});var te=Mt.labelExtraY+(vt?Mt.yLabelMax:Mt.yLabelMin),ve=vt?Lt.yLabelMin:Lt.yLabelMax,oe=vt?Lt.yLabelMax:Lt.yLabelMin,Te=Lt.cyFinal+ft(Lt.px0[1],Lt.px1[1]),He=te-ve,Ge,cr,ur,jr,Hr,br;if(He*wt>0&&(Lt.labelExtraY=He),!!e.isArrayOrTypedArray(rt.pull))for(cr=0;cr=(x.castOption(rt.pull,ur.pts)||0))&&((Lt.pxmid[1]-ur.pxmid[1])*wt>0?(jr=ur.cyFinal+ft(ur.px0[1],ur.px1[1]),He=jr-ve-Lt.labelExtraY,He*wt>0&&(Lt.labelExtraY+=He)):(oe+Lt.labelExtraY-Te)*wt>0&&(Ge=3*ut*Math.abs(cr-Wt.indexOf(Lt)),Hr=ur.cxFinal+Y(ur.px0[0],ur.px1[0]),br=Hr+Ge-(Lt.cxFinal+Lt.pxmid[0])-Lt.labelExtraX,br*ut>0&&(Lt.labelExtraX+=br)))}for(vt=0;vt<2;vt++)for(it=vt?he:de,ft=vt?Math.max:Math.min,wt=vt?1:-1,at=0;at<2;at++){for(Y=at?Math.max:Math.min,ut=at?1:-1,zt=dt[vt][at],zt.sort(it),Pt=dt[1-vt][at],Wt=Pt.concat(zt),Jt=[],Ht=0;Ht1?(zt=at.r,Pt=zt/it.aspectratio):(Pt=at.r,zt=Pt*it.aspectratio),zt*=(1+it.baseratio)/2,wt=zt*Pt}ft=Math.min(ft,wt/at.vTotal)}for(vt=0;vtrt.vTotal/2?1:0,zt.halfangle=Math.PI*Math.min(zt.v/rt.vTotal,.5),zt.ring=1-vt.hole,zt.rInscribed=O(zt,rt))}function pt(dt,rt){return[dt*Math.sin(rt),-dt*Math.cos(rt)]}function st(dt,rt,at){var vt=dt._fullLayout,it=at.trace,Y=it.texttemplate,ft=it.textinfo;if(!Y&&ft&&ft!=="none"){var ut=ft.split("+"),wt=function(Mt){return ut.indexOf(Mt)!==-1},zt=wt("label"),Pt=wt("text"),Wt=wt("value"),Ht=wt("percent"),Jt=vt.separators,ge;if(ge=zt?[rt.label]:[],Pt){var he=x.getFirstFilled(it.text,rt.pts);v(he)&&ge.push(he)}Wt&&ge.push(x.formatPieValue(rt.v,Jt)),Ht&&ge.push(x.formatPiePercent(rt.v/at.vTotal,Jt)),rt.text=ge.join("
")}function de(Mt){return{label:Mt.label,value:Mt.v,valueLabel:x.formatPieValue(Mt.v,vt.separators),percent:Mt.v/at.vTotal,percentLabel:x.formatPiePercent(Mt.v/at.vTotal,vt.separators),color:Mt.color,text:Mt.text,customdata:e.castOption(it,Mt.i,"customdata")}}if(Y){var se=e.castOption(it,rt.i,"texttemplate");if(!se)rt.text="";else{var Tt=de(rt),Lt=x.getFirstFilled(it.text,rt.pts);(v(Lt)||Lt==="")&&(Tt.text=Lt),rt.text=e.texttemplateString({data:[Tt,it._meta],fallback:it.texttemplatefallback,labels:Tt,locale:dt._fullLayout._d3locale,template:se})}}}function tt(dt,rt){var at=dt.rotate*Math.PI/180,vt=Math.cos(at),it=Math.sin(at),Y=(rt.left+rt.right)/2,ft=(rt.top+rt.bottom)/2;dt.textX=Y*vt-ft*it,dt.textY=Y*it+ft*vt,dt.noCenter=!0}$.exports={plot:T,formatSliceLabel:st,transformInsideText:E,determineInsideTextFont:C,positionTitleOutside:H,prerenderTitles:M,layoutAreas:X,attachFxHandlers:b,computeTransform:tt}}),vN=Ft((Q,$)=>{var c=En(),g=kg(),P=Up().resizeText;$.exports=function(S){var t=S._fullLayout._pielayer.selectAll(".trace");P(S,t,"pie"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),yN=Ft(Q=>{var $=Kc();Q.name="pie",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),xN=Ft((Q,$)=>{$.exports={attributes:sx(),supplyDefaults:lx().supplyDefaults,supplyLayoutDefaults:mN(),layoutAttributes:lk(),calc:cb().calc,crossTraceCalc:cb().crossTraceCalc,plot:uk().plot,style:vN(),styleOne:kg(),moduleType:"trace",name:"pie",basePlotModule:yN(),categories:["pie-like","pie","showLegend"],meta:{}}}),_N=Ft((Q,$)=>{$.exports=xN()}),bN=Ft(Q=>{var $=Kc();Q.name="sunburst",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),H7=Ft((Q,$)=>{$.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}),Jw=Ft((Q,$)=>{var c=Yo(),{hovertemplateAttrs:g,texttemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=Ac(),e=jh().attributes,r=sx(),a=H7(),n=ya().extendFlat,o=Ed().pattern;$.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:n({colors:{valType:"data_array",editType:"calc"},line:{color:n({},r.marker.line.color,{dflt:null}),width:n({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:o,editType:"calc"},t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:r.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:P({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:r.hovertext,hoverinfo:n({},c.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:g({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:r.textfont,insidetextorientation:r.insidetextorientation,insidetextfont:r.insidetextfont,outsidetextfont:n({},r.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:r.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}),W7=Ft((Q,$)=>{$.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),wN=Ft((Q,$)=>{var c=_n(),g=Jw(),P=jh().defaults,S=em().handleText,t=lx().handleMarkerDefaults,e=Xc(),r=e.hasColorscale,a=e.handleDefaults;$.exports=function(n,o,i,s){function f(_,C){return c.coerce(n,o,g,_,C)}var x=f("labels"),y=f("parents");if(!x||!x.length||!y||!y.length){o.visible=!1;return}var v=f("values");v&&v.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),t(n,o,s,f);var T=o._hasColorscale=r(n,"marker","colors")||(n.marker||{}).coloraxis;T&&a(n,o,s,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",T?1:.7);var u=f("text");f("texttemplate"),f("texttemplatefallback"),o.texttemplate||f("textinfo",c.isArrayOrTypedArray(u)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var b="auto";S(n,o,s,f,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("insidetextorientation"),f("sort"),f("rotation"),f("root.color"),P(o,s,f),o._length=null}}),kN=Ft((Q,$)=>{var c=_n(),g=W7();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("sunburstcolorway",S.colorway),t("extendsunburstcolors")}}),Qw=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(Ct,gt){return Ct.parent===gt.parent?1:2}function P(Ct){return Ct.reduce(S,0)/Ct.length}function S(Ct,gt){return Ct+gt.x}function t(Ct){return 1+Ct.reduce(e,0)}function e(Ct,gt){return Math.max(Ct,gt.y)}function r(Ct){for(var gt;gt=Ct.children;)Ct=gt[0];return Ct}function a(Ct){for(var gt;gt=Ct.children;)Ct=gt[gt.length-1];return Ct}function n(){var Ct=g,gt=1,St=1,Nt=!1;function re(le){var we,Ue=0;le.eachAfter(function(pr){var Jr=pr.children;Jr?(pr.x=P(Jr),pr.y=t(Jr)):(pr.x=we?Ue+=Ct(pr,we):0,pr.y=0,we=pr)});var qe=r(le),or=a(le),Ar=qe.x-Ct(qe,or)/2,Tr=or.x+Ct(or,qe)/2;return le.eachAfter(Nt?function(pr){pr.x=(pr.x-le.x)*gt,pr.y=(le.y-pr.y)*St}:function(pr){pr.x=(pr.x-Ar)/(Tr-Ar)*gt,pr.y=(1-(le.y?pr.y/le.y:1))*St})}return re.separation=function(le){return arguments.length?(Ct=le,re):Ct},re.size=function(le){return arguments.length?(Nt=!1,gt=+le[0],St=+le[1],re):Nt?null:[gt,St]},re.nodeSize=function(le){return arguments.length?(Nt=!0,gt=+le[0],St=+le[1],re):Nt?[gt,St]:null},re}function o(Ct){var gt=0,St=Ct.children,Nt=St&&St.length;if(!Nt)gt=1;else for(;--Nt>=0;)gt+=St[Nt].value;Ct.value=gt}function i(){return this.eachAfter(o)}function s(Ct){var gt=this,St,Nt=[gt],re,le,we;do for(St=Nt.reverse(),Nt=[];gt=St.pop();)if(Ct(gt),re=gt.children,re)for(le=0,we=re.length;le=0;--re)St.push(Nt[re]);return this}function x(Ct){for(var gt=this,St=[gt],Nt=[],re,le,we;gt=St.pop();)if(Nt.push(gt),re=gt.children,re)for(le=0,we=re.length;le=0;)St+=Nt[re].value;gt.value=St})}function v(Ct){return this.eachBefore(function(gt){gt.children&>.children.sort(Ct)})}function T(Ct){for(var gt=this,St=u(gt,Ct),Nt=[gt];gt!==St;)gt=gt.parent,Nt.push(gt);for(var re=Nt.length;Ct!==St;)Nt.splice(re,0,Ct),Ct=Ct.parent;return Nt}function u(Ct,gt){if(Ct===gt)return Ct;var St=Ct.ancestors(),Nt=gt.ancestors(),re=null;for(Ct=St.pop(),gt=Nt.pop();Ct===gt;)re=Ct,Ct=St.pop(),gt=Nt.pop();return re}function b(){for(var Ct=this,gt=[Ct];Ct=Ct.parent;)gt.push(Ct);return gt}function _(){var Ct=[];return this.each(function(gt){Ct.push(gt)}),Ct}function C(){var Ct=[];return this.eachBefore(function(gt){gt.children||Ct.push(gt)}),Ct}function M(){var Ct=this,gt=[];return Ct.each(function(St){St!==Ct&>.push({source:St.parent,target:St})}),gt}function E(Ct,gt){var St=new w(Ct),Nt=+Ct.value&&(St.value=Ct.value),re,le=[St],we,Ue,qe,or;for(gt==null&&(gt=h);re=le.pop();)if(Nt&&(re.value=+re.data.value),(Ue=gt(re.data))&&(or=Ue.length))for(re.children=new Array(or),qe=or-1;qe>=0;--qe)le.push(we=re.children[qe]=new w(Ue[qe])),we.parent=re,we.depth=re.depth+1;return St.eachBefore(k)}function A(){return E(this).eachBefore(p)}function h(Ct){return Ct.children}function p(Ct){Ct.data=Ct.data.data}function k(Ct){var gt=0;do Ct.height=gt;while((Ct=Ct.parent)&&Ct.height<++gt)}function w(Ct){this.data=Ct,this.depth=this.height=0,this.parent=null}w.prototype=E.prototype={constructor:w,count:i,each:s,eachAfter:x,eachBefore:f,sum:y,sort:v,path:T,ancestors:b,descendants:_,leaves:C,links:M,copy:A};var R=Array.prototype.slice;function O(Ct){for(var gt=Ct.length,St,Nt;gt;)Nt=Math.random()*gt--|0,St=Ct[gt],Ct[gt]=Ct[Nt],Ct[Nt]=St;return Ct}function N(Ct){for(var gt=0,St=(Ct=O(R.call(Ct))).length,Nt=[],re,le;gt0&&St*St>Nt*Nt+re*re}function U(Ct,gt){for(var St=0;Stqe?(re=(or+qe-le)/(2*or),Ue=Math.sqrt(Math.max(0,qe/or-re*re)),St.x=Ct.x-re*Nt-Ue*we,St.y=Ct.y-re*we+Ue*Nt):(re=(or+le-qe)/(2*or),Ue=Math.sqrt(Math.max(0,le/or-re*re)),St.x=gt.x+re*Nt-Ue*we,St.y=gt.y+re*we+Ue*Nt)):(St.x=gt.x+St.r,St.y=gt.y)}function pt(Ct,gt){var St=Ct.r+gt.r-1e-6,Nt=gt.x-Ct.x,re=gt.y-Ct.y;return St>0&&St*St>Nt*Nt+re*re}function st(Ct){var gt=Ct._,St=Ct.next._,Nt=gt.r+St.r,re=(gt.x*St.r+St.x*gt.r)/Nt,le=(gt.y*St.r+St.y*gt.r)/Nt;return re*re+le*le}function tt(Ct){this._=Ct,this.next=null,this.previous=null}function dt(Ct){if(!(re=Ct.length))return 0;var gt,St,Nt,re,le,we,Ue,qe,or,Ar,Tr;if(gt=Ct[0],gt.x=0,gt.y=0,!(re>1))return gt.r;if(St=Ct[1],gt.x=-St.r,St.x=gt.r,St.y=0,!(re>2))return gt.r+St.r;yt(St,gt,Nt=Ct[2]),gt=new tt(gt),St=new tt(St),Nt=new tt(Nt),gt.next=Nt.previous=St,St.next=gt.previous=Nt,Nt.next=St.previous=gt;t:for(Ue=3;Ue0)throw new Error("cycle");return Ue}return St.id=function(Nt){return arguments.length?(Ct=vt(Nt),St):Ct},St.parentId=function(Nt){return arguments.length?(gt=vt(Nt),St):gt},St}function Mt(Ct,gt){return Ct.parent===gt.parent?1:2}function te(Ct){var gt=Ct.children;return gt?gt[0]:Ct.t}function ve(Ct){var gt=Ct.children;return gt?gt[gt.length-1]:Ct.t}function oe(Ct,gt,St){var Nt=St/(gt.i-Ct.i);gt.c-=Nt,gt.s+=St,Ct.c+=Nt,gt.z+=St,gt.m+=St}function Te(Ct){for(var gt=0,St=0,Nt=Ct.children,re=Nt.length,le;--re>=0;)le=Nt[re],le.z+=gt,le.m+=gt,gt+=le.s+(St+=le.c)}function He(Ct,gt,St){return Ct.a.parent===gt.parent?Ct.a:St}function Ge(Ct,gt){this._=Ct,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=gt}Ge.prototype=Object.create(w.prototype);function cr(Ct){for(var gt=new Ge(Ct,0),St,Nt=[gt],re,le,we,Ue;St=Nt.pop();)if(le=St._.children)for(St.children=new Array(Ue=le.length),we=Ue-1;we>=0;--we)Nt.push(re=St.children[we]=new Ge(le[we],we)),re.parent=St;return(gt.parent=new Ge(null,0)).children=[gt],gt}function ur(){var Ct=Mt,gt=1,St=1,Nt=null;function re(or){var Ar=cr(or);if(Ar.eachAfter(le),Ar.parent.m=-Ar.z,Ar.eachBefore(we),Nt)or.eachBefore(qe);else{var Tr=or,pr=or,Jr=or;or.eachBefore(function(ii){ii.xpr.x&&(pr=ii),ii.depth>Jr.depth&&(Jr=ii)});var Vn=Tr===pr?1:Ct(Tr,pr)/2,Hn=Vn-Tr.x,Kn=gt/(pr.x+Vn+Hn),Ci=St/(Jr.depth||1);or.eachBefore(function(ii){ii.x=(ii.x+Hn)*Kn,ii.y=ii.depth*Ci})}return or}function le(or){var Ar=or.children,Tr=or.parent.children,pr=or.i?Tr[or.i-1]:null;if(Ar){Te(or);var Jr=(Ar[0].z+Ar[Ar.length-1].z)/2;pr?(or.z=pr.z+Ct(or._,pr._),or.m=or.z-Jr):or.z=Jr}else pr&&(or.z=pr.z+Ct(or._,pr._));or.parent.A=Ue(or,pr,or.parent.A||Tr[0])}function we(or){or._.x=or.z+or.parent.m,or.m+=or.parent.m}function Ue(or,Ar,Tr){if(Ar){for(var pr=or,Jr=or,Vn=Ar,Hn=pr.parent.children[0],Kn=pr.m,Ci=Jr.m,ii=Vn.m,qn=Hn.m,aa;Vn=ve(Vn),pr=te(pr),Vn&≺)Hn=te(Hn),Jr=ve(Jr),Jr.a=or,aa=Vn.z+ii-pr.z-Kn+Ct(Vn._,pr._),aa>0&&(oe(He(Vn,or,Tr),or,aa),Kn+=aa,Ci+=aa),ii+=Vn.m,Kn+=pr.m,qn+=Hn.m,Ci+=Jr.m;Vn&&!ve(Jr)&&(Jr.t=Vn,Jr.m+=ii-Ci),pr&&!te(Hn)&&(Hn.t=pr,Hn.m+=Kn-qn,Tr=or)}return Tr}function qe(or){or.x*=gt,or.y=or.depth*St}return re.separation=function(or){return arguments.length?(Ct=or,re):Ct},re.size=function(or){return arguments.length?(Nt=!1,gt=+or[0],St=+or[1],re):Nt?null:[gt,St]},re.nodeSize=function(or){return arguments.length?(Nt=!0,gt=+or[0],St=+or[1],re):Nt?[gt,St]:null},re}function jr(Ct,gt,St,Nt,re){for(var le=Ct.children,we,Ue=-1,qe=le.length,or=Ct.value&&(re-St)/Ct.value;++Ueii&&(ii=or),We=Kn*Kn*Vi,qn=Math.max(ii/We,We/Ci),qn>aa){Kn-=or;break}aa=qn}we.push(qe={value:Kn,dice:Jr1?Nt:1)},St}(Hr);function rn(){var Ct=Kr,gt=!1,St=1,Nt=1,re=[0],le=it,we=it,Ue=it,qe=it,or=it;function Ar(pr){return pr.x0=pr.y0=0,pr.x1=St,pr.y1=Nt,pr.eachBefore(Tr),re=[0],gt&&pr.eachBefore(Wt),pr}function Tr(pr){var Jr=re[pr.depth],Vn=pr.x0+Jr,Hn=pr.y0+Jr,Kn=pr.x1-Jr,Ci=pr.y1-Jr;Kn=pr-1){var ii=le[Tr];ii.x0=Vn,ii.y0=Hn,ii.x1=Kn,ii.y1=Ci;return}for(var qn=or[Tr],aa=Jr/2+qn,Vi=Tr+1,We=pr-1;Vi>>1;or[rr]Ci-Hn){var Qr=(Vn*_r+Kn*fr)/Jr;Ar(Tr,Vi,fr,Vn,Hn,Qr,Ci),Ar(Vi,pr,_r,Qr,Hn,Kn,Ci)}else{var Cn=(Hn*_r+Ci*fr)/Jr;Ar(Tr,Vi,fr,Vn,Hn,Kn,Cn),Ar(Vi,pr,_r,Vn,Cn,Kn,Ci)}}}function Gt(Ct,gt,St,Nt,re){(Ct.depth&1?jr:Ht)(Ct,gt,St,Nt,re)}var ne=function Ct(gt){function St(Nt,re,le,we,Ue){if((qe=Nt._squarify)&&qe.ratio===gt)for(var qe,or,Ar,Tr,pr=-1,Jr,Vn=qe.length,Hn=Nt.value;++pr1?Nt:1)},St}(Hr);c.cluster=n,c.hierarchy=E,c.pack=ut,c.packEnclose=N,c.packSiblings=rt,c.partition=Jt,c.stratify=Lt,c.tree=ur,c.treemap=rn,c.treemapBinary=Ce,c.treemapDice=Ht,c.treemapResquarify=ne,c.treemapSlice=jr,c.treemapSliceDice=Gt,c.treemapSquarify=Kr,Object.defineProperty(c,"__esModule",{value:!0})})}),t3=Ft(Q=>{var $=Qw(),c=ia(),g=_n(),P=Xc().makeColorScaleFuncFromTrace,S=cb().makePullColorFn,t=cb().generateExtendedColors,e=Xc().calc,r=Ua().ALMOST_EQUAL,a={},n={},o={};Q.calc=function(s,f){var x=s._fullLayout,y=f.ids,v=g.isArrayOrTypedArray(y),T=f.labels,u=f.parents,b=f.values,_=g.isArrayOrTypedArray(b),C=[],M={},E={},A=function(rt,at){M[rt]?M[rt].push(at):M[rt]=[at],E[at]=1},h=function(rt){return rt||typeof rt=="number"},p=function(rt){return!_||c(b[rt])&&b[rt]>=0},k,w,R;v?(k=Math.min(y.length,u.length),w=function(rt){return h(y[rt])&&p(rt)},R=function(rt){return String(y[rt])}):(k=Math.min(T.length,u.length),w=function(rt){return h(T[rt])&&p(rt)},R=function(rt){return String(T[rt])}),_&&(k=Math.min(k,b.length));for(var O=0;O1){for(var F=g.randstr(),U=0;U{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt32BE,S=c("8BPS\0");Z.exports=function(t){if(!(t.length<22)&&g(t,0,S))return{width:I(t,18),height:I(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}),AN=Dt((Q,Z)=>{function c(l){return l===32||l===9||l===13||l===10}function g(l){return typeof l=="number"&&isFinite(l)&&l>0}function I(l){var f=0,x=l.length;for(l[0]===239&&l[1]===187&&l[2]===191&&(f=3);f]*>/,t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,r=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,n=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function o(l){var f=l.match(e),x=l.match(r),y=l.match(a);return{width:f&&(f[1]||f[2]),height:x&&(x[1]||x[2]),viewbox:y&&(y[1]||y[2])}}function i(l){return n.test(l)?l.match(n)[0]:"px"}Z.exports=function(l){if(I(l)){for(var f="",x=0;x{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt16LE,S=ph().readUInt16BE,t=ph().readUInt32LE,e=ph().readUInt32BE,r=c("II*\0"),a=c("MM\0*");function n(l,f,x){return x?S(l,f):I(l,f)}function o(l,f,x){return x?e(l,f):t(l,f)}function i(l,f,x){var y=n(l,f+2,x),v=o(l,f+4,x);return v!==1||y!==3&&y!==4?null:y===3?n(l,f+8,x):o(l,f+8,x)}Z.exports=function(l){if(!(l.length<8)&&!(!g(l,0,r)&&!g(l,0,a))){var f=l[0]===77,x=o(l,4,f)-8;if(!(x<0)){var y=x+8;if(!(l.length-y<2)){var v=n(l,y+0,f)*12;if(!(v<=0)&&(y+=2,!(l.length-y{var c=ph().str2arr,g=ph().sliceEq,I=ph().readUInt16LE,S=ph().readUInt32LE,t=pk(),e=c("RIFF"),r=c("WEBP");function a(i,l){if(!(i[l+3]!==157||i[l+4]!==1||i[l+5]!==42))return{width:I(i,l+6)&16383,height:I(i,l+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function n(i,l){if(i[l]===47){var f=S(i,l+1);return{width:(f&16383)+1,height:(f>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function o(i,l){return{width:(i[l+6]<<16|i[l+5]<<8|i[l+4])+1,height:(i[l+9]<i.length)){for(;l+8=10?f=f||a(i,l+8):v==="VP8L"&&T>=9?f=f||n(i,l+8):v==="VP8X"&&T>=10?f=f||o(i,l+8):v==="EXIF"&&(x=t.get_orientation(i.slice(l+8,l+8+T)),l=1/0),l+=8+T}if(f)return x>0&&(f.orientation=x),f}}}}),EN=Dt((Q,Z)=>{Z.exports={avif:yN(),bmp:xN(),gif:_N(),ico:bN(),jpeg:wN(),png:kN(),psd:TN(),svg:AN(),tiff:MN(),webp:SN()}}),CN=Dt((Q,Z)=>{var c=EN();function g(I){for(var S=Object.keys(c),t=0;t{var Z=CN(),c=o0().IMAGE_URL_PREFIX,g=ix().Buffer;Q.getImageSize=function(I){var S=I.replace(c,""),t=new g(S,"base64");return Z(t)}}),PN=Dt((Q,Z)=>{var c=kn(),g=nb(),I=Yi(),S=Ls(),t=kn().maxRowLength,e=LN().getImageSize;Z.exports=function(o,i){var l,f;if(i._hasZ)l=i.z.length,f=t(i.z);else if(i._hasSource){var x=e(i.source);l=x.height,f=x.width}var y=S.getFromId(o,i.xaxis||"x"),v=S.getFromId(o,i.yaxis||"y"),T=y.d2c(i.x0)-i.dx/2,u=v.d2c(i.y0)-i.dy/2,b,_=[T,T+f*i.dx],P=[u,u+l*i.dy];if(y&&y.type==="log")for(b=0;b{var c=qr(),g=kn(),I=g.strTranslate,S=Dp(),t=nb(),e=i7(),r=Y6().STYLE;Z.exports=function(a,n,o,i){var l=n.xaxis,f=n.yaxis,x=!a._context._exportedPlot&&e();g.makeTraceGroups(i,o,"im").each(function(y){var v=c.select(this),T=y[0],u=T.trace,b=(u.zsmooth==="fast"||u.zsmooth===!1&&x)&&!u._hasZ&&u._hasSource&&l.type==="linear"&&f.type==="linear";u._realImage=b;var _=T.z,P=T.x0,M=T.y0,C=T.w,A=T.h,h=u.dx,p=u.dy,k,w,R,O,j,V;for(V=0;k===void 0&&V0;)w=l.c2p(P+V*h),V--;for(V=0;O===void 0&&V0;)j=f.c2p(M+V*p),V--;if(wst[0];if(tt||dt){var rt=k+F/2,at=O+U/2;yt+="transform:"+I(rt+"px",at+"px")+"scale("+(tt?-1:1)+","+(dt?-1:1)+")"+I(-rt+"px",-at+"px")+";"}}lt.attr("style",yt);var vt=new Promise(function(it){if(u._hasZ)it();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===C&&u._canvas.el.height===A&&u._canvas.source===u.source)it();else{var Y=document.createElement("canvas");Y.width=C,Y.height=A;var ft=Y.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var ut=u._image;ut.onload=function(){ft.drawImage(ut,0,0),u._canvas={el:Y,source:u.source},it()},ut.setAttribute("src",u.source)}}).then(function(){var it,Y;if(u._hasZ)Y=J(function(kt,It){var Pt=_[It][kt];return g.isTypedArray(Pt)&&(Pt=Array.from(Pt)),Pt}),it=Y.toDataURL("image/png");else if(u._hasSource)if(b)it=u.source;else{var ft=u._canvas.el.getContext("2d",{willReadFrequently:!0}),ut=ft.getImageData(0,0,C,A).data;Y=J(function(kt,It){var Pt=4*(It*C+kt);return[ut[Pt],ut[Pt+1],ut[Pt+2],ut[Pt+3]]}),it=Y.toDataURL("image/png")}lt.attr({"xlink:href":it,height:U,width:F,x:k,y:O})});a._promises.push(vt)})}}),zN=Dt((Q,Z)=>{var c=qr();Z.exports=function(g){c.select(g).selectAll(".im image").style("opacity",function(I){return I[0].trace.opacity})}}),ON=Dt((Q,Z)=>{var c=tf(),g=kn(),I=g.isArrayOrTypedArray,S=nb();Z.exports=function(t,e,r){var a=t.cd[0],n=a.trace,o=t.xa,i=t.ya;if(!(c.inbox(e-a.x0,e-(a.x0+a.w*n.dx),0)>0||c.inbox(r-a.y0,r-(a.y0+a.h*n.dy),0)>0)){var l=Math.floor((e-a.x0)/n.dx),f=Math.floor(Math.abs(r-a.y0)/n.dy),x;if(n._hasZ?x=a.z[f][l]:n._hasSource&&(x=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,f,1,1).data),!!x){var y=a.hi||n.hoverinfo,v;if(y){var T=y.split("+");T.indexOf("all")!==-1&&(T=["color"]),T.indexOf("color")!==-1&&(v=!0)}var u=S.colormodel[n.colormodel],b=u.colormodel||n.colormodel,_=b.length,P=n._scaler(x),M=u.suffix,C=[];(n.hovertemplate||v)&&(C.push("["+[P[0]+M[0],P[1]+M[1],P[2]+M[2]].join(", ")),_===4&&C.push(", "+P[3]+M[3]),C.push("]"),C=C.join(""),t.extraText=b.toUpperCase()+": "+C);var A;I(n.hovertext)&&I(n.hovertext[f])?A=n.hovertext[f][l]:I(n.text)&&I(n.text[f])&&(A=n.text[f][l]);var h=i.c2p(a.y0+(f+.5)*n.dy),p=a.x0+(l+.5)*n.dx,k=a.y0+(f+.5)*n.dy,w="["+x.slice(0,n.colormodel.length).join(", ")+"]";return[g.extendFlat(t,{index:[f,l],x0:o.c2p(a.x0+l*n.dx),x1:o.c2p(a.x0+(l+1)*n.dx),y0:h,y1:h,color:P,xVal:p,xLabelVal:p,yVal:k,yLabelVal:k,zLabelVal:w,text:A,hovertemplateLabels:{zLabel:w,colorLabel:C,"color[0]Label":P[0]+M[0],"color[1]Label":P[1]+M[1],"color[2]Label":P[2]+M[2],"color[3]Label":P[3]+M[3]}})]}}}}),DN=Dt((Q,Z)=>{Z.exports=function(c,g){return"xVal"in g&&(c.x=g.xVal),"yVal"in g&&(c.y=g.yVal),g.xa&&(c.xaxis=g.xa),g.ya&&(c.yaxis=g.ya),c.color=g.color,c.colormodel=g.trace.colormodel,c.z||(c.z=g.color),c}}),FN=Dt((Q,Z)=>{Z.exports={attributes:L7(),supplyDefaults:yB(),calc:PN(),plot:IN(),style:zN(),hoverPoints:ON(),eventData:DN(),moduleType:"trace",name:"image",basePlotModule:Mf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}),RN=Dt((Q,Z)=>{Z.exports=FN()}),lx=Dt((Q,Z)=>{var c=Ho(),g=jh().attributes,I=da(),S=wi(),{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=Ia().extendFlat,n=kd().pattern,o=I({editType:"plot",arrayOk:!0,colorEditType:"plot"});Z.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:n,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:a({},c.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:t({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:r(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:r({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:a({},o,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:a({},o,{}),outsidetextfont:a({},o,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:a({},o,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:g({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}),ux=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=lx(),S=jh().defaults,t=J0().handleText,e=kn().coercePattern;function r(o,i){var l=g.isArrayOrTypedArray(o),f=g.isArrayOrTypedArray(i),x=Math.min(l?o.length:1/0,f?i.length:1/0);if(isFinite(x)||(x=0),x&&f){for(var y,v=0;v0){y=!0;break}}y||(x=0)}return{hasLabels:l,hasValues:f,len:x}}function a(o,i,l,f,x){var y=f("marker.line.width");y&&f("marker.line.color",x?void 0:l.paper_bgcolor);var v=f("marker.colors");e(f,"marker.pattern",v),o.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=o.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=l.paper_bgcolor)}function n(o,i,l,f){function x(w,R){return g.coerce(o,i,I,w,R)}var y=x("labels"),v=x("values"),T=r(y,v),u=T.len;if(i._hasLabels=T.hasLabels,i._hasValues=T.hasValues,!i._hasLabels&&i._hasValues&&(x("label0"),x("dlabel")),!u){i.visible=!1;return}i._length=u,a(o,i,f,x,!0),x("scalegroup");var b=x("text"),_=x("texttemplate");x("texttemplatefallback");var P;if(_||(P=x("textinfo",g.isArrayOrTypedArray(b)?"text+percent":"percent")),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),_||P&&P!=="none"){var M=x("textposition");t(o,i,f,x,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var C=Array.isArray(M)||M==="auto",A=C||M==="outside";A&&x("automargin"),(M==="inside"||M==="auto"||Array.isArray(M))&&x("insidetextorientation")}else P==="none"&&x("textposition","none");S(i,f,x);var h=x("hole"),p=x("title.text");if(p){var k=x("title.position",h?"middle center":"top center");!h&&k==="middle center"&&(i.title.position="top center"),g.coerceFont(x,"title.font",f.font)}x("sort"),x("direction"),x("rotation"),x("pull")}Z.exports={handleLabelsAndValues:r,handleMarkerDefaults:a,supplyDefaults:n}}),mk=Dt((Q,Z)=>{Z.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),BN=Dt((Q,Z)=>{var c=kn(),g=mk();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("hiddenlabels"),t("piecolorway",S.colorway),t("extendpiecolors")}}),lb=Dt((Q,Z)=>{var c=Yi(),g=ro(),I=hi(),S={};function t(n,o){var i=[],l=n._fullLayout,f=l.hiddenlabels||[],x=o.labels,y=o.marker.colors||[],v=o.values,T=o._length,u=o._hasValues&&T,b,_;if(o.dlabel)for(x=new Array(T),b=0;b=0});var R=o.type==="funnelarea"?A:o.sort;return R&&i.sort(function(O,j){return j.v-O.v}),i[0]&&(i[0].vTotal=C),i}function e(n){return function(o,i){return!o||(o=g(o),!o.isValid())?!1:(o=I.addOpacity(o,o.getAlpha()),n[i]||(n[i]=o),o)}}function r(n,o){var i=(o||{}).type;i||(i="pie");var l=n._fullLayout,f=n.calcdata,x=l[i+"colorway"],y=l["_"+i+"colormap"];l["extend"+i+"colors"]&&(x=a(x,S));for(var v=0,T=0;T{var c=Fp().appendArrayMultiPointValues;Z.exports=function(g,I){var S={curveNumber:I.index,pointNumbers:g.pts,data:I._input,fullData:I,label:g.label,color:g.color,value:g.v,percent:g.percent,text:g.text,bbox:g.bbox,v:g.v};return g.pts.length===1&&(S.pointNumber=S.i=g.pts[0]),c(S,I,g.pts),I.type==="funnelarea"&&(delete S.v,delete S.i),S}}),gk=Dt((Q,Z)=>{var c=qr(),g=Kc(),I=tf(),S=hi(),t=Vs(),e=kn(),r=e.strScale,a=e.strTranslate,n=ec(),o=Bp(),i=o.recordMinTextSize,l=o.clearMinTextSize,f=rx().TEXTPAD,x=wg(),y=NN(),v=kn().isValidTextValue;function T(dt,rt){var at=dt._context.staticPlot,vt=dt._fullLayout,it=vt._size;l("pie",vt),M(rt,dt),J(rt,it);var Y=e.makeTraceGroups(vt._pielayer,rt,"trace").each(function(ft){var ut=c.select(this),kt=ft[0],It=kt.trace;yt(ft),ut.attr("stroke-linejoin","round"),ut.each(function(){var Pt=c.select(this).selectAll("g.slice").data(ft);Pt.enter().append("g").classed("slice",!0),Pt.exit().remove();var qt=[[[],[]],[[],[]]],Wt=!1;Pt.each(function(Mt,ee){if(Mt.hidden){c.select(this).selectAll("path,g").remove();return}Mt.pointNumber=Mt.i,Mt.curveNumber=It.index,qt[Mt.pxmid[1]<0?0:1][Mt.pxmid[0]<0?0:1].push(Mt);var ve=kt.cx,oe=kt.cy,Te=c.select(this),He=Te.selectAll("path.surface").data([Mt]);if(He.enter().append("path").classed("surface",!0).style({"pointer-events":at?"none":"all"}),Te.call(b,dt,ft),It.pull){var Ge=+x.castOption(It.pull,Mt.pts)||0;Ge>0&&(ve+=Ge*Mt.pxmid[0],oe+=Ge*Mt.pxmid[1])}Mt.cxFinal=ve,Mt.cyFinal=oe;function cr(Le,Gt,ne,Ct){var gt=Ct*(Gt[0]-Le[0]),St=Ct*(Gt[1]-Le[1]);return"a"+Ct*kt.r+","+Ct*kt.r+" 0 "+Mt.largeArc+(ne?" 1 ":" 0 ")+gt+","+St}var ur=It.hole;if(Mt.v===kt.vTotal){var jr="M"+(ve+Mt.px0[0])+","+(oe+Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!0,1)+cr(Mt.pxmid,Mt.px0,!0,1)+"Z";ur?He.attr("d","M"+(ve+ur*Mt.px0[0])+","+(oe+ur*Mt.px0[1])+cr(Mt.px0,Mt.pxmid,!1,ur)+cr(Mt.pxmid,Mt.px0,!1,ur)+"Z"+jr):He.attr("d",jr)}else{var Wr=cr(Mt.px0,Mt.px1,!0,1);if(ur){var br=1-ur;He.attr("d","M"+(ve+ur*Mt.px1[0])+","+(oe+ur*Mt.px1[1])+cr(Mt.px1,Mt.px0,!1,ur)+"l"+br*Mt.px0[0]+","+br*Mt.px0[1]+Wr+"Z")}else He.attr("d","M"+ve+","+oe+"l"+Mt.px0[0]+","+Mt.px0[1]+Wr+"Z")}st(dt,Mt,kt);var Xr=x.castOption(It.textposition,Mt.pts),nn=Te.selectAll("g.slicetext").data(Mt.text&&Xr!=="none"?[0]:[]);nn.enter().append("g").classed("slicetext",!0),nn.exit().remove(),nn.each(function(){var Le=e.ensureSingle(c.select(this),"text","",function(le){le.attr("data-notex",1)}),Gt=e.ensureUniformFontSize(dt,Xr==="outside"?_(It,Mt,vt.font):P(It,Mt,vt.font));Le.text(Mt.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(t.font,Gt).call(n.convertToTspans,dt);var ne=t.bBox(Le.node()),Ct;if(Xr==="outside")Ct=j(ne,Mt);else if(Ct=C(ne,Mt,kt),Xr==="auto"&&Ct.scale<1){var gt=e.ensureUniformFontSize(dt,It.outsidetextfont);Le.call(t.font,gt),ne=t.bBox(Le.node()),Ct=j(ne,Mt)}var St=Ct.textPosAngle,Nt=St===void 0?Mt.pxmid:mt(kt.r,St);if(Ct.targetX=ve+Nt[0]*Ct.rCenter+(Ct.x||0),Ct.targetY=oe+Nt[1]*Ct.rCenter+(Ct.y||0),tt(Ct,ne),Ct.outside){var re=Ct.targetY;Mt.yLabelMin=re-ne.height/2,Mt.yLabelMid=re,Mt.yLabelMax=re+ne.height/2,Mt.labelExtraX=0,Mt.labelExtraY=0,Wt=!0}Ct.fontSize=Gt.size,i(It.type,Ct,vt),ft[ee].transform=Ct,e.setTransormAndDisplay(Le,Ct)})});var Jt=c.select(this).selectAll("g.titletext").data(It.title.text?[0]:[]);if(Jt.enter().append("g").classed("titletext",!0),Jt.exit().remove(),Jt.each(function(){var Mt=e.ensureSingle(c.select(this),"text","",function(oe){oe.attr("data-notex",1)}),ee=It.title.text;It._meta&&(ee=e.templateString(ee,It._meta)),Mt.text(ee).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(t.font,It.title.font).call(n.convertToTspans,dt);var ve;It.title.position==="middle center"?ve=V(kt):ve=H(kt,it),Mt.attr("transform",a(ve.x,ve.y)+r(Math.min(1,ve.scale))+a(ve.tx,ve.ty))}),Wt&&q(qt,It),u(Pt,It),Wt&&It.automargin){var ge=t.bBox(ut.node()),fe=It.domain,pe=it.w*(fe.x[1]-fe.x[0]),se=it.h*(fe.y[1]-fe.y[0]),Tt=(.5*pe-kt.r)/it.w,Lt=(.5*se-kt.r)/it.h;g.autoMargin(dt,"pie."+It.uid+".automargin",{xl:fe.x[0]-Tt,xr:fe.x[1]+Tt,yb:fe.y[0]-Lt,yt:fe.y[1]+Lt,l:Math.max(kt.cx-kt.r-ge.left,0),r:Math.max(ge.right-(kt.cx+kt.r),0),b:Math.max(ge.bottom-(kt.cy+kt.r),0),t:Math.max(kt.cy-kt.r-ge.top,0),pad:5})}})});setTimeout(function(){Y.selectAll("tspan").each(function(){var ft=c.select(this);ft.attr("dy")&&ft.attr("dy",ft.attr("dy"))})},0)}function u(dt,rt){dt.each(function(at){var vt=c.select(this);if(!at.labelExtraX&&!at.labelExtraY){vt.select("path.textline").remove();return}var it=vt.select("g.slicetext text");at.transform.targetX+=at.labelExtraX,at.transform.targetY+=at.labelExtraY,e.setTransormAndDisplay(it,at.transform);var Y=at.cxFinal+at.pxmid[0],ft=at.cyFinal+at.pxmid[1],ut="M"+Y+","+ft,kt=(at.yLabelMax-at.yLabelMin)*(at.pxmid[0]<0?-1:1)/4;if(at.labelExtraX){var It=at.labelExtraX*at.pxmid[1]/at.pxmid[0],Pt=at.yLabelMid+at.labelExtraY-(at.cyFinal+at.pxmid[1]);Math.abs(It)>Math.abs(Pt)?ut+="l"+Pt*at.pxmid[0]/at.pxmid[1]+","+Pt+"H"+(Y+at.labelExtraX+kt):ut+="l"+at.labelExtraX+","+It+"v"+(Pt-It)+"h"+kt}else ut+="V"+(at.yLabelMid+at.labelExtraY)+"h"+kt;e.ensureSingle(vt,"path","textline").call(S.stroke,rt.outsidetextfont.color).attr({"stroke-width":Math.min(2,rt.outsidetextfont.size/8),d:ut,fill:"none"})})}function b(dt,rt,at){var vt=at[0],it=vt.cx,Y=vt.cy,ft=vt.trace,ut=ft.type==="funnelarea";"_hasHoverLabel"in ft||(ft._hasHoverLabel=!1),"_hasHoverEvent"in ft||(ft._hasHoverEvent=!1),dt.on("mouseover",function(kt){var It=rt._fullLayout,Pt=rt._fullData[ft.index];if(!(rt._dragging||It.hovermode===!1)){var qt=Pt.hoverinfo;if(Array.isArray(qt)&&(qt=I.castHoverinfo({hoverinfo:[x.castOption(qt,kt.pts)],_module:ft._module},It,0)),qt==="all"&&(qt="label+text+value+percent+name"),Pt.hovertemplate||qt!=="none"&&qt!=="skip"&&qt){var Wt=kt.rInscribed||0,Jt=it+kt.pxmid[0]*(1-Wt),ge=Y+kt.pxmid[1]*(1-Wt),fe=It.separators,pe=[];if(qt&&qt.indexOf("label")!==-1&&pe.push(kt.label),kt.text=x.castOption(Pt.hovertext||Pt.text,kt.pts),qt&&qt.indexOf("text")!==-1){var se=kt.text;e.isValidTextValue(se)&&pe.push(se)}kt.value=kt.v,kt.valueLabel=x.formatPieValue(kt.v,fe),qt&&qt.indexOf("value")!==-1&&pe.push(kt.valueLabel),kt.percent=kt.v/vt.vTotal,kt.percentLabel=x.formatPiePercent(kt.percent,fe),qt&&qt.indexOf("percent")!==-1&&pe.push(kt.percentLabel);var Tt=Pt.hoverlabel,Lt=Tt.font,Mt=[];I.loneHover({trace:ft,x0:Jt-Wt*vt.r,x1:Jt+Wt*vt.r,y:ge,_x0:ut?it+kt.TL[0]:Jt-Wt*vt.r,_x1:ut?it+kt.TR[0]:Jt+Wt*vt.r,_y0:ut?Y+kt.TL[1]:ge-Wt*vt.r,_y1:ut?Y+kt.BL[1]:ge+Wt*vt.r,text:pe.join("
"),name:Pt.hovertemplate||qt.indexOf("name")!==-1?Pt.name:void 0,idealAlign:kt.pxmid[0]<0?"left":"right",color:x.castOption(Tt.bgcolor,kt.pts)||kt.color,borderColor:x.castOption(Tt.bordercolor,kt.pts),fontFamily:x.castOption(Lt.family,kt.pts),fontSize:x.castOption(Lt.size,kt.pts),fontColor:x.castOption(Lt.color,kt.pts),nameLength:x.castOption(Tt.namelength,kt.pts),textAlign:x.castOption(Tt.align,kt.pts),hovertemplate:x.castOption(Pt.hovertemplate,kt.pts),hovertemplateLabels:kt,eventData:[y(kt,Pt)]},{container:It._hoverlayer.node(),outerContainer:It._paper.node(),gd:rt,inOut_bbox:Mt}),kt.bbox=Mt[0],ft._hasHoverLabel=!0}ft._hasHoverEvent=!0,rt.emit("plotly_hover",{points:[y(kt,Pt)],event:c.event})}}),dt.on("mouseout",function(kt){var It=rt._fullLayout,Pt=rt._fullData[ft.index],qt=c.select(this).datum();ft._hasHoverEvent&&(kt.originalEvent=c.event,rt.emit("plotly_unhover",{points:[y(qt,Pt)],event:c.event}),ft._hasHoverEvent=!1),ft._hasHoverLabel&&(I.loneUnhover(It._hoverlayer.node()),ft._hasHoverLabel=!1)}),dt.on("click",function(kt){var It=rt._fullLayout,Pt=rt._fullData[ft.index];rt._dragging||It.hovermode===!1||(rt._hoverdata=[y(kt,Pt)],I.click(rt,c.event))})}function _(dt,rt,at){var vt=x.castOption(dt.outsidetextfont.color,rt.pts)||x.castOption(dt.textfont.color,rt.pts)||at.color,it=x.castOption(dt.outsidetextfont.family,rt.pts)||x.castOption(dt.textfont.family,rt.pts)||at.family,Y=x.castOption(dt.outsidetextfont.size,rt.pts)||x.castOption(dt.textfont.size,rt.pts)||at.size,ft=x.castOption(dt.outsidetextfont.weight,rt.pts)||x.castOption(dt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(dt.outsidetextfont.style,rt.pts)||x.castOption(dt.textfont.style,rt.pts)||at.style,kt=x.castOption(dt.outsidetextfont.variant,rt.pts)||x.castOption(dt.textfont.variant,rt.pts)||at.variant,It=x.castOption(dt.outsidetextfont.textcase,rt.pts)||x.castOption(dt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(dt.outsidetextfont.lineposition,rt.pts)||x.castOption(dt.textfont.lineposition,rt.pts)||at.lineposition,qt=x.castOption(dt.outsidetextfont.shadow,rt.pts)||x.castOption(dt.textfont.shadow,rt.pts)||at.shadow;return{color:vt,family:it,size:Y,weight:ft,style:ut,variant:kt,textcase:It,lineposition:Pt,shadow:qt}}function P(dt,rt,at){var vt=x.castOption(dt.insidetextfont.color,rt.pts);!vt&&dt._input.textfont&&(vt=x.castOption(dt._input.textfont.color,rt.pts));var it=x.castOption(dt.insidetextfont.family,rt.pts)||x.castOption(dt.textfont.family,rt.pts)||at.family,Y=x.castOption(dt.insidetextfont.size,rt.pts)||x.castOption(dt.textfont.size,rt.pts)||at.size,ft=x.castOption(dt.insidetextfont.weight,rt.pts)||x.castOption(dt.textfont.weight,rt.pts)||at.weight,ut=x.castOption(dt.insidetextfont.style,rt.pts)||x.castOption(dt.textfont.style,rt.pts)||at.style,kt=x.castOption(dt.insidetextfont.variant,rt.pts)||x.castOption(dt.textfont.variant,rt.pts)||at.variant,It=x.castOption(dt.insidetextfont.textcase,rt.pts)||x.castOption(dt.textfont.textcase,rt.pts)||at.textcase,Pt=x.castOption(dt.insidetextfont.lineposition,rt.pts)||x.castOption(dt.textfont.lineposition,rt.pts)||at.lineposition,qt=x.castOption(dt.insidetextfont.shadow,rt.pts)||x.castOption(dt.textfont.shadow,rt.pts)||at.shadow;return{color:vt||S.contrast(rt.color),family:it,size:Y,weight:ft,style:ut,variant:kt,textcase:It,lineposition:Pt,shadow:qt}}function M(dt,rt){for(var at,vt,it=0;it=-4;Tt-=2)se(Math.PI*Tt,"tan");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1),"tan")}if(qt||Jt){for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+1.5),"rad");for(Tt=4;Tt>=-4;Tt-=2)se(Math.PI*(Tt+.5),"rad")}}if(ut||ge||qt){var Lt=Math.sqrt(dt.width*dt.width+dt.height*dt.height);if(pe={scale:it*vt*2/Lt,rCenter:1-it,rotate:0},pe.textPosAngle=(rt.startangle+rt.stopangle)/2,pe.scale>=1)return pe;fe.push(pe)}(ge||Jt)&&(pe=h(dt,vt,ft,kt,It),pe.textPosAngle=(rt.startangle+rt.stopangle)/2,fe.push(pe)),(ge||Wt)&&(pe=p(dt,vt,ft,kt,It),pe.textPosAngle=(rt.startangle+rt.stopangle)/2,fe.push(pe));for(var Mt=0,ee=0,ve=0;ve=1)break}return fe[Mt]}function A(dt,rt){var at=dt.startangle,vt=dt.stopangle;return at>rt&&rt>vt||at0?1:-1)/2,y:Y/(1+at*at/(vt*vt)),outside:!0}}function V(dt){var rt=Math.sqrt(dt.titleBox.width*dt.titleBox.width+dt.titleBox.height*dt.titleBox.height);return{x:dt.cx,y:dt.cy,scale:dt.trace.hole*dt.r*2/rt,tx:0,ty:-dt.titleBox.height/2+dt.trace.title.font.size}}function H(dt,rt){var at=1,vt=1,it,Y=dt.trace,ft={x:dt.cx,y:dt.cy},ut={tx:0,ty:0};ut.ty+=Y.title.font.size,it=W(Y),Y.title.position.indexOf("top")!==-1?(ft.y-=(1+it)*dt.r,ut.ty-=dt.titleBox.height):Y.title.position.indexOf("bottom")!==-1&&(ft.y+=(1+it)*dt.r);var kt=F(dt.r,dt.trace.aspectratio),It=rt.w*(Y.domain.x[1]-Y.domain.x[0])/2;return Y.title.position.indexOf("left")!==-1?(It=It+kt,ft.x-=(1+it)*kt,ut.tx+=dt.titleBox.width/2):Y.title.position.indexOf("center")!==-1?It*=2:Y.title.position.indexOf("right")!==-1&&(It=It+kt,ft.x+=(1+it)*kt,ut.tx-=dt.titleBox.width/2),at=It/dt.titleBox.width,vt=U(dt,rt)/dt.titleBox.height,{x:ft.x,y:ft.y,scale:Math.min(at,vt),tx:ut.tx,ty:ut.ty}}function F(dt,rt){return dt/(rt===void 0?1:rt)}function U(dt,rt){var at=dt.trace,vt=rt.h*(at.domain.y[1]-at.domain.y[0]);return Math.min(dt.titleBox.height,vt/2)}function W(dt){var rt=dt.pull;if(!rt)return 0;var at;if(e.isArrayOrTypedArray(rt))for(rt=0,at=0;atrt&&(rt=dt.pull[at]);return rt}function q(dt,rt){var at,vt,it,Y,ft,ut,kt,It,Pt,qt,Wt,Jt,ge;function fe(Lt,Mt){return Lt.pxmid[1]-Mt.pxmid[1]}function pe(Lt,Mt){return Mt.pxmid[1]-Lt.pxmid[1]}function se(Lt,Mt){Mt||(Mt={});var ee=Mt.labelExtraY+(vt?Mt.yLabelMax:Mt.yLabelMin),ve=vt?Lt.yLabelMin:Lt.yLabelMax,oe=vt?Lt.yLabelMax:Lt.yLabelMin,Te=Lt.cyFinal+ft(Lt.px0[1],Lt.px1[1]),He=ee-ve,Ge,cr,ur,jr,Wr,br;if(He*kt>0&&(Lt.labelExtraY=He),!!e.isArrayOrTypedArray(rt.pull))for(cr=0;cr=(x.castOption(rt.pull,ur.pts)||0))&&((Lt.pxmid[1]-ur.pxmid[1])*kt>0?(jr=ur.cyFinal+ft(ur.px0[1],ur.px1[1]),He=jr-ve-Lt.labelExtraY,He*kt>0&&(Lt.labelExtraY+=He)):(oe+Lt.labelExtraY-Te)*kt>0&&(Ge=3*ut*Math.abs(cr-qt.indexOf(Lt)),Wr=ur.cxFinal+Y(ur.px0[0],ur.px1[0]),br=Wr+Ge-(Lt.cxFinal+Lt.pxmid[0])-Lt.labelExtraX,br*ut>0&&(Lt.labelExtraX+=br)))}for(vt=0;vt<2;vt++)for(it=vt?fe:pe,ft=vt?Math.max:Math.min,kt=vt?1:-1,at=0;at<2;at++){for(Y=at?Math.max:Math.min,ut=at?1:-1,It=dt[vt][at],It.sort(it),Pt=dt[1-vt][at],qt=Pt.concat(It),Jt=[],Wt=0;Wt1?(It=at.r,Pt=It/it.aspectratio):(Pt=at.r,It=Pt*it.aspectratio),It*=(1+it.baseratio)/2,kt=It*Pt}ft=Math.min(ft,kt/at.vTotal)}for(vt=0;vtrt.vTotal/2?1:0,It.halfangle=Math.PI*Math.min(It.v/rt.vTotal,.5),It.ring=1-vt.hole,It.rInscribed=O(It,rt))}function mt(dt,rt){return[dt*Math.sin(rt),-dt*Math.cos(rt)]}function st(dt,rt,at){var vt=dt._fullLayout,it=at.trace,Y=it.texttemplate,ft=it.textinfo;if(!Y&&ft&&ft!=="none"){var ut=ft.split("+"),kt=function(Mt){return ut.indexOf(Mt)!==-1},It=kt("label"),Pt=kt("text"),qt=kt("value"),Wt=kt("percent"),Jt=vt.separators,ge;if(ge=It?[rt.label]:[],Pt){var fe=x.getFirstFilled(it.text,rt.pts);v(fe)&&ge.push(fe)}qt&&ge.push(x.formatPieValue(rt.v,Jt)),Wt&&ge.push(x.formatPiePercent(rt.v/at.vTotal,Jt)),rt.text=ge.join("
")}function pe(Mt){return{label:Mt.label,value:Mt.v,valueLabel:x.formatPieValue(Mt.v,vt.separators),percent:Mt.v/at.vTotal,percentLabel:x.formatPiePercent(Mt.v/at.vTotal,vt.separators),color:Mt.color,text:Mt.text,customdata:e.castOption(it,Mt.i,"customdata")}}if(Y){var se=e.castOption(it,rt.i,"texttemplate");if(!se)rt.text="";else{var Tt=pe(rt),Lt=x.getFirstFilled(it.text,rt.pts);(v(Lt)||Lt==="")&&(Tt.text=Lt),rt.text=e.texttemplateString({data:[Tt,it._meta],fallback:it.texttemplatefallback,labels:Tt,locale:dt._fullLayout._d3locale,template:se})}}}function tt(dt,rt){var at=dt.rotate*Math.PI/180,vt=Math.cos(at),it=Math.sin(at),Y=(rt.left+rt.right)/2,ft=(rt.top+rt.bottom)/2;dt.textX=Y*vt-ft*it,dt.textY=Y*it+ft*vt,dt.noCenter=!0}Z.exports={plot:T,formatSliceLabel:st,transformInsideText:C,determineInsideTextFont:P,positionTitleOutside:H,prerenderTitles:M,layoutAreas:J,attachFxHandlers:b,computeTransform:tt}}),jN=Dt((Q,Z)=>{var c=qr(),g=kg(),I=Bp().resizeText;Z.exports=function(S){var t=S._fullLayout._pielayer.selectAll(".trace");I(S,t,"pie"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),UN=Dt(Q=>{var Z=Kc();Q.name="pie",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),VN=Dt((Q,Z)=>{Z.exports={attributes:lx(),supplyDefaults:ux().supplyDefaults,supplyLayoutDefaults:BN(),layoutAttributes:mk(),calc:lb().calc,crossTraceCalc:lb().crossTraceCalc,plot:gk().plot,style:jN(),styleOne:kg(),moduleType:"trace",name:"pie",basePlotModule:UN(),categories:["pie-like","pie","showLegend"],meta:{}}}),HN=Dt((Q,Z)=>{Z.exports=VN()}),WN=Dt(Q=>{var Z=Kc();Q.name="sunburst",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),e9=Dt((Q,Z)=>{Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}),e3=Dt((Q,Z)=>{var c=Ho(),{hovertemplateAttrs:g,texttemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=kc(),e=jh().attributes,r=lx(),a=e9(),n=Ia().extendFlat,o=kd().pattern;Z.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:n({colors:{valType:"data_array",editType:"calc"},line:{color:n({},r.marker.line.color,{dflt:null}),width:n({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:o,editType:"calc"},t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:r.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:I({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:r.hovertext,hoverinfo:n({},c.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:g({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:r.textfont,insidetextorientation:r.insidetextorientation,insidetextfont:r.insidetextfont,outsidetextfont:n({},r.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:r.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}),r9=Dt((Q,Z)=>{Z.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),qN=Dt((Q,Z)=>{var c=kn(),g=e3(),I=jh().defaults,S=J0().handleText,t=ux().handleMarkerDefaults,e=Xc(),r=e.hasColorscale,a=e.handleDefaults;Z.exports=function(n,o,i,l){function f(_,P){return c.coerce(n,o,g,_,P)}var x=f("labels"),y=f("parents");if(!x||!x.length||!y||!y.length){o.visible=!1;return}var v=f("values");v&&v.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),t(n,o,l,f);var T=o._hasColorscale=r(n,"marker","colors")||(n.marker||{}).coloraxis;T&&a(n,o,l,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",T?1:.7);var u=f("text");f("texttemplate"),f("texttemplatefallback"),o.texttemplate||f("textinfo",c.isArrayOrTypedArray(u)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var b="auto";S(n,o,l,f,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("insidetextorientation"),f("sort"),f("rotation"),f("root.color"),I(o,l,f),o._length=null}}),$N=Dt((Q,Z)=>{var c=kn(),g=r9();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("sunburstcolorway",S.colorway),t("extendsunburstcolors")}}),r3=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(Ct,gt){return Ct.parent===gt.parent?1:2}function I(Ct){return Ct.reduce(S,0)/Ct.length}function S(Ct,gt){return Ct+gt.x}function t(Ct){return 1+Ct.reduce(e,0)}function e(Ct,gt){return Math.max(Ct,gt.y)}function r(Ct){for(var gt;gt=Ct.children;)Ct=gt[0];return Ct}function a(Ct){for(var gt;gt=Ct.children;)Ct=gt[gt.length-1];return Ct}function n(){var Ct=g,gt=1,St=1,Nt=!1;function re(le){var we,Ue=0;le.eachAfter(function(mr){var Qr=mr.children;Qr?(mr.x=I(Qr),mr.y=t(Qr)):(mr.x=we?Ue+=Ct(mr,we):0,mr.y=0,we=mr)});var qe=r(le),or=a(le),Sr=qe.x-Ct(qe,or)/2,Ar=or.x+Ct(or,qe)/2;return le.eachAfter(Nt?function(mr){mr.x=(mr.x-le.x)*gt,mr.y=(le.y-mr.y)*St}:function(mr){mr.x=(mr.x-Sr)/(Ar-Sr)*gt,mr.y=(1-(le.y?mr.y/le.y:1))*St})}return re.separation=function(le){return arguments.length?(Ct=le,re):Ct},re.size=function(le){return arguments.length?(Nt=!1,gt=+le[0],St=+le[1],re):Nt?null:[gt,St]},re.nodeSize=function(le){return arguments.length?(Nt=!0,gt=+le[0],St=+le[1],re):Nt?[gt,St]:null},re}function o(Ct){var gt=0,St=Ct.children,Nt=St&&St.length;if(!Nt)gt=1;else for(;--Nt>=0;)gt+=St[Nt].value;Ct.value=gt}function i(){return this.eachAfter(o)}function l(Ct){var gt=this,St,Nt=[gt],re,le,we;do for(St=Nt.reverse(),Nt=[];gt=St.pop();)if(Ct(gt),re=gt.children,re)for(le=0,we=re.length;le=0;--re)St.push(Nt[re]);return this}function x(Ct){for(var gt=this,St=[gt],Nt=[],re,le,we;gt=St.pop();)if(Nt.push(gt),re=gt.children,re)for(le=0,we=re.length;le=0;)St+=Nt[re].value;gt.value=St})}function v(Ct){return this.eachBefore(function(gt){gt.children&>.children.sort(Ct)})}function T(Ct){for(var gt=this,St=u(gt,Ct),Nt=[gt];gt!==St;)gt=gt.parent,Nt.push(gt);for(var re=Nt.length;Ct!==St;)Nt.splice(re,0,Ct),Ct=Ct.parent;return Nt}function u(Ct,gt){if(Ct===gt)return Ct;var St=Ct.ancestors(),Nt=gt.ancestors(),re=null;for(Ct=St.pop(),gt=Nt.pop();Ct===gt;)re=Ct,Ct=St.pop(),gt=Nt.pop();return re}function b(){for(var Ct=this,gt=[Ct];Ct=Ct.parent;)gt.push(Ct);return gt}function _(){var Ct=[];return this.each(function(gt){Ct.push(gt)}),Ct}function P(){var Ct=[];return this.eachBefore(function(gt){gt.children||Ct.push(gt)}),Ct}function M(){var Ct=this,gt=[];return Ct.each(function(St){St!==Ct&>.push({source:St.parent,target:St})}),gt}function C(Ct,gt){var St=new w(Ct),Nt=+Ct.value&&(St.value=Ct.value),re,le=[St],we,Ue,qe,or;for(gt==null&&(gt=h);re=le.pop();)if(Nt&&(re.value=+re.data.value),(Ue=gt(re.data))&&(or=Ue.length))for(re.children=new Array(or),qe=or-1;qe>=0;--qe)le.push(we=re.children[qe]=new w(Ue[qe])),we.parent=re,we.depth=re.depth+1;return St.eachBefore(k)}function A(){return C(this).eachBefore(p)}function h(Ct){return Ct.children}function p(Ct){Ct.data=Ct.data.data}function k(Ct){var gt=0;do Ct.height=gt;while((Ct=Ct.parent)&&Ct.height<++gt)}function w(Ct){this.data=Ct,this.depth=this.height=0,this.parent=null}w.prototype=C.prototype={constructor:w,count:i,each:l,eachAfter:x,eachBefore:f,sum:y,sort:v,path:T,ancestors:b,descendants:_,leaves:P,links:M,copy:A};var R=Array.prototype.slice;function O(Ct){for(var gt=Ct.length,St,Nt;gt;)Nt=Math.random()*gt--|0,St=Ct[gt],Ct[gt]=Ct[Nt],Ct[Nt]=St;return Ct}function j(Ct){for(var gt=0,St=(Ct=O(R.call(Ct))).length,Nt=[],re,le;gt0&&St*St>Nt*Nt+re*re}function U(Ct,gt){for(var St=0;Stqe?(re=(or+qe-le)/(2*or),Ue=Math.sqrt(Math.max(0,qe/or-re*re)),St.x=Ct.x-re*Nt-Ue*we,St.y=Ct.y-re*we+Ue*Nt):(re=(or+le-qe)/(2*or),Ue=Math.sqrt(Math.max(0,le/or-re*re)),St.x=gt.x+re*Nt-Ue*we,St.y=gt.y+re*we+Ue*Nt)):(St.x=gt.x+St.r,St.y=gt.y)}function mt(Ct,gt){var St=Ct.r+gt.r-1e-6,Nt=gt.x-Ct.x,re=gt.y-Ct.y;return St>0&&St*St>Nt*Nt+re*re}function st(Ct){var gt=Ct._,St=Ct.next._,Nt=gt.r+St.r,re=(gt.x*St.r+St.x*gt.r)/Nt,le=(gt.y*St.r+St.y*gt.r)/Nt;return re*re+le*le}function tt(Ct){this._=Ct,this.next=null,this.previous=null}function dt(Ct){if(!(re=Ct.length))return 0;var gt,St,Nt,re,le,we,Ue,qe,or,Sr,Ar;if(gt=Ct[0],gt.x=0,gt.y=0,!(re>1))return gt.r;if(St=Ct[1],gt.x=-St.r,St.x=gt.r,St.y=0,!(re>2))return gt.r+St.r;yt(St,gt,Nt=Ct[2]),gt=new tt(gt),St=new tt(St),Nt=new tt(Nt),gt.next=Nt.previous=St,St.next=gt.previous=Nt,Nt.next=St.previous=gt;t:for(Ue=3;Ue0)throw new Error("cycle");return Ue}return St.id=function(Nt){return arguments.length?(Ct=vt(Nt),St):Ct},St.parentId=function(Nt){return arguments.length?(gt=vt(Nt),St):gt},St}function Mt(Ct,gt){return Ct.parent===gt.parent?1:2}function ee(Ct){var gt=Ct.children;return gt?gt[0]:Ct.t}function ve(Ct){var gt=Ct.children;return gt?gt[gt.length-1]:Ct.t}function oe(Ct,gt,St){var Nt=St/(gt.i-Ct.i);gt.c-=Nt,gt.s+=St,Ct.c+=Nt,gt.z+=St,gt.m+=St}function Te(Ct){for(var gt=0,St=0,Nt=Ct.children,re=Nt.length,le;--re>=0;)le=Nt[re],le.z+=gt,le.m+=gt,gt+=le.s+(St+=le.c)}function He(Ct,gt,St){return Ct.a.parent===gt.parent?Ct.a:St}function Ge(Ct,gt){this._=Ct,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=gt}Ge.prototype=Object.create(w.prototype);function cr(Ct){for(var gt=new Ge(Ct,0),St,Nt=[gt],re,le,we,Ue;St=Nt.pop();)if(le=St._.children)for(St.children=new Array(Ue=le.length),we=Ue-1;we>=0;--we)Nt.push(re=St.children[we]=new Ge(le[we],we)),re.parent=St;return(gt.parent=new Ge(null,0)).children=[gt],gt}function ur(){var Ct=Mt,gt=1,St=1,Nt=null;function re(or){var Sr=cr(or);if(Sr.eachAfter(le),Sr.parent.m=-Sr.z,Sr.eachBefore(we),Nt)or.eachBefore(qe);else{var Ar=or,mr=or,Qr=or;or.eachBefore(function(oi){oi.xmr.x&&(mr=oi),oi.depth>Qr.depth&&(Qr=oi)});var Hn=Ar===mr?1:Ct(Ar,mr)/2,Wn=Hn-Ar.x,Xn=gt/(mr.x+Hn+Wn),Ii=St/(Qr.depth||1);or.eachBefore(function(oi){oi.x=(oi.x+Wn)*Xn,oi.y=oi.depth*Ii})}return or}function le(or){var Sr=or.children,Ar=or.parent.children,mr=or.i?Ar[or.i-1]:null;if(Sr){Te(or);var Qr=(Sr[0].z+Sr[Sr.length-1].z)/2;mr?(or.z=mr.z+Ct(or._,mr._),or.m=or.z-Qr):or.z=Qr}else mr&&(or.z=mr.z+Ct(or._,mr._));or.parent.A=Ue(or,mr,or.parent.A||Ar[0])}function we(or){or._.x=or.z+or.parent.m,or.m+=or.parent.m}function Ue(or,Sr,Ar){if(Sr){for(var mr=or,Qr=or,Hn=Sr,Wn=mr.parent.children[0],Xn=mr.m,Ii=Qr.m,oi=Hn.m,$n=Wn.m,sa;Hn=ve(Hn),mr=ee(mr),Hn&&mr;)Wn=ee(Wn),Qr=ve(Qr),Qr.a=or,sa=Hn.z+oi-mr.z-Xn+Ct(Hn._,mr._),sa>0&&(oe(He(Hn,or,Ar),or,sa),Xn+=sa,Ii+=sa),oi+=Hn.m,Xn+=mr.m,$n+=Wn.m,Ii+=Qr.m;Hn&&!ve(Qr)&&(Qr.t=Hn,Qr.m+=oi-Ii),mr&&!ee(Wn)&&(Wn.t=mr,Wn.m+=Xn-$n,Ar=or)}return Ar}function qe(or){or.x*=gt,or.y=or.depth*St}return re.separation=function(or){return arguments.length?(Ct=or,re):Ct},re.size=function(or){return arguments.length?(Nt=!1,gt=+or[0],St=+or[1],re):Nt?null:[gt,St]},re.nodeSize=function(or){return arguments.length?(Nt=!0,gt=+or[0],St=+or[1],re):Nt?[gt,St]:null},re}function jr(Ct,gt,St,Nt,re){for(var le=Ct.children,we,Ue=-1,qe=le.length,or=Ct.value&&(re-St)/Ct.value;++Ueoi&&(oi=or),We=Xn*Xn*Zi,$n=Math.max(oi/We,We/Ii),$n>sa){Xn-=or;break}sa=$n}we.push(qe={value:Xn,dice:Qr1?Nt:1)},St}(Wr);function nn(){var Ct=Xr,gt=!1,St=1,Nt=1,re=[0],le=it,we=it,Ue=it,qe=it,or=it;function Sr(mr){return mr.x0=mr.y0=0,mr.x1=St,mr.y1=Nt,mr.eachBefore(Ar),re=[0],gt&&mr.eachBefore(qt),mr}function Ar(mr){var Qr=re[mr.depth],Hn=mr.x0+Qr,Wn=mr.y0+Qr,Xn=mr.x1-Qr,Ii=mr.y1-Qr;Xn=mr-1){var oi=le[Ar];oi.x0=Hn,oi.y0=Wn,oi.x1=Xn,oi.y1=Ii;return}for(var $n=or[Ar],sa=Qr/2+$n,Zi=Ar+1,We=mr-1;Zi>>1;or[nr]Ii-Wn){var tn=(Hn*_r+Xn*fr)/Qr;Sr(Ar,Zi,fr,Hn,Wn,tn,Ii),Sr(Zi,mr,_r,tn,Wn,Xn,Ii)}else{var Cn=(Wn*_r+Ii*fr)/Qr;Sr(Ar,Zi,fr,Hn,Wn,Xn,Cn),Sr(Zi,mr,_r,Hn,Cn,Xn,Ii)}}}function Gt(Ct,gt,St,Nt,re){(Ct.depth&1?jr:Wt)(Ct,gt,St,Nt,re)}var ne=function Ct(gt){function St(Nt,re,le,we,Ue){if((qe=Nt._squarify)&&qe.ratio===gt)for(var qe,or,Sr,Ar,mr=-1,Qr,Hn=qe.length,Wn=Nt.value;++mr1?Nt:1)},St}(Wr);c.cluster=n,c.hierarchy=C,c.pack=ut,c.packEnclose=j,c.packSiblings=rt,c.partition=Jt,c.stratify=Lt,c.tree=ur,c.treemap=nn,c.treemapBinary=Le,c.treemapDice=Wt,c.treemapResquarify=ne,c.treemapSlice=jr,c.treemapSliceDice=Gt,c.treemapSquarify=Xr,Object.defineProperty(c,"__esModule",{value:!0})})}),n3=Dt(Q=>{var Z=r3(),c=Yi(),g=kn(),I=Xc().makeColorScaleFuncFromTrace,S=lb().makePullColorFn,t=lb().generateExtendedColors,e=Xc().calc,r=Ca().ALMOST_EQUAL,a={},n={},o={};Q.calc=function(l,f){var x=l._fullLayout,y=f.ids,v=g.isArrayOrTypedArray(y),T=f.labels,u=f.parents,b=f.values,_=g.isArrayOrTypedArray(b),P=[],M={},C={},A=function(rt,at){M[rt]?M[rt].push(at):M[rt]=[at],C[at]=1},h=function(rt){return rt||typeof rt=="number"},p=function(rt){return!_||c(b[rt])&&b[rt]>=0},k,w,R;v?(k=Math.min(y.length,u.length),w=function(rt){return h(y[rt])&&p(rt)},R=function(rt){return String(y[rt])}):(k=Math.min(T.length,u.length),w=function(rt){return h(T[rt])&&p(rt)},R=function(rt){return String(T[rt])}),_&&(k=Math.min(k,b.length));for(var O=0;O1){for(var F=g.randstr(),U=0;U{});function bv(){}function q7(){return this.rgb().formatHex()}function TN(){return this.rgb().formatHex8()}function AN(){return X7(this).formatHsl()}function Z7(){return this.rgb().formatRgb()}function fb(Q){var $,c;return Q=(Q+"").trim().toLowerCase(),($=Q7.exec(Q))?(c=$[1].length,$=parseInt($[1],16),c===6?$7($):c===3?new fp($>>8&15|$>>4&240,$>>4&15|$&240,($&15)<<4|$&15,1):c===8?e3($>>24&255,$>>16&255,$>>8&255,($&255)/255):c===4?e3($>>12&15|$>>8&240,$>>8&15|$>>4&240,$>>4&15|$&240,(($&15)<<4|$&15)/255):null):($=t9.exec(Q))?new fp($[1],$[2],$[3],1):($=e9.exec(Q))?new fp($[1]*255/100,$[2]*255/100,$[3]*255/100,1):($=r9.exec(Q))?e3($[1],$[2],$[3],$[4]):($=n9.exec(Q))?e3($[1]*255/100,$[2]*255/100,$[3]*255/100,$[4]):($=i9.exec(Q))?K7($[1],$[2]/100,$[3]/100,1):($=a9.exec(Q))?K7($[1],$[2]/100,$[3]/100,$[4]):pk.hasOwnProperty(Q)?$7(pk[Q]):Q==="transparent"?new fp(NaN,NaN,NaN,0):null}function $7(Q){return new fp(Q>>16&255,Q>>8&255,Q&255,1)}function e3(Q,$,c,g){return g<=0&&(Q=$=c=NaN),new fp(Q,$,c,g)}function hk(Q){return Q instanceof bv||(Q=fb(Q)),Q?(Q=Q.rgb(),new fp(Q.r,Q.g,Q.b,Q.opacity)):new fp}function r3(Q,$,c,g){return arguments.length===1?hk(Q):new fp(Q,$,c,g??1)}function fp(Q,$,c,g){this.r=+Q,this.g=+$,this.b=+c,this.opacity=+g}function G7(){return`#${D1(this.r)}${D1(this.g)}${D1(this.b)}`}function MN(){return`#${D1(this.r)}${D1(this.g)}${D1(this.b)}${D1((isNaN(this.opacity)?1:this.opacity)*255)}`}function Y7(){let Q=n3(this.opacity);return`${Q===1?"rgb(":"rgba("}${O1(this.r)}, ${O1(this.g)}, ${O1(this.b)}${Q===1?")":`, ${Q})`}`}function n3(Q){return isNaN(Q)?1:Math.max(0,Math.min(1,Q))}function O1(Q){return Math.max(0,Math.min(255,Math.round(Q)||0))}function D1(Q){return Q=O1(Q),(Q<16?"0":"")+Q.toString(16)}function K7(Q,$,c,g){return g<=0?Q=$=c=NaN:c<=0||c>=1?Q=$=NaN:$<=0&&(Q=NaN),new km(Q,$,c,g)}function X7(Q){if(Q instanceof km)return new km(Q.h,Q.s,Q.l,Q.opacity);if(Q instanceof bv||(Q=fb(Q)),!Q)return new km;if(Q instanceof km)return Q;Q=Q.rgb();var $=Q.r/255,c=Q.g/255,g=Q.b/255,P=Math.min($,c,g),S=Math.max($,c,g),t=NaN,e=S-P,r=(S+P)/2;return e?($===S?t=(c-g)/e+(c0&&r<1?0:t,new km(t,e,r,Q.opacity)}function fk(Q,$,c,g){return arguments.length===1?X7(Q):new km(Q,$,c,g??1)}function km(Q,$,c,g){this.h=+Q,this.s=+$,this.l=+c,this.opacity=+g}function J7(Q){return Q=(Q||0)%360,Q<0?Q+360:Q}function i3(Q){return Math.max(0,Math.min(1,Q||0))}function dk(Q,$,c){return(Q<60?$+(c-$)*Q/60:Q<180?c:Q<240?$+(c-$)*(240-Q)/60:$)*255}var wv,F1,R1,cx,Tm,Q7,t9,e9,r9,n9,i9,a9,pk,mk=Tn(()=>{ck(),wv=.7,F1=1/wv,R1="\\s*([+-]?\\d+)\\s*",cx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Tm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q7=/^#([0-9a-f]{3,8})$/,t9=new RegExp(`^rgb\\(${R1},${R1},${R1}\\)$`),e9=new RegExp(`^rgb\\(${Tm},${Tm},${Tm}\\)$`),r9=new RegExp(`^rgba\\(${R1},${R1},${R1},${cx}\\)$`),n9=new RegExp(`^rgba\\(${Tm},${Tm},${Tm},${cx}\\)$`),i9=new RegExp(`^hsl\\(${cx},${Tm},${Tm}\\)$`),a9=new RegExp(`^hsla\\(${cx},${Tm},${Tm},${cx}\\)$`),pk={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ux(bv,fb,{copy(Q){return Object.assign(new this.constructor,this,Q)},displayable(){return this.rgb().displayable()},hex:q7,formatHex:q7,formatHex8:TN,formatHsl:AN,formatRgb:Z7,toString:Z7}),ux(fp,r3,hb(bv,{brighter(Q){return Q=Q==null?F1:Math.pow(F1,Q),new fp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new fp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},rgb(){return this},clamp(){return new fp(O1(this.r),O1(this.g),O1(this.b),n3(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:G7,formatHex:G7,formatHex8:MN,formatRgb:Y7,toString:Y7})),ux(km,fk,hb(bv,{brighter(Q){return Q=Q==null?F1:Math.pow(F1,Q),new km(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new km(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=this.h%360+(this.h<0)*360,$=isNaN(Q)||isNaN(this.s)?0:this.s,c=this.l,g=c+(c<.5?c:1-c)*$,P=2*c-g;return new fp(dk(Q>=240?Q-240:Q+120,P,g),dk(Q,P,g),dk(Q<120?Q+240:Q-120,P,g),this.opacity)},clamp(){return new km(J7(this.h),i3(this.s),i3(this.l),n3(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let Q=n3(this.opacity);return`${Q===1?"hsl(":"hsla("}${J7(this.h)}, ${i3(this.s)*100}%, ${i3(this.l)*100}%${Q===1?")":`, ${Q})`}`}}))}),gk,vk,o9=Tn(()=>{gk=Math.PI/180,vk=180/Math.PI});function s9(Q){if(Q instanceof Hm)return new Hm(Q.l,Q.a,Q.b,Q.opacity);if(Q instanceof Pg)return l9(Q);Q instanceof fp||(Q=hk(Q));var $=wk(Q.r),c=wk(Q.g),g=wk(Q.b),P=xk((.2225045*$+.7168786*c+.0606169*g)/Ak),S,t;return $===c&&c===g?S=t=P:(S=xk((.4360747*$+.3850649*c+.1430804*g)/Tk),t=xk((.0139322*$+.0971045*c+.7141733*g)/Mk)),new Hm(116*P-16,500*(S-P),200*(P-t),Q.opacity)}function yk(Q,$,c,g){return arguments.length===1?s9(Q):new Hm(Q,$,c,g??1)}function Hm(Q,$,c,g){this.l=+Q,this.a=+$,this.b=+c,this.opacity=+g}function xk(Q){return Q>u9?Math.pow(Q,.3333333333333333):Q/Ek+Sk}function _k(Q){return Q>B1?Q*Q*Q:Ek*(Q-Sk)}function bk(Q){return 255*(Q<=.0031308?12.92*Q:1.055*Math.pow(Q,.4166666666666667)-.055)}function wk(Q){return(Q/=255)<=.04045?Q/12.92:Math.pow((Q+.055)/1.055,2.4)}function SN(Q){if(Q instanceof Pg)return new Pg(Q.h,Q.c,Q.l,Q.opacity);if(Q instanceof Hm||(Q=s9(Q)),Q.a===0&&Q.b===0)return new Pg(NaN,0{ck(),mk(),o9(),db=18,Tk=.96422,Ak=1,Mk=.82521,Sk=4/29,B1=6/29,Ek=3*B1*B1,u9=B1*B1*B1,ux(Hm,yk,hb(bv,{brighter(Q){return new Hm(this.l+db*(Q??1),this.a,this.b,this.opacity)},darker(Q){return new Hm(this.l-db*(Q??1),this.a,this.b,this.opacity)},rgb(){var Q=(this.l+16)/116,$=isNaN(this.a)?Q:Q+this.a/500,c=isNaN(this.b)?Q:Q-this.b/200;return $=Tk*_k($),Q=Ak*_k(Q),c=Mk*_k(c),new fp(bk(3.1338561*$-1.6168667*Q-.4906146*c),bk(-.9787684*$+1.9161415*Q+.033454*c),bk(.0719453*$-.2289914*Q+1.4052427*c),this.opacity)}})),ux(Pg,kk,hb(bv,{brighter(Q){return new Pg(this.h,this.c,this.l+db*(Q??1),this.opacity)},darker(Q){return new Pg(this.h,this.c,this.l-db*(Q??1),this.opacity)},rgb(){return l9(this).rgb()}}))});function CN(Q){if(Q instanceof N1)return new N1(Q.h,Q.s,Q.l,Q.opacity);Q instanceof fp||(Q=hk(Q));var $=Q.r/255,c=Q.g/255,g=Q.b/255,P=(Ik*g+Pk*$-zk*c)/(Ik+Pk-zk),S=g-P,t=(hx*(c-P)-o3*S)/pb,e=Math.sqrt(t*t+S*S)/(hx*P*(1-P)),r=e?Math.atan2(t,S)*vk-120:NaN;return new N1(r<0?r+360:r,e,P,Q.opacity)}function Ck(Q,$,c,g){return arguments.length===1?CN(Q):new N1(Q,$,c,g??1)}function N1(Q,$,c,g){this.h=+Q,this.s=+$,this.l=+c,this.opacity=+g}var Lk,a3,o3,pb,hx,Pk,zk,Ik,LN=Tn(()=>{ck(),mk(),o9(),Lk=-.14861,a3=1.78277,o3=-.29227,pb=-.90649,hx=1.97294,Pk=hx*pb,zk=hx*a3,Ik=a3*o3-pb*Lk,ux(N1,Ck,hb(bv,{brighter(Q){return Q=Q==null?F1:Math.pow(F1,Q),new N1(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new N1(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=isNaN(this.h)?0:(this.h+120)*gk,$=+this.l,c=isNaN(this.s)?0:this.s*$*(1-$),g=Math.cos(Q),P=Math.sin(Q);return new fp(255*($+c*(Lk*g+a3*P)),255*($+c*(o3*g+pb*P)),255*($+c*(hx*g)),this.opacity)}}))}),fx=Tn(()=>{mk(),EN(),LN()});function c9(Q,$,c,g,P){var S=Q*Q,t=S*Q;return((1-3*Q+3*S-t)*$+(4-6*S+3*t)*c+(1+3*Q+3*S-3*t)*g+t*P)/6}function h9(Q){var $=Q.length-1;return function(c){var g=c<=0?c=0:c>=1?(c=1,$-1):Math.floor(c*$),P=Q[g],S=Q[g+1],t=g>0?Q[g-1]:2*P-S,e=g<$-1?Q[g+2]:2*S-P;return c9((c-g/$)*$,t,P,S,e)}}var Ok=Tn(()=>{});function f9(Q){var $=Q.length;return function(c){var g=Math.floor(((c%=1)<0?++c:c)*$),P=Q[(g+$-1)%$],S=Q[g%$],t=Q[(g+1)%$],e=Q[(g+2)%$];return c9((c-g/$)*$,P,S,t,e)}}var d9=Tn(()=>{Ok()}),mb,p9=Tn(()=>{mb=Q=>()=>Q});function m9(Q,$){return function(c){return Q+c*$}}function PN(Q,$,c){return Q=Math.pow(Q,c),$=Math.pow($,c)-Q,c=1/c,function(g){return Math.pow(Q+g*$,c)}}function s3(Q,$){var c=$-Q;return c?m9(Q,c>180||c<-180?c-360*Math.round(c/360):c):mb(isNaN(Q)?$:Q)}function zN(Q){return(Q=+Q)==1?dp:function($,c){return c-$?PN($,c,Q):mb(isNaN($)?c:$)}}function dp(Q,$){var c=$-Q;return c?m9(Q,c):mb(isNaN(Q)?$:Q)}var dx=Tn(()=>{p9()});function g9(Q){return function($){var c=$.length,g=new Array(c),P=new Array(c),S=new Array(c),t,e;for(t=0;t{fx(),Ok(),d9(),dx(),l3=function Q($){var c=zN($);function g(P,S){var t=c((P=r3(P)).r,(S=r3(S)).r),e=c(P.g,S.g),r=c(P.b,S.b),a=dp(P.opacity,S.opacity);return function(n){return P.r=t(n),P.g=e(n),P.b=r(n),P.opacity=a(n),P+""}}return g.gamma=Q,g}(1),v9=g9(h9),y9=g9(f9)});function Dk(Q,$){$||($=[]);var c=Q?Math.min($.length,Q.length):0,g=$.slice(),P;return function(S){for(P=0;P{});function IN(Q,$){return(_9($)?Dk:b9)(Q,$)}function b9(Q,$){var c=$?$.length:0,g=Q?Math.min(c,Q.length):0,P=new Array(g),S=new Array(c),t;for(t=0;t{d3(),Fk()});function k9(Q,$){var c=new Date;return Q=+Q,$=+$,function(g){return c.setTime(Q*(1-g)+$*g),c}}var T9=Tn(()=>{});function Wm(Q,$){return Q=+Q,$=+$,function(c){return Q*(1-c)+$*c}}var u3=Tn(()=>{});function A9(Q,$){var c={},g={},P;(Q===null||typeof Q!="object")&&(Q={}),($===null||typeof $!="object")&&($={});for(P in $)P in Q?c[P]=f3(Q[P],$[P]):g[P]=$[P];return function(S){for(P in c)g[P]=c[P](S);return g}}var M9=Tn(()=>{d3()});function ON(Q){return function(){return Q}}function DN(Q){return function($){return Q($)+""}}function S9(Q,$){var c=c3.lastIndex=h3.lastIndex=0,g,P,S,t=-1,e=[],r=[];for(Q=Q+"",$=$+"";(g=c3.exec(Q))&&(P=h3.exec($));)(S=P.index)>c&&(S=$.slice(c,S),e[t]?e[t]+=S:e[++t]=S),(g=g[0])===(P=P[0])?e[t]?e[t]+=P:e[++t]=P:(e[++t]=null,r.push({i:t,x:Wm(g,P)})),c=h3.lastIndex;return c<$.length&&(S=$.slice(c),e[t]?e[t]+=S:e[++t]=S),e.length<2?r[0]?DN(r[0].x):ON($):($=r.length,function(a){for(var n=0,o;n<$;++n)e[(o=r[n]).i]=o.x(a);return e.join("")})}var c3,h3,E9=Tn(()=>{u3(),c3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,h3=new RegExp(c3.source,"g")});function f3(Q,$){var c=typeof $,g;return $==null||c==="boolean"?mb($):(c==="number"?Wm:c==="string"?(g=fb($))?($=g,l3):S9:$ instanceof fb?l3:$ instanceof Date?k9:_9($)?Dk:Array.isArray($)?b9:typeof $.valueOf!="function"&&typeof $.toString!="function"||isNaN($)?A9:Wm)(Q,$)}var d3=Tn(()=>{fx(),x9(),w9(),T9(),u3(),M9(),E9(),p9(),Fk()});function FN(Q){var $=Q.length;return function(c){return Q[Math.max(0,Math.min($-1,Math.floor(c*$)))]}}var RN=Tn(()=>{});function BN(Q,$){var c=s3(+Q,+$);return function(g){var P=c(g);return P-360*Math.floor(P/360)}}var NN=Tn(()=>{dx()});function jN(Q,$){return Q=+Q,$=+$,function(c){return Math.round(Q*(1-c)+$*c)}}var UN=Tn(()=>{});function C9(Q,$,c,g,P,S){var t,e,r;return(t=Math.sqrt(Q*Q+$*$))&&(Q/=t,$/=t),(r=Q*c+$*g)&&(c-=Q*r,g-=$*r),(e=Math.sqrt(c*c+g*g))&&(c/=e,g/=e,r/=e),Q*g<$*c&&(Q=-Q,$=-$,r=-r,t=-t),{translateX:P,translateY:S,rotate:Math.atan2($,Q)*Rk,skewX:Math.atan(r)*Rk,scaleX:t,scaleY:e}}var Rk,p3,VN=Tn(()=>{Rk=180/Math.PI,p3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function HN(Q){let $=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(Q+"");return $.isIdentity?p3:C9($.a,$.b,$.c,$.d,$.e,$.f)}function WN(Q){return Q==null?p3:(m3||(m3=document.createElementNS("http://www.w3.org/2000/svg","g")),m3.setAttribute("transform",Q),(Q=m3.transform.baseVal.consolidate())?(Q=Q.matrix,C9(Q.a,Q.b,Q.c,Q.d,Q.e,Q.f)):p3)}var m3,qN=Tn(()=>{VN()});function L9(Q,$,c,g){function P(a){return a.length?a.pop()+" ":""}function S(a,n,o,i,s,f){if(a!==o||n!==i){var x=s.push("translate(",null,$,null,c);f.push({i:x-4,x:Wm(a,o)},{i:x-2,x:Wm(n,i)})}else(o||i)&&s.push("translate("+o+$+i+c)}function t(a,n,o,i){a!==n?(a-n>180?n+=360:n-a>180&&(a+=360),i.push({i:o.push(P(o)+"rotate(",null,g)-2,x:Wm(a,n)})):n&&o.push(P(o)+"rotate("+n+g)}function e(a,n,o,i){a!==n?i.push({i:o.push(P(o)+"skewX(",null,g)-2,x:Wm(a,n)}):n&&o.push(P(o)+"skewX("+n+g)}function r(a,n,o,i,s,f){if(a!==o||n!==i){var x=s.push(P(s)+"scale(",null,",",null,")");f.push({i:x-4,x:Wm(a,o)},{i:x-2,x:Wm(n,i)})}else(o!==1||i!==1)&&s.push(P(s)+"scale("+o+","+i+")")}return function(a,n){var o=[],i=[];return a=Q(a),n=Q(n),S(a.translateX,a.translateY,n.translateX,n.translateY,o,i),t(a.rotate,n.rotate,o,i),e(a.skewX,n.skewX,o,i),r(a.scaleX,a.scaleY,n.scaleX,n.scaleY,o,i),a=n=null,function(s){for(var f=-1,x=i.length,y;++f{u3(),qN(),P9=L9(HN,"px, ","px)","deg)"),z9=L9(WN,", ",")",")")});function I9(Q){return((Q=Math.exp(Q))+1/Q)/2}function $N(Q){return((Q=Math.exp(Q))-1/Q)/2}function GN(Q){return((Q=Math.exp(2*Q))-1)/(Q+1)}var O9,D9,YN=Tn(()=>{O9=1e-12,D9=function Q($,c,g){function P(S,t){var e=S[0],r=S[1],a=S[2],n=t[0],o=t[1],i=t[2],s=n-e,f=o-r,x=s*s+f*f,y,v;if(x{fx(),dx(),R9=F9(s3),B9=F9(dp)});function XN(Q,$){var c=dp((Q=yk(Q)).l,($=yk($)).l),g=dp(Q.a,$.a),P=dp(Q.b,$.b),S=dp(Q.opacity,$.opacity);return function(t){return Q.l=c(t),Q.a=g(t),Q.b=P(t),Q.opacity=S(t),Q+""}}var JN=Tn(()=>{fx(),dx()});function N9(Q){return function($,c){var g=Q(($=kk($)).h,(c=kk(c)).h),P=dp($.c,c.c),S=dp($.l,c.l),t=dp($.opacity,c.opacity);return function(e){return $.h=g(e),$.c=P(e),$.l=S(e),$.opacity=t(e),$+""}}}var j9,U9,QN=Tn(()=>{fx(),dx(),j9=N9(s3),U9=N9(dp)});function V9(Q){return function $(c){c=+c;function g(P,S){var t=Q((P=Ck(P)).h,(S=Ck(S)).h),e=dp(P.s,S.s),r=dp(P.l,S.l),a=dp(P.opacity,S.opacity);return function(n){return P.h=t(n),P.s=e(n),P.l=r(Math.pow(n,c)),P.opacity=a(n),P+""}}return g.gamma=$,g}(1)}var H9,W9,tj=Tn(()=>{fx(),dx(),H9=V9(s3),W9=V9(dp)});function ej(Q,$){$===void 0&&($=Q,Q=f3);for(var c=0,g=$.length-1,P=$[0],S=new Array(g<0?0:g);c{d3()});function nj(Q,$){for(var c=new Array($),g=0;g<$;++g)c[g]=Q(g/($-1));return c}var ij=Tn(()=>{}),j1={};wn(j1,{interpolate:()=>f3,interpolateArray:()=>IN,interpolateBasis:()=>h9,interpolateBasisClosed:()=>f9,interpolateCubehelix:()=>H9,interpolateCubehelixLong:()=>W9,interpolateDate:()=>k9,interpolateDiscrete:()=>FN,interpolateHcl:()=>j9,interpolateHclLong:()=>U9,interpolateHsl:()=>R9,interpolateHslLong:()=>B9,interpolateHue:()=>BN,interpolateLab:()=>XN,interpolateNumber:()=>Wm,interpolateNumberArray:()=>Dk,interpolateObject:()=>A9,interpolateRgb:()=>l3,interpolateRgbBasis:()=>v9,interpolateRgbBasisClosed:()=>y9,interpolateRound:()=>jN,interpolateString:()=>S9,interpolateTransformCss:()=>P9,interpolateTransformSvg:()=>z9,interpolateZoom:()=>D9,piecewise:()=>ej,quantize:()=>nj});var px=Tn(()=>{d3(),w9(),Ok(),d9(),T9(),RN(),NN(),u3(),Fk(),M9(),UN(),E9(),ZN(),YN(),x9(),KN(),JN(),QN(),tj(),rj(),ij()}),Bk=Ft((Q,$)=>{var c=Vs(),g=ui();$.exports=function(P,S,t,e,r){var a=S.data.data,n=a.i,o=r||a.color;if(n>=0){S.i=a.i;var i=t.marker;i.pattern?(!i.colors||!i.pattern.shape)&&(i.color=o,S.color=o):(i.color=o,S.color=o),c.pointStyle(P,t,e,S)}else g.fill(P,o)}}),q9=Ft((Q,$)=>{var c=En(),g=ui(),P=_n(),S=Up().resizeText,t=Bk();function e(a){var n=a._fullLayout._sunburstlayer.selectAll(".trace");S(a,n,"sunburst"),n.each(function(o){var i=c.select(this),s=o[0],f=s.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var s=n.data.data,f=!n.children,x=s.i,y=P.castOption(o,x,"marker.line.color")||g.defaultLine,v=P.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}$.exports={style:e,styleOne:r}}),kv=Ft(Q=>{var $=_n(),c=ui(),g=O0(),P=wg();Q.findEntryWithLevel=function(r,a){var n;return a&&r.eachAfter(function(o){if(Q.getPtId(o)===a)return n=o.copy()}),n||r},Q.findEntryWithChild=function(r,a){var n;return r.eachAfter(function(o){for(var i=o.children||[],s=0;s0)},Q.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},Q.isHeader=function(r,a){return!(Q.isLeaf(r)||r.depth===a._maxDepth-1)};function e(r){return r.data.data.pid}Q.getParent=function(r,a){return Q.findEntryWithLevel(r,e(a))},Q.listPath=function(r,a){var n=r.parent;if(!n)return[];var o=a?[n.data[a]]:[n];return Q.listPath(n,a).concat(o)},Q.getPath=function(r){return Q.listPath(r,"label").join("/")+"/"},Q.formatValue=P.formatPieValue,Q.formatPercent=function(r,a){var n=$.formatPercent(r,0);return n==="0%"&&(n=P.formatPiePercent(r,a)),n}}),g3=Ft((Q,$)=>{var c=En(),g=Qo(),P=Np().appendArrayPointValue,S=Qh(),t=_n(),e=Fm(),r=kv(),a=wg(),n=a.formatPieValue;$.exports=function(i,s,f,x,y){var v=x[0],T=v.trace,u=v.hierarchy,b=T.type==="sunburst",_=T.type==="treemap"||T.type==="icicle";"_hasHoverLabel"in T||(T._hasHoverLabel=!1),"_hasHoverEvent"in T||(T._hasHoverEvent=!1);var C=function(A){var h=f._fullLayout;if(!(f._dragging||h.hovermode===!1)){var p=f._fullData[T.index],k=A.data.data,w=k.i,R=r.isHierarchyRoot(A),O=r.getParent(u,A),N=r.getValue(A),V=function(Y){return t.castOption(p,w,Y)},H=V("hovertemplate"),F=S.castHoverinfo(p,h,w),U=h.separators,W;if(H||F&&F!=="none"&&F!=="skip"){var q,X;b&&(q=v.cx+A.pxmid[0]*(1-A.rInscribed),X=v.cy+A.pxmid[1]*(1-A.rInscribed)),_&&(q=A._hoverX,X=A._hoverY);var lt={},yt=[],pt=[],st=function(Y){return yt.indexOf(Y)!==-1};F&&(yt=F==="all"?p._module.attributes.hoverinfo.flags:F.split("+")),lt.label=k.label,st("label")&<.label&&pt.push(lt.label),k.hasOwnProperty("v")&&(lt.value=k.v,lt.valueLabel=n(lt.value,U),st("value")&&pt.push(lt.valueLabel)),lt.currentPath=A.currentPath=r.getPath(A.data),st("current path")&&!R&&pt.push(lt.currentPath);var tt,dt=[],rt=function(){dt.indexOf(tt)===-1&&(pt.push(tt),dt.push(tt))};lt.percentParent=A.percentParent=N/r.getValue(O),lt.parent=A.parentString=r.getPtLabel(O),st("percent parent")&&(tt=r.formatPercent(lt.percentParent,U)+" of "+lt.parent,rt()),lt.percentEntry=A.percentEntry=N/r.getValue(s),lt.entry=A.entry=r.getPtLabel(s),st("percent entry")&&!R&&!A.onPathbar&&(tt=r.formatPercent(lt.percentEntry,U)+" of "+lt.entry,rt()),lt.percentRoot=A.percentRoot=N/r.getValue(u),lt.root=A.root=r.getPtLabel(u),st("percent root")&&!R&&(tt=r.formatPercent(lt.percentRoot,U)+" of "+lt.root,rt()),lt.text=V("hovertext")||V("text"),st("text")&&(tt=lt.text,t.isValidTextValue(tt)&&pt.push(tt)),W=[o(A,p,y.eventDataKeys)];var at={trace:p,y:X,_x0:A._x0,_x1:A._x1,_y0:A._y0,_y1:A._y1,text:pt.join("
"),name:H||st("name")?p.name:void 0,color:V("hoverlabel.bgcolor")||k.color,borderColor:V("hoverlabel.bordercolor"),fontFamily:V("hoverlabel.font.family"),fontSize:V("hoverlabel.font.size"),fontColor:V("hoverlabel.font.color"),fontWeight:V("hoverlabel.font.weight"),fontStyle:V("hoverlabel.font.style"),fontVariant:V("hoverlabel.font.variant"),nameLength:V("hoverlabel.namelength"),textAlign:V("hoverlabel.align"),hovertemplate:H,hovertemplateLabels:lt,eventData:W};b&&(at.x0=q-A.rInscribed*A.rpx1,at.x1=q+A.rInscribed*A.rpx1,at.idealAlign=A.pxmid[0]<0?"left":"right"),_&&(at.x=q,at.idealAlign=q<0?"left":"right");var vt=[];S.loneHover(at,{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:f,inOut_bbox:vt}),W[0].bbox=vt[0],T._hasHoverLabel=!0}if(_){var it=i.select("path.surface");y.styleOne(it,A,p,f,{hovered:!0})}T._hasHoverEvent=!0,f.emit("plotly_hover",{points:W||[o(A,p,y.eventDataKeys)],event:c.event})}},M=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=c.select(this).datum();if(T._hasHoverEvent&&(A.originalEvent=c.event,f.emit("plotly_unhover",{points:[o(k,p,y.eventDataKeys)],event:c.event}),T._hasHoverEvent=!1),T._hasHoverLabel&&(S.loneUnhover(h._hoverlayer.node()),T._hasHoverLabel=!1),_){var w=i.select("path.surface");y.styleOne(w,k,p,f,{hovered:!1})}},E=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=b&&(r.isHierarchyRoot(A)||r.isLeaf(A)),w=r.getPtId(A),R=r.isEntry(A)?r.findEntryWithChild(u,w):r.findEntryWithLevel(u,w),O=r.getPtId(R),N={points:[o(A,p,y.eventDataKeys)],event:c.event};k||(N.nextLevel=O);var V=e.triggerHandler(f,"plotly_"+T.type+"click",N);if(V!==!1&&h.hovermode&&(f._hoverdata=[o(A,p,y.eventDataKeys)],S.click(f,c.event)),!k&&V!==!1&&!f._dragging&&!f._transitioning){g.call("_storeDirectGUIEdit",p,h._tracePreGUI[p.uid],{level:p.level});var H={data:[{level:O}],traces:[T.index]},F={frame:{redraw:!1,duration:y.transitionTime},transition:{duration:y.transitionTime,easing:y.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(h._hoverlayer.node()),g.call("animate",f,H,F)}};i.on("mouseover",C),i.on("mouseout",M),i.on("click",E)};function o(i,s,f){for(var x=i.data.data,y={curveNumber:s.index,pointNumber:x.i,data:s._input,fullData:s},v=0;v{var $=En(),c=Qw(),g=(px(),ai(j1)).interpolate,P=Vs(),S=_n(),t=tc(),e=Up(),r=e.recordMinTextSize,a=e.clearMinTextSize,n=uk(),o=wg().getRotationAngle,i=n.computeTransform,s=n.transformInsideText,f=q9().styleOne,x=wm().resizeText,y=g3(),v=H7(),T=kv();Q.plot=function(E,A,h,p){var k=E._fullLayout,w=k._sunburstlayer,R,O,N=!h,V=!k.uniformtext.mode&&T.hasTransition(h);if(a("sunburst",k),R=w.selectAll("g.trace.sunburst").data(A,function(F){return F[0].trace.uid}),R.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),R.order(),V){p&&(O=p());var H=$.transition().duration(h.duration).ease(h.easing).each("end",function(){O&&O()}).each("interrupt",function(){O&&O()});H.each(function(){w.selectAll("g.trace").each(function(F){u(E,F,this,h)})})}else R.each(function(F){u(E,F,this,h)}),k.uniformtext.mode&&x(E,k._sunburstlayer.selectAll(".trace"),"sunburst");N&&R.exit().remove()};function u(E,A,h,p){var k=E._context.staticPlot,w=E._fullLayout,R=!w.uniformtext.mode&&T.hasTransition(p),O=$.select(h),N=O.selectAll("g.slice"),V=A[0],H=V.trace,F=V.hierarchy,U=T.findEntryWithLevel(F,H.level),W=T.getMaxDepth(H),q=w._size,X=H.domain,lt=q.w*(X.x[1]-X.x[0]),yt=q.h*(X.y[1]-X.y[0]),pt=.5*Math.min(lt,yt),st=V.cx=q.l+q.w*(X.x[1]+X.x[0])/2,tt=V.cy=q.t+q.h*(1-X.y[0])-yt/2;if(!U)return N.remove();var dt=null,rt={};R&&N.each(function(Mt){rt[T.getPtId(Mt)]={rpx0:Mt.rpx0,rpx1:Mt.rpx1,x0:Mt.x0,x1:Mt.x1,transform:Mt.transform},!dt&&T.isEntry(Mt)&&(dt=Mt)});var at=b(U).descendants(),vt=U.height+1,it=0,Y=W;V.hasMultipleRoots&&T.isHierarchyRoot(U)&&(at=at.slice(1),vt-=1,it=1,Y+=1),at=at.filter(function(Mt){return Mt.y1<=Y});var ft=o(H.rotation);ft&&at.forEach(function(Mt){Mt.x0+=ft,Mt.x1+=ft});var ut=Math.min(vt,W),wt=function(Mt){return(Mt-it)/ut*pt},zt=function(Mt,te){return[Mt*Math.cos(te),-Mt*Math.sin(te)]},Pt=function(Mt){return S.pathAnnulus(Mt.rpx0,Mt.rpx1,Mt.x0,Mt.x1,st,tt)},Wt=function(Mt){return st+C(Mt)[0]*(Mt.transform.rCenter||0)+(Mt.transform.x||0)},Ht=function(Mt){return tt+C(Mt)[1]*(Mt.transform.rCenter||0)+(Mt.transform.y||0)};N=N.data(at,T.getPtId),N.enter().append("g").classed("slice",!0),R?N.exit().transition().each(function(){var Mt=$.select(this),te=Mt.select("path.surface");te.transition().attrTween("d",function(oe){var Te=de(oe);return function(He){return Pt(Te(He))}});var ve=Mt.select("g.slicetext");ve.attr("opacity",0)}).remove():N.exit().remove(),N.order();var Jt=null;if(R&&dt){var ge=T.getPtId(dt);N.each(function(Mt){Jt===null&&T.getPtId(Mt)===ge&&(Jt=Mt.x1)})}var he=N;R&&(he=he.transition().each("end",function(){var Mt=$.select(this);T.setSliceCursor(Mt,E,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),he.each(function(Mt){var te=$.select(this),ve=S.ensureSingle(te,"path","surface",function(ur){ur.style("pointer-events",k?"none":"all")});Mt.rpx0=wt(Mt.y0),Mt.rpx1=wt(Mt.y1),Mt.xmid=(Mt.x0+Mt.x1)/2,Mt.pxmid=zt(Mt.rpx1,Mt.xmid),Mt.midangle=-(Mt.xmid-Math.PI/2),Mt.startangle=-(Mt.x0-Math.PI/2),Mt.stopangle=-(Mt.x1-Math.PI/2),Mt.halfangle=.5*Math.min(S.angleDelta(Mt.x0,Mt.x1)||Math.PI,Math.PI),Mt.ring=1-Mt.rpx0/Mt.rpx1,Mt.rInscribed=_(Mt),R?ve.transition().attrTween("d",function(ur){var jr=se(ur);return function(Hr){return Pt(jr(Hr))}}):ve.attr("d",Pt),te.call(y,U,E,A,{eventDataKeys:v.eventDataKeys,transitionTime:v.CLICK_TRANSITION_TIME,transitionEasing:v.CLICK_TRANSITION_EASING}).call(T.setSliceCursor,E,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:E._transitioning}),ve.call(f,Mt,H,E);var oe=S.ensureSingle(te,"g","slicetext"),Te=S.ensureSingle(oe,"text","",function(ur){ur.attr("data-notex",1)}),He=S.ensureUniformFontSize(E,T.determineTextFont(H,Mt,w.font));Te.text(Q.formatSliceLabel(Mt,U,H,A,w)).classed("slicetext",!0).attr("text-anchor","middle").call(P.font,He).call(t.convertToTspans,E);var Ge=P.bBox(Te.node());Mt.transform=s(Ge,Mt,V),Mt.transform.targetX=Wt(Mt),Mt.transform.targetY=Ht(Mt);var cr=function(ur,jr){var Hr=ur.transform;return i(Hr,jr),Hr.fontSize=He.size,r(H.type,Hr,w),S.getTextTransform(Hr)};R?Te.transition().attrTween("transform",function(ur){var jr=Tt(ur);return function(Hr){return cr(jr(Hr),Ge)}}):Te.attr("transform",cr(Mt,Ge))});function de(Mt){var te=T.getPtId(Mt),ve=rt[te],oe=rt[T.getPtId(U)],Te;if(oe){var He=(Mt.x1>oe.x1?2*Math.PI:0)+ft;Te=Mt.rpx1Jt?2*Math.PI:0)+ft;ve={x0:Te,x1:Te}}else ve={rpx0:pt,rpx1:pt},S.extendFlat(ve,Lt(Mt));else ve={rpx0:0,rpx1:0};else ve={x0:ft,x1:ft};return g(ve,oe)}function Tt(Mt){var te=rt[T.getPtId(Mt)],ve,oe=Mt.transform;if(te)ve=te;else if(ve={rpx1:Mt.rpx1,transform:{textPosAngle:oe.textPosAngle,scale:0,rotate:oe.rotate,rCenter:oe.rCenter,x:oe.x,y:oe.y}},dt)if(Mt.parent)if(Jt){var Te=Mt.x1>Jt?2*Math.PI:0;ve.x0=ve.x1=Te}else S.extendFlat(ve,Lt(Mt));else ve.x0=ve.x1=ft;else ve.x0=ve.x1=ft;var He=g(ve.transform.textPosAngle,Mt.transform.textPosAngle),Ge=g(ve.rpx1,Mt.rpx1),cr=g(ve.x0,Mt.x0),ur=g(ve.x1,Mt.x1),jr=g(ve.transform.scale,oe.scale),Hr=g(ve.transform.rotate,oe.rotate),br=oe.rCenter===0?3:ve.transform.rCenter===0?1/3:1,Kr=g(ve.transform.rCenter,oe.rCenter),rn=function(Ce){return Kr(Math.pow(Ce,br))};return function(Ce){var Gt=Ge(Ce);cr(Ce),ur(Ce);var ne=rn(Ce),Ct=He(Ce),gt={rpx1:Gt,transform:{textPosAngle:Ct,rCenter:ne,x:oe.x,y:oe.y}};return r(H.type,oe,w),{transform:{targetX:Wt(gt),targetY:Ht(gt),scale:jr(Ce),rotate:Hr(Ce),rCenter:ne}}}}function Lt(Mt){var te=Mt.parent,ve=rt[T.getPtId(te)],oe={};if(ve){var Te=te.children,He=Te.indexOf(Mt),Ge=Te.length,cr=g(ve.x0,ve.x1);oe.x0=cr(He/Ge),oe.x1=cr(He/Ge)}else oe.x0=oe.x1=0;return oe}}function b(E){return c.partition().size([2*Math.PI,E.height+1])(E)}Q.formatSliceLabel=function(E,A,h,p,k){var w=h.texttemplate,R=h.textinfo;if(!w&&(!R||R==="none"))return"";var O=k.separators,N=p[0],V=E.data.data,H=N.hierarchy,F=T.isHierarchyRoot(E),U=T.getParent(H,E),W=T.getValue(E);if(!w){var q=R.split("+"),X=function(it){return q.indexOf(it)!==-1},lt=[],yt;if(X("label")&&V.label&<.push(V.label),V.hasOwnProperty("v")&&X("value")&<.push(T.formatValue(V.v,O)),!F){X("current path")&<.push(T.getPath(E.data));var pt=0;X("percent parent")&&pt++,X("percent entry")&&pt++,X("percent root")&&pt++;var st=pt>1;if(pt){var tt,dt=function(it){yt=T.formatPercent(tt,O),st&&(yt+=" of "+it),lt.push(yt)};X("percent parent")&&!F&&(tt=W/T.getValue(U),dt("parent")),X("percent entry")&&(tt=W/T.getValue(A),dt("entry")),X("percent root")&&(tt=W/T.getValue(H),dt("root"))}}return X("text")&&(yt=S.castOption(h,V.i,"text"),S.isValidTextValue(yt)&<.push(yt)),lt.join("
")}var rt=S.castOption(h,V.i,"texttemplate");if(!rt)return"";var at={};V.label&&(at.label=V.label),V.hasOwnProperty("v")&&(at.value=V.v,at.valueLabel=T.formatValue(V.v,O)),at.currentPath=T.getPath(E.data),F||(at.percentParent=W/T.getValue(U),at.percentParentLabel=T.formatPercent(at.percentParent,O),at.parent=T.getPtLabel(U)),at.percentEntry=W/T.getValue(A),at.percentEntryLabel=T.formatPercent(at.percentEntry,O),at.entry=T.getPtLabel(A),at.percentRoot=W/T.getValue(H),at.percentRootLabel=T.formatPercent(at.percentRoot,O),at.root=T.getPtLabel(H),V.hasOwnProperty("color")&&(at.color=V.color);var vt=S.castOption(h,V.i,"text");return(S.isValidTextValue(vt)||vt==="")&&(at.text=vt),at.customdata=S.castOption(h,V.i,"customdata"),S.texttemplateString({data:[at,h._meta],fallback:h.texttemplatefallback,labels:at,locale:k._d3locale,template:rt})};function _(E){return E.rpx0===0&&S.isFullCircle([E.x0,E.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(E.halfangle)),E.ring/2))}function C(E){return M(E.rpx1,E.transform.textPosAngle)}function M(E,A){return[E*Math.sin(A),-E*Math.cos(A)]}}),aj=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"sunburst",basePlotModule:bN(),categories:[],animatable:!0,attributes:Jw(),layoutAttributes:W7(),supplyDefaults:wN(),supplyLayoutDefaults:kN(),calc:t3().calc,crossTraceCalc:t3().crossTraceCalc,plot:Nk().plot,style:q9().style,colorbar:yo(),meta:{}}}),oj=Ft((Q,$)=>{$.exports=aj()}),sj=Ft(Q=>{var $=Kc();Q.name="treemap",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),mx=Ft((Q,$)=>{$.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}),jk=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=Ac(),t=jh().attributes,e=sx(),r=Jw(),a=mx(),n=ya().extendFlat,o=Ed().pattern;$.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:n({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:r.marker.colors,pattern:o,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:r.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:n({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:P({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:a.eventDataKeys}),hovertemplatefallback:P(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:r.root,domain:t({name:"treemap",trace:!0,editType:"calc"})}}),Z9=Ft((Q,$)=>{$.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),lj=Ft((Q,$)=>{var c=_n(),g=jk(),P=ui(),S=jh().defaults,t=em().handleText,e=ex().TEXTPAD,r=lx().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;$.exports=function(i,s,f,x){function y(p,k){return c.coerce(i,s,g,p,k)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){s.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth");var b=y("tiling.packing");b==="squarify"&&y("tiling.squarifyratio"),y("tiling.flip"),y("tiling.pad");var _=y("text");y("texttemplate"),y("texttemplatefallback"),s.texttemplate||y("textinfo",c.isArrayOrTypedArray(_)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var C=y("pathbar.visible"),M="auto";t(i,s,x,y,M,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition");var E=s.textposition.indexOf("bottom")!==-1;r(i,s,x,y);var A=s._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;A?o(i,s,x,y,{prefix:"marker.",cLetter:"c"}):y("marker.depthfade",!(s.marker.colors||[]).length);var h=s.textfont.size*2;y("marker.pad.t",E?h/4:h),y("marker.pad.l",h/4),y("marker.pad.r",h/4),y("marker.pad.b",E?h:h/4),y("marker.cornerradius"),s._hovered={marker:{line:{width:2,color:P.contrast(x.paper_bgcolor)}}},C&&(y("pathbar.thickness",s.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(s,x,y),s._length=null}}),uj=Ft((Q,$)=>{var c=_n(),g=Z9();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("treemapcolorway",S.colorway),t("extendtreemapcolors")}}),$9=Ft(Q=>{var $=t3();Q.calc=function(c,g){return $.calc(c,g)},Q.crossTraceCalc=function(c){return $._runCrossTraceCalc("treemap",c)}}),G9=Ft((Q,$)=>{$.exports=function c(g,P,S){var t;S.swapXY&&(t=g.x0,g.x0=g.y0,g.y0=t,t=g.x1,g.x1=g.y1,g.y1=t),S.flipX&&(t=g.x0,g.x0=P[0]-g.x1,g.x1=P[0]-t),S.flipY&&(t=g.y0,g.y0=P[1]-g.y1,g.y1=P[1]-t);var e=g.children;if(e)for(var r=0;r{var c=Qw(),g=G9();$.exports=function(S,t,e){var r=e.flipX,a=e.flipY,n=e.packing==="dice-slice",o=e.pad[a?"bottom":"top"],i=e.pad[r?"right":"left"],s=e.pad[r?"left":"right"],f=e.pad[a?"top":"bottom"],x;n&&(x=i,i=o,o=x,x=s,s=f,f=x);var y=c.treemap().tile(P(e.packing,e.squarifyratio)).paddingInner(e.pad.inner).paddingLeft(i).paddingRight(s).paddingTop(o).paddingBottom(f).size(n?[t[1],t[0]]:t)(S);return(n||r||a)&&g(y,t,{swapXY:n,flipX:r,flipY:a}),y};function P(S,t){switch(S){case"squarify":return c.treemapSquarify.ratio(t);case"binary":return c.treemapBinary;case"dice":return c.treemapDice;case"slice":return c.treemapSlice;default:return c.treemapSliceDice}}}),Uk=Ft((Q,$)=>{var c=En(),g=ui(),P=_n(),S=kv(),t=Up().resizeText,e=Bk();function r(n){var o=n._fullLayout._treemaplayer.selectAll(".trace");t(n,o,"treemap"),o.each(function(i){var s=c.select(this),f=i[0],x=f.trace;s.style("opacity",x.opacity),s.selectAll("path.surface").each(function(y){c.select(this).call(a,y,x,n,{hovered:!1})})})}function a(n,o,i,s,f){var x=(f||{}).hovered,y=o.data.data,v=y.i,T,u,b=y.color,_=S.isHierarchyRoot(o),C=1;if(x)T=i._hovered.marker.line.color,u=i._hovered.marker.line.width;else if(_&&b===i.root.color)C=100,T="rgba(0,0,0,0)",u=0;else if(T=P.castOption(i,v,"marker.line.color")||g.defaultLine,u=P.castOption(i,v,"marker.line.width")||0,!i._hasColorscale&&!o.onPathbar){var M=i.marker.depthfade;if(M){var E=g.combine(g.addOpacity(i._backgroundColor,.75),b),A;if(M===!0){var h=S.getMaxDepth(i);isFinite(h)?S.isLeaf(o)?A=0:A=i._maxVisibleLayers-(o.data.depth-i._entryDepth):A=o.data.height+1}else A=o.data.depth-i._entryDepth,i._atRootLevel||A++;if(A>0)for(var p=0;p{var c=En(),g=_n(),P=Vs(),S=tc(),t=Y9(),e=Uk().styleOne,r=mx(),a=kv(),n=g3(),o=!0;$.exports=function(i,s,f,x,y){var v=y.barDifY,T=y.width,u=y.height,b=y.viewX,_=y.viewY,C=y.pathSlice,M=y.toMoveInsideSlice,E=y.strTransform,A=y.hasTransition,h=y.handleSlicesExit,p=y.makeUpdateSliceInterpolator,k=y.makeUpdateTextInterpolator,w={},R=i._context.staticPlot,O=i._fullLayout,N=s[0],V=N.trace,H=N.hierarchy,F=T/V._entryDepth,U=a.listPath(f.data,"id"),W=t(H.copy(),[T,u],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();W=W.filter(function(X){var lt=U.indexOf(X.data.id);return lt===-1?!1:(X.x0=F*lt,X.x1=F*(lt+1),X.y0=v,X.y1=v+u,X.onPathbar=!0,!0)}),W.reverse(),x=x.data(W,a.getPtId),x.enter().append("g").classed("pathbar",!0),h(x,o,w,[T,u],C),x.order();var q=x;A&&(q=q.transition().each("end",function(){var X=c.select(this);a.setSliceCursor(X,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(X){X._x0=b(X.x0),X._x1=b(X.x1),X._y0=_(X.y0),X._y1=_(X.y1),X._hoverX=b(X.x1-Math.min(T,u)/2),X._hoverY=_(X.y1-u/2);var lt=c.select(this),yt=g.ensureSingle(lt,"path","surface",function(dt){dt.style("pointer-events",R?"none":"all")});A?yt.transition().attrTween("d",function(dt){var rt=p(dt,o,w,[T,u]);return function(at){return C(rt(at))}}):yt.attr("d",C),lt.call(n,f,i,s,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:i._transitioning}),yt.call(e,X,V,i,{hovered:!1}),X._text=(a.getPtLabel(X)||"").split("
").join(" ")||"";var pt=g.ensureSingle(lt,"g","slicetext"),st=g.ensureSingle(pt,"text","",function(dt){dt.attr("data-notex",1)}),tt=g.ensureUniformFontSize(i,a.determineTextFont(V,X,O.font,{onPathbar:!0}));st.text(X._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(P.font,tt).call(S.convertToTspans,i),X.textBB=P.bBox(st.node()),X.transform=M(X,{fontSize:tt.size,onPathbar:!0}),X.transform.fontSize=tt.size,A?st.transition().attrTween("transform",function(dt){var rt=k(dt,o,w,[T,u]);return function(at){return E(rt(at))}}):st.attr("transform",E(X))})}}),hj=Ft((Q,$)=>{var c=En(),g=(px(),ai(j1)).interpolate,P=kv(),S=_n(),t=ex().TEXTPAD,e=rx(),r=e.toMoveInsideBar,a=Up(),n=a.recordMinTextSize,o=mx(),i=cj();function s(f){return P.isHierarchyRoot(f)?"":P.getPtId(f)}$.exports=function(f,x,y,v,T){var u=f._fullLayout,b=x[0],_=b.trace,C=_.type,M=C==="icicle",E=b.hierarchy,A=P.findEntryWithLevel(E,_.level),h=c.select(y),p=h.selectAll("g.pathbar"),k=h.selectAll("g.slice");if(!A){p.remove(),k.remove();return}var w=P.isHierarchyRoot(A),R=!u.uniformtext.mode&&P.hasTransition(v),O=P.getMaxDepth(_),N=function(br){return br.data.depth-A.data.depth-1?U+X:-(q+X):0,yt={x0:W,x1:W,y0:lt,y1:lt+q},pt=function(br,Kr,rn){var Ce=_.tiling.pad,Gt=function(St){return St-Ce<=Kr.x0},ne=function(St){return St+Ce>=Kr.x1},Ct=function(St){return St-Ce<=Kr.y0},gt=function(St){return St+Ce>=Kr.y1};return br.x0===Kr.x0&&br.x1===Kr.x1&&br.y0===Kr.y0&&br.y1===Kr.y1?{x0:br.x0,x1:br.x1,y0:br.y0,y1:br.y1}:{x0:Gt(br.x0-Ce)?0:ne(br.x0-Ce)?rn[0]:br.x0,x1:Gt(br.x1+Ce)?0:ne(br.x1+Ce)?rn[0]:br.x1,y0:Ct(br.y0-Ce)?0:gt(br.y0-Ce)?rn[1]:br.y0,y1:Ct(br.y1+Ce)?0:gt(br.y1+Ce)?rn[1]:br.y1}},st=null,tt={},dt={},rt=null,at=function(br,Kr){return Kr?tt[s(br)]:dt[s(br)]},vt=function(br,Kr,rn,Ce){if(Kr)return tt[s(E)]||yt;var Gt=dt[_.level]||rn;return N(br)?pt(br,Gt,Ce):{}};b.hasMultipleRoots&&w&&O++,_._maxDepth=O,_._backgroundColor=u.paper_bgcolor,_._entryDepth=A.data.depth,_._atRootLevel=w;var it=-F/2+V.l+V.w*(H.x[1]+H.x[0])/2,Y=-U/2+V.t+V.h*(1-(H.y[1]+H.y[0])/2),ft=function(br){return it+br},ut=function(br){return Y+br},wt=ut(0),zt=ft(0),Pt=function(br){return zt+br},Wt=function(br){return wt+br};function Ht(br,Kr){return br+","+Kr}var Jt=Pt(0),ge=function(br){br.x=Math.max(Jt,br.x)},he=_.pathbar.edgeshape,de=function(br){var Kr=Pt(Math.max(Math.min(br.x0,br.x0),0)),rn=Pt(Math.min(Math.max(br.x1,br.x1),W)),Ce=Wt(br.y0),Gt=Wt(br.y1),ne=q/2,Ct={},gt={};Ct.x=Kr,gt.x=rn,Ct.y=gt.y=(Ce+Gt)/2;var St={x:Kr,y:Ce},Nt={x:rn,y:Ce},re={x:rn,y:Gt},le={x:Kr,y:Gt};return he===">"?(St.x-=ne,Nt.x-=ne,re.x-=ne,le.x-=ne):he==="/"?(re.x-=ne,le.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):he==="\\"?(St.x-=ne,Nt.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):he==="<"&&(Ct.x-=ne,gt.x-=ne),ge(St),ge(le),ge(Ct),ge(Nt),ge(re),ge(gt),"M"+Ht(St.x,St.y)+"L"+Ht(Nt.x,Nt.y)+"L"+Ht(gt.x,gt.y)+"L"+Ht(re.x,re.y)+"L"+Ht(le.x,le.y)+"L"+Ht(Ct.x,Ct.y)+"Z"},se=_[M?"tiling":"marker"].pad,Tt=function(br){return _.textposition.indexOf(br)!==-1},Lt=Tt("top"),Mt=Tt("left"),te=Tt("right"),ve=Tt("bottom"),oe=function(br){var Kr=ft(br.x0),rn=ft(br.x1),Ce=ut(br.y0),Gt=ut(br.y1),ne=rn-Kr,Ct=Gt-Ce;if(!ne||!Ct)return"";var gt=_.marker.cornerradius||0,St=Math.min(gt,ne/2,Ct/2);St&&br.data&&br.data.data&&br.data.data.label&&(Lt&&(St=Math.min(St,se.t)),Mt&&(St=Math.min(St,se.l)),te&&(St=Math.min(St,se.r)),ve&&(St=Math.min(St,se.b)));var Nt=function(re,le){return St?"a"+Ht(St,St)+" 0 0 1 "+Ht(re,le):""};return"M"+Ht(Kr,Ce+St)+Nt(St,-St)+"L"+Ht(rn-St,Ce)+Nt(St,St)+"L"+Ht(rn,Gt-St)+Nt(-St,St)+"L"+Ht(Kr+St,Gt)+Nt(-St,-St)+"Z"},Te=function(br,Kr){var rn=br.x0,Ce=br.x1,Gt=br.y0,ne=br.y1,Ct=br.textBB,gt=Lt||Kr.isHeader&&!ve,St=gt?"start":ve?"end":"middle",Nt=Tt("right"),re=Tt("left")||Kr.onPathbar,le=re?-1:Nt?1:0;if(Kr.isHeader){if(rn+=(M?se:se.l)-t,Ce-=(M?se:se.r)-t,rn>=Ce){var we=(rn+Ce)/2;rn=we,Ce=we}var Ue;ve?(Ue=ne-(M?se:se.b),Gt{var c=En(),g=kv(),P=Up(),S=P.clearMinTextSize,t=wm().resizeText,e=hj();$.exports=function(r,a,n,o,i){var s=i.type,f=i.drawDescendants,x=r._fullLayout,y=x["_"+s+"layer"],v,T,u=!n;if(S(s,x),v=y.selectAll("g.trace."+s).data(a,function(_){return _[0].trace.uid}),v.enter().append("g").classed("trace",!0).classed(s,!0),v.order(),!x.uniformtext.mode&&g.hasTransition(n)){o&&(T=o());var b=c.transition().duration(n.duration).ease(n.easing).each("end",function(){T&&T()}).each("interrupt",function(){T&&T()});b.each(function(){y.selectAll("g.trace").each(function(_){e(r,_,this,n,f)})})}else v.each(function(_){e(r,_,this,n,f)}),x.uniformtext.mode&&t(r,y.selectAll(".trace"),s);u&&v.exit().remove()}}),fj=Ft((Q,$)=>{var c=En(),g=_n(),P=Vs(),S=tc(),t=Y9(),e=Uk().styleOne,r=mx(),a=kv(),n=g3(),o=Nk().formatSliceLabel,i=!1;$.exports=function(s,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,C=v.pathSlice,M=v.toMoveInsideSlice,E=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,R={},O=s._context.staticPlot,N=s._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=!W&&!H.marker.pad.t||W&&!H.marker.pad.b,X=t(x,[T,u],{packing:H.tiling.packing,squarifyratio:H.tiling.squarifyratio,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,pad:{inner:H.tiling.pad,top:H.marker.pad.t,left:H.marker.pad.l,right:H.marker.pad.r,bottom:H.marker.pad.b}}),lt=X.descendants(),yt=1/0,pt=-1/0;lt.forEach(function(at){var vt=at.depth;vt>=H._maxDepth?(at.x0=at.x1=(at.x0+at.x1)/2,at.y0=at.y1=(at.y0+at.y1)/2):(yt=Math.min(yt,vt),pt=Math.max(pt,vt))}),y=y.data(lt,a.getPtId),H._maxVisibleLayers=isFinite(pt)?pt-yt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,R,[T,u],C),y.order();var st=null;if(A&&w){var tt=a.getPtId(w);y.each(function(at){st===null&&a.getPtId(at)===tt&&(st={x0:at.x0,x1:at.x1,y0:at.y0,y1:at.y1})})}var dt=function(){return st||{x0:0,x1:T,y0:0,y1:u}},rt=y;return A&&(rt=rt.transition().each("end",function(){var at=c.select(this);a.setSliceCursor(at,s,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),rt.each(function(at){var vt=a.isHeader(at,H);at._x0=b(at.x0),at._x1=b(at.x1),at._y0=_(at.y0),at._y1=_(at.y1),at._hoverX=b(at.x1-H.marker.pad.r),at._hoverY=_(W?at.y1-H.marker.pad.b/2:at.y0+H.marker.pad.t/2);var it=c.select(this),Y=g.ensureSingle(it,"path","surface",function(Wt){Wt.style("pointer-events",O?"none":"all")});A?Y.transition().attrTween("d",function(Wt){var Ht=p(Wt,i,dt(),[T,u]);return function(Jt){return C(Ht(Jt))}}):Y.attr("d",C),it.call(n,x,s,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,s,{isTransitioning:s._transitioning}),Y.call(e,at,H,s,{hovered:!1}),at.x0===at.x1||at.y0===at.y1?at._text="":vt?at._text=q?"":a.getPtLabel(at)||"":at._text=o(at,x,H,f,N)||"";var ft=g.ensureSingle(it,"g","slicetext"),ut=g.ensureSingle(ft,"text","",function(Wt){Wt.attr("data-notex",1)}),wt=g.ensureUniformFontSize(s,a.determineTextFont(H,at,N.font)),zt=at._text||" ",Pt=vt&&zt.indexOf("
")===-1;ut.text(zt).classed("slicetext",!0).attr("text-anchor",U?"end":F||Pt?"start":"middle").call(P.font,wt).call(S.convertToTspans,s),at.textBB=P.bBox(ut.node()),at.transform=M(at,{fontSize:wt.size,isHeader:vt}),at.transform.fontSize=wt.size,A?ut.transition().attrTween("transform",function(Wt){var Ht=k(Wt,i,dt(),[T,u]);return function(Jt){return E(Ht(Jt))}}):ut.attr("transform",E(at))}),st}}),dj=Ft((Q,$)=>{var c=K9(),g=fj();$.exports=function(P,S,t,e){return c(P,S,t,e,{type:"treemap",drawDescendants:g})}}),pj=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"treemap",basePlotModule:sj(),categories:[],animatable:!0,attributes:jk(),layoutAttributes:Z9(),supplyDefaults:lj(),supplyLayoutDefaults:uj(),calc:$9().calc,crossTraceCalc:$9().crossTraceCalc,plot:dj(),style:Uk().style,colorbar:yo(),meta:{}}}),mj=Ft((Q,$)=>{$.exports=pj()}),gj=Ft(Q=>{var $=Kc();Q.name="icicle",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),X9=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=Ac(),t=jh().attributes,e=sx(),r=Jw(),a=jk(),n=mx(),o=ya().extendFlat,i=Ed().pattern;$.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:o({colors:r.marker.colors,line:r.marker.line,pattern:i,editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),leaf:r.leaf,pathbar:a.pathbar,text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:P({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:n.eventDataKeys}),hovertemplatefallback:P(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:e.sort,root:r.root,domain:t({name:"icicle",trace:!0,editType:"calc"})}}),J9=Ft((Q,$)=>{$.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),vj=Ft((Q,$)=>{var c=_n(),g=X9(),P=ui(),S=jh().defaults,t=em().handleText,e=ex().TEXTPAD,r=lx().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;$.exports=function(i,s,f,x){function y(E,A){return c.coerce(i,s,g,E,A)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){s.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth"),y("tiling.orientation"),y("tiling.flip"),y("tiling.pad");var b=y("text");y("texttemplate"),y("texttemplatefallback"),s.texttemplate||y("textinfo",c.isArrayOrTypedArray(b)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var _=y("pathbar.visible"),C="auto";t(i,s,x,y,C,{hasPathbar:_,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition"),r(i,s,x,y);var M=s._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;M&&o(i,s,x,y,{prefix:"marker.",cLetter:"c"}),y("leaf.opacity",M?1:.7),s._hovered={marker:{line:{width:2,color:P.contrast(x.paper_bgcolor)}}},_&&(y("pathbar.thickness",s.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(s,x,y),s._length=null}}),yj=Ft((Q,$)=>{var c=_n(),g=J9();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("iciclecolorway",S.colorway),t("extendiciclecolors")}}),Q9=Ft(Q=>{var $=t3();Q.calc=function(c,g){return $.calc(c,g)},Q.crossTraceCalc=function(c){return $._runCrossTraceCalc("icicle",c)}}),xj=Ft((Q,$)=>{var c=Qw(),g=G9();$.exports=function(P,S,t){var e=t.flipX,r=t.flipY,a=t.orientation==="h",n=t.maxDepth,o=S[0],i=S[1];n&&(o=(P.height+1)*S[0]/Math.min(P.height+1,n),i=(P.height+1)*S[1]/Math.min(P.height+1,n));var s=c.partition().padding(t.pad.inner).size(a?[S[1],o]:[S[0],i])(P);return(a||e||r)&&g(s,S,{swapXY:a,flipX:e,flipY:r}),s}}),tS=Ft((Q,$)=>{var c=En(),g=ui(),P=_n(),S=Up().resizeText,t=Bk();function e(a){var n=a._fullLayout._iciclelayer.selectAll(".trace");S(a,n,"icicle"),n.each(function(o){var i=c.select(this),s=o[0],f=s.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var s=n.data.data,f=!n.children,x=s.i,y=P.castOption(o,x,"marker.line.color")||g.defaultLine,v=P.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}$.exports={style:e,styleOne:r}}),_j=Ft((Q,$)=>{var c=En(),g=_n(),P=Vs(),S=tc(),t=xj(),e=tS().styleOne,r=mx(),a=kv(),n=g3(),o=Nk().formatSliceLabel,i=!1;$.exports=function(s,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,C=v.pathSlice,M=v.toMoveInsideSlice,E=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,R={},O=s._context.staticPlot,N=s._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=t(x,[T,u],{flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,orientation:H.tiling.orientation,pad:{inner:H.tiling.pad},maxDepth:H._maxDepth}),X=q.descendants(),lt=1/0,yt=-1/0;X.forEach(function(rt){var at=rt.depth;at>=H._maxDepth?(rt.x0=rt.x1=(rt.x0+rt.x1)/2,rt.y0=rt.y1=(rt.y0+rt.y1)/2):(lt=Math.min(lt,at),yt=Math.max(yt,at))}),y=y.data(X,a.getPtId),H._maxVisibleLayers=isFinite(yt)?yt-lt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,R,[T,u],C),y.order();var pt=null;if(A&&w){var st=a.getPtId(w);y.each(function(rt){pt===null&&a.getPtId(rt)===st&&(pt={x0:rt.x0,x1:rt.x1,y0:rt.y0,y1:rt.y1})})}var tt=function(){return pt||{x0:0,x1:T,y0:0,y1:u}},dt=y;return A&&(dt=dt.transition().each("end",function(){var rt=c.select(this);a.setSliceCursor(rt,s,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),dt.each(function(rt){rt._x0=b(rt.x0),rt._x1=b(rt.x1),rt._y0=_(rt.y0),rt._y1=_(rt.y1),rt._hoverX=b(rt.x1-H.tiling.pad),rt._hoverY=_(W?rt.y1-H.tiling.pad/2:rt.y0+H.tiling.pad/2);var at=c.select(this),vt=g.ensureSingle(at,"path","surface",function(ut){ut.style("pointer-events",O?"none":"all")});A?vt.transition().attrTween("d",function(ut){var wt=p(ut,i,tt(),[T,u],{orientation:H.tiling.orientation,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1});return function(zt){return C(wt(zt))}}):vt.attr("d",C),at.call(n,x,s,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,s,{isTransitioning:s._transitioning}),vt.call(e,rt,H,s,{hovered:!1}),rt.x0===rt.x1||rt.y0===rt.y1?rt._text="":rt._text=o(rt,x,H,f,N)||"";var it=g.ensureSingle(at,"g","slicetext"),Y=g.ensureSingle(it,"text","",function(ut){ut.attr("data-notex",1)}),ft=g.ensureUniformFontSize(s,a.determineTextFont(H,rt,N.font));Y.text(rt._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":F?"start":"middle").call(P.font,ft).call(S.convertToTspans,s),rt.textBB=P.bBox(Y.node()),rt.transform=M(rt,{fontSize:ft.size}),rt.transform.fontSize=ft.size,A?Y.transition().attrTween("transform",function(ut){var wt=k(ut,i,tt(),[T,u]);return function(zt){return E(wt(zt))}}):Y.attr("transform",E(rt))}),pt}}),bj=Ft((Q,$)=>{var c=K9(),g=_j();$.exports=function(P,S,t,e){return c(P,S,t,e,{type:"icicle",drawDescendants:g})}}),wj=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"icicle",basePlotModule:gj(),categories:[],animatable:!0,attributes:X9(),layoutAttributes:J9(),supplyDefaults:vj(),supplyLayoutDefaults:yj(),calc:Q9().calc,crossTraceCalc:Q9().crossTraceCalc,plot:bj(),style:tS().style,colorbar:yo(),meta:{}}}),kj=Ft((Q,$)=>{$.exports=wj()}),Tj=Ft(Q=>{var $=Kc();Q.name="funnelarea",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),eS=Ft((Q,$)=>{var c=sx(),g=Yo(),P=jh().attributes,{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=$u(),r=ya().extendFlat;$.exports={labels:c.labels,label0:c.label0,dlabel:c.dlabel,values:c.values,marker:{colors:c.marker.colors,line:{color:r({},c.marker.line.color,{dflt:null}),width:r({},c.marker.line.width,{dflt:1}),editType:"calc"},pattern:c.marker.pattern,editType:"calc"},text:c.text,hovertext:c.hovertext,scalegroup:r({},c.scalegroup,{}),textinfo:r({},c.textinfo,{flags:["label","text","value","percent"]}),texttemplate:t({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:r({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:r({},c.textposition,{values:["inside","none"],dflt:"inside"}),textfont:c.textfont,insidetextfont:c.insidetextfont,title:{text:c.title.text,font:c.title.font,position:r({},c.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:P({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}),rS=Ft((Q,$)=>{var c=lk().hiddenlabels;$.exports={hiddenlabels:c,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),Aj=Ft((Q,$)=>{var c=_n(),g=eS(),P=jh().defaults,S=em().handleText,t=lx().handleLabelsAndValues,e=lx().handleMarkerDefaults;$.exports=function(r,a,n,o){function i(C,M){return c.coerce(r,a,g,C,M)}var s=i("labels"),f=i("values"),x=t(s,f),y=x.len;if(a._hasLabels=x.hasLabels,a._hasValues=x.hasValues,!a._hasLabels&&a._hasValues&&(i("label0"),i("dlabel")),!y){a.visible=!1;return}a._length=y,e(r,a,o,i),i("scalegroup");var v=i("text"),T=i("texttemplate");i("texttemplatefallback");var u;if(T||(u=i("textinfo",Array.isArray(v)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),T||u&&u!=="none"){var b=i("textposition");S(r,a,o,i,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else u==="none"&&i("textposition","none");P(a,o,i);var _=i("title.text");_&&(i("title.position"),c.coerceFont(i,"title.font",o.font)),i("aspectratio"),i("baseratio")}}),Mj=Ft((Q,$)=>{var c=_n(),g=rS();$.exports=function(P,S){function t(e,r){return c.coerce(P,S,g,e,r)}t("hiddenlabels"),t("funnelareacolorway",S.colorway),t("extendfunnelareacolors")}}),nS=Ft((Q,$)=>{var c=cb();function g(S,t){return c.calc(S,t)}function P(S){c.crossTraceCalc(S,{type:"funnelarea"})}$.exports={calc:g,crossTraceCalc:P}}),Sj=Ft((Q,$)=>{var c=En(),g=Vs(),P=_n(),S=P.strScale,t=P.strTranslate,e=tc(),r=rx(),a=r.toMoveInsideBar,n=Up(),o=n.recordMinTextSize,i=n.clearMinTextSize,s=wg(),f=uk(),x=f.attachFxHandlers,y=f.determineInsideTextFont,v=f.layoutAreas,T=f.prerenderTitles,u=f.positionTitleOutside,b=f.formatSliceLabel;$.exports=function(E,A){var h=E._context.staticPlot,p=E._fullLayout;i("funnelarea",p),T(A,E),v(A,p._size),P.makeTraceGroups(p._funnelarealayer,A,"trace").each(function(k){var w=c.select(this),R=k[0],O=R.trace;M(k),w.each(function(){var N=c.select(this).selectAll("g.slice").data(k);N.enter().append("g").classed("slice",!0),N.exit().remove(),N.each(function(H,F){if(H.hidden){c.select(this).selectAll("path,g").remove();return}H.pointNumber=H.i,H.curveNumber=O.index;var U=R.cx,W=R.cy,q=c.select(this),X=q.selectAll("path.surface").data([H]);X.enter().append("path").classed("surface",!0).style({"pointer-events":h?"none":"all"}),q.call(x,E,k);var lt="M"+(U+H.TR[0])+","+(W+H.TR[1])+_(H.TR,H.BR)+_(H.BR,H.BL)+_(H.BL,H.TL)+"Z";X.attr("d",lt),b(E,H,R);var yt=s.castOption(O.textposition,H.pts),pt=q.selectAll("g.slicetext").data(H.text&&yt!=="none"?[0]:[]);pt.enter().append("g").classed("slicetext",!0),pt.exit().remove(),pt.each(function(){var st=P.ensureSingle(c.select(this),"text","",function(ft){ft.attr("data-notex",1)}),tt=P.ensureUniformFontSize(E,y(O,H,p.font));st.text(H.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(g.font,tt).call(e.convertToTspans,E);var dt=g.bBox(st.node()),rt,at,vt,it=Math.min(H.BL[1],H.BR[1])+W,Y=Math.max(H.TL[1],H.TR[1])+W;at=Math.max(H.TL[0],H.BL[0])+U,vt=Math.min(H.TR[0],H.BR[0])+U,rt=a(at,vt,it,Y,dt,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),rt.fontSize=tt.size,o(O.type,rt,p),k[F].transform=rt,P.setTransormAndDisplay(st,rt)})});var V=c.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);V.enter().append("g").classed("titletext",!0),V.exit().remove(),V.each(function(){var H=P.ensureSingle(c.select(this),"text","",function(W){W.attr("data-notex",1)}),F=O.title.text;O._meta&&(F=P.templateString(F,O._meta)),H.text(F).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(g.font,O.title.font).call(e.convertToTspans,E);var U=u(R,p._size);H.attr("transform",t(U.x,U.y)+S(Math.min(1,U.scale))+t(U.tx,U.ty))})})})};function _(E,A){var h=A[0]-E[0],p=A[1]-E[1];return"l"+h+","+p}function C(E,A){return[.5*(E[0]+A[0]),.5*(E[1]+A[1])]}function M(E){if(!E.length)return;var A=E[0],h=A.trace,p=h.aspectratio,k=h.baseratio;k>.999&&(k=.999);var w=Math.pow(k,2),R=A.vTotal,O=R*w/(1-w),N=R,V=O/R;function H(){var wt=Math.sqrt(V);return{x:wt,y:-wt}}function F(){var wt=H();return[wt.x,wt.y]}var U,W=[];W.push(F());var q,X;for(q=E.length-1;q>-1;q--)if(X=E[q],!X.hidden){var lt=X.v/N;V+=lt,W.push(F())}var yt=1/0,pt=-1/0;for(q=0;q-1;q--)if(X=E[q],!X.hidden){Y+=1;var ft=W[Y][0],ut=W[Y][1];X.TL=[-ft,ut],X.TR=[ft,ut],X.BL=vt,X.BR=it,X.pxmid=C(X.TR,X.BR),vt=X.TL,it=X.TR}}}),Ej=Ft((Q,$)=>{var c=En(),g=kg(),P=Up().resizeText;$.exports=function(S){var t=S._fullLayout._funnelarealayer.selectAll(".trace");P(S,t,"funnelarea"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),Cj=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Tj(),categories:["pie-like","funnelarea","showLegend"],attributes:eS(),layoutAttributes:rS(),supplyDefaults:Aj(),supplyLayoutDefaults:Mj(),calc:nS().calc,crossTraceCalc:nS().crossTraceCalc,plot:Sj(),style:Ej(),styleOne:kg(),meta:{}}}),Lj=Ft((Q,$)=>{$.exports=Cj()}),pp=Ft((Q,$)=>{(function(){var c={24:function(t){var e={left:0,top:0};t.exports=r;function r(n,o,i){o=o||n.currentTarget||n.srcElement,Array.isArray(i)||(i=[0,0]);var s=n.clientX||0,f=n.clientY||0,x=a(o);return i[0]=s-x.left,i[1]=f-x.top,i}function a(n){return n===window||n===document||n===document.body?e:n.getBoundingClientRect()}},109:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],s=n[2],f=a[0]-i,x=a[2]-s,y=Math.sin(o),v=Math.cos(o);return r[0]=i+x*y+f*v,r[1]=a[1],r[2]=s+x*v-f*y,r}},160:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.max(a[0],n[0]),r[1]=Math.max(a[1],n[1]),r[2]=Math.max(a[2],n[2]),r[3]=Math.max(a[3],n[3]),r}},216:function(t){t.exports=e;function e(r,a){for(var n={},o=0;o1){y[0]in f||(f[y[0]]=[]),f=f[y[0]];for(var v=1;v=0;--U){var dt=H[U];W=dt[0];var rt=N[W],at=rt[0],vt=rt[1],it=O[at],Y=O[vt];if((it[0]-Y[0]||it[1]-Y[1])<0){var ft=at;at=vt,vt=ft}rt[0]=at;var ut=rt[1]=dt[1],wt;for(F&&(wt=rt[2]);U>0&&H[U-1][0]===W;){var dt=H[--U],zt=dt[1];F?N.push([ut,zt,wt]):N.push([ut,zt]),ut=zt}F?N.push([ut,vt,wt]):N.push([ut,vt])}return q}function E(O,N,V){for(var H=N.length,F=new a(H),U=[],W=0;WN[2]?1:0)}function p(O,N,V){if(O.length!==0){if(N)for(var H=0;H0||W.length>0}function R(O,N,V){var H;if(V){H=N;for(var F=new Array(N.length),U=0;U{});function bv(){}function n9(){return this.rgb().formatHex()}function ZN(){return this.rgb().formatHex8()}function GN(){return u9(this).formatHsl()}function i9(){return this.rgb().formatRgb()}function cb(Q){var Z,c;return Q=(Q+"").trim().toLowerCase(),(Z=h9.exec(Q))?(c=Z[1].length,Z=parseInt(Z[1],16),c===6?a9(Z):c===3?new cp(Z>>8&15|Z>>4&240,Z>>4&15|Z&240,(Z&15)<<4|Z&15,1):c===8?i3(Z>>24&255,Z>>16&255,Z>>8&255,(Z&255)/255):c===4?i3(Z>>12&15|Z>>8&240,Z>>8&15|Z>>4&240,Z>>4&15|Z&240,((Z&15)<<4|Z&15)/255):null):(Z=f9.exec(Q))?new cp(Z[1],Z[2],Z[3],1):(Z=d9.exec(Q))?new cp(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,1):(Z=p9.exec(Q))?i3(Z[1],Z[2],Z[3],Z[4]):(Z=m9.exec(Q))?i3(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,Z[4]):(Z=g9.exec(Q))?l9(Z[1],Z[2]/100,Z[3]/100,1):(Z=v9.exec(Q))?l9(Z[1],Z[2]/100,Z[3]/100,Z[4]):bk.hasOwnProperty(Q)?a9(bk[Q]):Q==="transparent"?new cp(NaN,NaN,NaN,0):null}function a9(Q){return new cp(Q>>16&255,Q>>8&255,Q&255,1)}function i3(Q,Z,c,g){return g<=0&&(Q=Z=c=NaN),new cp(Q,Z,c,g)}function yk(Q){return Q instanceof bv||(Q=cb(Q)),Q?(Q=Q.rgb(),new cp(Q.r,Q.g,Q.b,Q.opacity)):new cp}function a3(Q,Z,c,g){return arguments.length===1?yk(Q):new cp(Q,Z,c,g??1)}function cp(Q,Z,c,g){this.r=+Q,this.g=+Z,this.b=+c,this.opacity=+g}function o9(){return`#${D1(this.r)}${D1(this.g)}${D1(this.b)}`}function YN(){return`#${D1(this.r)}${D1(this.g)}${D1(this.b)}${D1((isNaN(this.opacity)?1:this.opacity)*255)}`}function s9(){let Q=o3(this.opacity);return`${Q===1?"rgb(":"rgba("}${O1(this.r)}, ${O1(this.g)}, ${O1(this.b)}${Q===1?")":`, ${Q})`}`}function o3(Q){return isNaN(Q)?1:Math.max(0,Math.min(1,Q))}function O1(Q){return Math.max(0,Math.min(255,Math.round(Q)||0))}function D1(Q){return Q=O1(Q),(Q<16?"0":"")+Q.toString(16)}function l9(Q,Z,c,g){return g<=0?Q=Z=c=NaN:c<=0||c>=1?Q=Z=NaN:Z<=0&&(Q=NaN),new _m(Q,Z,c,g)}function u9(Q){if(Q instanceof _m)return new _m(Q.h,Q.s,Q.l,Q.opacity);if(Q instanceof bv||(Q=cb(Q)),!Q)return new _m;if(Q instanceof _m)return Q;Q=Q.rgb();var Z=Q.r/255,c=Q.g/255,g=Q.b/255,I=Math.min(Z,c,g),S=Math.max(Z,c,g),t=NaN,e=S-I,r=(S+I)/2;return e?(Z===S?t=(c-g)/e+(c0&&r<1?0:t,new _m(t,e,r,Q.opacity)}function xk(Q,Z,c,g){return arguments.length===1?u9(Q):new _m(Q,Z,c,g??1)}function _m(Q,Z,c,g){this.h=+Q,this.s=+Z,this.l=+c,this.opacity=+g}function c9(Q){return Q=(Q||0)%360,Q<0?Q+360:Q}function s3(Q){return Math.max(0,Math.min(1,Q||0))}function _k(Q,Z,c){return(Q<60?Z+(c-Z)*Q/60:Q<180?c:Q<240?Z+(c-Z)*(240-Q)/60:Z)*255}var wv,F1,R1,hx,bm,h9,f9,d9,p9,m9,g9,v9,bk,wk=mn(()=>{vk(),wv=.7,F1=1/wv,R1="\\s*([+-]?\\d+)\\s*",hx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",h9=/^#([0-9a-f]{3,8})$/,f9=new RegExp(`^rgb\\(${R1},${R1},${R1}\\)$`),d9=new RegExp(`^rgb\\(${bm},${bm},${bm}\\)$`),p9=new RegExp(`^rgba\\(${R1},${R1},${R1},${hx}\\)$`),m9=new RegExp(`^rgba\\(${bm},${bm},${bm},${hx}\\)$`),g9=new RegExp(`^hsl\\(${hx},${bm},${bm}\\)$`),v9=new RegExp(`^hsla\\(${hx},${bm},${bm},${hx}\\)$`),bk={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},cx(bv,cb,{copy(Q){return Object.assign(new this.constructor,this,Q)},displayable(){return this.rgb().displayable()},hex:n9,formatHex:n9,formatHex8:ZN,formatHsl:GN,formatRgb:i9,toString:i9}),cx(cp,a3,ub(bv,{brighter(Q){return Q=Q==null?F1:Math.pow(F1,Q),new cp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new cp(this.r*Q,this.g*Q,this.b*Q,this.opacity)},rgb(){return this},clamp(){return new cp(O1(this.r),O1(this.g),O1(this.b),o3(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:o9,formatHex:o9,formatHex8:YN,formatRgb:s9,toString:s9})),cx(_m,xk,ub(bv,{brighter(Q){return Q=Q==null?F1:Math.pow(F1,Q),new _m(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new _m(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=this.h%360+(this.h<0)*360,Z=isNaN(Q)||isNaN(this.s)?0:this.s,c=this.l,g=c+(c<.5?c:1-c)*Z,I=2*c-g;return new cp(_k(Q>=240?Q-240:Q+120,I,g),_k(Q,I,g),_k(Q<120?Q+240:Q-120,I,g),this.opacity)},clamp(){return new _m(c9(this.h),s3(this.s),s3(this.l),o3(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let Q=o3(this.opacity);return`${Q===1?"hsl(":"hsla("}${c9(this.h)}, ${s3(this.s)*100}%, ${s3(this.l)*100}%${Q===1?")":`, ${Q})`}`}}))}),kk,Tk,y9=mn(()=>{kk=Math.PI/180,Tk=180/Math.PI});function x9(Q){if(Q instanceof qm)return new qm(Q.l,Q.a,Q.b,Q.opacity);if(Q instanceof Pg)return _9(Q);Q instanceof cp||(Q=yk(Q));var Z=Ck(Q.r),c=Ck(Q.g),g=Ck(Q.b),I=Mk((.2225045*Z+.7168786*c+.0606169*g)/Ik),S,t;return Z===c&&c===g?S=t=I:(S=Mk((.4360747*Z+.3850649*c+.1430804*g)/Pk),t=Mk((.0139322*Z+.0971045*c+.7141733*g)/zk)),new qm(116*I-16,500*(S-I),200*(I-t),Q.opacity)}function Ak(Q,Z,c,g){return arguments.length===1?x9(Q):new qm(Q,Z,c,g??1)}function qm(Q,Z,c,g){this.l=+Q,this.a=+Z,this.b=+c,this.opacity=+g}function Mk(Q){return Q>b9?Math.pow(Q,.3333333333333333):Q/Dk+Ok}function Sk(Q){return Q>B1?Q*Q*Q:Dk*(Q-Ok)}function Ek(Q){return 255*(Q<=.0031308?12.92*Q:1.055*Math.pow(Q,.4166666666666667)-.055)}function Ck(Q){return(Q/=255)<=.04045?Q/12.92:Math.pow((Q+.055)/1.055,2.4)}function KN(Q){if(Q instanceof Pg)return new Pg(Q.h,Q.c,Q.l,Q.opacity);if(Q instanceof qm||(Q=x9(Q)),Q.a===0&&Q.b===0)return new Pg(NaN,0{vk(),wk(),y9(),hb=18,Pk=.96422,Ik=1,zk=.82521,Ok=4/29,B1=6/29,Dk=3*B1*B1,b9=B1*B1*B1,cx(qm,Ak,ub(bv,{brighter(Q){return new qm(this.l+hb*(Q??1),this.a,this.b,this.opacity)},darker(Q){return new qm(this.l-hb*(Q??1),this.a,this.b,this.opacity)},rgb(){var Q=(this.l+16)/116,Z=isNaN(this.a)?Q:Q+this.a/500,c=isNaN(this.b)?Q:Q-this.b/200;return Z=Pk*Sk(Z),Q=Ik*Sk(Q),c=zk*Sk(c),new cp(Ek(3.1338561*Z-1.6168667*Q-.4906146*c),Ek(-.9787684*Z+1.9161415*Q+.033454*c),Ek(.0719453*Z-.2289914*Q+1.4052427*c),this.opacity)}})),cx(Pg,Lk,ub(bv,{brighter(Q){return new Pg(this.h,this.c,this.l+hb*(Q??1),this.opacity)},darker(Q){return new Pg(this.h,this.c,this.l-hb*(Q??1),this.opacity)},rgb(){return _9(this).rgb()}}))});function JN(Q){if(Q instanceof N1)return new N1(Q.h,Q.s,Q.l,Q.opacity);Q instanceof cp||(Q=yk(Q));var Z=Q.r/255,c=Q.g/255,g=Q.b/255,I=(jk*g+Bk*Z-Nk*c)/(jk+Bk-Nk),S=g-I,t=(fx*(c-I)-u3*S)/fb,e=Math.sqrt(t*t+S*S)/(fx*I*(1-I)),r=e?Math.atan2(t,S)*Tk-120:NaN;return new N1(r<0?r+360:r,e,I,Q.opacity)}function Fk(Q,Z,c,g){return arguments.length===1?JN(Q):new N1(Q,Z,c,g??1)}function N1(Q,Z,c,g){this.h=+Q,this.s=+Z,this.l=+c,this.opacity=+g}var Rk,l3,u3,fb,fx,Bk,Nk,jk,QN=mn(()=>{vk(),wk(),y9(),Rk=-.14861,l3=1.78277,u3=-.29227,fb=-.90649,fx=1.97294,Bk=fx*fb,Nk=fx*l3,jk=l3*u3-fb*Rk,cx(N1,Fk,ub(bv,{brighter(Q){return Q=Q==null?F1:Math.pow(F1,Q),new N1(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?wv:Math.pow(wv,Q),new N1(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=isNaN(this.h)?0:(this.h+120)*kk,Z=+this.l,c=isNaN(this.s)?0:this.s*Z*(1-Z),g=Math.cos(Q),I=Math.sin(Q);return new cp(255*(Z+c*(Rk*g+l3*I)),255*(Z+c*(u3*g+fb*I)),255*(Z+c*(fx*g)),this.opacity)}}))}),dx=mn(()=>{wk(),XN(),QN()});function w9(Q,Z,c,g,I){var S=Q*Q,t=S*Q;return((1-3*Q+3*S-t)*Z+(4-6*S+3*t)*c+(1+3*Q+3*S-3*t)*g+t*I)/6}function k9(Q){var Z=Q.length-1;return function(c){var g=c<=0?c=0:c>=1?(c=1,Z-1):Math.floor(c*Z),I=Q[g],S=Q[g+1],t=g>0?Q[g-1]:2*I-S,e=g{});function T9(Q){var Z=Q.length;return function(c){var g=Math.floor(((c%=1)<0?++c:c)*Z),I=Q[(g+Z-1)%Z],S=Q[g%Z],t=Q[(g+1)%Z],e=Q[(g+2)%Z];return w9((c-g/Z)*Z,I,S,t,e)}}var A9=mn(()=>{Uk()}),db,M9=mn(()=>{db=Q=>()=>Q});function S9(Q,Z){return function(c){return Q+c*Z}}function tj(Q,Z,c){return Q=Math.pow(Q,c),Z=Math.pow(Z,c)-Q,c=1/c,function(g){return Math.pow(Q+g*Z,c)}}function c3(Q,Z){var c=Z-Q;return c?S9(Q,c>180||c<-180?c-360*Math.round(c/360):c):db(isNaN(Q)?Z:Q)}function ej(Q){return(Q=+Q)==1?hp:function(Z,c){return c-Z?tj(Z,c,Q):db(isNaN(Z)?c:Z)}}function hp(Q,Z){var c=Z-Q;return c?S9(Q,c):db(isNaN(Q)?Z:Q)}var px=mn(()=>{M9()});function E9(Q){return function(Z){var c=Z.length,g=new Array(c),I=new Array(c),S=new Array(c),t,e;for(t=0;t{dx(),Uk(),A9(),px(),h3=function Q(Z){var c=ej(Z);function g(I,S){var t=c((I=a3(I)).r,(S=a3(S)).r),e=c(I.g,S.g),r=c(I.b,S.b),a=hp(I.opacity,S.opacity);return function(n){return I.r=t(n),I.g=e(n),I.b=r(n),I.opacity=a(n),I+""}}return g.gamma=Q,g}(1),C9=E9(k9),L9=E9(T9)});function Vk(Q,Z){Z||(Z=[]);var c=Q?Math.min(Z.length,Q.length):0,g=Z.slice(),I;return function(S){for(I=0;I{});function rj(Q,Z){return(I9(Z)?Vk:z9)(Q,Z)}function z9(Q,Z){var c=Z?Z.length:0,g=Q?Math.min(c,Q.length):0,I=new Array(g),S=new Array(c),t;for(t=0;t{g3(),Hk()});function D9(Q,Z){var c=new Date;return Q=+Q,Z=+Z,function(g){return c.setTime(Q*(1-g)+Z*g),c}}var F9=mn(()=>{});function $m(Q,Z){return Q=+Q,Z=+Z,function(c){return Q*(1-c)+Z*c}}var f3=mn(()=>{});function R9(Q,Z){var c={},g={},I;(Q===null||typeof Q!="object")&&(Q={}),(Z===null||typeof Z!="object")&&(Z={});for(I in Z)I in Q?c[I]=m3(Q[I],Z[I]):g[I]=Z[I];return function(S){for(I in c)g[I]=c[I](S);return g}}var B9=mn(()=>{g3()});function nj(Q){return function(){return Q}}function ij(Q){return function(Z){return Q(Z)+""}}function N9(Q,Z){var c=d3.lastIndex=p3.lastIndex=0,g,I,S,t=-1,e=[],r=[];for(Q=Q+"",Z=Z+"";(g=d3.exec(Q))&&(I=p3.exec(Z));)(S=I.index)>c&&(S=Z.slice(c,S),e[t]?e[t]+=S:e[++t]=S),(g=g[0])===(I=I[0])?e[t]?e[t]+=I:e[++t]=I:(e[++t]=null,r.push({i:t,x:$m(g,I)})),c=p3.lastIndex;return c{f3(),d3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,p3=new RegExp(d3.source,"g")});function m3(Q,Z){var c=typeof Z,g;return Z==null||c==="boolean"?db(Z):(c==="number"?$m:c==="string"?(g=cb(Z))?(Z=g,h3):N9:Z instanceof cb?h3:Z instanceof Date?D9:I9(Z)?Vk:Array.isArray(Z)?z9:typeof Z.valueOf!="function"&&typeof Z.toString!="function"||isNaN(Z)?R9:$m)(Q,Z)}var g3=mn(()=>{dx(),P9(),O9(),F9(),f3(),B9(),j9(),M9(),Hk()});function aj(Q){var Z=Q.length;return function(c){return Q[Math.max(0,Math.min(Z-1,Math.floor(c*Z)))]}}var oj=mn(()=>{});function sj(Q,Z){var c=c3(+Q,+Z);return function(g){var I=c(g);return I-360*Math.floor(I/360)}}var lj=mn(()=>{px()});function uj(Q,Z){return Q=+Q,Z=+Z,function(c){return Math.round(Q*(1-c)+Z*c)}}var cj=mn(()=>{});function U9(Q,Z,c,g,I,S){var t,e,r;return(t=Math.sqrt(Q*Q+Z*Z))&&(Q/=t,Z/=t),(r=Q*c+Z*g)&&(c-=Q*r,g-=Z*r),(e=Math.sqrt(c*c+g*g))&&(c/=e,g/=e,r/=e),Q*g{Wk=180/Math.PI,v3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function fj(Q){let Z=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(Q+"");return Z.isIdentity?v3:U9(Z.a,Z.b,Z.c,Z.d,Z.e,Z.f)}function dj(Q){return Q==null?v3:(y3||(y3=document.createElementNS("http://www.w3.org/2000/svg","g")),y3.setAttribute("transform",Q),(Q=y3.transform.baseVal.consolidate())?(Q=Q.matrix,U9(Q.a,Q.b,Q.c,Q.d,Q.e,Q.f)):v3)}var y3,pj=mn(()=>{hj()});function V9(Q,Z,c,g){function I(a){return a.length?a.pop()+" ":""}function S(a,n,o,i,l,f){if(a!==o||n!==i){var x=l.push("translate(",null,Z,null,c);f.push({i:x-4,x:$m(a,o)},{i:x-2,x:$m(n,i)})}else(o||i)&&l.push("translate("+o+Z+i+c)}function t(a,n,o,i){a!==n?(a-n>180?n+=360:n-a>180&&(a+=360),i.push({i:o.push(I(o)+"rotate(",null,g)-2,x:$m(a,n)})):n&&o.push(I(o)+"rotate("+n+g)}function e(a,n,o,i){a!==n?i.push({i:o.push(I(o)+"skewX(",null,g)-2,x:$m(a,n)}):n&&o.push(I(o)+"skewX("+n+g)}function r(a,n,o,i,l,f){if(a!==o||n!==i){var x=l.push(I(l)+"scale(",null,",",null,")");f.push({i:x-4,x:$m(a,o)},{i:x-2,x:$m(n,i)})}else(o!==1||i!==1)&&l.push(I(l)+"scale("+o+","+i+")")}return function(a,n){var o=[],i=[];return a=Q(a),n=Q(n),S(a.translateX,a.translateY,n.translateX,n.translateY,o,i),t(a.rotate,n.rotate,o,i),e(a.skewX,n.skewX,o,i),r(a.scaleX,a.scaleY,n.scaleX,n.scaleY,o,i),a=n=null,function(l){for(var f=-1,x=i.length,y;++f{f3(),pj(),H9=V9(fj,"px, ","px)","deg)"),W9=V9(dj,", ",")",")")});function q9(Q){return((Q=Math.exp(Q))+1/Q)/2}function gj(Q){return((Q=Math.exp(Q))-1/Q)/2}function vj(Q){return((Q=Math.exp(2*Q))-1)/(Q+1)}var $9,Z9,yj=mn(()=>{$9=1e-12,Z9=function Q(Z,c,g){function I(S,t){var e=S[0],r=S[1],a=S[2],n=t[0],o=t[1],i=t[2],l=n-e,f=o-r,x=l*l+f*f,y,v;if(x<$9)v=Math.log(i/a)/Z,y=function(M){return[e+M*l,r+M*f,a*Math.exp(Z*M*v)]};else{var T=Math.sqrt(x),u=(i*i-a*a+g*x)/(2*a*c*T),b=(i*i-a*a-g*x)/(2*i*c*T),_=Math.log(Math.sqrt(u*u+1)-u),P=Math.log(Math.sqrt(b*b+1)-b);v=(P-_)/Z,y=function(M){var C=M*v,A=q9(_),h=a/(c*T)*(A*vj(Z*C+_)-gj(_));return[e+h*l,r+h*f,a*A/q9(Z*C+_)]}}return y.duration=v*1e3*Z/Math.SQRT2,y}return I.rho=function(S){var t=Math.max(.001,+S),e=t*t,r=e*e;return Q(t,e,r)},I}(Math.SQRT2,2,4)});function G9(Q){return function(Z,c){var g=Q((Z=xk(Z)).h,(c=xk(c)).h),I=hp(Z.s,c.s),S=hp(Z.l,c.l),t=hp(Z.opacity,c.opacity);return function(e){return Z.h=g(e),Z.s=I(e),Z.l=S(e),Z.opacity=t(e),Z+""}}}var Y9,K9,xj=mn(()=>{dx(),px(),Y9=G9(c3),K9=G9(hp)});function _j(Q,Z){var c=hp((Q=Ak(Q)).l,(Z=Ak(Z)).l),g=hp(Q.a,Z.a),I=hp(Q.b,Z.b),S=hp(Q.opacity,Z.opacity);return function(t){return Q.l=c(t),Q.a=g(t),Q.b=I(t),Q.opacity=S(t),Q+""}}var bj=mn(()=>{dx(),px()});function X9(Q){return function(Z,c){var g=Q((Z=Lk(Z)).h,(c=Lk(c)).h),I=hp(Z.c,c.c),S=hp(Z.l,c.l),t=hp(Z.opacity,c.opacity);return function(e){return Z.h=g(e),Z.c=I(e),Z.l=S(e),Z.opacity=t(e),Z+""}}}var J9,Q9,wj=mn(()=>{dx(),px(),J9=X9(c3),Q9=X9(hp)});function tS(Q){return function Z(c){c=+c;function g(I,S){var t=Q((I=Fk(I)).h,(S=Fk(S)).h),e=hp(I.s,S.s),r=hp(I.l,S.l),a=hp(I.opacity,S.opacity);return function(n){return I.h=t(n),I.s=e(n),I.l=r(Math.pow(n,c)),I.opacity=a(n),I+""}}return g.gamma=Z,g}(1)}var eS,rS,kj=mn(()=>{dx(),px(),eS=tS(c3),rS=tS(hp)});function Tj(Q,Z){Z===void 0&&(Z=Q,Q=m3);for(var c=0,g=Z.length-1,I=Z[0],S=new Array(g<0?0:g);c{g3()});function Mj(Q,Z){for(var c=new Array(Z),g=0;g{}),j1={};cn(j1,{interpolate:()=>m3,interpolateArray:()=>rj,interpolateBasis:()=>k9,interpolateBasisClosed:()=>T9,interpolateCubehelix:()=>eS,interpolateCubehelixLong:()=>rS,interpolateDate:()=>D9,interpolateDiscrete:()=>aj,interpolateHcl:()=>J9,interpolateHclLong:()=>Q9,interpolateHsl:()=>Y9,interpolateHslLong:()=>K9,interpolateHue:()=>sj,interpolateLab:()=>_j,interpolateNumber:()=>$m,interpolateNumberArray:()=>Vk,interpolateObject:()=>R9,interpolateRgb:()=>h3,interpolateRgbBasis:()=>C9,interpolateRgbBasisClosed:()=>L9,interpolateRound:()=>uj,interpolateString:()=>N9,interpolateTransformCss:()=>H9,interpolateTransformSvg:()=>W9,interpolateZoom:()=>Z9,piecewise:()=>Tj,quantize:()=>Mj});var mx=mn(()=>{g3(),O9(),Uk(),A9(),F9(),oj(),lj(),f3(),Hk(),B9(),cj(),j9(),mj(),yj(),P9(),xj(),bj(),wj(),kj(),Aj(),Sj()}),qk=Dt((Q,Z)=>{var c=Vs(),g=hi();Z.exports=function(I,S,t,e,r){var a=S.data.data,n=a.i,o=r||a.color;if(n>=0){S.i=a.i;var i=t.marker;i.pattern?(!i.colors||!i.pattern.shape)&&(i.color=o,S.color=o):(i.color=o,S.color=o),c.pointStyle(I,t,e,S)}else g.fill(I,o)}}),nS=Dt((Q,Z)=>{var c=qr(),g=hi(),I=kn(),S=Bp().resizeText,t=qk();function e(a){var n=a._fullLayout._sunburstlayer.selectAll(".trace");S(a,n,"sunburst"),n.each(function(o){var i=c.select(this),l=o[0],f=l.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var l=n.data.data,f=!n.children,x=l.i,y=I.castOption(o,x,"marker.line.color")||g.defaultLine,v=I.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}Z.exports={style:e,styleOne:r}}),kv=Dt(Q=>{var Z=kn(),c=hi(),g=P0(),I=wg();Q.findEntryWithLevel=function(r,a){var n;return a&&r.eachAfter(function(o){if(Q.getPtId(o)===a)return n=o.copy()}),n||r},Q.findEntryWithChild=function(r,a){var n;return r.eachAfter(function(o){for(var i=o.children||[],l=0;l0)},Q.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},Q.isHeader=function(r,a){return!(Q.isLeaf(r)||r.depth===a._maxDepth-1)};function e(r){return r.data.data.pid}Q.getParent=function(r,a){return Q.findEntryWithLevel(r,e(a))},Q.listPath=function(r,a){var n=r.parent;if(!n)return[];var o=a?[n.data[a]]:[n];return Q.listPath(n,a).concat(o)},Q.getPath=function(r){return Q.listPath(r,"label").join("/")+"/"},Q.formatValue=I.formatPieValue,Q.formatPercent=function(r,a){var n=Z.formatPercent(r,0);return n==="0%"&&(n=I.formatPiePercent(r,a)),n}}),x3=Dt((Q,Z)=>{var c=qr(),g=Jo(),I=Fp().appendArrayPointValue,S=tf(),t=kn(),e=Bm(),r=kv(),a=wg(),n=a.formatPieValue;Z.exports=function(i,l,f,x,y){var v=x[0],T=v.trace,u=v.hierarchy,b=T.type==="sunburst",_=T.type==="treemap"||T.type==="icicle";"_hasHoverLabel"in T||(T._hasHoverLabel=!1),"_hasHoverEvent"in T||(T._hasHoverEvent=!1);var P=function(A){var h=f._fullLayout;if(!(f._dragging||h.hovermode===!1)){var p=f._fullData[T.index],k=A.data.data,w=k.i,R=r.isHierarchyRoot(A),O=r.getParent(u,A),j=r.getValue(A),V=function(Y){return t.castOption(p,w,Y)},H=V("hovertemplate"),F=S.castHoverinfo(p,h,w),U=h.separators,W;if(H||F&&F!=="none"&&F!=="skip"){var q,J;b&&(q=v.cx+A.pxmid[0]*(1-A.rInscribed),J=v.cy+A.pxmid[1]*(1-A.rInscribed)),_&&(q=A._hoverX,J=A._hoverY);var lt={},yt=[],mt=[],st=function(Y){return yt.indexOf(Y)!==-1};F&&(yt=F==="all"?p._module.attributes.hoverinfo.flags:F.split("+")),lt.label=k.label,st("label")&<.label&&mt.push(lt.label),k.hasOwnProperty("v")&&(lt.value=k.v,lt.valueLabel=n(lt.value,U),st("value")&&mt.push(lt.valueLabel)),lt.currentPath=A.currentPath=r.getPath(A.data),st("current path")&&!R&&mt.push(lt.currentPath);var tt,dt=[],rt=function(){dt.indexOf(tt)===-1&&(mt.push(tt),dt.push(tt))};lt.percentParent=A.percentParent=j/r.getValue(O),lt.parent=A.parentString=r.getPtLabel(O),st("percent parent")&&(tt=r.formatPercent(lt.percentParent,U)+" of "+lt.parent,rt()),lt.percentEntry=A.percentEntry=j/r.getValue(l),lt.entry=A.entry=r.getPtLabel(l),st("percent entry")&&!R&&!A.onPathbar&&(tt=r.formatPercent(lt.percentEntry,U)+" of "+lt.entry,rt()),lt.percentRoot=A.percentRoot=j/r.getValue(u),lt.root=A.root=r.getPtLabel(u),st("percent root")&&!R&&(tt=r.formatPercent(lt.percentRoot,U)+" of "+lt.root,rt()),lt.text=V("hovertext")||V("text"),st("text")&&(tt=lt.text,t.isValidTextValue(tt)&&mt.push(tt)),W=[o(A,p,y.eventDataKeys)];var at={trace:p,y:J,_x0:A._x0,_x1:A._x1,_y0:A._y0,_y1:A._y1,text:mt.join("
"),name:H||st("name")?p.name:void 0,color:V("hoverlabel.bgcolor")||k.color,borderColor:V("hoverlabel.bordercolor"),fontFamily:V("hoverlabel.font.family"),fontSize:V("hoverlabel.font.size"),fontColor:V("hoverlabel.font.color"),fontWeight:V("hoverlabel.font.weight"),fontStyle:V("hoverlabel.font.style"),fontVariant:V("hoverlabel.font.variant"),nameLength:V("hoverlabel.namelength"),textAlign:V("hoverlabel.align"),hovertemplate:H,hovertemplateLabels:lt,eventData:W};b&&(at.x0=q-A.rInscribed*A.rpx1,at.x1=q+A.rInscribed*A.rpx1,at.idealAlign=A.pxmid[0]<0?"left":"right"),_&&(at.x=q,at.idealAlign=q<0?"left":"right");var vt=[];S.loneHover(at,{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:f,inOut_bbox:vt}),W[0].bbox=vt[0],T._hasHoverLabel=!0}if(_){var it=i.select("path.surface");y.styleOne(it,A,p,f,{hovered:!0})}T._hasHoverEvent=!0,f.emit("plotly_hover",{points:W||[o(A,p,y.eventDataKeys)],event:c.event})}},M=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=c.select(this).datum();if(T._hasHoverEvent&&(A.originalEvent=c.event,f.emit("plotly_unhover",{points:[o(k,p,y.eventDataKeys)],event:c.event}),T._hasHoverEvent=!1),T._hasHoverLabel&&(S.loneUnhover(h._hoverlayer.node()),T._hasHoverLabel=!1),_){var w=i.select("path.surface");y.styleOne(w,k,p,f,{hovered:!1})}},C=function(A){var h=f._fullLayout,p=f._fullData[T.index],k=b&&(r.isHierarchyRoot(A)||r.isLeaf(A)),w=r.getPtId(A),R=r.isEntry(A)?r.findEntryWithChild(u,w):r.findEntryWithLevel(u,w),O=r.getPtId(R),j={points:[o(A,p,y.eventDataKeys)],event:c.event};k||(j.nextLevel=O);var V=e.triggerHandler(f,"plotly_"+T.type+"click",j);if(V!==!1&&h.hovermode&&(f._hoverdata=[o(A,p,y.eventDataKeys)],S.click(f,c.event)),!k&&V!==!1&&!f._dragging&&!f._transitioning){g.call("_storeDirectGUIEdit",p,h._tracePreGUI[p.uid],{level:p.level});var H={data:[{level:O}],traces:[T.index]},F={frame:{redraw:!1,duration:y.transitionTime},transition:{duration:y.transitionTime,easing:y.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(h._hoverlayer.node()),g.call("animate",f,H,F)}};i.on("mouseover",P),i.on("mouseout",M),i.on("click",C)};function o(i,l,f){for(var x=i.data.data,y={curveNumber:l.index,pointNumber:x.i,data:l._input,fullData:l},v=0;v{var Z=qr(),c=r3(),g=(mx(),ni(j1)).interpolate,I=Vs(),S=kn(),t=ec(),e=Bp(),r=e.recordMinTextSize,a=e.clearMinTextSize,n=gk(),o=wg().getRotationAngle,i=n.computeTransform,l=n.transformInsideText,f=nS().styleOne,x=xm().resizeText,y=x3(),v=e9(),T=kv();Q.plot=function(C,A,h,p){var k=C._fullLayout,w=k._sunburstlayer,R,O,j=!h,V=!k.uniformtext.mode&&T.hasTransition(h);if(a("sunburst",k),R=w.selectAll("g.trace.sunburst").data(A,function(F){return F[0].trace.uid}),R.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),R.order(),V){p&&(O=p());var H=Z.transition().duration(h.duration).ease(h.easing).each("end",function(){O&&O()}).each("interrupt",function(){O&&O()});H.each(function(){w.selectAll("g.trace").each(function(F){u(C,F,this,h)})})}else R.each(function(F){u(C,F,this,h)}),k.uniformtext.mode&&x(C,k._sunburstlayer.selectAll(".trace"),"sunburst");j&&R.exit().remove()};function u(C,A,h,p){var k=C._context.staticPlot,w=C._fullLayout,R=!w.uniformtext.mode&&T.hasTransition(p),O=Z.select(h),j=O.selectAll("g.slice"),V=A[0],H=V.trace,F=V.hierarchy,U=T.findEntryWithLevel(F,H.level),W=T.getMaxDepth(H),q=w._size,J=H.domain,lt=q.w*(J.x[1]-J.x[0]),yt=q.h*(J.y[1]-J.y[0]),mt=.5*Math.min(lt,yt),st=V.cx=q.l+q.w*(J.x[1]+J.x[0])/2,tt=V.cy=q.t+q.h*(1-J.y[0])-yt/2;if(!U)return j.remove();var dt=null,rt={};R&&j.each(function(Mt){rt[T.getPtId(Mt)]={rpx0:Mt.rpx0,rpx1:Mt.rpx1,x0:Mt.x0,x1:Mt.x1,transform:Mt.transform},!dt&&T.isEntry(Mt)&&(dt=Mt)});var at=b(U).descendants(),vt=U.height+1,it=0,Y=W;V.hasMultipleRoots&&T.isHierarchyRoot(U)&&(at=at.slice(1),vt-=1,it=1,Y+=1),at=at.filter(function(Mt){return Mt.y1<=Y});var ft=o(H.rotation);ft&&at.forEach(function(Mt){Mt.x0+=ft,Mt.x1+=ft});var ut=Math.min(vt,W),kt=function(Mt){return(Mt-it)/ut*mt},It=function(Mt,ee){return[Mt*Math.cos(ee),-Mt*Math.sin(ee)]},Pt=function(Mt){return S.pathAnnulus(Mt.rpx0,Mt.rpx1,Mt.x0,Mt.x1,st,tt)},qt=function(Mt){return st+P(Mt)[0]*(Mt.transform.rCenter||0)+(Mt.transform.x||0)},Wt=function(Mt){return tt+P(Mt)[1]*(Mt.transform.rCenter||0)+(Mt.transform.y||0)};j=j.data(at,T.getPtId),j.enter().append("g").classed("slice",!0),R?j.exit().transition().each(function(){var Mt=Z.select(this),ee=Mt.select("path.surface");ee.transition().attrTween("d",function(oe){var Te=pe(oe);return function(He){return Pt(Te(He))}});var ve=Mt.select("g.slicetext");ve.attr("opacity",0)}).remove():j.exit().remove(),j.order();var Jt=null;if(R&&dt){var ge=T.getPtId(dt);j.each(function(Mt){Jt===null&&T.getPtId(Mt)===ge&&(Jt=Mt.x1)})}var fe=j;R&&(fe=fe.transition().each("end",function(){var Mt=Z.select(this);T.setSliceCursor(Mt,C,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),fe.each(function(Mt){var ee=Z.select(this),ve=S.ensureSingle(ee,"path","surface",function(ur){ur.style("pointer-events",k?"none":"all")});Mt.rpx0=kt(Mt.y0),Mt.rpx1=kt(Mt.y1),Mt.xmid=(Mt.x0+Mt.x1)/2,Mt.pxmid=It(Mt.rpx1,Mt.xmid),Mt.midangle=-(Mt.xmid-Math.PI/2),Mt.startangle=-(Mt.x0-Math.PI/2),Mt.stopangle=-(Mt.x1-Math.PI/2),Mt.halfangle=.5*Math.min(S.angleDelta(Mt.x0,Mt.x1)||Math.PI,Math.PI),Mt.ring=1-Mt.rpx0/Mt.rpx1,Mt.rInscribed=_(Mt),R?ve.transition().attrTween("d",function(ur){var jr=se(ur);return function(Wr){return Pt(jr(Wr))}}):ve.attr("d",Pt),ee.call(y,U,C,A,{eventDataKeys:v.eventDataKeys,transitionTime:v.CLICK_TRANSITION_TIME,transitionEasing:v.CLICK_TRANSITION_EASING}).call(T.setSliceCursor,C,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:C._transitioning}),ve.call(f,Mt,H,C);var oe=S.ensureSingle(ee,"g","slicetext"),Te=S.ensureSingle(oe,"text","",function(ur){ur.attr("data-notex",1)}),He=S.ensureUniformFontSize(C,T.determineTextFont(H,Mt,w.font));Te.text(Q.formatSliceLabel(Mt,U,H,A,w)).classed("slicetext",!0).attr("text-anchor","middle").call(I.font,He).call(t.convertToTspans,C);var Ge=I.bBox(Te.node());Mt.transform=l(Ge,Mt,V),Mt.transform.targetX=qt(Mt),Mt.transform.targetY=Wt(Mt);var cr=function(ur,jr){var Wr=ur.transform;return i(Wr,jr),Wr.fontSize=He.size,r(H.type,Wr,w),S.getTextTransform(Wr)};R?Te.transition().attrTween("transform",function(ur){var jr=Tt(ur);return function(Wr){return cr(jr(Wr),Ge)}}):Te.attr("transform",cr(Mt,Ge))});function pe(Mt){var ee=T.getPtId(Mt),ve=rt[ee],oe=rt[T.getPtId(U)],Te;if(oe){var He=(Mt.x1>oe.x1?2*Math.PI:0)+ft;Te=Mt.rpx1Jt?2*Math.PI:0)+ft;ve={x0:Te,x1:Te}}else ve={rpx0:mt,rpx1:mt},S.extendFlat(ve,Lt(Mt));else ve={rpx0:0,rpx1:0};else ve={x0:ft,x1:ft};return g(ve,oe)}function Tt(Mt){var ee=rt[T.getPtId(Mt)],ve,oe=Mt.transform;if(ee)ve=ee;else if(ve={rpx1:Mt.rpx1,transform:{textPosAngle:oe.textPosAngle,scale:0,rotate:oe.rotate,rCenter:oe.rCenter,x:oe.x,y:oe.y}},dt)if(Mt.parent)if(Jt){var Te=Mt.x1>Jt?2*Math.PI:0;ve.x0=ve.x1=Te}else S.extendFlat(ve,Lt(Mt));else ve.x0=ve.x1=ft;else ve.x0=ve.x1=ft;var He=g(ve.transform.textPosAngle,Mt.transform.textPosAngle),Ge=g(ve.rpx1,Mt.rpx1),cr=g(ve.x0,Mt.x0),ur=g(ve.x1,Mt.x1),jr=g(ve.transform.scale,oe.scale),Wr=g(ve.transform.rotate,oe.rotate),br=oe.rCenter===0?3:ve.transform.rCenter===0?1/3:1,Xr=g(ve.transform.rCenter,oe.rCenter),nn=function(Le){return Xr(Math.pow(Le,br))};return function(Le){var Gt=Ge(Le);cr(Le),ur(Le);var ne=nn(Le),Ct=He(Le),gt={rpx1:Gt,transform:{textPosAngle:Ct,rCenter:ne,x:oe.x,y:oe.y}};return r(H.type,oe,w),{transform:{targetX:qt(gt),targetY:Wt(gt),scale:jr(Le),rotate:Wr(Le),rCenter:ne}}}}function Lt(Mt){var ee=Mt.parent,ve=rt[T.getPtId(ee)],oe={};if(ve){var Te=ee.children,He=Te.indexOf(Mt),Ge=Te.length,cr=g(ve.x0,ve.x1);oe.x0=cr(He/Ge),oe.x1=cr(He/Ge)}else oe.x0=oe.x1=0;return oe}}function b(C){return c.partition().size([2*Math.PI,C.height+1])(C)}Q.formatSliceLabel=function(C,A,h,p,k){var w=h.texttemplate,R=h.textinfo;if(!w&&(!R||R==="none"))return"";var O=k.separators,j=p[0],V=C.data.data,H=j.hierarchy,F=T.isHierarchyRoot(C),U=T.getParent(H,C),W=T.getValue(C);if(!w){var q=R.split("+"),J=function(it){return q.indexOf(it)!==-1},lt=[],yt;if(J("label")&&V.label&<.push(V.label),V.hasOwnProperty("v")&&J("value")&<.push(T.formatValue(V.v,O)),!F){J("current path")&<.push(T.getPath(C.data));var mt=0;J("percent parent")&&mt++,J("percent entry")&&mt++,J("percent root")&&mt++;var st=mt>1;if(mt){var tt,dt=function(it){yt=T.formatPercent(tt,O),st&&(yt+=" of "+it),lt.push(yt)};J("percent parent")&&!F&&(tt=W/T.getValue(U),dt("parent")),J("percent entry")&&(tt=W/T.getValue(A),dt("entry")),J("percent root")&&(tt=W/T.getValue(H),dt("root"))}}return J("text")&&(yt=S.castOption(h,V.i,"text"),S.isValidTextValue(yt)&<.push(yt)),lt.join("
")}var rt=S.castOption(h,V.i,"texttemplate");if(!rt)return"";var at={};V.label&&(at.label=V.label),V.hasOwnProperty("v")&&(at.value=V.v,at.valueLabel=T.formatValue(V.v,O)),at.currentPath=T.getPath(C.data),F||(at.percentParent=W/T.getValue(U),at.percentParentLabel=T.formatPercent(at.percentParent,O),at.parent=T.getPtLabel(U)),at.percentEntry=W/T.getValue(A),at.percentEntryLabel=T.formatPercent(at.percentEntry,O),at.entry=T.getPtLabel(A),at.percentRoot=W/T.getValue(H),at.percentRootLabel=T.formatPercent(at.percentRoot,O),at.root=T.getPtLabel(H),V.hasOwnProperty("color")&&(at.color=V.color);var vt=S.castOption(h,V.i,"text");return(S.isValidTextValue(vt)||vt==="")&&(at.text=vt),at.customdata=S.castOption(h,V.i,"customdata"),S.texttemplateString({data:[at,h._meta],fallback:h.texttemplatefallback,labels:at,locale:k._d3locale,template:rt})};function _(C){return C.rpx0===0&&S.isFullCircle([C.x0,C.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(C.halfangle)),C.ring/2))}function P(C){return M(C.rpx1,C.transform.textPosAngle)}function M(C,A){return[C*Math.sin(A),-C*Math.cos(A)]}}),Ej=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"sunburst",basePlotModule:WN(),categories:[],animatable:!0,attributes:e3(),layoutAttributes:r9(),supplyDefaults:qN(),supplyLayoutDefaults:$N(),calc:n3().calc,crossTraceCalc:n3().crossTraceCalc,plot:$k().plot,style:nS().style,colorbar:xo(),meta:{}}}),Cj=Dt((Q,Z)=>{Z.exports=Ej()}),Lj=Dt(Q=>{var Z=Kc();Q.name="treemap",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),gx=Dt((Q,Z)=>{Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}),Zk=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=kc(),t=jh().attributes,e=lx(),r=e3(),a=gx(),n=Ia().extendFlat,o=kd().pattern;Z.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:n({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:r.marker.colors,pattern:o,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:r.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:n({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:a.eventDataKeys}),hovertemplatefallback:I(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:r.root,domain:t({name:"treemap",trace:!0,editType:"calc"})}}),iS=Dt((Q,Z)=>{Z.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),Pj=Dt((Q,Z)=>{var c=kn(),g=Zk(),I=hi(),S=jh().defaults,t=J0().handleText,e=rx().TEXTPAD,r=ux().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;Z.exports=function(i,l,f,x){function y(p,k){return c.coerce(i,l,g,p,k)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){l.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth");var b=y("tiling.packing");b==="squarify"&&y("tiling.squarifyratio"),y("tiling.flip"),y("tiling.pad");var _=y("text");y("texttemplate"),y("texttemplatefallback"),l.texttemplate||y("textinfo",c.isArrayOrTypedArray(_)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var P=y("pathbar.visible"),M="auto";t(i,l,x,y,M,{hasPathbar:P,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition");var C=l.textposition.indexOf("bottom")!==-1;r(i,l,x,y);var A=l._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;A?o(i,l,x,y,{prefix:"marker.",cLetter:"c"}):y("marker.depthfade",!(l.marker.colors||[]).length);var h=l.textfont.size*2;y("marker.pad.t",C?h/4:h),y("marker.pad.l",h/4),y("marker.pad.r",h/4),y("marker.pad.b",C?h:h/4),y("marker.cornerradius"),l._hovered={marker:{line:{width:2,color:I.contrast(x.paper_bgcolor)}}},P&&(y("pathbar.thickness",l.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(l,x,y),l._length=null}}),Ij=Dt((Q,Z)=>{var c=kn(),g=iS();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("treemapcolorway",S.colorway),t("extendtreemapcolors")}}),aS=Dt(Q=>{var Z=n3();Q.calc=function(c,g){return Z.calc(c,g)},Q.crossTraceCalc=function(c){return Z._runCrossTraceCalc("treemap",c)}}),oS=Dt((Q,Z)=>{Z.exports=function c(g,I,S){var t;S.swapXY&&(t=g.x0,g.x0=g.y0,g.y0=t,t=g.x1,g.x1=g.y1,g.y1=t),S.flipX&&(t=g.x0,g.x0=I[0]-g.x1,g.x1=I[0]-t),S.flipY&&(t=g.y0,g.y0=I[1]-g.y1,g.y1=I[1]-t);var e=g.children;if(e)for(var r=0;r{var c=r3(),g=oS();Z.exports=function(S,t,e){var r=e.flipX,a=e.flipY,n=e.packing==="dice-slice",o=e.pad[a?"bottom":"top"],i=e.pad[r?"right":"left"],l=e.pad[r?"left":"right"],f=e.pad[a?"top":"bottom"],x;n&&(x=i,i=o,o=x,x=l,l=f,f=x);var y=c.treemap().tile(I(e.packing,e.squarifyratio)).paddingInner(e.pad.inner).paddingLeft(i).paddingRight(l).paddingTop(o).paddingBottom(f).size(n?[t[1],t[0]]:t)(S);return(n||r||a)&&g(y,t,{swapXY:n,flipX:r,flipY:a}),y};function I(S,t){switch(S){case"squarify":return c.treemapSquarify.ratio(t);case"binary":return c.treemapBinary;case"dice":return c.treemapDice;case"slice":return c.treemapSlice;default:return c.treemapSliceDice}}}),Gk=Dt((Q,Z)=>{var c=qr(),g=hi(),I=kn(),S=kv(),t=Bp().resizeText,e=qk();function r(n){var o=n._fullLayout._treemaplayer.selectAll(".trace");t(n,o,"treemap"),o.each(function(i){var l=c.select(this),f=i[0],x=f.trace;l.style("opacity",x.opacity),l.selectAll("path.surface").each(function(y){c.select(this).call(a,y,x,n,{hovered:!1})})})}function a(n,o,i,l,f){var x=(f||{}).hovered,y=o.data.data,v=y.i,T,u,b=y.color,_=S.isHierarchyRoot(o),P=1;if(x)T=i._hovered.marker.line.color,u=i._hovered.marker.line.width;else if(_&&b===i.root.color)P=100,T="rgba(0,0,0,0)",u=0;else if(T=I.castOption(i,v,"marker.line.color")||g.defaultLine,u=I.castOption(i,v,"marker.line.width")||0,!i._hasColorscale&&!o.onPathbar){var M=i.marker.depthfade;if(M){var C=g.combine(g.addOpacity(i._backgroundColor,.75),b),A;if(M===!0){var h=S.getMaxDepth(i);isFinite(h)?S.isLeaf(o)?A=0:A=i._maxVisibleLayers-(o.data.depth-i._entryDepth):A=o.data.height+1}else A=o.data.depth-i._entryDepth,i._atRootLevel||A++;if(A>0)for(var p=0;p{var c=qr(),g=kn(),I=Vs(),S=ec(),t=sS(),e=Gk().styleOne,r=gx(),a=kv(),n=x3(),o=!0;Z.exports=function(i,l,f,x,y){var v=y.barDifY,T=y.width,u=y.height,b=y.viewX,_=y.viewY,P=y.pathSlice,M=y.toMoveInsideSlice,C=y.strTransform,A=y.hasTransition,h=y.handleSlicesExit,p=y.makeUpdateSliceInterpolator,k=y.makeUpdateTextInterpolator,w={},R=i._context.staticPlot,O=i._fullLayout,j=l[0],V=j.trace,H=j.hierarchy,F=T/V._entryDepth,U=a.listPath(f.data,"id"),W=t(H.copy(),[T,u],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();W=W.filter(function(J){var lt=U.indexOf(J.data.id);return lt===-1?!1:(J.x0=F*lt,J.x1=F*(lt+1),J.y0=v,J.y1=v+u,J.onPathbar=!0,!0)}),W.reverse(),x=x.data(W,a.getPtId),x.enter().append("g").classed("pathbar",!0),h(x,o,w,[T,u],P),x.order();var q=x;A&&(q=q.transition().each("end",function(){var J=c.select(this);a.setSliceCursor(J,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(J){J._x0=b(J.x0),J._x1=b(J.x1),J._y0=_(J.y0),J._y1=_(J.y1),J._hoverX=b(J.x1-Math.min(T,u)/2),J._hoverY=_(J.y1-u/2);var lt=c.select(this),yt=g.ensureSingle(lt,"path","surface",function(dt){dt.style("pointer-events",R?"none":"all")});A?yt.transition().attrTween("d",function(dt){var rt=p(dt,o,w,[T,u]);return function(at){return P(rt(at))}}):yt.attr("d",P),lt.call(n,f,i,l,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,i,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:i._transitioning}),yt.call(e,J,V,i,{hovered:!1}),J._text=(a.getPtLabel(J)||"").split("
").join(" ")||"";var mt=g.ensureSingle(lt,"g","slicetext"),st=g.ensureSingle(mt,"text","",function(dt){dt.attr("data-notex",1)}),tt=g.ensureUniformFontSize(i,a.determineTextFont(V,J,O.font,{onPathbar:!0}));st.text(J._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(I.font,tt).call(S.convertToTspans,i),J.textBB=I.bBox(st.node()),J.transform=M(J,{fontSize:tt.size,onPathbar:!0}),J.transform.fontSize=tt.size,A?st.transition().attrTween("transform",function(dt){var rt=k(dt,o,w,[T,u]);return function(at){return C(rt(at))}}):st.attr("transform",C(J))})}}),Oj=Dt((Q,Z)=>{var c=qr(),g=(mx(),ni(j1)).interpolate,I=kv(),S=kn(),t=rx().TEXTPAD,e=nx(),r=e.toMoveInsideBar,a=Bp(),n=a.recordMinTextSize,o=gx(),i=zj();function l(f){return I.isHierarchyRoot(f)?"":I.getPtId(f)}Z.exports=function(f,x,y,v,T){var u=f._fullLayout,b=x[0],_=b.trace,P=_.type,M=P==="icicle",C=b.hierarchy,A=I.findEntryWithLevel(C,_.level),h=c.select(y),p=h.selectAll("g.pathbar"),k=h.selectAll("g.slice");if(!A){p.remove(),k.remove();return}var w=I.isHierarchyRoot(A),R=!u.uniformtext.mode&&I.hasTransition(v),O=I.getMaxDepth(_),j=function(br){return br.data.depth-A.data.depth-1?U+J:-(q+J):0,yt={x0:W,x1:W,y0:lt,y1:lt+q},mt=function(br,Xr,nn){var Le=_.tiling.pad,Gt=function(St){return St-Le<=Xr.x0},ne=function(St){return St+Le>=Xr.x1},Ct=function(St){return St-Le<=Xr.y0},gt=function(St){return St+Le>=Xr.y1};return br.x0===Xr.x0&&br.x1===Xr.x1&&br.y0===Xr.y0&&br.y1===Xr.y1?{x0:br.x0,x1:br.x1,y0:br.y0,y1:br.y1}:{x0:Gt(br.x0-Le)?0:ne(br.x0-Le)?nn[0]:br.x0,x1:Gt(br.x1+Le)?0:ne(br.x1+Le)?nn[0]:br.x1,y0:Ct(br.y0-Le)?0:gt(br.y0-Le)?nn[1]:br.y0,y1:Ct(br.y1+Le)?0:gt(br.y1+Le)?nn[1]:br.y1}},st=null,tt={},dt={},rt=null,at=function(br,Xr){return Xr?tt[l(br)]:dt[l(br)]},vt=function(br,Xr,nn,Le){if(Xr)return tt[l(C)]||yt;var Gt=dt[_.level]||nn;return j(br)?mt(br,Gt,Le):{}};b.hasMultipleRoots&&w&&O++,_._maxDepth=O,_._backgroundColor=u.paper_bgcolor,_._entryDepth=A.data.depth,_._atRootLevel=w;var it=-F/2+V.l+V.w*(H.x[1]+H.x[0])/2,Y=-U/2+V.t+V.h*(1-(H.y[1]+H.y[0])/2),ft=function(br){return it+br},ut=function(br){return Y+br},kt=ut(0),It=ft(0),Pt=function(br){return It+br},qt=function(br){return kt+br};function Wt(br,Xr){return br+","+Xr}var Jt=Pt(0),ge=function(br){br.x=Math.max(Jt,br.x)},fe=_.pathbar.edgeshape,pe=function(br){var Xr=Pt(Math.max(Math.min(br.x0,br.x0),0)),nn=Pt(Math.min(Math.max(br.x1,br.x1),W)),Le=qt(br.y0),Gt=qt(br.y1),ne=q/2,Ct={},gt={};Ct.x=Xr,gt.x=nn,Ct.y=gt.y=(Le+Gt)/2;var St={x:Xr,y:Le},Nt={x:nn,y:Le},re={x:nn,y:Gt},le={x:Xr,y:Gt};return fe===">"?(St.x-=ne,Nt.x-=ne,re.x-=ne,le.x-=ne):fe==="/"?(re.x-=ne,le.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):fe==="\\"?(St.x-=ne,Nt.x-=ne,Ct.x-=ne/2,gt.x-=ne/2):fe==="<"&&(Ct.x-=ne,gt.x-=ne),ge(St),ge(le),ge(Ct),ge(Nt),ge(re),ge(gt),"M"+Wt(St.x,St.y)+"L"+Wt(Nt.x,Nt.y)+"L"+Wt(gt.x,gt.y)+"L"+Wt(re.x,re.y)+"L"+Wt(le.x,le.y)+"L"+Wt(Ct.x,Ct.y)+"Z"},se=_[M?"tiling":"marker"].pad,Tt=function(br){return _.textposition.indexOf(br)!==-1},Lt=Tt("top"),Mt=Tt("left"),ee=Tt("right"),ve=Tt("bottom"),oe=function(br){var Xr=ft(br.x0),nn=ft(br.x1),Le=ut(br.y0),Gt=ut(br.y1),ne=nn-Xr,Ct=Gt-Le;if(!ne||!Ct)return"";var gt=_.marker.cornerradius||0,St=Math.min(gt,ne/2,Ct/2);St&&br.data&&br.data.data&&br.data.data.label&&(Lt&&(St=Math.min(St,se.t)),Mt&&(St=Math.min(St,se.l)),ee&&(St=Math.min(St,se.r)),ve&&(St=Math.min(St,se.b)));var Nt=function(re,le){return St?"a"+Wt(St,St)+" 0 0 1 "+Wt(re,le):""};return"M"+Wt(Xr,Le+St)+Nt(St,-St)+"L"+Wt(nn-St,Le)+Nt(St,St)+"L"+Wt(nn,Gt-St)+Nt(-St,St)+"L"+Wt(Xr+St,Gt)+Nt(-St,-St)+"Z"},Te=function(br,Xr){var nn=br.x0,Le=br.x1,Gt=br.y0,ne=br.y1,Ct=br.textBB,gt=Lt||Xr.isHeader&&!ve,St=gt?"start":ve?"end":"middle",Nt=Tt("right"),re=Tt("left")||Xr.onPathbar,le=re?-1:Nt?1:0;if(Xr.isHeader){if(nn+=(M?se:se.l)-t,Le-=(M?se:se.r)-t,nn>=Le){var we=(nn+Le)/2;nn=we,Le=we}var Ue;ve?(Ue=ne-(M?se:se.b),Gt{var c=qr(),g=kv(),I=Bp(),S=I.clearMinTextSize,t=xm().resizeText,e=Oj();Z.exports=function(r,a,n,o,i){var l=i.type,f=i.drawDescendants,x=r._fullLayout,y=x["_"+l+"layer"],v,T,u=!n;if(S(l,x),v=y.selectAll("g.trace."+l).data(a,function(_){return _[0].trace.uid}),v.enter().append("g").classed("trace",!0).classed(l,!0),v.order(),!x.uniformtext.mode&&g.hasTransition(n)){o&&(T=o());var b=c.transition().duration(n.duration).ease(n.easing).each("end",function(){T&&T()}).each("interrupt",function(){T&&T()});b.each(function(){y.selectAll("g.trace").each(function(_){e(r,_,this,n,f)})})}else v.each(function(_){e(r,_,this,n,f)}),x.uniformtext.mode&&t(r,y.selectAll(".trace"),l);u&&v.exit().remove()}}),Dj=Dt((Q,Z)=>{var c=qr(),g=kn(),I=Vs(),S=ec(),t=sS(),e=Gk().styleOne,r=gx(),a=kv(),n=x3(),o=$k().formatSliceLabel,i=!1;Z.exports=function(l,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,P=v.pathSlice,M=v.toMoveInsideSlice,C=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,R={},O=l._context.staticPlot,j=l._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=!W&&!H.marker.pad.t||W&&!H.marker.pad.b,J=t(x,[T,u],{packing:H.tiling.packing,squarifyratio:H.tiling.squarifyratio,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,pad:{inner:H.tiling.pad,top:H.marker.pad.t,left:H.marker.pad.l,right:H.marker.pad.r,bottom:H.marker.pad.b}}),lt=J.descendants(),yt=1/0,mt=-1/0;lt.forEach(function(at){var vt=at.depth;vt>=H._maxDepth?(at.x0=at.x1=(at.x0+at.x1)/2,at.y0=at.y1=(at.y0+at.y1)/2):(yt=Math.min(yt,vt),mt=Math.max(mt,vt))}),y=y.data(lt,a.getPtId),H._maxVisibleLayers=isFinite(mt)?mt-yt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,R,[T,u],P),y.order();var st=null;if(A&&w){var tt=a.getPtId(w);y.each(function(at){st===null&&a.getPtId(at)===tt&&(st={x0:at.x0,x1:at.x1,y0:at.y0,y1:at.y1})})}var dt=function(){return st||{x0:0,x1:T,y0:0,y1:u}},rt=y;return A&&(rt=rt.transition().each("end",function(){var at=c.select(this);a.setSliceCursor(at,l,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),rt.each(function(at){var vt=a.isHeader(at,H);at._x0=b(at.x0),at._x1=b(at.x1),at._y0=_(at.y0),at._y1=_(at.y1),at._hoverX=b(at.x1-H.marker.pad.r),at._hoverY=_(W?at.y1-H.marker.pad.b/2:at.y0+H.marker.pad.t/2);var it=c.select(this),Y=g.ensureSingle(it,"path","surface",function(qt){qt.style("pointer-events",O?"none":"all")});A?Y.transition().attrTween("d",function(qt){var Wt=p(qt,i,dt(),[T,u]);return function(Jt){return P(Wt(Jt))}}):Y.attr("d",P),it.call(n,x,l,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,l,{isTransitioning:l._transitioning}),Y.call(e,at,H,l,{hovered:!1}),at.x0===at.x1||at.y0===at.y1?at._text="":vt?at._text=q?"":a.getPtLabel(at)||"":at._text=o(at,x,H,f,j)||"";var ft=g.ensureSingle(it,"g","slicetext"),ut=g.ensureSingle(ft,"text","",function(qt){qt.attr("data-notex",1)}),kt=g.ensureUniformFontSize(l,a.determineTextFont(H,at,j.font)),It=at._text||" ",Pt=vt&&It.indexOf("
")===-1;ut.text(It).classed("slicetext",!0).attr("text-anchor",U?"end":F||Pt?"start":"middle").call(I.font,kt).call(S.convertToTspans,l),at.textBB=I.bBox(ut.node()),at.transform=M(at,{fontSize:kt.size,isHeader:vt}),at.transform.fontSize=kt.size,A?ut.transition().attrTween("transform",function(qt){var Wt=k(qt,i,dt(),[T,u]);return function(Jt){return C(Wt(Jt))}}):ut.attr("transform",C(at))}),st}}),Fj=Dt((Q,Z)=>{var c=lS(),g=Dj();Z.exports=function(I,S,t,e){return c(I,S,t,e,{type:"treemap",drawDescendants:g})}}),Rj=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"treemap",basePlotModule:Lj(),categories:[],animatable:!0,attributes:Zk(),layoutAttributes:iS(),supplyDefaults:Pj(),supplyLayoutDefaults:Ij(),calc:aS().calc,crossTraceCalc:aS().crossTraceCalc,plot:Fj(),style:Gk().style,colorbar:xo(),meta:{}}}),Bj=Dt((Q,Z)=>{Z.exports=Rj()}),Nj=Dt(Q=>{var Z=Kc();Q.name="icicle",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),uS=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=kc(),t=jh().attributes,e=lx(),r=e3(),a=Zk(),n=gx(),o=Ia().extendFlat,i=kd().pattern;Z.exports={labels:r.labels,parents:r.parents,values:r.values,branchvalues:r.branchvalues,count:r.count,level:r.level,maxdepth:r.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:o({colors:r.marker.colors,line:r.marker.line,pattern:i,editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),leaf:r.leaf,pathbar:a.pathbar,text:e.text,textinfo:r.textinfo,texttemplate:g({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,hoverinfo:r.hoverinfo,hovertemplate:c({},{keys:n.eventDataKeys}),hovertemplatefallback:I(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:e.sort,root:r.root,domain:t({name:"icicle",trace:!0,editType:"calc"})}}),cS=Dt((Q,Z)=>{Z.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),jj=Dt((Q,Z)=>{var c=kn(),g=uS(),I=hi(),S=jh().defaults,t=J0().handleText,e=rx().TEXTPAD,r=ux().handleMarkerDefaults,a=Xc(),n=a.hasColorscale,o=a.handleDefaults;Z.exports=function(i,l,f,x){function y(C,A){return c.coerce(i,l,g,C,A)}var v=y("labels"),T=y("parents");if(!v||!v.length||!T||!T.length){l.visible=!1;return}var u=y("values");u&&u.length?y("branchvalues"):y("count"),y("level"),y("maxdepth"),y("tiling.orientation"),y("tiling.flip"),y("tiling.pad");var b=y("text");y("texttemplate"),y("texttemplatefallback"),l.texttemplate||y("textinfo",c.isArrayOrTypedArray(b)?"text+label":"label"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var _=y("pathbar.visible"),P="auto";t(i,l,x,y,P,{hasPathbar:_,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition"),r(i,l,x,y);var M=l._hasColorscale=n(i,"marker","colors")||(i.marker||{}).coloraxis;M&&o(i,l,x,y,{prefix:"marker.",cLetter:"c"}),y("leaf.opacity",M?1:.7),l._hovered={marker:{line:{width:2,color:I.contrast(x.paper_bgcolor)}}},_&&(y("pathbar.thickness",l.pathbar.textfont.size+2*e),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),S(l,x,y),l._length=null}}),Uj=Dt((Q,Z)=>{var c=kn(),g=cS();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("iciclecolorway",S.colorway),t("extendiciclecolors")}}),hS=Dt(Q=>{var Z=n3();Q.calc=function(c,g){return Z.calc(c,g)},Q.crossTraceCalc=function(c){return Z._runCrossTraceCalc("icicle",c)}}),Vj=Dt((Q,Z)=>{var c=r3(),g=oS();Z.exports=function(I,S,t){var e=t.flipX,r=t.flipY,a=t.orientation==="h",n=t.maxDepth,o=S[0],i=S[1];n&&(o=(I.height+1)*S[0]/Math.min(I.height+1,n),i=(I.height+1)*S[1]/Math.min(I.height+1,n));var l=c.partition().padding(t.pad.inner).size(a?[S[1],o]:[S[0],i])(I);return(a||e||r)&&g(l,S,{swapXY:a,flipX:e,flipY:r}),l}}),fS=Dt((Q,Z)=>{var c=qr(),g=hi(),I=kn(),S=Bp().resizeText,t=qk();function e(a){var n=a._fullLayout._iciclelayer.selectAll(".trace");S(a,n,"icicle"),n.each(function(o){var i=c.select(this),l=o[0],f=l.trace;i.style("opacity",f.opacity),i.selectAll("path.surface").each(function(x){c.select(this).call(r,x,f,a)})})}function r(a,n,o,i){var l=n.data.data,f=!n.children,x=l.i,y=I.castOption(o,x,"marker.line.color")||g.defaultLine,v=I.castOption(o,x,"marker.line.width")||0;a.call(t,n,o,i).style("stroke-width",v).call(g.stroke,y).style("opacity",f?o.leaf.opacity:null)}Z.exports={style:e,styleOne:r}}),Hj=Dt((Q,Z)=>{var c=qr(),g=kn(),I=Vs(),S=ec(),t=Vj(),e=fS().styleOne,r=gx(),a=kv(),n=x3(),o=$k().formatSliceLabel,i=!1;Z.exports=function(l,f,x,y,v){var T=v.width,u=v.height,b=v.viewX,_=v.viewY,P=v.pathSlice,M=v.toMoveInsideSlice,C=v.strTransform,A=v.hasTransition,h=v.handleSlicesExit,p=v.makeUpdateSliceInterpolator,k=v.makeUpdateTextInterpolator,w=v.prevEntry,R={},O=l._context.staticPlot,j=l._fullLayout,V=f[0],H=V.trace,F=H.textposition.indexOf("left")!==-1,U=H.textposition.indexOf("right")!==-1,W=H.textposition.indexOf("bottom")!==-1,q=t(x,[T,u],{flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1,orientation:H.tiling.orientation,pad:{inner:H.tiling.pad},maxDepth:H._maxDepth}),J=q.descendants(),lt=1/0,yt=-1/0;J.forEach(function(rt){var at=rt.depth;at>=H._maxDepth?(rt.x0=rt.x1=(rt.x0+rt.x1)/2,rt.y0=rt.y1=(rt.y0+rt.y1)/2):(lt=Math.min(lt,at),yt=Math.max(yt,at))}),y=y.data(J,a.getPtId),H._maxVisibleLayers=isFinite(yt)?yt-lt+1:0,y.enter().append("g").classed("slice",!0),h(y,i,R,[T,u],P),y.order();var mt=null;if(A&&w){var st=a.getPtId(w);y.each(function(rt){mt===null&&a.getPtId(rt)===st&&(mt={x0:rt.x0,x1:rt.x1,y0:rt.y0,y1:rt.y1})})}var tt=function(){return mt||{x0:0,x1:T,y0:0,y1:u}},dt=y;return A&&(dt=dt.transition().each("end",function(){var rt=c.select(this);a.setSliceCursor(rt,l,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),dt.each(function(rt){rt._x0=b(rt.x0),rt._x1=b(rt.x1),rt._y0=_(rt.y0),rt._y1=_(rt.y1),rt._hoverX=b(rt.x1-H.tiling.pad),rt._hoverY=_(W?rt.y1-H.tiling.pad/2:rt.y0+H.tiling.pad/2);var at=c.select(this),vt=g.ensureSingle(at,"path","surface",function(ut){ut.style("pointer-events",O?"none":"all")});A?vt.transition().attrTween("d",function(ut){var kt=p(ut,i,tt(),[T,u],{orientation:H.tiling.orientation,flipX:H.tiling.flip.indexOf("x")>-1,flipY:H.tiling.flip.indexOf("y")>-1});return function(It){return P(kt(It))}}):vt.attr("d",P),at.call(n,x,l,f,{styleOne:e,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,l,{isTransitioning:l._transitioning}),vt.call(e,rt,H,l,{hovered:!1}),rt.x0===rt.x1||rt.y0===rt.y1?rt._text="":rt._text=o(rt,x,H,f,j)||"";var it=g.ensureSingle(at,"g","slicetext"),Y=g.ensureSingle(it,"text","",function(ut){ut.attr("data-notex",1)}),ft=g.ensureUniformFontSize(l,a.determineTextFont(H,rt,j.font));Y.text(rt._text||" ").classed("slicetext",!0).attr("text-anchor",U?"end":F?"start":"middle").call(I.font,ft).call(S.convertToTspans,l),rt.textBB=I.bBox(Y.node()),rt.transform=M(rt,{fontSize:ft.size}),rt.transform.fontSize=ft.size,A?Y.transition().attrTween("transform",function(ut){var kt=k(ut,i,tt(),[T,u]);return function(It){return C(kt(It))}}):Y.attr("transform",C(rt))}),mt}}),Wj=Dt((Q,Z)=>{var c=lS(),g=Hj();Z.exports=function(I,S,t,e){return c(I,S,t,e,{type:"icicle",drawDescendants:g})}}),qj=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"icicle",basePlotModule:Nj(),categories:[],animatable:!0,attributes:uS(),layoutAttributes:cS(),supplyDefaults:jj(),supplyLayoutDefaults:Uj(),calc:hS().calc,crossTraceCalc:hS().crossTraceCalc,plot:Wj(),style:fS().style,colorbar:xo(),meta:{}}}),$j=Dt((Q,Z)=>{Z.exports=qj()}),Zj=Dt(Q=>{var Z=Kc();Q.name="funnelarea",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),dS=Dt((Q,Z)=>{var c=lx(),g=Ho(),I=jh().attributes,{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=Zu(),r=Ia().extendFlat;Z.exports={labels:c.labels,label0:c.label0,dlabel:c.dlabel,values:c.values,marker:{colors:c.marker.colors,line:{color:r({},c.marker.line.color,{dflt:null}),width:r({},c.marker.line.width,{dflt:1}),editType:"calc"},pattern:c.marker.pattern,editType:"calc"},text:c.text,hovertext:c.hovertext,scalegroup:r({},c.scalegroup,{}),textinfo:r({},c.textinfo,{flags:["label","text","value","percent"]}),texttemplate:t({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:r({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:r({},c.textposition,{values:["inside","none"],dflt:"inside"}),textfont:c.textfont,insidetextfont:c.insidetextfont,title:{text:c.title.text,font:c.title.font,position:r({},c.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:I({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}),pS=Dt((Q,Z)=>{var c=mk().hiddenlabels;Z.exports={hiddenlabels:c,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}),Gj=Dt((Q,Z)=>{var c=kn(),g=dS(),I=jh().defaults,S=J0().handleText,t=ux().handleLabelsAndValues,e=ux().handleMarkerDefaults;Z.exports=function(r,a,n,o){function i(P,M){return c.coerce(r,a,g,P,M)}var l=i("labels"),f=i("values"),x=t(l,f),y=x.len;if(a._hasLabels=x.hasLabels,a._hasValues=x.hasValues,!a._hasLabels&&a._hasValues&&(i("label0"),i("dlabel")),!y){a.visible=!1;return}a._length=y,e(r,a,o,i),i("scalegroup");var v=i("text"),T=i("texttemplate");i("texttemplatefallback");var u;if(T||(u=i("textinfo",Array.isArray(v)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),T||u&&u!=="none"){var b=i("textposition");S(r,a,o,i,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else u==="none"&&i("textposition","none");I(a,o,i);var _=i("title.text");_&&(i("title.position"),c.coerceFont(i,"title.font",o.font)),i("aspectratio"),i("baseratio")}}),Yj=Dt((Q,Z)=>{var c=kn(),g=pS();Z.exports=function(I,S){function t(e,r){return c.coerce(I,S,g,e,r)}t("hiddenlabels"),t("funnelareacolorway",S.colorway),t("extendfunnelareacolors")}}),mS=Dt((Q,Z)=>{var c=lb();function g(S,t){return c.calc(S,t)}function I(S){c.crossTraceCalc(S,{type:"funnelarea"})}Z.exports={calc:g,crossTraceCalc:I}}),Kj=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=kn(),S=I.strScale,t=I.strTranslate,e=ec(),r=nx(),a=r.toMoveInsideBar,n=Bp(),o=n.recordMinTextSize,i=n.clearMinTextSize,l=wg(),f=gk(),x=f.attachFxHandlers,y=f.determineInsideTextFont,v=f.layoutAreas,T=f.prerenderTitles,u=f.positionTitleOutside,b=f.formatSliceLabel;Z.exports=function(C,A){var h=C._context.staticPlot,p=C._fullLayout;i("funnelarea",p),T(A,C),v(A,p._size),I.makeTraceGroups(p._funnelarealayer,A,"trace").each(function(k){var w=c.select(this),R=k[0],O=R.trace;M(k),w.each(function(){var j=c.select(this).selectAll("g.slice").data(k);j.enter().append("g").classed("slice",!0),j.exit().remove(),j.each(function(H,F){if(H.hidden){c.select(this).selectAll("path,g").remove();return}H.pointNumber=H.i,H.curveNumber=O.index;var U=R.cx,W=R.cy,q=c.select(this),J=q.selectAll("path.surface").data([H]);J.enter().append("path").classed("surface",!0).style({"pointer-events":h?"none":"all"}),q.call(x,C,k);var lt="M"+(U+H.TR[0])+","+(W+H.TR[1])+_(H.TR,H.BR)+_(H.BR,H.BL)+_(H.BL,H.TL)+"Z";J.attr("d",lt),b(C,H,R);var yt=l.castOption(O.textposition,H.pts),mt=q.selectAll("g.slicetext").data(H.text&&yt!=="none"?[0]:[]);mt.enter().append("g").classed("slicetext",!0),mt.exit().remove(),mt.each(function(){var st=I.ensureSingle(c.select(this),"text","",function(ft){ft.attr("data-notex",1)}),tt=I.ensureUniformFontSize(C,y(O,H,p.font));st.text(H.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(g.font,tt).call(e.convertToTspans,C);var dt=g.bBox(st.node()),rt,at,vt,it=Math.min(H.BL[1],H.BR[1])+W,Y=Math.max(H.TL[1],H.TR[1])+W;at=Math.max(H.TL[0],H.BL[0])+U,vt=Math.min(H.TR[0],H.BR[0])+U,rt=a(at,vt,it,Y,dt,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),rt.fontSize=tt.size,o(O.type,rt,p),k[F].transform=rt,I.setTransormAndDisplay(st,rt)})});var V=c.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);V.enter().append("g").classed("titletext",!0),V.exit().remove(),V.each(function(){var H=I.ensureSingle(c.select(this),"text","",function(W){W.attr("data-notex",1)}),F=O.title.text;O._meta&&(F=I.templateString(F,O._meta)),H.text(F).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(g.font,O.title.font).call(e.convertToTspans,C);var U=u(R,p._size);H.attr("transform",t(U.x,U.y)+S(Math.min(1,U.scale))+t(U.tx,U.ty))})})})};function _(C,A){var h=A[0]-C[0],p=A[1]-C[1];return"l"+h+","+p}function P(C,A){return[.5*(C[0]+A[0]),.5*(C[1]+A[1])]}function M(C){if(!C.length)return;var A=C[0],h=A.trace,p=h.aspectratio,k=h.baseratio;k>.999&&(k=.999);var w=Math.pow(k,2),R=A.vTotal,O=R*w/(1-w),j=R,V=O/R;function H(){var kt=Math.sqrt(V);return{x:kt,y:-kt}}function F(){var kt=H();return[kt.x,kt.y]}var U,W=[];W.push(F());var q,J;for(q=C.length-1;q>-1;q--)if(J=C[q],!J.hidden){var lt=J.v/j;V+=lt,W.push(F())}var yt=1/0,mt=-1/0;for(q=0;q-1;q--)if(J=C[q],!J.hidden){Y+=1;var ft=W[Y][0],ut=W[Y][1];J.TL=[-ft,ut],J.TR=[ft,ut],J.BL=vt,J.BR=it,J.pxmid=P(J.TR,J.BR),vt=J.TL,it=J.TR}}}),Xj=Dt((Q,Z)=>{var c=qr(),g=kg(),I=Bp().resizeText;Z.exports=function(S){var t=S._fullLayout._funnelarealayer.selectAll(".trace");I(S,t,"funnelarea"),t.each(function(e){var r=e[0],a=r.trace,n=c.select(this);n.style({opacity:a.opacity}),n.selectAll("path.surface").each(function(o){c.select(this).call(g,o,a,S)})})}}),Jj=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Zj(),categories:["pie-like","funnelarea","showLegend"],attributes:dS(),layoutAttributes:pS(),supplyDefaults:Gj(),supplyLayoutDefaults:Yj(),calc:mS().calc,crossTraceCalc:mS().crossTraceCalc,plot:Kj(),style:Xj(),styleOne:kg(),meta:{}}}),Qj=Dt((Q,Z)=>{Z.exports=Jj()}),fp=Dt((Q,Z)=>{(function(){var c={24:function(t){var e={left:0,top:0};t.exports=r;function r(n,o,i){o=o||n.currentTarget||n.srcElement,Array.isArray(i)||(i=[0,0]);var l=n.clientX||0,f=n.clientY||0,x=a(o);return i[0]=l-x.left,i[1]=f-x.top,i}function a(n){return n===window||n===document||n===document.body?e:n.getBoundingClientRect()}},109:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],l=n[2],f=a[0]-i,x=a[2]-l,y=Math.sin(o),v=Math.cos(o);return r[0]=i+x*y+f*v,r[1]=a[1],r[2]=l+x*v-f*y,r}},160:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.max(a[0],n[0]),r[1]=Math.max(a[1],n[1]),r[2]=Math.max(a[2],n[2]),r[3]=Math.max(a[3],n[3]),r}},216:function(t){t.exports=e;function e(r,a){for(var n={},o=0;o1){y[0]in f||(f[y[0]]=[]),f=f[y[0]];for(var v=1;v=0;--U){var dt=H[U];W=dt[0];var rt=j[W],at=rt[0],vt=rt[1],it=O[at],Y=O[vt];if((it[0]-Y[0]||it[1]-Y[1])<0){var ft=at;at=vt,vt=ft}rt[0]=at;var ut=rt[1]=dt[1],kt;for(F&&(kt=rt[2]);U>0&&H[U-1][0]===W;){var dt=H[--U],It=dt[1];F?j.push([ut,It,kt]):j.push([ut,It]),ut=It}F?j.push([ut,vt,kt]):j.push([ut,vt])}return q}function C(O,j,V){for(var H=j.length,F=new a(H),U=[],W=0;Wj[2]?1:0)}function p(O,j,V){if(O.length!==0){if(j)for(var H=0;H0||W.length>0}function R(O,j,V){var H;if(V){H=j;for(var F=new Array(j.length),U=0;U1e-6?(b=Math.acos(_),C=Math.sin(b),M=Math.sin((1-o)*b)/C,E=Math.sin(o*b)/C):(M=1-o,E=o),r[0]=M*i+E*y,r[1]=M*s+E*v,r[2]=M*f+E*T,r[3]=M*x+E*u,r}},799:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision mediump float; +}`]);e.meshShader={vertex:n,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:i,fragment:l,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},620:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},665:function(t,e,r){var a=r(3202);t.exports=l;var n=96;function o(f,x){var y=a(getComputedStyle(f).getPropertyValue(x));return y[0]*l(y[1],f)}function i(f,x){var y=document.createElement("div");y.style["font-size"]="128"+f,x.appendChild(y);var v=o(y,"font-size")/128;return x.removeChild(y),v}function l(f,x){switch(x=x||document.body,f=(f||"px").trim().toLowerCase(),(x===window||x===document)&&(x=document.body),f){case"%":return x.clientHeight/100;case"ch":case"ex":return i(f,x);case"em":return o(x,"font-size");case"rem":return o(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return n;case"cm":return n/2.54;case"mm":return n/25.4;case"pt":return n/72;case"pc":return n/6}return 1}},727:function(t,e,r){var a=r(2962),n=6;function o(P){var M=P===2?f:P===3?x:P===4?y:P===5?v:T;return P<6?M(a[P]):M(a)}function i(){return[[0]]}function l(P,M){return[[M[0]],[P[0][0]]]}function f(P){return function(M,C){return[P([[+C[0],+M[0][1]],[+C[1],+M[1][1]]]),P([[+M[0][0],+C[0]],[+M[1][0],+C[1]]]),P(M)]}}function x(P){return function(M,C){return[P([[+C[0],+M[0][1],+M[0][2]],[+C[1],+M[1][1],+M[1][2]],[+C[2],+M[2][1],+M[2][2]]]),P([[+M[0][0],+C[0],+M[0][2]],[+M[1][0],+C[1],+M[1][2]],[+M[2][0],+C[2],+M[2][2]]]),P([[+M[0][0],+M[0][1],+C[0]],[+M[1][0],+M[1][1],+C[1]],[+M[2][0],+M[2][1],+C[2]]]),P(M)]}}function y(P){return function(M,C){return[P([[+C[0],+M[0][1],+M[0][2],+M[0][3]],[+C[1],+M[1][1],+M[1][2],+M[1][3]],[+C[2],+M[2][1],+M[2][2],+M[2][3]],[+C[3],+M[3][1],+M[3][2],+M[3][3]]]),P([[+M[0][0],+C[0],+M[0][2],+M[0][3]],[+M[1][0],+C[1],+M[1][2],+M[1][3]],[+M[2][0],+C[2],+M[2][2],+M[2][3]],[+M[3][0],+C[3],+M[3][2],+M[3][3]]]),P([[+M[0][0],+M[0][1],+C[0],+M[0][3]],[+M[1][0],+M[1][1],+C[1],+M[1][3]],[+M[2][0],+M[2][1],+C[2],+M[2][3]],[+M[3][0],+M[3][1],+C[3],+M[3][3]]]),P([[+M[0][0],+M[0][1],+M[0][2],+C[0]],[+M[1][0],+M[1][1],+M[1][2],+C[1]],[+M[2][0],+M[2][1],+M[2][2],+C[2]],[+M[3][0],+M[3][1],+M[3][2],+C[3]]]),P(M)]}}function v(P){return function(M,C){return[P([[+C[0],+M[0][1],+M[0][2],+M[0][3],+M[0][4]],[+C[1],+M[1][1],+M[1][2],+M[1][3],+M[1][4]],[+C[2],+M[2][1],+M[2][2],+M[2][3],+M[2][4]],[+C[3],+M[3][1],+M[3][2],+M[3][3],+M[3][4]],[+C[4],+M[4][1],+M[4][2],+M[4][3],+M[4][4]]]),P([[+M[0][0],+C[0],+M[0][2],+M[0][3],+M[0][4]],[+M[1][0],+C[1],+M[1][2],+M[1][3],+M[1][4]],[+M[2][0],+C[2],+M[2][2],+M[2][3],+M[2][4]],[+M[3][0],+C[3],+M[3][2],+M[3][3],+M[3][4]],[+M[4][0],+C[4],+M[4][2],+M[4][3],+M[4][4]]]),P([[+M[0][0],+M[0][1],+C[0],+M[0][3],+M[0][4]],[+M[1][0],+M[1][1],+C[1],+M[1][3],+M[1][4]],[+M[2][0],+M[2][1],+C[2],+M[2][3],+M[2][4]],[+M[3][0],+M[3][1],+C[3],+M[3][3],+M[3][4]],[+M[4][0],+M[4][1],+C[4],+M[4][3],+M[4][4]]]),P([[+M[0][0],+M[0][1],+M[0][2],+C[0],+M[0][4]],[+M[1][0],+M[1][1],+M[1][2],+C[1],+M[1][4]],[+M[2][0],+M[2][1],+M[2][2],+C[2],+M[2][4]],[+M[3][0],+M[3][1],+M[3][2],+C[3],+M[3][4]],[+M[4][0],+M[4][1],+M[4][2],+C[4],+M[4][4]]]),P([[+M[0][0],+M[0][1],+M[0][2],+M[0][3],+C[0]],[+M[1][0],+M[1][1],+M[1][2],+M[1][3],+C[1]],[+M[2][0],+M[2][1],+M[2][2],+M[2][3],+C[2]],[+M[3][0],+M[3][1],+M[3][2],+M[3][3],+C[3]],[+M[4][0],+M[4][1],+M[4][2],+M[4][3],+C[4]]]),P(M)]}}function T(P){return function(M,C){return[P([[+C[0],+M[0][1],+M[0][2],+M[0][3],+M[0][4],+M[0][5]],[+C[1],+M[1][1],+M[1][2],+M[1][3],+M[1][4],+M[1][5]],[+C[2],+M[2][1],+M[2][2],+M[2][3],+M[2][4],+M[2][5]],[+C[3],+M[3][1],+M[3][2],+M[3][3],+M[3][4],+M[3][5]],[+C[4],+M[4][1],+M[4][2],+M[4][3],+M[4][4],+M[4][5]],[+C[5],+M[5][1],+M[5][2],+M[5][3],+M[5][4],+M[5][5]]]),P([[+M[0][0],+C[0],+M[0][2],+M[0][3],+M[0][4],+M[0][5]],[+M[1][0],+C[1],+M[1][2],+M[1][3],+M[1][4],+M[1][5]],[+M[2][0],+C[2],+M[2][2],+M[2][3],+M[2][4],+M[2][5]],[+M[3][0],+C[3],+M[3][2],+M[3][3],+M[3][4],+M[3][5]],[+M[4][0],+C[4],+M[4][2],+M[4][3],+M[4][4],+M[4][5]],[+M[5][0],+C[5],+M[5][2],+M[5][3],+M[5][4],+M[5][5]]]),P([[+M[0][0],+M[0][1],+C[0],+M[0][3],+M[0][4],+M[0][5]],[+M[1][0],+M[1][1],+C[1],+M[1][3],+M[1][4],+M[1][5]],[+M[2][0],+M[2][1],+C[2],+M[2][3],+M[2][4],+M[2][5]],[+M[3][0],+M[3][1],+C[3],+M[3][3],+M[3][4],+M[3][5]],[+M[4][0],+M[4][1],+C[4],+M[4][3],+M[4][4],+M[4][5]],[+M[5][0],+M[5][1],+C[5],+M[5][3],+M[5][4],+M[5][5]]]),P([[+M[0][0],+M[0][1],+M[0][2],+C[0],+M[0][4],+M[0][5]],[+M[1][0],+M[1][1],+M[1][2],+C[1],+M[1][4],+M[1][5]],[+M[2][0],+M[2][1],+M[2][2],+C[2],+M[2][4],+M[2][5]],[+M[3][0],+M[3][1],+M[3][2],+C[3],+M[3][4],+M[3][5]],[+M[4][0],+M[4][1],+M[4][2],+C[4],+M[4][4],+M[4][5]],[+M[5][0],+M[5][1],+M[5][2],+C[5],+M[5][4],+M[5][5]]]),P([[+M[0][0],+M[0][1],+M[0][2],+M[0][3],+C[0],+M[0][5]],[+M[1][0],+M[1][1],+M[1][2],+M[1][3],+C[1],+M[1][5]],[+M[2][0],+M[2][1],+M[2][2],+M[2][3],+C[2],+M[2][5]],[+M[3][0],+M[3][1],+M[3][2],+M[3][3],+C[3],+M[3][5]],[+M[4][0],+M[4][1],+M[4][2],+M[4][3],+C[4],+M[4][5]],[+M[5][0],+M[5][1],+M[5][2],+M[5][3],+C[5],+M[5][5]]]),P([[+M[0][0],+M[0][1],+M[0][2],+M[0][3],+M[0][4],+C[0]],[+M[1][0],+M[1][1],+M[1][2],+M[1][3],+M[1][4],+C[1]],[+M[2][0],+M[2][1],+M[2][2],+M[2][3],+M[2][4],+C[2]],[+M[3][0],+M[3][1],+M[3][2],+M[3][3],+M[3][4],+C[3]],[+M[4][0],+M[4][1],+M[4][2],+M[4][3],+M[4][4],+C[4]],[+M[5][0],+M[5][1],+M[5][2],+M[5][3],+M[5][4],+C[5]]]),P(M)]}}var u=[i,l];function b(P,M,C,A,h,p,k,w){return function(R,O){switch(R.length){case 0:return P(R,O);case 1:return M(R,O);case 2:return C(R,O);case 3:return A(R,O);case 4:return h(R,O);case 5:return p(R,O)}var j=k[R.length];return j||(j=k[R.length]=w(R.length)),j(R,O)}}function _(){for(;u.length1e-6?(b=Math.acos(_),P=Math.sin(b),M=Math.sin((1-o)*b)/P,C=Math.sin(o*b)/P):(M=1-o,C=o),r[0]=M*i+C*y,r[1]=M*l+C*v,r[2]=M*f+C*T,r[3]=M*x+C*u,r}},799:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; @@ -530,7 +571,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);t.exports=function(s){return n(s,o,i,null,[{name:"position",type:"vec2"}])}},811:function(t){t.exports=e;function e(r,a){return r[0]=1/a[0],r[1]=1/a[1],r[2]=1/a[2],r}},840:function(t,e,r){var a=r(3236),n=a([`precision highp float; +}`]);t.exports=function(l){return n(l,o,i,null,[{name:"position",type:"vec2"}])}},811:function(t){t.exports=e;function e(r,a){return r[0]=1/a[0],r[1]=1/a[1],r[2]=1/a[2],r}},840:function(t,e,r){var a=r(3236),n=a([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -692,7 +733,7 @@ void main() { f_color = color; f_data = position; f_uv = uv; -}`]),s=a([`precision highp float; +}`]),l=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -894,7 +935,7 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);e.meshShader={vertex:n,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:f,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:y,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:T,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:u,fragment:b,attributes:[{name:"position",type:"vec3"}]}},855:function(t,e,r){t.exports={init:_,sweepBipartite:E,sweepComplete:A,scanBipartite:h,scanComplete:p};var a=r(1888),n=r(8828),o=r(4192),i=1<<28,s=1024,f=a.mallocInt32(s),x=a.mallocInt32(s),y=a.mallocInt32(s),v=a.mallocInt32(s),T=a.mallocInt32(s),u=a.mallocInt32(s),b=a.mallocDouble(s*8);function _(k){var w=n.nextPow2(k);f.length>>1;o(b,rt);for(var at=0,vt=0,pt=0;pt=i)it=it-i|0,C(y,v,vt--,it);else if(it>=0)C(f,x,at--,it);else if(it<=-i){it=-it-i|0;for(var Y=0;Y>>1;o(b,rt);for(var at=0,vt=0,it=0,pt=0;pt>1===b[2*pt+3]>>1&&(ft=2,pt+=1),Y<0){for(var ut=-(Y>>1)-1,wt=0;wt>1)-1;ft===0?C(f,x,at--,ut):ft===1?C(y,v,vt--,ut):ft===2&&C(T,u,it--,ut)}}}function h(k,w,R,O,N,V,H,F,U,W,q,X){var lt=0,yt=2*k,pt=w,st=w+k,tt=1,dt=1;O?dt=i:tt=i;for(var rt=N;rt>>1;o(b,Y);for(var ft=0,rt=0;rt=i?(wt=!O,at-=i):(wt=!!O,at-=1),wt)M(f,x,ft++,at);else{var zt=X[at],Pt=yt*at,Wt=q[Pt+w+1],Ht=q[Pt+w+1+k];t:for(var Jt=0;Jt>>1;o(b,at);for(var vt=0,st=0;st=i)f[vt++]=tt-i;else{tt-=1;var Y=q[tt],ft=lt*tt,ut=W[ft+w+1],wt=W[ft+w+1+k];t:for(var zt=0;zt=0;--zt)if(f[zt]===tt){for(var Jt=zt+1;Jt>>1;o(b,rt);for(var at=0,vt=0,mt=0;mt=i)it=it-i|0,P(y,v,vt--,it);else if(it>=0)P(f,x,at--,it);else if(it<=-i){it=-it-i|0;for(var Y=0;Y>>1;o(b,rt);for(var at=0,vt=0,it=0,mt=0;mt>1===b[2*mt+3]>>1&&(ft=2,mt+=1),Y<0){for(var ut=-(Y>>1)-1,kt=0;kt>1)-1;ft===0?P(f,x,at--,ut):ft===1?P(y,v,vt--,ut):ft===2&&P(T,u,it--,ut)}}}function h(k,w,R,O,j,V,H,F,U,W,q,J){var lt=0,yt=2*k,mt=w,st=w+k,tt=1,dt=1;O?dt=i:tt=i;for(var rt=j;rt>>1;o(b,Y);for(var ft=0,rt=0;rt=i?(kt=!O,at-=i):(kt=!!O,at-=1),kt)M(f,x,ft++,at);else{var It=J[at],Pt=yt*at,qt=q[Pt+w+1],Wt=q[Pt+w+1+k];t:for(var Jt=0;Jt>>1;o(b,at);for(var vt=0,st=0;st=i)f[vt++]=tt-i;else{tt-=1;var Y=q[tt],ft=lt*tt,ut=W[ft+w+1],kt=W[ft+w+1+k];t:for(var It=0;It=0;--It)if(f[It]===tt){for(var Jt=It+1;Jt0&&v>0||y<0&&v<0)return!1;var T=a(f,i,s),u=a(x,i,s);return T>0&&u>0||T<0&&u<0?!1:y===0&&v===0&&T===0&&u===0?n(i,s,f,x):!0}},1278:function(t,e,r){var a=r(2361),n=Math.pow(2,-1074),o=-1>>>0;t.exports=i;function i(s,f){if(isNaN(s)||isNaN(f))return NaN;if(s===f)return s;if(s===0)return f<0?-n:n;var x=a.hi(s),y=a.lo(s);return f>s==s>0?y===o?(x+=1,y=0):y+=1:y===0?(y=o,x-=1):y-=1,a.pack(y,x)}},1283:function(t,e,r){var a=r(9405),n=r(3236),o=n([`precision highp float; +`]);e.createShader=function(x){var y=a(x,o,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},e.createPickShader=function(x){var y=a(x,o,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},e.createContourShader=function(x){var y=a(x,l,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y},e.createPickContourShader=function(x){var y=a(x,l,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y}},1085:function(t,e,r){var a=r(1371);t.exports=n;function n(o,i,l){i=typeof i=="number"?i:1,l=l||": ";var f=o.split(/\r?\n/),x=String(f.length+i-1).length;return f.map(function(y,v){var T=v+i,u=String(T).length,b=a(T,x-u);return b+l+y}).join(` +`)}},1091:function(t){t.exports=e;function e(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},1125:function(t,e,r){t.exports=o;var a=r(3250)[3];function n(i,l,f,x){for(var y=0;y<2;++y){var v=i[y],T=l[y],u=Math.min(v,T),b=Math.max(v,T),_=f[y],P=x[y],M=Math.min(_,P),C=Math.max(_,P);if(C0&&v>0||y<0&&v<0)return!1;var T=a(f,i,l),u=a(x,i,l);return T>0&&u>0||T<0&&u<0?!1:y===0&&v===0&&T===0&&u===0?n(i,l,f,x):!0}},1278:function(t,e,r){var a=r(2361),n=Math.pow(2,-1074),o=-1>>>0;t.exports=i;function i(l,f){if(isNaN(l)||isNaN(f))return NaN;if(l===f)return l;if(l===0)return f<0?-n:n;var x=a.hi(l),y=a.lo(l);return f>l==l>0?y===o?(x+=1,y=0):y+=1:y===0?(y=o,x-=1):y-=1,a.pack(y,x)}},1283:function(t,e,r){var a=r(9405),n=r(3236),o=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1214,7 +1255,7 @@ void main() { pickId = id; dataCoordinate = position; } -}`]),s=n([`precision highp float; +}`]),l=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1343,7 +1384,7 @@ void main() { if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; gl_FragColor = vec4(pickGroup, pickId.bgr); -}`]),y=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],v={vertex:o,fragment:f,attributes:y},T={vertex:i,fragment:f,attributes:y},u={vertex:s,fragment:f,attributes:y},b={vertex:o,fragment:x,attributes:y},_={vertex:i,fragment:x,attributes:y},C={vertex:s,fragment:x,attributes:y};function M(E,A){var h=a(E,A),p=h.attributes;return p.position.location=0,p.color.location=1,p.glyph.location=2,p.id.location=3,h}e.createPerspective=function(E){return M(E,v)},e.createOrtho=function(E){return M(E,T)},e.createProject=function(E){return M(E,u)},e.createPickPerspective=function(E){return M(E,b)},e.createPickOrtho=function(E){return M(E,_)},e.createPickProject=function(E){return M(E,C)}},1303:function(t,e,r){t.exports=o;var a=r(3250);function n(i,s){var f,x;if(s[0][0]s[1][0])f=s[1],x=s[0];else{var y=Math.min(i[0][1],i[1][1]),v=Math.max(i[0][1],i[1][1]),T=Math.min(s[0][1],s[1][1]),u=Math.max(s[0][1],s[1][1]);return vu?y-u:v-u}var b,_;i[0][1]s[1][0])f=s[1],x=s[0];else return n(s,i);var y,v;if(i[0][0]i[1][0])y=i[1],v=i[0];else return-n(i,s);var T=a(f,x,v),u=a(f,x,y);if(T<0){if(u<=0)return T}else if(T>0){if(u>=0)return T}else if(u)return u;if(T=a(v,y,x),u=a(v,y,f),T<0){if(u<=0)return T}else if(T>0){if(u>=0)return T}else if(u)return u;return x[0]-v[0]}},1318:function(t){t.exports=e;function e(r,a){return r[0].mul(a[1]).cmp(a[0].mul(r[1]))}},1338:function(t){function e(n,o,i){var s=n[i]|0;if(s<=0)return[];var f=new Array(s),x;if(i===n.length-1)for(x=0;x"u"&&(o=0),typeof n){case"number":if(n>0)return r(n|0,o);break;case"object":if(typeof n.length=="number")return e(n,o,0);break}return[]}t.exports=a},1369:function(t,e,r){var a=r(5716);t.exports=n;function n(o){var i=o.length,s=o.words,f=0;if(i===1)f=s[0];else if(i===2)f=s[0]+s[1]*67108864;else for(var x=0;xo)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;il[1][0])f=l[1],x=l[0];else{var y=Math.min(i[0][1],i[1][1]),v=Math.max(i[0][1],i[1][1]),T=Math.min(l[0][1],l[1][1]),u=Math.max(l[0][1],l[1][1]);return vu?y-u:v-u}var b,_;i[0][1]l[1][0])f=l[1],x=l[0];else return n(l,i);var y,v;if(i[0][0]i[1][0])y=i[1],v=i[0];else return-n(i,l);var T=a(f,x,v),u=a(f,x,y);if(T<0){if(u<=0)return T}else if(T>0){if(u>=0)return T}else if(u)return u;if(T=a(v,y,x),u=a(v,y,f),T<0){if(u<=0)return T}else if(T>0){if(u>=0)return T}else if(u)return u;return x[0]-v[0]}},1318:function(t){t.exports=e;function e(r,a){return r[0].mul(a[1]).cmp(a[0].mul(r[1]))}},1338:function(t){function e(n,o,i){var l=n[i]|0;if(l<=0)return[];var f=new Array(l),x;if(i===n.length-1)for(x=0;x"u"&&(o=0),typeof n){case"number":if(n>0)return r(n|0,o);break;case"object":if(typeof n.length=="number")return e(n,o,0);break}return[]}t.exports=a},1369:function(t,e,r){var a=r(5716);t.exports=n;function n(o){var i=o.length,l=o.words,f=0;if(i===1)f=l[0];else if(i===2)f=l[0]+l[1]*67108864;else for(var x=0;xo)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i=0?k[U]:F)}function O(H){var F=_(H);return F?w in F:p.indexOf(H)>=0}function N(H,F){var U,W=_(H);return W?W[w]=F:(U=p.indexOf(H),U>=0?k[U]=F:(U=p.length,k[U]=F,p[U]=H)),this}function V(H){var F=_(H),U,W;return F?w in F&&delete F[w]:(U=p.indexOf(H),U<0?!1:(W=p.length-1,p[U]=void 0,k[U]=k[W],p[U]=p[W],p.length=W,k.length=W,!0))}return Object.create(h.prototype,{get___:{value:C(R)},has___:{value:C(O)},set___:{value:C(N)},delete___:{value:C(V)}})};h.prototype=Object.create(Object.prototype,{get:{value:function(p,k){return this.get___(p,k)},writable:!0,configurable:!0},has:{value:function(p){return this.has___(p)},writable:!0,configurable:!0},set:{value:function(p,k){return this.set___(p,k)},writable:!0,configurable:!0},delete:{value:function(p){return this.delete___(p)},writable:!0,configurable:!0}}),typeof a=="function"?function(){r&&typeof Proxy<"u"&&(Proxy=void 0);function p(){this instanceof h||E();var k=new a,w=void 0,R=!1;function O(F,U){return w?k.has(F)?k.get(F):w.get___(F,U):k.get(F,U)}function N(F){return k.has(F)||(w?w.has___(F):!1)}var V;r?V=function(F,U){return k.set(F,U),k.has(F)||(w||(w=new h),w.set(F,U)),this}:V=function(F,U){if(R)try{k.set(F,U)}catch{w||(w=new h),w.set___(F,U)}else k.set(F,U);return this};function H(F){var U=!!k.delete(F);return w&&w.delete___(F)||U}return Object.create(h.prototype,{get___:{value:C(O)},has___:{value:C(N)},set___:{value:C(V)},delete___:{value:C(H)},permitHostObjects___:{value:C(function(F){if(F===e)R=!0;else throw new Error("bogus call to permitHostObjects___")})}})}p.prototype=h.prototype,t.exports=p,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),t.exports=h)})()},1570:function(t){t.exports=r;var e=[function(){function a(n,o,i,s){for(var f=n.length,x=[],y=0;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y=0?k[U]:F)}function O(H){var F=_(H);return F?w in F:p.indexOf(H)>=0}function j(H,F){var U,W=_(H);return W?W[w]=F:(U=p.indexOf(H),U>=0?k[U]=F:(U=p.length,k[U]=F,p[U]=H)),this}function V(H){var F=_(H),U,W;return F?w in F&&delete F[w]:(U=p.indexOf(H),U<0?!1:(W=p.length-1,p[U]=void 0,k[U]=k[W],p[U]=p[W],p.length=W,k.length=W,!0))}return Object.create(h.prototype,{get___:{value:P(R)},has___:{value:P(O)},set___:{value:P(j)},delete___:{value:P(V)}})};h.prototype=Object.create(Object.prototype,{get:{value:function(p,k){return this.get___(p,k)},writable:!0,configurable:!0},has:{value:function(p){return this.has___(p)},writable:!0,configurable:!0},set:{value:function(p,k){return this.set___(p,k)},writable:!0,configurable:!0},delete:{value:function(p){return this.delete___(p)},writable:!0,configurable:!0}}),typeof a=="function"?function(){r&&typeof Proxy<"u"&&(Proxy=void 0);function p(){this instanceof h||C();var k=new a,w=void 0,R=!1;function O(F,U){return w?k.has(F)?k.get(F):w.get___(F,U):k.get(F,U)}function j(F){return k.has(F)||(w?w.has___(F):!1)}var V;r?V=function(F,U){return k.set(F,U),k.has(F)||(w||(w=new h),w.set(F,U)),this}:V=function(F,U){if(R)try{k.set(F,U)}catch{w||(w=new h),w.set___(F,U)}else k.set(F,U);return this};function H(F){var U=!!k.delete(F);return w&&w.delete___(F)||U}return Object.create(h.prototype,{get___:{value:P(O)},has___:{value:P(j)},set___:{value:P(V)},delete___:{value:P(H)},permitHostObjects___:{value:P(function(F){if(F===e)R=!0;else throw new Error("bogus call to permitHostObjects___")})}})}p.prototype=h.prototype,t.exports=p,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),t.exports=h)})()},1570:function(t){t.exports=r;var e=[function(){function a(n,o,i,l){for(var f=n.length,x=[],y=0;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y>1,b=i[2*u+1];if(b===y)return u;y0?W.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=b;function _(H){return new Uint8Array(b(H),0,H)}e.mallocUint8=_;function C(H){return new Uint16Array(b(2*H),0,H)}e.mallocUint16=C;function M(H){return new Uint32Array(b(4*H),0,H)}e.mallocUint32=M;function E(H){return new Int8Array(b(H),0,H)}e.mallocInt8=E;function A(H){return new Int16Array(b(2*H),0,H)}e.mallocInt16=A;function h(H){return new Int32Array(b(4*H),0,H)}e.mallocInt32=h;function p(H){return new Float32Array(b(4*H),0,H)}e.mallocFloat32=e.mallocFloat=p;function k(H){return new Float64Array(b(8*H),0,H)}e.mallocFloat64=e.mallocDouble=k;function w(H){return i?new Uint8ClampedArray(b(H),0,H):_(H)}e.mallocUint8Clamped=w;function R(H){return s?new BigUint64Array(b(8*H),0,H):null}e.mallocBigUint64=R;function O(H){return f?new BigInt64Array(b(8*H),0,H):null}e.mallocBigInt64=O;function N(H){return new DataView(b(H),0,H)}e.mallocDataView=N;function V(H){H=a.nextPow2(H);var F=a.log2(H),U=v[F];return U.length>0?U.pop():new o(H)}e.mallocBuffer=V,e.clearCache=function(){for(var H=0;H<32;++H)x.UINT8[H].length=0,x.UINT16[H].length=0,x.UINT32[H].length=0,x.INT8[H].length=0,x.INT16[H].length=0,x.INT32[H].length=0,x.FLOAT[H].length=0,x.DOUBLE[H].length=0,x.BIGUINT64[H].length=0,x.BIGINT64[H].length=0,x.UINT8C[H].length=0,y[H].length=0,v[H].length=0}},1903:function(t){t.exports=e;function e(r){var a=new Float32Array(16);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=r[4],a[5]=r[5],a[6]=r[6],a[7]=r[7],a[8]=r[8],a[9]=r[9],a[10]=r[10],a[11]=r[11],a[12]=r[12],a[13]=r[13],a[14]=r[14],a[15]=r[15],a}},1944:function(t,e,r){var a=r(5250),n=r(8210);t.exports=o;function o(i,s){for(var f=a(i[0],s[0]),x=1;x>1,V=f(p[N],k);V<=0?(V===0&&(O=N),w=N+1):V>0&&(R=N-1)}return O}e.findCell=T;function u(p,k){for(var w=new Array(p.length),R=0,O=w.length;R=p.length||f(p[lt],N)!==0););}return w}e.incidence=u;function b(p,k){if(!k)return u(v(C(p,0)),p);for(var w=new Array(k),R=0;R>>U&1&&F.push(O[U]);k.push(F)}return y(k)}e.explode=_;function C(p,k){if(k<0)return[];for(var w=[],R=(1<0}h=h.filter(p);for(var k=h.length,w=new Array(k),R=new Array(k),A=0;A0;){var ut=Y.pop(),wt=pt[ut];f(wt,function(ge,he){return ge-he});var zt=wt.length,Pt=ft[ut],Wt;if(Pt===0){var U=h[ut];Wt=[U]}for(var A=0;A=0)&&(ft[Ht]=Pt^1,Y.push(Ht),Pt===0)){var U=h[Ht];it(U)||(U.reverse(),Wt.push(U))}}Pt===0&&_.push(Wt)}return _}},2145:function(t,e){e.uniforms=o,e.attributes=i;var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},a=null;function n(s,f){if(!a){var x=Object.keys(r);a={};for(var y=0;y1)for(var b=0;b1&&V.drawBuffersWEBGL(n[N]);var q=k.getExtension("WEBGL_depth_texture");q?H?h.depth=u(k,R,O,q.UNSIGNED_INT_24_8_WEBGL,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F&&(h.depth=u(k,R,O,k.UNSIGNED_SHORT,k.DEPTH_COMPONENT,k.DEPTH_ATTACHMENT)):F&&H?h._depth_rb=b(k,R,O,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F?h._depth_rb=b(k,R,O,k.DEPTH_COMPONENT16,k.DEPTH_ATTACHMENT):H&&(h._depth_rb=b(k,R,O,k.STENCIL_INDEX,k.STENCIL_ATTACHMENT));var X=k.checkFramebufferStatus(k.FRAMEBUFFER);if(X!==k.FRAMEBUFFER_COMPLETE){h._destroyed=!0,k.bindFramebuffer(k.FRAMEBUFFER,null),k.deleteFramebuffer(h.handle),h.handle=null,h.depth&&(h.depth.dispose(),h.depth=null),h._depth_rb&&(k.deleteRenderbuffer(h._depth_rb),h._depth_rb=null);for(var W=0;WR||k<0||k>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");h._shape[0]=p,h._shape[1]=k;for(var O=x(w),N=0;NO||k<0||k>O)throw new Error("gl-fbo: Parameters are too large for FBO");w=w||{};var N=1;if("color"in w){if(N=Math.max(w.color|0,0),N<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(N>1)if(R){if(N>h.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+N+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var V=h.UNSIGNED_BYTE,H=h.getExtension("OES_texture_float");if(w.float&&N>0){if(!H)throw new Error("gl-fbo: Context does not support floating point textures");V=h.FLOAT}else w.preferFloat&&N>0&&H&&(V=h.FLOAT);var F=!0;"depth"in w&&(F=!!w.depth);var U=!1;return"stencil"in w&&(U=!!w.stencil),new C(h,p,k,V,N,F,U,R)}},2272:function(t,e,r){var a=r(2646)[4];r(2478),t.exports=o;function n(i,s,f,x,y,v){var T=s.opposite(x,y);if(!(T<0)){if(y0;){for(var b=f.pop(),v=f.pop(),_=-1,C=-1,T=y[v],E=1;E=0||(s.flip(v,b),n(i,s,f,_,v,C),n(i,s,f,v,C,_),n(i,s,f,C,b,_),n(i,s,f,b,_,C))}}},2334:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r[3]=Math.min(a[3],n[3]),r}},2335:function(t){t.exports=e;function e(r){var a=new Float32Array(4);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a}},2361:function(t){var e=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),a=new Uint32Array(r.buffer);if(r[0]=1,e=!0,a[1]===1072693248){let o=function(f,x){return a[0]=f,a[1]=x,r[0]},i=function(f){return r[0]=f,a[0]},s=function(f){return r[0]=f,a[1]};t.exports=function(f){return r[0]=f,[a[0],a[1]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=s}else if(a[0]===1072693248){let o=function(f,x){return a[1]=f,a[0]=x,r[0]},i=function(f){return r[0]=f,a[1]},s=function(f){return r[0]=f,a[0]};t.exports=function(f){return r[0]=f,[a[1],a[0]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=s}else e=!1}if(!e){let o=function(f,x){return n.writeUInt32LE(f,0,!0),n.writeUInt32LE(x,4,!0),n.readDoubleLE(0,!0)},i=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(0,!0)},s=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(4,!0)};var n=new Buffer(8);t.exports=function(f){return n.writeDoubleLE(f,0,!0),[n.readUInt32LE(0,!0),n.readUInt32LE(4,!0)]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=s}t.exports.sign=function(o){return t.exports.hi(o)>>>31},t.exports.exponent=function(o){var i=t.exports.hi(o);return(i<<1>>>21)-1023},t.exports.fraction=function(o){var i=t.exports.lo(o),s=t.exports.hi(o),f=s&(1<<20)-1;return s&2146435072&&(f+=1048576),[i,f]},t.exports.denormalized=function(o){var i=t.exports.hi(o);return!(i&2146435072)}},2408:function(t){t.exports=e;function e(r,a,n){var o=Math.sin(n),i=Math.cos(n),s=a[0],f=a[1],x=a[2],y=a[3],v=a[8],T=a[9],u=a[10],b=a[11];return a!==r&&(r[4]=a[4],r[5]=a[5],r[6]=a[6],r[7]=a[7],r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15]),r[0]=s*i-v*o,r[1]=f*i-T*o,r[2]=x*i-u*o,r[3]=y*i-b*o,r[8]=s*o+v*i,r[9]=f*o+T*i,r[10]=x*o+u*i,r[11]=y*o+b*i,r}},2419:function(t){t.exports=e;function e(r){for(var a=1,n=1;nC-_?o(f,x,y,v,T,u,b,_,C,M,E):i(f,x,y,v,T,u,b,_,C,M,E)}return s}function a(){function o(y,v,T,u,b,_,C,M,E,A,h){for(var p=2*y,k=u,w=p*u;kA-E?u?o(y,v,T,b,_,C,M,E,A,h,p):i(y,v,T,b,_,C,M,E,A,h,p):u?s(y,v,T,b,_,C,M,E,A,h,p):f(y,v,T,b,_,C,M,E,A,h,p)}return x}function n(o){return o?r():a()}e.partial=n(!1),e.full=n(!0)},2478:function(t){function e(s,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=s[u],_=x!==void 0?x(b,f):b-f;_>=0?(T=u,v=u-1):y=u+1}return T}function r(s,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=s[u],_=x!==void 0?x(b,f):b-f;_>0?(T=u,v=u-1):y=u+1}return T}function a(s,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=s[u],_=x!==void 0?x(b,f):b-f;_<0?(T=u,y=u+1):v=u-1}return T}function n(s,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=s[u],_=x!==void 0?x(b,f):b-f;_<=0?(T=u,y=u+1):v=u-1}return T}function o(s,f,x,y,v){for(;y<=v;){var T=y+v>>>1,u=s[T],b=x!==void 0?x(u,f):u-f;if(b===0)return T;b<=0?y=T+1:v=T-1}return-1}function i(s,f,x,y,v,T){return typeof x=="function"?T(s,f,x,y===void 0?0:y|0,v===void 0?s.length-1:v|0):T(s,f,void 0,x===void 0?0:x|0,y===void 0?s.length-1:y|0)}t.exports={ge:function(s,f,x,y,v){return i(s,f,x,y,v,e)},gt:function(s,f,x,y,v){return i(s,f,x,y,v,r)},lt:function(s,f,x,y,v){return i(s,f,x,y,v,a)},le:function(s,f,x,y,v){return i(s,f,x,y,v,n)},eq:function(s,f,x,y,v){return i(s,f,x,y,v,o)}}},2504:function(t){t.exports=e;function e(r,a,n){var o=n[0],i=n[1],s=n[2];return r[0]=a[0]*o,r[1]=a[1]*o,r[2]=a[2]*o,r[3]=a[3]*o,r[4]=a[4]*i,r[5]=a[5]*i,r[6]=a[6]*i,r[7]=a[7]*i,r[8]=a[8]*s,r[9]=a[9]*s,r[10]=a[10]*s,r[11]=a[11]*s,r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15],r}},2538:function(t,e,r){var a=r(8902),n=r(5542),o=r(2272),i=r(5023);t.exports=v;function s(T){return[Math.min(T[0],T[1]),Math.max(T[0],T[1])]}function f(T,u){return T[0]-u[0]||T[1]-u[1]}function x(T){return T.map(s).sort(f)}function y(T,u,b){return u in T?T[u]:b}function v(T,u,b){Array.isArray(u)?(b=b||{},u=u||[]):(b=u||{},u=[]);var _=!!y(b,"delaunay",!0),C=!!y(b,"interior",!0),M=!!y(b,"exterior",!0),E=!!y(b,"infinity",!1);if(!C&&!M||T.length===0)return[];var A=a(T,u);if(_||C!==M||E){for(var h=n(T.length,x(u)),p=0;p0){if(X=1,pt[tt++]=x(E[k],u,b,_),k+=U,C>0)for(q=1,w=E[k],dt=pt[tt]=x(w,u,b,_),vt=pt[tt+rt],ft=pt[tt+it],zt=pt[tt+ut],(dt!==vt||dt!==ft||dt!==zt)&&(O=E[k+R],V=E[k+N],F=E[k+H],s(q,X,w,O,V,F,dt,vt,ft,zt,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,q=2;q0)for(q=1,w=E[k],dt=pt[tt]=x(w,u,b,_),vt=pt[tt+rt],ft=pt[tt+it],zt=pt[tt+ut],(dt!==vt||dt!==ft||dt!==zt)&&(O=E[k+R],V=E[k+N],F=E[k+H],s(q,X,w,O,V,F,dt,vt,ft,zt,u,b,_),Pt=st[tt]=lt++,zt!==ft&&f(st[tt+it],Pt,V,F,ft,zt,u,b,_)),tt+=1,k+=U,q=2;q0){if(q=1,pt[tt++]=x(E[k],u,b,_),k+=U,M>0)for(X=1,w=E[k],dt=pt[tt]=x(w,u,b,_),ft=pt[tt+it],vt=pt[tt+rt],zt=pt[tt+ut],(dt!==ft||dt!==vt||dt!==zt)&&(O=E[k+R],V=E[k+N],F=E[k+H],s(q,X,w,O,V,F,dt,ft,vt,zt,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,X=2;X0)for(X=1,w=E[k],dt=pt[tt]=x(w,u,b,_),ft=pt[tt+it],vt=pt[tt+rt],zt=pt[tt+ut],(dt!==ft||dt!==vt||dt!==zt)&&(O=E[k+R],V=E[k+N],F=E[k+H],s(q,X,w,O,V,F,dt,ft,vt,zt,u,b,_),Pt=st[tt]=lt++,zt!==ft&&f(st[tt+it],Pt,F,O,zt,ft,u,b,_)),tt+=1,k+=U,X=2;X 0"),typeof s.vertex!="function"&&f("Must specify vertex creation function"),typeof s.cell!="function"&&f("Must specify cell creation function"),typeof s.phase!="function"&&f("Must specify phase function");for(var T=s.getters||[],u=new Array(y),b=0;b=0?u[b]=!0:u[b]=!1;return o(s.vertex,s.cell,s.phase,v,x,u)}},2642:function(t,e,r){t.exports=o;var a=r(727);function n(i){for(var s=0,f=0;fu[1][2]&&(w[0]=-w[0]),u[0][2]>u[2][0]&&(w[1]=-w[1]),u[1][0]>u[0][1]&&(w[2]=-w[2]),!0};function _(E,A,h){var p=A[0],k=A[1],w=A[2],R=A[3];return E[0]=h[0]*p+h[4]*k+h[8]*w+h[12]*R,E[1]=h[1]*p+h[5]*k+h[9]*w+h[13]*R,E[2]=h[2]*p+h[6]*k+h[10]*w+h[14]*R,E[3]=h[3]*p+h[7]*k+h[11]*w+h[15]*R,E}function C(E,A){E[0][0]=A[0],E[0][1]=A[1],E[0][2]=A[2],E[1][0]=A[4],E[1][1]=A[5],E[1][2]=A[6],E[2][0]=A[8],E[2][1]=A[9],E[2][2]=A[10]}function M(E,A,h,p,k){E[0]=A[0]*p+h[0]*k,E[1]=A[1]*p+h[1]*k,E[2]=A[2]*p+h[2]*k}},2653:function(t,e,r){var a=r(3865);t.exports=n;function n(o,i){for(var s=o.length,f=new Array(s),x=0;x=x[C]&&(_+=1);u[b]=_}}return f}function s(f,x){try{return a(f,!0)}catch{var y=n(f);if(y.length<=x)return[];var v=o(f,y),T=a(v,!0);return i(T,y)}}},2762:function(t,e,r){var a=r(1888),n=r(5298),o=r(9618),i=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function s(u,b,_,C,M){this.gl=u,this.type=b,this.handle=_,this.length=C,this.usage=M}var f=s.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)};function x(u,b,_,C,M,E){var A=M.length*M.BYTES_PER_ELEMENT;if(E<0)return u.bufferData(b,M,C),A;if(A+E>_)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return u.bufferSubData(b,E,M),_}function y(u,b){for(var _=a.malloc(u.length,b),C=u.length,M=0;M=0;--C){if(b[C]!==_)return!1;_*=u[C]}return!0}f.update=function(u,b){if(typeof b!="number"&&(b=-1),this.bind(),typeof u=="object"&&typeof u.shape<"u"){var _=u.dtype;if(i.indexOf(_)<0&&(_="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var C=gl.getExtension("OES_element_index_uint");C&&_!=="uint16"?_="uint32":_="uint16"}if(_===u.dtype&&v(u.shape,u.stride))u.offset===0&&u.data.length===u.shape[0]?this.length=x(this.gl,this.type,this.length,this.usage,u.data,b):this.length=x(this.gl,this.type,this.length,this.usage,u.data.subarray(u.offset,u.shape[0]),b);else{var M=a.malloc(u.size,_),E=o(M,u.shape);n.assign(E,u),b<0?this.length=x(this.gl,this.type,this.length,this.usage,M,b):this.length=x(this.gl,this.type,this.length,this.usage,M.subarray(0,u.size),b),a.free(M)}}else if(Array.isArray(u)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=y(u,"uint16"):A=y(u,"float32"),b<0?this.length=x(this.gl,this.type,this.length,this.usage,A,b):this.length=x(this.gl,this.type,this.length,this.usage,A.subarray(0,u.length),b),a.free(A)}else if(typeof u=="object"&&typeof u.length=="number")this.length=x(this.gl,this.type,this.length,this.usage,u,b);else if(typeof u=="number"||u===void 0){if(b>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");u=u|0,u<=0&&(u=1),this.gl.bufferData(this.type,u|0,this.usage),this.length=u}else throw new Error("gl-buffer: Invalid data type")};function T(u,b,_,C){if(_=_||u.ARRAY_BUFFER,C=C||u.DYNAMIC_DRAW,_!==u.ARRAY_BUFFER&&_!==u.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(C!==u.DYNAMIC_DRAW&&C!==u.STATIC_DRAW&&C!==u.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var M=u.createBuffer(),E=new s(u,_,M,0,C);return E.update(b),E}t.exports=T},2825:function(t){t.exports=e;function e(r,a,n){var o=new Float32Array(3);return o[0]=r,o[1]=a,o[2]=n,o}},2931:function(t,e,r){t.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},2933:function(t){t.exports=e;function e(r,a){return r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=a[3],r}},2953:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2];return n*n+o*o+i*i}},2962:function(t,e,r){var a=r(5250),n=r(8210),o=r(3012),i=r(7004),s=6;function f(C,M,E,A){return function(h){return A(C(E(h[0][0],h[1][1]),E(-h[0][1],h[1][0])))}}function x(C,M,E,A){return function(h){return A(C(M(C(E(h[1][1],h[2][2]),E(-h[1][2],h[2][1])),h[0][0]),C(M(C(E(h[1][0],h[2][2]),E(-h[1][2],h[2][0])),-h[0][1]),M(C(E(h[1][0],h[2][1]),E(-h[1][1],h[2][0])),h[0][2]))))}}function y(C,M,E,A){return function(h){return A(C(C(M(C(M(C(E(h[2][2],h[3][3]),E(-h[2][3],h[3][2])),h[1][1]),C(M(C(E(h[2][1],h[3][3]),E(-h[2][3],h[3][1])),-h[1][2]),M(C(E(h[2][1],h[3][2]),E(-h[2][2],h[3][1])),h[1][3]))),h[0][0]),M(C(M(C(E(h[2][2],h[3][3]),E(-h[2][3],h[3][2])),h[1][0]),C(M(C(E(h[2][0],h[3][3]),E(-h[2][3],h[3][0])),-h[1][2]),M(C(E(h[2][0],h[3][2]),E(-h[2][2],h[3][0])),h[1][3]))),-h[0][1])),C(M(C(M(C(E(h[2][1],h[3][3]),E(-h[2][3],h[3][1])),h[1][0]),C(M(C(E(h[2][0],h[3][3]),E(-h[2][3],h[3][0])),-h[1][1]),M(C(E(h[2][0],h[3][1]),E(-h[2][1],h[3][0])),h[1][3]))),h[0][2]),M(C(M(C(E(h[2][1],h[3][2]),E(-h[2][2],h[3][1])),h[1][0]),C(M(C(E(h[2][0],h[3][2]),E(-h[2][2],h[3][0])),-h[1][1]),M(C(E(h[2][0],h[3][1]),E(-h[2][1],h[3][0])),h[1][2]))),-h[0][3]))))}}function v(C,M,E,A){return function(h){return A(C(C(M(C(C(M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][2]),C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),-h[2][3]),M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][4]))),h[1][1]),M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][1]),C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),-h[2][3]),M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),h[2][4]))),-h[1][2])),C(M(C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),h[2][1]),C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),-h[2][2]),M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][4]))),h[1][3]),M(C(M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][1]),C(M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),-h[2][2]),M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][3]))),-h[1][4]))),h[0][0]),M(C(C(M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][2]),C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),-h[2][3]),M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][4]))),h[1][0]),M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][3]),M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),h[2][4]))),-h[1][2])),C(M(C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][2]),M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),h[2][4]))),h[1][3]),M(C(M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][0]),C(M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),-h[2][2]),M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),h[2][3]))),-h[1][4]))),-h[0][1])),C(M(C(C(M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][1]),C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),-h[2][3]),M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),h[2][4]))),h[1][0]),M(C(M(C(E(h[3][3],h[4][4]),E(-h[3][4],h[4][3])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][3]),M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),h[2][4]))),-h[1][1])),C(M(C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][4]))),h[1][3]),M(C(M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][3]))),-h[1][4]))),h[0][2]),C(M(C(C(M(C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),h[2][1]),C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),-h[2][2]),M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][4]))),h[1][0]),M(C(M(C(E(h[3][2],h[4][4]),E(-h[3][4],h[4][2])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][2]),M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),h[2][4]))),-h[1][1])),C(M(C(M(C(E(h[3][1],h[4][4]),E(-h[3][4],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][4]),E(-h[3][4],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][4]))),h[1][2]),M(C(M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][2]))),-h[1][4]))),-h[0][3]),M(C(C(M(C(M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][1]),C(M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),-h[2][2]),M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][3]))),h[1][0]),M(C(M(C(E(h[3][2],h[4][3]),E(-h[3][3],h[4][2])),h[2][0]),C(M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),-h[2][2]),M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),h[2][3]))),-h[1][1])),C(M(C(M(C(E(h[3][1],h[4][3]),E(-h[3][3],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][3]),E(-h[3][3],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][3]))),h[1][2]),M(C(M(C(E(h[3][1],h[4][2]),E(-h[3][2],h[4][1])),h[2][0]),C(M(C(E(h[3][0],h[4][2]),E(-h[3][2],h[4][0])),-h[2][1]),M(C(E(h[3][0],h[4][1]),E(-h[3][1],h[4][0])),h[2][2]))),-h[1][3]))),h[0][4])))))}}function T(C){var M=C===2?f:C===3?x:C===4?y:C===5?v:void 0;return M(n,o,a,i)}var u=[function(){return[0]},function(C){return[C[0][0]]}];function b(C,M,E,A,h,p,k,w){return function(R){switch(R.length){case 0:return C(R);case 1:return M(R);case 2:return E(R);case 3:return A(R);case 4:return h(R);case 5:return p(R)}var O=k[R.length];return O||(O=k[R.length]=w(R.length)),O(R)}}function _(){for(;u.length0?W.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=b;function _(H){return new Uint8Array(b(H),0,H)}e.mallocUint8=_;function P(H){return new Uint16Array(b(2*H),0,H)}e.mallocUint16=P;function M(H){return new Uint32Array(b(4*H),0,H)}e.mallocUint32=M;function C(H){return new Int8Array(b(H),0,H)}e.mallocInt8=C;function A(H){return new Int16Array(b(2*H),0,H)}e.mallocInt16=A;function h(H){return new Int32Array(b(4*H),0,H)}e.mallocInt32=h;function p(H){return new Float32Array(b(4*H),0,H)}e.mallocFloat32=e.mallocFloat=p;function k(H){return new Float64Array(b(8*H),0,H)}e.mallocFloat64=e.mallocDouble=k;function w(H){return i?new Uint8ClampedArray(b(H),0,H):_(H)}e.mallocUint8Clamped=w;function R(H){return l?new BigUint64Array(b(8*H),0,H):null}e.mallocBigUint64=R;function O(H){return f?new BigInt64Array(b(8*H),0,H):null}e.mallocBigInt64=O;function j(H){return new DataView(b(H),0,H)}e.mallocDataView=j;function V(H){H=a.nextPow2(H);var F=a.log2(H),U=v[F];return U.length>0?U.pop():new o(H)}e.mallocBuffer=V,e.clearCache=function(){for(var H=0;H<32;++H)x.UINT8[H].length=0,x.UINT16[H].length=0,x.UINT32[H].length=0,x.INT8[H].length=0,x.INT16[H].length=0,x.INT32[H].length=0,x.FLOAT[H].length=0,x.DOUBLE[H].length=0,x.BIGUINT64[H].length=0,x.BIGINT64[H].length=0,x.UINT8C[H].length=0,y[H].length=0,v[H].length=0}},1903:function(t){t.exports=e;function e(r){var a=new Float32Array(16);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=r[4],a[5]=r[5],a[6]=r[6],a[7]=r[7],a[8]=r[8],a[9]=r[9],a[10]=r[10],a[11]=r[11],a[12]=r[12],a[13]=r[13],a[14]=r[14],a[15]=r[15],a}},1944:function(t,e,r){var a=r(5250),n=r(8210);t.exports=o;function o(i,l){for(var f=a(i[0],l[0]),x=1;x>1,V=f(p[j],k);V<=0?(V===0&&(O=j),w=j+1):V>0&&(R=j-1)}return O}e.findCell=T;function u(p,k){for(var w=new Array(p.length),R=0,O=w.length;R=p.length||f(p[lt],j)!==0););}return w}e.incidence=u;function b(p,k){if(!k)return u(v(P(p,0)),p);for(var w=new Array(k),R=0;R>>U&1&&F.push(O[U]);k.push(F)}return y(k)}e.explode=_;function P(p,k){if(k<0)return[];for(var w=[],R=(1<0}h=h.filter(p);for(var k=h.length,w=new Array(k),R=new Array(k),A=0;A0;){var ut=Y.pop(),kt=mt[ut];f(kt,function(ge,fe){return ge-fe});var It=kt.length,Pt=ft[ut],qt;if(Pt===0){var U=h[ut];qt=[U]}for(var A=0;A=0)&&(ft[Wt]=Pt^1,Y.push(Wt),Pt===0)){var U=h[Wt];it(U)||(U.reverse(),qt.push(U))}}Pt===0&&_.push(qt)}return _}},2145:function(t,e){e.uniforms=o,e.attributes=i;var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},a=null;function n(l,f){if(!a){var x=Object.keys(r);a={};for(var y=0;y1)for(var b=0;b1&&V.drawBuffersWEBGL(n[j]);var q=k.getExtension("WEBGL_depth_texture");q?H?h.depth=u(k,R,O,q.UNSIGNED_INT_24_8_WEBGL,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F&&(h.depth=u(k,R,O,k.UNSIGNED_SHORT,k.DEPTH_COMPONENT,k.DEPTH_ATTACHMENT)):F&&H?h._depth_rb=b(k,R,O,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F?h._depth_rb=b(k,R,O,k.DEPTH_COMPONENT16,k.DEPTH_ATTACHMENT):H&&(h._depth_rb=b(k,R,O,k.STENCIL_INDEX,k.STENCIL_ATTACHMENT));var J=k.checkFramebufferStatus(k.FRAMEBUFFER);if(J!==k.FRAMEBUFFER_COMPLETE){h._destroyed=!0,k.bindFramebuffer(k.FRAMEBUFFER,null),k.deleteFramebuffer(h.handle),h.handle=null,h.depth&&(h.depth.dispose(),h.depth=null),h._depth_rb&&(k.deleteRenderbuffer(h._depth_rb),h._depth_rb=null);for(var W=0;WR||k<0||k>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");h._shape[0]=p,h._shape[1]=k;for(var O=x(w),j=0;jO||k<0||k>O)throw new Error("gl-fbo: Parameters are too large for FBO");w=w||{};var j=1;if("color"in w){if(j=Math.max(w.color|0,0),j<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(j>1)if(R){if(j>h.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+j+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var V=h.UNSIGNED_BYTE,H=h.getExtension("OES_texture_float");if(w.float&&j>0){if(!H)throw new Error("gl-fbo: Context does not support floating point textures");V=h.FLOAT}else w.preferFloat&&j>0&&H&&(V=h.FLOAT);var F=!0;"depth"in w&&(F=!!w.depth);var U=!1;return"stencil"in w&&(U=!!w.stencil),new P(h,p,k,V,j,F,U,R)}},2272:function(t,e,r){var a=r(2646)[4];r(2478),t.exports=o;function n(i,l,f,x,y,v){var T=l.opposite(x,y);if(!(T<0)){if(y0;){for(var b=f.pop(),v=f.pop(),_=-1,P=-1,T=y[v],C=1;C=0||(l.flip(v,b),n(i,l,f,_,v,P),n(i,l,f,v,P,_),n(i,l,f,P,b,_),n(i,l,f,b,_,P))}}},2334:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r[3]=Math.min(a[3],n[3]),r}},2335:function(t){t.exports=e;function e(r){var a=new Float32Array(4);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a}},2361:function(t){var e=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),a=new Uint32Array(r.buffer);if(r[0]=1,e=!0,a[1]===1072693248){let o=function(f,x){return a[0]=f,a[1]=x,r[0]},i=function(f){return r[0]=f,a[0]},l=function(f){return r[0]=f,a[1]};t.exports=function(f){return r[0]=f,[a[0],a[1]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=l}else if(a[0]===1072693248){let o=function(f,x){return a[1]=f,a[0]=x,r[0]},i=function(f){return r[0]=f,a[1]},l=function(f){return r[0]=f,a[0]};t.exports=function(f){return r[0]=f,[a[1],a[0]]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=l}else e=!1}if(!e){let o=function(f,x){return n.writeUInt32LE(f,0,!0),n.writeUInt32LE(x,4,!0),n.readDoubleLE(0,!0)},i=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(0,!0)},l=function(f){return n.writeDoubleLE(f,0,!0),n.readUInt32LE(4,!0)};var n=new Buffer(8);t.exports=function(f){return n.writeDoubleLE(f,0,!0),[n.readUInt32LE(0,!0),n.readUInt32LE(4,!0)]},t.exports.pack=o,t.exports.lo=i,t.exports.hi=l}t.exports.sign=function(o){return t.exports.hi(o)>>>31},t.exports.exponent=function(o){var i=t.exports.hi(o);return(i<<1>>>21)-1023},t.exports.fraction=function(o){var i=t.exports.lo(o),l=t.exports.hi(o),f=l&(1<<20)-1;return l&2146435072&&(f+=1048576),[i,f]},t.exports.denormalized=function(o){var i=t.exports.hi(o);return!(i&2146435072)}},2408:function(t){t.exports=e;function e(r,a,n){var o=Math.sin(n),i=Math.cos(n),l=a[0],f=a[1],x=a[2],y=a[3],v=a[8],T=a[9],u=a[10],b=a[11];return a!==r&&(r[4]=a[4],r[5]=a[5],r[6]=a[6],r[7]=a[7],r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15]),r[0]=l*i-v*o,r[1]=f*i-T*o,r[2]=x*i-u*o,r[3]=y*i-b*o,r[8]=l*o+v*i,r[9]=f*o+T*i,r[10]=x*o+u*i,r[11]=y*o+b*i,r}},2419:function(t){t.exports=e;function e(r){for(var a=1,n=1;nP-_?o(f,x,y,v,T,u,b,_,P,M,C):i(f,x,y,v,T,u,b,_,P,M,C)}return l}function a(){function o(y,v,T,u,b,_,P,M,C,A,h){for(var p=2*y,k=u,w=p*u;kA-C?u?o(y,v,T,b,_,P,M,C,A,h,p):i(y,v,T,b,_,P,M,C,A,h,p):u?l(y,v,T,b,_,P,M,C,A,h,p):f(y,v,T,b,_,P,M,C,A,h,p)}return x}function n(o){return o?r():a()}e.partial=n(!1),e.full=n(!0)},2478:function(t){function e(l,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_>=0?(T=u,v=u-1):y=u+1}return T}function r(l,f,x,y,v){for(var T=v+1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_>0?(T=u,v=u-1):y=u+1}return T}function a(l,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_<0?(T=u,y=u+1):v=u-1}return T}function n(l,f,x,y,v){for(var T=y-1;y<=v;){var u=y+v>>>1,b=l[u],_=x!==void 0?x(b,f):b-f;_<=0?(T=u,y=u+1):v=u-1}return T}function o(l,f,x,y,v){for(;y<=v;){var T=y+v>>>1,u=l[T],b=x!==void 0?x(u,f):u-f;if(b===0)return T;b<=0?y=T+1:v=T-1}return-1}function i(l,f,x,y,v,T){return typeof x=="function"?T(l,f,x,y===void 0?0:y|0,v===void 0?l.length-1:v|0):T(l,f,void 0,x===void 0?0:x|0,y===void 0?l.length-1:y|0)}t.exports={ge:function(l,f,x,y,v){return i(l,f,x,y,v,e)},gt:function(l,f,x,y,v){return i(l,f,x,y,v,r)},lt:function(l,f,x,y,v){return i(l,f,x,y,v,a)},le:function(l,f,x,y,v){return i(l,f,x,y,v,n)},eq:function(l,f,x,y,v){return i(l,f,x,y,v,o)}}},2504:function(t){t.exports=e;function e(r,a,n){var o=n[0],i=n[1],l=n[2];return r[0]=a[0]*o,r[1]=a[1]*o,r[2]=a[2]*o,r[3]=a[3]*o,r[4]=a[4]*i,r[5]=a[5]*i,r[6]=a[6]*i,r[7]=a[7]*i,r[8]=a[8]*l,r[9]=a[9]*l,r[10]=a[10]*l,r[11]=a[11]*l,r[12]=a[12],r[13]=a[13],r[14]=a[14],r[15]=a[15],r}},2538:function(t,e,r){var a=r(8902),n=r(5542),o=r(2272),i=r(5023);t.exports=v;function l(T){return[Math.min(T[0],T[1]),Math.max(T[0],T[1])]}function f(T,u){return T[0]-u[0]||T[1]-u[1]}function x(T){return T.map(l).sort(f)}function y(T,u,b){return u in T?T[u]:b}function v(T,u,b){Array.isArray(u)?(b=b||{},u=u||[]):(b=u||{},u=[]);var _=!!y(b,"delaunay",!0),P=!!y(b,"interior",!0),M=!!y(b,"exterior",!0),C=!!y(b,"infinity",!1);if(!P&&!M||T.length===0)return[];var A=a(T,u);if(_||P!==M||C){for(var h=n(T.length,x(u)),p=0;p0){if(J=1,mt[tt++]=x(C[k],u,b,_),k+=U,P>0)for(q=1,w=C[k],dt=mt[tt]=x(w,u,b,_),vt=mt[tt+rt],ft=mt[tt+it],It=mt[tt+ut],(dt!==vt||dt!==ft||dt!==It)&&(O=C[k+R],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,dt,vt,ft,It,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,q=2;q0)for(q=1,w=C[k],dt=mt[tt]=x(w,u,b,_),vt=mt[tt+rt],ft=mt[tt+it],It=mt[tt+ut],(dt!==vt||dt!==ft||dt!==It)&&(O=C[k+R],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,dt,vt,ft,It,u,b,_),Pt=st[tt]=lt++,It!==ft&&f(st[tt+it],Pt,V,F,ft,It,u,b,_)),tt+=1,k+=U,q=2;q0){if(q=1,mt[tt++]=x(C[k],u,b,_),k+=U,M>0)for(J=1,w=C[k],dt=mt[tt]=x(w,u,b,_),ft=mt[tt+it],vt=mt[tt+rt],It=mt[tt+ut],(dt!==ft||dt!==vt||dt!==It)&&(O=C[k+R],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,dt,ft,vt,It,u,b,_),Pt=st[tt]=lt++),tt+=1,k+=U,J=2;J0)for(J=1,w=C[k],dt=mt[tt]=x(w,u,b,_),ft=mt[tt+it],vt=mt[tt+rt],It=mt[tt+ut],(dt!==ft||dt!==vt||dt!==It)&&(O=C[k+R],V=C[k+j],F=C[k+H],l(q,J,w,O,V,F,dt,ft,vt,It,u,b,_),Pt=st[tt]=lt++,It!==ft&&f(st[tt+it],Pt,F,O,It,ft,u,b,_)),tt+=1,k+=U,J=2;J 0"),typeof l.vertex!="function"&&f("Must specify vertex creation function"),typeof l.cell!="function"&&f("Must specify cell creation function"),typeof l.phase!="function"&&f("Must specify phase function");for(var T=l.getters||[],u=new Array(y),b=0;b=0?u[b]=!0:u[b]=!1;return o(l.vertex,l.cell,l.phase,v,x,u)}},2642:function(t,e,r){t.exports=o;var a=r(727);function n(i){for(var l=0,f=0;fu[1][2]&&(w[0]=-w[0]),u[0][2]>u[2][0]&&(w[1]=-w[1]),u[1][0]>u[0][1]&&(w[2]=-w[2]),!0};function _(C,A,h){var p=A[0],k=A[1],w=A[2],R=A[3];return C[0]=h[0]*p+h[4]*k+h[8]*w+h[12]*R,C[1]=h[1]*p+h[5]*k+h[9]*w+h[13]*R,C[2]=h[2]*p+h[6]*k+h[10]*w+h[14]*R,C[3]=h[3]*p+h[7]*k+h[11]*w+h[15]*R,C}function P(C,A){C[0][0]=A[0],C[0][1]=A[1],C[0][2]=A[2],C[1][0]=A[4],C[1][1]=A[5],C[1][2]=A[6],C[2][0]=A[8],C[2][1]=A[9],C[2][2]=A[10]}function M(C,A,h,p,k){C[0]=A[0]*p+h[0]*k,C[1]=A[1]*p+h[1]*k,C[2]=A[2]*p+h[2]*k}},2653:function(t,e,r){var a=r(3865);t.exports=n;function n(o,i){for(var l=o.length,f=new Array(l),x=0;x=x[P]&&(_+=1);u[b]=_}}return f}function l(f,x){try{return a(f,!0)}catch{var y=n(f);if(y.length<=x)return[];var v=o(f,y),T=a(v,!0);return i(T,y)}}},2762:function(t,e,r){var a=r(1888),n=r(5298),o=r(9618),i=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function l(u,b,_,P,M){this.gl=u,this.type=b,this.handle=_,this.length=P,this.usage=M}var f=l.prototype;f.bind=function(){this.gl.bindBuffer(this.type,this.handle)},f.unbind=function(){this.gl.bindBuffer(this.type,null)},f.dispose=function(){this.gl.deleteBuffer(this.handle)};function x(u,b,_,P,M,C){var A=M.length*M.BYTES_PER_ELEMENT;if(C<0)return u.bufferData(b,M,P),A;if(A+C>_)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return u.bufferSubData(b,C,M),_}function y(u,b){for(var _=a.malloc(u.length,b),P=u.length,M=0;M=0;--P){if(b[P]!==_)return!1;_*=u[P]}return!0}f.update=function(u,b){if(typeof b!="number"&&(b=-1),this.bind(),typeof u=="object"&&typeof u.shape<"u"){var _=u.dtype;if(i.indexOf(_)<0&&(_="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var P=gl.getExtension("OES_element_index_uint");P&&_!=="uint16"?_="uint32":_="uint16"}if(_===u.dtype&&v(u.shape,u.stride))u.offset===0&&u.data.length===u.shape[0]?this.length=x(this.gl,this.type,this.length,this.usage,u.data,b):this.length=x(this.gl,this.type,this.length,this.usage,u.data.subarray(u.offset,u.shape[0]),b);else{var M=a.malloc(u.size,_),C=o(M,u.shape);n.assign(C,u),b<0?this.length=x(this.gl,this.type,this.length,this.usage,M,b):this.length=x(this.gl,this.type,this.length,this.usage,M.subarray(0,u.size),b),a.free(M)}}else if(Array.isArray(u)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=y(u,"uint16"):A=y(u,"float32"),b<0?this.length=x(this.gl,this.type,this.length,this.usage,A,b):this.length=x(this.gl,this.type,this.length,this.usage,A.subarray(0,u.length),b),a.free(A)}else if(typeof u=="object"&&typeof u.length=="number")this.length=x(this.gl,this.type,this.length,this.usage,u,b);else if(typeof u=="number"||u===void 0){if(b>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");u=u|0,u<=0&&(u=1),this.gl.bufferData(this.type,u|0,this.usage),this.length=u}else throw new Error("gl-buffer: Invalid data type")};function T(u,b,_,P){if(_=_||u.ARRAY_BUFFER,P=P||u.DYNAMIC_DRAW,_!==u.ARRAY_BUFFER&&_!==u.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(P!==u.DYNAMIC_DRAW&&P!==u.STATIC_DRAW&&P!==u.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var M=u.createBuffer(),C=new l(u,_,M,0,P);return C.update(b),C}t.exports=T},2825:function(t){t.exports=e;function e(r,a,n){var o=new Float32Array(3);return o[0]=r,o[1]=a,o[2]=n,o}},2931:function(t,e,r){t.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},2933:function(t){t.exports=e;function e(r,a){return r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=a[3],r}},2953:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2];return n*n+o*o+i*i}},2962:function(t,e,r){var a=r(5250),n=r(8210),o=r(3012),i=r(7004),l=6;function f(P,M,C,A){return function(h){return A(P(C(h[0][0],h[1][1]),C(-h[0][1],h[1][0])))}}function x(P,M,C,A){return function(h){return A(P(M(P(C(h[1][1],h[2][2]),C(-h[1][2],h[2][1])),h[0][0]),P(M(P(C(h[1][0],h[2][2]),C(-h[1][2],h[2][0])),-h[0][1]),M(P(C(h[1][0],h[2][1]),C(-h[1][1],h[2][0])),h[0][2]))))}}function y(P,M,C,A){return function(h){return A(P(P(M(P(M(P(C(h[2][2],h[3][3]),C(-h[2][3],h[3][2])),h[1][1]),P(M(P(C(h[2][1],h[3][3]),C(-h[2][3],h[3][1])),-h[1][2]),M(P(C(h[2][1],h[3][2]),C(-h[2][2],h[3][1])),h[1][3]))),h[0][0]),M(P(M(P(C(h[2][2],h[3][3]),C(-h[2][3],h[3][2])),h[1][0]),P(M(P(C(h[2][0],h[3][3]),C(-h[2][3],h[3][0])),-h[1][2]),M(P(C(h[2][0],h[3][2]),C(-h[2][2],h[3][0])),h[1][3]))),-h[0][1])),P(M(P(M(P(C(h[2][1],h[3][3]),C(-h[2][3],h[3][1])),h[1][0]),P(M(P(C(h[2][0],h[3][3]),C(-h[2][3],h[3][0])),-h[1][1]),M(P(C(h[2][0],h[3][1]),C(-h[2][1],h[3][0])),h[1][3]))),h[0][2]),M(P(M(P(C(h[2][1],h[3][2]),C(-h[2][2],h[3][1])),h[1][0]),P(M(P(C(h[2][0],h[3][2]),C(-h[2][2],h[3][0])),-h[1][1]),M(P(C(h[2][0],h[3][1]),C(-h[2][1],h[3][0])),h[1][2]))),-h[0][3]))))}}function v(P,M,C,A){return function(h){return A(P(P(M(P(P(M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][2]),P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),-h[2][3]),M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][4]))),h[1][1]),M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][3]),M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][4]))),-h[1][2])),P(M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][4]))),h[1][3]),M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][3]))),-h[1][4]))),h[0][0]),M(P(P(M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][2]),P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),-h[2][3]),M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][4]))),h[1][0]),M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][3]),M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),h[2][4]))),-h[1][2])),P(M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][4]))),h[1][3]),M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][3]))),-h[1][4]))),-h[0][1])),P(M(P(P(M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][3]),M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][4]))),h[1][0]),M(P(M(P(C(h[3][3],h[4][4]),C(-h[3][4],h[4][3])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][3]),M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),h[2][4]))),-h[1][1])),P(M(P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][4]))),h[1][3]),M(P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][3]))),-h[1][4]))),h[0][2]),P(M(P(P(M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][4]))),h[1][0]),M(P(M(P(C(h[3][2],h[4][4]),C(-h[3][4],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][4]))),-h[1][1])),P(M(P(M(P(C(h[3][1],h[4][4]),C(-h[3][4],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][4]),C(-h[3][4],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][4]))),h[1][2]),M(P(M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][2]))),-h[1][4]))),-h[0][3]),M(P(P(M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][1]),P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),-h[2][2]),M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][3]))),h[1][0]),M(P(M(P(C(h[3][2],h[4][3]),C(-h[3][3],h[4][2])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][2]),M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),h[2][3]))),-h[1][1])),P(M(P(M(P(C(h[3][1],h[4][3]),C(-h[3][3],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][3]),C(-h[3][3],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][3]))),h[1][2]),M(P(M(P(C(h[3][1],h[4][2]),C(-h[3][2],h[4][1])),h[2][0]),P(M(P(C(h[3][0],h[4][2]),C(-h[3][2],h[4][0])),-h[2][1]),M(P(C(h[3][0],h[4][1]),C(-h[3][1],h[4][0])),h[2][2]))),-h[1][3]))),h[0][4])))))}}function T(P){var M=P===2?f:P===3?x:P===4?y:P===5?v:void 0;return M(n,o,a,i)}var u=[function(){return[0]},function(P){return[P[0][0]]}];function b(P,M,C,A,h,p,k,w){return function(R){switch(R.length){case 0:return P(R);case 1:return M(R);case 2:return C(R);case 3:return A(R);case 4:return h(R);case 5:return p(R)}var O=k[R.length];return O||(O=k[R.length]=w(R.length)),O(R)}}function _(){for(;u.length0){w=x[N][p][0],O=N;break}R=w[O^1];for(var V=0;V<2;++V)for(var H=x[V][p],F=0;F0&&(w=U,R=W,O=V)}return k||w&&u(w,O),R}function _(h,p){var k=x[p][h][0],w=[h];u(k,p);for(var R=k[p^1],O=p;;){for(;R!==h;)w.push(R),R=b(w[w.length-2],R,!1);if(x[0][h].length+x[1][h].length===0)break;var N=w[w.length-1],V=h,H=w[1],F=b(N,V,!0);if(a(i[N],i[V],i[H],i[F])<0)break;w.push(h),R=b(N,V)}return w}function C(h,p){return p[1]===p[p.length-1]}for(var y=0;y0;){x[0][y].length;var A=_(y,M);C(E,A)?E.push.apply(E,A):(E.length>0&&T.push(E),E=A)}E.length>0&&T.push(E)}return T}},3090:function(t,e,r){t.exports=n;var a=r(3250)[3];function n(o){var i=o.length;if(i<3){for(var s=new Array(i),f=0;f1&&a(o[y[b-2]],o[y[b-1]],u)<=0;)b-=1,y.pop();for(y.push(T),b=v.length;b>1&&a(o[v[b-2]],o[v[b-1]],u)>=0;)b-=1,v.pop();v.push(T)}for(var s=new Array(v.length+y.length-2),_=0,f=0,C=y.length;f0;--M)s[_++]=v[M];return s}},3105:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,s=(o>255)<<3,o>>>=s,i|=s,s=(o>15)<<2,o>>>=s,i|=s,s=(o>3)<<1,o>>>=s,i|=s,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var s=i,f=i,x=7;for(s>>>=1;s;s>>>=1)f<<=1,f|=s&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,s){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,o|s<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},3126:function(t){t.exports=e;function e(r){var a=new Float32Array(3);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a}},3134:function(t,e,r){t.exports=n;var a=r(1682);function n(o,i){var s=o.length;if(typeof i!="number"){i=0;for(var f=0;f=0}function x(y,v,T,u){var b=a(v,T,u);if(b===0){var _=n(a(y,v,T)),C=n(a(y,v,u));if(_===C){if(_===0){var M=f(y,v,T),E=f(y,v,u);return M===E?0:M?1:-1}return 0}else{if(C===0)return _>0||f(y,v,u)?-1:1;if(_===0)return C>0||f(y,v,T)?1:-1}return n(C-_)}var A=a(y,v,T);if(A>0)return b>0&&a(y,v,u)>0?1:-1;if(A<0)return b>0||a(y,v,u)>0?1:-1;var h=a(y,v,u);return h>0||f(y,v,T)?1:-1}},3202:function(t){t.exports=function(e,r){r||(r=[0,""]),e=String(e);var a=parseFloat(e,10);return r[0]=a,r[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}},3233:function(t){var e="",r;t.exports=a;function a(n,o){if(typeof n!="string")throw new TypeError("expected a string");if(o===1)return n;if(o===2)return n+n;var i=n.length*o;if(r!==n||typeof r>"u")r=n,e="";else if(e.length>=i)return e.substr(0,i);for(;i>e.length&&o>1;)o&1&&(e+=n),o>>=1,n+=n;return e+=n,e=e.substr(0,i),e}},3236:function(t){t.exports=function(e){typeof e=="string"&&(e=[e]);for(var r=[].slice.call(arguments,1),a=[],n=0;n0){if(O<=0)return N;V=R+O}else if(R<0){if(O>=0)return N;V=-(R+O)}else return N;var H=x*V;return N>=H||N<=-H?N:_(p,k,w)},function(p,k,w,R){var O=p[0]-R[0],N=k[0]-R[0],V=w[0]-R[0],H=p[1]-R[1],F=k[1]-R[1],U=w[1]-R[1],W=p[2]-R[2],q=k[2]-R[2],X=w[2]-R[2],lt=N*U,yt=V*F,pt=V*H,st=O*U,tt=O*F,dt=N*H,rt=W*(lt-yt)+q*(pt-st)+X*(tt-dt),at=(Math.abs(lt)+Math.abs(yt))*Math.abs(W)+(Math.abs(pt)+Math.abs(st))*Math.abs(q)+(Math.abs(tt)+Math.abs(dt))*Math.abs(X),vt=y*at;return rt>vt||-rt>vt?rt:C(p,k,w,R)}];function E(p){var k=M[p.length];return k||(k=M[p.length]=b(p.length)),k.apply(void 0,p)}function A(p,k,w,R,O,N,V){return function(H,F,U,W,q){switch(arguments.length){case 0:case 1:return 0;case 2:return R(H,F);case 3:return O(H,F,U);case 4:return N(H,F,U,W);case 5:return V(H,F,U,W,q)}for(var X=new Array(arguments.length),lt=0;lt4)throw new n("","Invalid data type");switch(W.charAt(0)){case"b":case"i":f["uniform"+q+"iv"](v[O],N);break;case"v":f["uniform"+q+"fv"](v[O],N);break;default:throw new n("","Unrecognized data type for vector "+name+": "+W)}}else if(W.indexOf("mat")===0&&W.length===4){if(q=W.charCodeAt(W.length-1)-48,q<2||q>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+W);f["uniformMatrix"+q+"fv"](v[O],!1,N);break}else throw new n("","Unknown uniform data type for "+name+": "+W)}}}}}function b(A,h){if(typeof h!="object")return[[A,h]];var p=[];for(var k in h){var w=h[k],R=A;parseInt(k)+""===k?R+="["+k+"]":R+="."+k,typeof w=="object"?p.push.apply(p,b(R,w)):p.push([R,w])}return p}function _(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var h=A.indexOf("vec");if(0<=h&&h<=1&&A.length===4+h){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid data type");return A.charAt(0)==="b"?i(p,!1):i(p,0)}else if(A.indexOf("mat")===0&&A.length===4){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+A);return i(p*p,0)}else throw new n("","Unknown uniform data type for "+name+": "+A)}}function C(A,h,p){if(typeof p=="object"){var k=M(p);Object.defineProperty(A,h,{get:o(k),set:u(p),enumerable:!0,configurable:!1})}else v[p]?Object.defineProperty(A,h,{get:T(p),set:u(p),enumerable:!0,configurable:!1}):A[h]=_(y[p].type)}function M(A){var h;if(Array.isArray(A)){h=new Array(A.length);for(var p=0;p=0!=h>=0&&v.push(_[0]+.5+.5*(A+h)/(A-h))}y+=E,++_[0]}}}function r(){return e()}var a=r;function n(s){var f={};return function(x,y,v){var T=x.dtype,u=x.order,b=[T,u.join()].join(),_=f[b];return _||(f[b]=_=s([T,u])),_(x.shape.slice(0),x.data,x.stride,x.offset|0,y,v)}}function o(s){return n(a.bind(void 0,s))}function i(s){return o({funcName:s.funcName})}t.exports=i({funcName:"zeroCrossings"})},3352:function(t,e,r){var a=r(2478),n=0,o=1,i=2;t.exports=k;function s(w,R,O,N,V){this.mid=w,this.left=R,this.right=O,this.leftPoints=N,this.rightPoints=V,this.count=(R?R.count:0)+(O?O.count:0)+N.length}var f=s.prototype;function x(w,R){w.mid=R.mid,w.left=R.left,w.right=R.right,w.leftPoints=R.leftPoints,w.rightPoints=R.rightPoints,w.count=R.count}function y(w,R){var O=A(R);w.mid=O.mid,w.left=O.left,w.right=O.right,w.leftPoints=O.leftPoints,w.rightPoints=O.rightPoints,w.count=O.count}function v(w,R){var O=w.intervals([]);O.push(R),y(w,O)}function T(w,R){var O=w.intervals([]),N=O.indexOf(R);return N<0?n:(O.splice(N,1),y(w,O),o)}f.intervals=function(w){return w.push.apply(w,this.leftPoints),this.left&&this.left.intervals(w),this.right&&this.right.intervals(w),w},f.insert=function(w){var R=this.count-this.leftPoints.length;if(this.count+=1,w[1]3*(R+1)?v(this,w):this.left.insert(w):this.left=A([w]);else if(w[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?v(this,w):this.right.insert(w):this.right=A([w]);else{var O=a.ge(this.leftPoints,w,M),N=a.ge(this.rightPoints,w,E);this.leftPoints.splice(O,0,w),this.rightPoints.splice(N,0,w)}},f.remove=function(w){var R=this.count-this.leftPoints;if(w[1]3*(R-1))return T(this,w);var N=this.left.remove(w);return N===i?(this.left=null,this.count-=1,o):(N===o&&(this.count-=1),N)}else if(w[0]>this.mid){if(!this.right)return n;var V=this.left?this.left.count:0;if(4*V>3*(R-1))return T(this,w);var N=this.right.remove(w);return N===i?(this.right=null,this.count-=1,o):(N===o&&(this.count-=1),N)}else{if(this.count===1)return this.leftPoints[0]===w?i:n;if(this.leftPoints.length===1&&this.leftPoints[0]===w){if(this.left&&this.right){for(var H=this,F=this.left;F.right;)H=F,F=F.right;if(H===this)F.right=this.right;else{var U=this.left,N=this.right;H.count-=F.count,H.right=F.left,F.left=U,F.right=N}x(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?x(this,this.left):x(this,this.right);return o}for(var U=a.ge(this.leftPoints,w,M);U=0&&w[N][1]>=R;--N){var V=O(w[N]);if(V)return V}}function _(w,R){for(var O=0;Othis.mid){if(this.right){var O=this.right.queryPoint(w,R);if(O)return O}return b(this.rightPoints,w,R)}else return _(this.leftPoints,R)},f.queryInterval=function(w,R,O){if(wthis.mid&&this.right){var N=this.right.queryInterval(w,R,O);if(N)return N}return Rthis.mid?b(this.rightPoints,w,O):_(this.leftPoints,O)};function C(w,R){return w-R}function M(w,R){var O=w[0]-R[0];return O||w[1]-R[1]}function E(w,R){var O=w[1]-R[1];return O||w[0]-R[0]}function A(w){if(w.length===0)return null;for(var R=[],O=0;O>1],V=[],H=[],F=[],O=0;O=0),E.type){case"b":b=parseInt(b,10).toString(2);break;case"c":b=String.fromCharCode(parseInt(b,10));break;case"d":case"i":b=parseInt(b,10);break;case"j":b=JSON.stringify(b,null,E.width?parseInt(E.width):0);break;case"e":b=E.precision?parseFloat(b).toExponential(E.precision):parseFloat(b).toExponential();break;case"f":b=E.precision?parseFloat(b).toFixed(E.precision):parseFloat(b);break;case"g":b=E.precision?String(Number(b.toPrecision(E.precision))):parseFloat(b);break;case"o":b=(parseInt(b,10)>>>0).toString(8);break;case"s":b=String(b),b=E.precision?b.substring(0,E.precision):b;break;case"t":b=String(!!b),b=E.precision?b.substring(0,E.precision):b;break;case"T":b=Object.prototype.toString.call(b).slice(8,-1).toLowerCase(),b=E.precision?b.substring(0,E.precision):b;break;case"u":b=parseInt(b,10)>>>0;break;case"v":b=b.valueOf(),b=E.precision?b.substring(0,E.precision):b;break;case"x":b=(parseInt(b,10)>>>0).toString(16);break;case"X":b=(parseInt(b,10)>>>0).toString(16).toUpperCase();break}n.json.test(E.type)?_+=b:(n.number.test(E.type)&&(!k||E.sign)?(w=k?"+":"-",b=b.toString().replace(n.sign,"")):w="",h=E.pad_char?E.pad_char==="0"?"0":E.pad_char.charAt(1):" ",p=E.width-(w+b).length,A=E.width&&p>0?h.repeat(p):"",_+=E.align?w+b+A:h==="0"?w+A+b:A+w+b)}return _}var f=Object.create(null);function x(y){if(f[y])return f[y];for(var v=y,T,u=[],b=0;v;){if((T=n.text.exec(v))!==null)u.push(T[0]);else if((T=n.modulo.exec(v))!==null)u.push("%");else if((T=n.placeholder.exec(v))!==null){if(T[2]){b|=1;var _=[],C=T[2],M=[];if((M=n.key.exec(C))!==null)for(_.push(M[1]);(C=C.substring(M[0].length))!=="";)if((M=n.key_access.exec(C))!==null)_.push(M[1]);else if((M=n.index_access.exec(C))!==null)_.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");T[2]=_}else b|=2;if(b===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");u.push({placeholder:T[0],param_no:T[1],keys:T[2],sign:T[3],pad_char:T[4],align:T[5],width:T[6],precision:T[7],type:T[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(T[0].length)}return f[y]=u}e.sprintf=o,e.vsprintf=i,typeof window<"u"&&(window.sprintf=o,window.vsprintf=i,a=(function(){return{sprintf:o,vsprintf:i}}).call(e,r,e,t),a!==void 0&&(t.exports=a))})()},3390:function(t){t.exports=e;function e(r,a,n,o){var i=new Float32Array(4);return i[0]=r,i[1]=a,i[2]=n,i[3]=o,i}},3436:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision highp float; +`,k)}}return{long:u.trim(),short:b.trim()}}},3012:function(t,e,r){var a=r(5250),n=r(9362);t.exports=o;function o(i,l){var f=i.length;if(f===1){var x=a(i[0],l);return x[0]?x:[x[1]]}var y=new Array(2*f),v=[.1,.1],T=[.1,.1],u=0;a(i[0],l,v),v[0]&&(y[u++]=v[0]);for(var b=1;b0){w=x[j][p][0],O=j;break}R=w[O^1];for(var V=0;V<2;++V)for(var H=x[V][p],F=0;F0&&(w=U,R=W,O=V)}return k||w&&u(w,O),R}function _(h,p){var k=x[p][h][0],w=[h];u(k,p);for(var R=k[p^1],O=p;;){for(;R!==h;)w.push(R),R=b(w[w.length-2],R,!1);if(x[0][h].length+x[1][h].length===0)break;var j=w[w.length-1],V=h,H=w[1],F=b(j,V,!0);if(a(i[j],i[V],i[H],i[F])<0)break;w.push(h),R=b(j,V)}return w}function P(h,p){return p[1]===p[p.length-1]}for(var y=0;y0;){x[0][y].length;var A=_(y,M);P(C,A)?C.push.apply(C,A):(C.length>0&&T.push(C),C=A)}C.length>0&&T.push(C)}return T}},3090:function(t,e,r){t.exports=n;var a=r(3250)[3];function n(o){var i=o.length;if(i<3){for(var l=new Array(i),f=0;f1&&a(o[y[b-2]],o[y[b-1]],u)<=0;)b-=1,y.pop();for(y.push(T),b=v.length;b>1&&a(o[v[b-2]],o[v[b-1]],u)>=0;)b-=1,v.pop();v.push(T)}for(var l=new Array(v.length+y.length-2),_=0,f=0,P=y.length;f0;--M)l[_++]=v[M];return l}},3105:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,l=(o>255)<<3,o>>>=l,i|=l,l=(o>15)<<2,o>>>=l,i|=l,l=(o>3)<<1,o>>>=l,i|=l,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var l=i,f=i,x=7;for(l>>>=1;l;l>>>=1)f<<=1,f|=l&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,l){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,o|l<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},3126:function(t){t.exports=e;function e(r){var a=new Float32Array(3);return a[0]=r[0],a[1]=r[1],a[2]=r[2],a}},3134:function(t,e,r){t.exports=n;var a=r(1682);function n(o,i){var l=o.length;if(typeof i!="number"){i=0;for(var f=0;f=0}function x(y,v,T,u){var b=a(v,T,u);if(b===0){var _=n(a(y,v,T)),P=n(a(y,v,u));if(_===P){if(_===0){var M=f(y,v,T),C=f(y,v,u);return M===C?0:M?1:-1}return 0}else{if(P===0)return _>0||f(y,v,u)?-1:1;if(_===0)return P>0||f(y,v,T)?1:-1}return n(P-_)}var A=a(y,v,T);if(A>0)return b>0&&a(y,v,u)>0?1:-1;if(A<0)return b>0||a(y,v,u)>0?1:-1;var h=a(y,v,u);return h>0||f(y,v,T)?1:-1}},3202:function(t){t.exports=function(e,r){r||(r=[0,""]),e=String(e);var a=parseFloat(e,10);return r[0]=a,r[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}},3233:function(t){var e="",r;t.exports=a;function a(n,o){if(typeof n!="string")throw new TypeError("expected a string");if(o===1)return n;if(o===2)return n+n;var i=n.length*o;if(r!==n||typeof r>"u")r=n,e="";else if(e.length>=i)return e.substr(0,i);for(;i>e.length&&o>1;)o&1&&(e+=n),o>>=1,n+=n;return e+=n,e=e.substr(0,i),e}},3236:function(t){t.exports=function(e){typeof e=="string"&&(e=[e]);for(var r=[].slice.call(arguments,1),a=[],n=0;n0){if(O<=0)return j;V=R+O}else if(R<0){if(O>=0)return j;V=-(R+O)}else return j;var H=x*V;return j>=H||j<=-H?j:_(p,k,w)},function(p,k,w,R){var O=p[0]-R[0],j=k[0]-R[0],V=w[0]-R[0],H=p[1]-R[1],F=k[1]-R[1],U=w[1]-R[1],W=p[2]-R[2],q=k[2]-R[2],J=w[2]-R[2],lt=j*U,yt=V*F,mt=V*H,st=O*U,tt=O*F,dt=j*H,rt=W*(lt-yt)+q*(mt-st)+J*(tt-dt),at=(Math.abs(lt)+Math.abs(yt))*Math.abs(W)+(Math.abs(mt)+Math.abs(st))*Math.abs(q)+(Math.abs(tt)+Math.abs(dt))*Math.abs(J),vt=y*at;return rt>vt||-rt>vt?rt:P(p,k,w,R)}];function C(p){var k=M[p.length];return k||(k=M[p.length]=b(p.length)),k.apply(void 0,p)}function A(p,k,w,R,O,j,V){return function(H,F,U,W,q){switch(arguments.length){case 0:case 1:return 0;case 2:return R(H,F);case 3:return O(H,F,U);case 4:return j(H,F,U,W);case 5:return V(H,F,U,W,q)}for(var J=new Array(arguments.length),lt=0;lt4)throw new n("","Invalid data type");switch(W.charAt(0)){case"b":case"i":f["uniform"+q+"iv"](v[O],j);break;case"v":f["uniform"+q+"fv"](v[O],j);break;default:throw new n("","Unrecognized data type for vector "+name+": "+W)}}else if(W.indexOf("mat")===0&&W.length===4){if(q=W.charCodeAt(W.length-1)-48,q<2||q>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+W);f["uniformMatrix"+q+"fv"](v[O],!1,j);break}else throw new n("","Unknown uniform data type for "+name+": "+W)}}}}}function b(A,h){if(typeof h!="object")return[[A,h]];var p=[];for(var k in h){var w=h[k],R=A;parseInt(k)+""===k?R+="["+k+"]":R+="."+k,typeof w=="object"?p.push.apply(p,b(R,w)):p.push([R,w])}return p}function _(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var h=A.indexOf("vec");if(0<=h&&h<=1&&A.length===4+h){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid data type");return A.charAt(0)==="b"?i(p,!1):i(p,0)}else if(A.indexOf("mat")===0&&A.length===4){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+A);return i(p*p,0)}else throw new n("","Unknown uniform data type for "+name+": "+A)}}function P(A,h,p){if(typeof p=="object"){var k=M(p);Object.defineProperty(A,h,{get:o(k),set:u(p),enumerable:!0,configurable:!1})}else v[p]?Object.defineProperty(A,h,{get:T(p),set:u(p),enumerable:!0,configurable:!1}):A[h]=_(y[p].type)}function M(A){var h;if(Array.isArray(A)){h=new Array(A.length);for(var p=0;p=0!=h>=0&&v.push(_[0]+.5+.5*(A+h)/(A-h))}y+=C,++_[0]}}}function r(){return e()}var a=r;function n(l){var f={};return function(x,y,v){var T=x.dtype,u=x.order,b=[T,u.join()].join(),_=f[b];return _||(f[b]=_=l([T,u])),_(x.shape.slice(0),x.data,x.stride,x.offset|0,y,v)}}function o(l){return n(a.bind(void 0,l))}function i(l){return o({funcName:l.funcName})}t.exports=i({funcName:"zeroCrossings"})},3352:function(t,e,r){var a=r(2478),n=0,o=1,i=2;t.exports=k;function l(w,R,O,j,V){this.mid=w,this.left=R,this.right=O,this.leftPoints=j,this.rightPoints=V,this.count=(R?R.count:0)+(O?O.count:0)+j.length}var f=l.prototype;function x(w,R){w.mid=R.mid,w.left=R.left,w.right=R.right,w.leftPoints=R.leftPoints,w.rightPoints=R.rightPoints,w.count=R.count}function y(w,R){var O=A(R);w.mid=O.mid,w.left=O.left,w.right=O.right,w.leftPoints=O.leftPoints,w.rightPoints=O.rightPoints,w.count=O.count}function v(w,R){var O=w.intervals([]);O.push(R),y(w,O)}function T(w,R){var O=w.intervals([]),j=O.indexOf(R);return j<0?n:(O.splice(j,1),y(w,O),o)}f.intervals=function(w){return w.push.apply(w,this.leftPoints),this.left&&this.left.intervals(w),this.right&&this.right.intervals(w),w},f.insert=function(w){var R=this.count-this.leftPoints.length;if(this.count+=1,w[1]3*(R+1)?v(this,w):this.left.insert(w):this.left=A([w]);else if(w[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?v(this,w):this.right.insert(w):this.right=A([w]);else{var O=a.ge(this.leftPoints,w,M),j=a.ge(this.rightPoints,w,C);this.leftPoints.splice(O,0,w),this.rightPoints.splice(j,0,w)}},f.remove=function(w){var R=this.count-this.leftPoints;if(w[1]3*(R-1))return T(this,w);var j=this.left.remove(w);return j===i?(this.left=null,this.count-=1,o):(j===o&&(this.count-=1),j)}else if(w[0]>this.mid){if(!this.right)return n;var V=this.left?this.left.count:0;if(4*V>3*(R-1))return T(this,w);var j=this.right.remove(w);return j===i?(this.right=null,this.count-=1,o):(j===o&&(this.count-=1),j)}else{if(this.count===1)return this.leftPoints[0]===w?i:n;if(this.leftPoints.length===1&&this.leftPoints[0]===w){if(this.left&&this.right){for(var H=this,F=this.left;F.right;)H=F,F=F.right;if(H===this)F.right=this.right;else{var U=this.left,j=this.right;H.count-=F.count,H.right=F.left,F.left=U,F.right=j}x(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?x(this,this.left):x(this,this.right);return o}for(var U=a.ge(this.leftPoints,w,M);U=0&&w[j][1]>=R;--j){var V=O(w[j]);if(V)return V}}function _(w,R){for(var O=0;Othis.mid){if(this.right){var O=this.right.queryPoint(w,R);if(O)return O}return b(this.rightPoints,w,R)}else return _(this.leftPoints,R)},f.queryInterval=function(w,R,O){if(wthis.mid&&this.right){var j=this.right.queryInterval(w,R,O);if(j)return j}return Rthis.mid?b(this.rightPoints,w,O):_(this.leftPoints,O)};function P(w,R){return w-R}function M(w,R){var O=w[0]-R[0];return O||w[1]-R[1]}function C(w,R){var O=w[1]-R[1];return O||w[0]-R[0]}function A(w){if(w.length===0)return null;for(var R=[],O=0;O>1],V=[],H=[],F=[],O=0;O=0),C.type){case"b":b=parseInt(b,10).toString(2);break;case"c":b=String.fromCharCode(parseInt(b,10));break;case"d":case"i":b=parseInt(b,10);break;case"j":b=JSON.stringify(b,null,C.width?parseInt(C.width):0);break;case"e":b=C.precision?parseFloat(b).toExponential(C.precision):parseFloat(b).toExponential();break;case"f":b=C.precision?parseFloat(b).toFixed(C.precision):parseFloat(b);break;case"g":b=C.precision?String(Number(b.toPrecision(C.precision))):parseFloat(b);break;case"o":b=(parseInt(b,10)>>>0).toString(8);break;case"s":b=String(b),b=C.precision?b.substring(0,C.precision):b;break;case"t":b=String(!!b),b=C.precision?b.substring(0,C.precision):b;break;case"T":b=Object.prototype.toString.call(b).slice(8,-1).toLowerCase(),b=C.precision?b.substring(0,C.precision):b;break;case"u":b=parseInt(b,10)>>>0;break;case"v":b=b.valueOf(),b=C.precision?b.substring(0,C.precision):b;break;case"x":b=(parseInt(b,10)>>>0).toString(16);break;case"X":b=(parseInt(b,10)>>>0).toString(16).toUpperCase();break}n.json.test(C.type)?_+=b:(n.number.test(C.type)&&(!k||C.sign)?(w=k?"+":"-",b=b.toString().replace(n.sign,"")):w="",h=C.pad_char?C.pad_char==="0"?"0":C.pad_char.charAt(1):" ",p=C.width-(w+b).length,A=C.width&&p>0?h.repeat(p):"",_+=C.align?w+b+A:h==="0"?w+A+b:A+w+b)}return _}var f=Object.create(null);function x(y){if(f[y])return f[y];for(var v=y,T,u=[],b=0;v;){if((T=n.text.exec(v))!==null)u.push(T[0]);else if((T=n.modulo.exec(v))!==null)u.push("%");else if((T=n.placeholder.exec(v))!==null){if(T[2]){b|=1;var _=[],P=T[2],M=[];if((M=n.key.exec(P))!==null)for(_.push(M[1]);(P=P.substring(M[0].length))!=="";)if((M=n.key_access.exec(P))!==null)_.push(M[1]);else if((M=n.index_access.exec(P))!==null)_.push(M[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");T[2]=_}else b|=2;if(b===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");u.push({placeholder:T[0],param_no:T[1],keys:T[2],sign:T[3],pad_char:T[4],align:T[5],width:T[6],precision:T[7],type:T[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(T[0].length)}return f[y]=u}e.sprintf=o,e.vsprintf=i,typeof window<"u"&&(window.sprintf=o,window.vsprintf=i,a=(function(){return{sprintf:o,vsprintf:i}}).call(e,r,e,t),a!==void 0&&(t.exports=a))})()},3390:function(t){t.exports=e;function e(r,a,n,o){var i=new Float32Array(4);return i[0]=r,i[1]=a,i[2]=n,i[3]=o,i}},3436:function(t,e,r){var a=r(3236),n=r(9405),o=a([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -1649,11 +1690,11 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);t.exports=function(s){return n(s,o,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},3502:function(t,e,r){t.exports=o;var a=r(5995),n=r(9127);function o(i,s){return n(a(i,s))}},3508:function(t,e,r){var a=r(6852);a=a.slice().filter(function(n){return!/^(gl\_|texture)/.test(n)}),t.exports=a.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},3536:function(t){t.exports=e;function e(r,a){var n=a[0],o=a[1],i=a[2],s=n*n+o*o+i*i;return s>0&&(s=1/Math.sqrt(s),r[0]=a[0]*s,r[1]=a[1]*s,r[2]=a[2]*s),r}},3545:function(t,e,r){t.exports=s;var a=r(8105),n=a("loy&&T[A+x]>M;--E,A-=b){for(var h=A,p=A+b,k=0;k>>1,M=2*f,E=C,A=T[M*C+x];b<_;){if(_-b=R?(E=w,A=R):k>=N?(E=p,A=k):(E=O,A=N):R>=N?(E=w,A=R):N>=k?(E=p,A=k):(E=O,A=N);for(var V=M*(_-1),H=M*E,F=0;Fthis.buffer.length){n.free(this.buffer);for(var _=this.buffer=n.mallocUint8(i(b*u*4)),C=0;CM|0},vertex:function(b,_,C,M,E,A,h,p,k,w,R,O,N){var V=(h<<0)+(p<<1)+(k<<2)+(w<<3)|0;if(!(V===0||V===15))switch(V){case 0:R.push([b-.5,_-.5]);break;case 1:R.push([b-.25-.25*(M+C-2*N)/(C-M),_-.25-.25*(E+C-2*N)/(C-E)]);break;case 2:R.push([b-.75-.25*(-M-C+2*N)/(M-C),_-.25-.25*(A+M-2*N)/(M-A)]);break;case 3:R.push([b-.5,_-.5-.5*(E+C+A+M-4*N)/(C-E+M-A)]);break;case 4:R.push([b-.25-.25*(A+E-2*N)/(E-A),_-.75-.25*(-E-C+2*N)/(E-C)]);break;case 5:R.push([b-.5-.5*(M+C+A+E-4*N)/(C-M+E-A),_-.5]);break;case 6:R.push([b-.5-.25*(-M-C+A+E)/(M-C+E-A),_-.5-.25*(-E-C+A+M)/(E-C+M-A)]);break;case 7:R.push([b-.75-.25*(A+E-2*N)/(E-A),_-.75-.25*(A+M-2*N)/(M-A)]);break;case 8:R.push([b-.75-.25*(-A-E+2*N)/(A-E),_-.75-.25*(-A-M+2*N)/(A-M)]);break;case 9:R.push([b-.5-.25*(M+C+-A-E)/(C-M+A-E),_-.5-.25*(E+C+-A-M)/(C-E+A-M)]);break;case 10:R.push([b-.5-.5*(-M-C+-A-E+4*N)/(M-C+A-E),_-.5]);break;case 11:R.push([b-.25-.25*(-A-E+2*N)/(A-E),_-.75-.25*(E+C-2*N)/(C-E)]);break;case 12:R.push([b-.5,_-.5-.5*(-E-C+-A-M+4*N)/(E-C+A-M)]);break;case 13:R.push([b-.75-.25*(M+C-2*N)/(C-M),_-.25-.25*(-A-M+2*N)/(A-M)]);break;case 14:R.push([b-.25-.25*(-M-C+2*N)/(M-C),_-.25-.25*(-E-C+2*N)/(E-C)]);break;case 15:R.push([b-.5,_-.5]);break}},cell:function(b,_,C,M,E,A,h,p,k){E?p.push([b,_]):p.push([_,b])}});return function(b,_){var C=[],M=[];return u(b,C,M,_),{positions:C,cells:M}}}};function i(y,v){var T=y.length+"d",u=o[T];if(u)return u(a,y,v)}function s(y,v){for(var T=n(y,v),u=T.length,b=new Array(u),_=new Array(u),C=0;C>1,T=-7,u=n?i-1:0,b=n?-1:1,_=r[a+u];for(u+=b,s=_&(1<<-T)-1,_>>=-T,T+=x;T>0;s=s*256+r[a+u],u+=b,T-=8);for(f=s&(1<<-T)-1,s>>=-T,T+=o;T>0;f=f*256+r[a+u],u+=b,T-=8);if(s===0)s=1-v;else{if(s===y)return f?NaN:(_?-1:1)*(1/0);f=f+Math.pow(2,o),s=s-v}return(_?-1:1)*f*Math.pow(2,s-o)},e.write=function(r,a,n,o,i,s){var f,x,y,v=s*8-i-1,T=(1<>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=o?0:s-1,C=o?1:-1,M=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(x=isNaN(a)?1:0,f=T):(f=Math.floor(Math.log(a)/Math.LN2),a*(y=Math.pow(2,-f))<1&&(f--,y*=2),f+u>=1?a+=b/y:a+=b*Math.pow(2,1-u),a*y>=2&&(f++,y/=2),f+u>=T?(x=0,f=T):f+u>=1?(x=(a*y-1)*Math.pow(2,i),f=f+u):(x=a*Math.pow(2,u-1)*Math.pow(2,i),f=0));i>=8;r[n+_]=x&255,_+=C,x/=256,i-=8);for(f=f<0;r[n+_]=f&255,_+=C,f/=256,v-=8);r[n+_-C]|=M*128}},3788:function(t,e,r){var a=r(8507),n=r(2419);t.exports=o;function o(i,s){return a(i,s)||n(i)-n(s)}},3837:function(t,e,r){t.exports=O;var a=r(4935),n=r(501),o=r(5304),i=r(6429),s=r(6444),f=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),x=ArrayBuffer,y=DataView;function v(N){return x.isView(N)&&!(N instanceof y)}function T(N){return Array.isArray(N)||v(N)}function u(N,V){return N[0]=V[0],N[1]=V[1],N[2]=V[2],N}function b(N){this.gl=N,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=o(N)}var _=b.prototype;_.update=function(N){N=N||{};function V(at,vt,it){if(it in N){var Y=N[it],ft=this[it],ut;(at?T(Y)&&T(Y[0]):T(Y))?this[it]=ut=[vt(Y[0]),vt(Y[1]),vt(Y[2])]:this[it]=ut=[vt(Y),vt(Y),vt(Y)];for(var wt=0;wt<3;++wt)if(ut[wt]!==ft[wt])return!0}return!1}var H=V.bind(this,!1,Number),F=V.bind(this,!1,Boolean),U=V.bind(this,!1,String),W=V.bind(this,!0,function(at){if(T(at)){if(at.length===3)return[+at[0],+at[1],+at[2],1];if(at.length===4)return[+at[0],+at[1],+at[2],+at[3]]}return[0,0,0,1]}),q,X=!1,lt=!1;if("bounds"in N)for(var yt=N.bounds,pt=0;pt<2;++pt)for(var st=0;st<3;++st)yt[pt][st]!==this.bounds[pt][st]&&(lt=!0),this.bounds[pt][st]=yt[pt][st];if("ticks"in N){q=N.ticks,X=!0,this.autoTicks=!1;for(var pt=0;pt<3;++pt)this.tickSpacing[pt]=0}else H("tickSpacing")&&(this.autoTicks=!0,lt=!0);if(this._firstInit&&("ticks"in N||"tickSpacing"in N||(this.autoTicks=!0),lt=!0,X=!0,this._firstInit=!1),lt&&this.autoTicks&&(q=s.create(this.bounds,this.tickSpacing),X=!0),X){for(var pt=0;pt<3;++pt)q[pt].sort(function(vt,it){return vt.x-it.x});s.equal(q,this.ticks)?X=!1:this.ticks=q}F("tickEnable"),U("tickFont")&&(X=!0),U("tickFontStyle")&&(X=!0),U("tickFontWeight")&&(X=!0),U("tickFontVariant")&&(X=!0),H("tickSize"),H("tickAngle"),H("tickPad"),W("tickColor");var tt=U("labels");U("labelFont")&&(tt=!0),U("labelFontStyle")&&(tt=!0),U("labelFontWeight")&&(tt=!0),U("labelFontVariant")&&(tt=!0),F("labelEnable"),H("labelSize"),H("labelPad"),W("labelColor"),F("lineEnable"),F("lineMirror"),H("lineWidth"),W("lineColor"),F("lineTickEnable"),F("lineTickMirror"),H("lineTickLength"),H("lineTickWidth"),W("lineTickColor"),F("gridEnable"),H("gridWidth"),W("gridColor"),F("zeroEnable"),W("zeroLineColor"),H("zeroLineWidth"),F("backgroundEnable"),W("backgroundColor");var dt=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],rt=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(tt||X)&&this._text.update(this.bounds,this.labels,dt,this.ticks,rt):this._text=a(this.gl,this.bounds,this.labels,dt,this.ticks,rt),this._lines&&X&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=n(this.gl,this.bounds,this.ticks))};function C(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new C,new C,new C];function E(N,V,H,F,U){for(var W=N.primalOffset,q=N.primalMinor,X=N.mirrorOffset,lt=N.mirrorMinor,yt=F[V],pt=0;pt<3;++pt)if(V!==pt){var st=W,tt=X,dt=q,rt=lt;yt&1<0?(dt[pt]=-1,rt[pt]=0):(dt[pt]=0,rt[pt]=1)}}var A=[0,0,0],h={model:f,view:f,projection:f,_ortho:!1};_.isOpaque=function(){return!0},_.isTransparent=function(){return!1},_.drawTransparent=function(N){};var p=0,k=[0,0,0],w=[0,0,0],R=[0,0,0];_.draw=function(N){N=N||h;for(var V=this.gl,H=N.model||f,F=N.view||f,U=N.projection||f,W=this.bounds,q=N._ortho||!1,X=i(H,F,U,W,q),lt=X.cubeEdges,yt=X.axis,pt=F[12],st=F[13],tt=F[14],dt=F[15],rt=q?2:1,at=rt*this.pixelRatio*(U[3]*pt+U[7]*st+U[11]*tt+U[15]*dt)/V.drawingBufferHeight,vt=0;vt<3;++vt)this.lastCubeProps.cubeEdges[vt]=lt[vt],this.lastCubeProps.axis[vt]=yt[vt];for(var it=M,vt=0;vt<3;++vt)E(M[vt],vt,this.bounds,lt,yt);for(var V=this.gl,Y=A,vt=0;vt<3;++vt)this.backgroundEnable[vt]?Y[vt]=yt[vt]:Y[vt]=0;this._background.draw(H,F,U,W,Y,this.backgroundColor),this._lines.bind(H,F,U,this);for(var vt=0;vt<3;++vt){var ft=[0,0,0];yt[vt]>0?ft[vt]=W[1][vt]:ft[vt]=W[0][vt];for(var ut=0;ut<2;++ut){var wt=(vt+1+ut)%3,zt=(vt+1+(ut^1))%3;this.gridEnable[wt]&&this._lines.drawGrid(wt,zt,this.bounds,ft,this.gridColor[wt],this.gridWidth[wt]*this.pixelRatio)}for(var ut=0;ut<2;++ut){var wt=(vt+1+ut)%3,zt=(vt+1+(ut^1))%3;this.zeroEnable[zt]&&Math.min(W[0][zt],W[1][zt])<=0&&Math.max(W[0][zt],W[1][zt])>=0&&this._lines.drawZero(wt,zt,this.bounds,ft,this.zeroLineColor[zt],this.zeroLineWidth[zt]*this.pixelRatio)}}for(var vt=0;vt<3;++vt){this.lineEnable[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].primalOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio),this.lineMirror[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].mirrorOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio);for(var Pt=u(k,it[vt].primalMinor),Wt=u(w,it[vt].mirrorMinor),Ht=this.lineTickLength,ut=0;ut<3;++ut){var Jt=at/H[5*ut];Pt[ut]*=Ht[ut]*Jt,Wt[ut]*=Ht[ut]*Jt}this.lineTickEnable[vt]&&this._lines.drawAxisTicks(vt,it[vt].primalOffset,Pt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio),this.lineTickMirror[vt]&&this._lines.drawAxisTicks(vt,it[vt].mirrorOffset,Wt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,F,U,this.pixelRatio);var ge,he=.5,de,se;function Tt(Te){se=[0,0,0],se[Te]=1}function Lt(Te,He,Ge){var cr=(Te+1)%3,ur=(Te+2)%3,jr=He[cr],Hr=He[ur],br=Ge[cr],Kr=Ge[ur];if(jr>0&&Kr>0){Tt(cr);return}else if(jr>0&&Kr<0){Tt(cr);return}else if(jr<0&&Kr>0){Tt(cr);return}else if(jr<0&&Kr<0){Tt(cr);return}else if(Hr>0&&br>0){Tt(ur);return}else if(Hr>0&&br<0){Tt(ur);return}else if(Hr<0&&br>0){Tt(ur);return}else if(Hr<0&&br<0){Tt(ur);return}}for(var vt=0;vt<3;++vt){for(var Mt=it[vt].primalMinor,te=it[vt].mirrorMinor,ve=u(R,it[vt].primalOffset),ut=0;ut<3;++ut)this.lineTickEnable[vt]&&(ve[ut]+=at*Mt[ut]*Math.max(this.lineTickLength[ut],0)/H[5*ut]);var oe=[0,0,0];if(oe[vt]=1,this.tickEnable[vt]){this.tickAngle[vt]===-3600?(this.tickAngle[vt]=0,this.tickAlign[vt]="auto"):this.tickAlign[vt]=-1,de=1,ge=[this.tickAlign[vt],he,de],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]),se=[0,0,0],Lt(vt,Mt,te);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.tickPad[ut]/H[5*ut];this._text.drawTicks(vt,this.tickSize[vt],this.tickAngle[vt],ve,this.tickColor[vt],oe,se,ge)}if(this.labelEnable[vt]){de=0,se=[0,0,0],this.labels[vt].length>4&&(Tt(vt),de=1),ge=[this.labelAlign[vt],he,de],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.labelPad[ut]/H[5*ut];ve[vt]+=.5*(W[0][vt]+W[1][vt]),this._text.drawLabel(vt,this.labelSize[vt],this.labelAngle[vt],ve,this.labelColor[vt],[0,0,0],se,ge)}}this._text.unbind()},_.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function O(N,V){var H=new b(N);return H.update(V),H}},3840:function(t){t.exports=M;var e=0,r=1;function a(E,A,h,p,k,w){this._color=E,this.key=A,this.value=h,this.left=p,this.right=k,this._count=w}function n(E){return new a(E._color,E.key,E.value,E.left,E.right,E._count)}function o(E,A){return new a(E,A.key,A.value,A.left,A.right,A._count)}function i(E){E._count=1+(E.left?E.left._count:0)+(E.right?E.right._count:0)}function s(E,A){this._compare=E,this.root=A}var f=s.prototype;Object.defineProperty(f,"keys",{get:function(){var E=[];return this.forEach(function(A,h){E.push(A)}),E}}),Object.defineProperty(f,"values",{get:function(){var E=[];return this.forEach(function(A,h){E.push(h)}),E}}),Object.defineProperty(f,"length",{get:function(){return this.root?this.root._count:0}}),f.insert=function(E,A){for(var h=this._compare,p=this.root,k=[],w=[];p;){var R=h(E,p.key);k.push(p),w.push(R),R<=0?p=p.left:p=p.right}k.push(new a(e,E,A,null,null,1));for(var O=k.length-2;O>=0;--O){var p=k[O];w[O]<=0?k[O]=new a(p._color,p.key,p.value,k[O+1],p.right,p._count+1):k[O]=new a(p._color,p.key,p.value,p.left,k[O+1],p._count+1)}for(var O=k.length-1;O>1;--O){var N=k[O-1],p=k[O];if(N._color===r||p._color===r)break;var V=k[O-2];if(V.left===N)if(N.left===p){var H=V.right;if(H&&H._color===e)N._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.left=N.right,N._color=r,N.right=V,k[O-2]=N,k[O-1]=p,i(V),i(N),O>=3){var F=k[O-3];F.left===V?F.left=N:F.right=N}break}}else{var H=V.right;if(H&&H._color===e)N._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(N.right=p.left,V._color=e,V.left=p.right,p._color=r,p.left=N,p.right=V,k[O-2]=p,k[O-1]=N,i(V),i(N),i(p),O>=3){var F=k[O-3];F.left===V?F.left=p:F.right=p}break}}else if(N.right===p){var H=V.left;if(H&&H._color===e)N._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.right=N.left,N._color=r,N.left=V,k[O-2]=N,k[O-1]=p,i(V),i(N),O>=3){var F=k[O-3];F.right===V?F.right=N:F.left=N}break}}else{var H=V.left;if(H&&H._color===e)N._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(N.left=p.right,V._color=e,V.right=p.left,p._color=r,p.right=N,p.left=V,k[O-2]=p,k[O-1]=N,i(V),i(N),i(p),O>=3){var F=k[O-3];F.right===V?F.right=p:F.left=p}break}}}return k[0]._color=r,new s(h,k[0])};function x(E,A){if(A.left){var h=x(E,A.left);if(h)return h}var h=E(A.key,A.value);if(h)return h;if(A.right)return x(E,A.right)}function y(E,A,h,p){var k=A(E,p.key);if(k<=0){if(p.left){var w=y(E,A,h,p.left);if(w)return w}var w=h(p.key,p.value);if(w)return w}if(p.right)return y(E,A,h,p.right)}function v(E,A,h,p,k){var w=h(E,k.key),R=h(A,k.key),O;if(w<=0&&(k.left&&(O=v(E,A,h,p,k.left),O)||R>0&&(O=p(k.key,k.value),O)))return O;if(R>0&&k.right)return v(E,A,h,p,k.right)}f.forEach=function(E,A,h){if(this.root)switch(arguments.length){case 1:return x(E,this.root);case 2:return y(A,this._compare,E,this.root);case 3:return this._compare(A,h)>=0?void 0:v(A,h,this._compare,E,this.root)}},Object.defineProperty(f,"begin",{get:function(){for(var E=[],A=this.root;A;)E.push(A),A=A.left;return new T(this,E)}}),Object.defineProperty(f,"end",{get:function(){for(var E=[],A=this.root;A;)E.push(A),A=A.right;return new T(this,E)}}),f.at=function(E){if(E<0)return new T(this,[]);for(var A=this.root,h=[];;){if(h.push(A),A.left){if(E=A.right._count)break;A=A.right}else break}return new T(this,[])},f.ge=function(E){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(E,h.key);p.push(h),w<=0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.gt=function(E){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(E,h.key);p.push(h),w<0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.lt=function(E){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(E,h.key);p.push(h),w>0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.le=function(E){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(E,h.key);p.push(h),w>=0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.find=function(E){for(var A=this._compare,h=this.root,p=[];h;){var k=A(E,h.key);if(p.push(h),k===0)return new T(this,p);k<=0?h=h.left:h=h.right}return new T(this,[])},f.remove=function(E){var A=this.find(E);return A?A.remove():this},f.get=function(E){for(var A=this._compare,h=this.root;h;){var p=A(E,h.key);if(p===0)return h.value;p<=0?h=h.left:h=h.right}};function T(E,A){this.tree=E,this._stack=A}var u=T.prototype;Object.defineProperty(u,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(u,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),u.clone=function(){return new T(this.tree,this._stack.slice())};function b(E,A){E.key=A.key,E.value=A.value,E.left=A.left,E.right=A.right,E._color=A._color,E._count=A._count}function _(E){for(var A,h,p,k,w=E.length-1;w>=0;--w){if(A=E[w],w===0){A._color=r;return}if(h=E[w-1],h.left===A){if(p=h.right,p.right&&p.right._color===e){if(p=h.right=n(p),k=p.right=n(p.right),h.right=p.left,p.left=h,p.right=k,p._color=h._color,A._color=r,h._color=r,k._color=r,i(h),i(p),w>1){var R=E[w-2];R.left===h?R.left=p:R.right=p}E[w-1]=p;return}else if(p.left&&p.left._color===e){if(p=h.right=n(p),k=p.left=n(p.left),h.right=k.left,p.left=k.right,k.left=h,k.right=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var R=E[w-2];R.left===h?R.left=k:R.right=k}E[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.right=o(e,p);return}else{h.right=o(e,p);continue}else{if(p=n(p),h.right=p.left,p.left=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var R=E[w-2];R.left===h?R.left=p:R.right=p}E[w-1]=p,E[w]=h,w+11){var R=E[w-2];R.right===h?R.right=p:R.left=p}E[w-1]=p;return}else if(p.right&&p.right._color===e){if(p=h.left=n(p),k=p.right=n(p.right),h.left=k.right,p.right=k.left,k.right=h,k.left=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var R=E[w-2];R.right===h?R.right=k:R.left=k}E[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.left=o(e,p);return}else{h.left=o(e,p);continue}else{if(p=n(p),h.left=p.right,p.right=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var R=E[w-2];R.right===h?R.right=p:R.left=p}E[w-1]=p,E[w]=h,w+1=0;--p){var h=E[p];h.left===E[p+1]?A[p]=new a(h._color,h.key,h.value,A[p+1],h.right,h._count):A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count)}if(h=A[A.length-1],h.left&&h.right){var k=A.length;for(h=h.left;h.right;)A.push(h),h=h.right;var w=A[k-1];A.push(new a(h._color,w.key,w.value,h.left,h.right,h._count)),A[k-1].key=h.key,A[k-1].value=h.value;for(var p=A.length-2;p>=k;--p)h=A[p],A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count);A[k-1].left=A[k]}if(h=A[A.length-1],h._color===e){var R=A[A.length-2];R.left===h?R.left=null:R.right===h&&(R.right=null),A.pop();for(var p=0;p0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(u,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(u,"index",{get:function(){var E=0,A=this._stack;if(A.length===0){var h=this.tree.root;return h?h._count:0}else A[A.length-1].left&&(E=A[A.length-1].left._count);for(var p=A.length-2;p>=0;--p)A[p+1]===A[p].right&&(++E,A[p].left&&(E+=A[p].left._count));return E},enumerable:!0}),u.next=function(){var E=this._stack;if(E.length!==0){var A=E[E.length-1];if(A.right)for(A=A.right;A;)E.push(A),A=A.left;else for(E.pop();E.length>0&&E[E.length-1].right===A;)A=E[E.length-1],E.pop()}},Object.defineProperty(u,"hasNext",{get:function(){var E=this._stack;if(E.length===0)return!1;if(E[E.length-1].right)return!0;for(var A=E.length-1;A>0;--A)if(E[A-1].left===E[A])return!0;return!1}}),u.update=function(E){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var h=new Array(A.length),p=A[A.length-1];h[h.length-1]=new a(p._color,p.key,E,p.left,p.right,p._count);for(var k=A.length-2;k>=0;--k)p=A[k],p.left===A[k+1]?h[k]=new a(p._color,p.key,p.value,h[k+1],p.right,p._count):h[k]=new a(p._color,p.key,p.value,p.left,h[k+1],p._count);return new s(this.tree._compare,h[0])},u.prev=function(){var E=this._stack;if(E.length!==0){var A=E[E.length-1];if(A.left)for(A=A.left;A;)E.push(A),A=A.right;else for(E.pop();E.length>0&&E[E.length-1].left===A;)A=E[E.length-1],E.pop()}},Object.defineProperty(u,"hasPrev",{get:function(){var E=this._stack;if(E.length===0)return!1;if(E[E.length-1].left)return!0;for(var A=E.length-1;A>0;--A)if(E[A-1].right===E[A])return!0;return!1}});function C(E,A){return EA?1:0}function M(E){return new s(E||C,null)}},3865:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]).add(i[0].mul(o[1])),o[1].mul(i[1]))}},3952:function(t,e,r){t.exports=o;var a=r(3250);function n(i,s){for(var f=new Array(s+1),x=0;x20?52:f+32}},4040:function(t){t.exports=e;function e(r,a,n,o,i,s,f){var x=1/(a-n),y=1/(o-i),v=1/(s-f);return r[0]=-2*x,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*y,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*v,r[11]=0,r[12]=(a+n)*x,r[13]=(i+o)*y,r[14]=(f+s)*v,r[15]=1,r}},4041:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],s=a[2],f=n[0],x=n[1],y=n[2],v=n[3],T=v*o+x*s-y*i,u=v*i+y*o-f*s,b=v*s+f*i-x*o,_=-f*o-x*i-y*s;return r[0]=T*v+_*-f+u*-y-b*-x,r[1]=u*v+_*-x+b*-f-T*-y,r[2]=b*v+_*-y+T*-x-u*-f,r[3]=a[3],r}},4081:function(t){t.exports=e;function e(r,a,n,o,i,s,f,x,y,v){var T=a+s+v;if(u>0){var u=Math.sqrt(T+1);r[0]=.5*(f-y)/u,r[1]=.5*(x-o)/u,r[2]=.5*(n-s)/u,r[3]=.5*u}else{var b=Math.max(a,s,v),u=Math.sqrt(2*b-T+1);a>=b?(r[0]=.5*u,r[1]=.5*(i+n)/u,r[2]=.5*(x+o)/u,r[3]=.5*(f-y)/u):s>=b?(r[0]=.5*(n+i)/u,r[1]=.5*u,r[2]=.5*(y+f)/u,r[3]=.5*(x-o)/u):(r[0]=.5*(o+x)/u,r[1]=.5*(f+y)/u,r[2]=.5*u,r[3]=.5*(n-i)/u)}return r}},4100:function(t,e,r){var a=r(4437),n=r(3837),o=r(5445),i=r(4449),s=r(3589),f=r(2260),x=r(7169),y=r(351),v=r(4772),T=r(4040),u=r(799),b=r(9216)({tablet:!0,featureDetect:!0});t.exports={createScene:A,createCamera:a};function _(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function C(p,k){var w=null;try{w=p.getContext("webgl",k),w||(w=p.getContext("experimental-webgl",k))}catch{return null}return w}function M(p){var k=Math.round(Math.log(Math.abs(p))/Math.log(10));if(k<0){var w=Math.round(Math.pow(10,-k));return Math.ceil(p*w)/w}else if(k>0){var w=Math.round(Math.pow(10,k));return Math.ceil(p/w)*w}return Math.ceil(p)}function E(p){return typeof p=="boolean"?p:!0}function A(p){p=p||{},p.camera=p.camera||{};var k=p.canvas;if(!k)if(k=document.createElement("canvas"),p.container){var w=p.container;w.appendChild(k)}else document.body.appendChild(k);var R=p.gl;if(R||(p.glOptions&&(b=!!p.glOptions.preserveDrawingBuffer),R=C(k,p.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:b})),!R)throw new Error("webgl not supported");var O=p.bounds||[[-10,-10,-10],[10,10,10]],N=new _,V=f(R,R.drawingBufferWidth,R.drawingBufferHeight,{preferFloat:!b}),H=u(R),F=p.cameraObject&&p.cameraObject._ortho===!0||p.camera.projection&&p.camera.projection.type==="orthographic"||!1,U={eye:p.camera.eye||[2,0,0],center:p.camera.center||[0,0,0],up:p.camera.up||[0,1,0],zoomMin:p.camera.zoomMax||.1,zoomMax:p.camera.zoomMin||100,mode:p.camera.mode||"turntable",_ortho:F},W=p.axes||{},q=n(R,W);q.enable=!W.disable;var X=p.spikes||{},lt=i(R,X),yt=[],pt=[],st=[],tt=[],dt=!0,it=!0,rt=new Array(16),at=new Array(16),vt={view:null,projection:rt,model:at,_ortho:!1},it=!0,Y=[R.drawingBufferWidth,R.drawingBufferHeight],ft=p.cameraObject||a(k,U),ut={gl:R,contextLost:!1,pixelRatio:p.pixelRatio||1,canvas:k,selection:N,camera:ft,axes:q,axesPixels:null,spikes:lt,bounds:O,objects:yt,shape:Y,aspect:p.aspectRatio||[1,1,1],pickRadius:p.pickRadius||10,zNear:p.zNear||.01,zFar:p.zFar||1e3,fovy:p.fovy||Math.PI/4,clearColor:p.clearColor||[0,0,0,0],autoResize:E(p.autoResize),autoBounds:E(p.autoBounds),autoScale:!!p.autoScale,autoCenter:E(p.autoCenter),clipToBounds:E(p.clipToBounds),snapToData:!!p.snapToData,onselect:p.onselect||null,onrender:p.onrender||null,onclick:p.onclick||null,cameraParams:vt,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(se){this.aspect[0]=se.x,this.aspect[1]=se.y,this.aspect[2]=se.z,it=!0},setBounds:function(se,Tt){this.bounds[0][se]=Tt.min,this.bounds[1][se]=Tt.max},setClearColor:function(se){this.clearColor=se},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},wt=[R.drawingBufferWidth/ut.pixelRatio|0,R.drawingBufferHeight/ut.pixelRatio|0];function zt(){if(!ut._stopped&&ut.autoResize){var se=k.parentNode,Tt=1,Lt=1;se&&se!==document.body?(Tt=se.clientWidth,Lt=se.clientHeight):(Tt=window.innerWidth,Lt=window.innerHeight);var Mt=Math.ceil(Tt*ut.pixelRatio)|0,te=Math.ceil(Lt*ut.pixelRatio)|0;if(Mt!==k.width||te!==k.height){k.width=Mt,k.height=te;var ve=k.style;ve.position=ve.position||"absolute",ve.left="0px",ve.top="0px",ve.width=Tt+"px",ve.height=Lt+"px",dt=!0}}}ut.autoResize&&zt(),window.addEventListener("resize",zt);function Pt(){for(var se=yt.length,Tt=tt.length,Lt=0;Lt0&&st[Tt-1]===0;)st.pop(),tt.pop().dispose()}ut.update=function(se){ut._stopped||(dt=!0,it=!0)},ut.add=function(se){ut._stopped||(se.axes=q,yt.push(se),pt.push(-1),dt=!0,it=!0,Pt())},ut.remove=function(se){if(!ut._stopped){var Tt=yt.indexOf(se);Tt<0||(yt.splice(Tt,1),pt.pop(),dt=!0,it=!0,Pt())}},ut.dispose=function(){if(!ut._stopped&&(ut._stopped=!0,window.removeEventListener("resize",zt),k.removeEventListener("webglcontextlost",Wt),ut.mouseListener.enabled=!1,!ut.contextLost)){q.dispose(),lt.dispose();for(var se=0;seN.distance)continue;for(var Ge=0;Gev;){var h=u[A-2],p=u[A-1];if(hu[T+1]:!0}function x(v,T,u,b){v*=2;var _=b[v];return _>1,E=M-b,A=M+b,h=_,p=E,k=M,w=A,R=C,O=v+1,N=T-1,V=0;f(h,p,u)&&(V=h,h=p,p=V),f(w,R,u)&&(V=w,w=R,R=V),f(h,k,u)&&(V=h,h=k,k=V),f(p,k,u)&&(V=p,p=k,k=V),f(h,w,u)&&(V=h,h=w,w=V),f(k,w,u)&&(V=k,k=w,w=V),f(p,R,u)&&(V=p,p=R,R=V),f(p,k,u)&&(V=p,p=k,k=V),f(w,R,u)&&(V=w,w=R,R=V);for(var H=u[2*p],F=u[2*p+1],U=u[2*w],W=u[2*w+1],q=2*h,X=2*k,lt=2*R,yt=2*_,pt=2*M,st=2*C,tt=0;tt<2;++tt){var dt=u[q+tt],rt=u[X+tt],at=u[lt+tt];u[yt+tt]=dt,u[pt+tt]=rt,u[st+tt]=at}o(E,v,u),o(A,T,u);for(var vt=O;vt<=N;++vt)if(x(vt,H,F,u))vt!==O&&n(vt,O,u),++O;else if(!x(vt,U,W,u))for(;;)if(x(N,U,W,u)){x(N,H,F,u)?(i(vt,O,N,u),++O,--N):(n(vt,N,u),--N);break}else{if(--N0)if(_[0]!==M[1][0])C=b,b=b.right;else{var p=y(b.right,_);if(p)return p;b=b.left}else{if(_[0]!==M[1][0])return b;var p=y(b.right,_);if(p)return p;b=b.left}}return C}f.castUp=function(b){var _=a.le(this.coordinates,b[0]);if(_<0)return-1;this.slabs[_];var C=y(this.slabs[_],b),M=-1;if(C&&(M=C.value),this.coordinates[_]===b[0]){var E=null;if(C&&(E=C.key),_>0){var A=y(this.slabs[_-1],b);A&&(E?i(A.key,E)>0&&(E=A.key,M=A.value):(M=A.value,E=A.key))}var h=this.horizontal[_];if(h.length>0){var p=a.ge(h,b[1],x);if(p=h.length)return M;k=h[p]}}if(k.start)if(E){var w=o(E[0],E[1],[b[0],k.y]);E[0][0]>E[1][0]&&(w=-w),w>0&&(M=k.index)}else M=k.index;else k.y!==b[1]&&(M=k.index)}}}return M};function v(b,_,C,M){this.y=b,this.index=_,this.start=C,this.closed=M}function T(b,_,C,M){this.x=b,this.segment=_,this.create=C,this.index=M}function u(b){for(var _=b.length,C=2*_,M=new Array(C),E=0;E<_;++E){var A=b[E],h=A[0][0]Math.abs(p))u.rotate(R,0,0,-h*k*Math.PI*E.rotateSpeed/window.innerWidth);else if(!E._ortho){var O=-E.zoomSpeed*w*p/window.innerHeight*(R-u.lastT())/20;u.pan(R,0,0,_*(Math.exp(O)-1))}}},!0)},E.enableMouseListeners(),E}},4449:function(t,e,r){var a=r(2762),n=r(8116),o=r(1493);t.exports=T;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(u,b,_,C){this.gl=u,this.buffer=b,this.vao=_,this.shader=C,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var f=s.prototype,x=[0,0,0],y=[0,0,0],v=[0,0];f.isTransparent=function(){return!1},f.drawTransparent=function(u){},f.draw=function(u){var b=this.gl,_=this.vao,C=this.shader;_.bind(),C.bind();var M=u.model||i,E=u.view||i,A=u.projection||i,h;this.axes&&(h=this.axes.lastCubeProps.axis);for(var p=x,k=y,w=0;w<3;++w)h&&h[w]<0?(p[w]=this.bounds[0][w],k[w]=this.bounds[1][w]):(p[w]=this.bounds[1][w],k[w]=this.bounds[0][w]);v[0]=b.drawingBufferWidth,v[1]=b.drawingBufferHeight,C.uniforms.model=M,C.uniforms.view=E,C.uniforms.projection=A,C.uniforms.coordinates=[this.position,p,k],C.uniforms.colors=this.colors,C.uniforms.screenShape=v;for(var w=0;w<3;++w)C.uniforms.lineWidth=this.lineWidth[w]*this.pixelRatio,this.enabled[w]&&(_.draw(b.TRIANGLES,6,6*w),this.drawSides[w]&&_.draw(b.TRIANGLES,12,18+12*w));_.unbind()},f.update=function(u){u&&("bounds"in u&&(this.bounds=u.bounds),"position"in u&&(this.position=u.position),"lineWidth"in u&&(this.lineWidth=u.lineWidth),"colors"in u&&(this.colors=u.colors),"enabled"in u&&(this.enabled=u.enabled),"drawSides"in u&&(this.drawSides=u.drawSides))},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function T(u,b){var _=[];function C(p,k,w,R,O,N){var V=[p,k,w,0,0,0,1];V[R+3]=1,V[R]=O,_.push.apply(_,V),V[6]=-1,_.push.apply(_,V),V[R]=N,_.push.apply(_,V),_.push.apply(_,V),V[6]=1,_.push.apply(_,V),V[R]=O,_.push.apply(_,V)}C(0,0,0,0,0,1),C(0,0,0,1,0,1),C(0,0,0,2,0,1),C(1,0,0,1,-1,1),C(1,0,0,2,-1,1),C(0,1,0,0,-1,1),C(0,1,0,2,-1,1),C(0,0,1,0,-1,1),C(0,0,1,1,-1,1);var M=a(u,_),E=n(u,[{type:u.FLOAT,buffer:M,size:3,offset:0,stride:28},{type:u.FLOAT,buffer:M,size:3,offset:12,stride:28},{type:u.FLOAT,buffer:M,size:1,offset:24,stride:28}]),A=o(u);A.attributes.position.location=0,A.attributes.color.location=1,A.attributes.weight.location=2;var h=new s(u,M,E,A);return h.update(b),h}},4494:function(t){t.exports=e;function e(r,a){return r[0]=1/a[0],r[1]=1/a[1],r[2]=1/a[2],r[3]=1/a[3],r}},4505:function(t,e,r){t.exports=r(5847)},4578:function(t){t.exports=e;function e(r,a,n,o,i){return r[0]=a,r[1]=n,r[2]=o,r[3]=i,r}},4623:function(t){"use restrict";t.exports=e;function e(r){this.roots=new Array(r),this.ranks=new Array(r);for(var a=0;a0)return 1<=0)return 1<=0;--u)f[u]=x*a[u]+y*n[u]+v*o[u]+T*i[u];return f}return x*a+y*n+v*o[u]+T*i}function r(a,n,o,i,s,f){var x=s-1,y=s*s,v=x*x,T=(1+2*s)*v,u=s*v,b=y*(3-2*s),_=y*x;if(a.length){f||(f=new Array(a.length));for(var C=a.length-1;C>=0;--C)f[C]=T*a[C]+u*n[C]+b*o[C]+_*i[C];return f}return T*a+u*n+b*o+_*i}t.exports=r,t.exports.derivative=e},4772:function(t){t.exports=e;function e(r,a,n,o,i){var s=1/Math.tan(a/2),f=1/(o-i);return r[0]=s/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+o)*f,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*o*f,r[15]=0,r}},4793:function(t,e,r){function a(gt,St){if(!(gt instanceof St))throw new TypeError("Cannot call a class as a function")}function n(gt,St){for(var Nt=0;NtA)throw new RangeError('The value "'+gt+'" is invalid for option "size"');var St=new Uint8Array(gt);return Object.setPrototypeOf(St,k.prototype),St}function k(gt,St,Nt){if(typeof gt=="number"){if(typeof St=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(gt)}return w(gt,St,Nt)}k.poolSize=8192;function w(gt,St,Nt){if(typeof gt=="string")return V(gt,St);if(ArrayBuffer.isView(gt))return F(gt);if(gt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt));if(rn(gt,ArrayBuffer)||gt&&rn(gt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(rn(gt,SharedArrayBuffer)||gt&&rn(gt.buffer,SharedArrayBuffer)))return U(gt,St,Nt);if(typeof gt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var re=gt.valueOf&>.valueOf();if(re!=null&&re!==gt)return k.from(re,St,Nt);var le=W(gt);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof gt[Symbol.toPrimitive]=="function")return k.from(gt[Symbol.toPrimitive]("string"),St,Nt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt))}k.from=function(gt,St,Nt){return w(gt,St,Nt)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array);function R(gt){if(typeof gt!="number")throw new TypeError('"size" argument must be of type number');if(gt<0)throw new RangeError('The value "'+gt+'" is invalid for option "size"')}function O(gt,St,Nt){return R(gt),gt<=0?p(gt):St!==void 0?typeof Nt=="string"?p(gt).fill(St,Nt):p(gt).fill(St):p(gt)}k.alloc=function(gt,St,Nt){return O(gt,St,Nt)};function N(gt){return R(gt),p(gt<0?0:q(gt)|0)}k.allocUnsafe=function(gt){return N(gt)},k.allocUnsafeSlow=function(gt){return N(gt)};function V(gt,St){if((typeof St!="string"||St==="")&&(St="utf8"),!k.isEncoding(St))throw new TypeError("Unknown encoding: "+St);var Nt=X(gt,St)|0,re=p(Nt),le=re.write(gt,St);return le!==Nt&&(re=re.slice(0,le)),re}function H(gt){for(var St=gt.length<0?0:q(gt.length)|0,Nt=p(St),re=0;re=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return gt|0}k.isBuffer=function(gt){return gt!=null&>._isBuffer===!0&>!==k.prototype},k.compare=function(gt,St){if(rn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),rn(St,Uint8Array)&&(St=k.from(St,St.offset,St.byteLength)),!k.isBuffer(gt)||!k.isBuffer(St))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(gt===St)return 0;for(var Nt=gt.length,re=St.length,le=0,we=Math.min(Nt,re);lere.length?(k.isBuffer(we)||(we=k.from(we)),we.copy(re,le)):Uint8Array.prototype.set.call(re,we,le);else if(k.isBuffer(we))we.copy(re,le);else throw new TypeError('"list" argument must be an Array of Buffers');le+=we.length}return re};function X(gt,St){if(k.isBuffer(gt))return gt.length;if(ArrayBuffer.isView(gt)||rn(gt,ArrayBuffer))return gt.byteLength;if(typeof gt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_(gt));var Nt=gt.length,re=arguments.length>2&&arguments[2]===!0;if(!re&&Nt===0)return 0;for(var le=!1;;)switch(St){case"ascii":case"latin1":case"binary":return Nt;case"utf8":case"utf-8":return ur(gt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt*2;case"hex":return Nt>>>1;case"base64":return br(gt).length;default:if(le)return re?-1:ur(gt).length;St=(""+St).toLowerCase(),le=!0}}k.byteLength=X;function lt(gt,St,Nt){var re=!1;if((St===void 0||St<0)&&(St=0),St>this.length||((Nt===void 0||Nt>this.length)&&(Nt=this.length),Nt<=0)||(Nt>>>=0,St>>>=0,Nt<=St))return"";for(gt||(gt="utf8");;)switch(gt){case"hex":return Pt(this,St,Nt);case"utf8":case"utf-8":return Y(this,St,Nt);case"ascii":return wt(this,St,Nt);case"latin1":case"binary":return zt(this,St,Nt);case"base64":return it(this,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,St,Nt);default:if(re)throw new TypeError("Unknown encoding: "+gt);gt=(gt+"").toLowerCase(),re=!0}}k.prototype._isBuffer=!0;function yt(gt,St,Nt){var re=gt[St];gt[St]=gt[Nt],gt[Nt]=re}k.prototype.swap16=function(){var gt=this.length;if(gt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var St=0;StSt&&(gt+=" ... "),""},E&&(k.prototype[E]=k.prototype.inspect),k.prototype.compare=function(gt,St,Nt,re,le){if(rn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),!k.isBuffer(gt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_(gt));if(St===void 0&&(St=0),Nt===void 0&&(Nt=gt?gt.length:0),re===void 0&&(re=0),le===void 0&&(le=this.length),St<0||Nt>gt.length||re<0||le>this.length)throw new RangeError("out of range index");if(re>=le&&St>=Nt)return 0;if(re>=le)return-1;if(St>=Nt)return 1;if(St>>>=0,Nt>>>=0,re>>>=0,le>>>=0,this===gt)return 0;for(var we=le-re,Ue=Nt-St,qe=Math.min(we,Ue),or=this.slice(re,le),Ar=gt.slice(St,Nt),Tr=0;Tr2147483647?Nt=2147483647:Nt<-2147483648&&(Nt=-2147483648),Nt=+Nt,Ce(Nt)&&(Nt=le?0:gt.length-1),Nt<0&&(Nt=gt.length+Nt),Nt>=gt.length){if(le)return-1;Nt=gt.length-1}else if(Nt<0)if(le)Nt=0;else return-1;if(typeof St=="string"&&(St=k.from(St,re)),k.isBuffer(St))return St.length===0?-1:st(gt,St,Nt,re,le);if(typeof St=="number")return St=St&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(gt,St,Nt):Uint8Array.prototype.lastIndexOf.call(gt,St,Nt):st(gt,[St],Nt,re,le);throw new TypeError("val must be string, number or Buffer")}function st(gt,St,Nt,re,le){var we=1,Ue=gt.length,qe=St.length;if(re!==void 0&&(re=String(re).toLowerCase(),re==="ucs2"||re==="ucs-2"||re==="utf16le"||re==="utf-16le")){if(gt.length<2||St.length<2)return-1;we=2,Ue/=2,qe/=2,Nt/=2}function or(Vn,Hn){return we===1?Vn[Hn]:Vn.readUInt16BE(Hn*we)}var Ar;if(le){var Tr=-1;for(Ar=Nt;ArUe&&(Nt=Ue-qe),Ar=Nt;Ar>=0;Ar--){for(var pr=!0,Jr=0;Jrle&&(re=le)):re=le;var we=St.length;re>we/2&&(re=we/2);var Ue;for(Ue=0;Ue>>0,isFinite(Nt)?(Nt=Nt>>>0,re===void 0&&(re="utf8")):(re=Nt,Nt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var le=this.length-St;if((Nt===void 0||Nt>le)&&(Nt=le),gt.length>0&&(Nt<0||St<0)||St>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var we=!1;;)switch(re){case"hex":return tt(this,gt,St,Nt);case"utf8":case"utf-8":return dt(this,gt,St,Nt);case"ascii":case"latin1":case"binary":return rt(this,gt,St,Nt);case"base64":return at(this,gt,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,gt,St,Nt);default:if(we)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),we=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(gt,St,Nt){return St===0&&Nt===gt.length?C.fromByteArray(gt):C.fromByteArray(gt.slice(St,Nt))}function Y(gt,St,Nt){Nt=Math.min(gt.length,Nt);for(var re=[],le=St;le239?4:we>223?3:we>191?2:1;if(le+qe<=Nt){var or=void 0,Ar=void 0,Tr=void 0,pr=void 0;switch(qe){case 1:we<128&&(Ue=we);break;case 2:or=gt[le+1],(or&192)===128&&(pr=(we&31)<<6|or&63,pr>127&&(Ue=pr));break;case 3:or=gt[le+1],Ar=gt[le+2],(or&192)===128&&(Ar&192)===128&&(pr=(we&15)<<12|(or&63)<<6|Ar&63,pr>2047&&(pr<55296||pr>57343)&&(Ue=pr));break;case 4:or=gt[le+1],Ar=gt[le+2],Tr=gt[le+3],(or&192)===128&&(Ar&192)===128&&(Tr&192)===128&&(pr=(we&15)<<18|(or&63)<<12|(Ar&63)<<6|Tr&63,pr>65535&&pr<1114112&&(Ue=pr))}}Ue===null?(Ue=65533,qe=1):Ue>65535&&(Ue-=65536,re.push(Ue>>>10&1023|55296),Ue=56320|Ue&1023),re.push(Ue),le+=qe}return ut(re)}var ft=4096;function ut(gt){var St=gt.length;if(St<=ft)return String.fromCharCode.apply(String,gt);for(var Nt="",re=0;rere)&&(Nt=re);for(var le="",we=St;weNt&&(gt=Nt),St<0?(St+=Nt,St<0&&(St=0)):St>Nt&&(St=Nt),StNt)throw new RangeError("Trying to access beyond buffer length")}k.prototype.readUintLE=k.prototype.readUIntLE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Ht(gt,St,this.length);for(var re=this[gt],le=1,we=0;++we>>0,St=St>>>0,Nt||Ht(gt,St,this.length);for(var re=this[gt+--St],le=1;St>0&&(le*=256);)re+=this[gt+--St]*le;return re},k.prototype.readUint8=k.prototype.readUInt8=function(gt,St){return gt=gt>>>0,St||Ht(gt,1,this.length),this[gt]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(gt,St){return gt=gt>>>0,St||Ht(gt,2,this.length),this[gt]|this[gt+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(gt,St){return gt=gt>>>0,St||Ht(gt,2,this.length),this[gt]<<8|this[gt+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),(this[gt]|this[gt+1]<<8|this[gt+2]<<16)+this[gt+3]*16777216},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),this[gt]*16777216+(this[gt+1]<<16|this[gt+2]<<8|this[gt+3])},k.prototype.readBigUInt64LE=ne(function(gt){gt=gt>>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=St+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,24),le=this[++gt]+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+Nt*Math.pow(2,24);return BigInt(re)+(BigInt(le)<>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=St*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt],le=this[++gt]*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+Nt;return(BigInt(re)<>>0,St=St>>>0,Nt||Ht(gt,St,this.length);for(var re=this[gt],le=1,we=0;++we=le&&(re-=Math.pow(2,8*St)),re},k.prototype.readIntBE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Ht(gt,St,this.length);for(var re=St,le=1,we=this[gt+--re];re>0&&(le*=256);)we+=this[gt+--re]*le;return le*=128,we>=le&&(we-=Math.pow(2,8*St)),we},k.prototype.readInt8=function(gt,St){return gt=gt>>>0,St||Ht(gt,1,this.length),this[gt]&128?(255-this[gt]+1)*-1:this[gt]},k.prototype.readInt16LE=function(gt,St){gt=gt>>>0,St||Ht(gt,2,this.length);var Nt=this[gt]|this[gt+1]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt16BE=function(gt,St){gt=gt>>>0,St||Ht(gt,2,this.length);var Nt=this[gt+1]|this[gt]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt32LE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),this[gt]|this[gt+1]<<8|this[gt+2]<<16|this[gt+3]<<24},k.prototype.readInt32BE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),this[gt]<<24|this[gt+1]<<16|this[gt+2]<<8|this[gt+3]},k.prototype.readBigInt64LE=ne(function(gt){gt=gt>>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=this[gt+4]+this[gt+5]*Math.pow(2,8)+this[gt+6]*Math.pow(2,16)+(Nt<<24);return(BigInt(re)<>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=(St<<24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt];return(BigInt(re)<>>0,St||Ht(gt,4,this.length),M.read(this,gt,!0,23,4)},k.prototype.readFloatBE=function(gt,St){return gt=gt>>>0,St||Ht(gt,4,this.length),M.read(this,gt,!1,23,4)},k.prototype.readDoubleLE=function(gt,St){return gt=gt>>>0,St||Ht(gt,8,this.length),M.read(this,gt,!0,52,8)},k.prototype.readDoubleBE=function(gt,St){return gt=gt>>>0,St||Ht(gt,8,this.length),M.read(this,gt,!1,52,8)};function Jt(gt,St,Nt,re,le,we){if(!k.isBuffer(gt))throw new TypeError('"buffer" argument must be a Buffer instance');if(St>le||Stgt.length)throw new RangeError("Index out of range")}k.prototype.writeUintLE=k.prototype.writeUIntLE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,Nt=Nt>>>0,!re){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var we=1,Ue=0;for(this[St]=gt&255;++Ue>>0,Nt=Nt>>>0,!re){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var we=Nt-1,Ue=1;for(this[St+we]=gt&255;--we>=0&&(Ue*=256);)this[St+we]=gt/Ue&255;return St+Nt},k.prototype.writeUint8=k.prototype.writeUInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,255,0),this[St]=gt&255,St+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St+3]=gt>>>24,this[St+2]=gt>>>16,this[St+1]=gt>>>8,this[St]=gt&255,St+4},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4};function ge(gt,St,Nt,re,le){oe(St,re,le,gt,Nt,7);var we=Number(St&BigInt(4294967295));gt[Nt++]=we,we=we>>8,gt[Nt++]=we,we=we>>8,gt[Nt++]=we,we=we>>8,gt[Nt++]=we;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Nt}function he(gt,St,Nt,re,le){oe(St,re,le,gt,Nt,7);var we=Number(St&BigInt(4294967295));gt[Nt+7]=we,we=we>>8,gt[Nt+6]=we,we=we>>8,gt[Nt+5]=we,we=we>>8,gt[Nt+4]=we;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt+3]=Ue,Ue=Ue>>8,gt[Nt+2]=Ue,Ue=Ue>>8,gt[Nt+1]=Ue,Ue=Ue>>8,gt[Nt]=Ue,Nt+8}k.prototype.writeBigUInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return he(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,!re){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var we=0,Ue=1,qe=0;for(this[St]=gt&255;++we>0)-qe&255;return St+Nt},k.prototype.writeIntBE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,!re){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var we=Nt-1,Ue=1,qe=0;for(this[St+we]=gt&255;--we>=0&&(Ue*=256);)gt<0&&qe===0&&this[St+we+1]!==0&&(qe=1),this[St+we]=(gt/Ue>>0)-qe&255;return St+Nt},k.prototype.writeInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,127,-128),gt<0&&(gt=255+gt+1),this[St]=gt&255,St+1},k.prototype.writeInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),this[St]=gt&255,this[St+1]=gt>>>8,this[St+2]=gt>>>16,this[St+3]=gt>>>24,St+4},k.prototype.writeInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),gt<0&&(gt=4294967295+gt+1),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4},k.prototype.writeBigInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return he(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(gt,St,Nt,re,le,we){if(Nt+re>gt.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("Index out of range")}function se(gt,St,Nt,re,le){return St=+St,Nt=Nt>>>0,le||de(gt,St,Nt,4),M.write(gt,St,Nt,re,23,4),Nt+4}k.prototype.writeFloatLE=function(gt,St,Nt){return se(this,gt,St,!0,Nt)},k.prototype.writeFloatBE=function(gt,St,Nt){return se(this,gt,St,!1,Nt)};function Tt(gt,St,Nt,re,le){return St=+St,Nt=Nt>>>0,le||de(gt,St,Nt,8),M.write(gt,St,Nt,re,52,8),Nt+8}k.prototype.writeDoubleLE=function(gt,St,Nt){return Tt(this,gt,St,!0,Nt)},k.prototype.writeDoubleBE=function(gt,St,Nt){return Tt(this,gt,St,!1,Nt)},k.prototype.copy=function(gt,St,Nt,re){if(!k.isBuffer(gt))throw new TypeError("argument should be a Buffer");if(Nt||(Nt=0),!re&&re!==0&&(re=this.length),St>=gt.length&&(St=gt.length),St||(St=0),re>0&&re=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),gt.length-St>>0,Nt=Nt===void 0?this.length:Nt>>>0,gt||(gt=0);var we;if(typeof gt=="number")for(we=St;weMath.pow(2,32)?le=te(String(Nt)):typeof Nt=="bigint"&&(le=String(Nt),(Nt>Math.pow(BigInt(2),BigInt(32))||Nt<-Math.pow(BigInt(2),BigInt(32)))&&(le=te(le)),le+="n"),re+=" It must be ".concat(St,". Received ").concat(le),re},RangeError);function te(gt){for(var St="",Nt=gt.length,re=gt[0]==="-"?1:0;Nt>=re+4;Nt-=3)St="_".concat(gt.slice(Nt-3,Nt)).concat(St);return"".concat(gt.slice(0,Nt)).concat(St)}function ve(gt,St,Nt){Te(St,"offset"),(gt[St]===void 0||gt[St+Nt]===void 0)&&He(St,gt.length-(Nt+1))}function oe(gt,St,Nt,re,le,we){if(gt>Nt||gt= 0".concat(Ue," and < 2").concat(Ue," ** ").concat((we+1)*8).concat(Ue):qe=">= -(2".concat(Ue," ** ").concat((we+1)*8-1).concat(Ue,") and < 2 ** ")+"".concat((we+1)*8-1).concat(Ue),new Lt.ERR_OUT_OF_RANGE("value",qe,gt)}ve(re,le,we)}function Te(gt,St){if(typeof gt!="number")throw new Lt.ERR_INVALID_ARG_TYPE(St,"number",gt)}function He(gt,St,Nt){throw Math.floor(gt)!==gt?(Te(gt,Nt),new Lt.ERR_OUT_OF_RANGE("offset","an integer",gt)):St<0?new Lt.ERR_BUFFER_OUT_OF_BOUNDS:new Lt.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(St),gt)}var Ge=/[^+/0-9A-Za-z-_]/g;function cr(gt){if(gt=gt.split("=")[0],gt=gt.trim().replace(Ge,""),gt.length<2)return"";for(;gt.length%4!==0;)gt=gt+"=";return gt}function ur(gt,St){St=St||1/0;for(var Nt,re=gt.length,le=null,we=[],Ue=0;Ue55295&&Nt<57344){if(!le){if(Nt>56319){(St-=3)>-1&&we.push(239,191,189);continue}else if(Ue+1===re){(St-=3)>-1&&we.push(239,191,189);continue}le=Nt;continue}if(Nt<56320){(St-=3)>-1&&we.push(239,191,189),le=Nt;continue}Nt=(le-55296<<10|Nt-56320)+65536}else le&&(St-=3)>-1&&we.push(239,191,189);if(le=null,Nt<128){if((St-=1)<0)break;we.push(Nt)}else if(Nt<2048){if((St-=2)<0)break;we.push(Nt>>6|192,Nt&63|128)}else if(Nt<65536){if((St-=3)<0)break;we.push(Nt>>12|224,Nt>>6&63|128,Nt&63|128)}else if(Nt<1114112){if((St-=4)<0)break;we.push(Nt>>18|240,Nt>>12&63|128,Nt>>6&63|128,Nt&63|128)}else throw new Error("Invalid code point")}return we}function jr(gt){for(var St=[],Nt=0;Nt>8,le=Nt%256,we.push(le),we.push(re);return we}function br(gt){return C.toByteArray(cr(gt))}function Kr(gt,St,Nt,re){var le;for(le=0;le=St.length||le>=gt.length);++le)St[le+Nt]=gt[le];return le}function rn(gt,St){return gt instanceof St||gt!=null&>.constructor!=null&>.constructor.name!=null&>.constructor.name===St.name}function Ce(gt){return gt!==gt}var Gt=function(){for(var gt="0123456789abcdef",St=new Array(256),Nt=0;Nt<16;++Nt)for(var re=Nt*16,le=0;le<16;++le)St[re+le]=gt[Nt]+gt[le];return St}();function ne(gt){return typeof BigInt>"u"?Ct:gt}function Ct(){throw new Error("BigInt not supported")}},4844:function(t){t.exports=e;function e(r,a,n,o){return r[0]=a[0]+n[0]*o,r[1]=a[1]+n[1]*o,r[2]=a[2]+n[2]*o,r[3]=a[3]+n[3]*o,r}},4905:function(t,e,r){var a=r(5874);t.exports=n;function n(o,i){var s=a(i),f=[];return f=f.concat(s(o)),f=f.concat(s(null)),f}},4935:function(t,e,r){t.exports=b;var a=r(2762),n=r(8116),o=r(4359),i=r(1879).Q,s=window||process.global||{},f=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var x=3;function y(_,C,M,E){this.gl=_,this.shader=C,this.buffer=M,this.vao=E,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=y.prototype,T=[0,0];v.bind=function(_,C,M,E){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=_,A.view=C,A.projection=M,A.pixelScale=E,T[0]=this.gl.drawingBufferWidth,T[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=T},v.unbind=function(){this.vao.unbind()},v.update=function(_,C,M,E,A){var h=[];function p(W,q,X,lt,yt,pt){var st=[X.style,X.weight,X.variant,X.family].join("_"),tt=f[st];tt||(tt=f[st]={});var dt=tt[q];dt||(dt=tt[q]=u(q,{triangles:!0,font:X.family,fontStyle:X.style,fontWeight:X.weight,fontVariant:X.variant,textAlign:"center",textBaseline:"middle",lineSpacing:yt,styletags:pt}));for(var rt=(lt||12)/12,at=dt.positions,vt=dt.cells,it=0,Y=vt.length;it=0;--ut){var wt=at[ft[ut]];h.push(rt*wt[0],-rt*wt[1],W)}}for(var k=[0,0,0],w=[0,0,0],R=[0,0,0],O=[0,0,0],N=1.25,V={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},H=0;H<3;++H){R[H]=h.length/x|0,p(.5*(_[0][H]+_[1][H]),C[H],M[H],12,N,V),O[H]=(h.length/x|0)-R[H],k[H]=h.length/x|0;for(var F=0;F0||C.length>0;){for(;_.length>0;){var p=_.pop();if(M[p]!==-b){M[p]=b;for(var k=E[p],w=0;w<3;++w){var R=h[3*p+w];R>=0&&M[R]===0&&(A[3*p+w]?C.push(R):(_.push(R),M[R]=b))}}}var O=C;C=_,_=O,C.length=0,b=-b}var N=f(E,M,v);return T?N.concat(u.boundary):N}},5033:function(t){t.exports=e;function e(r,a,n){var o=a||0,i=n||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[o*r[12]+r[8],o*r[13]+r[9],o*r[14]+r[10],o*r[15]+r[11]],[i*r[12]-r[8],i*r[13]-r[9],i*r[14]-r[10],i*r[15]-r[11]]]}},5085:function(t,e,r){t.exports=b;var a=r(3250)[3],n=r(4209),o=r(3352),i=r(2478);function s(){return!0}function f(_){return function(C,M){var E=_[C];return E?!!E.queryPoint(M,s):!1}}function x(_){for(var C={},M=0;M<_.length;++M){var E=_[M],A=E[0][0],h=E[0][1],p=E[1][1],k=[Math.min(h,p),Math.max(h,p)];A in C?C[A].push(k):C[A]=[k]}for(var w={},R=Object.keys(C),M=0;M0&&C[E]===M[0])A=_[E-1];else return 1;for(var h=1;A;){var p=A.key,k=a(M,p[0],p[1]);if(p[0][0]0)h=-1,A=A.right;else return 0;else if(k>0)A=A.left;else if(k<0)h=1,A=A.right;else return 0}return h}}function v(_){return 1}function T(_){return function(C){return _(C[0],C[1])?0:1}}function u(_,C){return function(M){return _(M[0],M[1])?0:C(M)}}function b(_){for(var C=_.length,M=[],E=[],A=0,h=0;h"u"?r(606):WeakMap,i=new o,s=0;function f(C,M,E,A,h,p,k){this.id=C,this.src=M,this.type=E,this.shader=A,this.count=p,this.programs=[],this.cache=k}f.prototype.dispose=function(){if(--this.count===0){for(var C=this.cache,M=C.gl,E=this.programs,A=0,h=E.length;A0&&(f=1/Math.sqrt(f),r[0]=n*f,r[1]=o*f,r[2]=i*f,r[3]=s*f),r}},5202:function(t,e,r){var a=r(1944),n=r(8210);t.exports=s,t.exports.positive=f,t.exports.negative=x;function o(y,v){var T=n(a(y,v),[v[v.length-1]]);return T[T.length-1]}function i(y,v,T,u){var b=u-v,_=-v/b;_<0?_=0:_>1&&(_=1);for(var C=1-_,M=y.length,E=new Array(M),A=0;A0||b>0&&E<0){var A=i(_,E,C,b);T.push(A),u.push(A.slice())}E<0?u.push(C.slice()):E>0?T.push(C.slice()):(T.push(C.slice()),u.push(C.slice())),b=E}return{positive:T,negative:u}}function f(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],C=0;C0||u>0&&M<0)&&T.push(i(b,M,_,u)),M>=0&&T.push(_.slice()),u=M}return T}function x(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],C=0;C0||u>0&&M<0)&&T.push(i(b,M,_,u)),M<=0&&T.push(_.slice()),u=M}return T}},5219:function(t){t.exports=function(e){for(var r=e.length,a,n=0;n13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},5250:function(t){t.exports=r;var e=+(Math.pow(2,27)+1);function r(a,n,o){var i=a*n,s=e*a,f=s-a,x=s-f,y=a-x,v=e*n,T=v-n,u=v-T,b=n-u,_=i-x*u,C=_-y*u,M=C-x*b,E=y*b-M;return o?(o[0]=E,o[1]=i,o):[E,i]}},5298:function(t,e){var r={"float64,2,1,0":function(){return function(x,y,v,T,u){var b=x[0],_=x[1],C=x[2],M=v[0],E=v[1],A=v[2];T|=0;var h=0,p=0,k=0,w=A,R=E-C*A,O=M-_*E;for(k=0;k0;){H<64?(M=H,H=0):(M=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(E=F,F=0):(E=64,F-=64),T=N+H*h+F*p,_=V+H*w+F*R;var U=0,W=0,q=0,X=k,lt=h-A*k,yt=p-M*h,pt=O,st=w-A*O,tt=R-M*w;for(q=0;q0;){R<64?(M=R,R=0):(M=64,R-=64);for(var O=x[0]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),T=k+R*A+O*E,_=w+R*p+O*h;var N=0,V=0,H=A,F=E-M*A,U=p,W=h-M*p;for(V=0;V0;){V<64?(E=V,V=0):(E=64,V-=64);for(var H=x[0]|0;H>0;){H<64?(C=H,H=0):(C=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(M=F,F=0):(M=64,F-=64),T=O+V*p+H*A+F*h,_=N+V*R+H*k+F*w;var U=0,W=0,q=0,X=p,lt=A-E*p,yt=h-C*A,pt=R,st=k-E*R,tt=w-C*k;for(q=0;q=0}}(),o.removeTriangle=function(f,x,y){var v=this.stars;i(v[f],x,y),i(v[x],y,f),i(v[y],f,x)},o.addTriangle=function(f,x,y){var v=this.stars;v[f].push(x,y),v[x].push(y,f),v[y].push(f,x)},o.opposite=function(f,x){for(var y=this.stars[x],v=1,T=y.length;v0;){var u=y.pop();f[u]=!1;for(var b=s[u],v=0;v0){for(var st=0;st<24;++st)O.push(O[O.length-12]);F+=2,lt=!0}continue t}U[0][w]=Math.min(U[0][w],yt[w],pt[w]),U[1][w]=Math.max(U[1][w],yt[w],pt[w])}var tt,dt;Array.isArray(q[0])?(tt=q.length>k-1?q[k-1]:q.length>0?q[q.length-1]:[0,0,0,1],dt=q.length>k?q[k]:q.length>0?q[q.length-1]:[0,0,0,1]):tt=dt=q,tt.length===3&&(tt=[tt[0],tt[1],tt[2],1]),dt.length===3&&(dt=[dt[0],dt[1],dt[2],1]),!this.hasAlpha&&tt[3]<1&&(this.hasAlpha=!0);var rt;Array.isArray(X)?rt=X.length>k-1?X[k-1]:X.length>0?X[X.length-1]:[0,0,0,1]:rt=X;var at=H;if(H+=_(yt,pt),lt){for(w=0;w<2;++w)O.push(yt[0],yt[1],yt[2],pt[0],pt[1],pt[2],at,rt,tt[0],tt[1],tt[2],tt[3]);F+=2,lt=!1}O.push(yt[0],yt[1],yt[2],pt[0],pt[1],pt[2],at,rt,tt[0],tt[1],tt[2],tt[3],yt[0],yt[1],yt[2],pt[0],pt[1],pt[2],at,-rt,tt[0],tt[1],tt[2],tt[3],pt[0],pt[1],pt[2],yt[0],yt[1],yt[2],H,-rt,dt[0],dt[1],dt[2],dt[3],pt[0],pt[1],pt[2],yt[0],yt[1],yt[2],H,rt,dt[0],dt[1],dt[2],dt[3]),F+=4}}if(this.buffer.update(O),N.push(H),V.push(W[W.length-1].slice()),this.bounds=U,this.vertexCount=F,this.points=V,this.arcLength=N,"dashes"in p){var vt=p.dashes,it=vt.slice();for(it.unshift(0),k=1;kr[n][0]&&(n=o);return an?[[n],[a]]:[[a]]}},5771:function(t,e,r){var a=r(8507),n=r(3788),o=r(2419);t.exports=i;function i(s){s.sort(n);for(var f=s.length,x=0,y=0;y0){var u=s[x-1];if(a(v,u)===0&&o(u)!==T){x-=1;continue}}s[x++]=v}}return s.length=x,s}},5838:function(t,e,r){t.exports=n;var a=r(7842);function n(o){for(var i=new Array(o.length),s=0;s0)continue;te=Tt.slice(0,1).join("")}return it(te),lt+=te.length,U=U.slice(te.length),U.length}while(!0)}function ge(){return/[^a-fA-F0-9]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function he(){return H==="."||/[eE]/.test(H)?(U.push(H),V=_,F=H,O+1):H==="x"&&U.length===1&&U[0]==="0"?(V=p,U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function de(){return H==="f"&&(U.push(H),F=H,O+=1),/[eE]/.test(H)||(H==="-"||H==="+")&&/[eE]/.test(F)?(U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function se(){if(/[^\d\w_]/.test(H)){var Tt=U.join("");return vt[Tt]?V=E:at[Tt]?V=M:V=C,it(U.join("")),V=f,O}return U.push(H),F=H,O+1}}},5878:function(t,e,r){t.exports=i;var a=r(3250),n=r(2014);function o(s,f,x){var y=Math.abs(a(s,f,x)),v=Math.sqrt(Math.pow(f[0]-x[0],2)+Math.pow(f[1]-x[1],2));return y/v}function i(s,f,x){for(var y=f.length,v=s.length,T=new Array(y),u=new Array(y),b=new Array(y),_=new Array(y),C=0;C>1:(st>>1)-1}function R(st){for(var tt=k(st);;){var dt=tt,rt=2*st+1,at=2*(st+1),vt=st;if(rt0;){var dt=w(st);if(dt>=0){var rt=k(dt);if(tt0){var st=F[0];return p(0,q-1),q-=1,R(0),st}return-1}function V(st,tt){var dt=F[st];return b[dt]===tt?st:(b[dt]=-1/0,O(st),N(),b[dt]=tt,q+=1,O(q-1))}function H(st){if(!_[st]){_[st]=!0;var tt=T[st],dt=u[st];T[dt]>=0&&(T[dt]=tt),u[tt]>=0&&(u[tt]=dt),U[tt]>=0&&V(U[tt],h(tt)),U[dt]>=0&&V(U[dt],h(dt))}}for(var F=[],U=new Array(y),C=0;C>1;C>=0;--C)R(C);for(;;){var X=N();if(X<0||b[X]>x)break;H(X)}for(var lt=[],C=0;C=0&&dt>=0&&tt!==dt){var rt=U[tt],at=U[dt];rt!==at&&pt.push([rt,at])}}),n.unique(n.normalize(pt)),{positions:lt,edges:pt}}},5911:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],s=a[2],f=n[0],x=n[1],y=n[2];return r[0]=i*y-s*x,r[1]=s*f-o*y,r[2]=o*x-i*f,r}},5964:function(t){t.exports=function(e){return!e&&e!==0?"":e.toString()}},5995:function(t,e,r){t.exports=o;var a=r(7642),n=r(6037);function o(i,s){return a(s).filter(function(f){for(var x=new Array(f.length),y=0;y2&&k[1]>2&&A(p.pick(-1,-1).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,0).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,1).lo(1,1).hi(k[0]-2,k[1]-2)),k[1]>2&&(E(p.pick(0,-1).lo(1).hi(k[1]-2),h.pick(0,-1,1).lo(1).hi(k[1]-2)),M(h.pick(0,-1,0).lo(1).hi(k[1]-2))),k[1]>2&&(E(p.pick(k[0]-1,-1).lo(1).hi(k[1]-2),h.pick(k[0]-1,-1,1).lo(1).hi(k[1]-2)),M(h.pick(k[0]-1,-1,0).lo(1).hi(k[1]-2))),k[0]>2&&(E(p.pick(-1,0).lo(1).hi(k[0]-2),h.pick(-1,0,0).lo(1).hi(k[0]-2)),M(h.pick(-1,0,1).lo(1).hi(k[0]-2))),k[0]>2&&(E(p.pick(-1,k[1]-1).lo(1).hi(k[0]-2),h.pick(-1,k[1]-1,0).lo(1).hi(k[0]-2)),M(h.pick(-1,k[1]-1,1).lo(1).hi(k[0]-2))),h.set(0,0,0,0),h.set(0,0,1,0),h.set(k[0]-1,0,0,0),h.set(k[0]-1,0,1,0),h.set(0,k[1]-1,0,0),h.set(0,k[1]-1,1,0),h.set(k[0]-1,k[1]-1,0,0),h.set(k[0]-1,k[1]-1,1,0),h}}function _(C){var M=C.join(),k=y[M];if(k)return k;for(var E=C.length,A=[v,T],h=1;h<=E;++h)A.push(u(h));var p=b,k=p.apply(void 0,A);return y[M]=k,k}t.exports=function(C,M,E){if(Array.isArray(E)||(typeof E=="string"?E=a(M.dimension,E):E=a(M.dimension,"clamp")),M.size===0)return C;if(M.dimension===0)return C.set(0),C;var A=_(E);return A(C,M)}},6204:function(t){t.exports=e;function e(r){var a,n,o,i=r.length,s=0;for(a=0;ay&&(y=a.length(O)),w&&!k){var N=2*a.distance(M,R)/(a.length(E)+a.length(O));N?(h=Math.min(h,N),p=!1):p=!0}p||(M=R,E=O),A.push(O)}var V=[v,u,_],H=[T,b,C];i&&(i[0]=V,i[1]=H),y===0&&(y=1);var F=1/y;isFinite(h)||(h=1),x.vectorScale=h;var U=o.coneSize||(k?1:.5);o.absoluteConeSize&&(U=o.absoluteConeSize*F),x.coneScale=U;for(var w=0,W=0;wlt&&(H|=1<lt){H|=1<x[O][1])&&(vt=O);for(var it=-1,O=0;O<3;++O){var Y=vt^1<x[ft][0]&&(ft=Y)}}var ut=_;ut[0]=ut[1]=ut[2]=0,ut[a.log2(it^vt)]=vt&it,ut[a.log2(vt^ft)]=vt&ft;var wt=ft^7;wt===H||wt===at?(wt=it^7,ut[a.log2(ft^wt)]=wt&ft):ut[a.log2(it^wt)]=wt⁢for(var zt=C,Pt=H,W=0;W<3;++W)Pt&1<=0&&(x=s.length-f-1);var y=Math.pow(10,x),v=Math.round(o*i*y),T=v+"";if(T.indexOf("e")>=0)return T;var u=v/y,b=v%y;v<0?(u=-Math.ceil(u)|0,b=-b|0):(u=Math.floor(u)|0,b=b|0);var _=""+u;if(v<0&&(_="-"+_),x){for(var C=""+b;C.length=o[0][f];--v)x.push({x:v*i[f],text:r(i[f],v)});s.push(x)}return s}function n(o,i){for(var s=0;s<3;++s){if(o[s].length!==i[s].length)return!1;for(var f=0;fM+1)throw new Error(_+" map requires nshades to be at least size "+b.length);Array.isArray(x.alpha)?x.alpha.length!==2?E=[1,1]:E=x.alpha.slice():typeof x.alpha=="number"?E=[x.alpha,x.alpha]:E=[1,1],y=b.map(function(R){return Math.round(R.index*M)}),E[0]=Math.min(Math.max(E[0],0),1),E[1]=Math.min(Math.max(E[1],0),1);var h=b.map(function(R,O){var N=b[O].index,V=b[O].rgb.slice();return V.length===4&&V[3]>=0&&V[3]<=1||(V[3]=E[0]+(E[1]-E[0])*N),V}),p=[];for(A=0;A0&&(l=1/Math.sqrt(l),r[0]=a[0]*l,r[1]=a[1]*l,r[2]=a[2]*l),r}},3545:function(t,e,r){t.exports=l;var a=r(8105),n=a("loy&&T[A+x]>M;--C,A-=b){for(var h=A,p=A+b,k=0;k>>1,M=2*f,C=P,A=T[M*P+x];b<_;){if(_-b=R?(C=w,A=R):k>=j?(C=p,A=k):(C=O,A=j):R>=j?(C=w,A=R):j>=k?(C=p,A=k):(C=O,A=j);for(var V=M*(_-1),H=M*C,F=0;Fthis.buffer.length){n.free(this.buffer);for(var _=this.buffer=n.mallocUint8(i(b*u*4)),P=0;PM|0},vertex:function(b,_,P,M,C,A,h,p,k,w,R,O,j){var V=(h<<0)+(p<<1)+(k<<2)+(w<<3)|0;if(!(V===0||V===15))switch(V){case 0:R.push([b-.5,_-.5]);break;case 1:R.push([b-.25-.25*(M+P-2*j)/(P-M),_-.25-.25*(C+P-2*j)/(P-C)]);break;case 2:R.push([b-.75-.25*(-M-P+2*j)/(M-P),_-.25-.25*(A+M-2*j)/(M-A)]);break;case 3:R.push([b-.5,_-.5-.5*(C+P+A+M-4*j)/(P-C+M-A)]);break;case 4:R.push([b-.25-.25*(A+C-2*j)/(C-A),_-.75-.25*(-C-P+2*j)/(C-P)]);break;case 5:R.push([b-.5-.5*(M+P+A+C-4*j)/(P-M+C-A),_-.5]);break;case 6:R.push([b-.5-.25*(-M-P+A+C)/(M-P+C-A),_-.5-.25*(-C-P+A+M)/(C-P+M-A)]);break;case 7:R.push([b-.75-.25*(A+C-2*j)/(C-A),_-.75-.25*(A+M-2*j)/(M-A)]);break;case 8:R.push([b-.75-.25*(-A-C+2*j)/(A-C),_-.75-.25*(-A-M+2*j)/(A-M)]);break;case 9:R.push([b-.5-.25*(M+P+-A-C)/(P-M+A-C),_-.5-.25*(C+P+-A-M)/(P-C+A-M)]);break;case 10:R.push([b-.5-.5*(-M-P+-A-C+4*j)/(M-P+A-C),_-.5]);break;case 11:R.push([b-.25-.25*(-A-C+2*j)/(A-C),_-.75-.25*(C+P-2*j)/(P-C)]);break;case 12:R.push([b-.5,_-.5-.5*(-C-P+-A-M+4*j)/(C-P+A-M)]);break;case 13:R.push([b-.75-.25*(M+P-2*j)/(P-M),_-.25-.25*(-A-M+2*j)/(A-M)]);break;case 14:R.push([b-.25-.25*(-M-P+2*j)/(M-P),_-.25-.25*(-C-P+2*j)/(C-P)]);break;case 15:R.push([b-.5,_-.5]);break}},cell:function(b,_,P,M,C,A,h,p,k){C?p.push([b,_]):p.push([_,b])}});return function(b,_){var P=[],M=[];return u(b,P,M,_),{positions:P,cells:M}}}};function i(y,v){var T=y.length+"d",u=o[T];if(u)return u(a,y,v)}function l(y,v){for(var T=n(y,v),u=T.length,b=new Array(u),_=new Array(u),P=0;P>1,T=-7,u=n?i-1:0,b=n?-1:1,_=r[a+u];for(u+=b,l=_&(1<<-T)-1,_>>=-T,T+=x;T>0;l=l*256+r[a+u],u+=b,T-=8);for(f=l&(1<<-T)-1,l>>=-T,T+=o;T>0;f=f*256+r[a+u],u+=b,T-=8);if(l===0)l=1-v;else{if(l===y)return f?NaN:(_?-1:1)*(1/0);f=f+Math.pow(2,o),l=l-v}return(_?-1:1)*f*Math.pow(2,l-o)},e.write=function(r,a,n,o,i,l){var f,x,y,v=l*8-i-1,T=(1<>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=o?0:l-1,P=o?1:-1,M=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(x=isNaN(a)?1:0,f=T):(f=Math.floor(Math.log(a)/Math.LN2),a*(y=Math.pow(2,-f))<1&&(f--,y*=2),f+u>=1?a+=b/y:a+=b*Math.pow(2,1-u),a*y>=2&&(f++,y/=2),f+u>=T?(x=0,f=T):f+u>=1?(x=(a*y-1)*Math.pow(2,i),f=f+u):(x=a*Math.pow(2,u-1)*Math.pow(2,i),f=0));i>=8;r[n+_]=x&255,_+=P,x/=256,i-=8);for(f=f<0;r[n+_]=f&255,_+=P,f/=256,v-=8);r[n+_-P]|=M*128}},3788:function(t,e,r){var a=r(8507),n=r(2419);t.exports=o;function o(i,l){return a(i,l)||n(i)-n(l)}},3837:function(t,e,r){t.exports=O;var a=r(4935),n=r(501),o=r(5304),i=r(6429),l=r(6444),f=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),x=ArrayBuffer,y=DataView;function v(j){return x.isView(j)&&!(j instanceof y)}function T(j){return Array.isArray(j)||v(j)}function u(j,V){return j[0]=V[0],j[1]=V[1],j[2]=V[2],j}function b(j){this.gl=j,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=o(j)}var _=b.prototype;_.update=function(j){j=j||{};function V(at,vt,it){if(it in j){var Y=j[it],ft=this[it],ut;(at?T(Y)&&T(Y[0]):T(Y))?this[it]=ut=[vt(Y[0]),vt(Y[1]),vt(Y[2])]:this[it]=ut=[vt(Y),vt(Y),vt(Y)];for(var kt=0;kt<3;++kt)if(ut[kt]!==ft[kt])return!0}return!1}var H=V.bind(this,!1,Number),F=V.bind(this,!1,Boolean),U=V.bind(this,!1,String),W=V.bind(this,!0,function(at){if(T(at)){if(at.length===3)return[+at[0],+at[1],+at[2],1];if(at.length===4)return[+at[0],+at[1],+at[2],+at[3]]}return[0,0,0,1]}),q,J=!1,lt=!1;if("bounds"in j)for(var yt=j.bounds,mt=0;mt<2;++mt)for(var st=0;st<3;++st)yt[mt][st]!==this.bounds[mt][st]&&(lt=!0),this.bounds[mt][st]=yt[mt][st];if("ticks"in j){q=j.ticks,J=!0,this.autoTicks=!1;for(var mt=0;mt<3;++mt)this.tickSpacing[mt]=0}else H("tickSpacing")&&(this.autoTicks=!0,lt=!0);if(this._firstInit&&("ticks"in j||"tickSpacing"in j||(this.autoTicks=!0),lt=!0,J=!0,this._firstInit=!1),lt&&this.autoTicks&&(q=l.create(this.bounds,this.tickSpacing),J=!0),J){for(var mt=0;mt<3;++mt)q[mt].sort(function(vt,it){return vt.x-it.x});l.equal(q,this.ticks)?J=!1:this.ticks=q}F("tickEnable"),U("tickFont")&&(J=!0),U("tickFontStyle")&&(J=!0),U("tickFontWeight")&&(J=!0),U("tickFontVariant")&&(J=!0),H("tickSize"),H("tickAngle"),H("tickPad"),W("tickColor");var tt=U("labels");U("labelFont")&&(tt=!0),U("labelFontStyle")&&(tt=!0),U("labelFontWeight")&&(tt=!0),U("labelFontVariant")&&(tt=!0),F("labelEnable"),H("labelSize"),H("labelPad"),W("labelColor"),F("lineEnable"),F("lineMirror"),H("lineWidth"),W("lineColor"),F("lineTickEnable"),F("lineTickMirror"),H("lineTickLength"),H("lineTickWidth"),W("lineTickColor"),F("gridEnable"),H("gridWidth"),W("gridColor"),F("zeroEnable"),W("zeroLineColor"),H("zeroLineWidth"),F("backgroundEnable"),W("backgroundColor");var dt=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],rt=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(tt||J)&&this._text.update(this.bounds,this.labels,dt,this.ticks,rt):this._text=a(this.gl,this.bounds,this.labels,dt,this.ticks,rt),this._lines&&J&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=n(this.gl,this.bounds,this.ticks))};function P(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new P,new P,new P];function C(j,V,H,F,U){for(var W=j.primalOffset,q=j.primalMinor,J=j.mirrorOffset,lt=j.mirrorMinor,yt=F[V],mt=0;mt<3;++mt)if(V!==mt){var st=W,tt=J,dt=q,rt=lt;yt&1<0?(dt[mt]=-1,rt[mt]=0):(dt[mt]=0,rt[mt]=1)}}var A=[0,0,0],h={model:f,view:f,projection:f,_ortho:!1};_.isOpaque=function(){return!0},_.isTransparent=function(){return!1},_.drawTransparent=function(j){};var p=0,k=[0,0,0],w=[0,0,0],R=[0,0,0];_.draw=function(j){j=j||h;for(var V=this.gl,H=j.model||f,F=j.view||f,U=j.projection||f,W=this.bounds,q=j._ortho||!1,J=i(H,F,U,W,q),lt=J.cubeEdges,yt=J.axis,mt=F[12],st=F[13],tt=F[14],dt=F[15],rt=q?2:1,at=rt*this.pixelRatio*(U[3]*mt+U[7]*st+U[11]*tt+U[15]*dt)/V.drawingBufferHeight,vt=0;vt<3;++vt)this.lastCubeProps.cubeEdges[vt]=lt[vt],this.lastCubeProps.axis[vt]=yt[vt];for(var it=M,vt=0;vt<3;++vt)C(M[vt],vt,this.bounds,lt,yt);for(var V=this.gl,Y=A,vt=0;vt<3;++vt)this.backgroundEnable[vt]?Y[vt]=yt[vt]:Y[vt]=0;this._background.draw(H,F,U,W,Y,this.backgroundColor),this._lines.bind(H,F,U,this);for(var vt=0;vt<3;++vt){var ft=[0,0,0];yt[vt]>0?ft[vt]=W[1][vt]:ft[vt]=W[0][vt];for(var ut=0;ut<2;++ut){var kt=(vt+1+ut)%3,It=(vt+1+(ut^1))%3;this.gridEnable[kt]&&this._lines.drawGrid(kt,It,this.bounds,ft,this.gridColor[kt],this.gridWidth[kt]*this.pixelRatio)}for(var ut=0;ut<2;++ut){var kt=(vt+1+ut)%3,It=(vt+1+(ut^1))%3;this.zeroEnable[It]&&Math.min(W[0][It],W[1][It])<=0&&Math.max(W[0][It],W[1][It])>=0&&this._lines.drawZero(kt,It,this.bounds,ft,this.zeroLineColor[It],this.zeroLineWidth[It]*this.pixelRatio)}}for(var vt=0;vt<3;++vt){this.lineEnable[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].primalOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio),this.lineMirror[vt]&&this._lines.drawAxisLine(vt,this.bounds,it[vt].mirrorOffset,this.lineColor[vt],this.lineWidth[vt]*this.pixelRatio);for(var Pt=u(k,it[vt].primalMinor),qt=u(w,it[vt].mirrorMinor),Wt=this.lineTickLength,ut=0;ut<3;++ut){var Jt=at/H[5*ut];Pt[ut]*=Wt[ut]*Jt,qt[ut]*=Wt[ut]*Jt}this.lineTickEnable[vt]&&this._lines.drawAxisTicks(vt,it[vt].primalOffset,Pt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio),this.lineTickMirror[vt]&&this._lines.drawAxisTicks(vt,it[vt].mirrorOffset,qt,this.lineTickColor[vt],this.lineTickWidth[vt]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,F,U,this.pixelRatio);var ge,fe=.5,pe,se;function Tt(Te){se=[0,0,0],se[Te]=1}function Lt(Te,He,Ge){var cr=(Te+1)%3,ur=(Te+2)%3,jr=He[cr],Wr=He[ur],br=Ge[cr],Xr=Ge[ur];if(jr>0&&Xr>0){Tt(cr);return}else if(jr>0&&Xr<0){Tt(cr);return}else if(jr<0&&Xr>0){Tt(cr);return}else if(jr<0&&Xr<0){Tt(cr);return}else if(Wr>0&&br>0){Tt(ur);return}else if(Wr>0&&br<0){Tt(ur);return}else if(Wr<0&&br>0){Tt(ur);return}else if(Wr<0&&br<0){Tt(ur);return}}for(var vt=0;vt<3;++vt){for(var Mt=it[vt].primalMinor,ee=it[vt].mirrorMinor,ve=u(R,it[vt].primalOffset),ut=0;ut<3;++ut)this.lineTickEnable[vt]&&(ve[ut]+=at*Mt[ut]*Math.max(this.lineTickLength[ut],0)/H[5*ut]);var oe=[0,0,0];if(oe[vt]=1,this.tickEnable[vt]){this.tickAngle[vt]===-3600?(this.tickAngle[vt]=0,this.tickAlign[vt]="auto"):this.tickAlign[vt]=-1,pe=1,ge=[this.tickAlign[vt],fe,pe],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]),se=[0,0,0],Lt(vt,Mt,ee);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.tickPad[ut]/H[5*ut];this._text.drawTicks(vt,this.tickSize[vt],this.tickAngle[vt],ve,this.tickColor[vt],oe,se,ge)}if(this.labelEnable[vt]){pe=0,se=[0,0,0],this.labels[vt].length>4&&(Tt(vt),pe=1),ge=[this.labelAlign[vt],fe,pe],ge[0]==="auto"?ge[0]=p:ge[0]=parseInt(""+ge[0]);for(var ut=0;ut<3;++ut)ve[ut]+=at*Mt[ut]*this.labelPad[ut]/H[5*ut];ve[vt]+=.5*(W[0][vt]+W[1][vt]),this._text.drawLabel(vt,this.labelSize[vt],this.labelAngle[vt],ve,this.labelColor[vt],[0,0,0],se,ge)}}this._text.unbind()},_.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function O(j,V){var H=new b(j);return H.update(V),H}},3840:function(t){t.exports=M;var e=0,r=1;function a(C,A,h,p,k,w){this._color=C,this.key=A,this.value=h,this.left=p,this.right=k,this._count=w}function n(C){return new a(C._color,C.key,C.value,C.left,C.right,C._count)}function o(C,A){return new a(C,A.key,A.value,A.left,A.right,A._count)}function i(C){C._count=1+(C.left?C.left._count:0)+(C.right?C.right._count:0)}function l(C,A){this._compare=C,this.root=A}var f=l.prototype;Object.defineProperty(f,"keys",{get:function(){var C=[];return this.forEach(function(A,h){C.push(A)}),C}}),Object.defineProperty(f,"values",{get:function(){var C=[];return this.forEach(function(A,h){C.push(h)}),C}}),Object.defineProperty(f,"length",{get:function(){return this.root?this.root._count:0}}),f.insert=function(C,A){for(var h=this._compare,p=this.root,k=[],w=[];p;){var R=h(C,p.key);k.push(p),w.push(R),R<=0?p=p.left:p=p.right}k.push(new a(e,C,A,null,null,1));for(var O=k.length-2;O>=0;--O){var p=k[O];w[O]<=0?k[O]=new a(p._color,p.key,p.value,k[O+1],p.right,p._count+1):k[O]=new a(p._color,p.key,p.value,p.left,k[O+1],p._count+1)}for(var O=k.length-1;O>1;--O){var j=k[O-1],p=k[O];if(j._color===r||p._color===r)break;var V=k[O-2];if(V.left===j)if(j.left===p){var H=V.right;if(H&&H._color===e)j._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.left=j.right,j._color=r,j.right=V,k[O-2]=j,k[O-1]=p,i(V),i(j),O>=3){var F=k[O-3];F.left===V?F.left=j:F.right=j}break}}else{var H=V.right;if(H&&H._color===e)j._color=r,V.right=o(r,H),V._color=e,O-=1;else{if(j.right=p.left,V._color=e,V.left=p.right,p._color=r,p.left=j,p.right=V,k[O-2]=p,k[O-1]=j,i(V),i(j),i(p),O>=3){var F=k[O-3];F.left===V?F.left=p:F.right=p}break}}else if(j.right===p){var H=V.left;if(H&&H._color===e)j._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(V._color=e,V.right=j.left,j._color=r,j.left=V,k[O-2]=j,k[O-1]=p,i(V),i(j),O>=3){var F=k[O-3];F.right===V?F.right=j:F.left=j}break}}else{var H=V.left;if(H&&H._color===e)j._color=r,V.left=o(r,H),V._color=e,O-=1;else{if(j.left=p.right,V._color=e,V.right=p.left,p._color=r,p.right=j,p.left=V,k[O-2]=p,k[O-1]=j,i(V),i(j),i(p),O>=3){var F=k[O-3];F.right===V?F.right=p:F.left=p}break}}}return k[0]._color=r,new l(h,k[0])};function x(C,A){if(A.left){var h=x(C,A.left);if(h)return h}var h=C(A.key,A.value);if(h)return h;if(A.right)return x(C,A.right)}function y(C,A,h,p){var k=A(C,p.key);if(k<=0){if(p.left){var w=y(C,A,h,p.left);if(w)return w}var w=h(p.key,p.value);if(w)return w}if(p.right)return y(C,A,h,p.right)}function v(C,A,h,p,k){var w=h(C,k.key),R=h(A,k.key),O;if(w<=0&&(k.left&&(O=v(C,A,h,p,k.left),O)||R>0&&(O=p(k.key,k.value),O)))return O;if(R>0&&k.right)return v(C,A,h,p,k.right)}f.forEach=function(C,A,h){if(this.root)switch(arguments.length){case 1:return x(C,this.root);case 2:return y(A,this._compare,C,this.root);case 3:return this._compare(A,h)>=0?void 0:v(A,h,this._compare,C,this.root)}},Object.defineProperty(f,"begin",{get:function(){for(var C=[],A=this.root;A;)C.push(A),A=A.left;return new T(this,C)}}),Object.defineProperty(f,"end",{get:function(){for(var C=[],A=this.root;A;)C.push(A),A=A.right;return new T(this,C)}}),f.at=function(C){if(C<0)return new T(this,[]);for(var A=this.root,h=[];;){if(h.push(A),A.left){if(C=A.right._count)break;A=A.right}else break}return new T(this,[])},f.ge=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w<=0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.gt=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w<0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.lt=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w>0&&(k=p.length),w<=0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.le=function(C){for(var A=this._compare,h=this.root,p=[],k=0;h;){var w=A(C,h.key);p.push(h),w>=0&&(k=p.length),w<0?h=h.left:h=h.right}return p.length=k,new T(this,p)},f.find=function(C){for(var A=this._compare,h=this.root,p=[];h;){var k=A(C,h.key);if(p.push(h),k===0)return new T(this,p);k<=0?h=h.left:h=h.right}return new T(this,[])},f.remove=function(C){var A=this.find(C);return A?A.remove():this},f.get=function(C){for(var A=this._compare,h=this.root;h;){var p=A(C,h.key);if(p===0)return h.value;p<=0?h=h.left:h=h.right}};function T(C,A){this.tree=C,this._stack=A}var u=T.prototype;Object.defineProperty(u,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(u,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),u.clone=function(){return new T(this.tree,this._stack.slice())};function b(C,A){C.key=A.key,C.value=A.value,C.left=A.left,C.right=A.right,C._color=A._color,C._count=A._count}function _(C){for(var A,h,p,k,w=C.length-1;w>=0;--w){if(A=C[w],w===0){A._color=r;return}if(h=C[w-1],h.left===A){if(p=h.right,p.right&&p.right._color===e){if(p=h.right=n(p),k=p.right=n(p.right),h.right=p.left,p.left=h,p.right=k,p._color=h._color,A._color=r,h._color=r,k._color=r,i(h),i(p),w>1){var R=C[w-2];R.left===h?R.left=p:R.right=p}C[w-1]=p;return}else if(p.left&&p.left._color===e){if(p=h.right=n(p),k=p.left=n(p.left),h.right=k.left,p.left=k.right,k.left=h,k.right=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var R=C[w-2];R.left===h?R.left=k:R.right=k}C[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.right=o(e,p);return}else{h.right=o(e,p);continue}else{if(p=n(p),h.right=p.left,p.left=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var R=C[w-2];R.left===h?R.left=p:R.right=p}C[w-1]=p,C[w]=h,w+11){var R=C[w-2];R.right===h?R.right=p:R.left=p}C[w-1]=p;return}else if(p.right&&p.right._color===e){if(p=h.left=n(p),k=p.right=n(p.right),h.left=k.right,p.right=k.left,k.right=h,k.left=p,k._color=h._color,h._color=r,p._color=r,A._color=r,i(h),i(p),i(k),w>1){var R=C[w-2];R.right===h?R.right=k:R.left=k}C[w-1]=k;return}if(p._color===r)if(h._color===e){h._color=r,h.left=o(e,p);return}else{h.left=o(e,p);continue}else{if(p=n(p),h.left=p.right,p.right=h,p._color=h._color,h._color=e,i(h),i(p),w>1){var R=C[w-2];R.right===h?R.right=p:R.left=p}C[w-1]=p,C[w]=h,w+1=0;--p){var h=C[p];h.left===C[p+1]?A[p]=new a(h._color,h.key,h.value,A[p+1],h.right,h._count):A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count)}if(h=A[A.length-1],h.left&&h.right){var k=A.length;for(h=h.left;h.right;)A.push(h),h=h.right;var w=A[k-1];A.push(new a(h._color,w.key,w.value,h.left,h.right,h._count)),A[k-1].key=h.key,A[k-1].value=h.value;for(var p=A.length-2;p>=k;--p)h=A[p],A[p]=new a(h._color,h.key,h.value,h.left,A[p+1],h._count);A[k-1].left=A[k]}if(h=A[A.length-1],h._color===e){var R=A[A.length-2];R.left===h?R.left=null:R.right===h&&(R.right=null),A.pop();for(var p=0;p0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(u,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(u,"index",{get:function(){var C=0,A=this._stack;if(A.length===0){var h=this.tree.root;return h?h._count:0}else A[A.length-1].left&&(C=A[A.length-1].left._count);for(var p=A.length-2;p>=0;--p)A[p+1]===A[p].right&&(++C,A[p].left&&(C+=A[p].left._count));return C},enumerable:!0}),u.next=function(){var C=this._stack;if(C.length!==0){var A=C[C.length-1];if(A.right)for(A=A.right;A;)C.push(A),A=A.left;else for(C.pop();C.length>0&&C[C.length-1].right===A;)A=C[C.length-1],C.pop()}},Object.defineProperty(u,"hasNext",{get:function(){var C=this._stack;if(C.length===0)return!1;if(C[C.length-1].right)return!0;for(var A=C.length-1;A>0;--A)if(C[A-1].left===C[A])return!0;return!1}}),u.update=function(C){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var h=new Array(A.length),p=A[A.length-1];h[h.length-1]=new a(p._color,p.key,C,p.left,p.right,p._count);for(var k=A.length-2;k>=0;--k)p=A[k],p.left===A[k+1]?h[k]=new a(p._color,p.key,p.value,h[k+1],p.right,p._count):h[k]=new a(p._color,p.key,p.value,p.left,h[k+1],p._count);return new l(this.tree._compare,h[0])},u.prev=function(){var C=this._stack;if(C.length!==0){var A=C[C.length-1];if(A.left)for(A=A.left;A;)C.push(A),A=A.right;else for(C.pop();C.length>0&&C[C.length-1].left===A;)A=C[C.length-1],C.pop()}},Object.defineProperty(u,"hasPrev",{get:function(){var C=this._stack;if(C.length===0)return!1;if(C[C.length-1].left)return!0;for(var A=C.length-1;A>0;--A)if(C[A-1].right===C[A])return!0;return!1}});function P(C,A){return CA?1:0}function M(C){return new l(C||P,null)}},3865:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]).add(i[0].mul(o[1])),o[1].mul(i[1]))}},3952:function(t,e,r){t.exports=o;var a=r(3250);function n(i,l){for(var f=new Array(l+1),x=0;x20?52:f+32}},4040:function(t){t.exports=e;function e(r,a,n,o,i,l,f){var x=1/(a-n),y=1/(o-i),v=1/(l-f);return r[0]=-2*x,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*y,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*v,r[11]=0,r[12]=(a+n)*x,r[13]=(i+o)*y,r[14]=(f+l)*v,r[15]=1,r}},4041:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],l=a[2],f=n[0],x=n[1],y=n[2],v=n[3],T=v*o+x*l-y*i,u=v*i+y*o-f*l,b=v*l+f*i-x*o,_=-f*o-x*i-y*l;return r[0]=T*v+_*-f+u*-y-b*-x,r[1]=u*v+_*-x+b*-f-T*-y,r[2]=b*v+_*-y+T*-x-u*-f,r[3]=a[3],r}},4081:function(t){t.exports=e;function e(r,a,n,o,i,l,f,x,y,v){var T=a+l+v;if(u>0){var u=Math.sqrt(T+1);r[0]=.5*(f-y)/u,r[1]=.5*(x-o)/u,r[2]=.5*(n-l)/u,r[3]=.5*u}else{var b=Math.max(a,l,v),u=Math.sqrt(2*b-T+1);a>=b?(r[0]=.5*u,r[1]=.5*(i+n)/u,r[2]=.5*(x+o)/u,r[3]=.5*(f-y)/u):l>=b?(r[0]=.5*(n+i)/u,r[1]=.5*u,r[2]=.5*(y+f)/u,r[3]=.5*(x-o)/u):(r[0]=.5*(o+x)/u,r[1]=.5*(f+y)/u,r[2]=.5*u,r[3]=.5*(n-i)/u)}return r}},4100:function(t,e,r){var a=r(4437),n=r(3837),o=r(5445),i=r(4449),l=r(3589),f=r(2260),x=r(7169),y=r(351),v=r(4772),T=r(4040),u=r(799),b=r(9216)({tablet:!0,featureDetect:!0});t.exports={createScene:A,createCamera:a};function _(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function P(p,k){var w=null;try{w=p.getContext("webgl",k),w||(w=p.getContext("experimental-webgl",k))}catch{return null}return w}function M(p){var k=Math.round(Math.log(Math.abs(p))/Math.log(10));if(k<0){var w=Math.round(Math.pow(10,-k));return Math.ceil(p*w)/w}else if(k>0){var w=Math.round(Math.pow(10,k));return Math.ceil(p/w)*w}return Math.ceil(p)}function C(p){return typeof p=="boolean"?p:!0}function A(p){p=p||{},p.camera=p.camera||{};var k=p.canvas;if(!k)if(k=document.createElement("canvas"),p.container){var w=p.container;w.appendChild(k)}else document.body.appendChild(k);var R=p.gl;if(R||(p.glOptions&&(b=!!p.glOptions.preserveDrawingBuffer),R=P(k,p.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:b})),!R)throw new Error("webgl not supported");var O=p.bounds||[[-10,-10,-10],[10,10,10]],j=new _,V=f(R,R.drawingBufferWidth,R.drawingBufferHeight,{preferFloat:!b}),H=u(R),F=p.cameraObject&&p.cameraObject._ortho===!0||p.camera.projection&&p.camera.projection.type==="orthographic"||!1,U={eye:p.camera.eye||[2,0,0],center:p.camera.center||[0,0,0],up:p.camera.up||[0,1,0],zoomMin:p.camera.zoomMax||.1,zoomMax:p.camera.zoomMin||100,mode:p.camera.mode||"turntable",_ortho:F},W=p.axes||{},q=n(R,W);q.enable=!W.disable;var J=p.spikes||{},lt=i(R,J),yt=[],mt=[],st=[],tt=[],dt=!0,it=!0,rt=new Array(16),at=new Array(16),vt={view:null,projection:rt,model:at,_ortho:!1},it=!0,Y=[R.drawingBufferWidth,R.drawingBufferHeight],ft=p.cameraObject||a(k,U),ut={gl:R,contextLost:!1,pixelRatio:p.pixelRatio||1,canvas:k,selection:j,camera:ft,axes:q,axesPixels:null,spikes:lt,bounds:O,objects:yt,shape:Y,aspect:p.aspectRatio||[1,1,1],pickRadius:p.pickRadius||10,zNear:p.zNear||.01,zFar:p.zFar||1e3,fovy:p.fovy||Math.PI/4,clearColor:p.clearColor||[0,0,0,0],autoResize:C(p.autoResize),autoBounds:C(p.autoBounds),autoScale:!!p.autoScale,autoCenter:C(p.autoCenter),clipToBounds:C(p.clipToBounds),snapToData:!!p.snapToData,onselect:p.onselect||null,onrender:p.onrender||null,onclick:p.onclick||null,cameraParams:vt,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(se){this.aspect[0]=se.x,this.aspect[1]=se.y,this.aspect[2]=se.z,it=!0},setBounds:function(se,Tt){this.bounds[0][se]=Tt.min,this.bounds[1][se]=Tt.max},setClearColor:function(se){this.clearColor=se},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},kt=[R.drawingBufferWidth/ut.pixelRatio|0,R.drawingBufferHeight/ut.pixelRatio|0];function It(){if(!ut._stopped&&ut.autoResize){var se=k.parentNode,Tt=1,Lt=1;se&&se!==document.body?(Tt=se.clientWidth,Lt=se.clientHeight):(Tt=window.innerWidth,Lt=window.innerHeight);var Mt=Math.ceil(Tt*ut.pixelRatio)|0,ee=Math.ceil(Lt*ut.pixelRatio)|0;if(Mt!==k.width||ee!==k.height){k.width=Mt,k.height=ee;var ve=k.style;ve.position=ve.position||"absolute",ve.left="0px",ve.top="0px",ve.width=Tt+"px",ve.height=Lt+"px",dt=!0}}}ut.autoResize&&It(),window.addEventListener("resize",It);function Pt(){for(var se=yt.length,Tt=tt.length,Lt=0;Lt0&&st[Tt-1]===0;)st.pop(),tt.pop().dispose()}ut.update=function(se){ut._stopped||(dt=!0,it=!0)},ut.add=function(se){ut._stopped||(se.axes=q,yt.push(se),mt.push(-1),dt=!0,it=!0,Pt())},ut.remove=function(se){if(!ut._stopped){var Tt=yt.indexOf(se);Tt<0||(yt.splice(Tt,1),mt.pop(),dt=!0,it=!0,Pt())}},ut.dispose=function(){if(!ut._stopped&&(ut._stopped=!0,window.removeEventListener("resize",It),k.removeEventListener("webglcontextlost",qt),ut.mouseListener.enabled=!1,!ut.contextLost)){q.dispose(),lt.dispose();for(var se=0;sej.distance)continue;for(var Ge=0;Gev;){var h=u[A-2],p=u[A-1];if(hu[T+1]:!0}function x(v,T,u,b){v*=2;var _=b[v];return _>1,C=M-b,A=M+b,h=_,p=C,k=M,w=A,R=P,O=v+1,j=T-1,V=0;f(h,p,u)&&(V=h,h=p,p=V),f(w,R,u)&&(V=w,w=R,R=V),f(h,k,u)&&(V=h,h=k,k=V),f(p,k,u)&&(V=p,p=k,k=V),f(h,w,u)&&(V=h,h=w,w=V),f(k,w,u)&&(V=k,k=w,w=V),f(p,R,u)&&(V=p,p=R,R=V),f(p,k,u)&&(V=p,p=k,k=V),f(w,R,u)&&(V=w,w=R,R=V);for(var H=u[2*p],F=u[2*p+1],U=u[2*w],W=u[2*w+1],q=2*h,J=2*k,lt=2*R,yt=2*_,mt=2*M,st=2*P,tt=0;tt<2;++tt){var dt=u[q+tt],rt=u[J+tt],at=u[lt+tt];u[yt+tt]=dt,u[mt+tt]=rt,u[st+tt]=at}o(C,v,u),o(A,T,u);for(var vt=O;vt<=j;++vt)if(x(vt,H,F,u))vt!==O&&n(vt,O,u),++O;else if(!x(vt,U,W,u))for(;;)if(x(j,U,W,u)){x(j,H,F,u)?(i(vt,O,j,u),++O,--j):(n(vt,j,u),--j);break}else{if(--j0)if(_[0]!==M[1][0])P=b,b=b.right;else{var p=y(b.right,_);if(p)return p;b=b.left}else{if(_[0]!==M[1][0])return b;var p=y(b.right,_);if(p)return p;b=b.left}}return P}f.castUp=function(b){var _=a.le(this.coordinates,b[0]);if(_<0)return-1;this.slabs[_];var P=y(this.slabs[_],b),M=-1;if(P&&(M=P.value),this.coordinates[_]===b[0]){var C=null;if(P&&(C=P.key),_>0){var A=y(this.slabs[_-1],b);A&&(C?i(A.key,C)>0&&(C=A.key,M=A.value):(M=A.value,C=A.key))}var h=this.horizontal[_];if(h.length>0){var p=a.ge(h,b[1],x);if(p=h.length)return M;k=h[p]}}if(k.start)if(C){var w=o(C[0],C[1],[b[0],k.y]);C[0][0]>C[1][0]&&(w=-w),w>0&&(M=k.index)}else M=k.index;else k.y!==b[1]&&(M=k.index)}}}return M};function v(b,_,P,M){this.y=b,this.index=_,this.start=P,this.closed=M}function T(b,_,P,M){this.x=b,this.segment=_,this.create=P,this.index=M}function u(b){for(var _=b.length,P=2*_,M=new Array(P),C=0;C<_;++C){var A=b[C],h=A[0][0]Math.abs(p))u.rotate(R,0,0,-h*k*Math.PI*C.rotateSpeed/window.innerWidth);else if(!C._ortho){var O=-C.zoomSpeed*w*p/window.innerHeight*(R-u.lastT())/20;u.pan(R,0,0,_*(Math.exp(O)-1))}}},!0)},C.enableMouseListeners(),C}},4449:function(t,e,r){var a=r(2762),n=r(8116),o=r(1493);t.exports=T;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function l(u,b,_,P){this.gl=u,this.buffer=b,this.vao=_,this.shader=P,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var f=l.prototype,x=[0,0,0],y=[0,0,0],v=[0,0];f.isTransparent=function(){return!1},f.drawTransparent=function(u){},f.draw=function(u){var b=this.gl,_=this.vao,P=this.shader;_.bind(),P.bind();var M=u.model||i,C=u.view||i,A=u.projection||i,h;this.axes&&(h=this.axes.lastCubeProps.axis);for(var p=x,k=y,w=0;w<3;++w)h&&h[w]<0?(p[w]=this.bounds[0][w],k[w]=this.bounds[1][w]):(p[w]=this.bounds[1][w],k[w]=this.bounds[0][w]);v[0]=b.drawingBufferWidth,v[1]=b.drawingBufferHeight,P.uniforms.model=M,P.uniforms.view=C,P.uniforms.projection=A,P.uniforms.coordinates=[this.position,p,k],P.uniforms.colors=this.colors,P.uniforms.screenShape=v;for(var w=0;w<3;++w)P.uniforms.lineWidth=this.lineWidth[w]*this.pixelRatio,this.enabled[w]&&(_.draw(b.TRIANGLES,6,6*w),this.drawSides[w]&&_.draw(b.TRIANGLES,12,18+12*w));_.unbind()},f.update=function(u){u&&("bounds"in u&&(this.bounds=u.bounds),"position"in u&&(this.position=u.position),"lineWidth"in u&&(this.lineWidth=u.lineWidth),"colors"in u&&(this.colors=u.colors),"enabled"in u&&(this.enabled=u.enabled),"drawSides"in u&&(this.drawSides=u.drawSides))},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function T(u,b){var _=[];function P(p,k,w,R,O,j){var V=[p,k,w,0,0,0,1];V[R+3]=1,V[R]=O,_.push.apply(_,V),V[6]=-1,_.push.apply(_,V),V[R]=j,_.push.apply(_,V),_.push.apply(_,V),V[6]=1,_.push.apply(_,V),V[R]=O,_.push.apply(_,V)}P(0,0,0,0,0,1),P(0,0,0,1,0,1),P(0,0,0,2,0,1),P(1,0,0,1,-1,1),P(1,0,0,2,-1,1),P(0,1,0,0,-1,1),P(0,1,0,2,-1,1),P(0,0,1,0,-1,1),P(0,0,1,1,-1,1);var M=a(u,_),C=n(u,[{type:u.FLOAT,buffer:M,size:3,offset:0,stride:28},{type:u.FLOAT,buffer:M,size:3,offset:12,stride:28},{type:u.FLOAT,buffer:M,size:1,offset:24,stride:28}]),A=o(u);A.attributes.position.location=0,A.attributes.color.location=1,A.attributes.weight.location=2;var h=new l(u,M,C,A);return h.update(b),h}},4494:function(t){t.exports=e;function e(r,a){return r[0]=1/a[0],r[1]=1/a[1],r[2]=1/a[2],r[3]=1/a[3],r}},4505:function(t,e,r){t.exports=r(5847)},4578:function(t){t.exports=e;function e(r,a,n,o,i){return r[0]=a,r[1]=n,r[2]=o,r[3]=i,r}},4623:function(t){"use restrict";t.exports=e;function e(r){this.roots=new Array(r),this.ranks=new Array(r);for(var a=0;a0)return 1<=0)return 1<=0;--u)f[u]=x*a[u]+y*n[u]+v*o[u]+T*i[u];return f}return x*a+y*n+v*o[u]+T*i}function r(a,n,o,i,l,f){var x=l-1,y=l*l,v=x*x,T=(1+2*l)*v,u=l*v,b=y*(3-2*l),_=y*x;if(a.length){f||(f=new Array(a.length));for(var P=a.length-1;P>=0;--P)f[P]=T*a[P]+u*n[P]+b*o[P]+_*i[P];return f}return T*a+u*n+b*o+_*i}t.exports=r,t.exports.derivative=e},4772:function(t){t.exports=e;function e(r,a,n,o,i){var l=1/Math.tan(a/2),f=1/(o-i);return r[0]=l/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=l,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+o)*f,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*o*f,r[15]=0,r}},4793:function(t,e,r){function a(gt,St){if(!(gt instanceof St))throw new TypeError("Cannot call a class as a function")}function n(gt,St){for(var Nt=0;NtA)throw new RangeError('The value "'+gt+'" is invalid for option "size"');var St=new Uint8Array(gt);return Object.setPrototypeOf(St,k.prototype),St}function k(gt,St,Nt){if(typeof gt=="number"){if(typeof St=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return j(gt)}return w(gt,St,Nt)}k.poolSize=8192;function w(gt,St,Nt){if(typeof gt=="string")return V(gt,St);if(ArrayBuffer.isView(gt))return F(gt);if(gt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt));if(nn(gt,ArrayBuffer)||gt&&nn(gt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(nn(gt,SharedArrayBuffer)||gt&&nn(gt.buffer,SharedArrayBuffer)))return U(gt,St,Nt);if(typeof gt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var re=gt.valueOf&>.valueOf();if(re!=null&&re!==gt)return k.from(re,St,Nt);var le=W(gt);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof gt[Symbol.toPrimitive]=="function")return k.from(gt[Symbol.toPrimitive]("string"),St,Nt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_(gt))}k.from=function(gt,St,Nt){return w(gt,St,Nt)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array);function R(gt){if(typeof gt!="number")throw new TypeError('"size" argument must be of type number');if(gt<0)throw new RangeError('The value "'+gt+'" is invalid for option "size"')}function O(gt,St,Nt){return R(gt),gt<=0?p(gt):St!==void 0?typeof Nt=="string"?p(gt).fill(St,Nt):p(gt).fill(St):p(gt)}k.alloc=function(gt,St,Nt){return O(gt,St,Nt)};function j(gt){return R(gt),p(gt<0?0:q(gt)|0)}k.allocUnsafe=function(gt){return j(gt)},k.allocUnsafeSlow=function(gt){return j(gt)};function V(gt,St){if((typeof St!="string"||St==="")&&(St="utf8"),!k.isEncoding(St))throw new TypeError("Unknown encoding: "+St);var Nt=J(gt,St)|0,re=p(Nt),le=re.write(gt,St);return le!==Nt&&(re=re.slice(0,le)),re}function H(gt){for(var St=gt.length<0?0:q(gt.length)|0,Nt=p(St),re=0;re=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return gt|0}k.isBuffer=function(gt){return gt!=null&>._isBuffer===!0&>!==k.prototype},k.compare=function(gt,St){if(nn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),nn(St,Uint8Array)&&(St=k.from(St,St.offset,St.byteLength)),!k.isBuffer(gt)||!k.isBuffer(St))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(gt===St)return 0;for(var Nt=gt.length,re=St.length,le=0,we=Math.min(Nt,re);lere.length?(k.isBuffer(we)||(we=k.from(we)),we.copy(re,le)):Uint8Array.prototype.set.call(re,we,le);else if(k.isBuffer(we))we.copy(re,le);else throw new TypeError('"list" argument must be an Array of Buffers');le+=we.length}return re};function J(gt,St){if(k.isBuffer(gt))return gt.length;if(ArrayBuffer.isView(gt)||nn(gt,ArrayBuffer))return gt.byteLength;if(typeof gt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_(gt));var Nt=gt.length,re=arguments.length>2&&arguments[2]===!0;if(!re&&Nt===0)return 0;for(var le=!1;;)switch(St){case"ascii":case"latin1":case"binary":return Nt;case"utf8":case"utf-8":return ur(gt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt*2;case"hex":return Nt>>>1;case"base64":return br(gt).length;default:if(le)return re?-1:ur(gt).length;St=(""+St).toLowerCase(),le=!0}}k.byteLength=J;function lt(gt,St,Nt){var re=!1;if((St===void 0||St<0)&&(St=0),St>this.length||((Nt===void 0||Nt>this.length)&&(Nt=this.length),Nt<=0)||(Nt>>>=0,St>>>=0,Nt<=St))return"";for(gt||(gt="utf8");;)switch(gt){case"hex":return Pt(this,St,Nt);case"utf8":case"utf-8":return Y(this,St,Nt);case"ascii":return kt(this,St,Nt);case"latin1":case"binary":return It(this,St,Nt);case"base64":return it(this,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,St,Nt);default:if(re)throw new TypeError("Unknown encoding: "+gt);gt=(gt+"").toLowerCase(),re=!0}}k.prototype._isBuffer=!0;function yt(gt,St,Nt){var re=gt[St];gt[St]=gt[Nt],gt[Nt]=re}k.prototype.swap16=function(){var gt=this.length;if(gt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var St=0;StSt&&(gt+=" ... "),""},C&&(k.prototype[C]=k.prototype.inspect),k.prototype.compare=function(gt,St,Nt,re,le){if(nn(gt,Uint8Array)&&(gt=k.from(gt,gt.offset,gt.byteLength)),!k.isBuffer(gt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_(gt));if(St===void 0&&(St=0),Nt===void 0&&(Nt=gt?gt.length:0),re===void 0&&(re=0),le===void 0&&(le=this.length),St<0||Nt>gt.length||re<0||le>this.length)throw new RangeError("out of range index");if(re>=le&&St>=Nt)return 0;if(re>=le)return-1;if(St>=Nt)return 1;if(St>>>=0,Nt>>>=0,re>>>=0,le>>>=0,this===gt)return 0;for(var we=le-re,Ue=Nt-St,qe=Math.min(we,Ue),or=this.slice(re,le),Sr=gt.slice(St,Nt),Ar=0;Ar2147483647?Nt=2147483647:Nt<-2147483648&&(Nt=-2147483648),Nt=+Nt,Le(Nt)&&(Nt=le?0:gt.length-1),Nt<0&&(Nt=gt.length+Nt),Nt>=gt.length){if(le)return-1;Nt=gt.length-1}else if(Nt<0)if(le)Nt=0;else return-1;if(typeof St=="string"&&(St=k.from(St,re)),k.isBuffer(St))return St.length===0?-1:st(gt,St,Nt,re,le);if(typeof St=="number")return St=St&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(gt,St,Nt):Uint8Array.prototype.lastIndexOf.call(gt,St,Nt):st(gt,[St],Nt,re,le);throw new TypeError("val must be string, number or Buffer")}function st(gt,St,Nt,re,le){var we=1,Ue=gt.length,qe=St.length;if(re!==void 0&&(re=String(re).toLowerCase(),re==="ucs2"||re==="ucs-2"||re==="utf16le"||re==="utf-16le")){if(gt.length<2||St.length<2)return-1;we=2,Ue/=2,qe/=2,Nt/=2}function or(Hn,Wn){return we===1?Hn[Wn]:Hn.readUInt16BE(Wn*we)}var Sr;if(le){var Ar=-1;for(Sr=Nt;SrUe&&(Nt=Ue-qe),Sr=Nt;Sr>=0;Sr--){for(var mr=!0,Qr=0;Qrle&&(re=le)):re=le;var we=St.length;re>we/2&&(re=we/2);var Ue;for(Ue=0;Ue>>0,isFinite(Nt)?(Nt=Nt>>>0,re===void 0&&(re="utf8")):(re=Nt,Nt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var le=this.length-St;if((Nt===void 0||Nt>le)&&(Nt=le),gt.length>0&&(Nt<0||St<0)||St>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var we=!1;;)switch(re){case"hex":return tt(this,gt,St,Nt);case"utf8":case"utf-8":return dt(this,gt,St,Nt);case"ascii":case"latin1":case"binary":return rt(this,gt,St,Nt);case"base64":return at(this,gt,St,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,gt,St,Nt);default:if(we)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),we=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(gt,St,Nt){return St===0&&Nt===gt.length?P.fromByteArray(gt):P.fromByteArray(gt.slice(St,Nt))}function Y(gt,St,Nt){Nt=Math.min(gt.length,Nt);for(var re=[],le=St;le239?4:we>223?3:we>191?2:1;if(le+qe<=Nt){var or=void 0,Sr=void 0,Ar=void 0,mr=void 0;switch(qe){case 1:we<128&&(Ue=we);break;case 2:or=gt[le+1],(or&192)===128&&(mr=(we&31)<<6|or&63,mr>127&&(Ue=mr));break;case 3:or=gt[le+1],Sr=gt[le+2],(or&192)===128&&(Sr&192)===128&&(mr=(we&15)<<12|(or&63)<<6|Sr&63,mr>2047&&(mr<55296||mr>57343)&&(Ue=mr));break;case 4:or=gt[le+1],Sr=gt[le+2],Ar=gt[le+3],(or&192)===128&&(Sr&192)===128&&(Ar&192)===128&&(mr=(we&15)<<18|(or&63)<<12|(Sr&63)<<6|Ar&63,mr>65535&&mr<1114112&&(Ue=mr))}}Ue===null?(Ue=65533,qe=1):Ue>65535&&(Ue-=65536,re.push(Ue>>>10&1023|55296),Ue=56320|Ue&1023),re.push(Ue),le+=qe}return ut(re)}var ft=4096;function ut(gt){var St=gt.length;if(St<=ft)return String.fromCharCode.apply(String,gt);for(var Nt="",re=0;rere)&&(Nt=re);for(var le="",we=St;weNt&&(gt=Nt),St<0?(St+=Nt,St<0&&(St=0)):St>Nt&&(St=Nt),StNt)throw new RangeError("Trying to access beyond buffer length")}k.prototype.readUintLE=k.prototype.readUIntLE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=this[gt],le=1,we=0;++we>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=this[gt+--St],le=1;St>0&&(le*=256);)re+=this[gt+--St]*le;return re},k.prototype.readUint8=k.prototype.readUInt8=function(gt,St){return gt=gt>>>0,St||Wt(gt,1,this.length),this[gt]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(gt,St){return gt=gt>>>0,St||Wt(gt,2,this.length),this[gt]|this[gt+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(gt,St){return gt=gt>>>0,St||Wt(gt,2,this.length),this[gt]<<8|this[gt+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),(this[gt]|this[gt+1]<<8|this[gt+2]<<16)+this[gt+3]*16777216},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),this[gt]*16777216+(this[gt+1]<<16|this[gt+2]<<8|this[gt+3])},k.prototype.readBigUInt64LE=ne(function(gt){gt=gt>>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=St+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,24),le=this[++gt]+this[++gt]*Math.pow(2,8)+this[++gt]*Math.pow(2,16)+Nt*Math.pow(2,24);return BigInt(re)+(BigInt(le)<>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=St*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt],le=this[++gt]*Math.pow(2,24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+Nt;return(BigInt(re)<>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=this[gt],le=1,we=0;++we=le&&(re-=Math.pow(2,8*St)),re},k.prototype.readIntBE=function(gt,St,Nt){gt=gt>>>0,St=St>>>0,Nt||Wt(gt,St,this.length);for(var re=St,le=1,we=this[gt+--re];re>0&&(le*=256);)we+=this[gt+--re]*le;return le*=128,we>=le&&(we-=Math.pow(2,8*St)),we},k.prototype.readInt8=function(gt,St){return gt=gt>>>0,St||Wt(gt,1,this.length),this[gt]&128?(255-this[gt]+1)*-1:this[gt]},k.prototype.readInt16LE=function(gt,St){gt=gt>>>0,St||Wt(gt,2,this.length);var Nt=this[gt]|this[gt+1]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt16BE=function(gt,St){gt=gt>>>0,St||Wt(gt,2,this.length);var Nt=this[gt+1]|this[gt]<<8;return Nt&32768?Nt|4294901760:Nt},k.prototype.readInt32LE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),this[gt]|this[gt+1]<<8|this[gt+2]<<16|this[gt+3]<<24},k.prototype.readInt32BE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),this[gt]<<24|this[gt+1]<<16|this[gt+2]<<8|this[gt+3]},k.prototype.readBigInt64LE=ne(function(gt){gt=gt>>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=this[gt+4]+this[gt+5]*Math.pow(2,8)+this[gt+6]*Math.pow(2,16)+(Nt<<24);return(BigInt(re)<>>0,Te(gt,"offset");var St=this[gt],Nt=this[gt+7];(St===void 0||Nt===void 0)&&He(gt,this.length-8);var re=(St<<24)+this[++gt]*Math.pow(2,16)+this[++gt]*Math.pow(2,8)+this[++gt];return(BigInt(re)<>>0,St||Wt(gt,4,this.length),M.read(this,gt,!0,23,4)},k.prototype.readFloatBE=function(gt,St){return gt=gt>>>0,St||Wt(gt,4,this.length),M.read(this,gt,!1,23,4)},k.prototype.readDoubleLE=function(gt,St){return gt=gt>>>0,St||Wt(gt,8,this.length),M.read(this,gt,!0,52,8)},k.prototype.readDoubleBE=function(gt,St){return gt=gt>>>0,St||Wt(gt,8,this.length),M.read(this,gt,!1,52,8)};function Jt(gt,St,Nt,re,le,we){if(!k.isBuffer(gt))throw new TypeError('"buffer" argument must be a Buffer instance');if(St>le||Stgt.length)throw new RangeError("Index out of range")}k.prototype.writeUintLE=k.prototype.writeUIntLE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,Nt=Nt>>>0,!re){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var we=1,Ue=0;for(this[St]=gt&255;++Ue>>0,Nt=Nt>>>0,!re){var le=Math.pow(2,8*Nt)-1;Jt(this,gt,St,Nt,le,0)}var we=Nt-1,Ue=1;for(this[St+we]=gt&255;--we>=0&&(Ue*=256);)this[St+we]=gt/Ue&255;return St+Nt},k.prototype.writeUint8=k.prototype.writeUInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,255,0),this[St]=gt&255,St+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,65535,0),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St+3]=gt>>>24,this[St+2]=gt>>>16,this[St+1]=gt>>>8,this[St]=gt&255,St+4},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,4294967295,0),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4};function ge(gt,St,Nt,re,le){oe(St,re,le,gt,Nt,7);var we=Number(St&BigInt(4294967295));gt[Nt++]=we,we=we>>8,gt[Nt++]=we,we=we>>8,gt[Nt++]=we,we=we>>8,gt[Nt++]=we;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Ue=Ue>>8,gt[Nt++]=Ue,Nt}function fe(gt,St,Nt,re,le){oe(St,re,le,gt,Nt,7);var we=Number(St&BigInt(4294967295));gt[Nt+7]=we,we=we>>8,gt[Nt+6]=we,we=we>>8,gt[Nt+5]=we,we=we>>8,gt[Nt+4]=we;var Ue=Number(St>>BigInt(32)&BigInt(4294967295));return gt[Nt+3]=Ue,Ue=Ue>>8,gt[Nt+2]=Ue,Ue=Ue>>8,gt[Nt+1]=Ue,Ue=Ue>>8,gt[Nt]=Ue,Nt+8}k.prototype.writeBigUInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,gt,St,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,!re){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var we=0,Ue=1,qe=0;for(this[St]=gt&255;++we>0)-qe&255;return St+Nt},k.prototype.writeIntBE=function(gt,St,Nt,re){if(gt=+gt,St=St>>>0,!re){var le=Math.pow(2,8*Nt-1);Jt(this,gt,St,Nt,le-1,-le)}var we=Nt-1,Ue=1,qe=0;for(this[St+we]=gt&255;--we>=0&&(Ue*=256);)gt<0&&qe===0&&this[St+we+1]!==0&&(qe=1),this[St+we]=(gt/Ue>>0)-qe&255;return St+Nt},k.prototype.writeInt8=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,1,127,-128),gt<0&&(gt=255+gt+1),this[St]=gt&255,St+1},k.prototype.writeInt16LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt&255,this[St+1]=gt>>>8,St+2},k.prototype.writeInt16BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,2,32767,-32768),this[St]=gt>>>8,this[St+1]=gt&255,St+2},k.prototype.writeInt32LE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),this[St]=gt&255,this[St+1]=gt>>>8,this[St+2]=gt>>>16,this[St+3]=gt>>>24,St+4},k.prototype.writeInt32BE=function(gt,St,Nt){return gt=+gt,St=St>>>0,Nt||Jt(this,gt,St,4,2147483647,-2147483648),gt<0&&(gt=4294967295+gt+1),this[St]=gt>>>24,this[St+1]=gt>>>16,this[St+2]=gt>>>8,this[St+3]=gt&255,St+4},k.prototype.writeBigInt64LE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ge(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=ne(function(gt){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,gt,St,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function pe(gt,St,Nt,re,le,we){if(Nt+re>gt.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("Index out of range")}function se(gt,St,Nt,re,le){return St=+St,Nt=Nt>>>0,le||pe(gt,St,Nt,4),M.write(gt,St,Nt,re,23,4),Nt+4}k.prototype.writeFloatLE=function(gt,St,Nt){return se(this,gt,St,!0,Nt)},k.prototype.writeFloatBE=function(gt,St,Nt){return se(this,gt,St,!1,Nt)};function Tt(gt,St,Nt,re,le){return St=+St,Nt=Nt>>>0,le||pe(gt,St,Nt,8),M.write(gt,St,Nt,re,52,8),Nt+8}k.prototype.writeDoubleLE=function(gt,St,Nt){return Tt(this,gt,St,!0,Nt)},k.prototype.writeDoubleBE=function(gt,St,Nt){return Tt(this,gt,St,!1,Nt)},k.prototype.copy=function(gt,St,Nt,re){if(!k.isBuffer(gt))throw new TypeError("argument should be a Buffer");if(Nt||(Nt=0),!re&&re!==0&&(re=this.length),St>=gt.length&&(St=gt.length),St||(St=0),re>0&&re=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),gt.length-St>>0,Nt=Nt===void 0?this.length:Nt>>>0,gt||(gt=0);var we;if(typeof gt=="number")for(we=St;weMath.pow(2,32)?le=ee(String(Nt)):typeof Nt=="bigint"&&(le=String(Nt),(Nt>Math.pow(BigInt(2),BigInt(32))||Nt<-Math.pow(BigInt(2),BigInt(32)))&&(le=ee(le)),le+="n"),re+=" It must be ".concat(St,". Received ").concat(le),re},RangeError);function ee(gt){for(var St="",Nt=gt.length,re=gt[0]==="-"?1:0;Nt>=re+4;Nt-=3)St="_".concat(gt.slice(Nt-3,Nt)).concat(St);return"".concat(gt.slice(0,Nt)).concat(St)}function ve(gt,St,Nt){Te(St,"offset"),(gt[St]===void 0||gt[St+Nt]===void 0)&&He(St,gt.length-(Nt+1))}function oe(gt,St,Nt,re,le,we){if(gt>Nt||gt= 0".concat(Ue," and < 2").concat(Ue," ** ").concat((we+1)*8).concat(Ue):qe=">= -(2".concat(Ue," ** ").concat((we+1)*8-1).concat(Ue,") and < 2 ** ")+"".concat((we+1)*8-1).concat(Ue),new Lt.ERR_OUT_OF_RANGE("value",qe,gt)}ve(re,le,we)}function Te(gt,St){if(typeof gt!="number")throw new Lt.ERR_INVALID_ARG_TYPE(St,"number",gt)}function He(gt,St,Nt){throw Math.floor(gt)!==gt?(Te(gt,Nt),new Lt.ERR_OUT_OF_RANGE("offset","an integer",gt)):St<0?new Lt.ERR_BUFFER_OUT_OF_BOUNDS:new Lt.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(St),gt)}var Ge=/[^+/0-9A-Za-z-_]/g;function cr(gt){if(gt=gt.split("=")[0],gt=gt.trim().replace(Ge,""),gt.length<2)return"";for(;gt.length%4!==0;)gt=gt+"=";return gt}function ur(gt,St){St=St||1/0;for(var Nt,re=gt.length,le=null,we=[],Ue=0;Ue55295&&Nt<57344){if(!le){if(Nt>56319){(St-=3)>-1&&we.push(239,191,189);continue}else if(Ue+1===re){(St-=3)>-1&&we.push(239,191,189);continue}le=Nt;continue}if(Nt<56320){(St-=3)>-1&&we.push(239,191,189),le=Nt;continue}Nt=(le-55296<<10|Nt-56320)+65536}else le&&(St-=3)>-1&&we.push(239,191,189);if(le=null,Nt<128){if((St-=1)<0)break;we.push(Nt)}else if(Nt<2048){if((St-=2)<0)break;we.push(Nt>>6|192,Nt&63|128)}else if(Nt<65536){if((St-=3)<0)break;we.push(Nt>>12|224,Nt>>6&63|128,Nt&63|128)}else if(Nt<1114112){if((St-=4)<0)break;we.push(Nt>>18|240,Nt>>12&63|128,Nt>>6&63|128,Nt&63|128)}else throw new Error("Invalid code point")}return we}function jr(gt){for(var St=[],Nt=0;Nt>8,le=Nt%256,we.push(le),we.push(re);return we}function br(gt){return P.toByteArray(cr(gt))}function Xr(gt,St,Nt,re){var le;for(le=0;le=St.length||le>=gt.length);++le)St[le+Nt]=gt[le];return le}function nn(gt,St){return gt instanceof St||gt!=null&>.constructor!=null&>.constructor.name!=null&>.constructor.name===St.name}function Le(gt){return gt!==gt}var Gt=function(){for(var gt="0123456789abcdef",St=new Array(256),Nt=0;Nt<16;++Nt)for(var re=Nt*16,le=0;le<16;++le)St[re+le]=gt[Nt]+gt[le];return St}();function ne(gt){return typeof BigInt>"u"?Ct:gt}function Ct(){throw new Error("BigInt not supported")}},4844:function(t){t.exports=e;function e(r,a,n,o){return r[0]=a[0]+n[0]*o,r[1]=a[1]+n[1]*o,r[2]=a[2]+n[2]*o,r[3]=a[3]+n[3]*o,r}},4905:function(t,e,r){var a=r(5874);t.exports=n;function n(o,i){var l=a(i),f=[];return f=f.concat(l(o)),f=f.concat(l(null)),f}},4935:function(t,e,r){t.exports=b;var a=r(2762),n=r(8116),o=r(4359),i=r(1879).Q,l=window||process.global||{},f=l.__TEXT_CACHE||{};l.__TEXT_CACHE={};var x=3;function y(_,P,M,C){this.gl=_,this.shader=P,this.buffer=M,this.vao=C,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=y.prototype,T=[0,0];v.bind=function(_,P,M,C){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=_,A.view=P,A.projection=M,A.pixelScale=C,T[0]=this.gl.drawingBufferWidth,T[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=T},v.unbind=function(){this.vao.unbind()},v.update=function(_,P,M,C,A){var h=[];function p(W,q,J,lt,yt,mt){var st=[J.style,J.weight,J.variant,J.family].join("_"),tt=f[st];tt||(tt=f[st]={});var dt=tt[q];dt||(dt=tt[q]=u(q,{triangles:!0,font:J.family,fontStyle:J.style,fontWeight:J.weight,fontVariant:J.variant,textAlign:"center",textBaseline:"middle",lineSpacing:yt,styletags:mt}));for(var rt=(lt||12)/12,at=dt.positions,vt=dt.cells,it=0,Y=vt.length;it=0;--ut){var kt=at[ft[ut]];h.push(rt*kt[0],-rt*kt[1],W)}}for(var k=[0,0,0],w=[0,0,0],R=[0,0,0],O=[0,0,0],j=1.25,V={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},H=0;H<3;++H){R[H]=h.length/x|0,p(.5*(_[0][H]+_[1][H]),P[H],M[H],12,j,V),O[H]=(h.length/x|0)-R[H],k[H]=h.length/x|0;for(var F=0;F0||P.length>0;){for(;_.length>0;){var p=_.pop();if(M[p]!==-b){M[p]=b;for(var k=C[p],w=0;w<3;++w){var R=h[3*p+w];R>=0&&M[R]===0&&(A[3*p+w]?P.push(R):(_.push(R),M[R]=b))}}}var O=P;P=_,_=O,P.length=0,b=-b}var j=f(C,M,v);return T?j.concat(u.boundary):j}},5033:function(t){t.exports=e;function e(r,a,n){var o=a||0,i=n||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[o*r[12]+r[8],o*r[13]+r[9],o*r[14]+r[10],o*r[15]+r[11]],[i*r[12]-r[8],i*r[13]-r[9],i*r[14]-r[10],i*r[15]-r[11]]]}},5085:function(t,e,r){t.exports=b;var a=r(3250)[3],n=r(4209),o=r(3352),i=r(2478);function l(){return!0}function f(_){return function(P,M){var C=_[P];return C?!!C.queryPoint(M,l):!1}}function x(_){for(var P={},M=0;M<_.length;++M){var C=_[M],A=C[0][0],h=C[0][1],p=C[1][1],k=[Math.min(h,p),Math.max(h,p)];A in P?P[A].push(k):P[A]=[k]}for(var w={},R=Object.keys(P),M=0;M0&&P[C]===M[0])A=_[C-1];else return 1;for(var h=1;A;){var p=A.key,k=a(M,p[0],p[1]);if(p[0][0]0)h=-1,A=A.right;else return 0;else if(k>0)A=A.left;else if(k<0)h=1,A=A.right;else return 0}return h}}function v(_){return 1}function T(_){return function(P){return _(P[0],P[1])?0:1}}function u(_,P){return function(M){return _(M[0],M[1])?0:P(M)}}function b(_){for(var P=_.length,M=[],C=[],A=0,h=0;h"u"?r(606):WeakMap,i=new o,l=0;function f(P,M,C,A,h,p,k){this.id=P,this.src=M,this.type=C,this.shader=A,this.count=p,this.programs=[],this.cache=k}f.prototype.dispose=function(){if(--this.count===0){for(var P=this.cache,M=P.gl,C=this.programs,A=0,h=C.length;A0&&(f=1/Math.sqrt(f),r[0]=n*f,r[1]=o*f,r[2]=i*f,r[3]=l*f),r}},5202:function(t,e,r){var a=r(1944),n=r(8210);t.exports=l,t.exports.positive=f,t.exports.negative=x;function o(y,v){var T=n(a(y,v),[v[v.length-1]]);return T[T.length-1]}function i(y,v,T,u){var b=u-v,_=-v/b;_<0?_=0:_>1&&(_=1);for(var P=1-_,M=y.length,C=new Array(M),A=0;A0||b>0&&C<0){var A=i(_,C,P,b);T.push(A),u.push(A.slice())}C<0?u.push(P.slice()):C>0?T.push(P.slice()):(T.push(P.slice()),u.push(P.slice())),b=C}return{positive:T,negative:u}}function f(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],P=0;P0||u>0&&M<0)&&T.push(i(b,M,_,u)),M>=0&&T.push(_.slice()),u=M}return T}function x(y,v){for(var T=[],u=o(y[y.length-1],v),b=y[y.length-1],_=y[0],P=0;P0||u>0&&M<0)&&T.push(i(b,M,_,u)),M<=0&&T.push(_.slice()),u=M}return T}},5219:function(t){t.exports=function(e){for(var r=e.length,a,n=0;n13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},5250:function(t){t.exports=r;var e=+(Math.pow(2,27)+1);function r(a,n,o){var i=a*n,l=e*a,f=l-a,x=l-f,y=a-x,v=e*n,T=v-n,u=v-T,b=n-u,_=i-x*u,P=_-y*u,M=P-x*b,C=y*b-M;return o?(o[0]=C,o[1]=i,o):[C,i]}},5298:function(t,e){var r={"float64,2,1,0":function(){return function(x,y,v,T,u){var b=x[0],_=x[1],P=x[2],M=v[0],C=v[1],A=v[2];T|=0;var h=0,p=0,k=0,w=A,R=C-P*A,O=M-_*C;for(k=0;k0;){H<64?(M=H,H=0):(M=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64),T=j+H*h+F*p,_=V+H*w+F*R;var U=0,W=0,q=0,J=k,lt=h-A*k,yt=p-M*h,mt=O,st=w-A*O,tt=R-M*w;for(q=0;q0;){R<64?(M=R,R=0):(M=64,R-=64);for(var O=x[0]|0;O>0;){O<64?(P=O,O=0):(P=64,O-=64),T=k+R*A+O*C,_=w+R*p+O*h;var j=0,V=0,H=A,F=C-M*A,U=p,W=h-M*p;for(V=0;V0;){V<64?(C=V,V=0):(C=64,V-=64);for(var H=x[0]|0;H>0;){H<64?(P=H,H=0):(P=64,H-=64);for(var F=x[1]|0;F>0;){F<64?(M=F,F=0):(M=64,F-=64),T=O+V*p+H*A+F*h,_=j+V*R+H*k+F*w;var U=0,W=0,q=0,J=p,lt=A-C*p,yt=h-P*A,mt=R,st=k-C*R,tt=w-P*k;for(q=0;q=0}}(),o.removeTriangle=function(f,x,y){var v=this.stars;i(v[f],x,y),i(v[x],y,f),i(v[y],f,x)},o.addTriangle=function(f,x,y){var v=this.stars;v[f].push(x,y),v[x].push(y,f),v[y].push(f,x)},o.opposite=function(f,x){for(var y=this.stars[x],v=1,T=y.length;v0;){var u=y.pop();f[u]=!1;for(var b=l[u],v=0;v0){for(var st=0;st<24;++st)O.push(O[O.length-12]);F+=2,lt=!0}continue t}U[0][w]=Math.min(U[0][w],yt[w],mt[w]),U[1][w]=Math.max(U[1][w],yt[w],mt[w])}var tt,dt;Array.isArray(q[0])?(tt=q.length>k-1?q[k-1]:q.length>0?q[q.length-1]:[0,0,0,1],dt=q.length>k?q[k]:q.length>0?q[q.length-1]:[0,0,0,1]):tt=dt=q,tt.length===3&&(tt=[tt[0],tt[1],tt[2],1]),dt.length===3&&(dt=[dt[0],dt[1],dt[2],1]),!this.hasAlpha&&tt[3]<1&&(this.hasAlpha=!0);var rt;Array.isArray(J)?rt=J.length>k-1?J[k-1]:J.length>0?J[J.length-1]:[0,0,0,1]:rt=J;var at=H;if(H+=_(yt,mt),lt){for(w=0;w<2;++w)O.push(yt[0],yt[1],yt[2],mt[0],mt[1],mt[2],at,rt,tt[0],tt[1],tt[2],tt[3]);F+=2,lt=!1}O.push(yt[0],yt[1],yt[2],mt[0],mt[1],mt[2],at,rt,tt[0],tt[1],tt[2],tt[3],yt[0],yt[1],yt[2],mt[0],mt[1],mt[2],at,-rt,tt[0],tt[1],tt[2],tt[3],mt[0],mt[1],mt[2],yt[0],yt[1],yt[2],H,-rt,dt[0],dt[1],dt[2],dt[3],mt[0],mt[1],mt[2],yt[0],yt[1],yt[2],H,rt,dt[0],dt[1],dt[2],dt[3]),F+=4}}if(this.buffer.update(O),j.push(H),V.push(W[W.length-1].slice()),this.bounds=U,this.vertexCount=F,this.points=V,this.arcLength=j,"dashes"in p){var vt=p.dashes,it=vt.slice();for(it.unshift(0),k=1;kr[n][0]&&(n=o);return an?[[n],[a]]:[[a]]}},5771:function(t,e,r){var a=r(8507),n=r(3788),o=r(2419);t.exports=i;function i(l){l.sort(n);for(var f=l.length,x=0,y=0;y0){var u=l[x-1];if(a(v,u)===0&&o(u)!==T){x-=1;continue}}l[x++]=v}}return l.length=x,l}},5838:function(t,e,r){t.exports=n;var a=r(7842);function n(o){for(var i=new Array(o.length),l=0;l0)continue;ee=Tt.slice(0,1).join("")}return it(ee),lt+=ee.length,U=U.slice(ee.length),U.length}while(!0)}function ge(){return/[^a-fA-F0-9]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function fe(){return H==="."||/[eE]/.test(H)?(U.push(H),V=_,F=H,O+1):H==="x"&&U.length===1&&U[0]==="0"?(V=p,U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function pe(){return H==="f"&&(U.push(H),F=H,O+=1),/[eE]/.test(H)||(H==="-"||H==="+")&&/[eE]/.test(F)?(U.push(H),F=H,O+1):/[^\d]/.test(H)?(it(U.join("")),V=f,O):(U.push(H),F=H,O+1)}function se(){if(/[^\d\w_]/.test(H)){var Tt=U.join("");return vt[Tt]?V=C:at[Tt]?V=M:V=P,it(U.join("")),V=f,O}return U.push(H),F=H,O+1}}},5878:function(t,e,r){t.exports=i;var a=r(3250),n=r(2014);function o(l,f,x){var y=Math.abs(a(l,f,x)),v=Math.sqrt(Math.pow(f[0]-x[0],2)+Math.pow(f[1]-x[1],2));return y/v}function i(l,f,x){for(var y=f.length,v=l.length,T=new Array(y),u=new Array(y),b=new Array(y),_=new Array(y),P=0;P>1:(st>>1)-1}function R(st){for(var tt=k(st);;){var dt=tt,rt=2*st+1,at=2*(st+1),vt=st;if(rt0;){var dt=w(st);if(dt>=0){var rt=k(dt);if(tt0){var st=F[0];return p(0,q-1),q-=1,R(0),st}return-1}function V(st,tt){var dt=F[st];return b[dt]===tt?st:(b[dt]=-1/0,O(st),j(),b[dt]=tt,q+=1,O(q-1))}function H(st){if(!_[st]){_[st]=!0;var tt=T[st],dt=u[st];T[dt]>=0&&(T[dt]=tt),u[tt]>=0&&(u[tt]=dt),U[tt]>=0&&V(U[tt],h(tt)),U[dt]>=0&&V(U[dt],h(dt))}}for(var F=[],U=new Array(y),P=0;P>1;P>=0;--P)R(P);for(;;){var J=j();if(J<0||b[J]>x)break;H(J)}for(var lt=[],P=0;P=0&&dt>=0&&tt!==dt){var rt=U[tt],at=U[dt];rt!==at&&mt.push([rt,at])}}),n.unique(n.normalize(mt)),{positions:lt,edges:mt}}},5911:function(t){t.exports=e;function e(r,a,n){var o=a[0],i=a[1],l=a[2],f=n[0],x=n[1],y=n[2];return r[0]=i*y-l*x,r[1]=l*f-o*y,r[2]=o*x-i*f,r}},5964:function(t){t.exports=function(e){return!e&&e!==0?"":e.toString()}},5995:function(t,e,r){t.exports=o;var a=r(7642),n=r(6037);function o(i,l){return a(l).filter(function(f){for(var x=new Array(f.length),y=0;y2&&k[1]>2&&A(p.pick(-1,-1).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,0).lo(1,1).hi(k[0]-2,k[1]-2),h.pick(-1,-1,1).lo(1,1).hi(k[0]-2,k[1]-2)),k[1]>2&&(C(p.pick(0,-1).lo(1).hi(k[1]-2),h.pick(0,-1,1).lo(1).hi(k[1]-2)),M(h.pick(0,-1,0).lo(1).hi(k[1]-2))),k[1]>2&&(C(p.pick(k[0]-1,-1).lo(1).hi(k[1]-2),h.pick(k[0]-1,-1,1).lo(1).hi(k[1]-2)),M(h.pick(k[0]-1,-1,0).lo(1).hi(k[1]-2))),k[0]>2&&(C(p.pick(-1,0).lo(1).hi(k[0]-2),h.pick(-1,0,0).lo(1).hi(k[0]-2)),M(h.pick(-1,0,1).lo(1).hi(k[0]-2))),k[0]>2&&(C(p.pick(-1,k[1]-1).lo(1).hi(k[0]-2),h.pick(-1,k[1]-1,0).lo(1).hi(k[0]-2)),M(h.pick(-1,k[1]-1,1).lo(1).hi(k[0]-2))),h.set(0,0,0,0),h.set(0,0,1,0),h.set(k[0]-1,0,0,0),h.set(k[0]-1,0,1,0),h.set(0,k[1]-1,0,0),h.set(0,k[1]-1,1,0),h.set(k[0]-1,k[1]-1,0,0),h.set(k[0]-1,k[1]-1,1,0),h}}function _(P){var M=P.join(),k=y[M];if(k)return k;for(var C=P.length,A=[v,T],h=1;h<=C;++h)A.push(u(h));var p=b,k=p.apply(void 0,A);return y[M]=k,k}t.exports=function(P,M,C){if(Array.isArray(C)||(typeof C=="string"?C=a(M.dimension,C):C=a(M.dimension,"clamp")),M.size===0)return P;if(M.dimension===0)return P.set(0),P;var A=_(C);return A(P,M)}},6204:function(t){t.exports=e;function e(r){var a,n,o,i=r.length,l=0;for(a=0;ay&&(y=a.length(O)),w&&!k){var j=2*a.distance(M,R)/(a.length(C)+a.length(O));j?(h=Math.min(h,j),p=!1):p=!0}p||(M=R,C=O),A.push(O)}var V=[v,u,_],H=[T,b,P];i&&(i[0]=V,i[1]=H),y===0&&(y=1);var F=1/y;isFinite(h)||(h=1),x.vectorScale=h;var U=o.coneSize||(k?1:.5);o.absoluteConeSize&&(U=o.absoluteConeSize*F),x.coneScale=U;for(var w=0,W=0;wlt&&(H|=1<lt){H|=1<x[O][1])&&(vt=O);for(var it=-1,O=0;O<3;++O){var Y=vt^1<x[ft][0]&&(ft=Y)}}var ut=_;ut[0]=ut[1]=ut[2]=0,ut[a.log2(it^vt)]=vt&it,ut[a.log2(vt^ft)]=vt&ft;var kt=ft^7;kt===H||kt===at?(kt=it^7,ut[a.log2(ft^kt)]=kt&ft):ut[a.log2(it^kt)]=kt⁢for(var It=P,Pt=H,W=0;W<3;++W)Pt&1<=0&&(x=l.length-f-1);var y=Math.pow(10,x),v=Math.round(o*i*y),T=v+"";if(T.indexOf("e")>=0)return T;var u=v/y,b=v%y;v<0?(u=-Math.ceil(u)|0,b=-b|0):(u=Math.floor(u)|0,b=b|0);var _=""+u;if(v<0&&(_="-"+_),x){for(var P=""+b;P.length=o[0][f];--v)x.push({x:v*i[f],text:r(i[f],v)});l.push(x)}return l}function n(o,i){for(var l=0;l<3;++l){if(o[l].length!==i[l].length)return!1;for(var f=0;fM+1)throw new Error(_+" map requires nshades to be at least size "+b.length);Array.isArray(x.alpha)?x.alpha.length!==2?C=[1,1]:C=x.alpha.slice():typeof x.alpha=="number"?C=[x.alpha,x.alpha]:C=[1,1],y=b.map(function(R){return Math.round(R.index*M)}),C[0]=Math.min(Math.max(C[0],0),1),C[1]=Math.min(Math.max(C[1],0),1);var h=b.map(function(R,O){var j=b[O].index,V=b[O].rgb.slice();return V.length===4&&V[3]>=0&&V[3]<=1||(V[3]=C[0]+(C[1]-C[0])*j),V}),p=[];for(A=0;A0?F:U},s.min=function(F,U){return F.cmp(U)<0?F:U},s.prototype._init=function(F,U,W){if(typeof F=="number")return this._initNumber(F,U,W);if(typeof F=="object")return this._initArray(F,U,W);U==="hex"&&(U=16),o(U===(U|0)&&U>=2&&U<=36),F=F.toString().replace(/\s+/g,"");var q=0;F[0]==="-"&&(q++,this.negative=1),q=0;q-=3)lt=F[q]|F[q-1]<<8|F[q-2]<<16,this.words[X]|=lt<>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,X++);else if(W==="le")for(q=0,X=0;q>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,X++);return this.strip()};function x(F,U){var W=F.charCodeAt(U);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function y(F,U,W){var q=x(F,W);return W-1>=U&&(q|=x(F,W-1)<<4),q}s.prototype._parseHex=function(F,U,W){this.length=Math.ceil((F.length-U)/6),this.words=new Array(this.length);for(var q=0;q=U;q-=2)yt=y(F,U,q)<=18?(X-=18,lt+=1,this.words[lt]|=yt>>>26):X+=8;else{var pt=F.length-U;for(q=pt%2===0?U+1:U;q=18?(X-=18,lt+=1,this.words[lt]|=yt>>>26):X+=8}this.strip()};function v(F,U,W,q){for(var X=0,lt=Math.min(F.length,W),yt=U;yt=49?X+=pt-49+10:pt>=17?X+=pt-17+10:X+=pt}return X}s.prototype._parseBase=function(F,U,W){this.words=[0],this.length=1;for(var q=0,X=1;X<=67108863;X*=U)q++;q--,X=X/U|0;for(var lt=F.length-W,yt=lt%q,pt=Math.min(lt,lt-yt)+W,st=0,tt=W;tt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(F,U){F=F||10,U=U|0||1;var W;if(F===16||F==="hex"){W="";for(var q=0,X=0,lt=0;lt>>24-q&16777215,X!==0||lt!==this.length-1?W=T[6-pt.length]+pt+W:W=pt+W,q+=2,q>=26&&(q-=26,lt--)}for(X!==0&&(W=X.toString(16)+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}if(F===(F|0)&&F>=2&&F<=36){var st=u[F],tt=b[F];W="";var dt=this.clone();for(dt.negative=0;!dt.isZero();){var rt=dt.modn(tt).toString(F);dt=dt.idivn(tt),dt.isZero()?W=rt+W:W=T[st-rt.length]+rt+W}for(this.isZero()&&(W="0"+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}o(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var F=this.words[0];return this.length===2?F+=this.words[1]*67108864:this.length===3&&this.words[2]===1?F+=4503599627370496+this.words[1]*67108864:this.length>2&&o(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-F:F},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(F,U){return o(typeof f<"u"),this.toArrayLike(f,F,U)},s.prototype.toArray=function(F,U){return this.toArrayLike(Array,F,U)},s.prototype.toArrayLike=function(F,U,W){var q=this.byteLength(),X=W||Math.max(1,q);o(q<=X,"byte array longer than desired length"),o(X>0,"Requested array length <= 0"),this.strip();var lt=U==="le",yt=new F(X),pt,st,tt=this.clone();if(lt){for(st=0;!tt.isZero();st++)pt=tt.andln(255),tt.iushrn(8),yt[st]=pt;for(;st=4096&&(W+=13,U>>>=13),U>=64&&(W+=7,U>>>=7),U>=8&&(W+=4,U>>>=4),U>=2&&(W+=2,U>>>=2),W+U},s.prototype._zeroBits=function(F){if(F===0)return 26;var U=F,W=0;return(U&8191)===0&&(W+=13,U>>>=13),(U&127)===0&&(W+=7,U>>>=7),(U&15)===0&&(W+=4,U>>>=4),(U&3)===0&&(W+=2,U>>>=2),(U&1)===0&&W++,W},s.prototype.bitLength=function(){var F=this.words[this.length-1],U=this._countBits(F);return(this.length-1)*26+U};function _(F){for(var U=new Array(F.bitLength()),W=0;W>>X}return U}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var F=0,U=0;UF.length?this.clone().ior(F):F.clone().ior(this)},s.prototype.uor=function(F){return this.length>F.length?this.clone().iuor(F):F.clone().iuor(this)},s.prototype.iuand=function(F){var U;this.length>F.length?U=F:U=this;for(var W=0;WF.length?this.clone().iand(F):F.clone().iand(this)},s.prototype.uand=function(F){return this.length>F.length?this.clone().iuand(F):F.clone().iuand(this)},s.prototype.iuxor=function(F){var U,W;this.length>F.length?(U=this,W=F):(U=F,W=this);for(var q=0;qF.length?this.clone().ixor(F):F.clone().ixor(this)},s.prototype.uxor=function(F){return this.length>F.length?this.clone().iuxor(F):F.clone().iuxor(this)},s.prototype.inotn=function(F){o(typeof F=="number"&&F>=0);var U=Math.ceil(F/26)|0,W=F%26;this._expand(U),W>0&&U--;for(var q=0;q0&&(this.words[q]=~this.words[q]&67108863>>26-W),this.strip()},s.prototype.notn=function(F){return this.clone().inotn(F)},s.prototype.setn=function(F,U){o(typeof F=="number"&&F>=0);var W=F/26|0,q=F%26;return this._expand(W+1),U?this.words[W]=this.words[W]|1<F.length?(W=this,q=F):(W=F,q=this);for(var X=0,lt=0;lt>>26;for(;X!==0&<>>26;if(this.length=W.length,X!==0)this.words[this.length]=X,this.length++;else if(W!==this)for(;ltF.length?this.clone().iadd(F):F.clone().iadd(this)},s.prototype.isub=function(F){if(F.negative!==0){F.negative=0;var U=this.iadd(F);return F.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(F),this.negative=1,this._normSign();var W=this.cmp(F);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var q,X;W>0?(q=this,X=F):(q=F,X=this);for(var lt=0,yt=0;yt>26,this.words[yt]=U&67108863;for(;lt!==0&&yt>26,this.words[yt]=U&67108863;if(lt===0&&yt>>26,rt=st&67108863,at=Math.min(tt,U.length-1),vt=Math.max(0,tt-F.length+1);vt<=at;vt++){var it=tt-vt|0;X=F.words[it]|0,lt=U.words[vt]|0,yt=X*lt+rt,dt+=yt/67108864|0,rt=yt&67108863}W.words[tt]=rt|0,st=dt|0}return st!==0?W.words[tt]=st|0:W.length--,W.strip()}var M=function(F,U,W){var q=F.words,X=U.words,lt=W.words,yt=0,pt,st,tt,dt=q[0]|0,rt=dt&8191,at=dt>>>13,vt=q[1]|0,it=vt&8191,Y=vt>>>13,ft=q[2]|0,ut=ft&8191,wt=ft>>>13,zt=q[3]|0,Pt=zt&8191,Wt=zt>>>13,Ht=q[4]|0,Jt=Ht&8191,ge=Ht>>>13,he=q[5]|0,de=he&8191,se=he>>>13,Tt=q[6]|0,Lt=Tt&8191,Mt=Tt>>>13,te=q[7]|0,ve=te&8191,oe=te>>>13,Te=q[8]|0,He=Te&8191,Ge=Te>>>13,cr=q[9]|0,ur=cr&8191,jr=cr>>>13,Hr=X[0]|0,br=Hr&8191,Kr=Hr>>>13,rn=X[1]|0,Ce=rn&8191,Gt=rn>>>13,ne=X[2]|0,Ct=ne&8191,gt=ne>>>13,St=X[3]|0,Nt=St&8191,re=St>>>13,le=X[4]|0,we=le&8191,Ue=le>>>13,qe=X[5]|0,or=qe&8191,Ar=qe>>>13,Tr=X[6]|0,pr=Tr&8191,Jr=Tr>>>13,Vn=X[7]|0,Hn=Vn&8191,Kn=Vn>>>13,Ci=X[8]|0,ii=Ci&8191,qn=Ci>>>13,aa=X[9]|0,Vi=aa&8191,We=aa>>>13;W.negative=F.negative^U.negative,W.length=19,pt=Math.imul(rt,br),st=Math.imul(rt,Kr),st=st+Math.imul(at,br)|0,tt=Math.imul(at,Kr);var rr=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(rr>>>26)|0,rr&=67108863,pt=Math.imul(it,br),st=Math.imul(it,Kr),st=st+Math.imul(Y,br)|0,tt=Math.imul(Y,Kr),pt=pt+Math.imul(rt,Ce)|0,st=st+Math.imul(rt,Gt)|0,st=st+Math.imul(at,Ce)|0,tt=tt+Math.imul(at,Gt)|0;var fr=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(fr>>>26)|0,fr&=67108863,pt=Math.imul(ut,br),st=Math.imul(ut,Kr),st=st+Math.imul(wt,br)|0,tt=Math.imul(wt,Kr),pt=pt+Math.imul(it,Ce)|0,st=st+Math.imul(it,Gt)|0,st=st+Math.imul(Y,Ce)|0,tt=tt+Math.imul(Y,Gt)|0,pt=pt+Math.imul(rt,Ct)|0,st=st+Math.imul(rt,gt)|0,st=st+Math.imul(at,Ct)|0,tt=tt+Math.imul(at,gt)|0;var _r=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(_r>>>26)|0,_r&=67108863,pt=Math.imul(Pt,br),st=Math.imul(Pt,Kr),st=st+Math.imul(Wt,br)|0,tt=Math.imul(Wt,Kr),pt=pt+Math.imul(ut,Ce)|0,st=st+Math.imul(ut,Gt)|0,st=st+Math.imul(wt,Ce)|0,tt=tt+Math.imul(wt,Gt)|0,pt=pt+Math.imul(it,Ct)|0,st=st+Math.imul(it,gt)|0,st=st+Math.imul(Y,Ct)|0,tt=tt+Math.imul(Y,gt)|0,pt=pt+Math.imul(rt,Nt)|0,st=st+Math.imul(rt,re)|0,st=st+Math.imul(at,Nt)|0,tt=tt+Math.imul(at,re)|0;var Qr=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,pt=Math.imul(Jt,br),st=Math.imul(Jt,Kr),st=st+Math.imul(ge,br)|0,tt=Math.imul(ge,Kr),pt=pt+Math.imul(Pt,Ce)|0,st=st+Math.imul(Pt,Gt)|0,st=st+Math.imul(Wt,Ce)|0,tt=tt+Math.imul(Wt,Gt)|0,pt=pt+Math.imul(ut,Ct)|0,st=st+Math.imul(ut,gt)|0,st=st+Math.imul(wt,Ct)|0,tt=tt+Math.imul(wt,gt)|0,pt=pt+Math.imul(it,Nt)|0,st=st+Math.imul(it,re)|0,st=st+Math.imul(Y,Nt)|0,tt=tt+Math.imul(Y,re)|0,pt=pt+Math.imul(rt,we)|0,st=st+Math.imul(rt,Ue)|0,st=st+Math.imul(at,we)|0,tt=tt+Math.imul(at,Ue)|0;var Cn=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,pt=Math.imul(de,br),st=Math.imul(de,Kr),st=st+Math.imul(se,br)|0,tt=Math.imul(se,Kr),pt=pt+Math.imul(Jt,Ce)|0,st=st+Math.imul(Jt,Gt)|0,st=st+Math.imul(ge,Ce)|0,tt=tt+Math.imul(ge,Gt)|0,pt=pt+Math.imul(Pt,Ct)|0,st=st+Math.imul(Pt,gt)|0,st=st+Math.imul(Wt,Ct)|0,tt=tt+Math.imul(Wt,gt)|0,pt=pt+Math.imul(ut,Nt)|0,st=st+Math.imul(ut,re)|0,st=st+Math.imul(wt,Nt)|0,tt=tt+Math.imul(wt,re)|0,pt=pt+Math.imul(it,we)|0,st=st+Math.imul(it,Ue)|0,st=st+Math.imul(Y,we)|0,tt=tt+Math.imul(Y,Ue)|0,pt=pt+Math.imul(rt,or)|0,st=st+Math.imul(rt,Ar)|0,st=st+Math.imul(at,or)|0,tt=tt+Math.imul(at,Ar)|0;var bn=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(bn>>>26)|0,bn&=67108863,pt=Math.imul(Lt,br),st=Math.imul(Lt,Kr),st=st+Math.imul(Mt,br)|0,tt=Math.imul(Mt,Kr),pt=pt+Math.imul(de,Ce)|0,st=st+Math.imul(de,Gt)|0,st=st+Math.imul(se,Ce)|0,tt=tt+Math.imul(se,Gt)|0,pt=pt+Math.imul(Jt,Ct)|0,st=st+Math.imul(Jt,gt)|0,st=st+Math.imul(ge,Ct)|0,tt=tt+Math.imul(ge,gt)|0,pt=pt+Math.imul(Pt,Nt)|0,st=st+Math.imul(Pt,re)|0,st=st+Math.imul(Wt,Nt)|0,tt=tt+Math.imul(Wt,re)|0,pt=pt+Math.imul(ut,we)|0,st=st+Math.imul(ut,Ue)|0,st=st+Math.imul(wt,we)|0,tt=tt+Math.imul(wt,Ue)|0,pt=pt+Math.imul(it,or)|0,st=st+Math.imul(it,Ar)|0,st=st+Math.imul(Y,or)|0,tt=tt+Math.imul(Y,Ar)|0,pt=pt+Math.imul(rt,pr)|0,st=st+Math.imul(rt,Jr)|0,st=st+Math.imul(at,pr)|0,tt=tt+Math.imul(at,Jr)|0;var An=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(An>>>26)|0,An&=67108863,pt=Math.imul(ve,br),st=Math.imul(ve,Kr),st=st+Math.imul(oe,br)|0,tt=Math.imul(oe,Kr),pt=pt+Math.imul(Lt,Ce)|0,st=st+Math.imul(Lt,Gt)|0,st=st+Math.imul(Mt,Ce)|0,tt=tt+Math.imul(Mt,Gt)|0,pt=pt+Math.imul(de,Ct)|0,st=st+Math.imul(de,gt)|0,st=st+Math.imul(se,Ct)|0,tt=tt+Math.imul(se,gt)|0,pt=pt+Math.imul(Jt,Nt)|0,st=st+Math.imul(Jt,re)|0,st=st+Math.imul(ge,Nt)|0,tt=tt+Math.imul(ge,re)|0,pt=pt+Math.imul(Pt,we)|0,st=st+Math.imul(Pt,Ue)|0,st=st+Math.imul(Wt,we)|0,tt=tt+Math.imul(Wt,Ue)|0,pt=pt+Math.imul(ut,or)|0,st=st+Math.imul(ut,Ar)|0,st=st+Math.imul(wt,or)|0,tt=tt+Math.imul(wt,Ar)|0,pt=pt+Math.imul(it,pr)|0,st=st+Math.imul(it,Jr)|0,st=st+Math.imul(Y,pr)|0,tt=tt+Math.imul(Y,Jr)|0,pt=pt+Math.imul(rt,Hn)|0,st=st+Math.imul(rt,Kn)|0,st=st+Math.imul(at,Hn)|0,tt=tt+Math.imul(at,Kn)|0;var ci=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ci>>>26)|0,ci&=67108863,pt=Math.imul(He,br),st=Math.imul(He,Kr),st=st+Math.imul(Ge,br)|0,tt=Math.imul(Ge,Kr),pt=pt+Math.imul(ve,Ce)|0,st=st+Math.imul(ve,Gt)|0,st=st+Math.imul(oe,Ce)|0,tt=tt+Math.imul(oe,Gt)|0,pt=pt+Math.imul(Lt,Ct)|0,st=st+Math.imul(Lt,gt)|0,st=st+Math.imul(Mt,Ct)|0,tt=tt+Math.imul(Mt,gt)|0,pt=pt+Math.imul(de,Nt)|0,st=st+Math.imul(de,re)|0,st=st+Math.imul(se,Nt)|0,tt=tt+Math.imul(se,re)|0,pt=pt+Math.imul(Jt,we)|0,st=st+Math.imul(Jt,Ue)|0,st=st+Math.imul(ge,we)|0,tt=tt+Math.imul(ge,Ue)|0,pt=pt+Math.imul(Pt,or)|0,st=st+Math.imul(Pt,Ar)|0,st=st+Math.imul(Wt,or)|0,tt=tt+Math.imul(Wt,Ar)|0,pt=pt+Math.imul(ut,pr)|0,st=st+Math.imul(ut,Jr)|0,st=st+Math.imul(wt,pr)|0,tt=tt+Math.imul(wt,Jr)|0,pt=pt+Math.imul(it,Hn)|0,st=st+Math.imul(it,Kn)|0,st=st+Math.imul(Y,Hn)|0,tt=tt+Math.imul(Y,Kn)|0,pt=pt+Math.imul(rt,ii)|0,st=st+Math.imul(rt,qn)|0,st=st+Math.imul(at,ii)|0,tt=tt+Math.imul(at,qn)|0;var xi=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(xi>>>26)|0,xi&=67108863,pt=Math.imul(ur,br),st=Math.imul(ur,Kr),st=st+Math.imul(jr,br)|0,tt=Math.imul(jr,Kr),pt=pt+Math.imul(He,Ce)|0,st=st+Math.imul(He,Gt)|0,st=st+Math.imul(Ge,Ce)|0,tt=tt+Math.imul(Ge,Gt)|0,pt=pt+Math.imul(ve,Ct)|0,st=st+Math.imul(ve,gt)|0,st=st+Math.imul(oe,Ct)|0,tt=tt+Math.imul(oe,gt)|0,pt=pt+Math.imul(Lt,Nt)|0,st=st+Math.imul(Lt,re)|0,st=st+Math.imul(Mt,Nt)|0,tt=tt+Math.imul(Mt,re)|0,pt=pt+Math.imul(de,we)|0,st=st+Math.imul(de,Ue)|0,st=st+Math.imul(se,we)|0,tt=tt+Math.imul(se,Ue)|0,pt=pt+Math.imul(Jt,or)|0,st=st+Math.imul(Jt,Ar)|0,st=st+Math.imul(ge,or)|0,tt=tt+Math.imul(ge,Ar)|0,pt=pt+Math.imul(Pt,pr)|0,st=st+Math.imul(Pt,Jr)|0,st=st+Math.imul(Wt,pr)|0,tt=tt+Math.imul(Wt,Jr)|0,pt=pt+Math.imul(ut,Hn)|0,st=st+Math.imul(ut,Kn)|0,st=st+Math.imul(wt,Hn)|0,tt=tt+Math.imul(wt,Kn)|0,pt=pt+Math.imul(it,ii)|0,st=st+Math.imul(it,qn)|0,st=st+Math.imul(Y,ii)|0,tt=tt+Math.imul(Y,qn)|0,pt=pt+Math.imul(rt,Vi)|0,st=st+Math.imul(rt,We)|0,st=st+Math.imul(at,Vi)|0,tt=tt+Math.imul(at,We)|0;var Li=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Li>>>26)|0,Li&=67108863,pt=Math.imul(ur,Ce),st=Math.imul(ur,Gt),st=st+Math.imul(jr,Ce)|0,tt=Math.imul(jr,Gt),pt=pt+Math.imul(He,Ct)|0,st=st+Math.imul(He,gt)|0,st=st+Math.imul(Ge,Ct)|0,tt=tt+Math.imul(Ge,gt)|0,pt=pt+Math.imul(ve,Nt)|0,st=st+Math.imul(ve,re)|0,st=st+Math.imul(oe,Nt)|0,tt=tt+Math.imul(oe,re)|0,pt=pt+Math.imul(Lt,we)|0,st=st+Math.imul(Lt,Ue)|0,st=st+Math.imul(Mt,we)|0,tt=tt+Math.imul(Mt,Ue)|0,pt=pt+Math.imul(de,or)|0,st=st+Math.imul(de,Ar)|0,st=st+Math.imul(se,or)|0,tt=tt+Math.imul(se,Ar)|0,pt=pt+Math.imul(Jt,pr)|0,st=st+Math.imul(Jt,Jr)|0,st=st+Math.imul(ge,pr)|0,tt=tt+Math.imul(ge,Jr)|0,pt=pt+Math.imul(Pt,Hn)|0,st=st+Math.imul(Pt,Kn)|0,st=st+Math.imul(Wt,Hn)|0,tt=tt+Math.imul(Wt,Kn)|0,pt=pt+Math.imul(ut,ii)|0,st=st+Math.imul(ut,qn)|0,st=st+Math.imul(wt,ii)|0,tt=tt+Math.imul(wt,qn)|0,pt=pt+Math.imul(it,Vi)|0,st=st+Math.imul(it,We)|0,st=st+Math.imul(Y,Vi)|0,tt=tt+Math.imul(Y,We)|0;var Oi=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,pt=Math.imul(ur,Ct),st=Math.imul(ur,gt),st=st+Math.imul(jr,Ct)|0,tt=Math.imul(jr,gt),pt=pt+Math.imul(He,Nt)|0,st=st+Math.imul(He,re)|0,st=st+Math.imul(Ge,Nt)|0,tt=tt+Math.imul(Ge,re)|0,pt=pt+Math.imul(ve,we)|0,st=st+Math.imul(ve,Ue)|0,st=st+Math.imul(oe,we)|0,tt=tt+Math.imul(oe,Ue)|0,pt=pt+Math.imul(Lt,or)|0,st=st+Math.imul(Lt,Ar)|0,st=st+Math.imul(Mt,or)|0,tt=tt+Math.imul(Mt,Ar)|0,pt=pt+Math.imul(de,pr)|0,st=st+Math.imul(de,Jr)|0,st=st+Math.imul(se,pr)|0,tt=tt+Math.imul(se,Jr)|0,pt=pt+Math.imul(Jt,Hn)|0,st=st+Math.imul(Jt,Kn)|0,st=st+Math.imul(ge,Hn)|0,tt=tt+Math.imul(ge,Kn)|0,pt=pt+Math.imul(Pt,ii)|0,st=st+Math.imul(Pt,qn)|0,st=st+Math.imul(Wt,ii)|0,tt=tt+Math.imul(Wt,qn)|0,pt=pt+Math.imul(ut,Vi)|0,st=st+Math.imul(ut,We)|0,st=st+Math.imul(wt,Vi)|0,tt=tt+Math.imul(wt,We)|0;var Zi=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Zi>>>26)|0,Zi&=67108863,pt=Math.imul(ur,Nt),st=Math.imul(ur,re),st=st+Math.imul(jr,Nt)|0,tt=Math.imul(jr,re),pt=pt+Math.imul(He,we)|0,st=st+Math.imul(He,Ue)|0,st=st+Math.imul(Ge,we)|0,tt=tt+Math.imul(Ge,Ue)|0,pt=pt+Math.imul(ve,or)|0,st=st+Math.imul(ve,Ar)|0,st=st+Math.imul(oe,or)|0,tt=tt+Math.imul(oe,Ar)|0,pt=pt+Math.imul(Lt,pr)|0,st=st+Math.imul(Lt,Jr)|0,st=st+Math.imul(Mt,pr)|0,tt=tt+Math.imul(Mt,Jr)|0,pt=pt+Math.imul(de,Hn)|0,st=st+Math.imul(de,Kn)|0,st=st+Math.imul(se,Hn)|0,tt=tt+Math.imul(se,Kn)|0,pt=pt+Math.imul(Jt,ii)|0,st=st+Math.imul(Jt,qn)|0,st=st+Math.imul(ge,ii)|0,tt=tt+Math.imul(ge,qn)|0,pt=pt+Math.imul(Pt,Vi)|0,st=st+Math.imul(Pt,We)|0,st=st+Math.imul(Wt,Vi)|0,tt=tt+Math.imul(Wt,We)|0;var li=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(li>>>26)|0,li&=67108863,pt=Math.imul(ur,we),st=Math.imul(ur,Ue),st=st+Math.imul(jr,we)|0,tt=Math.imul(jr,Ue),pt=pt+Math.imul(He,or)|0,st=st+Math.imul(He,Ar)|0,st=st+Math.imul(Ge,or)|0,tt=tt+Math.imul(Ge,Ar)|0,pt=pt+Math.imul(ve,pr)|0,st=st+Math.imul(ve,Jr)|0,st=st+Math.imul(oe,pr)|0,tt=tt+Math.imul(oe,Jr)|0,pt=pt+Math.imul(Lt,Hn)|0,st=st+Math.imul(Lt,Kn)|0,st=st+Math.imul(Mt,Hn)|0,tt=tt+Math.imul(Mt,Kn)|0,pt=pt+Math.imul(de,ii)|0,st=st+Math.imul(de,qn)|0,st=st+Math.imul(se,ii)|0,tt=tt+Math.imul(se,qn)|0,pt=pt+Math.imul(Jt,Vi)|0,st=st+Math.imul(Jt,We)|0,st=st+Math.imul(ge,Vi)|0,tt=tt+Math.imul(ge,We)|0;var La=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(La>>>26)|0,La&=67108863,pt=Math.imul(ur,or),st=Math.imul(ur,Ar),st=st+Math.imul(jr,or)|0,tt=Math.imul(jr,Ar),pt=pt+Math.imul(He,pr)|0,st=st+Math.imul(He,Jr)|0,st=st+Math.imul(Ge,pr)|0,tt=tt+Math.imul(Ge,Jr)|0,pt=pt+Math.imul(ve,Hn)|0,st=st+Math.imul(ve,Kn)|0,st=st+Math.imul(oe,Hn)|0,tt=tt+Math.imul(oe,Kn)|0,pt=pt+Math.imul(Lt,ii)|0,st=st+Math.imul(Lt,qn)|0,st=st+Math.imul(Mt,ii)|0,tt=tt+Math.imul(Mt,qn)|0,pt=pt+Math.imul(de,Vi)|0,st=st+Math.imul(de,We)|0,st=st+Math.imul(se,Vi)|0,tt=tt+Math.imul(se,We)|0;var Wa=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,pt=Math.imul(ur,pr),st=Math.imul(ur,Jr),st=st+Math.imul(jr,pr)|0,tt=Math.imul(jr,Jr),pt=pt+Math.imul(He,Hn)|0,st=st+Math.imul(He,Kn)|0,st=st+Math.imul(Ge,Hn)|0,tt=tt+Math.imul(Ge,Kn)|0,pt=pt+Math.imul(ve,ii)|0,st=st+Math.imul(ve,qn)|0,st=st+Math.imul(oe,ii)|0,tt=tt+Math.imul(oe,qn)|0,pt=pt+Math.imul(Lt,Vi)|0,st=st+Math.imul(Lt,We)|0,st=st+Math.imul(Mt,Vi)|0,tt=tt+Math.imul(Mt,We)|0;var ze=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ze>>>26)|0,ze&=67108863,pt=Math.imul(ur,Hn),st=Math.imul(ur,Kn),st=st+Math.imul(jr,Hn)|0,tt=Math.imul(jr,Kn),pt=pt+Math.imul(He,ii)|0,st=st+Math.imul(He,qn)|0,st=st+Math.imul(Ge,ii)|0,tt=tt+Math.imul(Ge,qn)|0,pt=pt+Math.imul(ve,Vi)|0,st=st+Math.imul(ve,We)|0,st=st+Math.imul(oe,Vi)|0,tt=tt+Math.imul(oe,We)|0;var Pe=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,pt=Math.imul(ur,ii),st=Math.imul(ur,qn),st=st+Math.imul(jr,ii)|0,tt=Math.imul(jr,qn),pt=pt+Math.imul(He,Vi)|0,st=st+Math.imul(He,We)|0,st=st+Math.imul(Ge,Vi)|0,tt=tt+Math.imul(Ge,We)|0;var Rr=(yt+pt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,pt=Math.imul(ur,Vi),st=Math.imul(ur,We),st=st+Math.imul(jr,Vi)|0,tt=Math.imul(jr,We);var qr=(yt+pt|0)+((st&8191)<<13)|0;return yt=(tt+(st>>>13)|0)+(qr>>>26)|0,qr&=67108863,lt[0]=rr,lt[1]=fr,lt[2]=_r,lt[3]=Qr,lt[4]=Cn,lt[5]=bn,lt[6]=An,lt[7]=ci,lt[8]=xi,lt[9]=Li,lt[10]=Oi,lt[11]=Zi,lt[12]=li,lt[13]=La,lt[14]=Wa,lt[15]=ze,lt[16]=Pe,lt[17]=Rr,lt[18]=qr,yt!==0&&(lt[19]=yt,W.length++),W};Math.imul||(M=C);function E(F,U,W){W.negative=U.negative^F.negative,W.length=F.length+U.length;for(var q=0,X=0,lt=0;lt>>26)|0,X+=yt>>>26,yt&=67108863}W.words[lt]=pt,q=yt,yt=X}return q!==0?W.words[lt]=q:W.length--,W.strip()}function A(F,U,W){var q=new h;return q.mulp(F,U,W)}s.prototype.mulTo=function(F,U){var W,q=this.length+F.length;return this.length===10&&F.length===10?W=M(this,F,U):q<63?W=C(this,F,U):q<1024?W=E(this,F,U):W=A(this,F,U),W};function h(F,U){this.x=F,this.y=U}h.prototype.makeRBT=function(F){for(var U=new Array(F),W=s.prototype._countBits(F)-1,q=0;q>=1;return q},h.prototype.permute=function(F,U,W,q,X,lt){for(var yt=0;yt>>1)X++;return 1<>>13,W[2*lt+1]=X&8191,X=X>>>13;for(lt=2*U;lt>=26,U+=q/67108864|0,U+=X>>>26,this.words[W]=X&67108863}return U!==0&&(this.words[W]=U,this.length++),this},s.prototype.muln=function(F){return this.clone().imuln(F)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(F){var U=_(F);if(U.length===0)return new s(1);for(var W=this,q=0;q=0);var U=F%26,W=(F-U)/26,q=67108863>>>26-U<<26-U,X;if(U!==0){var lt=0;for(X=0;X>>26-U}lt&&(this.words[X]=lt,this.length++)}if(W!==0){for(X=this.length-1;X>=0;X--)this.words[X+W]=this.words[X];for(X=0;X=0);var q;U?q=(U-U%26)/26:q=0;var X=F%26,lt=Math.min((F-X)/26,this.length),yt=67108863^67108863>>>X<lt)for(this.length-=lt,st=0;st=0&&(tt!==0||st>=q);st--){var dt=this.words[st]|0;this.words[st]=tt<<26-X|dt>>>X,tt=dt&yt}return pt&&tt!==0&&(pt.words[pt.length++]=tt),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(F,U,W){return o(this.negative===0),this.iushrn(F,U,W)},s.prototype.shln=function(F){return this.clone().ishln(F)},s.prototype.ushln=function(F){return this.clone().iushln(F)},s.prototype.shrn=function(F){return this.clone().ishrn(F)},s.prototype.ushrn=function(F){return this.clone().iushrn(F)},s.prototype.testn=function(F){o(typeof F=="number"&&F>=0);var U=F%26,W=(F-U)/26,q=1<=0);var U=F%26,W=(F-U)/26;if(o(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(U!==0&&W++,this.length=Math.min(W,this.length),U!==0){var q=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},s.prototype.isubn=function(F){if(o(typeof F=="number"),o(F<67108864),F<0)return this.iaddn(-F);if(this.negative!==0)return this.negative=0,this.iaddn(F),this.negative=1,this;if(this.words[0]-=F,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(pt/67108864|0),this.words[X+W]=lt&67108863}for(;X>26,this.words[X+W]=lt&67108863;if(yt===0)return this.strip();for(o(yt===-1),yt=0,X=0;X>26,this.words[X]=lt&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(F,U){var W=this.length-F.length,q=this.clone(),X=F,lt=X.words[X.length-1]|0,yt=this._countBits(lt);W=26-yt,W!==0&&(X=X.ushln(W),q.iushln(W),lt=X.words[X.length-1]|0);var pt=q.length-X.length,st;if(U!=="mod"){st=new s(null),st.length=pt+1,st.words=new Array(st.length);for(var tt=0;tt=0;rt--){var at=(q.words[X.length+rt]|0)*67108864+(q.words[X.length+rt-1]|0);for(at=Math.min(at/lt|0,67108863),q._ishlnsubmul(X,at,rt);q.negative!==0;)at--,q.negative=0,q._ishlnsubmul(X,1,rt),q.isZero()||(q.negative^=1);st&&(st.words[rt]=at)}return st&&st.strip(),q.strip(),U!=="div"&&W!==0&&q.iushrn(W),{div:st||null,mod:q}},s.prototype.divmod=function(F,U,W){if(o(!F.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var q,X,lt;return this.negative!==0&&F.negative===0?(lt=this.neg().divmod(F,U),U!=="mod"&&(q=lt.div.neg()),U!=="div"&&(X=lt.mod.neg(),W&&X.negative!==0&&X.iadd(F)),{div:q,mod:X}):this.negative===0&&F.negative!==0?(lt=this.divmod(F.neg(),U),U!=="mod"&&(q=lt.div.neg()),{div:q,mod:lt.mod}):(this.negative&F.negative)!==0?(lt=this.neg().divmod(F.neg(),U),U!=="div"&&(X=lt.mod.neg(),W&&X.negative!==0&&X.isub(F)),{div:lt.div,mod:X}):F.length>this.length||this.cmp(F)<0?{div:new s(0),mod:this}:F.length===1?U==="div"?{div:this.divn(F.words[0]),mod:null}:U==="mod"?{div:null,mod:new s(this.modn(F.words[0]))}:{div:this.divn(F.words[0]),mod:new s(this.modn(F.words[0]))}:this._wordDiv(F,U)},s.prototype.div=function(F){return this.divmod(F,"div",!1).div},s.prototype.mod=function(F){return this.divmod(F,"mod",!1).mod},s.prototype.umod=function(F){return this.divmod(F,"mod",!0).mod},s.prototype.divRound=function(F){var U=this.divmod(F);if(U.mod.isZero())return U.div;var W=U.div.negative!==0?U.mod.isub(F):U.mod,q=F.ushrn(1),X=F.andln(1),lt=W.cmp(q);return lt<0||X===1&<===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},s.prototype.modn=function(F){o(F<=67108863);for(var U=67108864%F,W=0,q=this.length-1;q>=0;q--)W=(U*W+(this.words[q]|0))%F;return W},s.prototype.idivn=function(F){o(F<=67108863);for(var U=0,W=this.length-1;W>=0;W--){var q=(this.words[W]|0)+U*67108864;this.words[W]=q/F|0,U=q%F}return this.strip()},s.prototype.divn=function(F){return this.clone().idivn(F)},s.prototype.egcd=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new s(1),X=new s(0),lt=new s(0),yt=new s(1),pt=0;U.isEven()&&W.isEven();)U.iushrn(1),W.iushrn(1),++pt;for(var st=W.clone(),tt=U.clone();!U.isZero();){for(var dt=0,rt=1;(U.words[0]&rt)===0&&dt<26;++dt,rt<<=1);if(dt>0)for(U.iushrn(dt);dt-- >0;)(q.isOdd()||X.isOdd())&&(q.iadd(st),X.isub(tt)),q.iushrn(1),X.iushrn(1);for(var at=0,vt=1;(W.words[0]&vt)===0&&at<26;++at,vt<<=1);if(at>0)for(W.iushrn(at);at-- >0;)(lt.isOdd()||yt.isOdd())&&(lt.iadd(st),yt.isub(tt)),lt.iushrn(1),yt.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(lt),X.isub(yt)):(W.isub(U),lt.isub(q),yt.isub(X))}return{a:lt,b:yt,gcd:W.iushln(pt)}},s.prototype._invmp=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new s(1),X=new s(0),lt=W.clone();U.cmpn(1)>0&&W.cmpn(1)>0;){for(var yt=0,pt=1;(U.words[0]&pt)===0&&yt<26;++yt,pt<<=1);if(yt>0)for(U.iushrn(yt);yt-- >0;)q.isOdd()&&q.iadd(lt),q.iushrn(1);for(var st=0,tt=1;(W.words[0]&tt)===0&&st<26;++st,tt<<=1);if(st>0)for(W.iushrn(st);st-- >0;)X.isOdd()&&X.iadd(lt),X.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(X)):(W.isub(U),X.isub(q))}var dt;return U.cmpn(1)===0?dt=q:dt=X,dt.cmpn(0)<0&&dt.iadd(F),dt},s.prototype.gcd=function(F){if(this.isZero())return F.abs();if(F.isZero())return this.abs();var U=this.clone(),W=F.clone();U.negative=0,W.negative=0;for(var q=0;U.isEven()&&W.isEven();q++)U.iushrn(1),W.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;W.isEven();)W.iushrn(1);var X=U.cmp(W);if(X<0){var lt=U;U=W,W=lt}else if(X===0||W.cmpn(1)===0)break;U.isub(W)}while(!0);return W.iushln(q)},s.prototype.invm=function(F){return this.egcd(F).a.umod(F)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(F){return this.words[0]&F},s.prototype.bincn=function(F){o(typeof F=="number");var U=F%26,W=(F-U)/26,q=1<>>26,yt&=67108863,this.words[lt]=yt}return X!==0&&(this.words[lt]=X,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(F){var U=F<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var W;if(this.length>1)W=1;else{U&&(F=-F),o(F<=67108863,"Number is too big");var q=this.words[0]|0;W=q===F?0:qF.length)return 1;if(this.length=0;W--){var q=this.words[W]|0,X=F.words[W]|0;if(q!==X){qX&&(U=1);break}}return U},s.prototype.gtn=function(F){return this.cmpn(F)===1},s.prototype.gt=function(F){return this.cmp(F)===1},s.prototype.gten=function(F){return this.cmpn(F)>=0},s.prototype.gte=function(F){return this.cmp(F)>=0},s.prototype.ltn=function(F){return this.cmpn(F)===-1},s.prototype.lt=function(F){return this.cmp(F)===-1},s.prototype.lten=function(F){return this.cmpn(F)<=0},s.prototype.lte=function(F){return this.cmp(F)<=0},s.prototype.eqn=function(F){return this.cmpn(F)===0},s.prototype.eq=function(F){return this.cmp(F)===0},s.red=function(F){return new V(F)},s.prototype.toRed=function(F){return o(!this.red,"Already a number in reduction context"),o(this.negative===0,"red works only with positives"),F.convertTo(this)._forceRed(F)},s.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(F){return this.red=F,this},s.prototype.forceRed=function(F){return o(!this.red,"Already a number in reduction context"),this._forceRed(F)},s.prototype.redAdd=function(F){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,F)},s.prototype.redIAdd=function(F){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,F)},s.prototype.redSub=function(F){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,F)},s.prototype.redISub=function(F){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,F)},s.prototype.redShl=function(F){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,F)},s.prototype.redMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.mul(this,F)},s.prototype.redIMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.imul(this,F)},s.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(F){return o(this.red&&!F.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,F)};var p={k256:null,p224:null,p192:null,p25519:null};function k(F,U){this.name=F,this.p=new s(U,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}k.prototype._tmp=function(){var F=new s(null);return F.words=new Array(Math.ceil(this.n/13)),F},k.prototype.ireduce=function(F){var U=F,W;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),W=U.bitLength();while(W>this.n);var q=W0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},k.prototype.split=function(F,U){F.iushrn(this.n,0,U)},k.prototype.imulK=function(F){return F.imul(this.k)};function w(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(w,k),w.prototype.split=function(F,U){for(var W=4194303,q=Math.min(F.length,9),X=0;X>>22,lt=yt}lt>>>=22,F.words[X-10]=lt,lt===0&&F.length>10?F.length-=10:F.length-=9},w.prototype.imulK=function(F){F.words[F.length]=0,F.words[F.length+1]=0,F.length+=2;for(var U=0,W=0;W>>=26,F.words[W]=X,U=q}return U!==0&&(F.words[F.length++]=U),F},s._prime=function(F){if(p[F])return p[F];var U;if(F==="k256")U=new w;else if(F==="p224")U=new R;else if(F==="p192")U=new O;else if(F==="p25519")U=new N;else throw new Error("Unknown prime "+F);return p[F]=U,U};function V(F){if(typeof F=="string"){var U=s._prime(F);this.m=U.p,this.prime=U}else o(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}V.prototype._verify1=function(F){o(F.negative===0,"red works only with positives"),o(F.red,"red works only with red numbers")},V.prototype._verify2=function(F,U){o((F.negative|U.negative)===0,"red works only with positives"),o(F.red&&F.red===U.red,"red works only with red numbers")},V.prototype.imod=function(F){return this.prime?this.prime.ireduce(F)._forceRed(this):F.umod(this.m)._forceRed(this)},V.prototype.neg=function(F){return F.isZero()?F.clone():this.m.sub(F)._forceRed(this)},V.prototype.add=function(F,U){this._verify2(F,U);var W=F.add(U);return W.cmp(this.m)>=0&&W.isub(this.m),W._forceRed(this)},V.prototype.iadd=function(F,U){this._verify2(F,U);var W=F.iadd(U);return W.cmp(this.m)>=0&&W.isub(this.m),W},V.prototype.sub=function(F,U){this._verify2(F,U);var W=F.sub(U);return W.cmpn(0)<0&&W.iadd(this.m),W._forceRed(this)},V.prototype.isub=function(F,U){this._verify2(F,U);var W=F.isub(U);return W.cmpn(0)<0&&W.iadd(this.m),W},V.prototype.shl=function(F,U){return this._verify1(F),this.imod(F.ushln(U))},V.prototype.imul=function(F,U){return this._verify2(F,U),this.imod(F.imul(U))},V.prototype.mul=function(F,U){return this._verify2(F,U),this.imod(F.mul(U))},V.prototype.isqr=function(F){return this.imul(F,F.clone())},V.prototype.sqr=function(F){return this.mul(F,F)},V.prototype.sqrt=function(F){if(F.isZero())return F.clone();var U=this.m.andln(3);if(o(U%2===1),U===3){var W=this.m.add(new s(1)).iushrn(2);return this.pow(F,W)}for(var q=this.m.subn(1),X=0;!q.isZero()&&q.andln(1)===0;)X++,q.iushrn(1);o(!q.isZero());var lt=new s(1).toRed(this),yt=lt.redNeg(),pt=this.m.subn(1).iushrn(1),st=this.m.bitLength();for(st=new s(2*st*st).toRed(this);this.pow(st,pt).cmp(yt)!==0;)st.redIAdd(yt);for(var tt=this.pow(st,q),dt=this.pow(F,q.addn(1).iushrn(1)),rt=this.pow(F,q),at=X;rt.cmp(lt)!==0;){for(var vt=rt,it=0;vt.cmp(lt)!==0;it++)vt=vt.redSqr();o(it=0;X--){for(var tt=U.words[X],dt=st-1;dt>=0;dt--){var rt=tt>>dt&1;if(lt!==q[0]&&(lt=this.sqr(lt)),rt===0&&yt===0){pt=0;continue}yt<<=1,yt|=rt,pt++,!(pt!==W&&(X!==0||dt!==0))&&(lt=this.mul(lt,q[yt]),pt=0,yt=0)}st=26}return lt},V.prototype.convertTo=function(F){var U=F.umod(this.m);return U===F?U.clone():U},V.prototype.convertFrom=function(F){var U=F.clone();return U.red=null,U},s.mont=function(F){return new H(F)};function H(F){V.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(H,V),H.prototype.convertTo=function(F){return this.imod(F.ushln(this.shift))},H.prototype.convertFrom=function(F){var U=this.imod(F.mul(this.rinv));return U.red=null,U},H.prototype.imul=function(F,U){if(F.isZero()||U.isZero())return F.words[0]=0,F.length=1,F;var W=F.imul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=W.isub(q).iushrn(this.shift),lt=X;return X.cmp(this.m)>=0?lt=X.isub(this.m):X.cmpn(0)<0&&(lt=X.iadd(this.m)),lt._forceRed(this)},H.prototype.mul=function(F,U){if(F.isZero()||U.isZero())return new s(0)._forceRed(this);var W=F.mul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=W.isub(q).iushrn(this.shift),lt=X;return X.cmp(this.m)>=0?lt=X.isub(this.m):X.cmpn(0)<0&&(lt=X.iadd(this.m)),lt._forceRed(this)},H.prototype.invm=function(F){var U=this.imod(F._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(t,this)},6860:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]-n[0],r[1]=a[1]-n[1],r[2]=a[2]-n[2],r[3]=a[3]-n[3],r}},6864:function(t){t.exports=e;function e(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},6867:function(t,e,r){t.exports=u;var a=r(1888),n=r(855),o=r(7150);function i(b,_){for(var C=0;C>>1;if(!(h<=0)){var p,k=a.mallocDouble(2*h*E),w=a.mallocInt32(E);if(E=s(b,h,k,w),E>0){if(h===1&&M)n.init(E),p=n.sweepComplete(h,C,0,E,k,w,0,E,k,w);else{var R=a.mallocDouble(2*h*A),O=a.mallocInt32(A);A=s(_,h,R,O),A>0&&(n.init(E+A),h===1?p=n.sweepBipartite(h,C,0,E,k,w,0,A,R,O):p=o(h,C,M,E,k,w,A,R,O),a.free(R),a.free(O))}a.free(k),a.free(w)}return p}}}var x;function y(b,_){x.push([b,_])}function v(b){return x=[],f(b,b,y,!0),x}function T(b,_){return x=[],f(b,_,y,!1),x}function u(b,_,C){switch(arguments.length){case 1:return v(b);case 2:return typeof _=="function"?f(b,b,_,!0):T(b,_);case 3:return f(b,_,C,!1);default:throw new Error("box-intersect: Invalid arguments")}}},6894:function(t){t.exports=e;function e(r,a,n,o){var i=n[1],s=n[2],f=a[1]-i,x=a[2]-s,y=Math.sin(o),v=Math.cos(o);return r[0]=a[0],r[1]=i+f*v-x*y,r[2]=s+f*y+x*v,r}},7004:function(t){t.exports=e;function e(r){for(var a=r.length,n=r[r.length-1],o=a,i=a-2;i>=0;--i){var s=n,f=r[i];n=s+f;var x=n-s,y=f-x;y&&(r[--o]=n,n=y)}for(var v=0,i=o;i=p0)&&!(p1>=hi)"),_=y("lo===p0"),C=y("lo0;){dt-=1;var vt=dt*h,it=w[vt],Y=w[vt+1],ft=w[vt+2],ut=w[vt+3],wt=w[vt+4],zt=w[vt+5],Pt=dt*p,Wt=R[Pt],Ht=R[Pt+1],Jt=zt&1,ge=!!(zt&16),he=lt,de=yt,se=st,Tt=tt;if(Jt&&(he=st,de=tt,se=lt,Tt=yt),!(zt&2&&(ft=C(U,it,Y,ft,he,de,Ht),Y>=ft))&&!(zt&4&&(Y=M(U,it,Y,ft,he,de,Wt),Y>=ft))){var Lt=ft-Y,Mt=wt-ut;if(ge){if(U*Lt*(Lt+Mt)"u"?r(1538):WeakMap,n=r(2762),o=r(8116),i=new a;function s(f){var x=i.get(f),y=x&&(x._triangleBuffer.handle||x._triangleBuffer.buffer);if(!y||!f.isBuffer(y)){var v=n(f,new Float32Array([-1,-1,-1,4,4,-1]));x=o(f,[{buffer:v,type:f.FLOAT,size:2}]),x._triangleBuffer=v,i.set(f,x)}x.bind(),f.drawArrays(f.TRIANGLES,0,3),x.unbind()}t.exports=s},7182:function(t,e,r){var a={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)};a.create();var n=a.create();t.exports=function(o,i,s,f,x,y){return a.identity(o),a.fromRotationTranslation(o,y,i),o[3]=x[0],o[7]=x[1],o[11]=x[2],o[15]=x[3],a.identity(n),f[2]!==0&&(n[9]=f[2],a.multiply(o,o,n)),f[1]!==0&&(n[9]=0,n[8]=f[1],a.multiply(o,o,n)),f[0]!==0&&(n[8]=0,n[4]=f[0],a.multiply(o,o,n)),a.scale(o,o,s),o}},7201:function(t,e,r){var a=1e-6,n=1e-6,o=r(9405),i=r(2762),s=r(8116),f=r(7766),x=r(8406),y=r(6760),v=r(7608),T=r(9618),u=r(6729),b=r(7765),_=r(1888),C=r(840),M=r(7626),E=C.meshShader,A=C.wireShader,h=C.pointShader,p=C.pickShader,k=C.pointPickShader,w=C.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function O(st,tt,dt,rt,at,vt,it,Y,ft,ut,wt,zt,Pt,Wt,Ht,Jt,ge,he,de,se,Tt,Lt,Mt,te,ve,oe,Te){this.gl=st,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=tt,this.dirty=!0,this.triShader=dt,this.lineShader=rt,this.pointShader=at,this.pickShader=vt,this.pointPickShader=it,this.contourShader=Y,this.trianglePositions=ft,this.triangleColors=wt,this.triangleNormals=Pt,this.triangleUVs=zt,this.triangleIds=ut,this.triangleVAO=Wt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Ht,this.edgeColors=ge,this.edgeUVs=he,this.edgeIds=Jt,this.edgeVAO=de,this.edgeCount=0,this.pointPositions=se,this.pointColors=Lt,this.pointUVs=Mt,this.pointSizes=te,this.pointIds=Tt,this.pointVAO=ve,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=oe,this.contourVAO=Te,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=R,this._view=R,this._projection=R,this._resolution=[1,1]}var N=O.prototype;N.isOpaque=function(){return!this.hasAlpha},N.isTransparent=function(){return this.hasAlpha},N.pickSlots=1,N.setPickBase=function(st){this.pickId=st};function V(st,tt){if(!tt||!tt.length)return 1;for(var dt=0;dtst&&dt>0){var rt=(tt[dt][0]-st)/(tt[dt][0]-tt[dt-1][0]);return tt[dt][1]*(1-rt)+rt*tt[dt-1][1]}}return 1}function H(st,tt){for(var dt=u({colormap:st,nshades:256,format:"rgba"}),rt=new Uint8Array(1024),at=0;at<256;++at){for(var vt=dt[at],it=0;it<3;++it)rt[4*at+it]=vt[it];tt?rt[4*at+3]=255*V(at/255,tt):rt[4*at+3]=255*vt[3]}return T(rt,[256,256,4],[4,0,1])}function F(st){for(var tt=st.length,dt=new Array(tt),rt=0;rt0){var Pt=this.triShader;Pt.bind(),Pt.uniforms=Y,this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Pt=this.lineShader;Pt.bind(),Pt.uniforms=Y,this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Pt=this.pointShader;Pt.bind(),Pt.uniforms=Y,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Pt=this.contourShader;Pt.bind(),Pt.uniforms=Y,this.contourVAO.bind(),tt.drawArrays(tt.LINES,0,this.contourCount),this.contourVAO.unbind()}},N.drawPick=function(st){st=st||{};for(var tt=this.gl,dt=st.model||R,rt=st.view||R,at=st.projection||R,vt=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],it=0;it<3;++it)vt[0][it]=Math.max(vt[0][it],this.clipBounds[0][it]),vt[1][it]=Math.min(vt[1][it],this.clipBounds[1][it]);this._model=[].slice.call(dt),this._view=[].slice.call(rt),this._projection=[].slice.call(at),this._resolution=[tt.drawingBufferWidth,tt.drawingBufferHeight];var Y={model:dt,view:rt,projection:at,clipBounds:vt,pickId:this.pickId/255},ft=this.pickShader;if(ft.bind(),ft.uniforms=Y,this.triangleCount>0&&(this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ft=this.pointPickShader;ft.bind(),ft.uniforms=Y,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}},N.pick=function(st){if(!st||st.id!==this.pickId)return null;for(var tt=st.value[0]+256*st.value[1]+65536*st.value[2],dt=this.cells[tt],rt=this.positions,at=new Array(dt.length),vt=0;vtMath.max(E,A)?h[2]=1:E>Math.max(M,A)?h[0]=1:h[1]=1;for(var p=0,k=0,w=0;w<3;++w)p+=C[w]*C[w],k+=h[w]*C[w];for(var w=0;w<3;++w)h[w]-=k/p*C[w];return s(h,h),h}function T(C,M,E,A,h,p,k,w){this.center=a(E),this.up=a(A),this.right=a(h),this.radius=a([p]),this.angle=a([k,w]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(C,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var R=0;R<16;++R)this.computedMatrix[R]=.5;this.recalcMatrix(0)}var u=T.prototype;u.setDistanceLimits=function(C,M){C>0?C=Math.log(C):C=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,C),this.radius.bounds[0][0]=C,this.radius.bounds[1][0]=M},u.getDistanceLimits=function(C){var M=this.radius.bounds[0];return C?(C[0]=Math.exp(M[0][0]),C[1]=Math.exp(M[1][0]),C):[Math.exp(M[0][0]),Math.exp(M[1][0])]},u.recalcMatrix=function(C){this.center.curve(C),this.up.curve(C),this.right.curve(C),this.radius.curve(C),this.angle.curve(C);for(var M=this.computedUp,E=this.computedRight,A=0,h=0,p=0;p<3;++p)h+=M[p]*E[p],A+=M[p]*M[p];for(var k=Math.sqrt(A),w=0,p=0;p<3;++p)E[p]-=M[p]*h/A,w+=E[p]*E[p],M[p]/=k;for(var R=Math.sqrt(w),p=0;p<3;++p)E[p]/=R;var O=this.computedToward;i(O,M,E),s(O,O);for(var N=Math.exp(this.computedRadius[0]),V=this.computedAngle[0],H=this.computedAngle[1],F=Math.cos(V),U=Math.sin(V),W=Math.cos(H),q=Math.sin(H),X=this.computedCenter,lt=F*W,yt=U*W,pt=q,st=-F*q,tt=-U*q,dt=W,rt=this.computedEye,at=this.computedMatrix,p=0;p<3;++p){var vt=lt*E[p]+yt*O[p]+pt*M[p];at[4*p+1]=st*E[p]+tt*O[p]+dt*M[p],at[4*p+2]=vt,at[4*p+3]=0}var it=at[1],Y=at[5],ft=at[9],ut=at[2],wt=at[6],zt=at[10],Pt=Y*zt-ft*wt,Wt=ft*ut-it*zt,Ht=it*wt-Y*ut,Jt=x(Pt,Wt,Ht);Pt/=Jt,Wt/=Jt,Ht/=Jt,at[0]=Pt,at[4]=Wt,at[8]=Ht;for(var p=0;p<3;++p)rt[p]=X[p]+at[2+4*p]*N;for(var p=0;p<3;++p){for(var w=0,ge=0;ge<3;++ge)w+=at[p+4*ge]*rt[ge];at[12+p]=-w}at[15]=1},u.getMatrix=function(C,M){this.recalcMatrix(C);var E=this.computedMatrix;if(M){for(var A=0;A<16;++A)M[A]=E[A];return M}return E};var b=[0,0,0];u.rotate=function(C,M,E,A){if(this.angle.move(C,M,E),A){this.recalcMatrix(C);var h=this.computedMatrix;b[0]=h[2],b[1]=h[6],b[2]=h[10];for(var p=this.computedUp,k=this.computedRight,w=this.computedToward,R=0;R<3;++R)h[4*R]=p[R],h[4*R+1]=k[R],h[4*R+2]=w[R];o(h,h,A,b);for(var R=0;R<3;++R)p[R]=h[4*R],k[R]=h[4*R+1];this.up.set(C,p[0],p[1],p[2]),this.right.set(C,k[0],k[1],k[2])}},u.pan=function(C,M,E,A){M=M||0,E=E||0,A=A||0,this.recalcMatrix(C);var h=this.computedMatrix;Math.exp(this.computedRadius[0]);var p=h[1],k=h[5],w=h[9],R=x(p,k,w);p/=R,k/=R,w/=R;var O=h[0],N=h[4],V=h[8],H=O*p+N*k+V*w;O-=p*H,N-=k*H,V-=w*H;var F=x(O,N,V);O/=F,N/=F,V/=F;var U=O*M+p*E,W=N*M+k*E,q=V*M+w*E;this.center.move(C,U,W,q);var X=Math.exp(this.computedRadius[0]);X=Math.max(1e-4,X+A),this.radius.set(C,Math.log(X))},u.translate=function(C,M,E,A){this.center.move(C,M||0,E||0,A||0)},u.setMatrix=function(C,M,E,A){var h=1;typeof E=="number"&&(h=E|0),(h<0||h>3)&&(h=1);var p=(h+2)%3;M||(this.recalcMatrix(C),M=this.computedMatrix);var k=M[h],w=M[h+4],R=M[h+8];if(A){var O=Math.abs(k),N=Math.abs(w),V=Math.abs(R),H=Math.max(O,N,V);O===H?(k=k<0?-1:1,w=R=0):V===H?(R=R<0?-1:1,k=w=0):(w=w<0?-1:1,k=R=0)}else{var F=x(k,w,R);k/=F,w/=F,R/=F}var U=M[p],W=M[p+4],q=M[p+8],X=U*k+W*w+q*R;U-=k*X,W-=w*X,q-=R*X;var lt=x(U,W,q);U/=lt,W/=lt,q/=lt;var yt=w*q-R*W,pt=R*U-k*q,st=k*W-w*U,tt=x(yt,pt,st);yt/=tt,pt/=tt,st/=tt,this.center.jump(C,Tt,Lt,Mt),this.radius.idle(C),this.up.jump(C,k,w,R),this.right.jump(C,U,W,q);var dt,rt;if(h===2){var at=M[1],vt=M[5],it=M[9],Y=at*U+vt*W+it*q,ft=at*yt+vt*pt+it*st;Pt<0?dt=-Math.PI/2:dt=Math.PI/2,rt=Math.atan2(ft,Y)}else{var ut=M[2],wt=M[6],zt=M[10],Pt=ut*k+wt*w+zt*R,Wt=ut*U+wt*W+zt*q,Ht=ut*yt+wt*pt+zt*st;dt=Math.asin(y(Pt)),rt=Math.atan2(Ht,Wt)}this.angle.jump(C,rt,dt),this.recalcMatrix(C);var Jt=M[2],ge=M[6],he=M[10],de=this.computedMatrix;n(de,M);var se=de[15],Tt=de[12]/se,Lt=de[13]/se,Mt=de[14]/se,te=Math.exp(this.computedRadius[0]);this.center.jump(C,Tt-Jt*te,Lt-ge*te,Mt-he*te)},u.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},u.idle=function(C){this.center.idle(C),this.up.idle(C),this.right.idle(C),this.radius.idle(C),this.angle.idle(C)},u.flush=function(C){this.center.flush(C),this.up.flush(C),this.right.flush(C),this.radius.flush(C),this.angle.flush(C)},u.setDistance=function(C,M){M>0&&this.radius.set(C,Math.log(M))},u.lookAt=function(C,M,E,A){this.recalcMatrix(C),M=M||this.computedEye,E=E||this.computedCenter,A=A||this.computedUp;var h=A[0],p=A[1],k=A[2],w=x(h,p,k);if(!(w<1e-6)){h/=w,p/=w,k/=w;var R=M[0]-E[0],O=M[1]-E[1],N=M[2]-E[2],V=x(R,O,N);if(!(V<1e-6)){R/=V,O/=V,N/=V;var H=this.computedRight,F=H[0],U=H[1],W=H[2],q=h*F+p*U+k*W;F-=q*h,U-=q*p,W-=q*k;var X=x(F,U,W);if(!(X<.01&&(F=p*N-k*O,U=k*R-h*N,W=h*O-p*R,X=x(F,U,W),X<1e-6))){F/=X,U/=X,W/=X,this.up.set(C,h,p,k),this.right.set(C,F,U,W),this.center.set(C,E[0],E[1],E[2]),this.radius.set(C,Math.log(V));var lt=p*W-k*U,yt=k*F-h*W,pt=h*U-p*F,st=x(lt,yt,pt);lt/=st,yt/=st,pt/=st;var tt=h*R+p*O+k*N,dt=F*R+U*O+W*N,rt=lt*R+yt*O+pt*N,at=Math.asin(y(tt)),vt=Math.atan2(rt,dt),it=this.angle._state,Y=it[it.length-1],ft=it[it.length-2];Y=Y%(2*Math.PI);var ut=Math.abs(Y+2*Math.PI-vt),wt=Math.abs(Y-vt),zt=Math.abs(Y-2*Math.PI-vt);ut0?F:U},l.min=function(F,U){return F.cmp(U)<0?F:U},l.prototype._init=function(F,U,W){if(typeof F=="number")return this._initNumber(F,U,W);if(typeof F=="object")return this._initArray(F,U,W);U==="hex"&&(U=16),o(U===(U|0)&&U>=2&&U<=36),F=F.toString().replace(/\s+/g,"");var q=0;F[0]==="-"&&(q++,this.negative=1),q=0;q-=3)lt=F[q]|F[q-1]<<8|F[q-2]<<16,this.words[J]|=lt<>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,J++);else if(W==="le")for(q=0,J=0;q>>26-yt&67108863,yt+=24,yt>=26&&(yt-=26,J++);return this.strip()};function x(F,U){var W=F.charCodeAt(U);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function y(F,U,W){var q=x(F,W);return W-1>=U&&(q|=x(F,W-1)<<4),q}l.prototype._parseHex=function(F,U,W){this.length=Math.ceil((F.length-U)/6),this.words=new Array(this.length);for(var q=0;q=U;q-=2)yt=y(F,U,q)<=18?(J-=18,lt+=1,this.words[lt]|=yt>>>26):J+=8;else{var mt=F.length-U;for(q=mt%2===0?U+1:U;q=18?(J-=18,lt+=1,this.words[lt]|=yt>>>26):J+=8}this.strip()};function v(F,U,W,q){for(var J=0,lt=Math.min(F.length,W),yt=U;yt=49?J+=mt-49+10:mt>=17?J+=mt-17+10:J+=mt}return J}l.prototype._parseBase=function(F,U,W){this.words=[0],this.length=1;for(var q=0,J=1;J<=67108863;J*=U)q++;q--,J=J/U|0;for(var lt=F.length-W,yt=lt%q,mt=Math.min(lt,lt-yt)+W,st=0,tt=W;tt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},l.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?""};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];l.prototype.toString=function(F,U){F=F||10,U=U|0||1;var W;if(F===16||F==="hex"){W="";for(var q=0,J=0,lt=0;lt>>24-q&16777215,J!==0||lt!==this.length-1?W=T[6-mt.length]+mt+W:W=mt+W,q+=2,q>=26&&(q-=26,lt--)}for(J!==0&&(W=J.toString(16)+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}if(F===(F|0)&&F>=2&&F<=36){var st=u[F],tt=b[F];W="";var dt=this.clone();for(dt.negative=0;!dt.isZero();){var rt=dt.modn(tt).toString(F);dt=dt.idivn(tt),dt.isZero()?W=rt+W:W=T[st-rt.length]+rt+W}for(this.isZero()&&(W="0"+W);W.length%U!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}o(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var F=this.words[0];return this.length===2?F+=this.words[1]*67108864:this.length===3&&this.words[2]===1?F+=4503599627370496+this.words[1]*67108864:this.length>2&&o(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-F:F},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(F,U){return o(typeof f<"u"),this.toArrayLike(f,F,U)},l.prototype.toArray=function(F,U){return this.toArrayLike(Array,F,U)},l.prototype.toArrayLike=function(F,U,W){var q=this.byteLength(),J=W||Math.max(1,q);o(q<=J,"byte array longer than desired length"),o(J>0,"Requested array length <= 0"),this.strip();var lt=U==="le",yt=new F(J),mt,st,tt=this.clone();if(lt){for(st=0;!tt.isZero();st++)mt=tt.andln(255),tt.iushrn(8),yt[st]=mt;for(;st=4096&&(W+=13,U>>>=13),U>=64&&(W+=7,U>>>=7),U>=8&&(W+=4,U>>>=4),U>=2&&(W+=2,U>>>=2),W+U},l.prototype._zeroBits=function(F){if(F===0)return 26;var U=F,W=0;return(U&8191)===0&&(W+=13,U>>>=13),(U&127)===0&&(W+=7,U>>>=7),(U&15)===0&&(W+=4,U>>>=4),(U&3)===0&&(W+=2,U>>>=2),(U&1)===0&&W++,W},l.prototype.bitLength=function(){var F=this.words[this.length-1],U=this._countBits(F);return(this.length-1)*26+U};function _(F){for(var U=new Array(F.bitLength()),W=0;W>>J}return U}l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var F=0,U=0;UF.length?this.clone().ior(F):F.clone().ior(this)},l.prototype.uor=function(F){return this.length>F.length?this.clone().iuor(F):F.clone().iuor(this)},l.prototype.iuand=function(F){var U;this.length>F.length?U=F:U=this;for(var W=0;WF.length?this.clone().iand(F):F.clone().iand(this)},l.prototype.uand=function(F){return this.length>F.length?this.clone().iuand(F):F.clone().iuand(this)},l.prototype.iuxor=function(F){var U,W;this.length>F.length?(U=this,W=F):(U=F,W=this);for(var q=0;qF.length?this.clone().ixor(F):F.clone().ixor(this)},l.prototype.uxor=function(F){return this.length>F.length?this.clone().iuxor(F):F.clone().iuxor(this)},l.prototype.inotn=function(F){o(typeof F=="number"&&F>=0);var U=Math.ceil(F/26)|0,W=F%26;this._expand(U),W>0&&U--;for(var q=0;q0&&(this.words[q]=~this.words[q]&67108863>>26-W),this.strip()},l.prototype.notn=function(F){return this.clone().inotn(F)},l.prototype.setn=function(F,U){o(typeof F=="number"&&F>=0);var W=F/26|0,q=F%26;return this._expand(W+1),U?this.words[W]=this.words[W]|1<F.length?(W=this,q=F):(W=F,q=this);for(var J=0,lt=0;lt>>26;for(;J!==0&<>>26;if(this.length=W.length,J!==0)this.words[this.length]=J,this.length++;else if(W!==this)for(;ltF.length?this.clone().iadd(F):F.clone().iadd(this)},l.prototype.isub=function(F){if(F.negative!==0){F.negative=0;var U=this.iadd(F);return F.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(F),this.negative=1,this._normSign();var W=this.cmp(F);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var q,J;W>0?(q=this,J=F):(q=F,J=this);for(var lt=0,yt=0;yt>26,this.words[yt]=U&67108863;for(;lt!==0&&yt>26,this.words[yt]=U&67108863;if(lt===0&&yt>>26,rt=st&67108863,at=Math.min(tt,U.length-1),vt=Math.max(0,tt-F.length+1);vt<=at;vt++){var it=tt-vt|0;J=F.words[it]|0,lt=U.words[vt]|0,yt=J*lt+rt,dt+=yt/67108864|0,rt=yt&67108863}W.words[tt]=rt|0,st=dt|0}return st!==0?W.words[tt]=st|0:W.length--,W.strip()}var M=function(F,U,W){var q=F.words,J=U.words,lt=W.words,yt=0,mt,st,tt,dt=q[0]|0,rt=dt&8191,at=dt>>>13,vt=q[1]|0,it=vt&8191,Y=vt>>>13,ft=q[2]|0,ut=ft&8191,kt=ft>>>13,It=q[3]|0,Pt=It&8191,qt=It>>>13,Wt=q[4]|0,Jt=Wt&8191,ge=Wt>>>13,fe=q[5]|0,pe=fe&8191,se=fe>>>13,Tt=q[6]|0,Lt=Tt&8191,Mt=Tt>>>13,ee=q[7]|0,ve=ee&8191,oe=ee>>>13,Te=q[8]|0,He=Te&8191,Ge=Te>>>13,cr=q[9]|0,ur=cr&8191,jr=cr>>>13,Wr=J[0]|0,br=Wr&8191,Xr=Wr>>>13,nn=J[1]|0,Le=nn&8191,Gt=nn>>>13,ne=J[2]|0,Ct=ne&8191,gt=ne>>>13,St=J[3]|0,Nt=St&8191,re=St>>>13,le=J[4]|0,we=le&8191,Ue=le>>>13,qe=J[5]|0,or=qe&8191,Sr=qe>>>13,Ar=J[6]|0,mr=Ar&8191,Qr=Ar>>>13,Hn=J[7]|0,Wn=Hn&8191,Xn=Hn>>>13,Ii=J[8]|0,oi=Ii&8191,$n=Ii>>>13,sa=J[9]|0,Zi=sa&8191,We=sa>>>13;W.negative=F.negative^U.negative,W.length=19,mt=Math.imul(rt,br),st=Math.imul(rt,Xr),st=st+Math.imul(at,br)|0,tt=Math.imul(at,Xr);var nr=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(nr>>>26)|0,nr&=67108863,mt=Math.imul(it,br),st=Math.imul(it,Xr),st=st+Math.imul(Y,br)|0,tt=Math.imul(Y,Xr),mt=mt+Math.imul(rt,Le)|0,st=st+Math.imul(rt,Gt)|0,st=st+Math.imul(at,Le)|0,tt=tt+Math.imul(at,Gt)|0;var fr=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(fr>>>26)|0,fr&=67108863,mt=Math.imul(ut,br),st=Math.imul(ut,Xr),st=st+Math.imul(kt,br)|0,tt=Math.imul(kt,Xr),mt=mt+Math.imul(it,Le)|0,st=st+Math.imul(it,Gt)|0,st=st+Math.imul(Y,Le)|0,tt=tt+Math.imul(Y,Gt)|0,mt=mt+Math.imul(rt,Ct)|0,st=st+Math.imul(rt,gt)|0,st=st+Math.imul(at,Ct)|0,tt=tt+Math.imul(at,gt)|0;var _r=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(_r>>>26)|0,_r&=67108863,mt=Math.imul(Pt,br),st=Math.imul(Pt,Xr),st=st+Math.imul(qt,br)|0,tt=Math.imul(qt,Xr),mt=mt+Math.imul(ut,Le)|0,st=st+Math.imul(ut,Gt)|0,st=st+Math.imul(kt,Le)|0,tt=tt+Math.imul(kt,Gt)|0,mt=mt+Math.imul(it,Ct)|0,st=st+Math.imul(it,gt)|0,st=st+Math.imul(Y,Ct)|0,tt=tt+Math.imul(Y,gt)|0,mt=mt+Math.imul(rt,Nt)|0,st=st+Math.imul(rt,re)|0,st=st+Math.imul(at,Nt)|0,tt=tt+Math.imul(at,re)|0;var tn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(tn>>>26)|0,tn&=67108863,mt=Math.imul(Jt,br),st=Math.imul(Jt,Xr),st=st+Math.imul(ge,br)|0,tt=Math.imul(ge,Xr),mt=mt+Math.imul(Pt,Le)|0,st=st+Math.imul(Pt,Gt)|0,st=st+Math.imul(qt,Le)|0,tt=tt+Math.imul(qt,Gt)|0,mt=mt+Math.imul(ut,Ct)|0,st=st+Math.imul(ut,gt)|0,st=st+Math.imul(kt,Ct)|0,tt=tt+Math.imul(kt,gt)|0,mt=mt+Math.imul(it,Nt)|0,st=st+Math.imul(it,re)|0,st=st+Math.imul(Y,Nt)|0,tt=tt+Math.imul(Y,re)|0,mt=mt+Math.imul(rt,we)|0,st=st+Math.imul(rt,Ue)|0,st=st+Math.imul(at,we)|0,tt=tt+Math.imul(at,Ue)|0;var Cn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,mt=Math.imul(pe,br),st=Math.imul(pe,Xr),st=st+Math.imul(se,br)|0,tt=Math.imul(se,Xr),mt=mt+Math.imul(Jt,Le)|0,st=st+Math.imul(Jt,Gt)|0,st=st+Math.imul(ge,Le)|0,tt=tt+Math.imul(ge,Gt)|0,mt=mt+Math.imul(Pt,Ct)|0,st=st+Math.imul(Pt,gt)|0,st=st+Math.imul(qt,Ct)|0,tt=tt+Math.imul(qt,gt)|0,mt=mt+Math.imul(ut,Nt)|0,st=st+Math.imul(ut,re)|0,st=st+Math.imul(kt,Nt)|0,tt=tt+Math.imul(kt,re)|0,mt=mt+Math.imul(it,we)|0,st=st+Math.imul(it,Ue)|0,st=st+Math.imul(Y,we)|0,tt=tt+Math.imul(Y,Ue)|0,mt=mt+Math.imul(rt,or)|0,st=st+Math.imul(rt,Sr)|0,st=st+Math.imul(at,or)|0,tt=tt+Math.imul(at,Sr)|0;var Tn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Tn>>>26)|0,Tn&=67108863,mt=Math.imul(Lt,br),st=Math.imul(Lt,Xr),st=st+Math.imul(Mt,br)|0,tt=Math.imul(Mt,Xr),mt=mt+Math.imul(pe,Le)|0,st=st+Math.imul(pe,Gt)|0,st=st+Math.imul(se,Le)|0,tt=tt+Math.imul(se,Gt)|0,mt=mt+Math.imul(Jt,Ct)|0,st=st+Math.imul(Jt,gt)|0,st=st+Math.imul(ge,Ct)|0,tt=tt+Math.imul(ge,gt)|0,mt=mt+Math.imul(Pt,Nt)|0,st=st+Math.imul(Pt,re)|0,st=st+Math.imul(qt,Nt)|0,tt=tt+Math.imul(qt,re)|0,mt=mt+Math.imul(ut,we)|0,st=st+Math.imul(ut,Ue)|0,st=st+Math.imul(kt,we)|0,tt=tt+Math.imul(kt,Ue)|0,mt=mt+Math.imul(it,or)|0,st=st+Math.imul(it,Sr)|0,st=st+Math.imul(Y,or)|0,tt=tt+Math.imul(Y,Sr)|0,mt=mt+Math.imul(rt,mr)|0,st=st+Math.imul(rt,Qr)|0,st=st+Math.imul(at,mr)|0,tt=tt+Math.imul(at,Qr)|0;var Mn=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,mt=Math.imul(ve,br),st=Math.imul(ve,Xr),st=st+Math.imul(oe,br)|0,tt=Math.imul(oe,Xr),mt=mt+Math.imul(Lt,Le)|0,st=st+Math.imul(Lt,Gt)|0,st=st+Math.imul(Mt,Le)|0,tt=tt+Math.imul(Mt,Gt)|0,mt=mt+Math.imul(pe,Ct)|0,st=st+Math.imul(pe,gt)|0,st=st+Math.imul(se,Ct)|0,tt=tt+Math.imul(se,gt)|0,mt=mt+Math.imul(Jt,Nt)|0,st=st+Math.imul(Jt,re)|0,st=st+Math.imul(ge,Nt)|0,tt=tt+Math.imul(ge,re)|0,mt=mt+Math.imul(Pt,we)|0,st=st+Math.imul(Pt,Ue)|0,st=st+Math.imul(qt,we)|0,tt=tt+Math.imul(qt,Ue)|0,mt=mt+Math.imul(ut,or)|0,st=st+Math.imul(ut,Sr)|0,st=st+Math.imul(kt,or)|0,tt=tt+Math.imul(kt,Sr)|0,mt=mt+Math.imul(it,mr)|0,st=st+Math.imul(it,Qr)|0,st=st+Math.imul(Y,mr)|0,tt=tt+Math.imul(Y,Qr)|0,mt=mt+Math.imul(rt,Wn)|0,st=st+Math.imul(rt,Xn)|0,st=st+Math.imul(at,Wn)|0,tt=tt+Math.imul(at,Xn)|0;var fi=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(fi>>>26)|0,fi&=67108863,mt=Math.imul(He,br),st=Math.imul(He,Xr),st=st+Math.imul(Ge,br)|0,tt=Math.imul(Ge,Xr),mt=mt+Math.imul(ve,Le)|0,st=st+Math.imul(ve,Gt)|0,st=st+Math.imul(oe,Le)|0,tt=tt+Math.imul(oe,Gt)|0,mt=mt+Math.imul(Lt,Ct)|0,st=st+Math.imul(Lt,gt)|0,st=st+Math.imul(Mt,Ct)|0,tt=tt+Math.imul(Mt,gt)|0,mt=mt+Math.imul(pe,Nt)|0,st=st+Math.imul(pe,re)|0,st=st+Math.imul(se,Nt)|0,tt=tt+Math.imul(se,re)|0,mt=mt+Math.imul(Jt,we)|0,st=st+Math.imul(Jt,Ue)|0,st=st+Math.imul(ge,we)|0,tt=tt+Math.imul(ge,Ue)|0,mt=mt+Math.imul(Pt,or)|0,st=st+Math.imul(Pt,Sr)|0,st=st+Math.imul(qt,or)|0,tt=tt+Math.imul(qt,Sr)|0,mt=mt+Math.imul(ut,mr)|0,st=st+Math.imul(ut,Qr)|0,st=st+Math.imul(kt,mr)|0,tt=tt+Math.imul(kt,Qr)|0,mt=mt+Math.imul(it,Wn)|0,st=st+Math.imul(it,Xn)|0,st=st+Math.imul(Y,Wn)|0,tt=tt+Math.imul(Y,Xn)|0,mt=mt+Math.imul(rt,oi)|0,st=st+Math.imul(rt,$n)|0,st=st+Math.imul(at,oi)|0,tt=tt+Math.imul(at,$n)|0;var ki=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ki>>>26)|0,ki&=67108863,mt=Math.imul(ur,br),st=Math.imul(ur,Xr),st=st+Math.imul(jr,br)|0,tt=Math.imul(jr,Xr),mt=mt+Math.imul(He,Le)|0,st=st+Math.imul(He,Gt)|0,st=st+Math.imul(Ge,Le)|0,tt=tt+Math.imul(Ge,Gt)|0,mt=mt+Math.imul(ve,Ct)|0,st=st+Math.imul(ve,gt)|0,st=st+Math.imul(oe,Ct)|0,tt=tt+Math.imul(oe,gt)|0,mt=mt+Math.imul(Lt,Nt)|0,st=st+Math.imul(Lt,re)|0,st=st+Math.imul(Mt,Nt)|0,tt=tt+Math.imul(Mt,re)|0,mt=mt+Math.imul(pe,we)|0,st=st+Math.imul(pe,Ue)|0,st=st+Math.imul(se,we)|0,tt=tt+Math.imul(se,Ue)|0,mt=mt+Math.imul(Jt,or)|0,st=st+Math.imul(Jt,Sr)|0,st=st+Math.imul(ge,or)|0,tt=tt+Math.imul(ge,Sr)|0,mt=mt+Math.imul(Pt,mr)|0,st=st+Math.imul(Pt,Qr)|0,st=st+Math.imul(qt,mr)|0,tt=tt+Math.imul(qt,Qr)|0,mt=mt+Math.imul(ut,Wn)|0,st=st+Math.imul(ut,Xn)|0,st=st+Math.imul(kt,Wn)|0,tt=tt+Math.imul(kt,Xn)|0,mt=mt+Math.imul(it,oi)|0,st=st+Math.imul(it,$n)|0,st=st+Math.imul(Y,oi)|0,tt=tt+Math.imul(Y,$n)|0,mt=mt+Math.imul(rt,Zi)|0,st=st+Math.imul(rt,We)|0,st=st+Math.imul(at,Zi)|0,tt=tt+Math.imul(at,We)|0;var Oi=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,mt=Math.imul(ur,Le),st=Math.imul(ur,Gt),st=st+Math.imul(jr,Le)|0,tt=Math.imul(jr,Gt),mt=mt+Math.imul(He,Ct)|0,st=st+Math.imul(He,gt)|0,st=st+Math.imul(Ge,Ct)|0,tt=tt+Math.imul(Ge,gt)|0,mt=mt+Math.imul(ve,Nt)|0,st=st+Math.imul(ve,re)|0,st=st+Math.imul(oe,Nt)|0,tt=tt+Math.imul(oe,re)|0,mt=mt+Math.imul(Lt,we)|0,st=st+Math.imul(Lt,Ue)|0,st=st+Math.imul(Mt,we)|0,tt=tt+Math.imul(Mt,Ue)|0,mt=mt+Math.imul(pe,or)|0,st=st+Math.imul(pe,Sr)|0,st=st+Math.imul(se,or)|0,tt=tt+Math.imul(se,Sr)|0,mt=mt+Math.imul(Jt,mr)|0,st=st+Math.imul(Jt,Qr)|0,st=st+Math.imul(ge,mr)|0,tt=tt+Math.imul(ge,Qr)|0,mt=mt+Math.imul(Pt,Wn)|0,st=st+Math.imul(Pt,Xn)|0,st=st+Math.imul(qt,Wn)|0,tt=tt+Math.imul(qt,Xn)|0,mt=mt+Math.imul(ut,oi)|0,st=st+Math.imul(ut,$n)|0,st=st+Math.imul(kt,oi)|0,tt=tt+Math.imul(kt,$n)|0,mt=mt+Math.imul(it,Zi)|0,st=st+Math.imul(it,We)|0,st=st+Math.imul(Y,Zi)|0,tt=tt+Math.imul(Y,We)|0;var ji=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ji>>>26)|0,ji&=67108863,mt=Math.imul(ur,Ct),st=Math.imul(ur,gt),st=st+Math.imul(jr,Ct)|0,tt=Math.imul(jr,gt),mt=mt+Math.imul(He,Nt)|0,st=st+Math.imul(He,re)|0,st=st+Math.imul(Ge,Nt)|0,tt=tt+Math.imul(Ge,re)|0,mt=mt+Math.imul(ve,we)|0,st=st+Math.imul(ve,Ue)|0,st=st+Math.imul(oe,we)|0,tt=tt+Math.imul(oe,Ue)|0,mt=mt+Math.imul(Lt,or)|0,st=st+Math.imul(Lt,Sr)|0,st=st+Math.imul(Mt,or)|0,tt=tt+Math.imul(Mt,Sr)|0,mt=mt+Math.imul(pe,mr)|0,st=st+Math.imul(pe,Qr)|0,st=st+Math.imul(se,mr)|0,tt=tt+Math.imul(se,Qr)|0,mt=mt+Math.imul(Jt,Wn)|0,st=st+Math.imul(Jt,Xn)|0,st=st+Math.imul(ge,Wn)|0,tt=tt+Math.imul(ge,Xn)|0,mt=mt+Math.imul(Pt,oi)|0,st=st+Math.imul(Pt,$n)|0,st=st+Math.imul(qt,oi)|0,tt=tt+Math.imul(qt,$n)|0,mt=mt+Math.imul(ut,Zi)|0,st=st+Math.imul(ut,We)|0,st=st+Math.imul(kt,Zi)|0,tt=tt+Math.imul(kt,We)|0;var Xi=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,mt=Math.imul(ur,Nt),st=Math.imul(ur,re),st=st+Math.imul(jr,Nt)|0,tt=Math.imul(jr,re),mt=mt+Math.imul(He,we)|0,st=st+Math.imul(He,Ue)|0,st=st+Math.imul(Ge,we)|0,tt=tt+Math.imul(Ge,Ue)|0,mt=mt+Math.imul(ve,or)|0,st=st+Math.imul(ve,Sr)|0,st=st+Math.imul(oe,or)|0,tt=tt+Math.imul(oe,Sr)|0,mt=mt+Math.imul(Lt,mr)|0,st=st+Math.imul(Lt,Qr)|0,st=st+Math.imul(Mt,mr)|0,tt=tt+Math.imul(Mt,Qr)|0,mt=mt+Math.imul(pe,Wn)|0,st=st+Math.imul(pe,Xn)|0,st=st+Math.imul(se,Wn)|0,tt=tt+Math.imul(se,Xn)|0,mt=mt+Math.imul(Jt,oi)|0,st=st+Math.imul(Jt,$n)|0,st=st+Math.imul(ge,oi)|0,tt=tt+Math.imul(ge,$n)|0,mt=mt+Math.imul(Pt,Zi)|0,st=st+Math.imul(Pt,We)|0,st=st+Math.imul(qt,Zi)|0,tt=tt+Math.imul(qt,We)|0;var ci=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ci>>>26)|0,ci&=67108863,mt=Math.imul(ur,we),st=Math.imul(ur,Ue),st=st+Math.imul(jr,we)|0,tt=Math.imul(jr,Ue),mt=mt+Math.imul(He,or)|0,st=st+Math.imul(He,Sr)|0,st=st+Math.imul(Ge,or)|0,tt=tt+Math.imul(Ge,Sr)|0,mt=mt+Math.imul(ve,mr)|0,st=st+Math.imul(ve,Qr)|0,st=st+Math.imul(oe,mr)|0,tt=tt+Math.imul(oe,Qr)|0,mt=mt+Math.imul(Lt,Wn)|0,st=st+Math.imul(Lt,Xn)|0,st=st+Math.imul(Mt,Wn)|0,tt=tt+Math.imul(Mt,Xn)|0,mt=mt+Math.imul(pe,oi)|0,st=st+Math.imul(pe,$n)|0,st=st+Math.imul(se,oi)|0,tt=tt+Math.imul(se,$n)|0,mt=mt+Math.imul(Jt,Zi)|0,st=st+Math.imul(Jt,We)|0,st=st+Math.imul(ge,Zi)|0,tt=tt+Math.imul(ge,We)|0;var za=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(za>>>26)|0,za&=67108863,mt=Math.imul(ur,or),st=Math.imul(ur,Sr),st=st+Math.imul(jr,or)|0,tt=Math.imul(jr,Sr),mt=mt+Math.imul(He,mr)|0,st=st+Math.imul(He,Qr)|0,st=st+Math.imul(Ge,mr)|0,tt=tt+Math.imul(Ge,Qr)|0,mt=mt+Math.imul(ve,Wn)|0,st=st+Math.imul(ve,Xn)|0,st=st+Math.imul(oe,Wn)|0,tt=tt+Math.imul(oe,Xn)|0,mt=mt+Math.imul(Lt,oi)|0,st=st+Math.imul(Lt,$n)|0,st=st+Math.imul(Mt,oi)|0,tt=tt+Math.imul(Mt,$n)|0,mt=mt+Math.imul(pe,Zi)|0,st=st+Math.imul(pe,We)|0,st=st+Math.imul(se,Zi)|0,tt=tt+Math.imul(se,We)|0;var Wa=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,mt=Math.imul(ur,mr),st=Math.imul(ur,Qr),st=st+Math.imul(jr,mr)|0,tt=Math.imul(jr,Qr),mt=mt+Math.imul(He,Wn)|0,st=st+Math.imul(He,Xn)|0,st=st+Math.imul(Ge,Wn)|0,tt=tt+Math.imul(Ge,Xn)|0,mt=mt+Math.imul(ve,oi)|0,st=st+Math.imul(ve,$n)|0,st=st+Math.imul(oe,oi)|0,tt=tt+Math.imul(oe,$n)|0,mt=mt+Math.imul(Lt,Zi)|0,st=st+Math.imul(Lt,We)|0,st=st+Math.imul(Mt,Zi)|0,tt=tt+Math.imul(Mt,We)|0;var ze=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(ze>>>26)|0,ze&=67108863,mt=Math.imul(ur,Wn),st=Math.imul(ur,Xn),st=st+Math.imul(jr,Wn)|0,tt=Math.imul(jr,Xn),mt=mt+Math.imul(He,oi)|0,st=st+Math.imul(He,$n)|0,st=st+Math.imul(Ge,oi)|0,tt=tt+Math.imul(Ge,$n)|0,mt=mt+Math.imul(ve,Zi)|0,st=st+Math.imul(ve,We)|0,st=st+Math.imul(oe,Zi)|0,tt=tt+Math.imul(oe,We)|0;var Ie=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,mt=Math.imul(ur,oi),st=Math.imul(ur,$n),st=st+Math.imul(jr,oi)|0,tt=Math.imul(jr,$n),mt=mt+Math.imul(He,Zi)|0,st=st+Math.imul(He,We)|0,st=st+Math.imul(Ge,Zi)|0,tt=tt+Math.imul(Ge,We)|0;var Rr=(yt+mt|0)+((st&8191)<<13)|0;yt=(tt+(st>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,mt=Math.imul(ur,Zi),st=Math.imul(ur,We),st=st+Math.imul(jr,Zi)|0,tt=Math.imul(jr,We);var $r=(yt+mt|0)+((st&8191)<<13)|0;return yt=(tt+(st>>>13)|0)+($r>>>26)|0,$r&=67108863,lt[0]=nr,lt[1]=fr,lt[2]=_r,lt[3]=tn,lt[4]=Cn,lt[5]=Tn,lt[6]=Mn,lt[7]=fi,lt[8]=ki,lt[9]=Oi,lt[10]=ji,lt[11]=Xi,lt[12]=ci,lt[13]=za,lt[14]=Wa,lt[15]=ze,lt[16]=Ie,lt[17]=Rr,lt[18]=$r,yt!==0&&(lt[19]=yt,W.length++),W};Math.imul||(M=P);function C(F,U,W){W.negative=U.negative^F.negative,W.length=F.length+U.length;for(var q=0,J=0,lt=0;lt>>26)|0,J+=yt>>>26,yt&=67108863}W.words[lt]=mt,q=yt,yt=J}return q!==0?W.words[lt]=q:W.length--,W.strip()}function A(F,U,W){var q=new h;return q.mulp(F,U,W)}l.prototype.mulTo=function(F,U){var W,q=this.length+F.length;return this.length===10&&F.length===10?W=M(this,F,U):q<63?W=P(this,F,U):q<1024?W=C(this,F,U):W=A(this,F,U),W};function h(F,U){this.x=F,this.y=U}h.prototype.makeRBT=function(F){for(var U=new Array(F),W=l.prototype._countBits(F)-1,q=0;q>=1;return q},h.prototype.permute=function(F,U,W,q,J,lt){for(var yt=0;yt>>1)J++;return 1<>>13,W[2*lt+1]=J&8191,J=J>>>13;for(lt=2*U;lt>=26,U+=q/67108864|0,U+=J>>>26,this.words[W]=J&67108863}return U!==0&&(this.words[W]=U,this.length++),this},l.prototype.muln=function(F){return this.clone().imuln(F)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(F){var U=_(F);if(U.length===0)return new l(1);for(var W=this,q=0;q=0);var U=F%26,W=(F-U)/26,q=67108863>>>26-U<<26-U,J;if(U!==0){var lt=0;for(J=0;J>>26-U}lt&&(this.words[J]=lt,this.length++)}if(W!==0){for(J=this.length-1;J>=0;J--)this.words[J+W]=this.words[J];for(J=0;J=0);var q;U?q=(U-U%26)/26:q=0;var J=F%26,lt=Math.min((F-J)/26,this.length),yt=67108863^67108863>>>J<lt)for(this.length-=lt,st=0;st=0&&(tt!==0||st>=q);st--){var dt=this.words[st]|0;this.words[st]=tt<<26-J|dt>>>J,tt=dt&yt}return mt&&tt!==0&&(mt.words[mt.length++]=tt),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(F,U,W){return o(this.negative===0),this.iushrn(F,U,W)},l.prototype.shln=function(F){return this.clone().ishln(F)},l.prototype.ushln=function(F){return this.clone().iushln(F)},l.prototype.shrn=function(F){return this.clone().ishrn(F)},l.prototype.ushrn=function(F){return this.clone().iushrn(F)},l.prototype.testn=function(F){o(typeof F=="number"&&F>=0);var U=F%26,W=(F-U)/26,q=1<=0);var U=F%26,W=(F-U)/26;if(o(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(U!==0&&W++,this.length=Math.min(W,this.length),U!==0){var q=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},l.prototype.isubn=function(F){if(o(typeof F=="number"),o(F<67108864),F<0)return this.iaddn(-F);if(this.negative!==0)return this.negative=0,this.iaddn(F),this.negative=1,this;if(this.words[0]-=F,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(mt/67108864|0),this.words[J+W]=lt&67108863}for(;J>26,this.words[J+W]=lt&67108863;if(yt===0)return this.strip();for(o(yt===-1),yt=0,J=0;J>26,this.words[J]=lt&67108863;return this.negative=1,this.strip()},l.prototype._wordDiv=function(F,U){var W=this.length-F.length,q=this.clone(),J=F,lt=J.words[J.length-1]|0,yt=this._countBits(lt);W=26-yt,W!==0&&(J=J.ushln(W),q.iushln(W),lt=J.words[J.length-1]|0);var mt=q.length-J.length,st;if(U!=="mod"){st=new l(null),st.length=mt+1,st.words=new Array(st.length);for(var tt=0;tt=0;rt--){var at=(q.words[J.length+rt]|0)*67108864+(q.words[J.length+rt-1]|0);for(at=Math.min(at/lt|0,67108863),q._ishlnsubmul(J,at,rt);q.negative!==0;)at--,q.negative=0,q._ishlnsubmul(J,1,rt),q.isZero()||(q.negative^=1);st&&(st.words[rt]=at)}return st&&st.strip(),q.strip(),U!=="div"&&W!==0&&q.iushrn(W),{div:st||null,mod:q}},l.prototype.divmod=function(F,U,W){if(o(!F.isZero()),this.isZero())return{div:new l(0),mod:new l(0)};var q,J,lt;return this.negative!==0&&F.negative===0?(lt=this.neg().divmod(F,U),U!=="mod"&&(q=lt.div.neg()),U!=="div"&&(J=lt.mod.neg(),W&&J.negative!==0&&J.iadd(F)),{div:q,mod:J}):this.negative===0&&F.negative!==0?(lt=this.divmod(F.neg(),U),U!=="mod"&&(q=lt.div.neg()),{div:q,mod:lt.mod}):(this.negative&F.negative)!==0?(lt=this.neg().divmod(F.neg(),U),U!=="div"&&(J=lt.mod.neg(),W&&J.negative!==0&&J.isub(F)),{div:lt.div,mod:J}):F.length>this.length||this.cmp(F)<0?{div:new l(0),mod:this}:F.length===1?U==="div"?{div:this.divn(F.words[0]),mod:null}:U==="mod"?{div:null,mod:new l(this.modn(F.words[0]))}:{div:this.divn(F.words[0]),mod:new l(this.modn(F.words[0]))}:this._wordDiv(F,U)},l.prototype.div=function(F){return this.divmod(F,"div",!1).div},l.prototype.mod=function(F){return this.divmod(F,"mod",!1).mod},l.prototype.umod=function(F){return this.divmod(F,"mod",!0).mod},l.prototype.divRound=function(F){var U=this.divmod(F);if(U.mod.isZero())return U.div;var W=U.div.negative!==0?U.mod.isub(F):U.mod,q=F.ushrn(1),J=F.andln(1),lt=W.cmp(q);return lt<0||J===1&<===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},l.prototype.modn=function(F){o(F<=67108863);for(var U=67108864%F,W=0,q=this.length-1;q>=0;q--)W=(U*W+(this.words[q]|0))%F;return W},l.prototype.idivn=function(F){o(F<=67108863);for(var U=0,W=this.length-1;W>=0;W--){var q=(this.words[W]|0)+U*67108864;this.words[W]=q/F|0,U=q%F}return this.strip()},l.prototype.divn=function(F){return this.clone().idivn(F)},l.prototype.egcd=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new l(1),J=new l(0),lt=new l(0),yt=new l(1),mt=0;U.isEven()&&W.isEven();)U.iushrn(1),W.iushrn(1),++mt;for(var st=W.clone(),tt=U.clone();!U.isZero();){for(var dt=0,rt=1;(U.words[0]&rt)===0&&dt<26;++dt,rt<<=1);if(dt>0)for(U.iushrn(dt);dt-- >0;)(q.isOdd()||J.isOdd())&&(q.iadd(st),J.isub(tt)),q.iushrn(1),J.iushrn(1);for(var at=0,vt=1;(W.words[0]&vt)===0&&at<26;++at,vt<<=1);if(at>0)for(W.iushrn(at);at-- >0;)(lt.isOdd()||yt.isOdd())&&(lt.iadd(st),yt.isub(tt)),lt.iushrn(1),yt.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(lt),J.isub(yt)):(W.isub(U),lt.isub(q),yt.isub(J))}return{a:lt,b:yt,gcd:W.iushln(mt)}},l.prototype._invmp=function(F){o(F.negative===0),o(!F.isZero());var U=this,W=F.clone();U.negative!==0?U=U.umod(F):U=U.clone();for(var q=new l(1),J=new l(0),lt=W.clone();U.cmpn(1)>0&&W.cmpn(1)>0;){for(var yt=0,mt=1;(U.words[0]&mt)===0&&yt<26;++yt,mt<<=1);if(yt>0)for(U.iushrn(yt);yt-- >0;)q.isOdd()&&q.iadd(lt),q.iushrn(1);for(var st=0,tt=1;(W.words[0]&tt)===0&&st<26;++st,tt<<=1);if(st>0)for(W.iushrn(st);st-- >0;)J.isOdd()&&J.iadd(lt),J.iushrn(1);U.cmp(W)>=0?(U.isub(W),q.isub(J)):(W.isub(U),J.isub(q))}var dt;return U.cmpn(1)===0?dt=q:dt=J,dt.cmpn(0)<0&&dt.iadd(F),dt},l.prototype.gcd=function(F){if(this.isZero())return F.abs();if(F.isZero())return this.abs();var U=this.clone(),W=F.clone();U.negative=0,W.negative=0;for(var q=0;U.isEven()&&W.isEven();q++)U.iushrn(1),W.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;W.isEven();)W.iushrn(1);var J=U.cmp(W);if(J<0){var lt=U;U=W,W=lt}else if(J===0||W.cmpn(1)===0)break;U.isub(W)}while(!0);return W.iushln(q)},l.prototype.invm=function(F){return this.egcd(F).a.umod(F)},l.prototype.isEven=function(){return(this.words[0]&1)===0},l.prototype.isOdd=function(){return(this.words[0]&1)===1},l.prototype.andln=function(F){return this.words[0]&F},l.prototype.bincn=function(F){o(typeof F=="number");var U=F%26,W=(F-U)/26,q=1<>>26,yt&=67108863,this.words[lt]=yt}return J!==0&&(this.words[lt]=J,this.length++),this},l.prototype.isZero=function(){return this.length===1&&this.words[0]===0},l.prototype.cmpn=function(F){var U=F<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var W;if(this.length>1)W=1;else{U&&(F=-F),o(F<=67108863,"Number is too big");var q=this.words[0]|0;W=q===F?0:qF.length)return 1;if(this.length=0;W--){var q=this.words[W]|0,J=F.words[W]|0;if(q!==J){qJ&&(U=1);break}}return U},l.prototype.gtn=function(F){return this.cmpn(F)===1},l.prototype.gt=function(F){return this.cmp(F)===1},l.prototype.gten=function(F){return this.cmpn(F)>=0},l.prototype.gte=function(F){return this.cmp(F)>=0},l.prototype.ltn=function(F){return this.cmpn(F)===-1},l.prototype.lt=function(F){return this.cmp(F)===-1},l.prototype.lten=function(F){return this.cmpn(F)<=0},l.prototype.lte=function(F){return this.cmp(F)<=0},l.prototype.eqn=function(F){return this.cmpn(F)===0},l.prototype.eq=function(F){return this.cmp(F)===0},l.red=function(F){return new V(F)},l.prototype.toRed=function(F){return o(!this.red,"Already a number in reduction context"),o(this.negative===0,"red works only with positives"),F.convertTo(this)._forceRed(F)},l.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(F){return this.red=F,this},l.prototype.forceRed=function(F){return o(!this.red,"Already a number in reduction context"),this._forceRed(F)},l.prototype.redAdd=function(F){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,F)},l.prototype.redIAdd=function(F){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,F)},l.prototype.redSub=function(F){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,F)},l.prototype.redISub=function(F){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,F)},l.prototype.redShl=function(F){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,F)},l.prototype.redMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.mul(this,F)},l.prototype.redIMul=function(F){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.imul(this,F)},l.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(F){return o(this.red&&!F.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,F)};var p={k256:null,p224:null,p192:null,p25519:null};function k(F,U){this.name=F,this.p=new l(U,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}k.prototype._tmp=function(){var F=new l(null);return F.words=new Array(Math.ceil(this.n/13)),F},k.prototype.ireduce=function(F){var U=F,W;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),W=U.bitLength();while(W>this.n);var q=W0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},k.prototype.split=function(F,U){F.iushrn(this.n,0,U)},k.prototype.imulK=function(F){return F.imul(this.k)};function w(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(w,k),w.prototype.split=function(F,U){for(var W=4194303,q=Math.min(F.length,9),J=0;J>>22,lt=yt}lt>>>=22,F.words[J-10]=lt,lt===0&&F.length>10?F.length-=10:F.length-=9},w.prototype.imulK=function(F){F.words[F.length]=0,F.words[F.length+1]=0,F.length+=2;for(var U=0,W=0;W>>=26,F.words[W]=J,U=q}return U!==0&&(F.words[F.length++]=U),F},l._prime=function(F){if(p[F])return p[F];var U;if(F==="k256")U=new w;else if(F==="p224")U=new R;else if(F==="p192")U=new O;else if(F==="p25519")U=new j;else throw new Error("Unknown prime "+F);return p[F]=U,U};function V(F){if(typeof F=="string"){var U=l._prime(F);this.m=U.p,this.prime=U}else o(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}V.prototype._verify1=function(F){o(F.negative===0,"red works only with positives"),o(F.red,"red works only with red numbers")},V.prototype._verify2=function(F,U){o((F.negative|U.negative)===0,"red works only with positives"),o(F.red&&F.red===U.red,"red works only with red numbers")},V.prototype.imod=function(F){return this.prime?this.prime.ireduce(F)._forceRed(this):F.umod(this.m)._forceRed(this)},V.prototype.neg=function(F){return F.isZero()?F.clone():this.m.sub(F)._forceRed(this)},V.prototype.add=function(F,U){this._verify2(F,U);var W=F.add(U);return W.cmp(this.m)>=0&&W.isub(this.m),W._forceRed(this)},V.prototype.iadd=function(F,U){this._verify2(F,U);var W=F.iadd(U);return W.cmp(this.m)>=0&&W.isub(this.m),W},V.prototype.sub=function(F,U){this._verify2(F,U);var W=F.sub(U);return W.cmpn(0)<0&&W.iadd(this.m),W._forceRed(this)},V.prototype.isub=function(F,U){this._verify2(F,U);var W=F.isub(U);return W.cmpn(0)<0&&W.iadd(this.m),W},V.prototype.shl=function(F,U){return this._verify1(F),this.imod(F.ushln(U))},V.prototype.imul=function(F,U){return this._verify2(F,U),this.imod(F.imul(U))},V.prototype.mul=function(F,U){return this._verify2(F,U),this.imod(F.mul(U))},V.prototype.isqr=function(F){return this.imul(F,F.clone())},V.prototype.sqr=function(F){return this.mul(F,F)},V.prototype.sqrt=function(F){if(F.isZero())return F.clone();var U=this.m.andln(3);if(o(U%2===1),U===3){var W=this.m.add(new l(1)).iushrn(2);return this.pow(F,W)}for(var q=this.m.subn(1),J=0;!q.isZero()&&q.andln(1)===0;)J++,q.iushrn(1);o(!q.isZero());var lt=new l(1).toRed(this),yt=lt.redNeg(),mt=this.m.subn(1).iushrn(1),st=this.m.bitLength();for(st=new l(2*st*st).toRed(this);this.pow(st,mt).cmp(yt)!==0;)st.redIAdd(yt);for(var tt=this.pow(st,q),dt=this.pow(F,q.addn(1).iushrn(1)),rt=this.pow(F,q),at=J;rt.cmp(lt)!==0;){for(var vt=rt,it=0;vt.cmp(lt)!==0;it++)vt=vt.redSqr();o(it=0;J--){for(var tt=U.words[J],dt=st-1;dt>=0;dt--){var rt=tt>>dt&1;if(lt!==q[0]&&(lt=this.sqr(lt)),rt===0&&yt===0){mt=0;continue}yt<<=1,yt|=rt,mt++,!(mt!==W&&(J!==0||dt!==0))&&(lt=this.mul(lt,q[yt]),mt=0,yt=0)}st=26}return lt},V.prototype.convertTo=function(F){var U=F.umod(this.m);return U===F?U.clone():U},V.prototype.convertFrom=function(F){var U=F.clone();return U.red=null,U},l.mont=function(F){return new H(F)};function H(F){V.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new l(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(H,V),H.prototype.convertTo=function(F){return this.imod(F.ushln(this.shift))},H.prototype.convertFrom=function(F){var U=this.imod(F.mul(this.rinv));return U.red=null,U},H.prototype.imul=function(F,U){if(F.isZero()||U.isZero())return F.words[0]=0,F.length=1,F;var W=F.imul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),J=W.isub(q).iushrn(this.shift),lt=J;return J.cmp(this.m)>=0?lt=J.isub(this.m):J.cmpn(0)<0&&(lt=J.iadd(this.m)),lt._forceRed(this)},H.prototype.mul=function(F,U){if(F.isZero()||U.isZero())return new l(0)._forceRed(this);var W=F.mul(U),q=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),J=W.isub(q).iushrn(this.shift),lt=J;return J.cmp(this.m)>=0?lt=J.isub(this.m):J.cmpn(0)<0&&(lt=J.iadd(this.m)),lt._forceRed(this)},H.prototype.invm=function(F){var U=this.imod(F._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(t,this)},6860:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]-n[0],r[1]=a[1]-n[1],r[2]=a[2]-n[2],r[3]=a[3]-n[3],r}},6864:function(t){t.exports=e;function e(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},6867:function(t,e,r){t.exports=u;var a=r(1888),n=r(855),o=r(7150);function i(b,_){for(var P=0;P>>1;if(!(h<=0)){var p,k=a.mallocDouble(2*h*C),w=a.mallocInt32(C);if(C=l(b,h,k,w),C>0){if(h===1&&M)n.init(C),p=n.sweepComplete(h,P,0,C,k,w,0,C,k,w);else{var R=a.mallocDouble(2*h*A),O=a.mallocInt32(A);A=l(_,h,R,O),A>0&&(n.init(C+A),h===1?p=n.sweepBipartite(h,P,0,C,k,w,0,A,R,O):p=o(h,P,M,C,k,w,A,R,O),a.free(R),a.free(O))}a.free(k),a.free(w)}return p}}}var x;function y(b,_){x.push([b,_])}function v(b){return x=[],f(b,b,y,!0),x}function T(b,_){return x=[],f(b,_,y,!1),x}function u(b,_,P){switch(arguments.length){case 1:return v(b);case 2:return typeof _=="function"?f(b,b,_,!0):T(b,_);case 3:return f(b,_,P,!1);default:throw new Error("box-intersect: Invalid arguments")}}},6894:function(t){t.exports=e;function e(r,a,n,o){var i=n[1],l=n[2],f=a[1]-i,x=a[2]-l,y=Math.sin(o),v=Math.cos(o);return r[0]=a[0],r[1]=i+f*v-x*y,r[2]=l+f*y+x*v,r}},7004:function(t){t.exports=e;function e(r){for(var a=r.length,n=r[r.length-1],o=a,i=a-2;i>=0;--i){var l=n,f=r[i];n=l+f;var x=n-l,y=f-x;y&&(r[--o]=n,n=y)}for(var v=0,i=o;i=p0)&&!(p1>=hi)"),_=y("lo===p0"),P=y("lo0;){dt-=1;var vt=dt*h,it=w[vt],Y=w[vt+1],ft=w[vt+2],ut=w[vt+3],kt=w[vt+4],It=w[vt+5],Pt=dt*p,qt=R[Pt],Wt=R[Pt+1],Jt=It&1,ge=!!(It&16),fe=lt,pe=yt,se=st,Tt=tt;if(Jt&&(fe=st,pe=tt,se=lt,Tt=yt),!(It&2&&(ft=P(U,it,Y,ft,fe,pe,Wt),Y>=ft))&&!(It&4&&(Y=M(U,it,Y,ft,fe,pe,qt),Y>=ft))){var Lt=ft-Y,Mt=kt-ut;if(ge){if(U*Lt*(Lt+Mt)"u"?r(1538):WeakMap,n=r(2762),o=r(8116),i=new a;function l(f){var x=i.get(f),y=x&&(x._triangleBuffer.handle||x._triangleBuffer.buffer);if(!y||!f.isBuffer(y)){var v=n(f,new Float32Array([-1,-1,-1,4,4,-1]));x=o(f,[{buffer:v,type:f.FLOAT,size:2}]),x._triangleBuffer=v,i.set(f,x)}x.bind(),f.drawArrays(f.TRIANGLES,0,3),x.unbind()}t.exports=l},7182:function(t,e,r){var a={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)};a.create();var n=a.create();t.exports=function(o,i,l,f,x,y){return a.identity(o),a.fromRotationTranslation(o,y,i),o[3]=x[0],o[7]=x[1],o[11]=x[2],o[15]=x[3],a.identity(n),f[2]!==0&&(n[9]=f[2],a.multiply(o,o,n)),f[1]!==0&&(n[9]=0,n[8]=f[1],a.multiply(o,o,n)),f[0]!==0&&(n[8]=0,n[4]=f[0],a.multiply(o,o,n)),a.scale(o,o,l),o}},7201:function(t,e,r){var a=1e-6,n=1e-6,o=r(9405),i=r(2762),l=r(8116),f=r(7766),x=r(8406),y=r(6760),v=r(7608),T=r(9618),u=r(6729),b=r(7765),_=r(1888),P=r(840),M=r(7626),C=P.meshShader,A=P.wireShader,h=P.pointShader,p=P.pickShader,k=P.pointPickShader,w=P.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function O(st,tt,dt,rt,at,vt,it,Y,ft,ut,kt,It,Pt,qt,Wt,Jt,ge,fe,pe,se,Tt,Lt,Mt,ee,ve,oe,Te){this.gl=st,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=tt,this.dirty=!0,this.triShader=dt,this.lineShader=rt,this.pointShader=at,this.pickShader=vt,this.pointPickShader=it,this.contourShader=Y,this.trianglePositions=ft,this.triangleColors=kt,this.triangleNormals=Pt,this.triangleUVs=It,this.triangleIds=ut,this.triangleVAO=qt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Wt,this.edgeColors=ge,this.edgeUVs=fe,this.edgeIds=Jt,this.edgeVAO=pe,this.edgeCount=0,this.pointPositions=se,this.pointColors=Lt,this.pointUVs=Mt,this.pointSizes=ee,this.pointIds=Tt,this.pointVAO=ve,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=oe,this.contourVAO=Te,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=R,this._view=R,this._projection=R,this._resolution=[1,1]}var j=O.prototype;j.isOpaque=function(){return!this.hasAlpha},j.isTransparent=function(){return this.hasAlpha},j.pickSlots=1,j.setPickBase=function(st){this.pickId=st};function V(st,tt){if(!tt||!tt.length)return 1;for(var dt=0;dtst&&dt>0){var rt=(tt[dt][0]-st)/(tt[dt][0]-tt[dt-1][0]);return tt[dt][1]*(1-rt)+rt*tt[dt-1][1]}}return 1}function H(st,tt){for(var dt=u({colormap:st,nshades:256,format:"rgba"}),rt=new Uint8Array(1024),at=0;at<256;++at){for(var vt=dt[at],it=0;it<3;++it)rt[4*at+it]=vt[it];tt?rt[4*at+3]=255*V(at/255,tt):rt[4*at+3]=255*vt[3]}return T(rt,[256,256,4],[4,0,1])}function F(st){for(var tt=st.length,dt=new Array(tt),rt=0;rt0){var Pt=this.triShader;Pt.bind(),Pt.uniforms=Y,this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Pt=this.lineShader;Pt.bind(),Pt.uniforms=Y,this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Pt=this.pointShader;Pt.bind(),Pt.uniforms=Y,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Pt=this.contourShader;Pt.bind(),Pt.uniforms=Y,this.contourVAO.bind(),tt.drawArrays(tt.LINES,0,this.contourCount),this.contourVAO.unbind()}},j.drawPick=function(st){st=st||{};for(var tt=this.gl,dt=st.model||R,rt=st.view||R,at=st.projection||R,vt=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],it=0;it<3;++it)vt[0][it]=Math.max(vt[0][it],this.clipBounds[0][it]),vt[1][it]=Math.min(vt[1][it],this.clipBounds[1][it]);this._model=[].slice.call(dt),this._view=[].slice.call(rt),this._projection=[].slice.call(at),this._resolution=[tt.drawingBufferWidth,tt.drawingBufferHeight];var Y={model:dt,view:rt,projection:at,clipBounds:vt,pickId:this.pickId/255},ft=this.pickShader;if(ft.bind(),ft.uniforms=Y,this.triangleCount>0&&(this.triangleVAO.bind(),tt.drawArrays(tt.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),tt.lineWidth(this.lineWidth*this.pixelRatio),tt.drawArrays(tt.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ft=this.pointPickShader;ft.bind(),ft.uniforms=Y,this.pointVAO.bind(),tt.drawArrays(tt.POINTS,0,this.pointCount),this.pointVAO.unbind()}},j.pick=function(st){if(!st||st.id!==this.pickId)return null;for(var tt=st.value[0]+256*st.value[1]+65536*st.value[2],dt=this.cells[tt],rt=this.positions,at=new Array(dt.length),vt=0;vtMath.max(C,A)?h[2]=1:C>Math.max(M,A)?h[0]=1:h[1]=1;for(var p=0,k=0,w=0;w<3;++w)p+=P[w]*P[w],k+=h[w]*P[w];for(var w=0;w<3;++w)h[w]-=k/p*P[w];return l(h,h),h}function T(P,M,C,A,h,p,k,w){this.center=a(C),this.up=a(A),this.right=a(h),this.radius=a([p]),this.angle=a([k,w]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(P,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var R=0;R<16;++R)this.computedMatrix[R]=.5;this.recalcMatrix(0)}var u=T.prototype;u.setDistanceLimits=function(P,M){P>0?P=Math.log(P):P=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,P),this.radius.bounds[0][0]=P,this.radius.bounds[1][0]=M},u.getDistanceLimits=function(P){var M=this.radius.bounds[0];return P?(P[0]=Math.exp(M[0][0]),P[1]=Math.exp(M[1][0]),P):[Math.exp(M[0][0]),Math.exp(M[1][0])]},u.recalcMatrix=function(P){this.center.curve(P),this.up.curve(P),this.right.curve(P),this.radius.curve(P),this.angle.curve(P);for(var M=this.computedUp,C=this.computedRight,A=0,h=0,p=0;p<3;++p)h+=M[p]*C[p],A+=M[p]*M[p];for(var k=Math.sqrt(A),w=0,p=0;p<3;++p)C[p]-=M[p]*h/A,w+=C[p]*C[p],M[p]/=k;for(var R=Math.sqrt(w),p=0;p<3;++p)C[p]/=R;var O=this.computedToward;i(O,M,C),l(O,O);for(var j=Math.exp(this.computedRadius[0]),V=this.computedAngle[0],H=this.computedAngle[1],F=Math.cos(V),U=Math.sin(V),W=Math.cos(H),q=Math.sin(H),J=this.computedCenter,lt=F*W,yt=U*W,mt=q,st=-F*q,tt=-U*q,dt=W,rt=this.computedEye,at=this.computedMatrix,p=0;p<3;++p){var vt=lt*C[p]+yt*O[p]+mt*M[p];at[4*p+1]=st*C[p]+tt*O[p]+dt*M[p],at[4*p+2]=vt,at[4*p+3]=0}var it=at[1],Y=at[5],ft=at[9],ut=at[2],kt=at[6],It=at[10],Pt=Y*It-ft*kt,qt=ft*ut-it*It,Wt=it*kt-Y*ut,Jt=x(Pt,qt,Wt);Pt/=Jt,qt/=Jt,Wt/=Jt,at[0]=Pt,at[4]=qt,at[8]=Wt;for(var p=0;p<3;++p)rt[p]=J[p]+at[2+4*p]*j;for(var p=0;p<3;++p){for(var w=0,ge=0;ge<3;++ge)w+=at[p+4*ge]*rt[ge];at[12+p]=-w}at[15]=1},u.getMatrix=function(P,M){this.recalcMatrix(P);var C=this.computedMatrix;if(M){for(var A=0;A<16;++A)M[A]=C[A];return M}return C};var b=[0,0,0];u.rotate=function(P,M,C,A){if(this.angle.move(P,M,C),A){this.recalcMatrix(P);var h=this.computedMatrix;b[0]=h[2],b[1]=h[6],b[2]=h[10];for(var p=this.computedUp,k=this.computedRight,w=this.computedToward,R=0;R<3;++R)h[4*R]=p[R],h[4*R+1]=k[R],h[4*R+2]=w[R];o(h,h,A,b);for(var R=0;R<3;++R)p[R]=h[4*R],k[R]=h[4*R+1];this.up.set(P,p[0],p[1],p[2]),this.right.set(P,k[0],k[1],k[2])}},u.pan=function(P,M,C,A){M=M||0,C=C||0,A=A||0,this.recalcMatrix(P);var h=this.computedMatrix;Math.exp(this.computedRadius[0]);var p=h[1],k=h[5],w=h[9],R=x(p,k,w);p/=R,k/=R,w/=R;var O=h[0],j=h[4],V=h[8],H=O*p+j*k+V*w;O-=p*H,j-=k*H,V-=w*H;var F=x(O,j,V);O/=F,j/=F,V/=F;var U=O*M+p*C,W=j*M+k*C,q=V*M+w*C;this.center.move(P,U,W,q);var J=Math.exp(this.computedRadius[0]);J=Math.max(1e-4,J+A),this.radius.set(P,Math.log(J))},u.translate=function(P,M,C,A){this.center.move(P,M||0,C||0,A||0)},u.setMatrix=function(P,M,C,A){var h=1;typeof C=="number"&&(h=C|0),(h<0||h>3)&&(h=1);var p=(h+2)%3;M||(this.recalcMatrix(P),M=this.computedMatrix);var k=M[h],w=M[h+4],R=M[h+8];if(A){var O=Math.abs(k),j=Math.abs(w),V=Math.abs(R),H=Math.max(O,j,V);O===H?(k=k<0?-1:1,w=R=0):V===H?(R=R<0?-1:1,k=w=0):(w=w<0?-1:1,k=R=0)}else{var F=x(k,w,R);k/=F,w/=F,R/=F}var U=M[p],W=M[p+4],q=M[p+8],J=U*k+W*w+q*R;U-=k*J,W-=w*J,q-=R*J;var lt=x(U,W,q);U/=lt,W/=lt,q/=lt;var yt=w*q-R*W,mt=R*U-k*q,st=k*W-w*U,tt=x(yt,mt,st);yt/=tt,mt/=tt,st/=tt,this.center.jump(P,Tt,Lt,Mt),this.radius.idle(P),this.up.jump(P,k,w,R),this.right.jump(P,U,W,q);var dt,rt;if(h===2){var at=M[1],vt=M[5],it=M[9],Y=at*U+vt*W+it*q,ft=at*yt+vt*mt+it*st;Pt<0?dt=-Math.PI/2:dt=Math.PI/2,rt=Math.atan2(ft,Y)}else{var ut=M[2],kt=M[6],It=M[10],Pt=ut*k+kt*w+It*R,qt=ut*U+kt*W+It*q,Wt=ut*yt+kt*mt+It*st;dt=Math.asin(y(Pt)),rt=Math.atan2(Wt,qt)}this.angle.jump(P,rt,dt),this.recalcMatrix(P);var Jt=M[2],ge=M[6],fe=M[10],pe=this.computedMatrix;n(pe,M);var se=pe[15],Tt=pe[12]/se,Lt=pe[13]/se,Mt=pe[14]/se,ee=Math.exp(this.computedRadius[0]);this.center.jump(P,Tt-Jt*ee,Lt-ge*ee,Mt-fe*ee)},u.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},u.idle=function(P){this.center.idle(P),this.up.idle(P),this.right.idle(P),this.radius.idle(P),this.angle.idle(P)},u.flush=function(P){this.center.flush(P),this.up.flush(P),this.right.flush(P),this.radius.flush(P),this.angle.flush(P)},u.setDistance=function(P,M){M>0&&this.radius.set(P,Math.log(M))},u.lookAt=function(P,M,C,A){this.recalcMatrix(P),M=M||this.computedEye,C=C||this.computedCenter,A=A||this.computedUp;var h=A[0],p=A[1],k=A[2],w=x(h,p,k);if(!(w<1e-6)){h/=w,p/=w,k/=w;var R=M[0]-C[0],O=M[1]-C[1],j=M[2]-C[2],V=x(R,O,j);if(!(V<1e-6)){R/=V,O/=V,j/=V;var H=this.computedRight,F=H[0],U=H[1],W=H[2],q=h*F+p*U+k*W;F-=q*h,U-=q*p,W-=q*k;var J=x(F,U,W);if(!(J<.01&&(F=p*j-k*O,U=k*R-h*j,W=h*O-p*R,J=x(F,U,W),J<1e-6))){F/=J,U/=J,W/=J,this.up.set(P,h,p,k),this.right.set(P,F,U,W),this.center.set(P,C[0],C[1],C[2]),this.radius.set(P,Math.log(V));var lt=p*W-k*U,yt=k*F-h*W,mt=h*U-p*F,st=x(lt,yt,mt);lt/=st,yt/=st,mt/=st;var tt=h*R+p*O+k*j,dt=F*R+U*O+W*j,rt=lt*R+yt*O+mt*j,at=Math.asin(y(tt)),vt=Math.atan2(rt,dt),it=this.angle._state,Y=it[it.length-1],ft=it[it.length-2];Y=Y%(2*Math.PI);var ut=Math.abs(Y+2*Math.PI-vt),kt=Math.abs(Y-vt),It=Math.abs(Y-2*Math.PI-vt);ut0)throw new Error("Invalid string. Length must be a multiple of 4");var M=_.indexOf("=");M===-1&&(M=C);var E=M===C?0:4-M%4;return[M,E]}function x(_){var C=f(_),M=C[0],E=C[1];return(M+E)*3/4-E}function y(_,C,M){return(C+M)*3/4-M}function v(_){var C,M=f(_),E=M[0],A=M[1],h=new n(y(_,E,A)),p=0,k=A>0?E-4:E,w;for(w=0;w>16&255,h[p++]=C>>8&255,h[p++]=C&255;return A===2&&(C=a[_.charCodeAt(w)]<<2|a[_.charCodeAt(w+1)]>>4,h[p++]=C&255),A===1&&(C=a[_.charCodeAt(w)]<<10|a[_.charCodeAt(w+1)]<<4|a[_.charCodeAt(w+2)]>>2,h[p++]=C>>8&255,h[p++]=C&255),h}function T(_){return r[_>>18&63]+r[_>>12&63]+r[_>>6&63]+r[_&63]}function u(_,C,M){for(var E,A=[],h=C;hk?k:p+h));return E===1?(C=_[M-1],A.push(r[C>>2]+r[C<<4&63]+"==")):E===2&&(C=(_[M-2]<<8)+_[M-1],A.push(r[C>>10]+r[C>>4&63]+r[C<<2&63]+"=")),A.join("")}},7518:function(t,e,r){var a=r(1433);function n(s,f,x,y,v,T){this.location=s,this.dimension=f,this.a=x,this.b=y,this.c=v,this.d=T}n.prototype.bind=function(s){switch(this.dimension){case 1:s.vertexAttrib1f(this.location,this.a);break;case 2:s.vertexAttrib2f(this.location,this.a,this.b);break;case 3:s.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:s.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function o(s,f,x){this.gl=s,this._ext=f,this.handle=x,this._attribs=[],this._useElements=!1,this._elementsType=s.UNSIGNED_SHORT}o.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var s=0;s1.0001)return null;w+=k[M]}return Math.abs(w-1)>.001?null:[E,f(y,k),k]}},7636:function(t){t.exports=e;function e(r,a){a=a||1;var n=Math.random()*2*Math.PI,o=Math.random()*2-1,i=Math.sqrt(1-o*o)*a;return r[0]=Math.cos(n)*i,r[1]=Math.sin(n)*i,r[2]=o*a,r}},7640:function(t,e,r){var a=r(1888);function n(v){switch(v){case"uint32":return[a.mallocUint32,a.freeUint32];default:return null}}var o={"uint32,1,0":function(v,T){return function(u,b,_,C,M,E,A,h,p,k,w){var R,O,N,V=u*M+C,H,F=v(h),U,W,q,X;for(R=u+1;R<=b;++R){for(O=R,V+=M,N=V,U=0,W=V,H=0;Hu;){U=0,W=N-M;e:for(H=0;HX)break e;W+=k,U+=w}for(U=N,W=N-M,H=0;H>1,U=F-N,W=F+N,q=V,X=U,lt=F,yt=W,pt=H,st=_+1,tt=C-1,dt=!0,rt,at,vt,it,Y,ft,ut,wt,zt,Pt=0,Wt=0,Ht=0,Jt,ge,he,de,se,Tt,Lt,Mt,te,ve,oe,Te,He,Ge,cr,ur,jr=k,Hr=T(jr),br=T(jr);ge=A*q,he=A*X,ur=E;t:for(Jt=0;Jt0){at=q,q=X,X=at;break t}if(Ht<0)break t;ur+=R}ge=A*yt,he=A*pt,ur=E;t:for(Jt=0;Jt0){at=yt,yt=pt,pt=at;break t}if(Ht<0)break t;ur+=R}ge=A*q,he=A*lt,ur=E;t:for(Jt=0;Jt0){at=q,q=lt,lt=at;break t}if(Ht<0)break t;ur+=R}ge=A*X,he=A*lt,ur=E;t:for(Jt=0;Jt0){at=X,X=lt,lt=at;break t}if(Ht<0)break t;ur+=R}ge=A*q,he=A*yt,ur=E;t:for(Jt=0;Jt0){at=q,q=yt,yt=at;break t}if(Ht<0)break t;ur+=R}ge=A*lt,he=A*yt,ur=E;t:for(Jt=0;Jt0){at=lt,lt=yt,yt=at;break t}if(Ht<0)break t;ur+=R}ge=A*X,he=A*pt,ur=E;t:for(Jt=0;Jt0){at=X,X=pt,pt=at;break t}if(Ht<0)break t;ur+=R}ge=A*X,he=A*lt,ur=E;t:for(Jt=0;Jt0){at=X,X=lt,lt=at;break t}if(Ht<0)break t;ur+=R}ge=A*yt,he=A*pt,ur=E;t:for(Jt=0;Jt0){at=yt,yt=pt,pt=at;break t}if(Ht<0)break t;ur+=R}for(ge=A*q,he=A*X,de=A*lt,se=A*yt,Tt=A*pt,Lt=A*V,Mt=A*F,te=A*H,cr=0,ur=E,Jt=0;Jt0)tt--;else if(Ht<0){for(ge=A*ft,he=A*st,de=A*tt,ur=E,Jt=0;Jt0)for(;;){ut=E+tt*A,cr=0;t:for(Jt=0;Jt0){if(--ttH){t:for(;;){for(ut=E+st*A,cr=0,ur=E,Jt=0;Jt1&&b?C(u,b[0],b[1]):C(u)}var x={"uint32,1,0":function(v,T){return function(u){var b=u.data,_=u.offset|0,C=u.shape,M=u.stride,E=M[0]|0,A=C[0]|0,h=M[1]|0,p=C[1]|0,k=h,w=h,R=1;A<=32?v(0,A-1,b,_,E,h,A,p,k,w,R):T(0,A-1,b,_,E,h,A,p,k,w,R)}}};function y(v,T){var u=[T,v].join(","),b=x[u],_=i(v,T),C=f(v,T,_);return b(_,C)}t.exports=y},7642:function(t,e,r){var a=r(8954),n=r(1682);t.exports=f;function o(x,y){this.point=x,this.index=y}function i(x,y){for(var v=x.point,T=y.point,u=v.length,b=0;b=2)return!1;V[F]=U}return!0}):N=N.filter(function(V){for(var H=0;H<=T;++H){var F=k[V[H]];if(F<0)return!1;V[H]=F}return!0}),T&1)for(var _=0;_",W="",q=U.length,X=W.length,lt=V[0]===b||V[0]===M,yt=0,pt=-X;yt>-1&&(yt=H.indexOf(U,yt),!(yt===-1||(pt=H.indexOf(W,yt+q),pt===-1)||pt<=yt));){for(var st=yt;st=pt)F[st]=null,H=H.substr(0,st)+" "+H.substr(st+1);else if(F[st]!==null){var tt=F[st].indexOf(V[0]);tt===-1?F[st]+=V:lt&&(F[st]=F[st].substr(0,tt+1)+(1+parseInt(F[st][tt+1]))+F[st].substr(tt+2))}var dt=yt+q,rt=H.substr(dt,pt-dt),at=rt.indexOf(U);at!==-1?yt=at:yt=pt+X}return F}function h(N,V,H){for(var F=V.textAlign||"start",U=V.textBaseline||"alphabetic",W=[1073741824,1073741824],q=[0,0],X=N.length,lt=0;lt/g,` -`):H=H.replace(/\/g," ");var q="",X=[];for(Y=0;Y-1?parseInt(Mt[1+oe]):0,Ge=Te>-1?parseInt(te[1+Te]):0;He!==Ge&&(ve=ve.replace(Ht(),"?px "),wt*=Math.pow(.75,Ge-He),ve=ve.replace("?px ",Ht())),ut+=.25*tt*(Ge-He)}if(W.superscripts===!0){var cr=Mt.indexOf(b),ur=te.indexOf(b),jr=cr>-1?parseInt(Mt[1+cr]):0,Hr=ur>-1?parseInt(te[1+ur]):0;jr!==Hr&&(ve=ve.replace(Ht(),"?px "),wt*=Math.pow(.75,Hr-jr),ve=ve.replace("?px ",Ht())),ut-=.25*tt*(Hr-jr)}if(W.bolds===!0){var br=Mt.indexOf(y)>-1,Kr=te.indexOf(y)>-1;!br&&Kr&&(rn?ve=ve.replace("italic ","italic bold "):ve="bold "+ve),br&&!Kr&&(ve=ve.replace("bold ",""))}if(W.italics===!0){var rn=Mt.indexOf(T)>-1,Ce=te.indexOf(T)>-1;!rn&&Ce&&(ve="italic "+ve),rn&&!Ce&&(ve=ve.replace("italic ",""))}V.font=ve}for(it=0;it0&&(U=F.size),F.lineSpacing&&F.lineSpacing>0&&(W=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(q.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(q.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(q.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(q.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(q.superscripts=!!F.styletags.superscripts)),H.font=[F.fontStyle,F.fontVariant,F.fontWeight,U+"px",F.font].filter(function(lt){return lt}).join(" "),H.textAlign="start",H.textBaseline="alphabetic",H.direction="ltr";var X=p(V,H,N,U,W,q);return R(X,F,U)}},7721:function(t,e,r){var a=r(5716);t.exports=n;function n(o){return a(o[0])*a(o[1])}},7765:function(t,e,r){t.exports=u;var a=r(9618),n=r(1888),o=r(446),i=r(1570);function s(b){for(var _=b.length,C=0,M=0;M<_;++M)C=Math.max(C,b[M].length)|0;return C-1}function f(b,_){for(var C=b.length,M=n.mallocUint8(C),E=0;E"u"&&(M=s(b));var E=b.length;if(E===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var A=f(_,+C),h=x(b,M),p=y(h,_,A,+C),k=v(h,_.length|0),w=i(M)(b,h.data,k,A),R=T(h),O=[].slice.call(p.data,0,p.shape[0]);return n.free(A),n.free(h.data),n.free(p.data),n.free(k),{cells:w,vertexIds:R,vertexWeights:O}}},7766:function(t,e,r){var a=r(9618),n=r(5298),o=r(1888);t.exports=p;var i=null,s=null,f=null;function x(k){i=[k.LINEAR,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_NEAREST],s=[k.NEAREST,k.LINEAR,k.NEAREST_MIPMAP_NEAREST,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_LINEAR],f=[k.REPEAT,k.CLAMP_TO_EDGE,k.MIRRORED_REPEAT]}function y(k){return typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&k instanceof HTMLVideoElement||typeof ImageData<"u"&&k instanceof ImageData}var v=function(k,w){n.muls(k,w,255)};function T(k,w,R){var O=k.gl,N=O.getParameter(O.MAX_TEXTURE_SIZE);if(w<0||w>N||R<0||R>N)throw new Error("gl-texture2d: Invalid texture size");return k._shape=[w,R],k.bind(),O.texImage2D(O.TEXTURE_2D,0,k.format,w,R,0,k.format,k.type,null),k._mipLevels=[0],k}function u(k,w,R,O,N,V){this.gl=k,this.handle=w,this.format=N,this.type=V,this._shape=[R,O],this._mipLevels=[0],this._magFilter=k.NEAREST,this._minFilter=k.NEAREST,this._wrapS=k.CLAMP_TO_EDGE,this._wrapT=k.CLAMP_TO_EDGE,this._anisoSamples=1;var H=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return H._wrapS},set:function(W){return H.wrapS=W}},{get:function(){return H._wrapT},set:function(W){return H.wrapT=W}}]),this._wrapVector=F;var U=[this._shape[0],this._shape[1]];Object.defineProperties(U,[{get:function(){return H._shape[0]},set:function(W){return H.width=W}},{get:function(){return H._shape[1]},set:function(W){return H.height=W}}]),this._shapeVector=U}var b=u.prototype;Object.defineProperties(b,{minFilter:{get:function(){return this._minFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),s.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MIN_FILTER,k),this._minFilter=k}},magFilter:{get:function(){return this._magFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),s.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MAG_FILTER,k),this._magFilter=k}},mipSamples:{get:function(){return this._anisoSamples},set:function(k){var w=this._anisoSamples;if(this._anisoSamples=Math.max(k,1)|0,w!==this._anisoSamples){var R=this.gl.getExtension("EXT_texture_filter_anisotropic");R&&this.gl.texParameterf(this.gl.TEXTURE_2D,R.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,k),this._wrapS=k}},wrapT:{get:function(){return this._wrapT},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,k),this._wrapT=k}},wrap:{get:function(){return this._wrapVector},set:function(k){if(Array.isArray(k)||(k=[k,k]),k.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var w=0;w<2;++w)if(f.indexOf(k[w])<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);this._wrapS=k[0],this._wrapT=k[1];var R=this.gl;return this.bind(),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,this._wrapS),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,this._wrapT),k}},shape:{get:function(){return this._shapeVector},set:function(k){if(!Array.isArray(k))k=[k|0,k|0];else if(k.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return T(this,k[0]|0,k[1]|0),[k[0]|0,k[1]|0]}},width:{get:function(){return this._shape[0]},set:function(k){return k=k|0,T(this,k,this._shape[1]),k}},height:{get:function(){return this._shape[1]},set:function(k){return k=k|0,T(this,this._shape[0],k),k}}}),b.bind=function(k){var w=this.gl;return k!==void 0&&w.activeTexture(w.TEXTURE0+(k|0)),w.bindTexture(w.TEXTURE_2D,this.handle),k!==void 0?k|0:w.getParameter(w.ACTIVE_TEXTURE)-w.TEXTURE0},b.dispose=function(){this.gl.deleteTexture(this.handle)},b.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var k=Math.min(this._shape[0],this._shape[1]),w=0;k>0;++w,k>>>=1)this._mipLevels.indexOf(w)<0&&this._mipLevels.push(w)},b.setPixels=function(k,w,R,O){var N=this.gl;this.bind(),Array.isArray(w)?(O=R,R=w[1]|0,w=w[0]|0):(w=w||0,R=R||0),O=O||0;var V=y(k)?k:k.raw;if(V){var H=this._mipLevels.indexOf(O)<0;H?(N.texImage2D(N.TEXTURE_2D,0,this.format,this.format,this.type,V),this._mipLevels.push(O)):N.texSubImage2D(N.TEXTURE_2D,O,w,R,this.format,this.type,V)}else if(k.shape&&k.stride&&k.data){if(k.shape.length<2||w+k.shape[1]>this._shape[1]>>>O||R+k.shape[0]>this._shape[0]>>>O||w<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");C(N,w,R,O,this.format,this.type,this._mipLevels,k)}else throw new Error("gl-texture2d: Unsupported data type")};function _(k,w){return k.length===3?w[2]===1&&w[1]===k[0]*k[2]&&w[0]===k[2]:w[0]===1&&w[1]===k[0]}function C(k,w,R,O,N,V,H,F){var U=F.dtype,W=F.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var q=0,X=0,lt=_(W,F.stride.slice());if(U==="float32"?q=k.FLOAT:U==="float64"?(q=k.FLOAT,lt=!1,U="float32"):U==="uint8"?q=k.UNSIGNED_BYTE:(q=k.UNSIGNED_BYTE,lt=!1,U="uint8"),W.length===2)X=k.LUMINANCE,W=[W[0],W[1],1],F=a(F.data,W,[F.stride[0],F.stride[1],1],F.offset);else if(W.length===3){if(W[2]===1)X=k.ALPHA;else if(W[2]===2)X=k.LUMINANCE_ALPHA;else if(W[2]===3)X=k.RGB;else if(W[2]===4)X=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((X===k.LUMINANCE||X===k.ALPHA)&&(N===k.LUMINANCE||N===k.ALPHA)&&(X=N),X!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var yt=F.size,pt=H.indexOf(O)<0;if(pt&&H.push(O),q===V&<)F.offset===0&&F.data.length===yt?pt?k.texImage2D(k.TEXTURE_2D,O,N,W[0],W[1],0,N,V,F.data):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],N,V,F.data):pt?k.texImage2D(k.TEXTURE_2D,O,N,W[0],W[1],0,N,V,F.data.subarray(F.offset,F.offset+yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],N,V,F.data.subarray(F.offset,F.offset+yt));else{var st;V===k.FLOAT?st=o.mallocFloat32(yt):st=o.mallocUint8(yt);var tt=a(st,W,[W[2],W[2]*W[0],1]);q===k.FLOAT&&V===k.UNSIGNED_BYTE?v(tt,F):n.assign(tt,F),pt?k.texImage2D(k.TEXTURE_2D,O,N,W[0],W[1],0,N,V,st.subarray(0,yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],N,V,st.subarray(0,yt)),V===k.FLOAT?o.freeFloat32(st):o.freeUint8(st)}}function M(k){var w=k.createTexture();return k.bindTexture(k.TEXTURE_2D,w),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),w}function E(k,w,R,O,N){var V=k.getParameter(k.MAX_TEXTURE_SIZE);if(w<0||w>V||R<0||R>V)throw new Error("gl-texture2d: Invalid texture shape");if(N===k.FLOAT&&!k.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,O,w,R,0,O,N,null),new u(k,H,w,R,O,N)}function A(k,w,R,O,N,V){var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,N,N,V,w),new u(k,H,R,O,N,V)}function h(k,w){var R=w.dtype,O=w.shape.slice(),N=k.getParameter(k.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>N||O[1]<0||O[1]>N)throw new Error("gl-texture2d: Invalid texture size");var V=_(O,w.stride.slice()),H=0;R==="float32"?H=k.FLOAT:R==="float64"?(H=k.FLOAT,V=!1,R="float32"):R==="uint8"?H=k.UNSIGNED_BYTE:(H=k.UNSIGNED_BYTE,V=!1,R="uint8");var F=0;if(O.length===2)F=k.LUMINANCE,O=[O[0],O[1],1],w=a(w.data,O,[w.stride[0],w.stride[1],1],w.offset);else if(O.length===3)if(O[2]===1)F=k.ALPHA;else if(O[2]===2)F=k.LUMINANCE_ALPHA;else if(O[2]===3)F=k.RGB;else if(O[2]===4)F=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");H===k.FLOAT&&!k.getExtension("OES_texture_float")&&(H=k.UNSIGNED_BYTE,V=!1);var U,W,q=w.size;if(V)w.offset===0&&w.data.length===q?U=w.data:U=w.data.subarray(w.offset,w.offset+q);else{var X=[O[2],O[2]*O[0],1];W=o.malloc(q,R);var lt=a(W,O,X,0);(R==="float32"||R==="float64")&&H===k.UNSIGNED_BYTE?v(lt,w):n.assign(lt,w),U=W.subarray(0,q)}var yt=M(k);return k.texImage2D(k.TEXTURE_2D,0,F,O[0],O[1],0,F,H,U),V||o.free(W),new u(k,yt,O[0],O[1],F,H)}function p(k){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||x(k),typeof arguments[1]=="number")return E(k,arguments[1],arguments[2],arguments[3]||k.RGBA,arguments[4]||k.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return E(k,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var w=arguments[1],R=y(w)?w:w.raw;if(R)return A(k,R,w.width|0,w.height|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(w.shape&&w.data&&w.stride)return h(k,w)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},7790:function(){},7815:function(t,e,r){var a=r(2931),n=r(9970),o=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(_,C,M,E){for(var A=_.points,h=_.velocities,p=_.divergences,k=[],w=[],R=[],O=[],N=[],V=[],H=0,F=0,U=n.create(),W=n.create(),q=8,X=0;X0)for(var st=0;stC)return E-1}return E},x=function(_,C,M){return _M?M:_},y=function(_,C,M){var E=C.vectors,A=C.meshgrid,h=_[0],p=_[1],k=_[2],w=A[0].length,R=A[1].length,O=A[2].length,N=f(A[0],h),V=f(A[1],p),H=f(A[2],k),F=N+1,U=V+1,W=H+1;if(N=x(N,0,w-1),F=x(F,0,w-1),V=x(V,0,R-1),U=x(U,0,R-1),H=x(H,0,O-1),W=x(W,0,O-1),N<0||V<0||H<0||F>w-1||U>R-1||W>O-1)return a.create();var q=A[0][N],X=A[0][F],lt=A[1][V],yt=A[1][U],pt=A[2][H],st=A[2][W],tt=(h-q)/(X-q),dt=(p-lt)/(yt-lt),rt=(k-pt)/(st-pt);isFinite(tt)||(tt=.5),isFinite(dt)||(dt=.5),isFinite(rt)||(rt=.5);var at,vt,it,Y,ft,ut;switch(M.reversedX&&(N=w-1-N,F=w-1-F),M.reversedY&&(V=R-1-V,U=R-1-U),M.reversedZ&&(H=O-1-H,W=O-1-W),M.filled){case 5:ft=H,ut=W,it=V*O,Y=U*O,at=N*O*R,vt=F*O*R;break;case 4:ft=H,ut=W,at=N*O,vt=F*O,it=V*O*w,Y=U*O*w;break;case 3:it=V,Y=U,ft=H*R,ut=W*R,at=N*R*O,vt=F*R*O;break;case 2:it=V,Y=U,at=N*R,vt=F*R,ft=H*R*w,ut=W*R*w;break;case 1:at=N,vt=F,ft=H*w,ut=W*w,it=V*w*O,Y=U*w*O;break;default:at=N,vt=F,it=V*w,Y=U*w,ft=H*w*R,ut=W*w*R;break}var wt=E[at+it+ft],zt=E[at+it+ut],Pt=E[at+Y+ft],Wt=E[at+Y+ut],Ht=E[vt+it+ft],Jt=E[vt+it+ut],ge=E[vt+Y+ft],he=E[vt+Y+ut],de=a.create(),se=a.create(),Tt=a.create(),Lt=a.create();a.lerp(de,wt,Ht,tt),a.lerp(se,zt,Jt,tt),a.lerp(Tt,Pt,ge,tt),a.lerp(Lt,Wt,he,tt);var Mt=a.create(),te=a.create();a.lerp(Mt,de,Tt,dt),a.lerp(te,se,Lt,dt);var ve=a.create();return a.lerp(ve,Mt,te,rt),ve},v=function(_){var C=1/0;_.sort(function(h,p){return h-p});for(var M=_.length,E=1;EF||heU||deW)},X=a.distance(C[0],C[1]),lt=10*X/E,yt=lt*lt,pt=1,st=0,tt=M.length;tt>1&&(pt=T(M));for(var dt=0;dtst&&(st=wt),ft.push(wt),O.push({points:at,velocities:vt,divergences:ft});for(var zt=0;ztyt&&a.scale(Pt,Pt,lt/Math.sqrt(Wt)),a.add(Pt,Pt,rt),it=w(Pt),a.squaredDistance(Y,Pt)-yt>-1e-4*yt){at.push(Pt),Y=Pt,vt.push(it);var ut=R(Pt,it),wt=a.length(ut);isFinite(wt)&&wt>st&&(st=wt),ft.push(wt)}rt=Pt}}var Ht=s(O,_.colormap,st,pt);return h?Ht.tubeScale=h:(st===0&&(st=1),Ht.tubeScale=A*.5*pt/st),Ht};var u=r(6740),b=r(6405).createMesh;t.exports.createTubeMesh=function(_,C){return b(_,C,{shaders:u,traceType:"streamtube"})}},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7842:function(t,e,r){var a=r(6330),n=r(1533),o=r(2651),i=r(6768),s=r(869),f=r(8697);t.exports=x;function x(y,v){if(a(y))return v?f(y,x(v)):[y[0].clone(),y[1].clone()];var T=0,u,b;if(n(y))u=y.clone();else if(typeof y=="string")u=i(y);else{if(y===0)return[o(0),o(1)];if(y===Math.floor(y))u=o(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),T-=256;u=o(y)}}if(a(v))u.mul(v[1]),b=v[0].clone();else if(n(v))b=v.clone();else if(typeof v=="string")b=i(v);else if(!v)b=o(1);else if(v===Math.floor(v))b=o(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),T+=256;b=o(v)}return T>0?u=u.ushln(T):T<0&&(b=b.ushln(-T)),s(u,b)}},7894:function(t){t.exports=e;function e(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7932:function(t,e,r){var a=r(620);t.exports=a.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},7960:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2],s=a[3]-r[3];return n*n+o*o+i*i+s*s}},8105:function(t){t.exports=r;var e={"lo===p0":a,"lo=p0)&&!(p1>=hi)":x};function r(y){return e[y]}function a(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+p];if(R===C)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var N=b[E+O];b[E+O]=b[A],b[A++]=N}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function n(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+p];if(RO;++O){var N=b[E+O];b[E+O]=b[A],b[A++]=N}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function o(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+k];if(R<=C)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var N=b[E+O];b[E+O]=b[A],b[A++]=N}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function i(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+k];if(R<=C)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var N=b[E+O];b[E+O]=b[A],b[A++]=N}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function s(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+p],O=b[E+k];if(R<=C&&C<=O)if(h===w)h+=1,A+=M;else{for(var N=0;M>N;++N){var V=b[E+N];b[E+N]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function f(y,v,T,u,b,_,C){for(var M=2*y,E=M*T,A=E,h=T,p=v,k=y+v,w=T;u>w;++w,E+=M){var R=b[E+p],O=b[E+k];if(RN;++N){var V=b[E+N];b[E+N]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function x(y,v,T,u,b,_,C,M){for(var E=2*y,A=E*T,h=A,p=T,k=v,w=y+v,R=T;u>R;++R,A+=E){var O=b[A+k],N=b[A+w];if(!(O>=C)&&!(M>=N))if(p===R)p+=1,h+=E;else{for(var V=0;E>V;++V){var H=b[A+V];b[A+V]=b[h],b[h++]=H}var F=_[R];_[R]=_[p],_[p++]=F}}return p}},8107:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r}},8116:function(t,e,r){var a=r(7518),n=r(870);function o(s){this.bindVertexArrayOES=s.bindVertexArray.bind(s),this.createVertexArrayOES=s.createVertexArray.bind(s),this.deleteVertexArrayOES=s.deleteVertexArray.bind(s)}function i(s,f,x,y){var v=s.createVertexArray?new o(s):s.getExtension("OES_vertex_array_object"),T;return v?T=a(s,v):T=n(s),T.update(f,x,y),T}t.exports=i},8192:function(t,e,r){t.exports=i;var a=r(2825),n=r(3536),o=r(244);function i(s,f){var x=a(s[0],s[1],s[2]),y=a(f[0],f[1],f[2]);n(x,x),n(y,y);var v=o(x,y);return v>1?0:Math.acos(v)}},8210:function(t){t.exports=r;function e(a,n){var o=a+n,i=o-a,s=o-i,f=n-i,x=a-s,y=x+f;return y?[y,o]:[o]}function r(a,n){var o=a.length|0,i=n.length|0;if(o===1&&i===1)return e(a[0],n[0]);var s=o+i,f=new Array(s),x=0,y=0,v=0,T=Math.abs,u=a[y],b=T(u),_=n[v],C=T(_),M,E;b=i?(M=u,y+=1,yx)for(var R=f[u],O=1/Math.sqrt(h*k),w=0;w<3;++w){var N=(w+1)%3,V=(w+2)%3;R[w]+=O*(p[N]*A[V]-p[V]*A[N])}}for(var y=0;yx)for(var O=1/Math.sqrt(H),w=0;w<3;++w)R[w]*=O;else for(var w=0;w<3;++w)R[w]=0}return f},e.faceNormals=function(n,o,i){for(var s=n.length,f=new Array(s),x=i===void 0?a:i,y=0;yx?M=1/Math.sqrt(M):M=0;for(var u=0;u<3;++u)C[u]*=M;f[y]=C}return f}},8418:function(t,e,r){var a=r(5219),n=r(2762),o=r(8116),i=r(1888),s=r(6760),f=r(1283),x=r(9366),y=r(5964),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=ArrayBuffer,u=DataView;function b(at){return T.isView(at)&&!(at instanceof u)}function _(at){return Array.isArray(at)||b(at)}t.exports=rt;function C(at,vt){var it=at[0],Y=at[1],ft=at[2],ut=at[3];return at[0]=vt[0]*it+vt[4]*Y+vt[8]*ft+vt[12]*ut,at[1]=vt[1]*it+vt[5]*Y+vt[9]*ft+vt[13]*ut,at[2]=vt[2]*it+vt[6]*Y+vt[10]*ft+vt[14]*ut,at[3]=vt[3]*it+vt[7]*Y+vt[11]*ft+vt[15]*ut,at}function M(at,vt,it,Y){return C(Y,Y),C(Y,Y),C(Y,Y)}function E(at,vt){this.index=at,this.dataCoordinate=this.position=vt}function A(at){return at===!0||at>1?1:at}function h(at,vt,it,Y,ft,ut,wt,zt,Pt,Wt,Ht,Jt){this.gl=at,this.pixelRatio=1,this.shader=vt,this.orthoShader=it,this.projectShader=Y,this.pointBuffer=ft,this.colorBuffer=ut,this.glyphBuffer=wt,this.idBuffer=zt,this.vao=Pt,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Wt,this.pickOrthoShader=Ht,this.pickProjectShader=Jt,this.points=[],this._selectResult=new E(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var p=h.prototype;p.pickSlots=1,p.setPickBase=function(at){this.pickId=at},p.isTransparent=function(){if(this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&this.projectHasAlpha)return!0;return!1},p.isOpaque=function(){if(!this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&!this.projectHasAlpha)return!0;return!1};var k=[0,0],w=[0,0,0],R=[0,0,0],O=[0,0,0,1],N=[0,0,0,1],V=v.slice(),H=[0,0,0],F=[[0,0,0],[0,0,0]];function U(at){return at[0]=at[1]=at[2]=0,at}function W(at,vt){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[3]=1,at}function q(at,vt,it,Y){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[it]=Y,at}function X(at){for(var vt=F,it=0;it<2;++it)for(var Y=0;Y<3;++Y)vt[it][Y]=Math.max(Math.min(at[it][Y],1e8),-1e8);return vt}function lt(at,vt,it,Y){var ft=vt.axesProject,ut=vt.gl,wt=at.uniforms,zt=it.model||v,Pt=it.view||v,Wt=it.projection||v,Ht=vt.axesBounds,Jt=X(vt.clipBounds),ge;vt.axes&&vt.axes.lastCubeProps?ge=vt.axes.lastCubeProps.axis:ge=[1,1,1],k[0]=2/ut.drawingBufferWidth,k[1]=2/ut.drawingBufferHeight,at.bind(),wt.view=Pt,wt.projection=Wt,wt.screenSize=k,wt.highlightId=vt.highlightId,wt.highlightScale=vt.highlightScale,wt.clipBounds=Jt,wt.pickGroup=vt.pickId/255,wt.pixelRatio=Y;for(var he=0;he<3;++he)if(ft[he]){wt.scale=vt.projectScale[he],wt.opacity=vt.projectOpacity[he];for(var de=V,se=0;se<16;++se)de[se]=0;for(var se=0;se<4;++se)de[5*se]=1;de[5*he]=0,ge[he]<0?de[12+he]=Ht[0][he]:de[12+he]=Ht[1][he],s(de,zt,de),wt.model=de;var Tt=(he+1)%3,Lt=(he+2)%3,Mt=U(w),te=U(R);Mt[Tt]=1,te[Lt]=1;var ve=M(Wt,Pt,zt,W(O,Mt)),oe=M(Wt,Pt,zt,W(N,te));if(Math.abs(ve[1])>Math.abs(oe[1])){var Te=ve;ve=oe,oe=Te,Te=Mt,Mt=te,te=Te;var He=Tt;Tt=Lt,Lt=He}ve[0]<0&&(Mt[Tt]=-1),oe[1]>0&&(te[Lt]=-1);for(var Ge=0,cr=0,se=0;se<4;++se)Ge+=Math.pow(zt[4*Tt+se],2),cr+=Math.pow(zt[4*Lt+se],2);Mt[Tt]/=Math.sqrt(Ge),te[Lt]/=Math.sqrt(cr),wt.axes[0]=Mt,wt.axes[1]=te,wt.fragClipBounds[0]=q(H,Jt[0],he,-1e8),wt.fragClipBounds[1]=q(H,Jt[1],he,1e8),vt.vao.bind(),vt.vao.draw(ut.TRIANGLES,vt.vertexCount),vt.lineWidth>0&&(ut.lineWidth(vt.lineWidth*Y),vt.vao.draw(ut.LINES,vt.lineVertexCount,vt.vertexCount)),vt.vao.unbind()}}var yt=[-1e8,-1e8,-1e8],pt=[1e8,1e8,1e8],st=[yt,pt];function tt(at,vt,it,Y,ft,ut,wt){var zt=it.gl;if((ut===it.projectHasAlpha||wt)&<(vt,it,Y,ft),ut===it.hasAlpha||wt){at.bind();var Pt=at.uniforms;Pt.model=Y.model||v,Pt.view=Y.view||v,Pt.projection=Y.projection||v,k[0]=2/zt.drawingBufferWidth,k[1]=2/zt.drawingBufferHeight,Pt.screenSize=k,Pt.highlightId=it.highlightId,Pt.highlightScale=it.highlightScale,Pt.fragClipBounds=st,Pt.clipBounds=it.axes.bounds,Pt.opacity=it.opacity,Pt.pickGroup=it.pickId/255,Pt.pixelRatio=ft,it.vao.bind(),it.vao.draw(zt.TRIANGLES,it.vertexCount),it.lineWidth>0&&(zt.lineWidth(it.lineWidth*ft),it.vao.draw(zt.LINES,it.lineVertexCount,it.vertexCount)),it.vao.unbind()}}p.draw=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!1,!1)},p.drawTransparent=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!0,!1)},p.drawPick=function(at){var vt=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;tt(vt,this.pickProjectShader,this,at,1,!0,!0)},p.pick=function(at){if(!at||at.id!==this.pickId)return null;var vt=at.value[2]+(at.value[1]<<8)+(at.value[0]<<16);if(vt>=this.pointCount||vt<0)return null;var it=this.points[vt],Y=this._selectResult;Y.index=vt;for(var ft=0;ft<3;++ft)Y.position[ft]=Y.dataCoordinate[ft]=it[ft];return Y},p.highlight=function(at){if(!at)this.highlightId=[1,1,1,1];else{var vt=at.index,it=vt&255,Y=vt>>8&255,ft=vt>>16&255;this.highlightId=[it/255,Y/255,ft/255,0]}};function dt(at,vt,it,Y){var ft;_(at)?vt0){var rn=0,Ce=Lt,Gt=[0,0,0,1],ne=[0,0,0,1],Ct=_(ge)&&_(ge[0]),gt=_(se)&&_(se[0]);t:for(var Y=0;Y0?1-cr[0][0]:qe<0?1+cr[1][0]:1,or*=or>0?1-cr[0][1]:or<0?1+cr[1][1]:1;for(var Ar=[qe,or],Tr=He.cells||[],pr=He.positions||[],oe=0;oe=i?(M=u,y+=1,y0?1:0}},8648:function(t,e,r){t.exports=r(783)},8692:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],s=n[1],f=a[0]-i,x=a[1]-s,y=Math.sin(o),v=Math.cos(o);return r[0]=i+f*v-x*y,r[1]=s+f*y+x*v,r[2]=a[2],r}},8697:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]),o[1].mul(i[0]))}},8731:function(t,e,r){t.exports=x;var a=r(8866);function n(y,v,T,u,b,_){this._gl=y,this._wrapper=v,this._index=T,this._locations=u,this._dimension=b,this._constFunc=_}var o=n.prototype;o.pointer=function(y,v,T,u){var b=this,_=b._gl,C=b._locations[b._index];_.vertexAttribPointer(C,b._dimension,y||_.FLOAT,!!v,T||0,u||0),_.enableVertexAttribArray(C)},o.set=function(y,v,T,u){return this._constFunc(this._locations[this._index],y,v,T,u)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(y){return y!==this._locations[this._index]&&(this._locations[this._index]=y|0,this._wrapper.program=null),y|0}});var i=[function(y,v,T){return T.length===void 0?y.vertexAttrib1f(v,T):y.vertexAttrib1fv(v,T)},function(y,v,T,u){return T.length===void 0?y.vertexAttrib2f(v,T,u):y.vertexAttrib2fv(v,T)},function(y,v,T,u,b){return T.length===void 0?y.vertexAttrib3f(v,T,u,b):y.vertexAttrib3fv(v,T)},function(y,v,T,u,b,_){return T.length===void 0?y.vertexAttrib4f(v,T,u,b,_):y.vertexAttrib4fv(v,T)}];function s(y,v,T,u,b,_,C){var M=i[b],E=new n(y,v,T,u,b,M);Object.defineProperty(_,C,{set:function(A){return y.disableVertexAttribArray(u[T]),M(y,u[T],A),A},get:function(){return E},enumerable:!0})}function f(y,v,T,u,b,_,C){for(var M=new Array(b),E=new Array(b),A=0;A=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+E+": "+A);s(y,v,h[0],u,p,b,E)}else if(A.indexOf("mat")>=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+E+": "+A);f(y,v,h,u,p,b,E)}else throw new a("","Unknown data type for attribute "+E+": "+A);break}}return b}},8828:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,s=(o>255)<<3,o>>>=s,i|=s,s=(o>15)<<2,o>>>=s,i|=s,s=(o>3)<<1,o>>>=s,i|=s,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var s=i,f=i,x=7;for(s>>>=1;s;s>>>=1)f<<=1,f|=s&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,s){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,o|s<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},8866:function(t){function e(r,a,n){this.shortMessage=a||"",this.longMessage=n||"",this.rawError=r||"",this.message="gl-shader: "+(a||r||"")+(n?` -`+n:""),this.stack=new Error().stack}e.prototype=new Error,e.prototype.name="GLError",e.prototype.constructor=e,t.exports=e},8902:function(t,e,r){var a=r(2478),n=r(3250)[3],o=0,i=1,s=2;t.exports=C;function f(M,E,A,h,p){this.a=M,this.b=E,this.idx=A,this.lowerIds=h,this.upperIds=p}function x(M,E,A,h){this.a=M,this.b=E,this.type=A,this.idx=h}function y(M,E){var A=M.a[0]-E.a[0]||M.a[1]-E.a[1]||M.type-E.type;return A||M.type!==o&&(A=n(M.a,M.b,E.b),A)?A:M.idx-E.idx}function v(M,E){return n(M.a,M.b,E)}function T(M,E,A,h,p){for(var k=a.lt(E,h,v),w=a.gt(E,h,v),R=k;R1&&n(A[N[V-2]],A[N[V-1]],h)>0;)M.push([N[V-1],N[V-2],p]),V-=1;N.length=V,N.push(p);for(var H=O.upperIds,V=H.length;V>1&&n(A[H[V-2]],A[H[V-1]],h)<0;)M.push([H[V-2],H[V-1],p]),V-=1;H.length=V,H.push(p)}}function u(M,E){var A;return M.a[0]O[0]&&p.push(new x(O,R,s,k),new x(R,O,i,k))}p.sort(y);for(var N=p[0].a[0]-(1+Math.abs(p[0].a[0]))*Math.pow(2,-52),V=[new f([N,1],[N,0],-1,[],[])],H=[],k=0,F=p.length;k0;){b=h.pop();for(var p=b.adjacent,k=0;k<=C;++k){var w=p[k];if(!(!w.boundary||w.lastVisited<=-M)){for(var R=w.vertices,O=0;O<=C;++O){var N=R[O];N<0?E[O]=_:E[O]=A[N]}var V=this.orient();if(V>0)return w;w.lastVisited=-M,V===0&&h.push(w)}}}return null},T.walk=function(b,_){var C=this.vertices.length-1,M=this.dimension,E=this.vertices,A=this.tuple,h=_?this.interior.length*Math.random()|0:this.interior.length-1,p=this.interior[h];t:for(;!p.boundary;){for(var k=p.vertices,w=p.adjacent,R=0;R<=M;++R)A[R]=E[k[R]];p.lastVisited=C;for(var R=0;R<=M;++R){var O=w[R];if(!(O.lastVisited>=C)){var N=A[R];A[R]=b;var V=this.orient();if(A[R]=N,V<0){p=O;continue t}else O.boundary?O.lastVisited=-C:O.lastVisited=C}}return}return p},T.addPeaks=function(b,_){var C=this.vertices.length-1,M=this.dimension,E=this.vertices,A=this.tuple,h=this.interior,p=this.simplices,k=[_];_.lastVisited=C,_.vertices[_.vertices.indexOf(-1)]=C,_.boundary=!1,h.push(_);for(var w=[];k.length>0;){var _=k.pop(),R=_.vertices,O=_.adjacent,N=R.indexOf(C);if(!(N<0)){for(var V=0;V<=M;++V)if(V!==N){var H=O[V];if(!(!H.boundary||H.lastVisited>=C)){var F=H.vertices;if(H.lastVisited!==-C){for(var U=0,W=0;W<=M;++W)F[W]<0?(U=W,A[W]=b):A[W]=E[F[W]];var q=this.orient();if(q>0){F[U]=C,H.boundary=!1,h.push(H),k.push(H),H.lastVisited=C;continue}else H.lastVisited=-C}var X=H.adjacent,lt=R.slice(),yt=O.slice(),pt=new o(lt,yt,!0);p.push(pt);var st=X.indexOf(_);if(!(st<0)){X[st]=pt,yt[N]=H,lt[V]=-1,yt[V]=_,O[V]=pt,pt.flip();for(var W=0;W<=M;++W){var tt=lt[W];if(!(tt<0||tt===C)){for(var dt=new Array(M-1),rt=0,at=0;at<=M;++at){var vt=lt[at];vt<0||at===W||(dt[rt++]=vt)}w.push(new i(dt,pt,W))}}}}}}}w.sort(s);for(var V=0;V+1=0?h[k++]=p[R]:w=R&1;if(w===(b&1)){var O=h[0];h[0]=h[1],h[1]=O}_.push(h)}}return _};function u(b,_){var C=b.length;if(C===0)throw new Error("Must have at least d+1 points");var M=b[0].length;if(C<=M)throw new Error("Must input at least d+1 points");var E=b.slice(0,M+1),A=a.apply(void 0,E);if(A===0)throw new Error("Input not in general position");for(var h=new Array(M+1),p=0;p<=M;++p)h[p]=p;A<0&&(h[0]=1,h[1]=0);for(var k=new o(h,new Array(M+1),!1),w=k.adjacent,R=new Array(M+2),p=0;p<=M;++p){for(var O=h.slice(),N=0;N<=M;++N)N===p&&(O[N]=-1);var V=O[0];O[0]=O[1],O[1]=V;var H=new o(O,new Array(M+1),!0);w[p]=H,R[p]=H}R[M+1]=k;for(var p=0;p<=M;++p)for(var O=w[p].vertices,F=w[p].adjacent,N=0;N<=M;++N){var U=O[N];if(U<0){F[N]=k;continue}for(var W=0;W<=M;++W)w[W].vertices.indexOf(U)<0&&(F[N]=w[W])}for(var q=new v(M,E,R),X=!!_,p=M+1;p=1},u.isTransparent=function(){return this.opacity<1},u.pickSlots=1,u.setPickBase=function(A){this.pickId=A};function b(A){for(var h=y({colormap:A,nshades:256,format:"rgba"}),p=new Uint8Array(1024),k=0;k<256;++k){for(var w=h[k],R=0;R<3;++R)p[4*k+R]=w[R];p[4*k+3]=w[3]*255}return x(p,[256,256,4],[4,0,1])}function _(A){for(var h=A.length,p=new Array(h),k=0;k0){var W=this.triShader;W.bind(),W.uniforms=N,this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},u.drawPick=function(A){A=A||{};for(var h=this.gl,p=A.model||v,k=A.view||v,w=A.projection||v,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)R[0][O]=Math.max(R[0][O],this.clipBounds[0][O]),R[1][O]=Math.min(R[1][O],this.clipBounds[1][O]);this._model=[].slice.call(p),this._view=[].slice.call(k),this._projection=[].slice.call(w),this._resolution=[h.drawingBufferWidth,h.drawingBufferHeight];var N={model:p,view:k,projection:w,clipBounds:R,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},V=this.pickShader;V.bind(),V.uniforms=N,this.triangleCount>0&&(this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},u.pick=function(A){if(!A||A.id!==this.pickId)return null;var h=A.value[0]+256*A.value[1]+65536*A.value[2],p=this.cells[h],k=this.positions[p[1]].slice(0,3),w={position:k,dataCoordinate:k,index:Math.floor(p[1]/48)};return this.traceType==="cone"?w.index=Math.floor(p[1]/48):this.traceType==="streamtube"&&(w.intensity=this.intensity[p[1]],w.velocity=this.vectors[p[1]].slice(0,3),w.divergence=this.vectors[p[1]][3],w.index=h),w},u.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function C(A,h){var p=a(A,h.meshShader.vertex,h.meshShader.fragment,null,h.meshShader.attributes);return p.attributes.position.location=0,p.attributes.color.location=2,p.attributes.uv.location=3,p.attributes.vector.location=4,p}function M(A,h){var p=a(A,h.pickShader.vertex,h.pickShader.fragment,null,h.pickShader.attributes);return p.attributes.position.location=0,p.attributes.id.location=1,p.attributes.vector.location=4,p}function E(A,h,p){var k=p.shaders;arguments.length===1&&(h=A,A=h.gl);var w=C(A,k),R=M(A,k),O=i(A,x(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=A.LINEAR_MIPMAP_LINEAR,O.magFilter=A.LINEAR;var N=n(A),V=n(A),H=n(A),F=n(A),U=n(A),W=o(A,[{buffer:N,type:A.FLOAT,size:4},{buffer:U,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:H,type:A.FLOAT,size:4},{buffer:F,type:A.FLOAT,size:2},{buffer:V,type:A.FLOAT,size:4}]),q=new T(A,O,w,R,N,V,U,H,F,W,p.traceType||"cone");return q.update(h),q}t.exports=E},9127:function(t,e,r){t.exports=o;var a=r(6204),n=r(5771);function o(i){return n(a(i))}},9131:function(t,e,r){var a=r(5177),n=r(9288);t.exports=o;function o(i,s){return s=s||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),a(i,i),n(i,i,s),i}},9165:function(t,e,r){t.exports=T;var a=r(2762),n=r(8116),o=r(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(u,b,_,C){this.gl=u,this.shader=C,this.buffer=b,this.vao=_,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var f=s.prototype;f.isOpaque=function(){return!this.hasAlpha},f.isTransparent=function(){return this.hasAlpha},f.drawTransparent=f.draw=function(u){var b=this.gl,_=this.shader.uniforms;this.shader.bind();var C=_.view=u.view||i,M=_.projection=u.projection||i;_.model=u.model||i,_.clipBounds=this.clipBounds,_.opacity=this.opacity;var E=C[12],A=C[13],h=C[14],p=C[15],k=u._ortho||!1,w=k?2:1,R=w*this.pixelRatio*(M[3]*E+M[7]*A+M[11]*h+M[15]*p)/b.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)b.lineWidth(this.lineWidth[O]*this.pixelRatio),_.capSize=this.capSize[O]*R,this.lineCount[O]&&b.drawArrays(b.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function x(u,b){for(var _=0;_<3;++_)u[0][_]=Math.min(u[0][_],b[_]),u[1][_]=Math.max(u[1][_],b[_])}var y=function(){for(var u=new Array(3),b=0;b<3;++b){for(var _=[],C=1;C<=2;++C)for(var M=-1;M<=1;M+=2){var E=(C+b)%3,A=[0,0,0];A[E]=M,_.push(A)}u[b]=_}return u}();function v(u,b,_,C){for(var M=y[C],E=0;E0){var N=k.slice();N[h]+=R[1][h],M.push(k[0],k[1],k[2],O[0],O[1],O[2],O[3],0,0,0,N[0],N[1],N[2],O[0],O[1],O[2],O[3],0,0,0),x(this.bounds,N),A+=2+v(M,N,O,h)}}}this.lineCount[h]=A-this.lineOffset[h]}this.buffer.update(M)}},f.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function T(u){var b=u.gl,_=a(b),C=n(b,[{buffer:_,type:b.FLOAT,size:3,offset:0,stride:40},{buffer:_,type:b.FLOAT,size:4,offset:12,stride:40},{buffer:_,type:b.FLOAT,size:3,offset:28,stride:40}]),M=o(b);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var E=new s(b,_,C,M);return E.update(u),E}},9215:function(t,e,r){t.exports=x;var a=r(4769),n=r(2478);function o(y,v,T){return Math.min(v,Math.max(y,T))}function i(y,v,T){this.dimension=y.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var u=0;u=T-1)for(var A=_.length-1,p=y-v[T-1],h=0;h=T-1)for(var E=_.length-1,A=y-v[T-1],h=0;h=0;--T)if(y[--v])return!1;return!0},s.jump=function(y){var v=this.lastT(),T=this.dimension;if(!(y0;--h)u.push(o(M[h-1],E[h-1],arguments[h])),b.push(0)}},s.push=function(y){var v=this.lastT(),T=this.dimension;if(!(y1e-6?1/C:0;this._time.push(y);for(var p=T;p>0;--p){var k=o(E[p-1],A[p-1],arguments[p]);u.push(k),b.push((k-u[_++])*h)}}},s.set=function(y){var v=this.dimension;if(!(y0;--M)T.push(o(_[M-1],C[M-1],arguments[M])),u.push(0)}},s.move=function(y){var v=this.lastT(),T=this.dimension;if(!(y<=v||arguments.length!==T+1)){var u=this._state,b=this._velocity,_=u.length-this.dimension,C=this.bounds,M=C[0],E=C[1],A=y-v,h=A>1e-6?1/A:0;this._time.push(y);for(var p=T;p>0;--p){var k=arguments[p];u.push(o(M[p-1],E[p-1],u[_++]+k)),b.push(k*h)}}},s.idle=function(y){var v=this.lastT();if(!(y=0;--h)u.push(o(M[h],E[h],u[_]+A*b[_])),b.push(0),_+=1}};function f(y){for(var v=new Array(y),T=0;T1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=!0),s}},9226:function(t){t.exports=e;function e(r,a){return r[0]=Math.ceil(a[0]),r[1]=Math.ceil(a[1]),r[2]=Math.ceil(a[2]),r}},9265:function(t){t.exports=e;function e(r,a){return r[0]===a[0]&&r[1]===a[1]&&r[2]===a[2]}},9288:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]*n,r[1]=a[1]*n,r[2]=a[2]*n,r[3]=a[3]*n,r}},9346:function(t){var e=new Float64Array(4),r=new Float64Array(4),a=new Float64Array(4);function n(o,i,s,f,x){e.length=v?(p=1,w=v+2*b+C):(p=-b/v,w=b*p+C)):(p=0,_>=0?(k=0,w=C):-_>=u?(k=1,w=u+2*_+C):(k=-_/u,w=_*k+C));else if(k<0)k=0,b>=0?(p=0,w=C):-b>=v?(p=1,w=v+2*b+C):(p=-b/v,w=b*p+C);else{var R=1/h;p*=R,k*=R,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+C}else{var O,N,V,H;p<0?(O=T+b,N=u+_,N>O?(V=N-O,H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+C):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+C)):(p=0,N<=0?(k=1,w=u+2*_+C):_>=0?(k=0,w=C):(k=-_/u,w=_*k+C))):k<0?(O=T+_,N=v+b,N>O?(V=N-O,H=v-2*T+u,V>=H?(k=1,p=0,w=u+2*_+C):(k=V/H,p=1-k,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+C)):(k=0,N<=0?(p=1,w=v+2*b+C):b>=0?(p=0,w=C):(p=-b/v,w=b*p+C))):(V=u+_-T-b,V<=0?(p=0,k=1,w=u+2*_+C):(H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+C):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+C)))}for(var F=1-p-k,y=0;y_)for(u=_;ub)for(u=b;u<_;u++)this.gl.disableVertexAttribArray(u);this.gl.lastAttribCount=b,this.gl.useProgram(this.program)},y.dispose=function(){for(var u=this.gl.lastAttribCount,b=0;b=0){for(var F=H.type.charAt(H.type.length-1)|0,U=new Array(F),W=0;W=0;)q+=1;N[V]=q}var X=new Array(_.length);function lt(){E.program=i.program(A,E._vref,E._fref,O,N);for(var yt=0;yt<_.length;++yt)X[yt]=A.getUniformLocation(E.program,_[yt].name)}lt(),E._relink=lt,E.types={uniforms:o(_),attributes:o(C)},E.attributes=n(A,E,R,N),Object.defineProperty(E,"uniforms",a(A,E,_,X))};function T(u,b,_,C,M){var E=new x(u);return E.update(b,_,C,M),E}t.exports=T},9499:function(t,e,r){t.exports=vt;var a=r(8828),n=r(2762),o=r(8116),i=r(7766),s=r(1888),f=r(6729),x=r(5298),y=r(9994),v=r(9618),T=r(3711),u=r(6760),b=r(7608),_=r(2478),C=r(6199),M=r(990),E=M.createShader,A=M.createContourShader,h=M.createPickShader,p=M.createPickContourShader,k=40,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],R=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],O=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var it=0;it<3;++it){var Y=O[it],ft=(it+1)%3,ut=(it+2)%3;Y[ft+0]=1,Y[ut+3]=1,Y[it+6]=1}})();function N(it,Y,ft,ut,wt){this.position=it,this.index=Y,this.uv=ft,this.level=ut,this.dataCoordinate=wt}var V=256;function H(it,Y,ft,ut,wt,zt,Pt,Wt,Ht,Jt,ge,he,de,se,Tt){this.gl=it,this.shape=Y,this.bounds=ft,this.objectOffset=Tt,this.intensityBounds=[],this._shader=ut,this._pickShader=wt,this._coordinateBuffer=zt,this._vao=Pt,this._colorMap=Wt,this._contourShader=Ht,this._contourPickShader=Jt,this._contourBuffer=ge,this._contourVAO=he,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new N([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=de,this._dynamicVAO=se,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=H.prototype;F.genColormap=function(it,Y){var ft=!1,ut=y([f({colormap:it,nshades:V,format:"rgba"}).map(function(wt,zt){var Pt=Y?U(zt/255,Y):wt[3];return Pt<1&&(ft=!0),[wt[0],wt[1],wt[2],255*Pt]})]);return x.divseq(ut,255),this.hasAlphaScale=ft,ut},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(it){this.pickId=it};function U(it,Y){if(!Y||!Y.length)return 1;for(var ft=0;ftit&&ft>0){var ut=(Y[ft][0]-it)/(Y[ft][0]-Y[ft-1][0]);return Y[ft][1]*(1-ut)+ut*Y[ft-1][1]}}return 1}var W=[0,0,0],q={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function X(it,Y){var ft,ut,wt,zt=Y.axes&&Y.axes.lastCubeProps.axis||W,Pt=Y.showSurface,Wt=Y.showContour;for(ft=0;ft<3;++ft)for(Pt=Pt||Y.surfaceProject[ft],ut=0;ut<3;++ut)Wt=Wt||Y.contourProject[ft][ut];for(ft=0;ft<3;++ft){var Ht=q.projections[ft];for(ut=0;ut<16;++ut)Ht[ut]=0;for(ut=0;ut<4;++ut)Ht[5*ut]=1;Ht[5*ft]=0,Ht[12+ft]=Y.axesBounds[+(zt[ft]>0)][ft],u(Ht,it.model,Ht);var Jt=q.clipBounds[ft];for(wt=0;wt<2;++wt)for(ut=0;ut<3;++ut)Jt[wt][ut]=it.clipBounds[wt][ut];Jt[0][ft]=-1e8,Jt[1][ft]=1e8}return q.showSurface=Pt,q.showContour=Wt,q}var lt={model:w,view:w,projection:w,inverseModel:w.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},yt=w.slice(),pt=[1,0,0,0,1,0,0,0,1];function st(it,Y){it=it||{};var ft=this.gl;ft.disable(ft.CULL_FACE),this._colorMap.bind(0);var ut=lt;ut.model=it.model||w,ut.view=it.view||w,ut.projection=it.projection||w,ut.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ut.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ut.objectOffset=this.objectOffset,ut.contourColor=this.contourColor[0],ut.inverseModel=b(ut.inverseModel,ut.model);for(var wt=0;wt<2;++wt)for(var zt=ut.clipBounds[wt],Pt=0;Pt<3;++Pt)zt[Pt]=Math.min(Math.max(this.clipBounds[wt][Pt],-1e8),1e8);ut.kambient=this.ambientLight,ut.kdiffuse=this.diffuseLight,ut.kspecular=this.specularLight,ut.roughness=this.roughness,ut.fresnel=this.fresnel,ut.opacity=this.opacity,ut.height=0,ut.permutation=pt,ut.vertexColor=this.vertexColor;var Wt=yt;for(u(Wt,ut.view,ut.model),u(Wt,ut.projection,Wt),b(Wt,Wt),wt=0;wt<3;++wt)ut.eyePosition[wt]=Wt[12+wt]/Wt[15];var Ht=Wt[15];for(wt=0;wt<3;++wt)Ht+=this.lightPosition[wt]*Wt[4*wt+3];for(wt=0;wt<3;++wt){var Jt=Wt[12+wt];for(Pt=0;Pt<3;++Pt)Jt+=Wt[4*Pt+wt]*this.lightPosition[Pt];ut.lightPosition[wt]=Jt/Ht}var ge=X(ut,this);if(ge.showSurface){for(this._shader.bind(),this._shader.uniforms=ut,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ft.TRIANGLES,this._vertexCount),wt=0;wt<3;++wt)!this.surfaceProject[wt]||!this.vertexCount||(this._shader.uniforms.model=ge.projections[wt],this._shader.uniforms.clipBounds=ge.clipBounds[wt],this._vao.draw(ft.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ge.showContour){var he=this._contourShader;ut.kambient=1,ut.kdiffuse=0,ut.kspecular=0,ut.opacity=1,he.bind(),he.uniforms=ut;var de=this._contourVAO;for(de.bind(),wt=0;wt<3;++wt)for(he.uniforms.permutation=O[wt],ft.lineWidth(this.contourWidth[wt]*this.pixelRatio),Pt=0;Pt>4)/16)/255,wt=Math.floor(ut),zt=ut-wt,Pt=Y[1]*(it.value[1]+(it.value[2]&15)/16)/255,Wt=Math.floor(Pt),Ht=Pt-Wt;wt+=1,Wt+=1;var Jt=ft.position;Jt[0]=Jt[1]=Jt[2]=0;for(var ge=0;ge<2;++ge)for(var he=ge?zt:1-zt,de=0;de<2;++de)for(var se=de?Ht:1-Ht,Tt=wt+ge,Lt=Wt+de,Mt=he*se,te=0;te<3;++te)Jt[te]+=this._field[te].get(Tt,Lt)*Mt;for(var ve=this._pickResult.level,oe=0;oe<3;++oe)if(ve[oe]=_.le(this.contourLevels[oe],Jt[oe]),ve[oe]<0)this.contourLevels[oe].length>0&&(ve[oe]=0);else if(ve[oe]Math.abs(He-Jt[oe])&&(ve[oe]+=1)}for(ft.index[0]=zt<.5?wt:wt+1,ft.index[1]=Ht<.5?Wt:Wt+1,ft.uv[0]=ut/Y[0],ft.uv[1]=Pt/Y[1],te=0;te<3;++te)ft.dataCoordinate[te]=this._field[te].get(ft.index[0],ft.index[1]);return ft},F.padField=function(it,Y){var ft=Y.shape.slice(),ut=it.shape.slice();x.assign(it.lo(1,1).hi(ft[0],ft[1]),Y),x.assign(it.lo(1).hi(ft[0],1),Y.hi(ft[0],1)),x.assign(it.lo(1,ut[1]-1).hi(ft[0],1),Y.lo(0,ft[1]-1).hi(ft[0],1)),x.assign(it.lo(0,1).hi(1,ft[1]),Y.hi(1)),x.assign(it.lo(ut[0]-1,1).hi(1,ft[1]),Y.lo(ft[0]-1)),it.set(0,0,Y.get(0,0)),it.set(0,ut[1]-1,Y.get(0,ft[1]-1)),it.set(ut[0]-1,0,Y.get(ft[0]-1,0)),it.set(ut[0]-1,ut[1]-1,Y.get(ft[0]-1,ft[1]-1))};function dt(it,Y){return Array.isArray(it)?[Y(it[0]),Y(it[1]),Y(it[2])]:[Y(it),Y(it),Y(it)]}function rt(it){return Array.isArray(it)?it.length===3?[it[0],it[1],it[2],1]:[it[0],it[1],it[2],it[3]]:[0,0,0,1]}function at(it){if(Array.isArray(it)){if(Array.isArray(it))return[rt(it[0]),rt(it[1]),rt(it[2])];var Y=rt(it);return[Y.slice(),Y.slice(),Y.slice()]}}F.update=function(it){it=it||{},this.objectOffset=it.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in it&&(this.contourWidth=dt(it.contourWidth,Number)),"showContour"in it&&(this.showContour=dt(it.showContour,Boolean)),"showSurface"in it&&(this.showSurface=!!it.showSurface),"contourTint"in it&&(this.contourTint=dt(it.contourTint,Boolean)),"contourColor"in it&&(this.contourColor=at(it.contourColor)),"contourProject"in it&&(this.contourProject=dt(it.contourProject,function(Zi){return dt(Zi,Boolean)})),"surfaceProject"in it&&(this.surfaceProject=it.surfaceProject),"dynamicColor"in it&&(this.dynamicColor=at(it.dynamicColor)),"dynamicTint"in it&&(this.dynamicTint=dt(it.dynamicTint,Number)),"dynamicWidth"in it&&(this.dynamicWidth=dt(it.dynamicWidth,Number)),"opacity"in it&&(this.opacity=it.opacity),"opacityscale"in it&&(this.opacityscale=it.opacityscale),"colorBounds"in it&&(this.colorBounds=it.colorBounds),"vertexColor"in it&&(this.vertexColor=it.vertexColor?1:0),"colormap"in it&&this._colorMap.setPixels(this.genColormap(it.colormap,this.opacityscale));var Y=it.field||it.coords&&it.coords[2]||null,ft=!1;if(Y||(this._field[2].shape[0]||this._field[2].shape[2]?Y=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Y=this._field[2].hi(0,0)),"field"in it||"coords"in it){var ut=(Y.shape[0]+2)*(Y.shape[1]+2);ut>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(a.nextPow2(ut))),this._field[2]=v(this._field[2].data,[Y.shape[0]+2,Y.shape[1]+2]),this.padField(this._field[2],Y),this.shape=Y.shape.slice();for(var wt=this.shape,zt=0;zt<2;++zt)this._field[2].size>this._field[zt].data.length&&(s.freeFloat(this._field[zt].data),this._field[zt].data=s.mallocFloat(this._field[2].size)),this._field[zt]=v(this._field[zt].data,[wt[0]+2,wt[1]+2]);if(it.coords){var Pt=it.coords;if(!Array.isArray(Pt)||Pt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(zt=0;zt<2;++zt){var Wt=Pt[zt];for(de=0;de<2;++de)if(Wt.shape[de]!==wt[de])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[zt],Wt)}}else if(it.ticks){var Ht=it.ticks;if(!Array.isArray(Ht)||Ht.length!==2)throw new Error("gl-surface: invalid ticks");for(zt=0;zt<2;++zt){var Jt=Ht[zt];if((Array.isArray(Jt)||Jt.length)&&(Jt=v(Jt)),Jt.shape[0]!==wt[zt])throw new Error("gl-surface: invalid tick length");var ge=v(Jt.data,wt);ge.stride[zt]=Jt.stride[0],ge.stride[zt^1]=0,this.padField(this._field[zt],ge)}}else{for(zt=0;zt<2;++zt){var he=[0,0];he[zt]=1,this._field[zt]=v(this._field[zt].data,[wt[0]+2,wt[1]+2],he,0)}this._field[0].set(0,0,0);for(var de=0;de0){for(var Li=0;Li<5;++Li)Tr.pop();Ct-=1}continue t}}}Hn.push(Ct)}this._contourOffsets[pr]=Vn,this._contourCounts[pr]=Hn}var Oi=s.mallocFloat(Tr.length);for(zt=0;zt=0&&(A=M|0,E+=p*A,h-=A),new _(this.data,h,p,E)},C.step=function(M){var E=this.shape[0],A=this.stride[0],h=this.offset,p=0,k=Math.ceil;return typeof M=="number"&&(p=M|0,p<0?(h+=A*(E-1),E=k(-E/p)):E=k(E/p),A*=p),new _(this.data,E,A,h)},C.transpose=function(M){M=M===void 0?0:M|0;var E=this.shape,A=this.stride;return new _(this.data,E[M],A[M],this.offset)},C.pick=function(M){var E=[],A=[],h=this.offset;typeof M=="number"&&M>=0?h=h+this.stride[0]*M|0:(E.push(this.shape[0]),A.push(this.stride[0]));var p=u[E.length+1];return p(this.data,E,A,h)},function(M,E,A,h){return new _(M,E[0],A[0],h)}},2:function(T,u,b){function _(M,E,A,h,p,k){this.data=M,this.shape=[E,A],this.stride=[h,p],this.offset=k|0}var C=_.prototype;return C.dtype=T,C.dimension=2,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(C,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),C.set=function(M,E,A){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*E,A):this.data[this.offset+this.stride[0]*M+this.stride[1]*E]=A},C.get=function(M,E){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*E):this.data[this.offset+this.stride[0]*M+this.stride[1]*E]},C.index=function(M,E){return this.offset+this.stride[0]*M+this.stride[1]*E},C.hi=function(M,E){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof E!="number"||E<0?this.shape[1]:E|0,this.stride[0],this.stride[1],this.offset)},C.lo=function(M,E){var A=this.offset,h=0,p=this.shape[0],k=this.shape[1],w=this.stride[0],R=this.stride[1];return typeof M=="number"&&M>=0&&(h=M|0,A+=w*h,p-=h),typeof E=="number"&&E>=0&&(h=E|0,A+=R*h,k-=h),new _(this.data,p,k,w,R,A)},C.step=function(M,E){var A=this.shape[0],h=this.shape[1],p=this.stride[0],k=this.stride[1],w=this.offset,R=0,O=Math.ceil;return typeof M=="number"&&(R=M|0,R<0?(w+=p*(A-1),A=O(-A/R)):A=O(A/R),p*=R),typeof E=="number"&&(R=E|0,R<0?(w+=k*(h-1),h=O(-h/R)):h=O(h/R),k*=R),new _(this.data,A,h,p,k,w)},C.transpose=function(M,E){M=M===void 0?0:M|0,E=E===void 0?1:E|0;var A=this.shape,h=this.stride;return new _(this.data,A[M],A[E],h[M],h[E],this.offset)},C.pick=function(M,E){var A=[],h=[],p=this.offset;typeof M=="number"&&M>=0?p=p+this.stride[0]*M|0:(A.push(this.shape[0]),h.push(this.stride[0])),typeof E=="number"&&E>=0?p=p+this.stride[1]*E|0:(A.push(this.shape[1]),h.push(this.stride[1]));var k=u[A.length+1];return k(this.data,A,h,p)},function(M,E,A,h){return new _(M,E[0],E[1],A[0],A[1],h)}},3:function(T,u,b){function _(M,E,A,h,p,k,w,R){this.data=M,this.shape=[E,A,h],this.stride=[p,k,w],this.offset=R|0}var C=_.prototype;return C.dtype=T,C.dimension=3,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(C,"order",{get:function(){var M=Math.abs(this.stride[0]),E=Math.abs(this.stride[1]),A=Math.abs(this.stride[2]);return M>E?E>A?[2,1,0]:M>A?[1,2,0]:[1,0,2]:M>A?[2,0,1]:A>E?[0,1,2]:[0,2,1]}}),C.set=function(M,E,A,h){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A,h):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A]=h},C.get=function(M,E,A){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A]},C.index=function(M,E,A){return this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A},C.hi=function(M,E,A){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof A!="number"||A<0?this.shape[2]:A|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},C.lo=function(M,E,A){var h=this.offset,p=0,k=this.shape[0],w=this.shape[1],R=this.shape[2],O=this.stride[0],N=this.stride[1],V=this.stride[2];return typeof M=="number"&&M>=0&&(p=M|0,h+=O*p,k-=p),typeof E=="number"&&E>=0&&(p=E|0,h+=N*p,w-=p),typeof A=="number"&&A>=0&&(p=A|0,h+=V*p,R-=p),new _(this.data,k,w,R,O,N,V,h)},C.step=function(M,E,A){var h=this.shape[0],p=this.shape[1],k=this.shape[2],w=this.stride[0],R=this.stride[1],O=this.stride[2],N=this.offset,V=0,H=Math.ceil;return typeof M=="number"&&(V=M|0,V<0?(N+=w*(h-1),h=H(-h/V)):h=H(h/V),w*=V),typeof E=="number"&&(V=E|0,V<0?(N+=R*(p-1),p=H(-p/V)):p=H(p/V),R*=V),typeof A=="number"&&(V=A|0,V<0?(N+=O*(k-1),k=H(-k/V)):k=H(k/V),O*=V),new _(this.data,h,p,k,w,R,O,N)},C.transpose=function(M,E,A){M=M===void 0?0:M|0,E=E===void 0?1:E|0,A=A===void 0?2:A|0;var h=this.shape,p=this.stride;return new _(this.data,h[M],h[E],h[A],p[M],p[E],p[A],this.offset)},C.pick=function(M,E,A){var h=[],p=[],k=this.offset;typeof M=="number"&&M>=0?k=k+this.stride[0]*M|0:(h.push(this.shape[0]),p.push(this.stride[0])),typeof E=="number"&&E>=0?k=k+this.stride[1]*E|0:(h.push(this.shape[1]),p.push(this.stride[1])),typeof A=="number"&&A>=0?k=k+this.stride[2]*A|0:(h.push(this.shape[2]),p.push(this.stride[2]));var w=u[h.length+1];return w(this.data,h,p,k)},function(M,E,A,h){return new _(M,E[0],E[1],E[2],A[0],A[1],A[2],h)}},4:function(T,u,b){function _(M,E,A,h,p,k,w,R,O,N){this.data=M,this.shape=[E,A,h,p],this.stride=[k,w,R,O],this.offset=N|0}var C=_.prototype;return C.dtype=T,C.dimension=4,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(C,"order",{get:b}),C.set=function(M,E,A,h,p){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h,p):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h]=p},C.get=function(M,E,A,h){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h]},C.index=function(M,E,A,h){return this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h},C.hi=function(M,E,A,h){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},C.lo=function(M,E,A,h){var p=this.offset,k=0,w=this.shape[0],R=this.shape[1],O=this.shape[2],N=this.shape[3],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3];return typeof M=="number"&&M>=0&&(k=M|0,p+=V*k,w-=k),typeof E=="number"&&E>=0&&(k=E|0,p+=H*k,R-=k),typeof A=="number"&&A>=0&&(k=A|0,p+=F*k,O-=k),typeof h=="number"&&h>=0&&(k=h|0,p+=U*k,N-=k),new _(this.data,w,R,O,N,V,H,F,U,p)},C.step=function(M,E,A,h){var p=this.shape[0],k=this.shape[1],w=this.shape[2],R=this.shape[3],O=this.stride[0],N=this.stride[1],V=this.stride[2],H=this.stride[3],F=this.offset,U=0,W=Math.ceil;return typeof M=="number"&&(U=M|0,U<0?(F+=O*(p-1),p=W(-p/U)):p=W(p/U),O*=U),typeof E=="number"&&(U=E|0,U<0?(F+=N*(k-1),k=W(-k/U)):k=W(k/U),N*=U),typeof A=="number"&&(U=A|0,U<0?(F+=V*(w-1),w=W(-w/U)):w=W(w/U),V*=U),typeof h=="number"&&(U=h|0,U<0?(F+=H*(R-1),R=W(-R/U)):R=W(R/U),H*=U),new _(this.data,p,k,w,R,O,N,V,H,F)},C.transpose=function(M,E,A,h){M=M===void 0?0:M|0,E=E===void 0?1:E|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0;var p=this.shape,k=this.stride;return new _(this.data,p[M],p[E],p[A],p[h],k[M],k[E],k[A],k[h],this.offset)},C.pick=function(M,E,A,h){var p=[],k=[],w=this.offset;typeof M=="number"&&M>=0?w=w+this.stride[0]*M|0:(p.push(this.shape[0]),k.push(this.stride[0])),typeof E=="number"&&E>=0?w=w+this.stride[1]*E|0:(p.push(this.shape[1]),k.push(this.stride[1])),typeof A=="number"&&A>=0?w=w+this.stride[2]*A|0:(p.push(this.shape[2]),k.push(this.stride[2])),typeof h=="number"&&h>=0?w=w+this.stride[3]*h|0:(p.push(this.shape[3]),k.push(this.stride[3]));var R=u[p.length+1];return R(this.data,p,k,w)},function(M,E,A,h){return new _(M,E[0],E[1],E[2],E[3],A[0],A[1],A[2],A[3],h)}},5:function(T,u,b){function _(M,E,A,h,p,k,w,R,O,N,V,H){this.data=M,this.shape=[E,A,h,p,k],this.stride=[w,R,O,N,V],this.offset=H|0}var C=_.prototype;return C.dtype=T,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:b}),C.set=function(M,E,A,h,p,k){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p,k):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]=k},C.get=function(M,E,A,h,p){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p):this.data[this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]},C.index=function(M,E,A,h,p){return this.offset+this.stride[0]*M+this.stride[1]*E+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p},C.hi=function(M,E,A,h,p){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,typeof p!="number"||p<0?this.shape[4]:p|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(M,E,A,h,p){var k=this.offset,w=0,R=this.shape[0],O=this.shape[1],N=this.shape[2],V=this.shape[3],H=this.shape[4],F=this.stride[0],U=this.stride[1],W=this.stride[2],q=this.stride[3],X=this.stride[4];return typeof M=="number"&&M>=0&&(w=M|0,k+=F*w,R-=w),typeof E=="number"&&E>=0&&(w=E|0,k+=U*w,O-=w),typeof A=="number"&&A>=0&&(w=A|0,k+=W*w,N-=w),typeof h=="number"&&h>=0&&(w=h|0,k+=q*w,V-=w),typeof p=="number"&&p>=0&&(w=p|0,k+=X*w,H-=w),new _(this.data,R,O,N,V,H,F,U,W,q,X,k)},C.step=function(M,E,A,h,p){var k=this.shape[0],w=this.shape[1],R=this.shape[2],O=this.shape[3],N=this.shape[4],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3],W=this.stride[4],q=this.offset,X=0,lt=Math.ceil;return typeof M=="number"&&(X=M|0,X<0?(q+=V*(k-1),k=lt(-k/X)):k=lt(k/X),V*=X),typeof E=="number"&&(X=E|0,X<0?(q+=H*(w-1),w=lt(-w/X)):w=lt(w/X),H*=X),typeof A=="number"&&(X=A|0,X<0?(q+=F*(R-1),R=lt(-R/X)):R=lt(R/X),F*=X),typeof h=="number"&&(X=h|0,X<0?(q+=U*(O-1),O=lt(-O/X)):O=lt(O/X),U*=X),typeof p=="number"&&(X=p|0,X<0?(q+=W*(N-1),N=lt(-N/X)):N=lt(N/X),W*=X),new _(this.data,k,w,R,O,N,V,H,F,U,W,q)},C.transpose=function(M,E,A,h,p){M=M===void 0?0:M|0,E=E===void 0?1:E|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0,p=p===void 0?4:p|0;var k=this.shape,w=this.stride;return new _(this.data,k[M],k[E],k[A],k[h],k[p],w[M],w[E],w[A],w[h],w[p],this.offset)},C.pick=function(M,E,A,h,p){var k=[],w=[],R=this.offset;typeof M=="number"&&M>=0?R=R+this.stride[0]*M|0:(k.push(this.shape[0]),w.push(this.stride[0])),typeof E=="number"&&E>=0?R=R+this.stride[1]*E|0:(k.push(this.shape[1]),w.push(this.stride[1])),typeof A=="number"&&A>=0?R=R+this.stride[2]*A|0:(k.push(this.shape[2]),w.push(this.stride[2])),typeof h=="number"&&h>=0?R=R+this.stride[3]*h|0:(k.push(this.shape[3]),w.push(this.stride[3])),typeof p=="number"&&p>=0?R=R+this.stride[4]*p|0:(k.push(this.shape[4]),w.push(this.stride[4]));var O=u[k.length+1];return O(this.data,k,w,R)},function(M,E,A,h){return new _(M,E[0],E[1],E[2],E[3],E[4],A[0],A[1],A[2],A[3],A[4],h)}}};function f(T,u){var b=u===-1?"T":String(u),_=s[b];return u===-1?_(T):u===0?_(T,y[T][0]):_(T,y[T],i)}function x(T){if(a(T))return"buffer";if(n)switch(Object.prototype.toString.call(T)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(T)?"array":"generic"}var y={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(T,u,b,_){if(T===void 0){var p=y.array[0];return p([])}else typeof T=="number"&&(T=[T]);u===void 0&&(u=[T.length]);var C=u.length;if(b===void 0){b=new Array(C);for(var M=C-1,E=1;M>=0;--M)b[M]=E,E*=u[M]}if(_===void 0){_=0;for(var M=0;M1e-6?(b[0]=C/h,b[1]=M/h,b[2]=E/h,b[3]=A/h):(b[0]=b[1]=b[2]=0,b[3]=1)}function v(b,_,C){this.radius=a([C]),this.center=a(_),this.rotation=a(b),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var T=v.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(b){this.radius.curve(b),this.center.curve(b),this.rotation.curve(b);var _=this.computedRotation;y(_,_);var C=this.computedMatrix;o(C,_);var M=this.computedCenter,E=this.computedEye,A=this.computedUp,h=Math.exp(this.computedRadius[0]);E[0]=M[0]+h*C[2],E[1]=M[1]+h*C[6],E[2]=M[2]+h*C[10],A[0]=C[1],A[1]=C[5],A[2]=C[9];for(var p=0;p<3;++p){for(var k=0,w=0;w<3;++w)k+=C[p+4*w]*E[w];C[12+p]=-k}},T.getMatrix=function(b,_){this.recalcMatrix(b);var C=this.computedMatrix;if(_){for(var M=0;M<16;++M)_[M]=C[M];return _}return C},T.idle=function(b){this.center.idle(b),this.radius.idle(b),this.rotation.idle(b)},T.flush=function(b){this.center.flush(b),this.radius.flush(b),this.rotation.flush(b)},T.pan=function(b,_,C,M){_=_||0,C=C||0,M=M||0,this.recalcMatrix(b);var E=this.computedMatrix,A=E[1],h=E[5],p=E[9],k=f(A,h,p);A/=k,h/=k,p/=k;var w=E[0],R=E[4],O=E[8],N=w*A+R*h+O*p;w-=A*N,R-=h*N,O-=p*N;var V=f(w,R,O);w/=V,R/=V,O/=V,E[2],E[6],E[10];var H=w*_+A*C,F=R*_+h*C,U=O*_+p*C;this.center.move(b,H,F,U);var W=Math.exp(this.computedRadius[0]);W=Math.max(1e-4,W+M),this.radius.set(b,Math.log(W))},T.rotate=function(b,_,C,M){this.recalcMatrix(b),_=_||0,C=C||0;var E=this.computedMatrix,A=E[0],h=E[4],p=E[8],k=E[1],w=E[5],R=E[9],O=E[2],N=E[6],V=E[10],H=_*A+C*k,F=_*h+C*w,U=_*p+C*R,W=-(N*U-V*F),q=-(V*H-O*U),X=-(O*F-N*H),lt=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(q,2)-Math.pow(X,2))),yt=x(W,q,X,lt);yt>1e-6?(W/=yt,q/=yt,X/=yt,lt/=yt):(W=q=X=0,lt=1);var pt=this.computedRotation,st=pt[0],tt=pt[1],dt=pt[2],rt=pt[3],at=st*lt+rt*W+tt*X-dt*q,vt=tt*lt+rt*q+dt*W-st*X,it=dt*lt+rt*X+st*q-tt*W,Y=rt*lt-st*W-tt*q-dt*X;if(M){W=O,q=N,X=V;var ft=Math.sin(M)/f(W,q,X);W*=ft,q*=ft,X*=ft,lt=Math.cos(_),at=at*lt+Y*W+vt*X-it*q,vt=vt*lt+Y*q+it*W-at*X,it=it*lt+Y*X+at*q-vt*W,Y=Y*lt-at*W-vt*q-it*X}var ut=x(at,vt,it,Y);ut>1e-6?(at/=ut,vt/=ut,it/=ut,Y/=ut):(at=vt=it=0,Y=1),this.rotation.set(b,at,vt,it,Y)},T.lookAt=function(b,_,C,M){this.recalcMatrix(b),C=C||this.computedCenter,_=_||this.computedEye,M=M||this.computedUp;var E=this.computedMatrix;n(E,_,C,M);var A=this.computedRotation;s(A,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),y(A,A),this.rotation.set(b,A[0],A[1],A[2],A[3]);for(var h=0,p=0;p<3;++p)h+=Math.pow(C[p]-_[p],2);this.radius.set(b,.5*Math.log(Math.max(h,1e-6))),this.center.set(b,C[0],C[1],C[2])},T.translate=function(b,_,C,M){this.center.move(b,_||0,C||0,M||0)},T.setMatrix=function(b,_){var C=this.computedRotation;s(C,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),y(C,C),this.rotation.set(b,C[0],C[1],C[2],C[3]);var M=this.computedMatrix;i(M,_);var E=M[15];if(Math.abs(E)>1e-6){var A=M[12]/E,h=M[13]/E,p=M[14]/E;this.recalcMatrix(b);var k=Math.exp(this.computedRadius[0]);this.center.set(b,A-M[2]*k,h-M[6]*k,p-M[10]*k),this.radius.idle(b)}else this.center.idle(b),this.radius.idle(b)},T.setDistance=function(b,_){_>0&&this.radius.set(b,Math.log(_))},T.setDistanceLimits=function(b,_){b>0?b=Math.log(b):b=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,b),this.radius.bounds[0][0]=b,this.radius.bounds[1][0]=_},T.getDistanceLimits=function(b){var _=this.radius.bounds;return b?(b[0]=Math.exp(_[0][0]),b[1]=Math.exp(_[1][0]),b):[Math.exp(_[0][0]),Math.exp(_[1][0])]},T.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},T.fromJSON=function(b){var _=this.lastT(),C=b.center;C&&this.center.set(_,C[0],C[1],C[2]);var M=b.rotation;M&&this.rotation.set(_,M[0],M[1],M[2],M[3]);var E=b.distance;E&&E>0&&this.radius.set(_,Math.log(E)),this.setDistanceLimits(b.zoomMin,b.zoomMax)};function u(b){b=b||{};var _=b.center||[0,0,0],C=b.rotation||[0,0,0,1],M=b.radius||1;_=[].slice.call(_,0,3),C=[].slice.call(C,0,4),y(C,C);var E=new v(C,_,Math.log(M));return E.setDistanceLimits(b.zoomMin,b.zoomMax),("eye"in b||"up"in b)&&E.lookAt(0,b.eye,b.center,b.up),E}},9994:function(t,e,r){var a=r(9618),n=r(8277);t.exports=function(o,i){for(var s=[],f=o,x=1;Array.isArray(f);)s.push(f.length),x*=f.length,f=f[0];return s.length===0?a():(i||(i=a(new Float64Array(x),s)),n(i,o),i)}}},g={};function P(t){var e=g[t];if(e!==void 0)return e.exports;var r=g[t]={id:t,loaded:!1,exports:{}};return c[t].call(r.exports,r,r.exports,P),r.loaded=!0,r.exports}(function(){P.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){P.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}();var S=P(1964);$.exports=S})()}),iS=Ft((Q,$)=>{$.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}),Pj=Ft((Q,$)=>{var c=iS();$.exports=P;var g={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function P(S){var t,e=[],r=1,a;if(typeof S=="string")if(S=S.toLowerCase(),c[S])e=c[S].slice(),a="rgb";else if(S==="transparent")r=0,a="rgb",e=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var n=S.slice(1),o=n.length,i=o<=4;r=1,i?(e=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],o===4&&(r=parseInt(n[3]+n[3],16)/255)):(e=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],o===8&&(r=parseInt(n[6]+n[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var s=t[1],f=s==="rgb",n=s.replace(/a$/,"");a=n;var o=n==="cmyk"?4:n==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,T){if(/%$/.test(v))return T===o?parseFloat(v)/100:n==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(n[T]==="h"){if(/deg$/.test(v))return parseFloat(v);if(g[v]!==void 0)return g[v]}return parseFloat(v)}),s===n&&e.push(1),r=f||e[o]===void 0?1:e[o],e=e.slice(0,o)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(e=S.match(/([0-9]+)/g).map(function(x){return parseFloat(x)}),a=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(e=[S[0],S[1],S[2]],a="rgb",r=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(a="rgb",e=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(a="hsl",e=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),r=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(r/=100)):(a="rgb",e=[S>>>16,(S&65280)>>>8,S&255]);return{space:a,values:e,alpha:r}}}),zj=Ft((Q,$)=>{var c=Pj();$.exports=function(P){Array.isArray(P)&&P.raw&&(P=String.raw.apply(null,arguments));var S,t=c(P);if(!t.space)return[];var e=[0,0,0],r=t.space[0]==="h"?[360,100,100]:[255,255,255];return S=Array(3),S[0]=Math.min(Math.max(t.values[0],e[0]),r[0]),S[1]=Math.min(Math.max(t.values[1],e[1]),r[1]),S[2]=Math.min(Math.max(t.values[2],e[2]),r[2]),t.space[0]==="h"&&(S=g(S)),S.push(Math.min(Math.max(t.alpha,0),1)),S};function g(P){var S=P[0]/360,t=P[1]/100,e=P[2]/100,r,a,n,o,i,s=0;if(t===0)return i=e*255,[i,i,i];for(a=e<.5?e*(1+t):e+t-e*t,r=2*e-a,o=[0,0,0];s<3;)n=S+1/3*-(s-1),n<0?n++:n>1&&n--,i=6*n<1?r+(a-r)*6*n:2*n<1?a:3*n<2?r+(a-r)*(2/3-n)*6:r,o[s++]=i*255;return o}}),v3=Ft((Q,$)=>{$.exports=c;function c(g,P,S){return PS?S:g:gP?P:g}}),Vk=Ft((Q,$)=>{$.exports=function(c){switch(c){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}}),U1=Ft((Q,$)=>{var c=zj(),g=v3(),P=Vk();$.exports=function(t,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var r=P(e),a=new r(4),n=e!=="uint8"&&e!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=c(t),t[0]/=255,t[1]/=255,t[2]/=255),S(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,n&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(n?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=g(Math.floor(t[0]*255),0,255),a[1]=g(Math.floor(t[1]*255),0,255),a[2]=g(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:g(Math.floor(t[3]*255),0,255)),a)};function S(t){return!!(t instanceof Uint8Array||t instanceof Uint8ClampedArray||Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}}),Tv=Ft((Q,$)=>{var c=U1();function g(P){return P?c(P):[0,0,0,1]}$.exports=g}),Av=Ft((Q,$)=>{var c=ia(),g=eo(),P=U1(),S=Xc(),t=yi().defaultLine,e=Va().isArrayOrTypedArray,r=P(t),a=1;function n(x,y){var v=x;return v[3]*=y,v}function o(x){if(c(x))return r;var y=P(x);return y.length?y:r}function i(x){return c(x)?x:a}function s(x,y,v){var T=x.color;T&&T._inputArray&&(T=T._inputArray);var u=e(T),b=e(y),_=S.extractOpts(x),C=[],M,E,A,h,p;if(_.colorscale!==void 0?M=S.makeColorScaleFuncFromTrace(x):M=o,u?E=function(w,R){return w[R]===void 0?r:P(M(w[R]))}:E=o,b?A=function(w,R){return w[R]===void 0?a:i(w[R])}:A=i,u||b)for(var k=0;k{$.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}}),Hk=Ft((Q,$)=>{$.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}}),Ij=Ft((Q,$)=>{var c=Qo();function g(t,e,r,a){if(!e||!e.visible)return null;for(var n=c.getComponentMethod("errorbars","makeComputeError")(e),o=new Array(t.length),i=0;i0){var v=a.c2l(x);a._lowerLogErrorBound||(a._lowerLogErrorBound=v),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,v)}}else o[i]=[-s[0]*r,s[1]*r]}return o}function P(t){for(var e=0;e{var c=pp().gl_line3d,g=pp().gl_scatter3d,P=pp().gl_error3d,S=pp().gl_mesh3d,t=pp().delaunay_triangulate,e=_n(),r=Tv(),a=Av().formatColor,n=bg(),o=aS(),i=Hk(),s=Ls(),f=Np().appendArrayPointValue,x=Ij();function y(R,O){this.scene=R,this.uid=O,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var v=y.prototype;v.handlePick=function(R){if(R.object&&(R.object===this.linePlot||R.object===this.delaunayMesh||R.object===this.textMarkers||R.object===this.scatterPlot)){var O=R.index=R.data.index;return R.object.highlight&&R.object.highlight(null),this.scatterPlot&&(R.object=this.scatterPlot,this.scatterPlot.highlight(R.data)),R.textLabel="",this.textLabels&&(e.isArrayOrTypedArray(this.textLabels)?(this.textLabels[O]||this.textLabels[O]===0)&&(R.textLabel=this.textLabels[O]):R.textLabel=this.textLabels),R.traceCoordinate=[this.data.x[O],this.data.y[O],this.data.z[O]],!0}};function T(R,O,N){var V=(N+1)%3,H=(N+2)%3,F=[],U=[],W;for(W=0;W-1?-1:R.indexOf("right")>-1?1:0}function _(R){return R==null?0:R.indexOf("top")>-1?-1:R.indexOf("bottom")>-1?1:0}function C(R){var O=0,N=0,V=[O,N];if(Array.isArray(R))for(var H=0;H=0){var X=T(W.position,W.delaunayColor,W.delaunayAxis);X.opacity=R.opacity,this.delaunayMesh?this.delaunayMesh.update(X):(X.gl=O,this.delaunayMesh=S(X),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},v.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function w(R,O){var N=new y(R,O.uid);return N.update(O),N}$.exports=w}),oS=Ft((Q,$)=>{var c=tf(),g=ka(),P=Ac(),S=dh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=Yo(),n=aS(),o=Hk(),i=ya().extendFlat,s=Yc().overrideAll,f=X0(),x=c.line,y=c.marker,v=y.line,T=i({width:x.width,dash:{valType:"enumerated",values:f(n),dflt:"solid"}},P("line"));function u(_){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var b=$.exports=s({x:c.x,y:c.y,z:{valType:"data_array"},text:i({},c.text,{}),texttemplate:e(),texttemplatefallback:r({editType:"calc"}),hovertext:i({},c.hovertext,{}),hovertemplate:t(),hovertemplatefallback:r(),xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z"),mode:i({},c.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:u(),y:u(),z:u()},connectgaps:c.connectgaps,line:T,marker:i({symbol:{valType:"enumerated",values:f(o),dflt:"circle",arrayOk:!0},size:i({},y.size,{dflt:8}),sizeref:y.sizeref,sizemin:y.sizemin,sizemode:y.sizemode,opacity:i({},y.opacity,{arrayOk:!1}),colorbar:y.colorbar,line:i({width:i({},v.width,{arrayOk:!1})},P("marker.line"))},P("marker")),textposition:i({},c.textposition,{dflt:"top center"}),textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:a.opacity,hoverinfo:i({},a.hoverinfo)},"calc","nested");b.x.editType=b.y.editType=b.z.editType="calc+clearAxisTypes"}),Dj=Ft((Q,$)=>{var c=Qo(),g=_n(),P=Mc(),S=c0(),t=F0(),e=b0(),r=oS();$.exports=function(n,o,i,s){function f(C,M){return g.coerce(n,o,r,C,M)}var x=a(n,o,f,s);if(!x){o.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),P.hasMarkers(o)&&S(n,o,i,s,f,{noSelect:!0,noAngle:!0}),P.hasLines(o)&&(f("connectgaps"),t(n,o,i,s,f)),P.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),e(n,o,s,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var y=(o.line||{}).color,v=(o.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",y||v);for(var T=["x","y","z"],u=0;u<3;++u){var b="projection."+T[u];f(b+".show")&&(f(b+".opacity"),f(b+".scale"))}var _=c.getComponentMethod("errorbars","supplyDefaults");_(n,o,y||v||i,{axis:"z"}),_(n,o,y||v||i,{axis:"y",inherit:"z"}),_(n,o,y||v||i,{axis:"x",inherit:"z"})};function a(n,o,i,s){var f=0,x=i("x"),y=i("y"),v=i("z"),T=c.getComponentMethod("calendars","handleTraceDefaults");return T(n,o,["x","y","z"],s),x&&y&&v&&(f=Math.min(x.length,y.length,v.length),o._length=o._xlength=o._ylength=o._zlength=f),f}}),Fj=Ft((Q,$)=>{var c=ct(),g=N0();$.exports=function(P,S){var t=[{x:!1,y:!1,trace:S,t:{}}];return c(t,S),g(P,S),t}}),Rj=Ft((Q,$)=>{$.exports=c;function c(g,P){if(typeof g!="string")throw new TypeError("must specify type string");if(P=P||{},typeof document>"u"&&!P.canvas)return null;var S=P.canvas||document.createElement("canvas");typeof P.width=="number"&&(S.width=P.width),typeof P.height=="number"&&(S.height=P.height);var t=P,e;try{var r=[g];g.indexOf("webgl")===0&&r.push("experimental-"+g);for(var a=0;a{var c=Rj();$.exports=function(g){return c("webgl",g)}}),sS=Ft((Q,$)=>{var c=ui(),g=function(){};$.exports=function(P){for(var S in P)typeof P[S]=="function"&&(P[S]=g);P.destroy=function(){P.container.parentNode.removeChild(P.container)};var t=document.createElement("div");t.className="no-webgl",t.style.cursor="pointer",t.style.fontSize="24px",t.style.color=c.defaults[0],t.style.position="absolute",t.style.left=t.style.top="0px",t.style.width=t.style.height="100%",t.style["background-color"]=c.lightLine,t.style["z-index"]=30;var e=document.createElement("p");return e.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",e.style.position="relative",e.style.top="50%",e.style.left="50%",e.style.height="30%",e.style.width="50%",e.style.margin="-15% 0 0 -25%",t.appendChild(e),P.container.appendChild(t),P.container.style.background="#FFFFFF",P.container.onclick=function(){window.open("https://get.webgl.org")},!1}}),Nj=Ft((Q,$)=>{var c=Tv(),g=_n(),P=["xaxis","yaxis","zaxis"];function S(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var t=S.prototype;t.merge=function(r,a){for(var n=this,o=0;o<3;++o){var i=a[P[o]];if(!i.visible){n.tickEnable[o]=!1,n.labelEnable[o]=!1,n.lineEnable[o]=!1,n.lineTickEnable[o]=!1,n.gridEnable[o]=!1,n.zeroEnable[o]=!1,n.backgroundEnable[o]=!1;continue}n.labels[o]=r._meta?g.templateString(i.title.text,r._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(n.labelColor[o]=c(i.title.font.color)),i.title.font.family&&(n.labelFont[o]=i.title.font.family),i.title.font.size&&(n.labelSize[o]=i.title.font.size),i.title.font.weight&&(n.labelFontWeight[o]=i.title.font.weight),i.title.font.style&&(n.labelFontStyle[o]=i.title.font.style),i.title.font.variant&&(n.labelFontVariant[o]=i.title.font.variant)),"showline"in i&&(n.lineEnable[o]=i.showline),"linecolor"in i&&(n.lineColor[o]=c(i.linecolor)),"linewidth"in i&&(n.lineWidth[o]=i.linewidth),"showgrid"in i&&(n.gridEnable[o]=i.showgrid),"gridcolor"in i&&(n.gridColor[o]=c(i.gridcolor)),"gridwidth"in i&&(n.gridWidth[o]=i.gridwidth),i.type==="log"?n.zeroEnable[o]=!1:"zeroline"in i&&(n.zeroEnable[o]=i.zeroline),"zerolinecolor"in i&&(n.zeroLineColor[o]=c(i.zerolinecolor)),"zerolinewidth"in i&&(n.zeroLineWidth[o]=i.zerolinewidth),"ticks"in i&&i.ticks?n.lineTickEnable[o]=!0:n.lineTickEnable[o]=!1,"ticklen"in i&&(n.lineTickLength[o]=n._defaultLineTickLength[o]=i.ticklen),"tickcolor"in i&&(n.lineTickColor[o]=c(i.tickcolor)),"tickwidth"in i&&(n.lineTickWidth[o]=i.tickwidth),"tickangle"in i&&(n.tickAngle[o]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(n.tickEnable[o]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(n.tickColor[o]=c(i.tickfont.color)),i.tickfont.family&&(n.tickFont[o]=i.tickfont.family),i.tickfont.size&&(n.tickSize[o]=i.tickfont.size),i.tickfont.weight&&(n.tickFontWeight[o]=i.tickfont.weight),i.tickfont.style&&(n.tickFontStyle[o]=i.tickfont.style),i.tickfont.variant&&(n.tickFontVariant[o]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(n.lineTickMirror[o]=!0,n.lineMirror[o]=!0):i.mirror===!0?(n.lineTickMirror[o]=!1,n.lineMirror[o]=!0):(n.lineTickMirror[o]=!1,n.lineMirror[o]=!1):n.lineMirror[o]=!1,"showbackground"in i&&i.showbackground!==!1?(n.backgroundEnable[o]=!0,n.backgroundColor[o]=c(i.backgroundcolor)):n.backgroundEnable[o]=!1}};function e(r,a){var n=new S;return n.merge(r,a),n}$.exports=e}),jj=Ft((Q,$)=>{var c=Tv(),g=["xaxis","yaxis","zaxis"];function P(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var S=P.prototype;S.merge=function(e){for(var r=0;r<3;++r){var a=e[g[r]];if(!a.visible){this.enabled[r]=!1,this.drawSides[r]=!1;continue}this.enabled[r]=a.showspikes,this.colors[r]=c(a.spikecolor),this.drawSides[r]=a.spikesides,this.lineWidth[r]=a.spikethickness}};function t(e){var r=new P;return r.merge(e),r}$.exports=t}),Uj=Ft((Q,$)=>{$.exports=t;var c=Ls(),g=_n(),P=["xaxis","yaxis","zaxis"];function S(e){for(var r=new Array(3),a=0;a<3;++a){for(var n=e[a],o=new Array(n.length),i=0;i/g," "));o[i]=y,s.tickmode=f}}r.ticks=o;for(var i=0;i<3;++i){.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var v=0;v<2;++v)r.bounds[v][i]=e.glplot.bounds[v][i]}e.contourLevels=S(o)}}),Vj=Ft((Q,$)=>{var c=pp().gl_plot3d,g=c.createCamera,P=c.createScene,S=Bj(),t=D_(),e=Qo(),r=_n(),a=r.preserveDrawingBuffer(),n=Ls(),o=Qh(),i=Tv(),s=sS(),f=TM(),x=Nj(),y=jj(),v=Uj(),T=J0().applyAutorangeOptions,u,b,_=!1;function C(N,V){var H=document.createElement("div"),F=N.container;this.graphDiv=N.graphDiv;var U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.style.position="absolute",U.style.top=U.style.left="0px",U.style.width=U.style.height="100%",U.style["z-index"]=20,U.style["pointer-events"]="none",H.appendChild(U),this.svgContainer=U,H.id=N.id,H.style.position="absolute",H.style.top=H.style.left="0px",H.style.width=H.style.height="100%",F.appendChild(H),this.fullLayout=V,this.id=N.id||"scene",this.fullSceneLayout=V[this.id],this.plotArgs=[[],{},{}],this.axesOptions=x(V,V[this.id]),this.spikeOptions=y(V[this.id]),this.container=H,this.staticMode=!!N.staticPlot,this.pixelRatio=this.pixelRatio||N.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var M=C.prototype;M.prepareOptions=function(){var N=this,V={canvas:N.canvas,gl:N.gl,glOptions:{preserveDrawingBuffer:a,premultipliedAlpha:!0,antialias:!0},container:N.container,axes:N.axesOptions,spikes:N.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:N.camera,pixelRatio:N.pixelRatio};if(N.staticMode){if(!b&&(u=document.createElement("canvas"),b=S({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!b))throw new Error("error creating static canvas/context for image server");V.gl=b,V.canvas=u}return V};var E=!0;M.tryCreatePlot=function(){var N=this,V=N.prepareOptions(),H=!0;try{N.glplot=P(V)}catch{if(N.staticMode||!E||a)H=!1;else{r.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{a=V.glOptions.preserveDrawingBuffer=!0,N.glplot=P(V)}catch{a=V.glOptions.preserveDrawingBuffer=!1,H=!1}}}return E=!1,H},M.initializeGLCamera=function(){var N=this,V=N.fullSceneLayout.camera,H=V.projection.type==="orthographic";N.camera=g(N.container,{center:[V.center.x,V.center.y,V.center.z],eye:[V.eye.x,V.eye.y,V.eye.z],up:[V.up.x,V.up.y,V.up.z],_ortho:H,zoomMin:.01,zoomMax:100,mode:"orbit"})},M.initializeGLPlot=function(){var N=this;N.initializeGLCamera();var V=N.tryCreatePlot();if(!V)return s(N);N.traces={},N.make4thDimension();var H=N.graphDiv,F=H.layout,U=function(){var q={};return N.isCameraChanged(F)&&(q[N.id+".camera"]=N.getCamera()),N.isAspectChanged(F)&&(q[N.id+".aspectratio"]=N.glplot.getAspectratio(),F[N.id].aspectmode!=="manual"&&(N.fullSceneLayout.aspectmode=F[N.id].aspectmode=q[N.id+".aspectmode"]="manual")),q},W=function(q){if(q.fullSceneLayout.dragmode!==!1){var X=U();q.saveLayout(F),q.graphDiv.emit("plotly_relayout",X)}};return N.glplot.canvas&&(N.glplot.canvas.addEventListener("mouseup",function(){W(N)}),N.glplot.canvas.addEventListener("touchstart",function(){_=!0}),N.glplot.canvas.addEventListener("wheel",function(q){if(H._context._scrollZoom.gl3d){if(N.camera._ortho){var X=q.deltaX>q.deltaY?1.1:.9090909090909091,lt=N.glplot.getAspectratio();N.glplot.setAspectratio({x:X*lt.x,y:X*lt.y,z:X*lt.z})}W(N)}},t?{passive:!1}:!1),N.glplot.canvas.addEventListener("mousemove",function(){if(N.fullSceneLayout.dragmode!==!1&&N.camera.mouseListener.buttons!==0){var q=U();N.graphDiv.emit("plotly_relayouting",q)}}),N.staticMode||N.glplot.canvas.addEventListener("webglcontextlost",function(q){H&&H.emit&&H.emit("plotly_webglcontextlost",{event:q,layer:N.id})},!1)),N.glplot.oncontextloss=function(){N.recoverContext()},N.glplot.onrender=function(){N.render()},!0},M.render=function(){var N=this,V=N.graphDiv,H,F=N.svgContainer,U=N.container.getBoundingClientRect();V._fullLayout._calcInverseTransform(V);var W=V._fullLayout._invScaleX,q=V._fullLayout._invScaleY,X=U.width*W,lt=U.height*q;F.setAttributeNS(null,"viewBox","0 0 "+X+" "+lt),F.setAttributeNS(null,"width",X),F.setAttributeNS(null,"height",lt),v(N),N.glplot.axes.update(N.axesOptions);for(var yt=Object.keys(N.traces),pt=null,st=N.glplot.selection,tt=0;tt")):H.type==="isosurface"||H.type==="volume"?(it.valueLabel=n.hoverLabelText(N._mockAxis,N._mockAxis.d2l(st.traceCoordinate[3]),H.valuehoverformat),zt.push("value: "+it.valueLabel),st.textLabel&&zt.push(st.textLabel),wt=zt.join("
")):wt=st.textLabel;var Pt={x:st.traceCoordinate[0],y:st.traceCoordinate[1],z:st.traceCoordinate[2],data:at._input,fullData:at,curveNumber:at.index,pointNumber:vt};o.appendArrayPointValue(Pt,at,vt),H._module.eventData&&(Pt=at._module.eventData(Pt,st,at,{},vt));var Wt={points:[Pt]};if(N.fullSceneLayout.hovermode){var Ht=[];o.loneHover({trace:at,x:(.5+.5*rt[0]/rt[3])*X,y:(.5-.5*rt[1]/rt[3])*lt,xLabel:it.xLabel,yLabel:it.yLabel,zLabel:it.zLabel,text:wt,name:pt.name,color:o.castHoverOption(at,vt,"bgcolor")||pt.color,borderColor:o.castHoverOption(at,vt,"bordercolor"),fontFamily:o.castHoverOption(at,vt,"font.family"),fontSize:o.castHoverOption(at,vt,"font.size"),fontColor:o.castHoverOption(at,vt,"font.color"),nameLength:o.castHoverOption(at,vt,"namelength"),textAlign:o.castHoverOption(at,vt,"align"),hovertemplate:r.castOption(at,vt,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Pt,it),eventData:[Pt]},{container:F,gd:V,inOut_bbox:Ht}),Pt.bbox=Ht[0]}st.distance<5&&(st.buttons||_)?V.emit("plotly_click",Wt):V.emit("plotly_hover",Wt),this.oldEventData=Wt}else o.loneUnhover(F),this.oldEventData&&V.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;N.drawAnnotations(N)},M.recoverContext=function(){var N=this;N.glplot.dispose();var V=function(){if(N.glplot.gl.isContextLost()){requestAnimationFrame(V);return}if(!N.initializeGLPlot()){r.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}N.plot.apply(N,N.plotArgs)};requestAnimationFrame(V)};var A=["xaxis","yaxis","zaxis"];function h(N,V,H){for(var F=N.fullSceneLayout,U=0;U<3;U++){var W=A[U],q=W.charAt(0),X=F[W],lt=V[q],yt=V[q+"calendar"],pt=V["_"+q+"length"];if(!r.isArrayOrTypedArray(lt))H[0][U]=Math.min(H[0][U],0),H[1][U]=Math.max(H[1][U],pt-1);else for(var st,tt=0;tt<(pt||lt.length);tt++)if(r.isArrayOrTypedArray(lt[tt]))for(var dt=0;dtat[1][q])at[0][q]=-1,at[1][q]=1;else{var ge=at[1][q]-at[0][q];at[0][q]-=ge/32,at[1][q]+=ge/32}if(Y=[at[0][q],at[1][q]],Y=T(Y,lt),at[0][q]=Y[0],at[1][q]=Y[1],lt.isReversed()){var he=at[0][q];at[0][q]=at[1][q],at[1][q]=he}}else Y=lt.range,at[0][q]=lt.r2l(Y[0]),at[1][q]=lt.r2l(Y[1]);at[0][q]===at[1][q]&&(at[0][q]-=1,at[1][q]+=1),vt[q]=at[1][q]-at[0][q],lt.range=[at[0][q],at[1][q]],lt.limitRange(),F.glplot.setBounds(q,{min:lt.range[0]*dt[q],max:lt.range[1]*dt[q]})}var de,se=pt.aspectmode;if(se==="cube")de=[1,1,1];else if(se==="manual"){var Tt=pt.aspectratio;de=[Tt.x,Tt.y,Tt.z]}else if(se==="auto"||se==="data"){var Lt=[1,1,1];for(q=0;q<3;++q){lt=pt[A[q]],yt=lt.type;var Mt=it[yt];Lt[q]=Math.pow(Mt.acc,1/Mt.count)/dt[q]}se==="data"||Math.max.apply(null,Lt)/Math.min.apply(null,Lt)<=4?de=Lt:de=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");pt.aspectratio.x=st.aspectratio.x=de[0],pt.aspectratio.y=st.aspectratio.y=de[1],pt.aspectratio.z=st.aspectratio.z=de[2],F.glplot.setAspectratio(pt.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:pt.aspectratio.x,y:pt.aspectratio.y,z:pt.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=pt.aspectmode);var te=pt.domain||null,ve=V._size||null;if(te&&ve){var oe=F.container.style;oe.position="absolute",oe.left=ve.l+te.x[0]*ve.w+"px",oe.top=ve.t+(1-te.y[1])*ve.h+"px",oe.width=ve.w*(te.x[1]-te.x[0])+"px",oe.height=ve.h*(te.y[1]-te.y[0])+"px"}F.glplot.redraw()}},M.destroy=function(){var N=this;N.glplot&&(N.camera.mouseListener.enabled=!1,N.container.removeEventListener("wheel",N.camera.wheelListener),N.camera=null,N.glplot.dispose(),N.container.parentNode.removeChild(N.container),N.glplot=null)};function k(N){return[[N.eye.x,N.eye.y,N.eye.z],[N.center.x,N.center.y,N.center.z],[N.up.x,N.up.y,N.up.z]]}function w(N){return{up:{x:N.up[0],y:N.up[1],z:N.up[2]},center:{x:N.center[0],y:N.center[1],z:N.center[2]},eye:{x:N.eye[0],y:N.eye[1],z:N.eye[2]},projection:{type:N._ortho===!0?"orthographic":"perspective"}}}M.getCamera=function(){var N=this;return N.camera.view.recalcMatrix(N.camera.view.lastT()),w(N.camera)},M.setViewport=function(N){var V=this,H=N.camera;V.camera.lookAt.apply(this,k(H)),V.glplot.setAspectratio(N.aspectratio);var F=H.projection.type==="orthographic",U=V.camera._ortho;F!==U&&(V.glplot.redraw(),V.glplot.clearRGBA(),V.glplot.dispose(),V.initializeGLPlot())},M.isCameraChanged=function(N){var V=this,H=V.getCamera(),F=r.nestedProperty(N,V.id+".camera"),U=F.get();function W(yt,pt,st,tt){var dt=["up","center","eye"],rt=["x","y","z"];return pt[dt[st]]&&yt[dt[st]][rt[tt]]===pt[dt[st]][rt[tt]]}var q=!1;if(U===void 0)q=!0;else{for(var X=0;X<3;X++)for(var lt=0;lt<3;lt++)if(!W(H,U,X,lt)){q=!0;break}(!U.projection||H.projection&&H.projection.type!==U.projection.type)&&(q=!0)}return q},M.isAspectChanged=function(N){var V=this,H=V.glplot.getAspectratio(),F=r.nestedProperty(N,V.id+".aspectratio"),U=F.get();return U===void 0||U.x!==H.x||U.y!==H.y||U.z!==H.z},M.saveLayout=function(N){var V=this,H=V.fullLayout,F,U,W,q,X,lt,yt=V.isCameraChanged(N),pt=V.isAspectChanged(N),st=yt||pt;if(st){var tt={};if(yt&&(F=V.getCamera(),U=r.nestedProperty(N,V.id+".camera"),W=U.get(),tt[V.id+".camera"]=W),pt&&(q=V.glplot.getAspectratio(),X=r.nestedProperty(N,V.id+".aspectratio"),lt=X.get(),tt[V.id+".aspectratio"]=lt),e.call("_storeDirectGUIEdit",N,H._preGUI,tt),yt){U.set(F);var dt=r.nestedProperty(H,V.id+".camera");dt.set(F)}if(pt){X.set(q);var rt=r.nestedProperty(H,V.id+".aspectratio");rt.set(q),V.glplot.redraw()}}return st},M.updateFx=function(N,V){var H=this,F=H.camera;if(F)if(N==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(N==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var U=H.graphDiv,W=U._fullLayout,q=H.fullSceneLayout.camera,X=q.up.x,lt=q.up.y,yt=q.up.z;if(yt/Math.sqrt(X*X+lt*lt+yt*yt)<.999){var pt=H.id+".camera.up",st={x:0,y:0,z:1},tt={};tt[pt]=st;var dt=U.layout;e.call("_storeDirectGUIEdit",dt,W._preGUI,tt),q.up=st,r.nestedProperty(dt,pt).set(st)}}else F.keyBindingMode=N;H.fullSceneLayout.hovermode=V};function R(N,V,H){for(var F=0,U=H-1;F0)for(var X=255/q,lt=0;lt<3;++lt)N[W+lt]=Math.min(X*N[W+lt],255)}}M.toImage=function(N){var V=this;N||(N="png"),V.staticMode&&V.container.appendChild(u),V.glplot.redraw();var H=V.glplot.gl,F=H.drawingBufferWidth,U=H.drawingBufferHeight;H.bindFramebuffer(H.FRAMEBUFFER,null);var W=new Uint8Array(F*U*4);H.readPixels(0,0,F,U,H.RGBA,H.UNSIGNED_BYTE,W),R(W,F,U),O(W,F,U);var q=document.createElement("canvas");q.width=F,q.height=U;var X=q.getContext("2d",{willReadFrequently:!0}),lt=X.createImageData(F,U);lt.data.set(W),X.putImageData(lt,0,0);var yt;switch(N){case"jpeg":yt=q.toDataURL("image/jpeg");break;case"webp":yt=q.toDataURL("image/webp");break;default:yt=q.toDataURL("image/png")}return V.staticMode&&V.container.removeChild(u),yt},M.setConvert=function(){for(var N=this,V=0;V<3;V++){var H=N.fullSceneLayout[A[V]];n.setConvert(H,N.fullLayout),H.setScale=r.noop}},M.make4thDimension=function(){var N=this,V=N.graphDiv,H=V._fullLayout;N._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(N._mockAxis,H)},$.exports=C}),Hj=Ft((Q,$)=>{$.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}),lS=Ft((Q,$)=>{var c=ui(),g=Cd(),P=ya().extendFlat,S=Yc().overrideAll;$.exports=S({visible:g.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:c.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:g.color,categoryorder:g.categoryorder,categoryarray:g.categoryarray,title:{text:g.title.text,font:g.title.font},type:P({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorange:g.autorange,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},rangemode:g.rangemode,minallowed:g.minallowed,maxallowed:g.maxallowed,range:P({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,mirror:g.mirror,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:g.tickfont,tickangle:g.tickangle,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickformat:g.tickformat,tickformatstops:g.tickformatstops,hoverformat:g.hoverformat,showline:g.showline,linecolor:g.linecolor,linewidth:g.linewidth,showgrid:g.showgrid,gridcolor:P({},g.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:g.gridwidth,zeroline:g.zeroline,zerolinecolor:g.zerolinecolor,zerolinewidth:g.zerolinewidth},"plot","from-root")}),uS=Ft((Q,$)=>{var c=lS(),g=jh().attributes,P=ya().extendFlat,S=_n().counterRegex;function t(e,r,a){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:a,editType:"camera"},editType:"camera"}}$.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:P(t(0,0,1),{}),center:P(t(0,0,0),{}),eye:P(t(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:g({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:c,yaxis:c,zaxis:c,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}),Wj=Ft((Q,$)=>{var c=eo().mix,g=_n(),P=mu(),S=lS(),t=Tp(),e=Qy(),r=["xaxis","yaxis","zaxis"],a=13600/187;$.exports=function(n,o,i){var s,f;function x(T,u){return g.coerce(s,f,S,T,u)}for(var y=0;y{var c=_n(),g=ui(),P=Qo(),S=I1(),t=Wj(),e=uS(),r=dd().getSubplotData,a="gl3d";$.exports=function(o,i,s){var f=i._basePlotModules.length>1;function x(y){if(!f){var v=c.validate(o[y],e[y]);if(v)return o[y]}}S(o,i,s,{type:a,attributes:e,handleDefaults:n,fullLayout:i,font:i.font,fullData:s,getDfltFromLayout:x,autotypenumbersDflt:i.autotypenumbers,paper_bgcolor:i.paper_bgcolor,calendar:i.calendar})};function n(o,i,s,f){for(var x=s("bgcolor"),y=g.combine(x,f.paper_bgcolor),v=["up","center","eye"],T=0;T.999)&&(M="turntable")}else M="turntable";s("dragmode",M),s("hovermode",f.getDfltFromLayout("hovermode"))}}),V1=Ft(Q=>{var $=Yc().overrideAll,c=vo(),g=Vj(),P=dd().getSubplotData,S=_n(),t=Bp(),e="gl3d",r="scene";Q.name=e,Q.attr=r,Q.idRoot=r,Q.idRegex=Q.attrRegex=S.counterRegex("scene"),Q.attributes=Hj(),Q.layoutAttributes=uS(),Q.baseLayoutAttrOverrides=$({hoverlabel:c.hoverlabel},"plot","nested"),Q.supplyLayoutDefaults=qj(),Q.plot=function(a){for(var n=a._fullLayout,o=a._fullData,i=n._subplots[e],s=0;s{$.exports={plot:Oj(),attributes:oS(),markerSymbols:Hk(),supplyDefaults:Dj(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:Fj(),moduleType:"trace",name:"scatter3d",basePlotModule:V1(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}),$j=Ft((Q,$)=>{$.exports=Zj()}),y3=Ft((Q,$)=>{var c=ui(),g=Ac(),P=dh().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=$u(),e=Yo(),r=ya().extendFlat,a=Yc().overrideAll;function n(s){return{valType:"boolean",dflt:!1}}function o(s){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:n(),y:n(),z:n()},color:{valType:"color",dflt:c.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:c.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=$.exports=a(r({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},g("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:o(),y:o(),z:o()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:r({},e.hoverinfo),showlegend:r({},e.showlegend,{dflt:!1})}),"calc","nested");i.x.editType=i.y.editType=i.z.editType="calc+clearAxisTypes"}),cS=Ft((Q,$)=>{var c=Qo(),g=_n(),P=gc(),S=y3(),t=.1;function e(o,i){for(var s=[],f=32,x=0;x{var c=ep();$.exports=function(g,P){P.surfacecolor?c(g,P,{vals:P.surfacecolor,containerStr:"",cLetter:"c"}):c(g,P,{vals:P.z,containerStr:"",cLetter:"c"})}}),Yj=Ft((Q,$)=>{var c=pp().gl_surface3d,g=pp().ndarray,P=pp().ndarray_linear_interpolate.d2,S=N6(),t=j6(),e=_n().isArrayOrTypedArray,r=Av().parseColorScale,a=Tv(),n=Xc().extractOpts;function o(k,w,R){this.scene=k,this.uid=R,this.surface=w,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var i=o.prototype;i.getXat=function(k,w,R,O){var N=e(this.data.x)?e(this.data.x[0])?this.data.x[w][k]:this.data.x[k]:k;return R===void 0?N:O.d2l(N,0,R)},i.getYat=function(k,w,R,O){var N=e(this.data.y)?e(this.data.y[0])?this.data.y[w][k]:this.data.y[w]:w;return R===void 0?N:O.d2l(N,0,R)},i.getZat=function(k,w,R,O){var N=this.data.z[w][k];return N===null&&this.data.connectgaps&&this.data._interpolatedZ&&(N=this.data._interpolatedZ[w][k]),R===void 0?N:O.d2l(N,0,R)},i.handlePick=function(k){if(k.object===this.surface){var w=(k.data.index[0]-1)/this.dataScaleX-1,R=(k.data.index[1]-1)/this.dataScaleY-1,O=Math.max(Math.min(Math.round(w),this.data.z[0].length-1),0),N=Math.max(Math.min(Math.round(R),this.data._ylength-1),0);k.index=[O,N],k.traceCoordinate=[this.getXat(O,N),this.getYat(O,N),this.getZat(O,N)],k.dataCoordinate=[this.getXat(O,N,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(O,N,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(O,N,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var V=0;V<3;V++){var H=k.dataCoordinate[V];H!=null&&(k.dataCoordinate[V]*=this.scene.dataScale[V])}var F=this.data.hovertext||this.data.text;return e(F)&&F[N]&&F[N][O]!==void 0?k.textLabel=F[N][O]:F?k.textLabel=F:k.textLabel="",k.data.dataCoordinate=k.dataCoordinate.slice(),this.surface.highlight(k.data),this.scene.glplot.spikes.position=k.dataCoordinate,!0}};function s(k){var w=k[0].rgb,R=k[k.length-1].rgb;return w[0]===R[0]&&w[1]===R[1]&&w[2]===R[2]&&w[3]===R[3]}var f=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function x(k,w){if(k0){R=f[O];break}return R}function T(k,w){if(!(k<1||w<1)){for(var R=y(k),O=y(w),N=1,V=0;VC;)O--,O/=v(O),O++,O<_&&(O=C);var N=Math.round(O/k);return N>1?N:1};function M(k,w,R){var O=R[8]+R[2]*w[0]+R[5]*w[1];return k[0]=(R[6]+R[0]*w[0]+R[3]*w[1])/O,k[1]=(R[7]+R[1]*w[0]+R[4]*w[1])/O,k}function E(k,w,R){return A(k,w,M,R),k}function A(k,w,R,O){for(var N=[0,0],V=k.shape[0],H=k.shape[1],F=0;F0&&this.contourStart[O]!==null&&this.contourEnd[O]!==null&&this.contourEnd[O]>this.contourStart[O]))for(w[O]=!0,N=this.contourStart[O];Nlt&&(this.minValues[W]=lt),this.maxValues[W]{$.exports={attributes:y3(),supplyDefaults:cS().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:Gj(),plot:Yj(),moduleType:"trace",name:"surface",basePlotModule:V1(),categories:["gl3d","2dMap","showLegend"],meta:{}}}),Xj=Ft((Q,$)=>{$.exports=Kj()}),gb=Ft((Q,$)=>{var c=Ac(),g=dh().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=y3(),e=Yo(),r=ya().extendFlat;$.exports=r({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:P({editType:"calc"}),hovertemplatefallback:S({editType:"calc"}),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},c("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:r({},t.contours.x.show,{}),color:t.contours.x.color,width:t.contours.x.width,editType:"calc"},lightposition:{x:r({},t.lightposition.x,{dflt:1e5}),y:r({},t.lightposition.y,{dflt:1e5}),z:r({},t.lightposition.z,{dflt:0}),editType:"calc"},lighting:r({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},t.lighting),hoverinfo:r({},e.hoverinfo,{editType:"calc"}),showlegend:r({},e.showlegend,{dflt:!1})})}),Wk=Ft((Q,$)=>{var c=Ac(),g=dh().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=gb(),e=Yo(),r=ya().extendFlat,a=Yc().overrideAll;function n(s){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function o(s){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var i=$.exports=a(r({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:n(),y:n(),z:n()},caps:{x:o(),y:o(),z:o()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:P(),hovertemplatefallback:S(),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),valuehoverformat:g("value",1),showlegend:r({},e.showlegend,{dflt:!1})},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,lightposition:t.lightposition,lighting:t.lighting,flatshading:t.flatshading,contour:t.contour,hoverinfo:r({},e.hoverinfo)}),"calc","nested");i.flatshading.dflt=!0,i.lighting.facenormalsepsilon.dflt=0,i.x.editType=i.y.editType=i.z.editType=i.value.editType="calc+clearAxisTypes"}),hS=Ft((Q,$)=>{var c=_n(),g=Qo(),P=Wk(),S=gc();function t(r,a,n,o){function i(s,f){return c.coerce(r,a,P,s,f)}e(r,a,n,o,i)}function e(r,a,n,o,i){var s=i("isomin"),f=i("isomax");f!=null&&s!==void 0&&s!==null&&s>f&&(a.isomin=null,a.isomax=null);var x=i("x"),y=i("y"),v=i("z"),T=i("value");if(!x||!x.length||!y||!y.length||!v||!v.length||!T||!T.length){a.visible=!1;return}var u=g.getComponentMethod("calendars","handleTraceDefaults");u(r,a,["x","y","z"],o),i("valuehoverformat"),["x","y","z"].forEach(function(M){i(M+"hoverformat");var E="caps."+M,A=i(E+".show");A&&i(E+".fill");var h="slices."+M,p=i(h+".show");p&&(i(h+".fill"),i(h+".locations"))});var b=i("spaceframe.show");b&&i("spaceframe.fill");var _=i("surface.show");_&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var C=i("contour.show");C&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(M){i(M)}),S(r,a,o,i,{prefix:"",cLetter:"c"}),a._length=null}$.exports={supplyDefaults:t,supplyIsoDefaults:e}}),qk=Ft((Q,$)=>{var c=_n(),g=ep();function P(r,a){a._len=Math.min(a.u.length,a.v.length,a.w.length,a.x.length,a.y.length,a.z.length),a._u=e(a.u,a._len),a._v=e(a.v,a._len),a._w=e(a.w,a._len),a._x=e(a.x,a._len),a._y=e(a.y,a._len),a._z=e(a.z,a._len);var n=S(a);a._gridFill=n.fill,a._Xs=n.Xs,a._Ys=n.Ys,a._Zs=n.Zs,a._len=n.len;var o=0,i,s,f;a.starts&&(i=e(a.starts.x||[]),s=e(a.starts.y||[]),f=e(a.starts.z||[]),o=Math.min(i.length,s.length,f.length)),a._startsX=i||[],a._startsY=s||[],a._startsZ=f||[];var x=0,y=1/0,v;for(v=0;v1&&(p=a[i-1],w=n[i-1],O=o[i-1]),s=0;sp?"-":"+")+"x"),C=C.replace("y",(k>w?"-":"+")+"y"),C=C.replace("z",(R>O?"-":"+")+"z");var F=function(){i=0,N=[],V=[],H=[]};(!i||i{var c=ep(),g=qk().processGrid,P=qk().filter;$.exports=function(S,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=P(t.x,t._len),t._y=P(t.y,t._len),t._z=P(t.z,t._len),t._value=P(t.value,t._len);var e=g(t);t._gridFill=e.fill,t._Xs=e.Xs,t._Ys=e.Ys,t._Zs=e.Zs,t._len=e.len;for(var r=1/0,a=-1/0,n=0;n{$.exports=function(c,g,P,S){S=S||c.length;for(var t=new Array(S),e=0;e{var c=pp().gl_mesh3d,g=Av().parseColorScale,P=_n().isArrayOrTypedArray,S=Tv(),t=Xc().extractOpts,e=vb(),r=function(f,x){for(var y=x.length-1;y>0;y--){var v=Math.min(x[y],x[y-1]),T=Math.max(x[y],x[y-1]);if(T>v&&v-1}function ft(Ce,Gt){return Ce===null?Gt:Ce}function ut(Ce,Gt,ne){yt();var Ct=[Gt],gt=[ne];if(at>=1)Ct=[Gt],gt=[ne];else if(at>0){var St=it(Gt,ne);Ct=St.xyzv,gt=St.abc}for(var Nt=0;Nt-1?ne[le]:lt(we,Ue,qe);Ar>-1?re[le]=Ar:re[le]=st(we,Ue,qe,ft(Ce,or))}tt(re[0],re[1],re[2])}}function wt(Ce,Gt,ne){var Ct=function(gt,St,Nt){ut(Ce,[Gt[gt],Gt[St],Gt[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(2,3,0)}function zt(Ce,Gt,ne){var Ct=function(gt,St,Nt){ut(Ce,[Gt[gt],Gt[St],Gt[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(3,0,1),Ct(2,3,0),Ct(1,2,3)}function Pt(Ce,Gt,ne,Ct){var gt=Ce[3];gtCt&&(gt=Ct);for(var St=(Ce[3]-gt)/(Ce[3]-Gt[3]+1e-9),Nt=[],re=0;re<4;re++)Nt[re]=(1-St)*Ce[re]+St*Gt[re];return Nt}function Wt(Ce,Gt,ne){return Ce>=Gt&&Ce<=ne}function Ht(Ce){var Gt=.001*(F-H);return Ce>=H-Gt&&Ce<=F+Gt}function Jt(Ce){for(var Gt=[],ne=0;ne<4;ne++){var Ct=Ce[ne];Gt.push([f._x[Ct],f._y[Ct],f._z[Ct],f._value[Ct]])}return Gt}var ge=3;function he(Ce,Gt,ne,Ct,gt,St){St||(St=1),ne=[-1,-1,-1];var Nt=!1,re=[Wt(Gt[0][3],Ct,gt),Wt(Gt[1][3],Ct,gt),Wt(Gt[2][3],Ct,gt)];if(!re[0]&&!re[1]&&!re[2])return!1;var le=function(Ue,qe,or){return Ht(qe[0][3])&&Ht(qe[1][3])&&Ht(qe[2][3])?(ut(Ue,qe,or),!0):Stre?[N,St]:[St,V];cr(Gt,le[0],le[1])}}var we=[[Math.min(H,V),Math.max(H,V)],[Math.min(N,F),Math.max(N,F)]];["x","y","z"].forEach(function(Ue){for(var qe=[],or=0;or0&&(Hn.push(ii.id),Ue==="x"?Kn.push([ii.distRatio,0,0]):Ue==="y"?Kn.push([0,ii.distRatio,0]):Kn.push([0,0,ii.distRatio]))}else Ue==="x"?Vn=br(1,p-1):Ue==="y"?Vn=br(1,k-1):Vn=br(1,w-1);Hn.length>0&&(Ue==="x"?qe[Ar]=ur(Ce,Hn,Tr,pr,Kn,qe[Ar]):Ue==="y"?qe[Ar]=jr(Ce,Hn,Tr,pr,Kn,qe[Ar]):qe[Ar]=Hr(Ce,Hn,Tr,pr,Kn,qe[Ar]),Ar++),Vn.length>0&&(Ue==="x"?qe[Ar]=ve(Ce,Vn,Tr,pr,qe[Ar]):Ue==="y"?qe[Ar]=oe(Ce,Vn,Tr,pr,qe[Ar]):qe[Ar]=Te(Ce,Vn,Tr,pr,qe[Ar]),Ar++)}var qn=f.caps[Ue];qn.show&&qn.fill&&(vt(qn.fill),Ue==="x"?qe[Ar]=ve(Ce,[0,p-1],Tr,pr,qe[Ar]):Ue==="y"?qe[Ar]=oe(Ce,[0,k-1],Tr,pr,qe[Ar]):qe[Ar]=Te(Ce,[0,w-1],Tr,pr,qe[Ar]),Ar++)}}),_===0&&pt(),f._meshX=U,f._meshY=W,f._meshZ=q,f._meshIntensity=X,f._Xs=E,f._Ys=A,f._Zs=h}return rn(),f}function s(f,x){var y=f.glplot.gl,v=c({gl:y}),T=new a(f,v,x.uid);return v._trace=T,T.update(x),f.glplot.add(v),T}$.exports={findNearestOnAxis:r,generateIsoMeshes:i,createIsosurfaceTrace:s}}),Jj=Ft((Q,$)=>{$.exports={attributes:Wk(),supplyDefaults:hS().supplyDefaults,calc:fS(),colorbar:{min:"cmin",max:"cmax"},plot:Zk().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:V1(),categories:["gl3d","showLegend"],meta:{}}}),Qj=Ft((Q,$)=>{$.exports=Jj()}),dS=Ft((Q,$)=>{var c=Ac(),g=Wk(),P=y3(),S=Yo(),t=ya().extendFlat,e=Yc().overrideAll,r=$.exports=e(t({x:g.x,y:g.y,z:g.z,value:g.value,isomin:g.isomin,isomax:g.isomax,surface:g.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:g.slices,caps:g.caps,text:g.text,hovertext:g.hovertext,xhoverformat:g.xhoverformat,yhoverformat:g.yhoverformat,zhoverformat:g.zhoverformat,valuehoverformat:g.valuehoverformat,hovertemplate:g.hovertemplate,hovertemplatefallback:g.hovertemplatefallback},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:g.colorbar,opacity:g.opacity,opacityscale:P.opacityscale,lightposition:g.lightposition,lighting:g.lighting,flatshading:g.flatshading,contour:g.contour,hoverinfo:t({},S.hoverinfo),showlegend:t({},S.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}),tU=Ft((Q,$)=>{var c=_n(),g=dS(),P=hS().supplyIsoDefaults,S=cS().opacityscaleDefaults;$.exports=function(t,e,r,a){function n(o,i){return c.coerce(t,e,g,o,i)}P(t,e,r,a,n),S(t,e,a,n)}}),eU=Ft((Q,$)=>{var c=pp().gl_mesh3d,g=Av().parseColorScale,P=_n().isArrayOrTypedArray,S=Tv(),t=Xc().extractOpts,e=vb(),r=Zk().findNearestOnAxis,a=Zk().generateIsoMeshes;function n(s,f,x){this.scene=s,this.uid=x,this.mesh=f,this.name="",this.data=null,this.showContour=!1}var o=n.prototype;o.handlePick=function(s){if(s.object===this.mesh){var f=s.data.index,x=this.data._meshX[f],y=this.data._meshY[f],v=this.data._meshZ[f],T=this.data._Ys.length,u=this.data._Zs.length,b=r(x,this.data._Xs).id,_=r(y,this.data._Ys).id,C=r(v,this.data._Zs).id,M=s.index=C+u*_+u*T*b;s.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var E=this.data.hovertext||this.data.text;return P(E)&&E[M]!==void 0?s.textLabel=E[M]:E&&(s.textLabel=E),!0}},o.update=function(s){var f=this.scene,x=f.fullSceneLayout;this.data=a(s);function y(_,C,M,E){return C.map(function(A){return _.d2l(A,0,E)*M})}var v=e(y(x.xaxis,s._meshX,f.dataScale[0],s.xcalendar),y(x.yaxis,s._meshY,f.dataScale[1],s.ycalendar),y(x.zaxis,s._meshZ,f.dataScale[2],s.zcalendar)),T=e(s._meshI,s._meshJ,s._meshK),u={positions:v,cells:T,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:S(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},b=t(s);u.vertexIntensity=s._meshIntensity,u.vertexIntensityBounds=[b.min,b.max],u.colormap=g(s),this.mesh.update(u)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(s,f){var x=s.glplot.gl,y=c({gl:x}),v=new n(s,y,f.uid);return y._trace=v,v.update(f),s.glplot.add(y),v}$.exports=i}),rU=Ft((Q,$)=>{$.exports={attributes:dS(),supplyDefaults:tU(),calc:fS(),colorbar:{min:"cmin",max:"cmax"},plot:eU(),moduleType:"trace",name:"volume",basePlotModule:V1(),categories:["gl3d","showLegend"],meta:{}}}),nU=Ft((Q,$)=>{$.exports=rU()}),iU=Ft((Q,$)=>{var c=Qo(),g=_n(),P=gc(),S=gb();$.exports=function(t,e,r,a){function n(x,y){return g.coerce(t,e,S,x,y)}function o(x){var y=x.map(function(v){var T=n(v);return T&&g.isArrayOrTypedArray(T)?T:null});return y.every(function(v){return v&&v.length===y[0].length})&&y}var i=o(["x","y","z"]);if(!i){e.visible=!1;return}if(o(["i","j","k"]),e.i&&(!e.j||!e.k)||e.j&&(!e.k||!e.i)||e.k&&(!e.i||!e.j)){e.visible=!1;return}var s=c.getComponentMethod("calendars","handleTraceDefaults");s(t,e,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(x){n(x)});var f=n("contour.show");f&&(n("contour.color"),n("contour.width")),"intensity"in t?(n("intensity"),n("intensitymode"),P(t,e,a,n,{prefix:"",cLetter:"c"})):(e.showscale=!1,"facecolor"in t?n("facecolor"):"vertexcolor"in t?n("vertexcolor"):n("color",r)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),e._length=null}}),aU=Ft((Q,$)=>{var c=ep();$.exports=function(g,P){P.intensity&&c(g,P,{vals:P.intensity,containerStr:"",cLetter:"c"})}}),oU=Ft((Q,$)=>{var c=pp().gl_mesh3d,g=pp().delaunay_triangulate,P=pp().alpha_shape,S=pp().convex_hull,t=Av().parseColorScale,e=_n().isArrayOrTypedArray,r=Tv(),a=Xc().extractOpts,n=vb();function o(u,b,_){this.scene=u,this.uid=_,this.mesh=b,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=o.prototype;i.handlePick=function(u){if(u.object===this.mesh){var b=u.index=u.data.index;u.data._cellCenter?u.traceCoordinate=u.data.dataCoordinate:u.traceCoordinate=[this.data.x[b],this.data.y[b],this.data.z[b]];var _=this.data.hovertext||this.data.text;return e(_)&&_[b]!==void 0?u.textLabel=_[b]:_&&(u.textLabel=_),!0}};function s(u){for(var b=[],_=u.length,C=0;C<_;C++)b[C]=r(u[C]);return b}function f(u,b,_,C){for(var M=[],E=b.length,A=0;A=b-.5)return!1;return!0}i.update=function(u){var b=this.scene,_=b.fullSceneLayout;this.data=u;var C=u.x.length,M=n(f(_.xaxis,u.x,b.dataScale[0],u.xcalendar),f(_.yaxis,u.y,b.dataScale[1],u.ycalendar),f(_.zaxis,u.z,b.dataScale[2],u.zcalendar)),E;if(u.i&&u.j&&u.k){if(u.i.length!==u.j.length||u.j.length!==u.k.length||!v(u.i,C)||!v(u.j,C)||!v(u.k,C))return;E=n(x(u.i),x(u.j),x(u.k))}else u.alphahull===0?E=S(M):u.alphahull>0?E=P(u.alphahull,M):E=y(u.delaunayaxis,M);var A={positions:M,cells:E,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:r(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading};if(u.intensity){var h=a(u);this.color="#fff";var p=u.intensitymode;A[p+"Intensity"]=u.intensity,A[p+"IntensityBounds"]=[h.min,h.max],A.colormap=t(u)}else u.vertexcolor?(this.color=u.vertexcolor[0],A.vertexColors=s(u.vertexcolor)):u.facecolor?(this.color=u.facecolor[0],A.cellColors=s(u.facecolor)):(this.color=u.color,A.meshColor=r(u.color));this.mesh.update(A)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(u,b){var _=u.glplot.gl,C=c({gl:_}),M=new o(u,C,b.uid);return C._trace=M,M.update(b),u.glplot.add(C),M}$.exports=T}),sU=Ft((Q,$)=>{$.exports={attributes:gb(),supplyDefaults:iU(),calc:aU(),colorbar:{min:"cmin",max:"cmax"},plot:oU(),moduleType:"trace",name:"mesh3d",basePlotModule:V1(),categories:["gl3d","showLegend"],meta:{}}}),lU=Ft((Q,$)=>{$.exports=sU()}),pS=Ft((Q,$)=>{var c=Ac(),g=dh().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=gb(),e=Yo(),r=ya().extendFlat,a={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:P({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),$.exports=a}),uU=Ft((Q,$)=>{var c=_n(),g=gc(),P=pS();$.exports=function(S,t,e,r){function a(v,T){return c.coerce(S,t,P,v,T)}var n=a("u"),o=a("v"),i=a("w"),s=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!s||!s.length||!f||!f.length||!x||!x.length){t.visible=!1;return}var y=a("sizemode");a("sizeref",y==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),cU=Ft((Q,$)=>{var c=ep();$.exports=function(g,P){for(var S=P.u,t=P.v,e=P.w,r=Math.min(P.x.length,P.y.length,P.z.length,S.length,t.length,e.length),a=-1/0,n=1/0,o=0;o{var c=pp().gl_cone3d,g=pp().gl_cone3d.createConeMesh,P=_n().simpleMap,S=Av().parseColorScale,t=Xc().extractOpts,e=_n().isArrayOrTypedArray,r=vb();function a(y,v){this.scene=y,this.uid=v,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(y){if(y.object===this.mesh){var v=y.index=y.data.index,T=this.data.x[v],u=this.data.y[v],b=this.data.z[v],_=this.data.u[v],C=this.data.v[v],M=this.data.w[v];y.traceCoordinate=[T,u,b,_,C,M,Math.sqrt(_*_+C*C+M*M)];var E=this.data.hovertext||this.data.text;return e(E)&&E[v]!==void 0?y.textLabel=E[v]:E&&(y.textLabel=E),!0}};var o={xaxis:0,yaxis:1,zaxis:2},i={tip:1,tail:0,cm:.25,center:.5},s={tip:1,tail:1,cm:.75,center:.5};function f(y,v){var T=y.fullSceneLayout,u=y.dataScale,b={};function _(h,p){var k=T[p],w=u[o[p]];return P(h,function(R){return k.d2l(R)*w})}b.vectors=r(_(v.u,"xaxis"),_(v.v,"yaxis"),_(v.w,"zaxis"),v._len),b.positions=r(_(v.x,"xaxis"),_(v.y,"yaxis"),_(v.z,"zaxis"),v._len);var C=t(v);b.colormap=S(v),b.vertexIntensityBounds=[C.min/v._normMax,C.max/v._normMax],b.coneOffset=i[v.anchor];var M=v.sizemode;M==="scaled"?b.coneSize=v.sizeref||.5:M==="absolute"?b.coneSize=v.sizeref&&v._normMax?v.sizeref/v._normMax:.5:M==="raw"&&(b.coneSize=v.sizeref),b.coneSizemode=M;var E=c(b),A=v.lightposition;return E.lightPosition=[A.x,A.y,A.z],E.ambient=v.lighting.ambient,E.diffuse=v.lighting.diffuse,E.specular=v.lighting.specular,E.roughness=v.lighting.roughness,E.fresnel=v.lighting.fresnel,E.opacity=v.opacity,v._pad=s[v.anchor]*E.vectorScale*E.coneScale*v._normMax,E}n.update=function(y){this.data=y;var v=f(this.scene,y);this.mesh.update(v)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function x(y,v){var T=y.glplot.gl,u=f(y,v),b=g(T,u),_=new a(y,v.uid);return _.mesh=b,_.data=v,b._trace=_,y.glplot.add(b),_}$.exports=x}),fU=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"cone",basePlotModule:V1(),categories:["gl3d","showLegend"],attributes:pS(),supplyDefaults:uU(),colorbar:{min:"cmin",max:"cmax"},calc:cU(),plot:hU(),eventData:function(c,g){return c.norm=g.traceCoordinate[6],c},meta:{}}}),dU=Ft((Q,$)=>{$.exports=fU()}),mS=Ft((Q,$)=>{var c=Ac(),g=dh().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=gb(),e=Yo(),r=ya().extendFlat,a={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:P({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),$.exports=a}),pU=Ft((Q,$)=>{var c=_n(),g=gc(),P=mS();$.exports=function(S,t,e,r){function a(y,v){return c.coerce(S,t,P,y,v)}var n=a("u"),o=a("v"),i=a("w"),s=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!s||!s.length||!f||!f.length||!x||!x.length){t.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),mU=Ft((Q,$)=>{var c=pp().gl_streamtube3d,g=c.createTubeMesh,P=_n(),S=Av().parseColorScale,t=Xc().extractOpts,e=vb(),r={xaxis:0,yaxis:1,zaxis:2};function a(x,y){this.scene=x,this.uid=y,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(x){var y=this.scene.fullSceneLayout,v=this.scene.dataScale;function T(_,C){var M=y[C],E=v[r[C]];return M.l2c(_)/E}if(x.object===this.mesh){var u=x.data.position,b=x.data.velocity;return x.traceCoordinate=[T(u[0],"xaxis"),T(u[1],"yaxis"),T(u[2],"zaxis"),T(b[0],"xaxis"),T(b[1],"yaxis"),T(b[2],"zaxis"),x.data.intensity*this.data._normMax,x.data.divergence],x.textLabel=this.data.hovertext||this.data.text,!0}};function o(x){var y=x.length,v;return y>2?v=x.slice(1,y-1):y===2?v=[(x[0]+x[1])/2]:v=x,v}function i(x){var y=x.length;return y===1?[.5,.5]:[x[1]-x[0],x[y-1]-x[y-2]]}function s(x,y){var v=x.fullSceneLayout,T=x.dataScale,u=y._len,b={};function _(st,tt){var dt=v[tt],rt=T[r[tt]];return P.simpleMap(st,function(at){return dt.d2l(at)*rt})}if(b.vectors=e(_(y._u,"xaxis"),_(y._v,"yaxis"),_(y._w,"zaxis"),u),!u)return{positions:[],cells:[]};var C=_(y._Xs,"xaxis"),M=_(y._Ys,"yaxis"),E=_(y._Zs,"zaxis");b.meshgrid=[C,M,E],b.gridFill=y._gridFill;var A=y._slen;if(A)b.startingPositions=e(_(y._startsX,"xaxis"),_(y._startsY,"yaxis"),_(y._startsZ,"zaxis"));else{for(var h=M[0],p=o(C),k=o(E),w=new Array(p.length*k.length),R=0,O=0;O{$.exports={moduleType:"trace",name:"streamtube",basePlotModule:V1(),categories:["gl3d","showLegend"],attributes:mS(),supplyDefaults:pU(),colorbar:{min:"cmin",max:"cmax"},calc:qk().calc,plot:mU(),eventData:function(c,g){return c.tubex=c.x,c.tubey=c.y,c.tubez=c.z,c.tubeu=g.traceCoordinate[3],c.tubev=g.traceCoordinate[4],c.tubew=g.traceCoordinate[5],c.norm=g.traceCoordinate[6],c.divergence=g.traceCoordinate[7],delete c.x,delete c.y,delete c.z,c},meta:{}}}),vU=Ft((Q,$)=>{$.exports=gU()}),gx=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=D0(),t=tf(),e=Yo(),r=Ac(),a=Ed().dash,n=ya().extendFlat,o=Yc().overrideAll,i=t.marker,s=t.line,f=i.line;$.exports=o({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:n({},t.hovertext,{}),textfont:t.textfont,textposition:t.textposition,line:{color:s.color,width:s.width,dash:a},connectgaps:t.connectgaps,marker:n({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:n({},i.angleref,{values:["previous","up","north"]}),standoff:i.standoff,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,colorbar:i.colorbar,line:n({width:f.width},r("marker.line")),gradient:i.gradient},r("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:S(),selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:c(),hovertemplatefallback:P()},"calc","nested")}),yU=Ft((Q,$)=>{var c=_n(),g=Mc(),P=c0(),S=F0(),t=b0(),e=R0(),r=gx(),a=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");$.exports=function(n,o,i,s){function f(C,M){return c.coerce(n,o,r,C,M)}var x=f("locations"),y;if(x&&x.length){var v=f("geojson"),T;(typeof v=="string"&&v!==""||c.isPlainObject(v))&&(T="geojson-id");var u=f("locationmode",T);u==="country names"&&c.warn(a),u==="geojson-id"&&f("featureidkey"),y=x.length}else{var b=f("lon")||[],_=f("lat")||[];y=Math.min(b.length,_.length)}if(!y){o.visible=!1;return}o._length=y,f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),g.hasMarkers(o)&&P(n,o,i,s,f,{gradient:!0}),g.hasLines(o)&&(S(n,o,i,s,f),f("connectgaps")),g.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),t(n,o,s,f)),f("fill"),o.fill!=="none"&&e(n,o,i,f),c.coerceSelectionMarkerOpacity(o,f)}}),xU=Ft((Q,$)=>{var c=Ls();$.exports=function(g,P,S){var t={},e=S[P.geo]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),$k=Ft((Q,$)=>{var c=ia(),g=Ua().BADNUM,P=N0(),S=ct(),t=Bt(),e=_n().isArrayOrTypedArray,r=_n()._;function a(n){return n&&typeof n=="string"}$.exports=function(n,o){var i=e(o.locations),s=i?o.locations.length:o._length,f=new Array(s),x;o.geojson?x=function(_){return a(_)||c(_)}:x=a;for(var y=0;y{Q.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},Q.axesNames=["lonaxis","lataxis"],Q.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},Q.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},Q.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}},Q.clipPad=.001,Q.precision=.1,Q.landColor="#F0DC82",Q.waterColor="#3399FF",Q.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},Q.sphereSVG={type:"Sphere"},Q.fillLayers={ocean:1,land:1,lakes:1},Q.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},Q.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],Q.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],Q.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}),gS=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.topojson=c.topojson||{}))})(Q,function(c){function g(_){return _}function P(_){if(_==null)return g;var C,M,E=_.scale[0],A=_.scale[1],h=_.translate[0],p=_.translate[1];return function(k,w){w||(C=M=0);var R=2,O=k.length,N=new Array(O);for(N[0]=(C+=k[0])*E+h,N[1]=(M+=k[1])*A+p;Rh&&(h=R[0]),R[1]p&&(p=R[1])}function w(R){switch(R.type){case"GeometryCollection":R.geometries.forEach(w);break;case"Point":k(R.coordinates);break;case"MultiPoint":R.coordinates.forEach(k);break}}_.arcs.forEach(function(R){for(var O=-1,N=R.length,V;++Oh&&(h=V[0]),V[1]p&&(p=V[1])});for(M in _.objects)w(_.objects[M]);return[E,A,h,p]}function t(_,C){for(var M,E=_.length,A=E-C;A<--E;)M=_[A],_[A++]=_[E],_[E]=M}function e(_,C){return typeof C=="string"&&(C=_.objects[C]),C.type==="GeometryCollection"?{type:"FeatureCollection",features:C.geometries.map(function(M){return r(_,M)})}:r(_,C)}function r(_,C){var M=C.id,E=C.bbox,A=C.properties==null?{}:C.properties,h=a(_,C);return M==null&&E==null?{type:"Feature",properties:A,geometry:h}:E==null?{type:"Feature",id:M,properties:A,geometry:h}:{type:"Feature",id:M,bbox:E,properties:A,geometry:h}}function a(_,C){var M=P(_.transform),E=_.arcs;function A(O,N){N.length&&N.pop();for(var V=E[O<0?~O:O],H=0,F=V.length;H1)E=s(_,C,M);else for(A=0,E=new Array(h=_.arcs.length);A1)for(var N=1,V=k(R[0]),H,F;NV&&(F=R[0],R[0]=R[N],R[N]=F,V=H);return R}).filter(function(w){return w.length>0})}}function v(_,C){for(var M=0,E=_.length;M>>1;_[A]=2))throw new Error("n must be ≥2");w=_.bbox||S(_);var M=w[0],E=w[1],A=w[2],h=w[3],p;C={scale:[A-M?(A-M)/(p-1):1,h-E?(h-E)/(p-1):1],translate:[M,E]}}else w=_.bbox;var k=u(C),w,R,O=_.objects,N={};function V(U){return k(U)}function H(U){var W;switch(U.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:U.geometries.map(H)};break;case"Point":W={type:"Point",coordinates:V(U.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:U.coordinates.map(V)};break;default:return U}return U.id!=null&&(W.id=U.id),U.bbox!=null&&(W.bbox=U.bbox),U.properties!=null&&(W.properties=U.properties),W}function F(U){var W=0,q=1,X=U.length,lt,yt=new Array(X);for(yt[0]=k(U[0],0);++W{var c=$.exports={},g=x3().locationmodeToLayer,P=gS().feature;c.getTopojsonName=function(S){return[S.scope.replace(/ /g,"-"),"_",S.resolution.toString(),"m"].join("")},c.getTopojsonPath=function(S,t){return S+=S.endsWith("/")?"":"/",`${S}${t}.json`},c.getTopojsonFeatures=function(S,t){var e=g[S.locationmode],r=t.objects[e];return P(t,r).features}}),H1=Ft(Q=>{var $=Ua().BADNUM;Q.calcTraceToLineCoords=function(c){for(var g=c[0].trace,P=g.connectgaps,S=[],t=[],e=0;e0&&(S.push(t),t=[])}return t.length>0&&S.push(t),S},Q.makeLine=function(c){return c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}},Q.makePolygon=function(c){if(c.length===1)return{type:"Polygon",coordinates:c};for(var g=new Array(c.length),P=0;P{$.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}}),Yk=Ft(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=63710088e-1,c={centimeters:$*100,centimetres:$*100,degrees:360/(2*Math.PI),feet:$*3.28084,inches:$*39.37,kilometers:$/1e3,kilometres:$/1e3,meters:$,metres:$,miles:$/1609.344,millimeters:$*1e3,millimetres:$*1e3,nauticalmiles:$/1852,radians:1,yards:$*1.0936},g={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function P(O,N,V={}){let H={type:"Feature"};return(V.id===0||V.id)&&(H.id=V.id),V.bbox&&(H.bbox=V.bbox),H.properties=N||{},H.geometry=O,H}function S(O,N,V={}){switch(O){case"Point":return t(N).geometry;case"LineString":return n(N).geometry;case"Polygon":return r(N).geometry;case"MultiPoint":return f(N).geometry;case"MultiLineString":return s(N).geometry;case"MultiPolygon":return x(N).geometry;default:throw new Error(O+" is invalid")}}function t(O,N,V={}){if(!O)throw new Error("coordinates is required");if(!Array.isArray(O))throw new Error("coordinates must be an Array");if(O.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(O[0])||!p(O[1]))throw new Error("coordinates must contain numbers");return P({type:"Point",coordinates:O},N,V)}function e(O,N,V={}){return i(O.map(H=>t(H,N)),V)}function r(O,N,V={}){for(let H of O){if(H.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(H[H.length-1].length!==H[0].length)throw new Error("First and last Position are not equivalent.");for(let F=0;Fr(H,N)),V)}function n(O,N,V={}){if(O.length<2)throw new Error("coordinates must be an array of two or more positions");return P({type:"LineString",coordinates:O},N,V)}function o(O,N,V={}){return i(O.map(H=>n(H,N)),V)}function i(O,N={}){let V={type:"FeatureCollection"};return N.id&&(V.id=N.id),N.bbox&&(V.bbox=N.bbox),V.features=O,V}function s(O,N,V={}){return P({type:"MultiLineString",coordinates:O},N,V)}function f(O,N,V={}){return P({type:"MultiPoint",coordinates:O},N,V)}function x(O,N,V={}){return P({type:"MultiPolygon",coordinates:O},N,V)}function y(O,N,V={}){return P({type:"GeometryCollection",geometries:O},N,V)}function v(O,N=0){if(N&&!(N>=0))throw new Error("precision must be a positive number");let V=Math.pow(10,N||0);return Math.round(O*V)/V}function T(O,N="kilometers"){let V=c[N];if(!V)throw new Error(N+" units is invalid");return O*V}function u(O,N="kilometers"){let V=c[N];if(!V)throw new Error(N+" units is invalid");return O/V}function b(O,N){return M(u(O,N))}function _(O){let N=O%360;return N<0&&(N+=360),N}function C(O){return O=O%360,O>180?O-360:O<-180?O+360:O}function M(O){return O%(2*Math.PI)*180/Math.PI}function E(O){return O%360*Math.PI/180}function A(O,N="kilometers",V="kilometers"){if(!(O>=0))throw new Error("length must be a positive number");return T(u(O,N),V)}function h(O,N="meters",V="kilometers"){if(!(O>=0))throw new Error("area must be a positive number");let H=g[N];if(!H)throw new Error("invalid original units");let F=g[V];if(!F)throw new Error("invalid final units");return O/H*F}function p(O){return!isNaN(O)&&O!==null&&!Array.isArray(O)}function k(O){return O!==null&&typeof O=="object"&&!Array.isArray(O)}function w(O){if(!O)throw new Error("bbox is required");if(!Array.isArray(O))throw new Error("bbox must be an Array");if(O.length!==4&&O.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");O.forEach(N=>{if(!p(N))throw new Error("bbox must only contain numbers")})}function R(O){if(!O)throw new Error("id is required");if(["string","number"].indexOf(typeof O)===-1)throw new Error("id must be a number or a string")}Q.areaFactors=g,Q.azimuthToBearing=C,Q.bearingToAzimuth=_,Q.convertArea=h,Q.convertLength=A,Q.degreesToRadians=E,Q.earthRadius=$,Q.factors=c,Q.feature=P,Q.featureCollection=i,Q.geometry=S,Q.geometryCollection=y,Q.isNumber=p,Q.isObject=k,Q.lengthToDegrees=b,Q.lengthToRadians=u,Q.lineString=n,Q.lineStrings=o,Q.multiLineString=s,Q.multiPoint=f,Q.multiPolygon=x,Q.point=t,Q.points=e,Q.polygon=r,Q.polygons=a,Q.radiansToDegrees=M,Q.radiansToLength=T,Q.round=v,Q.validateBBox=w,Q.validateId=R}),Kk=Ft(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=Yk();function c(u,b,_){if(u!==null)for(var C,M,E,A,h,p,k,w=0,R=0,O,N=u.type,V=N==="FeatureCollection",H=N==="Feature",F=V?u.features.length:1,U=0;Up||V>k||H>w){h=R,p=C,k=V,w=H,E=0;return}var F=$.lineString.call(void 0,[h,R],_.properties);if(b(F,C,M,H,E)===!1)return!1;E++,h=R})===!1)return!1}}})}function f(u,b,_){var C=_,M=!1;return s(u,function(E,A,h,p,k){M===!1&&_===void 0?C=E:C=b(C,E,A,h,p,k),M=!0}),C}function x(u,b){if(!u)throw new Error("geojson is required");o(u,function(_,C,M){if(_.geometry!==null){var E=_.geometry.type,A=_.geometry.coordinates;switch(E){case"LineString":if(b(_,C,M,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h{Object.defineProperty(Q,"__esModule",{value:!0});var $=Yk(),c=Kk();function g(n){return c.geomReduce.call(void 0,n,(o,i)=>o+P(i),0)}function P(n){let o=0,i;switch(n.type){case"Polygon":return S(n.coordinates);case"MultiPolygon":for(i=0;i0){o+=Math.abs(r(n[0]));for(let i=1;i=o?(s+2)%o:s+2],v=f[0]*e,T=x[1]*e,u=y[0]*e;i+=(u-v)*Math.sin(T),s++}return i*t}var a=g;Q.area=g,Q.default=a}),wU=Ft(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=Yk(),c=Kk();function g(S,t={}){let e=0,r=0,a=0;return c.coordEach.call(void 0,S,function(n){e+=n[0],r+=n[1],a++},!0),$.point.call(void 0,[e/a,r/a],t.properties)}var P=g;Q.centroid=g,Q.default=P}),kU=Ft(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var $=Kk();function c(P,S={}){if(P.bbox!=null&&S.recompute!==!0)return P.bbox;let t=[1/0,1/0,-1/0,-1/0];return $.coordEach.call(void 0,P,e=>{t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]{var c=En(),g=_U(),{area:P}=bU(),{centroid:S}=wU(),{bbox:t}=kU(),e=w1(),r=es(),a=Ei(),n=us(),o=ym(),i=Object.keys(g),s={"ISO-3":e,"USA-states":e,"country names":f};function f(C){for(var M=0;M0&&N[V+1][0]<0)return V;return null}switch(A==="RUS"||A==="FJI"?p=function(N){var V;if(O(N)===null)V=N;else for(V=new Array(N.length),R=0;RV?H[F++]=[N[R][0]+360,N[R][1]]:R===V?(H[F++]=N[R],H[F++]=[N[R][0],-90]):H[F++]=N[R];var U=o.tester(H);U.pts.pop(),h.push(U)}:p=function(N){h.push(o.tester(N))},M.type){case"MultiPolygon":for(k=0;k0?U.properties.ct=u(U):U.properties.ct=[NaN,NaN],H.fIn=N,H.fOut=U,h.push(U)}else r.log(["Location",H.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete A[V]}switch(E.type){case"FeatureCollection":var R=E.features;for(p=0;ph&&(h=w,E=k)}else E=M;return S(E).geometry.coordinates}function b(C){var M=window.PlotlyGeoAssets||{},E=[];function A(R){return new Promise(function(O,N){c.json(R,function(V,H){if(V){delete M[R];var F=V.status===404?'GeoJSON at URL "'+R+'" does not exist.':"Unexpected error while fetching from "+R;return N(new Error(F))}return M[R]=H,O(H)})})}function h(R){return new Promise(function(O,N){var V=0,H=setInterval(function(){if(M[R]&&M[R]!=="pending")return clearInterval(H),O(M[R]);if(V>100)return clearInterval(H),N("Unexpected error while fetching from "+R);V++},50)})}for(var p=0;p{var c=En(),g=Vs(),P=ui(),S=_l(),t=S.stylePoints,e=S.styleText;$.exports=function(a,n){n&&r(a,n)};function r(a,n){var o=n[0].trace,i=n[0].node3;i.style("opacity",n[0].trace.opacity),t(i,o,a),e(i,o,a),i.selectAll("path.js-line").style("fill","none").each(function(s){var f=c.select(this),x=s.trace,y=x.line||{};f.call(P.stroke,y.color).call(g.dashLine,y.dash||"",y.width||0),x.fill!=="none"&&f.call(P.fill,x.fillcolor)})}}),yS=Ft((Q,$)=>{var c=En(),g=_n(),P=Gk().getTopojsonFeatures,S=H1(),t=W1(),e=J0().findExtremes,r=Ua().BADNUM,a=me().calcMarkerSize,n=Mc(),o=vS();function i(f,x,y){var v=x.layers.frontplot.select(".scatterlayer"),T=g.makeTraceGroups(v,y,"trace scattergeo");function u(b,_){b.lonlat[0]===r&&c.select(_).remove()}T.selectAll("*").remove(),T.each(function(b){var _=c.select(this),C=b[0].trace;if(n.hasLines(C)||C.fill!=="none"){var M=S.calcTraceToLineCoords(b),E=C.fill!=="none"?S.makePolygon(M):S.makeLine(M);_.selectAll("path.js-line").data([{geojson:E,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}n.hasMarkers(C)&&_.selectAll("path.point").data(g.identity).enter().append("path").classed("point",!0).each(function(A){u(A,this)}),n.hasText(C)&&_.selectAll("g").data(g.identity).enter().append("g").append("text").each(function(A){u(A,this)}),o(f,b)})}function s(f,x){var y=f[0].trace,v=x[y.geo],T=v._subplot,u=y._length,b,_;if(g.isArrayOrTypedArray(y.locations)){var C=y.locationmode,M=C==="geojson-id"?t.extractTraceFeature(f):P(y,T.topojson);for(b=0;b{var c=Qh(),g=Ua().BADNUM,P=Fu(),S=_n().fillText,t=gx();$.exports=function(r,a,n){var o=r.cd,i=o[0].trace,s=r.xa,f=r.ya,x=r.subplot,y=x.projection.isLonLatOverEdges,v=x.project;function T(A){var h=A.lonlat;if(h[0]===g||y(h))return 1/0;var p=v(h),k=v([a,n]),w=Math.abs(p[0]-k[0]),R=Math.abs(p[1]-k[1]),O=Math.max(3,A.mrc||0);return Math.max(Math.sqrt(w*w+R*R)-O,1-3/O)}if(c.getClosest(o,T,r),r.index!==!1){var u=o[r.index],b=u.lonlat,_=[s.c2p(b),f.c2p(b)],C=u.mrc||1;r.x0=_[0]-C,r.x1=_[0]+C,r.y0=_[1]-C,r.y1=_[1]+C,r.loc=u.loc,r.lon=b[0],r.lat=b[1];var M={};M[i.geo]={_subplot:x};var E=i._module.formatLabels(u,i,M);return r.lonLabel=E.lonLabel,r.latLabel=E.latLabel,r.color=P(i,u),r.extraText=e(i,u,r,o[0].t.labels),r.hovertemplate=i.hovertemplate,[r]}};function e(r,a,n,o){if(r.hovertemplate)return;var i=a.hi||r.hoverinfo,s=i==="all"?t.hoverinfo.flags:i.split("+"),f=s.indexOf("location")!==-1&&Array.isArray(r.locations),x=s.indexOf("lon")!==-1,y=s.indexOf("lat")!==-1,v=s.indexOf("text")!==-1,T=[];function u(b){return b+"°"}return f?T.push(a.loc):x&&y?T.push("("+u(n.latLabel)+", "+u(n.lonLabel)+")"):x?T.push(o.lon+u(n.lonLabel)):y&&T.push(o.lat+u(n.latLabel)),v&&S(a,r,T),T.join("
")}}),AU=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){c.lon=g.lon,c.lat=g.lat,c.location=g.loc?g.loc:null;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c}}),MU=Ft((Q,$)=>{var c=Mc(),g=Ua().BADNUM;$.exports=function(P,S){var t=P.cd,e=P.xaxis,r=P.yaxis,a=[],n=t[0].trace,o,i,s,f,x,y=!c.hasMarkers(n)&&!c.hasText(n);if(y)return[];if(S===!1)for(x=0;x{(function(c,g){g(typeof Q=="object"&&typeof $<"u"?Q:c.d3=c.d3||{})})(Q,function(c){function g(rt,at){return rtat?1:rt>=at?0:NaN}function P(rt){return rt.length===1&&(rt=S(rt)),{left:function(at,vt,it,Y){for(it==null&&(it=0),Y==null&&(Y=at.length);it>>1;rt(at[ft],vt)<0?it=ft+1:Y=ft}return it},right:function(at,vt,it,Y){for(it==null&&(it=0),Y==null&&(Y=at.length);it>>1;rt(at[ft],vt)>0?Y=ft:it=ft+1}return it}}}function S(rt){return function(at,vt){return g(rt(at),vt)}}var t=P(g),e=t.right,r=t.left;function a(rt,at){at==null&&(at=n);for(var vt=0,it=rt.length-1,Y=rt[0],ft=new Array(it<0?0:it);vtrt?1:at>=rt?0:NaN}function s(rt){return rt===null?NaN:+rt}function f(rt,at){var vt=rt.length,it=0,Y=-1,ft=0,ut,wt,zt=0;if(at==null)for(;++Y1)return zt/(it-1)}function x(rt,at){var vt=f(rt,at);return vt&&Math.sqrt(vt)}function y(rt,at){var vt=rt.length,it=-1,Y,ft,ut;if(at==null){for(;++it=Y)for(ft=ut=Y;++itY&&(ft=Y),ut=Y)for(ft=ut=Y;++itY&&(ft=Y),ut0)return[rt];if((it=at0)for(rt=Math.ceil(rt/wt),at=Math.floor(at/wt),ut=new Array(ft=Math.ceil(at-rt+1));++Y=0?(ft>=M?10:ft>=E?5:ft>=A?2:1)*Math.pow(10,Y):-Math.pow(10,-Y)/(ft>=M?10:ft>=E?5:ft>=A?2:1)}function k(rt,at,vt){var it=Math.abs(at-rt)/Math.max(0,vt),Y=Math.pow(10,Math.floor(Math.log(it)/Math.LN10)),ft=it/Y;return ft>=M?Y*=10:ft>=E?Y*=5:ft>=A&&(Y*=2),atHt;)Jt.pop(),--ge;var he=new Array(ge+1),de;for(ft=0;ft<=ge;++ft)de=he[ft]=[],de.x0=ft>0?Jt[ft-1]:Wt,de.x1=ft=1)return+vt(rt[it-1],it-1,rt);var it,Y=(it-1)*at,ft=Math.floor(Y),ut=+vt(rt[ft],ft,rt),wt=+vt(rt[ft+1],ft+1,rt);return ut+(wt-ut)*(Y-ft)}}function N(rt,at,vt){return rt=u.call(rt,s).sort(g),Math.ceil((vt-at)/(2*(O(rt,.75)-O(rt,.25))*Math.pow(rt.length,-1/3)))}function V(rt,at,vt){return Math.ceil((vt-at)/(3.5*x(rt)*Math.pow(rt.length,-1/3)))}function H(rt,at){var vt=rt.length,it=-1,Y,ft;if(at==null){for(;++it=Y)for(ft=Y;++itft&&(ft=Y)}else for(;++it=Y)for(ft=Y;++itft&&(ft=Y);return ft}function F(rt,at){var vt=rt.length,it=vt,Y=-1,ft,ut=0;if(at==null)for(;++Y=0;)for(ut=rt[at],vt=ut.length;--vt>=0;)ft[--Y]=ut[vt];return ft}function q(rt,at){var vt=rt.length,it=-1,Y,ft;if(at==null){for(;++it=Y)for(ft=Y;++itY&&(ft=Y)}else for(;++it=Y)for(ft=Y;++itY&&(ft=Y);return ft}function X(rt,at){for(var vt=at.length,it=new Array(vt);vt--;)it[vt]=rt[at[vt]];return it}function lt(rt,at){if(vt=rt.length){var vt,it=0,Y=0,ft,ut=rt[Y];for(at==null&&(at=g);++it{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,_3()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function P(){return new S}function S(){this.reset()}S.prototype={constructor:S,reset:function(){this.s=this.t=0},add:function(mr){e(t,mr,this.t),e(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new S;function e(mr,Ur,xn){var un=mr.s=Ur+xn,Wn=un-Ur,hi=un-Wn;mr.t=Ur-hi+(xn-Wn)}var r=1e-6,a=1e-12,n=Math.PI,o=n/2,i=n/4,s=n*2,f=180/n,x=n/180,y=Math.abs,v=Math.atan,T=Math.atan2,u=Math.cos,b=Math.ceil,_=Math.exp,C=Math.log,M=Math.pow,E=Math.sin,A=Math.sign||function(mr){return mr>0?1:mr<0?-1:0},h=Math.sqrt,p=Math.tan;function k(mr){return mr>1?0:mr<-1?n:Math.acos(mr)}function w(mr){return mr>1?o:mr<-1?-o:Math.asin(mr)}function R(mr){return(mr=E(mr/2))*mr}function O(){}function N(mr,Ur){mr&&H.hasOwnProperty(mr.type)&&H[mr.type](mr,Ur)}var V={Feature:function(mr,Ur){N(mr.geometry,Ur)},FeatureCollection:function(mr,Ur){for(var xn=mr.features,un=-1,Wn=xn.length;++un=0?1:-1,Wn=un*xn,hi=u(Ur),ea=E(Ur),pa=tt*ea,Da=st*hi+pa*u(Wn),$a=pa*un*E(Wn);q.add(T($a,Da)),pt=mr,st=hi,tt=ea}function Y(mr){return X.reset(),W(mr,dt),X*2}function ft(mr){return[T(mr[1],mr[0]),w(mr[2])]}function ut(mr){var Ur=mr[0],xn=mr[1],un=u(xn);return[un*u(Ur),un*E(Ur),E(xn)]}function wt(mr,Ur){return mr[0]*Ur[0]+mr[1]*Ur[1]+mr[2]*Ur[2]}function zt(mr,Ur){return[mr[1]*Ur[2]-mr[2]*Ur[1],mr[2]*Ur[0]-mr[0]*Ur[2],mr[0]*Ur[1]-mr[1]*Ur[0]]}function Pt(mr,Ur){mr[0]+=Ur[0],mr[1]+=Ur[1],mr[2]+=Ur[2]}function Wt(mr,Ur){return[mr[0]*Ur,mr[1]*Ur,mr[2]*Ur]}function Ht(mr){var Ur=h(mr[0]*mr[0]+mr[1]*mr[1]+mr[2]*mr[2]);mr[0]/=Ur,mr[1]/=Ur,mr[2]/=Ur}var Jt,ge,he,de,se,Tt,Lt,Mt,te=P(),ve,oe,Te={point:He,lineStart:cr,lineEnd:ur,polygonStart:function(){Te.point=jr,Te.lineStart=Hr,Te.lineEnd=br,te.reset(),dt.polygonStart()},polygonEnd:function(){dt.polygonEnd(),Te.point=He,Te.lineStart=cr,Te.lineEnd=ur,q<0?(Jt=-(he=180),ge=-(de=90)):te>r?de=90:te<-r&&(ge=-90),oe[0]=Jt,oe[1]=he},sphere:function(){Jt=-(he=180),ge=-(de=90)}};function He(mr,Ur){ve.push(oe=[Jt=mr,he=mr]),Urde&&(de=Ur)}function Ge(mr,Ur){var xn=ut([mr*x,Ur*x]);if(Mt){var un=zt(Mt,xn),Wn=[un[1],-un[0],0],hi=zt(Wn,un);Ht(hi),hi=ft(hi);var ea=mr-se,pa=ea>0?1:-1,Da=hi[0]*f*pa,$a,la=y(ea)>180;la^(pa*sede&&(de=$a)):(Da=(Da+360)%360-180,la^(pa*sede&&(de=Ur))),la?mrKr(Jt,he)&&(he=mr):Kr(mr,he)>Kr(Jt,he)&&(Jt=mr):he>=Jt?(mrhe&&(he=mr)):mr>se?Kr(Jt,mr)>Kr(Jt,he)&&(he=mr):Kr(mr,he)>Kr(Jt,he)&&(Jt=mr)}else ve.push(oe=[Jt=mr,he=mr]);Urde&&(de=Ur),Mt=xn,se=mr}function cr(){Te.point=Ge}function ur(){oe[0]=Jt,oe[1]=he,Te.point=He,Mt=null}function jr(mr,Ur){if(Mt){var xn=mr-se;te.add(y(xn)>180?xn+(xn>0?360:-360):xn)}else Tt=mr,Lt=Ur;dt.point(mr,Ur),Ge(mr,Ur)}function Hr(){dt.lineStart()}function br(){jr(Tt,Lt),dt.lineEnd(),y(te)>r&&(Jt=-(he=180)),oe[0]=Jt,oe[1]=he,Mt=null}function Kr(mr,Ur){return(Ur-=mr)<0?Ur+360:Ur}function rn(mr,Ur){return mr[0]-Ur[0]}function Ce(mr,Ur){return mr[0]<=mr[1]?mr[0]<=Ur&&Ur<=mr[1]:UrKr(un[0],un[1])&&(un[1]=Wn[1]),Kr(Wn[0],un[1])>Kr(un[0],un[1])&&(un[0]=Wn[0])):hi.push(un=Wn);for(ea=-1/0,xn=hi.length-1,Ur=0,un=hi[xn];Ur<=xn;un=Wn,++Ur)Wn=hi[Ur],(pa=Kr(un[1],Wn[0]))>ea&&(ea=pa,Jt=Wn[0],he=un[1])}return ve=oe=null,Jt===1/0||ge===1/0?[[NaN,NaN],[NaN,NaN]]:[[Jt,ge],[he,de]]}var ne,Ct,gt,St,Nt,re,le,we,Ue,qe,or,Ar,Tr,pr,Jr,Vn,Hn={sphere:O,point:Kn,lineStart:ii,lineEnd:Vi,polygonStart:function(){Hn.lineStart=We,Hn.lineEnd=rr},polygonEnd:function(){Hn.lineStart=ii,Hn.lineEnd=Vi}};function Kn(mr,Ur){mr*=x,Ur*=x;var xn=u(Ur);Ci(xn*u(mr),xn*E(mr),E(Ur))}function Ci(mr,Ur,xn){++ne,gt+=(mr-gt)/ne,St+=(Ur-St)/ne,Nt+=(xn-Nt)/ne}function ii(){Hn.point=qn}function qn(mr,Ur){mr*=x,Ur*=x;var xn=u(Ur);pr=xn*u(mr),Jr=xn*E(mr),Vn=E(Ur),Hn.point=aa,Ci(pr,Jr,Vn)}function aa(mr,Ur){mr*=x,Ur*=x;var xn=u(Ur),un=xn*u(mr),Wn=xn*E(mr),hi=E(Ur),ea=T(h((ea=Jr*hi-Vn*Wn)*ea+(ea=Vn*un-pr*hi)*ea+(ea=pr*Wn-Jr*un)*ea),pr*un+Jr*Wn+Vn*hi);Ct+=ea,re+=ea*(pr+(pr=un)),le+=ea*(Jr+(Jr=Wn)),we+=ea*(Vn+(Vn=hi)),Ci(pr,Jr,Vn)}function Vi(){Hn.point=Kn}function We(){Hn.point=fr}function rr(){_r(Ar,Tr),Hn.point=Kn}function fr(mr,Ur){Ar=mr,Tr=Ur,mr*=x,Ur*=x,Hn.point=_r;var xn=u(Ur);pr=xn*u(mr),Jr=xn*E(mr),Vn=E(Ur),Ci(pr,Jr,Vn)}function _r(mr,Ur){mr*=x,Ur*=x;var xn=u(Ur),un=xn*u(mr),Wn=xn*E(mr),hi=E(Ur),ea=Jr*hi-Vn*Wn,pa=Vn*un-pr*hi,Da=pr*Wn-Jr*un,$a=h(ea*ea+pa*pa+Da*Da),la=w($a),Pa=$a&&-la/$a;Ue+=Pa*ea,qe+=Pa*pa,or+=Pa*Da,Ct+=la,re+=la*(pr+(pr=un)),le+=la*(Jr+(Jr=Wn)),we+=la*(Vn+(Vn=hi)),Ci(pr,Jr,Vn)}function Qr(mr){ne=Ct=gt=St=Nt=re=le=we=Ue=qe=or=0,W(mr,Hn);var Ur=Ue,xn=qe,un=or,Wn=Ur*Ur+xn*xn+un*un;return Wnn?mr+Math.round(-mr/s)*s:mr,Ur]}An.invert=An;function ci(mr,Ur,xn){return(mr%=s)?Ur||xn?bn(Li(mr),Oi(Ur,xn)):Li(mr):Ur||xn?Oi(Ur,xn):An}function xi(mr){return function(Ur,xn){return Ur+=mr,[Ur>n?Ur-s:Ur<-n?Ur+s:Ur,xn]}}function Li(mr){var Ur=xi(mr);return Ur.invert=xi(-mr),Ur}function Oi(mr,Ur){var xn=u(mr),un=E(mr),Wn=u(Ur),hi=E(Ur);function ea(pa,Da){var $a=u(Da),la=u(pa)*$a,Pa=E(pa)*$a,ba=E(Da),Ji=ba*xn+la*un;return[T(Pa*Wn-Ji*hi,la*xn-ba*un),w(Ji*Wn+Pa*hi)]}return ea.invert=function(pa,Da){var $a=u(Da),la=u(pa)*$a,Pa=E(pa)*$a,ba=E(Da),Ji=ba*Wn-Pa*hi;return[T(Pa*Wn+ba*hi,la*xn+Ji*un),w(Ji*xn-la*un)]},ea}function Zi(mr){mr=ci(mr[0]*x,mr[1]*x,mr.length>2?mr[2]*x:0);function Ur(xn){return xn=mr(xn[0]*x,xn[1]*x),xn[0]*=f,xn[1]*=f,xn}return Ur.invert=function(xn){return xn=mr.invert(xn[0]*x,xn[1]*x),xn[0]*=f,xn[1]*=f,xn},Ur}function li(mr,Ur,xn,un,Wn,hi){if(xn){var ea=u(Ur),pa=E(Ur),Da=un*xn;Wn==null?(Wn=Ur+un*s,hi=Ur-Da/2):(Wn=La(ea,Wn),hi=La(ea,hi),(un>0?Wnhi)&&(Wn+=un*s));for(var $a,la=Wn;un>0?la>hi:la1&&mr.push(mr.pop().concat(mr.shift()))},result:function(){var xn=mr;return mr=[],Ur=null,xn}}}function Pe(mr,Ur){return y(mr[0]-Ur[0])=0;--pa)Wn.point((Pa=la[pa])[0],Pa[1]);else un(ba.x,ba.p.x,-1,Wn);ba=ba.p}ba=ba.o,la=ba.z,Ji=!Ji}while(!ba.v);Wn.lineEnd()}}}function $r(mr){if(Ur=mr.length){for(var Ur,xn=0,un=mr[0],Wn;++xn=0?1:-1,Wl=ou*Il,su=Wl>n,vl=as*vs;if(Br.add(T(vl*ou*E(Wl),Xo*rl+vl*u(Wl))),ea+=su?Il+ou*s:Il,su^Ji>=xn^oo>=xn){var qu=zt(ut(ba),ut(ms));Ht(qu);var Lu=zt(hi,qu);Ht(Lu);var fu=(su^Il>=0?-1:1)*w(Lu[2]);(un>fu||un===fu&&(qu[0]||qu[1]))&&(pa+=su^Il>=0?1:-1)}}return(ea<-r||ea0){for(Da||(Wn.polygonStart(),Da=!0),Wn.lineStart(),rl=0;rl1&&qa&2&&vs.push(vs.pop().concat(vs.shift())),la.push(vs.filter(Ee))}}return ba}}function Ee(mr){return mr.length>1}function dr(mr,Ur){return((mr=mr.x)[0]<0?mr[1]-o-r:o-mr[1])-((Ur=Ur.x)[0]<0?Ur[1]-o-r:o-Ur[1])}var Vr=an(function(){return!0},vn,Xn,[-n,-o]);function vn(mr){var Ur=NaN,xn=NaN,un=NaN,Wn;return{lineStart:function(){mr.lineStart(),Wn=1},point:function(hi,ea){var pa=hi>0?n:-n,Da=y(hi-Ur);y(Da-n)0?o:-o),mr.point(un,xn),mr.lineEnd(),mr.lineStart(),mr.point(pa,xn),mr.point(hi,xn),Wn=0):un!==pa&&Da>=n&&(y(Ur-un)r?v((E(Ur)*(hi=u(un))*E(xn)-E(un)*(Wn=u(Ur))*E(mr))/(Wn*hi*ea)):(Ur+un)/2}function Xn(mr,Ur,xn,un){var Wn;if(mr==null)Wn=xn*o,un.point(-n,Wn),un.point(0,Wn),un.point(n,Wn),un.point(n,0),un.point(n,-Wn),un.point(0,-Wn),un.point(-n,-Wn),un.point(-n,0),un.point(-n,Wn);else if(y(mr[0]-Ur[0])>r){var hi=mr[0]0,Wn=y(Ur)>r;function hi(la,Pa,ba,Ji){li(Ji,mr,xn,ba,la,Pa)}function ea(la,Pa){return u(la)*u(Pa)>Ur}function pa(la){var Pa,ba,Ji,no,as;return{lineStart:function(){no=Ji=!1,as=1},point:function(Xo,ls){var ms=[Xo,ls],oo,qa=ea(Xo,ls),vs=un?qa?0:$a(Xo,ls):qa?$a(Xo+(Xo<0?n:-n),ls):0;if(!Pa&&(no=Ji=qa)&&la.lineStart(),qa!==Ji&&(oo=Da(Pa,ms),(!oo||Pe(Pa,oo)||Pe(ms,oo))&&(ms[2]=1)),qa!==Ji)as=0,qa?(la.lineStart(),oo=Da(ms,Pa),la.point(oo[0],oo[1])):(oo=Da(Pa,ms),la.point(oo[0],oo[1],2),la.lineEnd()),Pa=oo;else if(Wn&&Pa&&un^qa){var rl;!(vs&ba)&&(rl=Da(ms,Pa,!0))&&(as=0,un?(la.lineStart(),la.point(rl[0][0],rl[0][1]),la.point(rl[1][0],rl[1][1]),la.lineEnd()):(la.point(rl[1][0],rl[1][1]),la.lineEnd(),la.lineStart(),la.point(rl[0][0],rl[0][1],3)))}qa&&(!Pa||!Pe(Pa,ms))&&la.point(ms[0],ms[1]),Pa=ms,Ji=qa,ba=vs},lineEnd:function(){Ji&&la.lineEnd(),Pa=null},clean:function(){return as|(no&&Ji)<<1}}}function Da(la,Pa,ba){var Ji=ut(la),no=ut(Pa),as=[1,0,0],Xo=zt(Ji,no),ls=wt(Xo,Xo),ms=Xo[0],oo=ls-ms*ms;if(!oo)return!ba&&la;var qa=Ur*ls/oo,vs=-Ur*ms/oo,rl=zt(as,Xo),Il=Wt(as,qa),ou=Wt(Xo,vs);Pt(Il,ou);var Wl=rl,su=wt(Il,Wl),vl=wt(Wl,Wl),qu=su*su-vl*(wt(Il,Il)-1);if(!(qu<0)){var Lu=h(qu),fu=Wt(Wl,(-su-Lu)/vl);if(Pt(fu,Il),fu=ft(fu),!ba)return fu;var Oo=la[0],Es=Pa[0],Yl=la[1],Rl=Pa[1],yc;Es0^fu[1]<(y(fu[0]-Oo)n^(Oo<=fu[0]&&fu[0]<=Es)){var Wc=Wt(Wl,(-su+Lu)/vl);return Pt(Wc,Il),[fu,ft(Wc)]}}}function $a(la,Pa){var ba=un?mr:n-mr,Ji=0;return la<-ba?Ji|=1:la>ba&&(Ji|=2),Pa<-ba?Ji|=4:Pa>ba&&(Ji|=8),Ji}return an(ea,pa,hi,un?[0,-mr]:[-n,mr-n])}function Sn(mr,Ur,xn,un,Wn,hi){var ea=mr[0],pa=mr[1],Da=Ur[0],$a=Ur[1],la=0,Pa=1,ba=Da-ea,Ji=$a-pa,no;if(no=xn-ea,!(!ba&&no>0)){if(no/=ba,ba<0){if(no0){if(no>Pa)return;no>la&&(la=no)}if(no=Wn-ea,!(!ba&&no<0)){if(no/=ba,ba<0){if(no>Pa)return;no>la&&(la=no)}else if(ba>0){if(no0)){if(no/=Ji,Ji<0){if(no0){if(no>Pa)return;no>la&&(la=no)}if(no=hi-pa,!(!Ji&&no<0)){if(no/=Ji,Ji<0){if(no>Pa)return;no>la&&(la=no)}else if(Ji>0){if(no0&&(mr[0]=ea+la*ba,mr[1]=pa+la*Ji),Pa<1&&(Ur[0]=ea+Pa*ba,Ur[1]=pa+Pa*Ji),!0}}}}}var Zn=1e9,Ea=-Zn;function Ri(mr,Ur,xn,un){function Wn($a,la){return mr<=$a&&$a<=xn&&Ur<=la&&la<=un}function hi($a,la,Pa,ba){var Ji=0,no=0;if($a==null||(Ji=ea($a,Pa))!==(no=ea(la,Pa))||Da($a,la)<0^Pa>0)do ba.point(Ji===0||Ji===3?mr:xn,Ji>1?un:Ur);while((Ji=(Ji+Pa+4)%4)!==no);else ba.point(la[0],la[1])}function ea($a,la){return y($a[0]-mr)0?0:3:y($a[0]-xn)0?2:1:y($a[1]-Ur)0?1:0:la>0?3:2}function pa($a,la){return Da($a.x,la.x)}function Da($a,la){var Pa=ea($a,1),ba=ea(la,1);return Pa!==ba?Pa-ba:Pa===0?la[1]-$a[1]:Pa===1?$a[0]-la[0]:Pa===2?$a[1]-la[1]:la[0]-$a[0]}return function($a){var la=$a,Pa=ze(),ba,Ji,no,as,Xo,ls,ms,oo,qa,vs,rl,Il={point:ou,lineStart:qu,lineEnd:Lu,polygonStart:su,polygonEnd:vl};function ou(Oo,Es){Wn(Oo,Es)&&la.point(Oo,Es)}function Wl(){for(var Oo=0,Es=0,Yl=Ji.length;Esun&&(Ih-zh)*(un-Wc)>(Iu-Wc)*(mr-zh)&&++Oo:Iu<=un&&(Ih-zh)*(un-Wc)<(Iu-Wc)*(mr-zh)&&--Oo;return Oo}function su(){la=Pa,ba=[],Ji=[],rl=!0}function vl(){var Oo=Wl(),Es=rl&&Oo,Yl=(ba=g.merge(ba)).length;(Es||Yl)&&($a.polygonStart(),Es&&($a.lineStart(),hi(null,null,1,$a),$a.lineEnd()),Yl&&qr(ba,pa,Oo,hi,$a),$a.polygonEnd()),la=$a,ba=Ji=no=null}function qu(){Il.point=fu,Ji&&Ji.push(no=[]),vs=!0,qa=!1,ms=oo=NaN}function Lu(){ba&&(fu(as,Xo),ls&&qa&&Pa.rejoin(),ba.push(Pa.result())),Il.point=ou,qa&&la.lineEnd()}function fu(Oo,Es){var Yl=Wn(Oo,Es);if(Ji&&no.push([Oo,Es]),vs)as=Oo,Xo=Es,ls=Yl,vs=!1,Yl&&(la.lineStart(),la.point(Oo,Es));else if(Yl&&qa)la.point(Oo,Es);else{var Rl=[ms=Math.max(Ea,Math.min(Zn,ms)),oo=Math.max(Ea,Math.min(Zn,oo))],yc=[Oo=Math.max(Ea,Math.min(Zn,Oo)),Es=Math.max(Ea,Math.min(Zn,Es))];Sn(Rl,yc,mr,Ur,xn,un)?(qa||(la.lineStart(),la.point(Rl[0],Rl[1])),la.point(yc[0],yc[1]),Yl||la.lineEnd(),rl=!1):Yl&&(la.lineStart(),la.point(Oo,Es),rl=!1)}ms=Oo,oo=Es,qa=Yl}return Il}}function Ja(){var mr=0,Ur=0,xn=960,un=500,Wn,hi,ea;return ea={stream:function(pa){return Wn&&hi===pa?Wn:Wn=Ri(mr,Ur,xn,un)(hi=pa)},extent:function(pa){return arguments.length?(mr=+pa[0][0],Ur=+pa[0][1],xn=+pa[1][0],un=+pa[1][1],Wn=hi=null,ea):[[mr,Ur],[xn,un]]}}}var Xa=P(),Do,go,Fo,za={sphere:O,point:O,lineStart:xs,lineEnd:O,polygonStart:O,polygonEnd:O};function xs(){za.point=cl,za.lineEnd=os}function os(){za.point=za.lineEnd=O}function cl(mr,Ur){mr*=x,Ur*=x,Do=mr,go=E(Ur),Fo=u(Ur),za.point=Zo}function Zo(mr,Ur){mr*=x,Ur*=x;var xn=E(Ur),un=u(Ur),Wn=y(mr-Do),hi=u(Wn),ea=E(Wn),pa=un*ea,Da=Fo*xn-go*un*hi,$a=go*xn+Fo*un*hi;Xa.add(T(h(pa*pa+Da*Da),$a)),Do=mr,go=xn,Fo=un}function Ks(mr){return Xa.reset(),W(mr,za),+Xa}var ss=[null,null],hl={type:"LineString",coordinates:ss};function tl(mr,Ur){return ss[0]=mr,ss[1]=Ur,Ks(hl)}var Bl={Feature:function(mr,Ur){return Ps(mr.geometry,Ur)},FeatureCollection:function(mr,Ur){for(var xn=mr.features,un=-1,Wn=xn.length;++un0&&(Wn=tl(mr[hi],mr[hi-1]),Wn>0&&xn<=Wn&&un<=Wn&&(xn+un-Wn)*(1-Math.pow((xn-un)/Wn,2))r}).map(ba)).concat(g.range(b(hi/$a)*$a,Wn,$a).filter(function(oo){return y(oo%Pa)>r}).map(Ji))}return ls.lines=function(){return ms().map(function(oo){return{type:"LineString",coordinates:oo}})},ls.outline=function(){return{type:"Polygon",coordinates:[no(un).concat(as(ea).slice(1),no(xn).reverse().slice(1),as(pa).reverse().slice(1))]}},ls.extent=function(oo){return arguments.length?ls.extentMajor(oo).extentMinor(oo):ls.extentMinor()},ls.extentMajor=function(oo){return arguments.length?(un=+oo[0][0],xn=+oo[1][0],pa=+oo[0][1],ea=+oo[1][1],un>xn&&(oo=un,un=xn,xn=oo),pa>ea&&(oo=pa,pa=ea,ea=oo),ls.precision(Xo)):[[un,pa],[xn,ea]]},ls.extentMinor=function(oo){return arguments.length?(Ur=+oo[0][0],mr=+oo[1][0],hi=+oo[0][1],Wn=+oo[1][1],Ur>mr&&(oo=Ur,Ur=mr,mr=oo),hi>Wn&&(oo=hi,hi=Wn,Wn=oo),ls.precision(Xo)):[[Ur,hi],[mr,Wn]]},ls.step=function(oo){return arguments.length?ls.stepMajor(oo).stepMinor(oo):ls.stepMinor()},ls.stepMajor=function(oo){return arguments.length?(la=+oo[0],Pa=+oo[1],ls):[la,Pa]},ls.stepMinor=function(oo){return arguments.length?(Da=+oo[0],$a=+oo[1],ls):[Da,$a]},ls.precision=function(oo){return arguments.length?(Xo=+oo,ba=Ca(hi,Wn,90),Ji=fo(Ur,mr,Xo),no=Ca(pa,ea,90),as=fo(un,xn,Xo),ls):Xo},ls.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function Jl(){return qs()()}function Jo(mr,Ur){var xn=mr[0]*x,un=mr[1]*x,Wn=Ur[0]*x,hi=Ur[1]*x,ea=u(un),pa=E(un),Da=u(hi),$a=E(hi),la=ea*u(xn),Pa=ea*E(xn),ba=Da*u(Wn),Ji=Da*E(Wn),no=2*w(h(R(hi-un)+ea*Da*R(Wn-xn))),as=E(no),Xo=no?function(ls){var ms=E(ls*=no)/as,oo=E(no-ls)/as,qa=oo*la+ms*ba,vs=oo*Pa+ms*Ji,rl=oo*pa+ms*$a;return[T(vs,qa)*f,T(rl,h(qa*qa+vs*vs))*f]}:function(){return[xn*f,un*f]};return Xo.distance=no,Xo}function $l(mr){return mr}var ol=P(),Pl=P(),Ru,lo,As,zs,au={point:O,lineStart:O,lineEnd:O,polygonStart:function(){au.lineStart=fl,au.lineEnd=Gu},polygonEnd:function(){au.lineStart=au.lineEnd=au.point=O,ol.add(y(Pl)),Pl.reset()},result:function(){var mr=ol/2;return ol.reset(),mr}};function fl(){au.point=rs}function rs(mr,Ur){au.point=Mu,Ru=As=mr,lo=zs=Ur}function Mu(mr,Ur){Pl.add(zs*mr-As*Ur),As=mr,zs=Ur}function Gu(){Mu(Ru,lo)}var bl=1/0,Dl=bl,Ql=-bl,ru=Ql,oc={point:mh,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var mr=[[bl,Dl],[Ql,ru]];return Ql=ru=-(Dl=bl=1/0),mr}};function mh(mr,Ur){mrQl&&(Ql=mr),Urru&&(ru=Ur)}var Jc=0,oh=0,Uf=0,Cf=0,Fl=0,Bc=0,Vf=0,fc=0,sc=0,dc,sh,cu,lc,nl={point:Gl,lineStart:Sh,lineEnd:xu,polygonStart:function(){nl.lineStart=Id,nl.lineEnd=el},polygonEnd:function(){nl.point=Gl,nl.lineStart=Sh,nl.lineEnd=xu},result:function(){var mr=sc?[Vf/sc,fc/sc]:Bc?[Cf/Bc,Fl/Bc]:Uf?[Jc/Uf,oh/Uf]:[NaN,NaN];return Jc=oh=Uf=Cf=Fl=Bc=Vf=fc=sc=0,mr}};function Gl(mr,Ur){Jc+=mr,oh+=Ur,++Uf}function Sh(){nl.point=Pc}function Pc(mr,Ur){nl.point=Uh,Gl(cu=mr,lc=Ur)}function Uh(mr,Ur){var xn=mr-cu,un=Ur-lc,Wn=h(xn*xn+un*un);Cf+=Wn*(cu+mr)/2,Fl+=Wn*(lc+Ur)/2,Bc+=Wn,Gl(cu=mr,lc=Ur)}function xu(){nl.point=Gl}function Id(){nl.point=$d}function el(){zl(dc,sh)}function $d(mr,Ur){nl.point=zl,Gl(dc=cu=mr,sh=lc=Ur)}function zl(mr,Ur){var xn=mr-cu,un=Ur-lc,Wn=h(xn*xn+un*un);Cf+=Wn*(cu+mr)/2,Fl+=Wn*(lc+Ur)/2,Bc+=Wn,Wn=lc*mr-cu*Ur,Vf+=Wn*(cu+mr),fc+=Wn*(lc+Ur),sc+=Wn*3,Gl(cu=mr,lc=Ur)}function ts(mr){this._context=mr}ts.prototype={_radius:4.5,pointRadius:function(mr){return this._radius=mr,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(mr,Ur){switch(this._point){case 0:{this._context.moveTo(mr,Ur),this._point=1;break}case 1:{this._context.lineTo(mr,Ur);break}default:{this._context.moveTo(mr+this._radius,Ur),this._context.arc(mr,Ur,this._radius,0,s);break}}},result:O};var lf=P(),lh,ec,Hf,Vh,xf,uc={point:O,lineStart:function(){uc.point=md},lineEnd:function(){lh&&Kf(ec,Hf),uc.point=O},polygonStart:function(){lh=!0},polygonEnd:function(){lh=null},result:function(){var mr=+lf;return lf.reset(),mr}};function md(mr,Ur){uc.point=Kf,ec=Vh=mr,Hf=xf=Ur}function Kf(mr,Ur){Vh-=mr,xf-=Ur,lf.add(h(Vh*Vh+xf*xf)),Vh=mr,xf=Ur}function _f(){this._string=[]}_f.prototype={_radius:4.5,_circle:Hh(4.5),pointRadius:function(mr){return(mr=+mr)!==this._radius&&(this._radius=mr,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(mr,Ur){switch(this._point){case 0:{this._string.push("M",mr,",",Ur),this._point=1;break}case 1:{this._string.push("L",mr,",",Ur);break}default:{this._circle==null&&(this._circle=Hh(this._radius)),this._string.push("M",mr,",",Ur,this._circle);break}}},result:function(){if(this._string.length){var mr=this._string.join("");return this._string=[],mr}else return null}};function Hh(mr){return"m0,"+mr+"a"+mr+","+mr+" 0 1,1 0,"+-2*mr+"a"+mr+","+mr+" 0 1,1 0,"+2*mr+"z"}function Wf(mr,Ur){var xn=4.5,un,Wn;function hi(ea){return ea&&(typeof xn=="function"&&Wn.pointRadius(+xn.apply(this,arguments)),W(ea,un(Wn))),Wn.result()}return hi.area=function(ea){return W(ea,un(au)),au.result()},hi.measure=function(ea){return W(ea,un(uc)),uc.result()},hi.bounds=function(ea){return W(ea,un(oc)),oc.result()},hi.centroid=function(ea){return W(ea,un(nl)),nl.result()},hi.projection=function(ea){return arguments.length?(un=ea==null?(mr=null,$l):(mr=ea).stream,hi):mr},hi.context=function(ea){return arguments.length?(Wn=ea==null?(Ur=null,new _f):new ts(Ur=ea),typeof xn!="function"&&Wn.pointRadius(xn),hi):Ur},hi.pointRadius=function(ea){return arguments.length?(xn=typeof ea=="function"?ea:(Wn.pointRadius(+ea),+ea),hi):xn},hi.projection(mr).context(Ur)}function qf(mr){return{stream:uh(mr)}}function uh(mr){return function(Ur){var xn=new Xf;for(var un in mr)xn[un]=mr[un];return xn.stream=Ur,xn}}function Xf(){}Xf.prototype={constructor:Xf,point:function(mr,Ur){this.stream.point(mr,Ur)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Eh(mr,Ur,xn){var un=mr.clipExtent&&mr.clipExtent();return mr.scale(150).translate([0,0]),un!=null&&mr.clipExtent(null),W(xn,mr.stream(oc)),Ur(oc.result()),un!=null&&mr.clipExtent(un),mr}function gh(mr,Ur,xn){return Eh(mr,function(un){var Wn=Ur[1][0]-Ur[0][0],hi=Ur[1][1]-Ur[0][1],ea=Math.min(Wn/(un[1][0]-un[0][0]),hi/(un[1][1]-un[0][1])),pa=+Ur[0][0]+(Wn-ea*(un[1][0]+un[0][0]))/2,Da=+Ur[0][1]+(hi-ea*(un[1][1]+un[0][1]))/2;mr.scale(150*ea).translate([pa,Da])},xn)}function cc(mr,Ur,xn){return gh(mr,[[0,0],Ur],xn)}function ef(mr,Ur,xn){return Eh(mr,function(un){var Wn=+Ur,hi=Wn/(un[1][0]-un[0][0]),ea=(Wn-hi*(un[1][0]+un[0][0]))/2,pa=-hi*un[0][1];mr.scale(150*hi).translate([ea,pa])},xn)}function Zf(mr,Ur,xn){return Eh(mr,function(un){var Wn=+Ur,hi=Wn/(un[1][1]-un[0][1]),ea=-hi*un[0][0],pa=(Wn-hi*(un[1][1]+un[0][1]))/2;mr.scale(150*hi).translate([ea,pa])},xn)}var tu=16,Lf=u(30*x);function Od(mr,Ur){return+Ur?bf(mr,Ur):Jf(mr)}function Jf(mr){return uh({point:function(Ur,xn){Ur=mr(Ur,xn),this.stream.point(Ur[0],Ur[1])}})}function bf(mr,Ur){function xn(un,Wn,hi,ea,pa,Da,$a,la,Pa,ba,Ji,no,as,Xo){var ls=$a-un,ms=la-Wn,oo=ls*ls+ms*ms;if(oo>4*Ur&&as--){var qa=ea+ba,vs=pa+Ji,rl=Da+no,Il=h(qa*qa+vs*vs+rl*rl),ou=w(rl/=Il),Wl=y(y(rl)-1)Ur||y((ls*Lu+ms*fu)/oo-.5)>.3||ea*ba+pa*Ji+Da*no2?Oo[2]%360*x:0,Lu()):[pa*f,Da*f,$a*f]},vl.angle=function(Oo){return arguments.length?(Pa=Oo%360*x,Lu()):Pa*f},vl.reflectX=function(Oo){return arguments.length?(ba=Oo?-1:1,Lu()):ba<0},vl.reflectY=function(Oo){return arguments.length?(Ji=Oo?-1:1,Lu()):Ji<0},vl.precision=function(Oo){return arguments.length?(rl=Od(Il,vs=Oo*Oo),fu()):h(vs)},vl.fitExtent=function(Oo,Es){return gh(vl,Oo,Es)},vl.fitSize=function(Oo,Es){return cc(vl,Oo,Es)},vl.fitWidth=function(Oo,Es){return ef(vl,Oo,Es)},vl.fitHeight=function(Oo,Es){return Zf(vl,Oo,Es)};function Lu(){var Oo=zu(xn,0,0,ba,Ji,Pa).apply(null,Ur(hi,ea)),Es=(Pa?zu:td)(xn,un-Oo[0],Wn-Oo[1],ba,Ji,Pa);return la=ci(pa,Da,$a),Il=bn(Ur,Es),ou=bn(la,Il),rl=Od(Il,vs),fu()}function fu(){return Wl=su=null,vl}return function(){return Ur=mr.apply(this,arguments),vl.invert=Ur.invert&&qu,Lu()}}function hu(mr){var Ur=0,xn=n/3,un=Wh(mr),Wn=un(Ur,xn);return Wn.parallels=function(hi){return arguments.length?un(Ur=hi[0]*x,xn=hi[1]*x):[Ur*f,xn*f]},Wn}function Ch(mr){var Ur=u(mr);function xn(un,Wn){return[un*Ur,E(Wn)/Ur]}return xn.invert=function(un,Wn){return[un/Ur,w(Wn*Ur)]},xn}function Ec(mr,Ur){var xn=E(mr),un=(xn+E(Ur))/2;if(y(un)=.12&&Xo<.234&&as>=-.425&&as<-.214?Wn:Xo>=.166&&Xo<.234&&as>=-.214&&as<-.115?ea:xn).invert(ba)},la.stream=function(ba){return mr&&Ur===ba?mr:mr=uf([xn.stream(Ur=ba),Wn.stream(ba),ea.stream(ba)])},la.precision=function(ba){return arguments.length?(xn.precision(ba),Wn.precision(ba),ea.precision(ba),Pa()):xn.precision()},la.scale=function(ba){return arguments.length?(xn.scale(ba),Wn.scale(ba*.35),ea.scale(ba),la.translate(xn.translate())):xn.scale()},la.translate=function(ba){if(!arguments.length)return xn.translate();var Ji=xn.scale(),no=+ba[0],as=+ba[1];return un=xn.translate(ba).clipExtent([[no-.455*Ji,as-.238*Ji],[no+.455*Ji,as+.238*Ji]]).stream($a),hi=Wn.translate([no-.307*Ji,as+.201*Ji]).clipExtent([[no-.425*Ji+r,as+.12*Ji+r],[no-.214*Ji-r,as+.234*Ji-r]]).stream($a),pa=ea.translate([no-.205*Ji,as+.212*Ji]).clipExtent([[no-.214*Ji+r,as+.166*Ji+r],[no-.115*Ji-r,as+.234*Ji-r]]).stream($a),Pa()},la.fitExtent=function(ba,Ji){return gh(la,ba,Ji)},la.fitSize=function(ba,Ji){return cc(la,ba,Ji)},la.fitWidth=function(ba,Ji){return ef(la,ba,Ji)},la.fitHeight=function(ba,Ji){return Zf(la,ba,Ji)};function Pa(){return mr=Ur=null,la}return la.scale(1070)}function qh(mr){return function(Ur,xn){var un=u(Ur),Wn=u(xn),hi=mr(un*Wn);return[hi*Wn*E(Ur),hi*E(xn)]}}function Pf(mr){return function(Ur,xn){var un=h(Ur*Ur+xn*xn),Wn=mr(un),hi=E(Wn),ea=u(Wn);return[T(Ur*hi,un*ea),w(un&&xn*hi/un)]}}var Dd=qh(function(mr){return h(2/(1+mr))});Dd.invert=Pf(function(mr){return 2*w(mr/2)});function rp(){return jc(Dd).scale(124.75).clipAngle(180-.001)}var cf=qh(function(mr){return(mr=k(mr))&&mr/E(mr)});cf.invert=Pf(function(mr){return mr});function zf(){return jc(cf).scale(79.4188).clipAngle(180-.001)}function Tc(mr,Ur){return[mr,C(p((o+Ur)/2))]}Tc.invert=function(mr,Ur){return[mr,2*v(_(Ur))-o]};function hf(){return Qc(Tc).scale(961/s)}function Qc(mr){var Ur=jc(mr),xn=Ur.center,un=Ur.scale,Wn=Ur.translate,hi=Ur.clipExtent,ea=null,pa,Da,$a;Ur.scale=function(Pa){return arguments.length?(un(Pa),la()):un()},Ur.translate=function(Pa){return arguments.length?(Wn(Pa),la()):Wn()},Ur.center=function(Pa){return arguments.length?(xn(Pa),la()):xn()},Ur.clipExtent=function(Pa){return arguments.length?(Pa==null?ea=pa=Da=$a=null:(ea=+Pa[0][0],pa=+Pa[0][1],Da=+Pa[1][0],$a=+Pa[1][1]),la()):ea==null?null:[[ea,pa],[Da,$a]]};function la(){var Pa=n*un(),ba=Ur(Zi(Ur.rotate()).invert([0,0]));return hi(ea==null?[[ba[0]-Pa,ba[1]-Pa],[ba[0]+Pa,ba[1]+Pa]]:mr===Tc?[[Math.max(ba[0]-Pa,ea),pa],[Math.min(ba[0]+Pa,Da),$a]]:[[ea,Math.max(ba[1]-Pa,pa)],[Da,Math.min(ba[1]+Pa,$a)]])}return la()}function ff(mr){return p((o+mr)/2)}function If(mr,Ur){var xn=u(mr),un=mr===Ur?E(mr):C(xn/u(Ur))/C(ff(Ur)/ff(mr)),Wn=xn*M(ff(mr),un)/un;if(!un)return Tc;function hi(ea,pa){Wn>0?pa<-o+r&&(pa=-o+r):pa>o-r&&(pa=o-r);var Da=Wn/M(ff(pa),un);return[Da*E(un*ea),Wn-Da*u(un*ea)]}return hi.invert=function(ea,pa){var Da=Wn-pa,$a=A(un)*h(ea*ea+Da*Da),la=T(ea,y(Da))*A(Da);return Da*un<0&&(la-=n*A(ea)*A(Da)),[la/un,2*v(M(Wn/$a,1/un))-o]},hi}function yh(){return hu(If).scale(109.5).parallels([30,30])}function bu(mr,Ur){return[mr,Ur]}bu.invert=bu;function Lh(){return jc(bu).scale(152.63)}function Vc(mr,Ur){var xn=u(mr),un=mr===Ur?E(mr):(xn-u(Ur))/(Ur-mr),Wn=xn/un+mr;if(y(un)r&&--un>0);return[mr/(.8707+(hi=xn*xn)*(-.131979+hi*(-.013791+hi*hi*hi*(.003971-.001529*hi)))),xn]};function xh(){return jc(Ph).scale(175.295)}function Bu(mr,Ur){return[u(Ur)*E(mr),E(Ur)]}Bu.invert=Pf(w);function nu(){return jc(Bu).scale(249.5).clipAngle(90+r)}function _h(mr,Ur){var xn=u(Ur),un=1+u(mr)*xn;return[xn*E(mr)/un,E(Ur)/un]}_h.invert=Pf(function(mr){return 2*v(mr)});function df(){return jc(_h).scale(250).clipAngle(142)}function bh(mr,Ur){return[C(p((o+Ur)/2)),-mr]}bh.invert=function(mr,Ur){return[-Ur,2*v(_(mr))-o]};function $f(){var mr=Qc(bh),Ur=mr.center,xn=mr.rotate;return mr.center=function(un){return arguments.length?Ur([-un[1],un[0]]):(un=Ur(),[un[1],-un[0]])},mr.rotate=function(un){return arguments.length?xn([un[0],un[1],un.length>2?un[2]+90:90]):(un=xn(),[un[0],un[1],un[2]-90])},xn([0,0,90]).scale(159.155)}c.geoAlbers=_u,c.geoAlbersUsa=vh,c.geoArea=Y,c.geoAzimuthalEqualArea=rp,c.geoAzimuthalEqualAreaRaw=Dd,c.geoAzimuthalEquidistant=zf,c.geoAzimuthalEquidistantRaw=cf,c.geoBounds=Gt,c.geoCentroid=Qr,c.geoCircle=Wa,c.geoClipAntimeridian=Vr,c.geoClipCircle=Pn,c.geoClipExtent=Ja,c.geoClipRectangle=Ri,c.geoConicConformal=yh,c.geoConicConformalRaw=If,c.geoConicEqualArea=Uc,c.geoConicEqualAreaRaw=Ec,c.geoConicEquidistant=gd,c.geoConicEquidistantRaw=Vc,c.geoContains=Us,c.geoDistance=tl,c.geoEqualEarth=Fd,c.geoEqualEarthRaw=kf,c.geoEquirectangular=Lh,c.geoEquirectangularRaw=bu,c.geoGnomonic=ed,c.geoGnomonicRaw=vc,c.geoGraticule=qs,c.geoGraticule10=Jl,c.geoIdentity=eh,c.geoInterpolate=Jo,c.geoLength=Ks,c.geoMercator=hf,c.geoMercatorRaw=Tc,c.geoNaturalEarth1=xh,c.geoNaturalEarth1Raw=Ph,c.geoOrthographic=nu,c.geoOrthographicRaw=Bu,c.geoPath=Wf,c.geoProjection=jc,c.geoProjectionMutator=Wh,c.geoRotation=Zi,c.geoStereographic=df,c.geoStereographicRaw=_h,c.geoStream=W,c.geoTransform=qf,c.geoTransverseMercator=$f,c.geoTransverseMercatorRaw=bh,Object.defineProperty(c,"__esModule",{value:!0})})}),SU=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,xS(),_3()):g(c.d3=c.d3||{},c.d3,c.d3)})(Q,function(c,g,P){var S=Math.abs,t=Math.atan,e=Math.atan2,r=Math.cos,a=Math.exp,n=Math.floor,o=Math.log,i=Math.max,s=Math.min,f=Math.pow,x=Math.round,y=Math.sign||function(Xt){return Xt>0?1:Xt<0?-1:0},v=Math.sin,T=Math.tan,u=1e-6,b=1e-12,_=Math.PI,C=_/2,M=_/4,E=Math.SQRT1_2,A=V(2),h=V(_),p=_*2,k=180/_,w=_/180;function R(Xt){return Xt?Xt/Math.sin(Xt):1}function O(Xt){return Xt>1?C:Xt<-1?-C:Math.asin(Xt)}function N(Xt){return Xt>1?0:Xt<-1?_:Math.acos(Xt)}function V(Xt){return Xt>0?Math.sqrt(Xt):0}function H(Xt){return Xt=a(2*Xt),(Xt-1)/(Xt+1)}function F(Xt){return(a(Xt)-a(-Xt))/2}function U(Xt){return(a(Xt)+a(-Xt))/2}function W(Xt){return o(Xt+V(Xt*Xt+1))}function q(Xt){return o(Xt+V(Xt*Xt-1))}function X(Xt){var ae=T(Xt/2),xe=2*o(r(Xt/2))/(ae*ae);function Ae(je,Ie){var Ze=r(je),wr=r(Ie),Or=v(Ie),Nr=wr*Ze,tn=-((1-Nr?o((1+Nr)/2)/(1-Nr):-.5)+xe/(1+Nr));return[tn*wr*v(je),tn*Or]}return Ae.invert=function(je,Ie){var Ze=V(je*je+Ie*Ie),wr=-Xt/2,Or=50,Nr;if(!Ze)return[0,0];do{var tn=wr/2,pn=r(tn),zn=v(tn),Bn=zn/pn,ri=-o(S(pn));wr-=Nr=(2/Bn*ri-xe*Bn-Ze)/(-ri/(zn*zn)+1-xe/(2*pn*pn))*(pn<0?.7:1)}while(S(Nr)>u&&--Or>0);var Di=v(wr);return[e(je*Di,Ze*r(wr)),O(Ie*Di/Ze)]},Ae}function lt(){var Xt=C,ae=g.geoProjectionMutator(X),xe=ae(Xt);return xe.radius=function(Ae){return arguments.length?ae(Xt=Ae*w):Xt*k},xe.scale(179.976).clipAngle(147)}function yt(Xt,ae){var xe=r(ae),Ae=R(N(xe*r(Xt/=2)));return[2*xe*v(Xt)*Ae,v(ae)*Ae]}yt.invert=function(Xt,ae){if(!(Xt*Xt+4*ae*ae>_*_+u)){var xe=Xt,Ae=ae,je=25;do{var Ie=v(xe),Ze=v(xe/2),wr=r(xe/2),Or=v(Ae),Nr=r(Ae),tn=v(2*Ae),pn=Or*Or,zn=Nr*Nr,Bn=Ze*Ze,ri=1-zn*wr*wr,Di=ri?N(Nr*wr)*V(ha=1/ri):ha=0,ha,ca=2*Di*Nr*Ze-Xt,wa=Di*Or-ae,so=ha*(zn*Bn+Di*Nr*wr*pn),Bo=ha*(.5*Ie*tn-Di*2*Or*Ze),Eo=ha*.25*(tn*Ze-Di*Or*zn*Ie),ds=ha*(pn*wr+Di*Bn*Nr),dl=Bo*Eo-ds*so;if(!dl)break;var yl=(wa*Bo-ca*ds)/dl,Fs=(ca*Eo-wa*so)/dl;xe-=yl,Ae-=Fs}while((S(yl)>u||S(Fs)>u)&&--je>0);return[xe,Ae]}};function pt(){return g.geoProjection(yt).scale(152.63)}function st(Xt){var ae=v(Xt),xe=r(Xt),Ae=Xt>=0?1:-1,je=T(Ae*Xt),Ie=(1+ae-xe)/2;function Ze(wr,Or){var Nr=r(Or),tn=r(wr/=2);return[(1+Nr)*v(wr),(Ae*Or>-e(tn,je)-.001?0:-Ae*10)+Ie+v(Or)*xe-(1+Nr)*ae*tn]}return Ze.invert=function(wr,Or){var Nr=0,tn=0,pn=50;do{var zn=r(Nr),Bn=v(Nr),ri=r(tn),Di=v(tn),ha=1+ri,ca=ha*Bn-wr,wa=Ie+Di*xe-ha*ae*zn-Or,so=ha*zn/2,Bo=-Bn*Di,Eo=ae*ha*Bn/2,ds=xe*ri+ae*zn*Di,dl=Bo*Eo-ds*so,yl=(wa*Bo-ca*ds)/dl/2,Fs=(ca*Eo-wa*so)/dl;S(Fs)>2&&(Fs/=2),Nr-=yl,tn-=Fs}while((S(yl)>u||S(Fs)>u)&&--pn>0);return Ae*tn>-e(r(Nr),je)-.001?[Nr*2,tn]:null},Ze}function tt(){var Xt=20*w,ae=Xt>=0?1:-1,xe=T(ae*Xt),Ae=g.geoProjectionMutator(st),je=Ae(Xt),Ie=je.stream;return je.parallel=function(Ze){return arguments.length?(xe=T((ae=(Xt=Ze*w)>=0?1:-1)*Xt),Ae(Xt)):Xt*k},je.stream=function(Ze){var wr=je.rotate(),Or=Ie(Ze),Nr=(je.rotate([0,0]),Ie(Ze)),tn=je.precision();return je.rotate(wr),Or.sphere=function(){Nr.polygonStart(),Nr.lineStart();for(var pn=ae*-180;ae*pn<180;pn+=ae*90)Nr.point(pn,ae*90);if(Xt)for(;ae*(pn-=3*ae*tn)>=-180;)Nr.point(pn,ae*-e(r(pn*w/2),xe)*k);Nr.lineEnd(),Nr.polygonEnd()},Or},je.scale(218.695).center([0,28.0974])}function dt(Xt,ae){var xe=T(ae/2),Ae=V(1-xe*xe),je=1+Ae*r(Xt/=2),Ie=v(Xt)*Ae/je,Ze=xe/je,wr=Ie*Ie,Or=Ze*Ze;return[4/3*Ie*(3+wr-3*Or),4/3*Ze*(3+3*wr-Or)]}dt.invert=function(Xt,ae){if(Xt*=3/8,ae*=3/8,!Xt&&S(ae)>1)return null;var xe=Xt*Xt,Ae=ae*ae,je=1+xe+Ae,Ie=V((je-V(je*je-4*ae*ae))/2),Ze=O(Ie)/3,wr=Ie?q(S(ae/Ie))/3:W(S(Xt))/3,Or=r(Ze),Nr=U(wr),tn=Nr*Nr-Or*Or;return[y(Xt)*2*e(F(wr)*Or,.25-tn),y(ae)*2*e(Nr*v(Ze),.25+tn)]};function rt(){return g.geoProjection(dt).scale(66.1603)}var at=V(8),vt=o(1+A);function it(Xt,ae){var xe=S(ae);return xeb&&--Ae>0);return[Xt/(r(xe)*(at-1/v(xe))),y(ae)*xe]};function Y(){return g.geoProjection(it).scale(112.314)}function ft(Xt){var ae=2*_/Xt;function xe(Ae,je){var Ie=g.geoAzimuthalEquidistantRaw(Ae,je);if(S(Ae)>C){var Ze=e(Ie[1],Ie[0]),wr=V(Ie[0]*Ie[0]+Ie[1]*Ie[1]),Or=ae*x((Ze-C)/ae)+C,Nr=e(v(Ze-=Or),2-r(Ze));Ze=Or+O(_/wr*v(Nr))-Nr,Ie[0]=wr*r(Ze),Ie[1]=wr*v(Ze)}return Ie}return xe.invert=function(Ae,je){var Ie=V(Ae*Ae+je*je);if(Ie>C){var Ze=e(je,Ae),wr=ae*x((Ze-C)/ae)+C,Or=Ze>wr?-1:1,Nr=Ie*r(wr-Ze),tn=1/T(Or*N((Nr-_)/V(_*(_-2*Nr)+Ie*Ie)));Ze=wr+2*t((tn+Or*V(tn*tn-3))/3),Ae=Ie*r(Ze),je=Ie*v(Ze)}return g.geoAzimuthalEquidistantRaw.invert(Ae,je)},xe}function ut(){var Xt=5,ae=g.geoProjectionMutator(ft),xe=ae(Xt),Ae=xe.stream,je=.01,Ie=-r(je*w),Ze=v(je*w);return xe.lobes=function(wr){return arguments.length?ae(Xt=+wr):Xt},xe.stream=function(wr){var Or=xe.rotate(),Nr=Ae(wr),tn=(xe.rotate([0,0]),Ae(wr));return xe.rotate(Or),Nr.sphere=function(){tn.polygonStart(),tn.lineStart();for(var pn=0,zn=360/Xt,Bn=2*_/Xt,ri=90-180/Xt,Di=C;pn0&&S(je)>u);return Ae<0?NaN:xe}function Ht(Xt,ae,xe){return ae===void 0&&(ae=40),xe===void 0&&(xe=b),function(Ae,je,Ie,Ze){var wr,Or,Nr;Ie=Ie===void 0?0:+Ie,Ze=Ze===void 0?0:+Ze;for(var tn=0;tnwr){Ie-=Or/=2,Ze-=Nr/=2;continue}wr=ri;var Di=(Ie>0?-1:1)*xe,ha=(Ze>0?-1:1)*xe,ca=Xt(Ie+Di,Ze),wa=Xt(Ie,Ze+ha),so=(ca[0]-pn[0])/Di,Bo=(ca[1]-pn[1])/Di,Eo=(wa[0]-pn[0])/ha,ds=(wa[1]-pn[1])/ha,dl=ds*so-Bo*Eo,yl=(S(dl)<.5?.5:1)/dl;if(Or=(Bn*Eo-zn*ds)*yl,Nr=(zn*Bo-Bn*so)*yl,Ie+=Or,Ze+=Nr,S(Or)0&&(wr[1]*=1+Or/1.5*wr[0]*wr[0]),wr}return Ae.invert=Ht(Ae),Ae}function ge(){return g.geoProjection(Jt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function he(Xt,ae){var xe=Xt*v(ae),Ae=30,je;do ae-=je=(ae+v(ae)-xe)/(1+r(ae));while(S(je)>u&&--Ae>0);return ae/2}function de(Xt,ae,xe){function Ae(je,Ie){return[Xt*je*r(Ie=he(xe,Ie)),ae*v(Ie)]}return Ae.invert=function(je,Ie){return Ie=O(Ie/ae),[je/(Xt*r(Ie)),O((2*Ie+v(2*Ie))/xe)]},Ae}var se=de(A/C,A,_);function Tt(){return g.geoProjection(se).scale(169.529)}var Lt=2.00276,Mt=1.11072;function te(Xt,ae){var xe=he(_,ae);return[Lt*Xt/(1/r(ae)+Mt/r(xe)),(ae+A*v(xe))/Lt]}te.invert=function(Xt,ae){var xe=Lt*ae,Ae=ae<0?-M:M,je=25,Ie,Ze;do Ze=xe-A*v(Ae),Ae-=Ie=(v(2*Ae)+2*Ae-_*v(Ze))/(2*r(2*Ae)+2+_*r(Ze)*A*r(Ae));while(S(Ie)>u&&--je>0);return Ze=xe-A*v(Ae),[Xt*(1/r(Ze)+Mt/r(Ae))/Lt,Ze]};function ve(){return g.geoProjection(te).scale(160.857)}function oe(Xt){var ae=0,xe=g.geoProjectionMutator(Xt),Ae=xe(ae);return Ae.parallel=function(je){return arguments.length?xe(ae=je*w):ae*k},Ae}function Te(Xt,ae){return[Xt*r(ae),ae]}Te.invert=function(Xt,ae){return[Xt/r(ae),ae]};function He(){return g.geoProjection(Te).scale(152.63)}function Ge(Xt){if(!Xt)return Te;var ae=1/T(Xt);function xe(Ae,je){var Ie=ae+Xt-je,Ze=Ie&&Ae*r(je)/Ie;return[Ie*v(Ze),ae-Ie*r(Ze)]}return xe.invert=function(Ae,je){var Ie=V(Ae*Ae+(je=ae-je)*je),Ze=ae+Xt-Ie;return[Ie/r(Ze)*e(Ae,je),Ze]},xe}function cr(){return oe(Ge).scale(123.082).center([0,26.1441]).parallel(45)}function ur(Xt){function ae(xe,Ae){var je=C-Ae,Ie=je&&xe*Xt*v(je)/je;return[je*v(Ie)/Xt,C-je*r(Ie)]}return ae.invert=function(xe,Ae){var je=xe*Xt,Ie=C-Ae,Ze=V(je*je+Ie*Ie),wr=e(je,Ie);return[(Ze?Ze/v(Ze):1)*wr/Xt,C-Ze]},ae}function jr(){var Xt=.5,ae=g.geoProjectionMutator(ur),xe=ae(Xt);return xe.fraction=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(158.837)}var Hr=de(1,4/_,_);function br(){return g.geoProjection(Hr).scale(152.63)}function Kr(Xt,ae,xe,Ae,je,Ie){var Ze=r(Ie),wr;if(S(Xt)>1||S(Ie)>1)wr=N(xe*je+ae*Ae*Ze);else{var Or=v(Xt/2),Nr=v(Ie/2);wr=2*O(V(Or*Or+ae*Ae*Nr*Nr))}return S(wr)>u?[wr,e(Ae*v(Ie),ae*je-xe*Ae*Ze)]:[0,0]}function rn(Xt,ae,xe){return N((Xt*Xt+ae*ae-xe*xe)/(2*Xt*ae))}function Ce(Xt){return Xt-2*_*n((Xt+_)/(2*_))}function Gt(Xt,ae,xe){for(var Ae=[[Xt[0],Xt[1],v(Xt[1]),r(Xt[1])],[ae[0],ae[1],v(ae[1]),r(ae[1])],[xe[0],xe[1],v(xe[1]),r(xe[1])]],je=Ae[2],Ie,Ze=0;Ze<3;++Ze,je=Ie)Ie=Ae[Ze],je.v=Kr(Ie[1]-je[1],je[3],je[2],Ie[3],Ie[2],Ie[0]-je[0]),je.point=[0,0];var wr=rn(Ae[0].v[0],Ae[2].v[0],Ae[1].v[0]),Or=rn(Ae[0].v[0],Ae[1].v[0],Ae[2].v[0]),Nr=_-wr;Ae[2].point[1]=0,Ae[0].point[0]=-(Ae[1].point[0]=Ae[0].v[0]/2);var tn=[Ae[2].point[0]=Ae[0].point[0]+Ae[2].v[0]*r(wr),2*(Ae[0].point[1]=Ae[1].point[1]=Ae[2].v[0]*v(wr))];function pn(zn,Bn){var ri=v(Bn),Di=r(Bn),ha=new Array(3),ca;for(ca=0;ca<3;++ca){var wa=Ae[ca];if(ha[ca]=Kr(Bn-wa[1],wa[3],wa[2],Di,ri,zn-wa[0]),!ha[ca][0])return wa.point;ha[ca][1]=Ce(ha[ca][1]-wa.v[1])}var so=tn.slice();for(ca=0;ca<3;++ca){var Bo=ca==2?0:ca+1,Eo=rn(Ae[ca].v[0],ha[ca][0],ha[Bo][0]);ha[ca][1]<0&&(Eo=-Eo),ca?ca==1?(Eo=Or-Eo,so[0]-=ha[ca][0]*r(Eo),so[1]-=ha[ca][0]*v(Eo)):(Eo=Nr-Eo,so[0]+=ha[ca][0]*r(Eo),so[1]+=ha[ca][0]*v(Eo)):(so[0]+=ha[ca][0]*r(Eo),so[1]-=ha[ca][0]*v(Eo))}return so[0]/=3,so[1]/=3,so}return pn}function ne(Xt){return Xt[0]*=w,Xt[1]*=w,Xt}function Ct(){return gt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function gt(Xt,ae,xe){var Ae=g.geoCentroid({type:"MultiPoint",coordinates:[Xt,ae,xe]}),je=[-Ae[0],-Ae[1]],Ie=g.geoRotation(je),Ze=Gt(ne(Ie(Xt)),ne(Ie(ae)),ne(Ie(xe)));Ze.invert=Ht(Ze);var wr=g.geoProjection(Ze).rotate(je),Or=wr.center;return delete wr.rotate,wr.center=function(Nr){return arguments.length?Or(Ie(Nr)):Ie.invert(Or())},wr.clipAngle(90)}function St(Xt,ae){var xe=V(1-v(ae));return[2/h*Xt*xe,h*(1-xe)]}St.invert=function(Xt,ae){var xe=(xe=ae/h-1)*xe;return[xe>0?Xt*V(_/xe)/2:0,O(1-xe)]};function Nt(){return g.geoProjection(St).scale(95.6464).center([0,30])}function re(Xt){var ae=T(Xt);function xe(Ae,je){return[Ae,(Ae?Ae/v(Ae):1)*(v(je)*r(Ae)-ae*r(je))]}return xe.invert=ae?function(Ae,je){Ae&&(je*=v(Ae)/Ae);var Ie=r(Ae);return[Ae,2*e(V(Ie*Ie+ae*ae-je*je)-Ie,ae-je)]}:function(Ae,je){return[Ae,O(Ae?je*T(Ae)/Ae:je)]},xe}function le(){return oe(re).scale(249.828).clipAngle(90)}var we=V(3);function Ue(Xt,ae){return[we*Xt*(2*r(2*ae/3)-1)/h,we*h*v(ae/3)]}Ue.invert=function(Xt,ae){var xe=3*O(ae/(we*h));return[h*Xt/(we*(2*r(2*xe/3)-1)),xe]};function qe(){return g.geoProjection(Ue).scale(156.19)}function or(Xt){var ae=r(Xt);function xe(Ae,je){return[Ae*ae,v(je)/ae]}return xe.invert=function(Ae,je){return[Ae/ae,O(je*ae)]},xe}function Ar(){return oe(or).parallel(38.58).scale(195.044)}function Tr(Xt){var ae=r(Xt);function xe(Ae,je){return[Ae*ae,(1+ae)*T(je/2)]}return xe.invert=function(Ae,je){return[Ae/ae,t(je/(1+ae))*2]},xe}function pr(){return oe(Tr).scale(124.75)}function Jr(Xt,ae){var xe=V(8/(3*_));return[xe*Xt*(1-S(ae)/_),xe*ae]}Jr.invert=function(Xt,ae){var xe=V(8/(3*_)),Ae=ae/xe;return[Xt/(xe*(1-S(Ae)/_)),Ae]};function Vn(){return g.geoProjection(Jr).scale(165.664)}function Hn(Xt,ae){var xe=V(4-3*v(S(ae)));return[2/V(6*_)*Xt*xe,y(ae)*V(2*_/3)*(2-xe)]}Hn.invert=function(Xt,ae){var xe=2-S(ae)/V(2*_/3);return[Xt*V(6*_)/(2*xe),y(ae)*O((4-xe*xe)/3)]};function Kn(){return g.geoProjection(Hn).scale(165.664)}function Ci(Xt,ae){var xe=V(_*(4+_));return[2/xe*Xt*(1+V(1-4*ae*ae/(_*_))),4/xe*ae]}Ci.invert=function(Xt,ae){var xe=V(_*(4+_))/2;return[Xt*xe/(1+V(1-ae*ae*(4+_)/(4*_))),ae*xe/2]};function ii(){return g.geoProjection(Ci).scale(180.739)}function qn(Xt,ae){var xe=(2+C)*v(ae);ae/=2;for(var Ae=0,je=1/0;Ae<10&&S(je)>u;Ae++){var Ie=r(ae);ae-=je=(ae+v(ae)*(Ie+2)-xe)/(2*Ie*(1+Ie))}return[2/V(_*(4+_))*Xt*(1+r(ae)),2*V(_/(4+_))*v(ae)]}qn.invert=function(Xt,ae){var xe=ae*V((4+_)/_)/2,Ae=O(xe),je=r(Ae);return[Xt/(2/V(_*(4+_))*(1+je)),O((Ae+xe*(je+2))/(2+C))]};function aa(){return g.geoProjection(qn).scale(180.739)}function Vi(Xt,ae){return[Xt*(1+r(ae))/V(2+_),2*ae/V(2+_)]}Vi.invert=function(Xt,ae){var xe=V(2+_),Ae=ae*xe/2;return[xe*Xt/(1+r(Ae)),Ae]};function We(){return g.geoProjection(Vi).scale(173.044)}function rr(Xt,ae){for(var xe=(1+C)*v(ae),Ae=0,je=1/0;Ae<10&&S(je)>u;Ae++)ae-=je=(ae+v(ae)-xe)/(1+r(ae));return xe=V(2+_),[Xt*(1+r(ae))/xe,2*ae/xe]}rr.invert=function(Xt,ae){var xe=1+C,Ae=V(xe/2);return[Xt*2*Ae/(1+r(ae*=Ae)),O((ae+v(ae))/xe)]};function fr(){return g.geoProjection(rr).scale(173.044)}var _r=3+2*A;function Qr(Xt,ae){var xe=v(Xt/=2),Ae=r(Xt),je=V(r(ae)),Ie=r(ae/=2),Ze=v(ae)/(Ie+A*Ae*je),wr=V(2/(1+Ze*Ze)),Or=V((A*Ie+(Ae+xe)*je)/(A*Ie+(Ae-xe)*je));return[_r*(wr*(Or-1/Or)-2*o(Or)),_r*(wr*Ze*(Or+1/Or)-2*t(Ze))]}Qr.invert=function(Xt,ae){if(!(Ie=dt.invert(Xt/1.2,ae*1.065)))return null;var xe=Ie[0],Ae=Ie[1],je=20,Ie;Xt/=_r,ae/=_r;do{var Ze=xe/2,wr=Ae/2,Or=v(Ze),Nr=r(Ze),tn=v(wr),pn=r(wr),zn=r(Ae),Bn=V(zn),ri=tn/(pn+A*Nr*Bn),Di=ri*ri,ha=V(2/(1+Di)),ca=A*pn+(Nr+Or)*Bn,wa=A*pn+(Nr-Or)*Bn,so=ca/wa,Bo=V(so),Eo=Bo-1/Bo,ds=Bo+1/Bo,dl=ha*Eo-2*o(Bo)-Xt,yl=ha*ri*ds-2*t(ri)-ae,Fs=tn&&E*Bn*Or*Di/tn,wl=(A*Nr*pn+Bn)/(2*(pn+A*Nr*Bn)*(pn+A*Nr*Bn)*Bn),Su=-.5*ri*ha*ha*ha,gu=Su*Fs,Zs=Su*wl,$s=($s=2*pn+A*Bn*(Nr-Or))*$s*Bo,Yu=(A*Nr*pn*Bn+zn)/$s,pc=-(A*Or*tn)/(Bn*$s),Zc=Eo*gu-2*Yu/Bo+ha*(Yu+Yu/so),At=Eo*Zs-2*pc/Bo+ha*(pc+pc/so),jt=ri*ds*gu-2*Fs/(1+Di)+ha*ds*Fs+ha*ri*(Yu-Yu/so),ue=ri*ds*Zs-2*wl/(1+Di)+ha*ds*wl+ha*ri*(pc-pc/so),Me=At*jt-ue*Zc;if(!Me)break;var Le=(yl*At-dl*ue)/Me,Ne=(dl*jt-yl*Zc)/Me;xe-=Le,Ae=i(-C,s(C,Ae-Ne))}while((S(Le)>u||S(Ne)>u)&&--je>0);return S(S(Ae)-C)Ae){var pn=V(tn),zn=e(Nr,Or),Bn=xe*x(zn/xe),ri=zn-Bn,Di=Xt*r(ri),ha=(Xt*v(ri)-ri*v(Di))/(C-Di),ca=Pe(ri,ha),wa=(_-Xt)/Rr(ca,Di,_);Or=pn;var so=50,Bo;do Or-=Bo=(Xt+Rr(ca,Di,Or)*wa-pn)/(ca(Or)*wa);while(S(Bo)>u&&--so>0);Nr=ri*v(Or),OrAe){var Or=V(wr),Nr=e(Ze,Ie),tn=xe*x(Nr/xe),pn=Nr-tn;Ie=Or*r(pn),Ze=Or*v(pn);for(var zn=Ie-C,Bn=v(Ie),ri=Ze/Bn,Di=Ieu||S(ri)>u)&&--Di>0);return[pn,zn]},Or}var Br=$r(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Gr(){return g.geoProjection(Br).scale(149.995)}var fn=$r(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function an(){return g.geoProjection(fn).scale(153.93)}var Ee=$r(5/6*_,-.62636,-.0344,0,1.3493,-.05524,0,.045);function dr(){return g.geoProjection(Ee).scale(130.945)}function Vr(Xt,ae){var xe=Xt*Xt,Ae=ae*ae;return[Xt*(1-.162388*Ae)*(.87-952426e-9*xe*xe),ae*(1+Ae/12)]}Vr.invert=function(Xt,ae){var xe=Xt,Ae=ae,je=50,Ie;do{var Ze=Ae*Ae;Ae-=Ie=(Ae*(1+Ze/12)-ae)/(1+Ze/4)}while(S(Ie)>u&&--je>0);je=50,Xt/=1-.162388*Ze;do{var wr=(wr=xe*xe)*wr;xe-=Ie=(xe*(.87-952426e-9*wr)-Xt)/(.87-.00476213*wr)}while(S(Ie)>u&&--je>0);return[xe,Ae]};function vn(){return g.geoProjection(Vr).scale(131.747)}var Fn=$r(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Xn(){return g.geoProjection(Fn).scale(131.087)}function Pn(Xt){var ae=Xt(C,0)[0]-Xt(-C,0)[0];function xe(Ae,je){var Ie=Ae>0?-.5:.5,Ze=Xt(Ae+Ie*_,je);return Ze[0]-=Ie*ae,Ze}return Xt.invert&&(xe.invert=function(Ae,je){var Ie=Ae>0?-.5:.5,Ze=Xt.invert(Ae+Ie*ae,je),wr=Ze[0]-Ie*_;return wr<-_?wr+=2*_:wr>_&&(wr-=2*_),Ze[0]=wr,Ze}),xe}function Sn(Xt,ae){var xe=y(Xt),Ae=y(ae),je=r(ae),Ie=r(Xt)*je,Ze=v(Xt)*je,wr=v(Ae*ae);Xt=S(e(Ze,wr)),ae=O(Ie),S(Xt-C)>u&&(Xt%=C);var Or=Zn(Xt>_/4?C-Xt:Xt,ae);return Xt>_/4&&(wr=Or[0],Or[0]=-Or[1],Or[1]=-wr),Or[0]*=xe,Or[1]*=-Ae,Or}Sn.invert=function(Xt,ae){S(Xt)>1&&(Xt=y(Xt)*2-Xt),S(ae)>1&&(ae=y(ae)*2-ae);var xe=y(Xt),Ae=y(ae),je=-xe*Xt,Ie=-Ae*ae,Ze=Ie/je<1,wr=Ea(Ze?Ie:je,Ze?je:Ie),Or=wr[0],Nr=wr[1],tn=r(Nr);return Ze&&(Or=-C-Or),[xe*(e(v(Or)*tn,-v(Nr))+_),Ae*O(r(Or)*tn)]};function Zn(Xt,ae){if(ae===C)return[0,0];var xe=v(ae),Ae=xe*xe,je=Ae*Ae,Ie=1+je,Ze=1+3*je,wr=1-je,Or=O(1/V(Ie)),Nr=wr+Ae*Ie*Or,tn=(1-xe)/Nr,pn=V(tn),zn=tn*Ie,Bn=V(zn),ri=pn*wr,Di,ha;if(Xt===0)return[0,-(ri+Ae*Bn)];var ca=r(ae),wa=1/ca,so=2*xe*ca,Bo=(-3*Ae+Or*Ze)*so,Eo=(-Nr*ca-(1-xe)*Bo)/(Nr*Nr),ds=.5*Eo/pn,dl=wr*ds-2*Ae*pn*so,yl=Ae*Ie*Eo+tn*Ze*so,Fs=-wa*so,wl=-wa*yl,Su=-2*wa*dl,gu=4*Xt/_,Zs;if(Xt>.222*_||ae<_/4&&Xt>.175*_){if(Di=(ri+Ae*V(zn*(1+je)-ri*ri))/(1+je),Xt>_/4)return[Di,Di];var $s=Di,Yu=.5*Di;Di=.5*(Yu+$s),ha=50;do{var pc=V(zn-Di*Di),Zc=Di*(Su+Fs*pc)+wl*O(Di/Bn)-gu;if(!Zc)break;Zc<0?Yu=Di:$s=Di,Di=.5*(Yu+$s)}while(S($s-Yu)>u&&--ha>0)}else{Di=u,ha=25;do{var At=Di*Di,jt=V(zn-At),ue=Su+Fs*jt,Me=Di*ue+wl*O(Di/Bn)-gu,Le=ue+(wl-Fs*At)/jt;Di-=Zs=jt?Me/Le:0}while(S(Zs)>u&&--ha>0)}return[Di,-ri-Ae*V(zn-Di*Di)]}function Ea(Xt,ae){for(var xe=0,Ae=1,je=.5,Ie=50;;){var Ze=je*je,wr=V(je),Or=O(1/V(1+Ze)),Nr=1-Ze+je*(1+Ze)*Or,tn=(1-wr)/Nr,pn=V(tn),zn=tn*(1+Ze),Bn=pn*(1-Ze),ri=zn-Xt*Xt,Di=V(ri),ha=ae+Bn+je*Di;if(S(Ae-xe)0?xe=je:Ae=je,je=.5*(xe+Ae)}if(!Ie)return null;var ca=O(wr),wa=r(ca),so=1/wa,Bo=2*wr*wa,Eo=(-3*je+Or*(1+3*Ze))*Bo,ds=(-Nr*wa-(1-wr)*Eo)/(Nr*Nr),dl=.5*ds/pn,yl=(1-Ze)*dl-2*je*pn*Bo,Fs=-2*so*yl,wl=-so*Bo,Su=-so*(je*(1+Ze)*ds+tn*(1+3*Ze)*Bo);return[_/4*(Xt*(Fs+wl*Di)+Su*O(Xt/V(zn))),ca]}function Ri(){return g.geoProjection(Pn(Sn)).scale(239.75)}function Ja(Xt,ae,xe){var Ae,je,Ie;return Xt?(Ae=Xa(Xt,xe),ae?(je=Xa(ae,1-xe),Ie=je[1]*je[1]+xe*Ae[0]*Ae[0]*je[0]*je[0],[[Ae[0]*je[2]/Ie,Ae[1]*Ae[2]*je[0]*je[1]/Ie],[Ae[1]*je[1]/Ie,-Ae[0]*Ae[2]*je[0]*je[2]/Ie],[Ae[2]*je[1]*je[2]/Ie,-xe*Ae[0]*Ae[1]*je[0]/Ie]]):[[Ae[0],0],[Ae[1],0],[Ae[2],0]]):(je=Xa(ae,1-xe),[[0,je[0]/je[1]],[1/je[1],0],[je[2]/je[1],0]])}function Xa(Xt,ae){var xe,Ae,je,Ie,Ze;if(ae=1-u)return xe=(1-ae)/4,Ae=U(Xt),Ie=H(Xt),je=1/Ae,Ze=Ae*F(Xt),[Ie+xe*(Ze-Xt)/(Ae*Ae),je-xe*Ie*je*(Ze-Xt),je+xe*Ie*je*(Ze+Xt),2*t(a(Xt))-C+xe*(Ze-Xt)/Ae];var wr=[1,0,0,0,0,0,0,0,0],Or=[V(ae),0,0,0,0,0,0,0,0],Nr=0;for(Ae=V(1-ae),Ze=1;S(Or[Nr]/wr[Nr])>u&&Nr<8;)xe=wr[Nr++],Or[Nr]=(xe-Ae)/2,wr[Nr]=(xe+Ae)/2,Ae=V(xe*Ae),Ze*=2;je=Ze*wr[Nr]*Xt;do Ie=Or[Nr]*v(Ae=je)/wr[Nr],je=(O(Ie)+je)/2;while(--Nr);return[v(je),Ie=r(je),Ie/r(je-Ae),je]}function Do(Xt,ae,xe){var Ae=S(Xt),je=S(ae),Ie=F(je);if(Ae){var Ze=1/v(Ae),wr=1/(T(Ae)*T(Ae)),Or=-(wr+xe*(Ie*Ie*Ze*Ze)-1+xe),Nr=(xe-1)*wr,tn=(-Or+V(Or*Or-4*Nr))/2;return[go(t(1/V(tn)),xe)*y(Xt),go(t(V((tn/wr-1)/xe)),1-xe)*y(ae)]}return[0,go(t(Ie),1-xe)*y(ae)]}function go(Xt,ae){if(!ae)return Xt;if(ae===1)return o(T(Xt/2+M));for(var xe=1,Ae=V(1-ae),je=V(ae),Ie=0;S(je)>u;Ie++){if(Xt%_){var Ze=t(Ae*T(Xt)/xe);Ze<0&&(Ze+=_),Xt+=Ze+~~(Xt/_)*_}else Xt+=Xt;je=(xe+Ae)/2,Ae=V(xe*Ae),je=((xe=je)-Ae)/2}return Xt/(f(2,Ie)*xe)}function Fo(Xt,ae){var xe=(A-1)/(A+1),Ae=V(1-xe*xe),je=go(C,Ae*Ae),Ie=-1,Ze=o(T(_/4+S(ae)/2)),wr=a(Ie*Ze)/V(xe),Or=za(wr*r(Ie*Xt),wr*v(Ie*Xt)),Nr=Do(Or[0],Or[1],Ae*Ae);return[-Nr[1],(ae>=0?1:-1)*(.5*je-Nr[0])]}function za(Xt,ae){var xe=Xt*Xt,Ae=ae+1,je=1-xe-ae*ae;return[.5*((Xt>=0?C:-C)-e(je,2*Xt)),-.25*o(je*je+4*xe)+.5*o(Ae*Ae+xe)]}function xs(Xt,ae){var xe=ae[0]*ae[0]+ae[1]*ae[1];return[(Xt[0]*ae[0]+Xt[1]*ae[1])/xe,(Xt[1]*ae[0]-Xt[0]*ae[1])/xe]}Fo.invert=function(Xt,ae){var xe=(A-1)/(A+1),Ae=V(1-xe*xe),je=go(C,Ae*Ae),Ie=-1,Ze=Ja(.5*je-ae,-Xt,Ae*Ae),wr=xs(Ze[0],Ze[1]),Or=e(wr[1],wr[0])/Ie;return[Or,2*t(a(.5/Ie*o(xe*wr[0]*wr[0]+xe*wr[1]*wr[1])))-C]};function os(){return g.geoProjection(Pn(Fo)).scale(151.496)}function cl(Xt){var ae=v(Xt),xe=r(Xt),Ae=Zo(Xt);Ae.invert=Zo(-Xt);function je(Ie,Ze){var wr=Ae(Ie,Ze);Ie=wr[0],Ze=wr[1];var Or=v(Ze),Nr=r(Ze),tn=r(Ie),pn=N(ae*Or+xe*Nr*tn),zn=v(pn),Bn=S(zn)>u?pn/zn:1;return[Bn*xe*v(Ie),(S(Ie)>C?Bn:-Bn)*(ae*Nr-xe*Or*tn)]}return je.invert=function(Ie,Ze){var wr=V(Ie*Ie+Ze*Ze),Or=-v(wr),Nr=r(wr),tn=wr*Nr,pn=-Ze*Or,zn=wr*ae,Bn=V(tn*tn+pn*pn-zn*zn),ri=e(tn*zn+pn*Bn,pn*zn-tn*Bn),Di=(wr>C?-1:1)*e(Ie*Or,wr*r(ri)*Nr+Ze*v(ri)*Or);return Ae.invert(Di,ri)},je}function Zo(Xt){var ae=v(Xt),xe=r(Xt);return function(Ae,je){var Ie=r(je),Ze=r(Ae)*Ie,wr=v(Ae)*Ie,Or=v(je);return[e(wr,Ze*xe-Or*ae),O(Or*xe+Ze*ae)]}}function Ks(){var Xt=0,ae=g.geoProjectionMutator(cl),xe=ae(Xt),Ae=xe.rotate,je=xe.stream,Ie=g.geoCircle();return xe.parallel=function(Ze){if(!arguments.length)return Xt*k;var wr=xe.rotate();return ae(Xt=Ze*w).rotate(wr)},xe.rotate=function(Ze){return arguments.length?(Ae.call(xe,[Ze[0],Ze[1]-Xt*k]),Ie.center([-Ze[0],-Ze[1]]),xe):(Ze=Ae.call(xe),Ze[1]+=Xt*k,Ze)},xe.stream=function(Ze){return Ze=je(Ze),Ze.sphere=function(){Ze.polygonStart();var wr=.01,Or=Ie.radius(90-wr)().coordinates[0],Nr=Or.length-1,tn=-1,pn;for(Ze.lineStart();++tn=0;)Ze.point((pn=Or[tn])[0],pn[1]);Ze.lineEnd(),Ze.polygonEnd()},Ze},xe.scale(79.4187).parallel(45).clipAngle(180-.001)}var ss=3,hl=O(1-1/ss)*k,tl=or(0);function Bl(Xt){var ae=hl*w,xe=St(_,ae)[0]-St(-_,ae)[0],Ae=tl(0,ae)[1],je=St(0,ae)[1],Ie=h-je,Ze=p/Xt,wr=4/p,Or=Ae+Ie*Ie*4/p;function Nr(tn,pn){var zn,Bn=S(pn);if(Bn>ae){var ri=s(Xt-1,i(0,n((tn+_)/Ze)));tn+=_*(Xt-1)/Xt-ri*Ze,zn=St(tn,Bn),zn[0]=zn[0]*p/xe-p*(Xt-1)/(2*Xt)+ri*p/Xt,zn[1]=Ae+(zn[1]-je)*4*Ie/p,pn<0&&(zn[1]=-zn[1])}else zn=tl(tn,pn);return zn[0]*=wr,zn[1]/=Or,zn}return Nr.invert=function(tn,pn){tn/=wr,pn*=Or;var zn=S(pn);if(zn>Ae){var Bn=s(Xt-1,i(0,n((tn+_)/Ze)));tn=(tn+_*(Xt-1)/Xt-Bn*Ze)*xe/p;var ri=St.invert(tn,.25*(zn-Ae)*p/Ie+je);return ri[0]-=_*(Xt-1)/Xt-Bn*Ze,pn<0&&(ri[1]=-ri[1]),ri}return tl.invert(tn,pn)},Nr}function cs(Xt,ae){return[Xt,ae&1?90-u:hl]}function Ps(Xt,ae){return[Xt,ae&1?-90+u:-hl]}function Po(Xt){return[Xt[0]*(1-u),Xt[1]]}function Ts(Xt){var ae=[].concat(P.range(-180,180+Xt/2,Xt).map(cs),P.range(180,-180-Xt/2,-Xt).map(Ps));return{type:"Polygon",coordinates:[Xt===180?ae.map(Po):ae]}}function kl(){var Xt=4,ae=g.geoProjectionMutator(Bl),xe=ae(Xt),Ae=xe.stream;return xe.lobes=function(je){return arguments.length?ae(Xt=+je):Xt},xe.stream=function(je){var Ie=xe.rotate(),Ze=Ae(je),wr=(xe.rotate([0,0]),Ae(je));return xe.rotate(Ie),Ze.sphere=function(){g.geoStream(Ts(180/Xt),wr)},Ze},xe.scale(239.75)}function Hl(Xt){var ae=1+Xt,xe=v(1/ae),Ae=O(xe),je=2*V(_/(Ie=_+4*Ae*ae)),Ie,Ze=.5*je*(ae+V(Xt*(2+Xt))),wr=Xt*Xt,Or=ae*ae;function Nr(tn,pn){var zn=1-v(pn),Bn,ri;if(zn&&zn<2){var Di=C-pn,ha=25,ca;do{var wa=v(Di),so=r(Di),Bo=Ae+e(wa,ae-so),Eo=1+Or-2*ae*so;Di-=ca=(Di-wr*Ae-ae*wa+Eo*Bo-.5*zn*Ie)/(2*ae*wa*Bo)}while(S(ca)>b&&--ha>0);Bn=je*V(Eo),ri=tn*Bo/_}else Bn=je*(Xt+zn),ri=tn*Ae/_;return[Bn*v(ri),Ze-Bn*r(ri)]}return Nr.invert=function(tn,pn){var zn=tn*tn+(pn-=Ze)*pn,Bn=(1+Or-zn/(je*je))/(2*ae),ri=N(Bn),Di=v(ri),ha=Ae+e(Di,ae-Bn);return[O(tn/V(zn))*_/ha,O(1-2*(ri-wr*Ae-ae*Di+(1+Or-2*ae*Bn)*ha)/Ie)]},Nr}function Xl(){var Xt=1,ae=g.geoProjectionMutator(Hl),xe=ae(Xt);return xe.ratio=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(167.774).center([0,18.67])}var Us=.7109889596207567,Ca=.0528035274542;function fo(Xt,ae){return ae>-Us?(Xt=se(Xt,ae),Xt[1]+=Ca,Xt):Te(Xt,ae)}fo.invert=function(Xt,ae){return ae>-Us?se.invert(Xt,ae-Ca):Te.invert(Xt,ae)};function qs(){return g.geoProjection(fo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Jl(Xt,ae){return S(ae)>Us?(Xt=se(Xt,ae),Xt[1]-=ae>0?Ca:-Ca,Xt):Te(Xt,ae)}Jl.invert=function(Xt,ae){return S(ae)>Us?se.invert(Xt,ae+(ae>0?Ca:-Ca)):Te.invert(Xt,ae)};function Jo(){return g.geoProjection(Jl).scale(152.63)}function $l(Xt,ae,xe,Ae){var je=V(4*_/(2*xe+(1+Xt-ae/2)*v(2*xe)+(Xt+ae)/2*v(4*xe)+ae/2*v(6*xe))),Ie=V(Ae*v(xe)*V((1+Xt*r(2*xe)+ae*r(4*xe))/(1+Xt+ae))),Ze=xe*Or(1);function wr(pn){return V(1+Xt*r(2*pn)+ae*r(4*pn))}function Or(pn){var zn=pn*xe;return(2*zn+(1+Xt-ae/2)*v(2*zn)+(Xt+ae)/2*v(4*zn)+ae/2*v(6*zn))/xe}function Nr(pn){return wr(pn)*v(pn)}var tn=function(pn,zn){var Bn=xe*Wt(Or,Ze*v(zn)/xe,zn/_);isNaN(Bn)&&(Bn=xe*y(zn));var ri=je*wr(Bn);return[ri*Ie*pn/_*r(Bn),ri/Ie*v(Bn)]};return tn.invert=function(pn,zn){var Bn=Wt(Nr,zn*Ie/je);return[pn*_/(r(Bn)*je*Ie*wr(Bn)),O(xe*Or(Bn/xe)/Ze)]},xe===0&&(je=V(Ae/_),tn=function(pn,zn){return[pn*je,v(zn)/je]},tn.invert=function(pn,zn){return[pn/je,O(zn*je)]}),tn}function ol(){var Xt=1,ae=0,xe=45*w,Ae=2,je=g.geoProjectionMutator($l),Ie=je(Xt,ae,xe,Ae);return Ie.a=function(Ze){return arguments.length?je(Xt=+Ze,ae,xe,Ae):Xt},Ie.b=function(Ze){return arguments.length?je(Xt,ae=+Ze,xe,Ae):ae},Ie.psiMax=function(Ze){return arguments.length?je(Xt,ae,xe=+Ze*w,Ae):xe*k},Ie.ratio=function(Ze){return arguments.length?je(Xt,ae,xe,Ae=+Ze):Ae},Ie.scale(180.739)}function Pl(Xt,ae,xe,Ae,je,Ie,Ze,wr,Or,Nr,tn){if(tn.nanEncountered)return NaN;var pn,zn,Bn,ri,Di,ha,ca,wa,so,Bo;if(pn=xe-ae,zn=Xt(ae+pn*.25),Bn=Xt(xe-pn*.25),isNaN(zn)){tn.nanEncountered=!0;return}if(isNaN(Bn)){tn.nanEncountered=!0;return}return ri=pn*(Ae+4*zn+je)/12,Di=pn*(je+4*Bn+Ie)/12,ha=ri+Di,Bo=(ha-Ze)/15,Nr>Or?(tn.maxDepthCount++,ha+Bo):Math.abs(Bo)>1;do Or[ha]>Bn?Di=ha:ri=ha,ha=ri+Di>>1;while(ha>ri);var ca=Or[ha+1]-Or[ha];return ca&&(ca=(Bn-Or[ha+1])/ca),(ha+1+ca)/Ze}var pn=2*tn(1)/_*Ie/xe,zn=function(Bn,ri){var Di=tn(S(v(ri))),ha=Ae(Di)*Bn;return Di/=pn,[ha,ri>=0?Di:-Di]};return zn.invert=function(Bn,ri){var Di;return ri*=pn,S(ri)<1&&(Di=y(ri)*O(je(S(ri))*Ie)),[Bn/Ae(S(ri)),Di]},zn}function As(){var Xt=0,ae=2.5,xe=1.183136,Ae=g.geoProjectionMutator(lo),je=Ae(Xt,ae,xe);return je.alpha=function(Ie){return arguments.length?Ae(Xt=+Ie,ae,xe):Xt},je.k=function(Ie){return arguments.length?Ae(Xt,ae=+Ie,xe):ae},je.gamma=function(Ie){return arguments.length?Ae(Xt,ae,xe=+Ie):xe},je.scale(152.63)}function zs(Xt,ae){return S(Xt[0]-ae[0])=0;--Or)xe=Xt[1][Or],Ae=xe[0][0],je=xe[0][1],Ie=xe[1][1],Ze=xe[2][0],wr=xe[2][1],ae.push(au([[Ze-u,wr-u],[Ze-u,Ie+u],[Ae+u,Ie+u],[Ae+u,je-u]],30));return{type:"Polygon",coordinates:[P.merge(ae)]}}function rs(Xt,ae,xe){var Ae,je;function Ie(Or,Nr){for(var tn=Nr<0?-1:1,pn=ae[+(Nr<0)],zn=0,Bn=pn.length-1;znpn[zn][2][0];++zn);var ri=Xt(Or-pn[zn][1][0],Nr);return ri[0]+=Xt(pn[zn][1][0],tn*Nr>tn*pn[zn][0][1]?pn[zn][0][1]:Nr)[0],ri}xe?Ie.invert=xe(Ie):Xt.invert&&(Ie.invert=function(Or,Nr){for(var tn=je[+(Nr<0)],pn=ae[+(Nr<0)],zn=0,Bn=tn.length;znri&&(Di=Bn,Bn=ri,ri=Di),[[pn,Bn],[zn,ri]]})}),Ze):ae.map(function(Nr){return Nr.map(function(tn){return[[tn[0][0]*k,tn[0][1]*k],[tn[1][0]*k,tn[1][1]*k],[tn[2][0]*k,tn[2][1]*k]]})})},ae!=null&&Ze.lobes(ae),Ze}var Mu=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Gu(){return rs(te,Mu).scale(160.857)}var bl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Dl(){return rs(Jl,bl).scale(152.63)}var Ql=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function ru(){return rs(se,Ql).scale(169.529)}var oc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function mh(){return rs(se,oc).scale(169.529).rotate([20,0])}var Jc=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function oh(){return rs(fo,Jc,Ht).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Uf=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Cf(){return rs(Te,Uf).scale(152.63).rotate([-20,0])}function Fl(Xt,ae){return[3/p*Xt*V(_*_/3-ae*ae),ae]}Fl.invert=function(Xt,ae){return[p/3*Xt/V(_*_/3-ae*ae),ae]};function Bc(){return g.geoProjection(Fl).scale(158.837)}function Vf(Xt){function ae(xe,Ae){if(S(S(Ae)-C)2)return null;xe/=2,Ae/=2;var Ie=xe*xe,Ze=Ae*Ae,wr=2*Ae/(1+Ie+Ze);return wr=f((1+wr)/(1-wr),1/Xt),[e(2*xe,1-Ie-Ze)/Xt,O((wr-1)/(wr+1))]},ae}function fc(){var Xt=.5,ae=g.geoProjectionMutator(Vf),xe=ae(Xt);return xe.spacing=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(124.75)}var sc=_/A;function dc(Xt,ae){return[Xt*(1+V(r(ae)))/2,ae/(r(ae/2)*r(Xt/6))]}dc.invert=function(Xt,ae){var xe=S(Xt),Ae=S(ae),je=u,Ie=C;Aeu||S(ha)>u)&&--je>0);return je&&[xe,Ae]};function lc(){return g.geoProjection(cu).scale(139.98)}function nl(Xt,ae){return[v(Xt)/r(ae),T(ae)*r(Xt)]}nl.invert=function(Xt,ae){var xe=Xt*Xt,Ae=ae*ae,je=Ae+1,Ie=xe+je,Ze=Xt?E*V((Ie-V(Ie*Ie-4*xe))/xe):1/V(je);return[O(Xt*Ze),y(ae)*N(Ze)]};function Gl(){return g.geoProjection(nl).scale(144.049).clipAngle(90-.001)}function Sh(Xt){var ae=r(Xt),xe=T(M+Xt/2);function Ae(je,Ie){var Ze=Ie-Xt,wr=S(Ze)=0;)tn=Xt[Nr],pn=tn[0]+wr*(Bn=pn)-Or*zn,zn=tn[1]+wr*zn+Or*Bn;return pn=wr*(Bn=pn)-Or*zn,zn=wr*zn+Or*Bn,[pn,zn]}return xe.invert=function(Ae,je){var Ie=20,Ze=Ae,wr=je;do{for(var Or=ae,Nr=Xt[Or],tn=Nr[0],pn=Nr[1],zn=0,Bn=0,ri;--Or>=0;)Nr=Xt[Or],zn=tn+Ze*(ri=zn)-wr*Bn,Bn=pn+Ze*Bn+wr*ri,tn=Nr[0]+Ze*(ri=tn)-wr*pn,pn=Nr[1]+Ze*pn+wr*ri;zn=tn+Ze*(ri=zn)-wr*Bn,Bn=pn+Ze*Bn+wr*ri,tn=Ze*(ri=tn)-wr*pn-Ae,pn=Ze*pn+wr*ri-je;var Di=zn*zn+Bn*Bn,ha,ca;Ze-=ha=(tn*zn+pn*Bn)/Di,wr-=ca=(pn*zn-tn*Bn)/Di}while(S(ha)+S(ca)>u*u&&--Ie>0);if(Ie){var wa=V(Ze*Ze+wr*wr),so=2*t(wa*.5),Bo=v(so);return[e(Ze*Bo,wa*r(so)),wa?O(wr*Bo/wa):0]}},xe}var el=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],$d=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],zl=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ts=[[.9245,0],[0,0],[.01943,0]],lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function lh(){return uc(el,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function ec(){return uc($d,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Hf(){return uc(zl,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Vh(){return uc(ts,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function xf(){return uc(lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function uc(Xt,ae){var xe=g.geoProjection(Id(Xt)).rotate(ae).clipAngle(90),Ae=g.geoRotation(ae),je=xe.center;return delete xe.rotate,xe.center=function(Ie){return arguments.length?je(Ae(Ie)):Ae.invert(je())},xe}var md=V(6),Kf=V(7);function _f(Xt,ae){var xe=O(7*v(ae)/(3*md));return[md*Xt*(2*r(2*xe/3)-1)/Kf,9*v(xe/3)/Kf]}_f.invert=function(Xt,ae){var xe=3*O(ae*Kf/9);return[Xt*Kf/(md*(2*r(2*xe/3)-1)),O(v(xe)*3*md/7)]};function Hh(){return g.geoProjection(_f).scale(164.859)}function Wf(Xt,ae){for(var xe=(1+E)*v(ae),Ae=ae,je=0,Ie;je<25&&(Ae-=Ie=(v(Ae/2)+v(Ae)-xe)/(.5*r(Ae/2)+r(Ae)),!(S(Ie)b&&--Ae>0);return Ie=xe*xe,Ze=Ie*Ie,wr=Ie*Ze,[Xt/(.84719-.13063*Ie+wr*wr*(-.04515+.05494*Ie-.02326*Ze+.00331*wr)),xe]};function gh(){return g.geoProjection(Eh).scale(175.295)}function cc(Xt,ae){return[Xt*(1+r(ae))/2,2*(ae-T(ae/2))]}cc.invert=function(Xt,ae){for(var xe=ae/2,Ae=0,je=1/0;Ae<10&&S(je)>u;++Ae){var Ie=r(ae/2);ae-=je=(ae-T(ae/2)-xe)/(1-.5/(Ie*Ie))}return[2*Xt/(1+r(ae)),ae]};function ef(){return g.geoProjection(cc).scale(152.63)}var Zf=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function tu(){return rs(wt(1/0),Zf).rotate([20,0]).scale(152.63)}function Lf(Xt,ae){var xe=v(ae),Ae=r(ae),je=y(Xt);if(Xt===0||S(ae)===C)return[0,ae];if(ae===0)return[Xt,0];if(S(Xt)===C)return[Xt*Ae,C*xe];var Ie=_/(2*Xt)-2*Xt/_,Ze=2*ae/_,wr=(1-Ze*Ze)/(xe-Ze),Or=Ie*Ie,Nr=wr*wr,tn=1+Or/Nr,pn=1+Nr/Or,zn=(Ie*xe/wr-Ie/2)/tn,Bn=(Nr*xe/Or+wr/2)/pn,ri=zn*zn+Ae*Ae/tn,Di=Bn*Bn-(Nr*xe*xe/Or+wr*xe-1)/pn;return[C*(zn+V(ri)*je),C*(Bn+V(Di<0?0:Di)*y(-ae*Ie)*je)]}Lf.invert=function(Xt,ae){Xt/=C,ae/=C;var xe=Xt*Xt,Ae=ae*ae,je=xe+Ae,Ie=_*_;return[Xt?(je-1+V((1-je)*(1-je)+4*xe))/(2*Xt)*C:0,Wt(function(Ze){return je*(_*v(Ze)-2*Ze)*_+4*Ze*Ze*(ae-v(Ze))+2*_*Ze-Ie*ae},0)]};function Od(){return g.geoProjection(Lf).scale(127.267)}var Jf=1.0148,bf=.23185,Qf=-.14499,Nc=.02406,td=Jf,zu=5*bf,jc=7*Qf,Wh=9*Nc,hu=1.790857183;function Ch(Xt,ae){var xe=ae*ae;return[Xt,ae*(Jf+xe*xe*(bf+xe*(Qf+Nc*xe)))]}Ch.invert=function(Xt,ae){ae>hu?ae=hu:ae<-hu&&(ae=-hu);var xe=ae,Ae;do{var je=xe*xe;xe-=Ae=(xe*(Jf+je*je*(bf+je*(Qf+Nc*je)))-ae)/(td+je*je*(zu+je*(jc+Wh*je)))}while(S(Ae)>u);return[Xt,xe]};function Ec(){return g.geoProjection(Ch).scale(139.319)}function Uc(Xt,ae){if(S(ae)u&&--je>0);return Ze=T(Ae),[(S(ae)=0;)if(Ae=ae[wr],xe[0]===Ae[0]&&xe[1]===Ae[1]){if(Ie)return[Ie,xe];Ie=xe}}}function Qc(Xt){for(var ae=Xt.length,xe=[],Ae=Xt[ae-1],je=0;je0?[-Ae[0],0]:[180-Ae[0],180])};var ae=yh.map(function(xe){return{face:xe,project:Xt(xe)}});return[-1,0,0,1,0,1,4,5].forEach(function(xe,Ae){var je=ae[xe];je&&(je.children||(je.children=[])).push(ae[Ae])}),cf(ae[0],function(xe,Ae){return ae[xe<-_/2?Ae<0?6:4:xe<0?Ae<0?2:0:xe<_/2?Ae<0?3:1:Ae<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function vu(Xt){Xt=Xt||function(Ze){var wr=Ze.length===6?g.geoCentroid({type:"MultiPoint",coordinates:Ze}):Ze[0];return g.geoGnomonic().scale(1).translate([0,0]).rotate([-wr[0],-wr[1]])};var ae=yh.map(function(Ze){for(var wr=Ze.map(rf),Or=wr.length,Nr=wr[Or-1],tn,pn=[],zn=0;znAe^Bn>Ae&&xe<(zn-Nr)*(Ae-tn)/(Bn-tn)+Nr&&(je=!je)}return je}function vc(Xt,ae){var xe=ae.stream,Ae;if(!xe)throw new Error("invalid projection");switch(Xt&&Xt.type){case"Feature":Ae=eh;break;case"FeatureCollection":Ae=ed;break;default:Ae=xh;break}return Ae(Xt,xe)}function ed(Xt,ae){return{type:"FeatureCollection",features:Xt.features.map(function(xe){return eh(xe,ae)})}}function eh(Xt,ae){return{type:"Feature",id:Xt.id,properties:Xt.properties,geometry:xh(Xt.geometry,ae)}}function Ph(Xt,ae){return{type:"GeometryCollection",geometries:Xt.geometries.map(function(xe){return xh(xe,ae)})}}function xh(Xt,ae){if(!Xt)return null;if(Xt.type==="GeometryCollection")return Ph(Xt,ae);var xe;switch(Xt.type){case"Point":xe=_h;break;case"MultiPoint":xe=_h;break;case"LineString":xe=df;break;case"MultiLineString":xe=df;break;case"Polygon":xe=bh;break;case"MultiPolygon":xe=bh;break;case"Sphere":xe=bh;break;default:return null}return g.geoStream(Xt,ae(xe)),xe.result()}var Bu=[],nu=[],_h={point:function(Xt,ae){Bu.push([Xt,ae])},result:function(){var Xt=Bu.length?Bu.length<2?{type:"Point",coordinates:Bu[0]}:{type:"MultiPoint",coordinates:Bu}:null;return Bu=[],Xt}},df={lineStart:$h,point:function(Xt,ae){Bu.push([Xt,ae])},lineEnd:function(){Bu.length&&(nu.push(Bu),Bu=[])},result:function(){var Xt=nu.length?nu.length<2?{type:"LineString",coordinates:nu[0]}:{type:"MultiLineString",coordinates:nu}:null;return nu=[],Xt}},bh={polygonStart:$h,lineStart:$h,point:function(Xt,ae){Bu.push([Xt,ae])},lineEnd:function(){var Xt=Bu.length;if(Xt){do Bu.push(Bu[0].slice());while(++Xt<4);nu.push(Bu),Bu=[]}},polygonEnd:$h,result:function(){if(!nu.length)return null;var Xt=[],ae=[];return nu.forEach(function(xe){kf(xe)?Xt.push([xe]):ae.push(xe)}),ae.forEach(function(xe){var Ae=xe[0];Xt.some(function(je){if(Fd(je[0],Ae))return je.push(xe),!0})||Xt.push([xe])}),nu=[],Xt.length?Xt.length>1?{type:"MultiPolygon",coordinates:Xt}:{type:"Polygon",coordinates:Xt[0]}:null}};function $f(Xt){var ae=Xt(C,0)[0]-Xt(-C,0)[0];function xe(Ae,je){var Ie=S(Ae)0?Ae-_:Ae+_,je),wr=(Ze[0]-Ze[1])*E,Or=(Ze[0]+Ze[1])*E;if(Ie)return[wr,Or];var Nr=ae*E,tn=wr>0^Or>0?-1:1;return[tn*wr-y(Or)*Nr,tn*Or-y(wr)*Nr]}return Xt.invert&&(xe.invert=function(Ae,je){var Ie=(Ae+je)*E,Ze=(je-Ae)*E,wr=S(Ie)<.5*ae&&S(Ze)<.5*ae;if(!wr){var Or=ae*E,Nr=Ie>0^Ze>0?-1:1,tn=-Nr*Ae+(Ze>0?1:-1)*Or,pn=-Nr*je+(Ie>0?1:-1)*Or;Ie=(-tn-pn)*E,Ze=(tn-pn)*E}var zn=Xt.invert(Ie,Ze);return wr||(zn[0]+=Ie>0?_:-_),zn}),g.geoProjection(xe).rotate([-90,-90,45]).clipAngle(180-.001)}function mr(){return $f(Sn).scale(176.423)}function Ur(){return $f(Fo).scale(111.48)}function xn(Xt,ae){if(!(0<=(ae=+ae)&&ae<=20))throw new Error("invalid digits");function xe(Nr){var tn=Nr.length,pn=2,zn=new Array(tn);for(zn[0]=+Nr[0].toFixed(ae),zn[1]=+Nr[1].toFixed(ae);pn2||Bn[0]!=tn[0]||Bn[1]!=tn[1])&&(pn.push(Bn),tn=Bn)}return pn.length===1&&Nr.length>1&&pn.push(xe(Nr[Nr.length-1])),pn}function Ie(Nr){return Nr.map(je)}function Ze(Nr){if(Nr==null)return Nr;var tn;switch(Nr.type){case"GeometryCollection":tn={type:"GeometryCollection",geometries:Nr.geometries.map(Ze)};break;case"Point":tn={type:"Point",coordinates:xe(Nr.coordinates)};break;case"MultiPoint":tn={type:Nr.type,coordinates:Ae(Nr.coordinates)};break;case"LineString":tn={type:Nr.type,coordinates:je(Nr.coordinates)};break;case"MultiLineString":case"Polygon":tn={type:Nr.type,coordinates:Ie(Nr.coordinates)};break;case"MultiPolygon":tn={type:"MultiPolygon",coordinates:Nr.coordinates.map(Ie)};break;default:return Nr}return Nr.bbox!=null&&(tn.bbox=Nr.bbox),tn}function wr(Nr){var tn={type:"Feature",properties:Nr.properties,geometry:Ze(Nr.geometry)};return Nr.id!=null&&(tn.id=Nr.id),Nr.bbox!=null&&(tn.bbox=Nr.bbox),tn}if(Xt!=null)switch(Xt.type){case"Feature":return wr(Xt);case"FeatureCollection":{var Or={type:"FeatureCollection",features:Xt.features.map(wr)};return Xt.bbox!=null&&(Or.bbox=Xt.bbox),Or}default:return Ze(Xt)}return Xt}function un(Xt){var ae=v(Xt);function xe(Ae,je){var Ie=ae?T(Ae*ae/2)/ae:Ae/2;if(!je)return[2*Ie,-Xt];var Ze=2*t(Ie*v(je)),wr=1/T(je);return[v(Ze)*wr,je+(1-r(Ze))*wr-Xt]}return xe.invert=function(Ae,je){if(S(je+=Xt)u&&--wr>0);var zn=Ae*(Nr=T(Ze)),Bn=T(S(je)0?C:-C)*(Or+je*(tn-Ze)/2+je*je*(tn-2*Or+Ze)/2)]}ea.invert=function(Xt,ae){var xe=ae/C,Ae=xe*90,je=s(18,S(Ae/5)),Ie=i(0,n(je));do{var Ze=hi[Ie][1],wr=hi[Ie+1][1],Or=hi[s(19,Ie+2)][1],Nr=Or-Ze,tn=Or-2*wr+Ze,pn=2*(S(xe)-wr)/Nr,zn=tn/Nr,Bn=pn*(1-zn*pn*(1-2*zn*pn));if(Bn>=0||Ie===1){Ae=(ae>=0?5:-5)*(Bn+je);var ri=50,Di;do je=s(18,S(Ae)/5),Ie=n(je),Bn=je-Ie,Ze=hi[Ie][1],wr=hi[Ie+1][1],Or=hi[s(19,Ie+2)][1],Ae-=(Di=(ae>=0?C:-C)*(wr+Bn*(Or-Ze)/2+Bn*Bn*(Or-2*wr+Ze)/2)-ae)*k;while(S(Di)>b&&--ri>0);break}}while(--Ie>=0);var ha=hi[Ie][0],ca=hi[Ie+1][0],wa=hi[s(19,Ie+2)][0];return[Xt/(ca+Bn*(wa-ha)/2+Bn*Bn*(wa-2*ca+ha)/2),Ae*w]};function pa(){return g.geoProjection(ea).scale(152.63)}function Da(Xt){function ae(xe,Ae){var je=r(Ae),Ie=(Xt-1)/(Xt-je*r(xe));return[Ie*je*v(xe),Ie*v(Ae)]}return ae.invert=function(xe,Ae){var je=xe*xe+Ae*Ae,Ie=V(je),Ze=(Xt-V(1-je*(Xt+1)/(Xt-1)))/((Xt-1)/Ie+Ie/(Xt-1));return[e(xe*Ze,Ie*V(1-Ze*Ze)),Ie?O(Ae*Ze/Ie):0]},ae}function $a(Xt,ae){var xe=Da(Xt);if(!ae)return xe;var Ae=r(ae),je=v(ae);function Ie(Ze,wr){var Or=xe(Ze,wr),Nr=Or[1],tn=Nr*je/(Xt-1)+Ae;return[Or[0]*Ae/tn,Nr/tn]}return Ie.invert=function(Ze,wr){var Or=(Xt-1)/(Xt-1-wr*je);return xe.invert(Or*Ze,Or*wr*Ae)},Ie}function la(){var Xt=2,ae=0,xe=g.geoProjectionMutator($a),Ae=xe(Xt,ae);return Ae.distance=function(je){return arguments.length?xe(Xt=+je,ae):Xt},Ae.tilt=function(je){return arguments.length?xe(Xt,ae=je*w):ae*k},Ae.scale(432.147).clipAngle(N(1/Xt)*k-1e-6)}var Pa=1e-4,ba=1e4,Ji=-180,no=Ji+Pa,as=180,Xo=as-Pa,ls=-90,ms=ls+Pa,oo=90,qa=oo-Pa;function vs(Xt){return Xt.length>0}function rl(Xt){return Math.floor(Xt*ba)/ba}function Il(Xt){return Xt===ls||Xt===oo?[0,Xt]:[Ji,rl(Xt)]}function ou(Xt){var ae=Xt[0],xe=Xt[1],Ae=!1;return ae<=no?(ae=Ji,Ae=!0):ae>=Xo&&(ae=as,Ae=!0),xe<=ms?(xe=ls,Ae=!0):xe>=qa&&(xe=oo,Ae=!0),Ae?[ae,xe]:Xt}function Wl(Xt){return Xt.map(ou)}function su(Xt,ae,xe){for(var Ae=0,je=Xt.length;Ae=Xo||tn<=ms||tn>=qa){Ie[Ze]=ou(Or);for(var pn=Ze+1;pnno&&Bnms&&ri=wr)break;xe.push({index:-1,polygon:ae,ring:Ie=Ie.slice(pn-1)}),Ie[0]=Il(Ie[0][1]),Ze=-1,wr=Ie.length}}}}function vl(Xt){var ae,xe=Xt.length,Ae={},je={},Ie,Ze,wr,Or,Nr;for(ae=0;ae0?_-wr:wr)*k],Nr=g.geoProjection(Xt(Ze)).rotate(Or),tn=g.geoRotation(Or),pn=Nr.center;return delete Nr.rotate,Nr.center=function(zn){return arguments.length?pn(tn(zn)):tn.invert(pn())},Nr.clipAngle(90)}function Rl(Xt){var ae=r(Xt);function xe(Ae,je){var Ie=g.geoGnomonicRaw(Ae,je);return Ie[0]*=ae,Ie}return xe.invert=function(Ae,je){return g.geoGnomonicRaw.invert(Ae/ae,je)},xe}function yc(){return Hc([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Hc(Xt,ae){return Yl(Rl,Xt,ae)}function zc(Xt){if(!(Xt*=2))return g.geoAzimuthalEquidistantRaw;var ae=-Xt/2,xe=-ae,Ae=Xt*Xt,je=T(xe),Ie=.5/v(xe);function Ze(wr,Or){var Nr=N(r(Or)*r(wr-ae)),tn=N(r(Or)*r(wr-xe)),pn=Or<0?-1:1;return Nr*=Nr,tn*=tn,[(Nr-tn)/(2*Xt),pn*V(4*Ae*tn-(Ae-Nr+tn)*(Ae-Nr+tn))/(2*Xt)]}return Ze.invert=function(wr,Or){var Nr=Or*Or,tn=r(V(Nr+(zn=wr+ae)*zn)),pn=r(V(Nr+(zn=wr+xe)*zn)),zn,Bn;return[e(Bn=tn-pn,zn=(tn+pn)*je),(Or<0?-1:1)*N(V(zn*zn+Bn*Bn)*Ie)]},Ze}function zh(){return Wc([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Wc(Xt,ae){return Yl(zc,Xt,ae)}function Ih(Xt,ae){if(S(ae)u&&--wr>0);return[y(Xt)*(V(je*je+4)+je)*_/4,C*Ze]};function Gf(){return g.geoProjection(Zu).scale(127.16)}function qt(Xt,ae,xe,Ae,je){function Ie(Ze,wr){var Or=xe*v(Ae*wr),Nr=V(1-Or*Or),tn=V(2/(1+Nr*r(Ze*=je)));return[Xt*Nr*tn*v(Ze),ae*Or*tn]}return Ie.invert=function(Ze,wr){var Or=Ze/Xt,Nr=wr/ae,tn=V(Or*Or+Nr*Nr),pn=2*O(tn/2);return[e(Ze*T(pn),Xt*tn)/je,tn&&O(wr*v(pn)/(ae*xe*tn))/Ae]},Ie}function I(Xt,ae,xe,Ae){var je=_/3;Xt=i(Xt,u),ae=i(ae,u),Xt=s(Xt,C),ae=s(ae,_-u),xe=i(xe,0),xe=s(xe,100-u),Ae=i(Ae,u);var Ie=xe/100+1,Ze=Ae/100,wr=N(Ie*r(je))/je,Or=v(Xt)/v(wr*C),Nr=ae/_,tn=V(Ze*v(Xt/2)/v(ae/2)),pn=tn/V(Nr*Or*wr),zn=1/(tn*V(Nr*Or*wr));return qt(pn,zn,Or,wr,Nr)}function ht(){var Xt=65*w,ae=60*w,xe=20,Ae=200,je=g.geoProjectionMutator(I),Ie=je(Xt,ae,xe,Ae);return Ie.poleline=function(Ze){return arguments.length?je(Xt=+Ze*w,ae,xe,Ae):Xt*k},Ie.parallels=function(Ze){return arguments.length?je(Xt,ae=+Ze*w,xe,Ae):ae*k},Ie.inflation=function(Ze){return arguments.length?je(Xt,ae,xe=+Ze,Ae):xe},Ie.ratio=function(Ze){return arguments.length?je(Xt,ae,xe,Ae=+Ze):Ae},Ie.scale(163.775)}function Et(){return ht().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var It=4*_+3*V(3),Vt=2*V(2*_*V(3)/It),ke=de(Vt*V(3)/_,Vt,It/6);function De(){return g.geoProjection(ke).scale(176.84)}function Ke(Xt,ae){return[Xt*V(1-3*ae*ae/(_*_)),ae]}Ke.invert=function(Xt,ae){return[Xt/V(1-3*ae*ae/(_*_)),ae]};function gr(){return g.geoProjection(Ke).scale(152.63)}function Dr(Xt,ae){var xe=r(ae),Ae=r(Xt)*xe,je=1-Ae,Ie=r(Xt=e(v(Xt)*xe,-v(ae))),Ze=v(Xt);return xe=V(1-Ae*Ae),[Ze*xe-Ie*je,-Ie*xe-Ze*je]}Dr.invert=function(Xt,ae){var xe=(Xt*Xt+ae*ae)/-2,Ae=V(-xe*(2+xe)),je=ae*xe+Xt*Ae,Ie=Xt*xe-ae*Ae,Ze=V(Ie*Ie+je*je);return[e(Ae*je,Ze*(1+xe)),Ze?-O(Ae*Ie/Ze):0]};function Fr(){return g.geoProjection(Dr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function ln(Xt,ae){var xe=yt(Xt,ae);return[(xe[0]+Xt/C)/2,(xe[1]+ae)/2]}ln.invert=function(Xt,ae){var xe=Xt,Ae=ae,je=25;do{var Ie=r(Ae),Ze=v(Ae),wr=v(2*Ae),Or=Ze*Ze,Nr=Ie*Ie,tn=v(xe),pn=r(xe/2),zn=v(xe/2),Bn=zn*zn,ri=1-Nr*pn*pn,Di=ri?N(Ie*pn)*V(ha=1/ri):ha=0,ha,ca=.5*(2*Di*Ie*zn+xe/C)-Xt,wa=.5*(Di*Ze+Ae)-ae,so=.5*ha*(Nr*Bn+Di*Ie*pn*Or)+.5/C,Bo=ha*(tn*wr/4-Di*Ze*zn),Eo=.125*ha*(wr*zn-Di*Ze*Nr*tn),ds=.5*ha*(Or*pn+Di*Bn*Ie)+.5,dl=Bo*Eo-ds*so,yl=(wa*Bo-ca*ds)/dl,Fs=(ca*Eo-wa*so)/dl;xe-=yl,Ae-=Fs}while((S(yl)>u||S(Fs)>u)&&--je>0);return[xe,Ae]};function Mn(){return g.geoProjection(ln).scale(158.837)}c.geoNaturalEarth=g.geoNaturalEarth1,c.geoNaturalEarthRaw=g.geoNaturalEarth1Raw,c.geoAiry=lt,c.geoAiryRaw=X,c.geoAitoff=pt,c.geoAitoffRaw=yt,c.geoArmadillo=tt,c.geoArmadilloRaw=st,c.geoAugust=rt,c.geoAugustRaw=dt,c.geoBaker=Y,c.geoBakerRaw=it,c.geoBerghaus=ut,c.geoBerghausRaw=ft,c.geoBertin1953=ge,c.geoBertin1953Raw=Jt,c.geoBoggs=ve,c.geoBoggsRaw=te,c.geoBonne=cr,c.geoBonneRaw=Ge,c.geoBottomley=jr,c.geoBottomleyRaw=ur,c.geoBromley=br,c.geoBromleyRaw=Hr,c.geoChamberlin=gt,c.geoChamberlinRaw=Gt,c.geoChamberlinAfrica=Ct,c.geoCollignon=Nt,c.geoCollignonRaw=St,c.geoCraig=le,c.geoCraigRaw=re,c.geoCraster=qe,c.geoCrasterRaw=Ue,c.geoCylindricalEqualArea=Ar,c.geoCylindricalEqualAreaRaw=or,c.geoCylindricalStereographic=pr,c.geoCylindricalStereographicRaw=Tr,c.geoEckert1=Vn,c.geoEckert1Raw=Jr,c.geoEckert2=Kn,c.geoEckert2Raw=Hn,c.geoEckert3=ii,c.geoEckert3Raw=Ci,c.geoEckert4=aa,c.geoEckert4Raw=qn,c.geoEckert5=We,c.geoEckert5Raw=Vi,c.geoEckert6=fr,c.geoEckert6Raw=rr,c.geoEisenlohr=Cn,c.geoEisenlohrRaw=Qr,c.geoFahey=ci,c.geoFaheyRaw=An,c.geoFoucaut=Li,c.geoFoucautRaw=xi,c.geoFoucautSinusoidal=Zi,c.geoFoucautSinusoidalRaw=Oi,c.geoGilbert=Wa,c.geoGingery=qr,c.geoGingeryRaw=ze,c.geoGinzburg4=Gr,c.geoGinzburg4Raw=Br,c.geoGinzburg5=an,c.geoGinzburg5Raw=fn,c.geoGinzburg6=dr,c.geoGinzburg6Raw=Ee,c.geoGinzburg8=vn,c.geoGinzburg8Raw=Vr,c.geoGinzburg9=Xn,c.geoGinzburg9Raw=Fn,c.geoGringorten=Ri,c.geoGringortenRaw=Sn,c.geoGuyou=os,c.geoGuyouRaw=Fo,c.geoHammer=Pt,c.geoHammerRaw=wt,c.geoHammerRetroazimuthal=Ks,c.geoHammerRetroazimuthalRaw=cl,c.geoHealpix=kl,c.geoHealpixRaw=Bl,c.geoHill=Xl,c.geoHillRaw=Hl,c.geoHomolosine=Jo,c.geoHomolosineRaw=Jl,c.geoHufnagel=ol,c.geoHufnagelRaw=$l,c.geoHyperelliptical=As,c.geoHyperellipticalRaw=lo,c.geoInterrupt=rs,c.geoInterruptedBoggs=Gu,c.geoInterruptedHomolosine=Dl,c.geoInterruptedMollweide=ru,c.geoInterruptedMollweideHemispheres=mh,c.geoInterruptedSinuMollweide=oh,c.geoInterruptedSinusoidal=Cf,c.geoKavrayskiy7=Bc,c.geoKavrayskiy7Raw=Fl,c.geoLagrange=fc,c.geoLagrangeRaw=Vf,c.geoLarrivee=sh,c.geoLarriveeRaw=dc,c.geoLaskowski=lc,c.geoLaskowskiRaw=cu,c.geoLittrow=Gl,c.geoLittrowRaw=nl,c.geoLoximuthal=Pc,c.geoLoximuthalRaw=Sh,c.geoMiller=xu,c.geoMillerRaw=Uh,c.geoModifiedStereographic=uc,c.geoModifiedStereographicRaw=Id,c.geoModifiedStereographicAlaska=lh,c.geoModifiedStereographicGs48=ec,c.geoModifiedStereographicGs50=Hf,c.geoModifiedStereographicMiller=Vh,c.geoModifiedStereographicLee=xf,c.geoMollweide=Tt,c.geoMollweideRaw=se,c.geoMtFlatPolarParabolic=Hh,c.geoMtFlatPolarParabolicRaw=_f,c.geoMtFlatPolarQuartic=qf,c.geoMtFlatPolarQuarticRaw=Wf,c.geoMtFlatPolarSinusoidal=Xf,c.geoMtFlatPolarSinusoidalRaw=uh,c.geoNaturalEarth2=gh,c.geoNaturalEarth2Raw=Eh,c.geoNellHammer=ef,c.geoNellHammerRaw=cc,c.geoInterruptedQuarticAuthalic=tu,c.geoNicolosi=Od,c.geoNicolosiRaw=Lf,c.geoPatterson=Ec,c.geoPattersonRaw=Ch,c.geoPolyconic=_u,c.geoPolyconicRaw=Uc,c.geoPolyhedral=cf,c.geoPolyhedralButterfly=bu,c.geoPolyhedralCollignon=gd,c.geoPolyhedralWaterman=vu,c.geoProject=vc,c.geoGringortenQuincuncial=mr,c.geoPeirceQuincuncial=Ur,c.geoPierceQuincuncial=Ur,c.geoQuantize=xn,c.geoQuincuncial=$f,c.geoRectangularPolyconic=Wn,c.geoRectangularPolyconicRaw=un,c.geoRobinson=pa,c.geoRobinsonRaw=ea,c.geoSatellite=la,c.geoSatelliteRaw=$a,c.geoSinuMollweide=qs,c.geoSinuMollweideRaw=fo,c.geoSinusoidal=He,c.geoSinusoidalRaw=Te,c.geoStitch=fu,c.geoTimes=Es,c.geoTimesRaw=Oo,c.geoTwoPointAzimuthal=Hc,c.geoTwoPointAzimuthalRaw=Rl,c.geoTwoPointAzimuthalUsa=yc,c.geoTwoPointEquidistant=Wc,c.geoTwoPointEquidistantRaw=zc,c.geoTwoPointEquidistantUsa=zh,c.geoVanDerGrinten=Iu,c.geoVanDerGrintenRaw=Ih,c.geoVanDerGrinten2=is,c.geoVanDerGrinten2Raw=Oh,c.geoVanDerGrinten3=qc,c.geoVanDerGrinten3Raw=Os,c.geoVanDerGrinten4=Gf,c.geoVanDerGrinten4Raw=Zu,c.geoWagner=ht,c.geoWagner7=Et,c.geoWagnerRaw=I,c.geoWagner4=De,c.geoWagner4Raw=ke,c.geoWagner6=gr,c.geoWagner6Raw=Ke,c.geoWiechel=Fr,c.geoWiechelRaw=Dr,c.geoWinkel3=Mn,c.geoWinkel3Raw=ln,Object.defineProperty(c,"__esModule",{value:!0})})}),EU=Ft((Q,$)=>{var c=En(),g=_n(),P=Qo(),S=Math.PI/180,t=180/Math.PI,e={cursor:"pointer"},r={cursor:"auto"};function a(k,w){var R=k.projection,O;return w._isScoped?O=i:w._isClipped?O=f:O=s,O(k,R)}$.exports=a;function n(k,w){return c.behavior.zoom().translate(w.translate()).scale(w.scale())}function o(k,w,R){var O=k.id,N=k.graphDiv,V=N.layout,H=V[O],F=N._fullLayout,U=F[O],W={},q={};function X(lt,yt){W[O+"."+lt]=g.nestedProperty(H,lt).get(),P.call("_storeDirectGUIEdit",V,F._preGUI,W);var pt=g.nestedProperty(U,lt);pt.get()!==yt&&(pt.set(yt),g.nestedProperty(H,lt).set(yt),q[O+"."+lt]=yt)}R(X),X("projection.scale",w.scale()/k.fitScale),X("fitbounds",!1),N.emit("plotly_relayout",q)}function i(k,w){var R=n(k,w);function O(){c.select(this).style(e)}function N(){w.scale(c.event.scale).translate(c.event.translate),k.render(!0);var F=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function V(F){var U=w.invert(k.midPt);F("center.lon",U[0]),F("center.lat",U[1])}function H(){c.select(this).style(r),o(k,w,V)}return R.on("zoomstart",O).on("zoom",N).on("zoomend",H),R}function s(k,w){var R=n(k,w),O=2,N,V,H,F,U,W,q,X,lt;function yt(at){return w.invert(at)}function pt(at){var vt=yt(at);if(!vt)return!0;var it=w(vt);return Math.abs(it[0]-at[0])>O||Math.abs(it[1]-at[1])>O}function st(){c.select(this).style(e),N=c.mouse(this),V=w.rotate(),H=w.translate(),F=V,U=yt(N)}function tt(){if(W=c.mouse(this),pt(N)){R.scale(w.scale()),R.translate(w.translate());return}w.scale(c.event.scale),w.translate([H[0],c.event.translate[1]]),U?yt(W)&&(X=yt(W),q=[F[0]+(X[0]-U[0]),V[1],V[2]],w.rotate(q),F=q):(N=W,U=yt(N)),lt=!0,k.render(!0);var at=w.rotate(),vt=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":vt[0],"geo.center.lat":vt[1],"geo.projection.rotation.lon":-at[0]})}function dt(){c.select(this).style(r),lt&&o(k,w,rt)}function rt(at){var vt=w.rotate(),it=w.invert(k.midPt);at("projection.rotation.lon",-vt[0]),at("center.lon",it[0]),at("center.lat",it[1])}return R.on("zoomstart",st).on("zoom",tt).on("zoomend",dt),R}function f(k,w){w.rotate(),w.scale();var R=n(k,w),O=p(R,"zoomstart","zoom","zoomend"),N=0,V=R.on,H;R.on("zoomstart",function(){c.select(this).style(e);var X=c.mouse(this),lt=w.rotate(),yt=lt,pt=w.translate(),st=y(lt);H=x(w,X),V.call(R,"zoom",function(){var tt=c.mouse(this);if(w.scale(c.event.scale),!H)X=tt,H=x(w,X);else if(x(w,tt)){w.rotate(lt).translate(pt);var dt=x(w,tt),rt=T(H,dt),at=M(v(st,rt)),vt=u(at,H,yt);(!isFinite(vt[0])||!isFinite(vt[1])||!isFinite(vt[2]))&&(vt=yt),w.rotate(vt),yt=vt}U(O.of(this,arguments))}),F(O.of(this,arguments))}).on("zoomend",function(){c.select(this).style(r),V.call(R,"zoom",null),W(O.of(this,arguments)),o(k,w,q)}).on("zoom.redraw",function(){k.render(!0);var X=w.rotate();k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.projection.rotation.lon":-X[0],"geo.projection.rotation.lat":-X[1]})});function F(X){N++||X({type:"zoomstart"})}function U(X){X({type:"zoom"})}function W(X){--N||X({type:"zoomend"})}function q(X){var lt=w.rotate();X("projection.rotation.lon",-lt[0]),X("projection.rotation.lat",-lt[1])}return c.rebind(R,O,"on")}function x(k,w){var R=k.invert(w);return R&&isFinite(R[0])&&isFinite(R[1])&&E(R)}function y(k){var w=.5*k[0]*S,R=.5*k[1]*S,O=.5*k[2]*S,N=Math.sin(w),V=Math.cos(w),H=Math.sin(R),F=Math.cos(R),U=Math.sin(O),W=Math.cos(O);return[V*F*W+N*H*U,N*F*W-V*H*U,V*H*W+N*F*U,V*F*U-N*H*W]}function v(k,w){var R=k[0],O=k[1],N=k[2],V=k[3],H=w[0],F=w[1],U=w[2],W=w[3];return[R*H-O*F-N*U-V*W,R*F+O*H+N*W-V*U,R*U-O*W+N*H+V*F,R*W+O*U-N*F+V*H]}function T(k,w){if(!(!k||!w)){var R=h(k,w),O=Math.sqrt(A(R,R)),N=.5*Math.acos(Math.max(-1,Math.min(1,A(k,w)))),V=Math.sin(N)/O;return O&&[Math.cos(N),R[2]*V,-R[1]*V,R[0]*V]}}function u(k,w,R){var O=C(w,2,k[0]);O=C(O,1,k[1]),O=C(O,0,k[2]-R[2]);var N=w[0],V=w[1],H=w[2],F=O[0],U=O[1],W=O[2],q=Math.atan2(V,N)*t,X=Math.sqrt(N*N+V*V),lt,yt;Math.abs(U)>X?(yt=(U>0?90:-90)-q,lt=0):(yt=Math.asin(U/X)*t-q,lt=Math.sqrt(X*X-U*U));var pt=180-yt-2*q,st=(Math.atan2(W,F)-Math.atan2(H,lt))*t,tt=(Math.atan2(W,F)-Math.atan2(H,-lt))*t,dt=b(R[0],R[1],yt,st),rt=b(R[0],R[1],pt,tt);return dt<=rt?[yt,st,R[2]]:[pt,tt,R[2]]}function b(k,w,R,O){var N=_(R-k),V=_(O-w);return Math.sqrt(N*N+V*V)}function _(k){return(k%360+540)%360-180}function C(k,w,R){var O=R*S,N=k.slice(),V=w===0?1:0,H=w===2?1:2,F=Math.cos(O),U=Math.sin(O);return N[V]=k[V]*F-k[H]*U,N[H]=k[H]*F+k[V]*U,N}function M(k){return[Math.atan2(2*(k[0]*k[1]+k[2]*k[3]),1-2*(k[1]*k[1]+k[2]*k[2]))*t,Math.asin(Math.max(-1,Math.min(1,2*(k[0]*k[2]-k[3]*k[1]))))*t,Math.atan2(2*(k[0]*k[3]+k[1]*k[2]),1-2*(k[2]*k[2]+k[3]*k[3]))*t]}function E(k){var w=k[0]*S,R=k[1]*S,O=Math.cos(R);return[O*Math.cos(w),O*Math.sin(w),Math.sin(R)]}function A(k,w){for(var R=0,O=0,N=k.length;O{var c=En(),g=xS(),P=g.geoPath,S=g.geoDistance,t=SU(),e=Qo(),r=_n(),a=r.strTranslate,n=ui(),o=Vs(),i=Qh(),s=Kc(),f=Ls(),x=J0().getAutoRange,y=hp(),v=yf().prepSelect,T=yf().clearOutline,u=yf().selectOnClick,b=EU(),_=x3(),C=W1(),M=Gk(),E=gS().feature;function A(R){this.id=R.id,this.graphDiv=R.graphDiv,this.container=R.container,this.topojsonURL=R.topojsonURL,this.isStatic=R.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var h=A.prototype;$.exports=function(R){return new A(R)},h.plot=function(R,O,N,V){var H=this;if(V)return H.update(R,O,!0);H._geoCalcData=R,H._fullLayout=O;var F=O[this.id],U=[],W=!1;for(var q in _.layerNameToAdjective)if(q!=="frame"&&F["show"+q]){W=!0;break}for(var X=!1,lt=0;lt0&&U._module.calcGeoJSON(F,O)}if(!N){var W=this.updateProjection(R,O);if(W)return;(!this.viewInitial||this.scope!==V.scope)&&this.saveViewInitial(V)}this.scope=V.scope,this.updateBaseLayers(O,V),this.updateDims(O,V),this.updateFx(O,V),s.generalUpdatePerTraceModule(this.graphDiv,this,R,V);var q=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=q.selectAll(".point"),this.dataPoints.text=q.selectAll("text"),this.dataPaths.line=q.selectAll(".js-line");var X=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=X.selectAll("path"),this._render()},h.updateProjection=function(R,O){var N=this.graphDiv,V=O[this.id],H=O._size,F=V.domain,U=V.projection,W=V.lonaxis,q=V.lataxis,X=W._ax,lt=q._ax,yt=this.projection=p(V),pt=[[H.l+H.w*F.x[0],H.t+H.h*(1-F.y[1])],[H.l+H.w*F.x[1],H.t+H.h*(1-F.y[0])]],st=V.center||{},tt=U.rotation||{},dt=W.range||[],rt=q.range||[];if(V.fitbounds){X._length=pt[1][0]-pt[0][0],lt._length=pt[1][1]-pt[0][1],X.range=x(N,X),lt.range=x(N,lt);var at=(X.range[0]+X.range[1])/2,vt=(lt.range[0]+lt.range[1])/2;if(V._isScoped)st={lon:at,lat:vt};else if(V._isClipped){st={lon:at,lat:vt},tt={lon:at,lat:vt,roll:tt.roll};var it=U.type,Y=_.lonaxisSpan[it]/2||180,ft=_.lataxisSpan[it]/2||90;dt=[at-Y,at+Y],rt=[vt-ft,vt+ft]}else st={lon:at,lat:vt},tt={lon:at,lat:tt.lat,roll:tt.roll}}yt.center([st.lon-tt.lon,st.lat-tt.lat]).rotate([-tt.lon,-tt.lat,tt.roll]).parallels(U.parallels);var ut=w(dt,rt);yt.fitExtent(pt,ut);var wt=this.bounds=yt.getBounds(ut),zt=this.fitScale=yt.scale(),Pt=yt.translate();if(V.fitbounds){var Wt=yt.getBounds(w(X.range,lt.range)),Ht=Math.min((wt[1][0]-wt[0][0])/(Wt[1][0]-Wt[0][0]),(wt[1][1]-wt[0][1])/(Wt[1][1]-Wt[0][1]));isFinite(Ht)?yt.scale(Ht*zt):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else yt.scale(U.scale*zt);var Jt=this.midPt=[(wt[0][0]+wt[1][0])/2,(wt[0][1]+wt[1][1])/2];if(yt.translate([Pt[0]+(Jt[0]-Pt[0]),Pt[1]+(Jt[1]-Pt[1])]).clipExtent(wt),V._isAlbersUsa){var ge=yt([st.lon,st.lat]),he=yt.translate();yt.translate([he[0]-(ge[0]-he[0]),he[1]-(ge[1]-he[1])])}},h.updateBaseLayers=function(R,O){var N=this,V=N.topojson,H=N.layers,F=N.basePaths;function U(pt){return pt==="lonaxis"||pt==="lataxis"}function W(pt){return!!_.lineLayers[pt]}function q(pt){return!!_.fillLayers[pt]}var X=this.hasChoropleth?_.layersForChoropleth:_.layers,lt=X.filter(function(pt){return W(pt)||q(pt)?O["show"+pt]:U(pt)?O[pt].showgrid:!0}),yt=N.framework.selectAll(".layer").data(lt,String);yt.exit().each(function(pt){delete H[pt],delete F[pt],c.select(this).remove()}),yt.enter().append("g").attr("class",function(pt){return"layer "+pt}).each(function(pt){var st=H[pt]=c.select(this);pt==="bg"?N.bgRect=st.append("rect").style("pointer-events","all"):U(pt)?F[pt]=st.append("path").style("fill","none"):pt==="backplot"?st.append("g").classed("choroplethlayer",!0):pt==="frontplot"?st.append("g").classed("scatterlayer",!0):W(pt)?F[pt]=st.append("path").style("fill","none").style("stroke-miterlimit",2):q(pt)&&(F[pt]=st.append("path").style("stroke","none"))}),yt.order(),yt.each(function(pt){var st=F[pt],tt=_.layerNameToAdjective[pt];pt==="frame"?st.datum(_.sphereSVG):W(pt)||q(pt)?st.datum(E(V,V.objects[pt])):U(pt)&&st.datum(k(pt,O,R)).call(n.stroke,O[pt].gridcolor).call(o.dashLine,O[pt].griddash,O[pt].gridwidth),W(pt)?st.call(n.stroke,O[tt+"color"]).call(o.dashLine,"",O[tt+"width"]):q(pt)&&st.call(n.fill,O[tt+"color"])})},h.updateDims=function(R,O){var N=this.bounds,V=(O.framewidth||0)/2,H=N[0][0]-V,F=N[0][1]-V,U=N[1][0]-H+V,W=N[1][1]-F+V;o.setRect(this.clipRect,H,F,U,W),this.bgRect.call(o.setRect,H,F,U,W).call(n.fill,O.bgcolor),this.xaxis._offset=H,this.xaxis._length=U,this.yaxis._offset=F,this.yaxis._length=W},h.updateFx=function(R,O){var N=this,V=N.graphDiv,H=N.bgRect,F=R.dragmode,U=R.clickmode;if(N.isStatic)return;function W(){var yt=N.viewInitial,pt={};for(var st in yt)pt[N.id+"."+st]=yt[st];e.call("_guiRelayout",V,pt),V.emit("plotly_doubleclick",null)}function q(yt){return N.projection.invert([yt[0]+N.xaxis._offset,yt[1]+N.yaxis._offset])}var X=function(yt,pt){if(pt.isRect){var st=yt.range={};st[N.id]=[q([pt.xmin,pt.ymin]),q([pt.xmax,pt.ymax])]}else{var tt=yt.lassoPoints={};tt[N.id]=pt.map(q)}},lt={element:N.bgRect.node(),gd:V,plotinfo:{id:N.id,xaxis:N.xaxis,yaxis:N.yaxis,fillRangeItems:X},xaxes:[N.xaxis],yaxes:[N.yaxis],subplot:N.id,clickFn:function(yt){yt===2&&T(V)}};F==="pan"?(H.node().onmousedown=null,H.call(b(N,O)),H.on("dblclick.zoom",W),V._context._scrollZoom.geo||H.on("wheel.zoom",null)):(F==="select"||F==="lasso")&&(H.on(".zoom",null),lt.prepFn=function(yt,pt,st){v(yt,pt,st,lt,F)},y.init(lt)),H.on("mousemove",function(){var yt=N.projection.invert(r.getPositionFromD3Event());if(!yt)return y.unhover(V,c.event);N.xaxis.p2c=function(){return yt[0]},N.yaxis.p2c=function(){return yt[1]},i.hover(V,c.event,N.id)}),H.on("mouseout",function(){V._dragging||y.unhover(V,c.event)}),H.on("click",function(){F!=="select"&&F!=="lasso"&&(U.indexOf("select")>-1&&u(c.event,V,[N.xaxis],[N.yaxis],N.id,lt),U.indexOf("event")>-1&&i.click(V,c.event))})},h.makeFramework=function(){var R=this,O=R.graphDiv,N=O._fullLayout,V="clip"+N._uid+R.id;R.clipDef=N._clips.append("clipPath").attr("id",V),R.clipRect=R.clipDef.append("rect"),R.framework=c.select(R.container).append("g").attr("class","geo "+R.id).call(o.setClipUrl,V,O),R.project=function(H){var F=R.projection(H);return F?[F[0]-R.xaxis._offset,F[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(H){return R.project(H)[0]}},R.yaxis={_id:"y",c2p:function(H){return R.project(H)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(R.mockAxis,N)},h.saveViewInitial=function(R){var O=R.center||{},N=R.projection,V=N.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":N.scale};var H;R._isScoped?H={"center.lon":O.lon,"center.lat":O.lat}:R._isClipped?H={"projection.rotation.lon":V.lon,"projection.rotation.lat":V.lat}:H={"center.lon":O.lon,"center.lat":O.lat,"projection.rotation.lon":V.lon},r.extendFlat(this.viewInitial,H)},h.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},h._render=function(){var R=this.projection,O=R.getPath(),N;function V(F){var U=R(F.lonlat);return U?a(U[0],U[1]):null}function H(F){return R.isLonLatOverEdges(F.lonlat)?"none":null}for(N in this.basePaths)this.basePaths[N].attr("d",O);for(N in this.dataPaths)this.dataPaths[N].attr("d",function(F){return O(F.geojson)});for(N in this.dataPoints)this.dataPoints[N].attr("display",H).attr("transform",V)};function p(R){var O=R.projection,N=O.type,V=_.projNames[N];V="geo"+r.titleCase(V);for(var H=g[V]||t[V],F=H(),U=R._isSatellite?Math.acos(1/O.distance)*180/Math.PI:R._isClipped?_.lonaxisSpan[N]/2:null,W=["center","rotate","parallels","clipExtent"],q=function(yt){return yt?F:[]},X=0;Xtt}else return!1},F.getPath=function(){return P().projection(F)},F.getBounds=function(yt){return F.getPath().bounds(yt)},F.precision(_.precision),R._isSatellite&&F.tilt(O.tilt).distance(O.distance),U&&F.clipAngle(U-_.clipPad),F}function k(R,O,N){var V=1e-6,H=2.5,F=O[R],U=_.scopeDefaults[O.scope],W,q,X;R==="lonaxis"?(W=U.lonaxisRange,q=U.lataxisRange,X=function(vt,it){return[vt,it]}):R==="lataxis"&&(W=U.lataxisRange,q=U.lonaxisRange,X=function(vt,it){return[it,vt]});var lt={type:"linear",range:[W[0],W[1]-V],tick0:F.tick0,dtick:F.dtick};f.setConvert(lt,N);var yt=f.calcTicks(lt);!O.isScoped&&R==="lonaxis"&&yt.pop();for(var pt=yt.length,st=new Array(pt),tt=0;tt0&&H<0&&(H+=360);var W=(H-V)/4;return{type:"Polygon",coordinates:[[[V,F],[V,U],[V+W,U],[V+2*W,U],[V+3*W,U],[H,U],[H,F],[H-W,F],[H-2*W,F],[H-3*W,F],[V,F]]]}}}),_S=Ft((Q,$)=>{var c=yi(),g=jh().attributes,P=Ed().dash,S=x3(),t=Yc().overrideAll,e=X0(),r={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:c.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:P},a=$.exports=t({domain:g({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:e(S.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:e(S.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:c.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:S.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:S.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:S.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:S.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:c.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:c.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:c.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:c.background},lonaxis:r,lataxis:r},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}),LU=Ft((Q,$)=>{var c=_n(),g=I1(),P=dd().getSubplotData,S=x3(),t=_S(),e=S.axesNames;$.exports=function(a,n,o){g(a,n,o,{type:"geo",attributes:t,handleDefaults:r,fullData:o,partition:"y"})};function r(a,n,o,i){var s=P(i.fullData,"geo",i.id),f=s.map(function(rt){return rt.index}),x=o("resolution"),y=o("scope"),v=S.scopeDefaults[y],T=o("projection.type",v.projType),u=n._isAlbersUsa=T==="albers usa";u&&(y=n.scope="usa");var b=n._isScoped=y!=="world",_=n._isSatellite=T==="satellite",C=n._isConic=T.indexOf("conic")!==-1||T==="albers",M=n._isClipped=!!S.lonaxisSpan[T];if(a.visible===!1){var E=c.extendDeep({},n._template);E.showcoastlines=!1,E.showcountries=!1,E.showframe=!1,E.showlakes=!1,E.showland=!1,E.showocean=!1,E.showrivers=!1,E.showsubunits=!1,E.lonaxis&&(E.lonaxis.showgrid=!1),E.lataxis&&(E.lataxis.showgrid=!1),n._template=E}for(var A=o("visible"),h,p=0;p0&&q<0&&(q+=360);var X=(W+q)/2,lt;if(!u){var yt=b?v.projRotate:[X,0,0];lt=o("projection.rotation.lon",yt[0]),o("projection.rotation.lat",yt[1]),o("projection.rotation.roll",yt[2]),h=o("showcoastlines",!b&&A),h&&(o("coastlinecolor"),o("coastlinewidth")),h=o("showocean",A?void 0:!1),h&&o("oceancolor")}var pt,st;if(u?(pt=-96.6,st=38.7):(pt=b?X:lt,st=(U[0]+U[1])/2),o("center.lon",pt),o("center.lat",st),_&&(o("projection.tilt"),o("projection.distance")),C){var tt=v.projParallels||[0,60];o("projection.parallels",tt)}o("projection.scale"),h=o("showland",A?void 0:!1),h&&o("landcolor"),h=o("showlakes",A?void 0:!1),h&&o("lakecolor"),h=o("showrivers",A?void 0:!1),h&&(o("rivercolor"),o("riverwidth")),h=o("showcountries",b&&y!=="usa"&&A),h&&(o("countrycolor"),o("countrywidth")),(y==="usa"||y==="north america"&&x===50)&&(o("showsubunits",A),o("subunitcolor"),o("subunitwidth")),b||(h=o("showframe",A),h&&(o("framecolor"),o("framewidth"))),o("bgcolor");var dt=o("fitbounds");dt&&(delete n.projection.scale,b?(delete n.center.lon,delete n.center.lat):M?(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon,delete n.projection.rotation.lat,delete n.lonaxis.range,delete n.lataxis.range):(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon))}}),bS=Ft((Q,$)=>{var c=dd().getSubplotCalcData,g=_n().counterRegex,P=CU(),S="geo",t=g(S),e={};e[S]={valType:"subplotid",dflt:S,editType:"calc"};function r(o){for(var i=o._fullLayout,s=o.calcdata,f=i._subplots[S],x=0;x{$.exports={attributes:gx(),supplyDefaults:yU(),colorbar:yo(),formatLabels:xU(),calc:$k(),calcGeoJSON:yS().calcGeoJSON,plot:yS().plot,style:vS(),styleOnSelect:_l().styleOnSelect,hoverPoints:TU(),eventData:AU(),selectPoints:MU(),moduleType:"trace",name:"scattergeo",basePlotModule:bS(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}),zU=Ft((Q,$)=>{$.exports=PU()}),yb=Ft((Q,$)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=$u(),P=gx(),S=Ac(),t=Yo(),e=yi().defaultLine,r=ya().extendFlat,a=P.marker.line;$.exports=r({locations:{valType:"data_array",editType:"calc"},locationmode:P.locationmode,z:{valType:"data_array",editType:"calc"},geojson:r({},P.geojson,{}),featureidkey:P.featureidkey,text:r({},P.text,{}),hovertext:r({},P.hovertext,{}),marker:{line:{color:r({},a.color,{dflt:e}),width:r({},a.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:P.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:P.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:r({},t.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:c(),hovertemplatefallback:g(),showlegend:r({},t.showlegend,{dflt:!1})},S("",{cLetter:"z",editTypeOverride:"calc"}))}),IU=Ft((Q,$)=>{var c=_n(),g=gc(),P=yb(),S=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");$.exports=function(t,e,r,a){function n(v,T){return c.coerce(t,e,P,v,T)}var o=n("locations"),i=n("z");if(!(o&&o.length&&c.isArrayOrTypedArray(i)&&i.length)){e.visible=!1;return}e._length=Math.min(o.length,i.length);var s=n("geojson"),f;(typeof s=="string"&&s!==""||c.isPlainObject(s))&&(f="geojson-id");var x=n("locationmode",f);x==="country names"&&c.warn(S),x==="geojson-id"&&n("featureidkey"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var y=n("marker.line.width");y&&n("marker.line.color"),n("marker.opacity"),g(t,e,a,n,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(e,n)}}),Xk=Ft((Q,$)=>{var c=ia(),g=Ua().BADNUM,P=ep(),S=ct(),t=Bt();function e(r){return r&&typeof r=="string"}$.exports=function(r,a){var n=a._length,o=new Array(n),i;a.geojson?i=function(v){return e(v)||c(v)}:i=e;for(var s=0;s{var c=En(),g=ui(),P=Vs(),S=Xc();function t(a,n){n&&e(a,n)}function e(a,n){var o=n[0].trace,i=n[0].node3,s=i.selectAll(".choroplethlocation"),f=o.marker||{},x=f.line||{},y=S.makeColorScaleFuncFromTrace(o);s.each(function(v){c.select(this).attr("fill",y(v.z)).call(g.stroke,v.mlc||x.color).call(P.dashLine,"",v.mlw||x.width||0).style("opacity",f.opacity)}),P.selectedPointStyle(s,o)}function r(a,n){var o=n[0].node3,i=n[0].trace;i.selectedpoints?P.selectedPointStyle(o.selectAll(".choroplethlocation"),i):e(a,n)}$.exports={style:t,styleOnSelect:r}}),wS=Ft((Q,$)=>{var c=En(),g=_n(),P=W1(),S=Gk().getTopojsonFeatures,t=J0().findExtremes,e=Jk().style;function r(n,o,i){var s=o.layers.backplot.select(".choroplethlayer");g.makeTraceGroups(s,i,"trace choropleth").each(function(f){var x=c.select(this),y=x.selectAll("path.choroplethlocation").data(g.identity);y.enter().append("path").classed("choroplethlocation",!0),y.exit().remove(),e(n,f)})}function a(n,o){for(var i=n[0].trace,s=o[i.geo],f=s._subplot,x=i.locationmode,y=i._length,v=x==="geojson-id"?P.extractTraceFeature(n):S(i,f.topojson),T=[],u=[],b=0;b{var c=Ls(),g=yb(),P=_n().fillText;$.exports=function(t,e,r){var a=t.cd,n=a[0].trace,o=t.subplot,i,s,f,x,y=[e,r],v=[e+360,r];for(s=0;s")}}}),tT=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){c.location=g.location,c.z=g.z;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c.ct=e.ct,c}}),eT=Ft((Q,$)=>{$.exports=function(c,g){var P=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a,n,o,i;if(g===!1)for(r=0;r{$.exports={attributes:yb(),supplyDefaults:IU(),colorbar:z1(),calc:Xk(),calcGeoJSON:wS().calcGeoJSON,plot:wS().plot,style:Jk().style,styleOnSelect:Jk().styleOnSelect,hoverPoints:Qk(),eventData:tT(),selectPoints:eT(),moduleType:"trace",name:"choropleth",basePlotModule:bS(),categories:["geo","noOpacity","showLegend"],meta:{}}}),DU=Ft((Q,$)=>{$.exports=OU()}),rT=Ft((Q,$)=>{var c=Qo(),g=_n(),P=Fu();function S(e,r,a,n){var o=e.cd,i=o[0].t,s=o[0].trace,f=e.xa,x=e.ya,y=i.x,v=i.y,T=f.c2p(r),u=x.c2p(a),b=e.distance,_;if(i.tree){var C=f.p2c(T-b),M=f.p2c(T+b),E=x.p2c(u-b),A=x.p2c(u+b);n==="x"?_=i.tree.range(Math.min(C,M),Math.min(x._rl[0],x._rl[1]),Math.max(C,M),Math.max(x._rl[0],x._rl[1])):_=i.tree.range(Math.min(C,M),Math.min(E,A),Math.max(C,M),Math.max(E,A))}else _=i.ids;var h,p,k,w,R,O,N,V,H,F=b;if(n==="x"){var U=!!s.xperiodalignment,W=!!s.yperiodalignment;for(R=0;R<_.length;R++){if(h=_[R],k=y[h],O=Math.abs(f.c2p(k)-T),U){var q=f.c2p(s._xStarts[h]),X=f.c2p(s._xEnds[h]);O=T>=Math.min(q,X)&&T<=Math.max(q,X)?0:1/0}if(O=Math.min(lt,yt)&&u<=Math.max(lt,yt)?0:1/0}H=Math.sqrt(O*O+N*N),p=_[R]}}}else for(R=_.length-1;R>-1;R--)h=_[R],k=y[h],w=v[h],O=f.c2p(k)-T,N=x.c2p(w)-u,V=Math.sqrt(O*O+N*N),V{var c=20;$.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:c,SYMBOL_STROKE:c/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}}),b3=Ft((Q,$)=>{var c=Yo(),g=ka(),P=D0(),S=tf(),t=dh().axisHoverFormat,e=Ac(),r=X0(),a=ya().extendFlat,n=Yc().overrideAll,o=q1().DASHES,i=S.line,s=S.marker,f=s.line,x=$.exports=n({x:S.x,x0:S.x0,dx:S.dx,y:S.y,y0:S.y0,dy:S.dy,xperiod:S.xperiod,yperiod:S.yperiod,xperiod0:S.xperiod0,yperiod0:S.yperiod0,xperiodalignment:S.xperiodalignment,yperiodalignment:S.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),text:S.text,hovertext:S.hovertext,textposition:S.textposition,textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:i.color,width:i.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:r(o),dflt:"solid"}},marker:a({},e("marker"),{symbol:s.symbol,angle:s.angle,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,opacity:s.opacity,colorbar:s.colorbar,line:a({},e("marker.line"),{width:f.width})}),connectgaps:S.connectgaps,fill:a({},S.fill,{dflt:"none"}),fillcolor:P(),selected:{marker:S.selected.marker,textfont:S.selected.textfont},unselected:{marker:S.unselected.marker,textfont:S.unselected.textfont},opacity:c.opacity},"calc","nested");x.x.editType=x.y.editType=x.x0.editType=x.y0.editType="calc+clearAxisTypes",x.hovertemplate=S.hovertemplate,x.hovertemplatefallback=S.hovertemplatefallback,x.texttemplate=S.texttemplate,x.texttemplatefallback=S.texttemplatefallback}),nT=Ft(Q=>{var $=q1();Q.isOpenSymbol=function(c){return typeof c=="string"?$.OPEN_RE.test(c):c%200>100},Q.isDotSymbol=function(c){return typeof c=="string"?$.DOT_RE.test(c):c>200}}),FU=Ft((Q,$)=>{var c=_n(),g=Qo(),P=nT(),S=b3(),t=_m(),e=Mc(),r=Um(),a=jp(),n=c0(),o=F0(),i=R0(),s=b0();$.exports=function(f,x,y,v){function T(h,p){return c.coerce(f,x,S,h,p)}var u=f.marker?P.isOpenSymbol(f.marker.symbol):!1,b=e.isBubble(f),_=r(f,x,v,T);if(!_){x.visible=!1;return}a(f,x,v,T),T("xhoverformat"),T("yhoverformat");var C=_{var c=Ws();$.exports=function(g,P,S){var t=g.i;return"x"in g||(g.x=P._x[t]),"y"in g||(g.y=P._y[t]),c(g,P,S)}}),BU=Ft((Q,$)=>{function c(r,a,n,o,i){for(var s=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>=0?(s=f,i=f-1):o=f+1}return s}function g(r,a,n,o,i){for(var s=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>0?(s=f,i=f-1):o=f+1}return s}function P(r,a,n,o,i){for(var s=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<0?(s=f,o=f+1):i=f-1}return s}function S(r,a,n,o,i){for(var s=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<=0?(s=f,o=f+1):i=f-1}return s}function t(r,a,n,o,i){for(;o<=i;){var s=o+i>>>1,f=r[s],x=n!==void 0?n(f,a):f-a;if(x===0)return s;x<=0?o=s+1:i=s-1}return-1}function e(r,a,n,o,i,s){return typeof n=="function"?s(r,a,n,o===void 0?0:o|0,i===void 0?r.length-1:i|0):s(r,a,void 0,n===void 0?0:n|0,o===void 0?r.length-1:o|0)}$.exports={ge:function(r,a,n,o,i){return e(r,a,n,o,i,c)},gt:function(r,a,n,o,i){return e(r,a,n,o,i,g)},lt:function(r,a,n,o,i){return e(r,a,n,o,i,P)},le:function(r,a,n,o,i){return e(r,a,n,o,i,S)},eq:function(r,a,n,o,i){return e(r,a,n,o,i,t)}}}),zg=Ft((Q,$)=>{$.exports=function(P,S,t){var e={},r,a;if(typeof S=="string"&&(S=g(S)),Array.isArray(S)){var n={};for(a=0;a{var c=zg();$.exports=g;function g(P){var S;return arguments.length>1&&(P=arguments),typeof P=="string"?P=P.split(/\s/).map(parseFloat):typeof P=="number"&&(P=[P]),P.length&&typeof P[0]=="number"?P.length===1?S={width:P[0],height:P[0],x:0,y:0}:P.length===2?S={width:P[0],height:P[1],x:0,y:0}:S={x:P[0],y:P[1],width:P[2]-P[0]||0,height:P[3]-P[1]||0}:P&&(P=c(P,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),S={x:P.left||0,y:P.top||0},P.width==null?P.right?S.width=P.right-S.x:S.width=0:S.width=P.width,P.height==null?P.bottom?S.height=P.bottom-S.y:S.height=0:S.height=P.height),S}}),vx=Ft((Q,$)=>{$.exports=c;function c(g,P){if(!g||g.length==null)throw Error("Argument should be an array");P==null?P=1:P=Math.floor(P);for(var S=Array(P*2),t=0;te&&(e=g[a]),g[a]{$.exports=function(){for(var c=0;c{var c=Vk();$.exports=g;function g(P,S,t){if(!P)throw new TypeError("must specify data as first parameter");if(t=+(t||0)|0,Array.isArray(P)&&P[0]&&typeof P[0][0]=="number"){var e=P[0].length,r=P.length*e,a,n,o,i;(!S||typeof S=="string")&&(S=new(c(S||"float32"))(r+t));var s=S.length-t;if(r!==s)throw new Error("source length "+r+" ("+e+"x"+P.length+") does not match destination length "+s);for(a=0,o=t;a{$.exports=function(c){var g=typeof c;return c!==null&&(g==="object"||g==="function")}}),UU=Ft((Q,$)=>{$.exports=Math.log2||function(c){return Math.log(c)*Math.LOG2E}}),VU=Ft((Q,$)=>{var c=BU(),g=v3(),P=xb(),S=vx(),t=zg(),e=NU(),r=yx(),a=jU(),n=Vk(),o=UU(),i=1073741824;$.exports=function(f,x){x||(x={}),f=r(f,"float64"),x=t(x,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let y=e(x.maxDepth,255),v=e(x.bounds,S(f,2));v[0]===v[2]&&v[2]++,v[1]===v[3]&&v[3]++;let T=s(f,v),u=f.length>>>1,b;x.dtype||(x.dtype="array"),typeof x.dtype=="string"?b=new(n(x.dtype))(u):x.dtype&&(b=x.dtype,Array.isArray(b)&&(b.length=u));for(let R=0;Ry||F>i){for(let at=0;atft||q>ut||X=yt||it===Y)return;let wt=_[vt];Y===void 0&&(Y=wt.length);for(let se=it;se=V&&Lt<=F&&Mt>=H&&Mt<=U&&pt.push(Tt)}let zt=C[vt],Pt=zt[it*4+0],Wt=zt[it*4+1],Ht=zt[it*4+2],Jt=zt[it*4+3],ge=tt(zt,it+1),he=at*.5,de=vt+1;st(dt,rt,he,de,Pt,Wt||Ht||Jt||ge),st(dt,rt+he,he,de,Wt,Ht||Jt||ge),st(dt+he,rt,he,de,Ht,Jt||ge),st(dt+he,rt+he,he,de,Jt,ge)}function tt(dt,rt){let at=null,vt=0;for(;at===null;)if(at=dt[rt*4+vt],vt++,vt>dt.length)return null;return at}return pt}function k(R,O,N,V,H){let F=[];for(let U=0;U{$.exports=VU()}),kS=Ft((Q,$)=>{$.exports=c;function c(g){var P=0,S=0,t=0,e=0;return g.map(function(r){r=r.slice();var a=r[0],n=a.toUpperCase();if(a!=n)switch(r[0]=n,a){case"a":r[6]+=t,r[7]+=e;break;case"v":r[1]+=e;break;case"h":r[1]+=t;break;default:for(var o=1;o{Object.defineProperty(Q,"__esModule",{value:!0});var c=function(){function a(n,o){var i=[],s=!0,f=!1,x=void 0;try{for(var y=n[Symbol.iterator](),v;!(s=(v=y.next()).done)&&(i.push(v.value),!(o&&i.length===o));s=!0);}catch(T){f=!0,x=T}finally{try{!s&&y.return&&y.return()}finally{if(f)throw x}}return i}return function(n,o){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return a(n,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=Math.PI*2,P=function(a,n,o,i,s,f,x){var y=a.x,v=a.y;y*=n,v*=o;var T=i*y-s*v,u=s*y+i*v;return{x:T+f,y:u+x}},S=function(a,n){var o=n===1.5707963267948966?.551915024494:n===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(n/4),i=Math.cos(a),s=Math.sin(a),f=Math.cos(a+n),x=Math.sin(a+n);return[{x:i-s*o,y:s+i*o},{x:f+x*o,y:x-f*o},{x:f,y:x}]},t=function(a,n,o,i){var s=a*i-n*o<0?-1:1,f=a*o+n*i;return f>1&&(f=1),f<-1&&(f=-1),s*Math.acos(f)},e=function(a,n,o,i,s,f,x,y,v,T,u,b){var _=Math.pow(s,2),C=Math.pow(f,2),M=Math.pow(u,2),E=Math.pow(b,2),A=_*C-_*E-C*M;A<0&&(A=0),A/=_*E+C*M,A=Math.sqrt(A)*(x===y?-1:1);var h=A*s/f*b,p=A*-f/s*u,k=T*h-v*p+(a+o)/2,w=v*h+T*p+(n+i)/2,R=(u-h)/s,O=(b-p)/f,N=(-u-h)/s,V=(-b-p)/f,H=t(1,0,R,O),F=t(R,O,N,V);return y===0&&F>0&&(F-=g),y===1&&F<0&&(F+=g),[k,w,H,F]},r=function(a){var n=a.px,o=a.py,i=a.cx,s=a.cy,f=a.rx,x=a.ry,y=a.xAxisRotation,v=y===void 0?0:y,T=a.largeArcFlag,u=T===void 0?0:T,b=a.sweepFlag,_=b===void 0?0:b,C=[];if(f===0||x===0)return[];var M=Math.sin(v*g/360),E=Math.cos(v*g/360),A=E*(n-i)/2+M*(o-s)/2,h=-M*(n-i)/2+E*(o-s)/2;if(A===0&&h===0)return[];f=Math.abs(f),x=Math.abs(x);var p=Math.pow(A,2)/Math.pow(f,2)+Math.pow(h,2)/Math.pow(x,2);p>1&&(f*=Math.sqrt(p),x*=Math.sqrt(p));var k=e(n,o,i,s,f,x,u,_,M,E,A,h),w=c(k,4),R=w[0],O=w[1],N=w[2],V=w[3],H=Math.abs(V)/(g/4);Math.abs(1-H)<1e-7&&(H=1);var F=Math.max(Math.ceil(H),1);V/=F;for(var U=0;U{$.exports=g;var c=HU();function g(t){for(var e,r=[],a=0,n=0,o=0,i=0,s=null,f=null,x=0,y=0,v=0,T=t.length;v4?(a=u[u.length-4],n=u[u.length-3]):(a=x,n=y),r.push(u)}return r}function P(t,e,r,a){return["C",t,e,r,a,r,a]}function S(t,e,r,a,n,o){return["C",t/3+2/3*r,e/3+2/3*a,n/3+2/3*r,o/3+2/3*a,n,o]}}),TS=Ft((Q,$)=>{$.exports=function(c){return typeof c!="string"?!1:(c=c.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(c)&&/[\dz]$/i.test(c)&&c.length>4))}}),qU=Ft((Q,$)=>{var c=S1(),g=kS(),P=WU(),S=TS(),t=Xw();$.exports=e;function e(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(t(S(r),"String is not an SVG path."),r=c(r)),t(Array.isArray(r),"Argument should be a string or an array of path segments."),r=g(r),r=P(r),!r.length)return[0,0,0,0];for(var a=[1/0,1/0,-1/0,-1/0],n=0,o=r.length;na[2]&&(a[2]=i[s+0]),i[s+1]>a[3]&&(a[3]=i[s+1]);return a}}),ZU=Ft((Q,$)=>{var c=Math.PI,g=a(120);$.exports=P;function P(n){for(var o,i=[],s=0,f=0,x=0,y=0,v=null,T=null,u=0,b=0,_=0,C=n.length;_7&&(i.push(M.splice(0,7)),M.unshift("C"));break;case"S":var A=u,h=b;(o=="C"||o=="S")&&(A+=A-s,h+=h-f),M=["C",A,h,M[1],M[2],M[3],M[4]];break;case"T":o=="Q"||o=="T"?(v=u*2-v,T=b*2-T):(v=u,T=b),M=t(u,b,v,T,M[1],M[2]);break;case"Q":v=M[1],T=M[2],M=t(u,b,M[1],M[2],M[3],M[4]);break;case"L":M=S(u,b,M[1],M[2]);break;case"H":M=S(u,b,M[1],b);break;case"V":M=S(u,b,u,M[1]);break;case"Z":M=S(u,b,x,y);break}o=E,u=M[M.length-2],b=M[M.length-1],M.length>4?(s=M[M.length-4],f=M[M.length-3]):(s=u,f=b),i.push(M)}return i}function S(n,o,i,s){return["C",n,o,i,s,i,s]}function t(n,o,i,s,f,x){return["C",n/3+2/3*i,o/3+2/3*s,f/3+2/3*i,x/3+2/3*s,f,x]}function e(n,o,i,s,f,x,y,v,T,u){if(u)w=u[0],R=u[1],p=u[2],k=u[3];else{var b=r(n,o,-f);n=b.x,o=b.y,b=r(v,T,-f),v=b.x,T=b.y;var _=(n-v)/2,C=(o-T)/2,M=_*_/(i*i)+C*C/(s*s);M>1&&(M=Math.sqrt(M),i=M*i,s=M*s);var E=i*i,A=s*s,h=(x==y?-1:1)*Math.sqrt(Math.abs((E*A-E*C*C-A*_*_)/(E*C*C+A*_*_)));h==1/0&&(h=1);var p=h*i*C/s+(n+v)/2,k=h*-s*_/i+(o+T)/2,w=Math.asin(((o-k)/s).toFixed(9)),R=Math.asin(((T-k)/s).toFixed(9));w=nR&&(w=w-c*2),!y&&R>w&&(R=R-c*2)}if(Math.abs(R-w)>g){var O=R,N=v,V=T;R=w+g*(y&&R>w?1:-1),v=p+i*Math.cos(R),T=k+s*Math.sin(R);var H=e(v,T,i,s,f,0,y,N,V,[R,O,p,k])}var F=Math.tan((R-w)/4),U=4/3*i*F,W=4/3*s*F,q=[2*n-(n+U*Math.sin(w)),2*o-(o-W*Math.cos(w)),v+U*Math.sin(R),T-W*Math.cos(R),v,T];if(u)return q;H&&(q=q.concat(H));for(var X=0;X{var c=kS(),g=ZU(),P={M:"moveTo",C:"bezierCurveTo"};$.exports=function(S,t){S.beginPath(),g(c(t)).forEach(function(e){var r=e[0],a=e.slice(1);S[P[r]].apply(S,a)}),S.closePath()}}),GU=Ft((Q,$)=>{var c=v3();$.exports=P;var g=1e20;function P(e,r){r||(r={});var a=r.cutoff==null?.25:r.cutoff,n=r.radius==null?8:r.radius,o=r.channel||0,i,s,f,x,y,v,T,u,b,_,C;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!r.width||!r.height)throw Error("For raw data width and height should be provided by options");i=r.width,s=r.height,x=e,r.stride?v=r.stride:v=Math.floor(e.length/i/s)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=e,T=u.getContext("2d"),i=u.width,s=u.height,b=T.getImageData(0,0,i,s),x=b.data,v=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(u=e.canvas,T=e,i=u.width,s=u.height,b=T.getImageData(0,0,i,s),x=b.data,v=4):window.ImageData&&e instanceof window.ImageData&&(b=e,i=e.width,s=e.height,x=b.data,v=4);if(f=Math.max(i,s),window.Uint8ClampedArray&&x instanceof window.Uint8ClampedArray||window.Uint8Array&&x instanceof window.Uint8Array)for(y=x,x=Array(i*s),_=0,C=y.length;_{var c=qU(),g=S1(),P=$U(),S=TS(),t=GU(),e=document.createElement("canvas"),r=e.getContext("2d");$.exports=a;function a(i,s){if(!S(i))throw Error("Argument should be valid svg path string");s||(s={});var f,x;s.shape?(f=s.shape[0],x=s.shape[1]):(f=e.width=s.w||s.width||200,x=e.height=s.h||s.height||200);var y=Math.min(f,x),v=s.stroke||0,T=s.viewbox||s.viewBox||c(i),u=[f/(T[2]-T[0]),x/(T[3]-T[1])],b=Math.min(u[0]||0,u[1]||0)/2;if(r.fillStyle="black",r.fillRect(0,0,f,x),r.fillStyle="white",v&&(typeof v!="number"&&(v=1),v>0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(v)),r.translate(f*.5,x*.5),r.scale(b,b),o()){var _=new Path2D(i);r.fill(_),v&&r.stroke(_)}else{var C=g(i);P(r,C),r.fill(),v&&r.stroke()}r.setTransform(1,0,0,1,0,0);var M=t(r,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:y*.5});return M}var n;function o(){if(n!=null)return n;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return n=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(s);var f=i.getImageData(0,0,1,1);return n=f&&f.data&&f.data[3]===255}}),xx=Ft((Q,$)=>{var c=ia(),g=YU(),P=U1(),S=Qo(),t=_n(),e=t.isArrayOrTypedArray,r=Vs(),a=Rc(),n=Av().formatColor,o=Mc(),i=bg(),s=nT(),f=q1(),x=ao().DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=Np().appendArrayPointValue;function T(H,F){var U,W={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},q=H._context.plotGlPixelRatio;if(F.visible!==!0)return W;if(o.hasText(F)&&(W.text=u(H,F),W.textSel=M(H,F,F.selected),W.textUnsel=M(H,F,F.unselected)),o.hasMarkers(F)&&(W.marker=_(H,F),W.markerSel=C(H,F,F.selected),W.markerUnsel=C(H,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var X=F.marker.opacity;for(W.markerUnsel.opacity=new Array(X.length),U=0;U500?"bold":"normal":H}function _(H,F){var U=F._length,W=F.marker,q={},X,lt=e(W.symbol),yt=e(W.angle),pt=e(W.color),st=e(W.line.color),tt=e(W.opacity),dt=e(W.size),rt=e(W.line.width),at;if(lt||(at=s.isOpenSymbol(W.symbol)),lt||pt||st||tt||yt){q.symbols=new Array(U),q.angles=new Array(U),q.colors=new Array(U),q.borderColors=new Array(U);var vt=W.symbol,it=W.angle,Y=n(W,W.opacity,U),ft=n(W.line,W.opacity,U);if(!e(ft[0])){var ut=ft;for(ft=Array(U),X=0;Xf.TOO_MANY_POINTS||o.hasMarkers(F)?"rect":"round";if(st&&F.connectgaps){var dt=X[0],rt=X[1];for(lt=0;lt1?pt[lt]:pt[0]:pt,at=e(st)?st.length>1?st[lt]:st[0]:st,vt=y[rt],it=y[at],Y=tt?tt/.8+1:0,ft=-it*Y-it*.5;X.offset[lt]=[vt*Y/dt,ft/dt]}}return X}$.exports={style:T,markerStyle:_,markerSelection:C,linePositions:O,errorBarPositions:N,textPosition:V}}),AS=Ft((Q,$)=>{var c=_n();$.exports=function(g,P){var S=P._scene,t={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},e={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return P._scene||(S=P._scene={},S.init=function(){c.extendFlat(S,e,t)},S.init(),S.update=function(r){var a=c.repeat(r,S.count);if(S.fill2d&&S.fill2d.update(a),S.scatter2d&&S.scatter2d.update(a),S.line2d&&S.line2d.update(a),S.error2d&&S.error2d.update(a.concat(a)),S.select2d&&S.select2d.update(a),S.glText)for(var n=0;n{var c=iT(),g=_n(),P=Rc(),S=J0().findExtremes,t=B0(),e=me(),r=e.calcMarkerSize,a=e.calcAxisExpansion,n=e.setFirstScatter,o=N0(),i=xx(),s=AS(),f=Ua().BADNUM,x=q1().TOO_MANY_POINTS;$.exports=function(T,u){var b=T._fullLayout,_=u._xA=P.getFromId(T,u.xaxis,"x"),C=u._yA=P.getFromId(T,u.yaxis,"y"),M=b._plots[u.xaxis+u.yaxis],E=u._length,A=E>=x,h=E*2,p={},k,w=_.makeCalcdata(u,"x"),R=C.makeCalcdata(u,"y"),O=t(u,_,"x",w),N=t(u,C,"y",R),V=O.vals,H=N.vals;u._x=V,u._y=H,u.xperiodalignment&&(u._origX=w,u._xStarts=O.starts,u._xEnds=O.ends),u.yperiodalignment&&(u._origY=R,u._yStarts=N.starts,u._yEnds=N.ends);var F=new Array(h),U=new Array(E);for(k=0;k1&&g.extendFlat(E.line,i.linePositions(T,b,_)),E.errorX||E.errorY){var A=i.errorBarPositions(T,b,_,C,M);E.errorX&&g.extendFlat(E.errorX,A.x),E.errorY&&g.extendFlat(E.errorY,A.y)}return E.text&&(g.extendFlat(E.text,{positions:_},i.textPosition(T,b,E.text,E.marker)),g.extendFlat(E.textSel,{positions:_},i.textPosition(T,b,E.text,E.markerSel)),g.extendFlat(E.textUnsel,{positions:_},i.textPosition(T,b,E.text,E.markerUnsel))),E}}),MS=Ft((Q,$)=>{var c=_n(),g=ui(),P=ao().DESELECTDIM;function S(t){var e=t[0],r=e.trace,a=e.t,n=a._scene,o=a.index,i=n.selectBatch[o],s=n.unselectBatch[o],f=n.textOptions[o],x=n.textSelectedOptions[o]||{},y=n.textUnselectedOptions[o]||{},v=c.extendFlat({},f),T,u;if(i.length||s.length){var b=x.color,_=y.color,C=f.color,M=c.isArrayOrTypedArray(C);for(v.color=new Array(r._length),T=0;T{var c=Mc(),g=MS().styleTextSelection;$.exports=function(P,S){var t=P.cd,e=P.xaxis,r=P.yaxis,a=[],n=t[0].trace,o=t[0].t,i=n._length,s=o.x,f=o.y,x=o._scene,y=o.index;if(!x)return a;var v=c.hasText(n),T=c.hasMarkers(n),u=!T&&!v;if(n.visible!==!0||u)return a;var b=[],_=[];if(S!==!1&&!S.degenerate)for(var C=0;C{var c=rT();$.exports={moduleType:"trace",name:"scattergl",basePlotModule:Ef(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:b3(),supplyDefaults:FU(),crossTraceDefaults:Iw(),colorbar:yo(),formatLabels:RU(),calc:KU(),hoverPoints:c.hoverPoints,selectPoints:SS(),meta:{}}}),JU=Ft((Q,$)=>{var c=v3();$.exports=g,$.exports.to=g,$.exports.from=P;function g(S,t){t==null&&(t=!0);var e=S[0],r=S[1],a=S[2],n=S[3];n==null&&(n=t?1:255),t&&(e*=255,r*=255,a*=255,n*=255),e=c(e,0,255)&255,r=c(r,0,255)&255,a=c(a,0,255)&255,n=c(n,0,255)&255;var o=e*16777216+(r<<16)+(a<<8)+n;return o}function P(S,t){S=+S;var e=S>>>24,r=(S&16711680)>>>16,a=(S&65280)>>>8,n=S&255;return t===!1?[e,r,a,n]:[e/255,r/255,a/255,n/255]}}),zd=Ft((Q,$)=>{var c=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;function S(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function t(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},a=0;a<10;a++)r["_"+String.fromCharCode(a)]=a;var n=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(n.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}$.exports=t()?Object.assign:function(e,r){for(var a,n=S(e),o,i=1;i{$.exports=function(c){typeof c=="string"&&(c=[c]);for(var g=[].slice.call(arguments,1),P=[],S=0;S{$.exports=function(c,g,P){Array.isArray(P)||(P=[].slice.call(arguments,2));for(var S=0,t=P.length;S{$.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}),aT=Ft((Q,$)=>{$.exports=P,$.exports.float32=$.exports.float=P,$.exports.fract32=$.exports.fract=g;var c=new Float32Array(1);function g(S,t){if(S.length){if(S instanceof Float32Array)return new Float32Array(S.length);t instanceof Float32Array||(t=P(S));for(var e=0,r=t.length;e{function c(k,w){var R=k==null?null:typeof Symbol<"u"&&k[Symbol.iterator]||k["@@iterator"];if(R!=null){var O,N,V,H,F=[],U=!0,W=!1;try{if(V=(R=R.call(k)).next,w!==0)for(;!(U=(O=V.call(R)).done)&&(F.push(O.value),F.length!==w);U=!0);}catch(q){W=!0,N=q}finally{try{if(!U&&R.return!=null&&(H=R.return(),Object(H)!==H))return}finally{if(W)throw N}}return F}}function g(k,w){return t(k)||c(k,w)||r(k,w)||o()}function P(k){return S(k)||e(k)||r(k)||n()}function S(k){if(Array.isArray(k))return a(k)}function t(k){if(Array.isArray(k))return k}function e(k){if(typeof Symbol<"u"&&k[Symbol.iterator]!=null||k["@@iterator"]!=null)return Array.from(k)}function r(k,w){if(k){if(typeof k=="string")return a(k,w);var R=Object.prototype.toString.call(k).slice(8,-1);if(R==="Object"&&k.constructor&&(R=k.constructor.name),R==="Map"||R==="Set")return Array.from(k);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return a(k,w)}}function a(k,w){(w==null||w>k.length)&&(w=k.length);for(var R=0,O=new Array(w);R0)throw new Error("Invalid string. Length must be a multiple of 4");var M=_.indexOf("=");M===-1&&(M=P);var C=M===P?0:4-M%4;return[M,C]}function x(_){var P=f(_),M=P[0],C=P[1];return(M+C)*3/4-C}function y(_,P,M){return(P+M)*3/4-M}function v(_){var P,M=f(_),C=M[0],A=M[1],h=new n(y(_,C,A)),p=0,k=A>0?C-4:C,w;for(w=0;w>16&255,h[p++]=P>>8&255,h[p++]=P&255;return A===2&&(P=a[_.charCodeAt(w)]<<2|a[_.charCodeAt(w+1)]>>4,h[p++]=P&255),A===1&&(P=a[_.charCodeAt(w)]<<10|a[_.charCodeAt(w+1)]<<4|a[_.charCodeAt(w+2)]>>2,h[p++]=P>>8&255,h[p++]=P&255),h}function T(_){return r[_>>18&63]+r[_>>12&63]+r[_>>6&63]+r[_&63]}function u(_,P,M){for(var C,A=[],h=P;hk?k:p+h));return C===1?(P=_[M-1],A.push(r[P>>2]+r[P<<4&63]+"==")):C===2&&(P=(_[M-2]<<8)+_[M-1],A.push(r[P>>10]+r[P>>4&63]+r[P<<2&63]+"=")),A.join("")}},7518:function(t,e,r){var a=r(1433);function n(l,f,x,y,v,T){this.location=l,this.dimension=f,this.a=x,this.b=y,this.c=v,this.d=T}n.prototype.bind=function(l){switch(this.dimension){case 1:l.vertexAttrib1f(this.location,this.a);break;case 2:l.vertexAttrib2f(this.location,this.a,this.b);break;case 3:l.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:l.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function o(l,f,x){this.gl=l,this._ext=f,this.handle=x,this._attribs=[],this._useElements=!1,this._elementsType=l.UNSIGNED_SHORT}o.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var l=0;l1.0001)return null;w+=k[M]}return Math.abs(w-1)>.001?null:[C,f(y,k),k]}},7636:function(t){t.exports=e;function e(r,a){a=a||1;var n=Math.random()*2*Math.PI,o=Math.random()*2-1,i=Math.sqrt(1-o*o)*a;return r[0]=Math.cos(n)*i,r[1]=Math.sin(n)*i,r[2]=o*a,r}},7640:function(t,e,r){var a=r(1888);function n(v){switch(v){case"uint32":return[a.mallocUint32,a.freeUint32];default:return null}}var o={"uint32,1,0":function(v,T){return function(u,b,_,P,M,C,A,h,p,k,w){var R,O,j,V=u*M+P,H,F=v(h),U,W,q,J;for(R=u+1;R<=b;++R){for(O=R,V+=M,j=V,U=0,W=V,H=0;Hu;){U=0,W=j-M;e:for(H=0;HJ)break e;W+=k,U+=w}for(U=j,W=j-M,H=0;H>1,U=F-j,W=F+j,q=V,J=U,lt=F,yt=W,mt=H,st=_+1,tt=P-1,dt=!0,rt,at,vt,it,Y,ft,ut,kt,It,Pt=0,qt=0,Wt=0,Jt,ge,fe,pe,se,Tt,Lt,Mt,ee,ve,oe,Te,He,Ge,cr,ur,jr=k,Wr=T(jr),br=T(jr);ge=A*q,fe=A*J,ur=C;t:for(Jt=0;Jt0){at=q,q=J,J=at;break t}if(Wt<0)break t;ur+=R}ge=A*yt,fe=A*mt,ur=C;t:for(Jt=0;Jt0){at=yt,yt=mt,mt=at;break t}if(Wt<0)break t;ur+=R}ge=A*q,fe=A*lt,ur=C;t:for(Jt=0;Jt0){at=q,q=lt,lt=at;break t}if(Wt<0)break t;ur+=R}ge=A*J,fe=A*lt,ur=C;t:for(Jt=0;Jt0){at=J,J=lt,lt=at;break t}if(Wt<0)break t;ur+=R}ge=A*q,fe=A*yt,ur=C;t:for(Jt=0;Jt0){at=q,q=yt,yt=at;break t}if(Wt<0)break t;ur+=R}ge=A*lt,fe=A*yt,ur=C;t:for(Jt=0;Jt0){at=lt,lt=yt,yt=at;break t}if(Wt<0)break t;ur+=R}ge=A*J,fe=A*mt,ur=C;t:for(Jt=0;Jt0){at=J,J=mt,mt=at;break t}if(Wt<0)break t;ur+=R}ge=A*J,fe=A*lt,ur=C;t:for(Jt=0;Jt0){at=J,J=lt,lt=at;break t}if(Wt<0)break t;ur+=R}ge=A*yt,fe=A*mt,ur=C;t:for(Jt=0;Jt0){at=yt,yt=mt,mt=at;break t}if(Wt<0)break t;ur+=R}for(ge=A*q,fe=A*J,pe=A*lt,se=A*yt,Tt=A*mt,Lt=A*V,Mt=A*F,ee=A*H,cr=0,ur=C,Jt=0;Jt0)tt--;else if(Wt<0){for(ge=A*ft,fe=A*st,pe=A*tt,ur=C,Jt=0;Jt0)for(;;){ut=C+tt*A,cr=0;t:for(Jt=0;Jt0){if(--ttH){t:for(;;){for(ut=C+st*A,cr=0,ur=C,Jt=0;Jt1&&b?P(u,b[0],b[1]):P(u)}var x={"uint32,1,0":function(v,T){return function(u){var b=u.data,_=u.offset|0,P=u.shape,M=u.stride,C=M[0]|0,A=P[0]|0,h=M[1]|0,p=P[1]|0,k=h,w=h,R=1;A<=32?v(0,A-1,b,_,C,h,A,p,k,w,R):T(0,A-1,b,_,C,h,A,p,k,w,R)}}};function y(v,T){var u=[T,v].join(","),b=x[u],_=i(v,T),P=f(v,T,_);return b(_,P)}t.exports=y},7642:function(t,e,r){var a=r(8954),n=r(1682);t.exports=f;function o(x,y){this.point=x,this.index=y}function i(x,y){for(var v=x.point,T=y.point,u=v.length,b=0;b=2)return!1;V[F]=U}return!0}):j=j.filter(function(V){for(var H=0;H<=T;++H){var F=k[V[H]];if(F<0)return!1;V[H]=F}return!0}),T&1)for(var _=0;_",W="",q=U.length,J=W.length,lt=V[0]===b||V[0]===M,yt=0,mt=-J;yt>-1&&(yt=H.indexOf(U,yt),!(yt===-1||(mt=H.indexOf(W,yt+q),mt===-1)||mt<=yt));){for(var st=yt;st=mt)F[st]=null,H=H.substr(0,st)+" "+H.substr(st+1);else if(F[st]!==null){var tt=F[st].indexOf(V[0]);tt===-1?F[st]+=V:lt&&(F[st]=F[st].substr(0,tt+1)+(1+parseInt(F[st][tt+1]))+F[st].substr(tt+2))}var dt=yt+q,rt=H.substr(dt,mt-dt),at=rt.indexOf(U);at!==-1?yt=at:yt=mt+J}return F}function h(j,V,H){for(var F=V.textAlign||"start",U=V.textBaseline||"alphabetic",W=[1073741824,1073741824],q=[0,0],J=j.length,lt=0;lt/g,` +`):H=H.replace(/\/g," ");var q="",J=[];for(Y=0;Y-1?parseInt(Mt[1+oe]):0,Ge=Te>-1?parseInt(ee[1+Te]):0;He!==Ge&&(ve=ve.replace(Wt(),"?px "),kt*=Math.pow(.75,Ge-He),ve=ve.replace("?px ",Wt())),ut+=.25*tt*(Ge-He)}if(W.superscripts===!0){var cr=Mt.indexOf(b),ur=ee.indexOf(b),jr=cr>-1?parseInt(Mt[1+cr]):0,Wr=ur>-1?parseInt(ee[1+ur]):0;jr!==Wr&&(ve=ve.replace(Wt(),"?px "),kt*=Math.pow(.75,Wr-jr),ve=ve.replace("?px ",Wt())),ut-=.25*tt*(Wr-jr)}if(W.bolds===!0){var br=Mt.indexOf(y)>-1,Xr=ee.indexOf(y)>-1;!br&&Xr&&(nn?ve=ve.replace("italic ","italic bold "):ve="bold "+ve),br&&!Xr&&(ve=ve.replace("bold ",""))}if(W.italics===!0){var nn=Mt.indexOf(T)>-1,Le=ee.indexOf(T)>-1;!nn&&Le&&(ve="italic "+ve),nn&&!Le&&(ve=ve.replace("italic ",""))}V.font=ve}for(it=0;it0&&(U=F.size),F.lineSpacing&&F.lineSpacing>0&&(W=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(q.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(q.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(q.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(q.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(q.superscripts=!!F.styletags.superscripts)),H.font=[F.fontStyle,F.fontVariant,F.fontWeight,U+"px",F.font].filter(function(lt){return lt}).join(" "),H.textAlign="start",H.textBaseline="alphabetic",H.direction="ltr";var J=p(V,H,j,U,W,q);return R(J,F,U)}},7721:function(t,e,r){var a=r(5716);t.exports=n;function n(o){return a(o[0])*a(o[1])}},7765:function(t,e,r){t.exports=u;var a=r(9618),n=r(1888),o=r(446),i=r(1570);function l(b){for(var _=b.length,P=0,M=0;M<_;++M)P=Math.max(P,b[M].length)|0;return P-1}function f(b,_){for(var P=b.length,M=n.mallocUint8(P),C=0;C"u"&&(M=l(b));var C=b.length;if(C===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var A=f(_,+P),h=x(b,M),p=y(h,_,A,+P),k=v(h,_.length|0),w=i(M)(b,h.data,k,A),R=T(h),O=[].slice.call(p.data,0,p.shape[0]);return n.free(A),n.free(h.data),n.free(p.data),n.free(k),{cells:w,vertexIds:R,vertexWeights:O}}},7766:function(t,e,r){var a=r(9618),n=r(5298),o=r(1888);t.exports=p;var i=null,l=null,f=null;function x(k){i=[k.LINEAR,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_NEAREST],l=[k.NEAREST,k.LINEAR,k.NEAREST_MIPMAP_NEAREST,k.NEAREST_MIPMAP_LINEAR,k.LINEAR_MIPMAP_NEAREST,k.LINEAR_MIPMAP_LINEAR],f=[k.REPEAT,k.CLAMP_TO_EDGE,k.MIRRORED_REPEAT]}function y(k){return typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&k instanceof HTMLVideoElement||typeof ImageData<"u"&&k instanceof ImageData}var v=function(k,w){n.muls(k,w,255)};function T(k,w,R){var O=k.gl,j=O.getParameter(O.MAX_TEXTURE_SIZE);if(w<0||w>j||R<0||R>j)throw new Error("gl-texture2d: Invalid texture size");return k._shape=[w,R],k.bind(),O.texImage2D(O.TEXTURE_2D,0,k.format,w,R,0,k.format,k.type,null),k._mipLevels=[0],k}function u(k,w,R,O,j,V){this.gl=k,this.handle=w,this.format=j,this.type=V,this._shape=[R,O],this._mipLevels=[0],this._magFilter=k.NEAREST,this._minFilter=k.NEAREST,this._wrapS=k.CLAMP_TO_EDGE,this._wrapT=k.CLAMP_TO_EDGE,this._anisoSamples=1;var H=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return H._wrapS},set:function(W){return H.wrapS=W}},{get:function(){return H._wrapT},set:function(W){return H.wrapT=W}}]),this._wrapVector=F;var U=[this._shape[0],this._shape[1]];Object.defineProperties(U,[{get:function(){return H._shape[0]},set:function(W){return H.width=W}},{get:function(){return H._shape[1]},set:function(W){return H.height=W}}]),this._shapeVector=U}var b=u.prototype;Object.defineProperties(b,{minFilter:{get:function(){return this._minFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),l.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MIN_FILTER,k),this._minFilter=k}},magFilter:{get:function(){return this._magFilter},set:function(k){this.bind();var w=this.gl;if(this.type===w.FLOAT&&i.indexOf(k)>=0&&(w.getExtension("OES_texture_float_linear")||(k=w.NEAREST)),l.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return w.texParameteri(w.TEXTURE_2D,w.TEXTURE_MAG_FILTER,k),this._magFilter=k}},mipSamples:{get:function(){return this._anisoSamples},set:function(k){var w=this._anisoSamples;if(this._anisoSamples=Math.max(k,1)|0,w!==this._anisoSamples){var R=this.gl.getExtension("EXT_texture_filter_anisotropic");R&&this.gl.texParameterf(this.gl.TEXTURE_2D,R.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,k),this._wrapS=k}},wrapT:{get:function(){return this._wrapT},set:function(k){if(this.bind(),f.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,k),this._wrapT=k}},wrap:{get:function(){return this._wrapVector},set:function(k){if(Array.isArray(k)||(k=[k,k]),k.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var w=0;w<2;++w)if(f.indexOf(k[w])<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);this._wrapS=k[0],this._wrapT=k[1];var R=this.gl;return this.bind(),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,this._wrapS),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,this._wrapT),k}},shape:{get:function(){return this._shapeVector},set:function(k){if(!Array.isArray(k))k=[k|0,k|0];else if(k.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return T(this,k[0]|0,k[1]|0),[k[0]|0,k[1]|0]}},width:{get:function(){return this._shape[0]},set:function(k){return k=k|0,T(this,k,this._shape[1]),k}},height:{get:function(){return this._shape[1]},set:function(k){return k=k|0,T(this,this._shape[0],k),k}}}),b.bind=function(k){var w=this.gl;return k!==void 0&&w.activeTexture(w.TEXTURE0+(k|0)),w.bindTexture(w.TEXTURE_2D,this.handle),k!==void 0?k|0:w.getParameter(w.ACTIVE_TEXTURE)-w.TEXTURE0},b.dispose=function(){this.gl.deleteTexture(this.handle)},b.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var k=Math.min(this._shape[0],this._shape[1]),w=0;k>0;++w,k>>>=1)this._mipLevels.indexOf(w)<0&&this._mipLevels.push(w)},b.setPixels=function(k,w,R,O){var j=this.gl;this.bind(),Array.isArray(w)?(O=R,R=w[1]|0,w=w[0]|0):(w=w||0,R=R||0),O=O||0;var V=y(k)?k:k.raw;if(V){var H=this._mipLevels.indexOf(O)<0;H?(j.texImage2D(j.TEXTURE_2D,0,this.format,this.format,this.type,V),this._mipLevels.push(O)):j.texSubImage2D(j.TEXTURE_2D,O,w,R,this.format,this.type,V)}else if(k.shape&&k.stride&&k.data){if(k.shape.length<2||w+k.shape[1]>this._shape[1]>>>O||R+k.shape[0]>this._shape[0]>>>O||w<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");P(j,w,R,O,this.format,this.type,this._mipLevels,k)}else throw new Error("gl-texture2d: Unsupported data type")};function _(k,w){return k.length===3?w[2]===1&&w[1]===k[0]*k[2]&&w[0]===k[2]:w[0]===1&&w[1]===k[0]}function P(k,w,R,O,j,V,H,F){var U=F.dtype,W=F.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var q=0,J=0,lt=_(W,F.stride.slice());if(U==="float32"?q=k.FLOAT:U==="float64"?(q=k.FLOAT,lt=!1,U="float32"):U==="uint8"?q=k.UNSIGNED_BYTE:(q=k.UNSIGNED_BYTE,lt=!1,U="uint8"),W.length===2)J=k.LUMINANCE,W=[W[0],W[1],1],F=a(F.data,W,[F.stride[0],F.stride[1],1],F.offset);else if(W.length===3){if(W[2]===1)J=k.ALPHA;else if(W[2]===2)J=k.LUMINANCE_ALPHA;else if(W[2]===3)J=k.RGB;else if(W[2]===4)J=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((J===k.LUMINANCE||J===k.ALPHA)&&(j===k.LUMINANCE||j===k.ALPHA)&&(J=j),J!==j)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var yt=F.size,mt=H.indexOf(O)<0;if(mt&&H.push(O),q===V&<)F.offset===0&&F.data.length===yt?mt?k.texImage2D(k.TEXTURE_2D,O,j,W[0],W[1],0,j,V,F.data):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],j,V,F.data):mt?k.texImage2D(k.TEXTURE_2D,O,j,W[0],W[1],0,j,V,F.data.subarray(F.offset,F.offset+yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],j,V,F.data.subarray(F.offset,F.offset+yt));else{var st;V===k.FLOAT?st=o.mallocFloat32(yt):st=o.mallocUint8(yt);var tt=a(st,W,[W[2],W[2]*W[0],1]);q===k.FLOAT&&V===k.UNSIGNED_BYTE?v(tt,F):n.assign(tt,F),mt?k.texImage2D(k.TEXTURE_2D,O,j,W[0],W[1],0,j,V,st.subarray(0,yt)):k.texSubImage2D(k.TEXTURE_2D,O,w,R,W[0],W[1],j,V,st.subarray(0,yt)),V===k.FLOAT?o.freeFloat32(st):o.freeUint8(st)}}function M(k){var w=k.createTexture();return k.bindTexture(k.TEXTURE_2D,w),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),w}function C(k,w,R,O,j){var V=k.getParameter(k.MAX_TEXTURE_SIZE);if(w<0||w>V||R<0||R>V)throw new Error("gl-texture2d: Invalid texture shape");if(j===k.FLOAT&&!k.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,O,w,R,0,O,j,null),new u(k,H,w,R,O,j)}function A(k,w,R,O,j,V){var H=M(k);return k.texImage2D(k.TEXTURE_2D,0,j,j,V,w),new u(k,H,R,O,j,V)}function h(k,w){var R=w.dtype,O=w.shape.slice(),j=k.getParameter(k.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>j||O[1]<0||O[1]>j)throw new Error("gl-texture2d: Invalid texture size");var V=_(O,w.stride.slice()),H=0;R==="float32"?H=k.FLOAT:R==="float64"?(H=k.FLOAT,V=!1,R="float32"):R==="uint8"?H=k.UNSIGNED_BYTE:(H=k.UNSIGNED_BYTE,V=!1,R="uint8");var F=0;if(O.length===2)F=k.LUMINANCE,O=[O[0],O[1],1],w=a(w.data,O,[w.stride[0],w.stride[1],1],w.offset);else if(O.length===3)if(O[2]===1)F=k.ALPHA;else if(O[2]===2)F=k.LUMINANCE_ALPHA;else if(O[2]===3)F=k.RGB;else if(O[2]===4)F=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");H===k.FLOAT&&!k.getExtension("OES_texture_float")&&(H=k.UNSIGNED_BYTE,V=!1);var U,W,q=w.size;if(V)w.offset===0&&w.data.length===q?U=w.data:U=w.data.subarray(w.offset,w.offset+q);else{var J=[O[2],O[2]*O[0],1];W=o.malloc(q,R);var lt=a(W,O,J,0);(R==="float32"||R==="float64")&&H===k.UNSIGNED_BYTE?v(lt,w):n.assign(lt,w),U=W.subarray(0,q)}var yt=M(k);return k.texImage2D(k.TEXTURE_2D,0,F,O[0],O[1],0,F,H,U),V||o.free(W),new u(k,yt,O[0],O[1],F,H)}function p(k){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||x(k),typeof arguments[1]=="number")return C(k,arguments[1],arguments[2],arguments[3]||k.RGBA,arguments[4]||k.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return C(k,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var w=arguments[1],R=y(w)?w:w.raw;if(R)return A(k,R,w.width|0,w.height|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(w.shape&&w.data&&w.stride)return h(k,w)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},7790:function(){},7815:function(t,e,r){var a=r(2931),n=r(9970),o=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(_,P,M,C){for(var A=_.points,h=_.velocities,p=_.divergences,k=[],w=[],R=[],O=[],j=[],V=[],H=0,F=0,U=n.create(),W=n.create(),q=8,J=0;J0)for(var st=0;stP)return C-1}return C},x=function(_,P,M){return _M?M:_},y=function(_,P,M){var C=P.vectors,A=P.meshgrid,h=_[0],p=_[1],k=_[2],w=A[0].length,R=A[1].length,O=A[2].length,j=f(A[0],h),V=f(A[1],p),H=f(A[2],k),F=j+1,U=V+1,W=H+1;if(j=x(j,0,w-1),F=x(F,0,w-1),V=x(V,0,R-1),U=x(U,0,R-1),H=x(H,0,O-1),W=x(W,0,O-1),j<0||V<0||H<0||F>w-1||U>R-1||W>O-1)return a.create();var q=A[0][j],J=A[0][F],lt=A[1][V],yt=A[1][U],mt=A[2][H],st=A[2][W],tt=(h-q)/(J-q),dt=(p-lt)/(yt-lt),rt=(k-mt)/(st-mt);isFinite(tt)||(tt=.5),isFinite(dt)||(dt=.5),isFinite(rt)||(rt=.5);var at,vt,it,Y,ft,ut;switch(M.reversedX&&(j=w-1-j,F=w-1-F),M.reversedY&&(V=R-1-V,U=R-1-U),M.reversedZ&&(H=O-1-H,W=O-1-W),M.filled){case 5:ft=H,ut=W,it=V*O,Y=U*O,at=j*O*R,vt=F*O*R;break;case 4:ft=H,ut=W,at=j*O,vt=F*O,it=V*O*w,Y=U*O*w;break;case 3:it=V,Y=U,ft=H*R,ut=W*R,at=j*R*O,vt=F*R*O;break;case 2:it=V,Y=U,at=j*R,vt=F*R,ft=H*R*w,ut=W*R*w;break;case 1:at=j,vt=F,ft=H*w,ut=W*w,it=V*w*O,Y=U*w*O;break;default:at=j,vt=F,it=V*w,Y=U*w,ft=H*w*R,ut=W*w*R;break}var kt=C[at+it+ft],It=C[at+it+ut],Pt=C[at+Y+ft],qt=C[at+Y+ut],Wt=C[vt+it+ft],Jt=C[vt+it+ut],ge=C[vt+Y+ft],fe=C[vt+Y+ut],pe=a.create(),se=a.create(),Tt=a.create(),Lt=a.create();a.lerp(pe,kt,Wt,tt),a.lerp(se,It,Jt,tt),a.lerp(Tt,Pt,ge,tt),a.lerp(Lt,qt,fe,tt);var Mt=a.create(),ee=a.create();a.lerp(Mt,pe,Tt,dt),a.lerp(ee,se,Lt,dt);var ve=a.create();return a.lerp(ve,Mt,ee,rt),ve},v=function(_){var P=1/0;_.sort(function(h,p){return h-p});for(var M=_.length,C=1;CF||feU||peW)},J=a.distance(P[0],P[1]),lt=10*J/C,yt=lt*lt,mt=1,st=0,tt=M.length;tt>1&&(mt=T(M));for(var dt=0;dtst&&(st=kt),ft.push(kt),O.push({points:at,velocities:vt,divergences:ft});for(var It=0;Ityt&&a.scale(Pt,Pt,lt/Math.sqrt(qt)),a.add(Pt,Pt,rt),it=w(Pt),a.squaredDistance(Y,Pt)-yt>-1e-4*yt){at.push(Pt),Y=Pt,vt.push(it);var ut=R(Pt,it),kt=a.length(ut);isFinite(kt)&&kt>st&&(st=kt),ft.push(kt)}rt=Pt}}var Wt=l(O,_.colormap,st,mt);return h?Wt.tubeScale=h:(st===0&&(st=1),Wt.tubeScale=A*.5*mt/st),Wt};var u=r(6740),b=r(6405).createMesh;t.exports.createTubeMesh=function(_,P){return b(_,P,{shaders:u,traceType:"streamtube"})}},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7842:function(t,e,r){var a=r(6330),n=r(1533),o=r(2651),i=r(6768),l=r(869),f=r(8697);t.exports=x;function x(y,v){if(a(y))return v?f(y,x(v)):[y[0].clone(),y[1].clone()];var T=0,u,b;if(n(y))u=y.clone();else if(typeof y=="string")u=i(y);else{if(y===0)return[o(0),o(1)];if(y===Math.floor(y))u=o(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),T-=256;u=o(y)}}if(a(v))u.mul(v[1]),b=v[0].clone();else if(n(v))b=v.clone();else if(typeof v=="string")b=i(v);else if(!v)b=o(1);else if(v===Math.floor(v))b=o(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),T+=256;b=o(v)}return T>0?u=u.ushln(T):T<0&&(b=b.ushln(-T)),l(u,b)}},7894:function(t){t.exports=e;function e(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7932:function(t,e,r){var a=r(620);t.exports=a.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},7960:function(t){t.exports=e;function e(r,a){var n=a[0]-r[0],o=a[1]-r[1],i=a[2]-r[2],l=a[3]-r[3];return n*n+o*o+i*i+l*l}},8105:function(t){t.exports=r;var e={"lo===p0":a,"lo=p0)&&!(p1>=hi)":x};function r(y){return e[y]}function a(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+p];if(R===P)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function n(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+p];if(RO;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function o(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+k];if(R<=P)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function i(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+k];if(R<=P)if(h===w)h+=1,A+=M;else{for(var O=0;M>O;++O){var j=b[C+O];b[C+O]=b[A],b[A++]=j}var V=_[w];_[w]=_[h],_[h++]=V}}return h}function l(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+p],O=b[C+k];if(R<=P&&P<=O)if(h===w)h+=1,A+=M;else{for(var j=0;M>j;++j){var V=b[C+j];b[C+j]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function f(y,v,T,u,b,_,P){for(var M=2*y,C=M*T,A=C,h=T,p=v,k=y+v,w=T;u>w;++w,C+=M){var R=b[C+p],O=b[C+k];if(Rj;++j){var V=b[C+j];b[C+j]=b[A],b[A++]=V}var H=_[w];_[w]=_[h],_[h++]=H}}return h}function x(y,v,T,u,b,_,P,M){for(var C=2*y,A=C*T,h=A,p=T,k=v,w=y+v,R=T;u>R;++R,A+=C){var O=b[A+k],j=b[A+w];if(!(O>=P)&&!(M>=j))if(p===R)p+=1,h+=C;else{for(var V=0;C>V;++V){var H=b[A+V];b[A+V]=b[h],b[h++]=H}var F=_[R];_[R]=_[p],_[p++]=F}}return p}},8107:function(t){t.exports=e;function e(r,a,n){return r[0]=Math.min(a[0],n[0]),r[1]=Math.min(a[1],n[1]),r[2]=Math.min(a[2],n[2]),r}},8116:function(t,e,r){var a=r(7518),n=r(870);function o(l){this.bindVertexArrayOES=l.bindVertexArray.bind(l),this.createVertexArrayOES=l.createVertexArray.bind(l),this.deleteVertexArrayOES=l.deleteVertexArray.bind(l)}function i(l,f,x,y){var v=l.createVertexArray?new o(l):l.getExtension("OES_vertex_array_object"),T;return v?T=a(l,v):T=n(l),T.update(f,x,y),T}t.exports=i},8192:function(t,e,r){t.exports=i;var a=r(2825),n=r(3536),o=r(244);function i(l,f){var x=a(l[0],l[1],l[2]),y=a(f[0],f[1],f[2]);n(x,x),n(y,y);var v=o(x,y);return v>1?0:Math.acos(v)}},8210:function(t){t.exports=r;function e(a,n){var o=a+n,i=o-a,l=o-i,f=n-i,x=a-l,y=x+f;return y?[y,o]:[o]}function r(a,n){var o=a.length|0,i=n.length|0;if(o===1&&i===1)return e(a[0],n[0]);var l=o+i,f=new Array(l),x=0,y=0,v=0,T=Math.abs,u=a[y],b=T(u),_=n[v],P=T(_),M,C;b=i?(M=u,y+=1,yx)for(var R=f[u],O=1/Math.sqrt(h*k),w=0;w<3;++w){var j=(w+1)%3,V=(w+2)%3;R[w]+=O*(p[j]*A[V]-p[V]*A[j])}}for(var y=0;yx)for(var O=1/Math.sqrt(H),w=0;w<3;++w)R[w]*=O;else for(var w=0;w<3;++w)R[w]=0}return f},e.faceNormals=function(n,o,i){for(var l=n.length,f=new Array(l),x=i===void 0?a:i,y=0;yx?M=1/Math.sqrt(M):M=0;for(var u=0;u<3;++u)P[u]*=M;f[y]=P}return f}},8418:function(t,e,r){var a=r(5219),n=r(2762),o=r(8116),i=r(1888),l=r(6760),f=r(1283),x=r(9366),y=r(5964),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=ArrayBuffer,u=DataView;function b(at){return T.isView(at)&&!(at instanceof u)}function _(at){return Array.isArray(at)||b(at)}t.exports=rt;function P(at,vt){var it=at[0],Y=at[1],ft=at[2],ut=at[3];return at[0]=vt[0]*it+vt[4]*Y+vt[8]*ft+vt[12]*ut,at[1]=vt[1]*it+vt[5]*Y+vt[9]*ft+vt[13]*ut,at[2]=vt[2]*it+vt[6]*Y+vt[10]*ft+vt[14]*ut,at[3]=vt[3]*it+vt[7]*Y+vt[11]*ft+vt[15]*ut,at}function M(at,vt,it,Y){return P(Y,Y),P(Y,Y),P(Y,Y)}function C(at,vt){this.index=at,this.dataCoordinate=this.position=vt}function A(at){return at===!0||at>1?1:at}function h(at,vt,it,Y,ft,ut,kt,It,Pt,qt,Wt,Jt){this.gl=at,this.pixelRatio=1,this.shader=vt,this.orthoShader=it,this.projectShader=Y,this.pointBuffer=ft,this.colorBuffer=ut,this.glyphBuffer=kt,this.idBuffer=It,this.vao=Pt,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=qt,this.pickOrthoShader=Wt,this.pickProjectShader=Jt,this.points=[],this._selectResult=new C(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var p=h.prototype;p.pickSlots=1,p.setPickBase=function(at){this.pickId=at},p.isTransparent=function(){if(this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&this.projectHasAlpha)return!0;return!1},p.isOpaque=function(){if(!this.hasAlpha)return!0;for(var at=0;at<3;++at)if(this.axesProject[at]&&!this.projectHasAlpha)return!0;return!1};var k=[0,0],w=[0,0,0],R=[0,0,0],O=[0,0,0,1],j=[0,0,0,1],V=v.slice(),H=[0,0,0],F=[[0,0,0],[0,0,0]];function U(at){return at[0]=at[1]=at[2]=0,at}function W(at,vt){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[3]=1,at}function q(at,vt,it,Y){return at[0]=vt[0],at[1]=vt[1],at[2]=vt[2],at[it]=Y,at}function J(at){for(var vt=F,it=0;it<2;++it)for(var Y=0;Y<3;++Y)vt[it][Y]=Math.max(Math.min(at[it][Y],1e8),-1e8);return vt}function lt(at,vt,it,Y){var ft=vt.axesProject,ut=vt.gl,kt=at.uniforms,It=it.model||v,Pt=it.view||v,qt=it.projection||v,Wt=vt.axesBounds,Jt=J(vt.clipBounds),ge;vt.axes&&vt.axes.lastCubeProps?ge=vt.axes.lastCubeProps.axis:ge=[1,1,1],k[0]=2/ut.drawingBufferWidth,k[1]=2/ut.drawingBufferHeight,at.bind(),kt.view=Pt,kt.projection=qt,kt.screenSize=k,kt.highlightId=vt.highlightId,kt.highlightScale=vt.highlightScale,kt.clipBounds=Jt,kt.pickGroup=vt.pickId/255,kt.pixelRatio=Y;for(var fe=0;fe<3;++fe)if(ft[fe]){kt.scale=vt.projectScale[fe],kt.opacity=vt.projectOpacity[fe];for(var pe=V,se=0;se<16;++se)pe[se]=0;for(var se=0;se<4;++se)pe[5*se]=1;pe[5*fe]=0,ge[fe]<0?pe[12+fe]=Wt[0][fe]:pe[12+fe]=Wt[1][fe],l(pe,It,pe),kt.model=pe;var Tt=(fe+1)%3,Lt=(fe+2)%3,Mt=U(w),ee=U(R);Mt[Tt]=1,ee[Lt]=1;var ve=M(qt,Pt,It,W(O,Mt)),oe=M(qt,Pt,It,W(j,ee));if(Math.abs(ve[1])>Math.abs(oe[1])){var Te=ve;ve=oe,oe=Te,Te=Mt,Mt=ee,ee=Te;var He=Tt;Tt=Lt,Lt=He}ve[0]<0&&(Mt[Tt]=-1),oe[1]>0&&(ee[Lt]=-1);for(var Ge=0,cr=0,se=0;se<4;++se)Ge+=Math.pow(It[4*Tt+se],2),cr+=Math.pow(It[4*Lt+se],2);Mt[Tt]/=Math.sqrt(Ge),ee[Lt]/=Math.sqrt(cr),kt.axes[0]=Mt,kt.axes[1]=ee,kt.fragClipBounds[0]=q(H,Jt[0],fe,-1e8),kt.fragClipBounds[1]=q(H,Jt[1],fe,1e8),vt.vao.bind(),vt.vao.draw(ut.TRIANGLES,vt.vertexCount),vt.lineWidth>0&&(ut.lineWidth(vt.lineWidth*Y),vt.vao.draw(ut.LINES,vt.lineVertexCount,vt.vertexCount)),vt.vao.unbind()}}var yt=[-1e8,-1e8,-1e8],mt=[1e8,1e8,1e8],st=[yt,mt];function tt(at,vt,it,Y,ft,ut,kt){var It=it.gl;if((ut===it.projectHasAlpha||kt)&<(vt,it,Y,ft),ut===it.hasAlpha||kt){at.bind();var Pt=at.uniforms;Pt.model=Y.model||v,Pt.view=Y.view||v,Pt.projection=Y.projection||v,k[0]=2/It.drawingBufferWidth,k[1]=2/It.drawingBufferHeight,Pt.screenSize=k,Pt.highlightId=it.highlightId,Pt.highlightScale=it.highlightScale,Pt.fragClipBounds=st,Pt.clipBounds=it.axes.bounds,Pt.opacity=it.opacity,Pt.pickGroup=it.pickId/255,Pt.pixelRatio=ft,it.vao.bind(),it.vao.draw(It.TRIANGLES,it.vertexCount),it.lineWidth>0&&(It.lineWidth(it.lineWidth*ft),it.vao.draw(It.LINES,it.lineVertexCount,it.vertexCount)),it.vao.unbind()}}p.draw=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!1,!1)},p.drawTransparent=function(at){var vt=this.useOrtho?this.orthoShader:this.shader;tt(vt,this.projectShader,this,at,this.pixelRatio,!0,!1)},p.drawPick=function(at){var vt=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;tt(vt,this.pickProjectShader,this,at,1,!0,!0)},p.pick=function(at){if(!at||at.id!==this.pickId)return null;var vt=at.value[2]+(at.value[1]<<8)+(at.value[0]<<16);if(vt>=this.pointCount||vt<0)return null;var it=this.points[vt],Y=this._selectResult;Y.index=vt;for(var ft=0;ft<3;++ft)Y.position[ft]=Y.dataCoordinate[ft]=it[ft];return Y},p.highlight=function(at){if(!at)this.highlightId=[1,1,1,1];else{var vt=at.index,it=vt&255,Y=vt>>8&255,ft=vt>>16&255;this.highlightId=[it/255,Y/255,ft/255,0]}};function dt(at,vt,it,Y){var ft;_(at)?vt0){var nn=0,Le=Lt,Gt=[0,0,0,1],ne=[0,0,0,1],Ct=_(ge)&&_(ge[0]),gt=_(se)&&_(se[0]);t:for(var Y=0;Y0?1-cr[0][0]:qe<0?1+cr[1][0]:1,or*=or>0?1-cr[0][1]:or<0?1+cr[1][1]:1;for(var Sr=[qe,or],Ar=He.cells||[],mr=He.positions||[],oe=0;oe=i?(M=u,y+=1,y0?1:0}},8648:function(t,e,r){t.exports=r(783)},8692:function(t){t.exports=e;function e(r,a,n,o){var i=n[0],l=n[1],f=a[0]-i,x=a[1]-l,y=Math.sin(o),v=Math.cos(o);return r[0]=i+f*v-x*y,r[1]=l+f*y+x*v,r[2]=a[2],r}},8697:function(t,e,r){var a=r(869);t.exports=n;function n(o,i){return a(o[0].mul(i[1]),o[1].mul(i[0]))}},8731:function(t,e,r){t.exports=x;var a=r(8866);function n(y,v,T,u,b,_){this._gl=y,this._wrapper=v,this._index=T,this._locations=u,this._dimension=b,this._constFunc=_}var o=n.prototype;o.pointer=function(y,v,T,u){var b=this,_=b._gl,P=b._locations[b._index];_.vertexAttribPointer(P,b._dimension,y||_.FLOAT,!!v,T||0,u||0),_.enableVertexAttribArray(P)},o.set=function(y,v,T,u){return this._constFunc(this._locations[this._index],y,v,T,u)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(y){return y!==this._locations[this._index]&&(this._locations[this._index]=y|0,this._wrapper.program=null),y|0}});var i=[function(y,v,T){return T.length===void 0?y.vertexAttrib1f(v,T):y.vertexAttrib1fv(v,T)},function(y,v,T,u){return T.length===void 0?y.vertexAttrib2f(v,T,u):y.vertexAttrib2fv(v,T)},function(y,v,T,u,b){return T.length===void 0?y.vertexAttrib3f(v,T,u,b):y.vertexAttrib3fv(v,T)},function(y,v,T,u,b,_){return T.length===void 0?y.vertexAttrib4f(v,T,u,b,_):y.vertexAttrib4fv(v,T)}];function l(y,v,T,u,b,_,P){var M=i[b],C=new n(y,v,T,u,b,M);Object.defineProperty(_,P,{set:function(A){return y.disableVertexAttribArray(u[T]),M(y,u[T],A),A},get:function(){return C},enumerable:!0})}function f(y,v,T,u,b,_,P){for(var M=new Array(b),C=new Array(b),A=0;A=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+C+": "+A);l(y,v,h[0],u,p,b,C)}else if(A.indexOf("mat")>=0){var p=A.charCodeAt(A.length-1)-48;if(p<2||p>4)throw new a("","Invalid data type for attribute "+C+": "+A);f(y,v,h,u,p,b,C)}else throw new a("","Unknown data type for attribute "+C+": "+A);break}}return b}},8828:function(t,e){"use restrict";var r=32;e.INT_BITS=r,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(o<0)},e.abs=function(o){var i=o>>r-1;return(o^i)-i},e.min=function(o,i){return i^(o^i)&-(o65535)<<4,o>>>=i,l=(o>255)<<3,o>>>=l,i|=l,l=(o>15)<<2,o>>>=l,i|=l,l=(o>3)<<1,o>>>=l,i|=l,i|o>>1},e.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},e.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function a(o){var i=32;return o&=-o,o&&i--,o&65535&&(i-=16),o&16711935&&(i-=8),o&252645135&&(i-=4),o&858993459&&(i-=2),o&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},e.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},e.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var n=new Array(256);(function(o){for(var i=0;i<256;++i){var l=i,f=i,x=7;for(l>>>=1;l;l>>>=1)f<<=1,f|=l&1,--x;o[i]=f<>>8&255]<<16|n[o>>>16&255]<<8|n[o>>>24&255]},e.interleave2=function(o,i){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,o|i<<1},e.deinterleave2=function(o,i){return o=o>>>i&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},e.interleave3=function(o,i,l){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,o|=i<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,o|l<<2},e.deinterleave3=function(o,i){return o=o>>>i&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},e.nextCombination=function(o){var i=o|o-1;return i+1|(~i&-~i)-1>>>a(o)+1}},8866:function(t){function e(r,a,n){this.shortMessage=a||"",this.longMessage=n||"",this.rawError=r||"",this.message="gl-shader: "+(a||r||"")+(n?` +`+n:""),this.stack=new Error().stack}e.prototype=new Error,e.prototype.name="GLError",e.prototype.constructor=e,t.exports=e},8902:function(t,e,r){var a=r(2478),n=r(3250)[3],o=0,i=1,l=2;t.exports=P;function f(M,C,A,h,p){this.a=M,this.b=C,this.idx=A,this.lowerIds=h,this.upperIds=p}function x(M,C,A,h){this.a=M,this.b=C,this.type=A,this.idx=h}function y(M,C){var A=M.a[0]-C.a[0]||M.a[1]-C.a[1]||M.type-C.type;return A||M.type!==o&&(A=n(M.a,M.b,C.b),A)?A:M.idx-C.idx}function v(M,C){return n(M.a,M.b,C)}function T(M,C,A,h,p){for(var k=a.lt(C,h,v),w=a.gt(C,h,v),R=k;R1&&n(A[j[V-2]],A[j[V-1]],h)>0;)M.push([j[V-1],j[V-2],p]),V-=1;j.length=V,j.push(p);for(var H=O.upperIds,V=H.length;V>1&&n(A[H[V-2]],A[H[V-1]],h)<0;)M.push([H[V-2],H[V-1],p]),V-=1;H.length=V,H.push(p)}}function u(M,C){var A;return M.a[0]O[0]&&p.push(new x(O,R,l,k),new x(R,O,i,k))}p.sort(y);for(var j=p[0].a[0]-(1+Math.abs(p[0].a[0]))*Math.pow(2,-52),V=[new f([j,1],[j,0],-1,[],[])],H=[],k=0,F=p.length;k0;){b=h.pop();for(var p=b.adjacent,k=0;k<=P;++k){var w=p[k];if(!(!w.boundary||w.lastVisited<=-M)){for(var R=w.vertices,O=0;O<=P;++O){var j=R[O];j<0?C[O]=_:C[O]=A[j]}var V=this.orient();if(V>0)return w;w.lastVisited=-M,V===0&&h.push(w)}}}return null},T.walk=function(b,_){var P=this.vertices.length-1,M=this.dimension,C=this.vertices,A=this.tuple,h=_?this.interior.length*Math.random()|0:this.interior.length-1,p=this.interior[h];t:for(;!p.boundary;){for(var k=p.vertices,w=p.adjacent,R=0;R<=M;++R)A[R]=C[k[R]];p.lastVisited=P;for(var R=0;R<=M;++R){var O=w[R];if(!(O.lastVisited>=P)){var j=A[R];A[R]=b;var V=this.orient();if(A[R]=j,V<0){p=O;continue t}else O.boundary?O.lastVisited=-P:O.lastVisited=P}}return}return p},T.addPeaks=function(b,_){var P=this.vertices.length-1,M=this.dimension,C=this.vertices,A=this.tuple,h=this.interior,p=this.simplices,k=[_];_.lastVisited=P,_.vertices[_.vertices.indexOf(-1)]=P,_.boundary=!1,h.push(_);for(var w=[];k.length>0;){var _=k.pop(),R=_.vertices,O=_.adjacent,j=R.indexOf(P);if(!(j<0)){for(var V=0;V<=M;++V)if(V!==j){var H=O[V];if(!(!H.boundary||H.lastVisited>=P)){var F=H.vertices;if(H.lastVisited!==-P){for(var U=0,W=0;W<=M;++W)F[W]<0?(U=W,A[W]=b):A[W]=C[F[W]];var q=this.orient();if(q>0){F[U]=P,H.boundary=!1,h.push(H),k.push(H),H.lastVisited=P;continue}else H.lastVisited=-P}var J=H.adjacent,lt=R.slice(),yt=O.slice(),mt=new o(lt,yt,!0);p.push(mt);var st=J.indexOf(_);if(!(st<0)){J[st]=mt,yt[j]=H,lt[V]=-1,yt[V]=_,O[V]=mt,mt.flip();for(var W=0;W<=M;++W){var tt=lt[W];if(!(tt<0||tt===P)){for(var dt=new Array(M-1),rt=0,at=0;at<=M;++at){var vt=lt[at];vt<0||at===W||(dt[rt++]=vt)}w.push(new i(dt,mt,W))}}}}}}}w.sort(l);for(var V=0;V+1=0?h[k++]=p[R]:w=R&1;if(w===(b&1)){var O=h[0];h[0]=h[1],h[1]=O}_.push(h)}}return _};function u(b,_){var P=b.length;if(P===0)throw new Error("Must have at least d+1 points");var M=b[0].length;if(P<=M)throw new Error("Must input at least d+1 points");var C=b.slice(0,M+1),A=a.apply(void 0,C);if(A===0)throw new Error("Input not in general position");for(var h=new Array(M+1),p=0;p<=M;++p)h[p]=p;A<0&&(h[0]=1,h[1]=0);for(var k=new o(h,new Array(M+1),!1),w=k.adjacent,R=new Array(M+2),p=0;p<=M;++p){for(var O=h.slice(),j=0;j<=M;++j)j===p&&(O[j]=-1);var V=O[0];O[0]=O[1],O[1]=V;var H=new o(O,new Array(M+1),!0);w[p]=H,R[p]=H}R[M+1]=k;for(var p=0;p<=M;++p)for(var O=w[p].vertices,F=w[p].adjacent,j=0;j<=M;++j){var U=O[j];if(U<0){F[j]=k;continue}for(var W=0;W<=M;++W)w[W].vertices.indexOf(U)<0&&(F[j]=w[W])}for(var q=new v(M,C,R),J=!!_,p=M+1;p=1},u.isTransparent=function(){return this.opacity<1},u.pickSlots=1,u.setPickBase=function(A){this.pickId=A};function b(A){for(var h=y({colormap:A,nshades:256,format:"rgba"}),p=new Uint8Array(1024),k=0;k<256;++k){for(var w=h[k],R=0;R<3;++R)p[4*k+R]=w[R];p[4*k+3]=w[3]*255}return x(p,[256,256,4],[4,0,1])}function _(A){for(var h=A.length,p=new Array(h),k=0;k0){var W=this.triShader;W.bind(),W.uniforms=j,this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},u.drawPick=function(A){A=A||{};for(var h=this.gl,p=A.model||v,k=A.view||v,w=A.projection||v,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)R[0][O]=Math.max(R[0][O],this.clipBounds[0][O]),R[1][O]=Math.min(R[1][O],this.clipBounds[1][O]);this._model=[].slice.call(p),this._view=[].slice.call(k),this._projection=[].slice.call(w),this._resolution=[h.drawingBufferWidth,h.drawingBufferHeight];var j={model:p,view:k,projection:w,clipBounds:R,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},V=this.pickShader;V.bind(),V.uniforms=j,this.triangleCount>0&&(this.triangleVAO.bind(),h.drawArrays(h.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},u.pick=function(A){if(!A||A.id!==this.pickId)return null;var h=A.value[0]+256*A.value[1]+65536*A.value[2],p=this.cells[h],k=this.positions[p[1]].slice(0,3),w={position:k,dataCoordinate:k,index:Math.floor(p[1]/48)};return this.traceType==="cone"?w.index=Math.floor(p[1]/48):this.traceType==="streamtube"&&(w.intensity=this.intensity[p[1]],w.velocity=this.vectors[p[1]].slice(0,3),w.divergence=this.vectors[p[1]][3],w.index=h),w},u.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function P(A,h){var p=a(A,h.meshShader.vertex,h.meshShader.fragment,null,h.meshShader.attributes);return p.attributes.position.location=0,p.attributes.color.location=2,p.attributes.uv.location=3,p.attributes.vector.location=4,p}function M(A,h){var p=a(A,h.pickShader.vertex,h.pickShader.fragment,null,h.pickShader.attributes);return p.attributes.position.location=0,p.attributes.id.location=1,p.attributes.vector.location=4,p}function C(A,h,p){var k=p.shaders;arguments.length===1&&(h=A,A=h.gl);var w=P(A,k),R=M(A,k),O=i(A,x(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=A.LINEAR_MIPMAP_LINEAR,O.magFilter=A.LINEAR;var j=n(A),V=n(A),H=n(A),F=n(A),U=n(A),W=o(A,[{buffer:j,type:A.FLOAT,size:4},{buffer:U,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:H,type:A.FLOAT,size:4},{buffer:F,type:A.FLOAT,size:2},{buffer:V,type:A.FLOAT,size:4}]),q=new T(A,O,w,R,j,V,U,H,F,W,p.traceType||"cone");return q.update(h),q}t.exports=C},9127:function(t,e,r){t.exports=o;var a=r(6204),n=r(5771);function o(i){return n(a(i))}},9131:function(t,e,r){var a=r(5177),n=r(9288);t.exports=o;function o(i,l){return l=l||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),a(i,i),n(i,i,l),i}},9165:function(t,e,r){t.exports=T;var a=r(2762),n=r(8116),o=r(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function l(u,b,_,P){this.gl=u,this.shader=P,this.buffer=b,this.vao=_,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var f=l.prototype;f.isOpaque=function(){return!this.hasAlpha},f.isTransparent=function(){return this.hasAlpha},f.drawTransparent=f.draw=function(u){var b=this.gl,_=this.shader.uniforms;this.shader.bind();var P=_.view=u.view||i,M=_.projection=u.projection||i;_.model=u.model||i,_.clipBounds=this.clipBounds,_.opacity=this.opacity;var C=P[12],A=P[13],h=P[14],p=P[15],k=u._ortho||!1,w=k?2:1,R=w*this.pixelRatio*(M[3]*C+M[7]*A+M[11]*h+M[15]*p)/b.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)b.lineWidth(this.lineWidth[O]*this.pixelRatio),_.capSize=this.capSize[O]*R,this.lineCount[O]&&b.drawArrays(b.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function x(u,b){for(var _=0;_<3;++_)u[0][_]=Math.min(u[0][_],b[_]),u[1][_]=Math.max(u[1][_],b[_])}var y=function(){for(var u=new Array(3),b=0;b<3;++b){for(var _=[],P=1;P<=2;++P)for(var M=-1;M<=1;M+=2){var C=(P+b)%3,A=[0,0,0];A[C]=M,_.push(A)}u[b]=_}return u}();function v(u,b,_,P){for(var M=y[P],C=0;C0){var j=k.slice();j[h]+=R[1][h],M.push(k[0],k[1],k[2],O[0],O[1],O[2],O[3],0,0,0,j[0],j[1],j[2],O[0],O[1],O[2],O[3],0,0,0),x(this.bounds,j),A+=2+v(M,j,O,h)}}}this.lineCount[h]=A-this.lineOffset[h]}this.buffer.update(M)}},f.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function T(u){var b=u.gl,_=a(b),P=n(b,[{buffer:_,type:b.FLOAT,size:3,offset:0,stride:40},{buffer:_,type:b.FLOAT,size:4,offset:12,stride:40},{buffer:_,type:b.FLOAT,size:3,offset:28,stride:40}]),M=o(b);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var C=new l(b,_,P,M);return C.update(u),C}},9215:function(t,e,r){t.exports=x;var a=r(4769),n=r(2478);function o(y,v,T){return Math.min(v,Math.max(y,T))}function i(y,v,T){this.dimension=y.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var u=0;u=T-1)for(var A=_.length-1,p=y-v[T-1],h=0;h=T-1)for(var C=_.length-1,A=y-v[T-1],h=0;h=0;--T)if(y[--v])return!1;return!0},l.jump=function(y){var v=this.lastT(),T=this.dimension;if(!(y0;--h)u.push(o(M[h-1],C[h-1],arguments[h])),b.push(0)}},l.push=function(y){var v=this.lastT(),T=this.dimension;if(!(y1e-6?1/P:0;this._time.push(y);for(var p=T;p>0;--p){var k=o(C[p-1],A[p-1],arguments[p]);u.push(k),b.push((k-u[_++])*h)}}},l.set=function(y){var v=this.dimension;if(!(y0;--M)T.push(o(_[M-1],P[M-1],arguments[M])),u.push(0)}},l.move=function(y){var v=this.lastT(),T=this.dimension;if(!(y<=v||arguments.length!==T+1)){var u=this._state,b=this._velocity,_=u.length-this.dimension,P=this.bounds,M=P[0],C=P[1],A=y-v,h=A>1e-6?1/A:0;this._time.push(y);for(var p=T;p>0;--p){var k=arguments[p];u.push(o(M[p-1],C[p-1],u[_++]+k)),b.push(k*h)}}},l.idle=function(y){var v=this.lastT();if(!(y=0;--h)u.push(o(M[h],C[h],u[_]+A*b[_])),b.push(0),_+=1}};function f(y){for(var v=new Array(y),T=0;T1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(l=!0),l}},9226:function(t){t.exports=e;function e(r,a){return r[0]=Math.ceil(a[0]),r[1]=Math.ceil(a[1]),r[2]=Math.ceil(a[2]),r}},9265:function(t){t.exports=e;function e(r,a){return r[0]===a[0]&&r[1]===a[1]&&r[2]===a[2]}},9288:function(t){t.exports=e;function e(r,a,n){return r[0]=a[0]*n,r[1]=a[1]*n,r[2]=a[2]*n,r[3]=a[3]*n,r}},9346:function(t){var e=new Float64Array(4),r=new Float64Array(4),a=new Float64Array(4);function n(o,i,l,f,x){e.length=v?(p=1,w=v+2*b+P):(p=-b/v,w=b*p+P)):(p=0,_>=0?(k=0,w=P):-_>=u?(k=1,w=u+2*_+P):(k=-_/u,w=_*k+P));else if(k<0)k=0,b>=0?(p=0,w=P):-b>=v?(p=1,w=v+2*b+P):(p=-b/v,w=b*p+P);else{var R=1/h;p*=R,k*=R,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P}else{var O,j,V,H;p<0?(O=T+b,j=u+_,j>O?(V=j-O,H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+P):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P)):(p=0,j<=0?(k=1,w=u+2*_+P):_>=0?(k=0,w=P):(k=-_/u,w=_*k+P))):k<0?(O=T+_,j=v+b,j>O?(V=j-O,H=v-2*T+u,V>=H?(k=1,p=0,w=u+2*_+P):(k=V/H,p=1-k,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P)):(k=0,j<=0?(p=1,w=v+2*b+P):b>=0?(p=0,w=P):(p=-b/v,w=b*p+P))):(V=u+_-T-b,V<=0?(p=0,k=1,w=u+2*_+P):(H=v-2*T+u,V>=H?(p=1,k=0,w=v+2*b+P):(p=V/H,k=1-p,w=p*(v*p+T*k+2*b)+k*(T*p+u*k+2*_)+P)))}for(var F=1-p-k,y=0;y_)for(u=_;ub)for(u=b;u<_;u++)this.gl.disableVertexAttribArray(u);this.gl.lastAttribCount=b,this.gl.useProgram(this.program)},y.dispose=function(){for(var u=this.gl.lastAttribCount,b=0;b=0){for(var F=H.type.charAt(H.type.length-1)|0,U=new Array(F),W=0;W=0;)q+=1;j[V]=q}var J=new Array(_.length);function lt(){C.program=i.program(A,C._vref,C._fref,O,j);for(var yt=0;yt<_.length;++yt)J[yt]=A.getUniformLocation(C.program,_[yt].name)}lt(),C._relink=lt,C.types={uniforms:o(_),attributes:o(P)},C.attributes=n(A,C,R,j),Object.defineProperty(C,"uniforms",a(A,C,_,J))};function T(u,b,_,P,M){var C=new x(u);return C.update(b,_,P,M),C}t.exports=T},9499:function(t,e,r){t.exports=vt;var a=r(8828),n=r(2762),o=r(8116),i=r(7766),l=r(1888),f=r(6729),x=r(5298),y=r(9994),v=r(9618),T=r(3711),u=r(6760),b=r(7608),_=r(2478),P=r(6199),M=r(990),C=M.createShader,A=M.createContourShader,h=M.createPickShader,p=M.createPickContourShader,k=40,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],R=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],O=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var it=0;it<3;++it){var Y=O[it],ft=(it+1)%3,ut=(it+2)%3;Y[ft+0]=1,Y[ut+3]=1,Y[it+6]=1}})();function j(it,Y,ft,ut,kt){this.position=it,this.index=Y,this.uv=ft,this.level=ut,this.dataCoordinate=kt}var V=256;function H(it,Y,ft,ut,kt,It,Pt,qt,Wt,Jt,ge,fe,pe,se,Tt){this.gl=it,this.shape=Y,this.bounds=ft,this.objectOffset=Tt,this.intensityBounds=[],this._shader=ut,this._pickShader=kt,this._coordinateBuffer=It,this._vao=Pt,this._colorMap=qt,this._contourShader=Wt,this._contourPickShader=Jt,this._contourBuffer=ge,this._contourVAO=fe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new j([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=pe,this._dynamicVAO=se,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[v(l.mallocFloat(1024),[0,0]),v(l.mallocFloat(1024),[0,0]),v(l.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=H.prototype;F.genColormap=function(it,Y){var ft=!1,ut=y([f({colormap:it,nshades:V,format:"rgba"}).map(function(kt,It){var Pt=Y?U(It/255,Y):kt[3];return Pt<1&&(ft=!0),[kt[0],kt[1],kt[2],255*Pt]})]);return x.divseq(ut,255),this.hasAlphaScale=ft,ut},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(it){this.pickId=it};function U(it,Y){if(!Y||!Y.length)return 1;for(var ft=0;ftit&&ft>0){var ut=(Y[ft][0]-it)/(Y[ft][0]-Y[ft-1][0]);return Y[ft][1]*(1-ut)+ut*Y[ft-1][1]}}return 1}var W=[0,0,0],q={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function J(it,Y){var ft,ut,kt,It=Y.axes&&Y.axes.lastCubeProps.axis||W,Pt=Y.showSurface,qt=Y.showContour;for(ft=0;ft<3;++ft)for(Pt=Pt||Y.surfaceProject[ft],ut=0;ut<3;++ut)qt=qt||Y.contourProject[ft][ut];for(ft=0;ft<3;++ft){var Wt=q.projections[ft];for(ut=0;ut<16;++ut)Wt[ut]=0;for(ut=0;ut<4;++ut)Wt[5*ut]=1;Wt[5*ft]=0,Wt[12+ft]=Y.axesBounds[+(It[ft]>0)][ft],u(Wt,it.model,Wt);var Jt=q.clipBounds[ft];for(kt=0;kt<2;++kt)for(ut=0;ut<3;++ut)Jt[kt][ut]=it.clipBounds[kt][ut];Jt[0][ft]=-1e8,Jt[1][ft]=1e8}return q.showSurface=Pt,q.showContour=qt,q}var lt={model:w,view:w,projection:w,inverseModel:w.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},yt=w.slice(),mt=[1,0,0,0,1,0,0,0,1];function st(it,Y){it=it||{};var ft=this.gl;ft.disable(ft.CULL_FACE),this._colorMap.bind(0);var ut=lt;ut.model=it.model||w,ut.view=it.view||w,ut.projection=it.projection||w,ut.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ut.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ut.objectOffset=this.objectOffset,ut.contourColor=this.contourColor[0],ut.inverseModel=b(ut.inverseModel,ut.model);for(var kt=0;kt<2;++kt)for(var It=ut.clipBounds[kt],Pt=0;Pt<3;++Pt)It[Pt]=Math.min(Math.max(this.clipBounds[kt][Pt],-1e8),1e8);ut.kambient=this.ambientLight,ut.kdiffuse=this.diffuseLight,ut.kspecular=this.specularLight,ut.roughness=this.roughness,ut.fresnel=this.fresnel,ut.opacity=this.opacity,ut.height=0,ut.permutation=mt,ut.vertexColor=this.vertexColor;var qt=yt;for(u(qt,ut.view,ut.model),u(qt,ut.projection,qt),b(qt,qt),kt=0;kt<3;++kt)ut.eyePosition[kt]=qt[12+kt]/qt[15];var Wt=qt[15];for(kt=0;kt<3;++kt)Wt+=this.lightPosition[kt]*qt[4*kt+3];for(kt=0;kt<3;++kt){var Jt=qt[12+kt];for(Pt=0;Pt<3;++Pt)Jt+=qt[4*Pt+kt]*this.lightPosition[Pt];ut.lightPosition[kt]=Jt/Wt}var ge=J(ut,this);if(ge.showSurface){for(this._shader.bind(),this._shader.uniforms=ut,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ft.TRIANGLES,this._vertexCount),kt=0;kt<3;++kt)!this.surfaceProject[kt]||!this.vertexCount||(this._shader.uniforms.model=ge.projections[kt],this._shader.uniforms.clipBounds=ge.clipBounds[kt],this._vao.draw(ft.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ge.showContour){var fe=this._contourShader;ut.kambient=1,ut.kdiffuse=0,ut.kspecular=0,ut.opacity=1,fe.bind(),fe.uniforms=ut;var pe=this._contourVAO;for(pe.bind(),kt=0;kt<3;++kt)for(fe.uniforms.permutation=O[kt],ft.lineWidth(this.contourWidth[kt]*this.pixelRatio),Pt=0;Pt>4)/16)/255,kt=Math.floor(ut),It=ut-kt,Pt=Y[1]*(it.value[1]+(it.value[2]&15)/16)/255,qt=Math.floor(Pt),Wt=Pt-qt;kt+=1,qt+=1;var Jt=ft.position;Jt[0]=Jt[1]=Jt[2]=0;for(var ge=0;ge<2;++ge)for(var fe=ge?It:1-It,pe=0;pe<2;++pe)for(var se=pe?Wt:1-Wt,Tt=kt+ge,Lt=qt+pe,Mt=fe*se,ee=0;ee<3;++ee)Jt[ee]+=this._field[ee].get(Tt,Lt)*Mt;for(var ve=this._pickResult.level,oe=0;oe<3;++oe)if(ve[oe]=_.le(this.contourLevels[oe],Jt[oe]),ve[oe]<0)this.contourLevels[oe].length>0&&(ve[oe]=0);else if(ve[oe]Math.abs(He-Jt[oe])&&(ve[oe]+=1)}for(ft.index[0]=It<.5?kt:kt+1,ft.index[1]=Wt<.5?qt:qt+1,ft.uv[0]=ut/Y[0],ft.uv[1]=Pt/Y[1],ee=0;ee<3;++ee)ft.dataCoordinate[ee]=this._field[ee].get(ft.index[0],ft.index[1]);return ft},F.padField=function(it,Y){var ft=Y.shape.slice(),ut=it.shape.slice();x.assign(it.lo(1,1).hi(ft[0],ft[1]),Y),x.assign(it.lo(1).hi(ft[0],1),Y.hi(ft[0],1)),x.assign(it.lo(1,ut[1]-1).hi(ft[0],1),Y.lo(0,ft[1]-1).hi(ft[0],1)),x.assign(it.lo(0,1).hi(1,ft[1]),Y.hi(1)),x.assign(it.lo(ut[0]-1,1).hi(1,ft[1]),Y.lo(ft[0]-1)),it.set(0,0,Y.get(0,0)),it.set(0,ut[1]-1,Y.get(0,ft[1]-1)),it.set(ut[0]-1,0,Y.get(ft[0]-1,0)),it.set(ut[0]-1,ut[1]-1,Y.get(ft[0]-1,ft[1]-1))};function dt(it,Y){return Array.isArray(it)?[Y(it[0]),Y(it[1]),Y(it[2])]:[Y(it),Y(it),Y(it)]}function rt(it){return Array.isArray(it)?it.length===3?[it[0],it[1],it[2],1]:[it[0],it[1],it[2],it[3]]:[0,0,0,1]}function at(it){if(Array.isArray(it)){if(Array.isArray(it))return[rt(it[0]),rt(it[1]),rt(it[2])];var Y=rt(it);return[Y.slice(),Y.slice(),Y.slice()]}}F.update=function(it){it=it||{},this.objectOffset=it.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in it&&(this.contourWidth=dt(it.contourWidth,Number)),"showContour"in it&&(this.showContour=dt(it.showContour,Boolean)),"showSurface"in it&&(this.showSurface=!!it.showSurface),"contourTint"in it&&(this.contourTint=dt(it.contourTint,Boolean)),"contourColor"in it&&(this.contourColor=at(it.contourColor)),"contourProject"in it&&(this.contourProject=dt(it.contourProject,function(Xi){return dt(Xi,Boolean)})),"surfaceProject"in it&&(this.surfaceProject=it.surfaceProject),"dynamicColor"in it&&(this.dynamicColor=at(it.dynamicColor)),"dynamicTint"in it&&(this.dynamicTint=dt(it.dynamicTint,Number)),"dynamicWidth"in it&&(this.dynamicWidth=dt(it.dynamicWidth,Number)),"opacity"in it&&(this.opacity=it.opacity),"opacityscale"in it&&(this.opacityscale=it.opacityscale),"colorBounds"in it&&(this.colorBounds=it.colorBounds),"vertexColor"in it&&(this.vertexColor=it.vertexColor?1:0),"colormap"in it&&this._colorMap.setPixels(this.genColormap(it.colormap,this.opacityscale));var Y=it.field||it.coords&&it.coords[2]||null,ft=!1;if(Y||(this._field[2].shape[0]||this._field[2].shape[2]?Y=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Y=this._field[2].hi(0,0)),"field"in it||"coords"in it){var ut=(Y.shape[0]+2)*(Y.shape[1]+2);ut>this._field[2].data.length&&(l.freeFloat(this._field[2].data),this._field[2].data=l.mallocFloat(a.nextPow2(ut))),this._field[2]=v(this._field[2].data,[Y.shape[0]+2,Y.shape[1]+2]),this.padField(this._field[2],Y),this.shape=Y.shape.slice();for(var kt=this.shape,It=0;It<2;++It)this._field[2].size>this._field[It].data.length&&(l.freeFloat(this._field[It].data),this._field[It].data=l.mallocFloat(this._field[2].size)),this._field[It]=v(this._field[It].data,[kt[0]+2,kt[1]+2]);if(it.coords){var Pt=it.coords;if(!Array.isArray(Pt)||Pt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(It=0;It<2;++It){var qt=Pt[It];for(pe=0;pe<2;++pe)if(qt.shape[pe]!==kt[pe])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[It],qt)}}else if(it.ticks){var Wt=it.ticks;if(!Array.isArray(Wt)||Wt.length!==2)throw new Error("gl-surface: invalid ticks");for(It=0;It<2;++It){var Jt=Wt[It];if((Array.isArray(Jt)||Jt.length)&&(Jt=v(Jt)),Jt.shape[0]!==kt[It])throw new Error("gl-surface: invalid tick length");var ge=v(Jt.data,kt);ge.stride[It]=Jt.stride[0],ge.stride[It^1]=0,this.padField(this._field[It],ge)}}else{for(It=0;It<2;++It){var fe=[0,0];fe[It]=1,this._field[It]=v(this._field[It].data,[kt[0]+2,kt[1]+2],fe,0)}this._field[0].set(0,0,0);for(var pe=0;pe0){for(var Oi=0;Oi<5;++Oi)Ar.pop();Ct-=1}continue t}}}Wn.push(Ct)}this._contourOffsets[mr]=Hn,this._contourCounts[mr]=Wn}var ji=l.mallocFloat(Ar.length);for(It=0;It=0&&(A=M|0,C+=p*A,h-=A),new _(this.data,h,p,C)},P.step=function(M){var C=this.shape[0],A=this.stride[0],h=this.offset,p=0,k=Math.ceil;return typeof M=="number"&&(p=M|0,p<0?(h+=A*(C-1),C=k(-C/p)):C=k(C/p),A*=p),new _(this.data,C,A,h)},P.transpose=function(M){M=M===void 0?0:M|0;var C=this.shape,A=this.stride;return new _(this.data,C[M],A[M],this.offset)},P.pick=function(M){var C=[],A=[],h=this.offset;typeof M=="number"&&M>=0?h=h+this.stride[0]*M|0:(C.push(this.shape[0]),A.push(this.stride[0]));var p=u[C.length+1];return p(this.data,C,A,h)},function(M,C,A,h){return new _(M,C[0],A[0],h)}},2:function(T,u,b){function _(M,C,A,h,p,k){this.data=M,this.shape=[C,A],this.stride=[h,p],this.offset=k|0}var P=_.prototype;return P.dtype=T,P.dimension=2,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(P,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),P.set=function(M,C,A){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C,A):this.data[this.offset+this.stride[0]*M+this.stride[1]*C]=A},P.get=function(M,C){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C):this.data[this.offset+this.stride[0]*M+this.stride[1]*C]},P.index=function(M,C){return this.offset+this.stride[0]*M+this.stride[1]*C},P.hi=function(M,C){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},P.lo=function(M,C){var A=this.offset,h=0,p=this.shape[0],k=this.shape[1],w=this.stride[0],R=this.stride[1];return typeof M=="number"&&M>=0&&(h=M|0,A+=w*h,p-=h),typeof C=="number"&&C>=0&&(h=C|0,A+=R*h,k-=h),new _(this.data,p,k,w,R,A)},P.step=function(M,C){var A=this.shape[0],h=this.shape[1],p=this.stride[0],k=this.stride[1],w=this.offset,R=0,O=Math.ceil;return typeof M=="number"&&(R=M|0,R<0?(w+=p*(A-1),A=O(-A/R)):A=O(A/R),p*=R),typeof C=="number"&&(R=C|0,R<0?(w+=k*(h-1),h=O(-h/R)):h=O(h/R),k*=R),new _(this.data,A,h,p,k,w)},P.transpose=function(M,C){M=M===void 0?0:M|0,C=C===void 0?1:C|0;var A=this.shape,h=this.stride;return new _(this.data,A[M],A[C],h[M],h[C],this.offset)},P.pick=function(M,C){var A=[],h=[],p=this.offset;typeof M=="number"&&M>=0?p=p+this.stride[0]*M|0:(A.push(this.shape[0]),h.push(this.stride[0])),typeof C=="number"&&C>=0?p=p+this.stride[1]*C|0:(A.push(this.shape[1]),h.push(this.stride[1]));var k=u[A.length+1];return k(this.data,A,h,p)},function(M,C,A,h){return new _(M,C[0],C[1],A[0],A[1],h)}},3:function(T,u,b){function _(M,C,A,h,p,k,w,R){this.data=M,this.shape=[C,A,h],this.stride=[p,k,w],this.offset=R|0}var P=_.prototype;return P.dtype=T,P.dimension=3,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(P,"order",{get:function(){var M=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),A=Math.abs(this.stride[2]);return M>C?C>A?[2,1,0]:M>A?[1,2,0]:[1,0,2]:M>A?[2,0,1]:A>C?[0,1,2]:[0,2,1]}}),P.set=function(M,C,A,h){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A,h):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A]=h},P.get=function(M,C,A){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A]},P.index=function(M,C,A){return this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A},P.hi=function(M,C,A){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof A!="number"||A<0?this.shape[2]:A|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},P.lo=function(M,C,A){var h=this.offset,p=0,k=this.shape[0],w=this.shape[1],R=this.shape[2],O=this.stride[0],j=this.stride[1],V=this.stride[2];return typeof M=="number"&&M>=0&&(p=M|0,h+=O*p,k-=p),typeof C=="number"&&C>=0&&(p=C|0,h+=j*p,w-=p),typeof A=="number"&&A>=0&&(p=A|0,h+=V*p,R-=p),new _(this.data,k,w,R,O,j,V,h)},P.step=function(M,C,A){var h=this.shape[0],p=this.shape[1],k=this.shape[2],w=this.stride[0],R=this.stride[1],O=this.stride[2],j=this.offset,V=0,H=Math.ceil;return typeof M=="number"&&(V=M|0,V<0?(j+=w*(h-1),h=H(-h/V)):h=H(h/V),w*=V),typeof C=="number"&&(V=C|0,V<0?(j+=R*(p-1),p=H(-p/V)):p=H(p/V),R*=V),typeof A=="number"&&(V=A|0,V<0?(j+=O*(k-1),k=H(-k/V)):k=H(k/V),O*=V),new _(this.data,h,p,k,w,R,O,j)},P.transpose=function(M,C,A){M=M===void 0?0:M|0,C=C===void 0?1:C|0,A=A===void 0?2:A|0;var h=this.shape,p=this.stride;return new _(this.data,h[M],h[C],h[A],p[M],p[C],p[A],this.offset)},P.pick=function(M,C,A){var h=[],p=[],k=this.offset;typeof M=="number"&&M>=0?k=k+this.stride[0]*M|0:(h.push(this.shape[0]),p.push(this.stride[0])),typeof C=="number"&&C>=0?k=k+this.stride[1]*C|0:(h.push(this.shape[1]),p.push(this.stride[1])),typeof A=="number"&&A>=0?k=k+this.stride[2]*A|0:(h.push(this.shape[2]),p.push(this.stride[2]));var w=u[h.length+1];return w(this.data,h,p,k)},function(M,C,A,h){return new _(M,C[0],C[1],C[2],A[0],A[1],A[2],h)}},4:function(T,u,b){function _(M,C,A,h,p,k,w,R,O,j){this.data=M,this.shape=[C,A,h,p],this.stride=[k,w,R,O],this.offset=j|0}var P=_.prototype;return P.dtype=T,P.dimension=4,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(P,"order",{get:b}),P.set=function(M,C,A,h,p){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h,p):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h]=p},P.get=function(M,C,A,h){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h]},P.index=function(M,C,A,h){return this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h},P.hi=function(M,C,A,h){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},P.lo=function(M,C,A,h){var p=this.offset,k=0,w=this.shape[0],R=this.shape[1],O=this.shape[2],j=this.shape[3],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3];return typeof M=="number"&&M>=0&&(k=M|0,p+=V*k,w-=k),typeof C=="number"&&C>=0&&(k=C|0,p+=H*k,R-=k),typeof A=="number"&&A>=0&&(k=A|0,p+=F*k,O-=k),typeof h=="number"&&h>=0&&(k=h|0,p+=U*k,j-=k),new _(this.data,w,R,O,j,V,H,F,U,p)},P.step=function(M,C,A,h){var p=this.shape[0],k=this.shape[1],w=this.shape[2],R=this.shape[3],O=this.stride[0],j=this.stride[1],V=this.stride[2],H=this.stride[3],F=this.offset,U=0,W=Math.ceil;return typeof M=="number"&&(U=M|0,U<0?(F+=O*(p-1),p=W(-p/U)):p=W(p/U),O*=U),typeof C=="number"&&(U=C|0,U<0?(F+=j*(k-1),k=W(-k/U)):k=W(k/U),j*=U),typeof A=="number"&&(U=A|0,U<0?(F+=V*(w-1),w=W(-w/U)):w=W(w/U),V*=U),typeof h=="number"&&(U=h|0,U<0?(F+=H*(R-1),R=W(-R/U)):R=W(R/U),H*=U),new _(this.data,p,k,w,R,O,j,V,H,F)},P.transpose=function(M,C,A,h){M=M===void 0?0:M|0,C=C===void 0?1:C|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0;var p=this.shape,k=this.stride;return new _(this.data,p[M],p[C],p[A],p[h],k[M],k[C],k[A],k[h],this.offset)},P.pick=function(M,C,A,h){var p=[],k=[],w=this.offset;typeof M=="number"&&M>=0?w=w+this.stride[0]*M|0:(p.push(this.shape[0]),k.push(this.stride[0])),typeof C=="number"&&C>=0?w=w+this.stride[1]*C|0:(p.push(this.shape[1]),k.push(this.stride[1])),typeof A=="number"&&A>=0?w=w+this.stride[2]*A|0:(p.push(this.shape[2]),k.push(this.stride[2])),typeof h=="number"&&h>=0?w=w+this.stride[3]*h|0:(p.push(this.shape[3]),k.push(this.stride[3]));var R=u[p.length+1];return R(this.data,p,k,w)},function(M,C,A,h){return new _(M,C[0],C[1],C[2],C[3],A[0],A[1],A[2],A[3],h)}},5:function(T,u,b){function _(M,C,A,h,p,k,w,R,O,j,V,H){this.data=M,this.shape=[C,A,h,p,k],this.stride=[w,R,O,j,V],this.offset=H|0}var P=_.prototype;return P.dtype=T,P.dimension=5,Object.defineProperty(P,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(P,"order",{get:b}),P.set=function(M,C,A,h,p,k){return T==="generic"?this.data.set(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p,k):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]=k},P.get=function(M,C,A,h,p){return T==="generic"?this.data.get(this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p):this.data[this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p]},P.index=function(M,C,A,h,p){return this.offset+this.stride[0]*M+this.stride[1]*C+this.stride[2]*A+this.stride[3]*h+this.stride[4]*p},P.hi=function(M,C,A,h,p){return new _(this.data,typeof M!="number"||M<0?this.shape[0]:M|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof h!="number"||h<0?this.shape[3]:h|0,typeof p!="number"||p<0?this.shape[4]:p|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},P.lo=function(M,C,A,h,p){var k=this.offset,w=0,R=this.shape[0],O=this.shape[1],j=this.shape[2],V=this.shape[3],H=this.shape[4],F=this.stride[0],U=this.stride[1],W=this.stride[2],q=this.stride[3],J=this.stride[4];return typeof M=="number"&&M>=0&&(w=M|0,k+=F*w,R-=w),typeof C=="number"&&C>=0&&(w=C|0,k+=U*w,O-=w),typeof A=="number"&&A>=0&&(w=A|0,k+=W*w,j-=w),typeof h=="number"&&h>=0&&(w=h|0,k+=q*w,V-=w),typeof p=="number"&&p>=0&&(w=p|0,k+=J*w,H-=w),new _(this.data,R,O,j,V,H,F,U,W,q,J,k)},P.step=function(M,C,A,h,p){var k=this.shape[0],w=this.shape[1],R=this.shape[2],O=this.shape[3],j=this.shape[4],V=this.stride[0],H=this.stride[1],F=this.stride[2],U=this.stride[3],W=this.stride[4],q=this.offset,J=0,lt=Math.ceil;return typeof M=="number"&&(J=M|0,J<0?(q+=V*(k-1),k=lt(-k/J)):k=lt(k/J),V*=J),typeof C=="number"&&(J=C|0,J<0?(q+=H*(w-1),w=lt(-w/J)):w=lt(w/J),H*=J),typeof A=="number"&&(J=A|0,J<0?(q+=F*(R-1),R=lt(-R/J)):R=lt(R/J),F*=J),typeof h=="number"&&(J=h|0,J<0?(q+=U*(O-1),O=lt(-O/J)):O=lt(O/J),U*=J),typeof p=="number"&&(J=p|0,J<0?(q+=W*(j-1),j=lt(-j/J)):j=lt(j/J),W*=J),new _(this.data,k,w,R,O,j,V,H,F,U,W,q)},P.transpose=function(M,C,A,h,p){M=M===void 0?0:M|0,C=C===void 0?1:C|0,A=A===void 0?2:A|0,h=h===void 0?3:h|0,p=p===void 0?4:p|0;var k=this.shape,w=this.stride;return new _(this.data,k[M],k[C],k[A],k[h],k[p],w[M],w[C],w[A],w[h],w[p],this.offset)},P.pick=function(M,C,A,h,p){var k=[],w=[],R=this.offset;typeof M=="number"&&M>=0?R=R+this.stride[0]*M|0:(k.push(this.shape[0]),w.push(this.stride[0])),typeof C=="number"&&C>=0?R=R+this.stride[1]*C|0:(k.push(this.shape[1]),w.push(this.stride[1])),typeof A=="number"&&A>=0?R=R+this.stride[2]*A|0:(k.push(this.shape[2]),w.push(this.stride[2])),typeof h=="number"&&h>=0?R=R+this.stride[3]*h|0:(k.push(this.shape[3]),w.push(this.stride[3])),typeof p=="number"&&p>=0?R=R+this.stride[4]*p|0:(k.push(this.shape[4]),w.push(this.stride[4]));var O=u[k.length+1];return O(this.data,k,w,R)},function(M,C,A,h){return new _(M,C[0],C[1],C[2],C[3],C[4],A[0],A[1],A[2],A[3],A[4],h)}}};function f(T,u){var b=u===-1?"T":String(u),_=l[b];return u===-1?_(T):u===0?_(T,y[T][0]):_(T,y[T],i)}function x(T){if(a(T))return"buffer";if(n)switch(Object.prototype.toString.call(T)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(T)?"array":"generic"}var y={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(T,u,b,_){if(T===void 0){var p=y.array[0];return p([])}else typeof T=="number"&&(T=[T]);u===void 0&&(u=[T.length]);var P=u.length;if(b===void 0){b=new Array(P);for(var M=P-1,C=1;M>=0;--M)b[M]=C,C*=u[M]}if(_===void 0){_=0;for(var M=0;M1e-6?(b[0]=P/h,b[1]=M/h,b[2]=C/h,b[3]=A/h):(b[0]=b[1]=b[2]=0,b[3]=1)}function v(b,_,P){this.radius=a([P]),this.center=a(_),this.rotation=a(b),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var T=v.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(b){this.radius.curve(b),this.center.curve(b),this.rotation.curve(b);var _=this.computedRotation;y(_,_);var P=this.computedMatrix;o(P,_);var M=this.computedCenter,C=this.computedEye,A=this.computedUp,h=Math.exp(this.computedRadius[0]);C[0]=M[0]+h*P[2],C[1]=M[1]+h*P[6],C[2]=M[2]+h*P[10],A[0]=P[1],A[1]=P[5],A[2]=P[9];for(var p=0;p<3;++p){for(var k=0,w=0;w<3;++w)k+=P[p+4*w]*C[w];P[12+p]=-k}},T.getMatrix=function(b,_){this.recalcMatrix(b);var P=this.computedMatrix;if(_){for(var M=0;M<16;++M)_[M]=P[M];return _}return P},T.idle=function(b){this.center.idle(b),this.radius.idle(b),this.rotation.idle(b)},T.flush=function(b){this.center.flush(b),this.radius.flush(b),this.rotation.flush(b)},T.pan=function(b,_,P,M){_=_||0,P=P||0,M=M||0,this.recalcMatrix(b);var C=this.computedMatrix,A=C[1],h=C[5],p=C[9],k=f(A,h,p);A/=k,h/=k,p/=k;var w=C[0],R=C[4],O=C[8],j=w*A+R*h+O*p;w-=A*j,R-=h*j,O-=p*j;var V=f(w,R,O);w/=V,R/=V,O/=V,C[2],C[6],C[10];var H=w*_+A*P,F=R*_+h*P,U=O*_+p*P;this.center.move(b,H,F,U);var W=Math.exp(this.computedRadius[0]);W=Math.max(1e-4,W+M),this.radius.set(b,Math.log(W))},T.rotate=function(b,_,P,M){this.recalcMatrix(b),_=_||0,P=P||0;var C=this.computedMatrix,A=C[0],h=C[4],p=C[8],k=C[1],w=C[5],R=C[9],O=C[2],j=C[6],V=C[10],H=_*A+P*k,F=_*h+P*w,U=_*p+P*R,W=-(j*U-V*F),q=-(V*H-O*U),J=-(O*F-j*H),lt=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(q,2)-Math.pow(J,2))),yt=x(W,q,J,lt);yt>1e-6?(W/=yt,q/=yt,J/=yt,lt/=yt):(W=q=J=0,lt=1);var mt=this.computedRotation,st=mt[0],tt=mt[1],dt=mt[2],rt=mt[3],at=st*lt+rt*W+tt*J-dt*q,vt=tt*lt+rt*q+dt*W-st*J,it=dt*lt+rt*J+st*q-tt*W,Y=rt*lt-st*W-tt*q-dt*J;if(M){W=O,q=j,J=V;var ft=Math.sin(M)/f(W,q,J);W*=ft,q*=ft,J*=ft,lt=Math.cos(_),at=at*lt+Y*W+vt*J-it*q,vt=vt*lt+Y*q+it*W-at*J,it=it*lt+Y*J+at*q-vt*W,Y=Y*lt-at*W-vt*q-it*J}var ut=x(at,vt,it,Y);ut>1e-6?(at/=ut,vt/=ut,it/=ut,Y/=ut):(at=vt=it=0,Y=1),this.rotation.set(b,at,vt,it,Y)},T.lookAt=function(b,_,P,M){this.recalcMatrix(b),P=P||this.computedCenter,_=_||this.computedEye,M=M||this.computedUp;var C=this.computedMatrix;n(C,_,P,M);var A=this.computedRotation;l(A,C[0],C[1],C[2],C[4],C[5],C[6],C[8],C[9],C[10]),y(A,A),this.rotation.set(b,A[0],A[1],A[2],A[3]);for(var h=0,p=0;p<3;++p)h+=Math.pow(P[p]-_[p],2);this.radius.set(b,.5*Math.log(Math.max(h,1e-6))),this.center.set(b,P[0],P[1],P[2])},T.translate=function(b,_,P,M){this.center.move(b,_||0,P||0,M||0)},T.setMatrix=function(b,_){var P=this.computedRotation;l(P,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),y(P,P),this.rotation.set(b,P[0],P[1],P[2],P[3]);var M=this.computedMatrix;i(M,_);var C=M[15];if(Math.abs(C)>1e-6){var A=M[12]/C,h=M[13]/C,p=M[14]/C;this.recalcMatrix(b);var k=Math.exp(this.computedRadius[0]);this.center.set(b,A-M[2]*k,h-M[6]*k,p-M[10]*k),this.radius.idle(b)}else this.center.idle(b),this.radius.idle(b)},T.setDistance=function(b,_){_>0&&this.radius.set(b,Math.log(_))},T.setDistanceLimits=function(b,_){b>0?b=Math.log(b):b=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,b),this.radius.bounds[0][0]=b,this.radius.bounds[1][0]=_},T.getDistanceLimits=function(b){var _=this.radius.bounds;return b?(b[0]=Math.exp(_[0][0]),b[1]=Math.exp(_[1][0]),b):[Math.exp(_[0][0]),Math.exp(_[1][0])]},T.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},T.fromJSON=function(b){var _=this.lastT(),P=b.center;P&&this.center.set(_,P[0],P[1],P[2]);var M=b.rotation;M&&this.rotation.set(_,M[0],M[1],M[2],M[3]);var C=b.distance;C&&C>0&&this.radius.set(_,Math.log(C)),this.setDistanceLimits(b.zoomMin,b.zoomMax)};function u(b){b=b||{};var _=b.center||[0,0,0],P=b.rotation||[0,0,0,1],M=b.radius||1;_=[].slice.call(_,0,3),P=[].slice.call(P,0,4),y(P,P);var C=new v(P,_,Math.log(M));return C.setDistanceLimits(b.zoomMin,b.zoomMax),("eye"in b||"up"in b)&&C.lookAt(0,b.eye,b.center,b.up),C}},9994:function(t,e,r){var a=r(9618),n=r(8277);t.exports=function(o,i){for(var l=[],f=o,x=1;Array.isArray(f);)l.push(f.length),x*=f.length,f=f[0];return l.length===0?a():(i||(i=a(new Float64Array(x),l)),n(i,o),i)}}},g={};function I(t){var e=g[t];if(e!==void 0)return e.exports;var r=g[t]={id:t,loaded:!1,exports:{}};return c[t].call(r.exports,r,r.exports,I),r.loaded=!0,r.exports}(function(){I.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){I.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}();var S=I(1964);Z.exports=S})()}),gS=Dt((Q,Z)=>{Z.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}),tU=Dt((Q,Z)=>{var c=gS();Z.exports=I;var g={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function I(S){var t,e=[],r=1,a;if(typeof S=="string")if(S=S.toLowerCase(),c[S])e=c[S].slice(),a="rgb";else if(S==="transparent")r=0,a="rgb",e=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var n=S.slice(1),o=n.length,i=o<=4;r=1,i?(e=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],o===4&&(r=parseInt(n[3]+n[3],16)/255)):(e=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],o===8&&(r=parseInt(n[6]+n[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var l=t[1],f=l==="rgb",n=l.replace(/a$/,"");a=n;var o=n==="cmyk"?4:n==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,T){if(/%$/.test(v))return T===o?parseFloat(v)/100:n==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(n[T]==="h"){if(/deg$/.test(v))return parseFloat(v);if(g[v]!==void 0)return g[v]}return parseFloat(v)}),l===n&&e.push(1),r=f||e[o]===void 0?1:e[o],e=e.slice(0,o)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(e=S.match(/([0-9]+)/g).map(function(x){return parseFloat(x)}),a=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(e=[S[0],S[1],S[2]],a="rgb",r=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(a="rgb",e=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(a="hsl",e=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),r=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(r/=100)):(a="rgb",e=[S>>>16,(S&65280)>>>8,S&255]);return{space:a,values:e,alpha:r}}}),eU=Dt((Q,Z)=>{var c=tU();Z.exports=function(I){Array.isArray(I)&&I.raw&&(I=String.raw.apply(null,arguments));var S,t=c(I);if(!t.space)return[];var e=[0,0,0],r=t.space[0]==="h"?[360,100,100]:[255,255,255];return S=Array(3),S[0]=Math.min(Math.max(t.values[0],e[0]),r[0]),S[1]=Math.min(Math.max(t.values[1],e[1]),r[1]),S[2]=Math.min(Math.max(t.values[2],e[2]),r[2]),t.space[0]==="h"&&(S=g(S)),S.push(Math.min(Math.max(t.alpha,0),1)),S};function g(I){var S=I[0]/360,t=I[1]/100,e=I[2]/100,r,a,n,o,i,l=0;if(t===0)return i=e*255,[i,i,i];for(a=e<.5?e*(1+t):e+t-e*t,r=2*e-a,o=[0,0,0];l<3;)n=S+1/3*-(l-1),n<0?n++:n>1&&n--,i=6*n<1?r+(a-r)*6*n:2*n<1?a:3*n<2?r+(a-r)*(2/3-n)*6:r,o[l++]=i*255;return o}}),_3=Dt((Q,Z)=>{Z.exports=c;function c(g,I,S){return IS?S:g:gI?I:g}}),Yk=Dt((Q,Z)=>{Z.exports=function(c){switch(c){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}}),U1=Dt((Q,Z)=>{var c=eU(),g=_3(),I=Yk();Z.exports=function(t,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var r=I(e),a=new r(4),n=e!=="uint8"&&e!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=c(t),t[0]/=255,t[1]/=255,t[2]/=255),S(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,n&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(n?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=g(Math.floor(t[0]*255),0,255),a[1]=g(Math.floor(t[1]*255),0,255),a[2]=g(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:g(Math.floor(t[3]*255),0,255)),a)};function S(t){return!!(t instanceof Uint8Array||t instanceof Uint8ClampedArray||Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}}),Tv=Dt((Q,Z)=>{var c=U1();function g(I){return I?c(I):[0,0,0,1]}Z.exports=g}),Av=Dt((Q,Z)=>{var c=Yi(),g=ro(),I=U1(),S=Xc(),t=wi().defaultLine,e=Ma().isArrayOrTypedArray,r=I(t),a=1;function n(x,y){var v=x;return v[3]*=y,v}function o(x){if(c(x))return r;var y=I(x);return y.length?y:r}function i(x){return c(x)?x:a}function l(x,y,v){var T=x.color;T&&T._inputArray&&(T=T._inputArray);var u=e(T),b=e(y),_=S.extractOpts(x),P=[],M,C,A,h,p;if(_.colorscale!==void 0?M=S.makeColorScaleFuncFromTrace(x):M=o,u?C=function(w,R){return w[R]===void 0?r:I(M(w[R]))}:C=o,b?A=function(w,R){return w[R]===void 0?a:i(w[R])}:A=i,u||b)for(var k=0;k{Z.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}}),Kk=Dt((Q,Z)=>{Z.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}}),rU=Dt((Q,Z)=>{var c=Jo();function g(t,e,r,a){if(!e||!e.visible)return null;for(var n=c.getComponentMethod("errorbars","makeComputeError")(e),o=new Array(t.length),i=0;i0){var v=a.c2l(x);a._lowerLogErrorBound||(a._lowerLogErrorBound=v),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,v)}}else o[i]=[-l[0]*r,l[1]*r]}return o}function I(t){for(var e=0;e{var c=fp().gl_line3d,g=fp().gl_scatter3d,I=fp().gl_error3d,S=fp().gl_mesh3d,t=fp().delaunay_triangulate,e=kn(),r=Tv(),a=Av().formatColor,n=bg(),o=vS(),i=Kk(),l=Ls(),f=Fp().appendArrayPointValue,x=rU();function y(R,O){this.scene=R,this.uid=O,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var v=y.prototype;v.handlePick=function(R){if(R.object&&(R.object===this.linePlot||R.object===this.delaunayMesh||R.object===this.textMarkers||R.object===this.scatterPlot)){var O=R.index=R.data.index;return R.object.highlight&&R.object.highlight(null),this.scatterPlot&&(R.object=this.scatterPlot,this.scatterPlot.highlight(R.data)),R.textLabel="",this.textLabels&&(e.isArrayOrTypedArray(this.textLabels)?(this.textLabels[O]||this.textLabels[O]===0)&&(R.textLabel=this.textLabels[O]):R.textLabel=this.textLabels),R.traceCoordinate=[this.data.x[O],this.data.y[O],this.data.z[O]],!0}};function T(R,O,j){var V=(j+1)%3,H=(j+2)%3,F=[],U=[],W;for(W=0;W-1?-1:R.indexOf("right")>-1?1:0}function _(R){return R==null?0:R.indexOf("top")>-1?-1:R.indexOf("bottom")>-1?1:0}function P(R){var O=0,j=0,V=[O,j];if(Array.isArray(R))for(var H=0;H=0){var J=T(W.position,W.delaunayColor,W.delaunayAxis);J.opacity=R.opacity,this.delaunayMesh?this.delaunayMesh.update(J):(J.gl=O,this.delaunayMesh=S(J),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},v.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function w(R,O){var j=new y(R,O.uid);return j.update(O),j}Z.exports=w}),yS=Dt((Q,Z)=>{var c=ef(),g=da(),I=kc(),S=dh().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=Ho(),n=vS(),o=Kk(),i=Ia().extendFlat,l=Yc().overrideAll,f=G0(),x=c.line,y=c.marker,v=y.line,T=i({width:x.width,dash:{valType:"enumerated",values:f(n),dflt:"solid"}},I("line"));function u(_){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var b=Z.exports=l({x:c.x,y:c.y,z:{valType:"data_array"},text:i({},c.text,{}),texttemplate:e(),texttemplatefallback:r({editType:"calc"}),hovertext:i({},c.hovertext,{}),hovertemplate:t(),hovertemplatefallback:r(),xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z"),mode:i({},c.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:u(),y:u(),z:u()},connectgaps:c.connectgaps,line:T,marker:i({symbol:{valType:"enumerated",values:f(o),dflt:"circle",arrayOk:!0},size:i({},y.size,{dflt:8}),sizeref:y.sizeref,sizemin:y.sizemin,sizemode:y.sizemode,opacity:i({},y.opacity,{arrayOk:!1}),colorbar:y.colorbar,line:i({width:i({},v.width,{arrayOk:!1})},I("marker.line"))},I("marker")),textposition:i({},c.textposition,{dflt:"top center"}),textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:a.opacity,hoverinfo:i({},a.hoverinfo)},"calc","nested");b.x.editType=b.y.editType=b.z.editType="calc+clearAxisTypes"}),iU=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=Tc(),S=s0(),t=z0(),e=x0(),r=yS();Z.exports=function(n,o,i,l){function f(P,M){return g.coerce(n,o,r,P,M)}var x=a(n,o,f,l);if(!x){o.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),I.hasMarkers(o)&&S(n,o,i,l,f,{noSelect:!0,noAngle:!0}),I.hasLines(o)&&(f("connectgaps"),t(n,o,i,l,f)),I.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),e(n,o,l,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var y=(o.line||{}).color,v=(o.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",y||v);for(var T=["x","y","z"],u=0;u<3;++u){var b="projection."+T[u];f(b+".show")&&(f(b+".opacity"),f(b+".scale"))}var _=c.getComponentMethod("errorbars","supplyDefaults");_(n,o,y||v||i,{axis:"z"}),_(n,o,y||v||i,{axis:"y",inherit:"z"}),_(n,o,y||v||i,{axis:"x",inherit:"z"})};function a(n,o,i,l){var f=0,x=i("x"),y=i("y"),v=i("z"),T=c.getComponentMethod("calendars","handleTraceDefaults");return T(n,o,["x","y","z"],l),x&&y&&v&&(f=Math.min(x.length,y.length,v.length),o._length=o._xlength=o._ylength=o._zlength=f),f}}),aU=Dt((Q,Z)=>{var c=ct(),g=F0();Z.exports=function(I,S){var t=[{x:!1,y:!1,trace:S,t:{}}];return c(t,S),g(I,S),t}}),oU=Dt((Q,Z)=>{Z.exports=c;function c(g,I){if(typeof g!="string")throw new TypeError("must specify type string");if(I=I||{},typeof document>"u"&&!I.canvas)return null;var S=I.canvas||document.createElement("canvas");typeof I.width=="number"&&(S.width=I.width),typeof I.height=="number"&&(S.height=I.height);var t=I,e;try{var r=[g];g.indexOf("webgl")===0&&r.push("experimental-"+g);for(var a=0;a{var c=oU();Z.exports=function(g){return c("webgl",g)}}),xS=Dt((Q,Z)=>{var c=hi(),g=function(){};Z.exports=function(I){for(var S in I)typeof I[S]=="function"&&(I[S]=g);I.destroy=function(){I.container.parentNode.removeChild(I.container)};var t=document.createElement("div");t.className="no-webgl",t.style.cursor="pointer",t.style.fontSize="24px",t.style.color=c.defaults[0],t.style.position="absolute",t.style.left=t.style.top="0px",t.style.width=t.style.height="100%",t.style["background-color"]=c.lightLine,t.style["z-index"]=30;var e=document.createElement("p");return e.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",e.style.position="relative",e.style.top="50%",e.style.left="50%",e.style.height="30%",e.style.width="50%",e.style.margin="-15% 0 0 -25%",t.appendChild(e),I.container.appendChild(t),I.container.style.background="#FFFFFF",I.container.onclick=function(){window.open("https://get.webgl.org")},!1}}),lU=Dt((Q,Z)=>{var c=Tv(),g=kn(),I=["xaxis","yaxis","zaxis"];function S(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var t=S.prototype;t.merge=function(r,a){for(var n=this,o=0;o<3;++o){var i=a[I[o]];if(!i.visible){n.tickEnable[o]=!1,n.labelEnable[o]=!1,n.lineEnable[o]=!1,n.lineTickEnable[o]=!1,n.gridEnable[o]=!1,n.zeroEnable[o]=!1,n.backgroundEnable[o]=!1;continue}n.labels[o]=r._meta?g.templateString(i.title.text,r._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(n.labelColor[o]=c(i.title.font.color)),i.title.font.family&&(n.labelFont[o]=i.title.font.family),i.title.font.size&&(n.labelSize[o]=i.title.font.size),i.title.font.weight&&(n.labelFontWeight[o]=i.title.font.weight),i.title.font.style&&(n.labelFontStyle[o]=i.title.font.style),i.title.font.variant&&(n.labelFontVariant[o]=i.title.font.variant)),"showline"in i&&(n.lineEnable[o]=i.showline),"linecolor"in i&&(n.lineColor[o]=c(i.linecolor)),"linewidth"in i&&(n.lineWidth[o]=i.linewidth),"showgrid"in i&&(n.gridEnable[o]=i.showgrid),"gridcolor"in i&&(n.gridColor[o]=c(i.gridcolor)),"gridwidth"in i&&(n.gridWidth[o]=i.gridwidth),i.type==="log"?n.zeroEnable[o]=!1:"zeroline"in i&&(n.zeroEnable[o]=i.zeroline),"zerolinecolor"in i&&(n.zeroLineColor[o]=c(i.zerolinecolor)),"zerolinewidth"in i&&(n.zeroLineWidth[o]=i.zerolinewidth),"ticks"in i&&i.ticks?n.lineTickEnable[o]=!0:n.lineTickEnable[o]=!1,"ticklen"in i&&(n.lineTickLength[o]=n._defaultLineTickLength[o]=i.ticklen),"tickcolor"in i&&(n.lineTickColor[o]=c(i.tickcolor)),"tickwidth"in i&&(n.lineTickWidth[o]=i.tickwidth),"tickangle"in i&&(n.tickAngle[o]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(n.tickEnable[o]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(n.tickColor[o]=c(i.tickfont.color)),i.tickfont.family&&(n.tickFont[o]=i.tickfont.family),i.tickfont.size&&(n.tickSize[o]=i.tickfont.size),i.tickfont.weight&&(n.tickFontWeight[o]=i.tickfont.weight),i.tickfont.style&&(n.tickFontStyle[o]=i.tickfont.style),i.tickfont.variant&&(n.tickFontVariant[o]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(n.lineTickMirror[o]=!0,n.lineMirror[o]=!0):i.mirror===!0?(n.lineTickMirror[o]=!1,n.lineMirror[o]=!0):(n.lineTickMirror[o]=!1,n.lineMirror[o]=!1):n.lineMirror[o]=!1,"showbackground"in i&&i.showbackground!==!1?(n.backgroundEnable[o]=!0,n.backgroundColor[o]=c(i.backgroundcolor)):n.backgroundEnable[o]=!1}};function e(r,a){var n=new S;return n.merge(r,a),n}Z.exports=e}),uU=Dt((Q,Z)=>{var c=Tv(),g=["xaxis","yaxis","zaxis"];function I(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var S=I.prototype;S.merge=function(e){for(var r=0;r<3;++r){var a=e[g[r]];if(!a.visible){this.enabled[r]=!1,this.drawSides[r]=!1;continue}this.enabled[r]=a.showspikes,this.colors[r]=c(a.spikecolor),this.drawSides[r]=a.spikesides,this.lineWidth[r]=a.spikethickness}};function t(e){var r=new I;return r.merge(e),r}Z.exports=t}),cU=Dt((Q,Z)=>{Z.exports=t;var c=Ls(),g=kn(),I=["xaxis","yaxis","zaxis"];function S(e){for(var r=new Array(3),a=0;a<3;++a){for(var n=e[a],o=new Array(n.length),i=0;i/g," "));o[i]=y,l.tickmode=f}}r.ticks=o;for(var i=0;i<3;++i){.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var v=0;v<2;++v)r.bounds[v][i]=e.glplot.bounds[v][i]}e.contourLevels=S(o)}}),hU=Dt((Q,Z)=>{var c=fp().gl_plot3d,g=c.createCamera,I=c.createScene,S=sU(),t=z_(),e=Jo(),r=kn(),a=r.preserveDrawingBuffer(),n=Ls(),o=tf(),i=Tv(),l=xS(),f=FM(),x=lU(),y=uU(),v=cU(),T=Y0().applyAutorangeOptions,u,b,_=!1;function P(j,V){var H=document.createElement("div"),F=j.container;this.graphDiv=j.graphDiv;var U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.style.position="absolute",U.style.top=U.style.left="0px",U.style.width=U.style.height="100%",U.style["z-index"]=20,U.style["pointer-events"]="none",H.appendChild(U),this.svgContainer=U,H.id=j.id,H.style.position="absolute",H.style.top=H.style.left="0px",H.style.width=H.style.height="100%",F.appendChild(H),this.fullLayout=V,this.id=j.id||"scene",this.fullSceneLayout=V[this.id],this.plotArgs=[[],{},{}],this.axesOptions=x(V,V[this.id]),this.spikeOptions=y(V[this.id]),this.container=H,this.staticMode=!!j.staticPlot,this.pixelRatio=this.pixelRatio||j.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var M=P.prototype;M.prepareOptions=function(){var j=this,V={canvas:j.canvas,gl:j.gl,glOptions:{preserveDrawingBuffer:a,premultipliedAlpha:!0,antialias:!0},container:j.container,axes:j.axesOptions,spikes:j.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:j.camera,pixelRatio:j.pixelRatio};if(j.staticMode){if(!b&&(u=document.createElement("canvas"),b=S({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!b))throw new Error("error creating static canvas/context for image server");V.gl=b,V.canvas=u}return V};var C=!0;M.tryCreatePlot=function(){var j=this,V=j.prepareOptions(),H=!0;try{j.glplot=I(V)}catch{if(j.staticMode||!C||a)H=!1;else{r.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{a=V.glOptions.preserveDrawingBuffer=!0,j.glplot=I(V)}catch{a=V.glOptions.preserveDrawingBuffer=!1,H=!1}}}return C=!1,H},M.initializeGLCamera=function(){var j=this,V=j.fullSceneLayout.camera,H=V.projection.type==="orthographic";j.camera=g(j.container,{center:[V.center.x,V.center.y,V.center.z],eye:[V.eye.x,V.eye.y,V.eye.z],up:[V.up.x,V.up.y,V.up.z],_ortho:H,zoomMin:.01,zoomMax:100,mode:"orbit"})},M.initializeGLPlot=function(){var j=this;j.initializeGLCamera();var V=j.tryCreatePlot();if(!V)return l(j);j.traces={},j.make4thDimension();var H=j.graphDiv,F=H.layout,U=function(){var q={};return j.isCameraChanged(F)&&(q[j.id+".camera"]=j.getCamera()),j.isAspectChanged(F)&&(q[j.id+".aspectratio"]=j.glplot.getAspectratio(),F[j.id].aspectmode!=="manual"&&(j.fullSceneLayout.aspectmode=F[j.id].aspectmode=q[j.id+".aspectmode"]="manual")),q},W=function(q){if(q.fullSceneLayout.dragmode!==!1){var J=U();q.saveLayout(F),q.graphDiv.emit("plotly_relayout",J)}};return j.glplot.canvas&&(j.glplot.canvas.addEventListener("mouseup",function(){W(j)}),j.glplot.canvas.addEventListener("touchstart",function(){_=!0}),j.glplot.canvas.addEventListener("wheel",function(q){if(H._context._scrollZoom.gl3d){if(j.camera._ortho){var J=q.deltaX>q.deltaY?1.1:.9090909090909091,lt=j.glplot.getAspectratio();j.glplot.setAspectratio({x:J*lt.x,y:J*lt.y,z:J*lt.z})}W(j)}},t?{passive:!1}:!1),j.glplot.canvas.addEventListener("mousemove",function(){if(j.fullSceneLayout.dragmode!==!1&&j.camera.mouseListener.buttons!==0){var q=U();j.graphDiv.emit("plotly_relayouting",q)}}),j.staticMode||j.glplot.canvas.addEventListener("webglcontextlost",function(q){H&&H.emit&&H.emit("plotly_webglcontextlost",{event:q,layer:j.id})},!1)),j.glplot.oncontextloss=function(){j.recoverContext()},j.glplot.onrender=function(){j.render()},!0},M.render=function(){var j=this,V=j.graphDiv,H,F=j.svgContainer,U=j.container.getBoundingClientRect();V._fullLayout._calcInverseTransform(V);var W=V._fullLayout._invScaleX,q=V._fullLayout._invScaleY,J=U.width*W,lt=U.height*q;F.setAttributeNS(null,"viewBox","0 0 "+J+" "+lt),F.setAttributeNS(null,"width",J),F.setAttributeNS(null,"height",lt),v(j),j.glplot.axes.update(j.axesOptions);for(var yt=Object.keys(j.traces),mt=null,st=j.glplot.selection,tt=0;tt")):H.type==="isosurface"||H.type==="volume"?(it.valueLabel=n.hoverLabelText(j._mockAxis,j._mockAxis.d2l(st.traceCoordinate[3]),H.valuehoverformat),It.push("value: "+it.valueLabel),st.textLabel&&It.push(st.textLabel),kt=It.join("
")):kt=st.textLabel;var Pt={x:st.traceCoordinate[0],y:st.traceCoordinate[1],z:st.traceCoordinate[2],data:at._input,fullData:at,curveNumber:at.index,pointNumber:vt};o.appendArrayPointValue(Pt,at,vt),H._module.eventData&&(Pt=at._module.eventData(Pt,st,at,{},vt));var qt={points:[Pt]};if(j.fullSceneLayout.hovermode){var Wt=[];o.loneHover({trace:at,x:(.5+.5*rt[0]/rt[3])*J,y:(.5-.5*rt[1]/rt[3])*lt,xLabel:it.xLabel,yLabel:it.yLabel,zLabel:it.zLabel,text:kt,name:mt.name,color:o.castHoverOption(at,vt,"bgcolor")||mt.color,borderColor:o.castHoverOption(at,vt,"bordercolor"),fontFamily:o.castHoverOption(at,vt,"font.family"),fontSize:o.castHoverOption(at,vt,"font.size"),fontColor:o.castHoverOption(at,vt,"font.color"),nameLength:o.castHoverOption(at,vt,"namelength"),textAlign:o.castHoverOption(at,vt,"align"),hovertemplate:r.castOption(at,vt,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Pt,it),eventData:[Pt]},{container:F,gd:V,inOut_bbox:Wt}),Pt.bbox=Wt[0]}st.distance<5&&(st.buttons||_)?V.emit("plotly_click",qt):V.emit("plotly_hover",qt),this.oldEventData=qt}else o.loneUnhover(F),this.oldEventData&&V.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;j.drawAnnotations(j)},M.recoverContext=function(){var j=this;j.glplot.dispose();var V=function(){if(j.glplot.gl.isContextLost()){requestAnimationFrame(V);return}if(!j.initializeGLPlot()){r.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}j.plot.apply(j,j.plotArgs)};requestAnimationFrame(V)};var A=["xaxis","yaxis","zaxis"];function h(j,V,H){for(var F=j.fullSceneLayout,U=0;U<3;U++){var W=A[U],q=W.charAt(0),J=F[W],lt=V[q],yt=V[q+"calendar"],mt=V["_"+q+"length"];if(!r.isArrayOrTypedArray(lt))H[0][U]=Math.min(H[0][U],0),H[1][U]=Math.max(H[1][U],mt-1);else for(var st,tt=0;tt<(mt||lt.length);tt++)if(r.isArrayOrTypedArray(lt[tt]))for(var dt=0;dtat[1][q])at[0][q]=-1,at[1][q]=1;else{var ge=at[1][q]-at[0][q];at[0][q]-=ge/32,at[1][q]+=ge/32}if(Y=[at[0][q],at[1][q]],Y=T(Y,lt),at[0][q]=Y[0],at[1][q]=Y[1],lt.isReversed()){var fe=at[0][q];at[0][q]=at[1][q],at[1][q]=fe}}else Y=lt.range,at[0][q]=lt.r2l(Y[0]),at[1][q]=lt.r2l(Y[1]);at[0][q]===at[1][q]&&(at[0][q]-=1,at[1][q]+=1),vt[q]=at[1][q]-at[0][q],lt.range=[at[0][q],at[1][q]],lt.limitRange(),F.glplot.setBounds(q,{min:lt.range[0]*dt[q],max:lt.range[1]*dt[q]})}var pe,se=mt.aspectmode;if(se==="cube")pe=[1,1,1];else if(se==="manual"){var Tt=mt.aspectratio;pe=[Tt.x,Tt.y,Tt.z]}else if(se==="auto"||se==="data"){var Lt=[1,1,1];for(q=0;q<3;++q){lt=mt[A[q]],yt=lt.type;var Mt=it[yt];Lt[q]=Math.pow(Mt.acc,1/Mt.count)/dt[q]}se==="data"||Math.max.apply(null,Lt)/Math.min.apply(null,Lt)<=4?pe=Lt:pe=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");mt.aspectratio.x=st.aspectratio.x=pe[0],mt.aspectratio.y=st.aspectratio.y=pe[1],mt.aspectratio.z=st.aspectratio.z=pe[2],F.glplot.setAspectratio(mt.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:mt.aspectratio.x,y:mt.aspectratio.y,z:mt.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=mt.aspectmode);var ee=mt.domain||null,ve=V._size||null;if(ee&&ve){var oe=F.container.style;oe.position="absolute",oe.left=ve.l+ee.x[0]*ve.w+"px",oe.top=ve.t+(1-ee.y[1])*ve.h+"px",oe.width=ve.w*(ee.x[1]-ee.x[0])+"px",oe.height=ve.h*(ee.y[1]-ee.y[0])+"px"}F.glplot.redraw()}},M.destroy=function(){var j=this;j.glplot&&(j.camera.mouseListener.enabled=!1,j.container.removeEventListener("wheel",j.camera.wheelListener),j.camera=null,j.glplot.dispose(),j.container.parentNode.removeChild(j.container),j.glplot=null)};function k(j){return[[j.eye.x,j.eye.y,j.eye.z],[j.center.x,j.center.y,j.center.z],[j.up.x,j.up.y,j.up.z]]}function w(j){return{up:{x:j.up[0],y:j.up[1],z:j.up[2]},center:{x:j.center[0],y:j.center[1],z:j.center[2]},eye:{x:j.eye[0],y:j.eye[1],z:j.eye[2]},projection:{type:j._ortho===!0?"orthographic":"perspective"}}}M.getCamera=function(){var j=this;return j.camera.view.recalcMatrix(j.camera.view.lastT()),w(j.camera)},M.setViewport=function(j){var V=this,H=j.camera;V.camera.lookAt.apply(this,k(H)),V.glplot.setAspectratio(j.aspectratio);var F=H.projection.type==="orthographic",U=V.camera._ortho;F!==U&&(V.glplot.redraw(),V.glplot.clearRGBA(),V.glplot.dispose(),V.initializeGLPlot())},M.isCameraChanged=function(j){var V=this,H=V.getCamera(),F=r.nestedProperty(j,V.id+".camera"),U=F.get();function W(yt,mt,st,tt){var dt=["up","center","eye"],rt=["x","y","z"];return mt[dt[st]]&&yt[dt[st]][rt[tt]]===mt[dt[st]][rt[tt]]}var q=!1;if(U===void 0)q=!0;else{for(var J=0;J<3;J++)for(var lt=0;lt<3;lt++)if(!W(H,U,J,lt)){q=!0;break}(!U.projection||H.projection&&H.projection.type!==U.projection.type)&&(q=!0)}return q},M.isAspectChanged=function(j){var V=this,H=V.glplot.getAspectratio(),F=r.nestedProperty(j,V.id+".aspectratio"),U=F.get();return U===void 0||U.x!==H.x||U.y!==H.y||U.z!==H.z},M.saveLayout=function(j){var V=this,H=V.fullLayout,F,U,W,q,J,lt,yt=V.isCameraChanged(j),mt=V.isAspectChanged(j),st=yt||mt;if(st){var tt={};if(yt&&(F=V.getCamera(),U=r.nestedProperty(j,V.id+".camera"),W=U.get(),tt[V.id+".camera"]=W),mt&&(q=V.glplot.getAspectratio(),J=r.nestedProperty(j,V.id+".aspectratio"),lt=J.get(),tt[V.id+".aspectratio"]=lt),e.call("_storeDirectGUIEdit",j,H._preGUI,tt),yt){U.set(F);var dt=r.nestedProperty(H,V.id+".camera");dt.set(F)}if(mt){J.set(q);var rt=r.nestedProperty(H,V.id+".aspectratio");rt.set(q),V.glplot.redraw()}}return st},M.updateFx=function(j,V){var H=this,F=H.camera;if(F)if(j==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(j==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var U=H.graphDiv,W=U._fullLayout,q=H.fullSceneLayout.camera,J=q.up.x,lt=q.up.y,yt=q.up.z;if(yt/Math.sqrt(J*J+lt*lt+yt*yt)<.999){var mt=H.id+".camera.up",st={x:0,y:0,z:1},tt={};tt[mt]=st;var dt=U.layout;e.call("_storeDirectGUIEdit",dt,W._preGUI,tt),q.up=st,r.nestedProperty(dt,mt).set(st)}}else F.keyBindingMode=j;H.fullSceneLayout.hovermode=V};function R(j,V,H){for(var F=0,U=H-1;F0)for(var J=255/q,lt=0;lt<3;++lt)j[W+lt]=Math.min(J*j[W+lt],255)}}M.toImage=function(j){var V=this;j||(j="png"),V.staticMode&&V.container.appendChild(u),V.glplot.redraw();var H=V.glplot.gl,F=H.drawingBufferWidth,U=H.drawingBufferHeight;H.bindFramebuffer(H.FRAMEBUFFER,null);var W=new Uint8Array(F*U*4);H.readPixels(0,0,F,U,H.RGBA,H.UNSIGNED_BYTE,W),R(W,F,U),O(W,F,U);var q=document.createElement("canvas");q.width=F,q.height=U;var J=q.getContext("2d",{willReadFrequently:!0}),lt=J.createImageData(F,U);lt.data.set(W),J.putImageData(lt,0,0);var yt;switch(j){case"jpeg":yt=q.toDataURL("image/jpeg");break;case"webp":yt=q.toDataURL("image/webp");break;default:yt=q.toDataURL("image/png")}return V.staticMode&&V.container.removeChild(u),yt},M.setConvert=function(){for(var j=this,V=0;V<3;V++){var H=j.fullSceneLayout[A[V]];n.setConvert(H,j.fullLayout),H.setScale=r.noop}},M.make4thDimension=function(){var j=this,V=j.graphDiv,H=V._fullLayout;j._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(j._mockAxis,H)},Z.exports=P}),fU=Dt((Q,Z)=>{Z.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}),_S=Dt((Q,Z)=>{var c=hi(),g=Td(),I=Ia().extendFlat,S=Yc().overrideAll;Z.exports=S({visible:g.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:c.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:g.color,categoryorder:g.categoryorder,categoryarray:g.categoryarray,title:{text:g.title.text,font:g.title.font},type:I({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorange:g.autorange,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},rangemode:g.rangemode,minallowed:g.minallowed,maxallowed:g.maxallowed,range:I({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,mirror:g.mirror,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:g.tickfont,tickangle:g.tickangle,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickformat:g.tickformat,tickformatstops:g.tickformatstops,hoverformat:g.hoverformat,showline:g.showline,linecolor:g.linecolor,linewidth:g.linewidth,showgrid:g.showgrid,gridcolor:I({},g.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:g.gridwidth,zeroline:g.zeroline,zerolinecolor:g.zerolinecolor,zerolinewidth:g.zerolinewidth},"plot","from-root")}),bS=Dt((Q,Z)=>{var c=_S(),g=jh().attributes,I=Ia().extendFlat,S=kn().counterRegex;function t(e,r,a){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:a,editType:"camera"},editType:"camera"}}Z.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:I(t(0,0,1),{}),center:I(t(0,0,0),{}),eye:I(t(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:g({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:c,yaxis:c,zaxis:c,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}),dU=Dt((Q,Z)=>{var c=ro().mix,g=kn(),I=mu(),S=_S(),t=kp(),e=tx(),r=["xaxis","yaxis","zaxis"],a=13600/187;Z.exports=function(n,o,i){var l,f;function x(T,u){return g.coerce(l,f,S,T,u)}for(var y=0;y{var c=kn(),g=hi(),I=Jo(),S=z1(),t=dU(),e=bS(),r=ud().getSubplotData,a="gl3d";Z.exports=function(o,i,l){var f=i._basePlotModules.length>1;function x(y){if(!f){var v=c.validate(o[y],e[y]);if(v)return o[y]}}S(o,i,l,{type:a,attributes:e,handleDefaults:n,fullLayout:i,font:i.font,fullData:l,getDfltFromLayout:x,autotypenumbersDflt:i.autotypenumbers,paper_bgcolor:i.paper_bgcolor,calendar:i.calendar})};function n(o,i,l,f){for(var x=l("bgcolor"),y=g.combine(x,f.paper_bgcolor),v=["up","center","eye"],T=0;T.999)&&(M="turntable")}else M="turntable";l("dragmode",M),l("hovermode",f.getDfltFromLayout("hovermode"))}}),V1=Dt(Q=>{var Z=Yc().overrideAll,c=po(),g=hU(),I=ud().getSubplotData,S=kn(),t=Dp(),e="gl3d",r="scene";Q.name=e,Q.attr=r,Q.idRoot=r,Q.idRegex=Q.attrRegex=S.counterRegex("scene"),Q.attributes=fU(),Q.layoutAttributes=bS(),Q.baseLayoutAttrOverrides=Z({hoverlabel:c.hoverlabel},"plot","nested"),Q.supplyLayoutDefaults=pU(),Q.plot=function(a){for(var n=a._fullLayout,o=a._fullData,i=n._subplots[e],l=0;l{Z.exports={plot:nU(),attributes:yS(),markerSymbols:Kk(),supplyDefaults:iU(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:aU(),moduleType:"trace",name:"scatter3d",basePlotModule:V1(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}),gU=Dt((Q,Z)=>{Z.exports=mU()}),b3=Dt((Q,Z)=>{var c=hi(),g=kc(),I=dh().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=Ho(),r=Ia().extendFlat,a=Yc().overrideAll;function n(l){return{valType:"boolean",dflt:!1}}function o(l){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:n(),y:n(),z:n()},color:{valType:"color",dflt:c.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:c.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=Z.exports=a(r({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:I("x"),yhoverformat:I("y"),zhoverformat:I("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},g("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:o(),y:o(),z:o()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:r({},e.hoverinfo),showlegend:r({},e.showlegend,{dflt:!1})}),"calc","nested");i.x.editType=i.y.editType=i.z.editType="calc+clearAxisTypes"}),wS=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=mc(),S=b3(),t=.1;function e(o,i){for(var l=[],f=32,x=0;x{var c=Xd();Z.exports=function(g,I){I.surfacecolor?c(g,I,{vals:I.surfacecolor,containerStr:"",cLetter:"c"}):c(g,I,{vals:I.z,containerStr:"",cLetter:"c"})}}),yU=Dt((Q,Z)=>{var c=fp().gl_surface3d,g=fp().ndarray,I=fp().ndarray_linear_interpolate.d2,S=$6(),t=Z6(),e=kn().isArrayOrTypedArray,r=Av().parseColorScale,a=Tv(),n=Xc().extractOpts;function o(k,w,R){this.scene=k,this.uid=R,this.surface=w,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var i=o.prototype;i.getXat=function(k,w,R,O){var j=e(this.data.x)?e(this.data.x[0])?this.data.x[w][k]:this.data.x[k]:k;return R===void 0?j:O.d2l(j,0,R)},i.getYat=function(k,w,R,O){var j=e(this.data.y)?e(this.data.y[0])?this.data.y[w][k]:this.data.y[w]:w;return R===void 0?j:O.d2l(j,0,R)},i.getZat=function(k,w,R,O){var j=this.data.z[w][k];return j===null&&this.data.connectgaps&&this.data._interpolatedZ&&(j=this.data._interpolatedZ[w][k]),R===void 0?j:O.d2l(j,0,R)},i.handlePick=function(k){if(k.object===this.surface){var w=(k.data.index[0]-1)/this.dataScaleX-1,R=(k.data.index[1]-1)/this.dataScaleY-1,O=Math.max(Math.min(Math.round(w),this.data.z[0].length-1),0),j=Math.max(Math.min(Math.round(R),this.data._ylength-1),0);k.index=[O,j],k.traceCoordinate=[this.getXat(O,j),this.getYat(O,j),this.getZat(O,j)],k.dataCoordinate=[this.getXat(O,j,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(O,j,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(O,j,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var V=0;V<3;V++){var H=k.dataCoordinate[V];H!=null&&(k.dataCoordinate[V]*=this.scene.dataScale[V])}var F=this.data.hovertext||this.data.text;return e(F)&&F[j]&&F[j][O]!==void 0?k.textLabel=F[j][O]:F?k.textLabel=F:k.textLabel="",k.data.dataCoordinate=k.dataCoordinate.slice(),this.surface.highlight(k.data),this.scene.glplot.spikes.position=k.dataCoordinate,!0}};function l(k){var w=k[0].rgb,R=k[k.length-1].rgb;return w[0]===R[0]&&w[1]===R[1]&&w[2]===R[2]&&w[3]===R[3]}var f=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function x(k,w){if(k0){R=f[O];break}return R}function T(k,w){if(!(k<1||w<1)){for(var R=y(k),O=y(w),j=1,V=0;VP;)O--,O/=v(O),O++,O<_&&(O=P);var j=Math.round(O/k);return j>1?j:1};function M(k,w,R){var O=R[8]+R[2]*w[0]+R[5]*w[1];return k[0]=(R[6]+R[0]*w[0]+R[3]*w[1])/O,k[1]=(R[7]+R[1]*w[0]+R[4]*w[1])/O,k}function C(k,w,R){return A(k,w,M,R),k}function A(k,w,R,O){for(var j=[0,0],V=k.shape[0],H=k.shape[1],F=0;F0&&this.contourStart[O]!==null&&this.contourEnd[O]!==null&&this.contourEnd[O]>this.contourStart[O]))for(w[O]=!0,j=this.contourStart[O];jlt&&(this.minValues[W]=lt),this.maxValues[W]{Z.exports={attributes:b3(),supplyDefaults:wS().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:vU(),plot:yU(),moduleType:"trace",name:"surface",basePlotModule:V1(),categories:["gl3d","2dMap","showLegend"],meta:{}}}),_U=Dt((Q,Z)=>{Z.exports=xU()}),pb=Dt((Q,Z)=>{var c=kc(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=b3(),e=Ho(),r=Ia().extendFlat;Z.exports=r({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:I({editType:"calc"}),hovertemplatefallback:S({editType:"calc"}),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},c("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:r({},t.contours.x.show,{}),color:t.contours.x.color,width:t.contours.x.width,editType:"calc"},lightposition:{x:r({},t.lightposition.x,{dflt:1e5}),y:r({},t.lightposition.y,{dflt:1e5}),z:r({},t.lightposition.z,{dflt:0}),editType:"calc"},lighting:r({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},t.lighting),hoverinfo:r({},e.hoverinfo,{editType:"calc"}),showlegend:r({},e.showlegend,{dflt:!1})})}),Xk=Dt((Q,Z)=>{var c=kc(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=pb(),e=Ho(),r=Ia().extendFlat,a=Yc().overrideAll;function n(l){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function o(l){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var i=Z.exports=a(r({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:n(),y:n(),z:n()},caps:{x:o(),y:o(),z:o()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:I(),hovertemplatefallback:S(),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),valuehoverformat:g("value",1),showlegend:r({},e.showlegend,{dflt:!1})},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,lightposition:t.lightposition,lighting:t.lighting,flatshading:t.flatshading,contour:t.contour,hoverinfo:r({},e.hoverinfo)}),"calc","nested");i.flatshading.dflt=!0,i.lighting.facenormalsepsilon.dflt=0,i.x.editType=i.y.editType=i.z.editType=i.value.editType="calc+clearAxisTypes"}),kS=Dt((Q,Z)=>{var c=kn(),g=Jo(),I=Xk(),S=mc();function t(r,a,n,o){function i(l,f){return c.coerce(r,a,I,l,f)}e(r,a,n,o,i)}function e(r,a,n,o,i){var l=i("isomin"),f=i("isomax");f!=null&&l!==void 0&&l!==null&&l>f&&(a.isomin=null,a.isomax=null);var x=i("x"),y=i("y"),v=i("z"),T=i("value");if(!x||!x.length||!y||!y.length||!v||!v.length||!T||!T.length){a.visible=!1;return}var u=g.getComponentMethod("calendars","handleTraceDefaults");u(r,a,["x","y","z"],o),i("valuehoverformat"),["x","y","z"].forEach(function(M){i(M+"hoverformat");var C="caps."+M,A=i(C+".show");A&&i(C+".fill");var h="slices."+M,p=i(h+".show");p&&(i(h+".fill"),i(h+".locations"))});var b=i("spaceframe.show");b&&i("spaceframe.fill");var _=i("surface.show");_&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var P=i("contour.show");P&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(M){i(M)}),S(r,a,o,i,{prefix:"",cLetter:"c"}),a._length=null}Z.exports={supplyDefaults:t,supplyIsoDefaults:e}}),Jk=Dt((Q,Z)=>{var c=kn(),g=Xd();function I(r,a){a._len=Math.min(a.u.length,a.v.length,a.w.length,a.x.length,a.y.length,a.z.length),a._u=e(a.u,a._len),a._v=e(a.v,a._len),a._w=e(a.w,a._len),a._x=e(a.x,a._len),a._y=e(a.y,a._len),a._z=e(a.z,a._len);var n=S(a);a._gridFill=n.fill,a._Xs=n.Xs,a._Ys=n.Ys,a._Zs=n.Zs,a._len=n.len;var o=0,i,l,f;a.starts&&(i=e(a.starts.x||[]),l=e(a.starts.y||[]),f=e(a.starts.z||[]),o=Math.min(i.length,l.length,f.length)),a._startsX=i||[],a._startsY=l||[],a._startsZ=f||[];var x=0,y=1/0,v;for(v=0;v1&&(p=a[i-1],w=n[i-1],O=o[i-1]),l=0;lp?"-":"+")+"x"),P=P.replace("y",(k>w?"-":"+")+"y"),P=P.replace("z",(R>O?"-":"+")+"z");var F=function(){i=0,j=[],V=[],H=[]};(!i||i{var c=Xd(),g=Jk().processGrid,I=Jk().filter;Z.exports=function(S,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=I(t.x,t._len),t._y=I(t.y,t._len),t._z=I(t.z,t._len),t._value=I(t.value,t._len);var e=g(t);t._gridFill=e.fill,t._Xs=e.Xs,t._Ys=e.Ys,t._Zs=e.Zs,t._len=e.len;for(var r=1/0,a=-1/0,n=0;n{Z.exports=function(c,g,I,S){S=S||c.length;for(var t=new Array(S),e=0;e{var c=fp().gl_mesh3d,g=Av().parseColorScale,I=kn().isArrayOrTypedArray,S=Tv(),t=Xc().extractOpts,e=mb(),r=function(f,x){for(var y=x.length-1;y>0;y--){var v=Math.min(x[y],x[y-1]),T=Math.max(x[y],x[y-1]);if(T>v&&v-1}function ft(Le,Gt){return Le===null?Gt:Le}function ut(Le,Gt,ne){yt();var Ct=[Gt],gt=[ne];if(at>=1)Ct=[Gt],gt=[ne];else if(at>0){var St=it(Gt,ne);Ct=St.xyzv,gt=St.abc}for(var Nt=0;Nt-1?ne[le]:lt(we,Ue,qe);Sr>-1?re[le]=Sr:re[le]=st(we,Ue,qe,ft(Le,or))}tt(re[0],re[1],re[2])}}function kt(Le,Gt,ne){var Ct=function(gt,St,Nt){ut(Le,[Gt[gt],Gt[St],Gt[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(2,3,0)}function It(Le,Gt,ne){var Ct=function(gt,St,Nt){ut(Le,[Gt[gt],Gt[St],Gt[Nt]],[ne[gt],ne[St],ne[Nt]])};Ct(0,1,2),Ct(3,0,1),Ct(2,3,0),Ct(1,2,3)}function Pt(Le,Gt,ne,Ct){var gt=Le[3];gtCt&&(gt=Ct);for(var St=(Le[3]-gt)/(Le[3]-Gt[3]+1e-9),Nt=[],re=0;re<4;re++)Nt[re]=(1-St)*Le[re]+St*Gt[re];return Nt}function qt(Le,Gt,ne){return Le>=Gt&&Le<=ne}function Wt(Le){var Gt=.001*(F-H);return Le>=H-Gt&&Le<=F+Gt}function Jt(Le){for(var Gt=[],ne=0;ne<4;ne++){var Ct=Le[ne];Gt.push([f._x[Ct],f._y[Ct],f._z[Ct],f._value[Ct]])}return Gt}var ge=3;function fe(Le,Gt,ne,Ct,gt,St){St||(St=1),ne=[-1,-1,-1];var Nt=!1,re=[qt(Gt[0][3],Ct,gt),qt(Gt[1][3],Ct,gt),qt(Gt[2][3],Ct,gt)];if(!re[0]&&!re[1]&&!re[2])return!1;var le=function(Ue,qe,or){return Wt(qe[0][3])&&Wt(qe[1][3])&&Wt(qe[2][3])?(ut(Ue,qe,or),!0):Stre?[j,St]:[St,V];cr(Gt,le[0],le[1])}}var we=[[Math.min(H,V),Math.max(H,V)],[Math.min(j,F),Math.max(j,F)]];["x","y","z"].forEach(function(Ue){for(var qe=[],or=0;or0&&(Wn.push(oi.id),Ue==="x"?Xn.push([oi.distRatio,0,0]):Ue==="y"?Xn.push([0,oi.distRatio,0]):Xn.push([0,0,oi.distRatio]))}else Ue==="x"?Hn=br(1,p-1):Ue==="y"?Hn=br(1,k-1):Hn=br(1,w-1);Wn.length>0&&(Ue==="x"?qe[Sr]=ur(Le,Wn,Ar,mr,Xn,qe[Sr]):Ue==="y"?qe[Sr]=jr(Le,Wn,Ar,mr,Xn,qe[Sr]):qe[Sr]=Wr(Le,Wn,Ar,mr,Xn,qe[Sr]),Sr++),Hn.length>0&&(Ue==="x"?qe[Sr]=ve(Le,Hn,Ar,mr,qe[Sr]):Ue==="y"?qe[Sr]=oe(Le,Hn,Ar,mr,qe[Sr]):qe[Sr]=Te(Le,Hn,Ar,mr,qe[Sr]),Sr++)}var $n=f.caps[Ue];$n.show&&$n.fill&&(vt($n.fill),Ue==="x"?qe[Sr]=ve(Le,[0,p-1],Ar,mr,qe[Sr]):Ue==="y"?qe[Sr]=oe(Le,[0,k-1],Ar,mr,qe[Sr]):qe[Sr]=Te(Le,[0,w-1],Ar,mr,qe[Sr]),Sr++)}}),_===0&&mt(),f._meshX=U,f._meshY=W,f._meshZ=q,f._meshIntensity=J,f._Xs=C,f._Ys=A,f._Zs=h}return nn(),f}function l(f,x){var y=f.glplot.gl,v=c({gl:y}),T=new a(f,v,x.uid);return v._trace=T,T.update(x),f.glplot.add(v),T}Z.exports={findNearestOnAxis:r,generateIsoMeshes:i,createIsosurfaceTrace:l}}),bU=Dt((Q,Z)=>{Z.exports={attributes:Xk(),supplyDefaults:kS().supplyDefaults,calc:TS(),colorbar:{min:"cmin",max:"cmax"},plot:Qk().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:V1(),categories:["gl3d","showLegend"],meta:{}}}),wU=Dt((Q,Z)=>{Z.exports=bU()}),AS=Dt((Q,Z)=>{var c=kc(),g=Xk(),I=b3(),S=Ho(),t=Ia().extendFlat,e=Yc().overrideAll,r=Z.exports=e(t({x:g.x,y:g.y,z:g.z,value:g.value,isomin:g.isomin,isomax:g.isomax,surface:g.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:g.slices,caps:g.caps,text:g.text,hovertext:g.hovertext,xhoverformat:g.xhoverformat,yhoverformat:g.yhoverformat,zhoverformat:g.zhoverformat,valuehoverformat:g.valuehoverformat,hovertemplate:g.hovertemplate,hovertemplatefallback:g.hovertemplatefallback},c("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:g.colorbar,opacity:g.opacity,opacityscale:I.opacityscale,lightposition:g.lightposition,lighting:g.lighting,flatshading:g.flatshading,contour:g.contour,hoverinfo:t({},S.hoverinfo),showlegend:t({},S.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}),kU=Dt((Q,Z)=>{var c=kn(),g=AS(),I=kS().supplyIsoDefaults,S=wS().opacityscaleDefaults;Z.exports=function(t,e,r,a){function n(o,i){return c.coerce(t,e,g,o,i)}I(t,e,r,a,n),S(t,e,a,n)}}),TU=Dt((Q,Z)=>{var c=fp().gl_mesh3d,g=Av().parseColorScale,I=kn().isArrayOrTypedArray,S=Tv(),t=Xc().extractOpts,e=mb(),r=Qk().findNearestOnAxis,a=Qk().generateIsoMeshes;function n(l,f,x){this.scene=l,this.uid=x,this.mesh=f,this.name="",this.data=null,this.showContour=!1}var o=n.prototype;o.handlePick=function(l){if(l.object===this.mesh){var f=l.data.index,x=this.data._meshX[f],y=this.data._meshY[f],v=this.data._meshZ[f],T=this.data._Ys.length,u=this.data._Zs.length,b=r(x,this.data._Xs).id,_=r(y,this.data._Ys).id,P=r(v,this.data._Zs).id,M=l.index=P+u*_+u*T*b;l.traceCoordinate=[this.data._meshX[M],this.data._meshY[M],this.data._meshZ[M],this.data._value[M]];var C=this.data.hovertext||this.data.text;return I(C)&&C[M]!==void 0?l.textLabel=C[M]:C&&(l.textLabel=C),!0}},o.update=function(l){var f=this.scene,x=f.fullSceneLayout;this.data=a(l);function y(_,P,M,C){return P.map(function(A){return _.d2l(A,0,C)*M})}var v=e(y(x.xaxis,l._meshX,f.dataScale[0],l.xcalendar),y(x.yaxis,l._meshY,f.dataScale[1],l.ycalendar),y(x.zaxis,l._meshZ,f.dataScale[2],l.zcalendar)),T=e(l._meshI,l._meshJ,l._meshK),u={positions:v,cells:T,lightPosition:[l.lightposition.x,l.lightposition.y,l.lightposition.z],ambient:l.lighting.ambient,diffuse:l.lighting.diffuse,specular:l.lighting.specular,roughness:l.lighting.roughness,fresnel:l.lighting.fresnel,vertexNormalsEpsilon:l.lighting.vertexnormalsepsilon,faceNormalsEpsilon:l.lighting.facenormalsepsilon,opacity:l.opacity,opacityscale:l.opacityscale,contourEnable:l.contour.show,contourColor:S(l.contour.color).slice(0,3),contourWidth:l.contour.width,useFacetNormals:l.flatshading},b=t(l);u.vertexIntensity=l._meshIntensity,u.vertexIntensityBounds=[b.min,b.max],u.colormap=g(l),this.mesh.update(u)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(l,f){var x=l.glplot.gl,y=c({gl:x}),v=new n(l,y,f.uid);return y._trace=v,v.update(f),l.glplot.add(y),v}Z.exports=i}),AU=Dt((Q,Z)=>{Z.exports={attributes:AS(),supplyDefaults:kU(),calc:TS(),colorbar:{min:"cmin",max:"cmax"},plot:TU(),moduleType:"trace",name:"volume",basePlotModule:V1(),categories:["gl3d","showLegend"],meta:{}}}),MU=Dt((Q,Z)=>{Z.exports=AU()}),SU=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=mc(),S=pb();Z.exports=function(t,e,r,a){function n(x,y){return g.coerce(t,e,S,x,y)}function o(x){var y=x.map(function(v){var T=n(v);return T&&g.isArrayOrTypedArray(T)?T:null});return y.every(function(v){return v&&v.length===y[0].length})&&y}var i=o(["x","y","z"]);if(!i){e.visible=!1;return}if(o(["i","j","k"]),e.i&&(!e.j||!e.k)||e.j&&(!e.k||!e.i)||e.k&&(!e.i||!e.j)){e.visible=!1;return}var l=c.getComponentMethod("calendars","handleTraceDefaults");l(t,e,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(x){n(x)});var f=n("contour.show");f&&(n("contour.color"),n("contour.width")),"intensity"in t?(n("intensity"),n("intensitymode"),I(t,e,a,n,{prefix:"",cLetter:"c"})):(e.showscale=!1,"facecolor"in t?n("facecolor"):"vertexcolor"in t?n("vertexcolor"):n("color",r)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),e._length=null}}),EU=Dt((Q,Z)=>{var c=Xd();Z.exports=function(g,I){I.intensity&&c(g,I,{vals:I.intensity,containerStr:"",cLetter:"c"})}}),CU=Dt((Q,Z)=>{var c=fp().gl_mesh3d,g=fp().delaunay_triangulate,I=fp().alpha_shape,S=fp().convex_hull,t=Av().parseColorScale,e=kn().isArrayOrTypedArray,r=Tv(),a=Xc().extractOpts,n=mb();function o(u,b,_){this.scene=u,this.uid=_,this.mesh=b,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=o.prototype;i.handlePick=function(u){if(u.object===this.mesh){var b=u.index=u.data.index;u.data._cellCenter?u.traceCoordinate=u.data.dataCoordinate:u.traceCoordinate=[this.data.x[b],this.data.y[b],this.data.z[b]];var _=this.data.hovertext||this.data.text;return e(_)&&_[b]!==void 0?u.textLabel=_[b]:_&&(u.textLabel=_),!0}};function l(u){for(var b=[],_=u.length,P=0;P<_;P++)b[P]=r(u[P]);return b}function f(u,b,_,P){for(var M=[],C=b.length,A=0;A=b-.5)return!1;return!0}i.update=function(u){var b=this.scene,_=b.fullSceneLayout;this.data=u;var P=u.x.length,M=n(f(_.xaxis,u.x,b.dataScale[0],u.xcalendar),f(_.yaxis,u.y,b.dataScale[1],u.ycalendar),f(_.zaxis,u.z,b.dataScale[2],u.zcalendar)),C;if(u.i&&u.j&&u.k){if(u.i.length!==u.j.length||u.j.length!==u.k.length||!v(u.i,P)||!v(u.j,P)||!v(u.k,P))return;C=n(x(u.i),x(u.j),x(u.k))}else u.alphahull===0?C=S(M):u.alphahull>0?C=I(u.alphahull,M):C=y(u.delaunayaxis,M);var A={positions:M,cells:C,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:r(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading};if(u.intensity){var h=a(u);this.color="#fff";var p=u.intensitymode;A[p+"Intensity"]=u.intensity,A[p+"IntensityBounds"]=[h.min,h.max],A.colormap=t(u)}else u.vertexcolor?(this.color=u.vertexcolor[0],A.vertexColors=l(u.vertexcolor)):u.facecolor?(this.color=u.facecolor[0],A.cellColors=l(u.facecolor)):(this.color=u.color,A.meshColor=r(u.color));this.mesh.update(A)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(u,b){var _=u.glplot.gl,P=c({gl:_}),M=new o(u,P,b.uid);return P._trace=M,M.update(b),u.glplot.add(P),M}Z.exports=T}),LU=Dt((Q,Z)=>{Z.exports={attributes:pb(),supplyDefaults:SU(),calc:EU(),colorbar:{min:"cmin",max:"cmax"},plot:CU(),moduleType:"trace",name:"mesh3d",basePlotModule:V1(),categories:["gl3d","showLegend"],meta:{}}}),PU=Dt((Q,Z)=>{Z.exports=LU()}),MS=Dt((Q,Z)=>{var c=kc(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=pb(),e=Ho(),r=Ia().extendFlat,a={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:I({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=a}),IU=Dt((Q,Z)=>{var c=kn(),g=mc(),I=MS();Z.exports=function(S,t,e,r){function a(v,T){return c.coerce(S,t,I,v,T)}var n=a("u"),o=a("v"),i=a("w"),l=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!l||!l.length||!f||!f.length||!x||!x.length){t.visible=!1;return}var y=a("sizemode");a("sizeref",y==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),zU=Dt((Q,Z)=>{var c=Xd();Z.exports=function(g,I){for(var S=I.u,t=I.v,e=I.w,r=Math.min(I.x.length,I.y.length,I.z.length,S.length,t.length,e.length),a=-1/0,n=1/0,o=0;o{var c=fp().gl_cone3d,g=fp().gl_cone3d.createConeMesh,I=kn().simpleMap,S=Av().parseColorScale,t=Xc().extractOpts,e=kn().isArrayOrTypedArray,r=mb();function a(y,v){this.scene=y,this.uid=v,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(y){if(y.object===this.mesh){var v=y.index=y.data.index,T=this.data.x[v],u=this.data.y[v],b=this.data.z[v],_=this.data.u[v],P=this.data.v[v],M=this.data.w[v];y.traceCoordinate=[T,u,b,_,P,M,Math.sqrt(_*_+P*P+M*M)];var C=this.data.hovertext||this.data.text;return e(C)&&C[v]!==void 0?y.textLabel=C[v]:C&&(y.textLabel=C),!0}};var o={xaxis:0,yaxis:1,zaxis:2},i={tip:1,tail:0,cm:.25,center:.5},l={tip:1,tail:1,cm:.75,center:.5};function f(y,v){var T=y.fullSceneLayout,u=y.dataScale,b={};function _(h,p){var k=T[p],w=u[o[p]];return I(h,function(R){return k.d2l(R)*w})}b.vectors=r(_(v.u,"xaxis"),_(v.v,"yaxis"),_(v.w,"zaxis"),v._len),b.positions=r(_(v.x,"xaxis"),_(v.y,"yaxis"),_(v.z,"zaxis"),v._len);var P=t(v);b.colormap=S(v),b.vertexIntensityBounds=[P.min/v._normMax,P.max/v._normMax],b.coneOffset=i[v.anchor];var M=v.sizemode;M==="scaled"?b.coneSize=v.sizeref||.5:M==="absolute"?b.coneSize=v.sizeref&&v._normMax?v.sizeref/v._normMax:.5:M==="raw"&&(b.coneSize=v.sizeref),b.coneSizemode=M;var C=c(b),A=v.lightposition;return C.lightPosition=[A.x,A.y,A.z],C.ambient=v.lighting.ambient,C.diffuse=v.lighting.diffuse,C.specular=v.lighting.specular,C.roughness=v.lighting.roughness,C.fresnel=v.lighting.fresnel,C.opacity=v.opacity,v._pad=l[v.anchor]*C.vectorScale*C.coneScale*v._normMax,C}n.update=function(y){this.data=y;var v=f(this.scene,y);this.mesh.update(v)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function x(y,v){var T=y.glplot.gl,u=f(y,v),b=g(T,u),_=new a(y,v.uid);return _.mesh=b,_.data=v,b._trace=_,y.glplot.add(b),_}Z.exports=x}),DU=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"cone",basePlotModule:V1(),categories:["gl3d","showLegend"],attributes:MS(),supplyDefaults:IU(),colorbar:{min:"cmin",max:"cmax"},calc:zU(),plot:OU(),eventData:function(c,g){return c.norm=g.traceCoordinate[6],c},meta:{}}}),FU=Dt((Q,Z)=>{Z.exports=DU()}),SS=Dt((Q,Z)=>{var c=kc(),g=dh().axisHoverFormat,{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=pb(),e=Ho(),r=Ia().extendFlat,a={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:I({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:g("u",1),vhoverformat:g("v",1),whoverformat:g("w",1),xhoverformat:g("x"),yhoverformat:g("y"),zhoverformat:g("z"),showlegend:r({},e.showlegend,{dflt:!1})};r(a,c("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n=["opacity","lightposition","lighting"];n.forEach(function(o){a[o]=t[o]}),a.hoverinfo=r({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=a}),RU=Dt((Q,Z)=>{var c=kn(),g=mc(),I=SS();Z.exports=function(S,t,e,r){function a(y,v){return c.coerce(S,t,I,y,v)}var n=a("u"),o=a("v"),i=a("w"),l=a("x"),f=a("y"),x=a("z");if(!n||!n.length||!o||!o.length||!i||!i.length||!l||!l.length||!f||!f.length||!x||!x.length){t.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),g(S,t,r,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}),BU=Dt((Q,Z)=>{var c=fp().gl_streamtube3d,g=c.createTubeMesh,I=kn(),S=Av().parseColorScale,t=Xc().extractOpts,e=mb(),r={xaxis:0,yaxis:1,zaxis:2};function a(x,y){this.scene=x,this.uid=y,this.mesh=null,this.data=null}var n=a.prototype;n.handlePick=function(x){var y=this.scene.fullSceneLayout,v=this.scene.dataScale;function T(_,P){var M=y[P],C=v[r[P]];return M.l2c(_)/C}if(x.object===this.mesh){var u=x.data.position,b=x.data.velocity;return x.traceCoordinate=[T(u[0],"xaxis"),T(u[1],"yaxis"),T(u[2],"zaxis"),T(b[0],"xaxis"),T(b[1],"yaxis"),T(b[2],"zaxis"),x.data.intensity*this.data._normMax,x.data.divergence],x.textLabel=this.data.hovertext||this.data.text,!0}};function o(x){var y=x.length,v;return y>2?v=x.slice(1,y-1):y===2?v=[(x[0]+x[1])/2]:v=x,v}function i(x){var y=x.length;return y===1?[.5,.5]:[x[1]-x[0],x[y-1]-x[y-2]]}function l(x,y){var v=x.fullSceneLayout,T=x.dataScale,u=y._len,b={};function _(st,tt){var dt=v[tt],rt=T[r[tt]];return I.simpleMap(st,function(at){return dt.d2l(at)*rt})}if(b.vectors=e(_(y._u,"xaxis"),_(y._v,"yaxis"),_(y._w,"zaxis"),u),!u)return{positions:[],cells:[]};var P=_(y._Xs,"xaxis"),M=_(y._Ys,"yaxis"),C=_(y._Zs,"zaxis");b.meshgrid=[P,M,C],b.gridFill=y._gridFill;var A=y._slen;if(A)b.startingPositions=e(_(y._startsX,"xaxis"),_(y._startsY,"yaxis"),_(y._startsZ,"zaxis"));else{for(var h=M[0],p=o(P),k=o(C),w=new Array(p.length*k.length),R=0,O=0;O{Z.exports={moduleType:"trace",name:"streamtube",basePlotModule:V1(),categories:["gl3d","showLegend"],attributes:SS(),supplyDefaults:RU(),colorbar:{min:"cmin",max:"cmax"},calc:Jk().calc,plot:BU(),eventData:function(c,g){return c.tubex=c.x,c.tubey=c.y,c.tubez=c.z,c.tubeu=g.traceCoordinate[3],c.tubev=g.traceCoordinate[4],c.tubew=g.traceCoordinate[5],c.norm=g.traceCoordinate[6],c.divergence=g.traceCoordinate[7],delete c.x,delete c.y,delete c.z,c},meta:{}}}),jU=Dt((Q,Z)=>{Z.exports=NU()}),vx=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=I0(),t=ef(),e=Ho(),r=kc(),a=kd().dash,n=Ia().extendFlat,o=Yc().overrideAll,i=t.marker,l=t.line,f=i.line;Z.exports=o({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:n({},t.mode,{dflt:"markers"}),text:n({},t.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:n({},t.hovertext,{}),textfont:t.textfont,textposition:t.textposition,line:{color:l.color,width:l.width,dash:a},connectgaps:t.connectgaps,marker:n({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:n({},i.angleref,{values:["previous","up","north"]}),standoff:i.standoff,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,colorbar:i.colorbar,line:n({width:f.width},r("marker.line")),gradient:i.gradient},r("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:S(),selected:t.selected,unselected:t.unselected,hoverinfo:n({},e.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:c(),hovertemplatefallback:I()},"calc","nested")}),UU=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=x0(),e=O0(),r=vx(),a=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(n,o,i,l){function f(P,M){return c.coerce(n,o,r,P,M)}var x=f("locations"),y;if(x&&x.length){var v=f("geojson"),T;(typeof v=="string"&&v!==""||c.isPlainObject(v))&&(T="geojson-id");var u=f("locationmode",T);u==="country names"&&c.warn(a),u==="geojson-id"&&f("featureidkey"),y=x.length}else{var b=f("lon")||[],_=f("lat")||[];y=Math.min(b.length,_.length)}if(!y){o.visible=!1;return}o._length=y,f("text"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),g.hasMarkers(o)&&I(n,o,i,l,f,{gradient:!0}),g.hasLines(o)&&(S(n,o,i,l,f),f("connectgaps")),g.hasText(o)&&(f("texttemplate"),f("texttemplatefallback"),t(n,o,l,f)),f("fill"),o.fill!=="none"&&e(n,o,i,f),c.coerceSelectionMarkerOpacity(o,f)}}),VU=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.geo]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),tT=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=F0(),S=ct(),t=Bt(),e=kn().isArrayOrTypedArray,r=kn()._;function a(n){return n&&typeof n=="string"}Z.exports=function(n,o){var i=e(o.locations),l=i?o.locations.length:o._length,f=new Array(l),x;o.geojson?x=function(_){return a(_)||c(_)}:x=a;for(var y=0;y{Q.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},Q.axesNames=["lonaxis","lataxis"],Q.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},Q.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},Q.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}},Q.clipPad=.001,Q.precision=.1,Q.landColor="#F0DC82",Q.waterColor="#3399FF",Q.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},Q.sphereSVG={type:"Sphere"},Q.fillLayers={ocean:1,land:1,lakes:1},Q.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},Q.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],Q.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],Q.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}),ES=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.topojson=c.topojson||{}))})(Q,function(c){function g(_){return _}function I(_){if(_==null)return g;var P,M,C=_.scale[0],A=_.scale[1],h=_.translate[0],p=_.translate[1];return function(k,w){w||(P=M=0);var R=2,O=k.length,j=new Array(O);for(j[0]=(P+=k[0])*C+h,j[1]=(M+=k[1])*A+p;Rh&&(h=R[0]),R[1]p&&(p=R[1])}function w(R){switch(R.type){case"GeometryCollection":R.geometries.forEach(w);break;case"Point":k(R.coordinates);break;case"MultiPoint":R.coordinates.forEach(k);break}}_.arcs.forEach(function(R){for(var O=-1,j=R.length,V;++Oh&&(h=V[0]),V[1]p&&(p=V[1])});for(M in _.objects)w(_.objects[M]);return[C,A,h,p]}function t(_,P){for(var M,C=_.length,A=C-P;A<--C;)M=_[A],_[A++]=_[C],_[C]=M}function e(_,P){return typeof P=="string"&&(P=_.objects[P]),P.type==="GeometryCollection"?{type:"FeatureCollection",features:P.geometries.map(function(M){return r(_,M)})}:r(_,P)}function r(_,P){var M=P.id,C=P.bbox,A=P.properties==null?{}:P.properties,h=a(_,P);return M==null&&C==null?{type:"Feature",properties:A,geometry:h}:C==null?{type:"Feature",id:M,properties:A,geometry:h}:{type:"Feature",id:M,bbox:C,properties:A,geometry:h}}function a(_,P){var M=I(_.transform),C=_.arcs;function A(O,j){j.length&&j.pop();for(var V=C[O<0?~O:O],H=0,F=V.length;H1)C=l(_,P,M);else for(A=0,C=new Array(h=_.arcs.length);A1)for(var j=1,V=k(R[0]),H,F;jV&&(F=R[0],R[0]=R[j],R[j]=F,V=H);return R}).filter(function(w){return w.length>0})}}function v(_,P){for(var M=0,C=_.length;M>>1;_[A]=2))throw new Error("n must be ≥2");w=_.bbox||S(_);var M=w[0],C=w[1],A=w[2],h=w[3],p;P={scale:[A-M?(A-M)/(p-1):1,h-C?(h-C)/(p-1):1],translate:[M,C]}}else w=_.bbox;var k=u(P),w,R,O=_.objects,j={};function V(U){return k(U)}function H(U){var W;switch(U.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:U.geometries.map(H)};break;case"Point":W={type:"Point",coordinates:V(U.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:U.coordinates.map(V)};break;default:return U}return U.id!=null&&(W.id=U.id),U.bbox!=null&&(W.bbox=U.bbox),U.properties!=null&&(W.properties=U.properties),W}function F(U){var W=0,q=1,J=U.length,lt,yt=new Array(J);for(yt[0]=k(U[0],0);++W{var c=Z.exports={},g=w3().locationmodeToLayer,I=ES().feature;c.getTopojsonName=function(S){return[S.scope.replace(/ /g,"-"),"_",S.resolution.toString(),"m"].join("")},c.getTopojsonPath=function(S,t){return S+=S.endsWith("/")?"":"/",`${S}${t}.json`},c.getTopojsonFeatures=function(S,t){var e=g[S.locationmode],r=t.objects[e];return I(t,r).features}}),H1=Dt(Q=>{var Z=Ca().BADNUM;Q.calcTraceToLineCoords=function(c){for(var g=c[0].trace,I=g.connectgaps,S=[],t=[],e=0;e0&&(S.push(t),t=[])}return t.length>0&&S.push(t),S},Q.makeLine=function(c){return c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}},Q.makePolygon=function(c){if(c.length===1)return{type:"Polygon",coordinates:c};for(var g=new Array(c.length),I=0;I{Z.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}}),rT=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=63710088e-1,c={centimeters:Z*100,centimetres:Z*100,degrees:360/(2*Math.PI),feet:Z*3.28084,inches:Z*39.37,kilometers:Z/1e3,kilometres:Z/1e3,meters:Z,metres:Z,miles:Z/1609.344,millimeters:Z*1e3,millimetres:Z*1e3,nauticalmiles:Z/1852,radians:1,yards:Z*1.0936},g={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function I(O,j,V={}){let H={type:"Feature"};return(V.id===0||V.id)&&(H.id=V.id),V.bbox&&(H.bbox=V.bbox),H.properties=j||{},H.geometry=O,H}function S(O,j,V={}){switch(O){case"Point":return t(j).geometry;case"LineString":return n(j).geometry;case"Polygon":return r(j).geometry;case"MultiPoint":return f(j).geometry;case"MultiLineString":return l(j).geometry;case"MultiPolygon":return x(j).geometry;default:throw new Error(O+" is invalid")}}function t(O,j,V={}){if(!O)throw new Error("coordinates is required");if(!Array.isArray(O))throw new Error("coordinates must be an Array");if(O.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(O[0])||!p(O[1]))throw new Error("coordinates must contain numbers");return I({type:"Point",coordinates:O},j,V)}function e(O,j,V={}){return i(O.map(H=>t(H,j)),V)}function r(O,j,V={}){for(let H of O){if(H.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(H[H.length-1].length!==H[0].length)throw new Error("First and last Position are not equivalent.");for(let F=0;Fr(H,j)),V)}function n(O,j,V={}){if(O.length<2)throw new Error("coordinates must be an array of two or more positions");return I({type:"LineString",coordinates:O},j,V)}function o(O,j,V={}){return i(O.map(H=>n(H,j)),V)}function i(O,j={}){let V={type:"FeatureCollection"};return j.id&&(V.id=j.id),j.bbox&&(V.bbox=j.bbox),V.features=O,V}function l(O,j,V={}){return I({type:"MultiLineString",coordinates:O},j,V)}function f(O,j,V={}){return I({type:"MultiPoint",coordinates:O},j,V)}function x(O,j,V={}){return I({type:"MultiPolygon",coordinates:O},j,V)}function y(O,j,V={}){return I({type:"GeometryCollection",geometries:O},j,V)}function v(O,j=0){if(j&&!(j>=0))throw new Error("precision must be a positive number");let V=Math.pow(10,j||0);return Math.round(O*V)/V}function T(O,j="kilometers"){let V=c[j];if(!V)throw new Error(j+" units is invalid");return O*V}function u(O,j="kilometers"){let V=c[j];if(!V)throw new Error(j+" units is invalid");return O/V}function b(O,j){return M(u(O,j))}function _(O){let j=O%360;return j<0&&(j+=360),j}function P(O){return O=O%360,O>180?O-360:O<-180?O+360:O}function M(O){return O%(2*Math.PI)*180/Math.PI}function C(O){return O%360*Math.PI/180}function A(O,j="kilometers",V="kilometers"){if(!(O>=0))throw new Error("length must be a positive number");return T(u(O,j),V)}function h(O,j="meters",V="kilometers"){if(!(O>=0))throw new Error("area must be a positive number");let H=g[j];if(!H)throw new Error("invalid original units");let F=g[V];if(!F)throw new Error("invalid final units");return O/H*F}function p(O){return!isNaN(O)&&O!==null&&!Array.isArray(O)}function k(O){return O!==null&&typeof O=="object"&&!Array.isArray(O)}function w(O){if(!O)throw new Error("bbox is required");if(!Array.isArray(O))throw new Error("bbox must be an Array");if(O.length!==4&&O.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");O.forEach(j=>{if(!p(j))throw new Error("bbox must only contain numbers")})}function R(O){if(!O)throw new Error("id is required");if(["string","number"].indexOf(typeof O)===-1)throw new Error("id must be a number or a string")}Q.areaFactors=g,Q.azimuthToBearing=P,Q.bearingToAzimuth=_,Q.convertArea=h,Q.convertLength=A,Q.degreesToRadians=C,Q.earthRadius=Z,Q.factors=c,Q.feature=I,Q.featureCollection=i,Q.geometry=S,Q.geometryCollection=y,Q.isNumber=p,Q.isObject=k,Q.lengthToDegrees=b,Q.lengthToRadians=u,Q.lineString=n,Q.lineStrings=o,Q.multiLineString=l,Q.multiPoint=f,Q.multiPolygon=x,Q.point=t,Q.points=e,Q.polygon=r,Q.polygons=a,Q.radiansToDegrees=M,Q.radiansToLength=T,Q.round=v,Q.validateBBox=w,Q.validateId=R}),nT=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=rT();function c(u,b,_){if(u!==null)for(var P,M,C,A,h,p,k,w=0,R=0,O,j=u.type,V=j==="FeatureCollection",H=j==="Feature",F=V?u.features.length:1,U=0;Up||V>k||H>w){h=R,p=P,k=V,w=H,C=0;return}var F=Z.lineString.call(void 0,[h,R],_.properties);if(b(F,P,M,H,C)===!1)return!1;C++,h=R})===!1)return!1}}})}function f(u,b,_){var P=_,M=!1;return l(u,function(C,A,h,p,k){M===!1&&_===void 0?P=C:P=b(P,C,A,h,p,k),M=!0}),P}function x(u,b){if(!u)throw new Error("geojson is required");o(u,function(_,P,M){if(_.geometry!==null){var C=_.geometry.type,A=_.geometry.coordinates;switch(C){case"LineString":if(b(_,P,M,0,0)===!1)return!1;break;case"Polygon":for(var h=0;h{Object.defineProperty(Q,"__esModule",{value:!0});var Z=rT(),c=nT();function g(n){return c.geomReduce.call(void 0,n,(o,i)=>o+I(i),0)}function I(n){let o=0,i;switch(n.type){case"Polygon":return S(n.coordinates);case"MultiPolygon":for(i=0;i0){o+=Math.abs(r(n[0]));for(let i=1;i=o?(l+2)%o:l+2],v=f[0]*e,T=x[1]*e,u=y[0]*e;i+=(u-v)*Math.sin(T),l++}return i*t}var a=g;Q.area=g,Q.default=a}),qU=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=rT(),c=nT();function g(S,t={}){let e=0,r=0,a=0;return c.coordEach.call(void 0,S,function(n){e+=n[0],r+=n[1],a++},!0),Z.point.call(void 0,[e/a,r/a],t.properties)}var I=g;Q.centroid=g,Q.default=I}),$U=Dt(Q=>{Object.defineProperty(Q,"__esModule",{value:!0});var Z=nT();function c(I,S={}){if(I.bbox!=null&&S.recompute!==!0)return I.bbox;let t=[1/0,1/0,-1/0,-1/0];return Z.coordEach.call(void 0,I,e=>{t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]{var c=qr(),g=HU(),{area:I}=WU(),{centroid:S}=qU(),{bbox:t}=$U(),e=w1(),r=as(),a=si(),n=zo(),o=mm(),i=Object.keys(g),l={"ISO-3":e,"USA-states":e,"country names":f};function f(P){for(var M=0;M0&&j[V+1][0]<0)return V;return null}switch(A==="RUS"||A==="FJI"?p=function(j){var V;if(O(j)===null)V=j;else for(V=new Array(j.length),R=0;RV?H[F++]=[j[R][0]+360,j[R][1]]:R===V?(H[F++]=j[R],H[F++]=[j[R][0],-90]):H[F++]=j[R];var U=o.tester(H);U.pts.pop(),h.push(U)}:p=function(j){h.push(o.tester(j))},M.type){case"MultiPolygon":for(k=0;k0?U.properties.ct=u(U):U.properties.ct=[NaN,NaN],H.fIn=j,H.fOut=U,h.push(U)}else r.log(["Location",H.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete A[V]}switch(C.type){case"FeatureCollection":var R=C.features;for(p=0;ph&&(h=w,C=k)}else C=M;return S(C).geometry.coordinates}function b(P){var M=window.PlotlyGeoAssets||{},C=[];function A(R){return new Promise(function(O,j){c.json(R,function(V,H){if(V){delete M[R];var F=V.status===404?'GeoJSON at URL "'+R+'" does not exist.':"Unexpected error while fetching from "+R;return j(new Error(F))}return M[R]=H,O(H)})})}function h(R){return new Promise(function(O,j){var V=0,H=setInterval(function(){if(M[R]&&M[R]!=="pending")return clearInterval(H),O(M[R]);if(V>100)return clearInterval(H),j("Unexpected error while fetching from "+R);V++},50)})}for(var p=0;p{var c=qr(),g=Vs(),I=hi(),S=_l(),t=S.stylePoints,e=S.styleText;Z.exports=function(a,n){n&&r(a,n)};function r(a,n){var o=n[0].trace,i=n[0].node3;i.style("opacity",n[0].trace.opacity),t(i,o,a),e(i,o,a),i.selectAll("path.js-line").style("fill","none").each(function(l){var f=c.select(this),x=l.trace,y=x.line||{};f.call(I.stroke,y.color).call(g.dashLine,y.dash||"",y.width||0),x.fill!=="none"&&f.call(I.fill,x.fillcolor)})}}),LS=Dt((Q,Z)=>{var c=qr(),g=kn(),I=eT().getTopojsonFeatures,S=H1(),t=W1(),e=Y0().findExtremes,r=Ca().BADNUM,a=me().calcMarkerSize,n=Tc(),o=CS();function i(f,x,y){var v=x.layers.frontplot.select(".scatterlayer"),T=g.makeTraceGroups(v,y,"trace scattergeo");function u(b,_){b.lonlat[0]===r&&c.select(_).remove()}T.selectAll("*").remove(),T.each(function(b){var _=c.select(this),P=b[0].trace;if(n.hasLines(P)||P.fill!=="none"){var M=S.calcTraceToLineCoords(b),C=P.fill!=="none"?S.makePolygon(M):S.makeLine(M);_.selectAll("path.js-line").data([{geojson:C,trace:P}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}n.hasMarkers(P)&&_.selectAll("path.point").data(g.identity).enter().append("path").classed("point",!0).each(function(A){u(A,this)}),n.hasText(P)&&_.selectAll("g").data(g.identity).enter().append("g").append("text").each(function(A){u(A,this)}),o(f,b)})}function l(f,x){var y=f[0].trace,v=x[y.geo],T=v._subplot,u=y._length,b,_;if(g.isArrayOrTypedArray(y.locations)){var P=y.locationmode,M=P==="geojson-id"?t.extractTraceFeature(f):I(y,T.topojson);for(b=0;b{var c=tf(),g=Ca().BADNUM,I=Fu(),S=kn().fillText,t=vx();Z.exports=function(r,a,n){var o=r.cd,i=o[0].trace,l=r.xa,f=r.ya,x=r.subplot,y=x.projection.isLonLatOverEdges,v=x.project;function T(A){var h=A.lonlat;if(h[0]===g||y(h))return 1/0;var p=v(h),k=v([a,n]),w=Math.abs(p[0]-k[0]),R=Math.abs(p[1]-k[1]),O=Math.max(3,A.mrc||0);return Math.max(Math.sqrt(w*w+R*R)-O,1-3/O)}if(c.getClosest(o,T,r),r.index!==!1){var u=o[r.index],b=u.lonlat,_=[l.c2p(b),f.c2p(b)],P=u.mrc||1;r.x0=_[0]-P,r.x1=_[0]+P,r.y0=_[1]-P,r.y1=_[1]+P,r.loc=u.loc,r.lon=b[0],r.lat=b[1];var M={};M[i.geo]={_subplot:x};var C=i._module.formatLabels(u,i,M);return r.lonLabel=C.lonLabel,r.latLabel=C.latLabel,r.color=I(i,u),r.extraText=e(i,u,r,o[0].t.labels),r.hovertemplate=i.hovertemplate,[r]}};function e(r,a,n,o){if(r.hovertemplate)return;var i=a.hi||r.hoverinfo,l=i==="all"?t.hoverinfo.flags:i.split("+"),f=l.indexOf("location")!==-1&&Array.isArray(r.locations),x=l.indexOf("lon")!==-1,y=l.indexOf("lat")!==-1,v=l.indexOf("text")!==-1,T=[];function u(b){return b+"°"}return f?T.push(a.loc):x&&y?T.push("("+u(n.latLabel)+", "+u(n.lonLabel)+")"):x?T.push(o.lon+u(n.lonLabel)):y&&T.push(o.lat+u(n.latLabel)),v&&S(a,r,T),T.join("
")}}),GU=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){c.lon=g.lon,c.lat=g.lat,c.location=g.loc?g.loc:null;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c}}),YU=Dt((Q,Z)=>{var c=Tc(),g=Ca().BADNUM;Z.exports=function(I,S){var t=I.cd,e=I.xaxis,r=I.yaxis,a=[],n=t[0].trace,o,i,l,f,x,y=!c.hasMarkers(n)&&!c.hasText(n);if(y)return[];if(S===!1)for(x=0;x{(function(c,g){g(typeof Q=="object"&&typeof Z<"u"?Q:c.d3=c.d3||{})})(Q,function(c){function g(rt,at){return rtat?1:rt>=at?0:NaN}function I(rt){return rt.length===1&&(rt=S(rt)),{left:function(at,vt,it,Y){for(it==null&&(it=0),Y==null&&(Y=at.length);it>>1;rt(at[ft],vt)<0?it=ft+1:Y=ft}return it},right:function(at,vt,it,Y){for(it==null&&(it=0),Y==null&&(Y=at.length);it>>1;rt(at[ft],vt)>0?Y=ft:it=ft+1}return it}}}function S(rt){return function(at,vt){return g(rt(at),vt)}}var t=I(g),e=t.right,r=t.left;function a(rt,at){at==null&&(at=n);for(var vt=0,it=rt.length-1,Y=rt[0],ft=new Array(it<0?0:it);vtrt?1:at>=rt?0:NaN}function l(rt){return rt===null?NaN:+rt}function f(rt,at){var vt=rt.length,it=0,Y=-1,ft=0,ut,kt,It=0;if(at==null)for(;++Y1)return It/(it-1)}function x(rt,at){var vt=f(rt,at);return vt&&Math.sqrt(vt)}function y(rt,at){var vt=rt.length,it=-1,Y,ft,ut;if(at==null){for(;++it=Y)for(ft=ut=Y;++itY&&(ft=Y),ut=Y)for(ft=ut=Y;++itY&&(ft=Y),ut0)return[rt];if((it=at0)for(rt=Math.ceil(rt/kt),at=Math.floor(at/kt),ut=new Array(ft=Math.ceil(at-rt+1));++Y=0?(ft>=M?10:ft>=C?5:ft>=A?2:1)*Math.pow(10,Y):-Math.pow(10,-Y)/(ft>=M?10:ft>=C?5:ft>=A?2:1)}function k(rt,at,vt){var it=Math.abs(at-rt)/Math.max(0,vt),Y=Math.pow(10,Math.floor(Math.log(it)/Math.LN10)),ft=it/Y;return ft>=M?Y*=10:ft>=C?Y*=5:ft>=A&&(Y*=2),atWt;)Jt.pop(),--ge;var fe=new Array(ge+1),pe;for(ft=0;ft<=ge;++ft)pe=fe[ft]=[],pe.x0=ft>0?Jt[ft-1]:qt,pe.x1=ft=1)return+vt(rt[it-1],it-1,rt);var it,Y=(it-1)*at,ft=Math.floor(Y),ut=+vt(rt[ft],ft,rt),kt=+vt(rt[ft+1],ft+1,rt);return ut+(kt-ut)*(Y-ft)}}function j(rt,at,vt){return rt=u.call(rt,l).sort(g),Math.ceil((vt-at)/(2*(O(rt,.75)-O(rt,.25))*Math.pow(rt.length,-1/3)))}function V(rt,at,vt){return Math.ceil((vt-at)/(3.5*x(rt)*Math.pow(rt.length,-1/3)))}function H(rt,at){var vt=rt.length,it=-1,Y,ft;if(at==null){for(;++it=Y)for(ft=Y;++itft&&(ft=Y)}else for(;++it=Y)for(ft=Y;++itft&&(ft=Y);return ft}function F(rt,at){var vt=rt.length,it=vt,Y=-1,ft,ut=0;if(at==null)for(;++Y=0;)for(ut=rt[at],vt=ut.length;--vt>=0;)ft[--Y]=ut[vt];return ft}function q(rt,at){var vt=rt.length,it=-1,Y,ft;if(at==null){for(;++it=Y)for(ft=Y;++itY&&(ft=Y)}else for(;++it=Y)for(ft=Y;++itY&&(ft=Y);return ft}function J(rt,at){for(var vt=at.length,it=new Array(vt);vt--;)it[vt]=rt[at[vt]];return it}function lt(rt,at){if(vt=rt.length){var vt,it=0,Y=0,ft,ut=rt[Y];for(at==null&&(at=g);++it{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,k3()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function I(){return new S}function S(){this.reset()}S.prototype={constructor:S,reset:function(){this.s=this.t=0},add:function(gr){e(t,gr,this.t),e(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new S;function e(gr,Ur,wn){var hn=gr.s=Ur+wn,qn=hn-Ur,di=hn-qn;gr.t=Ur-di+(wn-qn)}var r=1e-6,a=1e-12,n=Math.PI,o=n/2,i=n/4,l=n*2,f=180/n,x=n/180,y=Math.abs,v=Math.atan,T=Math.atan2,u=Math.cos,b=Math.ceil,_=Math.exp,P=Math.log,M=Math.pow,C=Math.sin,A=Math.sign||function(gr){return gr>0?1:gr<0?-1:0},h=Math.sqrt,p=Math.tan;function k(gr){return gr>1?0:gr<-1?n:Math.acos(gr)}function w(gr){return gr>1?o:gr<-1?-o:Math.asin(gr)}function R(gr){return(gr=C(gr/2))*gr}function O(){}function j(gr,Ur){gr&&H.hasOwnProperty(gr.type)&&H[gr.type](gr,Ur)}var V={Feature:function(gr,Ur){j(gr.geometry,Ur)},FeatureCollection:function(gr,Ur){for(var wn=gr.features,hn=-1,qn=wn.length;++hn=0?1:-1,qn=hn*wn,di=u(Ur),aa=C(Ur),va=tt*aa,Ba=st*di+va*u(qn),Za=va*hn*C(qn);q.add(T(Za,Ba)),mt=gr,st=di,tt=aa}function Y(gr){return J.reset(),W(gr,dt),J*2}function ft(gr){return[T(gr[1],gr[0]),w(gr[2])]}function ut(gr){var Ur=gr[0],wn=gr[1],hn=u(wn);return[hn*u(Ur),hn*C(Ur),C(wn)]}function kt(gr,Ur){return gr[0]*Ur[0]+gr[1]*Ur[1]+gr[2]*Ur[2]}function It(gr,Ur){return[gr[1]*Ur[2]-gr[2]*Ur[1],gr[2]*Ur[0]-gr[0]*Ur[2],gr[0]*Ur[1]-gr[1]*Ur[0]]}function Pt(gr,Ur){gr[0]+=Ur[0],gr[1]+=Ur[1],gr[2]+=Ur[2]}function qt(gr,Ur){return[gr[0]*Ur,gr[1]*Ur,gr[2]*Ur]}function Wt(gr){var Ur=h(gr[0]*gr[0]+gr[1]*gr[1]+gr[2]*gr[2]);gr[0]/=Ur,gr[1]/=Ur,gr[2]/=Ur}var Jt,ge,fe,pe,se,Tt,Lt,Mt,ee=I(),ve,oe,Te={point:He,lineStart:cr,lineEnd:ur,polygonStart:function(){Te.point=jr,Te.lineStart=Wr,Te.lineEnd=br,ee.reset(),dt.polygonStart()},polygonEnd:function(){dt.polygonEnd(),Te.point=He,Te.lineStart=cr,Te.lineEnd=ur,q<0?(Jt=-(fe=180),ge=-(pe=90)):ee>r?pe=90:ee<-r&&(ge=-90),oe[0]=Jt,oe[1]=fe},sphere:function(){Jt=-(fe=180),ge=-(pe=90)}};function He(gr,Ur){ve.push(oe=[Jt=gr,fe=gr]),Urpe&&(pe=Ur)}function Ge(gr,Ur){var wn=ut([gr*x,Ur*x]);if(Mt){var hn=It(Mt,wn),qn=[hn[1],-hn[0],0],di=It(qn,hn);Wt(di),di=ft(di);var aa=gr-se,va=aa>0?1:-1,Ba=di[0]*f*va,Za,ca=y(aa)>180;ca^(va*sepe&&(pe=Za)):(Ba=(Ba+360)%360-180,ca^(va*sepe&&(pe=Ur))),ca?grXr(Jt,fe)&&(fe=gr):Xr(gr,fe)>Xr(Jt,fe)&&(Jt=gr):fe>=Jt?(grfe&&(fe=gr)):gr>se?Xr(Jt,gr)>Xr(Jt,fe)&&(fe=gr):Xr(gr,fe)>Xr(Jt,fe)&&(Jt=gr)}else ve.push(oe=[Jt=gr,fe=gr]);Urpe&&(pe=Ur),Mt=wn,se=gr}function cr(){Te.point=Ge}function ur(){oe[0]=Jt,oe[1]=fe,Te.point=He,Mt=null}function jr(gr,Ur){if(Mt){var wn=gr-se;ee.add(y(wn)>180?wn+(wn>0?360:-360):wn)}else Tt=gr,Lt=Ur;dt.point(gr,Ur),Ge(gr,Ur)}function Wr(){dt.lineStart()}function br(){jr(Tt,Lt),dt.lineEnd(),y(ee)>r&&(Jt=-(fe=180)),oe[0]=Jt,oe[1]=fe,Mt=null}function Xr(gr,Ur){return(Ur-=gr)<0?Ur+360:Ur}function nn(gr,Ur){return gr[0]-Ur[0]}function Le(gr,Ur){return gr[0]<=gr[1]?gr[0]<=Ur&&Ur<=gr[1]:UrXr(hn[0],hn[1])&&(hn[1]=qn[1]),Xr(qn[0],hn[1])>Xr(hn[0],hn[1])&&(hn[0]=qn[0])):di.push(hn=qn);for(aa=-1/0,wn=di.length-1,Ur=0,hn=di[wn];Ur<=wn;hn=qn,++Ur)qn=di[Ur],(va=Xr(hn[1],qn[0]))>aa&&(aa=va,Jt=qn[0],fe=hn[1])}return ve=oe=null,Jt===1/0||ge===1/0?[[NaN,NaN],[NaN,NaN]]:[[Jt,ge],[fe,pe]]}var ne,Ct,gt,St,Nt,re,le,we,Ue,qe,or,Sr,Ar,mr,Qr,Hn,Wn={sphere:O,point:Xn,lineStart:oi,lineEnd:Zi,polygonStart:function(){Wn.lineStart=We,Wn.lineEnd=nr},polygonEnd:function(){Wn.lineStart=oi,Wn.lineEnd=Zi}};function Xn(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur);Ii(wn*u(gr),wn*C(gr),C(Ur))}function Ii(gr,Ur,wn){++ne,gt+=(gr-gt)/ne,St+=(Ur-St)/ne,Nt+=(wn-Nt)/ne}function oi(){Wn.point=$n}function $n(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur);mr=wn*u(gr),Qr=wn*C(gr),Hn=C(Ur),Wn.point=sa,Ii(mr,Qr,Hn)}function sa(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur),hn=wn*u(gr),qn=wn*C(gr),di=C(Ur),aa=T(h((aa=Qr*di-Hn*qn)*aa+(aa=Hn*hn-mr*di)*aa+(aa=mr*qn-Qr*hn)*aa),mr*hn+Qr*qn+Hn*di);Ct+=aa,re+=aa*(mr+(mr=hn)),le+=aa*(Qr+(Qr=qn)),we+=aa*(Hn+(Hn=di)),Ii(mr,Qr,Hn)}function Zi(){Wn.point=Xn}function We(){Wn.point=fr}function nr(){_r(Sr,Ar),Wn.point=Xn}function fr(gr,Ur){Sr=gr,Ar=Ur,gr*=x,Ur*=x,Wn.point=_r;var wn=u(Ur);mr=wn*u(gr),Qr=wn*C(gr),Hn=C(Ur),Ii(mr,Qr,Hn)}function _r(gr,Ur){gr*=x,Ur*=x;var wn=u(Ur),hn=wn*u(gr),qn=wn*C(gr),di=C(Ur),aa=Qr*di-Hn*qn,va=Hn*hn-mr*di,Ba=mr*qn-Qr*hn,Za=h(aa*aa+va*va+Ba*Ba),ca=w(Za),Oa=Za&&-ca/Za;Ue+=Oa*aa,qe+=Oa*va,or+=Oa*Ba,Ct+=ca,re+=ca*(mr+(mr=hn)),le+=ca*(Qr+(Qr=qn)),we+=ca*(Hn+(Hn=di)),Ii(mr,Qr,Hn)}function tn(gr){ne=Ct=gt=St=Nt=re=le=we=Ue=qe=or=0,W(gr,Wn);var Ur=Ue,wn=qe,hn=or,qn=Ur*Ur+wn*wn+hn*hn;return qnn?gr+Math.round(-gr/l)*l:gr,Ur]}Mn.invert=Mn;function fi(gr,Ur,wn){return(gr%=l)?Ur||wn?Tn(Oi(gr),ji(Ur,wn)):Oi(gr):Ur||wn?ji(Ur,wn):Mn}function ki(gr){return function(Ur,wn){return Ur+=gr,[Ur>n?Ur-l:Ur<-n?Ur+l:Ur,wn]}}function Oi(gr){var Ur=ki(gr);return Ur.invert=ki(-gr),Ur}function ji(gr,Ur){var wn=u(gr),hn=C(gr),qn=u(Ur),di=C(Ur);function aa(va,Ba){var Za=u(Ba),ca=u(va)*Za,Oa=C(va)*Za,ka=C(Ba),na=ka*wn+ca*hn;return[T(Oa*qn-na*di,ca*wn-ka*hn),w(na*qn+Oa*di)]}return aa.invert=function(va,Ba){var Za=u(Ba),ca=u(va)*Za,Oa=C(va)*Za,ka=C(Ba),na=ka*qn-Oa*di;return[T(Oa*qn+ka*di,ca*wn+na*hn),w(na*wn-ca*hn)]},aa}function Xi(gr){gr=fi(gr[0]*x,gr[1]*x,gr.length>2?gr[2]*x:0);function Ur(wn){return wn=gr(wn[0]*x,wn[1]*x),wn[0]*=f,wn[1]*=f,wn}return Ur.invert=function(wn){return wn=gr.invert(wn[0]*x,wn[1]*x),wn[0]*=f,wn[1]*=f,wn},Ur}function ci(gr,Ur,wn,hn,qn,di){if(wn){var aa=u(Ur),va=C(Ur),Ba=hn*wn;qn==null?(qn=Ur+hn*l,di=Ur-Ba/2):(qn=za(aa,qn),di=za(aa,di),(hn>0?qndi)&&(qn+=hn*l));for(var Za,ca=qn;hn>0?ca>di:ca1&&gr.push(gr.pop().concat(gr.shift()))},result:function(){var wn=gr;return gr=[],Ur=null,wn}}}function Ie(gr,Ur){return y(gr[0]-Ur[0])=0;--va)qn.point((Oa=ca[va])[0],Oa[1]);else hn(ka.x,ka.p.x,-1,qn);ka=ka.p}ka=ka.o,ca=ka.z,na=!na}while(!ka.v);qn.lineEnd()}}}function Gr(gr){if(Ur=gr.length){for(var Ur,wn=0,hn=gr[0],qn;++wn=0?1:-1,$l=su*Pl,lu=$l>n,ml=ns*gs;if(Br.add(T(ml*su*C($l),Ko*el+ml*u($l))),aa+=lu?Pl+su*l:Pl,lu^na>=wn^oo>=wn){var qu=It(ut(ka),ut(ps));Wt(qu);var Iu=It(di,qu);Wt(Iu);var fu=(lu^Pl>=0?-1:1)*w(Iu[2]);(hn>fu||hn===fu&&(qu[0]||qu[1]))&&(va+=lu^Pl>=0?1:-1)}}return(aa<-r||aa0){for(Ba||(qn.polygonStart(),Ba=!0),qn.lineStart(),el=0;el1&&qa&2&&gs.push(gs.pop().concat(gs.shift())),ca.push(gs.filter(Ce))}}return ka}}function Ce(gr){return gr.length>1}function dr(gr,Ur){return((gr=gr.x)[0]<0?gr[1]-o-r:o-gr[1])-((Ur=Ur.x)[0]<0?Ur[1]-o-r:o-Ur[1])}var Hr=on(function(){return!0},_n,Qn,[-n,-o]);function _n(gr){var Ur=NaN,wn=NaN,hn=NaN,qn;return{lineStart:function(){gr.lineStart(),qn=1},point:function(di,aa){var va=di>0?n:-n,Ba=y(di-Ur);y(Ba-n)0?o:-o),gr.point(hn,wn),gr.lineEnd(),gr.lineStart(),gr.point(va,wn),gr.point(di,wn),qn=0):hn!==va&&Ba>=n&&(y(Ur-hn)r?v((C(Ur)*(di=u(hn))*C(wn)-C(hn)*(qn=u(Ur))*C(gr))/(qn*di*aa)):(Ur+hn)/2}function Qn(gr,Ur,wn,hn){var qn;if(gr==null)qn=wn*o,hn.point(-n,qn),hn.point(0,qn),hn.point(n,qn),hn.point(n,0),hn.point(n,-qn),hn.point(0,-qn),hn.point(-n,-qn),hn.point(-n,0),hn.point(-n,qn);else if(y(gr[0]-Ur[0])>r){var di=gr[0]0,qn=y(Ur)>r;function di(ca,Oa,ka,na){ci(na,gr,wn,ka,ca,Oa)}function aa(ca,Oa){return u(ca)*u(Oa)>Ur}function va(ca){var Oa,ka,na,io,ns;return{lineStart:function(){io=na=!1,ns=1},point:function(Ko,ls){var ps=[Ko,ls],oo,qa=aa(Ko,ls),gs=hn?qa?0:Za(Ko,ls):qa?Za(Ko+(Ko<0?n:-n),ls):0;if(!Oa&&(io=na=qa)&&ca.lineStart(),qa!==na&&(oo=Ba(Oa,ps),(!oo||Ie(Oa,oo)||Ie(ps,oo))&&(ps[2]=1)),qa!==na)ns=0,qa?(ca.lineStart(),oo=Ba(ps,Oa),ca.point(oo[0],oo[1])):(oo=Ba(Oa,ps),ca.point(oo[0],oo[1],2),ca.lineEnd()),Oa=oo;else if(qn&&Oa&&hn^qa){var el;!(gs&ka)&&(el=Ba(ps,Oa,!0))&&(ns=0,hn?(ca.lineStart(),ca.point(el[0][0],el[0][1]),ca.point(el[1][0],el[1][1]),ca.lineEnd()):(ca.point(el[1][0],el[1][1]),ca.lineEnd(),ca.lineStart(),ca.point(el[0][0],el[0][1],3)))}qa&&(!Oa||!Ie(Oa,ps))&&ca.point(ps[0],ps[1]),Oa=ps,na=qa,ka=gs},lineEnd:function(){na&&ca.lineEnd(),Oa=null},clean:function(){return ns|(io&&na)<<1}}}function Ba(ca,Oa,ka){var na=ut(ca),io=ut(Oa),ns=[1,0,0],Ko=It(na,io),ls=kt(Ko,Ko),ps=Ko[0],oo=ls-ps*ps;if(!oo)return!ka&&ca;var qa=Ur*ls/oo,gs=-Ur*ps/oo,el=It(ns,Ko),Pl=qt(ns,qa),su=qt(Ko,gs);Pt(Pl,su);var $l=el,lu=kt(Pl,$l),ml=kt($l,$l),qu=lu*lu-ml*(kt(Pl,Pl)-1);if(!(qu<0)){var Iu=h(qu),fu=qt($l,(-lu-Iu)/ml);if(Pt(fu,Pl),fu=ft(fu),!ka)return fu;var Oo=ca[0],Es=Oa[0],Kl=ca[1],Rl=Oa[1],vc;Es0^fu[1]<(y(fu[0]-Oo)n^(Oo<=fu[0]&&fu[0]<=Es)){var Wc=qt($l,(-lu+Iu)/ml);return Pt(Wc,Pl),[fu,ft(Wc)]}}}function Za(ca,Oa){var ka=hn?gr:n-gr,na=0;return ca<-ka?na|=1:ca>ka&&(na|=2),Oa<-ka?na|=4:Oa>ka&&(na|=8),na}return on(aa,va,di,hn?[0,-gr]:[-n,gr-n])}function En(gr,Ur,wn,hn,qn,di){var aa=gr[0],va=gr[1],Ba=Ur[0],Za=Ur[1],ca=0,Oa=1,ka=Ba-aa,na=Za-va,io;if(io=wn-aa,!(!ka&&io>0)){if(io/=ka,ka<0){if(io0){if(io>Oa)return;io>ca&&(ca=io)}if(io=qn-aa,!(!ka&&io<0)){if(io/=ka,ka<0){if(io>Oa)return;io>ca&&(ca=io)}else if(ka>0){if(io0)){if(io/=na,na<0){if(io0){if(io>Oa)return;io>ca&&(ca=io)}if(io=di-va,!(!na&&io<0)){if(io/=na,na<0){if(io>Oa)return;io>ca&&(ca=io)}else if(na>0){if(io0&&(gr[0]=aa+ca*ka,gr[1]=va+ca*na),Oa<1&&(Ur[0]=aa+Oa*ka,Ur[1]=va+Oa*na),!0}}}}}var Zn=1e9,La=-Zn;function Vi(gr,Ur,wn,hn){function qn(Za,ca){return gr<=Za&&Za<=wn&&Ur<=ca&&ca<=hn}function di(Za,ca,Oa,ka){var na=0,io=0;if(Za==null||(na=aa(Za,Oa))!==(io=aa(ca,Oa))||Ba(Za,ca)<0^Oa>0)do ka.point(na===0||na===3?gr:wn,na>1?hn:Ur);while((na=(na+Oa+4)%4)!==io);else ka.point(ca[0],ca[1])}function aa(Za,ca){return y(Za[0]-gr)0?0:3:y(Za[0]-wn)0?2:1:y(Za[1]-Ur)0?1:0:ca>0?3:2}function va(Za,ca){return Ba(Za.x,ca.x)}function Ba(Za,ca){var Oa=aa(Za,1),ka=aa(ca,1);return Oa!==ka?Oa-ka:Oa===0?ca[1]-Za[1]:Oa===1?Za[0]-ca[0]:Oa===2?Za[1]-ca[1]:ca[0]-Za[0]}return function(Za){var ca=Za,Oa=ze(),ka,na,io,ns,Ko,ls,ps,oo,qa,gs,el,Pl={point:su,lineStart:qu,lineEnd:Iu,polygonStart:lu,polygonEnd:ml};function su(Oo,Es){qn(Oo,Es)&&ca.point(Oo,Es)}function $l(){for(var Oo=0,Es=0,Kl=na.length;Eshn&&(zh-Ih)*(hn-Wc)>(Du-Wc)*(gr-Ih)&&++Oo:Du<=hn&&(zh-Ih)*(hn-Wc)<(Du-Wc)*(gr-Ih)&&--Oo;return Oo}function lu(){ca=Oa,ka=[],na=[],el=!0}function ml(){var Oo=$l(),Es=el&&Oo,Kl=(ka=g.merge(ka)).length;(Es||Kl)&&(Za.polygonStart(),Es&&(Za.lineStart(),di(null,null,1,Za),Za.lineEnd()),Kl&&$r(ka,va,Oo,di,Za),Za.polygonEnd()),ca=Za,ka=na=io=null}function qu(){Pl.point=fu,na&&na.push(io=[]),gs=!0,qa=!1,ps=oo=NaN}function Iu(){ka&&(fu(ns,Ko),ls&&qa&&Oa.rejoin(),ka.push(Oa.result())),Pl.point=su,qa&&ca.lineEnd()}function fu(Oo,Es){var Kl=qn(Oo,Es);if(na&&io.push([Oo,Es]),gs)ns=Oo,Ko=Es,ls=Kl,gs=!1,Kl&&(ca.lineStart(),ca.point(Oo,Es));else if(Kl&&qa)ca.point(Oo,Es);else{var Rl=[ps=Math.max(La,Math.min(Zn,ps)),oo=Math.max(La,Math.min(Zn,oo))],vc=[Oo=Math.max(La,Math.min(Zn,Oo)),Es=Math.max(La,Math.min(Zn,Es))];En(Rl,vc,gr,Ur,wn,hn)?(qa||(ca.lineStart(),ca.point(Rl[0],Rl[1])),ca.point(vc[0],vc[1]),Kl||ca.lineEnd(),el=!1):Kl&&(ca.lineStart(),ca.point(Oo,Es),el=!1)}ps=Oo,oo=Es,qa=Kl}return Pl}}function Qa(){var gr=0,Ur=0,wn=960,hn=500,qn,di,aa;return aa={stream:function(va){return qn&&di===va?qn:qn=Vi(gr,Ur,wn,hn)(di=va)},extent:function(va){return arguments.length?(gr=+va[0][0],Ur=+va[0][1],wn=+va[1][0],hn=+va[1][1],qn=di=null,aa):[[gr,Ur],[wn,hn]]}}}var Ja=I(),Do,yo,Fo,Da={sphere:O,point:O,lineStart:ys,lineEnd:O,polygonStart:O,polygonEnd:O};function ys(){Da.point=ul,Da.lineEnd=os}function os(){Da.point=Da.lineEnd=O}function ul(gr,Ur){gr*=x,Ur*=x,Do=gr,yo=C(Ur),Fo=u(Ur),Da.point=Zo}function Zo(gr,Ur){gr*=x,Ur*=x;var wn=C(Ur),hn=u(Ur),qn=y(gr-Do),di=u(qn),aa=C(qn),va=hn*aa,Ba=Fo*wn-yo*hn*di,Za=yo*wn+Fo*hn*di;Ja.add(T(h(va*va+Ba*Ba),Za)),Do=gr,yo=wn,Fo=hn}function Ks(gr){return Ja.reset(),W(gr,Da),+Ja}var ss=[null,null],cl={type:"LineString",coordinates:ss};function Qs(gr,Ur){return ss[0]=gr,ss[1]=Ur,Ks(cl)}var Nl={Feature:function(gr,Ur){return Ps(gr.geometry,Ur)},FeatureCollection:function(gr,Ur){for(var wn=gr.features,hn=-1,qn=wn.length;++hn0&&(qn=Qs(gr[di],gr[di-1]),qn>0&&wn<=qn&&hn<=qn&&(wn+hn-qn)*(1-Math.pow((wn-hn)/qn,2))r}).map(ka)).concat(g.range(b(di/Za)*Za,qn,Za).filter(function(oo){return y(oo%Oa)>r}).map(na))}return ls.lines=function(){return ps().map(function(oo){return{type:"LineString",coordinates:oo}})},ls.outline=function(){return{type:"Polygon",coordinates:[io(hn).concat(ns(aa).slice(1),io(wn).reverse().slice(1),ns(va).reverse().slice(1))]}},ls.extent=function(oo){return arguments.length?ls.extentMajor(oo).extentMinor(oo):ls.extentMinor()},ls.extentMajor=function(oo){return arguments.length?(hn=+oo[0][0],wn=+oo[1][0],va=+oo[0][1],aa=+oo[1][1],hn>wn&&(oo=hn,hn=wn,wn=oo),va>aa&&(oo=va,va=aa,aa=oo),ls.precision(Ko)):[[hn,va],[wn,aa]]},ls.extentMinor=function(oo){return arguments.length?(Ur=+oo[0][0],gr=+oo[1][0],di=+oo[0][1],qn=+oo[1][1],Ur>gr&&(oo=Ur,Ur=gr,gr=oo),di>qn&&(oo=di,di=qn,qn=oo),ls.precision(Ko)):[[Ur,di],[gr,qn]]},ls.step=function(oo){return arguments.length?ls.stepMajor(oo).stepMinor(oo):ls.stepMinor()},ls.stepMajor=function(oo){return arguments.length?(ca=+oo[0],Oa=+oo[1],ls):[ca,Oa]},ls.stepMinor=function(oo){return arguments.length?(Ba=+oo[0],Za=+oo[1],ls):[Ba,Za]},ls.precision=function(oo){return arguments.length?(Ko=+oo,ka=Pa(di,qn,90),na=fo(Ur,gr,Ko),io=Pa(va,aa,90),ns=fo(hn,wn,Ko),ls):Ko},ls.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function Ql(){return qs()()}function Xo(gr,Ur){var wn=gr[0]*x,hn=gr[1]*x,qn=Ur[0]*x,di=Ur[1]*x,aa=u(hn),va=C(hn),Ba=u(di),Za=C(di),ca=aa*u(wn),Oa=aa*C(wn),ka=Ba*u(qn),na=Ba*C(qn),io=2*w(h(R(di-hn)+aa*Ba*R(qn-wn))),ns=C(io),Ko=io?function(ls){var ps=C(ls*=io)/ns,oo=C(io-ls)/ns,qa=oo*ca+ps*ka,gs=oo*Oa+ps*na,el=oo*va+ps*Za;return[T(gs,qa)*f,T(el,h(qa*qa+gs*gs))*f]}:function(){return[wn*f,hn*f]};return Ko.distance=io,Ko}function Gl(gr){return gr}var al=I(),Cl=I(),Ru,lo,Ms,Is,ou={point:O,lineStart:O,lineEnd:O,polygonStart:function(){ou.lineStart=hl,ou.lineEnd=Gu},polygonEnd:function(){ou.lineStart=ou.lineEnd=ou.point=O,al.add(y(Cl)),Cl.reset()},result:function(){var gr=al/2;return al.reset(),gr}};function hl(){ou.point=ts}function ts(gr,Ur){ou.point=Su,Ru=Ms=gr,lo=Is=Ur}function Su(gr,Ur){Cl.add(Is*gr-Ms*Ur),Ms=gr,Is=Ur}function Gu(){Su(Ru,lo)}var bl=1/0,Dl=bl,tu=-bl,nu=tu,ac={point:mh,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var gr=[[bl,Dl],[tu,nu]];return tu=nu=-(Dl=bl=1/0),gr}};function mh(gr,Ur){grtu&&(tu=gr),Urnu&&(nu=Ur)}var Jc=0,ah=0,Bf=0,Sf=0,Fl=0,Bc=0,Nf=0,hc=0,oc=0,fc,oh,cu,sc,rl={point:Yl,lineStart:Sh,lineEnd:_u,polygonStart:function(){rl.lineStart=Ed,rl.lineEnd=tl},polygonEnd:function(){rl.point=Yl,rl.lineStart=Sh,rl.lineEnd=_u},result:function(){var gr=oc?[Nf/oc,hc/oc]:Bc?[Sf/Bc,Fl/Bc]:Bf?[Jc/Bf,ah/Bf]:[NaN,NaN];return Jc=ah=Bf=Sf=Fl=Bc=Nf=hc=oc=0,gr}};function Yl(gr,Ur){Jc+=gr,ah+=Ur,++Bf}function Sh(){rl.point=Cc}function Cc(gr,Ur){rl.point=Uh,Yl(cu=gr,sc=Ur)}function Uh(gr,Ur){var wn=gr-cu,hn=Ur-sc,qn=h(wn*wn+hn*hn);Sf+=qn*(cu+gr)/2,Fl+=qn*(sc+Ur)/2,Bc+=qn,Yl(cu=gr,sc=Ur)}function _u(){rl.point=Yl}function Ed(){rl.point=Vd}function tl(){Ll(fc,oh)}function Vd(gr,Ur){rl.point=Ll,Yl(fc=cu=gr,oh=sc=Ur)}function Ll(gr,Ur){var wn=gr-cu,hn=Ur-sc,qn=h(wn*wn+hn*hn);Sf+=qn*(cu+gr)/2,Fl+=qn*(sc+Ur)/2,Bc+=qn,qn=sc*gr-cu*Ur,Nf+=qn*(cu+gr),hc+=qn*(sc+Ur),oc+=qn*3,Yl(cu=gr,sc=Ur)}function Qo(gr){this._context=gr}Qo.prototype={_radius:4.5,pointRadius:function(gr){return this._radius=gr,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(gr,Ur){switch(this._point){case 0:{this._context.moveTo(gr,Ur),this._point=1;break}case 1:{this._context.lineTo(gr,Ur);break}default:{this._context.moveTo(gr+this._radius,Ur),this._context.arc(gr,Ur,this._radius,0,l);break}}},result:O};var lf=I(),sh,rc,jf,Vh,yf,lc={point:O,lineStart:function(){lc.point=hd},lineEnd:function(){sh&&Zf(rc,jf),lc.point=O},polygonStart:function(){sh=!0},polygonEnd:function(){sh=null},result:function(){var gr=+lf;return lf.reset(),gr}};function hd(gr,Ur){lc.point=Zf,rc=Vh=gr,jf=yf=Ur}function Zf(gr,Ur){Vh-=gr,yf-=Ur,lf.add(h(Vh*Vh+yf*yf)),Vh=gr,yf=Ur}function xf(){this._string=[]}xf.prototype={_radius:4.5,_circle:Hh(4.5),pointRadius:function(gr){return(gr=+gr)!==this._radius&&(this._radius=gr,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(gr,Ur){switch(this._point){case 0:{this._string.push("M",gr,",",Ur),this._point=1;break}case 1:{this._string.push("L",gr,",",Ur);break}default:{this._circle==null&&(this._circle=Hh(this._radius)),this._string.push("M",gr,",",Ur,this._circle);break}}},result:function(){if(this._string.length){var gr=this._string.join("");return this._string=[],gr}else return null}};function Hh(gr){return"m0,"+gr+"a"+gr+","+gr+" 0 1,1 0,"+-2*gr+"a"+gr+","+gr+" 0 1,1 0,"+2*gr+"z"}function Uf(gr,Ur){var wn=4.5,hn,qn;function di(aa){return aa&&(typeof wn=="function"&&qn.pointRadius(+wn.apply(this,arguments)),W(aa,hn(qn))),qn.result()}return di.area=function(aa){return W(aa,hn(ou)),ou.result()},di.measure=function(aa){return W(aa,hn(lc)),lc.result()},di.bounds=function(aa){return W(aa,hn(ac)),ac.result()},di.centroid=function(aa){return W(aa,hn(rl)),rl.result()},di.projection=function(aa){return arguments.length?(hn=aa==null?(gr=null,Gl):(gr=aa).stream,di):gr},di.context=function(aa){return arguments.length?(qn=aa==null?(Ur=null,new xf):new Qo(Ur=aa),typeof wn!="function"&&qn.pointRadius(wn),di):Ur},di.pointRadius=function(aa){return arguments.length?(wn=typeof aa=="function"?aa:(qn.pointRadius(+aa),+aa),di):wn},di.projection(gr).context(Ur)}function Vf(gr){return{stream:lh(gr)}}function lh(gr){return function(Ur){var wn=new Gf;for(var hn in gr)wn[hn]=gr[hn];return wn.stream=Ur,wn}}function Gf(){}Gf.prototype={constructor:Gf,point:function(gr,Ur){this.stream.point(gr,Ur)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Eh(gr,Ur,wn){var hn=gr.clipExtent&&gr.clipExtent();return gr.scale(150).translate([0,0]),hn!=null&&gr.clipExtent(null),W(wn,gr.stream(ac)),Ur(ac.result()),hn!=null&&gr.clipExtent(hn),gr}function gh(gr,Ur,wn){return Eh(gr,function(hn){var qn=Ur[1][0]-Ur[0][0],di=Ur[1][1]-Ur[0][1],aa=Math.min(qn/(hn[1][0]-hn[0][0]),di/(hn[1][1]-hn[0][1])),va=+Ur[0][0]+(qn-aa*(hn[1][0]+hn[0][0]))/2,Ba=+Ur[0][1]+(di-aa*(hn[1][1]+hn[0][1]))/2;gr.scale(150*aa).translate([va,Ba])},wn)}function uc(gr,Ur,wn){return gh(gr,[[0,0],Ur],wn)}function rf(gr,Ur,wn){return Eh(gr,function(hn){var qn=+Ur,di=qn/(hn[1][0]-hn[0][0]),aa=(qn-di*(hn[1][0]+hn[0][0]))/2,va=-di*hn[0][1];gr.scale(150*di).translate([aa,va])},wn)}function Hf(gr,Ur,wn){return Eh(gr,function(hn){var qn=+Ur,di=qn/(hn[1][1]-hn[0][1]),aa=-di*hn[0][0],va=(qn-di*(hn[1][1]+hn[0][1]))/2;gr.scale(150*di).translate([aa,va])},wn)}var eu=16,Ef=u(30*x);function Cd(gr,Ur){return+Ur?_f(gr,Ur):Yf(gr)}function Yf(gr){return lh({point:function(Ur,wn){Ur=gr(Ur,wn),this.stream.point(Ur[0],Ur[1])}})}function _f(gr,Ur){function wn(hn,qn,di,aa,va,Ba,Za,ca,Oa,ka,na,io,ns,Ko){var ls=Za-hn,ps=ca-qn,oo=ls*ls+ps*ps;if(oo>4*Ur&&ns--){var qa=aa+ka,gs=va+na,el=Ba+io,Pl=h(qa*qa+gs*gs+el*el),su=w(el/=Pl),$l=y(y(el)-1)Ur||y((ls*Iu+ps*fu)/oo-.5)>.3||aa*ka+va*na+Ba*io2?Oo[2]%360*x:0,Iu()):[va*f,Ba*f,Za*f]},ml.angle=function(Oo){return arguments.length?(Oa=Oo%360*x,Iu()):Oa*f},ml.reflectX=function(Oo){return arguments.length?(ka=Oo?-1:1,Iu()):ka<0},ml.reflectY=function(Oo){return arguments.length?(na=Oo?-1:1,Iu()):na<0},ml.precision=function(Oo){return arguments.length?(el=Cd(Pl,gs=Oo*Oo),fu()):h(gs)},ml.fitExtent=function(Oo,Es){return gh(ml,Oo,Es)},ml.fitSize=function(Oo,Es){return uc(ml,Oo,Es)},ml.fitWidth=function(Oo,Es){return rf(ml,Oo,Es)},ml.fitHeight=function(Oo,Es){return Hf(ml,Oo,Es)};function Iu(){var Oo=Ou(wn,0,0,ka,na,Oa).apply(null,Ur(di,aa)),Es=(Oa?Ou:Xf)(wn,hn-Oo[0],qn-Oo[1],ka,na,Oa);return ca=fi(va,Ba,Za),Pl=Tn(Ur,Es),su=Tn(ca,Pl),el=Cd(Pl,gs),fu()}function fu(){return $l=lu=null,ml}return function(){return Ur=gr.apply(this,arguments),ml.invert=Ur.invert&&qu,Iu()}}function hu(gr){var Ur=0,wn=n/3,hn=Wh(gr),qn=hn(Ur,wn);return qn.parallels=function(di){return arguments.length?hn(Ur=di[0]*x,wn=di[1]*x):[Ur*f,wn*f]},qn}function Ch(gr){var Ur=u(gr);function wn(hn,qn){return[hn*Ur,C(qn)/Ur]}return wn.invert=function(hn,qn){return[hn/Ur,w(qn*Ur)]},wn}function Mc(gr,Ur){var wn=C(gr),hn=(wn+C(Ur))/2;if(y(hn)=.12&&Ko<.234&&ns>=-.425&&ns<-.214?qn:Ko>=.166&&Ko<.234&&ns>=-.214&&ns<-.115?aa:wn).invert(ka)},ca.stream=function(ka){return gr&&Ur===ka?gr:gr=uf([wn.stream(Ur=ka),qn.stream(ka),aa.stream(ka)])},ca.precision=function(ka){return arguments.length?(wn.precision(ka),qn.precision(ka),aa.precision(ka),Oa()):wn.precision()},ca.scale=function(ka){return arguments.length?(wn.scale(ka),qn.scale(ka*.35),aa.scale(ka),ca.translate(wn.translate())):wn.scale()},ca.translate=function(ka){if(!arguments.length)return wn.translate();var na=wn.scale(),io=+ka[0],ns=+ka[1];return hn=wn.translate(ka).clipExtent([[io-.455*na,ns-.238*na],[io+.455*na,ns+.238*na]]).stream(Za),di=qn.translate([io-.307*na,ns+.201*na]).clipExtent([[io-.425*na+r,ns+.12*na+r],[io-.214*na-r,ns+.234*na-r]]).stream(Za),va=aa.translate([io-.205*na,ns+.212*na]).clipExtent([[io-.214*na+r,ns+.166*na+r],[io-.115*na-r,ns+.234*na-r]]).stream(Za),Oa()},ca.fitExtent=function(ka,na){return gh(ca,ka,na)},ca.fitSize=function(ka,na){return uc(ca,ka,na)},ca.fitWidth=function(ka,na){return rf(ca,ka,na)},ca.fitHeight=function(ka,na){return Hf(ca,ka,na)};function Oa(){return gr=Ur=null,ca}return ca.scale(1070)}function qh(gr){return function(Ur,wn){var hn=u(Ur),qn=u(wn),di=gr(hn*qn);return[di*qn*C(Ur),di*C(wn)]}}function Cf(gr){return function(Ur,wn){var hn=h(Ur*Ur+wn*wn),qn=gr(hn),di=C(qn),aa=u(qn);return[T(Ur*di,hn*aa),w(hn&&wn*di/hn)]}}var Ld=qh(function(gr){return h(2/(1+gr))});Ld.invert=Cf(function(gr){return 2*w(gr/2)});function Jd(){return jc(Ld).scale(124.75).clipAngle(180-.001)}var cf=qh(function(gr){return(gr=k(gr))&&gr/C(gr)});cf.invert=Cf(function(gr){return gr});function Lf(){return jc(cf).scale(79.4188).clipAngle(180-.001)}function wc(gr,Ur){return[gr,P(p((o+Ur)/2))]}wc.invert=function(gr,Ur){return[gr,2*v(_(Ur))-o]};function hf(){return Qc(wc).scale(961/l)}function Qc(gr){var Ur=jc(gr),wn=Ur.center,hn=Ur.scale,qn=Ur.translate,di=Ur.clipExtent,aa=null,va,Ba,Za;Ur.scale=function(Oa){return arguments.length?(hn(Oa),ca()):hn()},Ur.translate=function(Oa){return arguments.length?(qn(Oa),ca()):qn()},Ur.center=function(Oa){return arguments.length?(wn(Oa),ca()):wn()},Ur.clipExtent=function(Oa){return arguments.length?(Oa==null?aa=va=Ba=Za=null:(aa=+Oa[0][0],va=+Oa[0][1],Ba=+Oa[1][0],Za=+Oa[1][1]),ca()):aa==null?null:[[aa,va],[Ba,Za]]};function ca(){var Oa=n*hn(),ka=Ur(Xi(Ur.rotate()).invert([0,0]));return di(aa==null?[[ka[0]-Oa,ka[1]-Oa],[ka[0]+Oa,ka[1]+Oa]]:gr===wc?[[Math.max(ka[0]-Oa,aa),va],[Math.min(ka[0]+Oa,Ba),Za]]:[[aa,Math.max(ka[1]-Oa,va)],[Ba,Math.min(ka[1]+Oa,Za)]])}return ca()}function ff(gr){return p((o+gr)/2)}function Pf(gr,Ur){var wn=u(gr),hn=gr===Ur?C(gr):P(wn/u(Ur))/P(ff(Ur)/ff(gr)),qn=wn*M(ff(gr),hn)/hn;if(!hn)return wc;function di(aa,va){qn>0?va<-o+r&&(va=-o+r):va>o-r&&(va=o-r);var Ba=qn/M(ff(va),hn);return[Ba*C(hn*aa),qn-Ba*u(hn*aa)]}return di.invert=function(aa,va){var Ba=qn-va,Za=A(hn)*h(aa*aa+Ba*Ba),ca=T(aa,y(Ba))*A(Ba);return Ba*hn<0&&(ca-=n*A(aa)*A(Ba)),[ca/hn,2*v(M(qn/Za,1/hn))-o]},di}function yh(){return hu(Pf).scale(109.5).parallels([30,30])}function wu(gr,Ur){return[gr,Ur]}wu.invert=wu;function Lh(){return jc(wu).scale(152.63)}function Vc(gr,Ur){var wn=u(gr),hn=gr===Ur?C(gr):(wn-u(Ur))/(Ur-gr),qn=wn/hn+gr;if(y(hn)r&&--hn>0);return[gr/(.8707+(di=wn*wn)*(-.131979+di*(-.013791+di*di*di*(.003971-.001529*di)))),wn]};function xh(){return jc(Ph).scale(175.295)}function Bu(gr,Ur){return[u(Ur)*C(gr),C(Ur)]}Bu.invert=Cf(w);function iu(){return jc(Bu).scale(249.5).clipAngle(90+r)}function _h(gr,Ur){var wn=u(Ur),hn=1+u(gr)*wn;return[wn*C(gr)/hn,C(Ur)/hn]}_h.invert=Cf(function(gr){return 2*v(gr)});function df(){return jc(_h).scale(250).clipAngle(142)}function bh(gr,Ur){return[P(p((o+Ur)/2)),-gr]}bh.invert=function(gr,Ur){return[-Ur,2*v(_(gr))-o]};function Wf(){var gr=Qc(bh),Ur=gr.center,wn=gr.rotate;return gr.center=function(hn){return arguments.length?Ur([-hn[1],hn[0]]):(hn=Ur(),[hn[1],-hn[0]])},gr.rotate=function(hn){return arguments.length?wn([hn[0],hn[1],hn.length>2?hn[2]+90:90]):(hn=wn(),[hn[0],hn[1],hn[2]-90])},wn([0,0,90]).scale(159.155)}c.geoAlbers=bu,c.geoAlbersUsa=vh,c.geoArea=Y,c.geoAzimuthalEqualArea=Jd,c.geoAzimuthalEqualAreaRaw=Ld,c.geoAzimuthalEquidistant=Lf,c.geoAzimuthalEquidistantRaw=cf,c.geoBounds=Gt,c.geoCentroid=tn,c.geoCircle=Wa,c.geoClipAntimeridian=Hr,c.geoClipCircle=Pn,c.geoClipExtent=Qa,c.geoClipRectangle=Vi,c.geoConicConformal=yh,c.geoConicConformalRaw=Pf,c.geoConicEqualArea=Uc,c.geoConicEqualAreaRaw=Mc,c.geoConicEquidistant=fd,c.geoConicEquidistantRaw=Vc,c.geoContains=Us,c.geoDistance=Qs,c.geoEqualEarth=Pd,c.geoEqualEarthRaw=wf,c.geoEquirectangular=Lh,c.geoEquirectangularRaw=wu,c.geoGnomonic=Jf,c.geoGnomonicRaw=gc,c.geoGraticule=qs,c.geoGraticule10=Ql,c.geoIdentity=eh,c.geoInterpolate=Xo,c.geoLength=Ks,c.geoMercator=hf,c.geoMercatorRaw=wc,c.geoNaturalEarth1=xh,c.geoNaturalEarth1Raw=Ph,c.geoOrthographic=iu,c.geoOrthographicRaw=Bu,c.geoPath=Uf,c.geoProjection=jc,c.geoProjectionMutator=Wh,c.geoRotation=Xi,c.geoStereographic=df,c.geoStereographicRaw=_h,c.geoStream=W,c.geoTransform=Vf,c.geoTransverseMercator=Wf,c.geoTransverseMercatorRaw=bh,Object.defineProperty(c,"__esModule",{value:!0})})}),KU=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,PS(),k3()):g(c.d3=c.d3||{},c.d3,c.d3)})(Q,function(c,g,I){var S=Math.abs,t=Math.atan,e=Math.atan2,r=Math.cos,a=Math.exp,n=Math.floor,o=Math.log,i=Math.max,l=Math.min,f=Math.pow,x=Math.round,y=Math.sign||function(Xt){return Xt>0?1:Xt<0?-1:0},v=Math.sin,T=Math.tan,u=1e-6,b=1e-12,_=Math.PI,P=_/2,M=_/4,C=Math.SQRT1_2,A=V(2),h=V(_),p=_*2,k=180/_,w=_/180;function R(Xt){return Xt?Xt/Math.sin(Xt):1}function O(Xt){return Xt>1?P:Xt<-1?-P:Math.asin(Xt)}function j(Xt){return Xt>1?0:Xt<-1?_:Math.acos(Xt)}function V(Xt){return Xt>0?Math.sqrt(Xt):0}function H(Xt){return Xt=a(2*Xt),(Xt-1)/(Xt+1)}function F(Xt){return(a(Xt)-a(-Xt))/2}function U(Xt){return(a(Xt)+a(-Xt))/2}function W(Xt){return o(Xt+V(Xt*Xt+1))}function q(Xt){return o(Xt+V(Xt*Xt-1))}function J(Xt){var ae=T(Xt/2),xe=2*o(r(Xt/2))/(ae*ae);function Ae(je,Oe){var $e=r(je),wr=r(Oe),Or=v(Oe),Nr=wr*$e,en=-((1-Nr?o((1+Nr)/2)/(1-Nr):-.5)+xe/(1+Nr));return[en*wr*v(je),en*Or]}return Ae.invert=function(je,Oe){var $e=V(je*je+Oe*Oe),wr=-Xt/2,Or=50,Nr;if(!$e)return[0,0];do{var en=wr/2,vn=r(en),In=v(en),Nn=In/vn,ii=-o(S(vn));wr-=Nr=(2/Nn*ii-xe*Nn-$e)/(-ii/(In*In)+1-xe/(2*vn*vn))*(vn<0?.7:1)}while(S(Nr)>u&&--Or>0);var Ui=v(wr);return[e(je*Ui,$e*r(wr)),O(Oe*Ui/$e)]},Ae}function lt(){var Xt=P,ae=g.geoProjectionMutator(J),xe=ae(Xt);return xe.radius=function(Ae){return arguments.length?ae(Xt=Ae*w):Xt*k},xe.scale(179.976).clipAngle(147)}function yt(Xt,ae){var xe=r(ae),Ae=R(j(xe*r(Xt/=2)));return[2*xe*v(Xt)*Ae,v(ae)*Ae]}yt.invert=function(Xt,ae){if(!(Xt*Xt+4*ae*ae>_*_+u)){var xe=Xt,Ae=ae,je=25;do{var Oe=v(xe),$e=v(xe/2),wr=r(xe/2),Or=v(Ae),Nr=r(Ae),en=v(2*Ae),vn=Or*Or,In=Nr*Nr,Nn=$e*$e,ii=1-In*wr*wr,Ui=ii?j(Nr*wr)*V(pa=1/ii):pa=0,pa,fa=2*Ui*Nr*$e-Xt,Ta=Ui*Or-ae,so=pa*(In*Nn+Ui*Nr*wr*vn),Bo=pa*(.5*Oe*en-Ui*2*Or*$e),So=pa*.25*(en*$e-Ui*Or*In*Oe),ds=pa*(vn*wr+Ui*Nn*Nr),fl=Bo*So-ds*so;if(!fl)break;var vl=(Ta*Bo-fa*ds)/fl,Ds=(fa*So-Ta*so)/fl;xe-=vl,Ae-=Ds}while((S(vl)>u||S(Ds)>u)&&--je>0);return[xe,Ae]}};function mt(){return g.geoProjection(yt).scale(152.63)}function st(Xt){var ae=v(Xt),xe=r(Xt),Ae=Xt>=0?1:-1,je=T(Ae*Xt),Oe=(1+ae-xe)/2;function $e(wr,Or){var Nr=r(Or),en=r(wr/=2);return[(1+Nr)*v(wr),(Ae*Or>-e(en,je)-.001?0:-Ae*10)+Oe+v(Or)*xe-(1+Nr)*ae*en]}return $e.invert=function(wr,Or){var Nr=0,en=0,vn=50;do{var In=r(Nr),Nn=v(Nr),ii=r(en),Ui=v(en),pa=1+ii,fa=pa*Nn-wr,Ta=Oe+Ui*xe-pa*ae*In-Or,so=pa*In/2,Bo=-Nn*Ui,So=ae*pa*Nn/2,ds=xe*ii+ae*In*Ui,fl=Bo*So-ds*so,vl=(Ta*Bo-fa*ds)/fl/2,Ds=(fa*So-Ta*so)/fl;S(Ds)>2&&(Ds/=2),Nr-=vl,en-=Ds}while((S(vl)>u||S(Ds)>u)&&--vn>0);return Ae*en>-e(r(Nr),je)-.001?[Nr*2,en]:null},$e}function tt(){var Xt=20*w,ae=Xt>=0?1:-1,xe=T(ae*Xt),Ae=g.geoProjectionMutator(st),je=Ae(Xt),Oe=je.stream;return je.parallel=function($e){return arguments.length?(xe=T((ae=(Xt=$e*w)>=0?1:-1)*Xt),Ae(Xt)):Xt*k},je.stream=function($e){var wr=je.rotate(),Or=Oe($e),Nr=(je.rotate([0,0]),Oe($e)),en=je.precision();return je.rotate(wr),Or.sphere=function(){Nr.polygonStart(),Nr.lineStart();for(var vn=ae*-180;ae*vn<180;vn+=ae*90)Nr.point(vn,ae*90);if(Xt)for(;ae*(vn-=3*ae*en)>=-180;)Nr.point(vn,ae*-e(r(vn*w/2),xe)*k);Nr.lineEnd(),Nr.polygonEnd()},Or},je.scale(218.695).center([0,28.0974])}function dt(Xt,ae){var xe=T(ae/2),Ae=V(1-xe*xe),je=1+Ae*r(Xt/=2),Oe=v(Xt)*Ae/je,$e=xe/je,wr=Oe*Oe,Or=$e*$e;return[4/3*Oe*(3+wr-3*Or),4/3*$e*(3+3*wr-Or)]}dt.invert=function(Xt,ae){if(Xt*=3/8,ae*=3/8,!Xt&&S(ae)>1)return null;var xe=Xt*Xt,Ae=ae*ae,je=1+xe+Ae,Oe=V((je-V(je*je-4*ae*ae))/2),$e=O(Oe)/3,wr=Oe?q(S(ae/Oe))/3:W(S(Xt))/3,Or=r($e),Nr=U(wr),en=Nr*Nr-Or*Or;return[y(Xt)*2*e(F(wr)*Or,.25-en),y(ae)*2*e(Nr*v($e),.25+en)]};function rt(){return g.geoProjection(dt).scale(66.1603)}var at=V(8),vt=o(1+A);function it(Xt,ae){var xe=S(ae);return xeb&&--Ae>0);return[Xt/(r(xe)*(at-1/v(xe))),y(ae)*xe]};function Y(){return g.geoProjection(it).scale(112.314)}function ft(Xt){var ae=2*_/Xt;function xe(Ae,je){var Oe=g.geoAzimuthalEquidistantRaw(Ae,je);if(S(Ae)>P){var $e=e(Oe[1],Oe[0]),wr=V(Oe[0]*Oe[0]+Oe[1]*Oe[1]),Or=ae*x(($e-P)/ae)+P,Nr=e(v($e-=Or),2-r($e));$e=Or+O(_/wr*v(Nr))-Nr,Oe[0]=wr*r($e),Oe[1]=wr*v($e)}return Oe}return xe.invert=function(Ae,je){var Oe=V(Ae*Ae+je*je);if(Oe>P){var $e=e(je,Ae),wr=ae*x(($e-P)/ae)+P,Or=$e>wr?-1:1,Nr=Oe*r(wr-$e),en=1/T(Or*j((Nr-_)/V(_*(_-2*Nr)+Oe*Oe)));$e=wr+2*t((en+Or*V(en*en-3))/3),Ae=Oe*r($e),je=Oe*v($e)}return g.geoAzimuthalEquidistantRaw.invert(Ae,je)},xe}function ut(){var Xt=5,ae=g.geoProjectionMutator(ft),xe=ae(Xt),Ae=xe.stream,je=.01,Oe=-r(je*w),$e=v(je*w);return xe.lobes=function(wr){return arguments.length?ae(Xt=+wr):Xt},xe.stream=function(wr){var Or=xe.rotate(),Nr=Ae(wr),en=(xe.rotate([0,0]),Ae(wr));return xe.rotate(Or),Nr.sphere=function(){en.polygonStart(),en.lineStart();for(var vn=0,In=360/Xt,Nn=2*_/Xt,ii=90-180/Xt,Ui=P;vn0&&S(je)>u);return Ae<0?NaN:xe}function Wt(Xt,ae,xe){return ae===void 0&&(ae=40),xe===void 0&&(xe=b),function(Ae,je,Oe,$e){var wr,Or,Nr;Oe=Oe===void 0?0:+Oe,$e=$e===void 0?0:+$e;for(var en=0;enwr){Oe-=Or/=2,$e-=Nr/=2;continue}wr=ii;var Ui=(Oe>0?-1:1)*xe,pa=($e>0?-1:1)*xe,fa=Xt(Oe+Ui,$e),Ta=Xt(Oe,$e+pa),so=(fa[0]-vn[0])/Ui,Bo=(fa[1]-vn[1])/Ui,So=(Ta[0]-vn[0])/pa,ds=(Ta[1]-vn[1])/pa,fl=ds*so-Bo*So,vl=(S(fl)<.5?.5:1)/fl;if(Or=(Nn*So-In*ds)*vl,Nr=(In*Bo-Nn*so)*vl,Oe+=Or,$e+=Nr,S(Or)0&&(wr[1]*=1+Or/1.5*wr[0]*wr[0]),wr}return Ae.invert=Wt(Ae),Ae}function ge(){return g.geoProjection(Jt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function fe(Xt,ae){var xe=Xt*v(ae),Ae=30,je;do ae-=je=(ae+v(ae)-xe)/(1+r(ae));while(S(je)>u&&--Ae>0);return ae/2}function pe(Xt,ae,xe){function Ae(je,Oe){return[Xt*je*r(Oe=fe(xe,Oe)),ae*v(Oe)]}return Ae.invert=function(je,Oe){return Oe=O(Oe/ae),[je/(Xt*r(Oe)),O((2*Oe+v(2*Oe))/xe)]},Ae}var se=pe(A/P,A,_);function Tt(){return g.geoProjection(se).scale(169.529)}var Lt=2.00276,Mt=1.11072;function ee(Xt,ae){var xe=fe(_,ae);return[Lt*Xt/(1/r(ae)+Mt/r(xe)),(ae+A*v(xe))/Lt]}ee.invert=function(Xt,ae){var xe=Lt*ae,Ae=ae<0?-M:M,je=25,Oe,$e;do $e=xe-A*v(Ae),Ae-=Oe=(v(2*Ae)+2*Ae-_*v($e))/(2*r(2*Ae)+2+_*r($e)*A*r(Ae));while(S(Oe)>u&&--je>0);return $e=xe-A*v(Ae),[Xt*(1/r($e)+Mt/r(Ae))/Lt,$e]};function ve(){return g.geoProjection(ee).scale(160.857)}function oe(Xt){var ae=0,xe=g.geoProjectionMutator(Xt),Ae=xe(ae);return Ae.parallel=function(je){return arguments.length?xe(ae=je*w):ae*k},Ae}function Te(Xt,ae){return[Xt*r(ae),ae]}Te.invert=function(Xt,ae){return[Xt/r(ae),ae]};function He(){return g.geoProjection(Te).scale(152.63)}function Ge(Xt){if(!Xt)return Te;var ae=1/T(Xt);function xe(Ae,je){var Oe=ae+Xt-je,$e=Oe&&Ae*r(je)/Oe;return[Oe*v($e),ae-Oe*r($e)]}return xe.invert=function(Ae,je){var Oe=V(Ae*Ae+(je=ae-je)*je),$e=ae+Xt-Oe;return[Oe/r($e)*e(Ae,je),$e]},xe}function cr(){return oe(Ge).scale(123.082).center([0,26.1441]).parallel(45)}function ur(Xt){function ae(xe,Ae){var je=P-Ae,Oe=je&&xe*Xt*v(je)/je;return[je*v(Oe)/Xt,P-je*r(Oe)]}return ae.invert=function(xe,Ae){var je=xe*Xt,Oe=P-Ae,$e=V(je*je+Oe*Oe),wr=e(je,Oe);return[($e?$e/v($e):1)*wr/Xt,P-$e]},ae}function jr(){var Xt=.5,ae=g.geoProjectionMutator(ur),xe=ae(Xt);return xe.fraction=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(158.837)}var Wr=pe(1,4/_,_);function br(){return g.geoProjection(Wr).scale(152.63)}function Xr(Xt,ae,xe,Ae,je,Oe){var $e=r(Oe),wr;if(S(Xt)>1||S(Oe)>1)wr=j(xe*je+ae*Ae*$e);else{var Or=v(Xt/2),Nr=v(Oe/2);wr=2*O(V(Or*Or+ae*Ae*Nr*Nr))}return S(wr)>u?[wr,e(Ae*v(Oe),ae*je-xe*Ae*$e)]:[0,0]}function nn(Xt,ae,xe){return j((Xt*Xt+ae*ae-xe*xe)/(2*Xt*ae))}function Le(Xt){return Xt-2*_*n((Xt+_)/(2*_))}function Gt(Xt,ae,xe){for(var Ae=[[Xt[0],Xt[1],v(Xt[1]),r(Xt[1])],[ae[0],ae[1],v(ae[1]),r(ae[1])],[xe[0],xe[1],v(xe[1]),r(xe[1])]],je=Ae[2],Oe,$e=0;$e<3;++$e,je=Oe)Oe=Ae[$e],je.v=Xr(Oe[1]-je[1],je[3],je[2],Oe[3],Oe[2],Oe[0]-je[0]),je.point=[0,0];var wr=nn(Ae[0].v[0],Ae[2].v[0],Ae[1].v[0]),Or=nn(Ae[0].v[0],Ae[1].v[0],Ae[2].v[0]),Nr=_-wr;Ae[2].point[1]=0,Ae[0].point[0]=-(Ae[1].point[0]=Ae[0].v[0]/2);var en=[Ae[2].point[0]=Ae[0].point[0]+Ae[2].v[0]*r(wr),2*(Ae[0].point[1]=Ae[1].point[1]=Ae[2].v[0]*v(wr))];function vn(In,Nn){var ii=v(Nn),Ui=r(Nn),pa=new Array(3),fa;for(fa=0;fa<3;++fa){var Ta=Ae[fa];if(pa[fa]=Xr(Nn-Ta[1],Ta[3],Ta[2],Ui,ii,In-Ta[0]),!pa[fa][0])return Ta.point;pa[fa][1]=Le(pa[fa][1]-Ta.v[1])}var so=en.slice();for(fa=0;fa<3;++fa){var Bo=fa==2?0:fa+1,So=nn(Ae[fa].v[0],pa[fa][0],pa[Bo][0]);pa[fa][1]<0&&(So=-So),fa?fa==1?(So=Or-So,so[0]-=pa[fa][0]*r(So),so[1]-=pa[fa][0]*v(So)):(So=Nr-So,so[0]+=pa[fa][0]*r(So),so[1]+=pa[fa][0]*v(So)):(so[0]+=pa[fa][0]*r(So),so[1]-=pa[fa][0]*v(So))}return so[0]/=3,so[1]/=3,so}return vn}function ne(Xt){return Xt[0]*=w,Xt[1]*=w,Xt}function Ct(){return gt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function gt(Xt,ae,xe){var Ae=g.geoCentroid({type:"MultiPoint",coordinates:[Xt,ae,xe]}),je=[-Ae[0],-Ae[1]],Oe=g.geoRotation(je),$e=Gt(ne(Oe(Xt)),ne(Oe(ae)),ne(Oe(xe)));$e.invert=Wt($e);var wr=g.geoProjection($e).rotate(je),Or=wr.center;return delete wr.rotate,wr.center=function(Nr){return arguments.length?Or(Oe(Nr)):Oe.invert(Or())},wr.clipAngle(90)}function St(Xt,ae){var xe=V(1-v(ae));return[2/h*Xt*xe,h*(1-xe)]}St.invert=function(Xt,ae){var xe=(xe=ae/h-1)*xe;return[xe>0?Xt*V(_/xe)/2:0,O(1-xe)]};function Nt(){return g.geoProjection(St).scale(95.6464).center([0,30])}function re(Xt){var ae=T(Xt);function xe(Ae,je){return[Ae,(Ae?Ae/v(Ae):1)*(v(je)*r(Ae)-ae*r(je))]}return xe.invert=ae?function(Ae,je){Ae&&(je*=v(Ae)/Ae);var Oe=r(Ae);return[Ae,2*e(V(Oe*Oe+ae*ae-je*je)-Oe,ae-je)]}:function(Ae,je){return[Ae,O(Ae?je*T(Ae)/Ae:je)]},xe}function le(){return oe(re).scale(249.828).clipAngle(90)}var we=V(3);function Ue(Xt,ae){return[we*Xt*(2*r(2*ae/3)-1)/h,we*h*v(ae/3)]}Ue.invert=function(Xt,ae){var xe=3*O(ae/(we*h));return[h*Xt/(we*(2*r(2*xe/3)-1)),xe]};function qe(){return g.geoProjection(Ue).scale(156.19)}function or(Xt){var ae=r(Xt);function xe(Ae,je){return[Ae*ae,v(je)/ae]}return xe.invert=function(Ae,je){return[Ae/ae,O(je*ae)]},xe}function Sr(){return oe(or).parallel(38.58).scale(195.044)}function Ar(Xt){var ae=r(Xt);function xe(Ae,je){return[Ae*ae,(1+ae)*T(je/2)]}return xe.invert=function(Ae,je){return[Ae/ae,t(je/(1+ae))*2]},xe}function mr(){return oe(Ar).scale(124.75)}function Qr(Xt,ae){var xe=V(8/(3*_));return[xe*Xt*(1-S(ae)/_),xe*ae]}Qr.invert=function(Xt,ae){var xe=V(8/(3*_)),Ae=ae/xe;return[Xt/(xe*(1-S(Ae)/_)),Ae]};function Hn(){return g.geoProjection(Qr).scale(165.664)}function Wn(Xt,ae){var xe=V(4-3*v(S(ae)));return[2/V(6*_)*Xt*xe,y(ae)*V(2*_/3)*(2-xe)]}Wn.invert=function(Xt,ae){var xe=2-S(ae)/V(2*_/3);return[Xt*V(6*_)/(2*xe),y(ae)*O((4-xe*xe)/3)]};function Xn(){return g.geoProjection(Wn).scale(165.664)}function Ii(Xt,ae){var xe=V(_*(4+_));return[2/xe*Xt*(1+V(1-4*ae*ae/(_*_))),4/xe*ae]}Ii.invert=function(Xt,ae){var xe=V(_*(4+_))/2;return[Xt*xe/(1+V(1-ae*ae*(4+_)/(4*_))),ae*xe/2]};function oi(){return g.geoProjection(Ii).scale(180.739)}function $n(Xt,ae){var xe=(2+P)*v(ae);ae/=2;for(var Ae=0,je=1/0;Ae<10&&S(je)>u;Ae++){var Oe=r(ae);ae-=je=(ae+v(ae)*(Oe+2)-xe)/(2*Oe*(1+Oe))}return[2/V(_*(4+_))*Xt*(1+r(ae)),2*V(_/(4+_))*v(ae)]}$n.invert=function(Xt,ae){var xe=ae*V((4+_)/_)/2,Ae=O(xe),je=r(Ae);return[Xt/(2/V(_*(4+_))*(1+je)),O((Ae+xe*(je+2))/(2+P))]};function sa(){return g.geoProjection($n).scale(180.739)}function Zi(Xt,ae){return[Xt*(1+r(ae))/V(2+_),2*ae/V(2+_)]}Zi.invert=function(Xt,ae){var xe=V(2+_),Ae=ae*xe/2;return[xe*Xt/(1+r(Ae)),Ae]};function We(){return g.geoProjection(Zi).scale(173.044)}function nr(Xt,ae){for(var xe=(1+P)*v(ae),Ae=0,je=1/0;Ae<10&&S(je)>u;Ae++)ae-=je=(ae+v(ae)-xe)/(1+r(ae));return xe=V(2+_),[Xt*(1+r(ae))/xe,2*ae/xe]}nr.invert=function(Xt,ae){var xe=1+P,Ae=V(xe/2);return[Xt*2*Ae/(1+r(ae*=Ae)),O((ae+v(ae))/xe)]};function fr(){return g.geoProjection(nr).scale(173.044)}var _r=3+2*A;function tn(Xt,ae){var xe=v(Xt/=2),Ae=r(Xt),je=V(r(ae)),Oe=r(ae/=2),$e=v(ae)/(Oe+A*Ae*je),wr=V(2/(1+$e*$e)),Or=V((A*Oe+(Ae+xe)*je)/(A*Oe+(Ae-xe)*je));return[_r*(wr*(Or-1/Or)-2*o(Or)),_r*(wr*$e*(Or+1/Or)-2*t($e))]}tn.invert=function(Xt,ae){if(!(Oe=dt.invert(Xt/1.2,ae*1.065)))return null;var xe=Oe[0],Ae=Oe[1],je=20,Oe;Xt/=_r,ae/=_r;do{var $e=xe/2,wr=Ae/2,Or=v($e),Nr=r($e),en=v(wr),vn=r(wr),In=r(Ae),Nn=V(In),ii=en/(vn+A*Nr*Nn),Ui=ii*ii,pa=V(2/(1+Ui)),fa=A*vn+(Nr+Or)*Nn,Ta=A*vn+(Nr-Or)*Nn,so=fa/Ta,Bo=V(so),So=Bo-1/Bo,ds=Bo+1/Bo,fl=pa*So-2*o(Bo)-Xt,vl=pa*ii*ds-2*t(ii)-ae,Ds=en&&C*Nn*Or*Ui/en,wl=(A*Nr*vn+Nn)/(2*(vn+A*Nr*Nn)*(vn+A*Nr*Nn)*Nn),Eu=-.5*ii*pa*pa*pa,gu=Eu*Ds,$s=Eu*wl,Zs=(Zs=2*vn+A*Nn*(Nr-Or))*Zs*Bo,Yu=(A*Nr*vn*Nn+In)/Zs,dc=-(A*Or*en)/(Nn*Zs),$c=So*gu-2*Yu/Bo+pa*(Yu+Yu/so),At=So*$s-2*dc/Bo+pa*(dc+dc/so),Ut=ii*ds*gu-2*Ds/(1+Ui)+pa*ds*Ds+pa*ii*(Yu-Yu/so),ue=ii*ds*$s-2*wl/(1+Ui)+pa*ds*wl+pa*ii*(dc-dc/so),Me=At*Ut-ue*$c;if(!Me)break;var Pe=(vl*At-fl*ue)/Me,Ne=(fl*Ut-vl*$c)/Me;xe-=Pe,Ae=i(-P,l(P,Ae-Ne))}while((S(Pe)>u||S(Ne)>u)&&--je>0);return S(S(Ae)-P)Ae){var vn=V(en),In=e(Nr,Or),Nn=xe*x(In/xe),ii=In-Nn,Ui=Xt*r(ii),pa=(Xt*v(ii)-ii*v(Ui))/(P-Ui),fa=Ie(ii,pa),Ta=(_-Xt)/Rr(fa,Ui,_);Or=vn;var so=50,Bo;do Or-=Bo=(Xt+Rr(fa,Ui,Or)*Ta-vn)/(fa(Or)*Ta);while(S(Bo)>u&&--so>0);Nr=ii*v(Or),OrAe){var Or=V(wr),Nr=e($e,Oe),en=xe*x(Nr/xe),vn=Nr-en;Oe=Or*r(vn),$e=Or*v(vn);for(var In=Oe-P,Nn=v(Oe),ii=$e/Nn,Ui=Oeu||S(ii)>u)&&--Ui>0);return[vn,In]},Or}var Br=Gr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Yr(){return g.geoProjection(Br).scale(149.995)}var pn=Gr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function on(){return g.geoProjection(pn).scale(153.93)}var Ce=Gr(5/6*_,-.62636,-.0344,0,1.3493,-.05524,0,.045);function dr(){return g.geoProjection(Ce).scale(130.945)}function Hr(Xt,ae){var xe=Xt*Xt,Ae=ae*ae;return[Xt*(1-.162388*Ae)*(.87-952426e-9*xe*xe),ae*(1+Ae/12)]}Hr.invert=function(Xt,ae){var xe=Xt,Ae=ae,je=50,Oe;do{var $e=Ae*Ae;Ae-=Oe=(Ae*(1+$e/12)-ae)/(1+$e/4)}while(S(Oe)>u&&--je>0);je=50,Xt/=1-.162388*$e;do{var wr=(wr=xe*xe)*wr;xe-=Oe=(xe*(.87-952426e-9*wr)-Xt)/(.87-.00476213*wr)}while(S(Oe)>u&&--je>0);return[xe,Ae]};function _n(){return g.geoProjection(Hr).scale(131.747)}var Fn=Gr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Qn(){return g.geoProjection(Fn).scale(131.087)}function Pn(Xt){var ae=Xt(P,0)[0]-Xt(-P,0)[0];function xe(Ae,je){var Oe=Ae>0?-.5:.5,$e=Xt(Ae+Oe*_,je);return $e[0]-=Oe*ae,$e}return Xt.invert&&(xe.invert=function(Ae,je){var Oe=Ae>0?-.5:.5,$e=Xt.invert(Ae+Oe*ae,je),wr=$e[0]-Oe*_;return wr<-_?wr+=2*_:wr>_&&(wr-=2*_),$e[0]=wr,$e}),xe}function En(Xt,ae){var xe=y(Xt),Ae=y(ae),je=r(ae),Oe=r(Xt)*je,$e=v(Xt)*je,wr=v(Ae*ae);Xt=S(e($e,wr)),ae=O(Oe),S(Xt-P)>u&&(Xt%=P);var Or=Zn(Xt>_/4?P-Xt:Xt,ae);return Xt>_/4&&(wr=Or[0],Or[0]=-Or[1],Or[1]=-wr),Or[0]*=xe,Or[1]*=-Ae,Or}En.invert=function(Xt,ae){S(Xt)>1&&(Xt=y(Xt)*2-Xt),S(ae)>1&&(ae=y(ae)*2-ae);var xe=y(Xt),Ae=y(ae),je=-xe*Xt,Oe=-Ae*ae,$e=Oe/je<1,wr=La($e?Oe:je,$e?je:Oe),Or=wr[0],Nr=wr[1],en=r(Nr);return $e&&(Or=-P-Or),[xe*(e(v(Or)*en,-v(Nr))+_),Ae*O(r(Or)*en)]};function Zn(Xt,ae){if(ae===P)return[0,0];var xe=v(ae),Ae=xe*xe,je=Ae*Ae,Oe=1+je,$e=1+3*je,wr=1-je,Or=O(1/V(Oe)),Nr=wr+Ae*Oe*Or,en=(1-xe)/Nr,vn=V(en),In=en*Oe,Nn=V(In),ii=vn*wr,Ui,pa;if(Xt===0)return[0,-(ii+Ae*Nn)];var fa=r(ae),Ta=1/fa,so=2*xe*fa,Bo=(-3*Ae+Or*$e)*so,So=(-Nr*fa-(1-xe)*Bo)/(Nr*Nr),ds=.5*So/vn,fl=wr*ds-2*Ae*vn*so,vl=Ae*Oe*So+en*$e*so,Ds=-Ta*so,wl=-Ta*vl,Eu=-2*Ta*fl,gu=4*Xt/_,$s;if(Xt>.222*_||ae<_/4&&Xt>.175*_){if(Ui=(ii+Ae*V(In*(1+je)-ii*ii))/(1+je),Xt>_/4)return[Ui,Ui];var Zs=Ui,Yu=.5*Ui;Ui=.5*(Yu+Zs),pa=50;do{var dc=V(In-Ui*Ui),$c=Ui*(Eu+Ds*dc)+wl*O(Ui/Nn)-gu;if(!$c)break;$c<0?Yu=Ui:Zs=Ui,Ui=.5*(Yu+Zs)}while(S(Zs-Yu)>u&&--pa>0)}else{Ui=u,pa=25;do{var At=Ui*Ui,Ut=V(In-At),ue=Eu+Ds*Ut,Me=Ui*ue+wl*O(Ui/Nn)-gu,Pe=ue+(wl-Ds*At)/Ut;Ui-=$s=Ut?Me/Pe:0}while(S($s)>u&&--pa>0)}return[Ui,-ii-Ae*V(In-Ui*Ui)]}function La(Xt,ae){for(var xe=0,Ae=1,je=.5,Oe=50;;){var $e=je*je,wr=V(je),Or=O(1/V(1+$e)),Nr=1-$e+je*(1+$e)*Or,en=(1-wr)/Nr,vn=V(en),In=en*(1+$e),Nn=vn*(1-$e),ii=In-Xt*Xt,Ui=V(ii),pa=ae+Nn+je*Ui;if(S(Ae-xe)0?xe=je:Ae=je,je=.5*(xe+Ae)}if(!Oe)return null;var fa=O(wr),Ta=r(fa),so=1/Ta,Bo=2*wr*Ta,So=(-3*je+Or*(1+3*$e))*Bo,ds=(-Nr*Ta-(1-wr)*So)/(Nr*Nr),fl=.5*ds/vn,vl=(1-$e)*fl-2*je*vn*Bo,Ds=-2*so*vl,wl=-so*Bo,Eu=-so*(je*(1+$e)*ds+en*(1+3*$e)*Bo);return[_/4*(Xt*(Ds+wl*Ui)+Eu*O(Xt/V(In))),fa]}function Vi(){return g.geoProjection(Pn(En)).scale(239.75)}function Qa(Xt,ae,xe){var Ae,je,Oe;return Xt?(Ae=Ja(Xt,xe),ae?(je=Ja(ae,1-xe),Oe=je[1]*je[1]+xe*Ae[0]*Ae[0]*je[0]*je[0],[[Ae[0]*je[2]/Oe,Ae[1]*Ae[2]*je[0]*je[1]/Oe],[Ae[1]*je[1]/Oe,-Ae[0]*Ae[2]*je[0]*je[2]/Oe],[Ae[2]*je[1]*je[2]/Oe,-xe*Ae[0]*Ae[1]*je[0]/Oe]]):[[Ae[0],0],[Ae[1],0],[Ae[2],0]]):(je=Ja(ae,1-xe),[[0,je[0]/je[1]],[1/je[1],0],[je[2]/je[1],0]])}function Ja(Xt,ae){var xe,Ae,je,Oe,$e;if(ae=1-u)return xe=(1-ae)/4,Ae=U(Xt),Oe=H(Xt),je=1/Ae,$e=Ae*F(Xt),[Oe+xe*($e-Xt)/(Ae*Ae),je-xe*Oe*je*($e-Xt),je+xe*Oe*je*($e+Xt),2*t(a(Xt))-P+xe*($e-Xt)/Ae];var wr=[1,0,0,0,0,0,0,0,0],Or=[V(ae),0,0,0,0,0,0,0,0],Nr=0;for(Ae=V(1-ae),$e=1;S(Or[Nr]/wr[Nr])>u&&Nr<8;)xe=wr[Nr++],Or[Nr]=(xe-Ae)/2,wr[Nr]=(xe+Ae)/2,Ae=V(xe*Ae),$e*=2;je=$e*wr[Nr]*Xt;do Oe=Or[Nr]*v(Ae=je)/wr[Nr],je=(O(Oe)+je)/2;while(--Nr);return[v(je),Oe=r(je),Oe/r(je-Ae),je]}function Do(Xt,ae,xe){var Ae=S(Xt),je=S(ae),Oe=F(je);if(Ae){var $e=1/v(Ae),wr=1/(T(Ae)*T(Ae)),Or=-(wr+xe*(Oe*Oe*$e*$e)-1+xe),Nr=(xe-1)*wr,en=(-Or+V(Or*Or-4*Nr))/2;return[yo(t(1/V(en)),xe)*y(Xt),yo(t(V((en/wr-1)/xe)),1-xe)*y(ae)]}return[0,yo(t(Oe),1-xe)*y(ae)]}function yo(Xt,ae){if(!ae)return Xt;if(ae===1)return o(T(Xt/2+M));for(var xe=1,Ae=V(1-ae),je=V(ae),Oe=0;S(je)>u;Oe++){if(Xt%_){var $e=t(Ae*T(Xt)/xe);$e<0&&($e+=_),Xt+=$e+~~(Xt/_)*_}else Xt+=Xt;je=(xe+Ae)/2,Ae=V(xe*Ae),je=((xe=je)-Ae)/2}return Xt/(f(2,Oe)*xe)}function Fo(Xt,ae){var xe=(A-1)/(A+1),Ae=V(1-xe*xe),je=yo(P,Ae*Ae),Oe=-1,$e=o(T(_/4+S(ae)/2)),wr=a(Oe*$e)/V(xe),Or=Da(wr*r(Oe*Xt),wr*v(Oe*Xt)),Nr=Do(Or[0],Or[1],Ae*Ae);return[-Nr[1],(ae>=0?1:-1)*(.5*je-Nr[0])]}function Da(Xt,ae){var xe=Xt*Xt,Ae=ae+1,je=1-xe-ae*ae;return[.5*((Xt>=0?P:-P)-e(je,2*Xt)),-.25*o(je*je+4*xe)+.5*o(Ae*Ae+xe)]}function ys(Xt,ae){var xe=ae[0]*ae[0]+ae[1]*ae[1];return[(Xt[0]*ae[0]+Xt[1]*ae[1])/xe,(Xt[1]*ae[0]-Xt[0]*ae[1])/xe]}Fo.invert=function(Xt,ae){var xe=(A-1)/(A+1),Ae=V(1-xe*xe),je=yo(P,Ae*Ae),Oe=-1,$e=Qa(.5*je-ae,-Xt,Ae*Ae),wr=ys($e[0],$e[1]),Or=e(wr[1],wr[0])/Oe;return[Or,2*t(a(.5/Oe*o(xe*wr[0]*wr[0]+xe*wr[1]*wr[1])))-P]};function os(){return g.geoProjection(Pn(Fo)).scale(151.496)}function ul(Xt){var ae=v(Xt),xe=r(Xt),Ae=Zo(Xt);Ae.invert=Zo(-Xt);function je(Oe,$e){var wr=Ae(Oe,$e);Oe=wr[0],$e=wr[1];var Or=v($e),Nr=r($e),en=r(Oe),vn=j(ae*Or+xe*Nr*en),In=v(vn),Nn=S(In)>u?vn/In:1;return[Nn*xe*v(Oe),(S(Oe)>P?Nn:-Nn)*(ae*Nr-xe*Or*en)]}return je.invert=function(Oe,$e){var wr=V(Oe*Oe+$e*$e),Or=-v(wr),Nr=r(wr),en=wr*Nr,vn=-$e*Or,In=wr*ae,Nn=V(en*en+vn*vn-In*In),ii=e(en*In+vn*Nn,vn*In-en*Nn),Ui=(wr>P?-1:1)*e(Oe*Or,wr*r(ii)*Nr+$e*v(ii)*Or);return Ae.invert(Ui,ii)},je}function Zo(Xt){var ae=v(Xt),xe=r(Xt);return function(Ae,je){var Oe=r(je),$e=r(Ae)*Oe,wr=v(Ae)*Oe,Or=v(je);return[e(wr,$e*xe-Or*ae),O(Or*xe+$e*ae)]}}function Ks(){var Xt=0,ae=g.geoProjectionMutator(ul),xe=ae(Xt),Ae=xe.rotate,je=xe.stream,Oe=g.geoCircle();return xe.parallel=function($e){if(!arguments.length)return Xt*k;var wr=xe.rotate();return ae(Xt=$e*w).rotate(wr)},xe.rotate=function($e){return arguments.length?(Ae.call(xe,[$e[0],$e[1]-Xt*k]),Oe.center([-$e[0],-$e[1]]),xe):($e=Ae.call(xe),$e[1]+=Xt*k,$e)},xe.stream=function($e){return $e=je($e),$e.sphere=function(){$e.polygonStart();var wr=.01,Or=Oe.radius(90-wr)().coordinates[0],Nr=Or.length-1,en=-1,vn;for($e.lineStart();++en=0;)$e.point((vn=Or[en])[0],vn[1]);$e.lineEnd(),$e.polygonEnd()},$e},xe.scale(79.4187).parallel(45).clipAngle(180-.001)}var ss=3,cl=O(1-1/ss)*k,Qs=or(0);function Nl(Xt){var ae=cl*w,xe=St(_,ae)[0]-St(-_,ae)[0],Ae=Qs(0,ae)[1],je=St(0,ae)[1],Oe=h-je,$e=p/Xt,wr=4/p,Or=Ae+Oe*Oe*4/p;function Nr(en,vn){var In,Nn=S(vn);if(Nn>ae){var ii=l(Xt-1,i(0,n((en+_)/$e)));en+=_*(Xt-1)/Xt-ii*$e,In=St(en,Nn),In[0]=In[0]*p/xe-p*(Xt-1)/(2*Xt)+ii*p/Xt,In[1]=Ae+(In[1]-je)*4*Oe/p,vn<0&&(In[1]=-In[1])}else In=Qs(en,vn);return In[0]*=wr,In[1]/=Or,In}return Nr.invert=function(en,vn){en/=wr,vn*=Or;var In=S(vn);if(In>Ae){var Nn=l(Xt-1,i(0,n((en+_)/$e)));en=(en+_*(Xt-1)/Xt-Nn*$e)*xe/p;var ii=St.invert(en,.25*(In-Ae)*p/Oe+je);return ii[0]-=_*(Xt-1)/Xt-Nn*$e,vn<0&&(ii[1]=-ii[1]),ii}return Qs.invert(en,vn)},Nr}function cs(Xt,ae){return[Xt,ae&1?90-u:cl]}function Ps(Xt,ae){return[Xt,ae&1?-90+u:-cl]}function Lo(Xt){return[Xt[0]*(1-u),Xt[1]]}function As(Xt){var ae=[].concat(I.range(-180,180+Xt/2,Xt).map(cs),I.range(180,-180-Xt/2,-Xt).map(Ps));return{type:"Polygon",coordinates:[Xt===180?ae.map(Lo):ae]}}function kl(){var Xt=4,ae=g.geoProjectionMutator(Nl),xe=ae(Xt),Ae=xe.stream;return xe.lobes=function(je){return arguments.length?ae(Xt=+je):Xt},xe.stream=function(je){var Oe=xe.rotate(),$e=Ae(je),wr=(xe.rotate([0,0]),Ae(je));return xe.rotate(Oe),$e.sphere=function(){g.geoStream(As(180/Xt),wr)},$e},xe.scale(239.75)}function ql(Xt){var ae=1+Xt,xe=v(1/ae),Ae=O(xe),je=2*V(_/(Oe=_+4*Ae*ae)),Oe,$e=.5*je*(ae+V(Xt*(2+Xt))),wr=Xt*Xt,Or=ae*ae;function Nr(en,vn){var In=1-v(vn),Nn,ii;if(In&&In<2){var Ui=P-vn,pa=25,fa;do{var Ta=v(Ui),so=r(Ui),Bo=Ae+e(Ta,ae-so),So=1+Or-2*ae*so;Ui-=fa=(Ui-wr*Ae-ae*Ta+So*Bo-.5*In*Oe)/(2*ae*Ta*Bo)}while(S(fa)>b&&--pa>0);Nn=je*V(So),ii=en*Bo/_}else Nn=je*(Xt+In),ii=en*Ae/_;return[Nn*v(ii),$e-Nn*r(ii)]}return Nr.invert=function(en,vn){var In=en*en+(vn-=$e)*vn,Nn=(1+Or-In/(je*je))/(2*ae),ii=j(Nn),Ui=v(ii),pa=Ae+e(Ui,ae-Nn);return[O(en/V(In))*_/pa,O(1-2*(ii-wr*Ae-ae*Ui+(1+Or-2*ae*Nn)*pa)/Oe)]},Nr}function Jl(){var Xt=1,ae=g.geoProjectionMutator(ql),xe=ae(Xt);return xe.ratio=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(167.774).center([0,18.67])}var Us=.7109889596207567,Pa=.0528035274542;function fo(Xt,ae){return ae>-Us?(Xt=se(Xt,ae),Xt[1]+=Pa,Xt):Te(Xt,ae)}fo.invert=function(Xt,ae){return ae>-Us?se.invert(Xt,ae-Pa):Te.invert(Xt,ae)};function qs(){return g.geoProjection(fo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ql(Xt,ae){return S(ae)>Us?(Xt=se(Xt,ae),Xt[1]-=ae>0?Pa:-Pa,Xt):Te(Xt,ae)}Ql.invert=function(Xt,ae){return S(ae)>Us?se.invert(Xt,ae+(ae>0?Pa:-Pa)):Te.invert(Xt,ae)};function Xo(){return g.geoProjection(Ql).scale(152.63)}function Gl(Xt,ae,xe,Ae){var je=V(4*_/(2*xe+(1+Xt-ae/2)*v(2*xe)+(Xt+ae)/2*v(4*xe)+ae/2*v(6*xe))),Oe=V(Ae*v(xe)*V((1+Xt*r(2*xe)+ae*r(4*xe))/(1+Xt+ae))),$e=xe*Or(1);function wr(vn){return V(1+Xt*r(2*vn)+ae*r(4*vn))}function Or(vn){var In=vn*xe;return(2*In+(1+Xt-ae/2)*v(2*In)+(Xt+ae)/2*v(4*In)+ae/2*v(6*In))/xe}function Nr(vn){return wr(vn)*v(vn)}var en=function(vn,In){var Nn=xe*qt(Or,$e*v(In)/xe,In/_);isNaN(Nn)&&(Nn=xe*y(In));var ii=je*wr(Nn);return[ii*Oe*vn/_*r(Nn),ii/Oe*v(Nn)]};return en.invert=function(vn,In){var Nn=qt(Nr,In*Oe/je);return[vn*_/(r(Nn)*je*Oe*wr(Nn)),O(xe*Or(Nn/xe)/$e)]},xe===0&&(je=V(Ae/_),en=function(vn,In){return[vn*je,v(In)/je]},en.invert=function(vn,In){return[vn/je,O(In*je)]}),en}function al(){var Xt=1,ae=0,xe=45*w,Ae=2,je=g.geoProjectionMutator(Gl),Oe=je(Xt,ae,xe,Ae);return Oe.a=function($e){return arguments.length?je(Xt=+$e,ae,xe,Ae):Xt},Oe.b=function($e){return arguments.length?je(Xt,ae=+$e,xe,Ae):ae},Oe.psiMax=function($e){return arguments.length?je(Xt,ae,xe=+$e*w,Ae):xe*k},Oe.ratio=function($e){return arguments.length?je(Xt,ae,xe,Ae=+$e):Ae},Oe.scale(180.739)}function Cl(Xt,ae,xe,Ae,je,Oe,$e,wr,Or,Nr,en){if(en.nanEncountered)return NaN;var vn,In,Nn,ii,Ui,pa,fa,Ta,so,Bo;if(vn=xe-ae,In=Xt(ae+vn*.25),Nn=Xt(xe-vn*.25),isNaN(In)){en.nanEncountered=!0;return}if(isNaN(Nn)){en.nanEncountered=!0;return}return ii=vn*(Ae+4*In+je)/12,Ui=vn*(je+4*Nn+Oe)/12,pa=ii+Ui,Bo=(pa-$e)/15,Nr>Or?(en.maxDepthCount++,pa+Bo):Math.abs(Bo)>1;do Or[pa]>Nn?Ui=pa:ii=pa,pa=ii+Ui>>1;while(pa>ii);var fa=Or[pa+1]-Or[pa];return fa&&(fa=(Nn-Or[pa+1])/fa),(pa+1+fa)/$e}var vn=2*en(1)/_*Oe/xe,In=function(Nn,ii){var Ui=en(S(v(ii))),pa=Ae(Ui)*Nn;return Ui/=vn,[pa,ii>=0?Ui:-Ui]};return In.invert=function(Nn,ii){var Ui;return ii*=vn,S(ii)<1&&(Ui=y(ii)*O(je(S(ii))*Oe)),[Nn/Ae(S(ii)),Ui]},In}function Ms(){var Xt=0,ae=2.5,xe=1.183136,Ae=g.geoProjectionMutator(lo),je=Ae(Xt,ae,xe);return je.alpha=function(Oe){return arguments.length?Ae(Xt=+Oe,ae,xe):Xt},je.k=function(Oe){return arguments.length?Ae(Xt,ae=+Oe,xe):ae},je.gamma=function(Oe){return arguments.length?Ae(Xt,ae,xe=+Oe):xe},je.scale(152.63)}function Is(Xt,ae){return S(Xt[0]-ae[0])=0;--Or)xe=Xt[1][Or],Ae=xe[0][0],je=xe[0][1],Oe=xe[1][1],$e=xe[2][0],wr=xe[2][1],ae.push(ou([[$e-u,wr-u],[$e-u,Oe+u],[Ae+u,Oe+u],[Ae+u,je-u]],30));return{type:"Polygon",coordinates:[I.merge(ae)]}}function ts(Xt,ae,xe){var Ae,je;function Oe(Or,Nr){for(var en=Nr<0?-1:1,vn=ae[+(Nr<0)],In=0,Nn=vn.length-1;Invn[In][2][0];++In);var ii=Xt(Or-vn[In][1][0],Nr);return ii[0]+=Xt(vn[In][1][0],en*Nr>en*vn[In][0][1]?vn[In][0][1]:Nr)[0],ii}xe?Oe.invert=xe(Oe):Xt.invert&&(Oe.invert=function(Or,Nr){for(var en=je[+(Nr<0)],vn=ae[+(Nr<0)],In=0,Nn=en.length;Inii&&(Ui=Nn,Nn=ii,ii=Ui),[[vn,Nn],[In,ii]]})}),$e):ae.map(function(Nr){return Nr.map(function(en){return[[en[0][0]*k,en[0][1]*k],[en[1][0]*k,en[1][1]*k],[en[2][0]*k,en[2][1]*k]]})})},ae!=null&&$e.lobes(ae),$e}var Su=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Gu(){return ts(ee,Su).scale(160.857)}var bl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Dl(){return ts(Ql,bl).scale(152.63)}var tu=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function nu(){return ts(se,tu).scale(169.529)}var ac=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function mh(){return ts(se,ac).scale(169.529).rotate([20,0])}var Jc=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function ah(){return ts(fo,Jc,Wt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Bf=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Sf(){return ts(Te,Bf).scale(152.63).rotate([-20,0])}function Fl(Xt,ae){return[3/p*Xt*V(_*_/3-ae*ae),ae]}Fl.invert=function(Xt,ae){return[p/3*Xt/V(_*_/3-ae*ae),ae]};function Bc(){return g.geoProjection(Fl).scale(158.837)}function Nf(Xt){function ae(xe,Ae){if(S(S(Ae)-P)2)return null;xe/=2,Ae/=2;var Oe=xe*xe,$e=Ae*Ae,wr=2*Ae/(1+Oe+$e);return wr=f((1+wr)/(1-wr),1/Xt),[e(2*xe,1-Oe-$e)/Xt,O((wr-1)/(wr+1))]},ae}function hc(){var Xt=.5,ae=g.geoProjectionMutator(Nf),xe=ae(Xt);return xe.spacing=function(Ae){return arguments.length?ae(Xt=+Ae):Xt},xe.scale(124.75)}var oc=_/A;function fc(Xt,ae){return[Xt*(1+V(r(ae)))/2,ae/(r(ae/2)*r(Xt/6))]}fc.invert=function(Xt,ae){var xe=S(Xt),Ae=S(ae),je=u,Oe=P;Aeu||S(pa)>u)&&--je>0);return je&&[xe,Ae]};function sc(){return g.geoProjection(cu).scale(139.98)}function rl(Xt,ae){return[v(Xt)/r(ae),T(ae)*r(Xt)]}rl.invert=function(Xt,ae){var xe=Xt*Xt,Ae=ae*ae,je=Ae+1,Oe=xe+je,$e=Xt?C*V((Oe-V(Oe*Oe-4*xe))/xe):1/V(je);return[O(Xt*$e),y(ae)*j($e)]};function Yl(){return g.geoProjection(rl).scale(144.049).clipAngle(90-.001)}function Sh(Xt){var ae=r(Xt),xe=T(M+Xt/2);function Ae(je,Oe){var $e=Oe-Xt,wr=S($e)=0;)en=Xt[Nr],vn=en[0]+wr*(Nn=vn)-Or*In,In=en[1]+wr*In+Or*Nn;return vn=wr*(Nn=vn)-Or*In,In=wr*In+Or*Nn,[vn,In]}return xe.invert=function(Ae,je){var Oe=20,$e=Ae,wr=je;do{for(var Or=ae,Nr=Xt[Or],en=Nr[0],vn=Nr[1],In=0,Nn=0,ii;--Or>=0;)Nr=Xt[Or],In=en+$e*(ii=In)-wr*Nn,Nn=vn+$e*Nn+wr*ii,en=Nr[0]+$e*(ii=en)-wr*vn,vn=Nr[1]+$e*vn+wr*ii;In=en+$e*(ii=In)-wr*Nn,Nn=vn+$e*Nn+wr*ii,en=$e*(ii=en)-wr*vn-Ae,vn=$e*vn+wr*ii-je;var Ui=In*In+Nn*Nn,pa,fa;$e-=pa=(en*In+vn*Nn)/Ui,wr-=fa=(vn*In-en*Nn)/Ui}while(S(pa)+S(fa)>u*u&&--Oe>0);if(Oe){var Ta=V($e*$e+wr*wr),so=2*t(Ta*.5),Bo=v(so);return[e($e*Bo,Ta*r(so)),Ta?O(wr*Bo/Ta):0]}},xe}var tl=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Vd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ll=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Qo=[[.9245,0],[0,0],[.01943,0]],lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function sh(){return lc(tl,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function rc(){return lc(Vd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function jf(){return lc(Ll,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Vh(){return lc(Qo,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return lc(lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function lc(Xt,ae){var xe=g.geoProjection(Ed(Xt)).rotate(ae).clipAngle(90),Ae=g.geoRotation(ae),je=xe.center;return delete xe.rotate,xe.center=function(Oe){return arguments.length?je(Ae(Oe)):Ae.invert(je())},xe}var hd=V(6),Zf=V(7);function xf(Xt,ae){var xe=O(7*v(ae)/(3*hd));return[hd*Xt*(2*r(2*xe/3)-1)/Zf,9*v(xe/3)/Zf]}xf.invert=function(Xt,ae){var xe=3*O(ae*Zf/9);return[Xt*Zf/(hd*(2*r(2*xe/3)-1)),O(v(xe)*3*hd/7)]};function Hh(){return g.geoProjection(xf).scale(164.859)}function Uf(Xt,ae){for(var xe=(1+C)*v(ae),Ae=ae,je=0,Oe;je<25&&(Ae-=Oe=(v(Ae/2)+v(Ae)-xe)/(.5*r(Ae/2)+r(Ae)),!(S(Oe)b&&--Ae>0);return Oe=xe*xe,$e=Oe*Oe,wr=Oe*$e,[Xt/(.84719-.13063*Oe+wr*wr*(-.04515+.05494*Oe-.02326*$e+.00331*wr)),xe]};function gh(){return g.geoProjection(Eh).scale(175.295)}function uc(Xt,ae){return[Xt*(1+r(ae))/2,2*(ae-T(ae/2))]}uc.invert=function(Xt,ae){for(var xe=ae/2,Ae=0,je=1/0;Ae<10&&S(je)>u;++Ae){var Oe=r(ae/2);ae-=je=(ae-T(ae/2)-xe)/(1-.5/(Oe*Oe))}return[2*Xt/(1+r(ae)),ae]};function rf(){return g.geoProjection(uc).scale(152.63)}var Hf=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function eu(){return ts(kt(1/0),Hf).rotate([20,0]).scale(152.63)}function Ef(Xt,ae){var xe=v(ae),Ae=r(ae),je=y(Xt);if(Xt===0||S(ae)===P)return[0,ae];if(ae===0)return[Xt,0];if(S(Xt)===P)return[Xt*Ae,P*xe];var Oe=_/(2*Xt)-2*Xt/_,$e=2*ae/_,wr=(1-$e*$e)/(xe-$e),Or=Oe*Oe,Nr=wr*wr,en=1+Or/Nr,vn=1+Nr/Or,In=(Oe*xe/wr-Oe/2)/en,Nn=(Nr*xe/Or+wr/2)/vn,ii=In*In+Ae*Ae/en,Ui=Nn*Nn-(Nr*xe*xe/Or+wr*xe-1)/vn;return[P*(In+V(ii)*je),P*(Nn+V(Ui<0?0:Ui)*y(-ae*Oe)*je)]}Ef.invert=function(Xt,ae){Xt/=P,ae/=P;var xe=Xt*Xt,Ae=ae*ae,je=xe+Ae,Oe=_*_;return[Xt?(je-1+V((1-je)*(1-je)+4*xe))/(2*Xt)*P:0,qt(function($e){return je*(_*v($e)-2*$e)*_+4*$e*$e*(ae-v($e))+2*_*$e-Oe*ae},0)]};function Cd(){return g.geoProjection(Ef).scale(127.267)}var Yf=1.0148,_f=.23185,Kf=-.14499,Nc=.02406,Xf=Yf,Ou=5*_f,jc=7*Kf,Wh=9*Nc,hu=1.790857183;function Ch(Xt,ae){var xe=ae*ae;return[Xt,ae*(Yf+xe*xe*(_f+xe*(Kf+Nc*xe)))]}Ch.invert=function(Xt,ae){ae>hu?ae=hu:ae<-hu&&(ae=-hu);var xe=ae,Ae;do{var je=xe*xe;xe-=Ae=(xe*(Yf+je*je*(_f+je*(Kf+Nc*je)))-ae)/(Xf+je*je*(Ou+je*(jc+Wh*je)))}while(S(Ae)>u);return[Xt,xe]};function Mc(){return g.geoProjection(Ch).scale(139.319)}function Uc(Xt,ae){if(S(ae)u&&--je>0);return $e=T(Ae),[(S(ae)=0;)if(Ae=ae[wr],xe[0]===Ae[0]&&xe[1]===Ae[1]){if(Oe)return[Oe,xe];Oe=xe}}}function Qc(Xt){for(var ae=Xt.length,xe=[],Ae=Xt[ae-1],je=0;je0?[-Ae[0],0]:[180-Ae[0],180])};var ae=yh.map(function(xe){return{face:xe,project:Xt(xe)}});return[-1,0,0,1,0,1,4,5].forEach(function(xe,Ae){var je=ae[xe];je&&(je.children||(je.children=[])).push(ae[Ae])}),cf(ae[0],function(xe,Ae){return ae[xe<-_/2?Ae<0?6:4:xe<0?Ae<0?2:0:xe<_/2?Ae<0?3:1:Ae<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function yu(Xt){Xt=Xt||function($e){var wr=$e.length===6?g.geoCentroid({type:"MultiPoint",coordinates:$e}):$e[0];return g.geoGnomonic().scale(1).translate([0,0]).rotate([-wr[0],-wr[1]])};var ae=yh.map(function($e){for(var wr=$e.map(nf),Or=wr.length,Nr=wr[Or-1],en,vn=[],In=0;InAe^Nn>Ae&&xe<(In-Nr)*(Ae-en)/(Nn-en)+Nr&&(je=!je)}return je}function gc(Xt,ae){var xe=ae.stream,Ae;if(!xe)throw new Error("invalid projection");switch(Xt&&Xt.type){case"Feature":Ae=eh;break;case"FeatureCollection":Ae=Jf;break;default:Ae=xh;break}return Ae(Xt,xe)}function Jf(Xt,ae){return{type:"FeatureCollection",features:Xt.features.map(function(xe){return eh(xe,ae)})}}function eh(Xt,ae){return{type:"Feature",id:Xt.id,properties:Xt.properties,geometry:xh(Xt.geometry,ae)}}function Ph(Xt,ae){return{type:"GeometryCollection",geometries:Xt.geometries.map(function(xe){return xh(xe,ae)})}}function xh(Xt,ae){if(!Xt)return null;if(Xt.type==="GeometryCollection")return Ph(Xt,ae);var xe;switch(Xt.type){case"Point":xe=_h;break;case"MultiPoint":xe=_h;break;case"LineString":xe=df;break;case"MultiLineString":xe=df;break;case"Polygon":xe=bh;break;case"MultiPolygon":xe=bh;break;case"Sphere":xe=bh;break;default:return null}return g.geoStream(Xt,ae(xe)),xe.result()}var Bu=[],iu=[],_h={point:function(Xt,ae){Bu.push([Xt,ae])},result:function(){var Xt=Bu.length?Bu.length<2?{type:"Point",coordinates:Bu[0]}:{type:"MultiPoint",coordinates:Bu}:null;return Bu=[],Xt}},df={lineStart:Zh,point:function(Xt,ae){Bu.push([Xt,ae])},lineEnd:function(){Bu.length&&(iu.push(Bu),Bu=[])},result:function(){var Xt=iu.length?iu.length<2?{type:"LineString",coordinates:iu[0]}:{type:"MultiLineString",coordinates:iu}:null;return iu=[],Xt}},bh={polygonStart:Zh,lineStart:Zh,point:function(Xt,ae){Bu.push([Xt,ae])},lineEnd:function(){var Xt=Bu.length;if(Xt){do Bu.push(Bu[0].slice());while(++Xt<4);iu.push(Bu),Bu=[]}},polygonEnd:Zh,result:function(){if(!iu.length)return null;var Xt=[],ae=[];return iu.forEach(function(xe){wf(xe)?Xt.push([xe]):ae.push(xe)}),ae.forEach(function(xe){var Ae=xe[0];Xt.some(function(je){if(Pd(je[0],Ae))return je.push(xe),!0})||Xt.push([xe])}),iu=[],Xt.length?Xt.length>1?{type:"MultiPolygon",coordinates:Xt}:{type:"Polygon",coordinates:Xt[0]}:null}};function Wf(Xt){var ae=Xt(P,0)[0]-Xt(-P,0)[0];function xe(Ae,je){var Oe=S(Ae)0?Ae-_:Ae+_,je),wr=($e[0]-$e[1])*C,Or=($e[0]+$e[1])*C;if(Oe)return[wr,Or];var Nr=ae*C,en=wr>0^Or>0?-1:1;return[en*wr-y(Or)*Nr,en*Or-y(wr)*Nr]}return Xt.invert&&(xe.invert=function(Ae,je){var Oe=(Ae+je)*C,$e=(je-Ae)*C,wr=S(Oe)<.5*ae&&S($e)<.5*ae;if(!wr){var Or=ae*C,Nr=Oe>0^$e>0?-1:1,en=-Nr*Ae+($e>0?1:-1)*Or,vn=-Nr*je+(Oe>0?1:-1)*Or;Oe=(-en-vn)*C,$e=(en-vn)*C}var In=Xt.invert(Oe,$e);return wr||(In[0]+=Oe>0?_:-_),In}),g.geoProjection(xe).rotate([-90,-90,45]).clipAngle(180-.001)}function gr(){return Wf(En).scale(176.423)}function Ur(){return Wf(Fo).scale(111.48)}function wn(Xt,ae){if(!(0<=(ae=+ae)&&ae<=20))throw new Error("invalid digits");function xe(Nr){var en=Nr.length,vn=2,In=new Array(en);for(In[0]=+Nr[0].toFixed(ae),In[1]=+Nr[1].toFixed(ae);vn2||Nn[0]!=en[0]||Nn[1]!=en[1])&&(vn.push(Nn),en=Nn)}return vn.length===1&&Nr.length>1&&vn.push(xe(Nr[Nr.length-1])),vn}function Oe(Nr){return Nr.map(je)}function $e(Nr){if(Nr==null)return Nr;var en;switch(Nr.type){case"GeometryCollection":en={type:"GeometryCollection",geometries:Nr.geometries.map($e)};break;case"Point":en={type:"Point",coordinates:xe(Nr.coordinates)};break;case"MultiPoint":en={type:Nr.type,coordinates:Ae(Nr.coordinates)};break;case"LineString":en={type:Nr.type,coordinates:je(Nr.coordinates)};break;case"MultiLineString":case"Polygon":en={type:Nr.type,coordinates:Oe(Nr.coordinates)};break;case"MultiPolygon":en={type:"MultiPolygon",coordinates:Nr.coordinates.map(Oe)};break;default:return Nr}return Nr.bbox!=null&&(en.bbox=Nr.bbox),en}function wr(Nr){var en={type:"Feature",properties:Nr.properties,geometry:$e(Nr.geometry)};return Nr.id!=null&&(en.id=Nr.id),Nr.bbox!=null&&(en.bbox=Nr.bbox),en}if(Xt!=null)switch(Xt.type){case"Feature":return wr(Xt);case"FeatureCollection":{var Or={type:"FeatureCollection",features:Xt.features.map(wr)};return Xt.bbox!=null&&(Or.bbox=Xt.bbox),Or}default:return $e(Xt)}return Xt}function hn(Xt){var ae=v(Xt);function xe(Ae,je){var Oe=ae?T(Ae*ae/2)/ae:Ae/2;if(!je)return[2*Oe,-Xt];var $e=2*t(Oe*v(je)),wr=1/T(je);return[v($e)*wr,je+(1-r($e))*wr-Xt]}return xe.invert=function(Ae,je){if(S(je+=Xt)u&&--wr>0);var In=Ae*(Nr=T($e)),Nn=T(S(je)0?P:-P)*(Or+je*(en-$e)/2+je*je*(en-2*Or+$e)/2)]}aa.invert=function(Xt,ae){var xe=ae/P,Ae=xe*90,je=l(18,S(Ae/5)),Oe=i(0,n(je));do{var $e=di[Oe][1],wr=di[Oe+1][1],Or=di[l(19,Oe+2)][1],Nr=Or-$e,en=Or-2*wr+$e,vn=2*(S(xe)-wr)/Nr,In=en/Nr,Nn=vn*(1-In*vn*(1-2*In*vn));if(Nn>=0||Oe===1){Ae=(ae>=0?5:-5)*(Nn+je);var ii=50,Ui;do je=l(18,S(Ae)/5),Oe=n(je),Nn=je-Oe,$e=di[Oe][1],wr=di[Oe+1][1],Or=di[l(19,Oe+2)][1],Ae-=(Ui=(ae>=0?P:-P)*(wr+Nn*(Or-$e)/2+Nn*Nn*(Or-2*wr+$e)/2)-ae)*k;while(S(Ui)>b&&--ii>0);break}}while(--Oe>=0);var pa=di[Oe][0],fa=di[Oe+1][0],Ta=di[l(19,Oe+2)][0];return[Xt/(fa+Nn*(Ta-pa)/2+Nn*Nn*(Ta-2*fa+pa)/2),Ae*w]};function va(){return g.geoProjection(aa).scale(152.63)}function Ba(Xt){function ae(xe,Ae){var je=r(Ae),Oe=(Xt-1)/(Xt-je*r(xe));return[Oe*je*v(xe),Oe*v(Ae)]}return ae.invert=function(xe,Ae){var je=xe*xe+Ae*Ae,Oe=V(je),$e=(Xt-V(1-je*(Xt+1)/(Xt-1)))/((Xt-1)/Oe+Oe/(Xt-1));return[e(xe*$e,Oe*V(1-$e*$e)),Oe?O(Ae*$e/Oe):0]},ae}function Za(Xt,ae){var xe=Ba(Xt);if(!ae)return xe;var Ae=r(ae),je=v(ae);function Oe($e,wr){var Or=xe($e,wr),Nr=Or[1],en=Nr*je/(Xt-1)+Ae;return[Or[0]*Ae/en,Nr/en]}return Oe.invert=function($e,wr){var Or=(Xt-1)/(Xt-1-wr*je);return xe.invert(Or*$e,Or*wr*Ae)},Oe}function ca(){var Xt=2,ae=0,xe=g.geoProjectionMutator(Za),Ae=xe(Xt,ae);return Ae.distance=function(je){return arguments.length?xe(Xt=+je,ae):Xt},Ae.tilt=function(je){return arguments.length?xe(Xt,ae=je*w):ae*k},Ae.scale(432.147).clipAngle(j(1/Xt)*k-1e-6)}var Oa=1e-4,ka=1e4,na=-180,io=na+Oa,ns=180,Ko=ns-Oa,ls=-90,ps=ls+Oa,oo=90,qa=oo-Oa;function gs(Xt){return Xt.length>0}function el(Xt){return Math.floor(Xt*ka)/ka}function Pl(Xt){return Xt===ls||Xt===oo?[0,Xt]:[na,el(Xt)]}function su(Xt){var ae=Xt[0],xe=Xt[1],Ae=!1;return ae<=io?(ae=na,Ae=!0):ae>=Ko&&(ae=ns,Ae=!0),xe<=ps?(xe=ls,Ae=!0):xe>=qa&&(xe=oo,Ae=!0),Ae?[ae,xe]:Xt}function $l(Xt){return Xt.map(su)}function lu(Xt,ae,xe){for(var Ae=0,je=Xt.length;Ae=Ko||en<=ps||en>=qa){Oe[$e]=su(Or);for(var vn=$e+1;vnio&&Nnps&&ii=wr)break;xe.push({index:-1,polygon:ae,ring:Oe=Oe.slice(vn-1)}),Oe[0]=Pl(Oe[0][1]),$e=-1,wr=Oe.length}}}}function ml(Xt){var ae,xe=Xt.length,Ae={},je={},Oe,$e,wr,Or,Nr;for(ae=0;ae0?_-wr:wr)*k],Nr=g.geoProjection(Xt($e)).rotate(Or),en=g.geoRotation(Or),vn=Nr.center;return delete Nr.rotate,Nr.center=function(In){return arguments.length?vn(en(In)):en.invert(vn())},Nr.clipAngle(90)}function Rl(Xt){var ae=r(Xt);function xe(Ae,je){var Oe=g.geoGnomonicRaw(Ae,je);return Oe[0]*=ae,Oe}return xe.invert=function(Ae,je){return g.geoGnomonicRaw.invert(Ae/ae,je)},xe}function vc(){return Hc([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Hc(Xt,ae){return Kl(Rl,Xt,ae)}function Lc(Xt){if(!(Xt*=2))return g.geoAzimuthalEquidistantRaw;var ae=-Xt/2,xe=-ae,Ae=Xt*Xt,je=T(xe),Oe=.5/v(xe);function $e(wr,Or){var Nr=j(r(Or)*r(wr-ae)),en=j(r(Or)*r(wr-xe)),vn=Or<0?-1:1;return Nr*=Nr,en*=en,[(Nr-en)/(2*Xt),vn*V(4*Ae*en-(Ae-Nr+en)*(Ae-Nr+en))/(2*Xt)]}return $e.invert=function(wr,Or){var Nr=Or*Or,en=r(V(Nr+(In=wr+ae)*In)),vn=r(V(Nr+(In=wr+xe)*In)),In,Nn;return[e(Nn=en-vn,In=(en+vn)*je),(Or<0?-1:1)*j(V(In*In+Nn*Nn)*Oe)]},$e}function Ih(){return Wc([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Wc(Xt,ae){return Kl(Lc,Xt,ae)}function zh(Xt,ae){if(S(ae)u&&--wr>0);return[y(Xt)*(V(je*je+4)+je)*_/4,P*$e]};function qf(){return g.geoProjection($u).scale(127.16)}function $t(Xt,ae,xe,Ae,je){function Oe($e,wr){var Or=xe*v(Ae*wr),Nr=V(1-Or*Or),en=V(2/(1+Nr*r($e*=je)));return[Xt*Nr*en*v($e),ae*Or*en]}return Oe.invert=function($e,wr){var Or=$e/Xt,Nr=wr/ae,en=V(Or*Or+Nr*Nr),vn=2*O(en/2);return[e($e*T(vn),Xt*en)/je,en&&O(wr*v(vn)/(ae*xe*en))/Ae]},Oe}function z(Xt,ae,xe,Ae){var je=_/3;Xt=i(Xt,u),ae=i(ae,u),Xt=l(Xt,P),ae=l(ae,_-u),xe=i(xe,0),xe=l(xe,100-u),Ae=i(Ae,u);var Oe=xe/100+1,$e=Ae/100,wr=j(Oe*r(je))/je,Or=v(Xt)/v(wr*P),Nr=ae/_,en=V($e*v(Xt/2)/v(ae/2)),vn=en/V(Nr*Or*wr),In=1/(en*V(Nr*Or*wr));return $t(vn,In,Or,wr,Nr)}function ht(){var Xt=65*w,ae=60*w,xe=20,Ae=200,je=g.geoProjectionMutator(z),Oe=je(Xt,ae,xe,Ae);return Oe.poleline=function($e){return arguments.length?je(Xt=+$e*w,ae,xe,Ae):Xt*k},Oe.parallels=function($e){return arguments.length?je(Xt,ae=+$e*w,xe,Ae):ae*k},Oe.inflation=function($e){return arguments.length?je(Xt,ae,xe=+$e,Ae):xe},Oe.ratio=function($e){return arguments.length?je(Xt,ae,xe,Ae=+$e):Ae},Oe.scale(163.775)}function Et(){return ht().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var zt=4*_+3*V(3),Ht=2*V(2*_*V(3)/zt),ke=pe(Ht*V(3)/_,Ht,zt/6);function Fe(){return g.geoProjection(ke).scale(176.84)}function Ke(Xt,ae){return[Xt*V(1-3*ae*ae/(_*_)),ae]}Ke.invert=function(Xt,ae){return[Xt/V(1-3*ae*ae/(_*_)),ae]};function vr(){return g.geoProjection(Ke).scale(152.63)}function Dr(Xt,ae){var xe=r(ae),Ae=r(Xt)*xe,je=1-Ae,Oe=r(Xt=e(v(Xt)*xe,-v(ae))),$e=v(Xt);return xe=V(1-Ae*Ae),[$e*xe-Oe*je,-Oe*xe-$e*je]}Dr.invert=function(Xt,ae){var xe=(Xt*Xt+ae*ae)/-2,Ae=V(-xe*(2+xe)),je=ae*xe+Xt*Ae,Oe=Xt*xe-ae*Ae,$e=V(Oe*Oe+je*je);return[e(Ae*je,$e*(1+xe)),$e?-O(Ae*Oe/$e):0]};function Fr(){return g.geoProjection(Dr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function un(Xt,ae){var xe=yt(Xt,ae);return[(xe[0]+Xt/P)/2,(xe[1]+ae)/2]}un.invert=function(Xt,ae){var xe=Xt,Ae=ae,je=25;do{var Oe=r(Ae),$e=v(Ae),wr=v(2*Ae),Or=$e*$e,Nr=Oe*Oe,en=v(xe),vn=r(xe/2),In=v(xe/2),Nn=In*In,ii=1-Nr*vn*vn,Ui=ii?j(Oe*vn)*V(pa=1/ii):pa=0,pa,fa=.5*(2*Ui*Oe*In+xe/P)-Xt,Ta=.5*(Ui*$e+Ae)-ae,so=.5*pa*(Nr*Nn+Ui*Oe*vn*Or)+.5/P,Bo=pa*(en*wr/4-Ui*$e*In),So=.125*pa*(wr*In-Ui*$e*Nr*en),ds=.5*pa*(Or*vn+Ui*Nn*Oe)+.5,fl=Bo*So-ds*so,vl=(Ta*Bo-fa*ds)/fl,Ds=(fa*So-Ta*so)/fl;xe-=vl,Ae-=Ds}while((S(vl)>u||S(Ds)>u)&&--je>0);return[xe,Ae]};function Sn(){return g.geoProjection(un).scale(158.837)}c.geoNaturalEarth=g.geoNaturalEarth1,c.geoNaturalEarthRaw=g.geoNaturalEarth1Raw,c.geoAiry=lt,c.geoAiryRaw=J,c.geoAitoff=mt,c.geoAitoffRaw=yt,c.geoArmadillo=tt,c.geoArmadilloRaw=st,c.geoAugust=rt,c.geoAugustRaw=dt,c.geoBaker=Y,c.geoBakerRaw=it,c.geoBerghaus=ut,c.geoBerghausRaw=ft,c.geoBertin1953=ge,c.geoBertin1953Raw=Jt,c.geoBoggs=ve,c.geoBoggsRaw=ee,c.geoBonne=cr,c.geoBonneRaw=Ge,c.geoBottomley=jr,c.geoBottomleyRaw=ur,c.geoBromley=br,c.geoBromleyRaw=Wr,c.geoChamberlin=gt,c.geoChamberlinRaw=Gt,c.geoChamberlinAfrica=Ct,c.geoCollignon=Nt,c.geoCollignonRaw=St,c.geoCraig=le,c.geoCraigRaw=re,c.geoCraster=qe,c.geoCrasterRaw=Ue,c.geoCylindricalEqualArea=Sr,c.geoCylindricalEqualAreaRaw=or,c.geoCylindricalStereographic=mr,c.geoCylindricalStereographicRaw=Ar,c.geoEckert1=Hn,c.geoEckert1Raw=Qr,c.geoEckert2=Xn,c.geoEckert2Raw=Wn,c.geoEckert3=oi,c.geoEckert3Raw=Ii,c.geoEckert4=sa,c.geoEckert4Raw=$n,c.geoEckert5=We,c.geoEckert5Raw=Zi,c.geoEckert6=fr,c.geoEckert6Raw=nr,c.geoEisenlohr=Cn,c.geoEisenlohrRaw=tn,c.geoFahey=fi,c.geoFaheyRaw=Mn,c.geoFoucaut=Oi,c.geoFoucautRaw=ki,c.geoFoucautSinusoidal=Xi,c.geoFoucautSinusoidalRaw=ji,c.geoGilbert=Wa,c.geoGingery=$r,c.geoGingeryRaw=ze,c.geoGinzburg4=Yr,c.geoGinzburg4Raw=Br,c.geoGinzburg5=on,c.geoGinzburg5Raw=pn,c.geoGinzburg6=dr,c.geoGinzburg6Raw=Ce,c.geoGinzburg8=_n,c.geoGinzburg8Raw=Hr,c.geoGinzburg9=Qn,c.geoGinzburg9Raw=Fn,c.geoGringorten=Vi,c.geoGringortenRaw=En,c.geoGuyou=os,c.geoGuyouRaw=Fo,c.geoHammer=Pt,c.geoHammerRaw=kt,c.geoHammerRetroazimuthal=Ks,c.geoHammerRetroazimuthalRaw=ul,c.geoHealpix=kl,c.geoHealpixRaw=Nl,c.geoHill=Jl,c.geoHillRaw=ql,c.geoHomolosine=Xo,c.geoHomolosineRaw=Ql,c.geoHufnagel=al,c.geoHufnagelRaw=Gl,c.geoHyperelliptical=Ms,c.geoHyperellipticalRaw=lo,c.geoInterrupt=ts,c.geoInterruptedBoggs=Gu,c.geoInterruptedHomolosine=Dl,c.geoInterruptedMollweide=nu,c.geoInterruptedMollweideHemispheres=mh,c.geoInterruptedSinuMollweide=ah,c.geoInterruptedSinusoidal=Sf,c.geoKavrayskiy7=Bc,c.geoKavrayskiy7Raw=Fl,c.geoLagrange=hc,c.geoLagrangeRaw=Nf,c.geoLarrivee=oh,c.geoLarriveeRaw=fc,c.geoLaskowski=sc,c.geoLaskowskiRaw=cu,c.geoLittrow=Yl,c.geoLittrowRaw=rl,c.geoLoximuthal=Cc,c.geoLoximuthalRaw=Sh,c.geoMiller=_u,c.geoMillerRaw=Uh,c.geoModifiedStereographic=lc,c.geoModifiedStereographicRaw=Ed,c.geoModifiedStereographicAlaska=sh,c.geoModifiedStereographicGs48=rc,c.geoModifiedStereographicGs50=jf,c.geoModifiedStereographicMiller=Vh,c.geoModifiedStereographicLee=yf,c.geoMollweide=Tt,c.geoMollweideRaw=se,c.geoMtFlatPolarParabolic=Hh,c.geoMtFlatPolarParabolicRaw=xf,c.geoMtFlatPolarQuartic=Vf,c.geoMtFlatPolarQuarticRaw=Uf,c.geoMtFlatPolarSinusoidal=Gf,c.geoMtFlatPolarSinusoidalRaw=lh,c.geoNaturalEarth2=gh,c.geoNaturalEarth2Raw=Eh,c.geoNellHammer=rf,c.geoNellHammerRaw=uc,c.geoInterruptedQuarticAuthalic=eu,c.geoNicolosi=Cd,c.geoNicolosiRaw=Ef,c.geoPatterson=Mc,c.geoPattersonRaw=Ch,c.geoPolyconic=bu,c.geoPolyconicRaw=Uc,c.geoPolyhedral=cf,c.geoPolyhedralButterfly=wu,c.geoPolyhedralCollignon=fd,c.geoPolyhedralWaterman=yu,c.geoProject=gc,c.geoGringortenQuincuncial=gr,c.geoPeirceQuincuncial=Ur,c.geoPierceQuincuncial=Ur,c.geoQuantize=wn,c.geoQuincuncial=Wf,c.geoRectangularPolyconic=qn,c.geoRectangularPolyconicRaw=hn,c.geoRobinson=va,c.geoRobinsonRaw=aa,c.geoSatellite=ca,c.geoSatelliteRaw=Za,c.geoSinuMollweide=qs,c.geoSinuMollweideRaw=fo,c.geoSinusoidal=He,c.geoSinusoidalRaw=Te,c.geoStitch=fu,c.geoTimes=Es,c.geoTimesRaw=Oo,c.geoTwoPointAzimuthal=Hc,c.geoTwoPointAzimuthalRaw=Rl,c.geoTwoPointAzimuthalUsa=vc,c.geoTwoPointEquidistant=Wc,c.geoTwoPointEquidistantRaw=Lc,c.geoTwoPointEquidistantUsa=Ih,c.geoVanDerGrinten=Du,c.geoVanDerGrintenRaw=zh,c.geoVanDerGrinten2=rs,c.geoVanDerGrinten2Raw=Oh,c.geoVanDerGrinten3=qc,c.geoVanDerGrinten3Raw=zs,c.geoVanDerGrinten4=qf,c.geoVanDerGrinten4Raw=$u,c.geoWagner=ht,c.geoWagner7=Et,c.geoWagnerRaw=z,c.geoWagner4=Fe,c.geoWagner4Raw=ke,c.geoWagner6=vr,c.geoWagner6Raw=Ke,c.geoWiechel=Fr,c.geoWiechelRaw=Dr,c.geoWinkel3=Sn,c.geoWinkel3Raw=un,Object.defineProperty(c,"__esModule",{value:!0})})}),XU=Dt((Q,Z)=>{var c=qr(),g=kn(),I=Jo(),S=Math.PI/180,t=180/Math.PI,e={cursor:"pointer"},r={cursor:"auto"};function a(k,w){var R=k.projection,O;return w._isScoped?O=i:w._isClipped?O=f:O=l,O(k,R)}Z.exports=a;function n(k,w){return c.behavior.zoom().translate(w.translate()).scale(w.scale())}function o(k,w,R){var O=k.id,j=k.graphDiv,V=j.layout,H=V[O],F=j._fullLayout,U=F[O],W={},q={};function J(lt,yt){W[O+"."+lt]=g.nestedProperty(H,lt).get(),I.call("_storeDirectGUIEdit",V,F._preGUI,W);var mt=g.nestedProperty(U,lt);mt.get()!==yt&&(mt.set(yt),g.nestedProperty(H,lt).set(yt),q[O+"."+lt]=yt)}R(J),J("projection.scale",w.scale()/k.fitScale),J("fitbounds",!1),j.emit("plotly_relayout",q)}function i(k,w){var R=n(k,w);function O(){c.select(this).style(e)}function j(){w.scale(c.event.scale).translate(c.event.translate),k.render(!0);var F=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function V(F){var U=w.invert(k.midPt);F("center.lon",U[0]),F("center.lat",U[1])}function H(){c.select(this).style(r),o(k,w,V)}return R.on("zoomstart",O).on("zoom",j).on("zoomend",H),R}function l(k,w){var R=n(k,w),O=2,j,V,H,F,U,W,q,J,lt;function yt(at){return w.invert(at)}function mt(at){var vt=yt(at);if(!vt)return!0;var it=w(vt);return Math.abs(it[0]-at[0])>O||Math.abs(it[1]-at[1])>O}function st(){c.select(this).style(e),j=c.mouse(this),V=w.rotate(),H=w.translate(),F=V,U=yt(j)}function tt(){if(W=c.mouse(this),mt(j)){R.scale(w.scale()),R.translate(w.translate());return}w.scale(c.event.scale),w.translate([H[0],c.event.translate[1]]),U?yt(W)&&(J=yt(W),q=[F[0]+(J[0]-U[0]),V[1],V[2]],w.rotate(q),F=q):(j=W,U=yt(j)),lt=!0,k.render(!0);var at=w.rotate(),vt=w.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.center.lon":vt[0],"geo.center.lat":vt[1],"geo.projection.rotation.lon":-at[0]})}function dt(){c.select(this).style(r),lt&&o(k,w,rt)}function rt(at){var vt=w.rotate(),it=w.invert(k.midPt);at("projection.rotation.lon",-vt[0]),at("center.lon",it[0]),at("center.lat",it[1])}return R.on("zoomstart",st).on("zoom",tt).on("zoomend",dt),R}function f(k,w){w.rotate(),w.scale();var R=n(k,w),O=p(R,"zoomstart","zoom","zoomend"),j=0,V=R.on,H;R.on("zoomstart",function(){c.select(this).style(e);var J=c.mouse(this),lt=w.rotate(),yt=lt,mt=w.translate(),st=y(lt);H=x(w,J),V.call(R,"zoom",function(){var tt=c.mouse(this);if(w.scale(c.event.scale),!H)J=tt,H=x(w,J);else if(x(w,tt)){w.rotate(lt).translate(mt);var dt=x(w,tt),rt=T(H,dt),at=M(v(st,rt)),vt=u(at,H,yt);(!isFinite(vt[0])||!isFinite(vt[1])||!isFinite(vt[2]))&&(vt=yt),w.rotate(vt),yt=vt}U(O.of(this,arguments))}),F(O.of(this,arguments))}).on("zoomend",function(){c.select(this).style(r),V.call(R,"zoom",null),W(O.of(this,arguments)),o(k,w,q)}).on("zoom.redraw",function(){k.render(!0);var J=w.rotate();k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":w.scale()/k.fitScale,"geo.projection.rotation.lon":-J[0],"geo.projection.rotation.lat":-J[1]})});function F(J){j++||J({type:"zoomstart"})}function U(J){J({type:"zoom"})}function W(J){--j||J({type:"zoomend"})}function q(J){var lt=w.rotate();J("projection.rotation.lon",-lt[0]),J("projection.rotation.lat",-lt[1])}return c.rebind(R,O,"on")}function x(k,w){var R=k.invert(w);return R&&isFinite(R[0])&&isFinite(R[1])&&C(R)}function y(k){var w=.5*k[0]*S,R=.5*k[1]*S,O=.5*k[2]*S,j=Math.sin(w),V=Math.cos(w),H=Math.sin(R),F=Math.cos(R),U=Math.sin(O),W=Math.cos(O);return[V*F*W+j*H*U,j*F*W-V*H*U,V*H*W+j*F*U,V*F*U-j*H*W]}function v(k,w){var R=k[0],O=k[1],j=k[2],V=k[3],H=w[0],F=w[1],U=w[2],W=w[3];return[R*H-O*F-j*U-V*W,R*F+O*H+j*W-V*U,R*U-O*W+j*H+V*F,R*W+O*U-j*F+V*H]}function T(k,w){if(!(!k||!w)){var R=h(k,w),O=Math.sqrt(A(R,R)),j=.5*Math.acos(Math.max(-1,Math.min(1,A(k,w)))),V=Math.sin(j)/O;return O&&[Math.cos(j),R[2]*V,-R[1]*V,R[0]*V]}}function u(k,w,R){var O=P(w,2,k[0]);O=P(O,1,k[1]),O=P(O,0,k[2]-R[2]);var j=w[0],V=w[1],H=w[2],F=O[0],U=O[1],W=O[2],q=Math.atan2(V,j)*t,J=Math.sqrt(j*j+V*V),lt,yt;Math.abs(U)>J?(yt=(U>0?90:-90)-q,lt=0):(yt=Math.asin(U/J)*t-q,lt=Math.sqrt(J*J-U*U));var mt=180-yt-2*q,st=(Math.atan2(W,F)-Math.atan2(H,lt))*t,tt=(Math.atan2(W,F)-Math.atan2(H,-lt))*t,dt=b(R[0],R[1],yt,st),rt=b(R[0],R[1],mt,tt);return dt<=rt?[yt,st,R[2]]:[mt,tt,R[2]]}function b(k,w,R,O){var j=_(R-k),V=_(O-w);return Math.sqrt(j*j+V*V)}function _(k){return(k%360+540)%360-180}function P(k,w,R){var O=R*S,j=k.slice(),V=w===0?1:0,H=w===2?1:2,F=Math.cos(O),U=Math.sin(O);return j[V]=k[V]*F-k[H]*U,j[H]=k[H]*F+k[V]*U,j}function M(k){return[Math.atan2(2*(k[0]*k[1]+k[2]*k[3]),1-2*(k[1]*k[1]+k[2]*k[2]))*t,Math.asin(Math.max(-1,Math.min(1,2*(k[0]*k[2]-k[3]*k[1]))))*t,Math.atan2(2*(k[0]*k[3]+k[1]*k[2]),1-2*(k[2]*k[2]+k[3]*k[3]))*t]}function C(k){var w=k[0]*S,R=k[1]*S,O=Math.cos(R);return[O*Math.cos(w),O*Math.sin(w),Math.sin(R)]}function A(k,w){for(var R=0,O=0,j=k.length;O{var c=qr(),g=PS(),I=g.geoPath,S=g.geoDistance,t=KU(),e=Jo(),r=kn(),a=r.strTranslate,n=hi(),o=Vs(),i=tf(),l=Kc(),f=Ls(),x=Y0().getAutoRange,y=up(),v=vf().prepSelect,T=vf().clearOutline,u=vf().selectOnClick,b=XU(),_=w3(),P=W1(),M=eT(),C=ES().feature;function A(R){this.id=R.id,this.graphDiv=R.graphDiv,this.container=R.container,this.topojsonURL=R.topojsonURL,this.isStatic=R.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var h=A.prototype;Z.exports=function(R){return new A(R)},h.plot=function(R,O,j,V){var H=this;if(V)return H.update(R,O,!0);H._geoCalcData=R,H._fullLayout=O;var F=O[this.id],U=[],W=!1;for(var q in _.layerNameToAdjective)if(q!=="frame"&&F["show"+q]){W=!0;break}for(var J=!1,lt=0;lt0&&U._module.calcGeoJSON(F,O)}if(!j){var W=this.updateProjection(R,O);if(W)return;(!this.viewInitial||this.scope!==V.scope)&&this.saveViewInitial(V)}this.scope=V.scope,this.updateBaseLayers(O,V),this.updateDims(O,V),this.updateFx(O,V),l.generalUpdatePerTraceModule(this.graphDiv,this,R,V);var q=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=q.selectAll(".point"),this.dataPoints.text=q.selectAll("text"),this.dataPaths.line=q.selectAll(".js-line");var J=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=J.selectAll("path"),this._render()},h.updateProjection=function(R,O){var j=this.graphDiv,V=O[this.id],H=O._size,F=V.domain,U=V.projection,W=V.lonaxis,q=V.lataxis,J=W._ax,lt=q._ax,yt=this.projection=p(V),mt=[[H.l+H.w*F.x[0],H.t+H.h*(1-F.y[1])],[H.l+H.w*F.x[1],H.t+H.h*(1-F.y[0])]],st=V.center||{},tt=U.rotation||{},dt=W.range||[],rt=q.range||[];if(V.fitbounds){J._length=mt[1][0]-mt[0][0],lt._length=mt[1][1]-mt[0][1],J.range=x(j,J),lt.range=x(j,lt);var at=(J.range[0]+J.range[1])/2,vt=(lt.range[0]+lt.range[1])/2;if(V._isScoped)st={lon:at,lat:vt};else if(V._isClipped){st={lon:at,lat:vt},tt={lon:at,lat:vt,roll:tt.roll};var it=U.type,Y=_.lonaxisSpan[it]/2||180,ft=_.lataxisSpan[it]/2||90;dt=[at-Y,at+Y],rt=[vt-ft,vt+ft]}else st={lon:at,lat:vt},tt={lon:at,lat:tt.lat,roll:tt.roll}}yt.center([st.lon-tt.lon,st.lat-tt.lat]).rotate([-tt.lon,-tt.lat,tt.roll]).parallels(U.parallels);var ut=w(dt,rt);yt.fitExtent(mt,ut);var kt=this.bounds=yt.getBounds(ut),It=this.fitScale=yt.scale(),Pt=yt.translate();if(V.fitbounds){var qt=yt.getBounds(w(J.range,lt.range)),Wt=Math.min((kt[1][0]-kt[0][0])/(qt[1][0]-qt[0][0]),(kt[1][1]-kt[0][1])/(qt[1][1]-qt[0][1]));isFinite(Wt)?yt.scale(Wt*It):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else yt.scale(U.scale*It);var Jt=this.midPt=[(kt[0][0]+kt[1][0])/2,(kt[0][1]+kt[1][1])/2];if(yt.translate([Pt[0]+(Jt[0]-Pt[0]),Pt[1]+(Jt[1]-Pt[1])]).clipExtent(kt),V._isAlbersUsa){var ge=yt([st.lon,st.lat]),fe=yt.translate();yt.translate([fe[0]-(ge[0]-fe[0]),fe[1]-(ge[1]-fe[1])])}},h.updateBaseLayers=function(R,O){var j=this,V=j.topojson,H=j.layers,F=j.basePaths;function U(mt){return mt==="lonaxis"||mt==="lataxis"}function W(mt){return!!_.lineLayers[mt]}function q(mt){return!!_.fillLayers[mt]}var J=this.hasChoropleth?_.layersForChoropleth:_.layers,lt=J.filter(function(mt){return W(mt)||q(mt)?O["show"+mt]:U(mt)?O[mt].showgrid:!0}),yt=j.framework.selectAll(".layer").data(lt,String);yt.exit().each(function(mt){delete H[mt],delete F[mt],c.select(this).remove()}),yt.enter().append("g").attr("class",function(mt){return"layer "+mt}).each(function(mt){var st=H[mt]=c.select(this);mt==="bg"?j.bgRect=st.append("rect").style("pointer-events","all"):U(mt)?F[mt]=st.append("path").style("fill","none"):mt==="backplot"?st.append("g").classed("choroplethlayer",!0):mt==="frontplot"?st.append("g").classed("scatterlayer",!0):W(mt)?F[mt]=st.append("path").style("fill","none").style("stroke-miterlimit",2):q(mt)&&(F[mt]=st.append("path").style("stroke","none"))}),yt.order(),yt.each(function(mt){var st=F[mt],tt=_.layerNameToAdjective[mt];mt==="frame"?st.datum(_.sphereSVG):W(mt)||q(mt)?st.datum(C(V,V.objects[mt])):U(mt)&&st.datum(k(mt,O,R)).call(n.stroke,O[mt].gridcolor).call(o.dashLine,O[mt].griddash,O[mt].gridwidth),W(mt)?st.call(n.stroke,O[tt+"color"]).call(o.dashLine,"",O[tt+"width"]):q(mt)&&st.call(n.fill,O[tt+"color"])})},h.updateDims=function(R,O){var j=this.bounds,V=(O.framewidth||0)/2,H=j[0][0]-V,F=j[0][1]-V,U=j[1][0]-H+V,W=j[1][1]-F+V;o.setRect(this.clipRect,H,F,U,W),this.bgRect.call(o.setRect,H,F,U,W).call(n.fill,O.bgcolor),this.xaxis._offset=H,this.xaxis._length=U,this.yaxis._offset=F,this.yaxis._length=W},h.updateFx=function(R,O){var j=this,V=j.graphDiv,H=j.bgRect,F=R.dragmode,U=R.clickmode;if(j.isStatic)return;function W(){var yt=j.viewInitial,mt={};for(var st in yt)mt[j.id+"."+st]=yt[st];e.call("_guiRelayout",V,mt),V.emit("plotly_doubleclick",null)}function q(yt){return j.projection.invert([yt[0]+j.xaxis._offset,yt[1]+j.yaxis._offset])}var J=function(yt,mt){if(mt.isRect){var st=yt.range={};st[j.id]=[q([mt.xmin,mt.ymin]),q([mt.xmax,mt.ymax])]}else{var tt=yt.lassoPoints={};tt[j.id]=mt.map(q)}},lt={element:j.bgRect.node(),gd:V,plotinfo:{id:j.id,xaxis:j.xaxis,yaxis:j.yaxis,fillRangeItems:J},xaxes:[j.xaxis],yaxes:[j.yaxis],subplot:j.id,clickFn:function(yt){yt===2&&T(V)}};F==="pan"?(H.node().onmousedown=null,H.call(b(j,O)),H.on("dblclick.zoom",W),V._context._scrollZoom.geo||H.on("wheel.zoom",null)):(F==="select"||F==="lasso")&&(H.on(".zoom",null),lt.prepFn=function(yt,mt,st){v(yt,mt,st,lt,F)},y.init(lt)),H.on("mousemove",function(){var yt=j.projection.invert(r.getPositionFromD3Event());if(!yt)return y.unhover(V,c.event);j.xaxis.p2c=function(){return yt[0]},j.yaxis.p2c=function(){return yt[1]},i.hover(V,c.event,j.id)}),H.on("mouseout",function(){V._dragging||y.unhover(V,c.event)}),H.on("click",function(){F!=="select"&&F!=="lasso"&&(U.indexOf("select")>-1&&u(c.event,V,[j.xaxis],[j.yaxis],j.id,lt),U.indexOf("event")>-1&&i.click(V,c.event))})},h.makeFramework=function(){var R=this,O=R.graphDiv,j=O._fullLayout,V="clip"+j._uid+R.id;R.clipDef=j._clips.append("clipPath").attr("id",V),R.clipRect=R.clipDef.append("rect"),R.framework=c.select(R.container).append("g").attr("class","geo "+R.id).call(o.setClipUrl,V,O),R.project=function(H){var F=R.projection(H);return F?[F[0]-R.xaxis._offset,F[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(H){return R.project(H)[0]}},R.yaxis={_id:"y",c2p:function(H){return R.project(H)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(R.mockAxis,j)},h.saveViewInitial=function(R){var O=R.center||{},j=R.projection,V=j.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":j.scale};var H;R._isScoped?H={"center.lon":O.lon,"center.lat":O.lat}:R._isClipped?H={"projection.rotation.lon":V.lon,"projection.rotation.lat":V.lat}:H={"center.lon":O.lon,"center.lat":O.lat,"projection.rotation.lon":V.lon},r.extendFlat(this.viewInitial,H)},h.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},h._render=function(){var R=this.projection,O=R.getPath(),j;function V(F){var U=R(F.lonlat);return U?a(U[0],U[1]):null}function H(F){return R.isLonLatOverEdges(F.lonlat)?"none":null}for(j in this.basePaths)this.basePaths[j].attr("d",O);for(j in this.dataPaths)this.dataPaths[j].attr("d",function(F){return O(F.geojson)});for(j in this.dataPoints)this.dataPoints[j].attr("display",H).attr("transform",V)};function p(R){var O=R.projection,j=O.type,V=_.projNames[j];V="geo"+r.titleCase(V);for(var H=g[V]||t[V],F=H(),U=R._isSatellite?Math.acos(1/O.distance)*180/Math.PI:R._isClipped?_.lonaxisSpan[j]/2:null,W=["center","rotate","parallels","clipExtent"],q=function(yt){return yt?F:[]},J=0;Jtt}else return!1},F.getPath=function(){return I().projection(F)},F.getBounds=function(yt){return F.getPath().bounds(yt)},F.precision(_.precision),R._isSatellite&&F.tilt(O.tilt).distance(O.distance),U&&F.clipAngle(U-_.clipPad),F}function k(R,O,j){var V=1e-6,H=2.5,F=O[R],U=_.scopeDefaults[O.scope],W,q,J;R==="lonaxis"?(W=U.lonaxisRange,q=U.lataxisRange,J=function(vt,it){return[vt,it]}):R==="lataxis"&&(W=U.lataxisRange,q=U.lonaxisRange,J=function(vt,it){return[it,vt]});var lt={type:"linear",range:[W[0],W[1]-V],tick0:F.tick0,dtick:F.dtick};f.setConvert(lt,j);var yt=f.calcTicks(lt);!O.isScoped&&R==="lonaxis"&&yt.pop();for(var mt=yt.length,st=new Array(mt),tt=0;tt0&&H<0&&(H+=360);var W=(H-V)/4;return{type:"Polygon",coordinates:[[[V,F],[V,U],[V+W,U],[V+2*W,U],[V+3*W,U],[H,U],[H,F],[H-W,F],[H-2*W,F],[H-3*W,F],[V,F]]]}}}),IS=Dt((Q,Z)=>{var c=wi(),g=jh().attributes,I=kd().dash,S=w3(),t=Yc().overrideAll,e=G0(),r={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:c.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:I},a=Z.exports=t({domain:g({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:e(S.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:e(S.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:c.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:S.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:S.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:S.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:S.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:c.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:c.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:c.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:c.background},lonaxis:r,lataxis:r},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}),QU=Dt((Q,Z)=>{var c=kn(),g=z1(),I=ud().getSubplotData,S=w3(),t=IS(),e=S.axesNames;Z.exports=function(a,n,o){g(a,n,o,{type:"geo",attributes:t,handleDefaults:r,fullData:o,partition:"y"})};function r(a,n,o,i){var l=I(i.fullData,"geo",i.id),f=l.map(function(rt){return rt.index}),x=o("resolution"),y=o("scope"),v=S.scopeDefaults[y],T=o("projection.type",v.projType),u=n._isAlbersUsa=T==="albers usa";u&&(y=n.scope="usa");var b=n._isScoped=y!=="world",_=n._isSatellite=T==="satellite",P=n._isConic=T.indexOf("conic")!==-1||T==="albers",M=n._isClipped=!!S.lonaxisSpan[T];if(a.visible===!1){var C=c.extendDeep({},n._template);C.showcoastlines=!1,C.showcountries=!1,C.showframe=!1,C.showlakes=!1,C.showland=!1,C.showocean=!1,C.showrivers=!1,C.showsubunits=!1,C.lonaxis&&(C.lonaxis.showgrid=!1),C.lataxis&&(C.lataxis.showgrid=!1),n._template=C}for(var A=o("visible"),h,p=0;p0&&q<0&&(q+=360);var J=(W+q)/2,lt;if(!u){var yt=b?v.projRotate:[J,0,0];lt=o("projection.rotation.lon",yt[0]),o("projection.rotation.lat",yt[1]),o("projection.rotation.roll",yt[2]),h=o("showcoastlines",!b&&A),h&&(o("coastlinecolor"),o("coastlinewidth")),h=o("showocean",A?void 0:!1),h&&o("oceancolor")}var mt,st;if(u?(mt=-96.6,st=38.7):(mt=b?J:lt,st=(U[0]+U[1])/2),o("center.lon",mt),o("center.lat",st),_&&(o("projection.tilt"),o("projection.distance")),P){var tt=v.projParallels||[0,60];o("projection.parallels",tt)}o("projection.scale"),h=o("showland",A?void 0:!1),h&&o("landcolor"),h=o("showlakes",A?void 0:!1),h&&o("lakecolor"),h=o("showrivers",A?void 0:!1),h&&(o("rivercolor"),o("riverwidth")),h=o("showcountries",b&&y!=="usa"&&A),h&&(o("countrycolor"),o("countrywidth")),(y==="usa"||y==="north america"&&x===50)&&(o("showsubunits",A),o("subunitcolor"),o("subunitwidth")),b||(h=o("showframe",A),h&&(o("framecolor"),o("framewidth"))),o("bgcolor");var dt=o("fitbounds");dt&&(delete n.projection.scale,b?(delete n.center.lon,delete n.center.lat):M?(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon,delete n.projection.rotation.lat,delete n.lonaxis.range,delete n.lataxis.range):(delete n.center.lon,delete n.center.lat,delete n.projection.rotation.lon))}}),zS=Dt((Q,Z)=>{var c=ud().getSubplotCalcData,g=kn().counterRegex,I=JU(),S="geo",t=g(S),e={};e[S]={valType:"subplotid",dflt:S,editType:"calc"};function r(o){for(var i=o._fullLayout,l=o.calcdata,f=i._subplots[S],x=0;x{Z.exports={attributes:vx(),supplyDefaults:UU(),colorbar:xo(),formatLabels:VU(),calc:tT(),calcGeoJSON:LS().calcGeoJSON,plot:LS().plot,style:CS(),styleOnSelect:_l().styleOnSelect,hoverPoints:ZU(),eventData:GU(),selectPoints:YU(),moduleType:"trace",name:"scattergeo",basePlotModule:zS(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}),eV=Dt((Q,Z)=>{Z.exports=tV()}),gb=Dt((Q,Z)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=Zu(),I=vx(),S=kc(),t=Ho(),e=wi().defaultLine,r=Ia().extendFlat,a=I.marker.line;Z.exports=r({locations:{valType:"data_array",editType:"calc"},locationmode:I.locationmode,z:{valType:"data_array",editType:"calc"},geojson:r({},I.geojson,{}),featureidkey:I.featureidkey,text:r({},I.text,{}),hovertext:r({},I.hovertext,{}),marker:{line:{color:r({},a.color,{dflt:e}),width:r({},a.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:I.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:I.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:r({},t.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:c(),hovertemplatefallback:g(),showlegend:r({},t.showlegend,{dflt:!1})},S("",{cLetter:"z",editTypeOverride:"calc"}))}),rV=Dt((Q,Z)=>{var c=kn(),g=mc(),I=gb(),S=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(t,e,r,a){function n(v,T){return c.coerce(t,e,I,v,T)}var o=n("locations"),i=n("z");if(!(o&&o.length&&c.isArrayOrTypedArray(i)&&i.length)){e.visible=!1;return}e._length=Math.min(o.length,i.length);var l=n("geojson"),f;(typeof l=="string"&&l!==""||c.isPlainObject(l))&&(f="geojson-id");var x=n("locationmode",f);x==="country names"&&c.warn(S),x==="geojson-id"&&n("featureidkey"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var y=n("marker.line.width");y&&n("marker.line.color"),n("marker.opacity"),g(t,e,a,n,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(e,n)}}),iT=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=Xd(),S=ct(),t=Bt();function e(r){return r&&typeof r=="string"}Z.exports=function(r,a){var n=a._length,o=new Array(n),i;a.geojson?i=function(v){return e(v)||c(v)}:i=e;for(var l=0;l{var c=qr(),g=hi(),I=Vs(),S=Xc();function t(a,n){n&&e(a,n)}function e(a,n){var o=n[0].trace,i=n[0].node3,l=i.selectAll(".choroplethlocation"),f=o.marker||{},x=f.line||{},y=S.makeColorScaleFuncFromTrace(o);l.each(function(v){c.select(this).attr("fill",y(v.z)).call(g.stroke,v.mlc||x.color).call(I.dashLine,"",v.mlw||x.width||0).style("opacity",f.opacity)}),I.selectedPointStyle(l,o)}function r(a,n){var o=n[0].node3,i=n[0].trace;i.selectedpoints?I.selectedPointStyle(o.selectAll(".choroplethlocation"),i):e(a,n)}Z.exports={style:t,styleOnSelect:r}}),OS=Dt((Q,Z)=>{var c=qr(),g=kn(),I=W1(),S=eT().getTopojsonFeatures,t=Y0().findExtremes,e=aT().style;function r(n,o,i){var l=o.layers.backplot.select(".choroplethlayer");g.makeTraceGroups(l,i,"trace choropleth").each(function(f){var x=c.select(this),y=x.selectAll("path.choroplethlocation").data(g.identity);y.enter().append("path").classed("choroplethlocation",!0),y.exit().remove(),e(n,f)})}function a(n,o){for(var i=n[0].trace,l=o[i.geo],f=l._subplot,x=i.locationmode,y=i._length,v=x==="geojson-id"?I.extractTraceFeature(n):S(i,f.topojson),T=[],u=[],b=0;b{var c=Ls(),g=gb(),I=kn().fillText;Z.exports=function(t,e,r){var a=t.cd,n=a[0].trace,o=t.subplot,i,l,f,x,y=[e,r],v=[e+360,r];for(l=0;l")}}}),sT=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){c.location=g.location,c.z=g.z;var e=S[t];return e.fIn&&e.fIn.properties&&(c.properties=e.fIn.properties),c.ct=e.ct,c}}),lT=Dt((Q,Z)=>{Z.exports=function(c,g){var I=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a,n,o,i;if(g===!1)for(r=0;r{Z.exports={attributes:gb(),supplyDefaults:rV(),colorbar:I1(),calc:iT(),calcGeoJSON:OS().calcGeoJSON,plot:OS().plot,style:aT().style,styleOnSelect:aT().styleOnSelect,hoverPoints:oT(),eventData:sT(),selectPoints:lT(),moduleType:"trace",name:"choropleth",basePlotModule:zS(),categories:["geo","noOpacity","showLegend"],meta:{}}}),iV=Dt((Q,Z)=>{Z.exports=nV()}),uT=Dt((Q,Z)=>{var c=Jo(),g=kn(),I=Fu();function S(e,r,a,n){var o=e.cd,i=o[0].t,l=o[0].trace,f=e.xa,x=e.ya,y=i.x,v=i.y,T=f.c2p(r),u=x.c2p(a),b=e.distance,_;if(i.tree){var P=f.p2c(T-b),M=f.p2c(T+b),C=x.p2c(u-b),A=x.p2c(u+b);n==="x"?_=i.tree.range(Math.min(P,M),Math.min(x._rl[0],x._rl[1]),Math.max(P,M),Math.max(x._rl[0],x._rl[1])):_=i.tree.range(Math.min(P,M),Math.min(C,A),Math.max(P,M),Math.max(C,A))}else _=i.ids;var h,p,k,w,R,O,j,V,H,F=b;if(n==="x"){var U=!!l.xperiodalignment,W=!!l.yperiodalignment;for(R=0;R<_.length;R++){if(h=_[R],k=y[h],O=Math.abs(f.c2p(k)-T),U){var q=f.c2p(l._xStarts[h]),J=f.c2p(l._xEnds[h]);O=T>=Math.min(q,J)&&T<=Math.max(q,J)?0:1/0}if(O=Math.min(lt,yt)&&u<=Math.max(lt,yt)?0:1/0}H=Math.sqrt(O*O+j*j),p=_[R]}}}else for(R=_.length-1;R>-1;R--)h=_[R],k=y[h],w=v[h],O=f.c2p(k)-T,j=x.c2p(w)-u,V=Math.sqrt(O*O+j*j),V{var c=20;Z.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:c,SYMBOL_STROKE:c/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}}),T3=Dt((Q,Z)=>{var c=Ho(),g=da(),I=I0(),S=ef(),t=dh().axisHoverFormat,e=kc(),r=G0(),a=Ia().extendFlat,n=Yc().overrideAll,o=q1().DASHES,i=S.line,l=S.marker,f=l.line,x=Z.exports=n({x:S.x,x0:S.x0,dx:S.dx,y:S.y,y0:S.y0,dy:S.dy,xperiod:S.xperiod,yperiod:S.yperiod,xperiod0:S.xperiod0,yperiod0:S.yperiod0,xperiodalignment:S.xperiodalignment,yperiodalignment:S.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),text:S.text,hovertext:S.hovertext,textposition:S.textposition,textfont:g({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:i.color,width:i.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:r(o),dflt:"solid"}},marker:a({},e("marker"),{symbol:l.symbol,angle:l.angle,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,opacity:l.opacity,colorbar:l.colorbar,line:a({},e("marker.line"),{width:f.width})}),connectgaps:S.connectgaps,fill:a({},S.fill,{dflt:"none"}),fillcolor:I(),selected:{marker:S.selected.marker,textfont:S.selected.textfont},unselected:{marker:S.unselected.marker,textfont:S.unselected.textfont},opacity:c.opacity},"calc","nested");x.x.editType=x.y.editType=x.x0.editType=x.y0.editType="calc+clearAxisTypes",x.hovertemplate=S.hovertemplate,x.hovertemplatefallback=S.hovertemplatefallback,x.texttemplate=S.texttemplate,x.texttemplatefallback=S.texttemplatefallback}),cT=Dt(Q=>{var Z=q1();Q.isOpenSymbol=function(c){return typeof c=="string"?Z.OPEN_RE.test(c):c%200>100},Q.isDotSymbol=function(c){return typeof c=="string"?Z.DOT_RE.test(c):c>200}}),aV=Dt((Q,Z)=>{var c=kn(),g=Jo(),I=cT(),S=T3(),t=vm(),e=Tc(),r=Hm(),a=Rp(),n=s0(),o=z0(),i=O0(),l=x0();Z.exports=function(f,x,y,v){function T(h,p){return c.coerce(f,x,S,h,p)}var u=f.marker?I.isOpenSymbol(f.marker.symbol):!1,b=e.isBubble(f),_=r(f,x,v,T);if(!_){x.visible=!1;return}a(f,x,v,T),T("xhoverformat"),T("yhoverformat");var P=_{var c=Ws();Z.exports=function(g,I,S){var t=g.i;return"x"in g||(g.x=I._x[t]),"y"in g||(g.y=I._y[t]),c(g,I,S)}}),sV=Dt((Q,Z)=>{function c(r,a,n,o,i){for(var l=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>=0?(l=f,i=f-1):o=f+1}return l}function g(r,a,n,o,i){for(var l=i+1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y>0?(l=f,i=f-1):o=f+1}return l}function I(r,a,n,o,i){for(var l=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<0?(l=f,o=f+1):i=f-1}return l}function S(r,a,n,o,i){for(var l=o-1;o<=i;){var f=o+i>>>1,x=r[f],y=n!==void 0?n(x,a):x-a;y<=0?(l=f,o=f+1):i=f-1}return l}function t(r,a,n,o,i){for(;o<=i;){var l=o+i>>>1,f=r[l],x=n!==void 0?n(f,a):f-a;if(x===0)return l;x<=0?o=l+1:i=l-1}return-1}function e(r,a,n,o,i,l){return typeof n=="function"?l(r,a,n,o===void 0?0:o|0,i===void 0?r.length-1:i|0):l(r,a,void 0,n===void 0?0:n|0,o===void 0?r.length-1:o|0)}Z.exports={ge:function(r,a,n,o,i){return e(r,a,n,o,i,c)},gt:function(r,a,n,o,i){return e(r,a,n,o,i,g)},lt:function(r,a,n,o,i){return e(r,a,n,o,i,I)},le:function(r,a,n,o,i){return e(r,a,n,o,i,S)},eq:function(r,a,n,o,i){return e(r,a,n,o,i,t)}}}),Ig=Dt((Q,Z)=>{Z.exports=function(I,S,t){var e={},r,a;if(typeof S=="string"&&(S=g(S)),Array.isArray(S)){var n={};for(a=0;a{var c=Ig();Z.exports=g;function g(I){var S;return arguments.length>1&&(I=arguments),typeof I=="string"?I=I.split(/\s/).map(parseFloat):typeof I=="number"&&(I=[I]),I.length&&typeof I[0]=="number"?I.length===1?S={width:I[0],height:I[0],x:0,y:0}:I.length===2?S={width:I[0],height:I[1],x:0,y:0}:S={x:I[0],y:I[1],width:I[2]-I[0]||0,height:I[3]-I[1]||0}:I&&(I=c(I,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),S={x:I.left||0,y:I.top||0},I.width==null?I.right?S.width=I.right-S.x:S.width=0:S.width=I.width,I.height==null?I.bottom?S.height=I.bottom-S.y:S.height=0:S.height=I.height),S}}),yx=Dt((Q,Z)=>{Z.exports=c;function c(g,I){if(!g||g.length==null)throw Error("Argument should be an array");I==null?I=1:I=Math.floor(I);for(var S=Array(I*2),t=0;te&&(e=g[a]),g[a]{Z.exports=function(){for(var c=0;c{var c=Yk();Z.exports=g;function g(I,S,t){if(!I)throw new TypeError("must specify data as first parameter");if(t=+(t||0)|0,Array.isArray(I)&&I[0]&&typeof I[0][0]=="number"){var e=I[0].length,r=I.length*e,a,n,o,i;(!S||typeof S=="string")&&(S=new(c(S||"float32"))(r+t));var l=S.length-t;if(r!==l)throw new Error("source length "+r+" ("+e+"x"+I.length+") does not match destination length "+l);for(a=0,o=t;a{Z.exports=function(c){var g=typeof c;return c!==null&&(g==="object"||g==="function")}}),cV=Dt((Q,Z)=>{Z.exports=Math.log2||function(c){return Math.log(c)*Math.LOG2E}}),hV=Dt((Q,Z)=>{var c=sV(),g=_3(),I=vb(),S=yx(),t=Ig(),e=lV(),r=xx(),a=uV(),n=Yk(),o=cV(),i=1073741824;Z.exports=function(f,x){x||(x={}),f=r(f,"float64"),x=t(x,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let y=e(x.maxDepth,255),v=e(x.bounds,S(f,2));v[0]===v[2]&&v[2]++,v[1]===v[3]&&v[3]++;let T=l(f,v),u=f.length>>>1,b;x.dtype||(x.dtype="array"),typeof x.dtype=="string"?b=new(n(x.dtype))(u):x.dtype&&(b=x.dtype,Array.isArray(b)&&(b.length=u));for(let R=0;Ry||F>i){for(let at=0;atft||q>ut||J=yt||it===Y)return;let kt=_[vt];Y===void 0&&(Y=kt.length);for(let se=it;se=V&&Lt<=F&&Mt>=H&&Mt<=U&&mt.push(Tt)}let It=P[vt],Pt=It[it*4+0],qt=It[it*4+1],Wt=It[it*4+2],Jt=It[it*4+3],ge=tt(It,it+1),fe=at*.5,pe=vt+1;st(dt,rt,fe,pe,Pt,qt||Wt||Jt||ge),st(dt,rt+fe,fe,pe,qt,Wt||Jt||ge),st(dt+fe,rt,fe,pe,Wt,Jt||ge),st(dt+fe,rt+fe,fe,pe,Jt,ge)}function tt(dt,rt){let at=null,vt=0;for(;at===null;)if(at=dt[rt*4+vt],vt++,vt>dt.length)return null;return at}return mt}function k(R,O,j,V,H){let F=[];for(let U=0;U{Z.exports=hV()}),DS=Dt((Q,Z)=>{Z.exports=c;function c(g){var I=0,S=0,t=0,e=0;return g.map(function(r){r=r.slice();var a=r[0],n=a.toUpperCase();if(a!=n)switch(r[0]=n,a){case"a":r[6]+=t,r[7]+=e;break;case"v":r[1]+=e;break;case"h":r[1]+=t;break;default:for(var o=1;o{Object.defineProperty(Q,"__esModule",{value:!0});var c=function(){function a(n,o){var i=[],l=!0,f=!1,x=void 0;try{for(var y=n[Symbol.iterator](),v;!(l=(v=y.next()).done)&&(i.push(v.value),!(o&&i.length===o));l=!0);}catch(T){f=!0,x=T}finally{try{!l&&y.return&&y.return()}finally{if(f)throw x}}return i}return function(n,o){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return a(n,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),g=Math.PI*2,I=function(a,n,o,i,l,f,x){var y=a.x,v=a.y;y*=n,v*=o;var T=i*y-l*v,u=l*y+i*v;return{x:T+f,y:u+x}},S=function(a,n){var o=n===1.5707963267948966?.551915024494:n===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(n/4),i=Math.cos(a),l=Math.sin(a),f=Math.cos(a+n),x=Math.sin(a+n);return[{x:i-l*o,y:l+i*o},{x:f+x*o,y:x-f*o},{x:f,y:x}]},t=function(a,n,o,i){var l=a*i-n*o<0?-1:1,f=a*o+n*i;return f>1&&(f=1),f<-1&&(f=-1),l*Math.acos(f)},e=function(a,n,o,i,l,f,x,y,v,T,u,b){var _=Math.pow(l,2),P=Math.pow(f,2),M=Math.pow(u,2),C=Math.pow(b,2),A=_*P-_*C-P*M;A<0&&(A=0),A/=_*C+P*M,A=Math.sqrt(A)*(x===y?-1:1);var h=A*l/f*b,p=A*-f/l*u,k=T*h-v*p+(a+o)/2,w=v*h+T*p+(n+i)/2,R=(u-h)/l,O=(b-p)/f,j=(-u-h)/l,V=(-b-p)/f,H=t(1,0,R,O),F=t(R,O,j,V);return y===0&&F>0&&(F-=g),y===1&&F<0&&(F+=g),[k,w,H,F]},r=function(a){var n=a.px,o=a.py,i=a.cx,l=a.cy,f=a.rx,x=a.ry,y=a.xAxisRotation,v=y===void 0?0:y,T=a.largeArcFlag,u=T===void 0?0:T,b=a.sweepFlag,_=b===void 0?0:b,P=[];if(f===0||x===0)return[];var M=Math.sin(v*g/360),C=Math.cos(v*g/360),A=C*(n-i)/2+M*(o-l)/2,h=-M*(n-i)/2+C*(o-l)/2;if(A===0&&h===0)return[];f=Math.abs(f),x=Math.abs(x);var p=Math.pow(A,2)/Math.pow(f,2)+Math.pow(h,2)/Math.pow(x,2);p>1&&(f*=Math.sqrt(p),x*=Math.sqrt(p));var k=e(n,o,i,l,f,x,u,_,M,C,A,h),w=c(k,4),R=w[0],O=w[1],j=w[2],V=w[3],H=Math.abs(V)/(g/4);Math.abs(1-H)<1e-7&&(H=1);var F=Math.max(Math.ceil(H),1);V/=F;for(var U=0;U{Z.exports=g;var c=fV();function g(t){for(var e,r=[],a=0,n=0,o=0,i=0,l=null,f=null,x=0,y=0,v=0,T=t.length;v4?(a=u[u.length-4],n=u[u.length-3]):(a=x,n=y),r.push(u)}return r}function I(t,e,r,a){return["C",t,e,r,a,r,a]}function S(t,e,r,a,n,o){return["C",t/3+2/3*r,e/3+2/3*a,n/3+2/3*r,o/3+2/3*a,n,o]}}),FS=Dt((Q,Z)=>{Z.exports=function(c){return typeof c!="string"?!1:(c=c.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(c)&&/[\dz]$/i.test(c)&&c.length>4))}}),pV=Dt((Q,Z)=>{var c=S1(),g=DS(),I=dV(),S=FS(),t=t3();Z.exports=e;function e(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(t(S(r),"String is not an SVG path."),r=c(r)),t(Array.isArray(r),"Argument should be a string or an array of path segments."),r=g(r),r=I(r),!r.length)return[0,0,0,0];for(var a=[1/0,1/0,-1/0,-1/0],n=0,o=r.length;na[2]&&(a[2]=i[l+0]),i[l+1]>a[3]&&(a[3]=i[l+1]);return a}}),mV=Dt((Q,Z)=>{var c=Math.PI,g=a(120);Z.exports=I;function I(n){for(var o,i=[],l=0,f=0,x=0,y=0,v=null,T=null,u=0,b=0,_=0,P=n.length;_7&&(i.push(M.splice(0,7)),M.unshift("C"));break;case"S":var A=u,h=b;(o=="C"||o=="S")&&(A+=A-l,h+=h-f),M=["C",A,h,M[1],M[2],M[3],M[4]];break;case"T":o=="Q"||o=="T"?(v=u*2-v,T=b*2-T):(v=u,T=b),M=t(u,b,v,T,M[1],M[2]);break;case"Q":v=M[1],T=M[2],M=t(u,b,M[1],M[2],M[3],M[4]);break;case"L":M=S(u,b,M[1],M[2]);break;case"H":M=S(u,b,M[1],b);break;case"V":M=S(u,b,u,M[1]);break;case"Z":M=S(u,b,x,y);break}o=C,u=M[M.length-2],b=M[M.length-1],M.length>4?(l=M[M.length-4],f=M[M.length-3]):(l=u,f=b),i.push(M)}return i}function S(n,o,i,l){return["C",n,o,i,l,i,l]}function t(n,o,i,l,f,x){return["C",n/3+2/3*i,o/3+2/3*l,f/3+2/3*i,x/3+2/3*l,f,x]}function e(n,o,i,l,f,x,y,v,T,u){if(u)w=u[0],R=u[1],p=u[2],k=u[3];else{var b=r(n,o,-f);n=b.x,o=b.y,b=r(v,T,-f),v=b.x,T=b.y;var _=(n-v)/2,P=(o-T)/2,M=_*_/(i*i)+P*P/(l*l);M>1&&(M=Math.sqrt(M),i=M*i,l=M*l);var C=i*i,A=l*l,h=(x==y?-1:1)*Math.sqrt(Math.abs((C*A-C*P*P-A*_*_)/(C*P*P+A*_*_)));h==1/0&&(h=1);var p=h*i*P/l+(n+v)/2,k=h*-l*_/i+(o+T)/2,w=Math.asin(((o-k)/l).toFixed(9)),R=Math.asin(((T-k)/l).toFixed(9));w=nR&&(w=w-c*2),!y&&R>w&&(R=R-c*2)}if(Math.abs(R-w)>g){var O=R,j=v,V=T;R=w+g*(y&&R>w?1:-1),v=p+i*Math.cos(R),T=k+l*Math.sin(R);var H=e(v,T,i,l,f,0,y,j,V,[R,O,p,k])}var F=Math.tan((R-w)/4),U=4/3*i*F,W=4/3*l*F,q=[2*n-(n+U*Math.sin(w)),2*o-(o-W*Math.cos(w)),v+U*Math.sin(R),T-W*Math.cos(R),v,T];if(u)return q;H&&(q=q.concat(H));for(var J=0;J{var c=DS(),g=mV(),I={M:"moveTo",C:"bezierCurveTo"};Z.exports=function(S,t){S.beginPath(),g(c(t)).forEach(function(e){var r=e[0],a=e.slice(1);S[I[r]].apply(S,a)}),S.closePath()}}),vV=Dt((Q,Z)=>{var c=_3();Z.exports=I;var g=1e20;function I(e,r){r||(r={});var a=r.cutoff==null?.25:r.cutoff,n=r.radius==null?8:r.radius,o=r.channel||0,i,l,f,x,y,v,T,u,b,_,P;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!r.width||!r.height)throw Error("For raw data width and height should be provided by options");i=r.width,l=r.height,x=e,r.stride?v=r.stride:v=Math.floor(e.length/i/l)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=e,T=u.getContext("2d"),i=u.width,l=u.height,b=T.getImageData(0,0,i,l),x=b.data,v=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(u=e.canvas,T=e,i=u.width,l=u.height,b=T.getImageData(0,0,i,l),x=b.data,v=4):window.ImageData&&e instanceof window.ImageData&&(b=e,i=e.width,l=e.height,x=b.data,v=4);if(f=Math.max(i,l),window.Uint8ClampedArray&&x instanceof window.Uint8ClampedArray||window.Uint8Array&&x instanceof window.Uint8Array)for(y=x,x=Array(i*l),_=0,P=y.length;_{var c=pV(),g=S1(),I=gV(),S=FS(),t=vV(),e=document.createElement("canvas"),r=e.getContext("2d");Z.exports=a;function a(i,l){if(!S(i))throw Error("Argument should be valid svg path string");l||(l={});var f,x;l.shape?(f=l.shape[0],x=l.shape[1]):(f=e.width=l.w||l.width||200,x=e.height=l.h||l.height||200);var y=Math.min(f,x),v=l.stroke||0,T=l.viewbox||l.viewBox||c(i),u=[f/(T[2]-T[0]),x/(T[3]-T[1])],b=Math.min(u[0]||0,u[1]||0)/2;if(r.fillStyle="black",r.fillRect(0,0,f,x),r.fillStyle="white",v&&(typeof v!="number"&&(v=1),v>0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(v)),r.translate(f*.5,x*.5),r.scale(b,b),o()){var _=new Path2D(i);r.fill(_),v&&r.stroke(_)}else{var P=g(i);I(r,P),r.fill(),v&&r.stroke()}r.setTransform(1,0,0,1,0,0);var M=t(r,{cutoff:l.cutoff!=null?l.cutoff:.5,radius:l.radius!=null?l.radius:y*.5});return M}var n;function o(){if(n!=null)return n;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return n=!1;var l=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(l);var f=i.getImageData(0,0,1,1);return n=f&&f.data&&f.data[3]===255}}),_x=Dt((Q,Z)=>{var c=Yi(),g=yV(),I=U1(),S=Jo(),t=kn(),e=t.isArrayOrTypedArray,r=Vs(),a=Rc(),n=Av().formatColor,o=Tc(),i=bg(),l=cT(),f=q1(),x=go().DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=Fp().appendArrayPointValue;function T(H,F){var U,W={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},q=H._context.plotGlPixelRatio;if(F.visible!==!0)return W;if(o.hasText(F)&&(W.text=u(H,F),W.textSel=M(H,F,F.selected),W.textUnsel=M(H,F,F.unselected)),o.hasMarkers(F)&&(W.marker=_(H,F),W.markerSel=P(H,F,F.selected),W.markerUnsel=P(H,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var J=F.marker.opacity;for(W.markerUnsel.opacity=new Array(J.length),U=0;U500?"bold":"normal":H}function _(H,F){var U=F._length,W=F.marker,q={},J,lt=e(W.symbol),yt=e(W.angle),mt=e(W.color),st=e(W.line.color),tt=e(W.opacity),dt=e(W.size),rt=e(W.line.width),at;if(lt||(at=l.isOpenSymbol(W.symbol)),lt||mt||st||tt||yt){q.symbols=new Array(U),q.angles=new Array(U),q.colors=new Array(U),q.borderColors=new Array(U);var vt=W.symbol,it=W.angle,Y=n(W,W.opacity,U),ft=n(W.line,W.opacity,U);if(!e(ft[0])){var ut=ft;for(ft=Array(U),J=0;Jf.TOO_MANY_POINTS||o.hasMarkers(F)?"rect":"round";if(st&&F.connectgaps){var dt=J[0],rt=J[1];for(lt=0;lt1?mt[lt]:mt[0]:mt,at=e(st)?st.length>1?st[lt]:st[0]:st,vt=y[rt],it=y[at],Y=tt?tt/.8+1:0,ft=-it*Y-it*.5;J.offset[lt]=[vt*Y/dt,ft/dt]}}return J}Z.exports={style:T,markerStyle:_,markerSelection:P,linePositions:O,errorBarPositions:j,textPosition:V}}),RS=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=I._scene,t={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},e={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return I._scene||(S=I._scene={},S.init=function(){c.extendFlat(S,e,t)},S.init(),S.update=function(r){var a=c.repeat(r,S.count);if(S.fill2d&&S.fill2d.update(a),S.scatter2d&&S.scatter2d.update(a),S.line2d&&S.line2d.update(a),S.error2d&&S.error2d.update(a.concat(a)),S.select2d&&S.select2d.update(a),S.glText)for(var n=0;n{var c=hT(),g=kn(),I=Rc(),S=Y0().findExtremes,t=D0(),e=me(),r=e.calcMarkerSize,a=e.calcAxisExpansion,n=e.setFirstScatter,o=F0(),i=_x(),l=RS(),f=Ca().BADNUM,x=q1().TOO_MANY_POINTS;Z.exports=function(T,u){var b=T._fullLayout,_=u._xA=I.getFromId(T,u.xaxis,"x"),P=u._yA=I.getFromId(T,u.yaxis,"y"),M=b._plots[u.xaxis+u.yaxis],C=u._length,A=C>=x,h=C*2,p={},k,w=_.makeCalcdata(u,"x"),R=P.makeCalcdata(u,"y"),O=t(u,_,"x",w),j=t(u,P,"y",R),V=O.vals,H=j.vals;u._x=V,u._y=H,u.xperiodalignment&&(u._origX=w,u._xStarts=O.starts,u._xEnds=O.ends),u.yperiodalignment&&(u._origY=R,u._yStarts=j.starts,u._yEnds=j.ends);var F=new Array(h),U=new Array(C);for(k=0;k1&&g.extendFlat(C.line,i.linePositions(T,b,_)),C.errorX||C.errorY){var A=i.errorBarPositions(T,b,_,P,M);C.errorX&&g.extendFlat(C.errorX,A.x),C.errorY&&g.extendFlat(C.errorY,A.y)}return C.text&&(g.extendFlat(C.text,{positions:_},i.textPosition(T,b,C.text,C.marker)),g.extendFlat(C.textSel,{positions:_},i.textPosition(T,b,C.text,C.markerSel)),g.extendFlat(C.textUnsel,{positions:_},i.textPosition(T,b,C.text,C.markerUnsel))),C}}),BS=Dt((Q,Z)=>{var c=kn(),g=hi(),I=go().DESELECTDIM;function S(t){var e=t[0],r=e.trace,a=e.t,n=a._scene,o=a.index,i=n.selectBatch[o],l=n.unselectBatch[o],f=n.textOptions[o],x=n.textSelectedOptions[o]||{},y=n.textUnselectedOptions[o]||{},v=c.extendFlat({},f),T,u;if(i.length||l.length){var b=x.color,_=y.color,P=f.color,M=c.isArrayOrTypedArray(P);for(v.color=new Array(r._length),T=0;T{var c=Tc(),g=BS().styleTextSelection;Z.exports=function(I,S){var t=I.cd,e=I.xaxis,r=I.yaxis,a=[],n=t[0].trace,o=t[0].t,i=n._length,l=o.x,f=o.y,x=o._scene,y=o.index;if(!x)return a;var v=c.hasText(n),T=c.hasMarkers(n),u=!T&&!v;if(n.visible!==!0||u)return a;var b=[],_=[];if(S!==!1&&!S.degenerate)for(var P=0;P{var c=uT();Z.exports={moduleType:"trace",name:"scattergl",basePlotModule:Mf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:T3(),supplyDefaults:aV(),crossTraceDefaults:Fw(),colorbar:xo(),formatLabels:oV(),calc:xV(),hoverPoints:c.hoverPoints,selectPoints:NS(),meta:{}}}),bV=Dt((Q,Z)=>{var c=_3();Z.exports=g,Z.exports.to=g,Z.exports.from=I;function g(S,t){t==null&&(t=!0);var e=S[0],r=S[1],a=S[2],n=S[3];n==null&&(n=t?1:255),t&&(e*=255,r*=255,a*=255,n*=255),e=c(e,0,255)&255,r=c(r,0,255)&255,a=c(a,0,255)&255,n=c(n,0,255)&255;var o=e*16777216+(r<<16)+(a<<8)+n;return o}function I(S,t){S=+S;var e=S>>>24,r=(S&16711680)>>>16,a=(S&65280)>>>8,n=S&255;return t===!1?[e,r,a,n]:[e/255,r/255,a/255,n/255]}}),Sd=Dt((Q,Z)=>{var c=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;function S(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function t(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},a=0;a<10;a++)r["_"+String.fromCharCode(a)]=a;var n=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(n.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Z.exports=t()?Object.assign:function(e,r){for(var a,n=S(e),o,i=1;i{Z.exports=function(c){typeof c=="string"&&(c=[c]);for(var g=[].slice.call(arguments,1),I=[],S=0;S{Z.exports=function(c,g,I){Array.isArray(I)||(I=[].slice.call(arguments,2));for(var S=0,t=I.length;S{Z.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}),fT=Dt((Q,Z)=>{Z.exports=I,Z.exports.float32=Z.exports.float=I,Z.exports.fract32=Z.exports.fract=g;var c=new Float32Array(1);function g(S,t){if(S.length){if(S instanceof Float32Array)return new Float32Array(S.length);t instanceof Float32Array||(t=I(S));for(var e=0,r=t.length;e{function c(k,w){var R=k==null?null:typeof Symbol<"u"&&k[Symbol.iterator]||k["@@iterator"];if(R!=null){var O,j,V,H,F=[],U=!0,W=!1;try{if(V=(R=R.call(k)).next,w!==0)for(;!(U=(O=V.call(R)).done)&&(F.push(O.value),F.length!==w);U=!0);}catch(q){W=!0,j=q}finally{try{if(!U&&R.return!=null&&(H=R.return(),Object(H)!==H))return}finally{if(W)throw j}}return F}}function g(k,w){return t(k)||c(k,w)||r(k,w)||o()}function I(k){return S(k)||e(k)||r(k)||n()}function S(k){if(Array.isArray(k))return a(k)}function t(k){if(Array.isArray(k))return k}function e(k){if(typeof Symbol<"u"&&k[Symbol.iterator]!=null||k["@@iterator"]!=null)return Array.from(k)}function r(k,w){if(k){if(typeof k=="string")return a(k,w);var R=Object.prototype.toString.call(k).slice(8,-1);if(R==="Object"&&k.constructor&&(R=k.constructor.name),R==="Map"||R==="Set")return Array.from(k);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return a(k,w)}}function a(k,w){(w==null||w>k.length)&&(w=k.length);for(var R=0,O=new Array(w);RTt)?de.tree=x(he,{bounds:oe}):Tt&&Tt.length&&(de.tree=Tt),de.tree){var Te={primitive:"points",usage:"static",data:de.tree,type:"uint32"};de.elements?de.elements(Te):de.elements=H.elements(Te)}var He=C.float32(he);Lt({data:He,usage:"dynamic"});var Ge=C.fract32(he,He);return Mt({data:Ge,usage:"dynamic"}),te({data:new Uint8Array(ve),type:"uint8",usage:"stream"}),he}},{marker:function(he,de,se){var Tt=de.activation;if(Tt.forEach(function(Ge){return Ge&&Ge.destroy&&Ge.destroy()}),Tt.length=0,!he||typeof he[0]=="number"){var Lt=k.addMarker(he);Tt[Lt]=!0}else{for(var Mt=[],te=0,ve=Math.min(he.length,de.count);te=0)return N;var V;if(k instanceof Uint8Array||k instanceof Uint8ClampedArray)V=k;else{V=new Uint8Array(k.length);for(var H=0,F=k.length;HO*4&&(this.tooManyColors=!0),this.updatePalette(R),N.length===1?N[0]:N},A.prototype.updatePalette=function(k){if(!this.tooManyColors){var w=this.maxColors,R=this.paletteTexture,O=Math.ceil(k.length*.25/w);if(O>1){k=k.slice();for(var N=k.length*.25%w;N{$.exports=c,$.exports.default=c;function c(H,F,U){U=U||2;var W=F&&F.length,q=W?F[0]*U:H.length,X=g(H,0,q,U,!0),lt=[];if(!X||X.next===X.prev)return lt;var yt,pt,st,tt,dt,rt,at;if(W&&(X=n(H,F,X,U)),H.length>80*U){yt=st=H[0],pt=tt=H[1];for(var vt=U;vtst&&(st=dt),rt>tt&&(tt=rt);at=Math.max(st-yt,tt-pt),at=at!==0?32767/at:0}return S(X,lt,U,yt,pt,at,0),lt}function g(H,F,U,W,q){var X,lt;if(q===V(H,F,U,W)>0)for(X=F;X=F;X-=W)lt=R(X,H[X],H[X+1],lt);return lt&&C(lt,lt.next)&&(O(lt),lt=lt.next),lt}function P(H,F){if(!H)return H;F||(F=H);var U=H,W;do if(W=!1,!U.steiner&&(C(U,U.next)||_(U.prev,U,U.next)===0)){if(O(U),U=F=U.prev,U===U.next)break;W=!0}else U=U.next;while(W||U!==F);return F}function S(H,F,U,W,q,X,lt){if(H){!lt&&X&&x(H,W,q,X);for(var yt=H,pt,st;H.prev!==H.next;){if(pt=H.prev,st=H.next,X?e(H,W,q,X):t(H)){F.push(pt.i/U|0),F.push(H.i/U|0),F.push(st.i/U|0),O(H),H=st.next,yt=st.next;continue}if(H=st,H===yt){lt?lt===1?(H=r(P(H),F,U),S(H,F,U,W,q,X,2)):lt===2&&a(H,F,U,W,q,X):S(P(H),F,U,W,q,X,1);break}}}}function t(H){var F=H.prev,U=H,W=H.next;if(_(F,U,W)>=0)return!1;for(var q=F.x,X=U.x,lt=W.x,yt=F.y,pt=U.y,st=W.y,tt=qX?q>lt?q:lt:X>lt?X:lt,at=yt>pt?yt>st?yt:st:pt>st?pt:st,vt=W.next;vt!==F;){if(vt.x>=tt&&vt.x<=rt&&vt.y>=dt&&vt.y<=at&&u(q,yt,X,pt,lt,st,vt.x,vt.y)&&_(vt.prev,vt,vt.next)>=0)return!1;vt=vt.next}return!0}function e(H,F,U,W){var q=H.prev,X=H,lt=H.next;if(_(q,X,lt)>=0)return!1;for(var yt=q.x,pt=X.x,st=lt.x,tt=q.y,dt=X.y,rt=lt.y,at=ytpt?yt>st?yt:st:pt>st?pt:st,Y=tt>dt?tt>rt?tt:rt:dt>rt?dt:rt,ft=v(at,vt,F,U,W),ut=v(it,Y,F,U,W),wt=H.prevZ,zt=H.nextZ;wt&&wt.z>=ft&&zt&&zt.z<=ut;){if(wt.x>=at&&wt.x<=it&&wt.y>=vt&&wt.y<=Y&&wt!==q&&wt!==lt&&u(yt,tt,pt,dt,st,rt,wt.x,wt.y)&&_(wt.prev,wt,wt.next)>=0||(wt=wt.prevZ,zt.x>=at&&zt.x<=it&&zt.y>=vt&&zt.y<=Y&&zt!==q&&zt!==lt&&u(yt,tt,pt,dt,st,rt,zt.x,zt.y)&&_(zt.prev,zt,zt.next)>=0))return!1;zt=zt.nextZ}for(;wt&&wt.z>=ft;){if(wt.x>=at&&wt.x<=it&&wt.y>=vt&&wt.y<=Y&&wt!==q&&wt!==lt&&u(yt,tt,pt,dt,st,rt,wt.x,wt.y)&&_(wt.prev,wt,wt.next)>=0)return!1;wt=wt.prevZ}for(;zt&&zt.z<=ut;){if(zt.x>=at&&zt.x<=it&&zt.y>=vt&&zt.y<=Y&&zt!==q&&zt!==lt&&u(yt,tt,pt,dt,st,rt,zt.x,zt.y)&&_(zt.prev,zt,zt.next)>=0)return!1;zt=zt.nextZ}return!0}function r(H,F,U){var W=H;do{var q=W.prev,X=W.next.next;!C(q,X)&&M(q,W,W.next,X)&&p(q,X)&&p(X,q)&&(F.push(q.i/U|0),F.push(W.i/U|0),F.push(X.i/U|0),O(W),O(W.next),W=H=X),W=W.next}while(W!==H);return P(W)}function a(H,F,U,W,q,X){var lt=H;do{for(var yt=lt.next.next;yt!==lt.prev;){if(lt.i!==yt.i&&b(lt,yt)){var pt=w(lt,yt);lt=P(lt,lt.next),pt=P(pt,pt.next),S(lt,F,U,W,q,X,0),S(pt,F,U,W,q,X,0);return}yt=yt.next}lt=lt.next}while(lt!==H)}function n(H,F,U,W){var q=[],X,lt,yt,pt,st;for(X=0,lt=F.length;X=U.next.y&&U.next.y!==U.y){var yt=U.x+(q-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(yt<=W&&yt>X&&(X=yt,lt=U.x=U.x&&U.x>=st&&W!==U.x&&u(qlt.x||U.x===lt.x&&f(lt,U)))&&(lt=U,dt=rt)),U=U.next;while(U!==pt);return lt}function f(H,F){return _(H.prev,H,F.prev)<0&&_(F.next,H,H.next)<0}function x(H,F,U,W){var q=H;do q.z===0&&(q.z=v(q.x,q.y,F,U,W)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==H);q.prevZ.nextZ=null,q.prevZ=null,y(q)}function y(H){var F,U,W,q,X,lt,yt,pt,st=1;do{for(U=H,H=null,X=null,lt=0;U;){for(lt++,W=U,yt=0,F=0;F0||pt>0&&W;)yt!==0&&(pt===0||!W||U.z<=W.z)?(q=U,U=U.nextZ,yt--):(q=W,W=W.nextZ,pt--),X?X.nextZ=q:H=q,q.prevZ=X,X=q;U=W}X.nextZ=null,st*=2}while(lt>1);return H}function v(H,F,U,W,q){return H=(H-U)*q|0,F=(F-W)*q|0,H=(H|H<<8)&16711935,H=(H|H<<4)&252645135,H=(H|H<<2)&858993459,H=(H|H<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,H|F<<1}function T(H){var F=H,U=H;do(F.x=(H-lt)*(X-yt)&&(H-lt)*(W-yt)>=(U-lt)*(F-yt)&&(U-lt)*(X-yt)>=(q-lt)*(W-yt)}function b(H,F){return H.next.i!==F.i&&H.prev.i!==F.i&&!h(H,F)&&(p(H,F)&&p(F,H)&&k(H,F)&&(_(H.prev,H,F.prev)||_(H,F.prev,F))||C(H,F)&&_(H.prev,H,H.next)>0&&_(F.prev,F,F.next)>0)}function _(H,F,U){return(F.y-H.y)*(U.x-F.x)-(F.x-H.x)*(U.y-F.y)}function C(H,F){return H.x===F.x&&H.y===F.y}function M(H,F,U,W){var q=A(_(H,F,U)),X=A(_(H,F,W)),lt=A(_(U,W,H)),yt=A(_(U,W,F));return!!(q!==X&<!==yt||q===0&&E(H,U,F)||X===0&&E(H,W,F)||lt===0&&E(U,H,W)||yt===0&&E(U,F,W))}function E(H,F,U){return F.x<=Math.max(H.x,U.x)&&F.x>=Math.min(H.x,U.x)&&F.y<=Math.max(H.y,U.y)&&F.y>=Math.min(H.y,U.y)}function A(H){return H>0?1:H<0?-1:0}function h(H,F){var U=H;do{if(U.i!==H.i&&U.next.i!==H.i&&U.i!==F.i&&U.next.i!==F.i&&M(U,U.next,H,F))return!0;U=U.next}while(U!==H);return!1}function p(H,F){return _(H.prev,H,H.next)<0?_(H,F,H.next)>=0&&_(H,H.prev,F)>=0:_(H,F,H.prev)<0||_(H,H.next,F)<0}function k(H,F){var U=H,W=!1,q=(H.x+F.x)/2,X=(H.y+F.y)/2;do U.y>X!=U.next.y>X&&U.next.y!==U.y&&q<(U.next.x-U.x)*(X-U.y)/(U.next.y-U.y)+U.x&&(W=!W),U=U.next;while(U!==H);return W}function w(H,F){var U=new N(H.i,H.x,H.y),W=new N(F.i,F.x,F.y),q=H.next,X=F.prev;return H.next=F,F.prev=H,U.next=q,q.prev=U,W.next=U,U.prev=W,X.next=W,W.prev=X,W}function R(H,F,U,W){var q=new N(H,F,U);return W?(q.next=W.next,q.prev=W,W.next.prev=q,W.next=q):(q.prev=q,q.next=q),q}function O(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function N(H,F,U){this.i=H,this.x=F,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}c.deviation=function(H,F,U,W){var q=F&&F.length,X=q?F[0]*U:H.length,lt=Math.abs(V(H,0,X,U));if(q)for(var yt=0,pt=F.length;yt0&&(W+=H[q-1].length,U.holes.push(W))}return U}}),rV=Ft((Q,$)=>{var c=vx();$.exports=g;function g(P,S,t){if(!P||P.length==null)throw Error("Argument should be an array");S==null&&(S=1),t==null&&(t=c(P,S));for(var e=0;e{$.exports=function(){var c,g;if(typeof WeakMap!="function")return!1;try{c=new WeakMap([[g={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(c)!=="[object WeakMap]"||typeof c.set!="function"||c.set({},1)!==c||typeof c.delete!="function"||typeof c.has!="function"||c.get(g)!=="one")}}),iV=Ft((Q,$)=>{$.exports=function(){}}),Z1=Ft((Q,$)=>{var c=iV()();$.exports=function(g){return g!==c&&g!==null}}),LS=Ft((Q,$)=>{var c=Object.create,g=Object.getPrototypeOf,P={};$.exports=function(){var S=Object.setPrototypeOf,t=arguments[0]||c;return typeof S!="function"?!1:g(S(t(null),P))===P}}),PS=Ft((Q,$)=>{var c=Z1(),g={function:!0,object:!0};$.exports=function(P){return c(P)&&g[typeof P]||!1}}),Mv=Ft((Q,$)=>{var c=Z1();$.exports=function(g){if(!c(g))throw new TypeError("Cannot use null or undefined");return g}}),aV=Ft((Q,$)=>{var c=Object.create,g;LS()()||(g=zS()),$.exports=function(){var P,S,t;return!g||g.level!==1?c:(P={},S={},t={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){if(e==="__proto__"){S[e]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}S[e]=t}),Object.defineProperties(P,S),Object.defineProperty(g,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:P}),function(e,r){return c(e===null?P:e,r)})}()}),zS=Ft((Q,$)=>{var c=PS(),g=Mv(),P=Object.prototype.isPrototypeOf,S=Object.defineProperty,t={configurable:!0,enumerable:!1,writable:!0,value:void 0},e;e=function(r,a){if(g(r),a===null||c(a))return r;throw new TypeError("Prototype must be null or an object")},$.exports=function(r){var a,n;return r?(r.level===2?r.set?(n=r.set,a=function(o,i){return n.call(e(o,i),i),o}):a=function(o,i){return e(o,i).__proto__=i,o}:a=function o(i,s){var f;return e(i,s),f=P.call(o.nullPolyfill,i),f&&delete o.nullPolyfill.__proto__,s===null&&(s=o.nullPolyfill),i.__proto__=s,f&&S(o.nullPolyfill,"__proto__",t),i},Object.defineProperty(a,"level",{configurable:!1,enumerable:!1,writable:!1,value:r.level})):null}(function(){var r=Object.create(null),a={},n,o=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(o){try{n=o.set,n.call(r,a)}catch{}if(Object.getPrototypeOf(r)===a)return{set:n,level:2}}return r.__proto__=a,Object.getPrototypeOf(r)===a?{level:2}:(r={},r.__proto__=a,Object.getPrototypeOf(r)===a?{level:1}:!1)}()),aV()}),oT=Ft((Q,$)=>{$.exports=LS()()?Object.setPrototypeOf:zS()}),oV=Ft((Q,$)=>{var c=PS();$.exports=function(g){if(!c(g))throw new TypeError(g+" is not an Object");return g}}),sV=Ft((Q,$)=>{var c=Object.create(null),g=Math.random;$.exports=function(){var P;do P=g().toString(36).slice(2);while(c[P]);return P}}),_x=Ft((Q,$)=>{var c=void 0;$.exports=function(g){return g!==c&&g!==null}}),sT=Ft((Q,$)=>{var c=_x(),g={object:!0,function:!0,undefined:!0};$.exports=function(P){return c(P)?hasOwnProperty.call(g,typeof P):!1}}),lV=Ft((Q,$)=>{var c=sT();$.exports=function(g){if(!c(g))return!1;try{return g.constructor?g.constructor.prototype===g:!1}catch{return!1}}}),uV=Ft((Q,$)=>{var c=lV();$.exports=function(g){if(typeof g!="function"||!hasOwnProperty.call(g,"length"))return!1;try{if(typeof g.length!="number"||typeof g.call!="function"||typeof g.apply!="function")return!1}catch{return!1}return!c(g)}}),IS=Ft((Q,$)=>{var c=uV(),g=/^\s*class[\s{/}]/,P=Function.prototype.toString;$.exports=function(S){return!(!c(S)||g.test(P.call(S)))}}),cV=Ft((Q,$)=>{$.exports=function(){var c=Object.assign,g;return typeof c!="function"?!1:(g={foo:"raz"},c(g,{bar:"dwa"},{trzy:"trzy"}),g.foo+g.bar+g.trzy==="razdwatrzy")}}),hV=Ft((Q,$)=>{$.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}),fV=Ft((Q,$)=>{var c=Z1(),g=Object.keys;$.exports=function(P){return g(c(P)?Object(P):P)}}),dV=Ft((Q,$)=>{$.exports=hV()()?Object.keys:fV()}),pV=Ft((Q,$)=>{var c=dV(),g=Mv(),P=Math.max;$.exports=function(S,t){var e,r,a=P(arguments.length,2),n;for(S=Object(g(S)),n=function(o){try{S[o]=t[o]}catch(i){e||(e=i)}},r=1;r{$.exports=cV()()?Object.assign:pV()}),OS=Ft((Q,$)=>{var c=Z1(),g=Array.prototype.forEach,P=Object.create,S=function(t,e){var r;for(r in t)e[r]=t[r]};$.exports=function(t){var e=P(null);return g.call(arguments,function(r){c(r)&&S(Object(r),e)}),e}}),mV=Ft((Q,$)=>{var c="razdwatrzy";$.exports=function(){return typeof c.contains!="function"?!1:c.contains("dwa")===!0&&c.contains("foo")===!1}}),gV=Ft((Q,$)=>{var c=String.prototype.indexOf;$.exports=function(g){return c.call(this,g,arguments[1])>-1}}),DS=Ft((Q,$)=>{$.exports=mV()()?String.prototype.contains:gV()}),Sv=Ft((Q,$)=>{var c=_x(),g=IS(),P=lT(),S=OS(),t=DS(),e=$.exports=function(r,a){var n,o,i,s,f;return arguments.length<2||typeof r!="string"?(s=a,a=r,r=null):s=arguments[2],c(r)?(n=t.call(r,"c"),o=t.call(r,"e"),i=t.call(r,"w")):(n=i=!0,o=!1),f={value:a,configurable:n,enumerable:o,writable:i},s?P(S(s),f):f};e.gs=function(r,a,n){var o,i,s,f;return typeof r!="string"?(s=n,n=a,a=r,r=null):s=arguments[3],c(a)?g(a)?c(n)?g(n)||(s=n,n=void 0):n=void 0:(s=a,a=n=void 0):a=void 0,c(r)?(o=t.call(r,"c"),i=t.call(r,"e")):(o=!0,i=!1),f={get:a,set:n,configurable:o,enumerable:i},s?P(S(s),f):f}}),w3=Ft((Q,$)=>{var c=Object.prototype.toString,g=c.call(function(){return arguments}());$.exports=function(P){return c.call(P)===g}}),k3=Ft((Q,$)=>{var c=Object.prototype.toString,g=c.call("");$.exports=function(P){return typeof P=="string"||P&&typeof P=="object"&&(P instanceof String||c.call(P)===g)||!1}}),vV=Ft((Q,$)=>{$.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}),yV=Ft((Q,$)=>{var c=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};$.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return c()}try{return __global__||c()}finally{delete Object.prototype.__global__}}()}),T3=Ft((Q,$)=>{$.exports=vV()()?globalThis:yV()}),xV=Ft((Q,$)=>{var c=T3(),g={object:!0,symbol:!0};$.exports=function(){var P=c.Symbol,S;if(typeof P!="function")return!1;S=P("test symbol");try{String(S)}catch{return!1}return!(!g[typeof P.iterator]||!g[typeof P.toPrimitive]||!g[typeof P.toStringTag])}}),_V=Ft((Q,$)=>{$.exports=function(c){return c?typeof c=="symbol"?!0:!c.constructor||c.constructor.name!=="Symbol"?!1:c[c.constructor.toStringTag]==="Symbol":!1}}),FS=Ft((Q,$)=>{var c=_V();$.exports=function(g){if(!c(g))throw new TypeError(g+" is not a symbol");return g}}),bV=Ft((Q,$)=>{var c=Sv(),g=Object.create,P=Object.defineProperty,S=Object.prototype,t=g(null);$.exports=function(e){for(var r=0,a,n;t[e+(r||"")];)++r;return e+=r||"",t[e]=!0,a="@@"+e,P(S,a,c.gs(null,function(o){n||(n=!0,P(this,a,c(o)),n=!1)})),a}}),wV=Ft((Q,$)=>{var c=Sv(),g=T3().Symbol;$.exports=function(P){return Object.defineProperties(P,{hasInstance:c("",g&&g.hasInstance||P("hasInstance")),isConcatSpreadable:c("",g&&g.isConcatSpreadable||P("isConcatSpreadable")),iterator:c("",g&&g.iterator||P("iterator")),match:c("",g&&g.match||P("match")),replace:c("",g&&g.replace||P("replace")),search:c("",g&&g.search||P("search")),species:c("",g&&g.species||P("species")),split:c("",g&&g.split||P("split")),toPrimitive:c("",g&&g.toPrimitive||P("toPrimitive")),toStringTag:c("",g&&g.toStringTag||P("toStringTag")),unscopables:c("",g&&g.unscopables||P("unscopables"))})}}),kV=Ft((Q,$)=>{var c=Sv(),g=FS(),P=Object.create(null);$.exports=function(S){return Object.defineProperties(S,{for:c(function(t){return P[t]?P[t]:P[t]=S(String(t))}),keyFor:c(function(t){var e;g(t);for(e in P)if(P[e]===t)return e})})}}),TV=Ft((Q,$)=>{var c=Sv(),g=FS(),P=T3().Symbol,S=bV(),t=wV(),e=kV(),r=Object.create,a=Object.defineProperties,n=Object.defineProperty,o,i,s;if(typeof P=="function")try{String(P()),s=!0}catch{}else P=null;i=function(f){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return o(f)},$.exports=o=function f(x){var y;if(this instanceof f)throw new TypeError("Symbol is not a constructor");return s?P(x):(y=r(i.prototype),x=x===void 0?"":String(x),a(y,{__description__:c("",x),__name__:c("",S(x))}))},t(o),e(o),a(i.prototype,{constructor:c(o),toString:c("",function(){return this.__name__})}),a(o.prototype,{toString:c(function(){return"Symbol ("+g(this).__description__+")"}),valueOf:c(function(){return g(this)})}),n(o.prototype,o.toPrimitive,c("",function(){var f=g(this);return typeof f=="symbol"?f:f.toString()})),n(o.prototype,o.toStringTag,c("c","Symbol")),n(i.prototype,o.toStringTag,c("c",o.prototype[o.toStringTag])),n(i.prototype,o.toPrimitive,c("c",o.prototype[o.toPrimitive]))}),$1=Ft((Q,$)=>{$.exports=xV()()?T3().Symbol:TV()}),AV=Ft((Q,$)=>{var c=Mv();$.exports=function(){return c(this).length=0,this}}),_b=Ft((Q,$)=>{$.exports=function(c){if(typeof c!="function")throw new TypeError(c+" is not a function");return c}}),MV=Ft((Q,$)=>{var c=_x(),g=sT(),P=Object.prototype.toString;$.exports=function(S){if(!c(S))return null;if(g(S)){var t=S.toString;if(typeof t!="function"||t===P)return null}try{return""+S}catch{return null}}}),SV=Ft((Q,$)=>{$.exports=function(c){try{return c.toString()}catch{try{return String(c)}catch{return null}}}}),EV=Ft((Q,$)=>{var c=SV(),g=/[\n\r\u2028\u2029]/g;$.exports=function(P){var S=c(P);return S===null?"":(S.length>100&&(S=S.slice(0,99)+"…"),S=S.replace(g,function(t){switch(t){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}}),RS=Ft((Q,$)=>{var c=_x(),g=sT(),P=MV(),S=EV(),t=function(e,r){return e.replace("%v",S(r))};$.exports=function(e,r,a){if(!g(a))throw new TypeError(t(r,e));if(!c(e)){if("default"in a)return a.default;if(a.isOptional)return null}var n=P(a.errorMessage);throw c(n)||(n=r),new TypeError(t(n,e))}}),CV=Ft((Q,$)=>{var c=RS(),g=_x();$.exports=function(P){return g(P)?P:c(P,"Cannot use %v",arguments[1])}}),LV=Ft((Q,$)=>{var c=RS(),g=IS();$.exports=function(P){return g(P)?P:c(P,"%v is not a plain function",arguments[1])}}),PV=Ft((Q,$)=>{$.exports=function(){var c=Array.from,g,P;return typeof c!="function"?!1:(g=["raz","dwa"],P=c(g),!!(P&&P!==g&&P[1]==="dwa"))}}),zV=Ft((Q,$)=>{var c=Object.prototype.toString,g=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);$.exports=function(P){return typeof P=="function"&&g(c.call(P))}}),IV=Ft((Q,$)=>{$.exports=function(){var c=Math.sign;return typeof c!="function"?!1:c(10)===1&&c(-20)===-1}}),OV=Ft((Q,$)=>{$.exports=function(c){return c=Number(c),isNaN(c)||c===0?c:c>0?1:-1}}),DV=Ft((Q,$)=>{$.exports=IV()()?Math.sign:OV()}),FV=Ft((Q,$)=>{var c=DV(),g=Math.abs,P=Math.floor;$.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:c(S)*P(g(S)))}}),RV=Ft((Q,$)=>{var c=FV(),g=Math.max;$.exports=function(P){return g(0,c(P))}}),BV=Ft((Q,$)=>{var c=$1().iterator,g=w3(),P=zV(),S=RV(),t=_b(),e=Mv(),r=Z1(),a=k3(),n=Array.isArray,o=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;$.exports=function(f){var x=arguments[1],y=arguments[2],v,T,u,b,_,C,M,E,A,h;if(f=Object(e(f)),r(x)&&t(x),!this||this===Array||!P(this)){if(!x){if(g(f))return _=f.length,_!==1?Array.apply(null,f):(b=new Array(1),b[0]=f[0],b);if(n(f)){for(b=new Array(_=f.length),T=0;T<_;++T)b[T]=f[T];return b}}b=[]}else v=this;if(!n(f)){if((A=f[c])!==void 0){for(M=t(A).call(f),v&&(b=new v),E=M.next(),T=0;!E.done;)h=x?o.call(x,y,E.value,T):E.value,v?(i.value=h,s(b,T,i)):b[T]=h,E=M.next(),++T;_=T}else if(a(f)){for(_=f.length,v&&(b=new v),T=0,u=0;T<_;++T)h=f[T],T+1<_&&(C=h.charCodeAt(0),C>=55296&&C<=56319&&(h+=f[++T])),h=x?o.call(x,y,h,u):h,v?(i.value=h,s(b,u,i)):b[u]=h,++u;_=u}}if(_===void 0)for(_=S(f.length),v&&(b=new v(_)),T=0;T<_;++T)h=x?o.call(x,y,f[T],T):f[T],v?(i.value=h,s(b,T,i)):b[T]=h;return v&&(i.value=null,b.length=_),b}}),NV=Ft((Q,$)=>{$.exports=PV()()?Array.from:BV()}),jV=Ft((Q,$)=>{var c=NV(),g=lT(),P=Mv();$.exports=function(S){var t=Object(P(S)),e=arguments[1],r=Object(arguments[2]);if(t!==S&&!e)return t;var a={};return e?c(e,function(n){(r.ensure||n in S)&&(a[n]=S[n])}):g(a,S),a}}),UV=Ft((Q,$)=>{var c=_b(),g=Mv(),P=Function.prototype.bind,S=Function.prototype.call,t=Object.keys,e=Object.prototype.propertyIsEnumerable;$.exports=function(r,a){return function(n,o){var i,s=arguments[2],f=arguments[3];return n=Object(g(n)),c(o),i=t(n),f&&i.sort(typeof f=="function"?P.call(f,n):void 0),typeof r!="function"&&(r=i[r]),S.call(r,i,function(x,y){return e.call(n,x)?S.call(o,s,n[x],x,n,y):a})}}}),VV=Ft((Q,$)=>{$.exports=UV()("forEach")}),HV=Ft((Q,$)=>{var c=_b(),g=VV(),P=Function.prototype.call;$.exports=function(S,t){var e={},r=arguments[2];return c(t),g(S,function(a,n,o,i){e[n]=P.call(t,r,a,n,o,i)}),e}}),WV=Ft((Q,$)=>{var c=_x(),g=CV(),P=LV(),S=jV(),t=OS(),e=HV(),r=Function.prototype.bind,a=Object.defineProperty,n=Object.prototype.hasOwnProperty,o;o=function(i,s,f){var x=g(s)&&P(s.value),y;return y=S(s),delete y.writable,delete y.value,y.get=function(){return!f.overwriteDefinition&&n.call(this,i)?x:(s.value=r.call(x,f.resolveContext?f.resolveContext(this):this),a(this,i,s),this[i])},y},$.exports=function(i){var s=t(arguments[1]);return c(s.resolveContext)&&P(s.resolveContext),e(i,function(f,x){return o(x,f,s)})}}),BS=Ft((Q,$)=>{var c=AV(),g=lT(),P=_b(),S=Mv(),t=Sv(),e=WV(),r=$1(),a=Object.defineProperty,n=Object.defineProperties,o;$.exports=o=function(i,s){if(!(this instanceof o))throw new TypeError("Constructor requires 'new'");n(this,{__list__:t("w",S(i)),__context__:t("w",s),__nextIndex__:t("w",0)}),s&&(P(s.on),s.on("_add",this._onAdd),s.on("_delete",this._onDelete),s.on("_clear",this._onClear))},delete o.prototype.constructor,n(o.prototype,g({_next:t(function(){var i;if(this.__list__){if(this.__redo__&&(i=this.__redo__.shift(),i!==void 0))return i;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){a(this,"__redo__",t("c",[i]));return}this.__redo__.forEach(function(s,f){s>=i&&(this.__redo__[f]=++s)},this),this.__redo__.push(i)}}),_onDelete:t(function(i){var s;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(i),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(f,x){f>i&&(this.__redo__[x]=--f)},this)))}),_onClear:t(function(){this.__redo__&&c.call(this.__redo__),this.__nextIndex__=0})}))),a(o.prototype,r.iterator,t(function(){return this}))}),qV=Ft((Q,$)=>{var c=oT(),g=DS(),P=Sv(),S=$1(),t=BS(),e=Object.defineProperty,r;r=$.exports=function(a,n){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");t.call(this,a),n?g.call(n,"key+value")?n="key+value":g.call(n,"key")?n="key":n="value":n="value",e(this,"__kind__",P("",n))},c&&c(r,t),delete r.prototype.constructor,r.prototype=Object.create(t.prototype,{_resolve:P(function(a){return this.__kind__==="value"?this.__list__[a]:this.__kind__==="key+value"?[a,this.__list__[a]]:a})}),e(r.prototype,S.toStringTag,P("c","Array Iterator"))}),ZV=Ft((Q,$)=>{var c=oT(),g=Sv(),P=$1(),S=BS(),t=Object.defineProperty,e;e=$.exports=function(r){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");r=String(r),S.call(this,r),t(this,"__length__",g("",r.length))},c&&c(e,S),delete e.prototype.constructor,e.prototype=Object.create(S.prototype,{_next:g(function(){if(this.__list__){if(this.__nextIndex__=55296&&n<=56319?a+this.__list__[this.__nextIndex__++]:a)})}),t(e.prototype,P.toStringTag,g("c","String Iterator"))}),$V=Ft((Q,$)=>{var c=w3(),g=Z1(),P=k3(),S=$1().iterator,t=Array.isArray;$.exports=function(e){return g(e)?t(e)||P(e)||c(e)?!0:typeof e[S]=="function":!1}}),GV=Ft((Q,$)=>{var c=$V();$.exports=function(g){if(!c(g))throw new TypeError(g+" is not iterable");return g}}),NS=Ft((Q,$)=>{var c=w3(),g=k3(),P=qV(),S=ZV(),t=GV(),e=$1().iterator;$.exports=function(r){return typeof t(r)[e]=="function"?r[e]():c(r)?new P(r):g(r)?new S(r):new P(r)}}),YV=Ft((Q,$)=>{var c=w3(),g=_b(),P=k3(),S=NS(),t=Array.isArray,e=Function.prototype.call,r=Array.prototype.some;$.exports=function(a,n){var o,i=arguments[2],s,f,x,y,v,T,u;if(t(a)||c(a)?o="array":P(a)?o="string":a=S(a),g(n),f=function(){x=!0},o==="array"){r.call(a,function(b){return e.call(n,i,b,f),x});return}if(o==="string"){for(v=a.length,y=0;y=55296&&u<=56319&&(T+=a[++y])),e.call(n,i,T,f),!x);++y);return}for(s=a.next();!s.done;){if(e.call(n,i,s.value,f),x)return;s=a.next()}}}),KV=Ft((Q,$)=>{$.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}),XV=Ft((Q,$)=>{var c=Z1(),g=oT(),P=oV(),S=Mv(),t=sV(),e=Sv(),r=NS(),a=YV(),n=$1().toStringTag,o=KV(),i=Array.isArray,s=Object.defineProperty,f=Object.prototype.hasOwnProperty,x=Object.getPrototypeOf,y;$.exports=y=function(){var v=arguments[0],T;if(!(this instanceof y))throw new TypeError("Constructor requires 'new'");return T=o&&g&&WeakMap!==y?g(new WeakMap,x(this)):this,c(v)&&(i(v)||(v=r(v))),s(T,"__weakMapData__",e("c","$weakMap$"+t())),v&&a(v,function(u){S(u),T.set(u[0],u[1])}),T},o&&(g&&g(y,WeakMap),y.prototype=Object.create(WeakMap.prototype,{constructor:e(y)})),Object.defineProperties(y.prototype,{delete:e(function(v){return f.call(P(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(f.call(P(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return f.call(P(v),this.__weakMapData__)}),set:e(function(v,T){return s(P(v),this.__weakMapData__,e("c",T)),this}),toString:e(function(){return"[object WeakMap]"})}),s(y.prototype,n,e("c","WeakMap"))}),jS=Ft((Q,$)=>{$.exports=nV()()?WeakMap:XV()}),JV=Ft((Q,$)=>{$.exports=function(c,g,P){if(typeof Array.prototype.findIndex=="function")return c.findIndex(g,P);if(typeof g!="function")throw new TypeError("predicate must be a function");var S=Object(c),t=S.length;if(t===0)return-1;for(var e=0;e{var c=U1(),g=vx(),P=zd(),S=zg(),t=yx(),e=eV(),r=rV(),{float32:a,fract32:n}=aT(),o=jS(),i=xb(),s=JV(),f=` +`]),_&&(mt.frag=mt.frag.replace("smoothstep","smoothStep"),yt.frag=yt.frag.replace("smoothstep","smoothStep")),this.drawCircle=k(mt)}A.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},A.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},A.prototype.draw=function(){for(var k=this,w=arguments.length,R=new Array(w),O=0;OTt)?pe.tree=x(fe,{bounds:oe}):Tt&&Tt.length&&(pe.tree=Tt),pe.tree){var Te={primitive:"points",usage:"static",data:pe.tree,type:"uint32"};pe.elements?pe.elements(Te):pe.elements=H.elements(Te)}var He=P.float32(fe);Lt({data:He,usage:"dynamic"});var Ge=P.fract32(fe,He);return Mt({data:Ge,usage:"dynamic"}),ee({data:new Uint8Array(ve),type:"uint8",usage:"stream"}),fe}},{marker:function(fe,pe,se){var Tt=pe.activation;if(Tt.forEach(function(Ge){return Ge&&Ge.destroy&&Ge.destroy()}),Tt.length=0,!fe||typeof fe[0]=="number"){var Lt=k.addMarker(fe);Tt[Lt]=!0}else{for(var Mt=[],ee=0,ve=Math.min(fe.length,pe.count);ee=0)return j;var V;if(k instanceof Uint8Array||k instanceof Uint8ClampedArray)V=k;else{V=new Uint8Array(k.length);for(var H=0,F=k.length;HO*4&&(this.tooManyColors=!0),this.updatePalette(R),j.length===1?j[0]:j},A.prototype.updatePalette=function(k){if(!this.tooManyColors){var w=this.maxColors,R=this.paletteTexture,O=Math.ceil(k.length*.25/w);if(O>1){k=k.slice();for(var j=k.length*.25%w;j{Z.exports=c,Z.exports.default=c;function c(H,F,U){U=U||2;var W=F&&F.length,q=W?F[0]*U:H.length,J=g(H,0,q,U,!0),lt=[];if(!J||J.next===J.prev)return lt;var yt,mt,st,tt,dt,rt,at;if(W&&(J=n(H,F,J,U)),H.length>80*U){yt=st=H[0],mt=tt=H[1];for(var vt=U;vtst&&(st=dt),rt>tt&&(tt=rt);at=Math.max(st-yt,tt-mt),at=at!==0?32767/at:0}return S(J,lt,U,yt,mt,at,0),lt}function g(H,F,U,W,q){var J,lt;if(q===V(H,F,U,W)>0)for(J=F;J=F;J-=W)lt=R(J,H[J],H[J+1],lt);return lt&&P(lt,lt.next)&&(O(lt),lt=lt.next),lt}function I(H,F){if(!H)return H;F||(F=H);var U=H,W;do if(W=!1,!U.steiner&&(P(U,U.next)||_(U.prev,U,U.next)===0)){if(O(U),U=F=U.prev,U===U.next)break;W=!0}else U=U.next;while(W||U!==F);return F}function S(H,F,U,W,q,J,lt){if(H){!lt&&J&&x(H,W,q,J);for(var yt=H,mt,st;H.prev!==H.next;){if(mt=H.prev,st=H.next,J?e(H,W,q,J):t(H)){F.push(mt.i/U|0),F.push(H.i/U|0),F.push(st.i/U|0),O(H),H=st.next,yt=st.next;continue}if(H=st,H===yt){lt?lt===1?(H=r(I(H),F,U),S(H,F,U,W,q,J,2)):lt===2&&a(H,F,U,W,q,J):S(I(H),F,U,W,q,J,1);break}}}}function t(H){var F=H.prev,U=H,W=H.next;if(_(F,U,W)>=0)return!1;for(var q=F.x,J=U.x,lt=W.x,yt=F.y,mt=U.y,st=W.y,tt=qJ?q>lt?q:lt:J>lt?J:lt,at=yt>mt?yt>st?yt:st:mt>st?mt:st,vt=W.next;vt!==F;){if(vt.x>=tt&&vt.x<=rt&&vt.y>=dt&&vt.y<=at&&u(q,yt,J,mt,lt,st,vt.x,vt.y)&&_(vt.prev,vt,vt.next)>=0)return!1;vt=vt.next}return!0}function e(H,F,U,W){var q=H.prev,J=H,lt=H.next;if(_(q,J,lt)>=0)return!1;for(var yt=q.x,mt=J.x,st=lt.x,tt=q.y,dt=J.y,rt=lt.y,at=ytmt?yt>st?yt:st:mt>st?mt:st,Y=tt>dt?tt>rt?tt:rt:dt>rt?dt:rt,ft=v(at,vt,F,U,W),ut=v(it,Y,F,U,W),kt=H.prevZ,It=H.nextZ;kt&&kt.z>=ft&&It&&It.z<=ut;){if(kt.x>=at&&kt.x<=it&&kt.y>=vt&&kt.y<=Y&&kt!==q&&kt!==lt&&u(yt,tt,mt,dt,st,rt,kt.x,kt.y)&&_(kt.prev,kt,kt.next)>=0||(kt=kt.prevZ,It.x>=at&&It.x<=it&&It.y>=vt&&It.y<=Y&&It!==q&&It!==lt&&u(yt,tt,mt,dt,st,rt,It.x,It.y)&&_(It.prev,It,It.next)>=0))return!1;It=It.nextZ}for(;kt&&kt.z>=ft;){if(kt.x>=at&&kt.x<=it&&kt.y>=vt&&kt.y<=Y&&kt!==q&&kt!==lt&&u(yt,tt,mt,dt,st,rt,kt.x,kt.y)&&_(kt.prev,kt,kt.next)>=0)return!1;kt=kt.prevZ}for(;It&&It.z<=ut;){if(It.x>=at&&It.x<=it&&It.y>=vt&&It.y<=Y&&It!==q&&It!==lt&&u(yt,tt,mt,dt,st,rt,It.x,It.y)&&_(It.prev,It,It.next)>=0)return!1;It=It.nextZ}return!0}function r(H,F,U){var W=H;do{var q=W.prev,J=W.next.next;!P(q,J)&&M(q,W,W.next,J)&&p(q,J)&&p(J,q)&&(F.push(q.i/U|0),F.push(W.i/U|0),F.push(J.i/U|0),O(W),O(W.next),W=H=J),W=W.next}while(W!==H);return I(W)}function a(H,F,U,W,q,J){var lt=H;do{for(var yt=lt.next.next;yt!==lt.prev;){if(lt.i!==yt.i&&b(lt,yt)){var mt=w(lt,yt);lt=I(lt,lt.next),mt=I(mt,mt.next),S(lt,F,U,W,q,J,0),S(mt,F,U,W,q,J,0);return}yt=yt.next}lt=lt.next}while(lt!==H)}function n(H,F,U,W){var q=[],J,lt,yt,mt,st;for(J=0,lt=F.length;J=U.next.y&&U.next.y!==U.y){var yt=U.x+(q-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(yt<=W&&yt>J&&(J=yt,lt=U.x=U.x&&U.x>=st&&W!==U.x&&u(qlt.x||U.x===lt.x&&f(lt,U)))&&(lt=U,dt=rt)),U=U.next;while(U!==mt);return lt}function f(H,F){return _(H.prev,H,F.prev)<0&&_(F.next,H,H.next)<0}function x(H,F,U,W){var q=H;do q.z===0&&(q.z=v(q.x,q.y,F,U,W)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==H);q.prevZ.nextZ=null,q.prevZ=null,y(q)}function y(H){var F,U,W,q,J,lt,yt,mt,st=1;do{for(U=H,H=null,J=null,lt=0;U;){for(lt++,W=U,yt=0,F=0;F0||mt>0&&W;)yt!==0&&(mt===0||!W||U.z<=W.z)?(q=U,U=U.nextZ,yt--):(q=W,W=W.nextZ,mt--),J?J.nextZ=q:H=q,q.prevZ=J,J=q;U=W}J.nextZ=null,st*=2}while(lt>1);return H}function v(H,F,U,W,q){return H=(H-U)*q|0,F=(F-W)*q|0,H=(H|H<<8)&16711935,H=(H|H<<4)&252645135,H=(H|H<<2)&858993459,H=(H|H<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,H|F<<1}function T(H){var F=H,U=H;do(F.x=(H-lt)*(J-yt)&&(H-lt)*(W-yt)>=(U-lt)*(F-yt)&&(U-lt)*(J-yt)>=(q-lt)*(W-yt)}function b(H,F){return H.next.i!==F.i&&H.prev.i!==F.i&&!h(H,F)&&(p(H,F)&&p(F,H)&&k(H,F)&&(_(H.prev,H,F.prev)||_(H,F.prev,F))||P(H,F)&&_(H.prev,H,H.next)>0&&_(F.prev,F,F.next)>0)}function _(H,F,U){return(F.y-H.y)*(U.x-F.x)-(F.x-H.x)*(U.y-F.y)}function P(H,F){return H.x===F.x&&H.y===F.y}function M(H,F,U,W){var q=A(_(H,F,U)),J=A(_(H,F,W)),lt=A(_(U,W,H)),yt=A(_(U,W,F));return!!(q!==J&<!==yt||q===0&&C(H,U,F)||J===0&&C(H,W,F)||lt===0&&C(U,H,W)||yt===0&&C(U,F,W))}function C(H,F,U){return F.x<=Math.max(H.x,U.x)&&F.x>=Math.min(H.x,U.x)&&F.y<=Math.max(H.y,U.y)&&F.y>=Math.min(H.y,U.y)}function A(H){return H>0?1:H<0?-1:0}function h(H,F){var U=H;do{if(U.i!==H.i&&U.next.i!==H.i&&U.i!==F.i&&U.next.i!==F.i&&M(U,U.next,H,F))return!0;U=U.next}while(U!==H);return!1}function p(H,F){return _(H.prev,H,H.next)<0?_(H,F,H.next)>=0&&_(H,H.prev,F)>=0:_(H,F,H.prev)<0||_(H,H.next,F)<0}function k(H,F){var U=H,W=!1,q=(H.x+F.x)/2,J=(H.y+F.y)/2;do U.y>J!=U.next.y>J&&U.next.y!==U.y&&q<(U.next.x-U.x)*(J-U.y)/(U.next.y-U.y)+U.x&&(W=!W),U=U.next;while(U!==H);return W}function w(H,F){var U=new j(H.i,H.x,H.y),W=new j(F.i,F.x,F.y),q=H.next,J=F.prev;return H.next=F,F.prev=H,U.next=q,q.prev=U,W.next=U,U.prev=W,J.next=W,W.prev=J,W}function R(H,F,U,W){var q=new j(H,F,U);return W?(q.next=W.next,q.prev=W,W.next.prev=q,W.next=q):(q.prev=q,q.next=q),q}function O(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function j(H,F,U){this.i=H,this.x=F,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}c.deviation=function(H,F,U,W){var q=F&&F.length,J=q?F[0]*U:H.length,lt=Math.abs(V(H,0,J,U));if(q)for(var yt=0,mt=F.length;yt0&&(W+=H[q-1].length,U.holes.push(W))}return U}}),AV=Dt((Q,Z)=>{var c=yx();Z.exports=g;function g(I,S,t){if(!I||I.length==null)throw Error("Argument should be an array");S==null&&(S=1),t==null&&(t=c(I,S));for(var e=0;e{Z.exports=function(){var c,g;if(typeof WeakMap!="function")return!1;try{c=new WeakMap([[g={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(c)!=="[object WeakMap]"||typeof c.set!="function"||c.set({},1)!==c||typeof c.delete!="function"||typeof c.has!="function"||c.get(g)!=="one")}}),SV=Dt((Q,Z)=>{Z.exports=function(){}}),$1=Dt((Q,Z)=>{var c=SV()();Z.exports=function(g){return g!==c&&g!==null}}),VS=Dt((Q,Z)=>{var c=Object.create,g=Object.getPrototypeOf,I={};Z.exports=function(){var S=Object.setPrototypeOf,t=arguments[0]||c;return typeof S!="function"?!1:g(S(t(null),I))===I}}),HS=Dt((Q,Z)=>{var c=$1(),g={function:!0,object:!0};Z.exports=function(I){return c(I)&&g[typeof I]||!1}}),Mv=Dt((Q,Z)=>{var c=$1();Z.exports=function(g){if(!c(g))throw new TypeError("Cannot use null or undefined");return g}}),EV=Dt((Q,Z)=>{var c=Object.create,g;VS()()||(g=WS()),Z.exports=function(){var I,S,t;return!g||g.level!==1?c:(I={},S={},t={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){if(e==="__proto__"){S[e]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}S[e]=t}),Object.defineProperties(I,S),Object.defineProperty(g,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:I}),function(e,r){return c(e===null?I:e,r)})}()}),WS=Dt((Q,Z)=>{var c=HS(),g=Mv(),I=Object.prototype.isPrototypeOf,S=Object.defineProperty,t={configurable:!0,enumerable:!1,writable:!0,value:void 0},e;e=function(r,a){if(g(r),a===null||c(a))return r;throw new TypeError("Prototype must be null or an object")},Z.exports=function(r){var a,n;return r?(r.level===2?r.set?(n=r.set,a=function(o,i){return n.call(e(o,i),i),o}):a=function(o,i){return e(o,i).__proto__=i,o}:a=function o(i,l){var f;return e(i,l),f=I.call(o.nullPolyfill,i),f&&delete o.nullPolyfill.__proto__,l===null&&(l=o.nullPolyfill),i.__proto__=l,f&&S(o.nullPolyfill,"__proto__",t),i},Object.defineProperty(a,"level",{configurable:!1,enumerable:!1,writable:!1,value:r.level})):null}(function(){var r=Object.create(null),a={},n,o=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(o){try{n=o.set,n.call(r,a)}catch{}if(Object.getPrototypeOf(r)===a)return{set:n,level:2}}return r.__proto__=a,Object.getPrototypeOf(r)===a?{level:2}:(r={},r.__proto__=a,Object.getPrototypeOf(r)===a?{level:1}:!1)}()),EV()}),dT=Dt((Q,Z)=>{Z.exports=VS()()?Object.setPrototypeOf:WS()}),CV=Dt((Q,Z)=>{var c=HS();Z.exports=function(g){if(!c(g))throw new TypeError(g+" is not an Object");return g}}),LV=Dt((Q,Z)=>{var c=Object.create(null),g=Math.random;Z.exports=function(){var I;do I=g().toString(36).slice(2);while(c[I]);return I}}),bx=Dt((Q,Z)=>{var c=void 0;Z.exports=function(g){return g!==c&&g!==null}}),pT=Dt((Q,Z)=>{var c=bx(),g={object:!0,function:!0,undefined:!0};Z.exports=function(I){return c(I)?hasOwnProperty.call(g,typeof I):!1}}),PV=Dt((Q,Z)=>{var c=pT();Z.exports=function(g){if(!c(g))return!1;try{return g.constructor?g.constructor.prototype===g:!1}catch{return!1}}}),IV=Dt((Q,Z)=>{var c=PV();Z.exports=function(g){if(typeof g!="function"||!hasOwnProperty.call(g,"length"))return!1;try{if(typeof g.length!="number"||typeof g.call!="function"||typeof g.apply!="function")return!1}catch{return!1}return!c(g)}}),qS=Dt((Q,Z)=>{var c=IV(),g=/^\s*class[\s{/}]/,I=Function.prototype.toString;Z.exports=function(S){return!(!c(S)||g.test(I.call(S)))}}),zV=Dt((Q,Z)=>{Z.exports=function(){var c=Object.assign,g;return typeof c!="function"?!1:(g={foo:"raz"},c(g,{bar:"dwa"},{trzy:"trzy"}),g.foo+g.bar+g.trzy==="razdwatrzy")}}),OV=Dt((Q,Z)=>{Z.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}),DV=Dt((Q,Z)=>{var c=$1(),g=Object.keys;Z.exports=function(I){return g(c(I)?Object(I):I)}}),FV=Dt((Q,Z)=>{Z.exports=OV()()?Object.keys:DV()}),RV=Dt((Q,Z)=>{var c=FV(),g=Mv(),I=Math.max;Z.exports=function(S,t){var e,r,a=I(arguments.length,2),n;for(S=Object(g(S)),n=function(o){try{S[o]=t[o]}catch(i){e||(e=i)}},r=1;r{Z.exports=zV()()?Object.assign:RV()}),$S=Dt((Q,Z)=>{var c=$1(),g=Array.prototype.forEach,I=Object.create,S=function(t,e){var r;for(r in t)e[r]=t[r]};Z.exports=function(t){var e=I(null);return g.call(arguments,function(r){c(r)&&S(Object(r),e)}),e}}),BV=Dt((Q,Z)=>{var c="razdwatrzy";Z.exports=function(){return typeof c.contains!="function"?!1:c.contains("dwa")===!0&&c.contains("foo")===!1}}),NV=Dt((Q,Z)=>{var c=String.prototype.indexOf;Z.exports=function(g){return c.call(this,g,arguments[1])>-1}}),ZS=Dt((Q,Z)=>{Z.exports=BV()()?String.prototype.contains:NV()}),Sv=Dt((Q,Z)=>{var c=bx(),g=qS(),I=mT(),S=$S(),t=ZS(),e=Z.exports=function(r,a){var n,o,i,l,f;return arguments.length<2||typeof r!="string"?(l=a,a=r,r=null):l=arguments[2],c(r)?(n=t.call(r,"c"),o=t.call(r,"e"),i=t.call(r,"w")):(n=i=!0,o=!1),f={value:a,configurable:n,enumerable:o,writable:i},l?I(S(l),f):f};e.gs=function(r,a,n){var o,i,l,f;return typeof r!="string"?(l=n,n=a,a=r,r=null):l=arguments[3],c(a)?g(a)?c(n)?g(n)||(l=n,n=void 0):n=void 0:(l=a,a=n=void 0):a=void 0,c(r)?(o=t.call(r,"c"),i=t.call(r,"e")):(o=!0,i=!1),f={get:a,set:n,configurable:o,enumerable:i},l?I(S(l),f):f}}),A3=Dt((Q,Z)=>{var c=Object.prototype.toString,g=c.call(function(){return arguments}());Z.exports=function(I){return c.call(I)===g}}),M3=Dt((Q,Z)=>{var c=Object.prototype.toString,g=c.call("");Z.exports=function(I){return typeof I=="string"||I&&typeof I=="object"&&(I instanceof String||c.call(I)===g)||!1}}),jV=Dt((Q,Z)=>{Z.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}),UV=Dt((Q,Z)=>{var c=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};Z.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return c()}try{return __global__||c()}finally{delete Object.prototype.__global__}}()}),S3=Dt((Q,Z)=>{Z.exports=jV()()?globalThis:UV()}),VV=Dt((Q,Z)=>{var c=S3(),g={object:!0,symbol:!0};Z.exports=function(){var I=c.Symbol,S;if(typeof I!="function")return!1;S=I("test symbol");try{String(S)}catch{return!1}return!(!g[typeof I.iterator]||!g[typeof I.toPrimitive]||!g[typeof I.toStringTag])}}),HV=Dt((Q,Z)=>{Z.exports=function(c){return c?typeof c=="symbol"?!0:!c.constructor||c.constructor.name!=="Symbol"?!1:c[c.constructor.toStringTag]==="Symbol":!1}}),GS=Dt((Q,Z)=>{var c=HV();Z.exports=function(g){if(!c(g))throw new TypeError(g+" is not a symbol");return g}}),WV=Dt((Q,Z)=>{var c=Sv(),g=Object.create,I=Object.defineProperty,S=Object.prototype,t=g(null);Z.exports=function(e){for(var r=0,a,n;t[e+(r||"")];)++r;return e+=r||"",t[e]=!0,a="@@"+e,I(S,a,c.gs(null,function(o){n||(n=!0,I(this,a,c(o)),n=!1)})),a}}),qV=Dt((Q,Z)=>{var c=Sv(),g=S3().Symbol;Z.exports=function(I){return Object.defineProperties(I,{hasInstance:c("",g&&g.hasInstance||I("hasInstance")),isConcatSpreadable:c("",g&&g.isConcatSpreadable||I("isConcatSpreadable")),iterator:c("",g&&g.iterator||I("iterator")),match:c("",g&&g.match||I("match")),replace:c("",g&&g.replace||I("replace")),search:c("",g&&g.search||I("search")),species:c("",g&&g.species||I("species")),split:c("",g&&g.split||I("split")),toPrimitive:c("",g&&g.toPrimitive||I("toPrimitive")),toStringTag:c("",g&&g.toStringTag||I("toStringTag")),unscopables:c("",g&&g.unscopables||I("unscopables"))})}}),$V=Dt((Q,Z)=>{var c=Sv(),g=GS(),I=Object.create(null);Z.exports=function(S){return Object.defineProperties(S,{for:c(function(t){return I[t]?I[t]:I[t]=S(String(t))}),keyFor:c(function(t){var e;g(t);for(e in I)if(I[e]===t)return e})})}}),ZV=Dt((Q,Z)=>{var c=Sv(),g=GS(),I=S3().Symbol,S=WV(),t=qV(),e=$V(),r=Object.create,a=Object.defineProperties,n=Object.defineProperty,o,i,l;if(typeof I=="function")try{String(I()),l=!0}catch{}else I=null;i=function(f){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return o(f)},Z.exports=o=function f(x){var y;if(this instanceof f)throw new TypeError("Symbol is not a constructor");return l?I(x):(y=r(i.prototype),x=x===void 0?"":String(x),a(y,{__description__:c("",x),__name__:c("",S(x))}))},t(o),e(o),a(i.prototype,{constructor:c(o),toString:c("",function(){return this.__name__})}),a(o.prototype,{toString:c(function(){return"Symbol ("+g(this).__description__+")"}),valueOf:c(function(){return g(this)})}),n(o.prototype,o.toPrimitive,c("",function(){var f=g(this);return typeof f=="symbol"?f:f.toString()})),n(o.prototype,o.toStringTag,c("c","Symbol")),n(i.prototype,o.toStringTag,c("c",o.prototype[o.toStringTag])),n(i.prototype,o.toPrimitive,c("c",o.prototype[o.toPrimitive]))}),Z1=Dt((Q,Z)=>{Z.exports=VV()()?S3().Symbol:ZV()}),GV=Dt((Q,Z)=>{var c=Mv();Z.exports=function(){return c(this).length=0,this}}),yb=Dt((Q,Z)=>{Z.exports=function(c){if(typeof c!="function")throw new TypeError(c+" is not a function");return c}}),YV=Dt((Q,Z)=>{var c=bx(),g=pT(),I=Object.prototype.toString;Z.exports=function(S){if(!c(S))return null;if(g(S)){var t=S.toString;if(typeof t!="function"||t===I)return null}try{return""+S}catch{return null}}}),KV=Dt((Q,Z)=>{Z.exports=function(c){try{return c.toString()}catch{try{return String(c)}catch{return null}}}}),XV=Dt((Q,Z)=>{var c=KV(),g=/[\n\r\u2028\u2029]/g;Z.exports=function(I){var S=c(I);return S===null?"":(S.length>100&&(S=S.slice(0,99)+"…"),S=S.replace(g,function(t){switch(t){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}}),YS=Dt((Q,Z)=>{var c=bx(),g=pT(),I=YV(),S=XV(),t=function(e,r){return e.replace("%v",S(r))};Z.exports=function(e,r,a){if(!g(a))throw new TypeError(t(r,e));if(!c(e)){if("default"in a)return a.default;if(a.isOptional)return null}var n=I(a.errorMessage);throw c(n)||(n=r),new TypeError(t(n,e))}}),JV=Dt((Q,Z)=>{var c=YS(),g=bx();Z.exports=function(I){return g(I)?I:c(I,"Cannot use %v",arguments[1])}}),QV=Dt((Q,Z)=>{var c=YS(),g=qS();Z.exports=function(I){return g(I)?I:c(I,"%v is not a plain function",arguments[1])}}),tH=Dt((Q,Z)=>{Z.exports=function(){var c=Array.from,g,I;return typeof c!="function"?!1:(g=["raz","dwa"],I=c(g),!!(I&&I!==g&&I[1]==="dwa"))}}),eH=Dt((Q,Z)=>{var c=Object.prototype.toString,g=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);Z.exports=function(I){return typeof I=="function"&&g(c.call(I))}}),rH=Dt((Q,Z)=>{Z.exports=function(){var c=Math.sign;return typeof c!="function"?!1:c(10)===1&&c(-20)===-1}}),nH=Dt((Q,Z)=>{Z.exports=function(c){return c=Number(c),isNaN(c)||c===0?c:c>0?1:-1}}),iH=Dt((Q,Z)=>{Z.exports=rH()()?Math.sign:nH()}),aH=Dt((Q,Z)=>{var c=iH(),g=Math.abs,I=Math.floor;Z.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:c(S)*I(g(S)))}}),oH=Dt((Q,Z)=>{var c=aH(),g=Math.max;Z.exports=function(I){return g(0,c(I))}}),sH=Dt((Q,Z)=>{var c=Z1().iterator,g=A3(),I=eH(),S=oH(),t=yb(),e=Mv(),r=$1(),a=M3(),n=Array.isArray,o=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},l=Object.defineProperty;Z.exports=function(f){var x=arguments[1],y=arguments[2],v,T,u,b,_,P,M,C,A,h;if(f=Object(e(f)),r(x)&&t(x),!this||this===Array||!I(this)){if(!x){if(g(f))return _=f.length,_!==1?Array.apply(null,f):(b=new Array(1),b[0]=f[0],b);if(n(f)){for(b=new Array(_=f.length),T=0;T<_;++T)b[T]=f[T];return b}}b=[]}else v=this;if(!n(f)){if((A=f[c])!==void 0){for(M=t(A).call(f),v&&(b=new v),C=M.next(),T=0;!C.done;)h=x?o.call(x,y,C.value,T):C.value,v?(i.value=h,l(b,T,i)):b[T]=h,C=M.next(),++T;_=T}else if(a(f)){for(_=f.length,v&&(b=new v),T=0,u=0;T<_;++T)h=f[T],T+1<_&&(P=h.charCodeAt(0),P>=55296&&P<=56319&&(h+=f[++T])),h=x?o.call(x,y,h,u):h,v?(i.value=h,l(b,u,i)):b[u]=h,++u;_=u}}if(_===void 0)for(_=S(f.length),v&&(b=new v(_)),T=0;T<_;++T)h=x?o.call(x,y,f[T],T):f[T],v?(i.value=h,l(b,T,i)):b[T]=h;return v&&(i.value=null,b.length=_),b}}),lH=Dt((Q,Z)=>{Z.exports=tH()()?Array.from:sH()}),uH=Dt((Q,Z)=>{var c=lH(),g=mT(),I=Mv();Z.exports=function(S){var t=Object(I(S)),e=arguments[1],r=Object(arguments[2]);if(t!==S&&!e)return t;var a={};return e?c(e,function(n){(r.ensure||n in S)&&(a[n]=S[n])}):g(a,S),a}}),cH=Dt((Q,Z)=>{var c=yb(),g=Mv(),I=Function.prototype.bind,S=Function.prototype.call,t=Object.keys,e=Object.prototype.propertyIsEnumerable;Z.exports=function(r,a){return function(n,o){var i,l=arguments[2],f=arguments[3];return n=Object(g(n)),c(o),i=t(n),f&&i.sort(typeof f=="function"?I.call(f,n):void 0),typeof r!="function"&&(r=i[r]),S.call(r,i,function(x,y){return e.call(n,x)?S.call(o,l,n[x],x,n,y):a})}}}),hH=Dt((Q,Z)=>{Z.exports=cH()("forEach")}),fH=Dt((Q,Z)=>{var c=yb(),g=hH(),I=Function.prototype.call;Z.exports=function(S,t){var e={},r=arguments[2];return c(t),g(S,function(a,n,o,i){e[n]=I.call(t,r,a,n,o,i)}),e}}),dH=Dt((Q,Z)=>{var c=bx(),g=JV(),I=QV(),S=uH(),t=$S(),e=fH(),r=Function.prototype.bind,a=Object.defineProperty,n=Object.prototype.hasOwnProperty,o;o=function(i,l,f){var x=g(l)&&I(l.value),y;return y=S(l),delete y.writable,delete y.value,y.get=function(){return!f.overwriteDefinition&&n.call(this,i)?x:(l.value=r.call(x,f.resolveContext?f.resolveContext(this):this),a(this,i,l),this[i])},y},Z.exports=function(i){var l=t(arguments[1]);return c(l.resolveContext)&&I(l.resolveContext),e(i,function(f,x){return o(x,f,l)})}}),KS=Dt((Q,Z)=>{var c=GV(),g=mT(),I=yb(),S=Mv(),t=Sv(),e=dH(),r=Z1(),a=Object.defineProperty,n=Object.defineProperties,o;Z.exports=o=function(i,l){if(!(this instanceof o))throw new TypeError("Constructor requires 'new'");n(this,{__list__:t("w",S(i)),__context__:t("w",l),__nextIndex__:t("w",0)}),l&&(I(l.on),l.on("_add",this._onAdd),l.on("_delete",this._onDelete),l.on("_clear",this._onClear))},delete o.prototype.constructor,n(o.prototype,g({_next:t(function(){var i;if(this.__list__){if(this.__redo__&&(i=this.__redo__.shift(),i!==void 0))return i;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){a(this,"__redo__",t("c",[i]));return}this.__redo__.forEach(function(l,f){l>=i&&(this.__redo__[f]=++l)},this),this.__redo__.push(i)}}),_onDelete:t(function(i){var l;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(l=this.__redo__.indexOf(i),l!==-1&&this.__redo__.splice(l,1),this.__redo__.forEach(function(f,x){f>i&&(this.__redo__[x]=--f)},this)))}),_onClear:t(function(){this.__redo__&&c.call(this.__redo__),this.__nextIndex__=0})}))),a(o.prototype,r.iterator,t(function(){return this}))}),pH=Dt((Q,Z)=>{var c=dT(),g=ZS(),I=Sv(),S=Z1(),t=KS(),e=Object.defineProperty,r;r=Z.exports=function(a,n){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");t.call(this,a),n?g.call(n,"key+value")?n="key+value":g.call(n,"key")?n="key":n="value":n="value",e(this,"__kind__",I("",n))},c&&c(r,t),delete r.prototype.constructor,r.prototype=Object.create(t.prototype,{_resolve:I(function(a){return this.__kind__==="value"?this.__list__[a]:this.__kind__==="key+value"?[a,this.__list__[a]]:a})}),e(r.prototype,S.toStringTag,I("c","Array Iterator"))}),mH=Dt((Q,Z)=>{var c=dT(),g=Sv(),I=Z1(),S=KS(),t=Object.defineProperty,e;e=Z.exports=function(r){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");r=String(r),S.call(this,r),t(this,"__length__",g("",r.length))},c&&c(e,S),delete e.prototype.constructor,e.prototype=Object.create(S.prototype,{_next:g(function(){if(this.__list__){if(this.__nextIndex__=55296&&n<=56319?a+this.__list__[this.__nextIndex__++]:a)})}),t(e.prototype,I.toStringTag,g("c","String Iterator"))}),gH=Dt((Q,Z)=>{var c=A3(),g=$1(),I=M3(),S=Z1().iterator,t=Array.isArray;Z.exports=function(e){return g(e)?t(e)||I(e)||c(e)?!0:typeof e[S]=="function":!1}}),vH=Dt((Q,Z)=>{var c=gH();Z.exports=function(g){if(!c(g))throw new TypeError(g+" is not iterable");return g}}),XS=Dt((Q,Z)=>{var c=A3(),g=M3(),I=pH(),S=mH(),t=vH(),e=Z1().iterator;Z.exports=function(r){return typeof t(r)[e]=="function"?r[e]():c(r)?new I(r):g(r)?new S(r):new I(r)}}),yH=Dt((Q,Z)=>{var c=A3(),g=yb(),I=M3(),S=XS(),t=Array.isArray,e=Function.prototype.call,r=Array.prototype.some;Z.exports=function(a,n){var o,i=arguments[2],l,f,x,y,v,T,u;if(t(a)||c(a)?o="array":I(a)?o="string":a=S(a),g(n),f=function(){x=!0},o==="array"){r.call(a,function(b){return e.call(n,i,b,f),x});return}if(o==="string"){for(v=a.length,y=0;y=55296&&u<=56319&&(T+=a[++y])),e.call(n,i,T,f),!x);++y);return}for(l=a.next();!l.done;){if(e.call(n,i,l.value,f),x)return;l=a.next()}}}),xH=Dt((Q,Z)=>{Z.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}),_H=Dt((Q,Z)=>{var c=$1(),g=dT(),I=CV(),S=Mv(),t=LV(),e=Sv(),r=XS(),a=yH(),n=Z1().toStringTag,o=xH(),i=Array.isArray,l=Object.defineProperty,f=Object.prototype.hasOwnProperty,x=Object.getPrototypeOf,y;Z.exports=y=function(){var v=arguments[0],T;if(!(this instanceof y))throw new TypeError("Constructor requires 'new'");return T=o&&g&&WeakMap!==y?g(new WeakMap,x(this)):this,c(v)&&(i(v)||(v=r(v))),l(T,"__weakMapData__",e("c","$weakMap$"+t())),v&&a(v,function(u){S(u),T.set(u[0],u[1])}),T},o&&(g&&g(y,WeakMap),y.prototype=Object.create(WeakMap.prototype,{constructor:e(y)})),Object.defineProperties(y.prototype,{delete:e(function(v){return f.call(I(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(f.call(I(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return f.call(I(v),this.__weakMapData__)}),set:e(function(v,T){return l(I(v),this.__weakMapData__,e("c",T)),this}),toString:e(function(){return"[object WeakMap]"})}),l(y.prototype,n,e("c","WeakMap"))}),JS=Dt((Q,Z)=>{Z.exports=MV()()?WeakMap:_H()}),bH=Dt((Q,Z)=>{Z.exports=function(c,g,I){if(typeof Array.prototype.findIndex=="function")return c.findIndex(g,I);if(typeof g!="function")throw new TypeError("predicate must be a function");var S=Object(c),t=S.length;if(t===0)return-1;for(var e=0;e{var c=U1(),g=yx(),I=Sd(),S=Ig(),t=xx(),e=TV(),r=AV(),{float32:a,fract32:n}=fT(),o=JS(),i=vb(),l=bH(),f=` precision highp float; attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; @@ -2662,7 +2703,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`;$.exports=b;function b(_,C){if(!(this instanceof b))return new b(_,C);if(typeof _=="function"?(C||(C={}),C.regl=_):C=_,C.length&&(C.positions=C),_=C.regl,!_.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=_._gl,this.regl=_,this.passes=[],this.shaders=b.shaders.has(_)?b.shaders.get(_):b.shaders.set(_,b.createShaders(_)).get(_),this.update(C)}b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new o,b.createShaders=function(_){let C=_.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),M={primitive:"triangle strip",instances:_.prop("count"),count:4,offset:0,uniforms:{miterMode:(h,p)=>p.join==="round"?2:1,miterLimit:_.prop("miterLimit"),scale:_.prop("scale"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),thickness:_.prop("thickness"),dashTexture:_.prop("dashTexture"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),dashLength:_.prop("dashLength"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight],depth:_.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(h,p)=>!p.overlay},stencil:{enable:!1},scissor:{enable:!0,box:_.prop("viewport")},viewport:_.prop("viewport")},E=_(P({vert:f,frag:x,attributes:{lineEnd:{buffer:C,divisor:0,stride:8,offset:0},lineTop:{buffer:C,divisor:0,stride:8,offset:4},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},M)),A;try{A=_(P({cull:{enable:!0,face:"back"},vert:T,frag:u,attributes:{lineEnd:{buffer:C,divisor:0,stride:8,offset:0},lineTop:{buffer:C,divisor:0,stride:8,offset:4},aColor:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:_.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},M))}catch{A=E}return{fill:_({primitive:"triangle",elements:(h,p)=>p.triangles,offset:0,vert:y,frag:v,uniforms:{scale:_.prop("scale"),color:_.prop("fill"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight]},attributes:{position:{buffer:_.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8}},blend:M.blend,depth:{enable:!1},scissor:M.scissor,stencil:M.stencil,viewport:M.viewport}),rect:E,miter:A}},b.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},b.prototype.render=function(..._){_.length&&this.update(..._),this.draw()},b.prototype.draw=function(..._){return(_.length?_:this.passes).forEach((C,M)=>{if(C&&Array.isArray(C))return this.draw(...C);typeof C=="number"&&(C=this.passes[C]),C&&C.count>1&&C.opacity&&(this.regl._refresh(),C.fill&&C.triangles&&C.triangles.length>2&&this.shaders.fill(C),C.thickness&&(C.scale[0]*C.viewport.width>b.precisionThreshold||C.scale[1]*C.viewport.height>b.precisionThreshold?this.shaders.rect(C):C.join==="rect"||!C.join&&(C.thickness<=2||C.count>=b.maxPoints)?this.shaders.rect(C):this.shaders.miter(C)))}),this},b.prototype.update=function(_){if(!_)return;_.length!=null?typeof _[0]=="number"&&(_=[{positions:_}]):Array.isArray(_)||(_=[_]);let{regl:C,gl:M}=this;if(_.forEach((A,h)=>{let p=this.passes[h];if(A!==void 0){if(A===null){this.passes[h]=null;return}if(typeof A[0]=="number"&&(A={positions:A}),A=S(A,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),p||(this.passes[h]=p={id:h,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:C.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:C.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:C.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:C.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},A=P({},b.defaults,A)),A.thickness!=null&&(p.thickness=parseFloat(A.thickness)),A.opacity!=null&&(p.opacity=parseFloat(A.opacity)),A.miterLimit!=null&&(p.miterLimit=parseFloat(A.miterLimit)),A.overlay!=null&&(p.overlay=!!A.overlay,hpt-st),X=[],lt=0,yt=p.hole!=null?p.hole[0]:null;if(yt!=null){let pt=s(q,st=>st>=yt);q=q.slice(0,pt),q.push(yt)}for(let pt=0;ptrt-yt+(q[pt]-lt)),dt=e(st,tt);dt=dt.map(rt=>rt+lt+(rt+lt{_.colorBuffer.destroy(),_.positionBuffer.destroy(),_.dashTexture.destroy()}),this.passes.length=0,this}}),QV=Ft((Q,$)=>{var c=vx(),g=U1(),P=ES(),S=zg(),t=zd(),e=yx(),{float32:r,fract32:a}=aT();$.exports=o;var n=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function o(i,s){if(typeof i=="function"?(s||(s={}),s.regl=i):s=i,s.length&&(s.positions=s),i=s.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let f=i._gl,x,y,v,T,u,b,_={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},C=[];return T=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),y=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),u=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),b=i.buffer({usage:"static",type:"float",data:n}),h(s),x=i({vert:` +`;Z.exports=b;function b(_,P){if(!(this instanceof b))return new b(_,P);if(typeof _=="function"?(P||(P={}),P.regl=_):P=_,P.length&&(P.positions=P),_=P.regl,!_.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=_._gl,this.regl=_,this.passes=[],this.shaders=b.shaders.has(_)?b.shaders.get(_):b.shaders.set(_,b.createShaders(_)).get(_),this.update(P)}b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new o,b.createShaders=function(_){let P=_.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),M={primitive:"triangle strip",instances:_.prop("count"),count:4,offset:0,uniforms:{miterMode:(h,p)=>p.join==="round"?2:1,miterLimit:_.prop("miterLimit"),scale:_.prop("scale"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),thickness:_.prop("thickness"),dashTexture:_.prop("dashTexture"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),dashLength:_.prop("dashLength"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight],depth:_.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(h,p)=>!p.overlay},stencil:{enable:!1},scissor:{enable:!0,box:_.prop("viewport")},viewport:_.prop("viewport")},C=_(I({vert:f,frag:x,attributes:{lineEnd:{buffer:P,divisor:0,stride:8,offset:0},lineTop:{buffer:P,divisor:0,stride:8,offset:4},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},M)),A;try{A=_(I({cull:{enable:!0,face:"back"},vert:T,frag:u,attributes:{lineEnd:{buffer:P,divisor:0,stride:8,offset:0},lineTop:{buffer:P,divisor:0,stride:8,offset:4},aColor:{buffer:_.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:_.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:_.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},M))}catch{A=C}return{fill:_({primitive:"triangle",elements:(h,p)=>p.triangles,offset:0,vert:y,frag:v,uniforms:{scale:_.prop("scale"),color:_.prop("fill"),scaleFract:_.prop("scaleFract"),translateFract:_.prop("translateFract"),translate:_.prop("translate"),opacity:_.prop("opacity"),pixelRatio:_.context("pixelRatio"),id:_.prop("id"),viewport:(h,p)=>[p.viewport.x,p.viewport.y,h.viewportWidth,h.viewportHeight]},attributes:{position:{buffer:_.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:_.prop("positionFractBuffer"),stride:8,offset:8}},blend:M.blend,depth:{enable:!1},scissor:M.scissor,stencil:M.stencil,viewport:M.viewport}),rect:C,miter:A}},b.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},b.prototype.render=function(..._){_.length&&this.update(..._),this.draw()},b.prototype.draw=function(..._){return(_.length?_:this.passes).forEach((P,M)=>{if(P&&Array.isArray(P))return this.draw(...P);typeof P=="number"&&(P=this.passes[P]),P&&P.count>1&&P.opacity&&(this.regl._refresh(),P.fill&&P.triangles&&P.triangles.length>2&&this.shaders.fill(P),P.thickness&&(P.scale[0]*P.viewport.width>b.precisionThreshold||P.scale[1]*P.viewport.height>b.precisionThreshold?this.shaders.rect(P):P.join==="rect"||!P.join&&(P.thickness<=2||P.count>=b.maxPoints)?this.shaders.rect(P):this.shaders.miter(P)))}),this},b.prototype.update=function(_){if(!_)return;_.length!=null?typeof _[0]=="number"&&(_=[{positions:_}]):Array.isArray(_)||(_=[_]);let{regl:P,gl:M}=this;if(_.forEach((A,h)=>{let p=this.passes[h];if(A!==void 0){if(A===null){this.passes[h]=null;return}if(typeof A[0]=="number"&&(A={positions:A}),A=S(A,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),p||(this.passes[h]=p={id:h,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:P.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:P.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:P.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:P.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},A=I({},b.defaults,A)),A.thickness!=null&&(p.thickness=parseFloat(A.thickness)),A.opacity!=null&&(p.opacity=parseFloat(A.opacity)),A.miterLimit!=null&&(p.miterLimit=parseFloat(A.miterLimit)),A.overlay!=null&&(p.overlay=!!A.overlay,hmt-st),J=[],lt=0,yt=p.hole!=null?p.hole[0]:null;if(yt!=null){let mt=l(q,st=>st>=yt);q=q.slice(0,mt),q.push(yt)}for(let mt=0;mtrt-yt+(q[mt]-lt)),dt=e(st,tt);dt=dt.map(rt=>rt+lt+(rt+lt{_.colorBuffer.destroy(),_.positionBuffer.destroy(),_.dashTexture.destroy()}),this.passes.length=0,this}}),wH=Dt((Q,Z)=>{var c=yx(),g=U1(),I=jS(),S=Ig(),t=Sd(),e=xx(),{float32:r,fract32:a}=fT();Z.exports=o;var n=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function o(i,l){if(typeof i=="function"?(l||(l={}),l.regl=i):l=i,l.length&&(l.positions=l),i=l.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let f=i._gl,x,y,v,T,u,b,_={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},P=[];return T=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),y=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),u=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),b=i.buffer({usage:"static",type:"float",data:n}),h(l),x=i({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2706,10 +2747,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:i.prop("range"),lineWidth:i.prop("lineWidth"),capSize:i.prop("capSize"),opacity:i.prop("opacity"),scale:i.prop("scale"),translate:i.prop("translate"),scaleFract:i.prop("scaleFract"),translateFract:i.prop("translateFract"),viewport:(k,w)=>[w.viewport.x,w.viewport.y,k.viewportWidth,k.viewportHeight]},attributes:{color:{buffer:T,offset:(k,w)=>w.offset*4,divisor:1},position:{buffer:y,offset:(k,w)=>w.offset*8,divisor:1},positionFract:{buffer:v,offset:(k,w)=>w.offset*8,divisor:1},error:{buffer:u,offset:(k,w)=>w.offset*16,divisor:1},direction:{buffer:b,stride:24,offset:0},lineOffset:{buffer:b,stride:24,offset:8},capOffset:{buffer:b,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:n.length}),t(M,{update:h,draw:E,destroy:p,regl:i,gl:f,canvas:f.canvas,groups:C}),M;function M(k){k?h(k):k===null&&p(),E()}function E(k){if(typeof k=="number")return A(k);k&&!Array.isArray(k)&&(k=[k]),i._refresh(),C.forEach((w,R)=>{if(w){if(k&&(k[R]?w.draw=!0:w.draw=!1),!w.draw){w.draw=!0;return}A(R)}})}function A(k){typeof k=="number"&&(k=C[k]),k!=null&&k&&k.count&&k.color&&k.opacity&&k.positions&&k.positions.length>1&&(k.scaleRatio=[k.scale[0]*k.viewport.width,k.scale[1]*k.viewport.height],x(k),k.after&&k.after(k))}function h(k){if(!k)return;k.length!=null?typeof k[0]=="number"&&(k=[{positions:k}]):Array.isArray(k)||(k=[k]);let w=0,R=0;if(M.groups=C=k.map((V,H)=>{let F=C[H];if(V)typeof V=="function"?V={after:V}:typeof V[0]=="number"&&(V={positions:V});else return F;return V=S(V,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),F||(C[H]=F={id:H,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},V=t({},_,V)),P(F,V,[{lineWidth:U=>+U*.5,capSize:U=>+U*.5,opacity:parseFloat,errors:U=>(U=e(U),R+=U.length,U),positions:(U,W)=>(U=e(U,"float64"),W.count=Math.floor(U.length/2),W.bounds=c(U,2),W.offset=w,w+=W.count,U)},{color:(U,W)=>{let q=W.count;if(U||(U="transparent"),!Array.isArray(U)||typeof U[0]=="number"){let lt=U;U=Array(q);for(let yt=0;yt{let X=W.bounds;return U||(U=X),W.scale=[1/(U[2]-U[0]),1/(U[3]-U[1])],W.translate=[-U[0],-U[1]],W.scaleFract=a(W.scale),W.translateFract=a(W.translate),U},viewport:U=>{let W;return Array.isArray(U)?W={x:U[0],y:U[1],width:U[2]-U[0],height:U[3]-U[1]}:U?(W={x:U.x||U.left||0,y:U.y||U.top||0},U.right?W.width=U.right-W.x:W.width=U.w||U.width||0,U.bottom?W.height=U.bottom-W.y:W.height=U.h||U.height||0):W={x:0,y:0,width:f.drawingBufferWidth,height:f.drawingBufferHeight},W}}]),F}),w||R){let V=C.reduce((W,q,X)=>W+(q?q.count:0),0),H=new Float64Array(V*2),F=new Uint8Array(V*4),U=new Float32Array(V*4);C.forEach((W,q)=>{if(!W)return;let{positions:X,count:lt,offset:yt,color:pt,errors:st}=W;lt&&(F.set(pt,yt*4),U.set(st,yt*4),H.set(X,yt*2))});var O=r(H);y(O);var N=a(H,O);v(N),T(F),u(U)}}function p(){y.destroy(),v.destroy(),T.destroy(),u.destroy(),b.destroy()}}}),tH=Ft((Q,$)=>{var c=/[\'\"]/;$.exports=function(g){return g?(c.test(g.charAt(0))&&(g=g.substr(1)),c.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}}),VS=Ft((Q,$)=>{$.exports=["inherit","initial","unset"]}),HS=Ft((Q,$)=>{$.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}),WS=Ft((Q,$)=>{$.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}),qS=Ft((Q,$)=>{$.exports=["normal","italic","oblique"]}),ZS=Ft((Q,$)=>{$.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}),eH=Ft((Q,$)=>{function c(S,t){if(typeof S!="string")return[S];var e=[S];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",n=!!t.flat;r.forEach(function(s){var f=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),x=[];function y(v,T,u){var b=e.push(v.slice(s[0].length,-s[1].length))-1;return x.push(b),a+b+a}e.forEach(function(v,T){for(var u,b=0;v!=u;)if(u=v,v=v.replace(f,y),b++>1e4)throw Error("References have circular dependency. Please, check them.");e[T]=v}),x=x.reverse(),e=e.map(function(v){return x.forEach(function(T){v=v.replace(new RegExp("(\\"+a+T+"\\"+a+")","g"),s[0]+"$1"+s[1])}),v})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function i(s,f,x){for(var y=[],v,T=0;v=o.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");y.push(s.slice(0,v.index)),y.push(i(f[v[1]],f)),s=s.slice(v.index+v[0].length)}return y.push(s),y}return n?e:i(e[0],e)}function g(S,t){if(t&&t.flat){var e=t&&t.escape||"___",r=S[0],a;if(!r)return"";for(var n=new RegExp("\\"+e+"([0-9]+)\\"+e),o=0;r!=a;){if(o++>1e4)throw Error("Circular references in "+S);a=r,r=r.replace(n,i)}return r}return S.reduce(function s(f,x){return Array.isArray(x)&&(x=x.reduce(s,"")),f+x},"");function i(s,f){if(S[f]==null)throw Error("Reference "+f+"is undefined");return S[f]}}function P(S,t){return Array.isArray(S)?g(S,t):c(S,t)}P.parse=c,P.stringify=g,$.exports=P}),rH=Ft((Q,$)=>{var c=eH();$.exports=function(g,P,S){if(g==null)throw Error("First argument should be a string");if(P==null)throw Error("Separator should be a string or a RegExp");S?(typeof S=="string"||Array.isArray(S))&&(S={ignore:S}):S={},S.escape==null&&(S.escape=!0),S.ignore==null?S.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof S.ignore=="string"&&(S.ignore=[S.ignore]),S.ignore=S.ignore.map(function(s){return s.length===1&&(s=s+s),s}));var t=c.parse(g,{flat:!0,brackets:S.ignore}),e=t[0],r=e.split(P);if(S.escape){for(var a=[],n=0;n{$.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}),$S=Ft((Q,$)=>{var c=nH();$.exports={isSize:function(g){return/^[\d\.]/.test(g)||g.indexOf("/")!==-1||c.indexOf(g)!==-1}}}),iH=Ft((Q,$)=>{var c=tH(),g=VS(),P=HS(),S=WS(),t=qS(),e=ZS(),r=rH(),a=$S().isSize;$.exports=o;var n=o.cache={};function o(s){if(typeof s!="string")throw new Error("Font argument must be a string.");if(n[s])return n[s];if(s==="")throw new Error("Cannot parse an empty string.");if(P.indexOf(s)!==-1)return n[s]={system:s};for(var f={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},x=r(s,/\s+/),y;y=x.shift();){if(g.indexOf(y)!==-1)return["style","variant","weight","stretch"].forEach(function(T){f[T]=y}),n[s]=f;if(t.indexOf(y)!==-1){f.style=y;continue}if(y==="normal"||y==="small-caps"){f.variant=y;continue}if(e.indexOf(y)!==-1){f.stretch=y;continue}if(S.indexOf(y)!==-1){f.weight=y;continue}if(a(y)){var v=r(y,"/");if(f.size=v[0],v[1]!=null?f.lineHeight=i(v[1]):x[0]==="/"&&(x.shift(),f.lineHeight=i(x.shift())),!x.length)throw new Error("Missing required font-family.");return f.family=r(x.join(" "),/\s*,\s*/).map(c),n[s]=f}throw new Error("Unknown or unsupported font token: "+y)}throw new Error("Missing required font-size.")}function i(s){var f=parseFloat(s);return f.toString()===s?f:s}}),GS=Ft((Q,$)=>{var c=zg(),g=$S().isSize,P=s(VS()),S=s(HS()),t=s(WS()),e=s(qS()),r=s(ZS()),a={normal:1,"small-caps":1},n={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},o={size:"1rem",family:"serif"};$.exports=function(f){if(f=c(f,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),f.system)return f.system&&i(f.system,S),f.system;if(i(f.style,e),i(f.variant,a),i(f.weight,t),i(f.stretch,r),f.size==null&&(f.size=o.size),typeof f.size=="number"&&(f.size+="px"),!g)throw Error("Bad size value `"+f.size+"`");f.family||(f.family=o.family),Array.isArray(f.family)&&(f.family.length||(f.family=[o.family]),f.family=f.family.map(function(y){return n[y]?y:'"'+y+'"'}).join(", "));var x=[];return x.push(f.style),f.variant!==f.style&&x.push(f.variant),f.weight!==f.variant&&f.weight!==f.style&&x.push(f.weight),f.stretch!==f.weight&&f.stretch!==f.variant&&f.stretch!==f.style&&x.push(f.stretch),x.push(f.size+(f.lineHeight==null||f.lineHeight==="normal"||f.lineHeight+""=="1"?"":"/"+f.lineHeight)),x.push(f.family),x.filter(Boolean).join(" ")};function i(f,x){if(f&&!x[f]&&!P[f])throw Error("Unknown keyword `"+f+"`");return f}function s(f){for(var x={},y=0;y{$.exports={parse:iH(),stringify:GS()}}),oH=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?$.exports=g():c.createREGL=g()})(Q,function(){var c=function(_e,kr){for(var Lr=Object.keys(kr),Dn=0;Dn1&&kr===Lr&&(kr==='"'||kr==="'"))return['"'+r(_e.substr(1,_e.length-2))+'"'];var Dn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(_e);if(Dn)return a(_e.substr(0,Dn.index)).concat(a(Dn[1])).concat(a(_e.substr(Dn.index+Dn[0].length)));var oi=_e.split(".");if(oi.length===1)return['"'+r(_e)+'"'];for(var Jn=[],mn=0;mn"u"?1:window.devicePixelRatio,ma=!1,Za={},Ra=function(cn){},ta=function(){};if(typeof kr=="string"?Lr=document.querySelector(kr):typeof kr=="object"&&(b(kr)?Lr=kr:_(kr)?(Jn=kr,oi=Jn.canvas):("gl"in kr?Jn=kr.gl:"canvas"in kr?oi=M(kr.canvas):"container"in kr&&(Dn=M(kr.container)),"attributes"in kr&&(mn=kr.attributes),"extensions"in kr&&(ni=C(kr.extensions)),"optionalExtensions"in kr&&(Yi=C(kr.optionalExtensions)),"onDone"in kr&&(Ra=kr.onDone),"profile"in kr&&(ma=!!kr.profile),"pixelRatio"in kr&&(Ui=+kr.pixelRatio),"cachedCode"in kr&&(Za=kr.cachedCode))),Lr&&(Lr.nodeName.toLowerCase()==="canvas"?oi=Lr:Dn=Lr),!Jn){if(!oi){var bi=T(Dn||document.body,Ra,Ui);if(!bi)return null;oi=bi.canvas,ta=bi.onDestroy}mn.premultipliedAlpha===void 0&&(mn.premultipliedAlpha=!0),Jn=u(oi,mn)}return Jn?{gl:Jn,canvas:oi,container:Dn,extensions:ni,optionalExtensions:Yi,pixelRatio:Ui,profile:ma,cachedCode:Za,onDone:Ra,onDestroy:ta}:(ta(),Ra("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(_e,kr){var Lr={};function Dn(mn){var ni=mn.toLowerCase(),Yi;try{Yi=Lr[ni]=_e.getExtension(ni)}catch{}return!!Yi}for(var oi=0;oi65535)<<4,_e>>>=kr,Lr=(_e>255)<<3,_e>>>=Lr,kr|=Lr,Lr=(_e>15)<<2,_e>>>=Lr,kr|=Lr,Lr=(_e>3)<<1,_e>>>=Lr,kr|=Lr,kr|_e>>1}function U(){var _e=h(8,function(){return[]});function kr(Jn){var mn=H(Jn),ni=_e[F(mn)>>2];return ni.length>0?ni.pop():new ArrayBuffer(mn)}function Lr(Jn){_e[F(Jn.byteLength)>>2].push(Jn)}function Dn(Jn,mn){var ni=null;switch(Jn){case p:ni=new Int8Array(kr(mn),0,mn);break;case k:ni=new Uint8Array(kr(mn),0,mn);break;case w:ni=new Int16Array(kr(2*mn),0,mn);break;case R:ni=new Uint16Array(kr(2*mn),0,mn);break;case O:ni=new Int32Array(kr(4*mn),0,mn);break;case N:ni=new Uint32Array(kr(4*mn),0,mn);break;case V:ni=new Float32Array(kr(4*mn),0,mn);break;default:return null}return ni.length!==mn?ni.subarray(0,mn):ni}function oi(Jn){Lr(Jn.buffer)}return{alloc:kr,free:Lr,allocType:Dn,freeType:oi}}var W=U();W.zero=U();var q=3408,X=3410,lt=3411,yt=3412,pt=3413,st=3414,tt=3415,dt=33901,rt=33902,at=3379,vt=3386,it=34921,Y=36347,ft=36348,ut=35661,wt=35660,zt=34930,Pt=36349,Wt=34076,Ht=34024,Jt=7936,ge=7937,he=7938,de=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,te=34067,ve=34069,oe=33984,Te=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,Hr=16384,br=function(_e,kr){var Lr=1;kr.ext_texture_filter_anisotropic&&(Lr=_e.getParameter(se));var Dn=1,oi=1;kr.webgl_draw_buffers&&(Dn=_e.getParameter(Lt),oi=_e.getParameter(Tt));var Jn=!!kr.oes_texture_float;if(Jn){var mn=_e.createTexture();_e.bindTexture(Mt,mn),_e.texImage2D(Mt,0,Te,1,1,0,Te,He,null);var ni=_e.createFramebuffer();if(_e.bindFramebuffer(cr,ni),_e.framebufferTexture2D(cr,jr,Mt,mn,0),_e.bindTexture(Mt,null),_e.checkFramebufferStatus(cr)!==ur)Jn=!1;else{_e.viewport(0,0,1,1),_e.clearColor(1,0,0,1),_e.clear(Hr);var Yi=W.allocType(He,4);_e.readPixels(0,0,1,1,Te,He,Yi),_e.getError()?Jn=!1:(_e.deleteFramebuffer(ni),_e.deleteTexture(mn),Jn=Yi[0]===1),W.freeType(Yi)}}var Ui=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ma=!0;if(!Ui){var Za=_e.createTexture(),Ra=W.allocType(Ge,36);_e.activeTexture(oe),_e.bindTexture(te,Za),_e.texImage2D(ve,0,Te,3,3,0,Te,Ge,Ra),W.freeType(Ra),_e.bindTexture(te,null),_e.deleteTexture(Za),ma=!_e.getError()}return{colorBits:[_e.getParameter(X),_e.getParameter(lt),_e.getParameter(yt),_e.getParameter(pt)],depthBits:_e.getParameter(st),stencilBits:_e.getParameter(tt),subpixelBits:_e.getParameter(q),extensions:Object.keys(kr).filter(function(ta){return!!kr[ta]}),maxAnisotropic:Lr,maxDrawbuffers:Dn,maxColorAttachments:oi,pointSizeDims:_e.getParameter(dt),lineWidthDims:_e.getParameter(rt),maxViewportDims:_e.getParameter(vt),maxCombinedTextureUnits:_e.getParameter(ut),maxCubeMapSize:_e.getParameter(Wt),maxRenderbufferSize:_e.getParameter(Ht),maxTextureUnits:_e.getParameter(zt),maxTextureSize:_e.getParameter(at),maxAttributes:_e.getParameter(it),maxVertexUniforms:_e.getParameter(Y),maxVertexTextureUnits:_e.getParameter(wt),maxVaryingVectors:_e.getParameter(ft),maxFragmentUniforms:_e.getParameter(Pt),glsl:_e.getParameter(de),renderer:_e.getParameter(ge),vendor:_e.getParameter(Jt),version:_e.getParameter(he),readFloat:Jn,npotTextureCube:ma}},Kr=function(_e){return _e instanceof Uint8Array||_e instanceof Uint16Array||_e instanceof Uint32Array||_e instanceof Int8Array||_e instanceof Int16Array||_e instanceof Int32Array||_e instanceof Float32Array||_e instanceof Float64Array||_e instanceof Uint8ClampedArray};function rn(_e){return!!_e&&typeof _e=="object"&&Array.isArray(_e.shape)&&Array.isArray(_e.stride)&&typeof _e.offset=="number"&&_e.shape.length===_e.stride.length&&(Array.isArray(_e.data)||Kr(_e.data))}var Ce=function(_e){return Object.keys(_e).map(function(kr){return _e[kr]})},Gt={shape:re,flatten:Nt};function ne(_e,kr,Lr){for(var Dn=0;Dn0){var ja;if(Array.isArray(Nn[0])){ua=qn(Nn);for(var gi=1,ti=1;ti0){if(typeof gi[0]=="number"){var Wi=W.allocType(Qn.dtype,gi.length);Qr(Wi,gi),ua(Wi,Ma),W.freeType(Wi)}else if(Array.isArray(gi[0])||Kr(gi[0])){fa=qn(gi);var $i=ii(gi,fa,Qn.dtype);ua($i,Ma),W.freeType($i)}}}else if(rn(gi)){fa=gi.shape;var xa=gi.stride,Io=0,wo=0,va=0,Ia=0;fa.length===1?(Io=fa[0],wo=1,va=xa[0],Ia=0):fa.length===2&&(Io=fa[0],wo=fa[1],va=xa[0],Ia=xa[1]);var po=Array.isArray(gi.data)?Qn.dtype:_r(gi.data),Co=W.allocType(po,Io*wo);Cn(Co,gi.data,Io,wo,va,Ia,gi.offset),ua(Co,Ma),W.freeType(Co)}return Aa}return Ii||Aa(cn),Aa._reglType="buffer",Aa._buffer=Qn,Aa.subdata=ja,Lr.profile&&(Aa.stats=Qn.stats),Aa.destroy=function(){Ra(Qn)},Aa}function bi(){Ce(Jn).forEach(function(cn){cn.buffer=_e.createBuffer(),_e.bindBuffer(cn.type,cn.buffer),_e.bufferData(cn.type,cn.persistentData||cn.byteLength,cn.usage)})}return Lr.profile&&(kr.getTotalBufferSize=function(){var cn=0;return Object.keys(Jn).forEach(function(Nn){cn+=Jn[Nn].stats.size}),cn}),{create:ta,createStream:Yi,destroyStream:Ui,clear:function(){Ce(Jn).forEach(Ra),ni.forEach(Ra)},getBuffer:function(cn){return cn&&cn._buffer instanceof mn?cn._buffer:null},restore:bi,_initBuffer:Za}}var An=0,ci=0,xi=1,Li=1,Oi=4,Zi=4,li={points:An,point:ci,lines:xi,line:Li,triangles:Oi,triangle:Zi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},La=0,Wa=1,ze=4,Pe=5120,Rr=5121,qr=5122,$r=5123,Br=5124,Gr=5125,fn=34963,an=35040,Ee=35044;function dr(_e,kr,Lr,Dn){var oi={},Jn=0,mn={uint8:Rr,uint16:$r};kr.oes_element_index_uint&&(mn.uint32=Gr);function ni(bi){this.id=Jn++,oi[this.id]=this,this.buffer=bi,this.primType=ze,this.vertCount=0,this.type=0}ni.prototype.bind=function(){this.buffer.bind()};var Yi=[];function Ui(bi){var cn=Yi.pop();return cn||(cn=new ni(Lr.create(null,fn,!0,!1)._buffer)),Za(cn,bi,an,-1,-1,0,0),cn}function ma(bi){Yi.push(bi)}function Za(bi,cn,Nn,Ii,_i,Qn,Aa){bi.buffer.bind();var ua;if(cn){var ja=Aa;!Aa&&(!Kr(cn)||rn(cn)&&!Kr(cn.data))&&(ja=kr.oes_element_index_uint?Gr:$r),Lr._initBuffer(bi.buffer,cn,Nn,ja,3)}else _e.bufferData(fn,Qn,Nn),bi.buffer.dtype=ua||Rr,bi.buffer.usage=Nn,bi.buffer.dimension=3,bi.buffer.byteLength=Qn;if(ua=Aa,!Aa){switch(bi.buffer.dtype){case Rr:case Pe:ua=Rr;break;case $r:case qr:ua=$r;break;case Gr:case Br:ua=Gr;break}bi.buffer.dtype=ua}bi.type=ua;var gi=_i;gi<0&&(gi=bi.buffer.byteLength,ua===$r?gi>>=1:ua===Gr&&(gi>>=2)),bi.vertCount=gi;var ti=Ii;if(Ii<0){ti=ze;var Ma=bi.buffer.dimension;Ma===1&&(ti=La),Ma===2&&(ti=Wa),Ma===3&&(ti=ze)}bi.primType=ti}function Ra(bi){Dn.elementsCount--,delete oi[bi.id],bi.buffer.destroy(),bi.buffer=null}function ta(bi,cn){var Nn=Lr.create(null,fn,!0),Ii=new ni(Nn._buffer);Dn.elementsCount++;function _i(Qn){if(!Qn)Nn(),Ii.primType=ze,Ii.vertCount=0,Ii.type=Rr;else if(typeof Qn=="number")Nn(Qn),Ii.primType=ze,Ii.vertCount=Qn|0,Ii.type=Rr;else{var Aa=null,ua=Ee,ja=-1,gi=-1,ti=0,Ma=0;Array.isArray(Qn)||Kr(Qn)||rn(Qn)?Aa=Qn:("data"in Qn&&(Aa=Qn.data),"usage"in Qn&&(ua=Ci[Qn.usage]),"primitive"in Qn&&(ja=li[Qn.primitive]),"count"in Qn&&(gi=Qn.count|0),"type"in Qn&&(Ma=mn[Qn.type]),"length"in Qn?ti=Qn.length|0:(ti=gi,Ma===$r||Ma===qr?ti*=2:(Ma===Gr||Ma===Br)&&(ti*=4))),Za(Ii,Aa,ua,ja,gi,ti,Ma)}return _i}return _i(bi),_i._reglType="elements",_i._elements=Ii,_i.subdata=function(Qn,Aa){return Nn.subdata(Qn,Aa),_i},_i.destroy=function(){Ra(Ii)},_i}return{create:ta,createStream:Ui,destroyStream:ma,getElements:function(bi){return typeof bi=="function"&&bi._elements instanceof ni?bi._elements:null},clear:function(){Ce(oi).forEach(Ra)}}}var Vr=new Float32Array(1),vn=new Uint32Array(Vr.buffer),Fn=5123;function Xn(_e){for(var kr=W.allocType(Fn,_e.length),Lr=0;Lr<_e.length;++Lr)if(isNaN(_e[Lr]))kr[Lr]=65535;else if(_e[Lr]===1/0)kr[Lr]=31744;else if(_e[Lr]===-1/0)kr[Lr]=64512;else{Vr[0]=_e[Lr];var Dn=vn[0],oi=Dn>>>31<<15,Jn=(Dn<<1>>>24)-127,mn=Dn>>13&1023;if(Jn<-24)kr[Lr]=oi;else if(Jn<-14){var ni=-14-Jn;kr[Lr]=oi+(mn+1024>>ni)}else Jn>15?kr[Lr]=oi+31744:kr[Lr]=oi+(Jn+15<<10)+mn}return kr}function Pn(_e){return Array.isArray(_e)||Kr(_e)}var Sn=34467,Zn=3553,Ea=34067,Ri=34069,Ja=6408,Xa=6406,Do=6407,go=6409,Fo=6410,za=32854,xs=32855,os=36194,cl=32819,Zo=32820,Ks=33635,ss=34042,hl=6402,tl=34041,Bl=35904,cs=35906,Ps=36193,Po=33776,Ts=33777,kl=33778,Hl=33779,Xl=35986,Us=35987,Ca=34798,fo=35840,qs=35841,Jl=35842,Jo=35843,$l=36196,ol=5121,Pl=5123,Ru=5125,lo=5126,As=10242,zs=10243,au=10497,fl=33071,rs=33648,Mu=10240,Gu=10241,bl=9728,Dl=9729,Ql=9984,ru=9985,oc=9986,mh=9987,Jc=33170,oh=4352,Uf=4353,Cf=4354,Fl=34046,Bc=3317,Vf=37440,fc=37441,sc=37443,dc=37444,sh=33984,cu=[Ql,oc,ru,mh],lc=[0,go,Fo,Do,Ja],nl={};nl[go]=nl[Xa]=nl[hl]=1,nl[tl]=nl[Fo]=2,nl[Do]=nl[Bl]=3,nl[Ja]=nl[cs]=4;function Gl(_e){return"[object "+_e+"]"}var Sh=Gl("HTMLCanvasElement"),Pc=Gl("OffscreenCanvas"),Uh=Gl("CanvasRenderingContext2D"),xu=Gl("ImageBitmap"),Id=Gl("HTMLImageElement"),el=Gl("HTMLVideoElement"),$d=Object.keys(le).concat([Sh,Pc,Uh,xu,Id,el]),zl=[];zl[ol]=1,zl[lo]=4,zl[Ps]=2,zl[Pl]=2,zl[Ru]=4;var ts=[];ts[za]=2,ts[xs]=2,ts[os]=2,ts[tl]=4,ts[Po]=.5,ts[Ts]=.5,ts[kl]=1,ts[Hl]=1,ts[Xl]=.5,ts[Us]=1,ts[Ca]=1,ts[fo]=.5,ts[qs]=.25,ts[Jl]=.5,ts[Jo]=.25,ts[$l]=.5;function lf(_e){return Array.isArray(_e)&&(_e.length===0||typeof _e[0]=="number")}function lh(_e){if(!Array.isArray(_e))return!1;var kr=_e.length;return!(kr===0||!Pn(_e[0]))}function ec(_e){return Object.prototype.toString.call(_e)}function Hf(_e){return ec(_e)===Sh}function Vh(_e){return ec(_e)===Pc}function xf(_e){return ec(_e)===Uh}function uc(_e){return ec(_e)===xu}function md(_e){return ec(_e)===Id}function Kf(_e){return ec(_e)===el}function _f(_e){if(!_e)return!1;var kr=ec(_e);return $d.indexOf(kr)>=0?!0:lf(_e)||lh(_e)||rn(_e)}function Hh(_e){return le[Object.prototype.toString.call(_e)]|0}function Wf(_e,kr){var Lr=kr.length;switch(_e.type){case ol:case Pl:case Ru:case lo:var Dn=W.allocType(_e.type,Lr);Dn.set(kr),_e.data=Dn;break;case Ps:_e.data=Xn(kr);break}}function qf(_e,kr){return W.allocType(_e.type===Ps?lo:_e.type,kr)}function uh(_e,kr){_e.type===Ps?(_e.data=Xn(kr),W.freeType(kr)):_e.data=kr}function Xf(_e,kr,Lr,Dn,oi,Jn){for(var mn=_e.width,ni=_e.height,Yi=_e.channels,Ui=mn*ni*Yi,ma=qf(_e,Ui),Za=0,Ra=0;Ra=1;)ni+=mn*Yi*Yi,Yi/=2;return ni}else return mn*Lr*Dn}function gh(_e,kr,Lr,Dn,oi,Jn,mn){var ni={"don't care":oh,"dont care":oh,nice:Cf,fast:Uf},Yi={repeat:au,clamp:fl,mirror:rs},Ui={nearest:bl,linear:Dl},ma=c({mipmap:mh,"nearest mipmap nearest":Ql,"linear mipmap nearest":ru,"nearest mipmap linear":oc,"linear mipmap linear":mh},Ui),Za={none:0,browser:dc},Ra={uint8:ol,rgba4:cl,rgb565:Ks,"rgb5 a1":Zo},ta={alpha:Xa,luminance:go,"luminance alpha":Fo,rgb:Do,rgba:Ja,rgba4:za,"rgb5 a1":xs,rgb565:os},bi={};kr.ext_srgb&&(ta.srgb=Bl,ta.srgba=cs),kr.oes_texture_float&&(Ra.float32=Ra.float=lo),kr.oes_texture_half_float&&(Ra.float16=Ra["half float"]=Ps),kr.webgl_depth_texture&&(c(ta,{depth:hl,"depth stencil":tl}),c(Ra,{uint16:Pl,uint32:Ru,"depth stencil":ss})),kr.webgl_compressed_texture_s3tc&&c(bi,{"rgb s3tc dxt1":Po,"rgba s3tc dxt1":Ts,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":Hl}),kr.webgl_compressed_texture_atc&&c(bi,{"rgb atc":Xl,"rgba atc explicit alpha":Us,"rgba atc interpolated alpha":Ca}),kr.webgl_compressed_texture_pvrtc&&c(bi,{"rgb pvrtc 4bppv1":fo,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":Jl,"rgba pvrtc 2bppv1":Jo}),kr.webgl_compressed_texture_etc1&&(bi["rgb etc1"]=$l);var cn=Array.prototype.slice.call(_e.getParameter(Sn));Object.keys(bi).forEach(function(Z){var ot=bi[Z];cn.indexOf(ot)>=0&&(ta[Z]=ot)});var Nn=Object.keys(ta);Lr.textureFormats=Nn;var Ii=[];Object.keys(ta).forEach(function(Z){var ot=ta[Z];Ii[ot]=Z});var _i=[];Object.keys(Ra).forEach(function(Z){var ot=Ra[Z];_i[ot]=Z});var Qn=[];Object.keys(Ui).forEach(function(Z){var ot=Ui[Z];Qn[ot]=Z});var Aa=[];Object.keys(ma).forEach(function(Z){var ot=ma[Z];Aa[ot]=Z});var ua=[];Object.keys(Yi).forEach(function(Z){var ot=Yi[Z];ua[ot]=Z});var ja=Nn.reduce(function(Z,ot){var et=ta[ot];return et===go||et===Xa||et===go||et===Fo||et===hl||et===tl||kr.ext_srgb&&(et===Bl||et===cs)?Z[et]=et:et===xs||ot.indexOf("rgba")>=0?Z[et]=Ja:Z[et]=Do,Z},{});function gi(){this.internalformat=Ja,this.format=Ja,this.type=ol,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=dc,this.width=0,this.height=0,this.channels=0}function ti(Z,ot){Z.internalformat=ot.internalformat,Z.format=ot.format,Z.type=ot.type,Z.compressed=ot.compressed,Z.premultiplyAlpha=ot.premultiplyAlpha,Z.flipY=ot.flipY,Z.unpackAlignment=ot.unpackAlignment,Z.colorSpace=ot.colorSpace,Z.width=ot.width,Z.height=ot.height,Z.channels=ot.channels}function Ma(Z,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&(Z.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&(Z.flipY=ot.flipY),"alignment"in ot&&(Z.unpackAlignment=ot.alignment),"colorSpace"in ot&&(Z.colorSpace=Za[ot.colorSpace]),"type"in ot){var et=ot.type;Z.type=Ra[et]}var xt=Z.width,Ut=Z.height,fe=Z.channels,ye=!1;"shape"in ot?(xt=ot.shape[0],Ut=ot.shape[1],ot.shape.length===3&&(fe=ot.shape[2],ye=!0)):("radius"in ot&&(xt=Ut=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Ut=ot.height),"channels"in ot&&(fe=ot.channels,ye=!0)),Z.width=xt|0,Z.height=Ut|0,Z.channels=fe|0;var Yt=!1;if("format"in ot){var ce=ot.format,Se=Z.internalformat=ta[ce];Z.format=ja[Se],ce in Ra&&("type"in ot||(Z.type=Ra[ce])),ce in bi&&(Z.compressed=!0),Yt=!0}!ye&&Yt?Z.channels=nl[Z.format]:ye&&!Yt&&Z.channels!==lc[Z.format]&&(Z.format=Z.internalformat=lc[Z.channels])}}function fa(Z){_e.pixelStorei(Vf,Z.flipY),_e.pixelStorei(fc,Z.premultiplyAlpha),_e.pixelStorei(sc,Z.colorSpace),_e.pixelStorei(Bc,Z.unpackAlignment)}function Wi(){gi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function $i(Z,ot){var et=null;if(_f(ot)?et=ot:ot&&(Ma(Z,ot),"x"in ot&&(Z.xOffset=ot.x|0),"y"in ot&&(Z.yOffset=ot.y|0),_f(ot.data)&&(et=ot.data)),ot.copy){var xt=oi.viewportWidth,Ut=oi.viewportHeight;Z.width=Z.width||xt-Z.xOffset,Z.height=Z.height||Ut-Z.yOffset,Z.needsCopy=!0}else if(!et)Z.width=Z.width||1,Z.height=Z.height||1,Z.channels=Z.channels||4;else if(Kr(et))Z.channels=Z.channels||4,Z.data=et,!("type"in ot)&&Z.type===ol&&(Z.type=Hh(et));else if(lf(et))Z.channels=Z.channels||4,Wf(Z,et),Z.alignment=1,Z.needsFree=!0;else if(rn(et)){var fe=et.data;!Array.isArray(fe)&&Z.type===ol&&(Z.type=Hh(fe));var ye=et.shape,Yt=et.stride,ce,Se,nr,Ye,tr,lr;ye.length===3?(nr=ye[2],lr=Yt[2]):(nr=1,lr=1),ce=ye[0],Se=ye[1],Ye=Yt[0],tr=Yt[1],Z.alignment=1,Z.width=ce,Z.height=Se,Z.channels=nr,Z.format=Z.internalformat=lc[nr],Z.needsFree=!0,Xf(Z,fe,Ye,tr,lr,et.offset)}else if(Hf(et)||Vh(et)||xf(et))Hf(et)||Vh(et)?Z.element=et:Z.element=et.canvas,Z.width=Z.element.width,Z.height=Z.element.height,Z.channels=4;else if(uc(et))Z.element=et,Z.width=et.width,Z.height=et.height,Z.channels=4;else if(md(et))Z.element=et,Z.width=et.naturalWidth,Z.height=et.naturalHeight,Z.channels=4;else if(Kf(et))Z.element=et,Z.width=et.videoWidth,Z.height=et.videoHeight,Z.channels=4;else if(lh(et)){var hr=Z.width||et[0].length,Ve=Z.height||et.length,Xe=Z.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var $e=Gt.shape(et),Cr=1,on=0;on<$e.length;++on)Cr*=$e[on];var hn=qf(Z,Cr);Gt.flatten(et,$e,"",hn),uh(Z,hn),Z.alignment=1,Z.width=hr,Z.height=Ve,Z.channels=Xe,Z.format=Z.internalformat=lc[Xe],Z.needsFree=!0}Z.type===lo||Z.type}function xa(Z,ot,et){var xt=Z.element,Ut=Z.data,fe=Z.internalformat,ye=Z.format,Yt=Z.type,ce=Z.width,Se=Z.height;fa(Z),xt?_e.texImage2D(ot,et,ye,ye,Yt,xt):Z.compressed?_e.compressedTexImage2D(ot,et,fe,ce,Se,0,Ut):Z.needsCopy?(Dn(),_e.copyTexImage2D(ot,et,ye,Z.xOffset,Z.yOffset,ce,Se,0)):_e.texImage2D(ot,et,ye,ce,Se,0,ye,Yt,Ut||null)}function Io(Z,ot,et,xt,Ut){var fe=Z.element,ye=Z.data,Yt=Z.internalformat,ce=Z.format,Se=Z.type,nr=Z.width,Ye=Z.height;fa(Z),fe?_e.texSubImage2D(ot,Ut,et,xt,ce,Se,fe):Z.compressed?_e.compressedTexSubImage2D(ot,Ut,et,xt,Yt,nr,Ye,ye):Z.needsCopy?(Dn(),_e.copyTexSubImage2D(ot,Ut,et,xt,Z.xOffset,Z.yOffset,nr,Ye)):_e.texSubImage2D(ot,Ut,et,xt,nr,Ye,ce,Se,ye)}var wo=[];function va(){return wo.pop()||new Wi}function Ia(Z){Z.needsFree&&W.freeType(Z.data),Wi.call(Z),wo.push(Z)}function po(){gi.call(this),this.genMipmaps=!1,this.mipmapHint=oh,this.mipmask=0,this.images=Array(16)}function Co(Z,ot,et){var xt=Z.images[0]=va();Z.mipmask=1,xt.width=Z.width=ot,xt.height=Z.height=et,xt.channels=Z.channels=4}function ns(Z,ot){var et=null;if(_f(ot))et=Z.images[0]=va(),ti(et,Z),$i(et,ot),Z.mipmask=1;else if(Ma(Z,ot),Array.isArray(ot.mipmap))for(var xt=ot.mipmap,Ut=0;Ut>=Ut,et.height>>=Ut,$i(et,xt[Ut]),Z.mipmask|=1<=0&&!("faces"in ot)&&(Z.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;Z.magFilter=Ui[xt]}var Ut=Z.wrapS,fe=Z.wrapT;if("wrap"in ot){var ye=ot.wrap;typeof ye=="string"?Ut=fe=Yi[ye]:Array.isArray(ye)&&(Ut=Yi[ye[0]],fe=Yi[ye[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Ut=Yi[Yt]}if("wrapT"in ot){var ce=ot.wrapT;fe=Yi[ce]}}if(Z.wrapS=Ut,Z.wrapT=fe,"anisotropic"in ot&&(ot.anisotropic,Z.anisotropic=ot.anisotropic),"mipmap"in ot){var Se=!1;switch(typeof ot.mipmap){case"string":Z.mipmapHint=ni[ot.mipmap],Z.genMipmaps=!0,Se=!0;break;case"boolean":Se=Z.genMipmaps=ot.mipmap;break;case"object":Z.genMipmaps=!1,Se=!0;break}Se&&!("min"in ot)&&(Z.minFilter=Ql)}}function mc(Z,ot){_e.texParameteri(ot,Gu,Z.minFilter),_e.texParameteri(ot,Mu,Z.magFilter),_e.texParameteri(ot,As,Z.wrapS),_e.texParameteri(ot,zs,Z.wrapT),kr.ext_texture_filter_anisotropic&&_e.texParameteri(ot,Fl,Z.anisotropic),Z.genMipmaps&&(_e.hint(Jc,Z.mipmapHint),_e.generateMipmap(ot))}var xc=0,yu={},pu=Lr.maxTextureUnits,ku=Array(pu).map(function(){return null});function No(Z){gi.call(this),this.mipmask=0,this.internalformat=Ja,this.id=xc++,this.refCount=1,this.target=Z,this.texture=_e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new pl,mn.profile&&(this.stats={size:0})}function Tu(Z){_e.activeTexture(sh),_e.bindTexture(Z.target,Z.texture)}function ll(){var Z=ku[0];Z?_e.bindTexture(Z.target,Z.texture):_e.bindTexture(Zn,null)}function Cu(Z){var ot=Z.texture,et=Z.unit,xt=Z.target;et>=0&&(_e.activeTexture(sh+et),_e.bindTexture(xt,null),ku[et]=null),_e.deleteTexture(ot),Z.texture=null,Z.params=null,Z.pixels=null,Z.refCount=0,delete yu[Z.id],Jn.textureCount--}c(No.prototype,{bind:function(){var Z=this;Z.bindCount+=1;var ot=Z.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}ku[et]=Z,ot=et;break}mn.profile&&Jn.maxTextureUnits>tr)-nr,lr.height=lr.height||(et.height>>tr)-Ye,Tu(et),Io(lr,Zn,nr,Ye,tr),ll(),Ia(lr),xt}function fe(ye,Yt){var ce=ye|0,Se=Yt|0||ce;if(ce===et.width&&Se===et.height)return xt;xt.width=et.width=ce,xt.height=et.height=Se,Tu(et);for(var nr=0;et.mipmask>>nr;++nr){var Ye=ce>>nr,tr=Se>>nr;if(!Ye||!tr)break;_e.texImage2D(Zn,nr,et.format,Ye,tr,0,et.format,et.type,null)}return ll(),mn.profile&&(et.stats.size=Eh(et.internalformat,et.type,ce,Se,!1,!1)),xt}return xt(Z,ot),xt.subimage=Ut,xt.resize=fe,xt._reglType="texture2d",xt._texture=et,mn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Lo(Z,ot,et,xt,Ut,fe){var ye=new No(Ea);yu[ye.id]=ye,Jn.cubeCount++;var Yt=new Array(6);function ce(Ye,tr,lr,hr,Ve,Xe){var $e,Cr=ye.texInfo;for(pl.call(Cr),$e=0;$e<6;++$e)Yt[$e]=hs();if(typeof Ye=="number"||!Ye){var on=Ye|0||1;for($e=0;$e<6;++$e)Co(Yt[$e],on,on)}else if(typeof Ye=="object")if(tr)ns(Yt[0],Ye),ns(Yt[1],tr),ns(Yt[2],lr),ns(Yt[3],hr),ns(Yt[4],Ve),ns(Yt[5],Xe);else if(Eu(Cr,Ye),Ma(ye,Ye),"faces"in Ye){var hn=Ye.faces;for($e=0;$e<6;++$e)ti(Yt[$e],ye),ns(Yt[$e],hn[$e])}else for($e=0;$e<6;++$e)ns(Yt[$e],Ye);for(ti(ye,Yt[0]),Cr.genMipmaps?ye.mipmask=(Yt[0].width<<1)-1:ye.mipmask=Yt[0].mipmask,ye.internalformat=Yt[0].internalformat,ce.width=Yt[0].width,ce.height=Yt[0].height,Tu(ye),$e=0;$e<6;++$e)jl(Yt[$e],Ri+$e);for(mc(Cr,Ea),ll(),mn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,Cr.genMipmaps,!0)),ce.format=Ii[ye.internalformat],ce.type=_i[ye.type],ce.mag=Qn[Cr.magFilter],ce.min=Aa[Cr.minFilter],ce.wrapS=ua[Cr.wrapS],ce.wrapT=ua[Cr.wrapT],$e=0;$e<6;++$e)wu(Yt[$e]);return ce}function Se(Ye,tr,lr,hr,Ve){var Xe=lr|0,$e=hr|0,Cr=Ve|0,on=va();return ti(on,ye),on.width=0,on.height=0,$i(on,tr),on.width=on.width||(ye.width>>Cr)-Xe,on.height=on.height||(ye.height>>Cr)-$e,Tu(ye),Io(on,Ri+Ye,Xe,$e,Cr),ll(),Ia(on),ce}function nr(Ye){var tr=Ye|0;if(tr!==ye.width){ce.width=ye.width=tr,ce.height=ye.height=tr,Tu(ye);for(var lr=0;lr<6;++lr)for(var hr=0;ye.mipmask>>hr;++hr)_e.texImage2D(Ri+lr,hr,ye.format,tr>>hr,tr>>hr,0,ye.format,ye.type,null);return ll(),mn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,!1,!0)),ce}}return ce(Z,ot,et,xt,Ut,fe),ce.subimage=Se,ce.resize=nr,ce._reglType="textureCube",ce._texture=ye,mn.profile&&(ce.stats=ye.stats),ce.destroy=function(){ye.decRef()},ce}function Cs(){for(var Z=0;Z>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Ut=0;Ut<6;++Ut)_e.texImage2D(Ri+Ut,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);mc(et.texInfo,et.target)})}function xl(){for(var Z=0;Z=0?wu=!0:Yi.indexOf(pl)>=0&&(wu=!1))),("depthTexture"in No||"depthStencilTexture"in No)&&(ku=!!(No.depthTexture||No.depthStencilTexture)),"depth"in No&&(typeof No.depth=="boolean"?jl=No.depth:(xc=No.depth,Al=!1)),"stencil"in No&&(typeof No.stencil=="boolean"?Al=No.stencil:(yu=No.stencil,jl=!1)),"depthStencil"in No&&(typeof No.depthStencil=="boolean"?jl=Al=No.depthStencil:(pu=No.depthStencil,jl=!1,Al=!1))}var ll=null,Cu=null,_c=null,Lo=null;if(Array.isArray(hs))ll=hs.map(bi);else if(hs)ll=[bi(hs)];else for(ll=new Array(mc),po=0;po0&&(Ia.depth=$i[0].depth,Ia.stencil=$i[0].stencil,Ia.depthStencil=$i[0].depthStencil),$i[va]?$i[va](Ia):$i[va]=ti(Ia)}return c(xa,{width:po,height:po,color:pl})}function Io(wo){var va,Ia=wo|0;if(Ia===xa.width)return xa;var po=xa.color;for(va=0;va=po.byteLength?Co.subdata(po):(Co.destroy(),ti.buffers[wo]=null)),ti.buffers[wo]||(Co=ti.buffers[wo]=oi.create(va,If,!1,!0)),Ia.buffer=oi.getBuffer(Co),Ia.size=Ia.buffer.dimension|0,Ia.normalized=!1,Ia.type=Ia.buffer.dtype,Ia.offset=0,Ia.stride=0,Ia.divisor=0,Ia.state=1,xa[wo]=1}else oi.getBuffer(va)?(Ia.buffer=oi.getBuffer(va),Ia.size=Ia.buffer.dimension|0,Ia.normalized=!1,Ia.type=Ia.buffer.dtype,Ia.offset=0,Ia.stride=0,Ia.divisor=0,Ia.state=1):oi.getBuffer(va.buffer)?(Ia.buffer=oi.getBuffer(va.buffer),Ia.size=(+va.size||Ia.buffer.dimension)|0,Ia.normalized=!!va.normalized||!1,"type"in va?Ia.type=Vn[va.type]:Ia.type=Ia.buffer.dtype,Ia.offset=(va.offset||0)|0,Ia.stride=(va.stride||0)|0,Ia.divisor=(va.divisor||0)|0,Ia.state=1):"x"in va&&(Ia.x=+va.x||0,Ia.y=+va.y||0,Ia.z=+va.z||0,Ia.w=+va.w||0,Ia.state=2)}for(var ns=0;ns1)for(var fa=0;facn&&(cn=Nn.stats.uniformsCount)}),cn},Lr.getMaxAttributesCount=function(){var cn=0;return ma.forEach(function(Nn){Nn.stats.attributesCount>cn&&(cn=Nn.stats.attributesCount)}),cn});function bi(){oi={},Jn={};for(var cn=0;cn>>4&15)+kr.charAt(Dn&15);return Lr}function Ph(_e){for(var kr="",Lr=-1,Dn,oi;++Lr<_e.length;)Dn=_e.charCodeAt(Lr),oi=Lr+1<_e.length?_e.charCodeAt(Lr+1):0,55296<=Dn&&Dn<=56319&&56320<=oi&&oi<=57343&&(Dn=65536+((Dn&1023)<<10)+(oi&1023),Lr++),Dn<=127?kr+=String.fromCharCode(Dn):Dn<=2047?kr+=String.fromCharCode(192|Dn>>>6&31,128|Dn&63):Dn<=65535?kr+=String.fromCharCode(224|Dn>>>12&15,128|Dn>>>6&63,128|Dn&63):Dn<=2097151&&(kr+=String.fromCharCode(240|Dn>>>18&7,128|Dn>>>12&63,128|Dn>>>6&63,128|Dn&63));return kr}function xh(_e){for(var kr=Array(_e.length>>2),Lr=0;Lr>5]|=(_e.charCodeAt(Lr/8)&255)<<24-Lr%32;return kr}function Bu(_e){for(var kr="",Lr=0;Lr<_e.length*32;Lr+=8)kr+=String.fromCharCode(_e[Lr>>5]>>>24-Lr%32&255);return kr}function nu(_e,kr){return _e>>>kr|_e<<32-kr}function _h(_e,kr){return _e>>>kr}function df(_e,kr,Lr){return _e&kr^~_e&Lr}function bh(_e,kr,Lr){return _e&kr^_e&Lr^kr&Lr}function $f(_e){return nu(_e,2)^nu(_e,13)^nu(_e,22)}function mr(_e){return nu(_e,6)^nu(_e,11)^nu(_e,25)}function Ur(_e){return nu(_e,7)^nu(_e,18)^_h(_e,3)}function xn(_e){return nu(_e,17)^nu(_e,19)^_h(_e,10)}var un=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Wn(_e,kr){var Lr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Dn=new Array(64),oi,Jn,mn,ni,Yi,Ui,ma,Za,Ra,ta,bi,cn;for(_e[kr>>5]|=128<<24-kr%32,_e[(kr+64>>9<<4)+15]=kr,Ra=0;Ra<_e.length;Ra+=16){for(oi=Lr[0],Jn=Lr[1],mn=Lr[2],ni=Lr[3],Yi=Lr[4],Ui=Lr[5],ma=Lr[6],Za=Lr[7],ta=0;ta<64;ta++)ta<16?Dn[ta]=_e[ta+Ra]:Dn[ta]=hi(hi(hi(xn(Dn[ta-2]),Dn[ta-7]),Ur(Dn[ta-15])),Dn[ta-16]),bi=hi(hi(hi(hi(Za,mr(Yi)),df(Yi,Ui,ma)),un[ta]),Dn[ta]),cn=hi($f(oi),bh(oi,Jn,mn)),Za=ma,ma=Ui,Ui=Yi,Yi=hi(ni,bi),ni=mn,mn=Jn,Jn=oi,oi=hi(bi,cn);Lr[0]=hi(oi,Lr[0]),Lr[1]=hi(Jn,Lr[1]),Lr[2]=hi(mn,Lr[2]),Lr[3]=hi(ni,Lr[3]),Lr[4]=hi(Yi,Lr[4]),Lr[5]=hi(Ui,Lr[5]),Lr[6]=hi(ma,Lr[6]),Lr[7]=hi(Za,Lr[7])}return Lr}function hi(_e,kr){var Lr=(_e&65535)+(kr&65535),Dn=(_e>>16)+(kr>>16)+(Lr>>16);return Dn<<16|Lr&65535}function ea(_e){return Array.prototype.slice.call(_e)}function pa(_e){return ea(_e).join("")}function Da(_e){var kr=_e&&_e.cache,Lr=0,Dn=[],oi=[],Jn=[];function mn(bi,cn){var Nn=cn&&cn.stable;if(!Nn){for(var Ii=0;Ii0&&(bi.push(_i,"="),bi.push.apply(bi,ea(arguments)),bi.push(";")),_i}return c(cn,{def:Ii,toString:function(){return pa([Nn.length>0?"var "+Nn.join(",")+";":"",pa(bi)])}})}function Yi(){var bi=ni(),cn=ni(),Nn=bi.toString,Ii=cn.toString;function _i(Qn,Aa){cn(Qn,Aa,"=",bi.def(Qn,Aa),";")}return c(function(){bi.apply(bi,ea(arguments))},{def:bi.def,entry:bi,exit:cn,save:_i,set:function(Qn,Aa,ua){_i(Qn,Aa),bi(Qn,Aa,"=",ua,";")},toString:function(){return Nn()+Ii()}})}function Ui(){var bi=pa(arguments),cn=Yi(),Nn=Yi(),Ii=cn.toString,_i=Nn.toString;return c(cn,{then:function(){return cn.apply(cn,ea(arguments)),this},else:function(){return Nn.apply(Nn,ea(arguments)),this},toString:function(){var Qn=_i();return Qn&&(Qn="else{"+Qn+"}"),pa(["if(",bi,"){",Ii(),"}",Qn])}})}var ma=ni(),Za={};function Ra(bi,cn){var Nn=[];function Ii(){var ja="a"+Nn.length;return Nn.push(ja),ja}cn=cn||0;for(var _i=0;_i[w.viewport.x,w.viewport.y,k.viewportWidth,k.viewportHeight]},attributes:{color:{buffer:T,offset:(k,w)=>w.offset*4,divisor:1},position:{buffer:y,offset:(k,w)=>w.offset*8,divisor:1},positionFract:{buffer:v,offset:(k,w)=>w.offset*8,divisor:1},error:{buffer:u,offset:(k,w)=>w.offset*16,divisor:1},direction:{buffer:b,stride:24,offset:0},lineOffset:{buffer:b,stride:24,offset:8},capOffset:{buffer:b,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:n.length}),t(M,{update:h,draw:C,destroy:p,regl:i,gl:f,canvas:f.canvas,groups:P}),M;function M(k){k?h(k):k===null&&p(),C()}function C(k){if(typeof k=="number")return A(k);k&&!Array.isArray(k)&&(k=[k]),i._refresh(),P.forEach((w,R)=>{if(w){if(k&&(k[R]?w.draw=!0:w.draw=!1),!w.draw){w.draw=!0;return}A(R)}})}function A(k){typeof k=="number"&&(k=P[k]),k!=null&&k&&k.count&&k.color&&k.opacity&&k.positions&&k.positions.length>1&&(k.scaleRatio=[k.scale[0]*k.viewport.width,k.scale[1]*k.viewport.height],x(k),k.after&&k.after(k))}function h(k){if(!k)return;k.length!=null?typeof k[0]=="number"&&(k=[{positions:k}]):Array.isArray(k)||(k=[k]);let w=0,R=0;if(M.groups=P=k.map((V,H)=>{let F=P[H];if(V)typeof V=="function"?V={after:V}:typeof V[0]=="number"&&(V={positions:V});else return F;return V=S(V,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),F||(P[H]=F={id:H,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},V=t({},_,V)),I(F,V,[{lineWidth:U=>+U*.5,capSize:U=>+U*.5,opacity:parseFloat,errors:U=>(U=e(U),R+=U.length,U),positions:(U,W)=>(U=e(U,"float64"),W.count=Math.floor(U.length/2),W.bounds=c(U,2),W.offset=w,w+=W.count,U)},{color:(U,W)=>{let q=W.count;if(U||(U="transparent"),!Array.isArray(U)||typeof U[0]=="number"){let lt=U;U=Array(q);for(let yt=0;yt{let J=W.bounds;return U||(U=J),W.scale=[1/(U[2]-U[0]),1/(U[3]-U[1])],W.translate=[-U[0],-U[1]],W.scaleFract=a(W.scale),W.translateFract=a(W.translate),U},viewport:U=>{let W;return Array.isArray(U)?W={x:U[0],y:U[1],width:U[2]-U[0],height:U[3]-U[1]}:U?(W={x:U.x||U.left||0,y:U.y||U.top||0},U.right?W.width=U.right-W.x:W.width=U.w||U.width||0,U.bottom?W.height=U.bottom-W.y:W.height=U.h||U.height||0):W={x:0,y:0,width:f.drawingBufferWidth,height:f.drawingBufferHeight},W}}]),F}),w||R){let V=P.reduce((W,q,J)=>W+(q?q.count:0),0),H=new Float64Array(V*2),F=new Uint8Array(V*4),U=new Float32Array(V*4);P.forEach((W,q)=>{if(!W)return;let{positions:J,count:lt,offset:yt,color:mt,errors:st}=W;lt&&(F.set(mt,yt*4),U.set(st,yt*4),H.set(J,yt*2))});var O=r(H);y(O);var j=a(H,O);v(j),T(F),u(U)}}function p(){y.destroy(),v.destroy(),T.destroy(),u.destroy(),b.destroy()}}}),kH=Dt((Q,Z)=>{var c=/[\'\"]/;Z.exports=function(g){return g?(c.test(g.charAt(0))&&(g=g.substr(1)),c.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}}),tE=Dt((Q,Z)=>{Z.exports=["inherit","initial","unset"]}),eE=Dt((Q,Z)=>{Z.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}),rE=Dt((Q,Z)=>{Z.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}),nE=Dt((Q,Z)=>{Z.exports=["normal","italic","oblique"]}),iE=Dt((Q,Z)=>{Z.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}),TH=Dt((Q,Z)=>{function c(S,t){if(typeof S!="string")return[S];var e=[S];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",n=!!t.flat;r.forEach(function(l){var f=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),x=[];function y(v,T,u){var b=e.push(v.slice(l[0].length,-l[1].length))-1;return x.push(b),a+b+a}e.forEach(function(v,T){for(var u,b=0;v!=u;)if(u=v,v=v.replace(f,y),b++>1e4)throw Error("References have circular dependency. Please, check them.");e[T]=v}),x=x.reverse(),e=e.map(function(v){return x.forEach(function(T){v=v.replace(new RegExp("(\\"+a+T+"\\"+a+")","g"),l[0]+"$1"+l[1])}),v})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function i(l,f,x){for(var y=[],v,T=0;v=o.exec(l);){if(T++>1e4)throw Error("Circular references in parenthesis");y.push(l.slice(0,v.index)),y.push(i(f[v[1]],f)),l=l.slice(v.index+v[0].length)}return y.push(l),y}return n?e:i(e[0],e)}function g(S,t){if(t&&t.flat){var e=t&&t.escape||"___",r=S[0],a;if(!r)return"";for(var n=new RegExp("\\"+e+"([0-9]+)\\"+e),o=0;r!=a;){if(o++>1e4)throw Error("Circular references in "+S);a=r,r=r.replace(n,i)}return r}return S.reduce(function l(f,x){return Array.isArray(x)&&(x=x.reduce(l,"")),f+x},"");function i(l,f){if(S[f]==null)throw Error("Reference "+f+"is undefined");return S[f]}}function I(S,t){return Array.isArray(S)?g(S,t):c(S,t)}I.parse=c,I.stringify=g,Z.exports=I}),AH=Dt((Q,Z)=>{var c=TH();Z.exports=function(g,I,S){if(g==null)throw Error("First argument should be a string");if(I==null)throw Error("Separator should be a string or a RegExp");S?(typeof S=="string"||Array.isArray(S))&&(S={ignore:S}):S={},S.escape==null&&(S.escape=!0),S.ignore==null?S.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof S.ignore=="string"&&(S.ignore=[S.ignore]),S.ignore=S.ignore.map(function(l){return l.length===1&&(l=l+l),l}));var t=c.parse(g,{flat:!0,brackets:S.ignore}),e=t[0],r=e.split(I);if(S.escape){for(var a=[],n=0;n{Z.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}),aE=Dt((Q,Z)=>{var c=MH();Z.exports={isSize:function(g){return/^[\d\.]/.test(g)||g.indexOf("/")!==-1||c.indexOf(g)!==-1}}}),SH=Dt((Q,Z)=>{var c=kH(),g=tE(),I=eE(),S=rE(),t=nE(),e=iE(),r=AH(),a=aE().isSize;Z.exports=o;var n=o.cache={};function o(l){if(typeof l!="string")throw new Error("Font argument must be a string.");if(n[l])return n[l];if(l==="")throw new Error("Cannot parse an empty string.");if(I.indexOf(l)!==-1)return n[l]={system:l};for(var f={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},x=r(l,/\s+/),y;y=x.shift();){if(g.indexOf(y)!==-1)return["style","variant","weight","stretch"].forEach(function(T){f[T]=y}),n[l]=f;if(t.indexOf(y)!==-1){f.style=y;continue}if(y==="normal"||y==="small-caps"){f.variant=y;continue}if(e.indexOf(y)!==-1){f.stretch=y;continue}if(S.indexOf(y)!==-1){f.weight=y;continue}if(a(y)){var v=r(y,"/");if(f.size=v[0],v[1]!=null?f.lineHeight=i(v[1]):x[0]==="/"&&(x.shift(),f.lineHeight=i(x.shift())),!x.length)throw new Error("Missing required font-family.");return f.family=r(x.join(" "),/\s*,\s*/).map(c),n[l]=f}throw new Error("Unknown or unsupported font token: "+y)}throw new Error("Missing required font-size.")}function i(l){var f=parseFloat(l);return f.toString()===l?f:l}}),oE=Dt((Q,Z)=>{var c=Ig(),g=aE().isSize,I=l(tE()),S=l(eE()),t=l(rE()),e=l(nE()),r=l(iE()),a={normal:1,"small-caps":1},n={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},o={size:"1rem",family:"serif"};Z.exports=function(f){if(f=c(f,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),f.system)return f.system&&i(f.system,S),f.system;if(i(f.style,e),i(f.variant,a),i(f.weight,t),i(f.stretch,r),f.size==null&&(f.size=o.size),typeof f.size=="number"&&(f.size+="px"),!g)throw Error("Bad size value `"+f.size+"`");f.family||(f.family=o.family),Array.isArray(f.family)&&(f.family.length||(f.family=[o.family]),f.family=f.family.map(function(y){return n[y]?y:'"'+y+'"'}).join(", "));var x=[];return x.push(f.style),f.variant!==f.style&&x.push(f.variant),f.weight!==f.variant&&f.weight!==f.style&&x.push(f.weight),f.stretch!==f.weight&&f.stretch!==f.variant&&f.stretch!==f.style&&x.push(f.stretch),x.push(f.size+(f.lineHeight==null||f.lineHeight==="normal"||f.lineHeight+""=="1"?"":"/"+f.lineHeight)),x.push(f.family),x.filter(Boolean).join(" ")};function i(f,x){if(f&&!x[f]&&!I[f])throw Error("Unknown keyword `"+f+"`");return f}function l(f){for(var x={},y=0;y{Z.exports={parse:SH(),stringify:oE()}}),CH=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():c.createREGL=g()})(Q,function(){var c=function(_e,kr){for(var Ir=Object.keys(kr),Dn=0;Dn1&&kr===Ir&&(kr==='"'||kr==="'"))return['"'+r(_e.substr(1,_e.length-2))+'"'];var Dn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(_e);if(Dn)return a(_e.substr(0,Dn.index)).concat(a(Dn[1])).concat(a(_e.substr(Dn.index+Dn[0].length)));var li=_e.split(".");if(li.length===1)return['"'+r(_e)+'"'];for(var ti=[],yn=0;yn"u"?1:window.devicePixelRatio,ya=!1,$a={},Na=function(fn){},ia=function(){};if(typeof kr=="string"?Ir=document.querySelector(kr):typeof kr=="object"&&(b(kr)?Ir=kr:_(kr)?(ti=kr,li=ti.canvas):("gl"in kr?ti=kr.gl:"canvas"in kr?li=M(kr.canvas):"container"in kr&&(Dn=M(kr.container)),"attributes"in kr&&(yn=kr.attributes),"extensions"in kr&&(ai=P(kr.extensions)),"optionalExtensions"in kr&&(ta=P(kr.optionalExtensions)),"onDone"in kr&&(Na=kr.onDone),"profile"in kr&&(ya=!!kr.profile),"pixelRatio"in kr&&($i=+kr.pixelRatio),"cachedCode"in kr&&($a=kr.cachedCode))),Ir&&(Ir.nodeName.toLowerCase()==="canvas"?li=Ir:Dn=Ir),!ti){if(!li){var Ai=T(Dn||document.body,Na,$i);if(!Ai)return null;li=Ai.canvas,ia=Ai.onDestroy}yn.premultipliedAlpha===void 0&&(yn.premultipliedAlpha=!0),ti=u(li,yn)}return ti?{gl:ti,canvas:li,container:Dn,extensions:ai,optionalExtensions:ta,pixelRatio:$i,profile:ya,cachedCode:$a,onDone:Na,onDestroy:ia}:(ia(),Na("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(_e,kr){var Ir={};function Dn(yn){var ai=yn.toLowerCase(),ta;try{ta=Ir[ai]=_e.getExtension(ai)}catch{}return!!ta}for(var li=0;li65535)<<4,_e>>>=kr,Ir=(_e>255)<<3,_e>>>=Ir,kr|=Ir,Ir=(_e>15)<<2,_e>>>=Ir,kr|=Ir,Ir=(_e>3)<<1,_e>>>=Ir,kr|=Ir,kr|_e>>1}function U(){var _e=h(8,function(){return[]});function kr(ti){var yn=H(ti),ai=_e[F(yn)>>2];return ai.length>0?ai.pop():new ArrayBuffer(yn)}function Ir(ti){_e[F(ti.byteLength)>>2].push(ti)}function Dn(ti,yn){var ai=null;switch(ti){case p:ai=new Int8Array(kr(yn),0,yn);break;case k:ai=new Uint8Array(kr(yn),0,yn);break;case w:ai=new Int16Array(kr(2*yn),0,yn);break;case R:ai=new Uint16Array(kr(2*yn),0,yn);break;case O:ai=new Int32Array(kr(4*yn),0,yn);break;case j:ai=new Uint32Array(kr(4*yn),0,yn);break;case V:ai=new Float32Array(kr(4*yn),0,yn);break;default:return null}return ai.length!==yn?ai.subarray(0,yn):ai}function li(ti){Ir(ti.buffer)}return{alloc:kr,free:Ir,allocType:Dn,freeType:li}}var W=U();W.zero=U();var q=3408,J=3410,lt=3411,yt=3412,mt=3413,st=3414,tt=3415,dt=33901,rt=33902,at=3379,vt=3386,it=34921,Y=36347,ft=36348,ut=35661,kt=35660,It=34930,Pt=36349,qt=34076,Wt=34024,Jt=7936,ge=7937,fe=7938,pe=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,ee=34067,ve=34069,oe=33984,Te=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,Wr=16384,br=function(_e,kr){var Ir=1;kr.ext_texture_filter_anisotropic&&(Ir=_e.getParameter(se));var Dn=1,li=1;kr.webgl_draw_buffers&&(Dn=_e.getParameter(Lt),li=_e.getParameter(Tt));var ti=!!kr.oes_texture_float;if(ti){var yn=_e.createTexture();_e.bindTexture(Mt,yn),_e.texImage2D(Mt,0,Te,1,1,0,Te,He,null);var ai=_e.createFramebuffer();if(_e.bindFramebuffer(cr,ai),_e.framebufferTexture2D(cr,jr,Mt,yn,0),_e.bindTexture(Mt,null),_e.checkFramebufferStatus(cr)!==ur)ti=!1;else{_e.viewport(0,0,1,1),_e.clearColor(1,0,0,1),_e.clear(Wr);var ta=W.allocType(He,4);_e.readPixels(0,0,1,1,Te,He,ta),_e.getError()?ti=!1:(_e.deleteFramebuffer(ai),_e.deleteTexture(yn),ti=ta[0]===1),W.freeType(ta)}}var $i=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ya=!0;if(!$i){var $a=_e.createTexture(),Na=W.allocType(Ge,36);_e.activeTexture(oe),_e.bindTexture(ee,$a),_e.texImage2D(ve,0,Te,3,3,0,Te,Ge,Na),W.freeType(Na),_e.bindTexture(ee,null),_e.deleteTexture($a),ya=!_e.getError()}return{colorBits:[_e.getParameter(J),_e.getParameter(lt),_e.getParameter(yt),_e.getParameter(mt)],depthBits:_e.getParameter(st),stencilBits:_e.getParameter(tt),subpixelBits:_e.getParameter(q),extensions:Object.keys(kr).filter(function(ia){return!!kr[ia]}),maxAnisotropic:Ir,maxDrawbuffers:Dn,maxColorAttachments:li,pointSizeDims:_e.getParameter(dt),lineWidthDims:_e.getParameter(rt),maxViewportDims:_e.getParameter(vt),maxCombinedTextureUnits:_e.getParameter(ut),maxCubeMapSize:_e.getParameter(qt),maxRenderbufferSize:_e.getParameter(Wt),maxTextureUnits:_e.getParameter(It),maxTextureSize:_e.getParameter(at),maxAttributes:_e.getParameter(it),maxVertexUniforms:_e.getParameter(Y),maxVertexTextureUnits:_e.getParameter(kt),maxVaryingVectors:_e.getParameter(ft),maxFragmentUniforms:_e.getParameter(Pt),glsl:_e.getParameter(pe),renderer:_e.getParameter(ge),vendor:_e.getParameter(Jt),version:_e.getParameter(fe),readFloat:ti,npotTextureCube:ya}},Xr=function(_e){return _e instanceof Uint8Array||_e instanceof Uint16Array||_e instanceof Uint32Array||_e instanceof Int8Array||_e instanceof Int16Array||_e instanceof Int32Array||_e instanceof Float32Array||_e instanceof Float64Array||_e instanceof Uint8ClampedArray};function nn(_e){return!!_e&&typeof _e=="object"&&Array.isArray(_e.shape)&&Array.isArray(_e.stride)&&typeof _e.offset=="number"&&_e.shape.length===_e.stride.length&&(Array.isArray(_e.data)||Xr(_e.data))}var Le=function(_e){return Object.keys(_e).map(function(kr){return _e[kr]})},Gt={shape:re,flatten:Nt};function ne(_e,kr,Ir){for(var Dn=0;Dn0){var Va;if(Array.isArray(jn[0])){ha=$n(jn);for(var xi=1,ri=1;ri0){if(typeof xi[0]=="number"){var Ki=W.allocType(ei.dtype,xi.length);tn(Ki,xi),ha(Ki,Ea),W.freeType(Ki)}else if(Array.isArray(xi[0])||Xr(xi[0])){ma=$n(xi);var Ji=oi(xi,ma,ei.dtype);ha(Ji,Ea),W.freeType(Ji)}}}else if(nn(xi)){ma=xi.shape;var ba=xi.stride,Io=0,wo=0,_a=0,Fa=0;ma.length===1?(Io=ma[0],wo=1,_a=ba[0],Fa=0):ma.length===2&&(Io=ma[0],wo=ma[1],_a=ba[0],Fa=ba[1]);var vo=Array.isArray(xi.data)?ei.dtype:_r(xi.data),Eo=W.allocType(vo,Io*wo);Cn(Eo,xi.data,Io,wo,_a,Fa,xi.offset),ha(Eo,Ea),W.freeType(Eo)}return Sa}return Bi||Sa(fn),Sa._reglType="buffer",Sa._buffer=ei,Sa.subdata=Va,Ir.profile&&(Sa.stats=ei.stats),Sa.destroy=function(){Na(ei)},Sa}function Ai(){Le(ti).forEach(function(fn){fn.buffer=_e.createBuffer(),_e.bindBuffer(fn.type,fn.buffer),_e.bufferData(fn.type,fn.persistentData||fn.byteLength,fn.usage)})}return Ir.profile&&(kr.getTotalBufferSize=function(){var fn=0;return Object.keys(ti).forEach(function(jn){fn+=ti[jn].stats.size}),fn}),{create:ia,createStream:ta,destroyStream:$i,clear:function(){Le(ti).forEach(Na),ai.forEach(Na)},getBuffer:function(fn){return fn&&fn._buffer instanceof yn?fn._buffer:null},restore:Ai,_initBuffer:$a}}var Mn=0,fi=0,ki=1,Oi=1,ji=4,Xi=4,ci={points:Mn,point:fi,lines:ki,line:Oi,triangles:ji,triangle:Xi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},za=0,Wa=1,ze=4,Ie=5120,Rr=5121,$r=5122,Gr=5123,Br=5124,Yr=5125,pn=34963,on=35040,Ce=35044;function dr(_e,kr,Ir,Dn){var li={},ti=0,yn={uint8:Rr,uint16:Gr};kr.oes_element_index_uint&&(yn.uint32=Yr);function ai(Ai){this.id=ti++,li[this.id]=this,this.buffer=Ai,this.primType=ze,this.vertCount=0,this.type=0}ai.prototype.bind=function(){this.buffer.bind()};var ta=[];function $i(Ai){var fn=ta.pop();return fn||(fn=new ai(Ir.create(null,pn,!0,!1)._buffer)),$a(fn,Ai,on,-1,-1,0,0),fn}function ya(Ai){ta.push(Ai)}function $a(Ai,fn,jn,Bi,Ti,ei,Sa){Ai.buffer.bind();var ha;if(fn){var Va=Sa;!Sa&&(!Xr(fn)||nn(fn)&&!Xr(fn.data))&&(Va=kr.oes_element_index_uint?Yr:Gr),Ir._initBuffer(Ai.buffer,fn,jn,Va,3)}else _e.bufferData(pn,ei,jn),Ai.buffer.dtype=ha||Rr,Ai.buffer.usage=jn,Ai.buffer.dimension=3,Ai.buffer.byteLength=ei;if(ha=Sa,!Sa){switch(Ai.buffer.dtype){case Rr:case Ie:ha=Rr;break;case Gr:case $r:ha=Gr;break;case Yr:case Br:ha=Yr;break}Ai.buffer.dtype=ha}Ai.type=ha;var xi=Ti;xi<0&&(xi=Ai.buffer.byteLength,ha===Gr?xi>>=1:ha===Yr&&(xi>>=2)),Ai.vertCount=xi;var ri=Bi;if(Bi<0){ri=ze;var Ea=Ai.buffer.dimension;Ea===1&&(ri=za),Ea===2&&(ri=Wa),Ea===3&&(ri=ze)}Ai.primType=ri}function Na(Ai){Dn.elementsCount--,delete li[Ai.id],Ai.buffer.destroy(),Ai.buffer=null}function ia(Ai,fn){var jn=Ir.create(null,pn,!0),Bi=new ai(jn._buffer);Dn.elementsCount++;function Ti(ei){if(!ei)jn(),Bi.primType=ze,Bi.vertCount=0,Bi.type=Rr;else if(typeof ei=="number")jn(ei),Bi.primType=ze,Bi.vertCount=ei|0,Bi.type=Rr;else{var Sa=null,ha=Ce,Va=-1,xi=-1,ri=0,Ea=0;Array.isArray(ei)||Xr(ei)||nn(ei)?Sa=ei:("data"in ei&&(Sa=ei.data),"usage"in ei&&(ha=Ii[ei.usage]),"primitive"in ei&&(Va=ci[ei.primitive]),"count"in ei&&(xi=ei.count|0),"type"in ei&&(Ea=yn[ei.type]),"length"in ei?ri=ei.length|0:(ri=xi,Ea===Gr||Ea===$r?ri*=2:(Ea===Yr||Ea===Br)&&(ri*=4))),$a(Bi,Sa,ha,Va,xi,ri,Ea)}return Ti}return Ti(Ai),Ti._reglType="elements",Ti._elements=Bi,Ti.subdata=function(ei,Sa){return jn.subdata(ei,Sa),Ti},Ti.destroy=function(){Na(Bi)},Ti}return{create:ia,createStream:$i,destroyStream:ya,getElements:function(Ai){return typeof Ai=="function"&&Ai._elements instanceof ai?Ai._elements:null},clear:function(){Le(li).forEach(Na)}}}var Hr=new Float32Array(1),_n=new Uint32Array(Hr.buffer),Fn=5123;function Qn(_e){for(var kr=W.allocType(Fn,_e.length),Ir=0;Ir<_e.length;++Ir)if(isNaN(_e[Ir]))kr[Ir]=65535;else if(_e[Ir]===1/0)kr[Ir]=31744;else if(_e[Ir]===-1/0)kr[Ir]=64512;else{Hr[0]=_e[Ir];var Dn=_n[0],li=Dn>>>31<<15,ti=(Dn<<1>>>24)-127,yn=Dn>>13&1023;if(ti<-24)kr[Ir]=li;else if(ti<-14){var ai=-14-ti;kr[Ir]=li+(yn+1024>>ai)}else ti>15?kr[Ir]=li+31744:kr[Ir]=li+(ti+15<<10)+yn}return kr}function Pn(_e){return Array.isArray(_e)||Xr(_e)}var En=34467,Zn=3553,La=34067,Vi=34069,Qa=6408,Ja=6406,Do=6407,yo=6409,Fo=6410,Da=32854,ys=32855,os=36194,ul=32819,Zo=32820,Ks=33635,ss=34042,cl=6402,Qs=34041,Nl=35904,cs=35906,Ps=36193,Lo=33776,As=33777,kl=33778,ql=33779,Jl=35986,Us=35987,Pa=34798,fo=35840,qs=35841,Ql=35842,Xo=35843,Gl=36196,al=5121,Cl=5123,Ru=5125,lo=5126,Ms=10242,Is=10243,ou=10497,hl=33071,ts=33648,Su=10240,Gu=10241,bl=9728,Dl=9729,tu=9984,nu=9985,ac=9986,mh=9987,Jc=33170,ah=4352,Bf=4353,Sf=4354,Fl=34046,Bc=3317,Nf=37440,hc=37441,oc=37443,fc=37444,oh=33984,cu=[tu,ac,nu,mh],sc=[0,yo,Fo,Do,Qa],rl={};rl[yo]=rl[Ja]=rl[cl]=1,rl[Qs]=rl[Fo]=2,rl[Do]=rl[Nl]=3,rl[Qa]=rl[cs]=4;function Yl(_e){return"[object "+_e+"]"}var Sh=Yl("HTMLCanvasElement"),Cc=Yl("OffscreenCanvas"),Uh=Yl("CanvasRenderingContext2D"),_u=Yl("ImageBitmap"),Ed=Yl("HTMLImageElement"),tl=Yl("HTMLVideoElement"),Vd=Object.keys(le).concat([Sh,Cc,Uh,_u,Ed,tl]),Ll=[];Ll[al]=1,Ll[lo]=4,Ll[Ps]=2,Ll[Cl]=2,Ll[Ru]=4;var Qo=[];Qo[Da]=2,Qo[ys]=2,Qo[os]=2,Qo[Qs]=4,Qo[Lo]=.5,Qo[As]=.5,Qo[kl]=1,Qo[ql]=1,Qo[Jl]=.5,Qo[Us]=1,Qo[Pa]=1,Qo[fo]=.5,Qo[qs]=.25,Qo[Ql]=.5,Qo[Xo]=.25,Qo[Gl]=.5;function lf(_e){return Array.isArray(_e)&&(_e.length===0||typeof _e[0]=="number")}function sh(_e){if(!Array.isArray(_e))return!1;var kr=_e.length;return!(kr===0||!Pn(_e[0]))}function rc(_e){return Object.prototype.toString.call(_e)}function jf(_e){return rc(_e)===Sh}function Vh(_e){return rc(_e)===Cc}function yf(_e){return rc(_e)===Uh}function lc(_e){return rc(_e)===_u}function hd(_e){return rc(_e)===Ed}function Zf(_e){return rc(_e)===tl}function xf(_e){if(!_e)return!1;var kr=rc(_e);return Vd.indexOf(kr)>=0?!0:lf(_e)||sh(_e)||nn(_e)}function Hh(_e){return le[Object.prototype.toString.call(_e)]|0}function Uf(_e,kr){var Ir=kr.length;switch(_e.type){case al:case Cl:case Ru:case lo:var Dn=W.allocType(_e.type,Ir);Dn.set(kr),_e.data=Dn;break;case Ps:_e.data=Qn(kr);break}}function Vf(_e,kr){return W.allocType(_e.type===Ps?lo:_e.type,kr)}function lh(_e,kr){_e.type===Ps?(_e.data=Qn(kr),W.freeType(kr)):_e.data=kr}function Gf(_e,kr,Ir,Dn,li,ti){for(var yn=_e.width,ai=_e.height,ta=_e.channels,$i=yn*ai*ta,ya=Vf(_e,$i),$a=0,Na=0;Na=1;)ai+=yn*ta*ta,ta/=2;return ai}else return yn*Ir*Dn}function gh(_e,kr,Ir,Dn,li,ti,yn){var ai={"don't care":ah,"dont care":ah,nice:Sf,fast:Bf},ta={repeat:ou,clamp:hl,mirror:ts},$i={nearest:bl,linear:Dl},ya=c({mipmap:mh,"nearest mipmap nearest":tu,"linear mipmap nearest":nu,"nearest mipmap linear":ac,"linear mipmap linear":mh},$i),$a={none:0,browser:fc},Na={uint8:al,rgba4:ul,rgb565:Ks,"rgb5 a1":Zo},ia={alpha:Ja,luminance:yo,"luminance alpha":Fo,rgb:Do,rgba:Qa,rgba4:Da,"rgb5 a1":ys,rgb565:os},Ai={};kr.ext_srgb&&(ia.srgb=Nl,ia.srgba=cs),kr.oes_texture_float&&(Na.float32=Na.float=lo),kr.oes_texture_half_float&&(Na.float16=Na["half float"]=Ps),kr.webgl_depth_texture&&(c(ia,{depth:cl,"depth stencil":Qs}),c(Na,{uint16:Cl,uint32:Ru,"depth stencil":ss})),kr.webgl_compressed_texture_s3tc&&c(Ai,{"rgb s3tc dxt1":Lo,"rgba s3tc dxt1":As,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":ql}),kr.webgl_compressed_texture_atc&&c(Ai,{"rgb atc":Jl,"rgba atc explicit alpha":Us,"rgba atc interpolated alpha":Pa}),kr.webgl_compressed_texture_pvrtc&&c(Ai,{"rgb pvrtc 4bppv1":fo,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":Ql,"rgba pvrtc 2bppv1":Xo}),kr.webgl_compressed_texture_etc1&&(Ai["rgb etc1"]=Gl);var fn=Array.prototype.slice.call(_e.getParameter(En));Object.keys(Ai).forEach(function($){var ot=Ai[$];fn.indexOf(ot)>=0&&(ia[$]=ot)});var jn=Object.keys(ia);Ir.textureFormats=jn;var Bi=[];Object.keys(ia).forEach(function($){var ot=ia[$];Bi[ot]=$});var Ti=[];Object.keys(Na).forEach(function($){var ot=Na[$];Ti[ot]=$});var ei=[];Object.keys($i).forEach(function($){var ot=$i[$];ei[ot]=$});var Sa=[];Object.keys(ya).forEach(function($){var ot=ya[$];Sa[ot]=$});var ha=[];Object.keys(ta).forEach(function($){var ot=ta[$];ha[ot]=$});var Va=jn.reduce(function($,ot){var et=ia[ot];return et===yo||et===Ja||et===yo||et===Fo||et===cl||et===Qs||kr.ext_srgb&&(et===Nl||et===cs)?$[et]=et:et===ys||ot.indexOf("rgba")>=0?$[et]=Qa:$[et]=Do,$},{});function xi(){this.internalformat=Qa,this.format=Qa,this.type=al,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=fc,this.width=0,this.height=0,this.channels=0}function ri($,ot){$.internalformat=ot.internalformat,$.format=ot.format,$.type=ot.type,$.compressed=ot.compressed,$.premultiplyAlpha=ot.premultiplyAlpha,$.flipY=ot.flipY,$.unpackAlignment=ot.unpackAlignment,$.colorSpace=ot.colorSpace,$.width=ot.width,$.height=ot.height,$.channels=ot.channels}function Ea($,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&($.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&($.flipY=ot.flipY),"alignment"in ot&&($.unpackAlignment=ot.alignment),"colorSpace"in ot&&($.colorSpace=$a[ot.colorSpace]),"type"in ot){var et=ot.type;$.type=Na[et]}var xt=$.width,Vt=$.height,de=$.channels,ye=!1;"shape"in ot?(xt=ot.shape[0],Vt=ot.shape[1],ot.shape.length===3&&(de=ot.shape[2],ye=!0)):("radius"in ot&&(xt=Vt=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Vt=ot.height),"channels"in ot&&(de=ot.channels,ye=!0)),$.width=xt|0,$.height=Vt|0,$.channels=de|0;var Yt=!1;if("format"in ot){var ce=ot.format,Se=$.internalformat=ia[ce];$.format=Va[Se],ce in Na&&("type"in ot||($.type=Na[ce])),ce in Ai&&($.compressed=!0),Yt=!0}!ye&&Yt?$.channels=rl[$.format]:ye&&!Yt&&$.channels!==sc[$.format]&&($.format=$.internalformat=sc[$.channels])}}function ma($){_e.pixelStorei(Nf,$.flipY),_e.pixelStorei(hc,$.premultiplyAlpha),_e.pixelStorei(oc,$.colorSpace),_e.pixelStorei(Bc,$.unpackAlignment)}function Ki(){xi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ji($,ot){var et=null;if(xf(ot)?et=ot:ot&&(Ea($,ot),"x"in ot&&($.xOffset=ot.x|0),"y"in ot&&($.yOffset=ot.y|0),xf(ot.data)&&(et=ot.data)),ot.copy){var xt=li.viewportWidth,Vt=li.viewportHeight;$.width=$.width||xt-$.xOffset,$.height=$.height||Vt-$.yOffset,$.needsCopy=!0}else if(!et)$.width=$.width||1,$.height=$.height||1,$.channels=$.channels||4;else if(Xr(et))$.channels=$.channels||4,$.data=et,!("type"in ot)&&$.type===al&&($.type=Hh(et));else if(lf(et))$.channels=$.channels||4,Uf($,et),$.alignment=1,$.needsFree=!0;else if(nn(et)){var de=et.data;!Array.isArray(de)&&$.type===al&&($.type=Hh(de));var ye=et.shape,Yt=et.stride,ce,Se,ir,Ye,tr,lr;ye.length===3?(ir=ye[2],lr=Yt[2]):(ir=1,lr=1),ce=ye[0],Se=ye[1],Ye=Yt[0],tr=Yt[1],$.alignment=1,$.width=ce,$.height=Se,$.channels=ir,$.format=$.internalformat=sc[ir],$.needsFree=!0,Gf($,de,Ye,tr,lr,et.offset)}else if(jf(et)||Vh(et)||yf(et))jf(et)||Vh(et)?$.element=et:$.element=et.canvas,$.width=$.element.width,$.height=$.element.height,$.channels=4;else if(lc(et))$.element=et,$.width=et.width,$.height=et.height,$.channels=4;else if(hd(et))$.element=et,$.width=et.naturalWidth,$.height=et.naturalHeight,$.channels=4;else if(Zf(et))$.element=et,$.width=et.videoWidth,$.height=et.videoHeight,$.channels=4;else if(sh(et)){var hr=$.width||et[0].length,Ve=$.height||et.length,Xe=$.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var Ze=Gt.shape(et),Pr=1,sn=0;sn>=Vt,et.height>>=Vt,Ji(et,xt[Vt]),$.mipmask|=1<=0&&!("faces"in ot)&&($.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;$.magFilter=$i[xt]}var Vt=$.wrapS,de=$.wrapT;if("wrap"in ot){var ye=ot.wrap;typeof ye=="string"?Vt=de=ta[ye]:Array.isArray(ye)&&(Vt=ta[ye[0]],de=ta[ye[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Vt=ta[Yt]}if("wrapT"in ot){var ce=ot.wrapT;de=ta[ce]}}if($.wrapS=Vt,$.wrapT=de,"anisotropic"in ot&&(ot.anisotropic,$.anisotropic=ot.anisotropic),"mipmap"in ot){var Se=!1;switch(typeof ot.mipmap){case"string":$.mipmapHint=ai[ot.mipmap],$.genMipmaps=!0,Se=!0;break;case"boolean":Se=$.genMipmaps=ot.mipmap;break;case"object":$.genMipmaps=!1,Se=!0;break}Se&&!("min"in ot)&&($.minFilter=tu)}}function pc($,ot){_e.texParameteri(ot,Gu,$.minFilter),_e.texParameteri(ot,Su,$.magFilter),_e.texParameteri(ot,Ms,$.wrapS),_e.texParameteri(ot,Is,$.wrapT),kr.ext_texture_filter_anisotropic&&_e.texParameteri(ot,Fl,$.anisotropic),$.genMipmaps&&(_e.hint(Jc,$.mipmapHint),_e.generateMipmap(ot))}var yc=0,xu={},pu=Ir.maxTextureUnits,Tu=Array(pu).map(function(){return null});function No($){xi.call(this),this.mipmask=0,this.internalformat=Qa,this.id=yc++,this.refCount=1,this.target=$,this.texture=_e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new dl,yn.profile&&(this.stats={size:0})}function Au($){_e.activeTexture(oh),_e.bindTexture($.target,$.texture)}function sl(){var $=Tu[0];$?_e.bindTexture($.target,$.texture):_e.bindTexture(Zn,null)}function Lu($){var ot=$.texture,et=$.unit,xt=$.target;et>=0&&(_e.activeTexture(oh+et),_e.bindTexture(xt,null),Tu[et]=null),_e.deleteTexture(ot),$.texture=null,$.params=null,$.pixels=null,$.refCount=0,delete xu[$.id],ti.textureCount--}c(No.prototype,{bind:function(){var $=this;$.bindCount+=1;var ot=$.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}Tu[et]=$,ot=et;break}yn.profile&&ti.maxTextureUnits>tr)-ir,lr.height=lr.height||(et.height>>tr)-Ye,Au(et),Io(lr,Zn,ir,Ye,tr),sl(),Fa(lr),xt}function de(ye,Yt){var ce=ye|0,Se=Yt|0||ce;if(ce===et.width&&Se===et.height)return xt;xt.width=et.width=ce,xt.height=et.height=Se,Au(et);for(var ir=0;et.mipmask>>ir;++ir){var Ye=ce>>ir,tr=Se>>ir;if(!Ye||!tr)break;_e.texImage2D(Zn,ir,et.format,Ye,tr,0,et.format,et.type,null)}return sl(),yn.profile&&(et.stats.size=Eh(et.internalformat,et.type,ce,Se,!1,!1)),xt}return xt($,ot),xt.subimage=Vt,xt.resize=de,xt._reglType="texture2d",xt._texture=et,yn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Co($,ot,et,xt,Vt,de){var ye=new No(La);xu[ye.id]=ye,ti.cubeCount++;var Yt=new Array(6);function ce(Ye,tr,lr,hr,Ve,Xe){var Ze,Pr=ye.texInfo;for(dl.call(Pr),Ze=0;Ze<6;++Ze)Yt[Ze]=hs();if(typeof Ye=="number"||!Ye){var sn=Ye|0||1;for(Ze=0;Ze<6;++Ze)Eo(Yt[Ze],sn,sn)}else if(typeof Ye=="object")if(tr)es(Yt[0],Ye),es(Yt[1],tr),es(Yt[2],lr),es(Yt[3],hr),es(Yt[4],Ve),es(Yt[5],Xe);else if(Cu(Pr,Ye),Ea(ye,Ye),"faces"in Ye){var dn=Ye.faces;for(Ze=0;Ze<6;++Ze)ri(Yt[Ze],ye),es(Yt[Ze],dn[Ze])}else for(Ze=0;Ze<6;++Ze)es(Yt[Ze],Ye);for(ri(ye,Yt[0]),Pr.genMipmaps?ye.mipmask=(Yt[0].width<<1)-1:ye.mipmask=Yt[0].mipmask,ye.internalformat=Yt[0].internalformat,ce.width=Yt[0].width,ce.height=Yt[0].height,Au(ye),Ze=0;Ze<6;++Ze)Ul(Yt[Ze],Vi+Ze);for(pc(Pr,La),sl(),yn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,Pr.genMipmaps,!0)),ce.format=Bi[ye.internalformat],ce.type=Ti[ye.type],ce.mag=ei[Pr.magFilter],ce.min=Sa[Pr.minFilter],ce.wrapS=ha[Pr.wrapS],ce.wrapT=ha[Pr.wrapT],Ze=0;Ze<6;++Ze)ku(Yt[Ze]);return ce}function Se(Ye,tr,lr,hr,Ve){var Xe=lr|0,Ze=hr|0,Pr=Ve|0,sn=_a();return ri(sn,ye),sn.width=0,sn.height=0,Ji(sn,tr),sn.width=sn.width||(ye.width>>Pr)-Xe,sn.height=sn.height||(ye.height>>Pr)-Ze,Au(ye),Io(sn,Vi+Ye,Xe,Ze,Pr),sl(),Fa(sn),ce}function ir(Ye){var tr=Ye|0;if(tr!==ye.width){ce.width=ye.width=tr,ce.height=ye.height=tr,Au(ye);for(var lr=0;lr<6;++lr)for(var hr=0;ye.mipmask>>hr;++hr)_e.texImage2D(Vi+lr,hr,ye.format,tr>>hr,tr>>hr,0,ye.format,ye.type,null);return sl(),yn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,!1,!0)),ce}}return ce($,ot,et,xt,Vt,de),ce.subimage=Se,ce.resize=ir,ce._reglType="textureCube",ce._texture=ye,yn.profile&&(ce.stats=ye.stats),ce.destroy=function(){ye.decRef()},ce}function Cs(){for(var $=0;$>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Vt=0;Vt<6;++Vt)_e.texImage2D(Vi+Vt,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);pc(et.texInfo,et.target)})}function yl(){for(var $=0;$=0?ku=!0:ta.indexOf(dl)>=0&&(ku=!1))),("depthTexture"in No||"depthStencilTexture"in No)&&(Tu=!!(No.depthTexture||No.depthStencilTexture)),"depth"in No&&(typeof No.depth=="boolean"?Ul=No.depth:(yc=No.depth,Al=!1)),"stencil"in No&&(typeof No.stencil=="boolean"?Al=No.stencil:(xu=No.stencil,Ul=!1)),"depthStencil"in No&&(typeof No.depthStencil=="boolean"?Ul=Al=No.depthStencil:(pu=No.depthStencil,Ul=!1,Al=!1))}var sl=null,Lu=null,xc=null,Co=null;if(Array.isArray(hs))sl=hs.map(Ai);else if(hs)sl=[Ai(hs)];else for(sl=new Array(pc),vo=0;vo0&&(Fa.depth=Ji[0].depth,Fa.stencil=Ji[0].stencil,Fa.depthStencil=Ji[0].depthStencil),Ji[_a]?Ji[_a](Fa):Ji[_a]=ri(Fa)}return c(ba,{width:vo,height:vo,color:dl})}function Io(wo){var _a,Fa=wo|0;if(Fa===ba.width)return ba;var vo=ba.color;for(_a=0;_a=vo.byteLength?Eo.subdata(vo):(Eo.destroy(),ri.buffers[wo]=null)),ri.buffers[wo]||(Eo=ri.buffers[wo]=li.create(_a,Pf,!1,!0)),Fa.buffer=li.getBuffer(Eo),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1,ba[wo]=1}else li.getBuffer(_a)?(Fa.buffer=li.getBuffer(_a),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1):li.getBuffer(_a.buffer)?(Fa.buffer=li.getBuffer(_a.buffer),Fa.size=(+_a.size||Fa.buffer.dimension)|0,Fa.normalized=!!_a.normalized||!1,"type"in _a?Fa.type=Hn[_a.type]:Fa.type=Fa.buffer.dtype,Fa.offset=(_a.offset||0)|0,Fa.stride=(_a.stride||0)|0,Fa.divisor=(_a.divisor||0)|0,Fa.state=1):"x"in _a&&(Fa.x=+_a.x||0,Fa.y=+_a.y||0,Fa.z=+_a.z||0,Fa.w=+_a.w||0,Fa.state=2)}for(var es=0;es1)for(var ma=0;mafn&&(fn=jn.stats.uniformsCount)}),fn},Ir.getMaxAttributesCount=function(){var fn=0;return ya.forEach(function(jn){jn.stats.attributesCount>fn&&(fn=jn.stats.attributesCount)}),fn});function Ai(){li={},ti={};for(var fn=0;fn>>4&15)+kr.charAt(Dn&15);return Ir}function Ph(_e){for(var kr="",Ir=-1,Dn,li;++Ir<_e.length;)Dn=_e.charCodeAt(Ir),li=Ir+1<_e.length?_e.charCodeAt(Ir+1):0,55296<=Dn&&Dn<=56319&&56320<=li&&li<=57343&&(Dn=65536+((Dn&1023)<<10)+(li&1023),Ir++),Dn<=127?kr+=String.fromCharCode(Dn):Dn<=2047?kr+=String.fromCharCode(192|Dn>>>6&31,128|Dn&63):Dn<=65535?kr+=String.fromCharCode(224|Dn>>>12&15,128|Dn>>>6&63,128|Dn&63):Dn<=2097151&&(kr+=String.fromCharCode(240|Dn>>>18&7,128|Dn>>>12&63,128|Dn>>>6&63,128|Dn&63));return kr}function xh(_e){for(var kr=Array(_e.length>>2),Ir=0;Ir>5]|=(_e.charCodeAt(Ir/8)&255)<<24-Ir%32;return kr}function Bu(_e){for(var kr="",Ir=0;Ir<_e.length*32;Ir+=8)kr+=String.fromCharCode(_e[Ir>>5]>>>24-Ir%32&255);return kr}function iu(_e,kr){return _e>>>kr|_e<<32-kr}function _h(_e,kr){return _e>>>kr}function df(_e,kr,Ir){return _e&kr^~_e&Ir}function bh(_e,kr,Ir){return _e&kr^_e&Ir^kr&Ir}function Wf(_e){return iu(_e,2)^iu(_e,13)^iu(_e,22)}function gr(_e){return iu(_e,6)^iu(_e,11)^iu(_e,25)}function Ur(_e){return iu(_e,7)^iu(_e,18)^_h(_e,3)}function wn(_e){return iu(_e,17)^iu(_e,19)^_h(_e,10)}var hn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function qn(_e,kr){var Ir=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Dn=new Array(64),li,ti,yn,ai,ta,$i,ya,$a,Na,ia,Ai,fn;for(_e[kr>>5]|=128<<24-kr%32,_e[(kr+64>>9<<4)+15]=kr,Na=0;Na<_e.length;Na+=16){for(li=Ir[0],ti=Ir[1],yn=Ir[2],ai=Ir[3],ta=Ir[4],$i=Ir[5],ya=Ir[6],$a=Ir[7],ia=0;ia<64;ia++)ia<16?Dn[ia]=_e[ia+Na]:Dn[ia]=di(di(di(wn(Dn[ia-2]),Dn[ia-7]),Ur(Dn[ia-15])),Dn[ia-16]),Ai=di(di(di(di($a,gr(ta)),df(ta,$i,ya)),hn[ia]),Dn[ia]),fn=di(Wf(li),bh(li,ti,yn)),$a=ya,ya=$i,$i=ta,ta=di(ai,Ai),ai=yn,yn=ti,ti=li,li=di(Ai,fn);Ir[0]=di(li,Ir[0]),Ir[1]=di(ti,Ir[1]),Ir[2]=di(yn,Ir[2]),Ir[3]=di(ai,Ir[3]),Ir[4]=di(ta,Ir[4]),Ir[5]=di($i,Ir[5]),Ir[6]=di(ya,Ir[6]),Ir[7]=di($a,Ir[7])}return Ir}function di(_e,kr){var Ir=(_e&65535)+(kr&65535),Dn=(_e>>16)+(kr>>16)+(Ir>>16);return Dn<<16|Ir&65535}function aa(_e){return Array.prototype.slice.call(_e)}function va(_e){return aa(_e).join("")}function Ba(_e){var kr=_e&&_e.cache,Ir=0,Dn=[],li=[],ti=[];function yn(Ai,fn){var jn=fn&&fn.stable;if(!jn){for(var Bi=0;Bi0&&(Ai.push(Ti,"="),Ai.push.apply(Ai,aa(arguments)),Ai.push(";")),Ti}return c(fn,{def:Bi,toString:function(){return va([jn.length>0?"var "+jn.join(",")+";":"",va(Ai)])}})}function ta(){var Ai=ai(),fn=ai(),jn=Ai.toString,Bi=fn.toString;function Ti(ei,Sa){fn(ei,Sa,"=",Ai.def(ei,Sa),";")}return c(function(){Ai.apply(Ai,aa(arguments))},{def:Ai.def,entry:Ai,exit:fn,save:Ti,set:function(ei,Sa,ha){Ti(ei,Sa),Ai(ei,Sa,"=",ha,";")},toString:function(){return jn()+Bi()}})}function $i(){var Ai=va(arguments),fn=ta(),jn=ta(),Bi=fn.toString,Ti=jn.toString;return c(fn,{then:function(){return fn.apply(fn,aa(arguments)),this},else:function(){return jn.apply(jn,aa(arguments)),this},toString:function(){var ei=Ti();return ei&&(ei="else{"+ei+"}"),va(["if(",Ai,"){",Bi(),"}",ei])}})}var ya=ai(),$a={};function Na(Ai,fn){var jn=[];function Bi(){var Va="a"+jn.length;return jn.push(Va),Va}fn=fn||0;for(var Ti=0;Ti":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},mi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ki={cw:ue,ccw:Me};function Pi(_e){return Array.isArray(_e)||Kr(_e)||rn(_e)}function Hi(_e){return _e.sort(function(kr,Lr){return kr===Zu?-1:Lr===Zu?1:kr=1,Dn>=2,kr)}else if(Lr===ls){var oi=_e.data;return new Yn(oi.thisDep,oi.contextDep,oi.propDep,kr)}else{if(Lr===ms)return new Yn(!1,!1,!1,kr);if(Lr===oo){for(var Jn=!1,mn=!1,ni=!1,Yi=0;Yi<_e.data.length;++Yi){var Ui=_e.data[Yi];if(Ui.type===no)ni=!0;else if(Ui.type===as)mn=!0;else if(Ui.type===Xo)Jn=!0;else if(Ui.type===Ji){Jn=!0;var ma=Ui.data;ma>=1&&(mn=!0),ma>=2&&(ni=!0)}else Ui.type===ls&&(Jn=Jn||Ui.data.thisDep,mn=mn||Ui.data.contextDep,ni=ni||Ui.data.propDep)}return new Yn(Jn,mn,ni,kr)}else return new Yn(Lr===Xo,Lr===as,Lr===no,kr)}}var zo=new Yn(!1,!1,!1,function(){});function Ro(_e,kr,Lr,Dn,oi,Jn,mn,ni,Yi,Ui,ma,Za,Ra,ta,bi,cn){var Nn=Ui.Record,Ii={add:32774,subtract:32778,"reverse subtract":32779};Lr.ext_blend_minmax&&(Ii.min=Le,Ii.max=Ne);var _i=Lr.angle_instanced_arrays,Qn=Lr.webgl_draw_buffers,Aa=Lr.oes_vertex_array_object,ua={dirty:!0,profile:cn.profile},ja={},gi=[],ti={},Ma={};function fa(Yt){return Yt.replace(".","_")}function Wi(Yt,ce,Se){var nr=fa(Yt);gi.push(Yt),ja[nr]=ua[nr]=!!Se,ti[nr]=ce}function $i(Yt,ce,Se){var nr=fa(Yt);gi.push(Yt),Array.isArray(Se)?(ua[nr]=Se.slice(),ja[nr]=Se.slice()):ua[nr]=ja[nr]=Se,Ma[nr]=ce}function xa(Yt){return!!isNaN(Yt)}Wi(qa,Nr),Wi(vs,Or),$i(rl,"blendColor",[0,0,0,0]),$i(Il,"blendEquationSeparate",[Xr,Xr]),$i(ou,"blendFuncSeparate",[en,Mr,en,Mr]),Wi(Wl,pn,!0),$i(su,"depthFunc",gn),$i(vl,"depthRange",[0,1]),$i(qu,"depthMask",!0),$i(Lu,Lu,[!0,!0,!0,!0]),Wi(fu,wr),$i(Oo,"cullFace",jt),$i(Es,Es,Me),$i(Yl,Yl,1),Wi(Rl,Bn),$i(yc,"polygonOffset",[0,0]),Wi(Hc,ri),Wi(zc,Di),$i(zh,"sampleCoverage",[1,!1]),Wi(Wc,tn),$i(Ih,"stencilMask",-1),$i(Iu,"stencilFunc",[sr,0,-1]),$i(Oh,"stencilOpSeparate",[At,ar,ar,ar]),$i(is,"stencilOpSeparate",[jt,ar,ar,ar]),Wi(Os,zn),$i(qc,"scissor",[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]),$i(Zu,Zu,[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]);var Io={gl:_e,context:Ra,strings:kr,next:ja,current:ua,draw:Za,elements:Jn,buffer:oi,shader:ma,attributes:Ui.state,vao:Ui,uniforms:Yi,framebuffer:ni,extensions:Lr,timer:ta,isBufferArgs:Pi},wo={primTypes:li,compareFuncs:Un,blendFuncs:Bi,blendEquations:Ii,stencilOps:mi,glTypes:Vn,orientationType:ki};Qn&&(wo.backBuffer=[jt],wo.drawBuffer=h(Dn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(ce){return On+ce})}));var va=0;function Ia(){var Yt=Da({cache:bi}),ce=Yt.link,Se=Yt.global;Yt.id=va++,Yt.batchId="0";var nr=ce(Io),Ye=Yt.shared={props:"a0"};Object.keys(Io).forEach(function(Xe){Ye[Xe]=Se.def(nr,".",Xe)});var tr=Yt.next={},lr=Yt.current={};Object.keys(Ma).forEach(function(Xe){Array.isArray(ua[Xe])&&(tr[Xe]=Se.def(Ye.next,".",Xe),lr[Xe]=Se.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Se.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,$e){switch($e.type){case Ji:var Cr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(ce($e.data),".call(",Cr.slice(0,Math.max($e.data.length+1,4)),")");case no:return Xe.def(Ye.props,$e.data);case as:return Xe.def(Ye.context,$e.data);case Xo:return Xe.def("this",$e.data);case ls:return $e.data.append(Yt,Xe),$e.data.ref;case ms:return $e.data.toString();case oo:return $e.data.map(function(on){return Yt.invoke(Xe,on)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var $e=kr.id(Xe);if($e in Ve)return Ve[$e];var Cr=Ui.scope[$e];Cr||(Cr=Ui.scope[$e]=new Nn);var on=Ve[$e]=ce(Cr);return on},Yt}function po(Yt){var ce=Yt.static,Se=Yt.dynamic,nr;if(Gf in ce){var Ye=!!ce[Gf];nr=Ha(function(lr,hr){return Ye}),nr.enable=Ye}else if(Gf in Se){var tr=Se[Gf];nr=io(tr,function(lr,hr){return lr.invoke(hr,tr)})}return nr}function Co(Yt,ce){var Se=Yt.static,nr=Yt.dynamic;if(qt in Se){var Ye=Se[qt];return Ye?(Ye=ni.getFramebuffer(Ye),Ha(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var $e=Xe.context;return hr.set($e,"."+Fr,Ve+".width"),hr.set($e,"."+ln,Ve+".height"),Ve})):Ha(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Fr,Xe+"."+xe),hr.set(Xe,"."+ln,Xe+"."+Ae),"null"})}else if(qt in nr){var tr=nr[qt];return io(tr,function(lr,hr){var Ve=lr.invoke(hr,tr),Xe=lr.shared,$e=Xe.framebuffer,Cr=hr.def($e,".getFramebuffer(",Ve,")");hr.set($e,".next",Cr);var on=Xe.context;return hr.set(on,"."+Fr,Cr+"?"+Cr+".width:"+on+"."+xe),hr.set(on,"."+ln,Cr+"?"+Cr+".height:"+on+"."+Ae),Cr})}else return null}function ns(Yt,ce,Se){var nr=Yt.static,Ye=Yt.dynamic;function tr(Ve){if(Ve in nr){var Xe=nr[Ve],$e=!0,Cr=Xe.x|0,on=Xe.y|0,hn,fi;return"width"in Xe?hn=Xe.width|0:$e=!1,"height"in Xe?fi=Xe.height|0:$e=!1,new Yn(!$e&&ce&&ce.thisDep,!$e&&ce&&ce.contextDep,!$e&&ce&&ce.propDep,function(Ai,di){var Ki=Ai.shared.context,Ti=hn;"width"in Xe||(Ti=di.def(Ki,".",Fr,"-",Cr));var Mi=fi;return"height"in Xe||(Mi=di.def(Ki,".",ln,"-",on)),[Cr,on,Ti,Mi]})}else if(Ve in Ye){var si=Ye[Ve],Gn=io(si,function(Ai,di){var Ki=Ai.invoke(di,si),Ti=Ai.shared.context,Mi=di.def(Ki,".x|0"),oa=di.def(Ki,".y|0"),Qa=di.def('"width" in ',Ki,"?",Ki,".width|0:","(",Ti,".",Fr,"-",Mi,")"),ho=di.def('"height" in ',Ki,"?",Ki,".height|0:","(",Ti,".",ln,"-",oa,")");return[Mi,oa,Qa,ho]});return ce&&(Gn.thisDep=Gn.thisDep||ce.thisDep,Gn.contextDep=Gn.contextDep||ce.contextDep,Gn.propDep=Gn.propDep||ce.propDep),Gn}else return ce?new Yn(ce.thisDep,ce.contextDep,ce.propDep,function(Ai,di){var Ki=Ai.shared.context;return[0,0,di.def(Ki,".",Fr),di.def(Ki,".",ln)]}):null}var lr=tr(Zu);if(lr){var hr=lr;lr=new Yn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var $e=hr.append(Ve,Xe),Cr=Ve.shared.context;return Xe.set(Cr,"."+Mn,$e[2]),Xe.set(Cr,"."+Xt,$e[3]),$e})}return{viewport:lr,scissor_box:tr(qc)}}function jl(Yt,ce){var Se=Yt.static,nr=typeof Se[ht]=="string"&&typeof Se[I]=="string";if(nr){if(Object.keys(ce.dynamic).length>0)return null;var Ye=ce.static,tr=Object.keys(Ye);if(tr.length>0&&typeof Ye[tr[0]]=="number"){for(var lr=[],hr=0;hr"+Mi+"?"+$e+".constant["+Mi+"]:0;"}).join(""),"}}else{","if(",hn,"(",$e,".buffer)){",Ai,"=",fi,".createStream(",Ie,",",$e,".buffer);","}else{",Ai,"=",fi,".getBuffer(",$e,".buffer);","}",di,'="type" in ',$e,"?",on.glTypes,"[",$e,".type]:",Ai,".dtype;",si.normalized,"=!!",$e,".normalized;");function Ki(Ti){Xe(si[Ti],"=",$e,".",Ti,"|0;")}return Ki("size"),Ki("offset"),Ki("stride"),Ki("divisor"),Xe("}}"),Xe.exit("if(",si.isStream,"){",fi,".destroyStream(",Ai,");","}"),si}Ye[tr]=io(lr,hr)}),Ye}function mc(Yt){var ce=Yt.static,Se=Yt.dynamic,nr={};return Object.keys(ce).forEach(function(Ye){var tr=ce[Ye];nr[Ye]=Ha(function(lr,hr){return typeof tr=="number"||typeof tr=="boolean"?""+tr:lr.link(tr)})}),Object.keys(Se).forEach(function(Ye){var tr=Se[Ye];nr[Ye]=io(tr,function(lr,hr){return lr.invoke(hr,tr)})}),nr}function xc(Yt,ce,Se,nr,Ye){Yt.static,Yt.dynamic;var tr=jl(Yt,ce),lr=Co(Yt),hr=ns(Yt,lr),Ve=hs(Yt),Xe=wu(Yt),$e=Al(Yt,Ye,tr);function Cr(Ai){var di=hr[Ai];di&&(Xe[Ai]=di)}Cr(Zu),Cr(fa(qc));var on=Object.keys(Xe).length>0,hn={framebuffer:lr,draw:Ve,shader:$e,state:Xe,dirty:on,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(hn.profile=po(Yt),hn.uniforms=pl(Se),hn.drawVAO=hn.scopeVAO=Ve.vao,!hn.drawVAO&&$e.program&&!tr&&Lr.angle_instanced_arrays&&Ve.static.elements){var fi=!0,si=$e.program.attributes.map(function(Ai){var di=ce.static[Ai];return fi=fi&&!!di,di});if(fi&&si.length>0){var Gn=Ui.getVAO(Ui.createVAO({attributes:si,elements:Ve.static.elements}));hn.drawVAO=new Yn(null,null,null,function(Ai,di){return Ai.link(Gn)}),hn.useVAO=!0}}return tr?hn.useVAO=!0:hn.attributes=Eu(ce),hn.context=mc(nr),hn}function yu(Yt,ce,Se){var nr=Yt.shared,Ye=nr.context,tr=Yt.scope();Object.keys(Se).forEach(function(lr){ce.save(Ye,"."+lr);var hr=Se[lr],Ve=hr.append(Yt,ce);Array.isArray(Ve)?tr(Ye,".",lr,"=[",Ve.join(),"];"):tr(Ye,".",lr,"=",Ve,";")}),ce(tr)}function pu(Yt,ce,Se,nr){var Ye=Yt.shared,tr=Ye.gl,lr=Ye.framebuffer,hr;Qn&&(hr=ce.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,$e=Ve.backBuffer,Cr;Se?Cr=Se.append(Yt,ce):Cr=ce.def(lr,".next"),nr||ce("if(",Cr,"!==",lr,".cur){"),ce("if(",Cr,"){",tr,".bindFramebuffer(",In,",",Cr,".framebuffer);"),Qn&&ce(hr,".drawBuffersWEBGL(",Xe,"[",Cr,".colorAttachments.length]);"),ce("}else{",tr,".bindFramebuffer(",In,",null);"),Qn&&ce(hr,".drawBuffersWEBGL(",$e,");"),ce("}",lr,".cur=",Cr,";"),nr||ce("}")}function ku(Yt,ce,Se){var nr=Yt.shared,Ye=nr.gl,tr=Yt.current,lr=Yt.next,hr=nr.current,Ve=nr.next,Xe=Yt.cond(hr,".dirty");gi.forEach(function($e){var Cr=fa($e);if(!(Cr in Se.state)){var on,hn;if(Cr in lr){on=lr[Cr],hn=tr[Cr];var fi=h(ua[Cr].length,function(Gn){return Xe.def(on,"[",Gn,"]")});Xe(Yt.cond(fi.map(function(Gn,Ai){return Gn+"!=="+hn+"["+Ai+"]"}).join("||")).then(Ye,".",Ma[Cr],"(",fi,");",fi.map(function(Gn,Ai){return hn+"["+Ai+"]="+Gn}).join(";"),";"))}else{on=Xe.def(Ve,".",Cr);var si=Yt.cond(on,"!==",hr,".",Cr);Xe(si),Cr in ti?si(Yt.cond(on).then(Ye,".enable(",ti[Cr],");").else(Ye,".disable(",ti[Cr],");"),hr,".",Cr,"=",on,";"):si(Ye,".",Ma[Cr],"(",on,");",hr,".",Cr,"=",on,";")}}}),Object.keys(Se.state).length===0&&Xe(hr,".dirty=false;"),ce(Xe)}function No(Yt,ce,Se,nr){var Ye=Yt.shared,tr=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Hi(Object.keys(Se)).forEach(function(Xe){var $e=Se[Xe];if(!(nr&&!nr($e))){var Cr=$e.append(Yt,ce);if(ti[Xe]){var on=ti[Xe];Na($e)?(Ve=Yt.link(Cr,{stable:!0}),ce(Yt.cond(Ve).then(hr,".enable(",on,");").else(hr,".disable(",on,");")),ce(lr,".",Xe,"=",Ve,";")):(ce(Yt.cond(Cr).then(hr,".enable(",on,");").else(hr,".disable(",on,");")),ce(lr,".",Xe,"=",Cr,";"))}else if(Pn(Cr)){var hn=tr[Xe];ce(hr,".",Ma[Xe],"(",Cr,");",Cr.map(function(fi,si){return hn+"["+si+"]="+fi}).join(";"),";")}else Na($e)?(Ve=Yt.link(Cr,{stable:!0}),ce(hr,".",Ma[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):ce(hr,".",Ma[Xe],"(",Cr,");",lr,".",Xe,"=",Cr,";")}})}function Tu(Yt,ce){_i&&(Yt.instancing=ce.def(Yt.shared.extensions,".angle_instanced_arrays"))}function ll(Yt,ce,Se,nr,Ye){var tr=Yt.shared,lr=Yt.stats,hr=tr.current,Ve=tr.timer,Xe=Se.profile;function $e(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Cr,on;function hn(Ki){Cr=ce.def(),Ki(Cr,"=",$e(),";"),typeof Ye=="string"?Ki(lr,".count+=",Ye,";"):Ki(lr,".count++;"),ta&&(nr?(on=ce.def(),Ki(on,"=",Ve,".getNumPendingQueries();")):Ki(Ve,".beginQuery(",lr,");"))}function fi(Ki){Ki(lr,".cpuTime+=",$e(),"-",Cr,";"),ta&&(nr?Ki(Ve,".pushScopeStats(",on,",",Ve,".getNumPendingQueries(),",lr,");"):Ki(Ve,".endQuery();"))}function si(Ki){var Ti=ce.def(hr,".profile");ce(hr,".profile=",Ki,";"),ce.exit(hr,".profile=",Ti,";")}var Gn;if(Xe){if(Na(Xe)){Xe.enable?(hn(ce),fi(ce.exit),si("true")):si("false");return}Gn=Xe.append(Yt,ce),si(Gn)}else Gn=ce.def(hr,".profile");var Ai=Yt.block();hn(Ai),ce("if(",Gn,"){",Ai,"}");var di=Yt.block();fi(di),ce.exit("if(",Gn,"){",di,"}")}function Cu(Yt,ce,Se,nr,Ye){var tr=Yt.shared;function lr(Ve){switch(Ve){case ca:case Eo:case Fs:return 2;case wa:case ds:case wl:return 3;case so:case dl:case Su:return 4;default:return 1}}function hr(Ve,Xe,$e){var Cr=tr.gl,on=ce.def(Ve,".location"),hn=ce.def(tr.attributes,"[",on,"]"),fi=$e.state,si=$e.buffer,Gn=[$e.x,$e.y,$e.z,$e.w],Ai=["buffer","normalized","offset","stride"];function di(){ce("if(!",hn,".buffer){",Cr,".enableVertexAttribArray(",on,");}");var Ti=$e.type,Mi;if($e.size?Mi=ce.def($e.size,"||",Xe):Mi=Xe,ce("if(",hn,".type!==",Ti,"||",hn,".size!==",Mi,"||",Ai.map(function(Qa){return hn+"."+Qa+"!=="+$e[Qa]}).join("||"),"){",Cr,".bindBuffer(",Ie,",",si,".buffer);",Cr,".vertexAttribPointer(",[on,Mi,Ti,$e.normalized,$e.stride,$e.offset],");",hn,".type=",Ti,";",hn,".size=",Mi,";",Ai.map(function(Qa){return hn+"."+Qa+"="+$e[Qa]+";"}).join(""),"}"),_i){var oa=$e.divisor;ce("if(",hn,".divisor!==",oa,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[on,oa],");",hn,".divisor=",oa,";}")}}function Ki(){ce("if(",hn,".buffer){",Cr,".disableVertexAttribArray(",on,");",hn,".buffer=null;","}if(",$a.map(function(Ti,Mi){return hn+"."+Ti+"!=="+Gn[Mi]}).join("||"),"){",Cr,".vertexAttrib4f(",on,",",Gn,");",$a.map(function(Ti,Mi){return hn+"."+Ti+"="+Gn[Mi]+";"}).join(""),"}")}fi===Pa?di():fi===ba?Ki():(ce("if(",fi,"===",Pa,"){"),di(),ce("}else{"),Ki(),ce("}"))}nr.forEach(function(Ve){var Xe=Ve.name,$e=Se.attributes[Xe],Cr;if($e){if(!Ye($e))return;Cr=$e.append(Yt,ce)}else{if(!Ye(zo))return;var on=Yt.scopeAttrib(Xe);Cr={},Object.keys(new Nn).forEach(function(hn){Cr[hn]=ce.def(on,".",hn)})}hr(Yt.link(Ve),lr(Ve.info.type),Cr)})}function _c(Yt,ce,Se,nr,Ye,tr){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var qo=[],_s=[],Ol=0;Ol>1)",si],");")}function oa(){Se(Gn,".drawArraysInstancedANGLE(",[on,hn,fi,si],");")}$e&&$e!=="null"?di?Mi():(Se("if(",$e,"){"),Mi(),Se("}else{"),oa(),Se("}")):oa()}function Ti(){function Mi(){Se(tr+".drawElements("+[on,fi,Ai,hn+"<<(("+Ai+"-"+la+")>>1)"]+");")}function oa(){Se(tr+".drawArrays("+[on,hn,fi]+");")}$e&&$e!=="null"?di?Mi():(Se("if(",$e,"){"),Mi(),Se("}else{"),oa(),Se("}")):oa()}_i&&(typeof si!="number"||si>=0)?typeof si=="string"?(Se("if(",si,">0){"),Ki(),Se("}else if(",si,"<0){"),Ti(),Se("}")):Ki():Ti()}function Cs(Yt,ce,Se,nr,Ye){var tr=Ia(),lr=tr.proc("body",Ye);return _i&&(tr.instancing=lr.def(tr.shared.extensions,".angle_instanced_arrays")),Yt(tr,lr,Se,nr),tr.compile().body}function Ml(Yt,ce,Se,nr){Tu(Yt,ce),Se.useVAO?Se.drawVAO?ce(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,ce),");"):ce(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(ce(Yt.shared.vao,".setVAO(null);"),Cu(Yt,ce,Se,nr.attributes,function(){return!0})),_c(Yt,ce,Se,nr.uniforms,function(){return!0},!1),Lo(Yt,ce,ce,Se)}function xl(Yt,ce){var Se=Yt.proc("draw",1);Tu(Yt,Se),yu(Yt,Se,ce.context),pu(Yt,Se,ce.framebuffer),ku(Yt,Se,ce),No(Yt,Se,ce.state),ll(Yt,Se,ce,!1,!0);var nr=ce.shader.progVar.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",nr,".program);"),ce.shader.program)Ml(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),tr=Se.def(nr,".id"),lr=Se.def(Ye,"[",tr,"]");Se(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",tr,"]=",Yt.link(function(hr){return Cs(Ml,Yt,ce,hr,1)}),"(",nr,");",lr,".call(this,a0);"))}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function Z(Yt,ce,Se,nr){Yt.batchId="a1",Tu(Yt,ce);function Ye(){return!0}Cu(Yt,ce,Se,nr.attributes,Ye),_c(Yt,ce,Se,nr.uniforms,Ye,!1),Lo(Yt,ce,ce,Se)}function ot(Yt,ce,Se,nr){Tu(Yt,ce);var Ye=Se.contextDep,tr=ce.def(),lr="a0",hr="a1",Ve=ce.def();Yt.shared.props=Ve,Yt.batchId=tr;var Xe=Yt.scope(),$e=Yt.scope();ce(Xe.entry,"for(",tr,"=0;",tr,"<",hr,";++",tr,"){",Ve,"=",lr,"[",tr,"];",$e,"}",Xe.exit);function Cr(Ai){return Ai.contextDep&&Ye||Ai.propDep}function on(Ai){return!Cr(Ai)}if(Se.needsContext&&yu(Yt,$e,Se.context),Se.needsFramebuffer&&pu(Yt,$e,Se.framebuffer),No(Yt,$e,Se.state,Cr),Se.profile&&Cr(Se.profile)&&ll(Yt,$e,Se,!1,!0),nr)Se.useVAO?Se.drawVAO?Cr(Se.drawVAO)?$e(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,$e),");"):Xe(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Cu(Yt,Xe,Se,nr.attributes,on),Cu(Yt,$e,Se,nr.attributes,Cr)),_c(Yt,Xe,Se,nr.uniforms,on,!1),_c(Yt,$e,Se,nr.uniforms,Cr,!0),Lo(Yt,Xe,$e,Se);else{var hn=Yt.global.def("{}"),fi=Se.shader.progVar.append(Yt,$e),si=$e.def(fi,".id"),Gn=$e.def(hn,"[",si,"]");$e(Yt.shared.gl,".useProgram(",fi,".program);","if(!",Gn,"){",Gn,"=",hn,"[",si,"]=",Yt.link(function(Ai){return Cs(Z,Yt,Se,Ai,2)}),"(",fi,");}",Gn,".call(this,a0[",tr,"],",tr,");")}}function et(Yt,ce){var Se=Yt.proc("batch",2);Yt.batchId="0",Tu(Yt,Se);var nr=!1,Ye=!0;Object.keys(ce.context).forEach(function(hn){nr=nr||ce.context[hn].propDep}),nr||(yu(Yt,Se,ce.context),Ye=!1);var tr=ce.framebuffer,lr=!1;tr?(tr.propDep?nr=lr=!0:tr.contextDep&&nr&&(lr=!0),lr||pu(Yt,Se,tr)):pu(Yt,Se,null),ce.state.viewport&&ce.state.viewport.propDep&&(nr=!0);function hr(hn){return hn.contextDep&&nr||hn.propDep}ku(Yt,Se,ce),No(Yt,Se,ce.state,function(hn){return!hr(hn)}),(!ce.profile||!hr(ce.profile))&&ll(Yt,Se,ce,!1,"a1"),ce.contextDep=nr,ce.needsContext=Ye,ce.needsFramebuffer=lr;var Ve=ce.shader.progVar;if(Ve.contextDep&&nr||Ve.propDep)ot(Yt,Se,ce,null);else{var Xe=Ve.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",Xe,".program);"),ce.shader.program)ot(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var $e=Yt.global.def("{}"),Cr=Se.def(Xe,".id"),on=Se.def($e,"[",Cr,"]");Se(Yt.cond(on).then(on,".call(this,a0,a1);").else(on,"=",$e,"[",Cr,"]=",Yt.link(function(hn){return Cs(ot,Yt,ce,hn,2)}),"(",Xe,");",on,".call(this,a0,a1);"))}}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function xt(Yt,ce){var Se=Yt.proc("scope",3);Yt.batchId="a2";var nr=Yt.shared,Ye=nr.current;if(yu(Yt,Se,ce.context),ce.framebuffer&&ce.framebuffer.append(Yt,Se),Hi(Object.keys(ce.state)).forEach(function(hr){var Ve=ce.state[hr],Xe=Ve.append(Yt,Se);Pn(Xe)?Xe.forEach(function($e,Cr){xa($e)?Se.set(Yt.next[hr],"["+Cr+"]",$e):Se.set(Yt.next[hr],"["+Cr+"]",Yt.link($e,{stable:!0}))}):Na(Ve)?Se.set(nr.next,"."+hr,Yt.link(Xe,{stable:!0})):Se.set(nr.next,"."+hr,Xe)}),ll(Yt,Se,ce,!0,!0),[Et,ke,Vt,De,It].forEach(function(hr){var Ve=ce.draw[hr];if(Ve){var Xe=Ve.append(Yt,Se);xa(Xe)?Se.set(nr.draw,"."+hr,Xe):Se.set(nr.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(ce.uniforms).forEach(function(hr){var Ve=ce.uniforms[hr].append(Yt,Se);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return xa(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Se.set(nr.uniforms,"["+Yt.link(kr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(ce.attributes).forEach(function(hr){var Ve=ce.attributes[hr].append(Yt,Se),Xe=Yt.scopeAttrib(hr);Object.keys(new Nn).forEach(function($e){Se.set(Xe,"."+$e,Ve[$e])})}),ce.scopeVAO){var tr=ce.scopeVAO.append(Yt,Se);xa(tr)?Se.set(nr.vao,".targetVAO",tr):Se.set(nr.vao,".targetVAO",Yt.link(tr,{stable:!0}))}function lr(hr){var Ve=ce.shader[hr];if(Ve){var Xe=Ve.append(Yt,Se);xa(Xe)?Se.set(nr.shader,"."+hr,Xe):Se.set(nr.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(I),lr(ht),Object.keys(ce.state).length>0&&(Se(Ye,".dirty=true;"),Se.exit(Ye,".dirty=true;")),Se("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Ut(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var ce=Object.keys(Yt),Se=0;Se=0;--Lo){var Cs=xa[Lo];Cs&&Cs(ta,null,0)}Lr.flush(),Ui&&Ui.update()}function Co(){!Ia&&xa.length>0&&(Ia=x.next(po))}function ns(){Ia&&(x.cancel(po),Ia=null)}function jl(Lo){Lo.preventDefault(),ns(),Io.forEach(function(Cs){Cs()})}function Al(Lo){Lr.getError(),oi.restore(),ua.restore(),Ii.restore(),ja.restore(),gi.restore(),ti.restore(),Qn.restore(),Ui&&Ui.restore(),Ma.procs.refresh(),Co(),wo.forEach(function(Cs){Cs()})}$i&&($i.addEventListener(il,jl,!1),$i.addEventListener(lu,Al,!1));function hs(){xa.length=0,ns(),$i&&($i.removeEventListener(il,jl),$i.removeEventListener(lu,Al)),ua.clear(),ti.clear(),gi.clear(),Qn.clear(),ja.clear(),_i.clear(),Ii.clear(),Ui&&Ui.clear(),va.forEach(function(Lo){Lo()})}function wu(Lo){function Cs(Ye){var tr=c({},Ye);delete tr.uniforms,delete tr.attributes,delete tr.context,delete tr.vao,"stencil"in tr&&tr.stencil.op&&(tr.stencil.opBack=tr.stencil.opFront=tr.stencil.op,delete tr.stencil.op);function lr(hr){if(hr in tr){var Ve=tr[hr];delete tr[hr],Object.keys(Ve).forEach(function(Xe){tr[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(tr.vao=Ye.vao),tr}function Ml(Ye,tr){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(tr&&Array.isArray(Xe)){for(var $e=0;$e0)return ye.call(this,Se(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return ye.call(this,Ye,Ye.length)}else return fe.call(this,Ye)}return c(nr,{stats:xt,destroy:function(){Ut.destroy()}})}var pl=ti.setFBO=wu({framebuffer:f.define.call(null,Kl,"framebuffer")});function Eu(Lo,Cs){var Ml=0;Ma.procs.poll();var xl=Cs.color;xl&&(Lr.clearColor(+xl[0]||0,+xl[1]||0,+xl[2]||0,+xl[3]||0),Ml|=Ku),"depth"in Cs&&(Lr.clearDepth(+Cs.depth),Ml|=du),"stencil"in Cs&&(Lr.clearStencil(Cs.stencil|0),Ml|=_o),Lr.clear(Ml)}function mc(Lo){if("framebuffer"in Lo)if(Lo.framebuffer&&Lo.framebuffer_reglType==="framebufferCube")for(var Cs=0;Cs<6;++Cs)pl(c({framebuffer:Lo.framebuffer.faces[Cs]},Lo),Eu);else pl(Lo,Eu);else Eu(null,Lo)}function xc(Lo){xa.push(Lo);function Cs(){var Ml=eu(xa,Lo);function xl(){var Z=eu(xa,xl);xa[Z]=xa[xa.length-1],xa.length-=1,xa.length<=0&&ns()}xa[Ml]=xl}return Co(),{cancel:Cs}}function yu(){var Lo=Wi.viewport,Cs=Wi.scissor_box;Lo[0]=Lo[1]=Cs[0]=Cs[1]=0,ta.viewportWidth=ta.framebufferWidth=ta.drawingBufferWidth=Lo[2]=Cs[2]=Lr.drawingBufferWidth,ta.viewportHeight=ta.framebufferHeight=ta.drawingBufferHeight=Lo[3]=Cs[3]=Lr.drawingBufferHeight}function pu(){ta.tick+=1,ta.time=No(),yu(),Ma.procs.poll()}function ku(){ja.refresh(),yu(),Ma.procs.refresh(),Ui&&Ui.update()}function No(){return(y()-ma)/1e3}ku();function Tu(Lo,Cs){var Ml;switch(Lo){case"frame":return xc(Cs);case"lost":Ml=Io;break;case"restore":Ml=wo;break;case"destroy":Ml=va;break}return Ml.push(Cs),{cancel:function(){for(var xl=0;xl=0},read:fa,destroy:hs,_gl:Lr,_refresh:ku,poll:function(){pu(),Ui&&Ui.update()},now:No,stats:mn,getCachedCode:ll,preloadCachedCode:Cu});return kr.onDone(null,_c),_c}return wh})}),sH=Ft((Q,$)=>{var c=zg();$.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},P(r)?r={container:r}:S(r)?r={container:r}:t(r)?r={gl:r}:r=c(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=window.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var a=document.querySelector(r.container);if(!a)throw Error("Element "+r.container+" is not found");r.container=a}P(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=e(),r.container.appendChild(r.canvas),g(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=e(),r.container.appendChild(r.canvas),g(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{r.gl=r.canvas.getContext(n,r.attrs)}catch{}return r.gl}),r.gl};function g(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*window.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*window.innerHeight);else{var a=r.container.getBoundingClientRect();r.canvas.width=r.width||a.right-a.left,r.canvas.height=r.height||a.bottom-a.top}}function P(r){return typeof r.getContext=="function"&&"width"in r&&"height"in r}function S(r){return typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.getBoundingClientRect=="function"}function t(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}function e(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}}),lH=Ft((Q,$)=>{var c=GS(),g=[32,126];$.exports=P;function P(S){S=S||{};var t=S.shape?S.shape:S.canvas?[S.canvas.width,S.canvas.height]:[512,512],e=S.canvas||document.createElement("canvas"),r=S.font,a=typeof S.step=="number"?[S.step,S.step]:S.step||[32,32],n=S.chars||g;if(r&&typeof r!="string"&&(r=c(r)),!Array.isArray(n))n=String(n).split("");else if(n.length===2&&typeof n[0]=="number"&&typeof n[1]=="number"){for(var o=[],i=n[0],s=0;i<=n[1];i++)o[s++]=String.fromCharCode(i);n=o}t=t.slice(),e.width=t[0],e.height=t[1];var f=e.getContext("2d");f.fillStyle="#000",f.fillRect(0,0,e.width,e.height),f.font=r,f.textAlign="center",f.textBaseline="middle",f.fillStyle="#fff";for(var x=a[0]/2,y=a[1]/2,i=0;it[0]-a[0]/2&&(x=a[0]/2,y+=a[1]);return e}}),YS=Ft(Q=>{"use restrict";var $=32;Q.INT_BITS=$,Q.INT_MAX=2147483647,Q.INT_MIN=-1<<$-1,Q.sign=function(P){return(P>0)-(P<0)},Q.abs=function(P){var S=P>>$-1;return(P^S)-S},Q.min=function(P,S){return S^(P^S)&-(P65535)<<4,P>>>=S,t=(P>255)<<3,P>>>=t,S|=t,t=(P>15)<<2,P>>>=t,S|=t,t=(P>3)<<1,P>>>=t,S|=t,S|P>>1},Q.log10=function(P){return P>=1e9?9:P>=1e8?8:P>=1e7?7:P>=1e6?6:P>=1e5?5:P>=1e4?4:P>=1e3?3:P>=100?2:P>=10?1:0},Q.popCount=function(P){return P=P-(P>>>1&1431655765),P=(P&858993459)+(P>>>2&858993459),(P+(P>>>4)&252645135)*16843009>>>24};function c(P){var S=32;return P&=-P,P&&S--,P&65535&&(S-=16),P&16711935&&(S-=8),P&252645135&&(S-=4),P&858993459&&(S-=2),P&1431655765&&(S-=1),S}Q.countTrailingZeros=c,Q.nextPow2=function(P){return P+=P===0,--P,P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P+1},Q.prevPow2=function(P){return P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P-(P>>>1)},Q.parity=function(P){return P^=P>>>16,P^=P>>>8,P^=P>>>4,P&=15,27030>>>P&1};var g=new Array(256);(function(P){for(var S=0;S<256;++S){var t=S,e=S,r=7;for(t>>>=1;t;t>>>=1)e<<=1,e|=t&1,--r;P[S]=e<>>8&255]<<16|g[P>>>16&255]<<8|g[P>>>24&255]},Q.interleave2=function(P,S){return P&=65535,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,P|S<<1},Q.deinterleave2=function(P,S){return P=P>>>S&1431655765,P=(P|P>>>1)&858993459,P=(P|P>>>2)&252645135,P=(P|P>>>4)&16711935,P=(P|P>>>16)&65535,P<<16>>16},Q.interleave3=function(P,S,t){return P&=1023,P=(P|P<<16)&4278190335,P=(P|P<<8)&251719695,P=(P|P<<4)&3272356035,P=(P|P<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,P|=S<<1,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,P|t<<2},Q.deinterleave3=function(P,S){return P=P>>>S&1227133513,P=(P|P>>>2)&3272356035,P=(P|P>>>4)&251719695,P=(P|P>>>8)&4278190335,P=(P|P>>>16)&1023,P<<22>>22},Q.nextCombination=function(P){var S=P|P-1;return S+1|(~S&-~S)-1>>>c(P)+1}}),uH=Ft((Q,$)=>{function c(S,t,e){var r=S[e]|0;if(r<=0)return[];var a=new Array(r),n;if(e===S.length-1)for(n=0;n"u"&&(t=0),typeof S){case"number":if(S>0)return g(S|0,t);break;case"object":if(typeof S.length=="number")return c(S,t,0);break}return[]}$.exports=P}),cH=Ft(Q=>{var $=YS(),c=uH(),g=nx().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:c([32,0]),UINT16:c([32,0]),UINT32:c([32,0]),BIGUINT64:c([32,0]),INT8:c([32,0]),INT16:c([32,0]),INT32:c([32,0]),BIGINT64:c([32,0]),FLOAT:c([32,0]),DOUBLE:c([32,0]),DATA:c([32,0]),UINT8C:c([32,0]),BUFFER:c([32,0])});var P=typeof Uint8ClampedArray<"u",S=typeof BigUint64Array<"u",t=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=c([32,0])),e.BIGUINT64||(e.BIGUINT64=c([32,0])),e.BIGINT64||(e.BIGINT64=c([32,0])),e.BUFFER||(e.BUFFER=c([32,0]));var r=e.DATA,a=e.BUFFER;Q.free=function(h){if(g.isBuffer(h))a[$.log2(h.length)].push(h);else{if(Object.prototype.toString.call(h)!=="[object ArrayBuffer]"&&(h=h.buffer),!h)return;var p=h.length||h.byteLength,k=$.log2(p)|0;r[k].push(h)}};function n(h){if(h){var p=h.length||h.byteLength,k=$.log2(p);r[k].push(h)}}function o(h){n(h.buffer)}Q.freeUint8=Q.freeUint16=Q.freeUint32=Q.freeBigUint64=Q.freeInt8=Q.freeInt16=Q.freeInt32=Q.freeBigInt64=Q.freeFloat32=Q.freeFloat=Q.freeFloat64=Q.freeDouble=Q.freeUint8Clamped=Q.freeDataView=o,Q.freeArrayBuffer=n,Q.freeBuffer=function(h){a[$.log2(h.length)].push(h)},Q.malloc=function(h,p){if(p===void 0||p==="arraybuffer")return i(h);switch(p){case"uint8":return s(h);case"uint16":return f(h);case"uint32":return x(h);case"int8":return y(h);case"int16":return v(h);case"int32":return T(h);case"float":case"float32":return u(h);case"double":case"float64":return b(h);case"uint8_clamped":return _(h);case"bigint64":return M(h);case"biguint64":return C(h);case"buffer":return A(h);case"data":case"dataview":return E(h);default:return null}return null};function i(p){var p=$.nextPow2(p),k=$.log2(p),w=r[k];return w.length>0?w.pop():new ArrayBuffer(p)}Q.mallocArrayBuffer=i;function s(h){return new Uint8Array(i(h),0,h)}Q.mallocUint8=s;function f(h){return new Uint16Array(i(2*h),0,h)}Q.mallocUint16=f;function x(h){return new Uint32Array(i(4*h),0,h)}Q.mallocUint32=x;function y(h){return new Int8Array(i(h),0,h)}Q.mallocInt8=y;function v(h){return new Int16Array(i(2*h),0,h)}Q.mallocInt16=v;function T(h){return new Int32Array(i(4*h),0,h)}Q.mallocInt32=T;function u(h){return new Float32Array(i(4*h),0,h)}Q.mallocFloat32=Q.mallocFloat=u;function b(h){return new Float64Array(i(8*h),0,h)}Q.mallocFloat64=Q.mallocDouble=b;function _(h){return P?new Uint8ClampedArray(i(h),0,h):s(h)}Q.mallocUint8Clamped=_;function C(h){return S?new BigUint64Array(i(8*h),0,h):null}Q.mallocBigUint64=C;function M(h){return t?new BigInt64Array(i(8*h),0,h):null}Q.mallocBigInt64=M;function E(h){return new DataView(i(h),0,h)}Q.mallocDataView=E;function A(h){h=$.nextPow2(h);var p=$.log2(h),k=a[p];return k.length>0?k.pop():new g(h)}Q.mallocBuffer=A,Q.clearCache=function(){for(var h=0;h<32;++h)e.UINT8[h].length=0,e.UINT16[h].length=0,e.UINT32[h].length=0,e.INT8[h].length=0,e.INT16[h].length=0,e.INT32[h].length=0,e.FLOAT[h].length=0,e.DOUBLE[h].length=0,e.BIGUINT64[h].length=0,e.BIGINT64[h].length=0,e.UINT8C[h].length=0,r[h].length=0,a[h].length=0}}),hH=Ft((Q,$)=>{var c=Object.prototype.toString;$.exports=function(g){var P;return c.call(g)==="[object Object]"&&(P=Object.getPrototypeOf(g),P===null||P===Object.getPrototypeOf({}))}}),KS=Ft((Q,$)=>{$.exports=function(c,g){g||(g=[0,""]),c=String(c);var P=parseFloat(c,10);return g[0]=P,g[1]=c.match(/[\d.\-\+]*\s*(.*)/)[1]||"",g}}),fH=Ft((Q,$)=>{var c=KS();$.exports=t;var g=96;function P(e,r){var a=c(getComputedStyle(e).getPropertyValue(r));return a[0]*t(a[1],e)}function S(e,r){var a=document.createElement("div");a.style["font-size"]="128"+e,r.appendChild(a);var n=P(a,"font-size")/128;return r.removeChild(a),n}function t(e,r){switch(r=r||document.body,e=(e||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),e){case"%":return r.clientHeight/100;case"ch":case"ex":return S(e,r);case"em":return P(r,"font-size");case"rem":return P(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return g;case"cm":return g/2.54;case"mm":return g/25.4;case"pt":return g/72;case"pc":return g/6}return 1}}),dH=Ft((Q,$)=>{$.exports=S;var c=S.canvas=document.createElement("canvas"),g=c.getContext("2d"),P=t([32,126]);S.createPairs=t,S.ascii=P;function S(e,r){Array.isArray(e)&&(e=e.join(", "));var a={},n,o=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?n=t(r):Array.isArray(r)?n=r:(r.o?n=t(r.o):r.pairs&&(n=r.pairs),r.fontSize&&(o=r.fontSize),r.threshold!=null&&(i=r.threshold))),n||(n=P),g.font=o+"px "+e;for(var s=0;so*i){var v=(y-x)/o;a[f]=v*1e3}}return a}function t(e){for(var r=[],a=e[0];a<=e[1];a++)for(var n=String.fromCharCode(a),o=e[0];o{$.exports=c,c.canvas=document.createElement("canvas"),c.cache={};function c(i,e){e||(e={}),(typeof i=="string"||Array.isArray(i))&&(e.family=i);var r=Array.isArray(e.family)?e.family.join(", "):e.family;if(!r)throw Error("`family` must be defined");var a=e.size||e.fontSize||e.em||48,n=e.weight||e.fontWeight||"",o=e.style||e.fontStyle||"",i=[o,n,a].join(" ")+"px "+r,s=e.origin||"top";if(c.cache[r]&&a<=c.cache[r].em)return g(c.cache[r],s);var f=e.canvas||c.canvas,x=f.getContext("2d"),y={upper:e.upper!==void 0?e.upper:"H",lower:e.lower!==void 0?e.lower:"x",descent:e.descent!==void 0?e.descent:"p",ascent:e.ascent!==void 0?e.ascent:"h",tittle:e.tittle!==void 0?e.tittle:"i",overshoot:e.overshoot!==void 0?e.overshoot:"O"},v=Math.ceil(a*1.5);f.height=v,f.width=v*.5,x.font=i;var T="H",u={top:0};x.clearRect(0,0,v,v),x.textBaseline="top",x.fillStyle="black",x.fillText(T,0,0);var b=P(x.getImageData(0,0,v,v));x.clearRect(0,0,v,v),x.textBaseline="bottom",x.fillText(T,0,v);var _=P(x.getImageData(0,0,v,v));u.lineHeight=u.bottom=v-_+b,x.clearRect(0,0,v,v),x.textBaseline="alphabetic",x.fillText(T,0,v);var C=P(x.getImageData(0,0,v,v)),M=v-C-1+b;u.baseline=u.alphabetic=M,x.clearRect(0,0,v,v),x.textBaseline="middle",x.fillText(T,0,v*.5);var E=P(x.getImageData(0,0,v,v));u.median=u.middle=v-E-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="hanging",x.fillText(T,0,v*.5);var A=P(x.getImageData(0,0,v,v));u.hanging=v-A-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="ideographic",x.fillText(T,0,v);var h=P(x.getImageData(0,0,v,v));if(u.ideographic=v-h-1+b,y.upper&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.upper,0,0),u.upper=P(x.getImageData(0,0,v,v)),u.capHeight=u.baseline-u.upper),y.lower&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.lower,0,0),u.lower=P(x.getImageData(0,0,v,v)),u.xHeight=u.baseline-u.lower),y.tittle&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.tittle,0,0),u.tittle=P(x.getImageData(0,0,v,v))),y.ascent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.ascent,0,0),u.ascent=P(x.getImageData(0,0,v,v))),y.descent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.descent,0,0),u.descent=S(x.getImageData(0,0,v,v))),y.overshoot){x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.overshoot,0,0);var p=S(x.getImageData(0,0,v,v));u.overshoot=p-M}for(var k in u)u[k]/=a;return u.em=a,c.cache[r]=u,g(u,s)}function g(t,e){var r={};typeof e=="string"&&(e=t[e]);for(var a in t)a!=="em"&&(r[a]=t[a]-e);return r}function P(t){for(var e=t.height,r=t.data,a=3;a0;a-=4)if(r[a]!==0)return Math.floor((a-3)*.25/e)}}),mH=Ft((Q,$)=>{var c=aH(),g=zg(),P=oH(),S=sH(),t=jS(),e=U1(),r=lH(),a=cH(),n=xb(),o=hH(),i=KS(),s=fH(),f=dH(),x=zd(),y=pH(),v=yx(),T=YS(),u=T.nextPow2,b=new t,_=!1;document.body&&(C=document.body.appendChild(document.createElement("div")),C.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(C).fontStretch&&(_=!0),document.body.removeChild(C));var C,M=function(A){E(A)?(A={regl:A},this.gl=A.regl._gl):this.gl=S(A),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=A.regl||P({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(o(A)?A:{})};M.prototype.createShader=function(){var A=this.regl,h=A({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:A.prop("count"),offset:A.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:A.this("sizeBuffer")},width:{offset:0,stride:8,buffer:A.this("sizeBuffer")},char:A.this("charBuffer"),position:A.this("position")},uniforms:{atlasSize:function(k,w){return[w.atlas.width,w.atlas.height]},atlasDim:function(k,w){return[w.atlas.cols,w.atlas.rows]},atlas:function(k,w){return w.atlas.texture},charStep:function(k,w){return w.atlas.step},em:function(k,w){return w.atlas.em},color:A.prop("color"),opacity:A.prop("opacity"),viewport:A.this("viewportArray"),scale:A.this("scale"),align:A.prop("align"),baseline:A.prop("baseline"),translate:A.this("translate"),positionOffset:A.prop("positionOffset")},primitive:"points",viewport:A.this("viewport"),vert:` +`),jn;if(kr&&(jn=gc(fn),kr[jn]))return kr[jn].apply(null,li);var Bi=Function.apply(null,Dn.concat(fn));return kr&&(kr[jn]=Bi),Bi.apply(null,li)}return{global:ya,link:yn,block:ai,proc:Na,scope:ta,cond:$i,compile:ia}}var Za="xyzw".split(""),ca=5121,Oa=1,ka=2,na=0,io=1,ns=2,Ko=3,ls=4,ps=5,oo=6,qa="dither",gs="blend.enable",el="blend.color",Pl="blend.equation",su="blend.func",$l="depth.enable",lu="depth.func",ml="depth.range",qu="depth.mask",Iu="colorMask",fu="cull.enable",Oo="cull.face",Es="frontFace",Kl="lineWidth",Rl="polygonOffset.enable",vc="polygonOffset.offset",Hc="sample.alpha",Lc="sample.enable",Ih="sample.coverage",Wc="stencil.enable",zh="stencil.mask",Du="stencil.func",Oh="stencil.opFront",rs="stencil.opBack",zs="scissor.enable",qc="scissor.box",$u="viewport",qf="profile",$t="framebuffer",z="vert",ht="frag",Et="elements",zt="primitive",Ht="count",ke="offset",Fe="instances",Ke="vao",vr="Width",Dr="Height",Fr=$t+vr,un=$t+Dr,Sn=$u+vr,Xt=$u+Dr,ae="drawingBuffer",xe=ae+vr,Ae=ae+Dr,je=[su,Pl,Du,Oh,rs,Ih,$u,qc,vc],Oe=34962,$e=34963,wr=2884,Or=3042,Nr=3024,en=2960,vn=2929,In=3089,Nn=32823,ii=32926,Ui=32928,pa=5126,fa=35664,Ta=35665,so=35666,Bo=5124,So=35667,ds=35668,fl=35669,vl=35670,Ds=35671,wl=35672,Eu=35673,gu=35674,$s=35675,Zs=35676,Yu=35678,dc=35680,$c=4,At=1028,Ut=1029,ue=2304,Me=2305,Pe=32775,Ne=32776,sr=519,ar=7680,Er=0,rn=1,Jr=32774,xn=513,zn=36160,On=36064,Hi={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Vn={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},yi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Si={cw:ue,ccw:Me};function Ri(_e){return Array.isArray(_e)||Xr(_e)||nn(_e)}function Gi(_e){return _e.sort(function(kr,Ir){return kr===$u?-1:Ir===$u?1:kr=1,Dn>=2,kr)}else if(Ir===ls){var li=_e.data;return new Kn(li.thisDep,li.contextDep,li.propDep,kr)}else{if(Ir===ps)return new Kn(!1,!1,!1,kr);if(Ir===oo){for(var ti=!1,yn=!1,ai=!1,ta=0;ta<_e.data.length;++ta){var $i=_e.data[ta];if($i.type===io)ai=!0;else if($i.type===ns)yn=!0;else if($i.type===Ko)ti=!0;else if($i.type===na){ti=!0;var ya=$i.data;ya>=1&&(yn=!0),ya>=2&&(ai=!0)}else $i.type===ls&&(ti=ti||$i.data.thisDep,yn=yn||$i.data.contextDep,ai=ai||$i.data.propDep)}return new Kn(ti,yn,ai,kr)}else return new Kn(Ir===Ko,Ir===ns,Ir===io,kr)}}var Po=new Kn(!1,!1,!1,function(){});function Ro(_e,kr,Ir,Dn,li,ti,yn,ai,ta,$i,ya,$a,Na,ia,Ai,fn){var jn=$i.Record,Bi={add:32774,subtract:32778,"reverse subtract":32779};Ir.ext_blend_minmax&&(Bi.min=Pe,Bi.max=Ne);var Ti=Ir.angle_instanced_arrays,ei=Ir.webgl_draw_buffers,Sa=Ir.oes_vertex_array_object,ha={dirty:!0,profile:fn.profile},Va={},xi=[],ri={},Ea={};function ma(Yt){return Yt.replace(".","_")}function Ki(Yt,ce,Se){var ir=ma(Yt);xi.push(Yt),Va[ir]=ha[ir]=!!Se,ri[ir]=ce}function Ji(Yt,ce,Se){var ir=ma(Yt);xi.push(Yt),Array.isArray(Se)?(ha[ir]=Se.slice(),Va[ir]=Se.slice()):ha[ir]=Va[ir]=Se,Ea[ir]=ce}function ba(Yt){return!!isNaN(Yt)}Ki(qa,Nr),Ki(gs,Or),Ji(el,"blendColor",[0,0,0,0]),Ji(Pl,"blendEquationSeparate",[Jr,Jr]),Ji(su,"blendFuncSeparate",[rn,Er,rn,Er]),Ki($l,vn,!0),Ji(lu,"depthFunc",xn),Ji(ml,"depthRange",[0,1]),Ji(qu,"depthMask",!0),Ji(Iu,Iu,[!0,!0,!0,!0]),Ki(fu,wr),Ji(Oo,"cullFace",Ut),Ji(Es,Es,Me),Ji(Kl,Kl,1),Ki(Rl,Nn),Ji(vc,"polygonOffset",[0,0]),Ki(Hc,ii),Ki(Lc,Ui),Ji(Ih,"sampleCoverage",[1,!1]),Ki(Wc,en),Ji(zh,"stencilMask",-1),Ji(Du,"stencilFunc",[sr,0,-1]),Ji(Oh,"stencilOpSeparate",[At,ar,ar,ar]),Ji(rs,"stencilOpSeparate",[Ut,ar,ar,ar]),Ki(zs,In),Ji(qc,"scissor",[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]),Ji($u,$u,[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]);var Io={gl:_e,context:Na,strings:kr,next:Va,current:ha,draw:$a,elements:ti,buffer:li,shader:ya,attributes:$i.state,vao:$i,uniforms:ta,framebuffer:ai,extensions:Ir,timer:ia,isBufferArgs:Ri},wo={primTypes:ci,compareFuncs:Vn,blendFuncs:Hi,blendEquations:Bi,stencilOps:yi,glTypes:Hn,orientationType:Si};ei&&(wo.backBuffer=[Ut],wo.drawBuffer=h(Dn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(ce){return On+ce})}));var _a=0;function Fa(){var Yt=Ba({cache:Ai}),ce=Yt.link,Se=Yt.global;Yt.id=_a++,Yt.batchId="0";var ir=ce(Io),Ye=Yt.shared={props:"a0"};Object.keys(Io).forEach(function(Xe){Ye[Xe]=Se.def(ir,".",Xe)});var tr=Yt.next={},lr=Yt.current={};Object.keys(Ea).forEach(function(Xe){Array.isArray(ha[Xe])&&(tr[Xe]=Se.def(Ye.next,".",Xe),lr[Xe]=Se.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Se.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,Ze){switch(Ze.type){case na:var Pr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(ce(Ze.data),".call(",Pr.slice(0,Math.max(Ze.data.length+1,4)),")");case io:return Xe.def(Ye.props,Ze.data);case ns:return Xe.def(Ye.context,Ze.data);case Ko:return Xe.def("this",Ze.data);case ls:return Ze.data.append(Yt,Xe),Ze.data.ref;case ps:return Ze.data.toString();case oo:return Ze.data.map(function(sn){return Yt.invoke(Xe,sn)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var Ze=kr.id(Xe);if(Ze in Ve)return Ve[Ze];var Pr=$i.scope[Ze];Pr||(Pr=$i.scope[Ze]=new jn);var sn=Ve[Ze]=ce(Pr);return sn},Yt}function vo(Yt){var ce=Yt.static,Se=Yt.dynamic,ir;if(qf in ce){var Ye=!!ce[qf];ir=Ha(function(lr,hr){return Ye}),ir.enable=Ye}else if(qf in Se){var tr=Se[qf];ir=ao(tr,function(lr,hr){return lr.invoke(hr,tr)})}return ir}function Eo(Yt,ce){var Se=Yt.static,ir=Yt.dynamic;if($t in Se){var Ye=Se[$t];return Ye?(Ye=ai.getFramebuffer(Ye),Ha(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var Ze=Xe.context;return hr.set(Ze,"."+Fr,Ve+".width"),hr.set(Ze,"."+un,Ve+".height"),Ve})):Ha(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Fr,Xe+"."+xe),hr.set(Xe,"."+un,Xe+"."+Ae),"null"})}else if($t in ir){var tr=ir[$t];return ao(tr,function(lr,hr){var Ve=lr.invoke(hr,tr),Xe=lr.shared,Ze=Xe.framebuffer,Pr=hr.def(Ze,".getFramebuffer(",Ve,")");hr.set(Ze,".next",Pr);var sn=Xe.context;return hr.set(sn,"."+Fr,Pr+"?"+Pr+".width:"+sn+"."+xe),hr.set(sn,"."+un,Pr+"?"+Pr+".height:"+sn+"."+Ae),Pr})}else return null}function es(Yt,ce,Se){var ir=Yt.static,Ye=Yt.dynamic;function tr(Ve){if(Ve in ir){var Xe=ir[Ve],Ze=!0,Pr=Xe.x|0,sn=Xe.y|0,dn,pi;return"width"in Xe?dn=Xe.width|0:Ze=!1,"height"in Xe?pi=Xe.height|0:Ze=!1,new Kn(!Ze&&ce&&ce.thisDep,!Ze&&ce&&ce.contextDep,!Ze&&ce&&ce.propDep,function(Ci,mi){var ea=Ci.shared.context,Ei=dn;"width"in Xe||(Ei=mi.def(ea,".",Fr,"-",Pr));var Li=pi;return"height"in Xe||(Li=mi.def(ea,".",un,"-",sn)),[Pr,sn,Ei,Li]})}else if(Ve in Ye){var ui=Ye[Ve],Yn=ao(ui,function(Ci,mi){var ea=Ci.invoke(mi,ui),Ei=Ci.shared.context,Li=mi.def(ea,".x|0"),la=mi.def(ea,".y|0"),to=mi.def('"width" in ',ea,"?",ea,".width|0:","(",Ei,".",Fr,"-",Li,")"),co=mi.def('"height" in ',ea,"?",ea,".height|0:","(",Ei,".",un,"-",la,")");return[Li,la,to,co]});return ce&&(Yn.thisDep=Yn.thisDep||ce.thisDep,Yn.contextDep=Yn.contextDep||ce.contextDep,Yn.propDep=Yn.propDep||ce.propDep),Yn}else return ce?new Kn(ce.thisDep,ce.contextDep,ce.propDep,function(Ci,mi){var ea=Ci.shared.context;return[0,0,mi.def(ea,".",Fr),mi.def(ea,".",un)]}):null}var lr=tr($u);if(lr){var hr=lr;lr=new Kn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var Ze=hr.append(Ve,Xe),Pr=Ve.shared.context;return Xe.set(Pr,"."+Sn,Ze[2]),Xe.set(Pr,"."+Xt,Ze[3]),Ze})}return{viewport:lr,scissor_box:tr(qc)}}function Ul(Yt,ce){var Se=Yt.static,ir=typeof Se[ht]=="string"&&typeof Se[z]=="string";if(ir){if(Object.keys(ce.dynamic).length>0)return null;var Ye=ce.static,tr=Object.keys(Ye);if(tr.length>0&&typeof Ye[tr[0]]=="number"){for(var lr=[],hr=0;hr"+Li+"?"+Ze+".constant["+Li+"]:0;"}).join(""),"}}else{","if(",dn,"(",Ze,".buffer)){",Ci,"=",pi,".createStream(",Oe,",",Ze,".buffer);","}else{",Ci,"=",pi,".getBuffer(",Ze,".buffer);","}",mi,'="type" in ',Ze,"?",sn.glTypes,"[",Ze,".type]:",Ci,".dtype;",ui.normalized,"=!!",Ze,".normalized;");function ea(Ei){Xe(ui[Ei],"=",Ze,".",Ei,"|0;")}return ea("size"),ea("offset"),ea("stride"),ea("divisor"),Xe("}}"),Xe.exit("if(",ui.isStream,"){",pi,".destroyStream(",Ci,");","}"),ui}Ye[tr]=ao(lr,hr)}),Ye}function pc(Yt){var ce=Yt.static,Se=Yt.dynamic,ir={};return Object.keys(ce).forEach(function(Ye){var tr=ce[Ye];ir[Ye]=Ha(function(lr,hr){return typeof tr=="number"||typeof tr=="boolean"?""+tr:lr.link(tr)})}),Object.keys(Se).forEach(function(Ye){var tr=Se[Ye];ir[Ye]=ao(tr,function(lr,hr){return lr.invoke(hr,tr)})}),ir}function yc(Yt,ce,Se,ir,Ye){Yt.static,Yt.dynamic;var tr=Ul(Yt,ce),lr=Eo(Yt),hr=es(Yt,lr),Ve=hs(Yt),Xe=ku(Yt),Ze=Al(Yt,Ye,tr);function Pr(Ci){var mi=hr[Ci];mi&&(Xe[Ci]=mi)}Pr($u),Pr(ma(qc));var sn=Object.keys(Xe).length>0,dn={framebuffer:lr,draw:Ve,shader:Ze,state:Xe,dirty:sn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(dn.profile=vo(Yt),dn.uniforms=dl(Se),dn.drawVAO=dn.scopeVAO=Ve.vao,!dn.drawVAO&&Ze.program&&!tr&&Ir.angle_instanced_arrays&&Ve.static.elements){var pi=!0,ui=Ze.program.attributes.map(function(Ci){var mi=ce.static[Ci];return pi=pi&&!!mi,mi});if(pi&&ui.length>0){var Yn=$i.getVAO($i.createVAO({attributes:ui,elements:Ve.static.elements}));dn.drawVAO=new Kn(null,null,null,function(Ci,mi){return Ci.link(Yn)}),dn.useVAO=!0}}return tr?dn.useVAO=!0:dn.attributes=Cu(ce),dn.context=pc(ir),dn}function xu(Yt,ce,Se){var ir=Yt.shared,Ye=ir.context,tr=Yt.scope();Object.keys(Se).forEach(function(lr){ce.save(Ye,"."+lr);var hr=Se[lr],Ve=hr.append(Yt,ce);Array.isArray(Ve)?tr(Ye,".",lr,"=[",Ve.join(),"];"):tr(Ye,".",lr,"=",Ve,";")}),ce(tr)}function pu(Yt,ce,Se,ir){var Ye=Yt.shared,tr=Ye.gl,lr=Ye.framebuffer,hr;ei&&(hr=ce.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,Ze=Ve.backBuffer,Pr;Se?Pr=Se.append(Yt,ce):Pr=ce.def(lr,".next"),ir||ce("if(",Pr,"!==",lr,".cur){"),ce("if(",Pr,"){",tr,".bindFramebuffer(",zn,",",Pr,".framebuffer);"),ei&&ce(hr,".drawBuffersWEBGL(",Xe,"[",Pr,".colorAttachments.length]);"),ce("}else{",tr,".bindFramebuffer(",zn,",null);"),ei&&ce(hr,".drawBuffersWEBGL(",Ze,");"),ce("}",lr,".cur=",Pr,";"),ir||ce("}")}function Tu(Yt,ce,Se){var ir=Yt.shared,Ye=ir.gl,tr=Yt.current,lr=Yt.next,hr=ir.current,Ve=ir.next,Xe=Yt.cond(hr,".dirty");xi.forEach(function(Ze){var Pr=ma(Ze);if(!(Pr in Se.state)){var sn,dn;if(Pr in lr){sn=lr[Pr],dn=tr[Pr];var pi=h(ha[Pr].length,function(Yn){return Xe.def(sn,"[",Yn,"]")});Xe(Yt.cond(pi.map(function(Yn,Ci){return Yn+"!=="+dn+"["+Ci+"]"}).join("||")).then(Ye,".",Ea[Pr],"(",pi,");",pi.map(function(Yn,Ci){return dn+"["+Ci+"]="+Yn}).join(";"),";"))}else{sn=Xe.def(Ve,".",Pr);var ui=Yt.cond(sn,"!==",hr,".",Pr);Xe(ui),Pr in ri?ui(Yt.cond(sn).then(Ye,".enable(",ri[Pr],");").else(Ye,".disable(",ri[Pr],");"),hr,".",Pr,"=",sn,";"):ui(Ye,".",Ea[Pr],"(",sn,");",hr,".",Pr,"=",sn,";")}}}),Object.keys(Se.state).length===0&&Xe(hr,".dirty=false;"),ce(Xe)}function No(Yt,ce,Se,ir){var Ye=Yt.shared,tr=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Gi(Object.keys(Se)).forEach(function(Xe){var Ze=Se[Xe];if(!(ir&&!ir(Ze))){var Pr=Ze.append(Yt,ce);if(ri[Xe]){var sn=ri[Xe];Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),ce(Yt.cond(Ve).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),ce(lr,".",Xe,"=",Ve,";")):(ce(Yt.cond(Pr).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),ce(lr,".",Xe,"=",Pr,";"))}else if(Pn(Pr)){var dn=tr[Xe];ce(hr,".",Ea[Xe],"(",Pr,");",Pr.map(function(pi,ui){return dn+"["+ui+"]="+pi}).join(";"),";")}else Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),ce(hr,".",Ea[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):ce(hr,".",Ea[Xe],"(",Pr,");",lr,".",Xe,"=",Pr,";")}})}function Au(Yt,ce){Ti&&(Yt.instancing=ce.def(Yt.shared.extensions,".angle_instanced_arrays"))}function sl(Yt,ce,Se,ir,Ye){var tr=Yt.shared,lr=Yt.stats,hr=tr.current,Ve=tr.timer,Xe=Se.profile;function Ze(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Pr,sn;function dn(ea){Pr=ce.def(),ea(Pr,"=",Ze(),";"),typeof Ye=="string"?ea(lr,".count+=",Ye,";"):ea(lr,".count++;"),ia&&(ir?(sn=ce.def(),ea(sn,"=",Ve,".getNumPendingQueries();")):ea(Ve,".beginQuery(",lr,");"))}function pi(ea){ea(lr,".cpuTime+=",Ze(),"-",Pr,";"),ia&&(ir?ea(Ve,".pushScopeStats(",sn,",",Ve,".getNumPendingQueries(),",lr,");"):ea(Ve,".endQuery();"))}function ui(ea){var Ei=ce.def(hr,".profile");ce(hr,".profile=",ea,";"),ce.exit(hr,".profile=",Ei,";")}var Yn;if(Xe){if(Ua(Xe)){Xe.enable?(dn(ce),pi(ce.exit),ui("true")):ui("false");return}Yn=Xe.append(Yt,ce),ui(Yn)}else Yn=ce.def(hr,".profile");var Ci=Yt.block();dn(Ci),ce("if(",Yn,"){",Ci,"}");var mi=Yt.block();pi(mi),ce.exit("if(",Yn,"){",mi,"}")}function Lu(Yt,ce,Se,ir,Ye){var tr=Yt.shared;function lr(Ve){switch(Ve){case fa:case So:case Ds:return 2;case Ta:case ds:case wl:return 3;case so:case fl:case Eu:return 4;default:return 1}}function hr(Ve,Xe,Ze){var Pr=tr.gl,sn=ce.def(Ve,".location"),dn=ce.def(tr.attributes,"[",sn,"]"),pi=Ze.state,ui=Ze.buffer,Yn=[Ze.x,Ze.y,Ze.z,Ze.w],Ci=["buffer","normalized","offset","stride"];function mi(){ce("if(!",dn,".buffer){",Pr,".enableVertexAttribArray(",sn,");}");var Ei=Ze.type,Li;if(Ze.size?Li=ce.def(Ze.size,"||",Xe):Li=Xe,ce("if(",dn,".type!==",Ei,"||",dn,".size!==",Li,"||",Ci.map(function(to){return dn+"."+to+"!=="+Ze[to]}).join("||"),"){",Pr,".bindBuffer(",Oe,",",ui,".buffer);",Pr,".vertexAttribPointer(",[sn,Li,Ei,Ze.normalized,Ze.stride,Ze.offset],");",dn,".type=",Ei,";",dn,".size=",Li,";",Ci.map(function(to){return dn+"."+to+"="+Ze[to]+";"}).join(""),"}"),Ti){var la=Ze.divisor;ce("if(",dn,".divisor!==",la,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[sn,la],");",dn,".divisor=",la,";}")}}function ea(){ce("if(",dn,".buffer){",Pr,".disableVertexAttribArray(",sn,");",dn,".buffer=null;","}if(",Za.map(function(Ei,Li){return dn+"."+Ei+"!=="+Yn[Li]}).join("||"),"){",Pr,".vertexAttrib4f(",sn,",",Yn,");",Za.map(function(Ei,Li){return dn+"."+Ei+"="+Yn[Li]+";"}).join(""),"}")}pi===Oa?mi():pi===ka?ea():(ce("if(",pi,"===",Oa,"){"),mi(),ce("}else{"),ea(),ce("}"))}ir.forEach(function(Ve){var Xe=Ve.name,Ze=Se.attributes[Xe],Pr;if(Ze){if(!Ye(Ze))return;Pr=Ze.append(Yt,ce)}else{if(!Ye(Po))return;var sn=Yt.scopeAttrib(Xe);Pr={},Object.keys(new jn).forEach(function(dn){Pr[dn]=ce.def(sn,".",dn)})}hr(Yt.link(Ve),lr(Ve.info.type),Pr)})}function xc(Yt,ce,Se,ir,Ye,tr){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var qo=[],xs=[],Il=0;Il>1)",ui],");")}function la(){Se(Yn,".drawArraysInstancedANGLE(",[sn,dn,pi,ui],");")}Ze&&Ze!=="null"?mi?Li():(Se("if(",Ze,"){"),Li(),Se("}else{"),la(),Se("}")):la()}function Ei(){function Li(){Se(tr+".drawElements("+[sn,pi,Ci,dn+"<<(("+Ci+"-"+ca+")>>1)"]+");")}function la(){Se(tr+".drawArrays("+[sn,dn,pi]+");")}Ze&&Ze!=="null"?mi?Li():(Se("if(",Ze,"){"),Li(),Se("}else{"),la(),Se("}")):la()}Ti&&(typeof ui!="number"||ui>=0)?typeof ui=="string"?(Se("if(",ui,">0){"),ea(),Se("}else if(",ui,"<0){"),Ei(),Se("}")):ea():Ei()}function Cs(Yt,ce,Se,ir,Ye){var tr=Fa(),lr=tr.proc("body",Ye);return Ti&&(tr.instancing=lr.def(tr.shared.extensions,".angle_instanced_arrays")),Yt(tr,lr,Se,ir),tr.compile().body}function Ml(Yt,ce,Se,ir){Au(Yt,ce),Se.useVAO?Se.drawVAO?ce(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,ce),");"):ce(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(ce(Yt.shared.vao,".setVAO(null);"),Lu(Yt,ce,Se,ir.attributes,function(){return!0})),xc(Yt,ce,Se,ir.uniforms,function(){return!0},!1),Co(Yt,ce,ce,Se)}function yl(Yt,ce){var Se=Yt.proc("draw",1);Au(Yt,Se),xu(Yt,Se,ce.context),pu(Yt,Se,ce.framebuffer),Tu(Yt,Se,ce),No(Yt,Se,ce.state),sl(Yt,Se,ce,!1,!0);var ir=ce.shader.progVar.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",ir,".program);"),ce.shader.program)Ml(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),tr=Se.def(ir,".id"),lr=Se.def(Ye,"[",tr,"]");Se(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",tr,"]=",Yt.link(function(hr){return Cs(Ml,Yt,ce,hr,1)}),"(",ir,");",lr,".call(this,a0);"))}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function $(Yt,ce,Se,ir){Yt.batchId="a1",Au(Yt,ce);function Ye(){return!0}Lu(Yt,ce,Se,ir.attributes,Ye),xc(Yt,ce,Se,ir.uniforms,Ye,!1),Co(Yt,ce,ce,Se)}function ot(Yt,ce,Se,ir){Au(Yt,ce);var Ye=Se.contextDep,tr=ce.def(),lr="a0",hr="a1",Ve=ce.def();Yt.shared.props=Ve,Yt.batchId=tr;var Xe=Yt.scope(),Ze=Yt.scope();ce(Xe.entry,"for(",tr,"=0;",tr,"<",hr,";++",tr,"){",Ve,"=",lr,"[",tr,"];",Ze,"}",Xe.exit);function Pr(Ci){return Ci.contextDep&&Ye||Ci.propDep}function sn(Ci){return!Pr(Ci)}if(Se.needsContext&&xu(Yt,Ze,Se.context),Se.needsFramebuffer&&pu(Yt,Ze,Se.framebuffer),No(Yt,Ze,Se.state,Pr),Se.profile&&Pr(Se.profile)&&sl(Yt,Ze,Se,!1,!0),ir)Se.useVAO?Se.drawVAO?Pr(Se.drawVAO)?Ze(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Ze),");"):Xe(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Lu(Yt,Xe,Se,ir.attributes,sn),Lu(Yt,Ze,Se,ir.attributes,Pr)),xc(Yt,Xe,Se,ir.uniforms,sn,!1),xc(Yt,Ze,Se,ir.uniforms,Pr,!0),Co(Yt,Xe,Ze,Se);else{var dn=Yt.global.def("{}"),pi=Se.shader.progVar.append(Yt,Ze),ui=Ze.def(pi,".id"),Yn=Ze.def(dn,"[",ui,"]");Ze(Yt.shared.gl,".useProgram(",pi,".program);","if(!",Yn,"){",Yn,"=",dn,"[",ui,"]=",Yt.link(function(Ci){return Cs($,Yt,Se,Ci,2)}),"(",pi,");}",Yn,".call(this,a0[",tr,"],",tr,");")}}function et(Yt,ce){var Se=Yt.proc("batch",2);Yt.batchId="0",Au(Yt,Se);var ir=!1,Ye=!0;Object.keys(ce.context).forEach(function(dn){ir=ir||ce.context[dn].propDep}),ir||(xu(Yt,Se,ce.context),Ye=!1);var tr=ce.framebuffer,lr=!1;tr?(tr.propDep?ir=lr=!0:tr.contextDep&&ir&&(lr=!0),lr||pu(Yt,Se,tr)):pu(Yt,Se,null),ce.state.viewport&&ce.state.viewport.propDep&&(ir=!0);function hr(dn){return dn.contextDep&&ir||dn.propDep}Tu(Yt,Se,ce),No(Yt,Se,ce.state,function(dn){return!hr(dn)}),(!ce.profile||!hr(ce.profile))&&sl(Yt,Se,ce,!1,"a1"),ce.contextDep=ir,ce.needsContext=Ye,ce.needsFramebuffer=lr;var Ve=ce.shader.progVar;if(Ve.contextDep&&ir||Ve.propDep)ot(Yt,Se,ce,null);else{var Xe=Ve.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",Xe,".program);"),ce.shader.program)ot(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ze=Yt.global.def("{}"),Pr=Se.def(Xe,".id"),sn=Se.def(Ze,"[",Pr,"]");Se(Yt.cond(sn).then(sn,".call(this,a0,a1);").else(sn,"=",Ze,"[",Pr,"]=",Yt.link(function(dn){return Cs(ot,Yt,ce,dn,2)}),"(",Xe,");",sn,".call(this,a0,a1);"))}}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function xt(Yt,ce){var Se=Yt.proc("scope",3);Yt.batchId="a2";var ir=Yt.shared,Ye=ir.current;if(xu(Yt,Se,ce.context),ce.framebuffer&&ce.framebuffer.append(Yt,Se),Gi(Object.keys(ce.state)).forEach(function(hr){var Ve=ce.state[hr],Xe=Ve.append(Yt,Se);Pn(Xe)?Xe.forEach(function(Ze,Pr){ba(Ze)?Se.set(Yt.next[hr],"["+Pr+"]",Ze):Se.set(Yt.next[hr],"["+Pr+"]",Yt.link(Ze,{stable:!0}))}):Ua(Ve)?Se.set(ir.next,"."+hr,Yt.link(Xe,{stable:!0})):Se.set(ir.next,"."+hr,Xe)}),sl(Yt,Se,ce,!0,!0),[Et,ke,Ht,Fe,zt].forEach(function(hr){var Ve=ce.draw[hr];if(Ve){var Xe=Ve.append(Yt,Se);ba(Xe)?Se.set(ir.draw,"."+hr,Xe):Se.set(ir.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(ce.uniforms).forEach(function(hr){var Ve=ce.uniforms[hr].append(Yt,Se);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return ba(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Se.set(ir.uniforms,"["+Yt.link(kr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(ce.attributes).forEach(function(hr){var Ve=ce.attributes[hr].append(Yt,Se),Xe=Yt.scopeAttrib(hr);Object.keys(new jn).forEach(function(Ze){Se.set(Xe,"."+Ze,Ve[Ze])})}),ce.scopeVAO){var tr=ce.scopeVAO.append(Yt,Se);ba(tr)?Se.set(ir.vao,".targetVAO",tr):Se.set(ir.vao,".targetVAO",Yt.link(tr,{stable:!0}))}function lr(hr){var Ve=ce.shader[hr];if(Ve){var Xe=Ve.append(Yt,Se);ba(Xe)?Se.set(ir.shader,"."+hr,Xe):Se.set(ir.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(z),lr(ht),Object.keys(ce.state).length>0&&(Se(Ye,".dirty=true;"),Se.exit(Ye,".dirty=true;")),Se("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Vt(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var ce=Object.keys(Yt),Se=0;Se=0;--Co){var Cs=ba[Co];Cs&&Cs(ia,null,0)}Ir.flush(),$i&&$i.update()}function Eo(){!Fa&&ba.length>0&&(Fa=x.next(vo))}function es(){Fa&&(x.cancel(vo),Fa=null)}function Ul(Co){Co.preventDefault(),es(),Io.forEach(function(Cs){Cs()})}function Al(Co){Ir.getError(),li.restore(),ha.restore(),Bi.restore(),Va.restore(),xi.restore(),ri.restore(),ei.restore(),$i&&$i.restore(),Ea.procs.refresh(),Eo(),wo.forEach(function(Cs){Cs()})}Ji&&(Ji.addEventListener(nl,Ul,!1),Ji.addEventListener(uu,Al,!1));function hs(){ba.length=0,es(),Ji&&(Ji.removeEventListener(nl,Ul),Ji.removeEventListener(uu,Al)),ha.clear(),ri.clear(),xi.clear(),ei.clear(),Va.clear(),Ti.clear(),Bi.clear(),$i&&$i.clear(),_a.forEach(function(Co){Co()})}function ku(Co){function Cs(Ye){var tr=c({},Ye);delete tr.uniforms,delete tr.attributes,delete tr.context,delete tr.vao,"stencil"in tr&&tr.stencil.op&&(tr.stencil.opBack=tr.stencil.opFront=tr.stencil.op,delete tr.stencil.op);function lr(hr){if(hr in tr){var Ve=tr[hr];delete tr[hr],Object.keys(Ve).forEach(function(Xe){tr[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(tr.vao=Ye.vao),tr}function Ml(Ye,tr){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(tr&&Array.isArray(Xe)){for(var Ze=0;Ze0)return ye.call(this,Se(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return ye.call(this,Ye,Ye.length)}else return de.call(this,Ye)}return c(ir,{stats:xt,destroy:function(){Vt.destroy()}})}var dl=ri.setFBO=ku({framebuffer:f.define.call(null,Xl,"framebuffer")});function Cu(Co,Cs){var Ml=0;Ea.procs.poll();var yl=Cs.color;yl&&(Ir.clearColor(+yl[0]||0,+yl[1]||0,+yl[2]||0,+yl[3]||0),Ml|=Ku),"depth"in Cs&&(Ir.clearDepth(+Cs.depth),Ml|=du),"stencil"in Cs&&(Ir.clearStencil(Cs.stencil|0),Ml|=_o),Ir.clear(Ml)}function pc(Co){if("framebuffer"in Co)if(Co.framebuffer&&Co.framebuffer_reglType==="framebufferCube")for(var Cs=0;Cs<6;++Cs)dl(c({framebuffer:Co.framebuffer.faces[Cs]},Co),Cu);else dl(Co,Cu);else Cu(null,Co)}function yc(Co){ba.push(Co);function Cs(){var Ml=ru(ba,Co);function yl(){var $=ru(ba,yl);ba[$]=ba[ba.length-1],ba.length-=1,ba.length<=0&&es()}ba[Ml]=yl}return Eo(),{cancel:Cs}}function xu(){var Co=Ki.viewport,Cs=Ki.scissor_box;Co[0]=Co[1]=Cs[0]=Cs[1]=0,ia.viewportWidth=ia.framebufferWidth=ia.drawingBufferWidth=Co[2]=Cs[2]=Ir.drawingBufferWidth,ia.viewportHeight=ia.framebufferHeight=ia.drawingBufferHeight=Co[3]=Cs[3]=Ir.drawingBufferHeight}function pu(){ia.tick+=1,ia.time=No(),xu(),Ea.procs.poll()}function Tu(){Va.refresh(),xu(),Ea.procs.refresh(),$i&&$i.update()}function No(){return(y()-ya)/1e3}Tu();function Au(Co,Cs){var Ml;switch(Co){case"frame":return yc(Cs);case"lost":Ml=Io;break;case"restore":Ml=wo;break;case"destroy":Ml=_a;break}return Ml.push(Cs),{cancel:function(){for(var yl=0;yl=0},read:ma,destroy:hs,_gl:Ir,_refresh:Tu,poll:function(){pu(),$i&&$i.update()},now:No,stats:yn,getCachedCode:sl,preloadCachedCode:Lu});return kr.onDone(null,xc),xc}return wh})}),LH=Dt((Q,Z)=>{var c=Ig();Z.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},I(r)?r={container:r}:S(r)?r={container:r}:t(r)?r={gl:r}:r=c(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=window.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var a=document.querySelector(r.container);if(!a)throw Error("Element "+r.container+" is not found");r.container=a}I(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=e(),r.container.appendChild(r.canvas),g(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=e(),r.container.appendChild(r.canvas),g(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{r.gl=r.canvas.getContext(n,r.attrs)}catch{}return r.gl}),r.gl};function g(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*window.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*window.innerHeight);else{var a=r.container.getBoundingClientRect();r.canvas.width=r.width||a.right-a.left,r.canvas.height=r.height||a.bottom-a.top}}function I(r){return typeof r.getContext=="function"&&"width"in r&&"height"in r}function S(r){return typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.getBoundingClientRect=="function"}function t(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}function e(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}}),PH=Dt((Q,Z)=>{var c=oE(),g=[32,126];Z.exports=I;function I(S){S=S||{};var t=S.shape?S.shape:S.canvas?[S.canvas.width,S.canvas.height]:[512,512],e=S.canvas||document.createElement("canvas"),r=S.font,a=typeof S.step=="number"?[S.step,S.step]:S.step||[32,32],n=S.chars||g;if(r&&typeof r!="string"&&(r=c(r)),!Array.isArray(n))n=String(n).split("");else if(n.length===2&&typeof n[0]=="number"&&typeof n[1]=="number"){for(var o=[],i=n[0],l=0;i<=n[1];i++)o[l++]=String.fromCharCode(i);n=o}t=t.slice(),e.width=t[0],e.height=t[1];var f=e.getContext("2d");f.fillStyle="#000",f.fillRect(0,0,e.width,e.height),f.font=r,f.textAlign="center",f.textBaseline="middle",f.fillStyle="#fff";for(var x=a[0]/2,y=a[1]/2,i=0;it[0]-a[0]/2&&(x=a[0]/2,y+=a[1]);return e}}),sE=Dt(Q=>{"use restrict";var Z=32;Q.INT_BITS=Z,Q.INT_MAX=2147483647,Q.INT_MIN=-1<0)-(I<0)},Q.abs=function(I){var S=I>>Z-1;return(I^S)-S},Q.min=function(I,S){return S^(I^S)&-(I65535)<<4,I>>>=S,t=(I>255)<<3,I>>>=t,S|=t,t=(I>15)<<2,I>>>=t,S|=t,t=(I>3)<<1,I>>>=t,S|=t,S|I>>1},Q.log10=function(I){return I>=1e9?9:I>=1e8?8:I>=1e7?7:I>=1e6?6:I>=1e5?5:I>=1e4?4:I>=1e3?3:I>=100?2:I>=10?1:0},Q.popCount=function(I){return I=I-(I>>>1&1431655765),I=(I&858993459)+(I>>>2&858993459),(I+(I>>>4)&252645135)*16843009>>>24};function c(I){var S=32;return I&=-I,I&&S--,I&65535&&(S-=16),I&16711935&&(S-=8),I&252645135&&(S-=4),I&858993459&&(S-=2),I&1431655765&&(S-=1),S}Q.countTrailingZeros=c,Q.nextPow2=function(I){return I+=I===0,--I,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I+1},Q.prevPow2=function(I){return I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I-(I>>>1)},Q.parity=function(I){return I^=I>>>16,I^=I>>>8,I^=I>>>4,I&=15,27030>>>I&1};var g=new Array(256);(function(I){for(var S=0;S<256;++S){var t=S,e=S,r=7;for(t>>>=1;t;t>>>=1)e<<=1,e|=t&1,--r;I[S]=e<>>8&255]<<16|g[I>>>16&255]<<8|g[I>>>24&255]},Q.interleave2=function(I,S){return I&=65535,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,I|S<<1},Q.deinterleave2=function(I,S){return I=I>>>S&1431655765,I=(I|I>>>1)&858993459,I=(I|I>>>2)&252645135,I=(I|I>>>4)&16711935,I=(I|I>>>16)&65535,I<<16>>16},Q.interleave3=function(I,S,t){return I&=1023,I=(I|I<<16)&4278190335,I=(I|I<<8)&251719695,I=(I|I<<4)&3272356035,I=(I|I<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,I|=S<<1,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,I|t<<2},Q.deinterleave3=function(I,S){return I=I>>>S&1227133513,I=(I|I>>>2)&3272356035,I=(I|I>>>4)&251719695,I=(I|I>>>8)&4278190335,I=(I|I>>>16)&1023,I<<22>>22},Q.nextCombination=function(I){var S=I|I-1;return S+1|(~S&-~S)-1>>>c(I)+1}}),IH=Dt((Q,Z)=>{function c(S,t,e){var r=S[e]|0;if(r<=0)return[];var a=new Array(r),n;if(e===S.length-1)for(n=0;n"u"&&(t=0),typeof S){case"number":if(S>0)return g(S|0,t);break;case"object":if(typeof S.length=="number")return c(S,t,0);break}return[]}Z.exports=I}),zH=Dt(Q=>{var Z=sE(),c=IH(),g=ix().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:c([32,0]),UINT16:c([32,0]),UINT32:c([32,0]),BIGUINT64:c([32,0]),INT8:c([32,0]),INT16:c([32,0]),INT32:c([32,0]),BIGINT64:c([32,0]),FLOAT:c([32,0]),DOUBLE:c([32,0]),DATA:c([32,0]),UINT8C:c([32,0]),BUFFER:c([32,0])});var I=typeof Uint8ClampedArray<"u",S=typeof BigUint64Array<"u",t=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=c([32,0])),e.BIGUINT64||(e.BIGUINT64=c([32,0])),e.BIGINT64||(e.BIGINT64=c([32,0])),e.BUFFER||(e.BUFFER=c([32,0]));var r=e.DATA,a=e.BUFFER;Q.free=function(h){if(g.isBuffer(h))a[Z.log2(h.length)].push(h);else{if(Object.prototype.toString.call(h)!=="[object ArrayBuffer]"&&(h=h.buffer),!h)return;var p=h.length||h.byteLength,k=Z.log2(p)|0;r[k].push(h)}};function n(h){if(h){var p=h.length||h.byteLength,k=Z.log2(p);r[k].push(h)}}function o(h){n(h.buffer)}Q.freeUint8=Q.freeUint16=Q.freeUint32=Q.freeBigUint64=Q.freeInt8=Q.freeInt16=Q.freeInt32=Q.freeBigInt64=Q.freeFloat32=Q.freeFloat=Q.freeFloat64=Q.freeDouble=Q.freeUint8Clamped=Q.freeDataView=o,Q.freeArrayBuffer=n,Q.freeBuffer=function(h){a[Z.log2(h.length)].push(h)},Q.malloc=function(h,p){if(p===void 0||p==="arraybuffer")return i(h);switch(p){case"uint8":return l(h);case"uint16":return f(h);case"uint32":return x(h);case"int8":return y(h);case"int16":return v(h);case"int32":return T(h);case"float":case"float32":return u(h);case"double":case"float64":return b(h);case"uint8_clamped":return _(h);case"bigint64":return M(h);case"biguint64":return P(h);case"buffer":return A(h);case"data":case"dataview":return C(h);default:return null}return null};function i(p){var p=Z.nextPow2(p),k=Z.log2(p),w=r[k];return w.length>0?w.pop():new ArrayBuffer(p)}Q.mallocArrayBuffer=i;function l(h){return new Uint8Array(i(h),0,h)}Q.mallocUint8=l;function f(h){return new Uint16Array(i(2*h),0,h)}Q.mallocUint16=f;function x(h){return new Uint32Array(i(4*h),0,h)}Q.mallocUint32=x;function y(h){return new Int8Array(i(h),0,h)}Q.mallocInt8=y;function v(h){return new Int16Array(i(2*h),0,h)}Q.mallocInt16=v;function T(h){return new Int32Array(i(4*h),0,h)}Q.mallocInt32=T;function u(h){return new Float32Array(i(4*h),0,h)}Q.mallocFloat32=Q.mallocFloat=u;function b(h){return new Float64Array(i(8*h),0,h)}Q.mallocFloat64=Q.mallocDouble=b;function _(h){return I?new Uint8ClampedArray(i(h),0,h):l(h)}Q.mallocUint8Clamped=_;function P(h){return S?new BigUint64Array(i(8*h),0,h):null}Q.mallocBigUint64=P;function M(h){return t?new BigInt64Array(i(8*h),0,h):null}Q.mallocBigInt64=M;function C(h){return new DataView(i(h),0,h)}Q.mallocDataView=C;function A(h){h=Z.nextPow2(h);var p=Z.log2(h),k=a[p];return k.length>0?k.pop():new g(h)}Q.mallocBuffer=A,Q.clearCache=function(){for(var h=0;h<32;++h)e.UINT8[h].length=0,e.UINT16[h].length=0,e.UINT32[h].length=0,e.INT8[h].length=0,e.INT16[h].length=0,e.INT32[h].length=0,e.FLOAT[h].length=0,e.DOUBLE[h].length=0,e.BIGUINT64[h].length=0,e.BIGINT64[h].length=0,e.UINT8C[h].length=0,r[h].length=0,a[h].length=0}}),OH=Dt((Q,Z)=>{var c=Object.prototype.toString;Z.exports=function(g){var I;return c.call(g)==="[object Object]"&&(I=Object.getPrototypeOf(g),I===null||I===Object.getPrototypeOf({}))}}),lE=Dt((Q,Z)=>{Z.exports=function(c,g){g||(g=[0,""]),c=String(c);var I=parseFloat(c,10);return g[0]=I,g[1]=c.match(/[\d.\-\+]*\s*(.*)/)[1]||"",g}}),DH=Dt((Q,Z)=>{var c=lE();Z.exports=t;var g=96;function I(e,r){var a=c(getComputedStyle(e).getPropertyValue(r));return a[0]*t(a[1],e)}function S(e,r){var a=document.createElement("div");a.style["font-size"]="128"+e,r.appendChild(a);var n=I(a,"font-size")/128;return r.removeChild(a),n}function t(e,r){switch(r=r||document.body,e=(e||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),e){case"%":return r.clientHeight/100;case"ch":case"ex":return S(e,r);case"em":return I(r,"font-size");case"rem":return I(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return g;case"cm":return g/2.54;case"mm":return g/25.4;case"pt":return g/72;case"pc":return g/6}return 1}}),FH=Dt((Q,Z)=>{Z.exports=S;var c=S.canvas=document.createElement("canvas"),g=c.getContext("2d"),I=t([32,126]);S.createPairs=t,S.ascii=I;function S(e,r){Array.isArray(e)&&(e=e.join(", "));var a={},n,o=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?n=t(r):Array.isArray(r)?n=r:(r.o?n=t(r.o):r.pairs&&(n=r.pairs),r.fontSize&&(o=r.fontSize),r.threshold!=null&&(i=r.threshold))),n||(n=I),g.font=o+"px "+e;for(var l=0;lo*i){var v=(y-x)/o;a[f]=v*1e3}}return a}function t(e){for(var r=[],a=e[0];a<=e[1];a++)for(var n=String.fromCharCode(a),o=e[0];o{Z.exports=c,c.canvas=document.createElement("canvas"),c.cache={};function c(i,e){e||(e={}),(typeof i=="string"||Array.isArray(i))&&(e.family=i);var r=Array.isArray(e.family)?e.family.join(", "):e.family;if(!r)throw Error("`family` must be defined");var a=e.size||e.fontSize||e.em||48,n=e.weight||e.fontWeight||"",o=e.style||e.fontStyle||"",i=[o,n,a].join(" ")+"px "+r,l=e.origin||"top";if(c.cache[r]&&a<=c.cache[r].em)return g(c.cache[r],l);var f=e.canvas||c.canvas,x=f.getContext("2d"),y={upper:e.upper!==void 0?e.upper:"H",lower:e.lower!==void 0?e.lower:"x",descent:e.descent!==void 0?e.descent:"p",ascent:e.ascent!==void 0?e.ascent:"h",tittle:e.tittle!==void 0?e.tittle:"i",overshoot:e.overshoot!==void 0?e.overshoot:"O"},v=Math.ceil(a*1.5);f.height=v,f.width=v*.5,x.font=i;var T="H",u={top:0};x.clearRect(0,0,v,v),x.textBaseline="top",x.fillStyle="black",x.fillText(T,0,0);var b=I(x.getImageData(0,0,v,v));x.clearRect(0,0,v,v),x.textBaseline="bottom",x.fillText(T,0,v);var _=I(x.getImageData(0,0,v,v));u.lineHeight=u.bottom=v-_+b,x.clearRect(0,0,v,v),x.textBaseline="alphabetic",x.fillText(T,0,v);var P=I(x.getImageData(0,0,v,v)),M=v-P-1+b;u.baseline=u.alphabetic=M,x.clearRect(0,0,v,v),x.textBaseline="middle",x.fillText(T,0,v*.5);var C=I(x.getImageData(0,0,v,v));u.median=u.middle=v-C-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="hanging",x.fillText(T,0,v*.5);var A=I(x.getImageData(0,0,v,v));u.hanging=v-A-1+b-v*.5,x.clearRect(0,0,v,v),x.textBaseline="ideographic",x.fillText(T,0,v);var h=I(x.getImageData(0,0,v,v));if(u.ideographic=v-h-1+b,y.upper&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.upper,0,0),u.upper=I(x.getImageData(0,0,v,v)),u.capHeight=u.baseline-u.upper),y.lower&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.lower,0,0),u.lower=I(x.getImageData(0,0,v,v)),u.xHeight=u.baseline-u.lower),y.tittle&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.tittle,0,0),u.tittle=I(x.getImageData(0,0,v,v))),y.ascent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.ascent,0,0),u.ascent=I(x.getImageData(0,0,v,v))),y.descent&&(x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.descent,0,0),u.descent=S(x.getImageData(0,0,v,v))),y.overshoot){x.clearRect(0,0,v,v),x.textBaseline="top",x.fillText(y.overshoot,0,0);var p=S(x.getImageData(0,0,v,v));u.overshoot=p-M}for(var k in u)u[k]/=a;return u.em=a,c.cache[r]=u,g(u,l)}function g(t,e){var r={};typeof e=="string"&&(e=t[e]);for(var a in t)a!=="em"&&(r[a]=t[a]-e);return r}function I(t){for(var e=t.height,r=t.data,a=3;a0;a-=4)if(r[a]!==0)return Math.floor((a-3)*.25/e)}}),BH=Dt((Q,Z)=>{var c=EH(),g=Ig(),I=CH(),S=LH(),t=JS(),e=U1(),r=PH(),a=zH(),n=vb(),o=OH(),i=lE(),l=DH(),f=FH(),x=Sd(),y=RH(),v=xx(),T=sE(),u=T.nextPow2,b=new t,_=!1;document.body&&(P=document.body.appendChild(document.createElement("div")),P.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(P).fontStretch&&(_=!0),document.body.removeChild(P));var P,M=function(A){C(A)?(A={regl:A},this.gl=A.regl._gl):this.gl=S(A),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=A.regl||I({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(o(A)?A:{})};M.prototype.createShader=function(){var A=this.regl,h=A({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:A.prop("count"),offset:A.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:A.this("sizeBuffer")},width:{offset:0,stride:8,buffer:A.this("sizeBuffer")},char:A.this("charBuffer"),position:A.this("position")},uniforms:{atlasSize:function(k,w){return[w.atlas.width,w.atlas.height]},atlasDim:function(k,w){return[w.atlas.cols,w.atlas.rows]},atlas:function(k,w){return w.atlas.texture},charStep:function(k,w){return w.atlas.step},em:function(k,w){return w.atlas.em},color:A.prop("color"),opacity:A.prop("opacity"),viewport:A.this("viewportArray"),scale:A.this("scale"),align:A.prop("align"),baseline:A.prop("baseline"),translate:A.this("translate"),positionOffset:A.prop("positionOffset")},primitive:"points",viewport:A.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2783,17 +2824,17 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),p={};return{regl:A,draw:h,atlas:p}},M.prototype.update=function(A){var h=this;if(typeof A=="string")A={text:A};else if(!A)return;A=g(A,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),A.opacity!=null&&(Array.isArray(A.opacity)?this.opacity=A.opacity.map(function(Lt){return parseFloat(Lt)}):this.opacity=parseFloat(A.opacity)),A.viewport!=null&&(this.viewport=n(A.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),A.kerning!=null&&(this.kerning=A.kerning),A.offset!=null&&(typeof A.offset=="number"&&(A.offset=[A.offset,0]),this.positionOffset=v(A.offset)),A.direction&&(this.direction=A.direction),A.range&&(this.range=A.range,this.scale=[1/(A.range[2]-A.range[0]),1/(A.range[3]-A.range[1])],this.translate=[-A.range[0],-A.range[1]]),A.scale&&(this.scale=A.scale),A.translate&&(this.translate=A.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!A.font&&(A.font=M.baseFontSize+"px sans-serif");var p=!1,k=!1;if(A.font&&(Array.isArray(A.font)?A.font:[A.font]).forEach(function(Lt,Mt){if(typeof Lt=="string")try{Lt=c.parse(Lt)}catch{Lt=c.parse(M.baseFontSize+"px "+Lt)}else{var te=Lt.style,ve=Lt.weight,oe=Lt.stretch,Te=Lt.variant;Lt=c.parse(c.stringify(Lt)),te&&(Lt.style=te),ve&&(Lt.weight=ve),oe&&(Lt.stretch=oe),Te&&(Lt.variant=Te)}var He=c.stringify({size:M.baseFontSize,family:Lt.family,stretch:_?Lt.stretch:void 0,variant:Lt.variant,weight:Lt.weight,style:Lt.style}),Ge=i(Lt.size),cr=Math.round(Ge[0]*s(Ge[1]));if(cr!==h.fontSize[Mt]&&(k=!0,h.fontSize[Mt]=cr),(!h.font[Mt]||He!=h.font[Mt].baseString)&&(p=!0,h.font[Mt]=M.fonts[He],!h.font[Mt])){var ur=Lt.family.join(", "),jr=[Lt.style];Lt.style!=Lt.variant&&jr.push(Lt.variant),Lt.variant!=Lt.weight&&jr.push(Lt.weight),_&&Lt.weight!=Lt.stretch&&jr.push(Lt.stretch),h.font[Mt]={baseString:He,family:ur,weight:Lt.weight,stretch:Lt.stretch,style:Lt.style,variant:Lt.variant,width:{},kerning:{},metrics:y(ur,{origin:"top",fontSize:M.baseFontSize,fontStyle:jr.join(" ")})},M.fonts[He]=h.font[Mt]}}),(p||k)&&this.font.forEach(function(Lt,Mt){var te=c.stringify({size:h.fontSize[Mt],family:Lt.family,stretch:_?Lt.stretch:void 0,variant:Lt.variant,weight:Lt.weight,style:Lt.style});if(h.fontAtlas[Mt]=h.shader.atlas[te],!h.fontAtlas[Mt]){var ve=Lt.metrics;h.shader.atlas[te]=h.fontAtlas[Mt]={fontString:te,step:Math.ceil(h.fontSize[Mt]*ve.bottom*.5)*2,em:h.fontSize[Mt],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:h.regl.texture()}}A.text==null&&(A.text=h.text)}),typeof A.text=="string"&&A.position&&A.position.length>2){for(var w=Array(A.position.length*.5),R=0;R2){for(var V=!A.position[0].length,H=a.mallocFloat(this.count*2),F=0,U=0;F1?h.align[Mt]:h.align[0]:h.align;if(typeof te=="number")return te;switch(te){case"right":case"end":return-Lt;case"center":case"centre":case"middle":return-Lt*.5}return 0})),this.baseline==null&&A.baseline==null&&(A.baseline=0),A.baseline!=null&&(this.baseline=A.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Lt,Mt){var te=(h.font[Mt]||h.font[0]).metrics,ve=0;return ve+=te.bottom*.5,typeof Lt=="number"?ve+=Lt-te.baseline:ve+=-te[Lt],ve*=-1,ve})),A.color!=null)if(A.color||(A.color="transparent"),typeof A.color=="string"||!isNaN(A.color))this.color=e(A.color,"uint8");else{var Pt;if(typeof A.color[0]=="number"&&A.color.length>this.counts.length){var Wt=A.color.length;Pt=a.mallocUint8(Wt);for(var Ht=(A.color.subarray||A.color.slice).bind(A.color),Jt=0;Jt4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(de){var se=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(se);for(var Tt=0;Tt1?this.counts[Tt]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Tt]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Tt*4,Tt*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Tt]:this.opacity,baseline:this.baselineOffset[Tt]!=null?this.baselineOffset[Tt]:this.baselineOffset[0],align:this.align?this.alignOffset[Tt]!=null?this.alignOffset[Tt]:this.alignOffset[0]:0,atlas:this.fontAtlas[Tt]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Tt*2,Tt*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},M.prototype.destroy=function(){},M.prototype.kerning=!0,M.prototype.position={constant:new Float32Array(2)},M.prototype.translate=null,M.prototype.scale=null,M.prototype.font=null,M.prototype.text="",M.prototype.positionOffset=[0,0],M.prototype.opacity=1,M.prototype.color=new Uint8Array([0,0,0,255]),M.prototype.alignOffset=[0,0],M.maxAtlasSize=1024,M.atlasCanvas=document.createElement("canvas"),M.atlasContext=M.atlasCanvas.getContext("2d",{alpha:!1}),M.baseFontSize=64,M.fonts={};function E(A){return typeof A=="function"&&A._gl&&A.prop&&A.texture&&A.buffer}$.exports=M}),gH=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?$.exports=g():c.createREGL=g()})(Q,function(){var c=function(_e,kr){for(var Lr=Object.keys(kr),Dn=0;Dn1&&kr===Lr&&(kr==='"'||kr==="'"))return['"'+r(_e.substr(1,_e.length-2))+'"'];var Dn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(_e);if(Dn)return a(_e.substr(0,Dn.index)).concat(a(Dn[1])).concat(a(_e.substr(Dn.index+Dn[0].length)));var oi=_e.split(".");if(oi.length===1)return['"'+r(_e)+'"'];for(var Jn=[],mn=0;mn"u"?1:window.devicePixelRatio,ma=!1,Za={},Ra=function(cn){},ta=function(){};if(typeof kr=="string"?Lr=document.querySelector(kr):typeof kr=="object"&&(b(kr)?Lr=kr:_(kr)?(Jn=kr,oi=Jn.canvas):("gl"in kr?Jn=kr.gl:"canvas"in kr?oi=M(kr.canvas):"container"in kr&&(Dn=M(kr.container)),"attributes"in kr&&(mn=kr.attributes),"extensions"in kr&&(ni=C(kr.extensions)),"optionalExtensions"in kr&&(Yi=C(kr.optionalExtensions)),"onDone"in kr&&(Ra=kr.onDone),"profile"in kr&&(ma=!!kr.profile),"pixelRatio"in kr&&(Ui=+kr.pixelRatio),"cachedCode"in kr&&(Za=kr.cachedCode))),Lr&&(Lr.nodeName.toLowerCase()==="canvas"?oi=Lr:Dn=Lr),!Jn){if(!oi){var bi=T(Dn||document.body,Ra,Ui);if(!bi)return null;oi=bi.canvas,ta=bi.onDestroy}mn.premultipliedAlpha===void 0&&(mn.premultipliedAlpha=!0),Jn=u(oi,mn)}return Jn?{gl:Jn,canvas:oi,container:Dn,extensions:ni,optionalExtensions:Yi,pixelRatio:Ui,profile:ma,cachedCode:Za,onDone:Ra,onDestroy:ta}:(ta(),Ra("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(_e,kr){var Lr={};function Dn(mn){var ni=mn.toLowerCase(),Yi;try{Yi=Lr[ni]=_e.getExtension(ni)}catch{}return!!Yi}for(var oi=0;oi65535)<<4,_e>>>=kr,Lr=(_e>255)<<3,_e>>>=Lr,kr|=Lr,Lr=(_e>15)<<2,_e>>>=Lr,kr|=Lr,Lr=(_e>3)<<1,_e>>>=Lr,kr|=Lr,kr|_e>>1}function U(){var _e=h(8,function(){return[]});function kr(Jn){var mn=H(Jn),ni=_e[F(mn)>>2];return ni.length>0?ni.pop():new ArrayBuffer(mn)}function Lr(Jn){_e[F(Jn.byteLength)>>2].push(Jn)}function Dn(Jn,mn){var ni=null;switch(Jn){case p:ni=new Int8Array(kr(mn),0,mn);break;case k:ni=new Uint8Array(kr(mn),0,mn);break;case w:ni=new Int16Array(kr(2*mn),0,mn);break;case R:ni=new Uint16Array(kr(2*mn),0,mn);break;case O:ni=new Int32Array(kr(4*mn),0,mn);break;case N:ni=new Uint32Array(kr(4*mn),0,mn);break;case V:ni=new Float32Array(kr(4*mn),0,mn);break;default:return null}return ni.length!==mn?ni.subarray(0,mn):ni}function oi(Jn){Lr(Jn.buffer)}return{alloc:kr,free:Lr,allocType:Dn,freeType:oi}}var W=U();W.zero=U();var q=3408,X=3410,lt=3411,yt=3412,pt=3413,st=3414,tt=3415,dt=33901,rt=33902,at=3379,vt=3386,it=34921,Y=36347,ft=36348,ut=35661,wt=35660,zt=34930,Pt=36349,Wt=34076,Ht=34024,Jt=7936,ge=7937,he=7938,de=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,te=34067,ve=34069,oe=33984,Te=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,Hr=16384,br=function(_e,kr){var Lr=1;kr.ext_texture_filter_anisotropic&&(Lr=_e.getParameter(se));var Dn=1,oi=1;kr.webgl_draw_buffers&&(Dn=_e.getParameter(Lt),oi=_e.getParameter(Tt));var Jn=!!kr.oes_texture_float;if(Jn){var mn=_e.createTexture();_e.bindTexture(Mt,mn),_e.texImage2D(Mt,0,Te,1,1,0,Te,He,null);var ni=_e.createFramebuffer();if(_e.bindFramebuffer(cr,ni),_e.framebufferTexture2D(cr,jr,Mt,mn,0),_e.bindTexture(Mt,null),_e.checkFramebufferStatus(cr)!==ur)Jn=!1;else{_e.viewport(0,0,1,1),_e.clearColor(1,0,0,1),_e.clear(Hr);var Yi=W.allocType(He,4);_e.readPixels(0,0,1,1,Te,He,Yi),_e.getError()?Jn=!1:(_e.deleteFramebuffer(ni),_e.deleteTexture(mn),Jn=Yi[0]===1),W.freeType(Yi)}}var Ui=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ma=!0;if(!Ui){var Za=_e.createTexture(),Ra=W.allocType(Ge,36);_e.activeTexture(oe),_e.bindTexture(te,Za),_e.texImage2D(ve,0,Te,3,3,0,Te,Ge,Ra),W.freeType(Ra),_e.bindTexture(te,null),_e.deleteTexture(Za),ma=!_e.getError()}return{colorBits:[_e.getParameter(X),_e.getParameter(lt),_e.getParameter(yt),_e.getParameter(pt)],depthBits:_e.getParameter(st),stencilBits:_e.getParameter(tt),subpixelBits:_e.getParameter(q),extensions:Object.keys(kr).filter(function(ta){return!!kr[ta]}),maxAnisotropic:Lr,maxDrawbuffers:Dn,maxColorAttachments:oi,pointSizeDims:_e.getParameter(dt),lineWidthDims:_e.getParameter(rt),maxViewportDims:_e.getParameter(vt),maxCombinedTextureUnits:_e.getParameter(ut),maxCubeMapSize:_e.getParameter(Wt),maxRenderbufferSize:_e.getParameter(Ht),maxTextureUnits:_e.getParameter(zt),maxTextureSize:_e.getParameter(at),maxAttributes:_e.getParameter(it),maxVertexUniforms:_e.getParameter(Y),maxVertexTextureUnits:_e.getParameter(wt),maxVaryingVectors:_e.getParameter(ft),maxFragmentUniforms:_e.getParameter(Pt),glsl:_e.getParameter(de),renderer:_e.getParameter(ge),vendor:_e.getParameter(Jt),version:_e.getParameter(he),readFloat:Jn,npotTextureCube:ma}},Kr=function(_e){return _e instanceof Uint8Array||_e instanceof Uint16Array||_e instanceof Uint32Array||_e instanceof Int8Array||_e instanceof Int16Array||_e instanceof Int32Array||_e instanceof Float32Array||_e instanceof Float64Array||_e instanceof Uint8ClampedArray};function rn(_e){return!!_e&&typeof _e=="object"&&Array.isArray(_e.shape)&&Array.isArray(_e.stride)&&typeof _e.offset=="number"&&_e.shape.length===_e.stride.length&&(Array.isArray(_e.data)||Kr(_e.data))}var Ce=function(_e){return Object.keys(_e).map(function(kr){return _e[kr]})},Gt={shape:re,flatten:Nt};function ne(_e,kr,Lr){for(var Dn=0;Dn0){var ja;if(Array.isArray(Nn[0])){ua=qn(Nn);for(var gi=1,ti=1;ti0){if(typeof gi[0]=="number"){var Wi=W.allocType(Qn.dtype,gi.length);Qr(Wi,gi),ua(Wi,Ma),W.freeType(Wi)}else if(Array.isArray(gi[0])||Kr(gi[0])){fa=qn(gi);var $i=ii(gi,fa,Qn.dtype);ua($i,Ma),W.freeType($i)}}}else if(rn(gi)){fa=gi.shape;var xa=gi.stride,Io=0,wo=0,va=0,Ia=0;fa.length===1?(Io=fa[0],wo=1,va=xa[0],Ia=0):fa.length===2&&(Io=fa[0],wo=fa[1],va=xa[0],Ia=xa[1]);var po=Array.isArray(gi.data)?Qn.dtype:_r(gi.data),Co=W.allocType(po,Io*wo);Cn(Co,gi.data,Io,wo,va,Ia,gi.offset),ua(Co,Ma),W.freeType(Co)}return Aa}return Ii||Aa(cn),Aa._reglType="buffer",Aa._buffer=Qn,Aa.subdata=ja,Lr.profile&&(Aa.stats=Qn.stats),Aa.destroy=function(){Ra(Qn)},Aa}function bi(){Ce(Jn).forEach(function(cn){cn.buffer=_e.createBuffer(),_e.bindBuffer(cn.type,cn.buffer),_e.bufferData(cn.type,cn.persistentData||cn.byteLength,cn.usage)})}return Lr.profile&&(kr.getTotalBufferSize=function(){var cn=0;return Object.keys(Jn).forEach(function(Nn){cn+=Jn[Nn].stats.size}),cn}),{create:ta,createStream:Yi,destroyStream:Ui,clear:function(){Ce(Jn).forEach(Ra),ni.forEach(Ra)},getBuffer:function(cn){return cn&&cn._buffer instanceof mn?cn._buffer:null},restore:bi,_initBuffer:Za}}var An=0,ci=0,xi=1,Li=1,Oi=4,Zi=4,li={points:An,point:ci,lines:xi,line:Li,triangles:Oi,triangle:Zi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},La=0,Wa=1,ze=4,Pe=5120,Rr=5121,qr=5122,$r=5123,Br=5124,Gr=5125,fn=34963,an=35040,Ee=35044;function dr(_e,kr,Lr,Dn){var oi={},Jn=0,mn={uint8:Rr,uint16:$r};kr.oes_element_index_uint&&(mn.uint32=Gr);function ni(bi){this.id=Jn++,oi[this.id]=this,this.buffer=bi,this.primType=ze,this.vertCount=0,this.type=0}ni.prototype.bind=function(){this.buffer.bind()};var Yi=[];function Ui(bi){var cn=Yi.pop();return cn||(cn=new ni(Lr.create(null,fn,!0,!1)._buffer)),Za(cn,bi,an,-1,-1,0,0),cn}function ma(bi){Yi.push(bi)}function Za(bi,cn,Nn,Ii,_i,Qn,Aa){bi.buffer.bind();var ua;if(cn){var ja=Aa;!Aa&&(!Kr(cn)||rn(cn)&&!Kr(cn.data))&&(ja=kr.oes_element_index_uint?Gr:$r),Lr._initBuffer(bi.buffer,cn,Nn,ja,3)}else _e.bufferData(fn,Qn,Nn),bi.buffer.dtype=ua||Rr,bi.buffer.usage=Nn,bi.buffer.dimension=3,bi.buffer.byteLength=Qn;if(ua=Aa,!Aa){switch(bi.buffer.dtype){case Rr:case Pe:ua=Rr;break;case $r:case qr:ua=$r;break;case Gr:case Br:ua=Gr;break}bi.buffer.dtype=ua}bi.type=ua;var gi=_i;gi<0&&(gi=bi.buffer.byteLength,ua===$r?gi>>=1:ua===Gr&&(gi>>=2)),bi.vertCount=gi;var ti=Ii;if(Ii<0){ti=ze;var Ma=bi.buffer.dimension;Ma===1&&(ti=La),Ma===2&&(ti=Wa),Ma===3&&(ti=ze)}bi.primType=ti}function Ra(bi){Dn.elementsCount--,delete oi[bi.id],bi.buffer.destroy(),bi.buffer=null}function ta(bi,cn){var Nn=Lr.create(null,fn,!0),Ii=new ni(Nn._buffer);Dn.elementsCount++;function _i(Qn){if(!Qn)Nn(),Ii.primType=ze,Ii.vertCount=0,Ii.type=Rr;else if(typeof Qn=="number")Nn(Qn),Ii.primType=ze,Ii.vertCount=Qn|0,Ii.type=Rr;else{var Aa=null,ua=Ee,ja=-1,gi=-1,ti=0,Ma=0;Array.isArray(Qn)||Kr(Qn)||rn(Qn)?Aa=Qn:("data"in Qn&&(Aa=Qn.data),"usage"in Qn&&(ua=Ci[Qn.usage]),"primitive"in Qn&&(ja=li[Qn.primitive]),"count"in Qn&&(gi=Qn.count|0),"type"in Qn&&(Ma=mn[Qn.type]),"length"in Qn?ti=Qn.length|0:(ti=gi,Ma===$r||Ma===qr?ti*=2:(Ma===Gr||Ma===Br)&&(ti*=4))),Za(Ii,Aa,ua,ja,gi,ti,Ma)}return _i}return _i(bi),_i._reglType="elements",_i._elements=Ii,_i.subdata=function(Qn,Aa){return Nn.subdata(Qn,Aa),_i},_i.destroy=function(){Ra(Ii)},_i}return{create:ta,createStream:Ui,destroyStream:ma,getElements:function(bi){return typeof bi=="function"&&bi._elements instanceof ni?bi._elements:null},clear:function(){Ce(oi).forEach(Ra)}}}var Vr=new Float32Array(1),vn=new Uint32Array(Vr.buffer),Fn=5123;function Xn(_e){for(var kr=W.allocType(Fn,_e.length),Lr=0;Lr<_e.length;++Lr)if(isNaN(_e[Lr]))kr[Lr]=65535;else if(_e[Lr]===1/0)kr[Lr]=31744;else if(_e[Lr]===-1/0)kr[Lr]=64512;else{Vr[0]=_e[Lr];var Dn=vn[0],oi=Dn>>>31<<15,Jn=(Dn<<1>>>24)-127,mn=Dn>>13&1023;if(Jn<-24)kr[Lr]=oi;else if(Jn<-14){var ni=-14-Jn;kr[Lr]=oi+(mn+1024>>ni)}else Jn>15?kr[Lr]=oi+31744:kr[Lr]=oi+(Jn+15<<10)+mn}return kr}function Pn(_e){return Array.isArray(_e)||Kr(_e)}var Sn=34467,Zn=3553,Ea=34067,Ri=34069,Ja=6408,Xa=6406,Do=6407,go=6409,Fo=6410,za=32854,xs=32855,os=36194,cl=32819,Zo=32820,Ks=33635,ss=34042,hl=6402,tl=34041,Bl=35904,cs=35906,Ps=36193,Po=33776,Ts=33777,kl=33778,Hl=33779,Xl=35986,Us=35987,Ca=34798,fo=35840,qs=35841,Jl=35842,Jo=35843,$l=36196,ol=5121,Pl=5123,Ru=5125,lo=5126,As=10242,zs=10243,au=10497,fl=33071,rs=33648,Mu=10240,Gu=10241,bl=9728,Dl=9729,Ql=9984,ru=9985,oc=9986,mh=9987,Jc=33170,oh=4352,Uf=4353,Cf=4354,Fl=34046,Bc=3317,Vf=37440,fc=37441,sc=37443,dc=37444,sh=33984,cu=[Ql,oc,ru,mh],lc=[0,go,Fo,Do,Ja],nl={};nl[go]=nl[Xa]=nl[hl]=1,nl[tl]=nl[Fo]=2,nl[Do]=nl[Bl]=3,nl[Ja]=nl[cs]=4;function Gl(_e){return"[object "+_e+"]"}var Sh=Gl("HTMLCanvasElement"),Pc=Gl("OffscreenCanvas"),Uh=Gl("CanvasRenderingContext2D"),xu=Gl("ImageBitmap"),Id=Gl("HTMLImageElement"),el=Gl("HTMLVideoElement"),$d=Object.keys(le).concat([Sh,Pc,Uh,xu,Id,el]),zl=[];zl[ol]=1,zl[lo]=4,zl[Ps]=2,zl[Pl]=2,zl[Ru]=4;var ts=[];ts[za]=2,ts[xs]=2,ts[os]=2,ts[tl]=4,ts[Po]=.5,ts[Ts]=.5,ts[kl]=1,ts[Hl]=1,ts[Xl]=.5,ts[Us]=1,ts[Ca]=1,ts[fo]=.5,ts[qs]=.25,ts[Jl]=.5,ts[Jo]=.25,ts[$l]=.5;function lf(_e){return Array.isArray(_e)&&(_e.length===0||typeof _e[0]=="number")}function lh(_e){if(!Array.isArray(_e))return!1;var kr=_e.length;return!(kr===0||!Pn(_e[0]))}function ec(_e){return Object.prototype.toString.call(_e)}function Hf(_e){return ec(_e)===Sh}function Vh(_e){return ec(_e)===Pc}function xf(_e){return ec(_e)===Uh}function uc(_e){return ec(_e)===xu}function md(_e){return ec(_e)===Id}function Kf(_e){return ec(_e)===el}function _f(_e){if(!_e)return!1;var kr=ec(_e);return $d.indexOf(kr)>=0?!0:lf(_e)||lh(_e)||rn(_e)}function Hh(_e){return le[Object.prototype.toString.call(_e)]|0}function Wf(_e,kr){var Lr=kr.length;switch(_e.type){case ol:case Pl:case Ru:case lo:var Dn=W.allocType(_e.type,Lr);Dn.set(kr),_e.data=Dn;break;case Ps:_e.data=Xn(kr);break}}function qf(_e,kr){return W.allocType(_e.type===Ps?lo:_e.type,kr)}function uh(_e,kr){_e.type===Ps?(_e.data=Xn(kr),W.freeType(kr)):_e.data=kr}function Xf(_e,kr,Lr,Dn,oi,Jn){for(var mn=_e.width,ni=_e.height,Yi=_e.channels,Ui=mn*ni*Yi,ma=qf(_e,Ui),Za=0,Ra=0;Ra=1;)ni+=mn*Yi*Yi,Yi/=2;return ni}else return mn*Lr*Dn}function gh(_e,kr,Lr,Dn,oi,Jn,mn){var ni={"don't care":oh,"dont care":oh,nice:Cf,fast:Uf},Yi={repeat:au,clamp:fl,mirror:rs},Ui={nearest:bl,linear:Dl},ma=c({mipmap:mh,"nearest mipmap nearest":Ql,"linear mipmap nearest":ru,"nearest mipmap linear":oc,"linear mipmap linear":mh},Ui),Za={none:0,browser:dc},Ra={uint8:ol,rgba4:cl,rgb565:Ks,"rgb5 a1":Zo},ta={alpha:Xa,luminance:go,"luminance alpha":Fo,rgb:Do,rgba:Ja,rgba4:za,"rgb5 a1":xs,rgb565:os},bi={};kr.ext_srgb&&(ta.srgb=Bl,ta.srgba=cs),kr.oes_texture_float&&(Ra.float32=Ra.float=lo),kr.oes_texture_half_float&&(Ra.float16=Ra["half float"]=Ps),kr.webgl_depth_texture&&(c(ta,{depth:hl,"depth stencil":tl}),c(Ra,{uint16:Pl,uint32:Ru,"depth stencil":ss})),kr.webgl_compressed_texture_s3tc&&c(bi,{"rgb s3tc dxt1":Po,"rgba s3tc dxt1":Ts,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":Hl}),kr.webgl_compressed_texture_atc&&c(bi,{"rgb atc":Xl,"rgba atc explicit alpha":Us,"rgba atc interpolated alpha":Ca}),kr.webgl_compressed_texture_pvrtc&&c(bi,{"rgb pvrtc 4bppv1":fo,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":Jl,"rgba pvrtc 2bppv1":Jo}),kr.webgl_compressed_texture_etc1&&(bi["rgb etc1"]=$l);var cn=Array.prototype.slice.call(_e.getParameter(Sn));Object.keys(bi).forEach(function(Z){var ot=bi[Z];cn.indexOf(ot)>=0&&(ta[Z]=ot)});var Nn=Object.keys(ta);Lr.textureFormats=Nn;var Ii=[];Object.keys(ta).forEach(function(Z){var ot=ta[Z];Ii[ot]=Z});var _i=[];Object.keys(Ra).forEach(function(Z){var ot=Ra[Z];_i[ot]=Z});var Qn=[];Object.keys(Ui).forEach(function(Z){var ot=Ui[Z];Qn[ot]=Z});var Aa=[];Object.keys(ma).forEach(function(Z){var ot=ma[Z];Aa[ot]=Z});var ua=[];Object.keys(Yi).forEach(function(Z){var ot=Yi[Z];ua[ot]=Z});var ja=Nn.reduce(function(Z,ot){var et=ta[ot];return et===go||et===Xa||et===go||et===Fo||et===hl||et===tl||kr.ext_srgb&&(et===Bl||et===cs)?Z[et]=et:et===xs||ot.indexOf("rgba")>=0?Z[et]=Ja:Z[et]=Do,Z},{});function gi(){this.internalformat=Ja,this.format=Ja,this.type=ol,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=dc,this.width=0,this.height=0,this.channels=0}function ti(Z,ot){Z.internalformat=ot.internalformat,Z.format=ot.format,Z.type=ot.type,Z.compressed=ot.compressed,Z.premultiplyAlpha=ot.premultiplyAlpha,Z.flipY=ot.flipY,Z.unpackAlignment=ot.unpackAlignment,Z.colorSpace=ot.colorSpace,Z.width=ot.width,Z.height=ot.height,Z.channels=ot.channels}function Ma(Z,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&(Z.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&(Z.flipY=ot.flipY),"alignment"in ot&&(Z.unpackAlignment=ot.alignment),"colorSpace"in ot&&(Z.colorSpace=Za[ot.colorSpace]),"type"in ot){var et=ot.type;Z.type=Ra[et]}var xt=Z.width,Ut=Z.height,fe=Z.channels,ye=!1;"shape"in ot?(xt=ot.shape[0],Ut=ot.shape[1],ot.shape.length===3&&(fe=ot.shape[2],ye=!0)):("radius"in ot&&(xt=Ut=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Ut=ot.height),"channels"in ot&&(fe=ot.channels,ye=!0)),Z.width=xt|0,Z.height=Ut|0,Z.channels=fe|0;var Yt=!1;if("format"in ot){var ce=ot.format,Se=Z.internalformat=ta[ce];Z.format=ja[Se],ce in Ra&&("type"in ot||(Z.type=Ra[ce])),ce in bi&&(Z.compressed=!0),Yt=!0}!ye&&Yt?Z.channels=nl[Z.format]:ye&&!Yt&&Z.channels!==lc[Z.format]&&(Z.format=Z.internalformat=lc[Z.channels])}}function fa(Z){_e.pixelStorei(Vf,Z.flipY),_e.pixelStorei(fc,Z.premultiplyAlpha),_e.pixelStorei(sc,Z.colorSpace),_e.pixelStorei(Bc,Z.unpackAlignment)}function Wi(){gi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function $i(Z,ot){var et=null;if(_f(ot)?et=ot:ot&&(Ma(Z,ot),"x"in ot&&(Z.xOffset=ot.x|0),"y"in ot&&(Z.yOffset=ot.y|0),_f(ot.data)&&(et=ot.data)),ot.copy){var xt=oi.viewportWidth,Ut=oi.viewportHeight;Z.width=Z.width||xt-Z.xOffset,Z.height=Z.height||Ut-Z.yOffset,Z.needsCopy=!0}else if(!et)Z.width=Z.width||1,Z.height=Z.height||1,Z.channels=Z.channels||4;else if(Kr(et))Z.channels=Z.channels||4,Z.data=et,!("type"in ot)&&Z.type===ol&&(Z.type=Hh(et));else if(lf(et))Z.channels=Z.channels||4,Wf(Z,et),Z.alignment=1,Z.needsFree=!0;else if(rn(et)){var fe=et.data;!Array.isArray(fe)&&Z.type===ol&&(Z.type=Hh(fe));var ye=et.shape,Yt=et.stride,ce,Se,nr,Ye,tr,lr;ye.length===3?(nr=ye[2],lr=Yt[2]):(nr=1,lr=1),ce=ye[0],Se=ye[1],Ye=Yt[0],tr=Yt[1],Z.alignment=1,Z.width=ce,Z.height=Se,Z.channels=nr,Z.format=Z.internalformat=lc[nr],Z.needsFree=!0,Xf(Z,fe,Ye,tr,lr,et.offset)}else if(Hf(et)||Vh(et)||xf(et))Hf(et)||Vh(et)?Z.element=et:Z.element=et.canvas,Z.width=Z.element.width,Z.height=Z.element.height,Z.channels=4;else if(uc(et))Z.element=et,Z.width=et.width,Z.height=et.height,Z.channels=4;else if(md(et))Z.element=et,Z.width=et.naturalWidth,Z.height=et.naturalHeight,Z.channels=4;else if(Kf(et))Z.element=et,Z.width=et.videoWidth,Z.height=et.videoHeight,Z.channels=4;else if(lh(et)){var hr=Z.width||et[0].length,Ve=Z.height||et.length,Xe=Z.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var $e=Gt.shape(et),Cr=1,on=0;on<$e.length;++on)Cr*=$e[on];var hn=qf(Z,Cr);Gt.flatten(et,$e,"",hn),uh(Z,hn),Z.alignment=1,Z.width=hr,Z.height=Ve,Z.channels=Xe,Z.format=Z.internalformat=lc[Xe],Z.needsFree=!0}Z.type===lo||Z.type}function xa(Z,ot,et){var xt=Z.element,Ut=Z.data,fe=Z.internalformat,ye=Z.format,Yt=Z.type,ce=Z.width,Se=Z.height;fa(Z),xt?_e.texImage2D(ot,et,ye,ye,Yt,xt):Z.compressed?_e.compressedTexImage2D(ot,et,fe,ce,Se,0,Ut):Z.needsCopy?(Dn(),_e.copyTexImage2D(ot,et,ye,Z.xOffset,Z.yOffset,ce,Se,0)):_e.texImage2D(ot,et,ye,ce,Se,0,ye,Yt,Ut||null)}function Io(Z,ot,et,xt,Ut){var fe=Z.element,ye=Z.data,Yt=Z.internalformat,ce=Z.format,Se=Z.type,nr=Z.width,Ye=Z.height;fa(Z),fe?_e.texSubImage2D(ot,Ut,et,xt,ce,Se,fe):Z.compressed?_e.compressedTexSubImage2D(ot,Ut,et,xt,Yt,nr,Ye,ye):Z.needsCopy?(Dn(),_e.copyTexSubImage2D(ot,Ut,et,xt,Z.xOffset,Z.yOffset,nr,Ye)):_e.texSubImage2D(ot,Ut,et,xt,nr,Ye,ce,Se,ye)}var wo=[];function va(){return wo.pop()||new Wi}function Ia(Z){Z.needsFree&&W.freeType(Z.data),Wi.call(Z),wo.push(Z)}function po(){gi.call(this),this.genMipmaps=!1,this.mipmapHint=oh,this.mipmask=0,this.images=Array(16)}function Co(Z,ot,et){var xt=Z.images[0]=va();Z.mipmask=1,xt.width=Z.width=ot,xt.height=Z.height=et,xt.channels=Z.channels=4}function ns(Z,ot){var et=null;if(_f(ot))et=Z.images[0]=va(),ti(et,Z),$i(et,ot),Z.mipmask=1;else if(Ma(Z,ot),Array.isArray(ot.mipmap))for(var xt=ot.mipmap,Ut=0;Ut>=Ut,et.height>>=Ut,$i(et,xt[Ut]),Z.mipmask|=1<=0&&!("faces"in ot)&&(Z.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;Z.magFilter=Ui[xt]}var Ut=Z.wrapS,fe=Z.wrapT;if("wrap"in ot){var ye=ot.wrap;typeof ye=="string"?Ut=fe=Yi[ye]:Array.isArray(ye)&&(Ut=Yi[ye[0]],fe=Yi[ye[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Ut=Yi[Yt]}if("wrapT"in ot){var ce=ot.wrapT;fe=Yi[ce]}}if(Z.wrapS=Ut,Z.wrapT=fe,"anisotropic"in ot&&(ot.anisotropic,Z.anisotropic=ot.anisotropic),"mipmap"in ot){var Se=!1;switch(typeof ot.mipmap){case"string":Z.mipmapHint=ni[ot.mipmap],Z.genMipmaps=!0,Se=!0;break;case"boolean":Se=Z.genMipmaps=ot.mipmap;break;case"object":Z.genMipmaps=!1,Se=!0;break}Se&&!("min"in ot)&&(Z.minFilter=Ql)}}function mc(Z,ot){_e.texParameteri(ot,Gu,Z.minFilter),_e.texParameteri(ot,Mu,Z.magFilter),_e.texParameteri(ot,As,Z.wrapS),_e.texParameteri(ot,zs,Z.wrapT),kr.ext_texture_filter_anisotropic&&_e.texParameteri(ot,Fl,Z.anisotropic),Z.genMipmaps&&(_e.hint(Jc,Z.mipmapHint),_e.generateMipmap(ot))}var xc=0,yu={},pu=Lr.maxTextureUnits,ku=Array(pu).map(function(){return null});function No(Z){gi.call(this),this.mipmask=0,this.internalformat=Ja,this.id=xc++,this.refCount=1,this.target=Z,this.texture=_e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new pl,mn.profile&&(this.stats={size:0})}function Tu(Z){_e.activeTexture(sh),_e.bindTexture(Z.target,Z.texture)}function ll(){var Z=ku[0];Z?_e.bindTexture(Z.target,Z.texture):_e.bindTexture(Zn,null)}function Cu(Z){var ot=Z.texture,et=Z.unit,xt=Z.target;et>=0&&(_e.activeTexture(sh+et),_e.bindTexture(xt,null),ku[et]=null),_e.deleteTexture(ot),Z.texture=null,Z.params=null,Z.pixels=null,Z.refCount=0,delete yu[Z.id],Jn.textureCount--}c(No.prototype,{bind:function(){var Z=this;Z.bindCount+=1;var ot=Z.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}ku[et]=Z,ot=et;break}mn.profile&&Jn.maxTextureUnits>tr)-nr,lr.height=lr.height||(et.height>>tr)-Ye,Tu(et),Io(lr,Zn,nr,Ye,tr),ll(),Ia(lr),xt}function fe(ye,Yt){var ce=ye|0,Se=Yt|0||ce;if(ce===et.width&&Se===et.height)return xt;xt.width=et.width=ce,xt.height=et.height=Se,Tu(et);for(var nr=0;et.mipmask>>nr;++nr){var Ye=ce>>nr,tr=Se>>nr;if(!Ye||!tr)break;_e.texImage2D(Zn,nr,et.format,Ye,tr,0,et.format,et.type,null)}return ll(),mn.profile&&(et.stats.size=Eh(et.internalformat,et.type,ce,Se,!1,!1)),xt}return xt(Z,ot),xt.subimage=Ut,xt.resize=fe,xt._reglType="texture2d",xt._texture=et,mn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Lo(Z,ot,et,xt,Ut,fe){var ye=new No(Ea);yu[ye.id]=ye,Jn.cubeCount++;var Yt=new Array(6);function ce(Ye,tr,lr,hr,Ve,Xe){var $e,Cr=ye.texInfo;for(pl.call(Cr),$e=0;$e<6;++$e)Yt[$e]=hs();if(typeof Ye=="number"||!Ye){var on=Ye|0||1;for($e=0;$e<6;++$e)Co(Yt[$e],on,on)}else if(typeof Ye=="object")if(tr)ns(Yt[0],Ye),ns(Yt[1],tr),ns(Yt[2],lr),ns(Yt[3],hr),ns(Yt[4],Ve),ns(Yt[5],Xe);else if(Eu(Cr,Ye),Ma(ye,Ye),"faces"in Ye){var hn=Ye.faces;for($e=0;$e<6;++$e)ti(Yt[$e],ye),ns(Yt[$e],hn[$e])}else for($e=0;$e<6;++$e)ns(Yt[$e],Ye);for(ti(ye,Yt[0]),Cr.genMipmaps?ye.mipmask=(Yt[0].width<<1)-1:ye.mipmask=Yt[0].mipmask,ye.internalformat=Yt[0].internalformat,ce.width=Yt[0].width,ce.height=Yt[0].height,Tu(ye),$e=0;$e<6;++$e)jl(Yt[$e],Ri+$e);for(mc(Cr,Ea),ll(),mn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,Cr.genMipmaps,!0)),ce.format=Ii[ye.internalformat],ce.type=_i[ye.type],ce.mag=Qn[Cr.magFilter],ce.min=Aa[Cr.minFilter],ce.wrapS=ua[Cr.wrapS],ce.wrapT=ua[Cr.wrapT],$e=0;$e<6;++$e)wu(Yt[$e]);return ce}function Se(Ye,tr,lr,hr,Ve){var Xe=lr|0,$e=hr|0,Cr=Ve|0,on=va();return ti(on,ye),on.width=0,on.height=0,$i(on,tr),on.width=on.width||(ye.width>>Cr)-Xe,on.height=on.height||(ye.height>>Cr)-$e,Tu(ye),Io(on,Ri+Ye,Xe,$e,Cr),ll(),Ia(on),ce}function nr(Ye){var tr=Ye|0;if(tr!==ye.width){ce.width=ye.width=tr,ce.height=ye.height=tr,Tu(ye);for(var lr=0;lr<6;++lr)for(var hr=0;ye.mipmask>>hr;++hr)_e.texImage2D(Ri+lr,hr,ye.format,tr>>hr,tr>>hr,0,ye.format,ye.type,null);return ll(),mn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,!1,!0)),ce}}return ce(Z,ot,et,xt,Ut,fe),ce.subimage=Se,ce.resize=nr,ce._reglType="textureCube",ce._texture=ye,mn.profile&&(ce.stats=ye.stats),ce.destroy=function(){ye.decRef()},ce}function Cs(){for(var Z=0;Z>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Ut=0;Ut<6;++Ut)_e.texImage2D(Ri+Ut,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);mc(et.texInfo,et.target)})}function xl(){for(var Z=0;Z=0?wu=!0:Yi.indexOf(pl)>=0&&(wu=!1))),("depthTexture"in No||"depthStencilTexture"in No)&&(ku=!!(No.depthTexture||No.depthStencilTexture)),"depth"in No&&(typeof No.depth=="boolean"?jl=No.depth:(xc=No.depth,Al=!1)),"stencil"in No&&(typeof No.stencil=="boolean"?Al=No.stencil:(yu=No.stencil,jl=!1)),"depthStencil"in No&&(typeof No.depthStencil=="boolean"?jl=Al=No.depthStencil:(pu=No.depthStencil,jl=!1,Al=!1))}var ll=null,Cu=null,_c=null,Lo=null;if(Array.isArray(hs))ll=hs.map(bi);else if(hs)ll=[bi(hs)];else for(ll=new Array(mc),po=0;po0&&(Ia.depth=$i[0].depth,Ia.stencil=$i[0].stencil,Ia.depthStencil=$i[0].depthStencil),$i[va]?$i[va](Ia):$i[va]=ti(Ia)}return c(xa,{width:po,height:po,color:pl})}function Io(wo){var va,Ia=wo|0;if(Ia===xa.width)return xa;var po=xa.color;for(va=0;va=po.byteLength?Co.subdata(po):(Co.destroy(),ti.buffers[wo]=null)),ti.buffers[wo]||(Co=ti.buffers[wo]=oi.create(va,If,!1,!0)),Ia.buffer=oi.getBuffer(Co),Ia.size=Ia.buffer.dimension|0,Ia.normalized=!1,Ia.type=Ia.buffer.dtype,Ia.offset=0,Ia.stride=0,Ia.divisor=0,Ia.state=1,xa[wo]=1}else oi.getBuffer(va)?(Ia.buffer=oi.getBuffer(va),Ia.size=Ia.buffer.dimension|0,Ia.normalized=!1,Ia.type=Ia.buffer.dtype,Ia.offset=0,Ia.stride=0,Ia.divisor=0,Ia.state=1):oi.getBuffer(va.buffer)?(Ia.buffer=oi.getBuffer(va.buffer),Ia.size=(+va.size||Ia.buffer.dimension)|0,Ia.normalized=!!va.normalized||!1,"type"in va?Ia.type=Vn[va.type]:Ia.type=Ia.buffer.dtype,Ia.offset=(va.offset||0)|0,Ia.stride=(va.stride||0)|0,Ia.divisor=(va.divisor||0)|0,Ia.state=1):"x"in va&&(Ia.x=+va.x||0,Ia.y=+va.y||0,Ia.z=+va.z||0,Ia.w=+va.w||0,Ia.state=2)}for(var ns=0;ns1)for(var fa=0;facn&&(cn=Nn.stats.uniformsCount)}),cn},Lr.getMaxAttributesCount=function(){var cn=0;return ma.forEach(function(Nn){Nn.stats.attributesCount>cn&&(cn=Nn.stats.attributesCount)}),cn});function bi(){oi={},Jn={};for(var cn=0;cn>>4&15)+kr.charAt(Dn&15);return Lr}function Ph(_e){for(var kr="",Lr=-1,Dn,oi;++Lr<_e.length;)Dn=_e.charCodeAt(Lr),oi=Lr+1<_e.length?_e.charCodeAt(Lr+1):0,55296<=Dn&&Dn<=56319&&56320<=oi&&oi<=57343&&(Dn=65536+((Dn&1023)<<10)+(oi&1023),Lr++),Dn<=127?kr+=String.fromCharCode(Dn):Dn<=2047?kr+=String.fromCharCode(192|Dn>>>6&31,128|Dn&63):Dn<=65535?kr+=String.fromCharCode(224|Dn>>>12&15,128|Dn>>>6&63,128|Dn&63):Dn<=2097151&&(kr+=String.fromCharCode(240|Dn>>>18&7,128|Dn>>>12&63,128|Dn>>>6&63,128|Dn&63));return kr}function xh(_e){for(var kr=Array(_e.length>>2),Lr=0;Lr>5]|=(_e.charCodeAt(Lr/8)&255)<<24-Lr%32;return kr}function Bu(_e){for(var kr="",Lr=0;Lr<_e.length*32;Lr+=8)kr+=String.fromCharCode(_e[Lr>>5]>>>24-Lr%32&255);return kr}function nu(_e,kr){return _e>>>kr|_e<<32-kr}function _h(_e,kr){return _e>>>kr}function df(_e,kr,Lr){return _e&kr^~_e&Lr}function bh(_e,kr,Lr){return _e&kr^_e&Lr^kr&Lr}function $f(_e){return nu(_e,2)^nu(_e,13)^nu(_e,22)}function mr(_e){return nu(_e,6)^nu(_e,11)^nu(_e,25)}function Ur(_e){return nu(_e,7)^nu(_e,18)^_h(_e,3)}function xn(_e){return nu(_e,17)^nu(_e,19)^_h(_e,10)}var un=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Wn(_e,kr){var Lr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Dn=new Array(64),oi,Jn,mn,ni,Yi,Ui,ma,Za,Ra,ta,bi,cn;for(_e[kr>>5]|=128<<24-kr%32,_e[(kr+64>>9<<4)+15]=kr,Ra=0;Ra<_e.length;Ra+=16){for(oi=Lr[0],Jn=Lr[1],mn=Lr[2],ni=Lr[3],Yi=Lr[4],Ui=Lr[5],ma=Lr[6],Za=Lr[7],ta=0;ta<64;ta++)ta<16?Dn[ta]=_e[ta+Ra]:Dn[ta]=hi(hi(hi(xn(Dn[ta-2]),Dn[ta-7]),Ur(Dn[ta-15])),Dn[ta-16]),bi=hi(hi(hi(hi(Za,mr(Yi)),df(Yi,Ui,ma)),un[ta]),Dn[ta]),cn=hi($f(oi),bh(oi,Jn,mn)),Za=ma,ma=Ui,Ui=Yi,Yi=hi(ni,bi),ni=mn,mn=Jn,Jn=oi,oi=hi(bi,cn);Lr[0]=hi(oi,Lr[0]),Lr[1]=hi(Jn,Lr[1]),Lr[2]=hi(mn,Lr[2]),Lr[3]=hi(ni,Lr[3]),Lr[4]=hi(Yi,Lr[4]),Lr[5]=hi(Ui,Lr[5]),Lr[6]=hi(ma,Lr[6]),Lr[7]=hi(Za,Lr[7])}return Lr}function hi(_e,kr){var Lr=(_e&65535)+(kr&65535),Dn=(_e>>16)+(kr>>16)+(Lr>>16);return Dn<<16|Lr&65535}function ea(_e){return Array.prototype.slice.call(_e)}function pa(_e){return ea(_e).join("")}function Da(_e){var kr=_e&&_e.cache,Lr=0,Dn=[],oi=[],Jn=[];function mn(bi,cn){var Nn=cn&&cn.stable;if(!Nn){for(var Ii=0;Ii0&&(bi.push(_i,"="),bi.push.apply(bi,ea(arguments)),bi.push(";")),_i}return c(cn,{def:Ii,toString:function(){return pa([Nn.length>0?"var "+Nn.join(",")+";":"",pa(bi)])}})}function Yi(){var bi=ni(),cn=ni(),Nn=bi.toString,Ii=cn.toString;function _i(Qn,Aa){cn(Qn,Aa,"=",bi.def(Qn,Aa),";")}return c(function(){bi.apply(bi,ea(arguments))},{def:bi.def,entry:bi,exit:cn,save:_i,set:function(Qn,Aa,ua){_i(Qn,Aa),bi(Qn,Aa,"=",ua,";")},toString:function(){return Nn()+Ii()}})}function Ui(){var bi=pa(arguments),cn=Yi(),Nn=Yi(),Ii=cn.toString,_i=Nn.toString;return c(cn,{then:function(){return cn.apply(cn,ea(arguments)),this},else:function(){return Nn.apply(Nn,ea(arguments)),this},toString:function(){var Qn=_i();return Qn&&(Qn="else{"+Qn+"}"),pa(["if(",bi,"){",Ii(),"}",Qn])}})}var ma=ni(),Za={};function Ra(bi,cn){var Nn=[];function Ii(){var ja="a"+Nn.length;return Nn.push(ja),ja}cn=cn||0;for(var _i=0;_i2){for(var w=Array(A.position.length*.5),R=0;R2){for(var V=!A.position[0].length,H=a.mallocFloat(this.count*2),F=0,U=0;F1?h.align[Mt]:h.align[0]:h.align;if(typeof ee=="number")return ee;switch(ee){case"right":case"end":return-Lt;case"center":case"centre":case"middle":return-Lt*.5}return 0})),this.baseline==null&&A.baseline==null&&(A.baseline=0),A.baseline!=null&&(this.baseline=A.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Lt,Mt){var ee=(h.font[Mt]||h.font[0]).metrics,ve=0;return ve+=ee.bottom*.5,typeof Lt=="number"?ve+=Lt-ee.baseline:ve+=-ee[Lt],ve*=-1,ve})),A.color!=null)if(A.color||(A.color="transparent"),typeof A.color=="string"||!isNaN(A.color))this.color=e(A.color,"uint8");else{var Pt;if(typeof A.color[0]=="number"&&A.color.length>this.counts.length){var qt=A.color.length;Pt=a.mallocUint8(qt);for(var Wt=(A.color.subarray||A.color.slice).bind(A.color),Jt=0;Jt4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(pe){var se=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(se);for(var Tt=0;Tt1?this.counts[Tt]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Tt]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Tt*4,Tt*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Tt]:this.opacity,baseline:this.baselineOffset[Tt]!=null?this.baselineOffset[Tt]:this.baselineOffset[0],align:this.align?this.alignOffset[Tt]!=null?this.alignOffset[Tt]:this.alignOffset[0]:0,atlas:this.fontAtlas[Tt]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Tt*2,Tt*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},M.prototype.destroy=function(){},M.prototype.kerning=!0,M.prototype.position={constant:new Float32Array(2)},M.prototype.translate=null,M.prototype.scale=null,M.prototype.font=null,M.prototype.text="",M.prototype.positionOffset=[0,0],M.prototype.opacity=1,M.prototype.color=new Uint8Array([0,0,0,255]),M.prototype.alignOffset=[0,0],M.maxAtlasSize=1024,M.atlasCanvas=document.createElement("canvas"),M.atlasContext=M.atlasCanvas.getContext("2d",{alpha:!1}),M.baseFontSize=64,M.fonts={};function C(A){return typeof A=="function"&&A._gl&&A.prop&&A.texture&&A.buffer}Z.exports=M}),NH=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():c.createREGL=g()})(Q,function(){var c=function(_e,kr){for(var Ir=Object.keys(kr),Dn=0;Dn1&&kr===Ir&&(kr==='"'||kr==="'"))return['"'+r(_e.substr(1,_e.length-2))+'"'];var Dn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(_e);if(Dn)return a(_e.substr(0,Dn.index)).concat(a(Dn[1])).concat(a(_e.substr(Dn.index+Dn[0].length)));var li=_e.split(".");if(li.length===1)return['"'+r(_e)+'"'];for(var ti=[],yn=0;yn"u"?1:window.devicePixelRatio,ya=!1,$a={},Na=function(fn){},ia=function(){};if(typeof kr=="string"?Ir=document.querySelector(kr):typeof kr=="object"&&(b(kr)?Ir=kr:_(kr)?(ti=kr,li=ti.canvas):("gl"in kr?ti=kr.gl:"canvas"in kr?li=M(kr.canvas):"container"in kr&&(Dn=M(kr.container)),"attributes"in kr&&(yn=kr.attributes),"extensions"in kr&&(ai=P(kr.extensions)),"optionalExtensions"in kr&&(ta=P(kr.optionalExtensions)),"onDone"in kr&&(Na=kr.onDone),"profile"in kr&&(ya=!!kr.profile),"pixelRatio"in kr&&($i=+kr.pixelRatio),"cachedCode"in kr&&($a=kr.cachedCode))),Ir&&(Ir.nodeName.toLowerCase()==="canvas"?li=Ir:Dn=Ir),!ti){if(!li){var Ai=T(Dn||document.body,Na,$i);if(!Ai)return null;li=Ai.canvas,ia=Ai.onDestroy}yn.premultipliedAlpha===void 0&&(yn.premultipliedAlpha=!0),ti=u(li,yn)}return ti?{gl:ti,canvas:li,container:Dn,extensions:ai,optionalExtensions:ta,pixelRatio:$i,profile:ya,cachedCode:$a,onDone:Na,onDestroy:ia}:(ia(),Na("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(_e,kr){var Ir={};function Dn(yn){var ai=yn.toLowerCase(),ta;try{ta=Ir[ai]=_e.getExtension(ai)}catch{}return!!ta}for(var li=0;li65535)<<4,_e>>>=kr,Ir=(_e>255)<<3,_e>>>=Ir,kr|=Ir,Ir=(_e>15)<<2,_e>>>=Ir,kr|=Ir,Ir=(_e>3)<<1,_e>>>=Ir,kr|=Ir,kr|_e>>1}function U(){var _e=h(8,function(){return[]});function kr(ti){var yn=H(ti),ai=_e[F(yn)>>2];return ai.length>0?ai.pop():new ArrayBuffer(yn)}function Ir(ti){_e[F(ti.byteLength)>>2].push(ti)}function Dn(ti,yn){var ai=null;switch(ti){case p:ai=new Int8Array(kr(yn),0,yn);break;case k:ai=new Uint8Array(kr(yn),0,yn);break;case w:ai=new Int16Array(kr(2*yn),0,yn);break;case R:ai=new Uint16Array(kr(2*yn),0,yn);break;case O:ai=new Int32Array(kr(4*yn),0,yn);break;case j:ai=new Uint32Array(kr(4*yn),0,yn);break;case V:ai=new Float32Array(kr(4*yn),0,yn);break;default:return null}return ai.length!==yn?ai.subarray(0,yn):ai}function li(ti){Ir(ti.buffer)}return{alloc:kr,free:Ir,allocType:Dn,freeType:li}}var W=U();W.zero=U();var q=3408,J=3410,lt=3411,yt=3412,mt=3413,st=3414,tt=3415,dt=33901,rt=33902,at=3379,vt=3386,it=34921,Y=36347,ft=36348,ut=35661,kt=35660,It=34930,Pt=36349,qt=34076,Wt=34024,Jt=7936,ge=7937,fe=7938,pe=35724,se=34047,Tt=36063,Lt=34852,Mt=3553,ee=34067,ve=34069,oe=33984,Te=6408,He=5126,Ge=5121,cr=36160,ur=36053,jr=36064,Wr=16384,br=function(_e,kr){var Ir=1;kr.ext_texture_filter_anisotropic&&(Ir=_e.getParameter(se));var Dn=1,li=1;kr.webgl_draw_buffers&&(Dn=_e.getParameter(Lt),li=_e.getParameter(Tt));var ti=!!kr.oes_texture_float;if(ti){var yn=_e.createTexture();_e.bindTexture(Mt,yn),_e.texImage2D(Mt,0,Te,1,1,0,Te,He,null);var ai=_e.createFramebuffer();if(_e.bindFramebuffer(cr,ai),_e.framebufferTexture2D(cr,jr,Mt,yn,0),_e.bindTexture(Mt,null),_e.checkFramebufferStatus(cr)!==ur)ti=!1;else{_e.viewport(0,0,1,1),_e.clearColor(1,0,0,1),_e.clear(Wr);var ta=W.allocType(He,4);_e.readPixels(0,0,1,1,Te,He,ta),_e.getError()?ti=!1:(_e.deleteFramebuffer(ai),_e.deleteTexture(yn),ti=ta[0]===1),W.freeType(ta)}}var $i=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ya=!0;if(!$i){var $a=_e.createTexture(),Na=W.allocType(Ge,36);_e.activeTexture(oe),_e.bindTexture(ee,$a),_e.texImage2D(ve,0,Te,3,3,0,Te,Ge,Na),W.freeType(Na),_e.bindTexture(ee,null),_e.deleteTexture($a),ya=!_e.getError()}return{colorBits:[_e.getParameter(J),_e.getParameter(lt),_e.getParameter(yt),_e.getParameter(mt)],depthBits:_e.getParameter(st),stencilBits:_e.getParameter(tt),subpixelBits:_e.getParameter(q),extensions:Object.keys(kr).filter(function(ia){return!!kr[ia]}),maxAnisotropic:Ir,maxDrawbuffers:Dn,maxColorAttachments:li,pointSizeDims:_e.getParameter(dt),lineWidthDims:_e.getParameter(rt),maxViewportDims:_e.getParameter(vt),maxCombinedTextureUnits:_e.getParameter(ut),maxCubeMapSize:_e.getParameter(qt),maxRenderbufferSize:_e.getParameter(Wt),maxTextureUnits:_e.getParameter(It),maxTextureSize:_e.getParameter(at),maxAttributes:_e.getParameter(it),maxVertexUniforms:_e.getParameter(Y),maxVertexTextureUnits:_e.getParameter(kt),maxVaryingVectors:_e.getParameter(ft),maxFragmentUniforms:_e.getParameter(Pt),glsl:_e.getParameter(pe),renderer:_e.getParameter(ge),vendor:_e.getParameter(Jt),version:_e.getParameter(fe),readFloat:ti,npotTextureCube:ya}},Xr=function(_e){return _e instanceof Uint8Array||_e instanceof Uint16Array||_e instanceof Uint32Array||_e instanceof Int8Array||_e instanceof Int16Array||_e instanceof Int32Array||_e instanceof Float32Array||_e instanceof Float64Array||_e instanceof Uint8ClampedArray};function nn(_e){return!!_e&&typeof _e=="object"&&Array.isArray(_e.shape)&&Array.isArray(_e.stride)&&typeof _e.offset=="number"&&_e.shape.length===_e.stride.length&&(Array.isArray(_e.data)||Xr(_e.data))}var Le=function(_e){return Object.keys(_e).map(function(kr){return _e[kr]})},Gt={shape:re,flatten:Nt};function ne(_e,kr,Ir){for(var Dn=0;Dn0){var Va;if(Array.isArray(jn[0])){ha=$n(jn);for(var xi=1,ri=1;ri0){if(typeof xi[0]=="number"){var Ki=W.allocType(ei.dtype,xi.length);tn(Ki,xi),ha(Ki,Ea),W.freeType(Ki)}else if(Array.isArray(xi[0])||Xr(xi[0])){ma=$n(xi);var Ji=oi(xi,ma,ei.dtype);ha(Ji,Ea),W.freeType(Ji)}}}else if(nn(xi)){ma=xi.shape;var ba=xi.stride,Io=0,wo=0,_a=0,Fa=0;ma.length===1?(Io=ma[0],wo=1,_a=ba[0],Fa=0):ma.length===2&&(Io=ma[0],wo=ma[1],_a=ba[0],Fa=ba[1]);var vo=Array.isArray(xi.data)?ei.dtype:_r(xi.data),Eo=W.allocType(vo,Io*wo);Cn(Eo,xi.data,Io,wo,_a,Fa,xi.offset),ha(Eo,Ea),W.freeType(Eo)}return Sa}return Bi||Sa(fn),Sa._reglType="buffer",Sa._buffer=ei,Sa.subdata=Va,Ir.profile&&(Sa.stats=ei.stats),Sa.destroy=function(){Na(ei)},Sa}function Ai(){Le(ti).forEach(function(fn){fn.buffer=_e.createBuffer(),_e.bindBuffer(fn.type,fn.buffer),_e.bufferData(fn.type,fn.persistentData||fn.byteLength,fn.usage)})}return Ir.profile&&(kr.getTotalBufferSize=function(){var fn=0;return Object.keys(ti).forEach(function(jn){fn+=ti[jn].stats.size}),fn}),{create:ia,createStream:ta,destroyStream:$i,clear:function(){Le(ti).forEach(Na),ai.forEach(Na)},getBuffer:function(fn){return fn&&fn._buffer instanceof yn?fn._buffer:null},restore:Ai,_initBuffer:$a}}var Mn=0,fi=0,ki=1,Oi=1,ji=4,Xi=4,ci={points:Mn,point:fi,lines:ki,line:Oi,triangles:ji,triangle:Xi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},za=0,Wa=1,ze=4,Ie=5120,Rr=5121,$r=5122,Gr=5123,Br=5124,Yr=5125,pn=34963,on=35040,Ce=35044;function dr(_e,kr,Ir,Dn){var li={},ti=0,yn={uint8:Rr,uint16:Gr};kr.oes_element_index_uint&&(yn.uint32=Yr);function ai(Ai){this.id=ti++,li[this.id]=this,this.buffer=Ai,this.primType=ze,this.vertCount=0,this.type=0}ai.prototype.bind=function(){this.buffer.bind()};var ta=[];function $i(Ai){var fn=ta.pop();return fn||(fn=new ai(Ir.create(null,pn,!0,!1)._buffer)),$a(fn,Ai,on,-1,-1,0,0),fn}function ya(Ai){ta.push(Ai)}function $a(Ai,fn,jn,Bi,Ti,ei,Sa){Ai.buffer.bind();var ha;if(fn){var Va=Sa;!Sa&&(!Xr(fn)||nn(fn)&&!Xr(fn.data))&&(Va=kr.oes_element_index_uint?Yr:Gr),Ir._initBuffer(Ai.buffer,fn,jn,Va,3)}else _e.bufferData(pn,ei,jn),Ai.buffer.dtype=ha||Rr,Ai.buffer.usage=jn,Ai.buffer.dimension=3,Ai.buffer.byteLength=ei;if(ha=Sa,!Sa){switch(Ai.buffer.dtype){case Rr:case Ie:ha=Rr;break;case Gr:case $r:ha=Gr;break;case Yr:case Br:ha=Yr;break}Ai.buffer.dtype=ha}Ai.type=ha;var xi=Ti;xi<0&&(xi=Ai.buffer.byteLength,ha===Gr?xi>>=1:ha===Yr&&(xi>>=2)),Ai.vertCount=xi;var ri=Bi;if(Bi<0){ri=ze;var Ea=Ai.buffer.dimension;Ea===1&&(ri=za),Ea===2&&(ri=Wa),Ea===3&&(ri=ze)}Ai.primType=ri}function Na(Ai){Dn.elementsCount--,delete li[Ai.id],Ai.buffer.destroy(),Ai.buffer=null}function ia(Ai,fn){var jn=Ir.create(null,pn,!0),Bi=new ai(jn._buffer);Dn.elementsCount++;function Ti(ei){if(!ei)jn(),Bi.primType=ze,Bi.vertCount=0,Bi.type=Rr;else if(typeof ei=="number")jn(ei),Bi.primType=ze,Bi.vertCount=ei|0,Bi.type=Rr;else{var Sa=null,ha=Ce,Va=-1,xi=-1,ri=0,Ea=0;Array.isArray(ei)||Xr(ei)||nn(ei)?Sa=ei:("data"in ei&&(Sa=ei.data),"usage"in ei&&(ha=Ii[ei.usage]),"primitive"in ei&&(Va=ci[ei.primitive]),"count"in ei&&(xi=ei.count|0),"type"in ei&&(Ea=yn[ei.type]),"length"in ei?ri=ei.length|0:(ri=xi,Ea===Gr||Ea===$r?ri*=2:(Ea===Yr||Ea===Br)&&(ri*=4))),$a(Bi,Sa,ha,Va,xi,ri,Ea)}return Ti}return Ti(Ai),Ti._reglType="elements",Ti._elements=Bi,Ti.subdata=function(ei,Sa){return jn.subdata(ei,Sa),Ti},Ti.destroy=function(){Na(Bi)},Ti}return{create:ia,createStream:$i,destroyStream:ya,getElements:function(Ai){return typeof Ai=="function"&&Ai._elements instanceof ai?Ai._elements:null},clear:function(){Le(li).forEach(Na)}}}var Hr=new Float32Array(1),_n=new Uint32Array(Hr.buffer),Fn=5123;function Qn(_e){for(var kr=W.allocType(Fn,_e.length),Ir=0;Ir<_e.length;++Ir)if(isNaN(_e[Ir]))kr[Ir]=65535;else if(_e[Ir]===1/0)kr[Ir]=31744;else if(_e[Ir]===-1/0)kr[Ir]=64512;else{Hr[0]=_e[Ir];var Dn=_n[0],li=Dn>>>31<<15,ti=(Dn<<1>>>24)-127,yn=Dn>>13&1023;if(ti<-24)kr[Ir]=li;else if(ti<-14){var ai=-14-ti;kr[Ir]=li+(yn+1024>>ai)}else ti>15?kr[Ir]=li+31744:kr[Ir]=li+(ti+15<<10)+yn}return kr}function Pn(_e){return Array.isArray(_e)||Xr(_e)}var En=34467,Zn=3553,La=34067,Vi=34069,Qa=6408,Ja=6406,Do=6407,yo=6409,Fo=6410,Da=32854,ys=32855,os=36194,ul=32819,Zo=32820,Ks=33635,ss=34042,cl=6402,Qs=34041,Nl=35904,cs=35906,Ps=36193,Lo=33776,As=33777,kl=33778,ql=33779,Jl=35986,Us=35987,Pa=34798,fo=35840,qs=35841,Ql=35842,Xo=35843,Gl=36196,al=5121,Cl=5123,Ru=5125,lo=5126,Ms=10242,Is=10243,ou=10497,hl=33071,ts=33648,Su=10240,Gu=10241,bl=9728,Dl=9729,tu=9984,nu=9985,ac=9986,mh=9987,Jc=33170,ah=4352,Bf=4353,Sf=4354,Fl=34046,Bc=3317,Nf=37440,hc=37441,oc=37443,fc=37444,oh=33984,cu=[tu,ac,nu,mh],sc=[0,yo,Fo,Do,Qa],rl={};rl[yo]=rl[Ja]=rl[cl]=1,rl[Qs]=rl[Fo]=2,rl[Do]=rl[Nl]=3,rl[Qa]=rl[cs]=4;function Yl(_e){return"[object "+_e+"]"}var Sh=Yl("HTMLCanvasElement"),Cc=Yl("OffscreenCanvas"),Uh=Yl("CanvasRenderingContext2D"),_u=Yl("ImageBitmap"),Ed=Yl("HTMLImageElement"),tl=Yl("HTMLVideoElement"),Vd=Object.keys(le).concat([Sh,Cc,Uh,_u,Ed,tl]),Ll=[];Ll[al]=1,Ll[lo]=4,Ll[Ps]=2,Ll[Cl]=2,Ll[Ru]=4;var Qo=[];Qo[Da]=2,Qo[ys]=2,Qo[os]=2,Qo[Qs]=4,Qo[Lo]=.5,Qo[As]=.5,Qo[kl]=1,Qo[ql]=1,Qo[Jl]=.5,Qo[Us]=1,Qo[Pa]=1,Qo[fo]=.5,Qo[qs]=.25,Qo[Ql]=.5,Qo[Xo]=.25,Qo[Gl]=.5;function lf(_e){return Array.isArray(_e)&&(_e.length===0||typeof _e[0]=="number")}function sh(_e){if(!Array.isArray(_e))return!1;var kr=_e.length;return!(kr===0||!Pn(_e[0]))}function rc(_e){return Object.prototype.toString.call(_e)}function jf(_e){return rc(_e)===Sh}function Vh(_e){return rc(_e)===Cc}function yf(_e){return rc(_e)===Uh}function lc(_e){return rc(_e)===_u}function hd(_e){return rc(_e)===Ed}function Zf(_e){return rc(_e)===tl}function xf(_e){if(!_e)return!1;var kr=rc(_e);return Vd.indexOf(kr)>=0?!0:lf(_e)||sh(_e)||nn(_e)}function Hh(_e){return le[Object.prototype.toString.call(_e)]|0}function Uf(_e,kr){var Ir=kr.length;switch(_e.type){case al:case Cl:case Ru:case lo:var Dn=W.allocType(_e.type,Ir);Dn.set(kr),_e.data=Dn;break;case Ps:_e.data=Qn(kr);break}}function Vf(_e,kr){return W.allocType(_e.type===Ps?lo:_e.type,kr)}function lh(_e,kr){_e.type===Ps?(_e.data=Qn(kr),W.freeType(kr)):_e.data=kr}function Gf(_e,kr,Ir,Dn,li,ti){for(var yn=_e.width,ai=_e.height,ta=_e.channels,$i=yn*ai*ta,ya=Vf(_e,$i),$a=0,Na=0;Na=1;)ai+=yn*ta*ta,ta/=2;return ai}else return yn*Ir*Dn}function gh(_e,kr,Ir,Dn,li,ti,yn){var ai={"don't care":ah,"dont care":ah,nice:Sf,fast:Bf},ta={repeat:ou,clamp:hl,mirror:ts},$i={nearest:bl,linear:Dl},ya=c({mipmap:mh,"nearest mipmap nearest":tu,"linear mipmap nearest":nu,"nearest mipmap linear":ac,"linear mipmap linear":mh},$i),$a={none:0,browser:fc},Na={uint8:al,rgba4:ul,rgb565:Ks,"rgb5 a1":Zo},ia={alpha:Ja,luminance:yo,"luminance alpha":Fo,rgb:Do,rgba:Qa,rgba4:Da,"rgb5 a1":ys,rgb565:os},Ai={};kr.ext_srgb&&(ia.srgb=Nl,ia.srgba=cs),kr.oes_texture_float&&(Na.float32=Na.float=lo),kr.oes_texture_half_float&&(Na.float16=Na["half float"]=Ps),kr.webgl_depth_texture&&(c(ia,{depth:cl,"depth stencil":Qs}),c(Na,{uint16:Cl,uint32:Ru,"depth stencil":ss})),kr.webgl_compressed_texture_s3tc&&c(Ai,{"rgb s3tc dxt1":Lo,"rgba s3tc dxt1":As,"rgba s3tc dxt3":kl,"rgba s3tc dxt5":ql}),kr.webgl_compressed_texture_atc&&c(Ai,{"rgb atc":Jl,"rgba atc explicit alpha":Us,"rgba atc interpolated alpha":Pa}),kr.webgl_compressed_texture_pvrtc&&c(Ai,{"rgb pvrtc 4bppv1":fo,"rgb pvrtc 2bppv1":qs,"rgba pvrtc 4bppv1":Ql,"rgba pvrtc 2bppv1":Xo}),kr.webgl_compressed_texture_etc1&&(Ai["rgb etc1"]=Gl);var fn=Array.prototype.slice.call(_e.getParameter(En));Object.keys(Ai).forEach(function($){var ot=Ai[$];fn.indexOf(ot)>=0&&(ia[$]=ot)});var jn=Object.keys(ia);Ir.textureFormats=jn;var Bi=[];Object.keys(ia).forEach(function($){var ot=ia[$];Bi[ot]=$});var Ti=[];Object.keys(Na).forEach(function($){var ot=Na[$];Ti[ot]=$});var ei=[];Object.keys($i).forEach(function($){var ot=$i[$];ei[ot]=$});var Sa=[];Object.keys(ya).forEach(function($){var ot=ya[$];Sa[ot]=$});var ha=[];Object.keys(ta).forEach(function($){var ot=ta[$];ha[ot]=$});var Va=jn.reduce(function($,ot){var et=ia[ot];return et===yo||et===Ja||et===yo||et===Fo||et===cl||et===Qs||kr.ext_srgb&&(et===Nl||et===cs)?$[et]=et:et===ys||ot.indexOf("rgba")>=0?$[et]=Qa:$[et]=Do,$},{});function xi(){this.internalformat=Qa,this.format=Qa,this.type=al,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=fc,this.width=0,this.height=0,this.channels=0}function ri($,ot){$.internalformat=ot.internalformat,$.format=ot.format,$.type=ot.type,$.compressed=ot.compressed,$.premultiplyAlpha=ot.premultiplyAlpha,$.flipY=ot.flipY,$.unpackAlignment=ot.unpackAlignment,$.colorSpace=ot.colorSpace,$.width=ot.width,$.height=ot.height,$.channels=ot.channels}function Ea($,ot){if(!(typeof ot!="object"||!ot)){if("premultiplyAlpha"in ot&&($.premultiplyAlpha=ot.premultiplyAlpha),"flipY"in ot&&($.flipY=ot.flipY),"alignment"in ot&&($.unpackAlignment=ot.alignment),"colorSpace"in ot&&($.colorSpace=$a[ot.colorSpace]),"type"in ot){var et=ot.type;$.type=Na[et]}var xt=$.width,Vt=$.height,de=$.channels,ye=!1;"shape"in ot?(xt=ot.shape[0],Vt=ot.shape[1],ot.shape.length===3&&(de=ot.shape[2],ye=!0)):("radius"in ot&&(xt=Vt=ot.radius),"width"in ot&&(xt=ot.width),"height"in ot&&(Vt=ot.height),"channels"in ot&&(de=ot.channels,ye=!0)),$.width=xt|0,$.height=Vt|0,$.channels=de|0;var Yt=!1;if("format"in ot){var ce=ot.format,Se=$.internalformat=ia[ce];$.format=Va[Se],ce in Na&&("type"in ot||($.type=Na[ce])),ce in Ai&&($.compressed=!0),Yt=!0}!ye&&Yt?$.channels=rl[$.format]:ye&&!Yt&&$.channels!==sc[$.format]&&($.format=$.internalformat=sc[$.channels])}}function ma($){_e.pixelStorei(Nf,$.flipY),_e.pixelStorei(hc,$.premultiplyAlpha),_e.pixelStorei(oc,$.colorSpace),_e.pixelStorei(Bc,$.unpackAlignment)}function Ki(){xi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ji($,ot){var et=null;if(xf(ot)?et=ot:ot&&(Ea($,ot),"x"in ot&&($.xOffset=ot.x|0),"y"in ot&&($.yOffset=ot.y|0),xf(ot.data)&&(et=ot.data)),ot.copy){var xt=li.viewportWidth,Vt=li.viewportHeight;$.width=$.width||xt-$.xOffset,$.height=$.height||Vt-$.yOffset,$.needsCopy=!0}else if(!et)$.width=$.width||1,$.height=$.height||1,$.channels=$.channels||4;else if(Xr(et))$.channels=$.channels||4,$.data=et,!("type"in ot)&&$.type===al&&($.type=Hh(et));else if(lf(et))$.channels=$.channels||4,Uf($,et),$.alignment=1,$.needsFree=!0;else if(nn(et)){var de=et.data;!Array.isArray(de)&&$.type===al&&($.type=Hh(de));var ye=et.shape,Yt=et.stride,ce,Se,ir,Ye,tr,lr;ye.length===3?(ir=ye[2],lr=Yt[2]):(ir=1,lr=1),ce=ye[0],Se=ye[1],Ye=Yt[0],tr=Yt[1],$.alignment=1,$.width=ce,$.height=Se,$.channels=ir,$.format=$.internalformat=sc[ir],$.needsFree=!0,Gf($,de,Ye,tr,lr,et.offset)}else if(jf(et)||Vh(et)||yf(et))jf(et)||Vh(et)?$.element=et:$.element=et.canvas,$.width=$.element.width,$.height=$.element.height,$.channels=4;else if(lc(et))$.element=et,$.width=et.width,$.height=et.height,$.channels=4;else if(hd(et))$.element=et,$.width=et.naturalWidth,$.height=et.naturalHeight,$.channels=4;else if(Zf(et))$.element=et,$.width=et.videoWidth,$.height=et.videoHeight,$.channels=4;else if(sh(et)){var hr=$.width||et[0].length,Ve=$.height||et.length,Xe=$.channels;Pn(et[0][0])?Xe=Xe||et[0][0].length:Xe=Xe||1;for(var Ze=Gt.shape(et),Pr=1,sn=0;sn>=Vt,et.height>>=Vt,Ji(et,xt[Vt]),$.mipmask|=1<=0&&!("faces"in ot)&&($.genMipmaps=!0)}if("mag"in ot){var xt=ot.mag;$.magFilter=$i[xt]}var Vt=$.wrapS,de=$.wrapT;if("wrap"in ot){var ye=ot.wrap;typeof ye=="string"?Vt=de=ta[ye]:Array.isArray(ye)&&(Vt=ta[ye[0]],de=ta[ye[1]])}else{if("wrapS"in ot){var Yt=ot.wrapS;Vt=ta[Yt]}if("wrapT"in ot){var ce=ot.wrapT;de=ta[ce]}}if($.wrapS=Vt,$.wrapT=de,"anisotropic"in ot&&(ot.anisotropic,$.anisotropic=ot.anisotropic),"mipmap"in ot){var Se=!1;switch(typeof ot.mipmap){case"string":$.mipmapHint=ai[ot.mipmap],$.genMipmaps=!0,Se=!0;break;case"boolean":Se=$.genMipmaps=ot.mipmap;break;case"object":$.genMipmaps=!1,Se=!0;break}Se&&!("min"in ot)&&($.minFilter=tu)}}function pc($,ot){_e.texParameteri(ot,Gu,$.minFilter),_e.texParameteri(ot,Su,$.magFilter),_e.texParameteri(ot,Ms,$.wrapS),_e.texParameteri(ot,Is,$.wrapT),kr.ext_texture_filter_anisotropic&&_e.texParameteri(ot,Fl,$.anisotropic),$.genMipmaps&&(_e.hint(Jc,$.mipmapHint),_e.generateMipmap(ot))}var yc=0,xu={},pu=Ir.maxTextureUnits,Tu=Array(pu).map(function(){return null});function No($){xi.call(this),this.mipmask=0,this.internalformat=Qa,this.id=yc++,this.refCount=1,this.target=$,this.texture=_e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new dl,yn.profile&&(this.stats={size:0})}function Au($){_e.activeTexture(oh),_e.bindTexture($.target,$.texture)}function sl(){var $=Tu[0];$?_e.bindTexture($.target,$.texture):_e.bindTexture(Zn,null)}function Lu($){var ot=$.texture,et=$.unit,xt=$.target;et>=0&&(_e.activeTexture(oh+et),_e.bindTexture(xt,null),Tu[et]=null),_e.deleteTexture(ot),$.texture=null,$.params=null,$.pixels=null,$.refCount=0,delete xu[$.id],ti.textureCount--}c(No.prototype,{bind:function(){var $=this;$.bindCount+=1;var ot=$.unit;if(ot<0){for(var et=0;et0)continue;xt.unit=-1}Tu[et]=$,ot=et;break}yn.profile&&ti.maxTextureUnits>tr)-ir,lr.height=lr.height||(et.height>>tr)-Ye,Au(et),Io(lr,Zn,ir,Ye,tr),sl(),Fa(lr),xt}function de(ye,Yt){var ce=ye|0,Se=Yt|0||ce;if(ce===et.width&&Se===et.height)return xt;xt.width=et.width=ce,xt.height=et.height=Se,Au(et);for(var ir=0;et.mipmask>>ir;++ir){var Ye=ce>>ir,tr=Se>>ir;if(!Ye||!tr)break;_e.texImage2D(Zn,ir,et.format,Ye,tr,0,et.format,et.type,null)}return sl(),yn.profile&&(et.stats.size=Eh(et.internalformat,et.type,ce,Se,!1,!1)),xt}return xt($,ot),xt.subimage=Vt,xt.resize=de,xt._reglType="texture2d",xt._texture=et,yn.profile&&(xt.stats=et.stats),xt.destroy=function(){et.decRef()},xt}function Co($,ot,et,xt,Vt,de){var ye=new No(La);xu[ye.id]=ye,ti.cubeCount++;var Yt=new Array(6);function ce(Ye,tr,lr,hr,Ve,Xe){var Ze,Pr=ye.texInfo;for(dl.call(Pr),Ze=0;Ze<6;++Ze)Yt[Ze]=hs();if(typeof Ye=="number"||!Ye){var sn=Ye|0||1;for(Ze=0;Ze<6;++Ze)Eo(Yt[Ze],sn,sn)}else if(typeof Ye=="object")if(tr)es(Yt[0],Ye),es(Yt[1],tr),es(Yt[2],lr),es(Yt[3],hr),es(Yt[4],Ve),es(Yt[5],Xe);else if(Cu(Pr,Ye),Ea(ye,Ye),"faces"in Ye){var dn=Ye.faces;for(Ze=0;Ze<6;++Ze)ri(Yt[Ze],ye),es(Yt[Ze],dn[Ze])}else for(Ze=0;Ze<6;++Ze)es(Yt[Ze],Ye);for(ri(ye,Yt[0]),Pr.genMipmaps?ye.mipmask=(Yt[0].width<<1)-1:ye.mipmask=Yt[0].mipmask,ye.internalformat=Yt[0].internalformat,ce.width=Yt[0].width,ce.height=Yt[0].height,Au(ye),Ze=0;Ze<6;++Ze)Ul(Yt[Ze],Vi+Ze);for(pc(Pr,La),sl(),yn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,Pr.genMipmaps,!0)),ce.format=Bi[ye.internalformat],ce.type=Ti[ye.type],ce.mag=ei[Pr.magFilter],ce.min=Sa[Pr.minFilter],ce.wrapS=ha[Pr.wrapS],ce.wrapT=ha[Pr.wrapT],Ze=0;Ze<6;++Ze)ku(Yt[Ze]);return ce}function Se(Ye,tr,lr,hr,Ve){var Xe=lr|0,Ze=hr|0,Pr=Ve|0,sn=_a();return ri(sn,ye),sn.width=0,sn.height=0,Ji(sn,tr),sn.width=sn.width||(ye.width>>Pr)-Xe,sn.height=sn.height||(ye.height>>Pr)-Ze,Au(ye),Io(sn,Vi+Ye,Xe,Ze,Pr),sl(),Fa(sn),ce}function ir(Ye){var tr=Ye|0;if(tr!==ye.width){ce.width=ye.width=tr,ce.height=ye.height=tr,Au(ye);for(var lr=0;lr<6;++lr)for(var hr=0;ye.mipmask>>hr;++hr)_e.texImage2D(Vi+lr,hr,ye.format,tr>>hr,tr>>hr,0,ye.format,ye.type,null);return sl(),yn.profile&&(ye.stats.size=Eh(ye.internalformat,ye.type,ce.width,ce.height,!1,!0)),ce}}return ce($,ot,et,xt,Vt,de),ce.subimage=Se,ce.resize=ir,ce._reglType="textureCube",ce._texture=ye,yn.profile&&(ce.stats=ye.stats),ce.destroy=function(){ye.decRef()},ce}function Cs(){for(var $=0;$>xt,et.height>>xt,0,et.internalformat,et.type,null);else for(var Vt=0;Vt<6;++Vt)_e.texImage2D(Vi+Vt,xt,et.internalformat,et.width>>xt,et.height>>xt,0,et.internalformat,et.type,null);pc(et.texInfo,et.target)})}function yl(){for(var $=0;$=0?ku=!0:ta.indexOf(dl)>=0&&(ku=!1))),("depthTexture"in No||"depthStencilTexture"in No)&&(Tu=!!(No.depthTexture||No.depthStencilTexture)),"depth"in No&&(typeof No.depth=="boolean"?Ul=No.depth:(yc=No.depth,Al=!1)),"stencil"in No&&(typeof No.stencil=="boolean"?Al=No.stencil:(xu=No.stencil,Ul=!1)),"depthStencil"in No&&(typeof No.depthStencil=="boolean"?Ul=Al=No.depthStencil:(pu=No.depthStencil,Ul=!1,Al=!1))}var sl=null,Lu=null,xc=null,Co=null;if(Array.isArray(hs))sl=hs.map(Ai);else if(hs)sl=[Ai(hs)];else for(sl=new Array(pc),vo=0;vo0&&(Fa.depth=Ji[0].depth,Fa.stencil=Ji[0].stencil,Fa.depthStencil=Ji[0].depthStencil),Ji[_a]?Ji[_a](Fa):Ji[_a]=ri(Fa)}return c(ba,{width:vo,height:vo,color:dl})}function Io(wo){var _a,Fa=wo|0;if(Fa===ba.width)return ba;var vo=ba.color;for(_a=0;_a=vo.byteLength?Eo.subdata(vo):(Eo.destroy(),ri.buffers[wo]=null)),ri.buffers[wo]||(Eo=ri.buffers[wo]=li.create(_a,Pf,!1,!0)),Fa.buffer=li.getBuffer(Eo),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1,ba[wo]=1}else li.getBuffer(_a)?(Fa.buffer=li.getBuffer(_a),Fa.size=Fa.buffer.dimension|0,Fa.normalized=!1,Fa.type=Fa.buffer.dtype,Fa.offset=0,Fa.stride=0,Fa.divisor=0,Fa.state=1):li.getBuffer(_a.buffer)?(Fa.buffer=li.getBuffer(_a.buffer),Fa.size=(+_a.size||Fa.buffer.dimension)|0,Fa.normalized=!!_a.normalized||!1,"type"in _a?Fa.type=Hn[_a.type]:Fa.type=Fa.buffer.dtype,Fa.offset=(_a.offset||0)|0,Fa.stride=(_a.stride||0)|0,Fa.divisor=(_a.divisor||0)|0,Fa.state=1):"x"in _a&&(Fa.x=+_a.x||0,Fa.y=+_a.y||0,Fa.z=+_a.z||0,Fa.w=+_a.w||0,Fa.state=2)}for(var es=0;es1)for(var ma=0;mafn&&(fn=jn.stats.uniformsCount)}),fn},Ir.getMaxAttributesCount=function(){var fn=0;return ya.forEach(function(jn){jn.stats.attributesCount>fn&&(fn=jn.stats.attributesCount)}),fn});function Ai(){li={},ti={};for(var fn=0;fn>>4&15)+kr.charAt(Dn&15);return Ir}function Ph(_e){for(var kr="",Ir=-1,Dn,li;++Ir<_e.length;)Dn=_e.charCodeAt(Ir),li=Ir+1<_e.length?_e.charCodeAt(Ir+1):0,55296<=Dn&&Dn<=56319&&56320<=li&&li<=57343&&(Dn=65536+((Dn&1023)<<10)+(li&1023),Ir++),Dn<=127?kr+=String.fromCharCode(Dn):Dn<=2047?kr+=String.fromCharCode(192|Dn>>>6&31,128|Dn&63):Dn<=65535?kr+=String.fromCharCode(224|Dn>>>12&15,128|Dn>>>6&63,128|Dn&63):Dn<=2097151&&(kr+=String.fromCharCode(240|Dn>>>18&7,128|Dn>>>12&63,128|Dn>>>6&63,128|Dn&63));return kr}function xh(_e){for(var kr=Array(_e.length>>2),Ir=0;Ir>5]|=(_e.charCodeAt(Ir/8)&255)<<24-Ir%32;return kr}function Bu(_e){for(var kr="",Ir=0;Ir<_e.length*32;Ir+=8)kr+=String.fromCharCode(_e[Ir>>5]>>>24-Ir%32&255);return kr}function iu(_e,kr){return _e>>>kr|_e<<32-kr}function _h(_e,kr){return _e>>>kr}function df(_e,kr,Ir){return _e&kr^~_e&Ir}function bh(_e,kr,Ir){return _e&kr^_e&Ir^kr&Ir}function Wf(_e){return iu(_e,2)^iu(_e,13)^iu(_e,22)}function gr(_e){return iu(_e,6)^iu(_e,11)^iu(_e,25)}function Ur(_e){return iu(_e,7)^iu(_e,18)^_h(_e,3)}function wn(_e){return iu(_e,17)^iu(_e,19)^_h(_e,10)}var hn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function qn(_e,kr){var Ir=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Dn=new Array(64),li,ti,yn,ai,ta,$i,ya,$a,Na,ia,Ai,fn;for(_e[kr>>5]|=128<<24-kr%32,_e[(kr+64>>9<<4)+15]=kr,Na=0;Na<_e.length;Na+=16){for(li=Ir[0],ti=Ir[1],yn=Ir[2],ai=Ir[3],ta=Ir[4],$i=Ir[5],ya=Ir[6],$a=Ir[7],ia=0;ia<64;ia++)ia<16?Dn[ia]=_e[ia+Na]:Dn[ia]=di(di(di(wn(Dn[ia-2]),Dn[ia-7]),Ur(Dn[ia-15])),Dn[ia-16]),Ai=di(di(di(di($a,gr(ta)),df(ta,$i,ya)),hn[ia]),Dn[ia]),fn=di(Wf(li),bh(li,ti,yn)),$a=ya,ya=$i,$i=ta,ta=di(ai,Ai),ai=yn,yn=ti,ti=li,li=di(Ai,fn);Ir[0]=di(li,Ir[0]),Ir[1]=di(ti,Ir[1]),Ir[2]=di(yn,Ir[2]),Ir[3]=di(ai,Ir[3]),Ir[4]=di(ta,Ir[4]),Ir[5]=di($i,Ir[5]),Ir[6]=di(ya,Ir[6]),Ir[7]=di($a,Ir[7])}return Ir}function di(_e,kr){var Ir=(_e&65535)+(kr&65535),Dn=(_e>>16)+(kr>>16)+(Ir>>16);return Dn<<16|Ir&65535}function aa(_e){return Array.prototype.slice.call(_e)}function va(_e){return aa(_e).join("")}function Ba(_e){var kr=_e&&_e.cache,Ir=0,Dn=[],li=[],ti=[];function yn(Ai,fn){var jn=fn&&fn.stable;if(!jn){for(var Bi=0;Bi0&&(Ai.push(Ti,"="),Ai.push.apply(Ai,aa(arguments)),Ai.push(";")),Ti}return c(fn,{def:Bi,toString:function(){return va([jn.length>0?"var "+jn.join(",")+";":"",va(Ai)])}})}function ta(){var Ai=ai(),fn=ai(),jn=Ai.toString,Bi=fn.toString;function Ti(ei,Sa){fn(ei,Sa,"=",Ai.def(ei,Sa),";")}return c(function(){Ai.apply(Ai,aa(arguments))},{def:Ai.def,entry:Ai,exit:fn,save:Ti,set:function(ei,Sa,ha){Ti(ei,Sa),Ai(ei,Sa,"=",ha,";")},toString:function(){return jn()+Bi()}})}function $i(){var Ai=va(arguments),fn=ta(),jn=ta(),Bi=fn.toString,Ti=jn.toString;return c(fn,{then:function(){return fn.apply(fn,aa(arguments)),this},else:function(){return jn.apply(jn,aa(arguments)),this},toString:function(){var ei=Ti();return ei&&(ei="else{"+ei+"}"),va(["if(",Ai,"){",Bi(),"}",ei])}})}var ya=ai(),$a={};function Na(Ai,fn){var jn=[];function Bi(){var Va="a"+jn.length;return jn.push(Va),Va}fn=fn||0;for(var Ti=0;Ti":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},mi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ki={cw:ue,ccw:Me};function Pi(_e){return Array.isArray(_e)||Kr(_e)||rn(_e)}function Hi(_e){return _e.sort(function(kr,Lr){return kr===Zu?-1:Lr===Zu?1:kr=1,Dn>=2,kr)}else if(Lr===ls){var oi=_e.data;return new Yn(oi.thisDep,oi.contextDep,oi.propDep,kr)}else{if(Lr===ms)return new Yn(!1,!1,!1,kr);if(Lr===oo){for(var Jn=!1,mn=!1,ni=!1,Yi=0;Yi<_e.data.length;++Yi){var Ui=_e.data[Yi];if(Ui.type===no)ni=!0;else if(Ui.type===as)mn=!0;else if(Ui.type===Xo)Jn=!0;else if(Ui.type===Ji){Jn=!0;var ma=Ui.data;ma>=1&&(mn=!0),ma>=2&&(ni=!0)}else Ui.type===ls&&(Jn=Jn||Ui.data.thisDep,mn=mn||Ui.data.contextDep,ni=ni||Ui.data.propDep)}return new Yn(Jn,mn,ni,kr)}else return new Yn(Lr===Xo,Lr===as,Lr===no,kr)}}var zo=new Yn(!1,!1,!1,function(){});function Ro(_e,kr,Lr,Dn,oi,Jn,mn,ni,Yi,Ui,ma,Za,Ra,ta,bi,cn){var Nn=Ui.Record,Ii={add:32774,subtract:32778,"reverse subtract":32779};Lr.ext_blend_minmax&&(Ii.min=Le,Ii.max=Ne);var _i=Lr.angle_instanced_arrays,Qn=Lr.webgl_draw_buffers,Aa=Lr.oes_vertex_array_object,ua={dirty:!0,profile:cn.profile},ja={},gi=[],ti={},Ma={};function fa(Yt){return Yt.replace(".","_")}function Wi(Yt,ce,Se){var nr=fa(Yt);gi.push(Yt),ja[nr]=ua[nr]=!!Se,ti[nr]=ce}function $i(Yt,ce,Se){var nr=fa(Yt);gi.push(Yt),Array.isArray(Se)?(ua[nr]=Se.slice(),ja[nr]=Se.slice()):ua[nr]=ja[nr]=Se,Ma[nr]=ce}function xa(Yt){return!!isNaN(Yt)}Wi(qa,Nr),Wi(vs,Or),$i(rl,"blendColor",[0,0,0,0]),$i(Il,"blendEquationSeparate",[Xr,Xr]),$i(ou,"blendFuncSeparate",[en,Mr,en,Mr]),Wi(Wl,pn,!0),$i(su,"depthFunc",gn),$i(vl,"depthRange",[0,1]),$i(qu,"depthMask",!0),$i(Lu,Lu,[!0,!0,!0,!0]),Wi(fu,wr),$i(Oo,"cullFace",jt),$i(Es,Es,Me),$i(Yl,Yl,1),Wi(Rl,Bn),$i(yc,"polygonOffset",[0,0]),Wi(Hc,ri),Wi(zc,Di),$i(zh,"sampleCoverage",[1,!1]),Wi(Wc,tn),$i(Ih,"stencilMask",-1),$i(Iu,"stencilFunc",[sr,0,-1]),$i(Oh,"stencilOpSeparate",[At,ar,ar,ar]),$i(is,"stencilOpSeparate",[jt,ar,ar,ar]),Wi(Os,zn),$i(qc,"scissor",[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]),$i(Zu,Zu,[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]);var Io={gl:_e,context:Ra,strings:kr,next:ja,current:ua,draw:Za,elements:Jn,buffer:oi,shader:ma,attributes:Ui.state,vao:Ui,uniforms:Yi,framebuffer:ni,extensions:Lr,timer:ta,isBufferArgs:Pi},wo={primTypes:li,compareFuncs:Un,blendFuncs:Bi,blendEquations:Ii,stencilOps:mi,glTypes:Vn,orientationType:ki};Qn&&(wo.backBuffer=[jt],wo.drawBuffer=h(Dn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(ce){return On+ce})}));var va=0;function Ia(){var Yt=Da({cache:bi}),ce=Yt.link,Se=Yt.global;Yt.id=va++,Yt.batchId="0";var nr=ce(Io),Ye=Yt.shared={props:"a0"};Object.keys(Io).forEach(function(Xe){Ye[Xe]=Se.def(nr,".",Xe)});var tr=Yt.next={},lr=Yt.current={};Object.keys(Ma).forEach(function(Xe){Array.isArray(ua[Xe])&&(tr[Xe]=Se.def(Ye.next,".",Xe),lr[Xe]=Se.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Se.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,$e){switch($e.type){case Ji:var Cr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(ce($e.data),".call(",Cr.slice(0,Math.max($e.data.length+1,4)),")");case no:return Xe.def(Ye.props,$e.data);case as:return Xe.def(Ye.context,$e.data);case Xo:return Xe.def("this",$e.data);case ls:return $e.data.append(Yt,Xe),$e.data.ref;case ms:return $e.data.toString();case oo:return $e.data.map(function(on){return Yt.invoke(Xe,on)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var $e=kr.id(Xe);if($e in Ve)return Ve[$e];var Cr=Ui.scope[$e];Cr||(Cr=Ui.scope[$e]=new Nn);var on=Ve[$e]=ce(Cr);return on},Yt}function po(Yt){var ce=Yt.static,Se=Yt.dynamic,nr;if(Gf in ce){var Ye=!!ce[Gf];nr=Ha(function(lr,hr){return Ye}),nr.enable=Ye}else if(Gf in Se){var tr=Se[Gf];nr=io(tr,function(lr,hr){return lr.invoke(hr,tr)})}return nr}function Co(Yt,ce){var Se=Yt.static,nr=Yt.dynamic;if(qt in Se){var Ye=Se[qt];return Ye?(Ye=ni.getFramebuffer(Ye),Ha(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var $e=Xe.context;return hr.set($e,"."+Fr,Ve+".width"),hr.set($e,"."+ln,Ve+".height"),Ve})):Ha(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Fr,Xe+"."+xe),hr.set(Xe,"."+ln,Xe+"."+Ae),"null"})}else if(qt in nr){var tr=nr[qt];return io(tr,function(lr,hr){var Ve=lr.invoke(hr,tr),Xe=lr.shared,$e=Xe.framebuffer,Cr=hr.def($e,".getFramebuffer(",Ve,")");hr.set($e,".next",Cr);var on=Xe.context;return hr.set(on,"."+Fr,Cr+"?"+Cr+".width:"+on+"."+xe),hr.set(on,"."+ln,Cr+"?"+Cr+".height:"+on+"."+Ae),Cr})}else return null}function ns(Yt,ce,Se){var nr=Yt.static,Ye=Yt.dynamic;function tr(Ve){if(Ve in nr){var Xe=nr[Ve],$e=!0,Cr=Xe.x|0,on=Xe.y|0,hn,fi;return"width"in Xe?hn=Xe.width|0:$e=!1,"height"in Xe?fi=Xe.height|0:$e=!1,new Yn(!$e&&ce&&ce.thisDep,!$e&&ce&&ce.contextDep,!$e&&ce&&ce.propDep,function(Ai,di){var Ki=Ai.shared.context,Ti=hn;"width"in Xe||(Ti=di.def(Ki,".",Fr,"-",Cr));var Mi=fi;return"height"in Xe||(Mi=di.def(Ki,".",ln,"-",on)),[Cr,on,Ti,Mi]})}else if(Ve in Ye){var si=Ye[Ve],Gn=io(si,function(Ai,di){var Ki=Ai.invoke(di,si),Ti=Ai.shared.context,Mi=di.def(Ki,".x|0"),oa=di.def(Ki,".y|0"),Qa=di.def('"width" in ',Ki,"?",Ki,".width|0:","(",Ti,".",Fr,"-",Mi,")"),ho=di.def('"height" in ',Ki,"?",Ki,".height|0:","(",Ti,".",ln,"-",oa,")");return[Mi,oa,Qa,ho]});return ce&&(Gn.thisDep=Gn.thisDep||ce.thisDep,Gn.contextDep=Gn.contextDep||ce.contextDep,Gn.propDep=Gn.propDep||ce.propDep),Gn}else return ce?new Yn(ce.thisDep,ce.contextDep,ce.propDep,function(Ai,di){var Ki=Ai.shared.context;return[0,0,di.def(Ki,".",Fr),di.def(Ki,".",ln)]}):null}var lr=tr(Zu);if(lr){var hr=lr;lr=new Yn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var $e=hr.append(Ve,Xe),Cr=Ve.shared.context;return Xe.set(Cr,"."+Mn,$e[2]),Xe.set(Cr,"."+Xt,$e[3]),$e})}return{viewport:lr,scissor_box:tr(qc)}}function jl(Yt,ce){var Se=Yt.static,nr=typeof Se[ht]=="string"&&typeof Se[I]=="string";if(nr){if(Object.keys(ce.dynamic).length>0)return null;var Ye=ce.static,tr=Object.keys(Ye);if(tr.length>0&&typeof Ye[tr[0]]=="number"){for(var lr=[],hr=0;hr"+Mi+"?"+$e+".constant["+Mi+"]:0;"}).join(""),"}}else{","if(",hn,"(",$e,".buffer)){",Ai,"=",fi,".createStream(",Ie,",",$e,".buffer);","}else{",Ai,"=",fi,".getBuffer(",$e,".buffer);","}",di,'="type" in ',$e,"?",on.glTypes,"[",$e,".type]:",Ai,".dtype;",si.normalized,"=!!",$e,".normalized;");function Ki(Ti){Xe(si[Ti],"=",$e,".",Ti,"|0;")}return Ki("size"),Ki("offset"),Ki("stride"),Ki("divisor"),Xe("}}"),Xe.exit("if(",si.isStream,"){",fi,".destroyStream(",Ai,");","}"),si}Ye[tr]=io(lr,hr)}),Ye}function mc(Yt){var ce=Yt.static,Se=Yt.dynamic,nr={};return Object.keys(ce).forEach(function(Ye){var tr=ce[Ye];nr[Ye]=Ha(function(lr,hr){return typeof tr=="number"||typeof tr=="boolean"?""+tr:lr.link(tr)})}),Object.keys(Se).forEach(function(Ye){var tr=Se[Ye];nr[Ye]=io(tr,function(lr,hr){return lr.invoke(hr,tr)})}),nr}function xc(Yt,ce,Se,nr,Ye){Yt.static,Yt.dynamic;var tr=jl(Yt,ce),lr=Co(Yt),hr=ns(Yt,lr),Ve=hs(Yt),Xe=wu(Yt),$e=Al(Yt,Ye,tr);function Cr(Ai){var di=hr[Ai];di&&(Xe[Ai]=di)}Cr(Zu),Cr(fa(qc));var on=Object.keys(Xe).length>0,hn={framebuffer:lr,draw:Ve,shader:$e,state:Xe,dirty:on,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(hn.profile=po(Yt),hn.uniforms=pl(Se),hn.drawVAO=hn.scopeVAO=Ve.vao,!hn.drawVAO&&$e.program&&!tr&&Lr.angle_instanced_arrays&&Ve.static.elements){var fi=!0,si=$e.program.attributes.map(function(Ai){var di=ce.static[Ai];return fi=fi&&!!di,di});if(fi&&si.length>0){var Gn=Ui.getVAO(Ui.createVAO({attributes:si,elements:Ve.static.elements}));hn.drawVAO=new Yn(null,null,null,function(Ai,di){return Ai.link(Gn)}),hn.useVAO=!0}}return tr?hn.useVAO=!0:hn.attributes=Eu(ce),hn.context=mc(nr),hn}function yu(Yt,ce,Se){var nr=Yt.shared,Ye=nr.context,tr=Yt.scope();Object.keys(Se).forEach(function(lr){ce.save(Ye,"."+lr);var hr=Se[lr],Ve=hr.append(Yt,ce);Array.isArray(Ve)?tr(Ye,".",lr,"=[",Ve.join(),"];"):tr(Ye,".",lr,"=",Ve,";")}),ce(tr)}function pu(Yt,ce,Se,nr){var Ye=Yt.shared,tr=Ye.gl,lr=Ye.framebuffer,hr;Qn&&(hr=ce.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,$e=Ve.backBuffer,Cr;Se?Cr=Se.append(Yt,ce):Cr=ce.def(lr,".next"),nr||ce("if(",Cr,"!==",lr,".cur){"),ce("if(",Cr,"){",tr,".bindFramebuffer(",In,",",Cr,".framebuffer);"),Qn&&ce(hr,".drawBuffersWEBGL(",Xe,"[",Cr,".colorAttachments.length]);"),ce("}else{",tr,".bindFramebuffer(",In,",null);"),Qn&&ce(hr,".drawBuffersWEBGL(",$e,");"),ce("}",lr,".cur=",Cr,";"),nr||ce("}")}function ku(Yt,ce,Se){var nr=Yt.shared,Ye=nr.gl,tr=Yt.current,lr=Yt.next,hr=nr.current,Ve=nr.next,Xe=Yt.cond(hr,".dirty");gi.forEach(function($e){var Cr=fa($e);if(!(Cr in Se.state)){var on,hn;if(Cr in lr){on=lr[Cr],hn=tr[Cr];var fi=h(ua[Cr].length,function(Gn){return Xe.def(on,"[",Gn,"]")});Xe(Yt.cond(fi.map(function(Gn,Ai){return Gn+"!=="+hn+"["+Ai+"]"}).join("||")).then(Ye,".",Ma[Cr],"(",fi,");",fi.map(function(Gn,Ai){return hn+"["+Ai+"]="+Gn}).join(";"),";"))}else{on=Xe.def(Ve,".",Cr);var si=Yt.cond(on,"!==",hr,".",Cr);Xe(si),Cr in ti?si(Yt.cond(on).then(Ye,".enable(",ti[Cr],");").else(Ye,".disable(",ti[Cr],");"),hr,".",Cr,"=",on,";"):si(Ye,".",Ma[Cr],"(",on,");",hr,".",Cr,"=",on,";")}}}),Object.keys(Se.state).length===0&&Xe(hr,".dirty=false;"),ce(Xe)}function No(Yt,ce,Se,nr){var Ye=Yt.shared,tr=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Hi(Object.keys(Se)).forEach(function(Xe){var $e=Se[Xe];if(!(nr&&!nr($e))){var Cr=$e.append(Yt,ce);if(ti[Xe]){var on=ti[Xe];Na($e)?(Ve=Yt.link(Cr,{stable:!0}),ce(Yt.cond(Ve).then(hr,".enable(",on,");").else(hr,".disable(",on,");")),ce(lr,".",Xe,"=",Ve,";")):(ce(Yt.cond(Cr).then(hr,".enable(",on,");").else(hr,".disable(",on,");")),ce(lr,".",Xe,"=",Cr,";"))}else if(Pn(Cr)){var hn=tr[Xe];ce(hr,".",Ma[Xe],"(",Cr,");",Cr.map(function(fi,si){return hn+"["+si+"]="+fi}).join(";"),";")}else Na($e)?(Ve=Yt.link(Cr,{stable:!0}),ce(hr,".",Ma[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):ce(hr,".",Ma[Xe],"(",Cr,");",lr,".",Xe,"=",Cr,";")}})}function Tu(Yt,ce){_i&&(Yt.instancing=ce.def(Yt.shared.extensions,".angle_instanced_arrays"))}function ll(Yt,ce,Se,nr,Ye){var tr=Yt.shared,lr=Yt.stats,hr=tr.current,Ve=tr.timer,Xe=Se.profile;function $e(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Cr,on;function hn(Ki){Cr=ce.def(),Ki(Cr,"=",$e(),";"),typeof Ye=="string"?Ki(lr,".count+=",Ye,";"):Ki(lr,".count++;"),ta&&(nr?(on=ce.def(),Ki(on,"=",Ve,".getNumPendingQueries();")):Ki(Ve,".beginQuery(",lr,");"))}function fi(Ki){Ki(lr,".cpuTime+=",$e(),"-",Cr,";"),ta&&(nr?Ki(Ve,".pushScopeStats(",on,",",Ve,".getNumPendingQueries(),",lr,");"):Ki(Ve,".endQuery();"))}function si(Ki){var Ti=ce.def(hr,".profile");ce(hr,".profile=",Ki,";"),ce.exit(hr,".profile=",Ti,";")}var Gn;if(Xe){if(Na(Xe)){Xe.enable?(hn(ce),fi(ce.exit),si("true")):si("false");return}Gn=Xe.append(Yt,ce),si(Gn)}else Gn=ce.def(hr,".profile");var Ai=Yt.block();hn(Ai),ce("if(",Gn,"){",Ai,"}");var di=Yt.block();fi(di),ce.exit("if(",Gn,"){",di,"}")}function Cu(Yt,ce,Se,nr,Ye){var tr=Yt.shared;function lr(Ve){switch(Ve){case ca:case Eo:case Fs:return 2;case wa:case ds:case wl:return 3;case so:case dl:case Su:return 4;default:return 1}}function hr(Ve,Xe,$e){var Cr=tr.gl,on=ce.def(Ve,".location"),hn=ce.def(tr.attributes,"[",on,"]"),fi=$e.state,si=$e.buffer,Gn=[$e.x,$e.y,$e.z,$e.w],Ai=["buffer","normalized","offset","stride"];function di(){ce("if(!",hn,".buffer){",Cr,".enableVertexAttribArray(",on,");}");var Ti=$e.type,Mi;if($e.size?Mi=ce.def($e.size,"||",Xe):Mi=Xe,ce("if(",hn,".type!==",Ti,"||",hn,".size!==",Mi,"||",Ai.map(function(Qa){return hn+"."+Qa+"!=="+$e[Qa]}).join("||"),"){",Cr,".bindBuffer(",Ie,",",si,".buffer);",Cr,".vertexAttribPointer(",[on,Mi,Ti,$e.normalized,$e.stride,$e.offset],");",hn,".type=",Ti,";",hn,".size=",Mi,";",Ai.map(function(Qa){return hn+"."+Qa+"="+$e[Qa]+";"}).join(""),"}"),_i){var oa=$e.divisor;ce("if(",hn,".divisor!==",oa,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[on,oa],");",hn,".divisor=",oa,";}")}}function Ki(){ce("if(",hn,".buffer){",Cr,".disableVertexAttribArray(",on,");",hn,".buffer=null;","}if(",$a.map(function(Ti,Mi){return hn+"."+Ti+"!=="+Gn[Mi]}).join("||"),"){",Cr,".vertexAttrib4f(",on,",",Gn,");",$a.map(function(Ti,Mi){return hn+"."+Ti+"="+Gn[Mi]+";"}).join(""),"}")}fi===Pa?di():fi===ba?Ki():(ce("if(",fi,"===",Pa,"){"),di(),ce("}else{"),Ki(),ce("}"))}nr.forEach(function(Ve){var Xe=Ve.name,$e=Se.attributes[Xe],Cr;if($e){if(!Ye($e))return;Cr=$e.append(Yt,ce)}else{if(!Ye(zo))return;var on=Yt.scopeAttrib(Xe);Cr={},Object.keys(new Nn).forEach(function(hn){Cr[hn]=ce.def(on,".",hn)})}hr(Yt.link(Ve),lr(Ve.info.type),Cr)})}function _c(Yt,ce,Se,nr,Ye,tr){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var qo=[],_s=[],Ol=0;Ol>1)",si],");")}function oa(){Se(Gn,".drawArraysInstancedANGLE(",[on,hn,fi,si],");")}$e&&$e!=="null"?di?Mi():(Se("if(",$e,"){"),Mi(),Se("}else{"),oa(),Se("}")):oa()}function Ti(){function Mi(){Se(tr+".drawElements("+[on,fi,Ai,hn+"<<(("+Ai+"-"+la+")>>1)"]+");")}function oa(){Se(tr+".drawArrays("+[on,hn,fi]+");")}$e&&$e!=="null"?di?Mi():(Se("if(",$e,"){"),Mi(),Se("}else{"),oa(),Se("}")):oa()}_i&&(typeof si!="number"||si>=0)?typeof si=="string"?(Se("if(",si,">0){"),Ki(),Se("}else if(",si,"<0){"),Ti(),Se("}")):Ki():Ti()}function Cs(Yt,ce,Se,nr,Ye){var tr=Ia(),lr=tr.proc("body",Ye);return _i&&(tr.instancing=lr.def(tr.shared.extensions,".angle_instanced_arrays")),Yt(tr,lr,Se,nr),tr.compile().body}function Ml(Yt,ce,Se,nr){Tu(Yt,ce),Se.useVAO?Se.drawVAO?ce(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,ce),");"):ce(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(ce(Yt.shared.vao,".setVAO(null);"),Cu(Yt,ce,Se,nr.attributes,function(){return!0})),_c(Yt,ce,Se,nr.uniforms,function(){return!0},!1),Lo(Yt,ce,ce,Se)}function xl(Yt,ce){var Se=Yt.proc("draw",1);Tu(Yt,Se),yu(Yt,Se,ce.context),pu(Yt,Se,ce.framebuffer),ku(Yt,Se,ce),No(Yt,Se,ce.state),ll(Yt,Se,ce,!1,!0);var nr=ce.shader.progVar.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",nr,".program);"),ce.shader.program)Ml(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),tr=Se.def(nr,".id"),lr=Se.def(Ye,"[",tr,"]");Se(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",tr,"]=",Yt.link(function(hr){return Cs(Ml,Yt,ce,hr,1)}),"(",nr,");",lr,".call(this,a0);"))}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function Z(Yt,ce,Se,nr){Yt.batchId="a1",Tu(Yt,ce);function Ye(){return!0}Cu(Yt,ce,Se,nr.attributes,Ye),_c(Yt,ce,Se,nr.uniforms,Ye,!1),Lo(Yt,ce,ce,Se)}function ot(Yt,ce,Se,nr){Tu(Yt,ce);var Ye=Se.contextDep,tr=ce.def(),lr="a0",hr="a1",Ve=ce.def();Yt.shared.props=Ve,Yt.batchId=tr;var Xe=Yt.scope(),$e=Yt.scope();ce(Xe.entry,"for(",tr,"=0;",tr,"<",hr,";++",tr,"){",Ve,"=",lr,"[",tr,"];",$e,"}",Xe.exit);function Cr(Ai){return Ai.contextDep&&Ye||Ai.propDep}function on(Ai){return!Cr(Ai)}if(Se.needsContext&&yu(Yt,$e,Se.context),Se.needsFramebuffer&&pu(Yt,$e,Se.framebuffer),No(Yt,$e,Se.state,Cr),Se.profile&&Cr(Se.profile)&&ll(Yt,$e,Se,!1,!0),nr)Se.useVAO?Se.drawVAO?Cr(Se.drawVAO)?$e(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,$e),");"):Xe(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Cu(Yt,Xe,Se,nr.attributes,on),Cu(Yt,$e,Se,nr.attributes,Cr)),_c(Yt,Xe,Se,nr.uniforms,on,!1),_c(Yt,$e,Se,nr.uniforms,Cr,!0),Lo(Yt,Xe,$e,Se);else{var hn=Yt.global.def("{}"),fi=Se.shader.progVar.append(Yt,$e),si=$e.def(fi,".id"),Gn=$e.def(hn,"[",si,"]");$e(Yt.shared.gl,".useProgram(",fi,".program);","if(!",Gn,"){",Gn,"=",hn,"[",si,"]=",Yt.link(function(Ai){return Cs(Z,Yt,Se,Ai,2)}),"(",fi,");}",Gn,".call(this,a0[",tr,"],",tr,");")}}function et(Yt,ce){var Se=Yt.proc("batch",2);Yt.batchId="0",Tu(Yt,Se);var nr=!1,Ye=!0;Object.keys(ce.context).forEach(function(hn){nr=nr||ce.context[hn].propDep}),nr||(yu(Yt,Se,ce.context),Ye=!1);var tr=ce.framebuffer,lr=!1;tr?(tr.propDep?nr=lr=!0:tr.contextDep&&nr&&(lr=!0),lr||pu(Yt,Se,tr)):pu(Yt,Se,null),ce.state.viewport&&ce.state.viewport.propDep&&(nr=!0);function hr(hn){return hn.contextDep&&nr||hn.propDep}ku(Yt,Se,ce),No(Yt,Se,ce.state,function(hn){return!hr(hn)}),(!ce.profile||!hr(ce.profile))&&ll(Yt,Se,ce,!1,"a1"),ce.contextDep=nr,ce.needsContext=Ye,ce.needsFramebuffer=lr;var Ve=ce.shader.progVar;if(Ve.contextDep&&nr||Ve.propDep)ot(Yt,Se,ce,null);else{var Xe=Ve.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",Xe,".program);"),ce.shader.program)ot(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var $e=Yt.global.def("{}"),Cr=Se.def(Xe,".id"),on=Se.def($e,"[",Cr,"]");Se(Yt.cond(on).then(on,".call(this,a0,a1);").else(on,"=",$e,"[",Cr,"]=",Yt.link(function(hn){return Cs(ot,Yt,ce,hn,2)}),"(",Xe,");",on,".call(this,a0,a1);"))}}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function xt(Yt,ce){var Se=Yt.proc("scope",3);Yt.batchId="a2";var nr=Yt.shared,Ye=nr.current;if(yu(Yt,Se,ce.context),ce.framebuffer&&ce.framebuffer.append(Yt,Se),Hi(Object.keys(ce.state)).forEach(function(hr){var Ve=ce.state[hr],Xe=Ve.append(Yt,Se);Pn(Xe)?Xe.forEach(function($e,Cr){xa($e)?Se.set(Yt.next[hr],"["+Cr+"]",$e):Se.set(Yt.next[hr],"["+Cr+"]",Yt.link($e,{stable:!0}))}):Na(Ve)?Se.set(nr.next,"."+hr,Yt.link(Xe,{stable:!0})):Se.set(nr.next,"."+hr,Xe)}),ll(Yt,Se,ce,!0,!0),[Et,ke,Vt,De,It].forEach(function(hr){var Ve=ce.draw[hr];if(Ve){var Xe=Ve.append(Yt,Se);xa(Xe)?Se.set(nr.draw,"."+hr,Xe):Se.set(nr.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(ce.uniforms).forEach(function(hr){var Ve=ce.uniforms[hr].append(Yt,Se);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return xa(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Se.set(nr.uniforms,"["+Yt.link(kr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(ce.attributes).forEach(function(hr){var Ve=ce.attributes[hr].append(Yt,Se),Xe=Yt.scopeAttrib(hr);Object.keys(new Nn).forEach(function($e){Se.set(Xe,"."+$e,Ve[$e])})}),ce.scopeVAO){var tr=ce.scopeVAO.append(Yt,Se);xa(tr)?Se.set(nr.vao,".targetVAO",tr):Se.set(nr.vao,".targetVAO",Yt.link(tr,{stable:!0}))}function lr(hr){var Ve=ce.shader[hr];if(Ve){var Xe=Ve.append(Yt,Se);xa(Xe)?Se.set(nr.shader,"."+hr,Xe):Se.set(nr.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(I),lr(ht),Object.keys(ce.state).length>0&&(Se(Ye,".dirty=true;"),Se.exit(Ye,".dirty=true;")),Se("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Ut(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var ce=Object.keys(Yt),Se=0;Se=0;--Lo){var Cs=xa[Lo];Cs&&Cs(ta,null,0)}Lr.flush(),Ui&&Ui.update()}function Co(){!Ia&&xa.length>0&&(Ia=x.next(po))}function ns(){Ia&&(x.cancel(po),Ia=null)}function jl(Lo){Lo.preventDefault(),ns(),Io.forEach(function(Cs){Cs()})}function Al(Lo){Lr.getError(),oi.restore(),ua.restore(),Ii.restore(),ja.restore(),gi.restore(),ti.restore(),Qn.restore(),Ui&&Ui.restore(),Ma.procs.refresh(),Co(),wo.forEach(function(Cs){Cs()})}$i&&($i.addEventListener(il,jl,!1),$i.addEventListener(lu,Al,!1));function hs(){xa.length=0,ns(),$i&&($i.removeEventListener(il,jl),$i.removeEventListener(lu,Al)),ua.clear(),ti.clear(),gi.clear(),Qn.clear(),ja.clear(),_i.clear(),Ii.clear(),Ui&&Ui.clear(),va.forEach(function(Lo){Lo()})}function wu(Lo){function Cs(Ye){var tr=c({},Ye);delete tr.uniforms,delete tr.attributes,delete tr.context,delete tr.vao,"stencil"in tr&&tr.stencil.op&&(tr.stencil.opBack=tr.stencil.opFront=tr.stencil.op,delete tr.stencil.op);function lr(hr){if(hr in tr){var Ve=tr[hr];delete tr[hr],Object.keys(Ve).forEach(function(Xe){tr[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(tr.vao=Ye.vao),tr}function Ml(Ye,tr){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(tr&&Array.isArray(Xe)){for(var $e=0;$e0)return ye.call(this,Se(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return ye.call(this,Ye,Ye.length)}else return fe.call(this,Ye)}return c(nr,{stats:xt,destroy:function(){Ut.destroy()}})}var pl=ti.setFBO=wu({framebuffer:f.define.call(null,Kl,"framebuffer")});function Eu(Lo,Cs){var Ml=0;Ma.procs.poll();var xl=Cs.color;xl&&(Lr.clearColor(+xl[0]||0,+xl[1]||0,+xl[2]||0,+xl[3]||0),Ml|=Ku),"depth"in Cs&&(Lr.clearDepth(+Cs.depth),Ml|=du),"stencil"in Cs&&(Lr.clearStencil(Cs.stencil|0),Ml|=_o),Lr.clear(Ml)}function mc(Lo){if("framebuffer"in Lo)if(Lo.framebuffer&&Lo.framebuffer_reglType==="framebufferCube")for(var Cs=0;Cs<6;++Cs)pl(c({framebuffer:Lo.framebuffer.faces[Cs]},Lo),Eu);else pl(Lo,Eu);else Eu(null,Lo)}function xc(Lo){xa.push(Lo);function Cs(){var Ml=eu(xa,Lo);function xl(){var Z=eu(xa,xl);xa[Z]=xa[xa.length-1],xa.length-=1,xa.length<=0&&ns()}xa[Ml]=xl}return Co(),{cancel:Cs}}function yu(){var Lo=Wi.viewport,Cs=Wi.scissor_box;Lo[0]=Lo[1]=Cs[0]=Cs[1]=0,ta.viewportWidth=ta.framebufferWidth=ta.drawingBufferWidth=Lo[2]=Cs[2]=Lr.drawingBufferWidth,ta.viewportHeight=ta.framebufferHeight=ta.drawingBufferHeight=Lo[3]=Cs[3]=Lr.drawingBufferHeight}function pu(){ta.tick+=1,ta.time=No(),yu(),Ma.procs.poll()}function ku(){ja.refresh(),yu(),Ma.procs.refresh(),Ui&&Ui.update()}function No(){return(y()-ma)/1e3}ku();function Tu(Lo,Cs){var Ml;switch(Lo){case"frame":return xc(Cs);case"lost":Ml=Io;break;case"restore":Ml=wo;break;case"destroy":Ml=va;break}return Ml.push(Cs),{cancel:function(){for(var xl=0;xl=0},read:fa,destroy:hs,_gl:Lr,_refresh:ku,poll:function(){pu(),Ui&&Ui.update()},now:No,stats:mn,getCachedCode:ll,preloadCachedCode:Cu});return kr.onDone(null,_c),_c}return wh})}),uT=Ft((Q,$)=>{var c=sS(),g=gH();$.exports=function(P,S,t){var e=P._fullLayout,r=!0;return e._glcanvas.each(function(a){if(a.regl){a.regl.preloadCachedCode(t);return}if(!(a.pick&&!e._has("parcoords"))){try{a.regl=g({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:P._context.plotGlPixelRatio||window.devicePixelRatio,extensions:S||[],cachedCode:t||{}})}catch{r=!1}a.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(n){P&&P.emit&&P.emit("plotly_webglcontextlost",{event:n,layer:a.key})},!1)}}),r||c({container:e._glcontainer.node()}),r}}),XS=Ft((f,$)=>{var c=CS(),g=US(),P=QV(),S=mH(),t=_n(),e=x0().selectMode,r=uT(),a=Mc(),n=Ba(),o=MS().styleTextSelection,i={};function s(x,y,v,T){var u=x._size,b=x.width*T,_=x.height*T,C=u.l*T,M=u.b*T,E=u.r*T,A=u.t*T,h=u.w*T,p=u.h*T;return[C+y.domain[0]*h,M+v.domain[0]*p,b-E-(1-y.domain[1])*h,_-A-(1-v.domain[1])*p]}var f=$.exports=function(x,y,v){if(v.length){var T=x._fullLayout,u=y._scene,b=y.xaxis,_=y.yaxis,C,M;if(u){var E=r(x,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!E){u.init();return}var A=u.count,h=T._glcanvas.data()[0].regl;if(n(x,y,v),u.dirty){if((u.line2d||u.error2d)&&!(u.scatter2d||u.fill2d||u.glText)&&h.clear({color:!0,depth:!0}),u.error2d===!0&&(u.error2d=P(h)),u.line2d===!0&&(u.line2d=g(h)),u.scatter2d===!0&&(u.scatter2d=c(h)),u.fill2d===!0&&(u.fill2d=g(h)),u.glText===!0)for(u.glText=new Array(A),C=0;Cu.glText.length){var p=A-u.glText.length;for(C=0;Cft&&(isNaN(Y[ut])||isNaN(Y[ut+1]));)ut-=2;it.positions=Y.slice(ft,ut+2)}return it}),u.line2d.update(u.lineOptions)),u.error2d){var R=(u.errorXOptions||[]).concat(u.errorYOptions||[]);u.error2d.update(R)}u.scatter2d&&u.scatter2d.update(u.markerOptions),u.fillOrder=t.repeat(null,A),u.fill2d&&(u.fillOptions=u.fillOptions.map(function(it,Y){var ft=v[Y];if(!(!it||!ft||!ft[0]||!ft[0].trace)){var ut=ft[0],wt=ut.trace,zt=ut.t,Pt=u.lineOptions[Y],Wt,Ht,Jt=[];wt._ownfill&&Jt.push(Y),wt._nexttrace&&Jt.push(Y+1),Jt.length&&(u.fillOrder[Y]=Jt);var ge=[],he=Pt&&Pt.positions||zt.positions,de,se;if(wt.fill==="tozeroy"){for(de=0;dede&&isNaN(he[se+1]);)se-=2;he[de+1]!==0&&(ge=[he[de],0]),ge=ge.concat(he.slice(de,se+2)),he[se+1]!==0&&(ge=ge.concat([he[se],0]))}else if(wt.fill==="tozerox"){for(de=0;dede&&isNaN(he[se]);)se-=2;he[de]!==0&&(ge=[0,he[de+1]]),ge=ge.concat(he.slice(de,se+2)),he[se]!==0&&(ge=ge.concat([0,he[se+1]]))}else if(wt.fill==="toself"||wt.fill==="tonext"){for(ge=[],Wt=0,it.splitNull=!0,Ht=0;Ht-1;for(C=0;C{var c=XU();c.plot=XS(),$.exports=c}),yH=Ft((Q,$)=>{$.exports=vH()}),JS=Ft((Q,$)=>{var c=tf(),g=Ac(),P=dh().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=$u(),e=b3(),r=ac().idRegex,a=mu().templatedArray,n=ya().extendFlat,o=c.marker,i=o.line,s=n(g("marker.line",{editTypeOverride:"calc"}),{width:n({},i.width,{editType:"calc"}),editType:"calc"}),f=n(g("marker"),{symbol:o.symbol,angle:o.angle,size:n({},o.size,{editType:"markerSize"}),sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,opacity:o.opacity,colorbar:o.colorbar,line:s,editType:"calc"});f.color.editType=f.cmin.editType=f.cmax.editType="style";function x(y){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:r[y],editType:"plot"}}}$.exports={dimensions:a("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:n({},e.text,{}),hovertext:n({},e.hovertext,{}),hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:P("x"),yhoverformat:P("y"),marker:f,xaxes:x("x"),yaxes:x("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:e.selected.marker,editType:"calc"},unselected:{marker:e.unselected.marker,editType:"calc"},opacity:e.opacity}}),cT=Ft((Q,$)=>{$.exports=function(c,g,P,S){S||(S=1/0);var t,e;for(t=0;t{var c=_n(),g=Ld(),P=JS(),S=Mc(),t=c0(),e=cT(),r=nT().isOpenSymbol;$.exports=function(o,i,s,f){function x(M,E){return c.coerce(o,i,P,M,E)}var y=g(o,i,{name:"dimensions",handleItemDefaults:a}),v=x("diagonal.visible"),T=x("showupperhalf"),u=x("showlowerhalf"),b=e(i,y,"values");if(!b||!v&&!T&&!u){i.visible=!1;return}x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("xhoverformat"),x("yhoverformat"),t(o,i,s,f,x,{noAngleRef:!0,noStandOff:!0});var _=r(i.marker.symbol),C=S.isBubble(i);x("marker.line.width",_||C?1:0),n(o,i,f,x),c.coerceSelectionMarkerOpacity(i,x)};function a(o,i){function s(x,y){return c.coerce(o,i,P.dimensions,x,y)}s("label");var f=s("values");f&&f.length?s("visible"):i.visible=!1,s("axis.type"),s("axis.matches")}function n(o,i,s,f){var x=i.dimensions,y=x.length,v=i.showupperhalf,T=i.showlowerhalf,u=i.diagonal.visible,b,_,C=new Array(y),M=new Array(y);for(b=0;b_&&v||b<_&&T||b===_&&(u||!T||!v))&&(s._splomSubplots[q]=1)}(!T||!u&&v&&T)&&(s._splomGridDflt.xside="bottom",s._splomGridDflt.yside="left")}}),_H=Ft((Q,$)=>{var c=_n();$.exports=function(g,P){var S=g._fullLayout,t=P.uid,e=S._splomScenes;e||(e=S._splomScenes={});var r={dirty:!0,selectBatch:[],unselectBatch:[]},a={matrix:!1,selectBatch:[],unselectBatch:[]},n=e[P.uid];return n||(n=e[t]=c.extendFlat({},r,a),n.draw=function(){n.matrix&&n.matrix.draw&&(n.selectBatch.length||n.unselectBatch.length?n.matrix.draw(n.unselectBatch,n.selectBatch):n.matrix.draw()),n.dirty=!1},n.destroy=function(){n.matrix&&n.matrix.destroy&&n.matrix.destroy(),n.matrixOptions=null,n.selectBatch=null,n.unselectBatch=null,n=null}),n.dirty||c.extendFlat(n,r),n}}),bH=Ft((Q,$)=>{var c=_n(),g=Rc(),P=me().calcMarkerSize,S=me().calcAxisExpansion,t=N0(),e=xx().markerSelection,r=xx().markerStyle,a=_H(),n=Ua().BADNUM,o=q1().TOO_MANY_POINTS;$.exports=function(i,s){var f=s.dimensions,x=s._length,y={},v=y.cdata=[],T=y.data=[],u=s._visibleDims=[],b,_,C,M,E;function A(R,O){for(var N=R.makeCalcdata({v:O.values,vcalendar:s.calendar},"v"),V=0;Vo,k;for(p?k=y.sizeAvg||Math.max(y.size,3):k=P(s,x),_=0;_{(function(){var c,g,P,S,t,e;typeof performance<"u"&&performance!==null&&performance.now?$.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?($.exports=function(){return(c()-t)/1e6},g=process.hrtime,c=function(){var r;return r=g(),r[0]*1e9+r[1]},S=c(),e=process.uptime()*1e9,t=S-e):Date.now?($.exports=function(){return Date.now()-P},P=Date.now()):($.exports=function(){return new Date().getTime()-P},P=new Date().getTime())}).call(Q)}),kH=Ft((Q,$)=>{var c=wH(),g=window,P=["moz","webkit"],S="AnimationFrame",t=g["request"+S],e=g["cancel"+S]||g["cancelRequest"+S];for(r=0;!t&&r{$.exports=function(c,g){var P=typeof c=="number",S=typeof g=="number";P&&!S?(g=c,c=0):!P&&!S&&(c=0,g=0),c=c|0,g=g|0;var t=g-c;if(t<0)throw new Error("array length must be positive");for(var e=new Array(t),r=0,a=c;r{var c=CS(),g=zg(),P=vx(),S=kH(),t=TH(),e=xb(),r=yx();$.exports=a;function a(s,f){if(!(this instanceof a))return new a(s);this.traces=[],this.passes={},this.regl=s,this.scatter=c(s),this.canvas=this.scatter.canvas}a.prototype.render=function(...s){return s.length&&this.update(...s),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=S(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,S(()=>{this.dirty=!1})),this)},a.prototype.update=function(...s){if(!s.length)return;for(let y=0;yw||!v.lower&&k{f[T+b]=y})}this.scatter.draw(...f)}return this},a.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function n(s,f,x){let y=s.id!=null?s.id:s,v=f,T=x;return y<<16|(v&255)<<8|T&255}function o(s,f,x){let y,v,T,u,b=s[f],_=s[x];return b.length>2?(b[0],b[2],y=b[1],v=b[3]):b.length?(y=b[0],v=b[1]):(b.x,y=b.y,b.x+b.width,v=b.y+b.height),_.length>2?(T=_[0],u=_[2],_[1],_[3]):_.length?(T=_[0],u=_[1]):(T=_.x,_.y,u=_.x+_.width,_.y+_.height),[T,y,u,v]}function i(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let f=e(s);return[f.x,f.y,f.x+f.width,f.y+f.height]}}}),MH=Ft((Q,$)=>{var c=AH(),g=_n(),P=Rc(),S=x0().selectMode;$.exports=function(e,r,a){if(a.length)for(var n=0;n-1,H=S(v)||!!o.selectedpoints||V,F=!0;if(H){var U=o._length;if(o.selectedpoints){s.selectBatch=o.selectedpoints;var W=o.selectedpoints,q={};for(b=0;b{Q.getDimIndex=function($,c){for(var g=c._id,P=g.charAt(0),S={x:0,y:1}[P],t=$._visibleDims,e=0;e{var c=QS(),g=rT().calcHover,P=Ls().getFromId,S=ya().extendFlat;function t(r,a,n,o,i){i||(i={});var s=(o||"").charAt(0)==="x",f=(o||"").charAt(0)==="y",x=e(r,a,n);if((s||f)&&i.hoversubplots==="axis"&&x[0])for(var y=(s?r.xa:r.ya)._subplotsWith,v=i.gd,T=S({},r),u=0;u{var c=_n(),g=c.pushUnique,P=Mc(),S=QS();$.exports=function(t,e){var r=t.cd,a=r[0].trace,n=r[0].t,o=t.scene,i=o.matrixOptions.cdata,s=t.xaxis,f=t.yaxis,x=[];if(!o)return x;var y=!P.hasMarkers(a)&&!P.hasText(a);if(a.visible!==!0||y)return x;var v=S.getDimIndex(a,s),T=S.getDimIndex(a,f);if(v===!1||T===!1)return x;var u=n.xpx[v],b=n.ypx[T],_=i[v],C=i[T],M=(t.scene.selectBatch||[]).slice(),E=[];if(e!==!1&&!e.degenerate)for(var A=0;A<_.length;A++)e.contains([u[A],b[A]],null,A,t)?(x.push({pointNumber:A,x:_[A],y:C[A]}),g(M,A)):M.indexOf(A)!==-1?g(M,A):E.push(A);var h=o.matrixOptions;return!M.length&&!E.length?o.matrix.update(h,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,c.extendFlat({},h,o.selectedOptions,o.viewOpts)),o.selectBatch=M,o.unselectBatch=E,x}}),CH=Ft((Q,$)=>{var c=_n(),g=N0(),P=xx().markerStyle;$.exports=function(S,t){var e=t.trace,r=S._fullLayout._splomScenes[e.uid];if(r){g(S,e),c.extendFlat(r.matrixOptions,P(S,e));var a=c.extendFlat({},r.matrixOptions,r.viewOpts);r.matrix.update(a,null)}}}),LH=Ft((Q,$)=>{var c=Qo(),g=PM();$.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:JS(),supplyDefaults:xH(),colorbar:yo(),calc:bH(),plot:MH(),hoverPoints:SH().hoverPoints,selectPoints:EH(),editStyle:CH(),meta:{}},c.register(g)}),PH=Ft((Q,$)=>{var c=US(),g=Qo(),P=uT(),S=dd().getModuleCalcData,t=Ef(),e=Rc().getFromId,r=Ls().shouldShowZeroLine,a="splom",n={};function o(v){var T=v._fullLayout,u=g.getModule(a),b=S(v.calcdata,u)[0],_=P(v,["ANGLE_instanced_arrays","OES_element_index_uint"],n);_&&(T._hasOnlyLargeSploms&&f(v),u.plot(v,{},b))}function i(v){var T=v.calcdata,u=v._fullLayout;u._hasOnlyLargeSploms&&f(v);for(var b=0;b{var c=LH();c.basePlotModule=PH(),$.exports=c}),IH=Ft((Q,$)=>{$.exports=zH()}),tE=Ft((Q,$)=>{var c=Ac(),g=Cd(),P=ka(),S=jh().attributes,t=ya().extendFlat,e=mu().templatedArray;$.exports={domain:S({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:P({editType:"plot"}),tickfont:P({autoShadowDflt:!0,editType:"plot"}),rangefont:P({editType:"plot"}),dimensions:e("dimension",{label:{valType:"string",editType:"plot"},tickvals:t({},g.tickvals,{editType:"plot"}),ticktext:t({},g.ticktext,{editType:"plot"}),tickformat:t({},g.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:t({editType:"calc"},c("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}}),A3=Ft((Q,$)=>{$.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}}),Ig=Ft((Q,$)=>{var c=w1();function g(P){return[P]}$.exports={keyFun:function(P){return P.key},repeat:g,descend:c,wrap:g,unwrap:function(P){return P[0]}}}),eE=Ft((Q,$)=>{var c=A3(),g=En(),P=Ig().keyFun,S=Ig().repeat,t=_n().sorterAsc,e=_n().strTranslate,r=c.bar.snapRatio;function a(q,X){return q*(1-r)+X*r}var n=c.bar.snapClose;function o(q,X){return q*(1-n)+X*n}function i(q,X,lt,yt){if(s(lt,yt))return lt;var pt=q?-1:1,st=0,tt=X.length-1;if(pt<0){var dt=st;st=tt,tt=dt}for(var rt=X[st],at=rt,vt=st;pt*vt=X[lt][0]&&q<=X[lt][1])return!0;return!1}function f(q){q.attr("x",-c.bar.captureWidth/2).attr("width",c.bar.captureWidth)}function x(q){q.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function y(q){if(!q.brush.filterSpecified)return"0,"+q.height;for(var X=v(q.brush.filter.getConsolidated(),q.height),lt=[0],yt,pt,st,tt=X.length?X[0][0]:null,dt=0;dtq[1]+lt||X=.9*q[1]+.1*q[0]?"n":X<=.9*q[0]+.1*q[1]?"s":"ns"}function u(){g.select(document.body).style("cursor",null)}function b(q){q.attr("stroke-dasharray",y)}function _(q,X){var lt=g.select(q).selectAll(".highlight, .highlight-shadow"),yt=X?lt.transition().duration(c.bar.snapDuration).each("end",X):lt;b(yt)}function C(q,X){var lt=q.brush,yt=lt.filterSpecified,pt=NaN,st={},tt;if(yt){var dt=q.height,rt=lt.filter.getConsolidated(),at=v(rt,dt),vt=NaN,it=NaN,Y=NaN;for(tt=0;tt<=at.length;tt++){var ft=at[tt];if(ft&&ft[0]<=X&&X<=ft[1]){vt=tt;break}else if(it=tt?tt-1:NaN,ft&&ft[0]>X){Y=tt;break}}if(pt=vt,isNaN(pt)&&(isNaN(it)||isNaN(Y)?pt=isNaN(it)?Y:it:pt=X-at[it][1]=Wt[0]&&Pt<=Wt[1]){st.clickableOrdinalRange=Wt;break}}}return st}function M(q,X){g.event.sourceEvent.stopPropagation();var lt=X.height-g.mouse(q)[1]-2*c.verticalPadding,yt=X.unitToPaddedPx.invert(lt),pt=X.brush,st=C(X,lt),tt=st.interval,dt=pt.svgBrush;if(dt.wasDragged=!1,dt.grabbingBar=st.region==="ns",dt.grabbingBar){var rt=tt.map(X.unitToPaddedPx);dt.grabPoint=lt-rt[0]-c.verticalPadding,dt.barLength=rt[1]-rt[0]}dt.clickableOrdinalRange=st.clickableOrdinalRange,dt.stayingIntervals=X.multiselect&&pt.filterSpecified?pt.filter.getConsolidated():[],tt&&(dt.stayingIntervals=dt.stayingIntervals.filter(function(at){return at[0]!==tt[0]&&at[1]!==tt[1]})),dt.startExtent=st.region?tt[st.region==="s"?1:0]:yt,X.parent.inBrushDrag=!0,dt.brushStartCallback()}function E(q,X){g.event.sourceEvent.stopPropagation();var lt=X.height-g.mouse(q)[1]-2*c.verticalPadding,yt=X.brush.svgBrush;yt.wasDragged=!0,yt._dragging=!0,yt.grabbingBar?yt.newExtent=[lt-yt.grabPoint,lt+yt.barLength-yt.grabPoint].map(X.unitToPaddedPx.invert):yt.newExtent=[yt.startExtent,X.unitToPaddedPx.invert(lt)].sort(t),X.brush.filterSpecified=!0,yt.extent=yt.stayingIntervals.concat([yt.newExtent]),yt.brushCallback(X),_(q.parentNode)}function A(q,X){var lt=X.brush,yt=lt.filter,pt=lt.svgBrush;pt._dragging||(h(q,X),E(q,X),X.brush.svgBrush.wasDragged=!1),pt._dragging=!1;var st=g.event;st.sourceEvent.stopPropagation();var tt=pt.grabbingBar;if(pt.grabbingBar=!1,pt.grabLocation=void 0,X.parent.inBrushDrag=!1,u(),!pt.wasDragged){pt.wasDragged=void 0,pt.clickableOrdinalRange?lt.filterSpecified&&X.multiselect?pt.extent.push(pt.clickableOrdinalRange):(pt.extent=[pt.clickableOrdinalRange],lt.filterSpecified=!0):tt?(pt.extent=pt.stayingIntervals,pt.extent.length===0&&N(lt)):N(lt),pt.brushCallback(X),_(q.parentNode),pt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[]);return}var dt=function(){yt.set(yt.getConsolidated())};if(X.ordinal){var rt=X.unitTickvals;rt[rt.length-1]pt.newExtent[0];pt.extent=pt.stayingIntervals.concat(at?[pt.newExtent]:[]),pt.extent.length||N(lt),pt.brushCallback(X),at?_(q.parentNode,dt):(dt(),_(q.parentNode))}else dt();pt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[])}function h(q,X){var lt=X.height-g.mouse(q)[1]-2*c.verticalPadding,yt=C(X,lt),pt="crosshair";yt.clickableOrdinalRange?pt="pointer":yt.region&&(pt=yt.region+"-resize"),g.select(document.body).style("cursor",pt)}function p(q){q.on("mousemove",function(X){g.event.preventDefault(),X.parent.inBrushDrag||h(this,X)}).on("mouseleave",function(X){X.parent.inBrushDrag||u()}).call(g.behavior.drag().on("dragstart",function(X){M(this,X)}).on("drag",function(X){E(this,X)}).on("dragend",function(X){A(this,X)}))}function k(q,X){return q[0]-X[0]}function w(q,X,lt){var yt=lt._context.staticPlot,pt=q.selectAll(".background").data(S);pt.enter().append("rect").classed("background",!0).call(f).call(x).style("pointer-events",yt?"none":"auto").attr("transform",e(0,c.verticalPadding)),pt.call(p).attr("height",function(dt){return dt.height-c.verticalPadding});var st=q.selectAll(".highlight-shadow").data(S);st.enter().append("line").classed("highlight-shadow",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width+c.bar.strokeWidth).attr("stroke",X).attr("opacity",c.bar.strokeOpacity).attr("stroke-linecap","butt"),st.attr("y1",function(dt){return dt.height}).call(b);var tt=q.selectAll(".highlight").data(S);tt.enter().append("line").classed("highlight",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width-c.bar.strokeWidth).attr("stroke",c.bar.fillColor).attr("opacity",c.bar.fillOpacity).attr("stroke-linecap","butt"),tt.attr("y1",function(dt){return dt.height}).call(b)}function R(q,X,lt){var yt=q.selectAll("."+c.cn.axisBrush).data(S,P);yt.enter().append("g").classed(c.cn.axisBrush,!0),w(yt,X,lt)}function O(q){return q.svgBrush.extent.map(function(X){return X.slice()})}function N(q){q.filterSpecified=!1,q.svgBrush.extent=[[-1/0,1/0]]}function V(q){return function(X){var lt=X.brush,yt=O(lt),pt=yt.slice();lt.filter.set(pt),q()}}function H(q){for(var X=q.slice(),lt=[],yt,pt=X.shift();pt;){for(yt=pt.slice();(pt=X.shift())&&pt[0]<=yt[1];)yt[1]=Math.max(yt[1],pt[1]);lt.push(yt)}return lt.length===1&<[0][0]>lt[0][1]&&(lt=[]),lt}function F(){var q=[],X,lt;return{set:function(yt){q=yt.map(function(pt){return pt.slice().sort(t)}).sort(k),q.length===1&&q[0][0]===-1/0&&q[0][1]===1/0&&(q=[[0,-1]]),X=H(q),lt=q.reduce(function(pt,st){return[Math.min(pt[0],st[0]),Math.max(pt[1],st[1])]},[1/0,-1/0])},get:function(){return q.slice()},getConsolidated:function(){return X},getBounds:function(){return lt}}}function U(q,X,lt,yt,pt,st){var tt=F();return tt.set(lt),{filter:tt,filterSpecified:X,svgBrush:{extent:[],brushStartCallback:yt,brushCallback:V(pt),brushEndCallback:st}}}function W(q,X){if(Array.isArray(q[0])?(q=q.map(function(yt){return yt.sort(t)}),X.multiselect?q=H(q.sort(k)):q=[q[0]]):q=[q.sort(t)],X.tickvals){var lt=X.tickvals.slice().sort(t);if(q=q.map(function(yt){var pt=[i(0,lt,yt[0],[]),i(1,lt,yt[1],[])];if(pt[1]>pt[0])return pt}).filter(function(yt){return yt}),!q.length)return}return q.length>1?q:q[0]}$.exports={makeBrush:U,ensureAxisBrush:R,cleanRanges:W}}),OH=Ft((Q,$)=>{var c=_n(),g=Zd().hasColorscale,P=gc(),S=jh().defaults,t=Ld(),e=Ls(),r=tE(),a=eE(),n=A3().maxDimensionCount,o=cT();function i(f,x,y,v,T){var u=T("line.color",y);if(g(f,"line")&&c.isArrayOrTypedArray(u)){if(u.length)return T("line.colorscale"),P(f,x,v,T,{prefix:"line.",cLetter:"c"}),u.length;x.line.color=y}return 1/0}function s(f,x,y,v){function T(M,E){return c.coerce(f,x,r.dimensions,M,E)}var u=T("values"),b=T("visible");if(u&&u.length||(b=x.visible=!1),b){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var _=T("range");x._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:_},e.setConvert(x._ax,v.layout),T("multiselect");var C=T("constraintrange");C&&(x.constraintrange=a.cleanRanges(C,x))}}$.exports=function(f,x,y,v){function T(M,E){return c.coerce(f,x,r,M,E)}var u=f.dimensions;Array.isArray(u)&&u.length>n&&(c.log("parcoords traces support up to "+n+" dimensions at the moment"),u.splice(n));var b=t(f,x,{name:"dimensions",layout:v,handleItemDefaults:s}),_=i(f,x,y,v,T);S(x,v,T),(!Array.isArray(b)||!b.length)&&(x.visible=!1),o(x,b,"values",_);var C=c.extendFlat({},v.font,{size:Math.round(v.font.size/1.2)});c.coerceFont(T,"labelfont",C),c.coerceFont(T,"tickfont",C,{autoShadowDflt:!0}),c.coerceFont(T,"rangefont",C),T("labelangle"),T("labelside"),T("unselected.line.color"),T("unselected.line.opacity")}}),DH=Ft((Q,$)=>{var c=_n().isArrayOrTypedArray,g=Xc(),P=Ig().wrap;$.exports=function(t,e){var r,a;return g.hasColorscale(e,"line")&&c(e.line.color)?(r=e.line.color,a=g.extractOpts(e.line).colorscale,g.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=S(e._length),a=[[0,e.line.color],[1,e.line.color]]),P({lineColor:r,cscale:a})};function S(t){for(var e=new Array(t),r=0;r>>16,(Q&65280)>>>8,Q&255],alpha:1};if(typeof Q=="number")return{space:"rgb",values:[Q>>>16,(Q&65280)>>>8,Q&255],alpha:1};if(Q=String(Q).toLowerCase(),hT.default[Q])P=hT.default[Q].slice(),t="rgb";else if(Q==="transparent")S=0,t="rgb",P=[0,0,0];else if(Q[0]==="#"){var e=Q.slice(1),r=e.length,a=r<=4;S=1,a?(P=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],r===4&&(S=parseInt(e[3]+e[3],16)/255)):(P=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],r===8&&(S=parseInt(e[6]+e[7],16)/255)),P[0]||(P[0]=0),P[1]||(P[1]=0),P[2]||(P[2]=0),t="rgb"}else if(g=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Q)){var n=g[1];t=n.replace(/a$/,"");var o=t==="cmyk"?4:t==="gray"?1:3;P=g[2].trim().split(/\s*[,\/]\s*|\s+/),t==="color"&&(t=P.shift()),P=P.map(function(i,s){if(i[i.length-1]==="%")return i=parseFloat(i)/100,s===3?i:t==="rgb"?i*255:t[0]==="h"||t[0]==="l"&&!s?i*100:t==="lab"?i*125:t==="lch"?s<2?i*150:i*360:t[0]==="o"&&!s?i:t==="oklab"?i*.4:t==="oklch"?s<2?i*.4:i*360:i;if(t[s]==="h"||s===2&&t[t.length-1]==="h"){if(fT[i]!==void 0)return fT[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),S=P.length>o?P.pop():1}else/[0-9](?:\s|\/|,)/.test(Q)&&(P=Q.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),t=((c=($=Q.match(/([a-z])/ig))==null?void 0:$.join(""))==null?void 0:c.toLowerCase())||"rgb");return{space:t,values:P,alpha:S}}var hT,rE,fT,RH=Tn(()=>{hT=jn(iS()),rE=FH,fT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}),M3,nE=Tn(()=>{M3={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}),S3,BH=Tn(()=>{nE(),S3={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Q){var $=Q[0]/360,c=Q[1]/100,g=Q[2]/100,P,S,t,e,r,a=0;if(c===0)return r=g*255,[r,r,r];for(S=g<.5?g*(1+c):g+c-g*c,P=2*g-S,e=[0,0,0];a<3;)t=$+1/3*-(a-1),t<0?t++:t>1&&t--,r=6*t<1?P+(S-P)*6*t:2*t<1?S:3*t<2?P+(S-P)*(2/3-t)*6:P,e[a++]=r*255;return e}},M3.hsl=function(Q){var $=Q[0]/255,c=Q[1]/255,g=Q[2]/255,P=Math.min($,c,g),S=Math.max($,c,g),t=S-P,e,r,a;return S===P?e=0:$===S?e=(c-g)/t:c===S?e=2+(g-$)/t:g===S&&(e=4+($-c)/t),e=Math.min(e*60,360),e<0&&(e+=360),a=(P+S)/2,S===P?r=0:a<=.5?r=t/(S+P):r=t/(2-S-P),[e,r*100,a*100]}}),iE={};wn(iE,{default:()=>NH});function NH(Q){Array.isArray(Q)&&Q.raw&&(Q=String.raw(...arguments)),Q instanceof Number&&(Q=+Q);var $,c=rE(Q);if(!c.space)return[];let g=c.space[0]==="h"?S3.min:M3.min,P=c.space[0]==="h"?S3.max:M3.max;return $=Array(3),$[0]=Math.min(Math.max(c.values[0],g[0]),P[0]),$[1]=Math.min(Math.max(c.values[1],g[1]),P[1]),$[2]=Math.min(Math.max(c.values[2],g[2]),P[2]),c.space[0]==="h"&&($=S3.rgb($)),$.push(Math.min(Math.max(c.alpha,0),1)),$}var jH=Tn(()=>{RH(),nE(),BH()}),aE=Ft(Q=>{var $=_n().isTypedArray;Q.convertTypedArray=function(c){return $(c)?Array.prototype.slice.call(c):c},Q.isOrdinal=function(c){return!!c.tickvals},Q.isVisible=function(c){return c.visible||!("visible"in c)}}),UH=Ft((Q,$)=>{var c=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),jn;if(kr&&(jn=gc(fn),kr[jn]))return kr[jn].apply(null,li);var Bi=Function.apply(null,Dn.concat(fn));return kr&&(kr[jn]=Bi),Bi.apply(null,li)}return{global:ya,link:yn,block:ai,proc:Na,scope:ta,cond:$i,compile:ia}}var Za="xyzw".split(""),ca=5121,Oa=1,ka=2,na=0,io=1,ns=2,Ko=3,ls=4,ps=5,oo=6,qa="dither",gs="blend.enable",el="blend.color",Pl="blend.equation",su="blend.func",$l="depth.enable",lu="depth.func",ml="depth.range",qu="depth.mask",Iu="colorMask",fu="cull.enable",Oo="cull.face",Es="frontFace",Kl="lineWidth",Rl="polygonOffset.enable",vc="polygonOffset.offset",Hc="sample.alpha",Lc="sample.enable",Ih="sample.coverage",Wc="stencil.enable",zh="stencil.mask",Du="stencil.func",Oh="stencil.opFront",rs="stencil.opBack",zs="scissor.enable",qc="scissor.box",$u="viewport",qf="profile",$t="framebuffer",z="vert",ht="frag",Et="elements",zt="primitive",Ht="count",ke="offset",Fe="instances",Ke="vao",vr="Width",Dr="Height",Fr=$t+vr,un=$t+Dr,Sn=$u+vr,Xt=$u+Dr,ae="drawingBuffer",xe=ae+vr,Ae=ae+Dr,je=[su,Pl,Du,Oh,rs,Ih,$u,qc,vc],Oe=34962,$e=34963,wr=2884,Or=3042,Nr=3024,en=2960,vn=2929,In=3089,Nn=32823,ii=32926,Ui=32928,pa=5126,fa=35664,Ta=35665,so=35666,Bo=5124,So=35667,ds=35668,fl=35669,vl=35670,Ds=35671,wl=35672,Eu=35673,gu=35674,$s=35675,Zs=35676,Yu=35678,dc=35680,$c=4,At=1028,Ut=1029,ue=2304,Me=2305,Pe=32775,Ne=32776,sr=519,ar=7680,Er=0,rn=1,Jr=32774,xn=513,zn=36160,On=36064,Hi={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Vn={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},yi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Si={cw:ue,ccw:Me};function Ri(_e){return Array.isArray(_e)||Xr(_e)||nn(_e)}function Gi(_e){return _e.sort(function(kr,Ir){return kr===$u?-1:Ir===$u?1:kr=1,Dn>=2,kr)}else if(Ir===ls){var li=_e.data;return new Kn(li.thisDep,li.contextDep,li.propDep,kr)}else{if(Ir===ps)return new Kn(!1,!1,!1,kr);if(Ir===oo){for(var ti=!1,yn=!1,ai=!1,ta=0;ta<_e.data.length;++ta){var $i=_e.data[ta];if($i.type===io)ai=!0;else if($i.type===ns)yn=!0;else if($i.type===Ko)ti=!0;else if($i.type===na){ti=!0;var ya=$i.data;ya>=1&&(yn=!0),ya>=2&&(ai=!0)}else $i.type===ls&&(ti=ti||$i.data.thisDep,yn=yn||$i.data.contextDep,ai=ai||$i.data.propDep)}return new Kn(ti,yn,ai,kr)}else return new Kn(Ir===Ko,Ir===ns,Ir===io,kr)}}var Po=new Kn(!1,!1,!1,function(){});function Ro(_e,kr,Ir,Dn,li,ti,yn,ai,ta,$i,ya,$a,Na,ia,Ai,fn){var jn=$i.Record,Bi={add:32774,subtract:32778,"reverse subtract":32779};Ir.ext_blend_minmax&&(Bi.min=Pe,Bi.max=Ne);var Ti=Ir.angle_instanced_arrays,ei=Ir.webgl_draw_buffers,Sa=Ir.oes_vertex_array_object,ha={dirty:!0,profile:fn.profile},Va={},xi=[],ri={},Ea={};function ma(Yt){return Yt.replace(".","_")}function Ki(Yt,ce,Se){var ir=ma(Yt);xi.push(Yt),Va[ir]=ha[ir]=!!Se,ri[ir]=ce}function Ji(Yt,ce,Se){var ir=ma(Yt);xi.push(Yt),Array.isArray(Se)?(ha[ir]=Se.slice(),Va[ir]=Se.slice()):ha[ir]=Va[ir]=Se,Ea[ir]=ce}function ba(Yt){return!!isNaN(Yt)}Ki(qa,Nr),Ki(gs,Or),Ji(el,"blendColor",[0,0,0,0]),Ji(Pl,"blendEquationSeparate",[Jr,Jr]),Ji(su,"blendFuncSeparate",[rn,Er,rn,Er]),Ki($l,vn,!0),Ji(lu,"depthFunc",xn),Ji(ml,"depthRange",[0,1]),Ji(qu,"depthMask",!0),Ji(Iu,Iu,[!0,!0,!0,!0]),Ki(fu,wr),Ji(Oo,"cullFace",Ut),Ji(Es,Es,Me),Ji(Kl,Kl,1),Ki(Rl,Nn),Ji(vc,"polygonOffset",[0,0]),Ki(Hc,ii),Ki(Lc,Ui),Ji(Ih,"sampleCoverage",[1,!1]),Ki(Wc,en),Ji(zh,"stencilMask",-1),Ji(Du,"stencilFunc",[sr,0,-1]),Ji(Oh,"stencilOpSeparate",[At,ar,ar,ar]),Ji(rs,"stencilOpSeparate",[Ut,ar,ar,ar]),Ki(zs,In),Ji(qc,"scissor",[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]),Ji($u,$u,[0,0,_e.drawingBufferWidth,_e.drawingBufferHeight]);var Io={gl:_e,context:Na,strings:kr,next:Va,current:ha,draw:$a,elements:ti,buffer:li,shader:ya,attributes:$i.state,vao:$i,uniforms:ta,framebuffer:ai,extensions:Ir,timer:ia,isBufferArgs:Ri},wo={primTypes:ci,compareFuncs:Vn,blendFuncs:Hi,blendEquations:Bi,stencilOps:yi,glTypes:Hn,orientationType:Si};ei&&(wo.backBuffer=[Ut],wo.drawBuffer=h(Dn.maxDrawbuffers,function(Yt){return Yt===0?[0]:h(Yt,function(ce){return On+ce})}));var _a=0;function Fa(){var Yt=Ba({cache:Ai}),ce=Yt.link,Se=Yt.global;Yt.id=_a++,Yt.batchId="0";var ir=ce(Io),Ye=Yt.shared={props:"a0"};Object.keys(Io).forEach(function(Xe){Ye[Xe]=Se.def(ir,".",Xe)});var tr=Yt.next={},lr=Yt.current={};Object.keys(Ea).forEach(function(Xe){Array.isArray(ha[Xe])&&(tr[Xe]=Se.def(Ye.next,".",Xe),lr[Xe]=Se.def(Ye.current,".",Xe))});var hr=Yt.constants={};Object.keys(wo).forEach(function(Xe){hr[Xe]=Se.def(JSON.stringify(wo[Xe]))}),Yt.invoke=function(Xe,Ze){switch(Ze.type){case na:var Pr=["this",Ye.context,Ye.props,Yt.batchId];return Xe.def(ce(Ze.data),".call(",Pr.slice(0,Math.max(Ze.data.length+1,4)),")");case io:return Xe.def(Ye.props,Ze.data);case ns:return Xe.def(Ye.context,Ze.data);case Ko:return Xe.def("this",Ze.data);case ls:return Ze.data.append(Yt,Xe),Ze.data.ref;case ps:return Ze.data.toString();case oo:return Ze.data.map(function(sn){return Yt.invoke(Xe,sn)})}},Yt.attribCache={};var Ve={};return Yt.scopeAttrib=function(Xe){var Ze=kr.id(Xe);if(Ze in Ve)return Ve[Ze];var Pr=$i.scope[Ze];Pr||(Pr=$i.scope[Ze]=new jn);var sn=Ve[Ze]=ce(Pr);return sn},Yt}function vo(Yt){var ce=Yt.static,Se=Yt.dynamic,ir;if(qf in ce){var Ye=!!ce[qf];ir=Ha(function(lr,hr){return Ye}),ir.enable=Ye}else if(qf in Se){var tr=Se[qf];ir=ao(tr,function(lr,hr){return lr.invoke(hr,tr)})}return ir}function Eo(Yt,ce){var Se=Yt.static,ir=Yt.dynamic;if($t in Se){var Ye=Se[$t];return Ye?(Ye=ai.getFramebuffer(Ye),Ha(function(lr,hr){var Ve=lr.link(Ye),Xe=lr.shared;hr.set(Xe.framebuffer,".next",Ve);var Ze=Xe.context;return hr.set(Ze,"."+Fr,Ve+".width"),hr.set(Ze,"."+un,Ve+".height"),Ve})):Ha(function(lr,hr){var Ve=lr.shared;hr.set(Ve.framebuffer,".next","null");var Xe=Ve.context;return hr.set(Xe,"."+Fr,Xe+"."+xe),hr.set(Xe,"."+un,Xe+"."+Ae),"null"})}else if($t in ir){var tr=ir[$t];return ao(tr,function(lr,hr){var Ve=lr.invoke(hr,tr),Xe=lr.shared,Ze=Xe.framebuffer,Pr=hr.def(Ze,".getFramebuffer(",Ve,")");hr.set(Ze,".next",Pr);var sn=Xe.context;return hr.set(sn,"."+Fr,Pr+"?"+Pr+".width:"+sn+"."+xe),hr.set(sn,"."+un,Pr+"?"+Pr+".height:"+sn+"."+Ae),Pr})}else return null}function es(Yt,ce,Se){var ir=Yt.static,Ye=Yt.dynamic;function tr(Ve){if(Ve in ir){var Xe=ir[Ve],Ze=!0,Pr=Xe.x|0,sn=Xe.y|0,dn,pi;return"width"in Xe?dn=Xe.width|0:Ze=!1,"height"in Xe?pi=Xe.height|0:Ze=!1,new Kn(!Ze&&ce&&ce.thisDep,!Ze&&ce&&ce.contextDep,!Ze&&ce&&ce.propDep,function(Ci,mi){var ea=Ci.shared.context,Ei=dn;"width"in Xe||(Ei=mi.def(ea,".",Fr,"-",Pr));var Li=pi;return"height"in Xe||(Li=mi.def(ea,".",un,"-",sn)),[Pr,sn,Ei,Li]})}else if(Ve in Ye){var ui=Ye[Ve],Yn=ao(ui,function(Ci,mi){var ea=Ci.invoke(mi,ui),Ei=Ci.shared.context,Li=mi.def(ea,".x|0"),la=mi.def(ea,".y|0"),to=mi.def('"width" in ',ea,"?",ea,".width|0:","(",Ei,".",Fr,"-",Li,")"),co=mi.def('"height" in ',ea,"?",ea,".height|0:","(",Ei,".",un,"-",la,")");return[Li,la,to,co]});return ce&&(Yn.thisDep=Yn.thisDep||ce.thisDep,Yn.contextDep=Yn.contextDep||ce.contextDep,Yn.propDep=Yn.propDep||ce.propDep),Yn}else return ce?new Kn(ce.thisDep,ce.contextDep,ce.propDep,function(Ci,mi){var ea=Ci.shared.context;return[0,0,mi.def(ea,".",Fr),mi.def(ea,".",un)]}):null}var lr=tr($u);if(lr){var hr=lr;lr=new Kn(lr.thisDep,lr.contextDep,lr.propDep,function(Ve,Xe){var Ze=hr.append(Ve,Xe),Pr=Ve.shared.context;return Xe.set(Pr,"."+Sn,Ze[2]),Xe.set(Pr,"."+Xt,Ze[3]),Ze})}return{viewport:lr,scissor_box:tr(qc)}}function Ul(Yt,ce){var Se=Yt.static,ir=typeof Se[ht]=="string"&&typeof Se[z]=="string";if(ir){if(Object.keys(ce.dynamic).length>0)return null;var Ye=ce.static,tr=Object.keys(Ye);if(tr.length>0&&typeof Ye[tr[0]]=="number"){for(var lr=[],hr=0;hr"+Li+"?"+Ze+".constant["+Li+"]:0;"}).join(""),"}}else{","if(",dn,"(",Ze,".buffer)){",Ci,"=",pi,".createStream(",Oe,",",Ze,".buffer);","}else{",Ci,"=",pi,".getBuffer(",Ze,".buffer);","}",mi,'="type" in ',Ze,"?",sn.glTypes,"[",Ze,".type]:",Ci,".dtype;",ui.normalized,"=!!",Ze,".normalized;");function ea(Ei){Xe(ui[Ei],"=",Ze,".",Ei,"|0;")}return ea("size"),ea("offset"),ea("stride"),ea("divisor"),Xe("}}"),Xe.exit("if(",ui.isStream,"){",pi,".destroyStream(",Ci,");","}"),ui}Ye[tr]=ao(lr,hr)}),Ye}function pc(Yt){var ce=Yt.static,Se=Yt.dynamic,ir={};return Object.keys(ce).forEach(function(Ye){var tr=ce[Ye];ir[Ye]=Ha(function(lr,hr){return typeof tr=="number"||typeof tr=="boolean"?""+tr:lr.link(tr)})}),Object.keys(Se).forEach(function(Ye){var tr=Se[Ye];ir[Ye]=ao(tr,function(lr,hr){return lr.invoke(hr,tr)})}),ir}function yc(Yt,ce,Se,ir,Ye){Yt.static,Yt.dynamic;var tr=Ul(Yt,ce),lr=Eo(Yt),hr=es(Yt,lr),Ve=hs(Yt),Xe=ku(Yt),Ze=Al(Yt,Ye,tr);function Pr(Ci){var mi=hr[Ci];mi&&(Xe[Ci]=mi)}Pr($u),Pr(ma(qc));var sn=Object.keys(Xe).length>0,dn={framebuffer:lr,draw:Ve,shader:Ze,state:Xe,dirty:sn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(dn.profile=vo(Yt),dn.uniforms=dl(Se),dn.drawVAO=dn.scopeVAO=Ve.vao,!dn.drawVAO&&Ze.program&&!tr&&Ir.angle_instanced_arrays&&Ve.static.elements){var pi=!0,ui=Ze.program.attributes.map(function(Ci){var mi=ce.static[Ci];return pi=pi&&!!mi,mi});if(pi&&ui.length>0){var Yn=$i.getVAO($i.createVAO({attributes:ui,elements:Ve.static.elements}));dn.drawVAO=new Kn(null,null,null,function(Ci,mi){return Ci.link(Yn)}),dn.useVAO=!0}}return tr?dn.useVAO=!0:dn.attributes=Cu(ce),dn.context=pc(ir),dn}function xu(Yt,ce,Se){var ir=Yt.shared,Ye=ir.context,tr=Yt.scope();Object.keys(Se).forEach(function(lr){ce.save(Ye,"."+lr);var hr=Se[lr],Ve=hr.append(Yt,ce);Array.isArray(Ve)?tr(Ye,".",lr,"=[",Ve.join(),"];"):tr(Ye,".",lr,"=",Ve,";")}),ce(tr)}function pu(Yt,ce,Se,ir){var Ye=Yt.shared,tr=Ye.gl,lr=Ye.framebuffer,hr;ei&&(hr=ce.def(Ye.extensions,".webgl_draw_buffers"));var Ve=Yt.constants,Xe=Ve.drawBuffer,Ze=Ve.backBuffer,Pr;Se?Pr=Se.append(Yt,ce):Pr=ce.def(lr,".next"),ir||ce("if(",Pr,"!==",lr,".cur){"),ce("if(",Pr,"){",tr,".bindFramebuffer(",zn,",",Pr,".framebuffer);"),ei&&ce(hr,".drawBuffersWEBGL(",Xe,"[",Pr,".colorAttachments.length]);"),ce("}else{",tr,".bindFramebuffer(",zn,",null);"),ei&&ce(hr,".drawBuffersWEBGL(",Ze,");"),ce("}",lr,".cur=",Pr,";"),ir||ce("}")}function Tu(Yt,ce,Se){var ir=Yt.shared,Ye=ir.gl,tr=Yt.current,lr=Yt.next,hr=ir.current,Ve=ir.next,Xe=Yt.cond(hr,".dirty");xi.forEach(function(Ze){var Pr=ma(Ze);if(!(Pr in Se.state)){var sn,dn;if(Pr in lr){sn=lr[Pr],dn=tr[Pr];var pi=h(ha[Pr].length,function(Yn){return Xe.def(sn,"[",Yn,"]")});Xe(Yt.cond(pi.map(function(Yn,Ci){return Yn+"!=="+dn+"["+Ci+"]"}).join("||")).then(Ye,".",Ea[Pr],"(",pi,");",pi.map(function(Yn,Ci){return dn+"["+Ci+"]="+Yn}).join(";"),";"))}else{sn=Xe.def(Ve,".",Pr);var ui=Yt.cond(sn,"!==",hr,".",Pr);Xe(ui),Pr in ri?ui(Yt.cond(sn).then(Ye,".enable(",ri[Pr],");").else(Ye,".disable(",ri[Pr],");"),hr,".",Pr,"=",sn,";"):ui(Ye,".",Ea[Pr],"(",sn,");",hr,".",Pr,"=",sn,";")}}}),Object.keys(Se.state).length===0&&Xe(hr,".dirty=false;"),ce(Xe)}function No(Yt,ce,Se,ir){var Ye=Yt.shared,tr=Yt.current,lr=Ye.current,hr=Ye.gl,Ve;Gi(Object.keys(Se)).forEach(function(Xe){var Ze=Se[Xe];if(!(ir&&!ir(Ze))){var Pr=Ze.append(Yt,ce);if(ri[Xe]){var sn=ri[Xe];Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),ce(Yt.cond(Ve).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),ce(lr,".",Xe,"=",Ve,";")):(ce(Yt.cond(Pr).then(hr,".enable(",sn,");").else(hr,".disable(",sn,");")),ce(lr,".",Xe,"=",Pr,";"))}else if(Pn(Pr)){var dn=tr[Xe];ce(hr,".",Ea[Xe],"(",Pr,");",Pr.map(function(pi,ui){return dn+"["+ui+"]="+pi}).join(";"),";")}else Ua(Ze)?(Ve=Yt.link(Pr,{stable:!0}),ce(hr,".",Ea[Xe],"(",Ve,");",lr,".",Xe,"=",Ve,";")):ce(hr,".",Ea[Xe],"(",Pr,");",lr,".",Xe,"=",Pr,";")}})}function Au(Yt,ce){Ti&&(Yt.instancing=ce.def(Yt.shared.extensions,".angle_instanced_arrays"))}function sl(Yt,ce,Se,ir,Ye){var tr=Yt.shared,lr=Yt.stats,hr=tr.current,Ve=tr.timer,Xe=Se.profile;function Ze(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Pr,sn;function dn(ea){Pr=ce.def(),ea(Pr,"=",Ze(),";"),typeof Ye=="string"?ea(lr,".count+=",Ye,";"):ea(lr,".count++;"),ia&&(ir?(sn=ce.def(),ea(sn,"=",Ve,".getNumPendingQueries();")):ea(Ve,".beginQuery(",lr,");"))}function pi(ea){ea(lr,".cpuTime+=",Ze(),"-",Pr,";"),ia&&(ir?ea(Ve,".pushScopeStats(",sn,",",Ve,".getNumPendingQueries(),",lr,");"):ea(Ve,".endQuery();"))}function ui(ea){var Ei=ce.def(hr,".profile");ce(hr,".profile=",ea,";"),ce.exit(hr,".profile=",Ei,";")}var Yn;if(Xe){if(Ua(Xe)){Xe.enable?(dn(ce),pi(ce.exit),ui("true")):ui("false");return}Yn=Xe.append(Yt,ce),ui(Yn)}else Yn=ce.def(hr,".profile");var Ci=Yt.block();dn(Ci),ce("if(",Yn,"){",Ci,"}");var mi=Yt.block();pi(mi),ce.exit("if(",Yn,"){",mi,"}")}function Lu(Yt,ce,Se,ir,Ye){var tr=Yt.shared;function lr(Ve){switch(Ve){case fa:case So:case Ds:return 2;case Ta:case ds:case wl:return 3;case so:case fl:case Eu:return 4;default:return 1}}function hr(Ve,Xe,Ze){var Pr=tr.gl,sn=ce.def(Ve,".location"),dn=ce.def(tr.attributes,"[",sn,"]"),pi=Ze.state,ui=Ze.buffer,Yn=[Ze.x,Ze.y,Ze.z,Ze.w],Ci=["buffer","normalized","offset","stride"];function mi(){ce("if(!",dn,".buffer){",Pr,".enableVertexAttribArray(",sn,");}");var Ei=Ze.type,Li;if(Ze.size?Li=ce.def(Ze.size,"||",Xe):Li=Xe,ce("if(",dn,".type!==",Ei,"||",dn,".size!==",Li,"||",Ci.map(function(to){return dn+"."+to+"!=="+Ze[to]}).join("||"),"){",Pr,".bindBuffer(",Oe,",",ui,".buffer);",Pr,".vertexAttribPointer(",[sn,Li,Ei,Ze.normalized,Ze.stride,Ze.offset],");",dn,".type=",Ei,";",dn,".size=",Li,";",Ci.map(function(to){return dn+"."+to+"="+Ze[to]+";"}).join(""),"}"),Ti){var la=Ze.divisor;ce("if(",dn,".divisor!==",la,"){",Yt.instancing,".vertexAttribDivisorANGLE(",[sn,la],");",dn,".divisor=",la,";}")}}function ea(){ce("if(",dn,".buffer){",Pr,".disableVertexAttribArray(",sn,");",dn,".buffer=null;","}if(",Za.map(function(Ei,Li){return dn+"."+Ei+"!=="+Yn[Li]}).join("||"),"){",Pr,".vertexAttrib4f(",sn,",",Yn,");",Za.map(function(Ei,Li){return dn+"."+Ei+"="+Yn[Li]+";"}).join(""),"}")}pi===Oa?mi():pi===ka?ea():(ce("if(",pi,"===",Oa,"){"),mi(),ce("}else{"),ea(),ce("}"))}ir.forEach(function(Ve){var Xe=Ve.name,Ze=Se.attributes[Xe],Pr;if(Ze){if(!Ye(Ze))return;Pr=Ze.append(Yt,ce)}else{if(!Ye(Po))return;var sn=Yt.scopeAttrib(Xe);Pr={},Object.keys(new jn).forEach(function(dn){Pr[dn]=ce.def(sn,".",dn)})}hr(Yt.link(Ve),lr(Ve.info.type),Pr)})}function xc(Yt,ce,Se,ir,Ye,tr){for(var lr=Yt.shared,hr=lr.gl,Ve,Xe=0;Xe1){for(var qo=[],xs=[],Il=0;Il>1)",ui],");")}function la(){Se(Yn,".drawArraysInstancedANGLE(",[sn,dn,pi,ui],");")}Ze&&Ze!=="null"?mi?Li():(Se("if(",Ze,"){"),Li(),Se("}else{"),la(),Se("}")):la()}function Ei(){function Li(){Se(tr+".drawElements("+[sn,pi,Ci,dn+"<<(("+Ci+"-"+ca+")>>1)"]+");")}function la(){Se(tr+".drawArrays("+[sn,dn,pi]+");")}Ze&&Ze!=="null"?mi?Li():(Se("if(",Ze,"){"),Li(),Se("}else{"),la(),Se("}")):la()}Ti&&(typeof ui!="number"||ui>=0)?typeof ui=="string"?(Se("if(",ui,">0){"),ea(),Se("}else if(",ui,"<0){"),Ei(),Se("}")):ea():Ei()}function Cs(Yt,ce,Se,ir,Ye){var tr=Fa(),lr=tr.proc("body",Ye);return Ti&&(tr.instancing=lr.def(tr.shared.extensions,".angle_instanced_arrays")),Yt(tr,lr,Se,ir),tr.compile().body}function Ml(Yt,ce,Se,ir){Au(Yt,ce),Se.useVAO?Se.drawVAO?ce(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,ce),");"):ce(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(ce(Yt.shared.vao,".setVAO(null);"),Lu(Yt,ce,Se,ir.attributes,function(){return!0})),xc(Yt,ce,Se,ir.uniforms,function(){return!0},!1),Co(Yt,ce,ce,Se)}function yl(Yt,ce){var Se=Yt.proc("draw",1);Au(Yt,Se),xu(Yt,Se,ce.context),pu(Yt,Se,ce.framebuffer),Tu(Yt,Se,ce),No(Yt,Se,ce.state),sl(Yt,Se,ce,!1,!0);var ir=ce.shader.progVar.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",ir,".program);"),ce.shader.program)Ml(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ye=Yt.global.def("{}"),tr=Se.def(ir,".id"),lr=Se.def(Ye,"[",tr,"]");Se(Yt.cond(lr).then(lr,".call(this,a0);").else(lr,"=",Ye,"[",tr,"]=",Yt.link(function(hr){return Cs(Ml,Yt,ce,hr,1)}),"(",ir,");",lr,".call(this,a0);"))}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function $(Yt,ce,Se,ir){Yt.batchId="a1",Au(Yt,ce);function Ye(){return!0}Lu(Yt,ce,Se,ir.attributes,Ye),xc(Yt,ce,Se,ir.uniforms,Ye,!1),Co(Yt,ce,ce,Se)}function ot(Yt,ce,Se,ir){Au(Yt,ce);var Ye=Se.contextDep,tr=ce.def(),lr="a0",hr="a1",Ve=ce.def();Yt.shared.props=Ve,Yt.batchId=tr;var Xe=Yt.scope(),Ze=Yt.scope();ce(Xe.entry,"for(",tr,"=0;",tr,"<",hr,";++",tr,"){",Ve,"=",lr,"[",tr,"];",Ze,"}",Xe.exit);function Pr(Ci){return Ci.contextDep&&Ye||Ci.propDep}function sn(Ci){return!Pr(Ci)}if(Se.needsContext&&xu(Yt,Ze,Se.context),Se.needsFramebuffer&&pu(Yt,Ze,Se.framebuffer),No(Yt,Ze,Se.state,Pr),Se.profile&&Pr(Se.profile)&&sl(Yt,Ze,Se,!1,!0),ir)Se.useVAO?Se.drawVAO?Pr(Se.drawVAO)?Ze(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Ze),");"):Xe(Yt.shared.vao,".setVAO(",Se.drawVAO.append(Yt,Xe),");"):Xe(Yt.shared.vao,".setVAO(",Yt.shared.vao,".targetVAO);"):(Xe(Yt.shared.vao,".setVAO(null);"),Lu(Yt,Xe,Se,ir.attributes,sn),Lu(Yt,Ze,Se,ir.attributes,Pr)),xc(Yt,Xe,Se,ir.uniforms,sn,!1),xc(Yt,Ze,Se,ir.uniforms,Pr,!0),Co(Yt,Xe,Ze,Se);else{var dn=Yt.global.def("{}"),pi=Se.shader.progVar.append(Yt,Ze),ui=Ze.def(pi,".id"),Yn=Ze.def(dn,"[",ui,"]");Ze(Yt.shared.gl,".useProgram(",pi,".program);","if(!",Yn,"){",Yn,"=",dn,"[",ui,"]=",Yt.link(function(Ci){return Cs($,Yt,Se,Ci,2)}),"(",pi,");}",Yn,".call(this,a0[",tr,"],",tr,");")}}function et(Yt,ce){var Se=Yt.proc("batch",2);Yt.batchId="0",Au(Yt,Se);var ir=!1,Ye=!0;Object.keys(ce.context).forEach(function(dn){ir=ir||ce.context[dn].propDep}),ir||(xu(Yt,Se,ce.context),Ye=!1);var tr=ce.framebuffer,lr=!1;tr?(tr.propDep?ir=lr=!0:tr.contextDep&&ir&&(lr=!0),lr||pu(Yt,Se,tr)):pu(Yt,Se,null),ce.state.viewport&&ce.state.viewport.propDep&&(ir=!0);function hr(dn){return dn.contextDep&&ir||dn.propDep}Tu(Yt,Se,ce),No(Yt,Se,ce.state,function(dn){return!hr(dn)}),(!ce.profile||!hr(ce.profile))&&sl(Yt,Se,ce,!1,"a1"),ce.contextDep=ir,ce.needsContext=Ye,ce.needsFramebuffer=lr;var Ve=ce.shader.progVar;if(Ve.contextDep&&ir||Ve.propDep)ot(Yt,Se,ce,null);else{var Xe=Ve.append(Yt,Se);if(Se(Yt.shared.gl,".useProgram(",Xe,".program);"),ce.shader.program)ot(Yt,Se,ce,ce.shader.program);else{Se(Yt.shared.vao,".setVAO(null);");var Ze=Yt.global.def("{}"),Pr=Se.def(Xe,".id"),sn=Se.def(Ze,"[",Pr,"]");Se(Yt.cond(sn).then(sn,".call(this,a0,a1);").else(sn,"=",Ze,"[",Pr,"]=",Yt.link(function(dn){return Cs(ot,Yt,ce,dn,2)}),"(",Xe,");",sn,".call(this,a0,a1);"))}}Object.keys(ce.state).length>0&&Se(Yt.shared.current,".dirty=true;"),Yt.shared.vao&&Se(Yt.shared.vao,".setVAO(null);")}function xt(Yt,ce){var Se=Yt.proc("scope",3);Yt.batchId="a2";var ir=Yt.shared,Ye=ir.current;if(xu(Yt,Se,ce.context),ce.framebuffer&&ce.framebuffer.append(Yt,Se),Gi(Object.keys(ce.state)).forEach(function(hr){var Ve=ce.state[hr],Xe=Ve.append(Yt,Se);Pn(Xe)?Xe.forEach(function(Ze,Pr){ba(Ze)?Se.set(Yt.next[hr],"["+Pr+"]",Ze):Se.set(Yt.next[hr],"["+Pr+"]",Yt.link(Ze,{stable:!0}))}):Ua(Ve)?Se.set(ir.next,"."+hr,Yt.link(Xe,{stable:!0})):Se.set(ir.next,"."+hr,Xe)}),sl(Yt,Se,ce,!0,!0),[Et,ke,Ht,Fe,zt].forEach(function(hr){var Ve=ce.draw[hr];if(Ve){var Xe=Ve.append(Yt,Se);ba(Xe)?Se.set(ir.draw,"."+hr,Xe):Se.set(ir.draw,"."+hr,Yt.link(Xe),{stable:!0})}}),Object.keys(ce.uniforms).forEach(function(hr){var Ve=ce.uniforms[hr].append(Yt,Se);Array.isArray(Ve)&&(Ve="["+Ve.map(function(Xe){return ba(Xe)?Xe:Yt.link(Xe,{stable:!0})})+"]"),Se.set(ir.uniforms,"["+Yt.link(kr.id(hr),{stable:!0})+"]",Ve)}),Object.keys(ce.attributes).forEach(function(hr){var Ve=ce.attributes[hr].append(Yt,Se),Xe=Yt.scopeAttrib(hr);Object.keys(new jn).forEach(function(Ze){Se.set(Xe,"."+Ze,Ve[Ze])})}),ce.scopeVAO){var tr=ce.scopeVAO.append(Yt,Se);ba(tr)?Se.set(ir.vao,".targetVAO",tr):Se.set(ir.vao,".targetVAO",Yt.link(tr,{stable:!0}))}function lr(hr){var Ve=ce.shader[hr];if(Ve){var Xe=Ve.append(Yt,Se);ba(Xe)?Se.set(ir.shader,"."+hr,Xe):Se.set(ir.shader,"."+hr,Yt.link(Xe,{stable:!0}))}}lr(z),lr(ht),Object.keys(ce.state).length>0&&(Se(Ye,".dirty=true;"),Se.exit(Ye,".dirty=true;")),Se("a1(",Yt.shared.context,",a0,",Yt.batchId,");")}function Vt(Yt){if(!(typeof Yt!="object"||Pn(Yt))){for(var ce=Object.keys(Yt),Se=0;Se=0;--Co){var Cs=ba[Co];Cs&&Cs(ia,null,0)}Ir.flush(),$i&&$i.update()}function Eo(){!Fa&&ba.length>0&&(Fa=x.next(vo))}function es(){Fa&&(x.cancel(vo),Fa=null)}function Ul(Co){Co.preventDefault(),es(),Io.forEach(function(Cs){Cs()})}function Al(Co){Ir.getError(),li.restore(),ha.restore(),Bi.restore(),Va.restore(),xi.restore(),ri.restore(),ei.restore(),$i&&$i.restore(),Ea.procs.refresh(),Eo(),wo.forEach(function(Cs){Cs()})}Ji&&(Ji.addEventListener(nl,Ul,!1),Ji.addEventListener(uu,Al,!1));function hs(){ba.length=0,es(),Ji&&(Ji.removeEventListener(nl,Ul),Ji.removeEventListener(uu,Al)),ha.clear(),ri.clear(),xi.clear(),ei.clear(),Va.clear(),Ti.clear(),Bi.clear(),$i&&$i.clear(),_a.forEach(function(Co){Co()})}function ku(Co){function Cs(Ye){var tr=c({},Ye);delete tr.uniforms,delete tr.attributes,delete tr.context,delete tr.vao,"stencil"in tr&&tr.stencil.op&&(tr.stencil.opBack=tr.stencil.opFront=tr.stencil.op,delete tr.stencil.op);function lr(hr){if(hr in tr){var Ve=tr[hr];delete tr[hr],Object.keys(Ve).forEach(function(Xe){tr[hr+"."+Xe]=Ve[Xe]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in Ye&&(tr.vao=Ye.vao),tr}function Ml(Ye,tr){var lr={},hr={};return Object.keys(Ye).forEach(function(Ve){var Xe=Ye[Ve];if(f.isDynamic(Xe)){hr[Ve]=f.unbox(Xe,Ve);return}else if(tr&&Array.isArray(Xe)){for(var Ze=0;Ze0)return ye.call(this,Se(Ye|0),Ye|0)}else if(Array.isArray(Ye)){if(Ye.length)return ye.call(this,Ye,Ye.length)}else return de.call(this,Ye)}return c(ir,{stats:xt,destroy:function(){Vt.destroy()}})}var dl=ri.setFBO=ku({framebuffer:f.define.call(null,Xl,"framebuffer")});function Cu(Co,Cs){var Ml=0;Ea.procs.poll();var yl=Cs.color;yl&&(Ir.clearColor(+yl[0]||0,+yl[1]||0,+yl[2]||0,+yl[3]||0),Ml|=Ku),"depth"in Cs&&(Ir.clearDepth(+Cs.depth),Ml|=du),"stencil"in Cs&&(Ir.clearStencil(Cs.stencil|0),Ml|=_o),Ir.clear(Ml)}function pc(Co){if("framebuffer"in Co)if(Co.framebuffer&&Co.framebuffer_reglType==="framebufferCube")for(var Cs=0;Cs<6;++Cs)dl(c({framebuffer:Co.framebuffer.faces[Cs]},Co),Cu);else dl(Co,Cu);else Cu(null,Co)}function yc(Co){ba.push(Co);function Cs(){var Ml=ru(ba,Co);function yl(){var $=ru(ba,yl);ba[$]=ba[ba.length-1],ba.length-=1,ba.length<=0&&es()}ba[Ml]=yl}return Eo(),{cancel:Cs}}function xu(){var Co=Ki.viewport,Cs=Ki.scissor_box;Co[0]=Co[1]=Cs[0]=Cs[1]=0,ia.viewportWidth=ia.framebufferWidth=ia.drawingBufferWidth=Co[2]=Cs[2]=Ir.drawingBufferWidth,ia.viewportHeight=ia.framebufferHeight=ia.drawingBufferHeight=Co[3]=Cs[3]=Ir.drawingBufferHeight}function pu(){ia.tick+=1,ia.time=No(),xu(),Ea.procs.poll()}function Tu(){Va.refresh(),xu(),Ea.procs.refresh(),$i&&$i.update()}function No(){return(y()-ya)/1e3}Tu();function Au(Co,Cs){var Ml;switch(Co){case"frame":return yc(Cs);case"lost":Ml=Io;break;case"restore":Ml=wo;break;case"destroy":Ml=_a;break}return Ml.push(Cs),{cancel:function(){for(var yl=0;yl=0},read:ma,destroy:hs,_gl:Ir,_refresh:Tu,poll:function(){pu(),$i&&$i.update()},now:No,stats:yn,getCachedCode:sl,preloadCachedCode:Lu});return kr.onDone(null,xc),xc}return wh})}),gT=Dt((Q,Z)=>{var c=xS(),g=NH();Z.exports=function(I,S,t){var e=I._fullLayout,r=!0;return e._glcanvas.each(function(a){if(a.regl){a.regl.preloadCachedCode(t);return}if(!(a.pick&&!e._has("parcoords"))){try{a.regl=g({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:I._context.plotGlPixelRatio||window.devicePixelRatio,extensions:S||[],cachedCode:t||{}})}catch{r=!1}a.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(n){I&&I.emit&&I.emit("plotly_webglcontextlost",{event:n,layer:a.key})},!1)}}),r||c({container:e._glcontainer.node()}),r}}),uE=Dt((f,Z)=>{var c=US(),g=QS(),I=wH(),S=BH(),t=kn(),e=v0().selectMode,r=gT(),a=Tc(),n=ja(),o=BS().styleTextSelection,i={};function l(x,y,v,T){var u=x._size,b=x.width*T,_=x.height*T,P=u.l*T,M=u.b*T,C=u.r*T,A=u.t*T,h=u.w*T,p=u.h*T;return[P+y.domain[0]*h,M+v.domain[0]*p,b-C-(1-y.domain[1])*h,_-A-(1-v.domain[1])*p]}var f=Z.exports=function(x,y,v){if(v.length){var T=x._fullLayout,u=y._scene,b=y.xaxis,_=y.yaxis,P,M;if(u){var C=r(x,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!C){u.init();return}var A=u.count,h=T._glcanvas.data()[0].regl;if(n(x,y,v),u.dirty){if((u.line2d||u.error2d)&&!(u.scatter2d||u.fill2d||u.glText)&&h.clear({color:!0,depth:!0}),u.error2d===!0&&(u.error2d=I(h)),u.line2d===!0&&(u.line2d=g(h)),u.scatter2d===!0&&(u.scatter2d=c(h)),u.fill2d===!0&&(u.fill2d=g(h)),u.glText===!0)for(u.glText=new Array(A),P=0;Pu.glText.length){var p=A-u.glText.length;for(P=0;Pft&&(isNaN(Y[ut])||isNaN(Y[ut+1]));)ut-=2;it.positions=Y.slice(ft,ut+2)}return it}),u.line2d.update(u.lineOptions)),u.error2d){var R=(u.errorXOptions||[]).concat(u.errorYOptions||[]);u.error2d.update(R)}u.scatter2d&&u.scatter2d.update(u.markerOptions),u.fillOrder=t.repeat(null,A),u.fill2d&&(u.fillOptions=u.fillOptions.map(function(it,Y){var ft=v[Y];if(!(!it||!ft||!ft[0]||!ft[0].trace)){var ut=ft[0],kt=ut.trace,It=ut.t,Pt=u.lineOptions[Y],qt,Wt,Jt=[];kt._ownfill&&Jt.push(Y),kt._nexttrace&&Jt.push(Y+1),Jt.length&&(u.fillOrder[Y]=Jt);var ge=[],fe=Pt&&Pt.positions||It.positions,pe,se;if(kt.fill==="tozeroy"){for(pe=0;pepe&&isNaN(fe[se+1]);)se-=2;fe[pe+1]!==0&&(ge=[fe[pe],0]),ge=ge.concat(fe.slice(pe,se+2)),fe[se+1]!==0&&(ge=ge.concat([fe[se],0]))}else if(kt.fill==="tozerox"){for(pe=0;pepe&&isNaN(fe[se]);)se-=2;fe[pe]!==0&&(ge=[0,fe[pe+1]]),ge=ge.concat(fe.slice(pe,se+2)),fe[se]!==0&&(ge=ge.concat([0,fe[se+1]]))}else if(kt.fill==="toself"||kt.fill==="tonext"){for(ge=[],qt=0,it.splitNull=!0,Wt=0;Wt-1;for(P=0;P{var c=_V();c.plot=uE(),Z.exports=c}),UH=Dt((Q,Z)=>{Z.exports=jH()}),cE=Dt((Q,Z)=>{var c=ef(),g=kc(),I=dh().axisHoverFormat,{hovertemplateAttrs:S,templatefallbackAttrs:t}=Zu(),e=T3(),r=ic().idRegex,a=mu().templatedArray,n=Ia().extendFlat,o=c.marker,i=o.line,l=n(g("marker.line",{editTypeOverride:"calc"}),{width:n({},i.width,{editType:"calc"}),editType:"calc"}),f=n(g("marker"),{symbol:o.symbol,angle:o.angle,size:n({},o.size,{editType:"markerSize"}),sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,opacity:o.opacity,colorbar:o.colorbar,line:l,editType:"calc"});f.color.editType=f.cmin.editType=f.cmax.editType="style";function x(y){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:r[y],editType:"plot"}}}Z.exports={dimensions:a("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:n({},e.text,{}),hovertext:n({},e.hovertext,{}),hovertemplate:S(),hovertemplatefallback:t(),xhoverformat:I("x"),yhoverformat:I("y"),marker:f,xaxes:x("x"),yaxes:x("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:e.selected.marker,editType:"calc"},unselected:{marker:e.unselected.marker,editType:"calc"},opacity:e.opacity}}),vT=Dt((Q,Z)=>{Z.exports=function(c,g,I,S){S||(S=1/0);var t,e;for(t=0;t{var c=kn(),g=Ad(),I=cE(),S=Tc(),t=s0(),e=vT(),r=cT().isOpenSymbol;Z.exports=function(o,i,l,f){function x(M,C){return c.coerce(o,i,I,M,C)}var y=g(o,i,{name:"dimensions",handleItemDefaults:a}),v=x("diagonal.visible"),T=x("showupperhalf"),u=x("showlowerhalf"),b=e(i,y,"values");if(!b||!v&&!T&&!u){i.visible=!1;return}x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("xhoverformat"),x("yhoverformat"),t(o,i,l,f,x,{noAngleRef:!0,noStandOff:!0});var _=r(i.marker.symbol),P=S.isBubble(i);x("marker.line.width",_||P?1:0),n(o,i,f,x),c.coerceSelectionMarkerOpacity(i,x)};function a(o,i){function l(x,y){return c.coerce(o,i,I.dimensions,x,y)}l("label");var f=l("values");f&&f.length?l("visible"):i.visible=!1,l("axis.type"),l("axis.matches")}function n(o,i,l,f){var x=i.dimensions,y=x.length,v=i.showupperhalf,T=i.showlowerhalf,u=i.diagonal.visible,b,_,P=new Array(y),M=new Array(y);for(b=0;b_&&v||b<_&&T||b===_&&(u||!T||!v))&&(l._splomSubplots[q]=1)}(!T||!u&&v&&T)&&(l._splomGridDflt.xside="bottom",l._splomGridDflt.yside="left")}}),HH=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=g._fullLayout,t=I.uid,e=S._splomScenes;e||(e=S._splomScenes={});var r={dirty:!0,selectBatch:[],unselectBatch:[]},a={matrix:!1,selectBatch:[],unselectBatch:[]},n=e[I.uid];return n||(n=e[t]=c.extendFlat({},r,a),n.draw=function(){n.matrix&&n.matrix.draw&&(n.selectBatch.length||n.unselectBatch.length?n.matrix.draw(n.unselectBatch,n.selectBatch):n.matrix.draw()),n.dirty=!1},n.destroy=function(){n.matrix&&n.matrix.destroy&&n.matrix.destroy(),n.matrixOptions=null,n.selectBatch=null,n.unselectBatch=null,n=null}),n.dirty||c.extendFlat(n,r),n}}),WH=Dt((Q,Z)=>{var c=kn(),g=Rc(),I=me().calcMarkerSize,S=me().calcAxisExpansion,t=F0(),e=_x().markerSelection,r=_x().markerStyle,a=HH(),n=Ca().BADNUM,o=q1().TOO_MANY_POINTS;Z.exports=function(i,l){var f=l.dimensions,x=l._length,y={},v=y.cdata=[],T=y.data=[],u=l._visibleDims=[],b,_,P,M,C;function A(R,O){for(var j=R.makeCalcdata({v:O.values,vcalendar:l.calendar},"v"),V=0;Vo,k;for(p?k=y.sizeAvg||Math.max(y.size,3):k=I(l,x),_=0;_{(function(){var c,g,I,S,t,e;typeof performance<"u"&&performance!==null&&performance.now?Z.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Z.exports=function(){return(c()-t)/1e6},g=process.hrtime,c=function(){var r;return r=g(),r[0]*1e9+r[1]},S=c(),e=process.uptime()*1e9,t=S-e):Date.now?(Z.exports=function(){return Date.now()-I},I=Date.now()):(Z.exports=function(){return new Date().getTime()-I},I=new Date().getTime())}).call(Q)}),$H=Dt((Q,Z)=>{var c=qH(),g=window,I=["moz","webkit"],S="AnimationFrame",t=g["request"+S],e=g["cancel"+S]||g["cancelRequest"+S];for(r=0;!t&&r{Z.exports=function(c,g){var I=typeof c=="number",S=typeof g=="number";I&&!S?(g=c,c=0):!I&&!S&&(c=0,g=0),c=c|0,g=g|0;var t=g-c;if(t<0)throw new Error("array length must be positive");for(var e=new Array(t),r=0,a=c;r{var c=US(),g=Ig(),I=yx(),S=$H(),t=ZH(),e=vb(),r=xx();Z.exports=a;function a(l,f){if(!(this instanceof a))return new a(l);this.traces=[],this.passes={},this.regl=l,this.scatter=c(l),this.canvas=this.scatter.canvas}a.prototype.render=function(...l){return l.length&&this.update(...l),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=S(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,S(()=>{this.dirty=!1})),this)},a.prototype.update=function(...l){if(!l.length)return;for(let y=0;yw||!v.lower&&k{f[T+b]=y})}this.scatter.draw(...f)}return this},a.prototype.destroy=function(){return this.traces.forEach(l=>{l.buffer&&l.buffer.destroy&&l.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function n(l,f,x){let y=l.id!=null?l.id:l,v=f,T=x;return y<<16|(v&255)<<8|T&255}function o(l,f,x){let y,v,T,u,b=l[f],_=l[x];return b.length>2?(b[0],b[2],y=b[1],v=b[3]):b.length?(y=b[0],v=b[1]):(b.x,y=b.y,b.x+b.width,v=b.y+b.height),_.length>2?(T=_[0],u=_[2],_[1],_[3]):_.length?(T=_[0],u=_[1]):(T=_.x,_.y,u=_.x+_.width,_.y+_.height),[T,y,u,v]}function i(l){if(typeof l=="number")return[l,l,l,l];if(l.length===2)return[l[0],l[1],l[0],l[1]];{let f=e(l);return[f.x,f.y,f.x+f.width,f.y+f.height]}}}),YH=Dt((Q,Z)=>{var c=GH(),g=kn(),I=Rc(),S=v0().selectMode;Z.exports=function(e,r,a){if(a.length)for(var n=0;n-1,H=S(v)||!!o.selectedpoints||V,F=!0;if(H){var U=o._length;if(o.selectedpoints){l.selectBatch=o.selectedpoints;var W=o.selectedpoints,q={};for(b=0;b{Q.getDimIndex=function(Z,c){for(var g=c._id,I=g.charAt(0),S={x:0,y:1}[I],t=Z._visibleDims,e=0;e{var c=hE(),g=uT().calcHover,I=Ls().getFromId,S=Ia().extendFlat;function t(r,a,n,o,i){i||(i={});var l=(o||"").charAt(0)==="x",f=(o||"").charAt(0)==="y",x=e(r,a,n);if((l||f)&&i.hoversubplots==="axis"&&x[0])for(var y=(l?r.xa:r.ya)._subplotsWith,v=i.gd,T=S({},r),u=0;u{var c=kn(),g=c.pushUnique,I=Tc(),S=hE();Z.exports=function(t,e){var r=t.cd,a=r[0].trace,n=r[0].t,o=t.scene,i=o.matrixOptions.cdata,l=t.xaxis,f=t.yaxis,x=[];if(!o)return x;var y=!I.hasMarkers(a)&&!I.hasText(a);if(a.visible!==!0||y)return x;var v=S.getDimIndex(a,l),T=S.getDimIndex(a,f);if(v===!1||T===!1)return x;var u=n.xpx[v],b=n.ypx[T],_=i[v],P=i[T],M=(t.scene.selectBatch||[]).slice(),C=[];if(e!==!1&&!e.degenerate)for(var A=0;A<_.length;A++)e.contains([u[A],b[A]],null,A,t)?(x.push({pointNumber:A,x:_[A],y:P[A]}),g(M,A)):M.indexOf(A)!==-1?g(M,A):C.push(A);var h=o.matrixOptions;return!M.length&&!C.length?o.matrix.update(h,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,c.extendFlat({},h,o.selectedOptions,o.viewOpts)),o.selectBatch=M,o.unselectBatch=C,x}}),JH=Dt((Q,Z)=>{var c=kn(),g=F0(),I=_x().markerStyle;Z.exports=function(S,t){var e=t.trace,r=S._fullLayout._splomScenes[e.uid];if(r){g(S,e),c.extendFlat(r.matrixOptions,I(S,e));var a=c.extendFlat({},r.matrixOptions,r.viewOpts);r.matrix.update(a,null)}}}),QH=Dt((Q,Z)=>{var c=Jo(),g=HM();Z.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:cE(),supplyDefaults:VH(),colorbar:xo(),calc:WH(),plot:YH(),hoverPoints:KH().hoverPoints,selectPoints:XH(),editStyle:JH(),meta:{}},c.register(g)}),tW=Dt((Q,Z)=>{var c=QS(),g=Jo(),I=gT(),S=ud().getModuleCalcData,t=Mf(),e=Rc().getFromId,r=Ls().shouldShowZeroLine,a="splom",n={};function o(v){var T=v._fullLayout,u=g.getModule(a),b=S(v.calcdata,u)[0],_=I(v,["ANGLE_instanced_arrays","OES_element_index_uint"],n);_&&(T._hasOnlyLargeSploms&&f(v),u.plot(v,{},b))}function i(v){var T=v.calcdata,u=v._fullLayout;u._hasOnlyLargeSploms&&f(v);for(var b=0;b{var c=QH();c.basePlotModule=tW(),Z.exports=c}),rW=Dt((Q,Z)=>{Z.exports=eW()}),fE=Dt((Q,Z)=>{var c=kc(),g=Td(),I=da(),S=jh().attributes,t=Ia().extendFlat,e=mu().templatedArray;Z.exports={domain:S({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:I({editType:"plot"}),tickfont:I({autoShadowDflt:!0,editType:"plot"}),rangefont:I({editType:"plot"}),dimensions:e("dimension",{label:{valType:"string",editType:"plot"},tickvals:t({},g.tickvals,{editType:"plot"}),ticktext:t({},g.ticktext,{editType:"plot"}),tickformat:t({},g.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:t({editType:"calc"},c("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}}),E3=Dt((Q,Z)=>{Z.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}}),zg=Dt((Q,Z)=>{var c=w1();function g(I){return[I]}Z.exports={keyFun:function(I){return I.key},repeat:g,descend:c,wrap:g,unwrap:function(I){return I[0]}}}),dE=Dt((Q,Z)=>{var c=E3(),g=qr(),I=zg().keyFun,S=zg().repeat,t=kn().sorterAsc,e=kn().strTranslate,r=c.bar.snapRatio;function a(q,J){return q*(1-r)+J*r}var n=c.bar.snapClose;function o(q,J){return q*(1-n)+J*n}function i(q,J,lt,yt){if(l(lt,yt))return lt;var mt=q?-1:1,st=0,tt=J.length-1;if(mt<0){var dt=st;st=tt,tt=dt}for(var rt=J[st],at=rt,vt=st;mt*vt=J[lt][0]&&q<=J[lt][1])return!0;return!1}function f(q){q.attr("x",-c.bar.captureWidth/2).attr("width",c.bar.captureWidth)}function x(q){q.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function y(q){if(!q.brush.filterSpecified)return"0,"+q.height;for(var J=v(q.brush.filter.getConsolidated(),q.height),lt=[0],yt,mt,st,tt=J.length?J[0][0]:null,dt=0;dtq[1]+lt||J=.9*q[1]+.1*q[0]?"n":J<=.9*q[0]+.1*q[1]?"s":"ns"}function u(){g.select(document.body).style("cursor",null)}function b(q){q.attr("stroke-dasharray",y)}function _(q,J){var lt=g.select(q).selectAll(".highlight, .highlight-shadow"),yt=J?lt.transition().duration(c.bar.snapDuration).each("end",J):lt;b(yt)}function P(q,J){var lt=q.brush,yt=lt.filterSpecified,mt=NaN,st={},tt;if(yt){var dt=q.height,rt=lt.filter.getConsolidated(),at=v(rt,dt),vt=NaN,it=NaN,Y=NaN;for(tt=0;tt<=at.length;tt++){var ft=at[tt];if(ft&&ft[0]<=J&&J<=ft[1]){vt=tt;break}else if(it=tt?tt-1:NaN,ft&&ft[0]>J){Y=tt;break}}if(mt=vt,isNaN(mt)&&(isNaN(it)||isNaN(Y)?mt=isNaN(it)?Y:it:mt=J-at[it][1]=qt[0]&&Pt<=qt[1]){st.clickableOrdinalRange=qt;break}}}return st}function M(q,J){g.event.sourceEvent.stopPropagation();var lt=J.height-g.mouse(q)[1]-2*c.verticalPadding,yt=J.unitToPaddedPx.invert(lt),mt=J.brush,st=P(J,lt),tt=st.interval,dt=mt.svgBrush;if(dt.wasDragged=!1,dt.grabbingBar=st.region==="ns",dt.grabbingBar){var rt=tt.map(J.unitToPaddedPx);dt.grabPoint=lt-rt[0]-c.verticalPadding,dt.barLength=rt[1]-rt[0]}dt.clickableOrdinalRange=st.clickableOrdinalRange,dt.stayingIntervals=J.multiselect&&mt.filterSpecified?mt.filter.getConsolidated():[],tt&&(dt.stayingIntervals=dt.stayingIntervals.filter(function(at){return at[0]!==tt[0]&&at[1]!==tt[1]})),dt.startExtent=st.region?tt[st.region==="s"?1:0]:yt,J.parent.inBrushDrag=!0,dt.brushStartCallback()}function C(q,J){g.event.sourceEvent.stopPropagation();var lt=J.height-g.mouse(q)[1]-2*c.verticalPadding,yt=J.brush.svgBrush;yt.wasDragged=!0,yt._dragging=!0,yt.grabbingBar?yt.newExtent=[lt-yt.grabPoint,lt+yt.barLength-yt.grabPoint].map(J.unitToPaddedPx.invert):yt.newExtent=[yt.startExtent,J.unitToPaddedPx.invert(lt)].sort(t),J.brush.filterSpecified=!0,yt.extent=yt.stayingIntervals.concat([yt.newExtent]),yt.brushCallback(J),_(q.parentNode)}function A(q,J){var lt=J.brush,yt=lt.filter,mt=lt.svgBrush;mt._dragging||(h(q,J),C(q,J),J.brush.svgBrush.wasDragged=!1),mt._dragging=!1;var st=g.event;st.sourceEvent.stopPropagation();var tt=mt.grabbingBar;if(mt.grabbingBar=!1,mt.grabLocation=void 0,J.parent.inBrushDrag=!1,u(),!mt.wasDragged){mt.wasDragged=void 0,mt.clickableOrdinalRange?lt.filterSpecified&&J.multiselect?mt.extent.push(mt.clickableOrdinalRange):(mt.extent=[mt.clickableOrdinalRange],lt.filterSpecified=!0):tt?(mt.extent=mt.stayingIntervals,mt.extent.length===0&&j(lt)):j(lt),mt.brushCallback(J),_(q.parentNode),mt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[]);return}var dt=function(){yt.set(yt.getConsolidated())};if(J.ordinal){var rt=J.unitTickvals;rt[rt.length-1]mt.newExtent[0];mt.extent=mt.stayingIntervals.concat(at?[mt.newExtent]:[]),mt.extent.length||j(lt),mt.brushCallback(J),at?_(q.parentNode,dt):(dt(),_(q.parentNode))}else dt();mt.brushEndCallback(lt.filterSpecified?yt.getConsolidated():[])}function h(q,J){var lt=J.height-g.mouse(q)[1]-2*c.verticalPadding,yt=P(J,lt),mt="crosshair";yt.clickableOrdinalRange?mt="pointer":yt.region&&(mt=yt.region+"-resize"),g.select(document.body).style("cursor",mt)}function p(q){q.on("mousemove",function(J){g.event.preventDefault(),J.parent.inBrushDrag||h(this,J)}).on("mouseleave",function(J){J.parent.inBrushDrag||u()}).call(g.behavior.drag().on("dragstart",function(J){M(this,J)}).on("drag",function(J){C(this,J)}).on("dragend",function(J){A(this,J)}))}function k(q,J){return q[0]-J[0]}function w(q,J,lt){var yt=lt._context.staticPlot,mt=q.selectAll(".background").data(S);mt.enter().append("rect").classed("background",!0).call(f).call(x).style("pointer-events",yt?"none":"auto").attr("transform",e(0,c.verticalPadding)),mt.call(p).attr("height",function(dt){return dt.height-c.verticalPadding});var st=q.selectAll(".highlight-shadow").data(S);st.enter().append("line").classed("highlight-shadow",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width+c.bar.strokeWidth).attr("stroke",J).attr("opacity",c.bar.strokeOpacity).attr("stroke-linecap","butt"),st.attr("y1",function(dt){return dt.height}).call(b);var tt=q.selectAll(".highlight").data(S);tt.enter().append("line").classed("highlight",!0).attr("x",-c.bar.width/2).attr("stroke-width",c.bar.width-c.bar.strokeWidth).attr("stroke",c.bar.fillColor).attr("opacity",c.bar.fillOpacity).attr("stroke-linecap","butt"),tt.attr("y1",function(dt){return dt.height}).call(b)}function R(q,J,lt){var yt=q.selectAll("."+c.cn.axisBrush).data(S,I);yt.enter().append("g").classed(c.cn.axisBrush,!0),w(yt,J,lt)}function O(q){return q.svgBrush.extent.map(function(J){return J.slice()})}function j(q){q.filterSpecified=!1,q.svgBrush.extent=[[-1/0,1/0]]}function V(q){return function(J){var lt=J.brush,yt=O(lt),mt=yt.slice();lt.filter.set(mt),q()}}function H(q){for(var J=q.slice(),lt=[],yt,mt=J.shift();mt;){for(yt=mt.slice();(mt=J.shift())&&mt[0]<=yt[1];)yt[1]=Math.max(yt[1],mt[1]);lt.push(yt)}return lt.length===1&<[0][0]>lt[0][1]&&(lt=[]),lt}function F(){var q=[],J,lt;return{set:function(yt){q=yt.map(function(mt){return mt.slice().sort(t)}).sort(k),q.length===1&&q[0][0]===-1/0&&q[0][1]===1/0&&(q=[[0,-1]]),J=H(q),lt=q.reduce(function(mt,st){return[Math.min(mt[0],st[0]),Math.max(mt[1],st[1])]},[1/0,-1/0])},get:function(){return q.slice()},getConsolidated:function(){return J},getBounds:function(){return lt}}}function U(q,J,lt,yt,mt,st){var tt=F();return tt.set(lt),{filter:tt,filterSpecified:J,svgBrush:{extent:[],brushStartCallback:yt,brushCallback:V(mt),brushEndCallback:st}}}function W(q,J){if(Array.isArray(q[0])?(q=q.map(function(yt){return yt.sort(t)}),J.multiselect?q=H(q.sort(k)):q=[q[0]]):q=[q.sort(t)],J.tickvals){var lt=J.tickvals.slice().sort(t);if(q=q.map(function(yt){var mt=[i(0,lt,yt[0],[]),i(1,lt,yt[1],[])];if(mt[1]>mt[0])return mt}).filter(function(yt){return yt}),!q.length)return}return q.length>1?q:q[0]}Z.exports={makeBrush:U,ensureAxisBrush:R,cleanRanges:W}}),nW=Dt((Q,Z)=>{var c=kn(),g=Ud().hasColorscale,I=mc(),S=jh().defaults,t=Ad(),e=Ls(),r=fE(),a=dE(),n=E3().maxDimensionCount,o=vT();function i(f,x,y,v,T){var u=T("line.color",y);if(g(f,"line")&&c.isArrayOrTypedArray(u)){if(u.length)return T("line.colorscale"),I(f,x,v,T,{prefix:"line.",cLetter:"c"}),u.length;x.line.color=y}return 1/0}function l(f,x,y,v){function T(M,C){return c.coerce(f,x,r.dimensions,M,C)}var u=T("values"),b=T("visible");if(u&&u.length||(b=x.visible=!1),b){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var _=T("range");x._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:_},e.setConvert(x._ax,v.layout),T("multiselect");var P=T("constraintrange");P&&(x.constraintrange=a.cleanRanges(P,x))}}Z.exports=function(f,x,y,v){function T(M,C){return c.coerce(f,x,r,M,C)}var u=f.dimensions;Array.isArray(u)&&u.length>n&&(c.log("parcoords traces support up to "+n+" dimensions at the moment"),u.splice(n));var b=t(f,x,{name:"dimensions",layout:v,handleItemDefaults:l}),_=i(f,x,y,v,T);S(x,v,T),(!Array.isArray(b)||!b.length)&&(x.visible=!1),o(x,b,"values",_);var P=c.extendFlat({},v.font,{size:Math.round(v.font.size/1.2)});c.coerceFont(T,"labelfont",P),c.coerceFont(T,"tickfont",P,{autoShadowDflt:!0}),c.coerceFont(T,"rangefont",P),T("labelangle"),T("labelside"),T("unselected.line.color"),T("unselected.line.opacity")}}),iW=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray,g=Xc(),I=zg().wrap;Z.exports=function(t,e){var r,a;return g.hasColorscale(e,"line")&&c(e.line.color)?(r=e.line.color,a=g.extractOpts(e.line).colorscale,g.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=S(e._length),a=[[0,e.line.color],[1,e.line.color]]),I({lineColor:r,cscale:a})};function S(t){for(var e=new Array(t),r=0;r>>16,(Q&65280)>>>8,Q&255],alpha:1};if(typeof Q=="number")return{space:"rgb",values:[Q>>>16,(Q&65280)>>>8,Q&255],alpha:1};if(Q=String(Q).toLowerCase(),yT.default[Q])I=yT.default[Q].slice(),t="rgb";else if(Q==="transparent")S=0,t="rgb",I=[0,0,0];else if(Q[0]==="#"){var e=Q.slice(1),r=e.length,a=r<=4;S=1,a?(I=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],r===4&&(S=parseInt(e[3]+e[3],16)/255)):(I=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],r===8&&(S=parseInt(e[6]+e[7],16)/255)),I[0]||(I[0]=0),I[1]||(I[1]=0),I[2]||(I[2]=0),t="rgb"}else if(g=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Q)){var n=g[1];t=n.replace(/a$/,"");var o=t==="cmyk"?4:t==="gray"?1:3;I=g[2].trim().split(/\s*[,\/]\s*|\s+/),t==="color"&&(t=I.shift()),I=I.map(function(i,l){if(i[i.length-1]==="%")return i=parseFloat(i)/100,l===3?i:t==="rgb"?i*255:t[0]==="h"||t[0]==="l"&&!l?i*100:t==="lab"?i*125:t==="lch"?l<2?i*150:i*360:t[0]==="o"&&!l?i:t==="oklab"?i*.4:t==="oklch"?l<2?i*.4:i*360:i;if(t[l]==="h"||l===2&&t[t.length-1]==="h"){if(xT[i]!==void 0)return xT[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),S=I.length>o?I.pop():1}else/[0-9](?:\s|\/|,)/.test(Q)&&(I=Q.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),t=((c=(Z=Q.match(/([a-z])/ig))==null?void 0:Z.join(""))==null?void 0:c.toLowerCase())||"rgb");return{space:t,values:I,alpha:S}}var yT,pE,xT,oW=mn(()=>{yT=Bn(gS()),pE=aW,xT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}),C3,mE=mn(()=>{C3={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}),L3,sW=mn(()=>{mE(),L3={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Q){var Z=Q[0]/360,c=Q[1]/100,g=Q[2]/100,I,S,t,e,r,a=0;if(c===0)return r=g*255,[r,r,r];for(S=g<.5?g*(1+c):g+c-g*c,I=2*g-S,e=[0,0,0];a<3;)t=Z+1/3*-(a-1),t<0?t++:t>1&&t--,r=6*t<1?I+(S-I)*6*t:2*t<1?S:3*t<2?I+(S-I)*(2/3-t)*6:I,e[a++]=r*255;return e}},C3.hsl=function(Q){var Z=Q[0]/255,c=Q[1]/255,g=Q[2]/255,I=Math.min(Z,c,g),S=Math.max(Z,c,g),t=S-I,e,r,a;return S===I?e=0:Z===S?e=(c-g)/t:c===S?e=2+(g-Z)/t:g===S&&(e=4+(Z-c)/t),e=Math.min(e*60,360),e<0&&(e+=360),a=(I+S)/2,S===I?r=0:a<=.5?r=t/(S+I):r=t/(2-S-I),[e,r*100,a*100]}}),gE={};cn(gE,{default:()=>lW});function lW(Q){Array.isArray(Q)&&Q.raw&&(Q=String.raw(...arguments)),Q instanceof Number&&(Q=+Q);var Z,c=pE(Q);if(!c.space)return[];let g=c.space[0]==="h"?L3.min:C3.min,I=c.space[0]==="h"?L3.max:C3.max;return Z=Array(3),Z[0]=Math.min(Math.max(c.values[0],g[0]),I[0]),Z[1]=Math.min(Math.max(c.values[1],g[1]),I[1]),Z[2]=Math.min(Math.max(c.values[2],g[2]),I[2]),c.space[0]==="h"&&(Z=L3.rgb(Z)),Z.push(Math.min(Math.max(c.alpha,0),1)),Z}var uW=mn(()=>{oW(),mE(),sW()}),vE=Dt(Q=>{var Z=kn().isTypedArray;Q.convertTypedArray=function(c){return Z(c)?Array.prototype.slice.call(c):c},Q.isOrdinal=function(c){return!!c.tickvals},Q.isVisible=function(c){return c.visible||!("visible"in c)}}),cW=Dt((Q,Z)=>{var c=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` `),g=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),P=A3().maxDimensionCount,S=_n(),t=1e-6,e=2048,r=new Uint8Array(4),a=new Uint8Array(4),n={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function o(A){A.read({x:0,y:0,width:1,height:1,data:r})}function i(A,h,p,k,w){var R=A._gl;R.enable(R.SCISSOR_TEST),R.scissor(h,p,k,w),A.clear({color:[0,0,0,0],depth:1})}function s(A,h,p,k,w,R){var O=R.key;function N(V){var H=Math.min(k,w-V*k);V===0&&(window.cancelAnimationFrame(p.currentRafs[O]),delete p.currentRafs[O],i(A,R.scissorX,R.scissorY,R.scissorWidth,R.viewBoxSize[1])),!p.clearOnly&&(R.count=2*H,R.offset=2*V*k,h(R),V*k+H>>8*h)%256/255}function v(A,h,p){for(var k=new Array(A*(P+4)),w=0,R=0;RHt&&(Ht=it[wt].dim1.canvasX,Pt=wt);ut===0&&i(w,0,0,H.canvasWidth,H.canvasHeight);var Jt=tt(p);for(wt=0;wt{var c=En(),g=_n(),P=g.isArrayOrTypedArray,S=g.numberFormat,t=(jH(),ai(iE)).default,e=Ls(),r=g.strRotate,a=g.strTranslate,n=tc(),o=Vs(),i=Xc(),s=Ig(),f=s.keyFun,x=s.repeat,y=s.unwrap,v=aE(),T=A3(),u=eE(),b=UH();function _(yt,pt,st){return g.aggNums(yt,null,pt,st)}function C(yt,pt){return E(_(Math.min,yt,pt),_(Math.max,yt,pt))}function M(yt){var pt=yt.range;return pt?E(pt[0],pt[1]):C(yt.values,yt._length)}function E(yt,pt){return(isNaN(yt)||!isFinite(yt))&&(yt=0),(isNaN(pt)||!isFinite(pt))&&(pt=0),yt===pt&&(yt===0?(yt-=1,pt+=1):(yt*=.9,pt*=1.1)),[yt,pt]}function A(yt,pt){return pt?function(st,tt){var dt=pt[tt];return dt??yt(st)}:yt}function h(yt,pt,st,tt,dt){var rt=M(st);return tt?c.scale.ordinal().domain(tt.map(A(S(st.tickformat),dt))).range(tt.map(function(at){var vt=(at-rt[0])/(rt[1]-rt[0]);return yt-pt+vt*(2*pt-yt)})):c.scale.linear().domain(rt).range([yt-pt,pt])}function p(yt,pt){return c.scale.linear().range([pt,yt-pt])}function k(yt,pt){return c.scale.linear().domain(M(yt)).range([pt,1-pt])}function w(yt){if(yt.tickvals){var pt=M(yt);return c.scale.ordinal().domain(yt.tickvals).range(yt.tickvals.map(function(st){return(st-pt[0])/(pt[1]-pt[0])}))}}function R(yt){var pt=yt.map(function(rt){return rt[0]}),st=yt.map(function(rt){var at=t(rt[1]);return c.rgb("rgb("+at[0]+","+at[1]+","+at[2]+")")}),tt=function(rt){return function(at){return at[rt]}},dt="rgb".split("").map(function(rt){return c.scale.linear().clamp(!0).domain(pt).range(st.map(tt(rt)))});return function(rt){return dt.map(function(at){return at(rt)})}}function O(yt){return yt.dimensions.some(function(pt){return pt.brush.filterSpecified})}function N(yt,pt,st){var tt=y(pt),dt=tt.trace,rt=v.convertTypedArray(tt.lineColor),at=dt.line,vt={color:t(dt.unselected.line.color),opacity:dt.unselected.line.opacity},it=i.extractOpts(at),Y=it.reversescale?i.flipScale(tt.cscale):tt.cscale,ft=dt.domain,ut=dt.dimensions,wt=yt.width,zt=dt.labelangle,Pt=dt.labelside,Wt=dt.labelfont,Ht=dt.tickfont,Jt=dt.rangefont,ge=g.extendDeepNoArrays({},at,{color:rt.map(c.scale.linear().domain(M({values:rt,range:[it.min,it.max],_length:dt._length}))),blockLineCount:T.blockLineCount,canvasOverdrag:T.overdrag*T.canvasPixelRatio}),he=Math.floor(wt*(ft.x[1]-ft.x[0])),de=Math.floor(yt.height*(ft.y[1]-ft.y[0])),se=yt.margin||{l:80,r:80,t:100,b:80},Tt=he,Lt=de;return{key:st,colCount:ut.filter(v.isVisible).length,dimensions:ut,tickDistance:T.tickDistance,unitToColor:R(Y),lines:ge,deselectedLines:vt,labelAngle:zt,labelSide:Pt,labelFont:Wt,tickFont:Ht,rangeFont:Jt,layoutWidth:wt,layoutHeight:yt.height,domain:ft,translateX:ft.x[0]*wt,translateY:yt.height-ft.y[1]*yt.height,pad:se,canvasWidth:Tt*T.canvasPixelRatio+2*ge.canvasOverdrag,canvasHeight:Lt*T.canvasPixelRatio,width:Tt,height:Lt,canvasPixelRatio:T.canvasPixelRatio}}function V(yt,pt,st){var tt=st.width,dt=st.height,rt=st.dimensions,at=st.canvasPixelRatio,vt=function(wt){return tt*wt/Math.max(1,st.colCount-1)},it=T.verticalPadding/dt,Y=p(dt,T.verticalPadding),ft={key:st.key,xScale:vt,model:st,inBrushDrag:!1},ut={};return ft.dimensions=rt.filter(v.isVisible).map(function(wt,zt){var Pt=k(wt,it),Wt=ut[wt.label];ut[wt.label]=(Wt||0)+1;var Ht=wt.label+(Wt?"__"+Wt:""),Jt=wt.constraintrange,ge=Jt&&Jt.length;ge&&!P(Jt[0])&&(Jt=[Jt]);var he=ge?Jt.map(function(He){return He.map(Pt)}):[[-1/0,1/0]],de=function(){var He=ft;He.focusLayer&&He.focusLayer.render(He.panels,!0);var Ge=O(He);!yt.contextShown()&&Ge?(He.contextLayer&&He.contextLayer.render(He.panels,!0),yt.contextShown(!0)):yt.contextShown()&&!Ge&&(He.contextLayer&&He.contextLayer.render(He.panels,!0,!0),yt.contextShown(!1))},se=wt.values;se.length>wt._length&&(se=se.slice(0,wt._length));var Tt=wt.tickvals,Lt;function Mt(He,Ge){return{val:He,text:Lt[Ge]}}function te(He,Ge){return He.val-Ge.val}if(P(Tt)&&Tt.length){g.isTypedArray(Tt)&&(Tt=Array.from(Tt)),Lt=wt.ticktext,!P(Lt)||!Lt.length?Lt=Tt.map(S(wt.tickformat)):Lt.length>Tt.length?Lt=Lt.slice(0,Tt.length):Tt.length>Lt.length&&(Tt=Tt.slice(0,Lt.length));for(var ve=1;ve=He||jr>=Ge)return;var Hr=oe.lineLayer.readPixel(ur,Ge-1-jr),br=Hr[3]!==0,Kr=br?Hr[2]+256*(Hr[1]+256*Hr[0]):null,rn={x:ur,y:jr,clientX:Te.clientX,clientY:Te.clientY,dataIndex:oe.model.key,curveNumber:Kr};Kr!==zt&&(br?tt.hover(rn):tt.unhover&&tt.unhover(rn),zt=Kr)}}),wt.style("opacity",function(oe){return oe.pick?0:1}),at.style("background","rgba(255, 255, 255, 0)");var Wt=at.selectAll("."+T.cn.parcoords).data(ut,f);Wt.exit().remove(),Wt.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Wt.attr("transform",function(oe){return a(oe.model.translateX,oe.model.translateY)});var Ht=Wt.selectAll("."+T.cn.parcoordsControlView).data(x,f);Ht.enter().append("g").classed(T.cn.parcoordsControlView,!0),Ht.attr("transform",function(oe){return a(oe.model.pad.l,oe.model.pad.t)});var Jt=Ht.selectAll("."+T.cn.yAxis).data(function(oe){return oe.dimensions},f);Jt.enter().append("g").classed(T.cn.yAxis,!0),Ht.each(function(oe){W(Jt,oe,it)}),wt.each(function(oe){if(oe.viewModel){!oe.lineLayer||tt?oe.lineLayer=b(this,oe):oe.lineLayer.update(oe),(oe.key||oe.key===0)&&(oe.viewModel[oe.key]=oe.lineLayer);var Te=!oe.context||tt;oe.lineLayer.render(oe.viewModel.panels,Te)}}),Jt.attr("transform",function(oe){return a(oe.xScale(oe.xIndex),0)}),Jt.call(c.behavior.drag().origin(function(oe){return oe}).on("drag",function(oe){var Te=oe.parent;ft.linePickActive(!1),oe.x=Math.max(-T.overdrag,Math.min(oe.model.width+T.overdrag,c.event.x)),oe.canvasX=oe.x*oe.model.canvasPixelRatio,Jt.sort(function(He,Ge){return He.x-Ge.x}).each(function(He,Ge){He.xIndex=Ge,He.x=oe===He?He.x:He.xScale(He.xIndex),He.canvasX=He.x*He.model.canvasPixelRatio}),W(Jt,Te,it),Jt.filter(function(He){return Math.abs(oe.xIndex-He.xIndex)!==0}).attr("transform",function(He){return a(He.xScale(He.xIndex),0)}),c.select(this).attr("transform",a(oe.x,0)),Jt.each(function(He,Ge,cr){cr===oe.parent.key&&(Te.dimensions[Ge]=He)}),Te.contextLayer&&Te.contextLayer.render(Te.panels,!1,!O(Te)),Te.focusLayer.render&&Te.focusLayer.render(Te.panels)}).on("dragend",function(oe){var Te=oe.parent;oe.x=oe.xScale(oe.xIndex),oe.canvasX=oe.x*oe.model.canvasPixelRatio,W(Jt,Te,it),c.select(this).attr("transform",function(He){return a(He.x,0)}),Te.contextLayer&&Te.contextLayer.render(Te.panels,!1,!O(Te)),Te.focusLayer&&Te.focusLayer.render(Te.panels),Te.pickLayer&&Te.pickLayer.render(Te.panels,!0),ft.linePickActive(!0),tt&&tt.axesMoved&&tt.axesMoved(Te.key,Te.dimensions.map(function(He){return He.crossfilterDimensionIndex}))})),Jt.exit().remove();var ge=Jt.selectAll("."+T.cn.axisOverlays).data(x,f);ge.enter().append("g").classed(T.cn.axisOverlays,!0),ge.selectAll("."+T.cn.axis).remove();var he=ge.selectAll("."+T.cn.axis).data(x,f);he.enter().append("g").classed(T.cn.axis,!0),he.each(function(oe){var Te=oe.model.height/oe.model.tickDistance,He=oe.domainScale,Ge=He.domain();c.select(this).call(c.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Te,oe.tickFormat).tickValues(oe.ordinal?Ge:null).tickFormat(function(cr){return v.isOrdinal(oe)?cr:X(oe.model.dimensions[oe.visibleIndex],cr)}).scale(He)),o.font(he.selectAll("text"),oe.model.tickFont)}),he.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),he.selectAll("text").style("cursor","default");var de=ge.selectAll("."+T.cn.axisHeading).data(x,f);de.enter().append("g").classed(T.cn.axisHeading,!0);var se=de.selectAll("."+T.cn.axisTitle).data(x,f);se.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",dt?"none":"auto"),se.text(function(oe){return oe.label}).each(function(oe){var Te=c.select(this);o.font(Te,oe.model.labelFont),n.convertToTspans(Te,yt)}).attr("transform",function(oe){var Te=U(oe.model.labelAngle,oe.model.labelSide),He=T.axisTitleOffset;return(Te.dir>0?"":a(0,2*He+oe.model.height))+r(Te.degrees)+a(-He*Te.dx,-He*Te.dy)}).attr("text-anchor",function(oe){var Te=U(oe.model.labelAngle,oe.model.labelSide),He=Math.abs(Te.dx),Ge=Math.abs(Te.dy);return 2*He>Ge?Te.dir*Te.dx<0?"start":"end":"middle"});var Tt=ge.selectAll("."+T.cn.axisExtent).data(x,f);Tt.enter().append("g").classed(T.cn.axisExtent,!0);var Lt=Tt.selectAll("."+T.cn.axisExtentTop).data(x,f);Lt.enter().append("g").classed(T.cn.axisExtentTop,!0),Lt.attr("transform",a(0,-T.axisExtentOffset));var Mt=Lt.selectAll("."+T.cn.axisExtentTopText).data(x,f);Mt.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(H),Mt.text(function(oe){return lt(oe,!0)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)});var te=Tt.selectAll("."+T.cn.axisExtentBottom).data(x,f);te.enter().append("g").classed(T.cn.axisExtentBottom,!0),te.attr("transform",function(oe){return a(0,oe.model.height+T.axisExtentOffset)});var ve=te.selectAll("."+T.cn.axisExtentBottomText).data(x,f);ve.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(H),ve.text(function(oe){return lt(oe,!1)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)}),u.ensureAxisBrush(ge,Y,yt)}}),oE=Ft((r,$)=>{var c=VH(),g=uT(),P=aE().isVisible,S={};function t(a,n,o){var i=n.indexOf(o),s=a.indexOf(i);return s===-1&&(s+=n.length),s}function e(a,n){return function(o,i){return t(a,n,o)-t(a,n,i)}}var r=$.exports=function(a,n){var o=a._fullLayout,i=g(a,[],S);if(i){var s={},f={},x={},y={},v=o._size;n.forEach(function(C,M){var E=C[0].trace;x[M]=E.index;var A=y[M]=E.index;s[M]=a.data[A].dimensions,f[M]=a.data[A].dimensions.slice()});var T=function(C,M,E){var A=f[C][M],h=E.map(function(N){return N.slice()}),p="dimensions["+M+"].constraintrange",k=o._tracePreGUI[a._fullData[x[C]]._fullInput.uid];if(k[p]===void 0){var w=A.constraintrange;k[p]=w||null}var R=a._fullData[x[C]].dimensions[M];h.length?(h.length===1&&(h=h[0]),A.constraintrange=h,R.constraintrange=h.slice(),h=[h]):(delete A.constraintrange,delete R.constraintrange,h=null);var O={};O[p]=h,a.emit("plotly_restyle",[O,[y[C]]])},u=function(C){a.emit("plotly_hover",C)},b=function(C){a.emit("plotly_unhover",C)},_=function(C,M){var E=e(M,f[C].filter(P));s[C].sort(E),f[C].filter(function(A){return!P(A)}).sort(function(A){return f[C].indexOf(A)}).forEach(function(A){s[C].splice(s[C].indexOf(A),1),s[C].splice(f[C].indexOf(A),0,A)}),a.emit("plotly_restyle",[{dimensions:[s[C]]},[y[C]]])};c(a,n,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:T,hover:u,unhover:b,axesMoved:_})}};r.reglPrecompiled=S}),HH=Ft(Q=>{var $=En(),c=dd().getModuleCalcData,g=oE(),P=Bp();Q.name="parcoords",Q.plot=function(S){var t=c(S.calcdata,"parcoords")[0];t.length&&g(S,t)},Q.clean=function(S,t,e,r){var a=r._has&&r._has("parcoords"),n=t._has&&t._has("parcoords");a&&!n&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},Q.toSVG=function(S){var t=S._fullLayout._glimages,e=$.select(S).selectAll(".svg-container"),r=e.filter(function(n,o){return o===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var n=this,o=n.toDataURL("image/png"),i=t.append("svg:image");i.attr({xmlns:P.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}r.each(a),window.setTimeout(function(){$.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}),WH=Ft((Q,$)=>{$.exports={attributes:tE(),supplyDefaults:OH(),calc:DH(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:HH(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}),qH=Ft((Q,$)=>{var c=WH();c.plot=oE(),$.exports=c}),ZH=Ft((Q,$)=>{$.exports=qH()}),sE=Ft((Q,$)=>{var c=ya().extendFlat,g=Yo(),P=ka(),S=Ac(),{hovertemplateAttrs:t,templatefallbackAttrs:e}=$u(),r=jh().attributes,a=c({editType:"calc"},S("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});$.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:c({},g.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:P({editType:"calc"}),tickfont:P({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:a,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}),$H=Ft((Q,$)=>{var c=_n(),g=Zd().hasColorscale,P=gc(),S=jh().defaults,t=Ld(),e=sE(),r=cT(),a=Va().isTypedArraySpec;function n(i,s,f,x,y){y("line.shape"),y("line.hovertemplate"),y("line.hovertemplatefallback");var v=y("line.color",x.colorway[0]);if(g(i,"line")&&c.isArrayOrTypedArray(v)){if(v.length)return y("line.colorscale"),P(i,s,x,y,{prefix:"line.",cLetter:"c"}),v.length;s.line.color=f}return 1/0}function o(i,s){function f(_,C){return c.coerce(i,s,e.dimensions,_,C)}var x=f("values"),y=f("visible");if(x&&x.length||(y=s.visible=!1),y){f("label"),f("displayindex",s._index);var v=i.categoryarray,T=c.isArrayOrTypedArray(v)&&v.length>0||a(v),u;T&&(u="array");var b=f("categoryorder",u);b==="array"?(f("categoryarray"),f("ticktext")):(delete i.categoryarray,delete i.ticktext),!T&&b==="array"&&(s.categoryorder="trace")}}$.exports=function(i,s,f,x){function y(b,_){return c.coerce(i,s,e,b,_)}var v=t(i,s,{name:"dimensions",handleItemDefaults:o}),T=n(i,s,f,x,y);S(s,x,y),(!Array.isArray(v)||!v.length)&&(s.visible=!1),r(s,v,"values",T),y("hoveron"),y("hovertemplate"),y("hovertemplatefallback"),y("arrangement"),y("bundlecolors"),y("sortpaths"),y("counts");var u=x.font;c.coerceFont(y,"labelfont",u,{overrideDflt:{size:Math.round(u.size)}}),c.coerceFont(y,"tickfont",u,{autoShadowDflt:!0,overrideDflt:{size:Math.round(u.size/1.2)}})}}),GH=Ft((Q,$)=>{var c=Ig().wrap,g=Zd().hasColorscale,P=ep(),S=Lc(),t=Vs(),e=_n(),r=ia();$.exports=function(u,b){var _=e.filterVisible(b.dimensions);if(_.length===0)return[];var C=_.map(function(st){var tt;if(st.categoryorder==="trace")tt=null;else if(st.categoryorder==="array")tt=st.categoryarray;else{tt=S(st.values);for(var dt=!0,rt=0;rt=u.length||b[u[_]]!==void 0)return!1;b[u[_]]=!0}return!0}}),YH=Ft((Q,$)=>{var c=En(),g=(px(),ai(j1)).interpolateNumber,P=K_(),S=Qh(),t=_n(),e=t.strTranslate,r=Vs(),a=eo(),n=tc();function o(at,vt,it,Y){var ft=vt._context.staticPlot,ut=at.map(pt.bind(0,vt,it)),wt=Y.selectAll("g.parcatslayer").data([null]);wt.enter().append("g").attr("class","parcatslayer").style("pointer-events",ft?"none":"all");var zt=wt.selectAll("g.trace.parcats").data(ut,i),Pt=zt.enter().append("g").attr("class","trace parcats");zt.attr("transform",function(Mt){return e(Mt.x,Mt.y)}),Pt.append("g").attr("class","paths");var Wt=zt.select("g.paths"),Ht=Wt.selectAll("path.path").data(function(Mt){return Mt.paths},i);Ht.attr("fill",function(Mt){return Mt.model.color});var Jt=Ht.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.model.color}).attr("fill-opacity",0);b(Jt),Ht.attr("d",function(Mt){return Mt.svgD}),Jt.empty()||Ht.sort(f),Ht.exit().remove(),Ht.on("mouseover",x).on("mouseout",y).on("click",u),Pt.append("g").attr("class","dimensions");var ge=zt.select("g.dimensions"),he=ge.selectAll("g.dimension").data(function(Mt){return Mt.dimensions},i);he.enter().append("g").attr("class","dimension"),he.attr("transform",function(Mt){return e(Mt.x,0)}),he.exit().remove();var de=he.selectAll("g.category").data(function(Mt){return Mt.categories},i),se=de.enter().append("g").attr("class","category");de.attr("transform",function(Mt){return e(0,Mt.y)}),se.append("rect").attr("class","catrect").attr("pointer-events","none"),de.select("rect.catrect").attr("fill","none").attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}),M(se);var Tt=de.selectAll("rect.bandrect").data(function(Mt){return Mt.bands},i);Tt.each(function(){t.raiseToTop(this)}),Tt.attr("fill",function(Mt){return Mt.color});var Lt=Tt.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.color}).attr("fill-opacity",0);Tt.attr("fill",function(Mt){return Mt.color}).attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}).attr("y",function(Mt){return Mt.y}).attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":Mt.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(Lt),Tt.exit().remove(),se.append("text").attr("class","catlabel").attr("pointer-events","none"),de.select("text.catlabel").attr("text-anchor",function(Mt){return s(Mt)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Mt){return s(Mt)?Mt.width+5:-5}).attr("y",function(Mt){return Mt.height/2}).text(function(Mt){return Mt.model.categoryLabel}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.categorylabelfont),n.convertToTspans(c.select(this),vt)}),se.append("text").attr("class","dimlabel"),de.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Mt){return Mt.width/2}).attr("y",-5).text(function(Mt,te){return te===0?Mt.parcatsViewModel.model.dimensions[Mt.model.dimensionInd].dimensionLabel:null}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.labelfont)}),de.selectAll("rect.bandrect").on("mouseover",H).on("mouseout",F),de.exit().remove(),he.call(c.behavior.drag().origin(function(Mt){return{x:Mt.x,y:0}}).on("dragstart",U).on("drag",W).on("dragend",q)),zt.each(function(Mt){Mt.traceSelection=c.select(this),Mt.pathSelection=c.select(this).selectAll("g.paths").selectAll("path.path"),Mt.dimensionSelection=c.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),zt.exit().remove()}$.exports=function(at,vt,it,Y){o(it,at,Y,vt)};function i(at){return at.key}function s(at){var vt=at.parcatsViewModel.dimensions.length,it=at.parcatsViewModel.dimensions[vt-1].model.dimensionInd;return at.model.dimensionInd===it}function f(at,vt){return at.model.rawColor>vt.model.rawColor?1:at.model.rawColor"),Te=c.mouse(ft)[0];S.loneHover({trace:ut,x:de-zt.left+Pt.left,y:se-zt.top+Pt.top,text:oe,color:at.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Tt,idealAlign:Te1&&Wt.displayInd===Pt.dimensions.length-1?(ge=wt.left,he="left"):(ge=wt.left+wt.width,he="right");var de=zt.model.count,se=zt.model.categoryLabel,Tt=de/zt.parcatsViewModel.model.count,Lt={countLabel:de,categoryLabel:se,probabilityLabel:Tt.toFixed(3)},Mt=[];zt.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Mt.push(["Count:",Lt.countLabel].join(" ")),zt.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Mt.push(["P("+Lt.categoryLabel+"):",Lt.probabilityLabel].join(" "));var te=Mt.join("
");return{trace:Ht,x:Y*(ge-vt.left),y:ft*(Jt-vt.top),text:te,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:he,hovertemplate:Ht.hovertemplate,hovertemplateLabels:Lt,eventData:[{data:Ht._input,fullData:Ht,count:de,category:se,probability:Tt}]}}function N(at,vt,it){var Y=[];return c.select(it.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ft=this;Y.push(O(at,vt,ft))}),Y}function V(at,vt,it){at._fullLayout._calcInverseTransform(at);var Y=at._fullLayout._invScaleX,ft=at._fullLayout._invScaleY,ut=it.getBoundingClientRect(),wt=c.select(it).datum(),zt=wt.categoryViewModel,Pt=zt.parcatsViewModel,Wt=Pt.model.dimensions[zt.model.dimensionInd],Ht=Pt.trace,Jt=ut.y+ut.height/2,ge,he;Pt.dimensions.length>1&&Wt.displayInd===Pt.dimensions.length-1?(ge=ut.left,he="left"):(ge=ut.left+ut.width,he="right");var de=zt.model.categoryLabel,se=wt.parcatsViewModel.model.count,Tt=0;wt.categoryViewModel.bands.forEach(function(ur){ur.color===wt.color&&(Tt+=ur.count)});var Lt=zt.model.count,Mt=0;Pt.pathSelection.each(function(ur){ur.model.color===wt.color&&(Mt+=ur.model.count)});var te=Tt/se,ve=Tt/Mt,oe=Tt/Lt,Te={countLabel:Tt,categoryLabel:de,probabilityLabel:te.toFixed(3)},He=[];zt.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&He.push(["Count:",Te.countLabel].join(" ")),zt.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(He.push("P(color ∩ "+de+"): "+Te.probabilityLabel),He.push("P("+de+" | color): "+ve.toFixed(3)),He.push("P(color | "+de+"): "+oe.toFixed(3)));var Ge=He.join("
"),cr=a.mostReadable(wt.color,["black","white"]);return{trace:Ht,x:Y*(ge-vt.left),y:ft*(Jt-vt.top),text:Ge,color:wt.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:cr,fontSize:10,idealAlign:he,hovertemplate:Ht.hovertemplate,hovertemplateLabels:Te,eventData:[{data:Ht._input,fullData:Ht,category:de,count:se,probability:te,categorycount:Lt,colorcount:Mt,bandcolorcount:Tt}]}}function H(at){if(!at.parcatsViewModel.dragDimension&&at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var vt=c.mouse(this)[1];if(vt<-1)return;var it=at.parcatsViewModel.graphDiv,Y=it._fullLayout,ft=Y._paperdiv.node().getBoundingClientRect(),ut=at.parcatsViewModel.hoveron,wt=this;if(ut==="color"?(k(wt),R(wt,"plotly_hover",c.event)):(p(wt),w(wt,"plotly_hover",c.event)),at.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var zt;ut==="category"?zt=O(it,ft,wt):ut==="color"?zt=V(it,ft,wt):ut==="dimension"&&(zt=N(it,ft,wt)),zt&&S.loneHover(zt,{container:Y._hoverlayer.node(),outerContainer:Y._paper.node(),gd:it})}}}function F(at){var vt=at.parcatsViewModel;if(!vt.dragDimension&&(b(vt.pathSelection),M(vt.dimensionSelection.selectAll("g.category")),A(vt.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),S.loneUnhover(vt.graphDiv._fullLayout._hoverlayer.node()),vt.pathSelection.sort(f),vt.hoverinfoItems.indexOf("skip")===-1)){var it=at.parcatsViewModel.hoveron,Y=this;it==="color"?R(Y,"plotly_unhover",c.event):w(Y,"plotly_unhover",c.event)}}function U(at){at.parcatsViewModel.arrangement!=="fixed"&&(at.dragDimensionDisplayInd=at.model.displayInd,at.initialDragDimensionDisplayInds=at.parcatsViewModel.model.dimensions.map(function(vt){return vt.displayInd}),at.dragHasMoved=!1,at.dragCategoryDisplayInd=null,c.select(this).selectAll("g.category").select("rect.catrect").each(function(vt){var it=c.mouse(this)[0],Y=c.mouse(this)[1];-2<=it&&it<=vt.width+2&&-2<=Y&&Y<=vt.height+2&&(at.dragCategoryDisplayInd=vt.model.displayInd,at.initialDragCategoryDisplayInds=at.model.categories.map(function(ft){return ft.displayInd}),vt.model.dragY=vt.y,t.raiseToTop(this.parentNode),c.select(this.parentNode).selectAll("rect.bandrect").each(function(ft){ft.yHt.y+Ht.height/2&&(ut.model.displayInd=Ht.model.displayInd,Ht.model.displayInd=zt),at.dragCategoryDisplayInd=ut.model.displayInd}if(at.dragCategoryDisplayInd===null||at.parcatsViewModel.arrangement==="freeform"){ft.model.dragX=c.event.x;var Jt=at.parcatsViewModel.dimensions[it],ge=at.parcatsViewModel.dimensions[Y];Jt!==void 0&&ft.model.dragXge.x&&(ft.model.displayInd=ge.model.displayInd,ge.model.displayInd=at.dragDimensionDisplayInd),at.dragDimensionDisplayInd=ft.model.displayInd}dt(at.parcatsViewModel),tt(at.parcatsViewModel),yt(at.parcatsViewModel),lt(at.parcatsViewModel)}}function q(at){if(at.parcatsViewModel.arrangement!=="fixed"&&at.dragDimensionDisplayInd!==null){c.select(this).selectAll("text").attr("font-weight","normal");var vt={},it=X(at.parcatsViewModel),Y=at.parcatsViewModel.model.dimensions.map(function(ge){return ge.displayInd}),ft=at.initialDragDimensionDisplayInds.some(function(ge,he){return ge!==Y[he]});ft&&Y.forEach(function(ge,he){var de=at.parcatsViewModel.model.dimensions[he].containerInd;vt["dimensions["+de+"].displayindex"]=ge});var ut=!1;if(at.dragCategoryDisplayInd!==null){var wt=at.model.categories.map(function(ge){return ge.displayInd});if(ut=at.initialDragCategoryDisplayInds.some(function(ge,he){return ge!==wt[he]}),ut){var zt=at.model.categories.slice().sort(function(ge,he){return ge.displayInd-he.displayInd}),Pt=zt.map(function(ge){return ge.categoryValue}),Wt=zt.map(function(ge){return ge.categoryLabel});vt["dimensions["+at.model.containerInd+"].categoryarray"]=[Pt],vt["dimensions["+at.model.containerInd+"].ticktext"]=[Wt],vt["dimensions["+at.model.containerInd+"].categoryorder"]="array"}}if(at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!at.dragHasMoved&&at.potentialClickBand&&(at.parcatsViewModel.hoveron==="color"?R(at.potentialClickBand,"plotly_click",c.event.sourceEvent):w(at.potentialClickBand,"plotly_click",c.event.sourceEvent)),at.model.dragX=null,at.dragCategoryDisplayInd!==null){var Ht=at.parcatsViewModel.dimensions[at.dragDimensionDisplayInd].categories[at.dragCategoryDisplayInd];Ht.model.dragY=null,at.dragCategoryDisplayInd=null}at.dragDimensionDisplayInd=null,at.parcatsViewModel.dragDimension=null,at.dragHasMoved=null,at.potentialClickBand=null,dt(at.parcatsViewModel),tt(at.parcatsViewModel);var Jt=c.transition().duration(300).ease("cubic-in-out");Jt.each(function(){yt(at.parcatsViewModel,!0),lt(at.parcatsViewModel,!0)}).each("end",function(){(ft||ut)&&P.restyle(at.parcatsViewModel.graphDiv,vt,[it])})}}function X(at){for(var vt,it=at.graphDiv._fullData,Y=0;Y=0;Pt--)Wt+="C"+wt[Pt]+","+(vt[Pt+1]+Y)+" "+ut[Pt]+","+(vt[Pt]+Y)+" "+(at[Pt]+it[Pt])+","+(vt[Pt]+Y),Wt+="l-"+it[Pt]+",0 ";return Wt+="Z",Wt}function tt(at){var vt=at.dimensions,it=at.model,Y=vt.map(function(br){return br.categories.map(function(Kr){return Kr.y})}),ft=at.model.dimensions.map(function(br){return br.categories.map(function(Kr){return Kr.displayInd})}),ut=at.model.dimensions.map(function(br){return br.displayInd}),wt=at.dimensions.map(function(br){return br.model.dimensionInd}),zt=vt.map(function(br){return br.x}),Pt=vt.map(function(br){return br.width}),Wt=[];for(var Ht in it.paths)it.paths.hasOwnProperty(Ht)&&Wt.push(it.paths[Ht]);function Jt(br){var Kr=br.categoryInds.map(function(Ce,Gt){return ft[Gt][Ce]}),rn=wt.map(function(Ce){return Kr[Ce]});return rn}Wt.sort(function(br,Kr){var rn=Jt(br),Ce=Jt(Kr);return at.sortpaths==="backward"&&(rn.reverse(),Ce.reverse()),rn.push(br.valueInds[0]),Ce.push(Kr.valueInds[0]),at.bundlecolors&&(rn.unshift(br.rawColor),Ce.unshift(Kr.rawColor)),rnCe?1:0});for(var ge=new Array(Wt.length),he=vt[0].model.count,de=vt[0].categories.map(function(br){return br.height}).reduce(function(br,Kr){return br+Kr}),se=0;se0?Lt=de*(Tt.count/he):Lt=0;for(var Mt=new Array(Y.length),te=0;te1?wt=(at.width-2*it-Y)/(ft-1):wt=0,zt=it,Pt=zt+wt*ut;var Wt=[],Ht=at.model.maxCats,Jt=vt.categories.length,ge=8,he=vt.count,de=at.height-ge*(Ht-1),se,Tt,Lt,Mt,te,ve=(Ht-Jt)*ge/2,oe=vt.categories.map(function(Te){return{displayInd:Te.displayInd,categoryInd:Te.categoryInd}});for(oe.sort(function(Te,He){return Te.displayInd-He.displayInd}),te=0;te0?se=Tt.count/he*de:se=0,Lt={key:Tt.valueInds[0],model:Tt,width:Y,height:se,y:Tt.dragY!==null?Tt.dragY:ve,bands:[],parcatsViewModel:at},ve=ve+se+ge,Wt.push(Lt);return{key:vt.dimensionInd,x:vt.dragX!==null?vt.dragX:Pt,y:0,width:Y,model:vt,categories:Wt,parcatsViewModel:at,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}),lE=Ft((Q,$)=>{var c=YH();$.exports=function(g,P,S,t){var e=g._fullLayout,r=e._paper,a=e._size;c(g,r,P,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},S,t)}}),KH=Ft(Q=>{var $=dd().getModuleCalcData,c=lE(),g="parcats";Q.name=g,Q.plot=function(P,S,t,e){var r=$(P.calcdata,g);if(r.length){var a=r[0];c(P,a,t,e)}},Q.clean=function(P,S,t,e){var r=e._has&&e._has("parcats"),a=S._has&&S._has("parcats");r&&!a&&e._paperdiv.selectAll(".parcats").remove()}}),XH=Ft((Q,$)=>{$.exports={attributes:sE(),supplyDefaults:$H(),calc:GH(),plot:lE(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:KH(),categories:["noOpacity"],meta:{}}}),JH=Ft((Q,$)=>{$.exports=XH()}),Ev=Ft((Q,$)=>{var c=X0(),g="1.13.4",P='© OpenStreetMap contributors',S=['© Carto',P].join(" "),t=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),e=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:P,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},a=c(r);$.exports={requiredVersion:g,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:r,styleValuesNonMapbox:a,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+g+"."].join(` +`),I=E3().maxDimensionCount,S=kn(),t=1e-6,e=2048,r=new Uint8Array(4),a=new Uint8Array(4),n={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function o(A){A.read({x:0,y:0,width:1,height:1,data:r})}function i(A,h,p,k,w){var R=A._gl;R.enable(R.SCISSOR_TEST),R.scissor(h,p,k,w),A.clear({color:[0,0,0,0],depth:1})}function l(A,h,p,k,w,R){var O=R.key;function j(V){var H=Math.min(k,w-V*k);V===0&&(window.cancelAnimationFrame(p.currentRafs[O]),delete p.currentRafs[O],i(A,R.scissorX,R.scissorY,R.scissorWidth,R.viewBoxSize[1])),!p.clearOnly&&(R.count=2*H,R.offset=2*V*k,h(R),V*k+H>>8*h)%256/255}function v(A,h,p){for(var k=new Array(A*(I+4)),w=0,R=0;RWt&&(Wt=it[kt].dim1.canvasX,Pt=kt);ut===0&&i(w,0,0,H.canvasWidth,H.canvasHeight);var Jt=tt(p);for(kt=0;kt{var c=qr(),g=kn(),I=g.isArrayOrTypedArray,S=g.numberFormat,t=(uW(),ni(gE)).default,e=Ls(),r=g.strRotate,a=g.strTranslate,n=ec(),o=Vs(),i=Xc(),l=zg(),f=l.keyFun,x=l.repeat,y=l.unwrap,v=vE(),T=E3(),u=dE(),b=cW();function _(yt,mt,st){return g.aggNums(yt,null,mt,st)}function P(yt,mt){return C(_(Math.min,yt,mt),_(Math.max,yt,mt))}function M(yt){var mt=yt.range;return mt?C(mt[0],mt[1]):P(yt.values,yt._length)}function C(yt,mt){return(isNaN(yt)||!isFinite(yt))&&(yt=0),(isNaN(mt)||!isFinite(mt))&&(mt=0),yt===mt&&(yt===0?(yt-=1,mt+=1):(yt*=.9,mt*=1.1)),[yt,mt]}function A(yt,mt){return mt?function(st,tt){var dt=mt[tt];return dt??yt(st)}:yt}function h(yt,mt,st,tt,dt){var rt=M(st);return tt?c.scale.ordinal().domain(tt.map(A(S(st.tickformat),dt))).range(tt.map(function(at){var vt=(at-rt[0])/(rt[1]-rt[0]);return yt-mt+vt*(2*mt-yt)})):c.scale.linear().domain(rt).range([yt-mt,mt])}function p(yt,mt){return c.scale.linear().range([mt,yt-mt])}function k(yt,mt){return c.scale.linear().domain(M(yt)).range([mt,1-mt])}function w(yt){if(yt.tickvals){var mt=M(yt);return c.scale.ordinal().domain(yt.tickvals).range(yt.tickvals.map(function(st){return(st-mt[0])/(mt[1]-mt[0])}))}}function R(yt){var mt=yt.map(function(rt){return rt[0]}),st=yt.map(function(rt){var at=t(rt[1]);return c.rgb("rgb("+at[0]+","+at[1]+","+at[2]+")")}),tt=function(rt){return function(at){return at[rt]}},dt="rgb".split("").map(function(rt){return c.scale.linear().clamp(!0).domain(mt).range(st.map(tt(rt)))});return function(rt){return dt.map(function(at){return at(rt)})}}function O(yt){return yt.dimensions.some(function(mt){return mt.brush.filterSpecified})}function j(yt,mt,st){var tt=y(mt),dt=tt.trace,rt=v.convertTypedArray(tt.lineColor),at=dt.line,vt={color:t(dt.unselected.line.color),opacity:dt.unselected.line.opacity},it=i.extractOpts(at),Y=it.reversescale?i.flipScale(tt.cscale):tt.cscale,ft=dt.domain,ut=dt.dimensions,kt=yt.width,It=dt.labelangle,Pt=dt.labelside,qt=dt.labelfont,Wt=dt.tickfont,Jt=dt.rangefont,ge=g.extendDeepNoArrays({},at,{color:rt.map(c.scale.linear().domain(M({values:rt,range:[it.min,it.max],_length:dt._length}))),blockLineCount:T.blockLineCount,canvasOverdrag:T.overdrag*T.canvasPixelRatio}),fe=Math.floor(kt*(ft.x[1]-ft.x[0])),pe=Math.floor(yt.height*(ft.y[1]-ft.y[0])),se=yt.margin||{l:80,r:80,t:100,b:80},Tt=fe,Lt=pe;return{key:st,colCount:ut.filter(v.isVisible).length,dimensions:ut,tickDistance:T.tickDistance,unitToColor:R(Y),lines:ge,deselectedLines:vt,labelAngle:It,labelSide:Pt,labelFont:qt,tickFont:Wt,rangeFont:Jt,layoutWidth:kt,layoutHeight:yt.height,domain:ft,translateX:ft.x[0]*kt,translateY:yt.height-ft.y[1]*yt.height,pad:se,canvasWidth:Tt*T.canvasPixelRatio+2*ge.canvasOverdrag,canvasHeight:Lt*T.canvasPixelRatio,width:Tt,height:Lt,canvasPixelRatio:T.canvasPixelRatio}}function V(yt,mt,st){var tt=st.width,dt=st.height,rt=st.dimensions,at=st.canvasPixelRatio,vt=function(kt){return tt*kt/Math.max(1,st.colCount-1)},it=T.verticalPadding/dt,Y=p(dt,T.verticalPadding),ft={key:st.key,xScale:vt,model:st,inBrushDrag:!1},ut={};return ft.dimensions=rt.filter(v.isVisible).map(function(kt,It){var Pt=k(kt,it),qt=ut[kt.label];ut[kt.label]=(qt||0)+1;var Wt=kt.label+(qt?"__"+qt:""),Jt=kt.constraintrange,ge=Jt&&Jt.length;ge&&!I(Jt[0])&&(Jt=[Jt]);var fe=ge?Jt.map(function(He){return He.map(Pt)}):[[-1/0,1/0]],pe=function(){var He=ft;He.focusLayer&&He.focusLayer.render(He.panels,!0);var Ge=O(He);!yt.contextShown()&&Ge?(He.contextLayer&&He.contextLayer.render(He.panels,!0),yt.contextShown(!0)):yt.contextShown()&&!Ge&&(He.contextLayer&&He.contextLayer.render(He.panels,!0,!0),yt.contextShown(!1))},se=kt.values;se.length>kt._length&&(se=se.slice(0,kt._length));var Tt=kt.tickvals,Lt;function Mt(He,Ge){return{val:He,text:Lt[Ge]}}function ee(He,Ge){return He.val-Ge.val}if(I(Tt)&&Tt.length){g.isTypedArray(Tt)&&(Tt=Array.from(Tt)),Lt=kt.ticktext,!I(Lt)||!Lt.length?Lt=Tt.map(S(kt.tickformat)):Lt.length>Tt.length?Lt=Lt.slice(0,Tt.length):Tt.length>Lt.length&&(Tt=Tt.slice(0,Lt.length));for(var ve=1;ve=He||jr>=Ge)return;var Wr=oe.lineLayer.readPixel(ur,Ge-1-jr),br=Wr[3]!==0,Xr=br?Wr[2]+256*(Wr[1]+256*Wr[0]):null,nn={x:ur,y:jr,clientX:Te.clientX,clientY:Te.clientY,dataIndex:oe.model.key,curveNumber:Xr};Xr!==It&&(br?tt.hover(nn):tt.unhover&&tt.unhover(nn),It=Xr)}}),kt.style("opacity",function(oe){return oe.pick?0:1}),at.style("background","rgba(255, 255, 255, 0)");var qt=at.selectAll("."+T.cn.parcoords).data(ut,f);qt.exit().remove(),qt.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),qt.attr("transform",function(oe){return a(oe.model.translateX,oe.model.translateY)});var Wt=qt.selectAll("."+T.cn.parcoordsControlView).data(x,f);Wt.enter().append("g").classed(T.cn.parcoordsControlView,!0),Wt.attr("transform",function(oe){return a(oe.model.pad.l,oe.model.pad.t)});var Jt=Wt.selectAll("."+T.cn.yAxis).data(function(oe){return oe.dimensions},f);Jt.enter().append("g").classed(T.cn.yAxis,!0),Wt.each(function(oe){W(Jt,oe,it)}),kt.each(function(oe){if(oe.viewModel){!oe.lineLayer||tt?oe.lineLayer=b(this,oe):oe.lineLayer.update(oe),(oe.key||oe.key===0)&&(oe.viewModel[oe.key]=oe.lineLayer);var Te=!oe.context||tt;oe.lineLayer.render(oe.viewModel.panels,Te)}}),Jt.attr("transform",function(oe){return a(oe.xScale(oe.xIndex),0)}),Jt.call(c.behavior.drag().origin(function(oe){return oe}).on("drag",function(oe){var Te=oe.parent;ft.linePickActive(!1),oe.x=Math.max(-T.overdrag,Math.min(oe.model.width+T.overdrag,c.event.x)),oe.canvasX=oe.x*oe.model.canvasPixelRatio,Jt.sort(function(He,Ge){return He.x-Ge.x}).each(function(He,Ge){He.xIndex=Ge,He.x=oe===He?He.x:He.xScale(He.xIndex),He.canvasX=He.x*He.model.canvasPixelRatio}),W(Jt,Te,it),Jt.filter(function(He){return Math.abs(oe.xIndex-He.xIndex)!==0}).attr("transform",function(He){return a(He.xScale(He.xIndex),0)}),c.select(this).attr("transform",a(oe.x,0)),Jt.each(function(He,Ge,cr){cr===oe.parent.key&&(Te.dimensions[Ge]=He)}),Te.contextLayer&&Te.contextLayer.render(Te.panels,!1,!O(Te)),Te.focusLayer.render&&Te.focusLayer.render(Te.panels)}).on("dragend",function(oe){var Te=oe.parent;oe.x=oe.xScale(oe.xIndex),oe.canvasX=oe.x*oe.model.canvasPixelRatio,W(Jt,Te,it),c.select(this).attr("transform",function(He){return a(He.x,0)}),Te.contextLayer&&Te.contextLayer.render(Te.panels,!1,!O(Te)),Te.focusLayer&&Te.focusLayer.render(Te.panels),Te.pickLayer&&Te.pickLayer.render(Te.panels,!0),ft.linePickActive(!0),tt&&tt.axesMoved&&tt.axesMoved(Te.key,Te.dimensions.map(function(He){return He.crossfilterDimensionIndex}))})),Jt.exit().remove();var ge=Jt.selectAll("."+T.cn.axisOverlays).data(x,f);ge.enter().append("g").classed(T.cn.axisOverlays,!0),ge.selectAll("."+T.cn.axis).remove();var fe=ge.selectAll("."+T.cn.axis).data(x,f);fe.enter().append("g").classed(T.cn.axis,!0),fe.each(function(oe){var Te=oe.model.height/oe.model.tickDistance,He=oe.domainScale,Ge=He.domain();c.select(this).call(c.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Te,oe.tickFormat).tickValues(oe.ordinal?Ge:null).tickFormat(function(cr){return v.isOrdinal(oe)?cr:J(oe.model.dimensions[oe.visibleIndex],cr)}).scale(He)),o.font(fe.selectAll("text"),oe.model.tickFont)}),fe.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),fe.selectAll("text").style("cursor","default");var pe=ge.selectAll("."+T.cn.axisHeading).data(x,f);pe.enter().append("g").classed(T.cn.axisHeading,!0);var se=pe.selectAll("."+T.cn.axisTitle).data(x,f);se.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",dt?"none":"auto"),se.text(function(oe){return oe.label}).each(function(oe){var Te=c.select(this);o.font(Te,oe.model.labelFont),n.convertToTspans(Te,yt)}).attr("transform",function(oe){var Te=U(oe.model.labelAngle,oe.model.labelSide),He=T.axisTitleOffset;return(Te.dir>0?"":a(0,2*He+oe.model.height))+r(Te.degrees)+a(-He*Te.dx,-He*Te.dy)}).attr("text-anchor",function(oe){var Te=U(oe.model.labelAngle,oe.model.labelSide),He=Math.abs(Te.dx),Ge=Math.abs(Te.dy);return 2*He>Ge?Te.dir*Te.dx<0?"start":"end":"middle"});var Tt=ge.selectAll("."+T.cn.axisExtent).data(x,f);Tt.enter().append("g").classed(T.cn.axisExtent,!0);var Lt=Tt.selectAll("."+T.cn.axisExtentTop).data(x,f);Lt.enter().append("g").classed(T.cn.axisExtentTop,!0),Lt.attr("transform",a(0,-T.axisExtentOffset));var Mt=Lt.selectAll("."+T.cn.axisExtentTopText).data(x,f);Mt.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(H),Mt.text(function(oe){return lt(oe,!0)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)});var ee=Tt.selectAll("."+T.cn.axisExtentBottom).data(x,f);ee.enter().append("g").classed(T.cn.axisExtentBottom,!0),ee.attr("transform",function(oe){return a(0,oe.model.height+T.axisExtentOffset)});var ve=ee.selectAll("."+T.cn.axisExtentBottomText).data(x,f);ve.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(H),ve.text(function(oe){return lt(oe,!1)}).each(function(oe){o.font(c.select(this),oe.model.rangeFont)}),u.ensureAxisBrush(ge,Y,yt)}}),yE=Dt((r,Z)=>{var c=hW(),g=gT(),I=vE().isVisible,S={};function t(a,n,o){var i=n.indexOf(o),l=a.indexOf(i);return l===-1&&(l+=n.length),l}function e(a,n){return function(o,i){return t(a,n,o)-t(a,n,i)}}var r=Z.exports=function(a,n){var o=a._fullLayout,i=g(a,[],S);if(i){var l={},f={},x={},y={},v=o._size;n.forEach(function(P,M){var C=P[0].trace;x[M]=C.index;var A=y[M]=C.index;l[M]=a.data[A].dimensions,f[M]=a.data[A].dimensions.slice()});var T=function(P,M,C){var A=f[P][M],h=C.map(function(j){return j.slice()}),p="dimensions["+M+"].constraintrange",k=o._tracePreGUI[a._fullData[x[P]]._fullInput.uid];if(k[p]===void 0){var w=A.constraintrange;k[p]=w||null}var R=a._fullData[x[P]].dimensions[M];h.length?(h.length===1&&(h=h[0]),A.constraintrange=h,R.constraintrange=h.slice(),h=[h]):(delete A.constraintrange,delete R.constraintrange,h=null);var O={};O[p]=h,a.emit("plotly_restyle",[O,[y[P]]])},u=function(P){a.emit("plotly_hover",P)},b=function(P){a.emit("plotly_unhover",P)},_=function(P,M){var C=e(M,f[P].filter(I));l[P].sort(C),f[P].filter(function(A){return!I(A)}).sort(function(A){return f[P].indexOf(A)}).forEach(function(A){l[P].splice(l[P].indexOf(A),1),l[P].splice(f[P].indexOf(A),0,A)}),a.emit("plotly_restyle",[{dimensions:[l[P]]},[y[P]]])};c(a,n,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:T,hover:u,unhover:b,axesMoved:_})}};r.reglPrecompiled=S}),fW=Dt(Q=>{var Z=qr(),c=ud().getModuleCalcData,g=yE(),I=Dp();Q.name="parcoords",Q.plot=function(S){var t=c(S.calcdata,"parcoords")[0];t.length&&g(S,t)},Q.clean=function(S,t,e,r){var a=r._has&&r._has("parcoords"),n=t._has&&t._has("parcoords");a&&!n&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},Q.toSVG=function(S){var t=S._fullLayout._glimages,e=Z.select(S).selectAll(".svg-container"),r=e.filter(function(n,o){return o===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var n=this,o=n.toDataURL("image/png"),i=t.append("svg:image");i.attr({xmlns:I.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}r.each(a),window.setTimeout(function(){Z.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}),dW=Dt((Q,Z)=>{Z.exports={attributes:fE(),supplyDefaults:nW(),calc:iW(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:fW(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}),pW=Dt((Q,Z)=>{var c=dW();c.plot=yE(),Z.exports=c}),mW=Dt((Q,Z)=>{Z.exports=pW()}),xE=Dt((Q,Z)=>{var c=Ia().extendFlat,g=Ho(),I=da(),S=kc(),{hovertemplateAttrs:t,templatefallbackAttrs:e}=Zu(),r=jh().attributes,a=c({editType:"calc"},S("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});Z.exports={domain:r({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:c({},g.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:I({editType:"calc"}),tickfont:I({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:a,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}),gW=Dt((Q,Z)=>{var c=kn(),g=Ud().hasColorscale,I=mc(),S=jh().defaults,t=Ad(),e=xE(),r=vT(),a=Ma().isTypedArraySpec;function n(i,l,f,x,y){y("line.shape"),y("line.hovertemplate"),y("line.hovertemplatefallback");var v=y("line.color",x.colorway[0]);if(g(i,"line")&&c.isArrayOrTypedArray(v)){if(v.length)return y("line.colorscale"),I(i,l,x,y,{prefix:"line.",cLetter:"c"}),v.length;l.line.color=f}return 1/0}function o(i,l){function f(_,P){return c.coerce(i,l,e.dimensions,_,P)}var x=f("values"),y=f("visible");if(x&&x.length||(y=l.visible=!1),y){f("label"),f("displayindex",l._index);var v=i.categoryarray,T=c.isArrayOrTypedArray(v)&&v.length>0||a(v),u;T&&(u="array");var b=f("categoryorder",u);b==="array"?(f("categoryarray"),f("ticktext")):(delete i.categoryarray,delete i.ticktext),!T&&b==="array"&&(l.categoryorder="trace")}}Z.exports=function(i,l,f,x){function y(b,_){return c.coerce(i,l,e,b,_)}var v=t(i,l,{name:"dimensions",handleItemDefaults:o}),T=n(i,l,f,x,y);S(l,x,y),(!Array.isArray(v)||!v.length)&&(l.visible=!1),r(l,v,"values",T),y("hoveron"),y("hovertemplate"),y("hovertemplatefallback"),y("arrangement"),y("bundlecolors"),y("sortpaths"),y("counts");var u=x.font;c.coerceFont(y,"labelfont",u,{overrideDflt:{size:Math.round(u.size)}}),c.coerceFont(y,"tickfont",u,{autoShadowDflt:!0,overrideDflt:{size:Math.round(u.size/1.2)}})}}),vW=Dt((Q,Z)=>{var c=zg().wrap,g=Ud().hasColorscale,I=Xd(),S=Ec(),t=Vs(),e=kn(),r=Yi();Z.exports=function(u,b){var _=e.filterVisible(b.dimensions);if(_.length===0)return[];var P=_.map(function(st){var tt;if(st.categoryorder==="trace")tt=null;else if(st.categoryorder==="array")tt=st.categoryarray;else{tt=S(st.values);for(var dt=!0,rt=0;rt=u.length||b[u[_]]!==void 0)return!1;b[u[_]]=!0}return!0}}),yW=Dt((Q,Z)=>{var c=qr(),g=(mx(),ni(j1)).interpolateNumber,I=G_(),S=tf(),t=kn(),e=t.strTranslate,r=Vs(),a=ro(),n=ec();function o(at,vt,it,Y){var ft=vt._context.staticPlot,ut=at.map(mt.bind(0,vt,it)),kt=Y.selectAll("g.parcatslayer").data([null]);kt.enter().append("g").attr("class","parcatslayer").style("pointer-events",ft?"none":"all");var It=kt.selectAll("g.trace.parcats").data(ut,i),Pt=It.enter().append("g").attr("class","trace parcats");It.attr("transform",function(Mt){return e(Mt.x,Mt.y)}),Pt.append("g").attr("class","paths");var qt=It.select("g.paths"),Wt=qt.selectAll("path.path").data(function(Mt){return Mt.paths},i);Wt.attr("fill",function(Mt){return Mt.model.color});var Jt=Wt.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.model.color}).attr("fill-opacity",0);b(Jt),Wt.attr("d",function(Mt){return Mt.svgD}),Jt.empty()||Wt.sort(f),Wt.exit().remove(),Wt.on("mouseover",x).on("mouseout",y).on("click",u),Pt.append("g").attr("class","dimensions");var ge=It.select("g.dimensions"),fe=ge.selectAll("g.dimension").data(function(Mt){return Mt.dimensions},i);fe.enter().append("g").attr("class","dimension"),fe.attr("transform",function(Mt){return e(Mt.x,0)}),fe.exit().remove();var pe=fe.selectAll("g.category").data(function(Mt){return Mt.categories},i),se=pe.enter().append("g").attr("class","category");pe.attr("transform",function(Mt){return e(0,Mt.y)}),se.append("rect").attr("class","catrect").attr("pointer-events","none"),pe.select("rect.catrect").attr("fill","none").attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}),M(se);var Tt=pe.selectAll("rect.bandrect").data(function(Mt){return Mt.bands},i);Tt.each(function(){t.raiseToTop(this)}),Tt.attr("fill",function(Mt){return Mt.color});var Lt=Tt.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Mt){return Mt.color}).attr("fill-opacity",0);Tt.attr("fill",function(Mt){return Mt.color}).attr("width",function(Mt){return Mt.width}).attr("height",function(Mt){return Mt.height}).attr("y",function(Mt){return Mt.y}).attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":Mt.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(Lt),Tt.exit().remove(),se.append("text").attr("class","catlabel").attr("pointer-events","none"),pe.select("text.catlabel").attr("text-anchor",function(Mt){return l(Mt)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Mt){return l(Mt)?Mt.width+5:-5}).attr("y",function(Mt){return Mt.height/2}).text(function(Mt){return Mt.model.categoryLabel}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.categorylabelfont),n.convertToTspans(c.select(this),vt)}),se.append("text").attr("class","dimlabel"),pe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Mt){return Mt.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Mt){return Mt.width/2}).attr("y",-5).text(function(Mt,ee){return ee===0?Mt.parcatsViewModel.model.dimensions[Mt.model.dimensionInd].dimensionLabel:null}).each(function(Mt){r.font(c.select(this),Mt.parcatsViewModel.labelfont)}),pe.selectAll("rect.bandrect").on("mouseover",H).on("mouseout",F),pe.exit().remove(),fe.call(c.behavior.drag().origin(function(Mt){return{x:Mt.x,y:0}}).on("dragstart",U).on("drag",W).on("dragend",q)),It.each(function(Mt){Mt.traceSelection=c.select(this),Mt.pathSelection=c.select(this).selectAll("g.paths").selectAll("path.path"),Mt.dimensionSelection=c.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),It.exit().remove()}Z.exports=function(at,vt,it,Y){o(it,at,Y,vt)};function i(at){return at.key}function l(at){var vt=at.parcatsViewModel.dimensions.length,it=at.parcatsViewModel.dimensions[vt-1].model.dimensionInd;return at.model.dimensionInd===it}function f(at,vt){return at.model.rawColor>vt.model.rawColor?1:at.model.rawColor"),Te=c.mouse(ft)[0];S.loneHover({trace:ut,x:pe-It.left+Pt.left,y:se-It.top+Pt.top,text:oe,color:at.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Tt,idealAlign:Te1&&qt.displayInd===Pt.dimensions.length-1?(ge=kt.left,fe="left"):(ge=kt.left+kt.width,fe="right");var pe=It.model.count,se=It.model.categoryLabel,Tt=pe/It.parcatsViewModel.model.count,Lt={countLabel:pe,categoryLabel:se,probabilityLabel:Tt.toFixed(3)},Mt=[];It.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Mt.push(["Count:",Lt.countLabel].join(" ")),It.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Mt.push(["P("+Lt.categoryLabel+"):",Lt.probabilityLabel].join(" "));var ee=Mt.join("
");return{trace:Wt,x:Y*(ge-vt.left),y:ft*(Jt-vt.top),text:ee,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:fe,hovertemplate:Wt.hovertemplate,hovertemplateLabels:Lt,eventData:[{data:Wt._input,fullData:Wt,count:pe,category:se,probability:Tt}]}}function j(at,vt,it){var Y=[];return c.select(it.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ft=this;Y.push(O(at,vt,ft))}),Y}function V(at,vt,it){at._fullLayout._calcInverseTransform(at);var Y=at._fullLayout._invScaleX,ft=at._fullLayout._invScaleY,ut=it.getBoundingClientRect(),kt=c.select(it).datum(),It=kt.categoryViewModel,Pt=It.parcatsViewModel,qt=Pt.model.dimensions[It.model.dimensionInd],Wt=Pt.trace,Jt=ut.y+ut.height/2,ge,fe;Pt.dimensions.length>1&&qt.displayInd===Pt.dimensions.length-1?(ge=ut.left,fe="left"):(ge=ut.left+ut.width,fe="right");var pe=It.model.categoryLabel,se=kt.parcatsViewModel.model.count,Tt=0;kt.categoryViewModel.bands.forEach(function(ur){ur.color===kt.color&&(Tt+=ur.count)});var Lt=It.model.count,Mt=0;Pt.pathSelection.each(function(ur){ur.model.color===kt.color&&(Mt+=ur.model.count)});var ee=Tt/se,ve=Tt/Mt,oe=Tt/Lt,Te={countLabel:Tt,categoryLabel:pe,probabilityLabel:ee.toFixed(3)},He=[];It.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&He.push(["Count:",Te.countLabel].join(" ")),It.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(He.push("P(color ∩ "+pe+"): "+Te.probabilityLabel),He.push("P("+pe+" | color): "+ve.toFixed(3)),He.push("P(color | "+pe+"): "+oe.toFixed(3)));var Ge=He.join("
"),cr=a.mostReadable(kt.color,["black","white"]);return{trace:Wt,x:Y*(ge-vt.left),y:ft*(Jt-vt.top),text:Ge,color:kt.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:cr,fontSize:10,idealAlign:fe,hovertemplate:Wt.hovertemplate,hovertemplateLabels:Te,eventData:[{data:Wt._input,fullData:Wt,category:pe,count:se,probability:ee,categorycount:Lt,colorcount:Mt,bandcolorcount:Tt}]}}function H(at){if(!at.parcatsViewModel.dragDimension&&at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var vt=c.mouse(this)[1];if(vt<-1)return;var it=at.parcatsViewModel.graphDiv,Y=it._fullLayout,ft=Y._paperdiv.node().getBoundingClientRect(),ut=at.parcatsViewModel.hoveron,kt=this;if(ut==="color"?(k(kt),R(kt,"plotly_hover",c.event)):(p(kt),w(kt,"plotly_hover",c.event)),at.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var It;ut==="category"?It=O(it,ft,kt):ut==="color"?It=V(it,ft,kt):ut==="dimension"&&(It=j(it,ft,kt)),It&&S.loneHover(It,{container:Y._hoverlayer.node(),outerContainer:Y._paper.node(),gd:it})}}}function F(at){var vt=at.parcatsViewModel;if(!vt.dragDimension&&(b(vt.pathSelection),M(vt.dimensionSelection.selectAll("g.category")),A(vt.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),S.loneUnhover(vt.graphDiv._fullLayout._hoverlayer.node()),vt.pathSelection.sort(f),vt.hoverinfoItems.indexOf("skip")===-1)){var it=at.parcatsViewModel.hoveron,Y=this;it==="color"?R(Y,"plotly_unhover",c.event):w(Y,"plotly_unhover",c.event)}}function U(at){at.parcatsViewModel.arrangement!=="fixed"&&(at.dragDimensionDisplayInd=at.model.displayInd,at.initialDragDimensionDisplayInds=at.parcatsViewModel.model.dimensions.map(function(vt){return vt.displayInd}),at.dragHasMoved=!1,at.dragCategoryDisplayInd=null,c.select(this).selectAll("g.category").select("rect.catrect").each(function(vt){var it=c.mouse(this)[0],Y=c.mouse(this)[1];-2<=it&&it<=vt.width+2&&-2<=Y&&Y<=vt.height+2&&(at.dragCategoryDisplayInd=vt.model.displayInd,at.initialDragCategoryDisplayInds=at.model.categories.map(function(ft){return ft.displayInd}),vt.model.dragY=vt.y,t.raiseToTop(this.parentNode),c.select(this.parentNode).selectAll("rect.bandrect").each(function(ft){ft.yWt.y+Wt.height/2&&(ut.model.displayInd=Wt.model.displayInd,Wt.model.displayInd=It),at.dragCategoryDisplayInd=ut.model.displayInd}if(at.dragCategoryDisplayInd===null||at.parcatsViewModel.arrangement==="freeform"){ft.model.dragX=c.event.x;var Jt=at.parcatsViewModel.dimensions[it],ge=at.parcatsViewModel.dimensions[Y];Jt!==void 0&&ft.model.dragXge.x&&(ft.model.displayInd=ge.model.displayInd,ge.model.displayInd=at.dragDimensionDisplayInd),at.dragDimensionDisplayInd=ft.model.displayInd}dt(at.parcatsViewModel),tt(at.parcatsViewModel),yt(at.parcatsViewModel),lt(at.parcatsViewModel)}}function q(at){if(at.parcatsViewModel.arrangement!=="fixed"&&at.dragDimensionDisplayInd!==null){c.select(this).selectAll("text").attr("font-weight","normal");var vt={},it=J(at.parcatsViewModel),Y=at.parcatsViewModel.model.dimensions.map(function(ge){return ge.displayInd}),ft=at.initialDragDimensionDisplayInds.some(function(ge,fe){return ge!==Y[fe]});ft&&Y.forEach(function(ge,fe){var pe=at.parcatsViewModel.model.dimensions[fe].containerInd;vt["dimensions["+pe+"].displayindex"]=ge});var ut=!1;if(at.dragCategoryDisplayInd!==null){var kt=at.model.categories.map(function(ge){return ge.displayInd});if(ut=at.initialDragCategoryDisplayInds.some(function(ge,fe){return ge!==kt[fe]}),ut){var It=at.model.categories.slice().sort(function(ge,fe){return ge.displayInd-fe.displayInd}),Pt=It.map(function(ge){return ge.categoryValue}),qt=It.map(function(ge){return ge.categoryLabel});vt["dimensions["+at.model.containerInd+"].categoryarray"]=[Pt],vt["dimensions["+at.model.containerInd+"].ticktext"]=[qt],vt["dimensions["+at.model.containerInd+"].categoryorder"]="array"}}if(at.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!at.dragHasMoved&&at.potentialClickBand&&(at.parcatsViewModel.hoveron==="color"?R(at.potentialClickBand,"plotly_click",c.event.sourceEvent):w(at.potentialClickBand,"plotly_click",c.event.sourceEvent)),at.model.dragX=null,at.dragCategoryDisplayInd!==null){var Wt=at.parcatsViewModel.dimensions[at.dragDimensionDisplayInd].categories[at.dragCategoryDisplayInd];Wt.model.dragY=null,at.dragCategoryDisplayInd=null}at.dragDimensionDisplayInd=null,at.parcatsViewModel.dragDimension=null,at.dragHasMoved=null,at.potentialClickBand=null,dt(at.parcatsViewModel),tt(at.parcatsViewModel);var Jt=c.transition().duration(300).ease("cubic-in-out");Jt.each(function(){yt(at.parcatsViewModel,!0),lt(at.parcatsViewModel,!0)}).each("end",function(){(ft||ut)&&I.restyle(at.parcatsViewModel.graphDiv,vt,[it])})}}function J(at){for(var vt,it=at.graphDiv._fullData,Y=0;Y=0;Pt--)qt+="C"+kt[Pt]+","+(vt[Pt+1]+Y)+" "+ut[Pt]+","+(vt[Pt]+Y)+" "+(at[Pt]+it[Pt])+","+(vt[Pt]+Y),qt+="l-"+it[Pt]+",0 ";return qt+="Z",qt}function tt(at){var vt=at.dimensions,it=at.model,Y=vt.map(function(br){return br.categories.map(function(Xr){return Xr.y})}),ft=at.model.dimensions.map(function(br){return br.categories.map(function(Xr){return Xr.displayInd})}),ut=at.model.dimensions.map(function(br){return br.displayInd}),kt=at.dimensions.map(function(br){return br.model.dimensionInd}),It=vt.map(function(br){return br.x}),Pt=vt.map(function(br){return br.width}),qt=[];for(var Wt in it.paths)it.paths.hasOwnProperty(Wt)&&qt.push(it.paths[Wt]);function Jt(br){var Xr=br.categoryInds.map(function(Le,Gt){return ft[Gt][Le]}),nn=kt.map(function(Le){return Xr[Le]});return nn}qt.sort(function(br,Xr){var nn=Jt(br),Le=Jt(Xr);return at.sortpaths==="backward"&&(nn.reverse(),Le.reverse()),nn.push(br.valueInds[0]),Le.push(Xr.valueInds[0]),at.bundlecolors&&(nn.unshift(br.rawColor),Le.unshift(Xr.rawColor)),nnLe?1:0});for(var ge=new Array(qt.length),fe=vt[0].model.count,pe=vt[0].categories.map(function(br){return br.height}).reduce(function(br,Xr){return br+Xr}),se=0;se0?Lt=pe*(Tt.count/fe):Lt=0;for(var Mt=new Array(Y.length),ee=0;ee1?kt=(at.width-2*it-Y)/(ft-1):kt=0,It=it,Pt=It+kt*ut;var qt=[],Wt=at.model.maxCats,Jt=vt.categories.length,ge=8,fe=vt.count,pe=at.height-ge*(Wt-1),se,Tt,Lt,Mt,ee,ve=(Wt-Jt)*ge/2,oe=vt.categories.map(function(Te){return{displayInd:Te.displayInd,categoryInd:Te.categoryInd}});for(oe.sort(function(Te,He){return Te.displayInd-He.displayInd}),ee=0;ee0?se=Tt.count/fe*pe:se=0,Lt={key:Tt.valueInds[0],model:Tt,width:Y,height:se,y:Tt.dragY!==null?Tt.dragY:ve,bands:[],parcatsViewModel:at},ve=ve+se+ge,qt.push(Lt);return{key:vt.dimensionInd,x:vt.dragX!==null?vt.dragX:Pt,y:0,width:Y,model:vt,categories:qt,parcatsViewModel:at,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}),_E=Dt((Q,Z)=>{var c=yW();Z.exports=function(g,I,S,t){var e=g._fullLayout,r=e._paper,a=e._size;c(g,r,I,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},S,t)}}),xW=Dt(Q=>{var Z=ud().getModuleCalcData,c=_E(),g="parcats";Q.name=g,Q.plot=function(I,S,t,e){var r=Z(I.calcdata,g);if(r.length){var a=r[0];c(I,a,t,e)}},Q.clean=function(I,S,t,e){var r=e._has&&e._has("parcats"),a=S._has&&S._has("parcats");r&&!a&&e._paperdiv.selectAll(".parcats").remove()}}),_W=Dt((Q,Z)=>{Z.exports={attributes:xE(),supplyDefaults:gW(),calc:vW(),plot:_E(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:xW(),categories:["noOpacity"],meta:{}}}),bW=Dt((Q,Z)=>{Z.exports=_W()}),Ev=Dt((Q,Z)=>{var c=G0(),g="1.13.4",I='© OpenStreetMap contributors',S=['© Carto',I].join(" "),t=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),e=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:I,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:e,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},a=c(r);Z.exports={requiredVersion:g,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:r,styleValuesNonMapbox:a,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+g+"."].join(` `),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` `),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",a.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` -`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}}),E3=Ft((Q,$)=>{var c=_n(),g=ui().defaultLine,P=jh().attributes,S=ka(),t=tf().textposition,e=Yc().overrideAll,r=mu().templatedArray,a=Ev(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=$.exports=e({_arrayAttrRegexps:[c.counterRegex("mapbox",".layers",!0)],domain:P({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:a.styleValuesMapbox.concat(a.styleValuesNonMapbox),dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:g}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),dT=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=D0(),t=gx(),e=tf(),r=E3(),a=Yo(),n=Ac(),o=ya().extendFlat,i=Yc().overrideAll,s=E3(),f=t.line,x=t.marker;$.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:P()},"calc","nested")}),uE=Ft((Q,$)=>{var c=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];$.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),QH=Ft((Q,$)=>{var c=_n(),g=Mc(),P=c0(),S=F0(),t=b0(),e=R0(),r=dT(),a=uE().isSupportedFont;$.exports=function(o,i,s,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){P(o,i,s,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,s,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||s),C=y("cluster.size"),M=y("cluster.opacity"),E=u!==!1||b!==!1||_!==!1||C!==!1||M!==!1,A=x("cluster.enabled",E);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,s,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,s){var f=s("lon")||[],x=s("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),cE=Ft((Q,$)=>{var c=Ls();$.exports=function(g,P,S){var t={},e=S[P.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),hE=Ft((Q,$)=>{var c=_n();$.exports=function(g,P){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(P)?c.mean(P):P,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var s;return o[0]&&o[1]?s=o.join("-"):o[0]?s=o[0]:o[1]?s=o[1]:s="center",{anchor:s,offset:i}}}),tW=Ft((Q,$)=>{var c=ia(),g=_n(),P=Ua().BADNUM,S=H1(),t=Xc(),e=Vs(),r=bg(),a=Mc(),n=uE().isSupportedFont,o=hE(),i=Np().appendArrayPointValue,s=tc().NEWLINES,f=tc().BR_TAG_ALL;$.exports=function(M,E){var A=E[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),R=a.hasText(A),O=w&&A.marker.symbol==="circle",N=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var X;if((p||k)&&(X=S.calcTraceToLineCoords(E)),p&&(H.geojson=S.makePolygon(X),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(X),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(E);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":C(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(N||R)&&(W.geojson=v(E,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),N&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),R)){var yt=(A.marker||{}).size,pt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":pt.anchor,"text-offset":pt.offset,"text-font":C(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var E=M[0].trace,A=E.marker,h=E.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),R;function O(pt){return E.opacity*pt}function N(pt){return pt/2}var V;p&&(t.hasColorscale(E,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(E));var F;w&&(F=function(pt){var st=c(pt)?+g.constrain(pt,0,1):0;return O(st)});var U=[];for(R=0;R850?R+=" Black":p>750?R+=" Extra Bold":p>650?R+=" Bold":p>550?R+=" Semi Bold":p>450?R+=" Medium":p>350?R+=" Regular":p>250?R+=" Light":p>150?R+=" Extra Light":R+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",p>750?R+=" Extrabold":p>650?R+=" Bold":p>550?R+=" Semibold":p>350?R+=" Regular":R+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",k[3]==="CJK"&&(R+=" CJK"),R+=p>500?" Bold":" Regular")),w&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),n(R)||(R=A);var O=R.split(", ");return O}}),eW=Ft((Q,$)=>{var c=_n(),g=tW(),P=Ev().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermapbox",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:P+a+"-fill",line:P+a+"-line",circle:P+a+"-circle",symbol:P+a+"-symbol",cluster:P+a+"-cluster",clusterCount:P+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],s,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function C(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},$.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,s=new t(r,n.uid,o,i),f=g(r.gd,a),x=s.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(s.addSource("circle",f.circle,n.cluster),y=0;y{var c=Qh(),g=_n(),P=Fu(),S=g.fillText,t=Ua().BADNUM,e=Ev().traceLayerPrefix;function r(n,o,i){var s=n.cd,f=s[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var C=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=C*360,E=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),X=q.x-x.c2p([E,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(X*X+lt*lt)-yt,1-3/yt)}if(c.getClosest(s,A,n),n.index!==!1){var h=s[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),R=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=R-O,n.y1=R+O;var N={};N[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,N);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=P(f,h),n.extraText=a(f,h,s[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var s=o.hi||n.hoverinfo,f=s.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}$.exports={hoverPoints:r,getExtraText:a}}),rW=Ft((Q,$)=>{$.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),nW=Ft((Q,$)=>{var c=_n(),g=Mc(),P=Ua().BADNUM;$.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof $<"u"?$.exports=g():(c=c||self,c.mapboxgl=g())})(Q,function(){var c,g,P;function S(t,e){if(!c)c=e;else if(!g)g=e;else{var r="var sharedChunk = {}; ("+c+")(sharedChunk); ("+g+")(sharedChunk);",a={};c(a),P=e(a),typeof window<"u"&&(P.workerUrl=window.URL.createObjectURL(new Blob([r],{type:"text/javascript"})))}}return S(["exports"],function(t){function e(m,B){return B={exports:{}},m(B,B.exports),B.exports}var r="1.13.4",a=n;function n(m,B,K,bt){this.cx=3*m,this.bx=3*(K-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*B,this.by=3*(bt-B)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=bt,this.p2x=K,this.p2y=bt}n.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},n.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},n.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},n.prototype.solveCurveX=function(m,B){typeof B>"u"&&(B=1e-6);var K,bt,Ot,Zt,ie;for(Ot=m,ie=0;ie<8;ie++){if(Zt=this.sampleCurveX(Ot)-m,Math.abs(Zt)bt)return bt;for(;KZt?K=Ot:bt=Ot,Ot=(bt-K)*.5+K}return Ot},n.prototype.solve=function(m,B){return this.sampleCurveY(this.solveCurveX(m,B))};var o=i;function i(m,B){this.x=m,this.y=B}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,B){return this.clone()._rotateAround(m,B)},matMult:function(m){return this.clone()._matMult(m)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var B=m.x-this.x,K=m.y-this.y;return B*B+K*K},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,B){return Math.atan2(this.x*B-this.y*m,this.x*m+this.y*B)},_matMult:function(m){var B=m[0]*this.x+m[1]*this.y,K=m[2]*this.x+m[3]*this.y;return this.x=B,this.y=K,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var B=Math.cos(m),K=Math.sin(m),bt=B*this.x-K*this.y,Ot=K*this.x+B*this.y;return this.x=bt,this.y=Ot,this},_rotateAround:function(m,B){var K=Math.cos(m),bt=Math.sin(m),Ot=B.x+K*(this.x-B.x)-bt*(this.y-B.y),Zt=B.y+bt*(this.x-B.x)+K*(this.y-B.y);return this.x=Ot,this.y=Zt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(m){return m instanceof i?m:Array.isArray(m)?new i(m[0],m[1]):m};var s=typeof self<"u"?self:{};function f(m,B){if(Array.isArray(m)){if(!Array.isArray(B)||m.length!==B.length)return!1;for(var K=0;K=1)return 1;var B=m*m,K=B*m;return 4*(m<.5?K:3*(m-B)+K-.75)}function v(m,B,K,bt){var Ot=new a(m,B,K,bt);return function(Zt){return Ot.solve(Zt)}}var T=v(.25,.1,.25,1);function u(m,B,K){return Math.min(K,Math.max(B,m))}function b(m,B,K){var bt=K-B,Ot=((m-B)%bt+bt)%bt+B;return Ot===B?K:Ot}function _(m,B,K){if(!m.length)return K(null,[]);var bt=m.length,Ot=new Array(m.length),Zt=null;m.forEach(function(ie,Fe){B(ie,function(Je,yr){Je&&(Zt=Je),Ot[Fe]=yr,--bt===0&&K(Zt,Ot)})})}function C(m){var B=[];for(var K in m)B.push(m[K]);return B}function M(m,B){var K=[];for(var bt in m)bt in B||K.push(bt);return K}function E(m){for(var B=[],K=arguments.length-1;K-- >0;)B[K]=arguments[K+1];for(var bt=0,Ot=B;bt>B/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function w(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function R(m){return m?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(m):!1}function O(m,B){m.forEach(function(K){B[K]&&(B[K]=B[K].bind(B))})}function N(m,B){return m.indexOf(B,m.length-B.length)!==-1}function V(m,B,K){var bt={};for(var Ot in m)bt[Ot]=B.call(K||this,m[Ot],Ot,m);return bt}function H(m,B,K){var bt={};for(var Ot in m)B.call(K||this,m[Ot],Ot,m)&&(bt[Ot]=m[Ot]);return bt}function F(m){return Array.isArray(m)?m.map(F):typeof m=="object"&&m?V(m,F):m}function U(m,B){for(var K=0;K=0)return!0;return!1}var W={};function q(m){W[m]||(typeof console<"u"&&console.warn(m),W[m]=!0)}function X(m,B,K){return(K.y-m.y)*(B.x-m.x)>(B.y-m.y)*(K.x-m.x)}function lt(m){for(var B=0,K=0,bt=m.length,Ot=bt-1,Zt=void 0,ie=void 0;K@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,K={};if(m.replace(B,function(Ot,Zt,ie,Fe){var Je=ie||Fe;return K[Zt]=Je?Je.toLowerCase():!0,""}),K["max-age"]){var bt=parseInt(K["max-age"],10);isNaN(bt)?delete K["max-age"]:K["max-age"]=bt}return K}var tt=null;function dt(m){if(tt==null){var B=m.navigator?m.navigator.userAgent:null;tt=!!m.safari||!!(B&&(/\b(iPad|iPhone|iPod)\b/.test(B)||B.match("Safari")&&!B.match("Chrome")))}return tt}function rt(m){try{var B=s[m];return B.setItem("_mapbox_test_",1),B.removeItem("_mapbox_test_"),!0}catch{return!1}}function at(m){return s.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(B,K){return String.fromCharCode(+("0x"+K))}))}function vt(m){return decodeURIComponent(s.atob(m).split("").map(function(B){return"%"+("00"+B.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var it=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),Y=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,ft=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,ut,wt,zt={now:it,frame:function(m){var B=Y(m);return{cancel:function(){return ft(B)}}},getImageData:function(m,B){B===void 0&&(B=0);var K=s.document.createElement("canvas"),bt=K.getContext("2d");if(!bt)throw new Error("failed to create canvas 2d context");return K.width=m.width,K.height=m.height,bt.drawImage(m,0,0,m.width,m.height),bt.getImageData(-B,-B,m.width+2*B,m.height+2*B)},resolveURL:function(m){return ut||(ut=s.document.createElement("a")),ut.href=m,ut.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(wt==null&&(wt=s.matchMedia("(prefers-reduced-motion: reduce)")),wt.matches):!1}},Pt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Wt={supported:!1,testSupport:de},Ht,Jt=!1,ge,he=!1;s.document&&(ge=s.document.createElement("img"),ge.onload=function(){Ht&&se(Ht),Ht=null,he=!0},ge.onerror=function(){Jt=!0,Ht=null},ge.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function de(m){Jt||!ge||(he?se(m):Ht=m)}function se(m){var B=m.createTexture();m.bindTexture(m.TEXTURE_2D,B);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,ge),m.isContextLost())return;Wt.supported=!0}catch{}m.deleteTexture(B),Jt=!0}var Tt="01";function Lt(){for(var m="1",B="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",K="",bt=0;bt<10;bt++)K+=B[Math.floor(Math.random()*62)];var Ot=720*60*1e3,Zt=[m,Tt,K].join(""),ie=Date.now()+Ot;return{token:Zt,tokenExpiresAt:ie}}var Mt=function(m,B){this._transformRequestFn=m,this._customAccessToken=B,this._createSkuToken()};Mt.prototype._createSkuToken=function(){var m=Lt();this._skuToken=m.token,this._skuTokenExpiresAt=m.tokenExpiresAt},Mt.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Mt.prototype.transformRequest=function(m,B){return this._transformRequestFn?this._transformRequestFn(m,B)||{url:m}:{url:m}},Mt.prototype.normalizeStyleURL=function(m,B){if(!te(m))return m;var K=cr(m);return K.path="/styles/v1"+K.path,this._makeAPIURL(K,this._customAccessToken||B)},Mt.prototype.normalizeGlyphsURL=function(m,B){if(!te(m))return m;var K=cr(m);return K.path="/fonts/v1"+K.path,this._makeAPIURL(K,this._customAccessToken||B)},Mt.prototype.normalizeSourceURL=function(m,B){if(!te(m))return m;var K=cr(m);return K.path="/v4/"+K.authority+".json",K.params.push("secure"),this._makeAPIURL(K,this._customAccessToken||B)},Mt.prototype.normalizeSpriteURL=function(m,B,K,bt){var Ot=cr(m);return te(m)?(Ot.path="/styles/v1"+Ot.path+"/sprite"+B+K,this._makeAPIURL(Ot,this._customAccessToken||bt)):(Ot.path+=""+B+K,ur(Ot))},Mt.prototype.normalizeTileURL=function(m,B){if(this._isSkuTokenExpired()&&this._createSkuToken(),m&&!te(m))return m;var K=cr(m),bt=/(\.(png|jpg)\d*)(?=$)/,Ot=/^.+\/v4\//,Zt=zt.devicePixelRatio>=2||B===512?"@2x":"",ie=Wt.supported?".webp":"$1";K.path=K.path.replace(bt,""+Zt+ie),K.path=K.path.replace(Ot,"/"),K.path="/v4"+K.path;var Fe=this._customAccessToken||He(K.params)||Pt.ACCESS_TOKEN;return Pt.REQUIRE_ACCESS_TOKEN&&Fe&&this._skuToken&&K.params.push("sku="+this._skuToken),this._makeAPIURL(K,Fe)},Mt.prototype.canonicalizeTileURL=function(m,B){var K="/v4/",bt=/\.[\w]+$/,Ot=cr(m);if(!Ot.path.match(/(^\/v4\/)/)||!Ot.path.match(bt))return m;var Zt="mapbox://tiles/";Zt+=Ot.path.replace(K,"");var ie=Ot.params;return B&&(ie=ie.filter(function(Fe){return!Fe.match(/^access_token=/)})),ie.length&&(Zt+="?"+ie.join("&")),Zt},Mt.prototype.canonicalizeTileset=function(m,B){for(var K=B?te(B):!1,bt=[],Ot=0,Zt=m.tiles||[];Ot=0&&m.params.splice(Ot,1)}if(bt.path!=="/"&&(m.path=""+bt.path+m.path),!Pt.REQUIRE_ACCESS_TOKEN)return ur(m);if(B=B||Pt.ACCESS_TOKEN,!B)throw new Error("An API access token is required to use Mapbox GL. "+K);if(B[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+K);return m.params=m.params.filter(function(Zt){return Zt.indexOf("access_token")===-1}),m.params.push("access_token="+B),ur(m)};function te(m){return m.indexOf("mapbox:")===0}var ve=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function oe(m){return ve.test(m)}function Te(m){return m.indexOf("sku=")>0&&oe(m)}function He(m){for(var B=0,K=m;B=1&&s.localStorage.setItem(B,JSON.stringify(this.eventData))}catch{q("Unable to write to LocalStorage")}},br.prototype.processRequests=function(m){},br.prototype.postEvent=function(m,B,K,bt){var Ot=this;if(Pt.EVENTS_URL){var Zt=cr(Pt.EVENTS_URL);Zt.params.push("access_token="+(bt||Pt.ACCESS_TOKEN||""));var ie={event:this.type,created:new Date(m).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:Tt,userId:this.anonId},Fe=B?E(ie,B):ie,Je={url:ur(Zt),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Fe])};this.pendingRequest=An(Je,function(yr){Ot.pendingRequest=null,K(yr),Ot.saveEventData(),Ot.processRequests(bt)})}},br.prototype.queueRequest=function(m,B){this.queue.push(m),this.processRequests(B)};var Kr=function(m){function B(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.postMapLoadEvent=function(K,bt,Ot,Zt){this.skuToken=Ot,(Pt.EVENTS_URL&&Zt||Pt.ACCESS_TOKEN&&Array.isArray(K)&&K.some(function(ie){return te(ie)||oe(ie)}))&&this.queueRequest({id:bt,timestamp:Date.now()},Zt)},B.prototype.processRequests=function(K){var bt=this;if(!(this.pendingRequest||this.queue.length===0)){var Ot=this.queue.shift(),Zt=Ot.id,ie=Ot.timestamp;Zt&&this.success[Zt]||(this.anonId||this.fetchEventData(),R(this.anonId)||(this.anonId=k()),this.postEvent(ie,{skuToken:this.skuToken},function(Fe){Fe||Zt&&(bt.success[Zt]=!0)},K))}},B}(br),rn=function(m){function B(K){m.call(this,"appUserTurnstile"),this._customAccessToken=K}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.postTurnstileEvent=function(K,bt){Pt.EVENTS_URL&&Pt.ACCESS_TOKEN&&Array.isArray(K)&&K.some(function(Ot){return te(Ot)||oe(Ot)})&&this.queueRequest(Date.now(),bt)},B.prototype.processRequests=function(K){var bt=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ot=Hr(Pt.ACCESS_TOKEN),Zt=Ot?Ot.u:Pt.ACCESS_TOKEN,ie=Zt!==this.eventData.tokenU;R(this.anonId)||(this.anonId=k(),ie=!0);var Fe=this.queue.shift();if(this.eventData.lastSuccess){var Je=new Date(this.eventData.lastSuccess),yr=new Date(Fe),Sr=(Fe-this.eventData.lastSuccess)/(1440*60*1e3);ie=ie||Sr>=1||Sr<-1||Je.getDate()!==yr.getDate()}else ie=!0;if(!ie)return this.processRequests();this.postEvent(Fe,{"enabled.telemetry":!1},function(Yr){Yr||(bt.eventData.lastSuccess=Fe,bt.eventData.tokenU=Zt)},K)}},B}(br),Ce=new rn,Gt=Ce.postTurnstileEvent.bind(Ce),ne=new Kr,Ct=ne.postMapLoadEvent.bind(ne),gt="mapbox-tiles",St=500,Nt=50,re=1e3*60*7,le;function we(){s.caches&&!le&&(le=s.caches.open(gt))}var Ue;function qe(m,B){if(Ue===void 0)try{new Response(new ReadableStream),Ue=!0}catch{Ue=!1}Ue?B(m.body):m.blob().then(B)}function or(m,B,K){if(we(),!!le){var bt={status:B.status,statusText:B.statusText,headers:new s.Headers};B.headers.forEach(function(ie,Fe){return bt.headers.set(Fe,ie)});var Ot=st(B.headers.get("Cache-Control")||"");if(!Ot["no-store"]){Ot["max-age"]&&bt.headers.set("Expires",new Date(K+Ot["max-age"]*1e3).toUTCString());var Zt=new Date(bt.headers.get("Expires")).getTime()-K;ZtDate.now()&&!K["no-cache"]}var Jr=1/0;function Vn(m){Jr++,Jr>Nt&&(m.getActor().send("enforceCacheSizeLimit",St),Jr=0)}function Hn(m){we(),le&&le.then(function(B){B.keys().then(function(K){for(var bt=0;bt=200&&K.status<300||K.status===0)&&K.response!==null){var Ot=K.response;if(m.type==="json")try{Ot=JSON.parse(K.response)}catch(Zt){return B(Zt)}B(null,Ot,K.getResponseHeader("Cache-Control"),K.getResponseHeader("Expires"))}else B(new Vi(K.statusText,K.status,m.url))},K.send(m.body),{cancel:function(){return K.abort()}}}var Qr=function(m,B){if(!rr(m.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return fr(m,B);if(pt()&&self.worker&&self.worker.actor){var K=!0;return self.worker.actor.send("getResource",m,B,void 0,K)}}return _r(m,B)},Cn=function(m,B){return Qr(E(m,{type:"json"}),B)},bn=function(m,B){return Qr(E(m,{type:"arrayBuffer"}),B)},An=function(m,B){return Qr(E(m,{method:"POST"}),B)};function ci(m){var B=s.document.createElement("a");return B.href=m,B.protocol===s.document.location.protocol&&B.host===s.document.location.host}var xi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Li(m,B,K,bt){var Ot=new s.Image,Zt=s.URL;Ot.onload=function(){B(null,Ot),Zt.revokeObjectURL(Ot.src),Ot.onload=null,s.requestAnimationFrame(function(){Ot.src=xi})},Ot.onerror=function(){return B(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var ie=new s.Blob([new Uint8Array(m)],{type:"image/png"});Ot.cacheControl=K,Ot.expires=bt,Ot.src=m.byteLength?Zt.createObjectURL(ie):xi}function Oi(m,B){var K=new s.Blob([new Uint8Array(m)],{type:"image/png"});s.createImageBitmap(K).then(function(bt){B(null,bt)}).catch(function(bt){B(new Error("Could not load image because of "+bt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Zi,li,La=function(){Zi=[],li=0};La();var Wa=function(m,B){if(Wt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),li>=Pt.MAX_PARALLEL_IMAGE_REQUESTS){var K={requestParameters:m,callback:B,cancelled:!1,cancel:function(){this.cancelled=!0}};return Zi.push(K),K}li++;var bt=!1,Ot=function(){if(!bt)for(bt=!0,li--;Zi.length&&li0||this._oneTimeListeners&&this._oneTimeListeners[m]&&this._oneTimeListeners[m].length>0||this._eventedParent&&this._eventedParent.listens(m)},Br.prototype.setEventedParent=function(m,B){return this._eventedParent=m,this._eventedParentData=B,this};var Gr=8,fn={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},an={"*":{type:"source"}},Ee=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],dr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Vr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},vn={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Fn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Xn={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Pn={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Sn={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Zn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Ea={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ri={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ja={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Xa={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Do={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},go={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Fo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},za={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},xs={type:"array",value:"*"},os={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},cl={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Zo={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Ks={type:"array",value:"*",minimum:1},ss={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},hl=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],tl={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Bl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},cs={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},Ps={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Po={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Ts={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},kl={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Hl={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Xl={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Us={"*":{type:"string"}},Ca={$version:Gr,$root:fn,sources:an,source:Ee,source_vector:dr,source_raster:Vr,source_raster_dem:vn,source_geojson:Fn,source_video:Xn,source_image:Pn,layer:Sn,layout:Zn,layout_background:Ea,layout_fill:Ri,layout_circle:Ja,layout_heatmap:Xa,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Do,layout_symbol:go,layout_raster:Fo,layout_hillshade:za,filter:xs,filter_operator:os,geometry_type:cl,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Zo,expression:Ks,light:ss,paint:hl,paint_fill:tl,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Bl,paint_circle:cs,paint_heatmap:Ps,paint_symbol:Po,paint_raster:Ts,paint_hillshade:kl,paint_background:Hl,transition:Xl,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:Us},fo=function(m,B,K,bt){this.message=(m?m+": ":"")+K,bt&&(this.identifier=bt),B!=null&&B.__line__&&(this.line=B.__line__)};function qs(m){var B=m.key,K=m.value;return K?[new fo(B,K,"constants have been deprecated as of v8")]:[]}function Jl(m){for(var B=[],K=arguments.length-1;K-- >0;)B[K]=arguments[K+1];for(var bt=0,Ot=B;bt":m.itemType.kind==="value"?"array":"array<"+B+">"}else return m.kind}var oc=[Ru,lo,As,zs,au,bl,fl,Ql(rs),Dl];function mh(m,B){if(B.kind==="error")return null;if(m.kind==="array"){if(B.kind==="array"&&(B.N===0&&B.itemType.kind==="value"||!mh(m.itemType,B.itemType))&&(typeof m.N!="number"||m.N===B.N))return null}else{if(m.kind===B.kind)return null;if(m.kind==="value")for(var K=0,bt=oc;K255?255:yr}function Ot(yr){return yr<0?0:yr>1?1:yr}function Zt(yr){return yr[yr.length-1]==="%"?bt(parseFloat(yr)/100*255):bt(parseInt(yr))}function ie(yr){return yr[yr.length-1]==="%"?Ot(parseFloat(yr)/100):Ot(parseFloat(yr))}function Fe(yr,Sr,Yr){return Yr<0?Yr+=1:Yr>1&&(Yr-=1),Yr*6<1?yr+(Sr-yr)*Yr*6:Yr*2<1?Sr:Yr*3<2?yr+(Sr-yr)*(2/3-Yr)*6:yr}function Je(yr){var Sr=yr.replace(/ /g,"").toLowerCase();if(Sr in K)return K[Sr].slice();if(Sr[0]==="#"){if(Sr.length===4){var Yr=parseInt(Sr.substr(1),16);return Yr>=0&&Yr<=4095?[(Yr&3840)>>4|(Yr&3840)>>8,Yr&240|(Yr&240)>>4,Yr&15|(Yr&15)<<4,1]:null}else if(Sr.length===7){var Yr=parseInt(Sr.substr(1),16);return Yr>=0&&Yr<=16777215?[(Yr&16711680)>>16,(Yr&65280)>>8,Yr&255,1]:null}return null}var nn=Sr.indexOf("("),dn=Sr.indexOf(")");if(nn!==-1&&dn+1===Sr.length){var Rn=Sr.substr(0,nn),pi=Sr.substr(nn+1,dn-(nn+1)).split(","),sa=1;switch(Rn){case"rgba":if(pi.length!==4)return null;sa=ie(pi.pop());case"rgb":return pi.length!==3?null:[Zt(pi[0]),Zt(pi[1]),Zt(pi[2]),sa];case"hsla":if(pi.length!==4)return null;sa=ie(pi.pop());case"hsl":if(pi.length!==3)return null;var ra=(parseFloat(pi[0])%360+360)%360/360,_a=ie(pi[1]),Oa=ie(pi[2]),ga=Oa<=.5?Oa*(_a+1):Oa+_a-Oa*_a,Ka=Oa*2-ga;return[bt(Fe(Ka,ga,ra+1/3)*255),bt(Fe(Ka,ga,ra)*255),bt(Fe(Ka,ga,ra-1/3)*255),sa];default:return null}}return null}try{B.parseCSSColor=Je}catch{}}),Cf=Uf.parseCSSColor,Fl=function(m,B,K,bt){bt===void 0&&(bt=1),this.r=m,this.g=B,this.b=K,this.a=bt};Fl.parse=function(m){if(m){if(m instanceof Fl)return m;if(typeof m=="string"){var B=Cf(m);if(B)return new Fl(B[0]/255*B[3],B[1]/255*B[3],B[2]/255*B[3],B[3])}}},Fl.prototype.toString=function(){var m=this.toArray(),B=m[0],K=m[1],bt=m[2],Ot=m[3];return"rgba("+Math.round(B)+","+Math.round(K)+","+Math.round(bt)+","+Ot+")"},Fl.prototype.toArray=function(){var m=this,B=m.r,K=m.g,bt=m.b,Ot=m.a;return Ot===0?[0,0,0,0]:[B*255/Ot,K*255/Ot,bt*255/Ot,Ot]},Fl.black=new Fl(0,0,0,1),Fl.white=new Fl(1,1,1,1),Fl.transparent=new Fl(0,0,0,0),Fl.red=new Fl(1,0,0,1);var Bc=function(m,B,K){m?this.sensitivity=B?"variant":"case":this.sensitivity=B?"accent":"base",this.locale=K,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Bc.prototype.compare=function(m,B){return this.collator.compare(m,B)},Bc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Vf=function(m,B,K,bt,Ot){this.text=m,this.image=B,this.scale=K,this.fontStack=bt,this.textColor=Ot},fc=function(m){this.sections=m};fc.fromString=function(m){return new fc([new Vf(m,null,null,null,null)])},fc.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(m){return m.text.length!==0||m.image&&m.image.name.length!==0})},fc.factory=function(m){return m instanceof fc?m:fc.fromString(m)},fc.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(m){return m.text}).join("")},fc.prototype.serialize=function(){for(var m=["format"],B=0,K=this.sections;B=0&&m<=255&&typeof B=="number"&&B>=0&&B<=255&&typeof K=="number"&&K>=0&&K<=255)){var Ot=typeof bt=="number"?[m,B,K,bt]:[m,B,K];return"Invalid rgba value ["+Ot.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof bt>"u"||typeof bt=="number"&&bt>=0&&bt<=1?null:"Invalid rgba value ["+[m,B,K,bt].join(", ")+"]: 'a' must be between 0 and 1."}function sh(m){if(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number"||m instanceof Fl||m instanceof Bc||m instanceof fc||m instanceof sc)return!0;if(Array.isArray(m)){for(var B=0,K=m;B2){var ie=m[1];if(typeof ie!="string"||!(ie in Sh)||ie==="object")return B.error('The item type argument of "array" must be one of string, number, boolean',1);Zt=Sh[ie],K++}else Zt=rs;var Fe;if(m.length>3){if(m[2]!==null&&(typeof m[2]!="number"||m[2]<0||m[2]!==Math.floor(m[2])))return B.error('The length argument to "array" must be a positive integer literal',2);Fe=m[2],K++}bt=Ql(Zt,Fe)}else bt=Sh[Ot];for(var Je=[];K1)&&B.push(bt)}}return B.concat(this.args.map(function(Ot){return Ot.serialize()}))};var Uh=function(m){this.type=bl,this.sections=m};Uh.parse=function(m,B){if(m.length<2)return B.error("Expected at least one argument.");var K=m[1];if(!Array.isArray(K)&&typeof K=="object")return B.error("First argument must be an image or text section.");for(var bt=[],Ot=!1,Zt=1;Zt<=m.length-1;++Zt){var ie=m[Zt];if(Ot&&typeof ie=="object"&&!Array.isArray(ie)){Ot=!1;var Fe=null;if(ie["font-scale"]&&(Fe=B.parse(ie["font-scale"],1,lo),!Fe))return null;var Je=null;if(ie["text-font"]&&(Je=B.parse(ie["text-font"],1,Ql(As)),!Je))return null;var yr=null;if(ie["text-color"]&&(yr=B.parse(ie["text-color"],1,au),!yr))return null;var Sr=bt[bt.length-1];Sr.scale=Fe,Sr.font=Je,Sr.textColor=yr}else{var Yr=B.parse(m[Zt],1,rs);if(!Yr)return null;var nn=Yr.type.kind;if(nn!=="string"&&nn!=="value"&&nn!=="null"&&nn!=="resolvedImage")return B.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ot=!0,bt.push({content:Yr,scale:null,font:null,textColor:null})}}return new Uh(bt)},Uh.prototype.evaluate=function(m){var B=function(K){var bt=K.content.evaluate(m);return cu(bt)===Dl?new Vf("",bt,null,null,null):new Vf(lc(bt),null,K.scale?K.scale.evaluate(m):null,K.font?K.font.evaluate(m).join(","):null,K.textColor?K.textColor.evaluate(m):null)};return new fc(this.sections.map(B))},Uh.prototype.eachChild=function(m){for(var B=0,K=this.sections;B-1),K},xu.prototype.eachChild=function(m){m(this.input)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){return["image",this.input.serialize()]};var Id={"to-boolean":zs,"to-color":au,"to-number":lo,"to-string":As},el=function(m,B){this.type=m,this.args=B};el.parse=function(m,B){if(m.length<2)return B.error("Expected at least one argument.");var K=m[0];if((K==="to-boolean"||K==="to-string")&&m.length!==2)return B.error("Expected one argument.");for(var bt=Id[K],Ot=[],Zt=1;Zt4?K="Invalid rbga value "+JSON.stringify(B)+": expected an array containing either three or four numeric values.":K=dc(B[0],B[1],B[2],B[3]),!K))return new Fl(B[0]/255,B[1]/255,B[2]/255,B[3])}throw new Gl(K||"Could not parse color from value '"+(typeof B=="string"?B:String(JSON.stringify(B)))+"'")}else if(this.type.kind==="number"){for(var Fe=null,Je=0,yr=this.args;Je=B[2]||m[1]<=B[1]||m[3]>=B[3])}function md(m,B){var K=Vh(m[0]),bt=xf(m[1]),Ot=Math.pow(2,B.z);return[Math.round(K*Ot*ec),Math.round(bt*Ot*ec)]}function Kf(m,B,K){var bt=m[0]-B[0],Ot=m[1]-B[1],Zt=m[0]-K[0],ie=m[1]-K[1];return bt*ie-Zt*Ot===0&&bt*Zt<=0&&Ot*ie<=0}function _f(m,B,K){return B[1]>m[1]!=K[1]>m[1]&&m[0]<(K[0]-B[0])*(m[1]-B[1])/(K[1]-B[1])+B[0]}function Hh(m,B){for(var K=!1,bt=0,Ot=B.length;bt0&&Yr<0||Sr<0&&Yr>0}function Xf(m,B,K,bt){var Ot=[B[0]-m[0],B[1]-m[1]],Zt=[bt[0]-K[0],bt[1]-K[1]];return qf(Zt,Ot)===0?!1:!!(uh(m,B,K,bt)&&uh(K,bt,m,B))}function Eh(m,B,K){for(var bt=0,Ot=K;btK[2]){var Ot=bt*.5,Zt=m[0]-K[0]>Ot?-bt:K[0]-m[0]>Ot?bt:0;Zt===0&&(Zt=m[0]-K[2]>Ot?-bt:K[2]-m[0]>Ot?bt:0),m[0]+=Zt}Hf(B,m)}function Lf(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Od(m,B,K,bt){for(var Ot=Math.pow(2,bt.z)*ec,Zt=[bt.x*ec,bt.y*ec],ie=[],Fe=0,Je=m;Fe=0)return!1;var K=!0;return m.eachChild(function(bt){K&&!jc(bt,B)&&(K=!1)}),K}var Wh=function(m,B){this.type=B.type,this.name=m,this.boundExpression=B};Wh.parse=function(m,B){if(m.length!==2||typeof m[1]!="string")return B.error("'var' expression requires exactly one string literal argument.");var K=m[1];return B.scope.has(K)?new Wh(K,B.scope.get(K)):B.error('Unknown variable "'+K+'". Make sure "'+K+'" has been bound in an enclosing "let" expression before using it.',1)},Wh.prototype.evaluate=function(m){return this.boundExpression.evaluate(m)},Wh.prototype.eachChild=function(){},Wh.prototype.outputDefined=function(){return!1},Wh.prototype.serialize=function(){return["var",this.name]};var hu=function(m,B,K,bt,Ot){B===void 0&&(B=[]),bt===void 0&&(bt=new Pl),Ot===void 0&&(Ot=[]),this.registry=m,this.path=B,this.key=B.map(function(Zt){return"["+Zt+"]"}).join(""),this.scope=bt,this.errors=Ot,this.expectedType=K};hu.prototype.parse=function(m,B,K,bt,Ot){return Ot===void 0&&(Ot={}),B?this.concat(B,K,bt)._parse(m,Ot):this._parse(m,Ot)},hu.prototype._parse=function(m,B){(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number")&&(m=["literal",m]);function K(yr,Sr,Yr){return Yr==="assert"?new Pc(Sr,[yr]):Yr==="coerce"?new el(Sr,[yr]):yr}if(Array.isArray(m)){if(m.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var bt=m[0];if(typeof bt!="string")return this.error("Expression name must be a string, but found "+typeof bt+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ot=this.registry[bt];if(Ot){var Zt=Ot.parse(m,this);if(!Zt)return null;if(this.expectedType){var ie=this.expectedType,Fe=Zt.type;if((ie.kind==="string"||ie.kind==="number"||ie.kind==="boolean"||ie.kind==="object"||ie.kind==="array")&&Fe.kind==="value")Zt=K(Zt,ie,B.typeAnnotation||"assert");else if((ie.kind==="color"||ie.kind==="formatted"||ie.kind==="resolvedImage")&&(Fe.kind==="value"||Fe.kind==="string"))Zt=K(Zt,ie,B.typeAnnotation||"coerce");else if(this.checkSubtype(ie,Fe))return null}if(!(Zt instanceof nl)&&Zt.type.kind!=="resolvedImage"&&Ch(Zt)){var Je=new zl;try{Zt=new nl(Zt.type,Zt.evaluate(Je))}catch(yr){return this.error(yr.message),null}}return Zt}return this.error('Unknown expression "'+bt+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof m>"u"?this.error("'undefined' value invalid. Use null instead."):typeof m=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof m+" instead.")},hu.prototype.concat=function(m,B,K){var bt=typeof m=="number"?this.path.concat(m):this.path,Ot=K?this.scope.concat(K):this.scope;return new hu(this.registry,bt,B||null,Ot,this.errors)},hu.prototype.error=function(m){for(var B=[],K=arguments.length-1;K-- >0;)B[K]=arguments[K+1];var bt=""+this.key+B.map(function(Ot){return"["+Ot+"]"}).join("");this.errors.push(new ol(bt,m))},hu.prototype.checkSubtype=function(m,B){var K=mh(m,B);return K&&this.error(K),K};function Ch(m){if(m instanceof Wh)return Ch(m.boundExpression);if(m instanceof ts&&m.name==="error"||m instanceof lh||m instanceof Nc)return!1;var B=m instanceof el||m instanceof Pc,K=!0;return m.eachChild(function(bt){B?K=K&&Ch(bt):K=K&&bt instanceof nl}),K?td(m)&&jc(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Ec(m,B){for(var K=m.length-1,bt=0,Ot=K,Zt=0,ie,Fe;bt<=Ot;)if(Zt=Math.floor((bt+Ot)/2),ie=m[Zt],Fe=m[Zt+1],ie<=B){if(Zt===K||BB)Ot=Zt-1;else throw new Gl("Input is not a number.");return 0}var Uc=function(m,B,K){this.type=m,this.input=B,this.labels=[],this.outputs=[];for(var bt=0,Ot=K;bt=ie)return B.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Je);var Sr=B.parse(Fe,yr,Ot);if(!Sr)return null;Ot=Ot||Sr.type,bt.push([ie,Sr])}return new Uc(Ot,K,bt)},Uc.prototype.evaluate=function(m){var B=this.labels,K=this.outputs;if(B.length===1)return K[0].evaluate(m);var bt=this.input.evaluate(m);if(bt<=B[0])return K[0].evaluate(m);var Ot=B.length;if(bt>=B[Ot-1])return K[Ot-1].evaluate(m);var Zt=Ec(B,bt);return K[Zt].evaluate(m)},Uc.prototype.eachChild=function(m){m(this.input);for(var B=0,K=this.outputs;B0&&m.push(this.labels[B]),m.push(this.outputs[B].serialize());return m};function _u(m,B,K){return m*(1-K)+B*K}function uf(m,B,K){return new Fl(_u(m.r,B.r,K),_u(m.g,B.g,K),_u(m.b,B.b,K),_u(m.a,B.a,K))}function vh(m,B,K){return m.map(function(bt,Ot){return _u(bt,B[Ot],K)})}var qh=Object.freeze({__proto__:null,number:_u,color:uf,array:vh}),Pf=.95047,Dd=1,rp=1.08883,cf=4/29,zf=6/29,Tc=3*zf*zf,hf=zf*zf*zf,Qc=Math.PI/180,ff=180/Math.PI;function If(m){return m>hf?Math.pow(m,1/3):m/Tc+cf}function yh(m){return m>zf?m*m*m:Tc*(m-cf)}function bu(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function Lh(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function Vc(m){var B=Lh(m.r),K=Lh(m.g),bt=Lh(m.b),Ot=If((.4124564*B+.3575761*K+.1804375*bt)/Pf),Zt=If((.2126729*B+.7151522*K+.072175*bt)/Dd),ie=If((.0193339*B+.119192*K+.9503041*bt)/rp);return{l:116*Zt-16,a:500*(Ot-Zt),b:200*(Zt-ie),alpha:m.a}}function gd(m){var B=(m.l+16)/116,K=isNaN(m.a)?B:B+m.a/500,bt=isNaN(m.b)?B:B-m.b/200;return B=Dd*yh(B),K=Pf*yh(K),bt=rp*yh(bt),new Fl(bu(3.2404542*K-1.5371385*B-.4985314*bt),bu(-.969266*K+1.8760108*B+.041556*bt),bu(.0556434*K-.2040259*B+1.0572252*bt),m.alpha)}function vu(m,B,K){return{l:_u(m.l,B.l,K),a:_u(m.a,B.a,K),b:_u(m.b,B.b,K),alpha:_u(m.alpha,B.alpha,K)}}function wf(m){var B=Vc(m),K=B.l,bt=B.a,Ot=B.b,Zt=Math.atan2(Ot,bt)*ff;return{h:Zt<0?Zt+360:Zt,c:Math.sqrt(bt*bt+Ot*Ot),l:K,alpha:m.a}}function Zh(m){var B=m.h*Qc,K=m.c,bt=m.l;return gd({l:bt,a:Math.cos(B)*K,b:Math.sin(B)*K,alpha:m.alpha})}function th(m,B,K){var bt=B-m;return m+K*(bt>180||bt<-180?bt-360*Math.round(bt/360):bt)}function rf(m,B,K){return{h:th(m.h,B.h,K),c:_u(m.c,B.c,K),l:_u(m.l,B.l,K),alpha:_u(m.alpha,B.alpha,K)}}var $h={forward:Vc,reverse:gd,interpolate:vu},kf={forward:wf,reverse:Zh,interpolate:rf},Fd=Object.freeze({__proto__:null,lab:$h,hcl:kf}),vc=function(m,B,K,bt,Ot){this.type=m,this.operator=B,this.interpolation=K,this.input=bt,this.labels=[],this.outputs=[];for(var Zt=0,ie=Ot;Zt1}))return B.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);bt={name:"cubic-bezier",controlPoints:Fe}}else return B.error("Unknown interpolation type "+String(bt[0]),1,0);if(m.length-1<4)return B.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if((m.length-1)%2!==0)return B.error("Expected an even number of arguments.");if(Ot=B.parse(Ot,2,lo),!Ot)return null;var Je=[],yr=null;K==="interpolate-hcl"||K==="interpolate-lab"?yr=au:B.expectedType&&B.expectedType.kind!=="value"&&(yr=B.expectedType);for(var Sr=0;Sr=Yr)return B.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',dn);var pi=B.parse(nn,Rn,yr);if(!pi)return null;yr=yr||pi.type,Je.push([Yr,pi])}return yr.kind!=="number"&&yr.kind!=="color"&&!(yr.kind==="array"&&yr.itemType.kind==="number"&&typeof yr.N=="number")?B.error("Type "+ru(yr)+" is not interpolatable."):new vc(yr,K,bt,Ot,Je)},vc.prototype.evaluate=function(m){var B=this.labels,K=this.outputs;if(B.length===1)return K[0].evaluate(m);var bt=this.input.evaluate(m);if(bt<=B[0])return K[0].evaluate(m);var Ot=B.length;if(bt>=B[Ot-1])return K[Ot-1].evaluate(m);var Zt=Ec(B,bt),ie=B[Zt],Fe=B[Zt+1],Je=vc.interpolationFactor(this.interpolation,bt,ie,Fe),yr=K[Zt].evaluate(m),Sr=K[Zt+1].evaluate(m);return this.operator==="interpolate"?qh[this.type.kind.toLowerCase()](yr,Sr,Je):this.operator==="interpolate-hcl"?kf.reverse(kf.interpolate(kf.forward(yr),kf.forward(Sr),Je)):$h.reverse($h.interpolate($h.forward(yr),$h.forward(Sr),Je))},vc.prototype.eachChild=function(m){m(this.input);for(var B=0,K=this.outputs;B=K.length)throw new Gl("Array index out of bounds: "+B+" > "+(K.length-1)+".");if(B!==Math.floor(B))throw new Gl("Array index must be an integer, but found "+B+" instead.");return K[B]},xh.prototype.eachChild=function(m){m(this.index),m(this.input)},xh.prototype.outputDefined=function(){return!1},xh.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Bu=function(m,B){this.type=zs,this.needle=m,this.haystack=B};Bu.parse=function(m,B){if(m.length!==3)return B.error("Expected 2 arguments, but found "+(m.length-1)+" instead.");var K=B.parse(m[1],1,rs),bt=B.parse(m[2],2,rs);return!K||!bt?null:Jc(K.type,[zs,As,lo,Ru,rs])?new Bu(K,bt):B.error("Expected first argument to be of type boolean, string, number or null, but found "+ru(K.type)+" instead")},Bu.prototype.evaluate=function(m){var B=this.needle.evaluate(m),K=this.haystack.evaluate(m);if(!K)return!1;if(!oh(B,["boolean","string","number","null"]))throw new Gl("Expected first argument to be of type boolean, string, number or null, but found "+ru(cu(B))+" instead.");if(!oh(K,["string","array"]))throw new Gl("Expected second argument to be of type array or string, but found "+ru(cu(K))+" instead.");return K.indexOf(B)>=0},Bu.prototype.eachChild=function(m){m(this.needle),m(this.haystack)},Bu.prototype.outputDefined=function(){return!0},Bu.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var nu=function(m,B,K){this.type=lo,this.needle=m,this.haystack=B,this.fromIndex=K};nu.parse=function(m,B){if(m.length<=2||m.length>=5)return B.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var K=B.parse(m[1],1,rs),bt=B.parse(m[2],2,rs);if(!K||!bt)return null;if(!Jc(K.type,[zs,As,lo,Ru,rs]))return B.error("Expected first argument to be of type boolean, string, number or null, but found "+ru(K.type)+" instead");if(m.length===4){var Ot=B.parse(m[3],3,lo);return Ot?new nu(K,bt,Ot):null}else return new nu(K,bt)},nu.prototype.evaluate=function(m){var B=this.needle.evaluate(m),K=this.haystack.evaluate(m);if(!oh(B,["boolean","string","number","null"]))throw new Gl("Expected first argument to be of type boolean, string, number or null, but found "+ru(cu(B))+" instead.");if(!oh(K,["string","array"]))throw new Gl("Expected second argument to be of type array or string, but found "+ru(cu(K))+" instead.");if(this.fromIndex){var bt=this.fromIndex.evaluate(m);return K.indexOf(B,bt)}return K.indexOf(B)},nu.prototype.eachChild=function(m){m(this.needle),m(this.haystack),this.fromIndex&&m(this.fromIndex)},nu.prototype.outputDefined=function(){return!1},nu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var m=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),m]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var _h=function(m,B,K,bt,Ot,Zt){this.inputType=m,this.type=B,this.input=K,this.cases=bt,this.outputs=Ot,this.otherwise=Zt};_h.parse=function(m,B){if(m.length<5)return B.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if(m.length%2!==1)return B.error("Expected an even number of arguments.");var K,bt;B.expectedType&&B.expectedType.kind!=="value"&&(bt=B.expectedType);for(var Ot={},Zt=[],ie=2;ieNumber.MAX_SAFE_INTEGER)return yr.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof nn=="number"&&Math.floor(nn)!==nn)return yr.error("Numeric branch labels must be integer values.");if(!K)K=cu(nn);else if(yr.checkSubtype(K,cu(nn)))return null;if(typeof Ot[String(nn)]<"u")return yr.error("Branch labels must be unique.");Ot[String(nn)]=Zt.length}var dn=B.parse(Je,ie,bt);if(!dn)return null;bt=bt||dn.type,Zt.push(dn)}var Rn=B.parse(m[1],1,rs);if(!Rn)return null;var pi=B.parse(m[m.length-1],m.length-1,bt);return!pi||Rn.type.kind!=="value"&&B.concat(1).checkSubtype(K,Rn.type)?null:new _h(K,bt,Rn,Ot,Zt,pi)},_h.prototype.evaluate=function(m){var B=this.input.evaluate(m),K=cu(B)===this.inputType&&this.outputs[this.cases[B]]||this.otherwise;return K.evaluate(m)},_h.prototype.eachChild=function(m){m(this.input),this.outputs.forEach(m),m(this.otherwise)},_h.prototype.outputDefined=function(){return this.outputs.every(function(m){return m.outputDefined()})&&this.otherwise.outputDefined()},_h.prototype.serialize=function(){for(var m=this,B=["match",this.input.serialize()],K=Object.keys(this.cases).sort(),bt=[],Ot={},Zt=0,ie=K;Zt=5)return B.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var K=B.parse(m[1],1,rs),bt=B.parse(m[2],2,lo);if(!K||!bt)return null;if(!Jc(K.type,[Ql(rs),As,rs]))return B.error("Expected first argument to be of type array or string, but found "+ru(K.type)+" instead");if(m.length===4){var Ot=B.parse(m[3],3,lo);return Ot?new bh(K.type,K,bt,Ot):null}else return new bh(K.type,K,bt)},bh.prototype.evaluate=function(m){var B=this.input.evaluate(m),K=this.beginIndex.evaluate(m);if(!oh(B,["string","array"]))throw new Gl("Expected first argument to be of type array or string, but found "+ru(cu(B))+" instead.");if(this.endIndex){var bt=this.endIndex.evaluate(m);return B.slice(K,bt)}return B.slice(K)},bh.prototype.eachChild=function(m){m(this.input),m(this.beginIndex),this.endIndex&&m(this.endIndex)},bh.prototype.outputDefined=function(){return!1},bh.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var m=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),m]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function $f(m,B){return m==="=="||m==="!="?B.kind==="boolean"||B.kind==="string"||B.kind==="number"||B.kind==="null"||B.kind==="value":B.kind==="string"||B.kind==="number"||B.kind==="value"}function mr(m,B,K){return B===K}function Ur(m,B,K){return B!==K}function xn(m,B,K){return BK}function Wn(m,B,K){return B<=K}function hi(m,B,K){return B>=K}function ea(m,B,K,bt){return bt.compare(B,K)===0}function pa(m,B,K,bt){return!ea(m,B,K,bt)}function Da(m,B,K,bt){return bt.compare(B,K)<0}function $a(m,B,K,bt){return bt.compare(B,K)>0}function la(m,B,K,bt){return bt.compare(B,K)<=0}function Pa(m,B,K,bt){return bt.compare(B,K)>=0}function ba(m,B,K){var bt=m!=="=="&&m!=="!=";return function(){function Ot(Zt,ie,Fe){this.type=zs,this.lhs=Zt,this.rhs=ie,this.collator=Fe,this.hasUntypedArgument=Zt.type.kind==="value"||ie.type.kind==="value"}return Ot.parse=function(Zt,ie){if(Zt.length!==3&&Zt.length!==4)return ie.error("Expected two or three arguments.");var Fe=Zt[0],Je=ie.parse(Zt[1],1,rs);if(!Je)return null;if(!$f(Fe,Je.type))return ie.concat(1).error('"'+Fe+`" comparisons are not supported for type '`+ru(Je.type)+"'.");var yr=ie.parse(Zt[2],2,rs);if(!yr)return null;if(!$f(Fe,yr.type))return ie.concat(2).error('"'+Fe+`" comparisons are not supported for type '`+ru(yr.type)+"'.");if(Je.type.kind!==yr.type.kind&&Je.type.kind!=="value"&&yr.type.kind!=="value")return ie.error("Cannot compare types '"+ru(Je.type)+"' and '"+ru(yr.type)+"'.");bt&&(Je.type.kind==="value"&&yr.type.kind!=="value"?Je=new Pc(yr.type,[Je]):Je.type.kind!=="value"&&yr.type.kind==="value"&&(yr=new Pc(Je.type,[yr])));var Sr=null;if(Zt.length===4){if(Je.type.kind!=="string"&&yr.type.kind!=="string"&&Je.type.kind!=="value"&&yr.type.kind!=="value")return ie.error("Cannot use collator to compare non-string types.");if(Sr=ie.parse(Zt[3],3,Gu),!Sr)return null}return new Ot(Je,yr,Sr)},Ot.prototype.evaluate=function(Zt){var ie=this.lhs.evaluate(Zt),Fe=this.rhs.evaluate(Zt);if(bt&&this.hasUntypedArgument){var Je=cu(ie),yr=cu(Fe);if(Je.kind!==yr.kind||!(Je.kind==="string"||Je.kind==="number"))throw new Gl('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+Je.kind+", "+yr.kind+") instead.")}if(this.collator&&!bt&&this.hasUntypedArgument){var Sr=cu(ie),Yr=cu(Fe);if(Sr.kind!=="string"||Yr.kind!=="string")return B(Zt,ie,Fe)}return this.collator?K(Zt,ie,Fe,this.collator.evaluate(Zt)):B(Zt,ie,Fe)},Ot.prototype.eachChild=function(Zt){Zt(this.lhs),Zt(this.rhs),this.collator&&Zt(this.collator)},Ot.prototype.outputDefined=function(){return!0},Ot.prototype.serialize=function(){var Zt=[m];return this.eachChild(function(ie){Zt.push(ie.serialize())}),Zt},Ot}()}var Ji=ba("==",mr,ea),no=ba("!=",Ur,pa),as=ba("<",xn,Da),Xo=ba(">",un,$a),ls=ba("<=",Wn,la),ms=ba(">=",hi,Pa),oo=function(m,B,K,bt,Ot){this.type=As,this.number=m,this.locale=B,this.currency=K,this.minFractionDigits=bt,this.maxFractionDigits=Ot};oo.parse=function(m,B){if(m.length!==3)return B.error("Expected two arguments.");var K=B.parse(m[1],1,lo);if(!K)return null;var bt=m[2];if(typeof bt!="object"||Array.isArray(bt))return B.error("NumberFormat options argument must be an object.");var Ot=null;if(bt.locale&&(Ot=B.parse(bt.locale,1,As),!Ot))return null;var Zt=null;if(bt.currency&&(Zt=B.parse(bt.currency,1,As),!Zt))return null;var ie=null;if(bt["min-fraction-digits"]&&(ie=B.parse(bt["min-fraction-digits"],1,lo),!ie))return null;var Fe=null;return bt["max-fraction-digits"]&&(Fe=B.parse(bt["max-fraction-digits"],1,lo),!Fe)?null:new oo(K,Ot,Zt,ie,Fe)},oo.prototype.evaluate=function(m){return new Intl.NumberFormat(this.locale?this.locale.evaluate(m):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(m):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(m):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(m):void 0}).format(this.number.evaluate(m))},oo.prototype.eachChild=function(m){m(this.number),this.locale&&m(this.locale),this.currency&&m(this.currency),this.minFractionDigits&&m(this.minFractionDigits),this.maxFractionDigits&&m(this.maxFractionDigits)},oo.prototype.outputDefined=function(){return!1},oo.prototype.serialize=function(){var m={};return this.locale&&(m.locale=this.locale.serialize()),this.currency&&(m.currency=this.currency.serialize()),this.minFractionDigits&&(m["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(m["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),m]};var qa=function(m){this.type=lo,this.input=m};qa.parse=function(m,B){if(m.length!==2)return B.error("Expected 1 argument, but found "+(m.length-1)+" instead.");var K=B.parse(m[1],1);return K?K.type.kind!=="array"&&K.type.kind!=="string"&&K.type.kind!=="value"?B.error("Expected argument of type string or array, but found "+ru(K.type)+" instead."):new qa(K):null},qa.prototype.evaluate=function(m){var B=this.input.evaluate(m);if(typeof B=="string"||Array.isArray(B))return B.length;throw new Gl("Expected value to be of type string or array, but found "+ru(cu(B))+" instead.")},qa.prototype.eachChild=function(m){m(this.input)},qa.prototype.outputDefined=function(){return!1},qa.prototype.serialize=function(){var m=["length"];return this.eachChild(function(B){m.push(B.serialize())}),m};var vs={"==":Ji,"!=":no,">":Xo,"<":as,">=":ms,"<=":ls,array:Pc,at:xh,boolean:Pc,case:df,coalesce:eh,collator:lh,format:Uh,image:xu,in:Bu,"index-of":nu,interpolate:vc,"interpolate-hcl":vc,"interpolate-lab":vc,length:qa,let:Ph,literal:nl,match:_h,number:Pc,"number-format":oo,object:Pc,slice:bh,step:Uc,string:Pc,"to-boolean":el,"to-color":el,"to-number":el,"to-string":el,var:Wh,within:Nc};function rl(m,B){var K=B[0],bt=B[1],Ot=B[2],Zt=B[3];K=K.evaluate(m),bt=bt.evaluate(m),Ot=Ot.evaluate(m);var ie=Zt?Zt.evaluate(m):1,Fe=dc(K,bt,Ot,ie);if(Fe)throw new Gl(Fe);return new Fl(K/255*ie,bt/255*ie,Ot/255*ie,ie)}function Il(m,B){return m in B}function ou(m,B){var K=B[m];return typeof K>"u"?null:K}function Wl(m,B,K,bt){for(;K<=bt;){var Ot=K+bt>>1;if(B[Ot]===m)return!0;B[Ot]>m?bt=Ot-1:K=Ot+1}return!1}function su(m){return{type:m}}ts.register(vs,{error:[Mu,[As],function(m,B){var K=B[0];throw new Gl(K.evaluate(m))}],typeof:[As,[rs],function(m,B){var K=B[0];return ru(cu(K.evaluate(m)))}],"to-rgba":[Ql(lo,4),[au],function(m,B){var K=B[0];return K.evaluate(m).toArray()}],rgb:[au,[lo,lo,lo],rl],rgba:[au,[lo,lo,lo,lo],rl],has:{type:zs,overloads:[[[As],function(m,B){var K=B[0];return Il(K.evaluate(m),m.properties())}],[[As,fl],function(m,B){var K=B[0],bt=B[1];return Il(K.evaluate(m),bt.evaluate(m))}]]},get:{type:rs,overloads:[[[As],function(m,B){var K=B[0];return ou(K.evaluate(m),m.properties())}],[[As,fl],function(m,B){var K=B[0],bt=B[1];return ou(K.evaluate(m),bt.evaluate(m))}]]},"feature-state":[rs,[As],function(m,B){var K=B[0];return ou(K.evaluate(m),m.featureState||{})}],properties:[fl,[],function(m){return m.properties()}],"geometry-type":[As,[],function(m){return m.geometryType()}],id:[rs,[],function(m){return m.id()}],zoom:[lo,[],function(m){return m.globals.zoom}],"heatmap-density":[lo,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[lo,[],function(m){return m.globals.lineProgress||0}],accumulated:[rs,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[lo,su(lo),function(m,B){for(var K=0,bt=0,Ot=B;bt":[zs,[As,rs],function(m,B){var K=B[0],bt=B[1],Ot=m.properties()[K.value],Zt=bt.value;return typeof Ot==typeof Zt&&Ot>Zt}],"filter-id->":[zs,[rs],function(m,B){var K=B[0],bt=m.id(),Ot=K.value;return typeof bt==typeof Ot&&bt>Ot}],"filter-<=":[zs,[As,rs],function(m,B){var K=B[0],bt=B[1],Ot=m.properties()[K.value],Zt=bt.value;return typeof Ot==typeof Zt&&Ot<=Zt}],"filter-id-<=":[zs,[rs],function(m,B){var K=B[0],bt=m.id(),Ot=K.value;return typeof bt==typeof Ot&&bt<=Ot}],"filter->=":[zs,[As,rs],function(m,B){var K=B[0],bt=B[1],Ot=m.properties()[K.value],Zt=bt.value;return typeof Ot==typeof Zt&&Ot>=Zt}],"filter-id->=":[zs,[rs],function(m,B){var K=B[0],bt=m.id(),Ot=K.value;return typeof bt==typeof Ot&&bt>=Ot}],"filter-has":[zs,[rs],function(m,B){var K=B[0];return K.value in m.properties()}],"filter-has-id":[zs,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[zs,[Ql(As)],function(m,B){var K=B[0];return K.value.indexOf(m.geometryType())>=0}],"filter-id-in":[zs,[Ql(rs)],function(m,B){var K=B[0];return K.value.indexOf(m.id())>=0}],"filter-in-small":[zs,[As,Ql(rs)],function(m,B){var K=B[0],bt=B[1];return bt.value.indexOf(m.properties()[K.value])>=0}],"filter-in-large":[zs,[As,Ql(rs)],function(m,B){var K=B[0],bt=B[1];return Wl(m.properties()[K.value],bt.value,0,bt.value.length-1)}],all:{type:zs,overloads:[[[zs,zs],function(m,B){var K=B[0],bt=B[1];return K.evaluate(m)&&bt.evaluate(m)}],[su(zs),function(m,B){for(var K=0,bt=B;K-1}function Oo(m){return!!m.expression&&m.expression.interpolated}function Es(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function Yl(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Rl(m){return m}function yc(m,B){var K=B.type==="color",bt=m.stops&&typeof m.stops[0][0]=="object",Ot=bt||m.property!==void 0,Zt=bt||!Ot,ie=m.type||(Oo(B)?"exponential":"interval");if(K&&(m=Jl({},m),m.stops&&(m.stops=m.stops.map(function(Ho){return[Ho[0],Fl.parse(Ho[1])]})),m.default?m.default=Fl.parse(m.default):m.default=Fl.parse(B.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Fd[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Fe,Je,yr;if(ie==="exponential")Fe=Wc;else if(ie==="interval")Fe=zh;else if(ie==="categorical"){Fe=zc,Je=Object.create(null);for(var Sr=0,Yr=m.stops;Sr=m.stops[bt-1][0])return m.stops[bt-1][1];var Ot=Ec(m.stops.map(function(Zt){return Zt[0]}),K);return m.stops[Ot][1]}function Wc(m,B,K){var bt=m.base!==void 0?m.base:1;if(Es(K)!=="number")return Hc(m.default,B.default);var Ot=m.stops.length;if(Ot===1||K<=m.stops[0][0])return m.stops[0][1];if(K>=m.stops[Ot-1][0])return m.stops[Ot-1][1];var Zt=Ec(m.stops.map(function(Yr){return Yr[0]}),K),ie=Iu(K,bt,m.stops[Zt][0],m.stops[Zt+1][0]),Fe=m.stops[Zt][1],Je=m.stops[Zt+1][1],yr=qh[B.type]||Rl;if(m.colorSpace&&m.colorSpace!=="rgb"){var Sr=Fd[m.colorSpace];yr=function(Yr,nn){return Sr.reverse(Sr.interpolate(Sr.forward(Yr),Sr.forward(nn),ie))}}return typeof Fe.evaluate=="function"?{evaluate:function(){for(var Yr=[],nn=arguments.length;nn--;)Yr[nn]=arguments[nn];var dn=Fe.evaluate.apply(void 0,Yr),Rn=Je.evaluate.apply(void 0,Yr);if(!(dn===void 0||Rn===void 0))return yr(dn,Rn,ie)}}:yr(Fe,Je,ie)}function Ih(m,B,K){return B.type==="color"?K=Fl.parse(K):B.type==="formatted"?K=fc.fromString(K.toString()):B.type==="resolvedImage"?K=sc.fromString(K.toString()):Es(K)!==B.type&&(B.type!=="enum"||!B.values[K])&&(K=void 0),Hc(K,m.default,B.default)}function Iu(m,B,K,bt){var Ot=bt-K,Zt=m-K;return Ot===0?0:B===1?Zt/Ot:(Math.pow(B,Zt)-1)/(Math.pow(B,Ot)-1)}var Oh=function(m,B){this.expression=m,this._warningHistory={},this._evaluator=new zl,this._defaultValue=B?It(B):null,this._enumValues=B&&B.type==="enum"?B.values:null};Oh.prototype.evaluateWithoutErrorHandling=function(m,B,K,bt,Ot,Zt){return this._evaluator.globals=m,this._evaluator.feature=B,this._evaluator.featureState=K,this._evaluator.canonical=bt,this._evaluator.availableImages=Ot||null,this._evaluator.formattedSection=Zt,this.expression.evaluate(this._evaluator)},Oh.prototype.evaluate=function(m,B,K,bt,Ot,Zt){this._evaluator.globals=m,this._evaluator.feature=B||null,this._evaluator.featureState=K||null,this._evaluator.canonical=bt,this._evaluator.availableImages=Ot||null,this._evaluator.formattedSection=Zt||null;try{var ie=this.expression.evaluate(this._evaluator);if(ie==null||typeof ie=="number"&&ie!==ie)return this._defaultValue;if(this._enumValues&&!(ie in this._enumValues))throw new Gl("Expected value to be one of "+Object.keys(this._enumValues).map(function(Fe){return JSON.stringify(Fe)}).join(", ")+", but found "+JSON.stringify(ie)+" instead.");return ie}catch(Fe){return this._warningHistory[Fe.message]||(this._warningHistory[Fe.message]=!0,typeof console<"u"&&console.warn(Fe.message)),this._defaultValue}};function is(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in vs}function Os(m,B){var K=new hu(vs,[],B?Et(B):void 0),bt=K.parse(m,void 0,void 0,void 0,B&&B.type==="string"?{typeAnnotation:"coerce"}:void 0);return bt?vl(new Oh(bt,B)):qu(K.errors)}var qc=function(m,B){this.kind=m,this._styleExpression=B,this.isStateDependent=m!=="constant"&&!zu(B.expression)};qc.prototype.evaluateWithoutErrorHandling=function(m,B,K,bt,Ot,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,B,K,bt,Ot,Zt)},qc.prototype.evaluate=function(m,B,K,bt,Ot,Zt){return this._styleExpression.evaluate(m,B,K,bt,Ot,Zt)};var Zu=function(m,B,K,bt){this.kind=m,this.zoomStops=K,this._styleExpression=B,this.isStateDependent=m!=="camera"&&!zu(B.expression),this.interpolationType=bt};Zu.prototype.evaluateWithoutErrorHandling=function(m,B,K,bt,Ot,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,B,K,bt,Ot,Zt)},Zu.prototype.evaluate=function(m,B,K,bt,Ot,Zt){return this._styleExpression.evaluate(m,B,K,bt,Ot,Zt)},Zu.prototype.interpolationFactor=function(m,B,K){return this.interpolationType?vc.interpolationFactor(this.interpolationType,m,B,K):0};function Gf(m,B){if(m=Os(m,B),m.result==="error")return m;var K=m.value.expression,bt=td(K);if(!bt&&!Lu(B))return qu([new ol("","data expressions not supported")]);var Ot=jc(K,["zoom"]);if(!Ot&&!fu(B))return qu([new ol("","zoom expressions not supported")]);var Zt=ht(K);if(!Zt&&!Ot)return qu([new ol("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Zt instanceof ol)return qu([Zt]);if(Zt instanceof vc&&!Oo(B))return qu([new ol("",'"interpolate" expressions cannot be used with this property')]);if(!Zt)return vl(bt?new qc("constant",m.value):new qc("source",m.value));var ie=Zt instanceof vc?Zt.interpolation:void 0;return vl(bt?new Zu("camera",m.value,Zt.labels,ie):new Zu("composite",m.value,Zt.labels,ie))}var qt=function(m,B){this._parameters=m,this._specification=B,Jl(this,yc(this._parameters,this._specification))};qt.deserialize=function(m){return new qt(m._parameters,m._specification)},qt.serialize=function(m){return{_parameters:m._parameters,_specification:m._specification}};function I(m,B){if(Yl(m))return new qt(m,B);if(is(m)){var K=Gf(m,B);if(K.result==="error")throw new Error(K.value.map(function(Ot){return Ot.key+": "+Ot.message}).join(", "));return K.value}else{var bt=m;return typeof m=="string"&&B.type==="color"&&(bt=Fl.parse(m)),{kind:"constant",evaluate:function(){return bt}}}}function ht(m){var B=null;if(m instanceof Ph)B=ht(m.result);else if(m instanceof eh)for(var K=0,bt=m.args;Kbt.maximum?[new fo(B,K,K+" is greater than the maximum value "+bt.maximum)]:[]}function Ke(m){var B=m.valueSpec,K=Jo(m.value.type),bt,Ot={},Zt,ie,Fe=K!=="categorical"&&m.value.property===void 0,Je=!Fe,yr=Es(m.value.stops)==="array"&&Es(m.value.stops[0])==="array"&&Es(m.value.stops[0][0])==="object",Sr=Vt({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:Yr,default:Rn}});return K==="identity"&&Fe&&Sr.push(new fo(m.key,m.value,'missing required property "property"')),K!=="identity"&&!m.value.stops&&Sr.push(new fo(m.key,m.value,'missing required property "stops"')),K==="exponential"&&m.valueSpec.expression&&!Oo(m.valueSpec)&&Sr.push(new fo(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(Je&&!Lu(m.valueSpec)?Sr.push(new fo(m.key,m.value,"property functions not supported")):Fe&&!fu(m.valueSpec)&&Sr.push(new fo(m.key,m.value,"zoom functions not supported"))),(K==="categorical"||yr)&&m.value.property===void 0&&Sr.push(new fo(m.key,m.value,'"property" property is required')),Sr;function Yr(pi){if(K==="identity")return[new fo(pi.key,pi.value,'identity function may not have a "stops" property')];var sa=[],ra=pi.value;return sa=sa.concat(ke({key:pi.key,value:ra,valueSpec:pi.valueSpec,style:pi.style,styleSpec:pi.styleSpec,arrayElementValidator:nn})),Es(ra)==="array"&&ra.length===0&&sa.push(new fo(pi.key,ra,"array must have at least one stop")),sa}function nn(pi){var sa=[],ra=pi.value,_a=pi.key;if(Es(ra)!=="array")return[new fo(_a,ra,"array expected, "+Es(ra)+" found")];if(ra.length!==2)return[new fo(_a,ra,"array length 2 expected, length "+ra.length+" found")];if(yr){if(Es(ra[0])!=="object")return[new fo(_a,ra,"object expected, "+Es(ra[0])+" found")];if(ra[0].zoom===void 0)return[new fo(_a,ra,"object stop key must have zoom")];if(ra[0].value===void 0)return[new fo(_a,ra,"object stop key must have value")];if(ie&&ie>Jo(ra[0].zoom))return[new fo(_a,ra[0].zoom,"stop zoom values must appear in ascending order")];Jo(ra[0].zoom)!==ie&&(ie=Jo(ra[0].zoom),Zt=void 0,Ot={}),sa=sa.concat(Vt({key:_a+"[0]",value:ra[0],valueSpec:{zoom:{}},style:pi.style,styleSpec:pi.styleSpec,objectElementValidators:{zoom:De,value:dn}}))}else sa=sa.concat(dn({key:_a+"[0]",value:ra[0],style:pi.style,styleSpec:pi.styleSpec},ra));return is($l(ra[1]))?sa.concat([new fo(_a+"[1]",ra[1],"expressions are not allowed in function stops.")]):sa.concat(yl({key:_a+"[1]",value:ra[1],valueSpec:B,style:pi.style,styleSpec:pi.styleSpec}))}function dn(pi,sa){var ra=Es(pi.value),_a=Jo(pi.value),Oa=pi.value!==null?pi.value:sa;if(!bt)bt=ra;else if(ra!==bt)return[new fo(pi.key,Oa,ra+" stop domain type must match previous stop domain type "+bt)];if(ra!=="number"&&ra!=="string"&&ra!=="boolean")return[new fo(pi.key,Oa,"stop domain value must be a number, string, or boolean")];if(ra!=="number"&&K!=="categorical"){var ga="number expected, "+ra+" found";return Lu(B)&&K===void 0&&(ga+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new fo(pi.key,Oa,ga)]}return K==="categorical"&&ra==="number"&&(!isFinite(_a)||Math.floor(_a)!==_a)?[new fo(pi.key,Oa,"integer expected, found "+_a)]:K!=="categorical"&&ra==="number"&&Zt!==void 0&&_a=2&&m[1]!=="$id"&&m[1]!=="$type";case"in":return m.length>=3&&(typeof m[1]!="string"||Array.isArray(m[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return m.length!==3||Array.isArray(m[1])||Array.isArray(m[2]);case"any":case"all":for(var B=0,K=m.slice(1);BB?1:0}function Ae(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var B=1;B"||B==="<="||B===">="?Ie(m[1],m[2],B):B==="any"?Ze(m.slice(1)):B==="all"?["all"].concat(m.slice(1).map(je)):B==="none"?["all"].concat(m.slice(1).map(je).map(Nr)):B==="in"?wr(m[1],m.slice(2)):B==="!in"?Nr(wr(m[1],m.slice(2))):B==="has"?Or(m[1]):B==="!has"?Nr(Or(m[1])):B==="within"?m:!0;return K}function Ie(m,B,K){switch(m){case"$type":return["filter-type-"+K,B];case"$id":return["filter-id-"+K,B];default:return["filter-"+K,m,B]}}function Ze(m){return["any"].concat(m.map(je))}function wr(m,B){if(B.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",B]];case"$id":return["filter-id-in",["literal",B]];default:return B.length>200&&!B.some(function(K){return typeof K!=typeof B[0]})?["filter-in-large",m,["literal",B.sort(xe)]]:["filter-in-small",m,["literal",B]]}}function Or(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function Nr(m){return["!",m]}function tn(m){return Mn($l(m.value))?gr(Jl({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):pn(m)}function pn(m){var B=m.value,K=m.key;if(Es(B)!=="array")return[new fo(K,B,"array expected, "+Es(B)+" found")];var bt=m.styleSpec,Ot,Zt=[];if(B.length<1)return[new fo(K,B,"filter array must have at least 1 element")];switch(Zt=Zt.concat(ln({key:K+"[0]",value:B[0],valueSpec:bt.filter_operator,style:m.style,styleSpec:m.styleSpec})),Jo(B[0])){case"<":case"<=":case">":case">=":B.length>=2&&Jo(B[1])==="$type"&&Zt.push(new fo(K,B,'"$type" cannot be use with operator "'+B[0]+'"'));case"==":case"!=":B.length!==3&&Zt.push(new fo(K,B,'filter array for operator "'+B[0]+'" must have 3 elements'));case"in":case"!in":B.length>=2&&(Ot=Es(B[1]),Ot!=="string"&&Zt.push(new fo(K+"[1]",B[1],"string expected, "+Ot+" found")));for(var ie=2;ie=Sr[dn+0]&&bt>=Sr[dn+1])?(ie[nn]=!0,Zt.push(yr[nn])):ie[nn]=!1}}},ue.prototype._forEachCell=function(m,B,K,bt,Ot,Zt,ie,Fe){for(var Je=this._convertToCellCoord(m),yr=this._convertToCellCoord(B),Sr=this._convertToCellCoord(K),Yr=this._convertToCellCoord(bt),nn=Je;nn<=Sr;nn++)for(var dn=yr;dn<=Yr;dn++){var Rn=this.d*dn+nn;if(!(Fe&&!Fe(this._convertFromCellCoord(nn),this._convertFromCellCoord(dn),this._convertFromCellCoord(nn+1),this._convertFromCellCoord(dn+1)))&&Ot.call(this,m,B,K,bt,Rn,Zt,ie,Fe))return}},ue.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},ue.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},ue.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,B=jt+this.cells.length+1+1,K=0,bt=0;bt=0)){var Yr=m[Sr];yr[Sr]=Ne[Je].shallow.indexOf(Sr)>=0?Yr:Xr(Yr,B)}m instanceof Error&&(yr.message=m.message)}if(yr.$name)throw new Error("$name property is reserved for worker serialization logic.");return Je!=="Object"&&(yr.$name=Je),yr}throw new Error("can't serialize object of type "+typeof m)}function gn(m){if(m==null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp||Mr(m)||en(m)||ArrayBuffer.isView(m)||m instanceof Me)return m;if(Array.isArray(m))return m.map(gn);if(typeof m=="object"){var B=m.$name||"Object",K=Ne[B],bt=K.klass;if(!bt)throw new Error("can't deserialize unregistered class "+B);if(bt.deserialize)return bt.deserialize(m);for(var Ot=Object.create(bt.prototype),Zt=0,ie=Object.keys(m);Zt=0?Je:gn(Je)}}return Ot}throw new Error("can't deserialize object of type "+typeof m)}var In=function(){this.first=!0};In.prototype.update=function(m,B){var K=Math.floor(m);return this.first?(this.first=!1,this.lastIntegerZoom=K,this.lastIntegerZoomTime=0,this.lastZoom=m,this.lastFloorZoom=K,!0):(this.lastFloorZoom>K?(this.lastIntegerZoom=K+1,this.lastIntegerZoomTime=B):this.lastFloorZoom=128&&m<=255},Arabic:function(m){return m>=1536&&m<=1791},"Arabic Supplement":function(m){return m>=1872&&m<=1919},"Arabic Extended-A":function(m){return m>=2208&&m<=2303},"Hangul Jamo":function(m){return m>=4352&&m<=4607},"Unified Canadian Aboriginal Syllabics":function(m){return m>=5120&&m<=5759},Khmer:function(m){return m>=6016&&m<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(m){return m>=6320&&m<=6399},"General Punctuation":function(m){return m>=8192&&m<=8303},"Letterlike Symbols":function(m){return m>=8448&&m<=8527},"Number Forms":function(m){return m>=8528&&m<=8591},"Miscellaneous Technical":function(m){return m>=8960&&m<=9215},"Control Pictures":function(m){return m>=9216&&m<=9279},"Optical Character Recognition":function(m){return m>=9280&&m<=9311},"Enclosed Alphanumerics":function(m){return m>=9312&&m<=9471},"Geometric Shapes":function(m){return m>=9632&&m<=9727},"Miscellaneous Symbols":function(m){return m>=9728&&m<=9983},"Miscellaneous Symbols and Arrows":function(m){return m>=11008&&m<=11263},"CJK Radicals Supplement":function(m){return m>=11904&&m<=12031},"Kangxi Radicals":function(m){return m>=12032&&m<=12255},"Ideographic Description Characters":function(m){return m>=12272&&m<=12287},"CJK Symbols and Punctuation":function(m){return m>=12288&&m<=12351},Hiragana:function(m){return m>=12352&&m<=12447},Katakana:function(m){return m>=12448&&m<=12543},Bopomofo:function(m){return m>=12544&&m<=12591},"Hangul Compatibility Jamo":function(m){return m>=12592&&m<=12687},Kanbun:function(m){return m>=12688&&m<=12703},"Bopomofo Extended":function(m){return m>=12704&&m<=12735},"CJK Strokes":function(m){return m>=12736&&m<=12783},"Katakana Phonetic Extensions":function(m){return m>=12784&&m<=12799},"Enclosed CJK Letters and Months":function(m){return m>=12800&&m<=13055},"CJK Compatibility":function(m){return m>=13056&&m<=13311},"CJK Unified Ideographs Extension A":function(m){return m>=13312&&m<=19903},"Yijing Hexagram Symbols":function(m){return m>=19904&&m<=19967},"CJK Unified Ideographs":function(m){return m>=19968&&m<=40959},"Yi Syllables":function(m){return m>=40960&&m<=42127},"Yi Radicals":function(m){return m>=42128&&m<=42191},"Hangul Jamo Extended-A":function(m){return m>=43360&&m<=43391},"Hangul Syllables":function(m){return m>=44032&&m<=55215},"Hangul Jamo Extended-B":function(m){return m>=55216&&m<=55295},"Private Use Area":function(m){return m>=57344&&m<=63743},"CJK Compatibility Ideographs":function(m){return m>=63744&&m<=64255},"Arabic Presentation Forms-A":function(m){return m>=64336&&m<=65023},"Vertical Forms":function(m){return m>=65040&&m<=65055},"CJK Compatibility Forms":function(m){return m>=65072&&m<=65103},"Small Form Variants":function(m){return m>=65104&&m<=65135},"Arabic Presentation Forms-B":function(m){return m>=65136&&m<=65279},"Halfwidth and Fullwidth Forms":function(m){return m>=65280&&m<=65519}};function Bi(m){for(var B=0,K=m;B=65097&&m<=65103)||On["CJK Compatibility Ideographs"](m)||On["CJK Compatibility"](m)||On["CJK Radicals Supplement"](m)||On["CJK Strokes"](m)||On["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||On["CJK Unified Ideographs Extension A"](m)||On["CJK Unified Ideographs"](m)||On["Enclosed CJK Letters and Months"](m)||On["Hangul Compatibility Jamo"](m)||On["Hangul Jamo Extended-A"](m)||On["Hangul Jamo Extended-B"](m)||On["Hangul Jamo"](m)||On["Hangul Syllables"](m)||On.Hiragana(m)||On["Ideographic Description Characters"](m)||On.Kanbun(m)||On["Kangxi Radicals"](m)||On["Katakana Phonetic Extensions"](m)||On.Katakana(m)&&m!==12540||On["Halfwidth and Fullwidth Forms"](m)&&m!==65288&&m!==65289&&m!==65293&&!(m>=65306&&m<=65310)&&m!==65339&&m!==65341&&m!==65343&&!(m>=65371&&m<=65503)&&m!==65507&&!(m>=65512&&m<=65519)||On["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||On["Unified Canadian Aboriginal Syllabics"](m)||On["Unified Canadian Aboriginal Syllabics Extended"](m)||On["Vertical Forms"](m)||On["Yijing Hexagram Symbols"](m)||On["Yi Syllables"](m)||On["Yi Radicals"](m))}function Hi(m){return!!(On["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||On["General Punctuation"](m)&&(m===8214||m===8224||m===8225||m===8240||m===8241||m===8251||m===8252||m===8258||m===8263||m===8264||m===8265||m===8273)||On["Letterlike Symbols"](m)||On["Number Forms"](m)||On["Miscellaneous Technical"](m)&&(m>=8960&&m<=8967||m>=8972&&m<=8991||m>=8996&&m<=9e3||m===9003||m>=9085&&m<=9114||m>=9150&&m<=9165||m===9167||m>=9169&&m<=9179||m>=9186&&m<=9215)||On["Control Pictures"](m)&&m!==9251||On["Optical Character Recognition"](m)||On["Enclosed Alphanumerics"](m)||On["Geometric Shapes"](m)||On["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||On["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||On["CJK Symbols and Punctuation"](m)||On.Katakana(m)||On["Private Use Area"](m)||On["CJK Compatibility Forms"](m)||On["Small Form Variants"](m)||On["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function Yn(m){return!(Pi(m)||Hi(m))}function Na(m){return On.Arabic(m)||On["Arabic Supplement"](m)||On["Arabic Extended-A"](m)||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function Ha(m){return m>=1424&&m<=2303||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function io(m,B){return!(!B&&Ha(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||On.Khmer(m))}function zo(m){for(var B=0,K=m;B-1&&($o=Wo.error),sl&&sl(m)};function Ku(){du.fire(new qr("pluginStateChange",{pluginStatus:$o,pluginURL:ys}))}var du=new Br,_o=function(){return $o},Gs=function(m){return m({pluginStatus:$o,pluginURL:ys}),du.on("pluginStateChange",m),m},il=function(m,B,K){if(K===void 0&&(K=!1),$o===Wo.deferred||$o===Wo.loading||$o===Wo.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");ys=zt.resolveURL(m),$o=Wo.deferred,sl=B,Ku(),K||lu()},lu=function(){if($o!==Wo.deferred||!ys)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");$o=Wo.loading,Ku(),ys&&bn({url:ys},function(m){m?Tl(m):($o=Wo.loaded,Ku())})},Kl={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return $o===Wo.loaded||Kl.applyArabicShaping!=null},isLoading:function(){return $o===Wo.loading},setState:function(m){$o=m.pluginStatus,ys=m.pluginURL},isParsed:function(){return Kl.applyArabicShaping!=null&&Kl.processBidirectionalText!=null&&Kl.processStyledBidirectionalText!=null},getPluginURL:function(){return ys}},rh=function(){!Kl.isLoading()&&!Kl.isLoaded()&&_o()==="deferred"&&lu()},Nl=function(m,B){this.zoom=m,B?(this.now=B.now,this.fadeDuration=B.fadeDuration,this.zoomHistory=B.zoomHistory,this.transition=B.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new In,this.transition={})};Nl.prototype.isSupportedScript=function(m){return Ro(m,Kl.isLoaded())},Nl.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Nl.prototype.getCrossfadeParameters=function(){var m=this.zoom,B=m-Math.floor(m),K=this.crossFadingFactor();return m>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:B+(1-B)*K}:{fromScale:.5,toScale:1,t:1-(1-K)*B}};var eu=function(m,B){this.property=m,this.value=B,this.expression=I(B===void 0?m.specification.default:B,m.specification)};eu.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},eu.prototype.possiblyEvaluate=function(m,B,K){return this.property.possiblyEvaluate(this,m,B,K)};var wh=function(m){this.property=m,this.value=new eu(m,void 0)};wh.prototype.transitioned=function(m,B){return new kr(this.property,this.value,B,E({},m.transition,this.transition),m.now)},wh.prototype.untransitioned=function(){return new kr(this.property,this.value,null,{},0)};var _e=function(m){this._properties=m,this._values=Object.create(m.defaultTransitionablePropertyValues)};_e.prototype.getValue=function(m){return F(this._values[m].value.value)},_e.prototype.setValue=function(m,B){this._values.hasOwnProperty(m)||(this._values[m]=new wh(this._values[m].property)),this._values[m].value=new eu(this._values[m].property,B===null?void 0:F(B))},_e.prototype.getTransition=function(m){return F(this._values[m].transition)},_e.prototype.setTransition=function(m,B){this._values.hasOwnProperty(m)||(this._values[m]=new wh(this._values[m].property)),this._values[m].transition=F(B)||void 0},_e.prototype.serialize=function(){for(var m={},B=0,K=Object.keys(this._values);Bthis.end)return this.prior=null,Ot;if(this.value.isDataDriven())return this.prior=null,Ot;if(btZt.zoomHistory.lastIntegerZoom?{from:K,to:bt}:{from:Ot,to:bt}},B.prototype.interpolate=function(K){return K},B}(ni),Ui=function(m){this.specification=m};Ui.prototype.possiblyEvaluate=function(m,B,K,bt){if(m.value!==void 0)if(m.expression.kind==="constant"){var Ot=m.expression.evaluate(B,null,{},K,bt);return this._calculate(Ot,Ot,Ot,B)}else return this._calculate(m.expression.evaluate(new Nl(Math.floor(B.zoom-1),B)),m.expression.evaluate(new Nl(Math.floor(B.zoom),B)),m.expression.evaluate(new Nl(Math.floor(B.zoom+1),B)),B)},Ui.prototype._calculate=function(m,B,K,bt){var Ot=bt.zoom;return Ot>bt.zoomHistory.lastIntegerZoom?{from:m,to:B}:{from:K,to:B}},Ui.prototype.interpolate=function(m){return m};var ma=function(m){this.specification=m};ma.prototype.possiblyEvaluate=function(m,B,K,bt){return!!m.expression.evaluate(B,null,{},K,bt)},ma.prototype.interpolate=function(){return!1};var Za=function(m){this.properties=m,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var B in m){var K=m[B];K.specification.overridable&&this.overridableProperties.push(B);var bt=this.defaultPropertyValues[B]=new eu(K,void 0),Ot=this.defaultTransitionablePropertyValues[B]=new wh(K);this.defaultTransitioningPropertyValues[B]=Ot.untransitioned(),this.defaultPossiblyEvaluatedValues[B]=bt.possiblyEvaluate({})}};sr("DataDrivenProperty",ni),sr("DataConstantProperty",mn),sr("CrossFadedDataDrivenProperty",Yi),sr("CrossFadedProperty",Ui),sr("ColorRampProperty",ma);var Ra="-transition",ta=function(m){function B(K,bt){if(m.call(this),this.id=K.id,this.type=K.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},K.type!=="custom"&&(K=K,this.metadata=K.metadata,this.minzoom=K.minzoom,this.maxzoom=K.maxzoom,K.type!=="background"&&(this.source=K.source,this.sourceLayer=K["source-layer"],this.filter=K.filter),bt.layout&&(this._unevaluatedLayout=new Dn(bt.layout)),bt.paint)){this._transitionablePaint=new _e(bt.paint);for(var Ot in K.paint)this.setPaintProperty(Ot,K.paint[Ot],{validate:!1});for(var Zt in K.layout)this.setLayoutProperty(Zt,K.layout[Zt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Jn(bt.paint)}}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},B.prototype.getLayoutProperty=function(K){return K==="visibility"?this.visibility:this._unevaluatedLayout.getValue(K)},B.prototype.setLayoutProperty=function(K,bt,Ot){if(Ot===void 0&&(Ot={}),bt!=null){var Zt="layers."+this.id+".layout."+K;if(this._validate(pc,Zt,K,bt,Ot))return}if(K==="visibility"){this.visibility=bt;return}this._unevaluatedLayout.setValue(K,bt)},B.prototype.getPaintProperty=function(K){return N(K,Ra)?this._transitionablePaint.getTransition(K.slice(0,-Ra.length)):this._transitionablePaint.getValue(K)},B.prototype.setPaintProperty=function(K,bt,Ot){if(Ot===void 0&&(Ot={}),bt!=null){var Zt="layers."+this.id+".paint."+K;if(this._validate(Yu,Zt,K,bt,Ot))return!1}if(N(K,Ra))return this._transitionablePaint.setTransition(K.slice(0,-Ra.length),bt||void 0),!1;var ie=this._transitionablePaint._values[K],Fe=ie.property.specification["property-type"]==="cross-faded-data-driven",Je=ie.value.isDataDriven(),yr=ie.value;this._transitionablePaint.setValue(K,bt),this._handleSpecialPaintPropertyUpdate(K);var Sr=this._transitionablePaint._values[K].value,Yr=Sr.isDataDriven();return Yr||Je||Fe||this._handleOverridablePaintPropertyUpdate(K,yr,Sr)},B.prototype._handleSpecialPaintPropertyUpdate=function(K){},B.prototype._handleOverridablePaintPropertyUpdate=function(K,bt,Ot){return!1},B.prototype.isHidden=function(K){return this.minzoom&&K=this.maxzoom?!0:this.visibility==="none"},B.prototype.updateTransitions=function(K){this._transitioningPaint=this._transitionablePaint.transitioned(K,this._transitioningPaint)},B.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},B.prototype.recalculate=function(K,bt){K.getCrossfadeParameters&&(this._crossfadeParameters=K.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(K,void 0,bt)),this.paint=this._transitioningPaint.possiblyEvaluate(K,void 0,bt)},B.prototype.serialize=function(){var K={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(K.layout=K.layout||{},K.layout.visibility=this.visibility),H(K,function(bt,Ot){return bt!==void 0&&!(Ot==="layout"&&!Object.keys(bt).length)&&!(Ot==="paint"&&!Object.keys(bt).length)})},B.prototype._validate=function(K,bt,Ot,Zt,ie){return ie===void 0&&(ie={}),ie&&ie.validate===!1?!1:Zc(this,K.call(Zs,{key:bt,layerType:this.type,objectKey:Ot,value:Zt,styleSpec:Ca,style:{glyphs:!0,sprite:!0}}))},B.prototype.is3D=function(){return!1},B.prototype.isTileClipped=function(){return!1},B.prototype.hasOffscreenPass=function(){return!1},B.prototype.resize=function(){},B.prototype.isStateDependent=function(){for(var K in this.paint._values){var bt=this.paint.get(K);if(!(!(bt instanceof oi)||!Lu(bt.property.specification))&&(bt.value.kind==="source"||bt.value.kind==="composite")&&bt.value.isStateDependent)return!0}return!1},B}(Br),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},cn=function(m,B){this._structArray=m,this._pos1=B*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Nn=128,Ii=5,_i=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};_i.serialize=function(m,B){return m._trim(),B&&(m.isTransferred=!0,B.push(m.arrayBuffer)),{length:m.length,arrayBuffer:m.arrayBuffer}},_i.deserialize=function(m){var B=Object.create(this.prototype);return B.arrayBuffer=m.arrayBuffer,B.length=m.length,B.capacity=m.arrayBuffer.byteLength/B.bytesPerElement,B._refreshViews(),B},_i.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_i.prototype.clear=function(){this.length=0},_i.prototype.resize=function(m){this.reserve(m),this.length=m},_i.prototype.reserve=function(m){if(m>this.capacity){this.capacity=Math.max(m,Math.floor(this.capacity*Ii),Nn),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var B=this.uint8;this._refreshViews(),B&&this.uint8.set(B)}},_i.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Qn(m,B){B===void 0&&(B=1);var K=0,bt=0,Ot=m.map(function(ie){var Fe=Aa(ie.type),Je=K=ua(K,Math.max(B,Fe)),yr=ie.components||1;return bt=Math.max(bt,Fe),K+=Fe*yr,{name:ie.name,type:ie.type,components:yr,offset:Je}}),Zt=ua(K,Math.max(bt,B));return{members:Ot,size:Zt,alignment:B}}function Aa(m){return bi[m].BYTES_PER_ELEMENT}function ua(m,B){return Math.ceil(m/B)*B}var ja=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt){var Ot=this.length;return this.resize(Ot+1),this.emplace(Ot,K,bt)},B.prototype.emplace=function(K,bt,Ot){var Zt=K*2;return this.int16[Zt+0]=bt,this.int16[Zt+1]=Ot,K},B}(_i);ja.prototype.bytesPerElement=4,sr("StructArrayLayout2i4",ja);var gi=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,K,bt,Ot,Zt)},B.prototype.emplace=function(K,bt,Ot,Zt,ie){var Fe=K*4;return this.int16[Fe+0]=bt,this.int16[Fe+1]=Ot,this.int16[Fe+2]=Zt,this.int16[Fe+3]=ie,K},B}(_i);gi.prototype.bytesPerElement=8,sr("StructArrayLayout4i8",gi);var ti=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,Fe){var Je=this.length;return this.resize(Je+1),this.emplace(Je,K,bt,Ot,Zt,ie,Fe)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,Fe,Je){var yr=K*6;return this.int16[yr+0]=bt,this.int16[yr+1]=Ot,this.int16[yr+2]=Zt,this.int16[yr+3]=ie,this.int16[yr+4]=Fe,this.int16[yr+5]=Je,K},B}(_i);ti.prototype.bytesPerElement=12,sr("StructArrayLayout2i4i12",ti);var Ma=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,Fe){var Je=this.length;return this.resize(Je+1),this.emplace(Je,K,bt,Ot,Zt,ie,Fe)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,Fe,Je){var yr=K*4,Sr=K*8;return this.int16[yr+0]=bt,this.int16[yr+1]=Ot,this.uint8[Sr+4]=Zt,this.uint8[Sr+5]=ie,this.uint8[Sr+6]=Fe,this.uint8[Sr+7]=Je,K},B}(_i);Ma.prototype.bytesPerElement=8,sr("StructArrayLayout2i4ub8",Ma);var fa=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt){var Ot=this.length;return this.resize(Ot+1),this.emplace(Ot,K,bt)},B.prototype.emplace=function(K,bt,Ot){var Zt=K*2;return this.float32[Zt+0]=bt,this.float32[Zt+1]=Ot,K},B}(_i);fa.prototype.bytesPerElement=8,sr("StructArrayLayout2f8",fa);var Wi=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr){var nn=this.length;return this.resize(nn+1),this.emplace(nn,K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn){var dn=K*10;return this.uint16[dn+0]=bt,this.uint16[dn+1]=Ot,this.uint16[dn+2]=Zt,this.uint16[dn+3]=ie,this.uint16[dn+4]=Fe,this.uint16[dn+5]=Je,this.uint16[dn+6]=yr,this.uint16[dn+7]=Sr,this.uint16[dn+8]=Yr,this.uint16[dn+9]=nn,K},B}(_i);Wi.prototype.bytesPerElement=20,sr("StructArrayLayout10ui20",Wi);var $i=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn,dn){var Rn=this.length;return this.resize(Rn+1),this.emplace(Rn,K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn,dn)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn,dn,Rn){var pi=K*12;return this.int16[pi+0]=bt,this.int16[pi+1]=Ot,this.int16[pi+2]=Zt,this.int16[pi+3]=ie,this.uint16[pi+4]=Fe,this.uint16[pi+5]=Je,this.uint16[pi+6]=yr,this.uint16[pi+7]=Sr,this.int16[pi+8]=Yr,this.int16[pi+9]=nn,this.int16[pi+10]=dn,this.int16[pi+11]=Rn,K},B}(_i);$i.prototype.bytesPerElement=24,sr("StructArrayLayout4i4ui4i24",$i);var xa=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,K,bt,Ot)},B.prototype.emplace=function(K,bt,Ot,Zt){var ie=K*3;return this.float32[ie+0]=bt,this.float32[ie+1]=Ot,this.float32[ie+2]=Zt,K},B}(_i);xa.prototype.bytesPerElement=12,sr("StructArrayLayout3f12",xa);var Io=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K){var bt=this.length;return this.resize(bt+1),this.emplace(bt,K)},B.prototype.emplace=function(K,bt){var Ot=K*1;return this.uint32[Ot+0]=bt,K},B}(_i);Io.prototype.bytesPerElement=4,sr("StructArrayLayout1ul4",Io);var wo=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr){var Yr=this.length;return this.resize(Yr+1),this.emplace(Yr,K,bt,Ot,Zt,ie,Fe,Je,yr,Sr)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr){var nn=K*10,dn=K*5;return this.int16[nn+0]=bt,this.int16[nn+1]=Ot,this.int16[nn+2]=Zt,this.int16[nn+3]=ie,this.int16[nn+4]=Fe,this.int16[nn+5]=Je,this.uint32[dn+3]=yr,this.uint16[nn+8]=Sr,this.uint16[nn+9]=Yr,K},B}(_i);wo.prototype.bytesPerElement=20,sr("StructArrayLayout6i1ul2ui20",wo);var va=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,Fe){var Je=this.length;return this.resize(Je+1),this.emplace(Je,K,bt,Ot,Zt,ie,Fe)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,Fe,Je){var yr=K*6;return this.int16[yr+0]=bt,this.int16[yr+1]=Ot,this.int16[yr+2]=Zt,this.int16[yr+3]=ie,this.int16[yr+4]=Fe,this.int16[yr+5]=Je,K},B}(_i);va.prototype.bytesPerElement=12,sr("StructArrayLayout2i2i2i12",va);var Ia=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,K,bt,Ot,Zt,ie)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,Fe){var Je=K*4,yr=K*8;return this.float32[Je+0]=bt,this.float32[Je+1]=Ot,this.float32[Je+2]=Zt,this.int16[yr+6]=ie,this.int16[yr+7]=Fe,K},B}(_i);Ia.prototype.bytesPerElement=16,sr("StructArrayLayout2f1f2i16",Ia);var po=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,K,bt,Ot,Zt)},B.prototype.emplace=function(K,bt,Ot,Zt,ie){var Fe=K*12,Je=K*3;return this.uint8[Fe+0]=bt,this.uint8[Fe+1]=Ot,this.float32[Je+1]=Zt,this.float32[Je+2]=ie,K},B}(_i);po.prototype.bytesPerElement=12,sr("StructArrayLayout2ub2f12",po);var Co=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,K,bt,Ot)},B.prototype.emplace=function(K,bt,Ot,Zt){var ie=K*3;return this.uint16[ie+0]=bt,this.uint16[ie+1]=Ot,this.uint16[ie+2]=Zt,K},B}(_i);Co.prototype.bytesPerElement=6,sr("StructArrayLayout3ui6",Co);var ns=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn,dn,Rn,pi,sa,ra,_a){var Oa=this.length;return this.resize(Oa+1),this.emplace(Oa,K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn,dn,Rn,pi,sa,ra,_a)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn,dn,Rn,pi,sa,ra,_a,Oa){var ga=K*24,Ka=K*12,bo=K*48;return this.int16[ga+0]=bt,this.int16[ga+1]=Ot,this.uint16[ga+2]=Zt,this.uint16[ga+3]=ie,this.uint32[Ka+2]=Fe,this.uint32[Ka+3]=Je,this.uint32[Ka+4]=yr,this.uint16[ga+10]=Sr,this.uint16[ga+11]=Yr,this.uint16[ga+12]=nn,this.float32[Ka+7]=dn,this.float32[Ka+8]=Rn,this.uint8[bo+36]=pi,this.uint8[bo+37]=sa,this.uint8[bo+38]=ra,this.uint32[Ka+10]=_a,this.int16[ga+22]=Oa,K},B}(_i);ns.prototype.bytesPerElement=48,sr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ns);var jl=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn,dn,Rn,pi,sa,ra,_a,Oa,ga,Ka,bo,Vo,Ho,ws,ks,Bs,Ys,ul){var Ns=this.length;return this.resize(Ns+1),this.emplace(Ns,K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn,dn,Rn,pi,sa,ra,_a,Oa,ga,Ka,bo,Vo,Ho,ws,ks,Bs,Ys,ul)},B.prototype.emplace=function(K,bt,Ot,Zt,ie,Fe,Je,yr,Sr,Yr,nn,dn,Rn,pi,sa,ra,_a,Oa,ga,Ka,bo,Vo,Ho,ws,ks,Bs,Ys,ul,Ns){var Hs=K*34,Nu=K*17;return this.int16[Hs+0]=bt,this.int16[Hs+1]=Ot,this.int16[Hs+2]=Zt,this.int16[Hs+3]=ie,this.int16[Hs+4]=Fe,this.int16[Hs+5]=Je,this.int16[Hs+6]=yr,this.int16[Hs+7]=Sr,this.uint16[Hs+8]=Yr,this.uint16[Hs+9]=nn,this.uint16[Hs+10]=dn,this.uint16[Hs+11]=Rn,this.uint16[Hs+12]=pi,this.uint16[Hs+13]=sa,this.uint16[Hs+14]=ra,this.uint16[Hs+15]=_a,this.uint16[Hs+16]=Oa,this.uint16[Hs+17]=ga,this.uint16[Hs+18]=Ka,this.uint16[Hs+19]=bo,this.uint16[Hs+20]=Vo,this.uint16[Hs+21]=Ho,this.uint16[Hs+22]=ws,this.uint32[Nu+12]=ks,this.float32[Nu+13]=Bs,this.float32[Nu+14]=Ys,this.float32[Nu+15]=ul,this.float32[Nu+16]=Ns,K},B}(_i);jl.prototype.bytesPerElement=68,sr("StructArrayLayout8i15ui1ul4f68",jl);var Al=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K){var bt=this.length;return this.resize(bt+1),this.emplace(bt,K)},B.prototype.emplace=function(K,bt){var Ot=K*1;return this.float32[Ot+0]=bt,K},B}(_i);Al.prototype.bytesPerElement=4,sr("StructArrayLayout1f4",Al);var hs=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,K,bt,Ot)},B.prototype.emplace=function(K,bt,Ot,Zt){var ie=K*3;return this.int16[ie+0]=bt,this.int16[ie+1]=Ot,this.int16[ie+2]=Zt,K},B}(_i);hs.prototype.bytesPerElement=6,sr("StructArrayLayout3i6",hs);var wu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,K,bt,Ot)},B.prototype.emplace=function(K,bt,Ot,Zt){var ie=K*2,Fe=K*4;return this.uint32[ie+0]=bt,this.uint16[Fe+2]=Ot,this.uint16[Fe+3]=Zt,K},B}(_i);wu.prototype.bytesPerElement=8,sr("StructArrayLayout1ul2ui8",wu);var pl=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt){var Ot=this.length;return this.resize(Ot+1),this.emplace(Ot,K,bt)},B.prototype.emplace=function(K,bt,Ot){var Zt=K*2;return this.uint16[Zt+0]=bt,this.uint16[Zt+1]=Ot,K},B}(_i);pl.prototype.bytesPerElement=4,sr("StructArrayLayout2ui4",pl);var Eu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K){var bt=this.length;return this.resize(bt+1),this.emplace(bt,K)},B.prototype.emplace=function(K,bt){var Ot=K*1;return this.uint16[Ot+0]=bt,K},B}(_i);Eu.prototype.bytesPerElement=2,sr("StructArrayLayout1ui2",Eu);var mc=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},B.prototype.emplaceBack=function(K,bt,Ot,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,K,bt,Ot,Zt)},B.prototype.emplace=function(K,bt,Ot,Zt,ie){var Fe=K*4;return this.float32[Fe+0]=bt,this.float32[Fe+1]=Ot,this.float32[Fe+2]=Zt,this.float32[Fe+3]=ie,K},B}(_i);mc.prototype.bytesPerElement=16,sr("StructArrayLayout4f16",mc);var xc=function(m){function B(){m.apply(this,arguments)}m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B;var K={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return K.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},K.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},K.x1.get=function(){return this._structArray.int16[this._pos2+2]},K.y1.get=function(){return this._structArray.int16[this._pos2+3]},K.x2.get=function(){return this._structArray.int16[this._pos2+4]},K.y2.get=function(){return this._structArray.int16[this._pos2+5]},K.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},K.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},K.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},K.anchorPoint.get=function(){return new o(this.anchorPointX,this.anchorPointY)},Object.defineProperties(B.prototype,K),B}(cn);xc.prototype.size=20;var yu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.get=function(K){return new xc(this,K)},B}(wo);sr("CollisionBoxArray",yu);var pu=function(m){function B(){m.apply(this,arguments)}m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B;var K={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return K.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},K.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},K.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},K.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},K.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},K.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},K.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},K.segment.get=function(){return this._structArray.uint16[this._pos2+10]},K.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},K.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},K.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},K.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},K.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},K.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},K.placedOrientation.set=function(bt){this._structArray.uint8[this._pos1+37]=bt},K.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},K.hidden.set=function(bt){this._structArray.uint8[this._pos1+38]=bt},K.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},K.crossTileID.set=function(bt){this._structArray.uint32[this._pos4+10]=bt},K.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(B.prototype,K),B}(cn);pu.prototype.size=48;var ku=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.get=function(K){return new pu(this,K)},B}(ns);sr("PlacedSymbolArray",ku);var No=function(m){function B(){m.apply(this,arguments)}m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B;var K={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return K.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},K.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},K.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},K.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},K.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},K.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},K.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},K.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},K.key.get=function(){return this._structArray.uint16[this._pos2+8]},K.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},K.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},K.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},K.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},K.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},K.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},K.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},K.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},K.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},K.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},K.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},K.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},K.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},K.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},K.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},K.crossTileID.set=function(bt){this._structArray.uint32[this._pos4+12]=bt},K.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},K.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},K.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},K.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(B.prototype,K),B}(cn);No.prototype.size=68;var Tu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.get=function(K){return new No(this,K)},B}(jl);sr("SymbolInstanceArray",Tu);var ll=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.getoffsetX=function(K){return this.float32[K*1+0]},B}(Al);sr("GlyphOffsetArray",ll);var Cu=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.getx=function(K){return this.int16[K*3+0]},B.prototype.gety=function(K){return this.int16[K*3+1]},B.prototype.gettileUnitDistanceFromAnchor=function(K){return this.int16[K*3+2]},B}(hs);sr("SymbolLineVertexArray",Cu);var _c=function(m){function B(){m.apply(this,arguments)}m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B;var K={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return K.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},K.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},K.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(B.prototype,K),B}(cn);_c.prototype.size=8;var Lo=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.get=function(K){return new _c(this,K)},B}(wu);sr("FeatureIndexArray",Lo);var Cs=Qn([{name:"a_pos",components:2,type:"Int16"}],4),Ml=Cs.members,xl=function(m){m===void 0&&(m=[]),this.segments=m};xl.prototype.prepareSegment=function(m,B,K,bt){var Ot=this.segments[this.segments.length-1];return m>xl.MAX_VERTEX_ARRAY_LENGTH&&q("Max vertices per segment is "+xl.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+m),(!Ot||Ot.vertexLength+m>xl.MAX_VERTEX_ARRAY_LENGTH||Ot.sortKey!==bt)&&(Ot={vertexOffset:B.length,primitiveOffset:K.length,vertexLength:0,primitiveLength:0},bt!==void 0&&(Ot.sortKey=bt),this.segments.push(Ot)),Ot},xl.prototype.get=function(){return this.segments},xl.prototype.destroy=function(){for(var m=0,B=this.segments;m>>16)*Je&65535)<<16)&4294967295,Sr=Sr<<15|Sr>>>17,Sr=(Sr&65535)*yr+(((Sr>>>16)*yr&65535)<<16)&4294967295,ie^=Sr,ie=ie<<13|ie>>>19,Fe=(ie&65535)*5+(((ie>>>16)*5&65535)<<16)&4294967295,ie=(Fe&65535)+27492+(((Fe>>>16)+58964&65535)<<16);switch(Sr=0,Ot){case 3:Sr^=(K.charCodeAt(Yr+2)&255)<<16;case 2:Sr^=(K.charCodeAt(Yr+1)&255)<<8;case 1:Sr^=K.charCodeAt(Yr)&255,Sr=(Sr&65535)*Je+(((Sr>>>16)*Je&65535)<<16)&4294967295,Sr=Sr<<15|Sr>>>17,Sr=(Sr&65535)*yr+(((Sr>>>16)*yr&65535)<<16)&4294967295,ie^=Sr}return ie^=K.length,ie^=ie>>>16,ie=(ie&65535)*2246822507+(((ie>>>16)*2246822507&65535)<<16)&4294967295,ie^=ie>>>13,ie=(ie&65535)*3266489909+(((ie>>>16)*3266489909&65535)<<16)&4294967295,ie^=ie>>>16,ie>>>0}m.exports=B}),xt=e(function(m){function B(K,bt){for(var Ot=K.length,Zt=bt^Ot,ie=0,Fe;Ot>=4;)Fe=K.charCodeAt(ie)&255|(K.charCodeAt(++ie)&255)<<8|(K.charCodeAt(++ie)&255)<<16|(K.charCodeAt(++ie)&255)<<24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),Fe^=Fe>>>24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)^Fe,Ot-=4,++ie;switch(Ot){case 3:Zt^=(K.charCodeAt(ie+2)&255)<<16;case 2:Zt^=(K.charCodeAt(ie+1)&255)<<8;case 1:Zt^=K.charCodeAt(ie)&255,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)}return Zt^=Zt>>>13,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16),Zt^=Zt>>>15,Zt>>>0}m.exports=B}),Ut=et,fe=et,ye=xt;Ut.murmur3=fe,Ut.murmur2=ye;var Yt=function(){this.ids=[],this.positions=[],this.indexed=!1};Yt.prototype.add=function(m,B,K,bt){this.ids.push(Se(m)),this.positions.push(B,K,bt)},Yt.prototype.getPositions=function(m){for(var B=Se(m),K=0,bt=this.ids.length-1;K>1;this.ids[Ot]>=B?bt=Ot:K=Ot+1}for(var Zt=[];this.ids[K]===B;){var ie=this.positions[3*K],Fe=this.positions[3*K+1],Je=this.positions[3*K+2];Zt.push({index:ie,start:Fe,end:Je}),K++}return Zt},Yt.serialize=function(m,B){var K=new Float64Array(m.ids),bt=new Uint32Array(m.positions);return nr(K,bt,0,K.length-1),B&&B.push(K.buffer,bt.buffer),{ids:K,positions:bt}},Yt.deserialize=function(m){var B=new Yt;return B.ids=m.ids,B.positions=m.positions,B.indexed=!0,B};var ce=Math.pow(2,53)-1;function Se(m){var B=+m;return!isNaN(B)&&B<=ce?B:Ut(String(m))}function nr(m,B,K,bt){for(;K>1],Zt=K-1,ie=bt+1;;){do Zt++;while(m[Zt]Ot);if(Zt>=ie)break;Ye(m,Zt,ie),Ye(B,3*Zt,3*ie),Ye(B,3*Zt+1,3*ie+1),Ye(B,3*Zt+2,3*ie+2)}ie-Kie.x+1||Jeie.y+1)&&q("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return K}function Vl(m,B){return{type:m.type,id:m.id,properties:m.properties,geometry:B?ml(m):[]}}function bc(m,B,K,bt,Ot){m.emplaceBack(B*2+(bt+1)/2,K*2+(Ot+1)/2)}var Rs=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(B){return B.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new ja,this.indexArray=new Co,this.segments=new xl,this.programConfigurations=new Mi(m.layers,m.zoom),this.stateDependentLayerIds=this.layers.filter(function(B){return B.isStateDependent()}).map(function(B){return B.id})};Rs.prototype.populate=function(m,B,K){var bt=this.layers[0],Ot=[],Zt=null;bt.type==="circle"&&(Zt=bt.layout.get("circle-sort-key"));for(var ie=0,Fe=m;ie=qo||Yr<0||Yr>=qo)){var nn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,m.sortKey),dn=nn.vertexLength;bc(this.layoutVertexArray,Sr,Yr,-1,-1),bc(this.layoutVertexArray,Sr,Yr,1,-1),bc(this.layoutVertexArray,Sr,Yr,1,1),bc(this.layoutVertexArray,Sr,Yr,-1,1),this.indexArray.emplaceBack(dn,dn+1,dn+2),this.indexArray.emplaceBack(dn,dn+3,dn+2),nn.vertexLength+=4,nn.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,m,K,{},bt)},sr("CircleBucket",Rs,{omit:["layers"]});function Au(m,B){for(var K=0;K=3){for(var Zt=0;Zt1){if(Ap(m,B))return!0;for(var bt=0;bt1?m.distSqr(K):m.distSqr(K.sub(B)._mult(Ot)._add(B))}function Sp(m,B){for(var K=!1,bt,Ot,Zt,ie=0;ieB.y!=Zt.y>B.y&&B.x<(Zt.x-Ot.x)*(B.y-Ot.y)/(Zt.y-Ot.y)+Ot.x&&(K=!K)}return K}function Gd(m,B){for(var K=!1,bt=0,Ot=m.length-1;btB.y!=ie.y>B.y&&B.x<(ie.x-Zt.x)*(B.y-Zt.y)/(ie.y-Zt.y)+Zt.x&&(K=!K)}return K}function rm(m,B,K,bt,Ot){for(var Zt=0,ie=m;Zt=Fe.x&&Ot>=Fe.y)return!0}var Je=[new o(B,K),new o(B,Ot),new o(bt,Ot),new o(bt,K)];if(m.length>2)for(var yr=0,Sr=Je;yrOt.x&&B.x>Ot.x||m.yOt.y&&B.y>Ot.y)return!1;var Zt=X(m,B,K[0]);return Zt!==X(m,B,K[1])||Zt!==X(m,B,K[2])||Zt!==X(m,B,K[3])}function Ep(m,B,K){var bt=B.paint.get(m).value;return bt.kind==="constant"?bt.value:K.programConfigurations.get(B.id).getMaxValue(m)}function Cp(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function ip(m,B,K,bt,Ot){if(!B[0]&&!B[1])return m;var Zt=o.convert(B)._mult(Ot);K==="viewport"&&Zt._rotate(-bt);for(var ie=[],Fe=0;Fe0&&(Zt=1/Math.sqrt(Zt)),m[0]=B[0]*Zt,m[1]=B[1]*Zt,m[2]=B[2]*Zt,m}function LT(m,B){return m[0]*B[0]+m[1]*B[1]+m[2]*B[2]}function PT(m,B,K){var bt=B[0],Ot=B[1],Zt=B[2],ie=K[0],Fe=K[1],Je=K[2];return m[0]=Ot*Je-Zt*Fe,m[1]=Zt*ie-bt*Je,m[2]=bt*Fe-Ot*ie,m}function zT(m,B,K){var bt=B[0],Ot=B[1],Zt=B[2];return m[0]=bt*K[0]+Ot*K[3]+Zt*K[6],m[1]=bt*K[1]+Ot*K[4]+Zt*K[7],m[2]=bt*K[2]+Ot*K[5]+Zt*K[8],m}var IT=bb;(function(){var m=wx();return function(B,K,bt,Ot,Zt,ie){var Fe,Je;for(K||(K=3),bt||(bt=0),Ot?Je=Math.min(Ot*K+bt,B.length):Je=B.length,Fe=bt;Fem.width||Ot.height>m.height||K.x>m.width-Ot.width||K.y>m.height-Ot.height)throw new RangeError("out of range source coordinates for image copy");if(Ot.width>B.width||Ot.height>B.height||bt.x>B.width-Ot.width||bt.y>B.height-Ot.height)throw new RangeError("out of range destination coordinates for image copy");for(var ie=m.data,Fe=B.data,Je=0;Je80*K){Fe=yr=m[0],Je=Sr=m[1];for(var Rn=K;Rnyr&&(yr=Yr),nn>Sr&&(Sr=nn);dn=Math.max(yr-Fe,Sr-Je),dn=dn!==0?1/dn:0}return Ng(Zt,ie,K,Fe,Je,dn),ie}function Ab(m,B,K,bt,Ot){var Zt,ie;if(Ot===Pb(m,B,K,bt)>0)for(Zt=B;Zt=B;Zt-=bt)ie=B3(Zt,m[Zt],m[Zt+1],ie);return ie&&Fv(ie,ie.next)&&(Q1(ie),ie=ie.next),ie}function Sm(m,B){if(!m)return m;B||(B=m);var K=m,bt;do if(bt=!1,!K.steiner&&(Fv(K,K.next)||pf(K.prev,K,K.next)===0)){if(Q1(K),K=B=K.prev,K===K.next)break;bt=!0}else K=K.next;while(bt||K!==B);return B}function Ng(m,B,K,bt,Ot,Zt,ie){if(m){!ie&&Zt&&Sb(m,bt,Ot,Zt);for(var Fe=m,Je,yr;m.prev!==m.next;){if(Je=m.prev,yr=m.next,Zt?jT(m,bt,Ot,Zt):Mb(m)){B.push(Je.i/K),B.push(m.i/K),B.push(yr.i/K),Q1(m),m=yr.next,Fe=yr.next;continue}if(m=yr,m===Fe){ie?ie===1?(m=UT(Sm(m),B,K),Ng(m,B,K,bt,Ot,Zt,2)):ie===2&&D3(m,B,K,bt,Ot,Zt):Ng(Sm(m),B,K,bt,Ot,Zt,1);break}}}}function Mb(m){var B=m.prev,K=m,bt=m.next;if(pf(B,K,bt)>=0)return!1;for(var Ot=m.next.next;Ot!==m.prev;){if(Xm(B.x,B.y,K.x,K.y,bt.x,bt.y,Ot.x,Ot.y)&&pf(Ot.prev,Ot,Ot.next)>=0)return!1;Ot=Ot.next}return!0}function jT(m,B,K,bt){var Ot=m.prev,Zt=m,ie=m.next;if(pf(Ot,Zt,ie)>=0)return!1;for(var Fe=Ot.xZt.x?Ot.x>ie.x?Ot.x:ie.x:Zt.x>ie.x?Zt.x:ie.x,Sr=Ot.y>Zt.y?Ot.y>ie.y?Ot.y:ie.y:Zt.y>ie.y?Zt.y:ie.y,Yr=Eb(Fe,Je,B,K,bt),nn=Eb(yr,Sr,B,K,bt),dn=m.prevZ,Rn=m.nextZ;dn&&dn.z>=Yr&&Rn&&Rn.z<=nn;){if(dn!==m.prev&&dn!==m.next&&Xm(Ot.x,Ot.y,Zt.x,Zt.y,ie.x,ie.y,dn.x,dn.y)&&pf(dn.prev,dn,dn.next)>=0||(dn=dn.prevZ,Rn!==m.prev&&Rn!==m.next&&Xm(Ot.x,Ot.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0))return!1;Rn=Rn.nextZ}for(;dn&&dn.z>=Yr;){if(dn!==m.prev&&dn!==m.next&&Xm(Ot.x,Ot.y,Zt.x,Zt.y,ie.x,ie.y,dn.x,dn.y)&&pf(dn.prev,dn,dn.next)>=0)return!1;dn=dn.prevZ}for(;Rn&&Rn.z<=nn;){if(Rn!==m.prev&&Rn!==m.next&&Xm(Ot.x,Ot.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0)return!1;Rn=Rn.nextZ}return!0}function UT(m,B,K){var bt=m;do{var Ot=bt.prev,Zt=bt.next.next;!Fv(Ot,Zt)&&jg(Ot,bt,bt.next,Zt)&&Rv(Ot,Zt)&&Rv(Zt,Ot)&&(B.push(Ot.i/K),B.push(bt.i/K),B.push(Zt.i/K),Q1(bt),Q1(bt.next),bt=m=Zt),bt=bt.next}while(bt!==m);return Sm(bt)}function D3(m,B,K,bt,Ot,Zt){var ie=m;do{for(var Fe=ie.next.next;Fe!==ie.prev;){if(ie.i!==Fe.i&&HT(ie,Fe)){var Je=Lb(ie,Fe);ie=Sm(ie,ie.next),Je=Sm(Je,Je.next),Ng(ie,B,K,bt,Ot,Zt),Ng(Je,B,K,bt,Ot,Zt);return}Fe=Fe.next}ie=ie.next}while(ie!==m)}function F3(m,B,K,bt){var Ot=[],Zt,ie,Fe,Je,yr;for(Zt=0,ie=B.length;Zt=K.next.y&&K.next.y!==K.y){var Fe=K.x+(Ot-K.y)*(K.next.x-K.x)/(K.next.y-K.y);if(Fe<=bt&&Fe>Zt){if(Zt=Fe,Fe===bt){if(Ot===K.y)return K;if(Ot===K.next.y)return K.next}ie=K.x=K.x&&K.x>=yr&&bt!==K.x&&Xm(Otie.x||K.x===ie.x&&R3(ie,K)))&&(ie=K,Yr=nn)),K=K.next;while(K!==Je);return ie}function R3(m,B){return pf(m.prev,m,B.prev)<0&&pf(B.next,m,m.next)<0}function Sb(m,B,K,bt){var Ot=m;do Ot.z===null&&(Ot.z=Eb(Ot.x,Ot.y,B,K,bt)),Ot.prevZ=Ot.prev,Ot.nextZ=Ot.next,Ot=Ot.next;while(Ot!==m);Ot.prevZ.nextZ=null,Ot.prevZ=null,VT(Ot)}function VT(m){var B,K,bt,Ot,Zt,ie,Fe,Je,yr=1;do{for(K=m,m=null,Zt=null,ie=0;K;){for(ie++,bt=K,Fe=0,B=0;B0||Je>0&&bt;)Fe!==0&&(Je===0||!bt||K.z<=bt.z)?(Ot=K,K=K.nextZ,Fe--):(Ot=bt,bt=bt.nextZ,Je--),Zt?Zt.nextZ=Ot:m=Ot,Ot.prevZ=Zt,Zt=Ot;K=bt}Zt.nextZ=null,yr*=2}while(ie>1);return m}function Eb(m,B,K,bt,Ot){return m=32767*(m-K)*Ot,B=32767*(B-bt)*Ot,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,m|B<<1}function Px(m){var B=m,K=m;do(B.x=0&&(m-ie)*(bt-Fe)-(K-ie)*(B-Fe)>=0&&(K-ie)*(Zt-Fe)-(Ot-ie)*(bt-Fe)>=0}function HT(m,B){return m.next.i!==B.i&&m.prev.i!==B.i&&!Cb(m,B)&&(Rv(m,B)&&Rv(B,m)&&zx(m,B)&&(pf(m.prev,m,B.prev)||pf(m,B.prev,B))||Fv(m,B)&&pf(m.prev,m,m.next)>0&&pf(B.prev,B,B.next)>0)}function pf(m,B,K){return(B.y-m.y)*(K.x-B.x)-(B.x-m.x)*(K.y-B.y)}function Fv(m,B){return m.x===B.x&&m.y===B.y}function jg(m,B,K,bt){var Ot=J1(pf(m,B,K)),Zt=J1(pf(m,B,bt)),ie=J1(pf(K,bt,m)),Fe=J1(pf(K,bt,B));return!!(Ot!==Zt&&ie!==Fe||Ot===0&&X1(m,K,B)||Zt===0&&X1(m,bt,B)||ie===0&&X1(K,m,bt)||Fe===0&&X1(K,B,bt))}function X1(m,B,K){return B.x<=Math.max(m.x,K.x)&&B.x>=Math.min(m.x,K.x)&&B.y<=Math.max(m.y,K.y)&&B.y>=Math.min(m.y,K.y)}function J1(m){return m>0?1:m<0?-1:0}function Cb(m,B){var K=m;do{if(K.i!==m.i&&K.next.i!==m.i&&K.i!==B.i&&K.next.i!==B.i&&jg(K,K.next,m,B))return!0;K=K.next}while(K!==m);return!1}function Rv(m,B){return pf(m.prev,m,m.next)<0?pf(m,B,m.next)>=0&&pf(m,m.prev,B)>=0:pf(m,B,m.prev)<0||pf(m,m.next,B)<0}function zx(m,B){var K=m,bt=!1,Ot=(m.x+B.x)/2,Zt=(m.y+B.y)/2;do K.y>Zt!=K.next.y>Zt&&K.next.y!==K.y&&Ot<(K.next.x-K.x)*(Zt-K.y)/(K.next.y-K.y)+K.x&&(bt=!bt),K=K.next;while(K!==m);return bt}function Lb(m,B){var K=new Ix(m.i,m.x,m.y),bt=new Ix(B.i,B.x,B.y),Ot=m.next,Zt=B.prev;return m.next=B,B.prev=m,K.next=Ot,Ot.prev=K,bt.next=K,K.prev=bt,Zt.next=bt,bt.prev=Zt,bt}function B3(m,B,K,bt){var Ot=new Ix(m,B,K);return bt?(Ot.next=bt.next,Ot.prev=bt,bt.next.prev=Ot,bt.next=Ot):(Ot.prev=Ot,Ot.next=Ot),Ot}function Q1(m){m.next.prev=m.prev,m.prev.next=m.next,m.prevZ&&(m.prevZ.nextZ=m.nextZ),m.nextZ&&(m.nextZ.prevZ=m.prevZ)}function Ix(m,B,K){this.i=m,this.x=B,this.y=K,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}Lx.deviation=function(m,B,K,bt){var Ot=B&&B.length,Zt=Ot?B[0]*K:m.length,ie=Math.abs(Pb(m,0,Zt,K));if(Ot)for(var Fe=0,Je=B.length;Fe0&&(bt+=m[Ot-1].length,K.holes.push(bt))}return K},Cx.default=O3;function WT(m,B,K,bt,Ot){N3(m,B,K,bt||m.length-1,Ot||zb)}function N3(m,B,K,bt,Ot){for(;bt>K;){if(bt-K>600){var Zt=bt-K+1,ie=B-K+1,Fe=Math.log(Zt),Je=.5*Math.exp(2*Fe/3),yr=.5*Math.sqrt(Fe*Je*(Zt-Je)/Zt)*(ie-Zt/2<0?-1:1),Sr=Math.max(K,Math.floor(B-ie*Je/Zt+yr)),Yr=Math.min(bt,Math.floor(B+(Zt-ie)*Je/Zt+yr));N3(m,B,Sr,Yr,Ot)}var nn=m[B],dn=K,Rn=bt;for(ty(m,K,B),Ot(m[bt],nn)>0&&ty(m,K,bt);dn0;)Rn--}Ot(m[K],nn)===0?ty(m,K,Rn):(Rn++,ty(m,Rn,bt)),Rn<=B&&(K=Rn+1),B<=Rn&&(bt=Rn-1)}}function ty(m,B,K){var bt=m[B];m[B]=m[K],m[K]=bt}function zb(m,B){return mB?1:0}function im(m,B){var K=m.length;if(K<=1)return[m];for(var bt=[],Ot,Zt,ie=0;ie1)for(var Je=0;Je>3}if(bt--,K===1||K===2)Ot+=m.readSVarint(),Zt+=m.readSVarint(),K===1&&(Fe&&ie.push(Fe),Fe=[]),Fe.push(new o(Ot,Zt));else if(K===7)Fe&&Fe.push(Fe[0].clone());else throw new Error("unknown command "+K)}return Fe&&ie.push(Fe),ie},Ug.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var B=m.readVarint()+m.pos,K=1,bt=0,Ot=0,Zt=0,ie=1/0,Fe=-1/0,Je=1/0,yr=-1/0;m.pos>3}if(bt--,K===1||K===2)Ot+=m.readSVarint(),Zt+=m.readSVarint(),OtFe&&(Fe=Ot),Ztyr&&(yr=Zt);else if(K!==7)throw new Error("unknown command "+K)}return[ie,Je,Fe,yr]},Ug.prototype.toGeoJSON=function(m,B,K){var bt=this.extent*Math.pow(2,K),Ot=this.extent*m,Zt=this.extent*B,ie=this.loadGeometry(),Fe=Ug.types[this.type],Je,yr;function Sr(dn){for(var Rn=0;Rn>3;B=bt===1?m.readString():bt===2?m.readFloat():bt===3?m.readDouble():bt===4?m.readVarint64():bt===5?m.readVarint():bt===6?m.readSVarint():bt===7?m.readBoolean():null}return B}G3.prototype.feature=function(m){if(m<0||m>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[m];var B=this._pbf.readVarint()+this._pbf.pos;return new Bv(this._pbf,B,this.extent,this._keys,this._values)};var K3=X3;function X3(m,B){this.layers=m.readFields(J3,{},B)}function J3(m,B,K){if(m===3){var bt=new Db(K,K.readVarint()+K.pos);bt.length&&(B[bt.name]=bt)}}var Q3=K3,qT=Bv,ZT=Db,Vg={VectorTile:Q3,VectorTileFeature:qT,VectorTileLayer:ZT},Nv=Vg.VectorTileFeature.types,t5=500,jv=Math.pow(2,13);function Uv(m,B,K,bt,Ot,Zt,ie,Fe){m.emplaceBack(B,K,Math.floor(bt*jv)*2+ie,Ot*jv*2,Zt*jv*2,Math.round(Fe))}var Wp=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(B){return B.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new ti,this.indexArray=new Co,this.programConfigurations=new Mi(m.layers,m.zoom),this.segments=new xl,this.stateDependentLayerIds=this.layers.filter(function(B){return B.isStateDependent()}).map(function(B){return B.id})};Wp.prototype.populate=function(m,B,K){this.features=[],this.hasPattern=Ox("fill-extrusion",this.layers,B);for(var bt=0,Ot=m;bt=1){var Oa=pi[ra-1];if(!Fx(_a,Oa)){nn.vertexLength+4>xl.MAX_VERTEX_ARRAY_LENGTH&&(nn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ga=_a.sub(Oa)._perp()._unit(),Ka=Oa.dist(_a);sa+Ka>32768&&(sa=0),Uv(this.layoutVertexArray,_a.x,_a.y,ga.x,ga.y,0,0,sa),Uv(this.layoutVertexArray,_a.x,_a.y,ga.x,ga.y,0,1,sa),sa+=Ka,Uv(this.layoutVertexArray,Oa.x,Oa.y,ga.x,ga.y,0,0,sa),Uv(this.layoutVertexArray,Oa.x,Oa.y,ga.x,ga.y,0,1,sa);var bo=nn.vertexLength;this.indexArray.emplaceBack(bo,bo+2,bo+1),this.indexArray.emplaceBack(bo+1,bo+2,bo+3),nn.vertexLength+=4,nn.primitiveLength+=2}}}}if(nn.vertexLength+Je>xl.MAX_VERTEX_ARRAY_LENGTH&&(nn=this.segments.prepareSegment(Je,this.layoutVertexArray,this.indexArray)),Nv[m.type]==="Polygon"){for(var Vo=[],Ho=[],ws=nn.vertexLength,ks=0,Bs=Fe;ksqo)||m.y===B.y&&(m.y<0||m.y>qo)}function Rx(m){return m.every(function(B){return B.x<0})||m.every(function(B){return B.x>qo})||m.every(function(B){return B.y<0})||m.every(function(B){return B.y>qo})}var $T=new Za({"fill-extrusion-opacity":new mn(Ca["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ni(Ca["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new mn(Ca["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new mn(Ca["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Yi(Ca["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ni(Ca["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ni(Ca["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new mn(Ca["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),GT={paint:$T},YT=function(m){function B(K){m.call(this,K,GT)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.createBucket=function(K){return new Wp(K)},B.prototype.queryRadius=function(){return Cp(this.paint.get("fill-extrusion-translate"))},B.prototype.is3D=function(){return!0},B.prototype.queryIntersectsFeature=function(K,bt,Ot,Zt,ie,Fe,Je,yr){var Sr=ip(K,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Fe.angle,Je),Yr=this.paint.get("fill-extrusion-height").evaluate(bt,Ot),nn=this.paint.get("fill-extrusion-base").evaluate(bt,Ot),dn=e5(Sr,yr,Fe,0),Rn=Fb(Zt,nn,Yr,yr),pi=Rn[0],sa=Rn[1];return Qm(pi,sa,dn)},B}(ta);function am(m,B){return m.x*B.x+m.y*B.y}function Rd(m,B){if(m.length===1){for(var K=0,bt=B[K++],Ot;!Ot||bt.equals(Ot);)if(Ot=B[K++],!Ot)return 1/0;for(;K=2&&m[Je-1].equals(m[Je-2]);)Je--;for(var yr=0;yr0;if(Vo&&ra>yr){var ws=nn.dist(dn);if(ws>2*Sr){var ks=nn.sub(nn.sub(dn)._mult(Sr/ws)._round());this.updateDistance(dn,ks),this.addCurrentVertex(ks,pi,0,0,Yr),dn=ks}}var Bs=dn&&Rn,Ys=Bs?K:Fe?"butt":bt;if(Bs&&Ys==="round"&&(KaOt&&(Ys="bevel"),Ys==="bevel"&&(Ka>2&&(Ys="flipbevel"),Ka100)_a=sa.mult(-1);else{var ul=Ka*pi.add(sa).mag()/pi.sub(sa).mag();_a._perp()._mult(ul*(Ho?-1:1))}this.addCurrentVertex(nn,_a,0,0,Yr),this.addCurrentVertex(nn,_a.mult(-1),0,0,Yr)}else if(Ys==="bevel"||Ys==="fakeround"){var Ns=-Math.sqrt(Ka*Ka-1),Hs=Ho?Ns:0,Nu=Ho?0:Ns;if(dn&&this.addCurrentVertex(nn,pi,Hs,Nu,Yr),Ys==="fakeround")for(var Dc=Math.round(bo*180/Math.PI/Nb),fh=1;fh2*Sr){var sd=nn.add(Rn.sub(nn)._mult(Sr/Qd)._round());this.updateDistance(nn,sd),this.addCurrentVertex(sd,sa,0,0,Yr),nn=sd}}}}},Kd.prototype.addCurrentVertex=function(m,B,K,bt,Ot,Zt){Zt===void 0&&(Zt=!1);var ie=B.x+B.y*K,Fe=B.y-B.x*K,Je=-B.x+B.y*bt,yr=-B.y-B.x*bt;this.addHalfVertex(m,ie,Fe,Zt,!1,K,Ot),this.addHalfVertex(m,Je,yr,Zt,!0,-bt,Ot),this.distance>Bx/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(m,B,K,bt,Ot,Zt))},Kd.prototype.addHalfVertex=function(m,B,K,bt,Ot,Zt,ie){var Fe=m.x,Je=m.y,yr=this.lineClips?this.scaledDistance*(Bx-1):this.scaledDistance,Sr=yr*Vv;if(this.layoutVertexArray.emplaceBack((Fe<<1)+(bt?1:0),(Je<<1)+(Ot?1:0),Math.round(a5*B)+128,Math.round(a5*K)+128,(Zt===0?0:Zt<0?-1:1)+1|(Sr&63)<<2,Sr>>6),this.lineClips){var Yr=this.scaledDistance-this.lineClips.start,nn=this.lineClips.end-this.lineClips.start,dn=Yr/nn;this.layoutVertexArray2.emplaceBack(dn,this.lineClipsArray.length)}var Rn=ie.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rn),ie.primitiveLength++),Ot?this.e2=Rn:this.e1=Rn},Kd.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Kd.prototype.updateDistance=function(m,B){this.distance+=m.dist(B),this.updateScaledDistance()},sr("LineBucket",Kd,{omit:["layers","patternFeatures"]});var jb=new Za({"line-cap":new mn(Ca.layout_line["line-cap"]),"line-join":new ni(Ca.layout_line["line-join"]),"line-miter-limit":new mn(Ca.layout_line["line-miter-limit"]),"line-round-limit":new mn(Ca.layout_line["line-round-limit"]),"line-sort-key":new ni(Ca.layout_line["line-sort-key"])}),Nx=new Za({"line-opacity":new ni(Ca.paint_line["line-opacity"]),"line-color":new ni(Ca.paint_line["line-color"]),"line-translate":new mn(Ca.paint_line["line-translate"]),"line-translate-anchor":new mn(Ca.paint_line["line-translate-anchor"]),"line-width":new ni(Ca.paint_line["line-width"]),"line-gap-width":new ni(Ca.paint_line["line-gap-width"]),"line-offset":new ni(Ca.paint_line["line-offset"]),"line-blur":new ni(Ca.paint_line["line-blur"]),"line-dasharray":new Ui(Ca.paint_line["line-dasharray"]),"line-pattern":new Yi(Ca.paint_line["line-pattern"]),"line-gradient":new ma(Ca.paint_line["line-gradient"])}),Hv={paint:Nx,layout:jb},Ub=function(m){function B(){m.apply(this,arguments)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.possiblyEvaluate=function(K,bt){return bt=new Nl(Math.floor(bt.zoom),{now:bt.now,fadeDuration:bt.fadeDuration,zoomHistory:bt.zoomHistory,transition:bt.transition}),m.prototype.possiblyEvaluate.call(this,K,bt)},B.prototype.evaluate=function(K,bt,Ot,Zt){return bt=E({},bt,{zoom:Math.floor(bt.zoom)}),m.prototype.evaluate.call(this,K,bt,Ot,Zt)},B}(ni),jx=new Ub(Hv.paint.properties["line-width"].specification);jx.useIntegerZoom=!0;var Vb=function(m){function B(K){m.call(this,K,Hv),this.gradientVersion=0}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype._handleSpecialPaintPropertyUpdate=function(K){if(K==="line-gradient"){var bt=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=bt._styleExpression.expression instanceof Uc,this.gradientVersion=(this.gradientVersion+1)%x}},B.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},B.prototype.recalculate=function(K,bt){m.prototype.recalculate.call(this,K,bt),this.paint._values["line-floorwidth"]=jx.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,K)},B.prototype.createBucket=function(K){return new Kd(K)},B.prototype.queryRadius=function(K){var bt=K,Ot=l5(Ep("line-width",this,bt),Ep("line-gap-width",this,bt)),Zt=Ep("line-offset",this,bt);return Ot/2+Math.abs(Zt)+Cp(this.paint.get("line-translate"))},B.prototype.queryIntersectsFeature=function(K,bt,Ot,Zt,ie,Fe,Je){var yr=ip(K,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Fe.angle,Je),Sr=Je/2*l5(this.paint.get("line-width").evaluate(bt,Ot),this.paint.get("line-gap-width").evaluate(bt,Ot)),Yr=this.paint.get("line-offset").evaluate(bt,Ot);return Yr&&(Zt=G(Zt,Yr*Je)),Hp(yr,Zt,Sr)},B.prototype.isTileClipped=function(){return!0},B}(ta);function l5(m,B){return B>0?B+2*m:m}function G(m,B){for(var K=[],bt=new o(0,0),Ot=0;Ot":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function xr(m){for(var B="",K=0;K>1,Sr=-7,Yr=K?Ot-1:0,nn=K?-1:1,dn=m[B+Yr];for(Yr+=nn,Zt=dn&(1<<-Sr)-1,dn>>=-Sr,Sr+=Fe;Sr>0;Zt=Zt*256+m[B+Yr],Yr+=nn,Sr-=8);for(ie=Zt&(1<<-Sr)-1,Zt>>=-Sr,Sr+=bt;Sr>0;ie=ie*256+m[B+Yr],Yr+=nn,Sr-=8);if(Zt===0)Zt=1-yr;else{if(Zt===Je)return ie?NaN:(dn?-1:1)*(1/0);ie=ie+Math.pow(2,bt),Zt=Zt-yr}return(dn?-1:1)*ie*Math.pow(2,Zt-bt)},sn=function(m,B,K,bt,Ot,Zt){var ie,Fe,Je,yr=Zt*8-Ot-1,Sr=(1<>1,nn=Ot===23?Math.pow(2,-24)-Math.pow(2,-77):0,dn=bt?0:Zt-1,Rn=bt?1:-1,pi=B<0||B===0&&1/B<0?1:0;for(B=Math.abs(B),isNaN(B)||B===1/0?(Fe=isNaN(B)?1:0,ie=Sr):(ie=Math.floor(Math.log(B)/Math.LN2),B*(Je=Math.pow(2,-ie))<1&&(ie--,Je*=2),ie+Yr>=1?B+=nn/Je:B+=nn*Math.pow(2,1-Yr),B*Je>=2&&(ie++,Je/=2),ie+Yr>=Sr?(Fe=0,ie=Sr):ie+Yr>=1?(Fe=(B*Je-1)*Math.pow(2,Ot),ie=ie+Yr):(Fe=B*Math.pow(2,Yr-1)*Math.pow(2,Ot),ie=0));Ot>=8;m[K+dn]=Fe&255,dn+=Rn,Fe/=256,Ot-=8);for(ie=ie<0;m[K+dn]=ie&255,dn+=Rn,ie/=256,yr-=8);m[K+dn-Rn]|=pi*128},yn={read:Zr,write:sn},Ln=$n;function $n(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}$n.Varint=0,$n.Fixed64=1,$n.Bytes=2,$n.Fixed32=5;var wi=65536*65536,Ta=1/wi,Xi=12,da=typeof TextDecoder>"u"?null:new TextDecoder("utf8");$n.prototype={destroy:function(){this.buf=null},readFields:function(m,B,K){for(K=K||this.length;this.pos>3,Zt=this.pos;this.type=bt&7,m(Ot,B,this),this.pos===Zt&&this.skip(bt)}return B},readMessage:function(m,B){return this.readFields(m,B,this.readVarint()+this.pos)},readFixed32:function(){var m=Lp(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=nd(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Lp(this.buf,this.pos)+Lp(this.buf,this.pos+4)*wi;return this.pos+=8,m},readSFixed64:function(){var m=Lp(this.buf,this.pos)+nd(this.buf,this.pos+4)*wi;return this.pos+=8,m},readFloat:function(){var m=yn.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=yn.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var B=this.buf,K,bt;return bt=B[this.pos++],K=bt&127,bt<128||(bt=B[this.pos++],K|=(bt&127)<<7,bt<128)||(bt=B[this.pos++],K|=(bt&127)<<14,bt<128)||(bt=B[this.pos++],K|=(bt&127)<<21,bt<128)?K:(bt=B[this.pos],K|=(bt&15)<<28,Ga(K,m,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var m=this.readVarint();return m%2===1?(m+1)/-2:m/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var m=this.readVarint()+this.pos,B=this.pos;return this.pos=m,m-B>=Xi&&da?gp(this.buf,B,m):mp(this.buf,B,m)},readBytes:function(){var m=this.readVarint()+this.pos,B=this.buf.subarray(this.pos,m);return this.pos=m,B},readPackedVarint:function(m,B){if(this.type!==$n.Bytes)return m.push(this.readVarint(B));var K=Ao(this);for(m=m||[];this.pos127;);else if(B===$n.Bytes)this.pos=this.readVarint()+this.pos;else if(B===$n.Fixed32)this.pos+=4;else if(B===$n.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+B)},writeTag:function(m,B){this.writeVarint(m<<3|B)},realloc:function(m){for(var B=this.length||16;B268435455||m<0){Sl(m,this);return}this.realloc(4),this.buf[this.pos++]=m&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=m>>>7&127)))},writeSVarint:function(m){this.writeVarint(m<0?-m*2-1:m*2)},writeBoolean:function(m){this.writeVarint(!!m)},writeString:function(m){m=String(m),this.realloc(m.length*4),this.pos++;var B=this.pos;this.pos=vp(this.buf,m,this.pos);var K=this.pos-B;K>=128&&Js(B,K,this),this.pos=B-1,this.writeVarint(K),this.pos+=K},writeFloat:function(m){this.realloc(4),yn.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),yn.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var B=m.length;this.writeVarint(B),this.realloc(B);for(var K=0;K=128&&Js(K,bt,this),this.pos=K-1,this.writeVarint(bt),this.pos+=bt},writeMessage:function(m,B,K){this.writeTag(m,$n.Bytes),this.writeRawMessage(B,K)},writePackedVarint:function(m,B){B.length&&this.writeMessage(m,js,B)},writePackedSVarint:function(m,B){B.length&&this.writeMessage(m,Ds,B)},writePackedBoolean:function(m,B){B.length&&this.writeMessage(m,Qs,B)},writePackedFloat:function(m,B){B.length&&this.writeMessage(m,uo,B)},writePackedDouble:function(m,B){B.length&&this.writeMessage(m,al,B)},writePackedFixed32:function(m,B){B.length&&this.writeMessage(m,ql,B)},writePackedSFixed32:function(m,B){B.length&&this.writeMessage(m,ch,B)},writePackedFixed64:function(m,B){B.length&&this.writeMessage(m,nh,B)},writePackedSFixed64:function(m,B){B.length&&this.writeMessage(m,_d,B)},writeBytesField:function(m,B){this.writeTag(m,$n.Bytes),this.writeBytes(B)},writeFixed32Field:function(m,B){this.writeTag(m,$n.Fixed32),this.writeFixed32(B)},writeSFixed32Field:function(m,B){this.writeTag(m,$n.Fixed32),this.writeSFixed32(B)},writeFixed64Field:function(m,B){this.writeTag(m,$n.Fixed64),this.writeFixed64(B)},writeSFixed64Field:function(m,B){this.writeTag(m,$n.Fixed64),this.writeSFixed64(B)},writeVarintField:function(m,B){this.writeTag(m,$n.Varint),this.writeVarint(B)},writeSVarintField:function(m,B){this.writeTag(m,$n.Varint),this.writeSVarint(B)},writeStringField:function(m,B){this.writeTag(m,$n.Bytes),this.writeString(B)},writeFloatField:function(m,B){this.writeTag(m,$n.Fixed32),this.writeFloat(B)},writeDoubleField:function(m,B){this.writeTag(m,$n.Fixed64),this.writeDouble(B)},writeBooleanField:function(m,B){this.writeVarintField(m,!!B)}};function Ga(m,B,K){var bt=K.buf,Ot,Zt;if(Zt=bt[K.pos++],Ot=(Zt&112)>>4,Zt<128||(Zt=bt[K.pos++],Ot|=(Zt&127)<<3,Zt<128)||(Zt=bt[K.pos++],Ot|=(Zt&127)<<10,Zt<128)||(Zt=bt[K.pos++],Ot|=(Zt&127)<<17,Zt<128)||(Zt=bt[K.pos++],Ot|=(Zt&127)<<24,Zt<128)||(Zt=bt[K.pos++],Ot|=(Zt&1)<<31,Zt<128))return Ms(m,Ot,B);throw new Error("Expected varint not more than 10 bytes")}function Ao(m){return m.type===$n.Bytes?m.readVarint()+m.pos:m.pos+1}function Ms(m,B,K){return K?B*4294967296+(m>>>0):(B>>>0)*4294967296+(m>>>0)}function Sl(m,B){var K,bt;if(m>=0?(K=m%4294967296|0,bt=m/4294967296|0):(K=~(-m%4294967296),bt=~(-m/4294967296),K^4294967295?K=K+1|0:(K=0,bt=bt+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");B.realloc(10),bs(K,bt,B),fs(bt,B)}function bs(m,B,K){K.buf[K.pos++]=m&127|128,m>>>=7,K.buf[K.pos++]=m&127|128,m>>>=7,K.buf[K.pos++]=m&127|128,m>>>=7,K.buf[K.pos++]=m&127|128,m>>>=7,K.buf[K.pos]=m&127}function fs(m,B){var K=(m&7)<<4;B.buf[B.pos++]|=K|((m>>>=3)?128:0),m&&(B.buf[B.pos++]=m&127|((m>>>=7)?128:0),m&&(B.buf[B.pos++]=m&127|((m>>>=7)?128:0),m&&(B.buf[B.pos++]=m&127|((m>>>=7)?128:0),m&&(B.buf[B.pos++]=m&127|((m>>>=7)?128:0),m&&(B.buf[B.pos++]=m&127)))))}function Js(m,B,K){var bt=B<=16383?1:B<=2097151?2:B<=268435455?3:Math.floor(Math.log(B)/(Math.LN2*7));K.realloc(bt);for(var Ot=K.pos-1;Ot>=m;Ot--)K.buf[Ot+bt]=K.buf[Ot]}function js(m,B){for(var K=0;K>>8,m[K+2]=B>>>16,m[K+3]=B>>>24}function nd(m,B){return(m[B]|m[B+1]<<8|m[B+2]<<16)+(m[B+3]<<24)}function mp(m,B,K){for(var bt="",Ot=B;Ot239?4:Zt>223?3:Zt>191?2:1;if(Ot+Fe>K)break;var Je,yr,Sr;Fe===1?Zt<128&&(ie=Zt):Fe===2?(Je=m[Ot+1],(Je&192)===128&&(ie=(Zt&31)<<6|Je&63,ie<=127&&(ie=null))):Fe===3?(Je=m[Ot+1],yr=m[Ot+2],(Je&192)===128&&(yr&192)===128&&(ie=(Zt&15)<<12|(Je&63)<<6|yr&63,(ie<=2047||ie>=55296&&ie<=57343)&&(ie=null))):Fe===4&&(Je=m[Ot+1],yr=m[Ot+2],Sr=m[Ot+3],(Je&192)===128&&(yr&192)===128&&(Sr&192)===128&&(ie=(Zt&15)<<18|(Je&63)<<12|(yr&63)<<6|Sr&63,(ie<=65535||ie>=1114112)&&(ie=null))),ie===null?(ie=65533,Fe=1):ie>65535&&(ie-=65536,bt+=String.fromCharCode(ie>>>10&1023|55296),ie=56320|ie&1023),bt+=String.fromCharCode(ie),Ot+=Fe}return bt}function gp(m,B,K){return da.decode(m.subarray(B,K))}function vp(m,B,K){for(var bt=0,Ot,Zt;bt55295&&Ot<57344)if(Zt)if(Ot<56320){m[K++]=239,m[K++]=191,m[K++]=189,Zt=Ot;continue}else Ot=Zt-55296<<10|Ot-56320|65536,Zt=null;else{Ot>56319||bt+1===B.length?(m[K++]=239,m[K++]=191,m[K++]=189):Zt=Ot;continue}else Zt&&(m[K++]=239,m[K++]=191,m[K++]=189,Zt=null);Ot<128?m[K++]=Ot:(Ot<2048?m[K++]=Ot>>6|192:(Ot<65536?m[K++]=Ot>>12|224:(m[K++]=Ot>>18|240,m[K++]=Ot>>12&63|128),m[K++]=Ot>>6&63|128),m[K++]=Ot&63|128)}return K}var of=3;function bd(m,B,K){m===1&&K.readMessage(ap,B)}function ap(m,B,K){if(m===3){var bt=K.readMessage(Xd,{}),Ot=bt.id,Zt=bt.bitmap,ie=bt.width,Fe=bt.height,Je=bt.left,yr=bt.top,Sr=bt.advance;B.push({id:Ot,bitmap:new rd({width:ie+2*of,height:Fe+2*of},Zt),metrics:{width:ie,height:Fe,left:Je,top:yr,advance:Sr}})}}function Xd(m,B,K){m===1?B.id=K.readVarint():m===2?B.bitmap=K.readBytes():m===3?B.width=K.readVarint():m===4?B.height=K.readVarint():m===5?B.left=K.readSVarint():m===6?B.top=K.readSVarint():m===7&&(B.advance=K.readVarint())}function yp(m){return new Ln(m).readFields(bd,[])}var Bd=of;function qp(m){for(var B=0,K=0,bt=0,Ot=m;bt=0;dn--){var Rn=Fe[dn];if(!(nn.w>Rn.w||nn.h>Rn.h)){if(nn.x=Rn.x,nn.y=Rn.y,yr=Math.max(yr,nn.y+nn.h),Je=Math.max(Je,nn.x+nn.w),nn.w===Rn.w&&nn.h===Rn.h){var pi=Fe.pop();dn=0&&bt>=m&&Zp[this.text.charCodeAt(bt)];bt--)K--;this.text=this.text.substring(m,K),this.sectionIndex=this.sectionIndex.slice(m,K)},hh.prototype.substring=function(m,B){var K=new hh;return K.text=this.text.substring(m,B),K.sectionIndex=this.sectionIndex.slice(m,B),K.sections=this.sections,K},hh.prototype.toString=function(){return this.text},hh.prototype.getMaxScale=function(){var m=this;return this.sectionIndex.reduce(function(B,K){return Math.max(B,m.sections[K].scale)},0)},hh.prototype.addTextSection=function(m,B){this.text+=m.text,this.sections.push(op.forText(m.scale,m.fontStack||B));for(var K=this.sections.length-1,bt=0;bt=W0?null:++this.imageSectionID:(this.imageSectionID=H0,this.imageSectionID)};function Nd(m,B){for(var K=[],bt=m.text,Ot=0,Zt=0,ie=B;Zt=0,Sr=0,Yr=0;Yr0&&ih>ws&&(ws=ih)}else{var Ff=K[Bs.fontStack],Qd=Ff&&Ff[ul];if(Qd&&Qd.rect)Nu=Qd.rect,Hs=Qd.metrics;else{var sd=B[Bs.fontStack],_p=sd&&sd[ul];if(!_p)continue;Hs=_p.metrics}Ns=(Ka-Bs.scale)*Er}Xu?(m.verticalizable=!0,Ho.push({glyph:ul,imageName:Dc,x:nn,y:dn+Ns,vertical:Xu,scale:Bs.scale,fontStack:Bs.fontStack,sectionIndex:Ys,metrics:Hs,rect:Nu}),nn+=fh*Bs.scale+yr):(Ho.push({glyph:ul,imageName:Dc,x:nn,y:dn+Ns,vertical:Xu,scale:Bs.scale,fontStack:Bs.fontStack,sectionIndex:Ys,metrics:Hs,rect:Nu}),nn+=Hs.advance*Bs.scale+yr)}if(Ho.length!==0){var bp=nn-yr;Rn=Math.max(bp,Rn),JT(Ho,0,Ho.length-1,sa,ws)}nn=0;var wp=Zt*Ka+ws;Vo.lineOffset=Math.max(ws,bo),dn+=wp,pi=Math.max(wp,pi),++ra}var Ud=dn-Th,Pp=Gb(ie),zp=Pp.horizontalAlign,wd=Pp.verticalAlign;QT(m.positionedLines,sa,zp,wd,Rn,pi,Zt,Ud,Ot.length),m.top+=-wd*Ud,m.bottom=m.top+Ud,m.left+=-zp*Rn,m.right=m.left+Rn}function JT(m,B,K,bt,Ot){if(!(!bt&&!Ot))for(var Zt=m[K],ie=Zt.metrics.advance*Zt.scale,Fe=(m[K].x+ie)*bt,Je=B;Je<=K;Je++)m[Je].x-=Fe,m[Je].y+=Ot}function QT(m,B,K,bt,Ot,Zt,ie,Fe,Je){var yr=(B-K)*Ot,Sr=0;Zt!==ie?Sr=-Fe*bt-Th:Sr=(-bt*Je+.5)*ie;for(var Yr=0,nn=m;Yr-K/2;){if(ie--,ie<0)return!1;Fe-=m[ie].dist(Zt),Zt=m[ie]}Fe+=m[ie].dist(m[ie+1]),ie++;for(var Je=[],yr=0;Febt;)yr-=Je.shift().angleDelta;if(yr>Ot)return!1;ie++,Fe+=Yr.dist(nn)}return!0}function Jd(m){for(var B=0,K=0;Kyr){var Rn=(yr-Je)/dn,pi=_u(Yr.x,nn.x,Rn),sa=_u(Yr.y,nn.y,Rn),ra=new qv(pi,sa,nn.angleTo(Yr),Sr);return ra._round(),!ie||h5(m,ra,Fe,ie,B)?ra:void 0}Je+=dn}}function Hg(m,B,K,bt,Ot,Zt,ie,Fe,Je){var yr=$p(bt,Zt,ie),Sr=tg(bt,Ot),Yr=Sr*ie,nn=m[0].x===0||m[0].x===Je||m[0].y===0||m[0].y===Je;B-Yr=0&&ga=0&&Ka=0&&nn+yr<=Sr){var bo=new qv(ga,Ka,_a,Rn);bo._round(),(!bt||h5(m,bo,Zt,bt,Ot))&&dn.push(bo)}}Yr+=ra}return!Fe&&!dn.length&&!ie&&(dn=Z0(m,Yr/2,K,bt,Ot,Zt,ie,!0,Je)),dn}function QE(m,B,K,bt,Ot){for(var Zt=[],ie=0;ie=bt&&Yr.x>=bt)&&(Sr.x>=bt?Sr=new o(bt,Sr.y+(Yr.y-Sr.y)*((bt-Sr.x)/(Yr.x-Sr.x)))._round():Yr.x>=bt&&(Yr=new o(bt,Sr.y+(Yr.y-Sr.y)*((bt-Sr.x)/(Yr.x-Sr.x)))._round()),!(Sr.y>=Ot&&Yr.y>=Ot)&&(Sr.y>=Ot?Sr=new o(Sr.x+(Yr.x-Sr.x)*((Ot-Sr.y)/(Yr.y-Sr.y)),Ot)._round():Yr.y>=Ot&&(Yr=new o(Sr.x+(Yr.x-Sr.x)*((Ot-Sr.y)/(Yr.y-Sr.y)),Ot)._round()),(!Je||!Sr.equals(Je[Je.length-1]))&&(Je=[Sr],Zt.push(Je)),Je.push(Yr)))))}return Zt}var Vx=kh;function tC(m,B,K,bt){var Ot=[],Zt=m.image,ie=Zt.pixelRatio,Fe=Zt.paddedRect.w-2*Vx,Je=Zt.paddedRect.h-2*Vx,yr=m.right-m.left,Sr=m.bottom-m.top,Yr=Zt.stretchX||[[0,Fe]],nn=Zt.stretchY||[[0,Je]],dn=function(Fc,ju){return Fc+ju[1]-ju[0]},Rn=Yr.reduce(dn,0),pi=nn.reduce(dn,0),sa=Fe-Rn,ra=Je-pi,_a=0,Oa=Rn,ga=0,Ka=pi,bo=0,Vo=sa,Ho=0,ws=ra;if(Zt.content&&bt){var ks=Zt.content;_a=f5(Yr,0,ks[0]),ga=f5(nn,0,ks[1]),Oa=f5(Yr,ks[0],ks[2]),Ka=f5(nn,ks[1],ks[3]),bo=ks[0]-_a,Ho=ks[1]-ga,Vo=ks[2]-ks[0]-Oa,ws=ks[3]-ks[1]-Ka}var Bs=function(Fc,ju,Dh,ih){var Ff=d5(Fc.stretch-_a,Oa,yr,m.left),Qd=p5(Fc.fixed-bo,Vo,Fc.stretch,Rn),sd=d5(ju.stretch-ga,Ka,Sr,m.top),_p=p5(ju.fixed-Ho,ws,ju.stretch,pi),bp=d5(Dh.stretch-_a,Oa,yr,m.left),wp=p5(Dh.fixed-bo,Vo,Dh.stretch,Rn),Ud=d5(ih.stretch-ga,Ka,Sr,m.top),Pp=p5(ih.fixed-Ho,ws,ih.stretch,pi),zp=new o(Ff,sd),wd=new o(bp,sd),Ip=new o(bp,Ud),M0=new o(Ff,Ud),Zg=new o(Qd/ie,_p/ie),Yv=new o(wp/ie,Pp/ie),Kv=B*Math.PI/180;if(Kv){var Xv=Math.sin(Kv),Kx=Math.cos(Kv),om=[Kx,-Xv,Xv,Kx];zp._matMult(om),wd._matMult(om),M0._matMult(om),Ip._matMult(om)}var _5=Fc.stretch+Fc.fixed,u8=Dh.stretch+Dh.fixed,b5=ju.stretch+ju.fixed,c8=ih.stretch+ih.fixed,$0={x:Zt.paddedRect.x+Vx+_5,y:Zt.paddedRect.y+Vx+b5,w:u8-_5,h:c8-b5},Xx=Vo/ie/yr,w5=ws/ie/Sr;return{tl:zp,tr:wd,bl:M0,br:Ip,tex:$0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zg,pixelOffsetBR:Yv,minFontScaleX:Xx,minFontScaleY:w5,isSDF:K}};if(!bt||!Zt.stretchX&&!Zt.stretchY)Ot.push(Bs({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Fe+1},{fixed:0,stretch:Je+1}));else for(var Ys=eC(Yr,sa,Rn),ul=eC(nn,ra,pi),Ns=0;Ns0&&(dn=Math.max(10,dn),this.circleDiameter=dn)}else{var Rn=Zt.top*ie-Fe,pi=Zt.bottom*ie+Fe,sa=Zt.left*ie-Fe,ra=Zt.right*ie+Fe,_a=Zt.collisionPadding;if(_a&&(sa-=_a[0]*ie,Rn-=_a[1]*ie,ra+=_a[2]*ie,pi+=_a[3]*ie),yr){var Oa=new o(sa,Rn),ga=new o(ra,Rn),Ka=new o(sa,pi),bo=new o(ra,pi),Vo=yr*Math.PI/180;Oa._rotate(Vo),ga._rotate(Vo),Ka._rotate(Vo),bo._rotate(Vo),sa=Math.min(Oa.x,ga.x,Ka.x,bo.x),ra=Math.max(Oa.x,ga.x,Ka.x,bo.x),Rn=Math.min(Oa.y,ga.y,Ka.y,bo.y),pi=Math.max(Oa.y,ga.y,Ka.y,bo.y)}m.emplaceBack(B.x,B.y,sa,Rn,ra,pi,K,bt,Ot)}this.boxEndIndex=m.length},Hx=function(m,B){if(m===void 0&&(m=[]),B===void 0&&(B=a$),this.data=m,this.length=this.data.length,this.compare=B,this.length>0)for(var K=(this.length>>1)-1;K>=0;K--)this._down(K)};Hx.prototype.push=function(m){this.data.push(m),this.length++,this._up(this.length-1)},Hx.prototype.pop=function(){if(this.length!==0){var m=this.data[0],B=this.data.pop();return this.length--,this.length>0&&(this.data[0]=B,this._down(0)),m}},Hx.prototype.peek=function(){return this.data[0]},Hx.prototype._up=function(m){for(var B=this,K=B.data,bt=B.compare,Ot=K[m];m>0;){var Zt=m-1>>1,ie=K[Zt];if(bt(Ot,ie)>=0)break;K[m]=ie,m=Zt}K[m]=Ot},Hx.prototype._down=function(m){for(var B=this,K=B.data,bt=B.compare,Ot=this.length>>1,Zt=K[m];m=0)break;K[m]=Fe,m=ie}K[m]=Zt};function a$(m,B){return mB?1:0}function o$(m,B,K){K===void 0&&(K=!1);for(var bt=1/0,Ot=1/0,Zt=-1/0,ie=-1/0,Fe=m[0],Je=0;JeZt)&&(Zt=yr.x),(!Je||yr.y>ie)&&(ie=yr.y)}var Sr=Zt-bt,Yr=ie-Ot,nn=Math.min(Sr,Yr),dn=nn/2,Rn=new Hx([],s$);if(nn===0)return new o(bt,Ot);for(var pi=bt;pira.d||!ra.d)&&(ra=Oa,K&&console.log("found best %d after %d probes",Math.round(1e4*Oa.d)/1e4,_a)),!(Oa.max-ra.d<=B)&&(dn=Oa.h/2,Rn.push(new Wx(Oa.p.x-dn,Oa.p.y-dn,dn,m)),Rn.push(new Wx(Oa.p.x+dn,Oa.p.y-dn,dn,m)),Rn.push(new Wx(Oa.p.x-dn,Oa.p.y+dn,dn,m)),Rn.push(new Wx(Oa.p.x+dn,Oa.p.y+dn,dn,m)),_a+=4)}return K&&(console.log("num probes: "+_a),console.log("best distance: "+ra.d)),ra.p}function s$(m,B){return B.max-m.max}function Wx(m,B,K,bt){this.p=new o(m,B),this.h=K,this.d=l$(this.p,bt),this.max=this.d+this.h*Math.SQRT2}function l$(m,B){for(var K=!1,bt=1/0,Ot=0;Otm.y!=Sr.y>m.y&&m.x<(Sr.x-yr.x)*(m.y-yr.y)/(Sr.y-yr.y)+yr.x&&(K=!K),bt=Math.min(bt,np(m,yr,Sr))}return(K?1:-1)*Math.sqrt(bt)}function u$(m){for(var B=0,K=0,bt=0,Ot=m[0],Zt=0,ie=Ot.length,Fe=ie-1;Zt=qo||om.y<0||om.y>=qo||f$(m,om,Kx,K,bt,Ot,ul,m.layers[0],m.collisionBoxArray,B.index,B.sourceLayerIndex,m.index,ra,Ka,Ho,Je,Oa,bo,ws,dn,B,Zt,yr,Sr,ie)};if(ks==="line")for(var Hs=0,Nu=QE(B.geometry,0,0,qo,qo);Hs1){var sd=q0(Qd,Vo,K.vertical||Rn,bt,pi,_a);sd&&Ns(Qd,sd)}}else if(B.type==="Polygon")for(var _p=0,bp=im(B.geometry,0);_p$v&&q(m.layerIds[0]+': Value for "text-size" is >= '+Kb+'. Reduce your "text-size".')):sa.kind==="composite"&&(ra=[id*dn.compositeTextSizes[0].evaluate(ie,{},Rn),id*dn.compositeTextSizes[1].evaluate(ie,{},Rn)],(ra[0]>$v||ra[1]>$v)&&q(m.layerIds[0]+': Value for "text-size" is >= '+Kb+'. Reduce your "text-size".')),m.addSymbols(m.text,pi,ra,Fe,Zt,ie,yr,B,Je.lineStartIndex,Je.lineLength,nn,Rn);for(var _a=0,Oa=Sr;_a$v&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Kb+'. Reduce your "icon-size".')):zp.kind==="composite"&&(wd=[id*Ka.compositeIconSizes[0].evaluate(ga,{},Vo),id*Ka.compositeIconSizes[1].evaluate(ga,{},Vo)],(wd[0]>$v||wd[1]>$v)&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Kb+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Ud,wd,Oa,_a,ga,!1,B,ks.lineStartIndex,ks.lineLength,-1,Vo),Xu=m.icon.placedSymbolArray.length-1,Pp&&(Nu=Pp.length*4,m.addSymbols(m.icon,Pp,wd,Oa,_a,ga,Gh.vertical,B,ks.lineStartIndex,ks.lineLength,-1,Vo),Fc=m.icon.placedSymbolArray.length-1)}for(var Ip in bt.horizontal){var M0=bt.horizontal[Ip];if(!Bs){Dh=Ut(M0.text);var Zg=Fe.layout.get("text-rotate").evaluate(ga,{},Vo);Bs=new m5(Je,B,yr,Sr,Yr,M0,nn,dn,Rn,Zg)}var Yv=M0.positionedLines.length===1;if(Dc+=nC(m,B,M0,Zt,Fe,Rn,ga,pi,ks,bt.vertical?Gh.horizontal:Gh.horizontalOnly,Yv?Object.keys(bt.horizontal):[Ip],ju,Xu,Ka,Vo),Yv)break}bt.vertical&&(fh+=nC(m,B,bt.vertical,Zt,Fe,Rn,ga,pi,ks,Gh.vertical,["vertical"],ju,Fc,Ka,Vo));var Kv=Bs?Bs.boxStartIndex:m.collisionBoxArray.length,Xv=Bs?Bs.boxEndIndex:m.collisionBoxArray.length,Kx=ul?ul.boxStartIndex:m.collisionBoxArray.length,om=ul?ul.boxEndIndex:m.collisionBoxArray.length,_5=Ys?Ys.boxStartIndex:m.collisionBoxArray.length,u8=Ys?Ys.boxEndIndex:m.collisionBoxArray.length,b5=Ns?Ns.boxStartIndex:m.collisionBoxArray.length,c8=Ns?Ns.boxEndIndex:m.collisionBoxArray.length,$0=-1,Xx=function(Qb,_C){return Qb&&Qb.circleDiameter?Math.max(Qb.circleDiameter,_C):_C};$0=Xx(Bs,$0),$0=Xx(ul,$0),$0=Xx(Ys,$0),$0=Xx(Ns,$0);var w5=$0>-1?1:0;w5&&($0*=Ho/Er),m.glyphOffsetArray.length>=Gc.MAX_GLYPHS&&q("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ga.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,ga.sortKey),m.symbolInstances.emplaceBack(B.x,B.y,ju.right>=0?ju.right:-1,ju.center>=0?ju.center:-1,ju.left>=0?ju.left:-1,ju.vertical||-1,Xu,Fc,Dh,Kv,Xv,Kx,om,_5,u8,b5,c8,yr,Dc,fh,Hs,Nu,w5,0,nn,ih,Ff,$0)}function d$(m,B,K,bt){var Ot=m.compareText;if(!(B in Ot))Ot[B]=[];else for(var Zt=Ot[B],ie=Zt.length-1;ie>=0;ie--)if(bt.dist(Zt[ie])0)&&(Zt.value.kind!=="constant"||Zt.value.value.length>0),yr=Fe.value.kind!=="constant"||!!Fe.value.value||Object.keys(Fe.parameters).length>0,Sr=Ot.get("symbol-sort-key");if(this.features=[],!(!Je&&!yr)){for(var Yr=B.iconDependencies,nn=B.glyphDependencies,dn=B.availableImages,Rn=new Nl(this.zoom),pi=0,sa=m;pi=0;for(var Dc=0,fh=Ho.sections;Dc=0;Fe--)Zt[Fe]={x:B[Fe].x,y:B[Fe].y,tileUnitDistanceFromAnchor:Ot},Fe>0&&(Ot+=B[Fe-1].dist(B[Fe]));for(var Je=0;Je0},Gc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Gc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Gc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Gc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Gc.prototype.addIndicesForPlacedSymbol=function(m,B){for(var K=m.placedSymbolArray.get(B),bt=K.vertexStartIndex+K.numGlyphs*4,Ot=K.vertexStartIndex;Ot1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(m),this.sortedAngle=m,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var K=0,bt=this.symbolInstanceIndexes;K=0&&Je.indexOf(ie)===Fe&&B.addIndicesForPlacedSymbol(B.text,ie)}),Zt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Zt.verticalPlacedTextSymbolIndex),Zt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.placedIconSymbolIndex),Zt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},sr("SymbolBucket",Gc,{omit:["layers","collisionBoxArray","features","compareText"]}),Gc.MAX_GLYPHS=65535,Gc.addDynamicAttributes=i8;function v$(m,B){return B.replace(/{([^{}]+)}/g,function(K,bt){return bt in m?String(m[bt]):""})}var y$=new Za({"symbol-placement":new mn(Ca.layout_symbol["symbol-placement"]),"symbol-spacing":new mn(Ca.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new mn(Ca.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ni(Ca.layout_symbol["symbol-sort-key"]),"symbol-z-order":new mn(Ca.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new mn(Ca.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new mn(Ca.layout_symbol["icon-ignore-placement"]),"icon-optional":new mn(Ca.layout_symbol["icon-optional"]),"icon-rotation-alignment":new mn(Ca.layout_symbol["icon-rotation-alignment"]),"icon-size":new ni(Ca.layout_symbol["icon-size"]),"icon-text-fit":new mn(Ca.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new mn(Ca.layout_symbol["icon-text-fit-padding"]),"icon-image":new ni(Ca.layout_symbol["icon-image"]),"icon-rotate":new ni(Ca.layout_symbol["icon-rotate"]),"icon-padding":new mn(Ca.layout_symbol["icon-padding"]),"icon-keep-upright":new mn(Ca.layout_symbol["icon-keep-upright"]),"icon-offset":new ni(Ca.layout_symbol["icon-offset"]),"icon-anchor":new ni(Ca.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new mn(Ca.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new mn(Ca.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new mn(Ca.layout_symbol["text-rotation-alignment"]),"text-field":new ni(Ca.layout_symbol["text-field"]),"text-font":new ni(Ca.layout_symbol["text-font"]),"text-size":new ni(Ca.layout_symbol["text-size"]),"text-max-width":new ni(Ca.layout_symbol["text-max-width"]),"text-line-height":new mn(Ca.layout_symbol["text-line-height"]),"text-letter-spacing":new ni(Ca.layout_symbol["text-letter-spacing"]),"text-justify":new ni(Ca.layout_symbol["text-justify"]),"text-radial-offset":new ni(Ca.layout_symbol["text-radial-offset"]),"text-variable-anchor":new mn(Ca.layout_symbol["text-variable-anchor"]),"text-anchor":new ni(Ca.layout_symbol["text-anchor"]),"text-max-angle":new mn(Ca.layout_symbol["text-max-angle"]),"text-writing-mode":new mn(Ca.layout_symbol["text-writing-mode"]),"text-rotate":new ni(Ca.layout_symbol["text-rotate"]),"text-padding":new mn(Ca.layout_symbol["text-padding"]),"text-keep-upright":new mn(Ca.layout_symbol["text-keep-upright"]),"text-transform":new ni(Ca.layout_symbol["text-transform"]),"text-offset":new ni(Ca.layout_symbol["text-offset"]),"text-allow-overlap":new mn(Ca.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new mn(Ca.layout_symbol["text-ignore-placement"]),"text-optional":new mn(Ca.layout_symbol["text-optional"])}),x$=new Za({"icon-opacity":new ni(Ca.paint_symbol["icon-opacity"]),"icon-color":new ni(Ca.paint_symbol["icon-color"]),"icon-halo-color":new ni(Ca.paint_symbol["icon-halo-color"]),"icon-halo-width":new ni(Ca.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ni(Ca.paint_symbol["icon-halo-blur"]),"icon-translate":new mn(Ca.paint_symbol["icon-translate"]),"icon-translate-anchor":new mn(Ca.paint_symbol["icon-translate-anchor"]),"text-opacity":new ni(Ca.paint_symbol["text-opacity"]),"text-color":new ni(Ca.paint_symbol["text-color"],{runtimeType:au,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new ni(Ca.paint_symbol["text-halo-color"]),"text-halo-width":new ni(Ca.paint_symbol["text-halo-width"]),"text-halo-blur":new ni(Ca.paint_symbol["text-halo-blur"]),"text-translate":new mn(Ca.paint_symbol["text-translate"]),"text-translate-anchor":new mn(Ca.paint_symbol["text-translate-anchor"])}),a8={paint:x$,layout:y$},$x=function(m){this.type=m.property.overrides?m.property.overrides.runtimeType:Ru,this.defaultValue=m};$x.prototype.evaluate=function(m){if(m.formattedSection){var B=this.defaultValue.property.overrides;if(B&&B.hasOverride(m.formattedSection))return B.getOverride(m.formattedSection)}return m.feature&&m.featureState?this.defaultValue.evaluate(m.feature,m.featureState):this.defaultValue.property.specification.default},$x.prototype.eachChild=function(m){if(!this.defaultValue.isConstant()){var B=this.defaultValue.value;m(B._styleExpression.expression)}},$x.prototype.outputDefined=function(){return!1},$x.prototype.serialize=function(){return null},sr("FormatSectionOverride",$x,{omit:["defaultValue"]});var _$=function(m){function B(K){m.call(this,K,a8)}return m&&(B.__proto__=m),B.prototype=Object.create(m&&m.prototype),B.prototype.constructor=B,B.prototype.recalculate=function(K,bt){if(m.prototype.recalculate.call(this,K,bt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var Ot=this.layout.get("text-writing-mode");if(Ot){for(var Zt=[],ie=0,Fe=Ot;ie",targetMapId:bt,sourceMapId:Zt.mapId})}}},Gx.prototype.receive=function(m){var B=m.data,K=B.id;if(K&&!(B.targetMapId&&this.mapId!==B.targetMapId))if(B.type===""){delete this.tasks[K];var bt=this.cancelCallbacks[K];delete this.cancelCallbacks[K],bt&&bt()}else pt()||B.mustQueue?(this.tasks[K]=B,this.taskQueue.push(K),this.invoker.trigger()):this.processTask(K,B)},Gx.prototype.process=function(){if(this.taskQueue.length){var m=this.taskQueue.shift(),B=this.tasks[m];delete this.tasks[m],this.taskQueue.length&&this.invoker.trigger(),B&&this.processTask(m,B)}},Gx.prototype.processTask=function(m,B){var K=this;if(B.type===""){var bt=this.callbacks[m];delete this.callbacks[m],bt&&(B.error?bt(gn(B.error)):bt(null,gn(B.data)))}else{var Ot=!1,Zt=dt(this.globalScope)?void 0:[],ie=B.hasCallback?function(Yr,nn){Ot=!0,delete K.cancelCallbacks[m],K.target.postMessage({id:m,type:"",sourceMapId:K.mapId,error:Yr?Xr(Yr):null,data:Xr(nn,Zt)},Zt)}:function(Yr){Ot=!0},Fe=null,Je=gn(B.data);if(this.parent[B.type])Fe=this.parent[B.type](B.sourceMapId,Je,ie);else if(this.parent.getWorkerSource){var yr=B.type.split("."),Sr=this.parent.getWorkerSource(B.sourceMapId,yr[0],Je.source);Fe=Sr[yr[1]](Je,ie)}else ie(new Error("Could not find function "+B.type));!Ot&&Fe&&Fe.cancel&&(this.cancelCallbacks[m]=Fe.cancel)}},Gx.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function P$(m,B,K){B=Math.pow(2,K)-B-1;var bt=uC(m*256,B*256,K),Ot=uC((m+1)*256,(B+1)*256,K);return bt[0]+","+bt[1]+","+Ot[0]+","+Ot[1]}function uC(m,B,K){var bt=2*Math.PI*6378137/256/Math.pow(2,K),Ot=m*bt-2*Math.PI*6378137/2,Zt=B*bt-2*Math.PI*6378137/2;return[Ot,Zt]}var ad=function(m,B){m&&(B?this.setSouthWest(m).setNorthEast(B):m.length===4?this.setSouthWest([m[0],m[1]]).setNorthEast([m[2],m[3]]):this.setSouthWest(m[0]).setNorthEast(m[1]))};ad.prototype.setNorthEast=function(m){return this._ne=m instanceof Yh?new Yh(m.lng,m.lat):Yh.convert(m),this},ad.prototype.setSouthWest=function(m){return this._sw=m instanceof Yh?new Yh(m.lng,m.lat):Yh.convert(m),this},ad.prototype.extend=function(m){var B=this._sw,K=this._ne,bt,Ot;if(m instanceof Yh)bt=m,Ot=m;else if(m instanceof ad){if(bt=m._sw,Ot=m._ne,!bt||!Ot)return this}else{if(Array.isArray(m))if(m.length===4||m.every(Array.isArray)){var Zt=m;return this.extend(ad.convert(Zt))}else{var ie=m;return this.extend(Yh.convert(ie))}return this}return!B&&!K?(this._sw=new Yh(bt.lng,bt.lat),this._ne=new Yh(Ot.lng,Ot.lat)):(B.lng=Math.min(bt.lng,B.lng),B.lat=Math.min(bt.lat,B.lat),K.lng=Math.max(Ot.lng,K.lng),K.lat=Math.max(Ot.lat,K.lat)),this},ad.prototype.getCenter=function(){return new Yh((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ad.prototype.getSouthWest=function(){return this._sw},ad.prototype.getNorthEast=function(){return this._ne},ad.prototype.getNorthWest=function(){return new Yh(this.getWest(),this.getNorth())},ad.prototype.getSouthEast=function(){return new Yh(this.getEast(),this.getSouth())},ad.prototype.getWest=function(){return this._sw.lng},ad.prototype.getSouth=function(){return this._sw.lat},ad.prototype.getEast=function(){return this._ne.lng},ad.prototype.getNorth=function(){return this._ne.lat},ad.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ad.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ad.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ad.prototype.contains=function(m){var B=Yh.convert(m),K=B.lng,bt=B.lat,Ot=this._sw.lat<=bt&&bt<=this._ne.lat,Zt=this._sw.lng<=K&&K<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Zt=this._sw.lng>=K&&K>=this._ne.lng),Ot&&Zt},ad.convert=function(m){return!m||m instanceof ad?m:new ad(m)};var cC=63710088e-1,Yh=function(m,B){if(isNaN(m)||isNaN(B))throw new Error("Invalid LngLat object: ("+m+", "+B+")");if(this.lng=+m,this.lat=+B,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Yh.prototype.wrap=function(){return new Yh(b(this.lng,-180,180),this.lat)},Yh.prototype.toArray=function(){return[this.lng,this.lat]},Yh.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Yh.prototype.distanceTo=function(m){var B=Math.PI/180,K=this.lat*B,bt=m.lat*B,Ot=Math.sin(K)*Math.sin(bt)+Math.cos(K)*Math.cos(bt)*Math.cos((m.lng-this.lng)*B),Zt=cC*Math.acos(Math.min(Ot,1));return Zt},Yh.prototype.toBounds=function(m){m===void 0&&(m=0);var B=40075017,K=360*m/B,bt=K/Math.cos(Math.PI/180*this.lat);return new ad(new Yh(this.lng-bt,this.lat-K),new Yh(this.lng+bt,this.lat+K))},Yh.convert=function(m){if(m instanceof Yh)return m;if(Array.isArray(m)&&(m.length===2||m.length===3))return new Yh(Number(m[0]),Number(m[1]));if(!Array.isArray(m)&&typeof m=="object"&&m!==null)return new Yh(Number("lng"in m?m.lng:m.lon),Number(m.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var hC=2*Math.PI*cC;function fC(m){return hC*Math.cos(m*Math.PI/180)}function dC(m){return(180+m)/360}function pC(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function mC(m,B){return m/fC(B)}function z$(m){return m*360-180}function s8(m){var B=180-m*360;return 360/Math.PI*Math.atan(Math.exp(B*Math.PI/180))-90}function I$(m,B){return m*fC(s8(B))}function O$(m){return 1/Math.cos(m*Math.PI/180)}var ny=function(m,B,K){K===void 0&&(K=0),this.x=+m,this.y=+B,this.z=+K};ny.fromLngLat=function(m,B){B===void 0&&(B=0);var K=Yh.convert(m);return new ny(dC(K.lng),pC(K.lat),mC(B,K.lat))},ny.prototype.toLngLat=function(){return new Yh(z$(this.x),s8(this.y))},ny.prototype.toAltitude=function(){return I$(this.z,this.y)},ny.prototype.meterInMercatorCoordinateUnits=function(){return 1/hC*O$(s8(this.y))};var iy=function(m,B,K){this.z=m,this.x=B,this.y=K,this.key=Jb(0,m,m,B,K)};iy.prototype.equals=function(m){return this.z===m.z&&this.x===m.x&&this.y===m.y},iy.prototype.url=function(m,B){var K=P$(this.x,this.y,this.z),bt=D$(this.z,this.x,this.y);return m[(this.x+this.y)%m.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(B==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",bt).replace("{bbox-epsg-3857}",K)},iy.prototype.getTilePoint=function(m){var B=Math.pow(2,this.z);return new o((m.x*B-this.x)*qo,(m.y*B-this.y)*qo)},iy.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var gC=function(m,B){this.wrap=m,this.canonical=B,this.key=Jb(m,B.z,B.z,B.x,B.y)},od=function(m,B,K,bt,Ot){this.overscaledZ=m,this.wrap=B,this.canonical=new iy(K,+bt,+Ot),this.key=Jb(B,m,K,bt,Ot)};od.prototype.equals=function(m){return this.overscaledZ===m.overscaledZ&&this.wrap===m.wrap&&this.canonical.equals(m.canonical)},od.prototype.scaledTo=function(m){var B=this.canonical.z-m;return m>this.canonical.z?new od(m,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new od(m,this.wrap,m,this.canonical.x>>B,this.canonical.y>>B)},od.prototype.calculateScaledKey=function(m,B){var K=this.canonical.z-m;return m>this.canonical.z?Jb(this.wrap*+B,m,this.canonical.z,this.canonical.x,this.canonical.y):Jb(this.wrap*+B,m,m,this.canonical.x>>K,this.canonical.y>>K)},od.prototype.isChildOf=function(m){if(m.wrap!==this.wrap)return!1;var B=this.canonical.z-m.canonical.z;return m.overscaledZ===0||m.overscaledZ>B&&m.canonical.y===this.canonical.y>>B},od.prototype.children=function(m){if(this.overscaledZ>=m)return[new od(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var B=this.canonical.z+1,K=this.canonical.x*2,bt=this.canonical.y*2;return[new od(B,this.wrap,B,K,bt),new od(B,this.wrap,B,K+1,bt),new od(B,this.wrap,B,K,bt+1),new od(B,this.wrap,B,K+1,bt+1)]},od.prototype.isLessThan=function(m){return this.wrapm.wrap?!1:this.overscaledZm.overscaledZ?!1:this.canonical.xm.canonical.x?!1:this.canonical.y0;Zt--)Ot=1<=this.dim+1||B<-1||B>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(B+1)*this.stride+(m+1)},Wg.prototype._unpackMapbox=function(m,B,K){return(m*256*256+B*256+K)/10-1e4},Wg.prototype._unpackTerrarium=function(m,B,K){return m*256+B+K/256-32768},Wg.prototype.getPixels=function(){return new Yd({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Wg.prototype.backfillBorder=function(m,B,K){if(this.dim!==m.dim)throw new Error("dem dimension mismatch");var bt=B*this.dim,Ot=B*this.dim+this.dim,Zt=K*this.dim,ie=K*this.dim+this.dim;switch(B){case-1:bt=Ot-1;break;case 1:Ot=bt+1;break}switch(K){case-1:Zt=ie-1;break;case 1:ie=Zt+1;break}for(var Fe=-B*this.dim,Je=-K*this.dim,yr=Zt;yr=0&&Sr[3]>=0&&Fe.insert(ie,Sr[0],Sr[1],Sr[2],Sr[3])}},qg.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Vg.VectorTile(new Ln(this.rawTileData)).layers,this.sourceLayerCoder=new y5(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},qg.prototype.query=function(m,B,K,bt){var Ot=this;this.loadVTLayers();for(var Zt=m.params||{},ie=qo/m.tileSize/m.scale,Fe=ae(Zt.filter),Je=m.queryGeometry,yr=m.queryPadding*ie,Sr=yC(Je),Yr=this.grid.query(Sr.minX-yr,Sr.minY-yr,Sr.maxX+yr,Sr.maxY+yr),nn=yC(m.cameraQueryGeometry),dn=this.grid3D.query(nn.minX-yr,nn.minY-yr,nn.maxX+yr,nn.maxY+yr,function(Ka,bo,Vo,Ho){return rm(m.cameraQueryGeometry,Ka-yr,bo-yr,Vo+yr,Ho+yr)}),Rn=0,pi=dn;Rnbt)Ot=!1;else if(!B)Ot=!0;else if(this.expirationTime=Br.maxzoom)&&Br.visibility!=="none"){f($r,this.zoom,fr);var Gr=ci[Br.id]=Br.createBucket({index:An.bucketLayerIDs.length,layers:$r,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:li,sourceID:this.source});Gr.populate(La,xi,this.tileID.canonical),An.bucketLayerIDs.push($r.map(function(Pn){return Pn.id}))}}}}var fn,an,Ee,dr,Vr=t.mapObject(xi.glyphDependencies,function(Pn){return Object.keys(Pn).map(Number)});Object.keys(Vr).length?_r.send("getGlyphs",{uid:this.uid,stacks:Vr},function(Pn,Sn){fn||(fn=Pn,an=Sn,Xn.call(Cn))}):an={};var vn=Object.keys(xi.iconDependencies);vn.length?_r.send("getImages",{icons:vn,source:this.source,tileID:this.tileID,type:"icons"},function(Pn,Sn){fn||(fn=Pn,Ee=Sn,Xn.call(Cn))}):Ee={};var Fn=Object.keys(xi.patternDependencies);Fn.length?_r.send("getImages",{icons:Fn,source:this.source,tileID:this.tileID,type:"patterns"},function(Pn,Sn){fn||(fn=Pn,dr=Sn,Xn.call(Cn))}):dr={},Xn.call(this);function Xn(){if(fn)return Qr(fn);if(an&&Ee&&dr){var Pn=new i(an),Sn=new t.ImageAtlas(Ee,dr);for(var Zn in ci){var Ea=ci[Zn];Ea instanceof t.SymbolBucket?(f(Ea.layers,this.zoom,fr),t.performSymbolLayout(Ea,an,Pn.positions,Ee,Sn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Ea.hasPattern&&(Ea instanceof t.LineBucket||Ea instanceof t.FillBucket||Ea instanceof t.FillExtrusionBucket)&&(f(Ea.layers,this.zoom,fr),Ea.addFeatures(xi,this.tileID.canonical,Sn.patternPositions))}this.status="done",Qr(null,{buckets:t.values(ci).filter(function(Ri){return!Ri.isEmpty()}),featureIndex:An,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Pn.image,imageAtlas:Sn,glyphMap:this.returnDependencies?an:null,iconMap:this.returnDependencies?Ee:null,glyphPositions:this.returnDependencies?Pn.positions:null})}}};function f(We,rr,fr){for(var _r=new t.EvaluationParameters(rr),Qr=0,Cn=We;Qr=0!=!!rr&&We.reverse()}var M=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,E=function(We){this._feature=We,this.extent=t.EXTENT,this.type=We.type,this.properties=We.tags,"id"in We&&!isNaN(We.id)&&(this.id=parseInt(We.id,10))};E.prototype.loadGeometry=function(){if(this._feature.type===1){for(var We=[],rr=0,fr=this._feature.geometry;rr"u"&&(_r.push(An),ci=_r.length-1,Cn[An]=ci),rr.writeVarint(ci);var xi=fr.properties[An],Li=typeof xi;Li!=="string"&&Li!=="boolean"&&Li!=="number"&&(xi=JSON.stringify(xi));var Oi=Li+":"+xi,Zi=bn[Oi];typeof Zi>"u"&&(Qr.push(xi),Zi=Qr.length-1,bn[Oi]=Zi),rr.writeVarint(Zi)}}function lt(We,rr){return(rr<<3)+(We&7)}function yt(We){return We<<1^We>>31}function pt(We,rr){for(var fr=We.loadGeometry(),_r=We.type,Qr=0,Cn=0,bn=fr.length,An=0;An>1;dt(We,rr,bn,_r,Qr,Cn%2),tt(We,rr,fr,_r,bn-1,Cn+1),tt(We,rr,fr,bn+1,Qr,Cn+1)}}function dt(We,rr,fr,_r,Qr,Cn){for(;Qr>_r;){if(Qr-_r>600){var bn=Qr-_r+1,An=fr-_r+1,ci=Math.log(bn),xi=.5*Math.exp(2*ci/3),Li=.5*Math.sqrt(ci*xi*(bn-xi)/bn)*(An-bn/2<0?-1:1),Oi=Math.max(_r,Math.floor(fr-An*xi/bn+Li)),Zi=Math.min(Qr,Math.floor(fr+(bn-An)*xi/bn+Li));dt(We,rr,fr,Oi,Zi,Cn)}var li=rr[2*fr+Cn],La=_r,Wa=Qr;for(rt(We,rr,_r,fr),rr[2*Qr+Cn]>li&&rt(We,rr,_r,Qr);Lali;)Wa--}rr[2*_r+Cn]===li?rt(We,rr,_r,Wa):(Wa++,rt(We,rr,Wa,Qr)),Wa<=fr&&(_r=Wa+1),fr<=Wa&&(Qr=Wa-1)}}function rt(We,rr,fr,_r){at(We,fr,_r),at(rr,2*fr,2*_r),at(rr,2*fr+1,2*_r+1)}function at(We,rr,fr){var _r=We[rr];We[rr]=We[fr],We[fr]=_r}function vt(We,rr,fr,_r,Qr,Cn,bn){for(var An=[0,We.length-1,0],ci=[],xi,Li;An.length;){var Oi=An.pop(),Zi=An.pop(),li=An.pop();if(Zi-li<=bn){for(var La=li;La<=Zi;La++)xi=rr[2*La],Li=rr[2*La+1],xi>=fr&&xi<=Qr&&Li>=_r&&Li<=Cn&&ci.push(We[La]);continue}var Wa=Math.floor((li+Zi)/2);xi=rr[2*Wa],Li=rr[2*Wa+1],xi>=fr&&xi<=Qr&&Li>=_r&&Li<=Cn&&ci.push(We[Wa]);var ze=(Oi+1)%2;(Oi===0?fr<=xi:_r<=Li)&&(An.push(li),An.push(Wa-1),An.push(ze)),(Oi===0?Qr>=xi:Cn>=Li)&&(An.push(Wa+1),An.push(Zi),An.push(ze))}return ci}function it(We,rr,fr,_r,Qr,Cn){for(var bn=[0,We.length-1,0],An=[],ci=Qr*Qr;bn.length;){var xi=bn.pop(),Li=bn.pop(),Oi=bn.pop();if(Li-Oi<=Cn){for(var Zi=Oi;Zi<=Li;Zi++)Y(rr[2*Zi],rr[2*Zi+1],fr,_r)<=ci&&An.push(We[Zi]);continue}var li=Math.floor((Oi+Li)/2),La=rr[2*li],Wa=rr[2*li+1];Y(La,Wa,fr,_r)<=ci&&An.push(We[li]);var ze=(xi+1)%2;(xi===0?fr-Qr<=La:_r-Qr<=Wa)&&(bn.push(Oi),bn.push(li-1),bn.push(ze)),(xi===0?fr+Qr>=La:_r+Qr>=Wa)&&(bn.push(li+1),bn.push(Li),bn.push(ze))}return An}function Y(We,rr,fr,_r){var Qr=We-fr,Cn=rr-_r;return Qr*Qr+Cn*Cn}var ft=function(We){return We[0]},ut=function(We){return We[1]},wt=function(We,rr,fr,_r,Qr){rr===void 0&&(rr=ft),fr===void 0&&(fr=ut),_r===void 0&&(_r=64),Qr===void 0&&(Qr=Float64Array),this.nodeSize=_r,this.points=We;for(var Cn=We.length<65536?Uint16Array:Uint32Array,bn=this.ids=new Cn(We.length),An=this.coords=new Qr(We.length*2),ci=0;ci=_r;xi--){var Li=+Date.now();An=this._cluster(An,xi),this.trees[xi]=new wt(An,Mt,te,Cn,Float32Array),fr&&console.log("z%d: %d clusters in %dms",xi,An.length,+Date.now()-Li)}return fr&&console.timeEnd("total time"),this},Pt.prototype.getClusters=function(We,rr){var fr=((We[0]+180)%360+360)%360-180,_r=Math.max(-90,Math.min(90,We[1])),Qr=We[2]===180?180:((We[2]+180)%360+360)%360-180,Cn=Math.max(-90,Math.min(90,We[3]));if(We[2]-We[0]>=360)fr=-180,Qr=180;else if(fr>Qr){var bn=this.getClusters([fr,_r,180,Cn],rr),An=this.getClusters([-180,_r,Qr,Cn],rr);return bn.concat(An)}for(var ci=this.trees[this._limitZoom(rr)],xi=ci.range(he(fr),de(Cn),he(Qr),de(_r)),Li=[],Oi=0,Zi=xi;Oirr&&(La+=Rr.numPoints||1)}if(La>=An){for(var qr=Li.x*li,$r=Li.y*li,Br=bn&&li>1?this._map(Li,!0):null,Gr=(xi<<5)+(rr+1)+this.points.length,fn=0,an=Zi;fn1)for(var vn=0,Fn=Zi;vn>5},Pt.prototype._getOriginZoom=function(We){return(We-this.points.length)%32},Pt.prototype._map=function(We,rr){if(We.numPoints)return rr?Lt({},We.properties):We.properties;var fr=this.points[We.index].properties,_r=this.options.map(fr);return rr&&_r===fr?Lt({},_r):_r};function Wt(We,rr,fr,_r,Qr){return{x:We,y:rr,zoom:1/0,id:fr,parentId:-1,numPoints:_r,properties:Qr}}function Ht(We,rr){var fr=We.geometry.coordinates,_r=fr[0],Qr=fr[1];return{x:he(_r),y:de(Qr),zoom:1/0,index:rr,parentId:-1}}function Jt(We){return{type:"Feature",id:We.id,properties:ge(We),geometry:{type:"Point",coordinates:[se(We.x),Tt(We.y)]}}}function ge(We){var rr=We.numPoints,fr=rr>=1e4?Math.round(rr/1e3)+"k":rr>=1e3?Math.round(rr/100)/10+"k":rr;return Lt(Lt({},We.properties),{cluster:!0,cluster_id:We.id,point_count:rr,point_count_abbreviated:fr})}function he(We){return We/360+.5}function de(We){var rr=Math.sin(We*Math.PI/180),fr=.5-.25*Math.log((1+rr)/(1-rr))/Math.PI;return fr<0?0:fr>1?1:fr}function se(We){return(We-.5)*360}function Tt(We){var rr=(180-We*360)*Math.PI/180;return 360*Math.atan(Math.exp(rr))/Math.PI-90}function Lt(We,rr){for(var fr in rr)We[fr]=rr[fr];return We}function Mt(We){return We.x}function te(We){return We.y}function ve(We,rr,fr,_r){for(var Qr=_r,Cn=fr-rr>>1,bn=fr-rr,An,ci=We[rr],xi=We[rr+1],Li=We[fr],Oi=We[fr+1],Zi=rr+3;ZiQr)An=Zi,Qr=li;else if(li===Qr){var La=Math.abs(Zi-Cn);La_r&&(An-rr>3&&ve(We,rr,An,_r),We[An+2]=Qr,fr-An>3&&ve(We,An,fr,_r))}function oe(We,rr,fr,_r,Qr,Cn){var bn=Qr-fr,An=Cn-_r;if(bn!==0||An!==0){var ci=((We-fr)*bn+(rr-_r)*An)/(bn*bn+An*An);ci>1?(fr=Qr,_r=Cn):ci>0&&(fr+=bn*ci,_r+=An*ci)}return bn=We-fr,An=rr-_r,bn*bn+An*An}function Te(We,rr,fr,_r){var Qr={id:typeof We>"u"?null:We,type:rr,geometry:fr,tags:_r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return He(Qr),Qr}function He(We){var rr=We.geometry,fr=We.type;if(fr==="Point"||fr==="MultiPoint"||fr==="LineString")Ge(We,rr);else if(fr==="Polygon"||fr==="MultiLineString")for(var _r=0;_r0&&(_r?bn+=(Qr*xi-ci*Cn)/2:bn+=Math.sqrt(Math.pow(ci-Qr,2)+Math.pow(xi-Cn,2))),Qr=ci,Cn=xi}var Li=rr.length-3;rr[2]=1,ve(rr,0,Li,fr),rr[Li+2]=1,rr.size=Math.abs(bn),rr.start=0,rr.end=rr.size}function br(We,rr,fr,_r){for(var Qr=0;Qr1?1:fr}function Ce(We,rr,fr,_r,Qr,Cn,bn,An){if(fr/=rr,_r/=rr,Cn>=fr&&bn<_r)return We;if(bn=_r)return null;for(var ci=[],xi=0;xi=fr&&La<_r){ci.push(Li);continue}else if(La=_r)continue;var Wa=[];if(Zi==="Point"||Zi==="MultiPoint")Gt(Oi,Wa,fr,_r,Qr);else if(Zi==="LineString")ne(Oi,Wa,fr,_r,Qr,!1,An.lineMetrics);else if(Zi==="MultiLineString")gt(Oi,Wa,fr,_r,Qr,!1);else if(Zi==="Polygon")gt(Oi,Wa,fr,_r,Qr,!0);else if(Zi==="MultiPolygon")for(var ze=0;ze=fr&&bn<=_r&&(rr.push(We[Cn]),rr.push(We[Cn+1]),rr.push(We[Cn+2]))}}function ne(We,rr,fr,_r,Qr,Cn,bn){for(var An=Ct(We),ci=Qr===0?Nt:re,xi=We.start,Li,Oi,Zi=0;Zifr&&(Oi=ci(An,li,La,ze,Pe,fr),bn&&(An.start=xi+Li*Oi)):Rr>_r?qr<_r&&(Oi=ci(An,li,La,ze,Pe,_r),bn&&(An.start=xi+Li*Oi)):St(An,li,La,Wa),qr=fr&&(Oi=ci(An,li,La,ze,Pe,fr),$r=!0),qr>_r&&Rr<=_r&&(Oi=ci(An,li,La,ze,Pe,_r),$r=!0),!Cn&&$r&&(bn&&(An.end=xi+Li*Oi),rr.push(An),An=Ct(We)),bn&&(xi+=Li)}var Br=We.length-3;li=We[Br],La=We[Br+1],Wa=We[Br+2],Rr=Qr===0?li:La,Rr>=fr&&Rr<=_r&&St(An,li,La,Wa),Br=An.length-3,Cn&&Br>=3&&(An[Br]!==An[0]||An[Br+1]!==An[1])&&St(An,An[0],An[1],An[2]),An.length&&rr.push(An)}function Ct(We){var rr=[];return rr.size=We.size,rr.start=We.start,rr.end=We.end,rr}function gt(We,rr,fr,_r,Qr,Cn){for(var bn=0;bnbn.maxX&&(bn.maxX=Li),Oi>bn.maxY&&(bn.maxY=Oi)}return bn}function Tr(We,rr,fr,_r){var Qr=rr.geometry,Cn=rr.type,bn=[];if(Cn==="Point"||Cn==="MultiPoint")for(var An=0;An0&&rr.size<(Qr?bn:_r)){fr.numPoints+=rr.length/3;return}for(var An=[],ci=0;cibn)&&(fr.numSimplified++,An.push(rr[ci]),An.push(rr[ci+1])),fr.numPoints++;Qr&&Jr(An,Cn),We.push(An)}function Jr(We,rr){for(var fr=0,_r=0,Qr=We.length,Cn=Qr-2;_r0===rr)for(_r=0,Qr=We.length;_r24)throw new Error("maxZoom should be in the 0-24 range");if(rr.promoteId&&rr.generateId)throw new Error("promoteId and generateId cannot be used together.");var _r=cr(We,rr);this.tiles={},this.tileCoords=[],fr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",rr.indexMaxZoom,rr.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),_r=le(_r,rr),_r.length&&this.splitTile(_r,0,0,0),fr&&(_r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Hn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Hn.prototype.splitTile=function(We,rr,fr,_r,Qr,Cn,bn){for(var An=[We,rr,fr,_r],ci=this.options,xi=ci.debug;An.length;){_r=An.pop(),fr=An.pop(),rr=An.pop(),We=An.pop();var Li=1<1&&console.time("creation"),Zi=this.tiles[Oi]=Ar(We,rr,fr,_r,ci),this.tileCoords.push({z:rr,x:fr,y:_r}),xi)){xi>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",rr,fr,_r,Zi.numFeatures,Zi.numPoints,Zi.numSimplified),console.timeEnd("creation"));var li="z"+rr;this.stats[li]=(this.stats[li]||0)+1,this.total++}if(Zi.source=We,Qr){if(rr===ci.maxZoom||rr===Qr)continue;var La=1<1&&console.time("clipping");var Wa=.5*ci.buffer/ci.extent,ze=.5-Wa,Pe=.5+Wa,Rr=1+Wa,qr,$r,Br,Gr,fn,an;qr=$r=Br=Gr=null,fn=Ce(We,Li,fr-Wa,fr+Pe,0,Zi.minX,Zi.maxX,ci),an=Ce(We,Li,fr+ze,fr+Rr,0,Zi.minX,Zi.maxX,ci),We=null,fn&&(qr=Ce(fn,Li,_r-Wa,_r+Pe,1,Zi.minY,Zi.maxY,ci),$r=Ce(fn,Li,_r+ze,_r+Rr,1,Zi.minY,Zi.maxY,ci),fn=null),an&&(Br=Ce(an,Li,_r-Wa,_r+Pe,1,Zi.minY,Zi.maxY,ci),Gr=Ce(an,Li,_r+ze,_r+Rr,1,Zi.minY,Zi.maxY,ci),an=null),xi>1&&console.timeEnd("clipping"),An.push(qr||[],rr+1,fr*2,_r*2),An.push($r||[],rr+1,fr*2,_r*2+1),An.push(Br||[],rr+1,fr*2+1,_r*2),An.push(Gr||[],rr+1,fr*2+1,_r*2+1)}}},Hn.prototype.getTile=function(We,rr,fr){var _r=this.options,Qr=_r.extent,Cn=_r.debug;if(We<0||We>24)return null;var bn=1<1&&console.log("drilling down to z%d-%d-%d",We,rr,fr);for(var ci=We,xi=rr,Li=fr,Oi;!Oi&&ci>0;)ci--,xi=Math.floor(xi/2),Li=Math.floor(Li/2),Oi=this.tiles[Kn(ci,xi,Li)];return!Oi||!Oi.source?null:(Cn>1&&console.log("found parent tile z%d-%d-%d",ci,xi,Li),Cn>1&&console.time("drilling down"),this.splitTile(Oi.source,ci,xi,Li,We,rr,fr),Cn>1&&console.timeEnd("drilling down"),this.tiles[An]?qe(this.tiles[An],Qr):null)};function Kn(We,rr,fr){return((1<=0?0:Z.button},r.remove=function(Z){Z.parentNode&&Z.parentNode.removeChild(Z)};function v(Z,ot,et){var xt,Ut,fe,ye=t.browser.devicePixelRatio>1?"@2x":"",Yt=t.getJSON(ot.transformRequest(ot.normalizeSpriteURL(Z,ye,".json"),t.ResourceType.SpriteJSON),function(nr,Ye){Yt=null,fe||(fe=nr,xt=Ye,Se())}),ce=t.getImage(ot.transformRequest(ot.normalizeSpriteURL(Z,ye,".png"),t.ResourceType.SpriteImage),function(nr,Ye){ce=null,fe||(fe=nr,Ut=Ye,Se())});function Se(){if(fe)et(fe);else if(xt&&Ut){var nr=t.browser.getImageData(Ut),Ye={};for(var tr in xt){var lr=xt[tr],hr=lr.width,Ve=lr.height,Xe=lr.x,$e=lr.y,Cr=lr.sdf,on=lr.pixelRatio,hn=lr.stretchX,fi=lr.stretchY,si=lr.content,Gn=new t.RGBAImage({width:hr,height:Ve});t.RGBAImage.copy(nr,Gn,{x:Xe,y:$e},{x:0,y:0},{width:hr,height:Ve}),Ye[tr]={data:Gn,pixelRatio:on,sdf:Cr,stretchX:hn,stretchY:fi,content:si}}et(null,Ye)}}return{cancel:function(){Yt&&(Yt.cancel(),Yt=null),ce&&(ce.cancel(),ce=null)}}}function T(Z){var ot=Z.userImage;if(ot&&ot.render){var et=ot.render();if(et)return Z.data.replace(new Uint8Array(ot.data.buffer)),!0}return!1}var u=1,b=function(Z){function ot(){Z.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.isLoaded=function(){return this.loaded},ot.prototype.setLoaded=function(et){if(this.loaded!==et&&(this.loaded=et,et)){for(var xt=0,Ut=this.requestors;xt=0?1.2:1))}A.prototype.draw=function(Z){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Z,this.buffer,this.middle);for(var ot=this.ctx.getImageData(0,0,this.size,this.size),et=new Uint8ClampedArray(this.size*this.size),xt=0;xt65535){Se(new Error("glyphs > 65535 not supported"));return}if(tr.ranges[hr]){Se(null,{stack:nr,id:Ye,glyph:lr});return}var Ve=tr.requests[hr];Ve||(Ve=tr.requests[hr]=[],k.loadGlyphRange(nr,hr,et.url,et.requestManager,function(Xe,$e){if($e){for(var Cr in $e)et._doesCharSupportLocalGlyph(+Cr)||(tr.glyphs[+Cr]=$e[+Cr]);tr.ranges[hr]=!0}for(var on=0,hn=Ve;on1&&(ce=Z[++Yt]);var nr=Math.abs(Se-ce.left),Ye=Math.abs(Se-ce.right),tr=Math.min(nr,Ye),lr=void 0,hr=Ut/et*(xt+1);if(ce.isDash){var Ve=xt-Math.abs(hr);lr=Math.sqrt(tr*tr+Ve*Ve)}else lr=xt-Math.sqrt(tr*tr+hr*hr);this.data[ye+Se]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addRegularDash=function(Z){for(var ot=Z.length-1;ot>=0;--ot){var et=Z[ot],xt=Z[ot+1];et.zeroLength?Z.splice(ot,1):xt&&xt.isDash===et.isDash&&(xt.left=et.left,Z.splice(ot,1))}var Ut=Z[0],fe=Z[Z.length-1];Ut.isDash===fe.isDash&&(Ut.left=fe.left-this.width,fe.right=Ut.right+this.width);for(var ye=this.width*this.nextRow,Yt=0,ce=Z[Yt],Se=0;Se1&&(ce=Z[++Yt]);var nr=Math.abs(Se-ce.left),Ye=Math.abs(Se-ce.right),tr=Math.min(nr,Ye),lr=ce.isDash?tr:-tr;this.data[ye+Se]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addDash=function(Z,ot){var et=ot?7:0,xt=2*et+1;if(this.nextRow+xt>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var Ut=0,fe=0;fe=et.minX&&Z.x=et.minY&&Z.y0&&(Se[new t.OverscaledTileID(et.overscaledZ,ye,xt.z,fe,xt.y-1).key]={backfilled:!1},Se[new t.OverscaledTileID(et.overscaledZ,et.wrap,xt.z,xt.x,xt.y-1).key]={backfilled:!1},Se[new t.OverscaledTileID(et.overscaledZ,ce,xt.z,Yt,xt.y-1).key]={backfilled:!1}),xt.y+10&&(Ut.resourceTiming=et._resourceTiming,et._resourceTiming=[]),et.fire(new t.Event("data",Ut))})},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setData=function(et){var xt=this;return this._data=et,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ut){if(Ut){xt.fire(new t.ErrorEvent(Ut));return}var fe={dataType:"source",sourceDataType:"content"};xt._collectResourceTiming&&xt._resourceTiming&&xt._resourceTiming.length>0&&(fe.resourceTiming=xt._resourceTiming,xt._resourceTiming=[]),xt.fire(new t.Event("data",fe))}),this},ot.prototype.getClusterExpansionZoom=function(et,xt){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterChildren=function(et,xt){return this.actor.send("geojson.getClusterChildren",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterLeaves=function(et,xt,Ut,fe){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:et,limit:xt,offset:Ut},fe),this},ot.prototype._updateWorkerData=function(et){var xt=this;this._loaded=!1;var Ut=t.extend({},this.workerOptions),fe=this._data;typeof fe=="string"?(Ut.request=this.map._requestManager.transformRequest(t.browser.resolveURL(fe),t.ResourceType.Source),Ut.request.collectResourceTiming=this._collectResourceTiming):Ut.data=JSON.stringify(fe),this.actor.send(this.type+".loadData",Ut,function(ye,Yt){xt._removed||Yt&&Yt.abandoned||(xt._loaded=!0,Yt&&Yt.resourceTiming&&Yt.resourceTiming[xt.id]&&(xt._resourceTiming=Yt.resourceTiming[xt.id].slice(0)),xt.actor.send(xt.type+".coalesce",{source:Ut.source},null),et(ye))})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.loadTile=function(et,xt){var Ut=this,fe=et.actor?"reloadTile":"loadTile";et.actor=this.actor;var ye={type:this.type,uid:et.uid,tileID:et.tileID,zoom:et.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};et.request=this.actor.send(fe,ye,function(Yt,ce){return delete et.request,et.unloadVectorData(),et.aborted?xt(null):Yt?xt(Yt):(et.loadVectorData(ce,Ut.map.painter,fe==="reloadTile"),xt(null))})},ot.prototype.abortTile=function(et){et.request&&(et.request.cancel(),delete et.request),et.aborted=!0},ot.prototype.unloadTile=function(et){et.unloadVectorData(),this.actor.send("removeTile",{uid:et.uid,type:this.type,source:this.id})},ot.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},ot.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented),yt=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),pt=function(Z){function ot(et,xt,Ut,fe){Z.call(this),this.id=et,this.dispatcher=Ut,this.coordinates=xt.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fe),this.options=xt}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(et,xt){var Ut=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function(fe,ye){Ut._loaded=!0,fe?Ut.fire(new t.ErrorEvent(fe)):ye&&(Ut.image=ye,et&&(Ut.coordinates=et),xt&&xt(),Ut._finishLoading())})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.updateImage=function(et){var xt=this;return!this.image||!et.url?this:(this.options.url=et.url,this.load(et.coordinates,function(){xt.texture=null}),this)},ot.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setCoordinates=function(et){var xt=this;this.coordinates=et;var Ut=et.map(t.MercatorCoordinate.fromLngLat);this.tileID=st(Ut),this.minzoom=this.maxzoom=this.tileID.z;var fe=Ut.map(function(ye){return xt.tileID.getTilePoint(ye)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(fe[0].x,fe[0].y,0,0),this._boundsArray.emplaceBack(fe[1].x,fe[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(fe[3].x,fe[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(fe[2].x,fe[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(et,this.image,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Ut in this.tiles){var fe=this.tiles[Ut];fe.state!=="loaded"&&(fe.state="loaded",fe.texture=this.texture)}}},ot.prototype.loadTile=function(et,xt){this.tileID&&this.tileID.equals(et.tileID.canonical)?(this.tiles[String(et.tileID.wrap)]=et,et.buckets={},xt(null)):(et.state="errored",xt(null))},ot.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented);function st(Z){for(var ot=1/0,et=1/0,xt=-1/0,Ut=-1/0,fe=0,ye=Z;fext.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+xt.start(0)+" and "+xt.end(0)+"-second mark."))):this.video.currentTime=et}},ot.prototype.getVideo=function(){return this.video},ot.prototype.onAdd=function(et){this.map||(this.map=et,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE),xt.texSubImage2D(xt.TEXTURE_2D,0,0,0,xt.RGBA,xt.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(et,this.video,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Ut in this.tiles){var fe=this.tiles[Ut];fe.state!=="loaded"&&(fe.state="loaded",fe.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this.video&&!this.video.paused},ot}(pt),dt=function(Z){function ot(et,xt,Ut,fe){Z.call(this,et,xt,Ut,fe),xt.coordinates?(!Array.isArray(xt.coordinates)||xt.coordinates.length!==4||xt.coordinates.some(function(ye){return!Array.isArray(ye)||ye.length!==2||ye.some(function(Yt){return typeof Yt!="number"})}))&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "coordinates"'))),xt.animate&&typeof xt.animate!="boolean"&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'optional "animate" property must be a boolean value'))),xt.canvas?typeof xt.canvas!="string"&&!(xt.canvas instanceof t.window.HTMLCanvasElement)&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "canvas"'))),this.options=xt,this.animate=xt.animate!==void 0?xt.animate:!0}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},ot.prototype.getCanvas=function(){return this.canvas},ot.prototype.onAdd=function(et){this.map=et,this.load(),this.canvas&&this.animate&&this.play()},ot.prototype.onRemove=function(){this.pause()},ot.prototype.prepare=function(){var et=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,et=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,et=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var xt=this.map.painter.context,Ut=xt.gl;this.boundsBuffer||(this.boundsBuffer=xt.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(et||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(xt,this.canvas,Ut.RGBA,{premultiply:!0});for(var fe in this.tiles){var ye=this.tiles[fe];ye.state!=="loaded"&&(ye.state="loaded",ye.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this._playing},ot.prototype._hasInvalidDimensions=function(){for(var et=0,xt=[this.canvas.width,this.canvas.height];etthis.max){var ye=this._getAndRemoveByKey(this.order[0]);ye&&this.onRemove(ye)}return this},Ht.prototype.has=function(Z){return Z.wrapped().key in this.data},Ht.prototype.getAndRemove=function(Z){return this.has(Z)?this._getAndRemoveByKey(Z.wrapped().key):null},Ht.prototype._getAndRemoveByKey=function(Z){var ot=this.data[Z].shift();return ot.timeout&&clearTimeout(ot.timeout),this.data[Z].length===0&&delete this.data[Z],this.order.splice(this.order.indexOf(Z),1),ot.value},Ht.prototype.getByKey=function(Z){var ot=this.data[Z];return ot?ot[0].value:null},Ht.prototype.get=function(Z){if(!this.has(Z))return null;var ot=this.data[Z.wrapped().key][0];return ot.value},Ht.prototype.remove=function(Z,ot){if(!this.has(Z))return this;var et=Z.wrapped().key,xt=ot===void 0?0:this.data[et].indexOf(ot),Ut=this.data[et][xt];return this.data[et].splice(xt,1),Ut.timeout&&clearTimeout(Ut.timeout),this.data[et].length===0&&delete this.data[et],this.onRemove(Ut.value),this.order.splice(this.order.indexOf(et),1),this},Ht.prototype.setMaxSize=function(Z){for(this.max=Z;this.order.length>this.max;){var ot=this._getAndRemoveByKey(this.order[0]);ot&&this.onRemove(ot)}return this},Ht.prototype.filter=function(Z){var ot=[];for(var et in this.data)for(var xt=0,Ut=this.data[et];xt1||(Math.abs(nr)>1&&(Math.abs(nr+tr)===1?nr+=tr:Math.abs(nr-tr)===1&&(nr-=tr)),!(!Se.dem||!ce.dem)&&(ce.dem.backfillBorder(Se.dem,nr,Ye),ce.neighboringTiles&&ce.neighboringTiles[lr]&&(ce.neighboringTiles[lr].backfilled=!0)))}},ot.prototype.getTile=function(et){return this.getTileByID(et.key)},ot.prototype.getTileByID=function(et){return this._tiles[et]},ot.prototype._retainLoadedChildren=function(et,xt,Ut,fe){for(var ye in this._tiles){var Yt=this._tiles[ye];if(!(fe[ye]||!Yt.hasData()||Yt.tileID.overscaledZ<=xt||Yt.tileID.overscaledZ>Ut)){for(var ce=Yt.tileID;Yt&&Yt.tileID.overscaledZ>xt+1;){var Se=Yt.tileID.scaledTo(Yt.tileID.overscaledZ-1);Yt=this._tiles[Se.key],Yt&&Yt.hasData()&&(ce=Se)}for(var nr=ce;nr.overscaledZ>xt;)if(nr=nr.scaledTo(nr.overscaledZ-1),et[nr.key]){fe[ce.key]=ce;break}}}},ot.prototype.findLoadedParent=function(et,xt){if(et.key in this._loadedParentTiles){var Ut=this._loadedParentTiles[et.key];return Ut&&Ut.tileID.overscaledZ>=xt?Ut:null}for(var fe=et.overscaledZ-1;fe>=xt;fe--){var ye=et.scaledTo(fe),Yt=this._getLoadedTile(ye);if(Yt)return Yt}},ot.prototype._getLoadedTile=function(et){var xt=this._tiles[et.key];if(xt&&xt.hasData())return xt;var Ut=this._cache.getByKey(et.wrapped().key);return Ut},ot.prototype.updateCacheSize=function(et){var xt=Math.ceil(et.width/this._source.tileSize)+1,Ut=Math.ceil(et.height/this._source.tileSize)+1,fe=xt*Ut,ye=5,Yt=Math.floor(fe*ye),ce=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Yt):Yt;this._cache.setMaxSize(ce)},ot.prototype.handleWrapJump=function(et){var xt=this._prevLng===void 0?et:this._prevLng,Ut=et-xt,fe=Ut/360,ye=Math.round(fe);if(this._prevLng=et,ye){var Yt={};for(var ce in this._tiles){var Se=this._tiles[ce];Se.tileID=Se.tileID.unwrapTo(Se.tileID.wrap+ye),Yt[Se.tileID.key]=Se}this._tiles=Yt;for(var nr in this._timers)clearTimeout(this._timers[nr]),delete this._timers[nr];for(var Ye in this._tiles){var tr=this._tiles[Ye];this._setTileReloadTimer(Ye,tr)}}},ot.prototype.update=function(et){var xt=this;if(this.transform=et,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(et),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ut;this.used?this._source.tileID?Ut=et.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(di){return new t.OverscaledTileID(di.canonical.z,di.wrap,di.canonical.z,di.canonical.x,di.canonical.y)}):(Ut=et.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ut=Ut.filter(function(di){return xt._source.hasTile(di)}))):Ut=[];var fe=et.coveringZoomLevel(this._source),ye=Math.max(fe-ot.maxOverzooming,this._source.minzoom),Yt=Math.max(fe+ot.maxUnderzooming,this._source.minzoom),ce=this._updateRetainedTiles(Ut,fe);if(ci(this._source.type)){for(var Se={},nr={},Ye=Object.keys(ce),tr=0,lr=Ye;trthis._source.maxzoom){var $e=Ve.children(this._source.maxzoom)[0],Cr=this.getTile($e);if(Cr&&Cr.hasData()){Ut[$e.key]=$e;continue}}else{var on=Ve.children(this._source.maxzoom);if(Ut[on[0].key]&&Ut[on[1].key]&&Ut[on[2].key]&&Ut[on[3].key])continue}for(var hn=Xe.wasRequested(),fi=Ve.overscaledZ-1;fi>=ye;--fi){var si=Ve.scaledTo(fi);if(fe[si.key]||(fe[si.key]=!0,Xe=this.getTile(si),!Xe&&hn&&(Xe=this._addTile(si)),Xe&&(Ut[si.key]=si,hn=Xe.wasRequested(),Xe.hasData())))break}}}return Ut},ot.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var et in this._tiles){for(var xt=[],Ut=void 0,fe=this._tiles[et].tileID;fe.overscaledZ>0;){if(fe.key in this._loadedParentTiles){Ut=this._loadedParentTiles[fe.key];break}xt.push(fe.key);var ye=fe.scaledTo(fe.overscaledZ-1);if(Ut=this._getLoadedTile(ye),Ut)break;fe=ye}for(var Yt=0,ce=xt;Yt0)&&(xt.hasData()&&xt.state!=="reloading"?this._cache.add(xt.tileID,xt,xt.getExpiryTimeout()):(xt.aborted=!0,this._abortTile(xt),this._unloadTile(xt))))},ot.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var et in this._tiles)this._removeTile(et);this._cache.reset()},ot.prototype.tilesIn=function(et,xt,Ut){var fe=this,ye=[],Yt=this.transform;if(!Yt)return ye;for(var ce=Ut?Yt.getCameraQueryGeometry(et):et,Se=et.map(function(fi){return Yt.pointCoordinate(fi)}),nr=ce.map(function(fi){return Yt.pointCoordinate(fi)}),Ye=this.getIds(),tr=1/0,lr=1/0,hr=-1/0,Ve=-1/0,Xe=0,$e=nr;Xe<$e.length;Xe+=1){var Cr=$e[Xe];tr=Math.min(tr,Cr.x),lr=Math.min(lr,Cr.y),hr=Math.max(hr,Cr.x),Ve=Math.max(Ve,Cr.y)}for(var on=function(fi){var si=fe._tiles[Ye[fi]];if(!si.holdingForFade()){var Gn=si.tileID,Ai=Math.pow(2,Yt.zoom-si.tileID.overscaledZ),di=xt*si.queryPadding*t.EXTENT/si.tileSize/Ai,Ki=[Gn.getTilePoint(new t.MercatorCoordinate(tr,lr)),Gn.getTilePoint(new t.MercatorCoordinate(hr,Ve))];if(Ki[0].x-di=0&&Ki[1].y+di>=0){var Ti=Se.map(function(oa){return Gn.getTilePoint(oa)}),Mi=nr.map(function(oa){return Gn.getTilePoint(oa)});ye.push({tile:si,tileID:Gn,queryGeometry:Ti,cameraQueryGeometry:Mi,scale:Ai})}}},hn=0;hn=t.browser.now())return!0}return!1},ot.prototype.setFeatureState=function(et,xt,Ut){et=et||"_geojsonTileLayer",this._state.updateState(et,xt,Ut)},ot.prototype.removeFeatureState=function(et,xt,Ut){et=et||"_geojsonTileLayer",this._state.removeFeatureState(et,xt,Ut)},ot.prototype.getFeatureState=function(et,xt){return et=et||"_geojsonTileLayer",this._state.getState(et,xt)},ot.prototype.setDependencies=function(et,xt,Ut){var fe=this._tiles[et];fe&&fe.setDependencies(xt,Ut)},ot.prototype.reloadTilesForDependencies=function(et,xt){for(var Ut in this._tiles){var fe=this._tiles[Ut];fe.hasDependency(et,xt)&&this._reloadTile(Ut,"reloading")}this._cache.filter(function(ye){return!ye.hasDependency(et,xt)})},ot}(t.Evented);bn.maxOverzooming=10,bn.maxUnderzooming=3;function An(Z,ot){var et=Math.abs(Z.wrap*2)-+(Z.wrap<0),xt=Math.abs(ot.wrap*2)-+(ot.wrap<0);return Z.overscaledZ-ot.overscaledZ||xt-et||ot.canonical.y-Z.canonical.y||ot.canonical.x-Z.canonical.x}function ci(Z){return Z==="raster"||Z==="image"||Z==="video"}function xi(){return new t.window.Worker(xl.workerUrl)}var Li="mapboxgl_preloaded_worker_pool",Oi=function(){this.active={}};Oi.prototype.acquire=function(Z){if(!this.workers)for(this.workers=[];this.workers.length0?(xt-fe)/ye:0;return this.points[Ut].mult(1-Yt).add(this.points[ot].mult(Yt))};var Sn=function(Z,ot,et){var xt=this.boxCells=[],Ut=this.circleCells=[];this.xCellCount=Math.ceil(Z/et),this.yCellCount=Math.ceil(ot/et);for(var fe=0;fethis.width||xt<0||ot>this.height)return Ut?!1:[];var ye=[];if(Z<=0&&ot<=0&&this.width<=et&&this.height<=xt){if(Ut)return!0;for(var Yt=0;Yt0:ye}},Sn.prototype._queryCircle=function(Z,ot,et,xt,Ut){var fe=Z-et,ye=Z+et,Yt=ot-et,ce=ot+et;if(ye<0||fe>this.width||ce<0||Yt>this.height)return xt?!1:[];var Se=[],nr={hitTest:xt,circle:{x:Z,y:ot,radius:et},seenUids:{box:{},circle:{}}};return this._forEachCell(fe,Yt,ye,ce,this._queryCellCircle,Se,nr,Ut),xt?Se.length>0:Se},Sn.prototype.query=function(Z,ot,et,xt,Ut){return this._query(Z,ot,et,xt,!1,Ut)},Sn.prototype.hitTest=function(Z,ot,et,xt,Ut){return this._query(Z,ot,et,xt,!0,Ut)},Sn.prototype.hitTestCircle=function(Z,ot,et,xt){return this._queryCircle(Z,ot,et,!0,xt)},Sn.prototype._queryCell=function(Z,ot,et,xt,Ut,fe,ye,Yt){var ce=ye.seenUids,Se=this.boxCells[Ut];if(Se!==null)for(var nr=this.bboxes,Ye=0,tr=Se;Ye=nr[hr+0]&&xt>=nr[hr+1]&&(!Yt||Yt(this.boxKeys[lr]))){if(ye.hitTest)return fe.push(!0),!0;fe.push({key:this.boxKeys[lr],x1:nr[hr],y1:nr[hr+1],x2:nr[hr+2],y2:nr[hr+3]})}}}var Ve=this.circleCells[Ut];if(Ve!==null)for(var Xe=this.circles,$e=0,Cr=Ve;$eye*ye+Yt*Yt},Sn.prototype._circleAndRectCollide=function(Z,ot,et,xt,Ut,fe,ye){var Yt=(fe-xt)/2,ce=Math.abs(Z-(xt+Yt));if(ce>Yt+et)return!1;var Se=(ye-Ut)/2,nr=Math.abs(ot-(Ut+Se));if(nr>Se+et)return!1;if(ce<=Yt||nr<=Se)return!0;var Ye=ce-Yt,tr=nr-Se;return Ye*Ye+tr*tr<=et*et};function Zn(Z,ot,et,xt,Ut){var fe=t.create();return ot?(t.scale(fe,fe,[1/Ut,1/Ut,1]),et||t.rotateZ(fe,fe,xt.angle)):t.multiply(fe,xt.labelPlaneMatrix,Z),fe}function Ea(Z,ot,et,xt,Ut){if(ot){var fe=t.clone(Z);return t.scale(fe,fe,[Ut,Ut,1]),et||t.rotateZ(fe,fe,-xt.angle),fe}else return xt.glCoordMatrix}function Ri(Z,ot){var et=[Z.x,Z.y,0,1];Ks(et,et,ot);var xt=et[3];return{point:new t.Point(et[0]/xt,et[1]/xt),signedDistanceFromCamera:xt}}function Ja(Z,ot){return .5+.5*(Z/ot)}function Xa(Z,ot){var et=Z[0]/Z[3],xt=Z[1]/Z[3],Ut=et>=-ot[0]&&et<=ot[0]&&xt>=-ot[1]&&xt<=ot[1];return Ut}function Do(Z,ot,et,xt,Ut,fe,ye,Yt){var ce=xt?Z.textSizeData:Z.iconSizeData,Se=t.evaluateSizeForZoom(ce,et.transform.zoom),nr=[256/et.width*2+1,256/et.height*2+1],Ye=xt?Z.text.dynamicLayoutVertexArray:Z.icon.dynamicLayoutVertexArray;Ye.clear();for(var tr=Z.lineVertexArray,lr=xt?Z.text.placedSymbolArray:Z.icon.placedSymbolArray,hr=et.transform.width/et.transform.height,Ve=!1,Xe=0;Xefe)return{useVertical:!0}}return(Z===t.WritingMode.vertical?ot.yet.x)?{needsFlipping:!0}:null}function za(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se,nr,Ye,tr,lr){var hr=ot/24,Ve=Z.lineOffsetX*hr,Xe=Z.lineOffsetY*hr,$e;if(Z.numGlyphs>1){var Cr=Z.glyphStartIndex+Z.numGlyphs,on=Z.lineStartIndex,hn=Z.lineStartIndex+Z.lineLength,fi=go(hr,Yt,Ve,Xe,et,nr,Ye,Z,ce,fe,tr);if(!fi)return{notEnoughRoom:!0};var si=Ri(fi.first.point,ye).point,Gn=Ri(fi.last.point,ye).point;if(xt&&!et){var Ai=Fo(Z.writingMode,si,Gn,lr);if(Ai)return Ai}$e=[fi.first];for(var di=Z.glyphStartIndex+1;di0?oa.point:xs(Ye,Mi,Ki,1,Ut),ho=Fo(Z.writingMode,Ki,Qa,lr);if(ho)return ho}var qo=os(hr*Yt.getoffsetX(Z.glyphStartIndex),Ve,Xe,et,nr,Ye,Z.segment,Z.lineStartIndex,Z.lineStartIndex+Z.lineLength,ce,fe,tr);if(!qo)return{notEnoughRoom:!0};$e=[qo]}for(var _s=0,Ol=$e;_s0?1:-1,hr=0;xt&&(lr*=-1,hr=Math.PI),lr<0&&(hr+=Math.PI);for(var Ve=lr>0?Yt+ye:Yt+ye+1,Xe=Ut,$e=Ut,Cr=0,on=0,hn=Math.abs(tr),fi=[];Cr+on<=hn;){if(Ve+=lr,Ve=ce)return null;if($e=Xe,fi.push(Xe),Xe=Ye[Ve],Xe===void 0){var si=new t.Point(Se.getx(Ve),Se.gety(Ve)),Gn=Ri(si,nr);if(Gn.signedDistanceFromCamera>0)Xe=Ye[Ve]=Gn.point;else{var Ai=Ve-lr,di=Cr===0?fe:new t.Point(Se.getx(Ai),Se.gety(Ai));Xe=xs(di,si,$e,hn-Cr+1,nr)}}Cr+=on,on=$e.dist(Xe)}var Ki=(hn-Cr)/on,Ti=Xe.sub($e),Mi=Ti.mult(Ki)._add($e);Mi._add(Ti._unit()._perp()._mult(et*lr));var oa=hr+Math.atan2(Xe.y-$e.y,Xe.x-$e.x);return fi.push(Mi),{point:Mi,angle:oa,path:fi}}var cl=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Zo(Z,ot){for(var et=0;et=1;Ol--)_s.push(ho.path[Ol]);for(var Ul=1;Ul0){for(var Rs=_s[0].clone(),Au=_s[0].clone(),nf=1;nf<_s.length;nf++)Rs.x=Math.min(Rs.x,_s[nf].x),Rs.y=Math.min(Rs.y,_s[nf].y),Au.x=Math.max(Au.x,_s[nf].x),Au.y=Math.max(Au.y,_s[nf].y);Rs.x>=Mi.x&&Au.x<=oa.x&&Rs.y>=Mi.y&&Au.y<=oa.y?bc=[_s]:Au.xoa.x||Au.yoa.y?bc=[]:bc=t.clipLine([_s],Mi.x,Mi.y,oa.x,oa.y)}for(var Of=0,Hp=bc;Of=this.screenRightBoundary||xtthis.screenBottomBoundary},hl.prototype.isInsideGrid=function(Z,ot,et,xt){return et>=0&&Z=0&&ot0){var on;return this.prevPlacement&&this.prevPlacement.variableOffsets[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID].text&&(on=this.prevPlacement.variableOffsets[Ye.crossTileID].anchor),this.variableOffsets[Ye.crossTileID]={textOffset:Ve,width:et,height:xt,anchor:Z,textBoxScale:Ut,prevAnchor:on},this.markUsedJustification(tr,Z,Ye,lr),tr.allowVerticalPlacement&&(this.markUsedOrientation(tr,lr,Ye),this.placedOrientations[Ye.crossTileID]=lr),{shift:Xe,placedGlyphBoxes:$e}}},Us.prototype.placeLayerBucketPart=function(Z,ot,et){var xt=this,Ut=Z.parameters,fe=Ut.bucket,ye=Ut.layout,Yt=Ut.posMatrix,ce=Ut.textLabelPlaneMatrix,Se=Ut.labelToScreenMatrix,nr=Ut.textPixelRatio,Ye=Ut.holdingForFade,tr=Ut.collisionBoxArray,lr=Ut.partiallyEvaluatedTextSize,hr=Ut.collisionGroup,Ve=ye.get("text-optional"),Xe=ye.get("icon-optional"),$e=ye.get("text-allow-overlap"),Cr=ye.get("icon-allow-overlap"),on=ye.get("text-rotation-alignment")==="map",hn=ye.get("text-pitch-alignment")==="map",fi=ye.get("icon-text-fit")!=="none",si=ye.get("symbol-z-order")==="viewport-y",Gn=$e&&(Cr||!fe.hasIconData()||Xe),Ai=Cr&&($e||!fe.hasTextData()||Ve);!fe.collisionArrays&&tr&&fe.deserializeCollisionBoxes(tr);var di=function(ho,qo){if(!ot[ho.crossTileID]){if(Ye){xt.placements[ho.crossTileID]=new Ps(!1,!1,!1);return}var _s=!1,Ol=!1,Ul=!0,ml=null,Vl={box:null,offscreen:null},bc={box:null,offscreen:null},Rs=null,Au=null,nf=null,Of=0,Hp=0,k0=0;qo.textFeatureIndex?Of=qo.textFeatureIndex:ho.useRuntimeCollisionCircles&&(Of=ho.featureIndex),qo.verticalTextFeatureIndex&&(Hp=qo.verticalTextFeatureIndex);var Ap=qo.textBox;if(Ap){var Mp=function(af){var xd=t.WritingMode.horizontal;if(fe.allowVerticalPlacement&&!af&&xt.prevPlacement){var wc=xt.prevPlacement.placedOrientations[ho.crossTileID];wc&&(xt.placedOrientations[ho.crossTileID]=wc,xd=wc,xt.markUsedOrientation(fe,xd,ho))}return xd},j0=function(af,xd){if(fe.allowVerticalPlacement&&ho.numVerticalGlyphVertices>0&&qo.verticalTextBox)for(var wc=0,Rg=fe.writingModes;wc0&&(np=np.filter(function(af){return af!==Sp.anchor}),np.unshift(Sp.anchor))}var Gd=function(af,xd,wc){for(var Rg=af.x2-af.x1,Pv=af.y2-af.y1,bx=ho.textBoxScale,Ic=fi&&!Cr?xd:null,Mm={box:[],offscreen:!1},wx=$e?np.length*2:np.length,Bg=0;Bg=np.length,zv=xt.attemptAnchorPlacement(V0,af,Rg,Pv,bx,on,hn,nr,Yt,hr,bb,ho,fe,wc,Ic);if(zv&&(Mm=zv.placedGlyphBoxes,Mm&&Mm.box&&Mm.box.length)){_s=!0,ml=zv.shift;break}}return Mm},rm=function(){return Gd(Ap,qo.iconBox,t.WritingMode.horizontal)},qm=function(){var af=qo.verticalTextBox,xd=Vl&&Vl.box&&Vl.box.length;return fe.allowVerticalPlacement&&!xd&&ho.numVerticalGlyphVertices>0&&af?Gd(af,qo.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}};j0(rm,qm),Vl&&(_s=Vl.box,Ul=Vl.offscreen);var Ep=Mp(Vl&&Vl.box);if(!_s&&xt.prevPlacement){var Cp=xt.prevPlacement.variableOffsets[ho.crossTileID];Cp&&(xt.variableOffsets[ho.crossTileID]=Cp,xt.markUsedJustification(fe,Cp.anchor,ho,Ep))}}else{var ip=function(af,xd){var wc=xt.collisionIndex.placeCollisionBox(af,$e,nr,Yt,hr.predicate);return wc&&wc.box&&wc.box.length&&(xt.markUsedOrientation(fe,xd,ho),xt.placedOrientations[ho.crossTileID]=xd),wc},Zm=function(){return ip(Ap,t.WritingMode.horizontal)},Og=function(){var af=qo.verticalTextBox;return fe.allowVerticalPlacement&&ho.numVerticalGlyphVertices>0&&af?ip(af,t.WritingMode.vertical):{box:null,offscreen:null}};j0(Zm,Og),Mp(Vl&&Vl.box&&Vl.box.length)}}if(Rs=Vl,_s=Rs&&Rs.box&&Rs.box.length>0,Ul=Rs&&Rs.offscreen,ho.useRuntimeCollisionCircles){var $m=fe.text.placedSymbolArray.get(ho.centerJustifiedTextSymbolIndex),vd=t.evaluateSizeForFeature(fe.textSizeData,lr,$m),Am=ye.get("text-padding"),Dg=ho.collisionCircleDiameter;Au=xt.collisionIndex.placeCollisionCircles($e,$m,fe.lineVertexArray,fe.glyphOffsetArray,vd,Yt,ce,Se,et,hn,hr.predicate,Dg,Am),_s=$e||Au.circles.length>0&&!Au.collisionDetected,Ul=Ul&&Au.offscreen}if(qo.iconFeatureIndex&&(k0=qo.iconFeatureIndex),qo.iconBox){var yd=function(af){var xd=fi&&ml?Xl(af,ml.x,ml.y,on,hn,xt.transform.angle):af;return xt.collisionIndex.placeCollisionBox(xd,Cr,nr,Yt,hr.predicate)};bc&&bc.box&&bc.box.length&&qo.verticalIconBox?(nf=yd(qo.verticalIconBox),Ol=nf.box.length>0):(nf=yd(qo.iconBox),Ol=nf.box.length>0),Ul=Ul&&nf.offscreen}var Gm=Ve||ho.numHorizontalGlyphVertices===0&&ho.numVerticalGlyphVertices===0,Cv=Xe||ho.numIconVertices===0;if(!Gm&&!Cv?Ol=_s=Ol&&_s:Cv?Gm||(Ol=Ol&&_s):_s=Ol&&_s,_s&&Rs&&Rs.box&&(bc&&bc.box&&Hp?xt.collisionIndex.insertCollisionBox(Rs.box,ye.get("text-ignore-placement"),fe.bucketInstanceId,Hp,hr.ID):xt.collisionIndex.insertCollisionBox(Rs.box,ye.get("text-ignore-placement"),fe.bucketInstanceId,Of,hr.ID)),Ol&&nf&&xt.collisionIndex.insertCollisionBox(nf.box,ye.get("icon-ignore-placement"),fe.bucketInstanceId,k0,hr.ID),Au&&(_s&&xt.collisionIndex.insertCollisionCircles(Au.circles,ye.get("text-ignore-placement"),fe.bucketInstanceId,Of,hr.ID),et)){var Lv=fe.bucketInstanceId,U0=xt.collisionCircleArrays[Lv];U0===void 0&&(U0=xt.collisionCircleArrays[Lv]=new Po);for(var Fg=0;Fg=0;--Ti){var Mi=Ki[Ti];di(fe.symbolInstances.get(Mi),fe.collisionArrays[Mi])}else for(var oa=Z.symbolInstanceStart;oa=0&&(fe>=0&&Se!==fe?Z.text.placedSymbolArray.get(Se).crossTileID=0:Z.text.placedSymbolArray.get(Se).crossTileID=et.crossTileID)}},Us.prototype.markUsedOrientation=function(Z,ot,et){for(var xt=ot===t.WritingMode.horizontal||ot===t.WritingMode.horizontalOnly?ot:0,Ut=ot===t.WritingMode.vertical?ot:0,fe=[et.leftJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.rightJustifiedTextSymbolIndex],ye=0,Yt=fe;ye0||hn>0,di=Cr.numIconVertices>0,Ki=xt.placedOrientations[Cr.crossTileID],Ti=Ki===t.WritingMode.vertical,Mi=Ki===t.WritingMode.horizontal||Ki===t.WritingMode.horizontalOnly;if(Ai){var oa=Ru(Gn.text),Qa=Ti?lo:oa;lr(Z.text,on,Qa);var ho=Mi?lo:oa;lr(Z.text,hn,ho);var qo=Gn.text.isHidden();[Cr.rightJustifiedTextSymbolIndex,Cr.centerJustifiedTextSymbolIndex,Cr.leftJustifiedTextSymbolIndex].forEach(function(k0){k0>=0&&(Z.text.placedSymbolArray.get(k0).hidden=qo||Ti?1:0)}),Cr.verticalPlacedTextSymbolIndex>=0&&(Z.text.placedSymbolArray.get(Cr.verticalPlacedTextSymbolIndex).hidden=qo||Mi?1:0);var _s=xt.variableOffsets[Cr.crossTileID];_s&&xt.markUsedJustification(Z,_s.anchor,Cr,Ki);var Ol=xt.placedOrientations[Cr.crossTileID];Ol&&(xt.markUsedJustification(Z,"left",Cr,Ol),xt.markUsedOrientation(Z,Ol,Cr))}if(di){var Ul=Ru(Gn.icon),ml=!(Ye&&Cr.verticalPlacedIconSymbolIndex&&Ti);if(Cr.placedIconSymbolIndex>=0){var Vl=ml?Ul:lo;lr(Z.icon,Cr.numIconVertices,Vl),Z.icon.placedSymbolArray.get(Cr.placedIconSymbolIndex).hidden=Gn.icon.isHidden()}if(Cr.verticalPlacedIconSymbolIndex>=0){var bc=ml?lo:Ul;lr(Z.icon,Cr.numVerticalIconVertices,bc),Z.icon.placedSymbolArray.get(Cr.verticalPlacedIconSymbolIndex).hidden=Gn.icon.isHidden()}}if(Z.hasIconCollisionBoxData()||Z.hasTextCollisionBoxData()){var Rs=Z.collisionArrays[$e];if(Rs){var Au=new t.Point(0,0);if(Rs.textBox||Rs.verticalTextBox){var nf=!0;if(ce){var Of=xt.variableOffsets[fi];Of?(Au=Hl(Of.anchor,Of.width,Of.height,Of.textOffset,Of.textBoxScale),Se&&Au._rotate(nr?xt.transform.angle:-xt.transform.angle)):nf=!1}Rs.textBox&&Ca(Z.textCollisionBox.collisionVertexArray,Gn.text.placed,!nf||Ti,Au.x,Au.y),Rs.verticalTextBox&&Ca(Z.textCollisionBox.collisionVertexArray,Gn.text.placed,!nf||Mi,Au.x,Au.y)}var Hp=!!(!Mi&&Rs.verticalIconBox);Rs.iconBox&&Ca(Z.iconCollisionBox.collisionVertexArray,Gn.icon.placed,Hp,Ye?Au.x:0,Ye?Au.y:0),Rs.verticalIconBox&&Ca(Z.iconCollisionBox.collisionVertexArray,Gn.icon.placed,!Hp,Ye?Au.x:0,Ye?Au.y:0)}}},Ve=0;VeZ},Us.prototype.setStale=function(){this.stale=!0};function Ca(Z,ot,et,xt,Ut){Z.emplaceBack(ot?1:0,et?1:0,xt||0,Ut||0),Z.emplaceBack(ot?1:0,et?1:0,xt||0,Ut||0),Z.emplaceBack(ot?1:0,et?1:0,xt||0,Ut||0),Z.emplaceBack(ot?1:0,et?1:0,xt||0,Ut||0)}var fo=Math.pow(2,25),qs=Math.pow(2,24),Jl=Math.pow(2,17),Jo=Math.pow(2,16),$l=Math.pow(2,9),ol=Math.pow(2,8),Pl=Math.pow(2,1);function Ru(Z){if(Z.opacity===0&&!Z.placed)return 0;if(Z.opacity===1&&Z.placed)return 4294967295;var ot=Z.placed?1:0,et=Math.floor(Z.opacity*127);return et*fo+ot*qs+et*Jl+ot*Jo+et*$l+ot*ol+et*Pl+ot}var lo=0,As=function(Z){this._sortAcrossTiles=Z.layout.get("symbol-z-order")!=="viewport-y"&&Z.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};As.prototype.continuePlacement=function(Z,ot,et,xt,Ut){for(var fe=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var ye=Z[this._currentPlacementIndex],Yt=ot[ye],ce=this.placement.collisionIndex.transform.zoom;if(Yt.type==="symbol"&&(!Yt.minzoom||Yt.minzoom<=ce)&&(!Yt.maxzoom||Yt.maxzoom>ce)){this._inProgressLayer||(this._inProgressLayer=new As(Yt));var Se=this._inProgressLayer.continuePlacement(et[Yt.source],this.placement,this._showCollisionBoxes,Yt,fe);if(Se)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},zs.prototype.commit=function(Z){return this.placement.commit(Z),this.placement};var au=512/t.EXTENT/2,fl=function(Z,ot,et){this.tileID=Z,this.indexedSymbolInstances={},this.bucketInstanceId=et;for(var xt=0;xtZ.overscaledZ)for(var ce in Yt){var Se=Yt[ce];Se.tileID.isChildOf(Z)&&Se.findMatches(ot.symbolInstances,Z,fe)}else{var nr=Z.scaledTo(Number(ye)),Ye=Yt[nr.key];Ye&&Ye.findMatches(ot.symbolInstances,Z,fe)}}for(var tr=0;tr0)throw new Error("Unimplemented: "+fe.map(function(ye){return ye.command}).join(", ")+".");return Ut.forEach(function(ye){ye.command!=="setTransition"&&xt[ye.command].apply(xt,ye.args)}),this.stylesheet=et,!0},ot.prototype.addImage=function(et,xt){if(this.getImage(et))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(et,xt),this._afterImageUpdated(et)},ot.prototype.updateImage=function(et,xt){this.imageManager.updateImage(et,xt)},ot.prototype.getImage=function(et){return this.imageManager.getImage(et)},ot.prototype.removeImage=function(et){if(!this.getImage(et))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(et),this._afterImageUpdated(et)},ot.prototype._afterImageUpdated=function(et){this._availableImages=this.imageManager.listImages(),this._changedImages[et]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},ot.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},ot.prototype.addSource=function(et,xt,Ut){var fe=this;if(Ut===void 0&&(Ut={}),this._checkLoaded(),this.sourceCaches[et]!==void 0)throw new Error("There is already a source with this ID");if(!xt.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(xt).join(", ")+".");var ye=["vector","raster","geojson","video","image"],Yt=ye.indexOf(xt.type)>=0;if(!(Yt&&this._validate(t.validateStyle.source,"sources."+et,xt,null,Ut))){this.map&&this.map._collectResourceTiming&&(xt.collectResourceTiming=!0);var ce=this.sourceCaches[et]=new bn(et,xt,this.dispatcher);ce.style=this,ce.setEventedParent(this,function(){return{isSourceLoaded:fe.loaded(),source:ce.serialize(),sourceId:et}}),ce.onAdd(this.map),this._changed=!0}},ot.prototype.removeSource=function(et){if(this._checkLoaded(),this.sourceCaches[et]===void 0)throw new Error("There is no source with this ID");for(var xt in this._layers)if(this._layers[xt].source===et)return this.fire(new t.ErrorEvent(new Error('Source "'+et+'" cannot be removed while layer "'+xt+'" is using it.')));var Ut=this.sourceCaches[et];delete this.sourceCaches[et],delete this._updatedSources[et],Ut.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:et})),Ut.setEventedParent(null),Ut.clearTiles(),Ut.onRemove&&Ut.onRemove(this.map),this._changed=!0},ot.prototype.setGeoJSONSourceData=function(et,xt){this._checkLoaded();var Ut=this.sourceCaches[et].getSource();Ut.setData(xt),this._changed=!0},ot.prototype.getSource=function(et){return this.sourceCaches[et]&&this.sourceCaches[et].getSource()},ot.prototype.addLayer=function(et,xt,Ut){Ut===void 0&&(Ut={}),this._checkLoaded();var fe=et.id;if(this.getLayer(fe)){this.fire(new t.ErrorEvent(new Error('Layer with id "'+fe+'" already exists on this map')));return}var ye;if(et.type==="custom"){if(bl(this,t.validateCustomStyleLayer(et)))return;ye=t.createStyleLayer(et)}else{if(typeof et.source=="object"&&(this.addSource(fe,et.source),et=t.clone$1(et),et=t.extend(et,{source:fe})),this._validate(t.validateStyle.layer,"layers."+fe,et,{arrayIndex:-1},Ut))return;ye=t.createStyleLayer(et),this._validateLayer(ye),ye.setEventedParent(this,{layer:{id:fe}}),this._serializedLayers[ye.id]=ye.serialize()}var Yt=xt?this._order.indexOf(xt):this._order.length;if(xt&&Yt===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}if(this._order.splice(Yt,0,fe),this._layerOrderChanged=!0,this._layers[fe]=ye,this._removedLayers[fe]&&ye.source&&ye.type!=="custom"){var ce=this._removedLayers[fe];delete this._removedLayers[fe],ce.type!==ye.type?this._updatedSources[ye.source]="clear":(this._updatedSources[ye.source]="reload",this.sourceCaches[ye.source].pause())}this._updateLayer(ye),ye.onAdd&&ye.onAdd(this.map)},ot.prototype.moveLayer=function(et,xt){this._checkLoaded(),this._changed=!0;var Ut=this._layers[et];if(!Ut){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be moved.")));return}if(et!==xt){var fe=this._order.indexOf(et);this._order.splice(fe,1);var ye=xt?this._order.indexOf(xt):this._order.length;if(xt&&ye===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}this._order.splice(ye,0,et),this._layerOrderChanged=!0}},ot.prototype.removeLayer=function(et){this._checkLoaded();var xt=this._layers[et];if(!xt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be removed.")));return}xt.setEventedParent(null);var Ut=this._order.indexOf(et);this._order.splice(Ut,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[et]=xt,delete this._layers[et],delete this._serializedLayers[et],delete this._updatedLayers[et],delete this._updatedPaintProps[et],xt.onRemove&&xt.onRemove(this.map)},ot.prototype.getLayer=function(et){return this._layers[et]},ot.prototype.hasLayer=function(et){return et in this._layers},ot.prototype.setLayerZoomRange=function(et,xt,Ut){this._checkLoaded();var fe=this.getLayer(et);if(!fe){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot have zoom extent.")));return}fe.minzoom===xt&&fe.maxzoom===Ut||(xt!=null&&(fe.minzoom=xt),Ut!=null&&(fe.maxzoom=Ut),this._updateLayer(fe))},ot.prototype.setFilter=function(et,xt,Ut){Ut===void 0&&(Ut={}),this._checkLoaded();var fe=this.getLayer(et);if(!fe){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be filtered.")));return}if(!t.deepEqual(fe.filter,xt)){if(xt==null){fe.filter=void 0,this._updateLayer(fe);return}this._validate(t.validateStyle.filter,"layers."+fe.id+".filter",xt,null,Ut)||(fe.filter=t.clone$1(xt),this._updateLayer(fe))}},ot.prototype.getFilter=function(et){return t.clone$1(this.getLayer(et).filter)},ot.prototype.setLayoutProperty=function(et,xt,Ut,fe){fe===void 0&&(fe={}),this._checkLoaded();var ye=this.getLayer(et);if(!ye){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(ye.getLayoutProperty(xt),Ut)||(ye.setLayoutProperty(xt,Ut,fe),this._updateLayer(ye))},ot.prototype.getLayoutProperty=function(et,xt){var Ut=this.getLayer(et);if(!Ut){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style.")));return}return Ut.getLayoutProperty(xt)},ot.prototype.setPaintProperty=function(et,xt,Ut,fe){fe===void 0&&(fe={}),this._checkLoaded();var ye=this.getLayer(et);if(!ye){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}if(!t.deepEqual(ye.getPaintProperty(xt),Ut)){var Yt=ye.setPaintProperty(xt,Ut,fe);Yt&&this._updateLayer(ye),this._changed=!0,this._updatedPaintProps[et]=!0}},ot.prototype.getPaintProperty=function(et,xt){return this.getLayer(et).getPaintProperty(xt)},ot.prototype.setFeatureState=function(et,xt){this._checkLoaded();var Ut=et.source,fe=et.sourceLayer,ye=this.sourceCaches[Ut];if(ye===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Ut+"' does not exist in the map's style.")));return}var Yt=ye.getSource().type;if(Yt==="geojson"&&fe){this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Yt==="vector"&&!fe){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),ye.setFeatureState(fe,et.id,xt)},ot.prototype.removeFeatureState=function(et,xt){this._checkLoaded();var Ut=et.source,fe=this.sourceCaches[Ut];if(fe===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Ut+"' does not exist in the map's style.")));return}var ye=fe.getSource().type,Yt=ye==="vector"?et.sourceLayer:void 0;if(ye==="vector"&&!Yt){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(xt&&typeof et.id!="string"&&typeof et.id!="number"){this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}fe.removeFeatureState(Yt,et.id,xt)},ot.prototype.getFeatureState=function(et){this._checkLoaded();var xt=et.source,Ut=et.sourceLayer,fe=this.sourceCaches[xt];if(fe===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+xt+"' does not exist in the map's style.")));return}var ye=fe.getSource().type;if(ye==="vector"&&!Ut){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),fe.getFeatureState(Ut,et.id)},ot.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},ot.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(et){return et.serialize()}),layers:this._serializeLayers(this._order)},function(et){return et!==void 0})},ot.prototype._updateLayer=function(et){this._updatedLayers[et.id]=!0,et.source&&!this._updatedSources[et.source]&&this.sourceCaches[et.source].getSource().type!=="raster"&&(this._updatedSources[et.source]="reload",this.sourceCaches[et.source].pause()),this._changed=!0},ot.prototype._flattenAndSortRenderedFeatures=function(et){for(var xt=this,Ut=function(Mi){return xt._layers[Mi].type==="fill-extrusion"},fe={},ye=[],Yt=this._order.length-1;Yt>=0;Yt--){var ce=this._order[Yt];if(Ut(ce)){fe[ce]=Yt;for(var Se=0,nr=et;Se=0;$e--){var Cr=this._order[$e];if(Ut(Cr))for(var on=ye.length-1;on>=0;on--){var hn=ye[on].feature;if(fe[hn.layer.id]<$e)break;Xe.push(hn),ye.pop()}else for(var fi=0,si=et;fi .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}}),P3=Dt((Q,Z)=>{var c=kn(),g=hi().defaultLine,I=jh().attributes,S=da(),t=ef().textposition,e=Yc().overrideAll,r=mu().templatedArray,a=Ev(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=Z.exports=e({_arrayAttrRegexps:[c.counterRegex("mapbox",".layers",!0)],domain:I({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:a.styleValuesMapbox.concat(a.styleValuesNonMapbox),dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:g}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),_T=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=I0(),t=vx(),e=ef(),r=P3(),a=Ho(),n=kc(),o=Ia().extendFlat,i=Yc().overrideAll,l=P3(),f=t.line,x=t.marker;Z.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},l.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:I()},"calc","nested")}),bE=Dt((Q,Z)=>{var c=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];Z.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),wW=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=x0(),e=O0(),r=_T(),a=bE().isSupportedFont;Z.exports=function(o,i,l,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){I(o,i,l,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,l,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||l),P=y("cluster.size"),M=y("cluster.opacity"),C=u!==!1||b!==!1||_!==!1||P!==!1||M!==!1,A=x("cluster.enabled",C);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,l,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,l){var f=l("lon")||[],x=l("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),wE=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),kE=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(I)?c.mean(I):I,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var l;return o[0]&&o[1]?l=o.join("-"):o[0]?l=o[0]:o[1]?l=o[1]:l="center",{anchor:l,offset:i}}}),kW=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Ca().BADNUM,S=H1(),t=Xc(),e=Vs(),r=bg(),a=Tc(),n=bE().isSupportedFont,o=kE(),i=Fp().appendArrayPointValue,l=ec().NEWLINES,f=ec().BR_TAG_ALL;Z.exports=function(M,C){var A=C[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),R=a.hasText(A),O=w&&A.marker.symbol==="circle",j=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var J;if((p||k)&&(J=S.calcTraceToLineCoords(C)),p&&(H.geojson=S.makePolygon(J),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(J),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(C);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":P(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(j||R)&&(W.geojson=v(C,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),j&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),R)){var yt=(A.marker||{}).size,mt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":mt.anchor,"text-offset":mt.offset,"text-font":P(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var C=M[0].trace,A=C.marker,h=C.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),R;function O(mt){return C.opacity*mt}function j(mt){return mt/2}var V;p&&(t.hasColorscale(C,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(C));var F;w&&(F=function(mt){var st=c(mt)?+g.constrain(mt,0,1):0;return O(st)});var U=[];for(R=0;R850?R+=" Black":p>750?R+=" Extra Bold":p>650?R+=" Bold":p>550?R+=" Semi Bold":p>450?R+=" Medium":p>350?R+=" Regular":p>250?R+=" Light":p>150?R+=" Extra Light":R+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",p>750?R+=" Extrabold":p>650?R+=" Bold":p>550?R+=" Semibold":p>350?R+=" Regular":R+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",k[3]==="CJK"&&(R+=" CJK"),R+=p>500?" Bold":" Regular")),w&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),n(R)||(R=A);var O=R.split(", ");return O}}),TW=Dt((Q,Z)=>{var c=kn(),g=kW(),I=Ev().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermapbox",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:I+a+"-fill",line:I+a+"-line",circle:I+a+"-circle",symbol:I+a+"-symbol",cluster:I+a+"-cluster",clusterCount:I+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],l,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function P(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},Z.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,l=new t(r,n.uid,o,i),f=g(r.gd,a),x=l.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(l.addSource("circle",f.circle,n.cluster),y=0;y{var c=tf(),g=kn(),I=Fu(),S=g.fillText,t=Ca().BADNUM,e=Ev().traceLayerPrefix;function r(n,o,i){var l=n.cd,f=l[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var P=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=P*360,C=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),J=q.x-x.c2p([C,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(J*J+lt*lt)-yt,1-3/yt)}if(c.getClosest(l,A,n),n.index!==!1){var h=l[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),R=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=R-O,n.y1=R+O;var j={};j[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,j);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=I(f,h),n.extraText=a(f,h,l[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var l=o.hi||n.hoverinfo,f=l.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}Z.exports={hoverPoints:r,getExtraText:a}}),AW=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),MW=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=Ca().BADNUM;Z.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():(c=c||self,c.mapboxgl=g())})(Q,function(){var c,g,I;function S(t,e){if(!c)c=e;else if(!g)g=e;else{var r="var sharedChunk = {}; ("+c+")(sharedChunk); ("+g+")(sharedChunk);",a={};c(a),I=e(a),typeof window<"u"&&(I.workerUrl=window.URL.createObjectURL(new Blob([r],{type:"text/javascript"})))}}return S(["exports"],function(t){function e(m,N){return N={exports:{}},m(N,N.exports),N.exports}var r="1.13.4",a=n;function n(m,N,X,wt){this.cx=3*m,this.bx=3*(X-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*N,this.by=3*(wt-N)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=wt,this.p2x=X,this.p2y=wt}n.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},n.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},n.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},n.prototype.solveCurveX=function(m,N){typeof N>"u"&&(N=1e-6);var X,wt,Ft,Zt,ie;for(Ft=m,ie=0;ie<8;ie++){if(Zt=this.sampleCurveX(Ft)-m,Math.abs(Zt)wt)return wt;for(;XZt?X=Ft:wt=Ft,Ft=(wt-X)*.5+X}return Ft},n.prototype.solve=function(m,N){return this.sampleCurveY(this.solveCurveX(m,N))};var o=i;function i(m,N){this.x=m,this.y=N}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,N){return this.clone()._rotateAround(m,N)},matMult:function(m){return this.clone()._matMult(m)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var N=m.x-this.x,X=m.y-this.y;return N*N+X*X},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,N){return Math.atan2(this.x*N-this.y*m,this.x*m+this.y*N)},_matMult:function(m){var N=m[0]*this.x+m[1]*this.y,X=m[2]*this.x+m[3]*this.y;return this.x=N,this.y=X,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var N=Math.cos(m),X=Math.sin(m),wt=N*this.x-X*this.y,Ft=X*this.x+N*this.y;return this.x=wt,this.y=Ft,this},_rotateAround:function(m,N){var X=Math.cos(m),wt=Math.sin(m),Ft=N.x+X*(this.x-N.x)-wt*(this.y-N.y),Zt=N.y+wt*(this.x-N.x)+X*(this.y-N.y);return this.x=Ft,this.y=Zt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(m){return m instanceof i?m:Array.isArray(m)?new i(m[0],m[1]):m};var l=typeof self<"u"?self:{};function f(m,N){if(Array.isArray(m)){if(!Array.isArray(N)||m.length!==N.length)return!1;for(var X=0;X=1)return 1;var N=m*m,X=N*m;return 4*(m<.5?X:3*(m-N)+X-.75)}function v(m,N,X,wt){var Ft=new a(m,N,X,wt);return function(Zt){return Ft.solve(Zt)}}var T=v(.25,.1,.25,1);function u(m,N,X){return Math.min(X,Math.max(N,m))}function b(m,N,X){var wt=X-N,Ft=((m-N)%wt+wt)%wt+N;return Ft===N?X:Ft}function _(m,N,X){if(!m.length)return X(null,[]);var wt=m.length,Ft=new Array(m.length),Zt=null;m.forEach(function(ie,Re){N(ie,function(Je,yr){Je&&(Zt=Je),Ft[Re]=yr,--wt===0&&X(Zt,Ft)})})}function P(m){var N=[];for(var X in m)N.push(m[X]);return N}function M(m,N){var X=[];for(var wt in m)wt in N||X.push(wt);return X}function C(m){for(var N=[],X=arguments.length-1;X-- >0;)N[X]=arguments[X+1];for(var wt=0,Ft=N;wt>N/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function w(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function R(m){return m?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(m):!1}function O(m,N){m.forEach(function(X){N[X]&&(N[X]=N[X].bind(N))})}function j(m,N){return m.indexOf(N,m.length-N.length)!==-1}function V(m,N,X){var wt={};for(var Ft in m)wt[Ft]=N.call(X||this,m[Ft],Ft,m);return wt}function H(m,N,X){var wt={};for(var Ft in m)N.call(X||this,m[Ft],Ft,m)&&(wt[Ft]=m[Ft]);return wt}function F(m){return Array.isArray(m)?m.map(F):typeof m=="object"&&m?V(m,F):m}function U(m,N){for(var X=0;X=0)return!0;return!1}var W={};function q(m){W[m]||(typeof console<"u"&&console.warn(m),W[m]=!0)}function J(m,N,X){return(X.y-m.y)*(N.x-m.x)>(N.y-m.y)*(X.x-m.x)}function lt(m){for(var N=0,X=0,wt=m.length,Ft=wt-1,Zt=void 0,ie=void 0;X@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,X={};if(m.replace(N,function(Ft,Zt,ie,Re){var Je=ie||Re;return X[Zt]=Je?Je.toLowerCase():!0,""}),X["max-age"]){var wt=parseInt(X["max-age"],10);isNaN(wt)?delete X["max-age"]:X["max-age"]=wt}return X}var tt=null;function dt(m){if(tt==null){var N=m.navigator?m.navigator.userAgent:null;tt=!!m.safari||!!(N&&(/\b(iPad|iPhone|iPod)\b/.test(N)||N.match("Safari")&&!N.match("Chrome")))}return tt}function rt(m){try{var N=l[m];return N.setItem("_mapbox_test_",1),N.removeItem("_mapbox_test_"),!0}catch{return!1}}function at(m){return l.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(N,X){return String.fromCharCode(+("0x"+X))}))}function vt(m){return decodeURIComponent(l.atob(m).split("").map(function(N){return"%"+("00"+N.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var it=l.performance&&l.performance.now?l.performance.now.bind(l.performance):Date.now.bind(Date),Y=l.requestAnimationFrame||l.mozRequestAnimationFrame||l.webkitRequestAnimationFrame||l.msRequestAnimationFrame,ft=l.cancelAnimationFrame||l.mozCancelAnimationFrame||l.webkitCancelAnimationFrame||l.msCancelAnimationFrame,ut,kt,It={now:it,frame:function(m){var N=Y(m);return{cancel:function(){return ft(N)}}},getImageData:function(m,N){N===void 0&&(N=0);var X=l.document.createElement("canvas"),wt=X.getContext("2d");if(!wt)throw new Error("failed to create canvas 2d context");return X.width=m.width,X.height=m.height,wt.drawImage(m,0,0,m.width,m.height),wt.getImageData(-N,-N,m.width+2*N,m.height+2*N)},resolveURL:function(m){return ut||(ut=l.document.createElement("a")),ut.href=m,ut.href},hardwareConcurrency:l.navigator&&l.navigator.hardwareConcurrency||4,get devicePixelRatio(){return l.devicePixelRatio},get prefersReducedMotion(){return l.matchMedia?(kt==null&&(kt=l.matchMedia("(prefers-reduced-motion: reduce)")),kt.matches):!1}},Pt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},qt={supported:!1,testSupport:pe},Wt,Jt=!1,ge,fe=!1;l.document&&(ge=l.document.createElement("img"),ge.onload=function(){Wt&&se(Wt),Wt=null,fe=!0},ge.onerror=function(){Jt=!0,Wt=null},ge.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function pe(m){Jt||!ge||(fe?se(m):Wt=m)}function se(m){var N=m.createTexture();m.bindTexture(m.TEXTURE_2D,N);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,ge),m.isContextLost())return;qt.supported=!0}catch{}m.deleteTexture(N),Jt=!0}var Tt="01";function Lt(){for(var m="1",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",X="",wt=0;wt<10;wt++)X+=N[Math.floor(Math.random()*62)];var Ft=720*60*1e3,Zt=[m,Tt,X].join(""),ie=Date.now()+Ft;return{token:Zt,tokenExpiresAt:ie}}var Mt=function(m,N){this._transformRequestFn=m,this._customAccessToken=N,this._createSkuToken()};Mt.prototype._createSkuToken=function(){var m=Lt();this._skuToken=m.token,this._skuTokenExpiresAt=m.tokenExpiresAt},Mt.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Mt.prototype.transformRequest=function(m,N){return this._transformRequestFn?this._transformRequestFn(m,N)||{url:m}:{url:m}},Mt.prototype.normalizeStyleURL=function(m,N){if(!ee(m))return m;var X=cr(m);return X.path="/styles/v1"+X.path,this._makeAPIURL(X,this._customAccessToken||N)},Mt.prototype.normalizeGlyphsURL=function(m,N){if(!ee(m))return m;var X=cr(m);return X.path="/fonts/v1"+X.path,this._makeAPIURL(X,this._customAccessToken||N)},Mt.prototype.normalizeSourceURL=function(m,N){if(!ee(m))return m;var X=cr(m);return X.path="/v4/"+X.authority+".json",X.params.push("secure"),this._makeAPIURL(X,this._customAccessToken||N)},Mt.prototype.normalizeSpriteURL=function(m,N,X,wt){var Ft=cr(m);return ee(m)?(Ft.path="/styles/v1"+Ft.path+"/sprite"+N+X,this._makeAPIURL(Ft,this._customAccessToken||wt)):(Ft.path+=""+N+X,ur(Ft))},Mt.prototype.normalizeTileURL=function(m,N){if(this._isSkuTokenExpired()&&this._createSkuToken(),m&&!ee(m))return m;var X=cr(m),wt=/(\.(png|jpg)\d*)(?=$)/,Ft=/^.+\/v4\//,Zt=It.devicePixelRatio>=2||N===512?"@2x":"",ie=qt.supported?".webp":"$1";X.path=X.path.replace(wt,""+Zt+ie),X.path=X.path.replace(Ft,"/"),X.path="/v4"+X.path;var Re=this._customAccessToken||He(X.params)||Pt.ACCESS_TOKEN;return Pt.REQUIRE_ACCESS_TOKEN&&Re&&this._skuToken&&X.params.push("sku="+this._skuToken),this._makeAPIURL(X,Re)},Mt.prototype.canonicalizeTileURL=function(m,N){var X="/v4/",wt=/\.[\w]+$/,Ft=cr(m);if(!Ft.path.match(/(^\/v4\/)/)||!Ft.path.match(wt))return m;var Zt="mapbox://tiles/";Zt+=Ft.path.replace(X,"");var ie=Ft.params;return N&&(ie=ie.filter(function(Re){return!Re.match(/^access_token=/)})),ie.length&&(Zt+="?"+ie.join("&")),Zt},Mt.prototype.canonicalizeTileset=function(m,N){for(var X=N?ee(N):!1,wt=[],Ft=0,Zt=m.tiles||[];Ft=0&&m.params.splice(Ft,1)}if(wt.path!=="/"&&(m.path=""+wt.path+m.path),!Pt.REQUIRE_ACCESS_TOKEN)return ur(m);if(N=N||Pt.ACCESS_TOKEN,!N)throw new Error("An API access token is required to use Mapbox GL. "+X);if(N[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+X);return m.params=m.params.filter(function(Zt){return Zt.indexOf("access_token")===-1}),m.params.push("access_token="+N),ur(m)};function ee(m){return m.indexOf("mapbox:")===0}var ve=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function oe(m){return ve.test(m)}function Te(m){return m.indexOf("sku=")>0&&oe(m)}function He(m){for(var N=0,X=m;N=1&&l.localStorage.setItem(N,JSON.stringify(this.eventData))}catch{q("Unable to write to LocalStorage")}},br.prototype.processRequests=function(m){},br.prototype.postEvent=function(m,N,X,wt){var Ft=this;if(Pt.EVENTS_URL){var Zt=cr(Pt.EVENTS_URL);Zt.params.push("access_token="+(wt||Pt.ACCESS_TOKEN||""));var ie={event:this.type,created:new Date(m).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:Tt,userId:this.anonId},Re=N?C(ie,N):ie,Je={url:ur(Zt),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Re])};this.pendingRequest=Mn(Je,function(yr){Ft.pendingRequest=null,X(yr),Ft.saveEventData(),Ft.processRequests(wt)})}},br.prototype.queueRequest=function(m,N){this.queue.push(m),this.processRequests(N)};var Xr=function(m){function N(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.postMapLoadEvent=function(X,wt,Ft,Zt){this.skuToken=Ft,(Pt.EVENTS_URL&&Zt||Pt.ACCESS_TOKEN&&Array.isArray(X)&&X.some(function(ie){return ee(ie)||oe(ie)}))&&this.queueRequest({id:wt,timestamp:Date.now()},Zt)},N.prototype.processRequests=function(X){var wt=this;if(!(this.pendingRequest||this.queue.length===0)){var Ft=this.queue.shift(),Zt=Ft.id,ie=Ft.timestamp;Zt&&this.success[Zt]||(this.anonId||this.fetchEventData(),R(this.anonId)||(this.anonId=k()),this.postEvent(ie,{skuToken:this.skuToken},function(Re){Re||Zt&&(wt.success[Zt]=!0)},X))}},N}(br),nn=function(m){function N(X){m.call(this,"appUserTurnstile"),this._customAccessToken=X}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.postTurnstileEvent=function(X,wt){Pt.EVENTS_URL&&Pt.ACCESS_TOKEN&&Array.isArray(X)&&X.some(function(Ft){return ee(Ft)||oe(Ft)})&&this.queueRequest(Date.now(),wt)},N.prototype.processRequests=function(X){var wt=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ft=Wr(Pt.ACCESS_TOKEN),Zt=Ft?Ft.u:Pt.ACCESS_TOKEN,ie=Zt!==this.eventData.tokenU;R(this.anonId)||(this.anonId=k(),ie=!0);var Re=this.queue.shift();if(this.eventData.lastSuccess){var Je=new Date(this.eventData.lastSuccess),yr=new Date(Re),Cr=(Re-this.eventData.lastSuccess)/(1440*60*1e3);ie=ie||Cr>=1||Cr<-1||Je.getDate()!==yr.getDate()}else ie=!0;if(!ie)return this.processRequests();this.postEvent(Re,{"enabled.telemetry":!1},function(Kr){Kr||(wt.eventData.lastSuccess=Re,wt.eventData.tokenU=Zt)},X)}},N}(br),Le=new nn,Gt=Le.postTurnstileEvent.bind(Le),ne=new Xr,Ct=ne.postMapLoadEvent.bind(ne),gt="mapbox-tiles",St=500,Nt=50,re=1e3*60*7,le;function we(){l.caches&&!le&&(le=l.caches.open(gt))}var Ue;function qe(m,N){if(Ue===void 0)try{new Response(new ReadableStream),Ue=!0}catch{Ue=!1}Ue?N(m.body):m.blob().then(N)}function or(m,N,X){if(we(),!!le){var wt={status:N.status,statusText:N.statusText,headers:new l.Headers};N.headers.forEach(function(ie,Re){return wt.headers.set(Re,ie)});var Ft=st(N.headers.get("Cache-Control")||"");if(!Ft["no-store"]){Ft["max-age"]&&wt.headers.set("Expires",new Date(X+Ft["max-age"]*1e3).toUTCString());var Zt=new Date(wt.headers.get("Expires")).getTime()-X;ZtDate.now()&&!X["no-cache"]}var Qr=1/0;function Hn(m){Qr++,Qr>Nt&&(m.getActor().send("enforceCacheSizeLimit",St),Qr=0)}function Wn(m){we(),le&&le.then(function(N){N.keys().then(function(X){for(var wt=0;wt=200&&X.status<300||X.status===0)&&X.response!==null){var Ft=X.response;if(m.type==="json")try{Ft=JSON.parse(X.response)}catch(Zt){return N(Zt)}N(null,Ft,X.getResponseHeader("Cache-Control"),X.getResponseHeader("Expires"))}else N(new Zi(X.statusText,X.status,m.url))},X.send(m.body),{cancel:function(){return X.abort()}}}var tn=function(m,N){if(!nr(m.url)){if(l.fetch&&l.Request&&l.AbortController&&l.Request.prototype.hasOwnProperty("signal"))return fr(m,N);if(mt()&&self.worker&&self.worker.actor){var X=!0;return self.worker.actor.send("getResource",m,N,void 0,X)}}return _r(m,N)},Cn=function(m,N){return tn(C(m,{type:"json"}),N)},Tn=function(m,N){return tn(C(m,{type:"arrayBuffer"}),N)},Mn=function(m,N){return tn(C(m,{method:"POST"}),N)};function fi(m){var N=l.document.createElement("a");return N.href=m,N.protocol===l.document.location.protocol&&N.host===l.document.location.host}var ki="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Oi(m,N,X,wt){var Ft=new l.Image,Zt=l.URL;Ft.onload=function(){N(null,Ft),Zt.revokeObjectURL(Ft.src),Ft.onload=null,l.requestAnimationFrame(function(){Ft.src=ki})},Ft.onerror=function(){return N(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var ie=new l.Blob([new Uint8Array(m)],{type:"image/png"});Ft.cacheControl=X,Ft.expires=wt,Ft.src=m.byteLength?Zt.createObjectURL(ie):ki}function ji(m,N){var X=new l.Blob([new Uint8Array(m)],{type:"image/png"});l.createImageBitmap(X).then(function(wt){N(null,wt)}).catch(function(wt){N(new Error("Could not load image because of "+wt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Xi,ci,za=function(){Xi=[],ci=0};za();var Wa=function(m,N){if(qt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),ci>=Pt.MAX_PARALLEL_IMAGE_REQUESTS){var X={requestParameters:m,callback:N,cancelled:!1,cancel:function(){this.cancelled=!0}};return Xi.push(X),X}ci++;var wt=!1,Ft=function(){if(!wt)for(wt=!0,ci--;Xi.length&&ci0||this._oneTimeListeners&&this._oneTimeListeners[m]&&this._oneTimeListeners[m].length>0||this._eventedParent&&this._eventedParent.listens(m)},Br.prototype.setEventedParent=function(m,N){return this._eventedParent=m,this._eventedParentData=N,this};var Yr=8,pn={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},on={"*":{type:"source"}},Ce=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],dr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Hr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},_n={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Fn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Qn={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Pn={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},En={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Zn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],La={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Vi={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Qa={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ja={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Do={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},yo={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Fo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Da={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ys={type:"array",value:"*"},os={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},ul={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Zo={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Ks={type:"array",value:"*",minimum:1},ss={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},cl=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Qs={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Nl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},cs={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},Ps={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Lo={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},As={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},kl={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},ql={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Jl={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Us={"*":{type:"string"}},Pa={$version:Yr,$root:pn,sources:on,source:Ce,source_vector:dr,source_raster:Hr,source_raster_dem:_n,source_geojson:Fn,source_video:Qn,source_image:Pn,layer:En,layout:Zn,layout_background:La,layout_fill:Vi,layout_circle:Qa,layout_heatmap:Ja,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Do,layout_symbol:yo,layout_raster:Fo,layout_hillshade:Da,filter:ys,filter_operator:os,geometry_type:ul,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Zo,expression:Ks,light:ss,paint:cl,paint_fill:Qs,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Nl,paint_circle:cs,paint_heatmap:Ps,paint_symbol:Lo,paint_raster:As,paint_hillshade:kl,paint_background:ql,transition:Jl,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:Us},fo=function(m,N,X,wt){this.message=(m?m+": ":"")+X,wt&&(this.identifier=wt),N!=null&&N.__line__&&(this.line=N.__line__)};function qs(m){var N=m.key,X=m.value;return X?[new fo(N,X,"constants have been deprecated as of v8")]:[]}function Ql(m){for(var N=[],X=arguments.length-1;X-- >0;)N[X]=arguments[X+1];for(var wt=0,Ft=N;wt":m.itemType.kind==="value"?"array":"array<"+N+">"}else return m.kind}var ac=[Ru,lo,Ms,Is,ou,bl,hl,tu(ts),Dl];function mh(m,N){if(N.kind==="error")return null;if(m.kind==="array"){if(N.kind==="array"&&(N.N===0&&N.itemType.kind==="value"||!mh(m.itemType,N.itemType))&&(typeof m.N!="number"||m.N===N.N))return null}else{if(m.kind===N.kind)return null;if(m.kind==="value")for(var X=0,wt=ac;X255?255:yr}function Ft(yr){return yr<0?0:yr>1?1:yr}function Zt(yr){return yr[yr.length-1]==="%"?wt(parseFloat(yr)/100*255):wt(parseInt(yr))}function ie(yr){return yr[yr.length-1]==="%"?Ft(parseFloat(yr)/100):Ft(parseFloat(yr))}function Re(yr,Cr,Kr){return Kr<0?Kr+=1:Kr>1&&(Kr-=1),Kr*6<1?yr+(Cr-yr)*Kr*6:Kr*2<1?Cr:Kr*3<2?yr+(Cr-yr)*(2/3-Kr)*6:yr}function Je(yr){var Cr=yr.replace(/ /g,"").toLowerCase();if(Cr in X)return X[Cr].slice();if(Cr[0]==="#"){if(Cr.length===4){var Kr=parseInt(Cr.substr(1),16);return Kr>=0&&Kr<=4095?[(Kr&3840)>>4|(Kr&3840)>>8,Kr&240|(Kr&240)>>4,Kr&15|(Kr&15)<<4,1]:null}else if(Cr.length===7){var Kr=parseInt(Cr.substr(1),16);return Kr>=0&&Kr<=16777215?[(Kr&16711680)>>16,(Kr&65280)>>8,Kr&255,1]:null}return null}var an=Cr.indexOf("("),gn=Cr.indexOf(")");if(an!==-1&&gn+1===Cr.length){var Rn=Cr.substr(0,an),gi=Cr.substr(an+1,gn-(an+1)).split(","),ua=1;switch(Rn){case"rgba":if(gi.length!==4)return null;ua=ie(gi.pop());case"rgb":return gi.length!==3?null:[Zt(gi[0]),Zt(gi[1]),Zt(gi[2]),ua];case"hsla":if(gi.length!==4)return null;ua=ie(gi.pop());case"hsl":if(gi.length!==3)return null;var oa=(parseFloat(gi[0])%360+360)%360/360,wa=ie(gi[1]),Ra=ie(gi[2]),xa=Ra<=.5?Ra*(wa+1):Ra+wa-Ra*wa,Xa=Ra*2-xa;return[wt(Re(Xa,xa,oa+1/3)*255),wt(Re(Xa,xa,oa)*255),wt(Re(Xa,xa,oa-1/3)*255),ua];default:return null}}return null}try{N.parseCSSColor=Je}catch{}}),Sf=Bf.parseCSSColor,Fl=function(m,N,X,wt){wt===void 0&&(wt=1),this.r=m,this.g=N,this.b=X,this.a=wt};Fl.parse=function(m){if(m){if(m instanceof Fl)return m;if(typeof m=="string"){var N=Sf(m);if(N)return new Fl(N[0]/255*N[3],N[1]/255*N[3],N[2]/255*N[3],N[3])}}},Fl.prototype.toString=function(){var m=this.toArray(),N=m[0],X=m[1],wt=m[2],Ft=m[3];return"rgba("+Math.round(N)+","+Math.round(X)+","+Math.round(wt)+","+Ft+")"},Fl.prototype.toArray=function(){var m=this,N=m.r,X=m.g,wt=m.b,Ft=m.a;return Ft===0?[0,0,0,0]:[N*255/Ft,X*255/Ft,wt*255/Ft,Ft]},Fl.black=new Fl(0,0,0,1),Fl.white=new Fl(1,1,1,1),Fl.transparent=new Fl(0,0,0,0),Fl.red=new Fl(1,0,0,1);var Bc=function(m,N,X){m?this.sensitivity=N?"variant":"case":this.sensitivity=N?"accent":"base",this.locale=X,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Bc.prototype.compare=function(m,N){return this.collator.compare(m,N)},Bc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Nf=function(m,N,X,wt,Ft){this.text=m,this.image=N,this.scale=X,this.fontStack=wt,this.textColor=Ft},hc=function(m){this.sections=m};hc.fromString=function(m){return new hc([new Nf(m,null,null,null,null)])},hc.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(m){return m.text.length!==0||m.image&&m.image.name.length!==0})},hc.factory=function(m){return m instanceof hc?m:hc.fromString(m)},hc.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(m){return m.text}).join("")},hc.prototype.serialize=function(){for(var m=["format"],N=0,X=this.sections;N=0&&m<=255&&typeof N=="number"&&N>=0&&N<=255&&typeof X=="number"&&X>=0&&X<=255)){var Ft=typeof wt=="number"?[m,N,X,wt]:[m,N,X];return"Invalid rgba value ["+Ft.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof wt>"u"||typeof wt=="number"&&wt>=0&&wt<=1?null:"Invalid rgba value ["+[m,N,X,wt].join(", ")+"]: 'a' must be between 0 and 1."}function oh(m){if(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number"||m instanceof Fl||m instanceof Bc||m instanceof hc||m instanceof oc)return!0;if(Array.isArray(m)){for(var N=0,X=m;N2){var ie=m[1];if(typeof ie!="string"||!(ie in Sh)||ie==="object")return N.error('The item type argument of "array" must be one of string, number, boolean',1);Zt=Sh[ie],X++}else Zt=ts;var Re;if(m.length>3){if(m[2]!==null&&(typeof m[2]!="number"||m[2]<0||m[2]!==Math.floor(m[2])))return N.error('The length argument to "array" must be a positive integer literal',2);Re=m[2],X++}wt=tu(Zt,Re)}else wt=Sh[Ft];for(var Je=[];X1)&&N.push(wt)}}return N.concat(this.args.map(function(Ft){return Ft.serialize()}))};var Uh=function(m){this.type=bl,this.sections=m};Uh.parse=function(m,N){if(m.length<2)return N.error("Expected at least one argument.");var X=m[1];if(!Array.isArray(X)&&typeof X=="object")return N.error("First argument must be an image or text section.");for(var wt=[],Ft=!1,Zt=1;Zt<=m.length-1;++Zt){var ie=m[Zt];if(Ft&&typeof ie=="object"&&!Array.isArray(ie)){Ft=!1;var Re=null;if(ie["font-scale"]&&(Re=N.parse(ie["font-scale"],1,lo),!Re))return null;var Je=null;if(ie["text-font"]&&(Je=N.parse(ie["text-font"],1,tu(Ms)),!Je))return null;var yr=null;if(ie["text-color"]&&(yr=N.parse(ie["text-color"],1,ou),!yr))return null;var Cr=wt[wt.length-1];Cr.scale=Re,Cr.font=Je,Cr.textColor=yr}else{var Kr=N.parse(m[Zt],1,ts);if(!Kr)return null;var an=Kr.type.kind;if(an!=="string"&&an!=="value"&&an!=="null"&&an!=="resolvedImage")return N.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ft=!0,wt.push({content:Kr,scale:null,font:null,textColor:null})}}return new Uh(wt)},Uh.prototype.evaluate=function(m){var N=function(X){var wt=X.content.evaluate(m);return cu(wt)===Dl?new Nf("",wt,null,null,null):new Nf(sc(wt),null,X.scale?X.scale.evaluate(m):null,X.font?X.font.evaluate(m).join(","):null,X.textColor?X.textColor.evaluate(m):null)};return new hc(this.sections.map(N))},Uh.prototype.eachChild=function(m){for(var N=0,X=this.sections;N-1),X},_u.prototype.eachChild=function(m){m(this.input)},_u.prototype.outputDefined=function(){return!1},_u.prototype.serialize=function(){return["image",this.input.serialize()]};var Ed={"to-boolean":Is,"to-color":ou,"to-number":lo,"to-string":Ms},tl=function(m,N){this.type=m,this.args=N};tl.parse=function(m,N){if(m.length<2)return N.error("Expected at least one argument.");var X=m[0];if((X==="to-boolean"||X==="to-string")&&m.length!==2)return N.error("Expected one argument.");for(var wt=Ed[X],Ft=[],Zt=1;Zt4?X="Invalid rbga value "+JSON.stringify(N)+": expected an array containing either three or four numeric values.":X=fc(N[0],N[1],N[2],N[3]),!X))return new Fl(N[0]/255,N[1]/255,N[2]/255,N[3])}throw new Yl(X||"Could not parse color from value '"+(typeof N=="string"?N:String(JSON.stringify(N)))+"'")}else if(this.type.kind==="number"){for(var Re=null,Je=0,yr=this.args;Je=N[2]||m[1]<=N[1]||m[3]>=N[3])}function hd(m,N){var X=Vh(m[0]),wt=yf(m[1]),Ft=Math.pow(2,N.z);return[Math.round(X*Ft*rc),Math.round(wt*Ft*rc)]}function Zf(m,N,X){var wt=m[0]-N[0],Ft=m[1]-N[1],Zt=m[0]-X[0],ie=m[1]-X[1];return wt*ie-Zt*Ft===0&&wt*Zt<=0&&Ft*ie<=0}function xf(m,N,X){return N[1]>m[1]!=X[1]>m[1]&&m[0]<(X[0]-N[0])*(m[1]-N[1])/(X[1]-N[1])+N[0]}function Hh(m,N){for(var X=!1,wt=0,Ft=N.length;wt0&&Kr<0||Cr<0&&Kr>0}function Gf(m,N,X,wt){var Ft=[N[0]-m[0],N[1]-m[1]],Zt=[wt[0]-X[0],wt[1]-X[1]];return Vf(Zt,Ft)===0?!1:!!(lh(m,N,X,wt)&&lh(X,wt,m,N))}function Eh(m,N,X){for(var wt=0,Ft=X;wtX[2]){var Ft=wt*.5,Zt=m[0]-X[0]>Ft?-wt:X[0]-m[0]>Ft?wt:0;Zt===0&&(Zt=m[0]-X[2]>Ft?-wt:X[2]-m[0]>Ft?wt:0),m[0]+=Zt}jf(N,m)}function Ef(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Cd(m,N,X,wt){for(var Ft=Math.pow(2,wt.z)*rc,Zt=[wt.x*rc,wt.y*rc],ie=[],Re=0,Je=m;Re=0)return!1;var X=!0;return m.eachChild(function(wt){X&&!jc(wt,N)&&(X=!1)}),X}var Wh=function(m,N){this.type=N.type,this.name=m,this.boundExpression=N};Wh.parse=function(m,N){if(m.length!==2||typeof m[1]!="string")return N.error("'var' expression requires exactly one string literal argument.");var X=m[1];return N.scope.has(X)?new Wh(X,N.scope.get(X)):N.error('Unknown variable "'+X+'". Make sure "'+X+'" has been bound in an enclosing "let" expression before using it.',1)},Wh.prototype.evaluate=function(m){return this.boundExpression.evaluate(m)},Wh.prototype.eachChild=function(){},Wh.prototype.outputDefined=function(){return!1},Wh.prototype.serialize=function(){return["var",this.name]};var hu=function(m,N,X,wt,Ft){N===void 0&&(N=[]),wt===void 0&&(wt=new Cl),Ft===void 0&&(Ft=[]),this.registry=m,this.path=N,this.key=N.map(function(Zt){return"["+Zt+"]"}).join(""),this.scope=wt,this.errors=Ft,this.expectedType=X};hu.prototype.parse=function(m,N,X,wt,Ft){return Ft===void 0&&(Ft={}),N?this.concat(N,X,wt)._parse(m,Ft):this._parse(m,Ft)},hu.prototype._parse=function(m,N){(m===null||typeof m=="string"||typeof m=="boolean"||typeof m=="number")&&(m=["literal",m]);function X(yr,Cr,Kr){return Kr==="assert"?new Cc(Cr,[yr]):Kr==="coerce"?new tl(Cr,[yr]):yr}if(Array.isArray(m)){if(m.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var wt=m[0];if(typeof wt!="string")return this.error("Expression name must be a string, but found "+typeof wt+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ft=this.registry[wt];if(Ft){var Zt=Ft.parse(m,this);if(!Zt)return null;if(this.expectedType){var ie=this.expectedType,Re=Zt.type;if((ie.kind==="string"||ie.kind==="number"||ie.kind==="boolean"||ie.kind==="object"||ie.kind==="array")&&Re.kind==="value")Zt=X(Zt,ie,N.typeAnnotation||"assert");else if((ie.kind==="color"||ie.kind==="formatted"||ie.kind==="resolvedImage")&&(Re.kind==="value"||Re.kind==="string"))Zt=X(Zt,ie,N.typeAnnotation||"coerce");else if(this.checkSubtype(ie,Re))return null}if(!(Zt instanceof rl)&&Zt.type.kind!=="resolvedImage"&&Ch(Zt)){var Je=new Ll;try{Zt=new rl(Zt.type,Zt.evaluate(Je))}catch(yr){return this.error(yr.message),null}}return Zt}return this.error('Unknown expression "'+wt+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof m>"u"?this.error("'undefined' value invalid. Use null instead."):typeof m=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof m+" instead.")},hu.prototype.concat=function(m,N,X){var wt=typeof m=="number"?this.path.concat(m):this.path,Ft=X?this.scope.concat(X):this.scope;return new hu(this.registry,wt,N||null,Ft,this.errors)},hu.prototype.error=function(m){for(var N=[],X=arguments.length-1;X-- >0;)N[X]=arguments[X+1];var wt=""+this.key+N.map(function(Ft){return"["+Ft+"]"}).join("");this.errors.push(new al(wt,m))},hu.prototype.checkSubtype=function(m,N){var X=mh(m,N);return X&&this.error(X),X};function Ch(m){if(m instanceof Wh)return Ch(m.boundExpression);if(m instanceof Qo&&m.name==="error"||m instanceof sh||m instanceof Nc)return!1;var N=m instanceof tl||m instanceof Cc,X=!0;return m.eachChild(function(wt){N?X=X&&Ch(wt):X=X&&wt instanceof rl}),X?Xf(m)&&jc(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Mc(m,N){for(var X=m.length-1,wt=0,Ft=X,Zt=0,ie,Re;wt<=Ft;)if(Zt=Math.floor((wt+Ft)/2),ie=m[Zt],Re=m[Zt+1],ie<=N){if(Zt===X||NN)Ft=Zt-1;else throw new Yl("Input is not a number.");return 0}var Uc=function(m,N,X){this.type=m,this.input=N,this.labels=[],this.outputs=[];for(var wt=0,Ft=X;wt=ie)return N.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Je);var Cr=N.parse(Re,yr,Ft);if(!Cr)return null;Ft=Ft||Cr.type,wt.push([ie,Cr])}return new Uc(Ft,X,wt)},Uc.prototype.evaluate=function(m){var N=this.labels,X=this.outputs;if(N.length===1)return X[0].evaluate(m);var wt=this.input.evaluate(m);if(wt<=N[0])return X[0].evaluate(m);var Ft=N.length;if(wt>=N[Ft-1])return X[Ft-1].evaluate(m);var Zt=Mc(N,wt);return X[Zt].evaluate(m)},Uc.prototype.eachChild=function(m){m(this.input);for(var N=0,X=this.outputs;N0&&m.push(this.labels[N]),m.push(this.outputs[N].serialize());return m};function bu(m,N,X){return m*(1-X)+N*X}function uf(m,N,X){return new Fl(bu(m.r,N.r,X),bu(m.g,N.g,X),bu(m.b,N.b,X),bu(m.a,N.a,X))}function vh(m,N,X){return m.map(function(wt,Ft){return bu(wt,N[Ft],X)})}var qh=Object.freeze({__proto__:null,number:bu,color:uf,array:vh}),Cf=.95047,Ld=1,Jd=1.08883,cf=4/29,Lf=6/29,wc=3*Lf*Lf,hf=Lf*Lf*Lf,Qc=Math.PI/180,ff=180/Math.PI;function Pf(m){return m>hf?Math.pow(m,1/3):m/wc+cf}function yh(m){return m>Lf?m*m*m:wc*(m-cf)}function wu(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function Lh(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function Vc(m){var N=Lh(m.r),X=Lh(m.g),wt=Lh(m.b),Ft=Pf((.4124564*N+.3575761*X+.1804375*wt)/Cf),Zt=Pf((.2126729*N+.7151522*X+.072175*wt)/Ld),ie=Pf((.0193339*N+.119192*X+.9503041*wt)/Jd);return{l:116*Zt-16,a:500*(Ft-Zt),b:200*(Zt-ie),alpha:m.a}}function fd(m){var N=(m.l+16)/116,X=isNaN(m.a)?N:N+m.a/500,wt=isNaN(m.b)?N:N-m.b/200;return N=Ld*yh(N),X=Cf*yh(X),wt=Jd*yh(wt),new Fl(wu(3.2404542*X-1.5371385*N-.4985314*wt),wu(-.969266*X+1.8760108*N+.041556*wt),wu(.0556434*X-.2040259*N+1.0572252*wt),m.alpha)}function yu(m,N,X){return{l:bu(m.l,N.l,X),a:bu(m.a,N.a,X),b:bu(m.b,N.b,X),alpha:bu(m.alpha,N.alpha,X)}}function bf(m){var N=Vc(m),X=N.l,wt=N.a,Ft=N.b,Zt=Math.atan2(Ft,wt)*ff;return{h:Zt<0?Zt+360:Zt,c:Math.sqrt(wt*wt+Ft*Ft),l:X,alpha:m.a}}function $h(m){var N=m.h*Qc,X=m.c,wt=m.l;return fd({l:wt,a:Math.cos(N)*X,b:Math.sin(N)*X,alpha:m.alpha})}function th(m,N,X){var wt=N-m;return m+X*(wt>180||wt<-180?wt-360*Math.round(wt/360):wt)}function nf(m,N,X){return{h:th(m.h,N.h,X),c:bu(m.c,N.c,X),l:bu(m.l,N.l,X),alpha:bu(m.alpha,N.alpha,X)}}var Zh={forward:Vc,reverse:fd,interpolate:yu},wf={forward:bf,reverse:$h,interpolate:nf},Pd=Object.freeze({__proto__:null,lab:Zh,hcl:wf}),gc=function(m,N,X,wt,Ft){this.type=m,this.operator=N,this.interpolation=X,this.input=wt,this.labels=[],this.outputs=[];for(var Zt=0,ie=Ft;Zt1}))return N.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);wt={name:"cubic-bezier",controlPoints:Re}}else return N.error("Unknown interpolation type "+String(wt[0]),1,0);if(m.length-1<4)return N.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if((m.length-1)%2!==0)return N.error("Expected an even number of arguments.");if(Ft=N.parse(Ft,2,lo),!Ft)return null;var Je=[],yr=null;X==="interpolate-hcl"||X==="interpolate-lab"?yr=ou:N.expectedType&&N.expectedType.kind!=="value"&&(yr=N.expectedType);for(var Cr=0;Cr=Kr)return N.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',gn);var gi=N.parse(an,Rn,yr);if(!gi)return null;yr=yr||gi.type,Je.push([Kr,gi])}return yr.kind!=="number"&&yr.kind!=="color"&&!(yr.kind==="array"&&yr.itemType.kind==="number"&&typeof yr.N=="number")?N.error("Type "+nu(yr)+" is not interpolatable."):new gc(yr,X,wt,Ft,Je)},gc.prototype.evaluate=function(m){var N=this.labels,X=this.outputs;if(N.length===1)return X[0].evaluate(m);var wt=this.input.evaluate(m);if(wt<=N[0])return X[0].evaluate(m);var Ft=N.length;if(wt>=N[Ft-1])return X[Ft-1].evaluate(m);var Zt=Mc(N,wt),ie=N[Zt],Re=N[Zt+1],Je=gc.interpolationFactor(this.interpolation,wt,ie,Re),yr=X[Zt].evaluate(m),Cr=X[Zt+1].evaluate(m);return this.operator==="interpolate"?qh[this.type.kind.toLowerCase()](yr,Cr,Je):this.operator==="interpolate-hcl"?wf.reverse(wf.interpolate(wf.forward(yr),wf.forward(Cr),Je)):Zh.reverse(Zh.interpolate(Zh.forward(yr),Zh.forward(Cr),Je))},gc.prototype.eachChild=function(m){m(this.input);for(var N=0,X=this.outputs;N=X.length)throw new Yl("Array index out of bounds: "+N+" > "+(X.length-1)+".");if(N!==Math.floor(N))throw new Yl("Array index must be an integer, but found "+N+" instead.");return X[N]},xh.prototype.eachChild=function(m){m(this.index),m(this.input)},xh.prototype.outputDefined=function(){return!1},xh.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Bu=function(m,N){this.type=Is,this.needle=m,this.haystack=N};Bu.parse=function(m,N){if(m.length!==3)return N.error("Expected 2 arguments, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1,ts),wt=N.parse(m[2],2,ts);return!X||!wt?null:Jc(X.type,[Is,Ms,lo,Ru,ts])?new Bu(X,wt):N.error("Expected first argument to be of type boolean, string, number or null, but found "+nu(X.type)+" instead")},Bu.prototype.evaluate=function(m){var N=this.needle.evaluate(m),X=this.haystack.evaluate(m);if(!X)return!1;if(!ah(N,["boolean","string","number","null"]))throw new Yl("Expected first argument to be of type boolean, string, number or null, but found "+nu(cu(N))+" instead.");if(!ah(X,["string","array"]))throw new Yl("Expected second argument to be of type array or string, but found "+nu(cu(X))+" instead.");return X.indexOf(N)>=0},Bu.prototype.eachChild=function(m){m(this.needle),m(this.haystack)},Bu.prototype.outputDefined=function(){return!0},Bu.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var iu=function(m,N,X){this.type=lo,this.needle=m,this.haystack=N,this.fromIndex=X};iu.parse=function(m,N){if(m.length<=2||m.length>=5)return N.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1,ts),wt=N.parse(m[2],2,ts);if(!X||!wt)return null;if(!Jc(X.type,[Is,Ms,lo,Ru,ts]))return N.error("Expected first argument to be of type boolean, string, number or null, but found "+nu(X.type)+" instead");if(m.length===4){var Ft=N.parse(m[3],3,lo);return Ft?new iu(X,wt,Ft):null}else return new iu(X,wt)},iu.prototype.evaluate=function(m){var N=this.needle.evaluate(m),X=this.haystack.evaluate(m);if(!ah(N,["boolean","string","number","null"]))throw new Yl("Expected first argument to be of type boolean, string, number or null, but found "+nu(cu(N))+" instead.");if(!ah(X,["string","array"]))throw new Yl("Expected second argument to be of type array or string, but found "+nu(cu(X))+" instead.");if(this.fromIndex){var wt=this.fromIndex.evaluate(m);return X.indexOf(N,wt)}return X.indexOf(N)},iu.prototype.eachChild=function(m){m(this.needle),m(this.haystack),this.fromIndex&&m(this.fromIndex)},iu.prototype.outputDefined=function(){return!1},iu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var m=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),m]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var _h=function(m,N,X,wt,Ft,Zt){this.inputType=m,this.type=N,this.input=X,this.cases=wt,this.outputs=Ft,this.otherwise=Zt};_h.parse=function(m,N){if(m.length<5)return N.error("Expected at least 4 arguments, but found only "+(m.length-1)+".");if(m.length%2!==1)return N.error("Expected an even number of arguments.");var X,wt;N.expectedType&&N.expectedType.kind!=="value"&&(wt=N.expectedType);for(var Ft={},Zt=[],ie=2;ieNumber.MAX_SAFE_INTEGER)return yr.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof an=="number"&&Math.floor(an)!==an)return yr.error("Numeric branch labels must be integer values.");if(!X)X=cu(an);else if(yr.checkSubtype(X,cu(an)))return null;if(typeof Ft[String(an)]<"u")return yr.error("Branch labels must be unique.");Ft[String(an)]=Zt.length}var gn=N.parse(Je,ie,wt);if(!gn)return null;wt=wt||gn.type,Zt.push(gn)}var Rn=N.parse(m[1],1,ts);if(!Rn)return null;var gi=N.parse(m[m.length-1],m.length-1,wt);return!gi||Rn.type.kind!=="value"&&N.concat(1).checkSubtype(X,Rn.type)?null:new _h(X,wt,Rn,Ft,Zt,gi)},_h.prototype.evaluate=function(m){var N=this.input.evaluate(m),X=cu(N)===this.inputType&&this.outputs[this.cases[N]]||this.otherwise;return X.evaluate(m)},_h.prototype.eachChild=function(m){m(this.input),this.outputs.forEach(m),m(this.otherwise)},_h.prototype.outputDefined=function(){return this.outputs.every(function(m){return m.outputDefined()})&&this.otherwise.outputDefined()},_h.prototype.serialize=function(){for(var m=this,N=["match",this.input.serialize()],X=Object.keys(this.cases).sort(),wt=[],Ft={},Zt=0,ie=X;Zt=5)return N.error("Expected 3 or 4 arguments, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1,ts),wt=N.parse(m[2],2,lo);if(!X||!wt)return null;if(!Jc(X.type,[tu(ts),Ms,ts]))return N.error("Expected first argument to be of type array or string, but found "+nu(X.type)+" instead");if(m.length===4){var Ft=N.parse(m[3],3,lo);return Ft?new bh(X.type,X,wt,Ft):null}else return new bh(X.type,X,wt)},bh.prototype.evaluate=function(m){var N=this.input.evaluate(m),X=this.beginIndex.evaluate(m);if(!ah(N,["string","array"]))throw new Yl("Expected first argument to be of type array or string, but found "+nu(cu(N))+" instead.");if(this.endIndex){var wt=this.endIndex.evaluate(m);return N.slice(X,wt)}return N.slice(X)},bh.prototype.eachChild=function(m){m(this.input),m(this.beginIndex),this.endIndex&&m(this.endIndex)},bh.prototype.outputDefined=function(){return!1},bh.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var m=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),m]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Wf(m,N){return m==="=="||m==="!="?N.kind==="boolean"||N.kind==="string"||N.kind==="number"||N.kind==="null"||N.kind==="value":N.kind==="string"||N.kind==="number"||N.kind==="value"}function gr(m,N,X){return N===X}function Ur(m,N,X){return N!==X}function wn(m,N,X){return NX}function qn(m,N,X){return N<=X}function di(m,N,X){return N>=X}function aa(m,N,X,wt){return wt.compare(N,X)===0}function va(m,N,X,wt){return!aa(m,N,X,wt)}function Ba(m,N,X,wt){return wt.compare(N,X)<0}function Za(m,N,X,wt){return wt.compare(N,X)>0}function ca(m,N,X,wt){return wt.compare(N,X)<=0}function Oa(m,N,X,wt){return wt.compare(N,X)>=0}function ka(m,N,X){var wt=m!=="=="&&m!=="!=";return function(){function Ft(Zt,ie,Re){this.type=Is,this.lhs=Zt,this.rhs=ie,this.collator=Re,this.hasUntypedArgument=Zt.type.kind==="value"||ie.type.kind==="value"}return Ft.parse=function(Zt,ie){if(Zt.length!==3&&Zt.length!==4)return ie.error("Expected two or three arguments.");var Re=Zt[0],Je=ie.parse(Zt[1],1,ts);if(!Je)return null;if(!Wf(Re,Je.type))return ie.concat(1).error('"'+Re+`" comparisons are not supported for type '`+nu(Je.type)+"'.");var yr=ie.parse(Zt[2],2,ts);if(!yr)return null;if(!Wf(Re,yr.type))return ie.concat(2).error('"'+Re+`" comparisons are not supported for type '`+nu(yr.type)+"'.");if(Je.type.kind!==yr.type.kind&&Je.type.kind!=="value"&&yr.type.kind!=="value")return ie.error("Cannot compare types '"+nu(Je.type)+"' and '"+nu(yr.type)+"'.");wt&&(Je.type.kind==="value"&&yr.type.kind!=="value"?Je=new Cc(yr.type,[Je]):Je.type.kind!=="value"&&yr.type.kind==="value"&&(yr=new Cc(Je.type,[yr])));var Cr=null;if(Zt.length===4){if(Je.type.kind!=="string"&&yr.type.kind!=="string"&&Je.type.kind!=="value"&&yr.type.kind!=="value")return ie.error("Cannot use collator to compare non-string types.");if(Cr=ie.parse(Zt[3],3,Gu),!Cr)return null}return new Ft(Je,yr,Cr)},Ft.prototype.evaluate=function(Zt){var ie=this.lhs.evaluate(Zt),Re=this.rhs.evaluate(Zt);if(wt&&this.hasUntypedArgument){var Je=cu(ie),yr=cu(Re);if(Je.kind!==yr.kind||!(Je.kind==="string"||Je.kind==="number"))throw new Yl('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+Je.kind+", "+yr.kind+") instead.")}if(this.collator&&!wt&&this.hasUntypedArgument){var Cr=cu(ie),Kr=cu(Re);if(Cr.kind!=="string"||Kr.kind!=="string")return N(Zt,ie,Re)}return this.collator?X(Zt,ie,Re,this.collator.evaluate(Zt)):N(Zt,ie,Re)},Ft.prototype.eachChild=function(Zt){Zt(this.lhs),Zt(this.rhs),this.collator&&Zt(this.collator)},Ft.prototype.outputDefined=function(){return!0},Ft.prototype.serialize=function(){var Zt=[m];return this.eachChild(function(ie){Zt.push(ie.serialize())}),Zt},Ft}()}var na=ka("==",gr,aa),io=ka("!=",Ur,va),ns=ka("<",wn,Ba),Ko=ka(">",hn,Za),ls=ka("<=",qn,ca),ps=ka(">=",di,Oa),oo=function(m,N,X,wt,Ft){this.type=Ms,this.number=m,this.locale=N,this.currency=X,this.minFractionDigits=wt,this.maxFractionDigits=Ft};oo.parse=function(m,N){if(m.length!==3)return N.error("Expected two arguments.");var X=N.parse(m[1],1,lo);if(!X)return null;var wt=m[2];if(typeof wt!="object"||Array.isArray(wt))return N.error("NumberFormat options argument must be an object.");var Ft=null;if(wt.locale&&(Ft=N.parse(wt.locale,1,Ms),!Ft))return null;var Zt=null;if(wt.currency&&(Zt=N.parse(wt.currency,1,Ms),!Zt))return null;var ie=null;if(wt["min-fraction-digits"]&&(ie=N.parse(wt["min-fraction-digits"],1,lo),!ie))return null;var Re=null;return wt["max-fraction-digits"]&&(Re=N.parse(wt["max-fraction-digits"],1,lo),!Re)?null:new oo(X,Ft,Zt,ie,Re)},oo.prototype.evaluate=function(m){return new Intl.NumberFormat(this.locale?this.locale.evaluate(m):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(m):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(m):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(m):void 0}).format(this.number.evaluate(m))},oo.prototype.eachChild=function(m){m(this.number),this.locale&&m(this.locale),this.currency&&m(this.currency),this.minFractionDigits&&m(this.minFractionDigits),this.maxFractionDigits&&m(this.maxFractionDigits)},oo.prototype.outputDefined=function(){return!1},oo.prototype.serialize=function(){var m={};return this.locale&&(m.locale=this.locale.serialize()),this.currency&&(m.currency=this.currency.serialize()),this.minFractionDigits&&(m["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(m["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),m]};var qa=function(m){this.type=lo,this.input=m};qa.parse=function(m,N){if(m.length!==2)return N.error("Expected 1 argument, but found "+(m.length-1)+" instead.");var X=N.parse(m[1],1);return X?X.type.kind!=="array"&&X.type.kind!=="string"&&X.type.kind!=="value"?N.error("Expected argument of type string or array, but found "+nu(X.type)+" instead."):new qa(X):null},qa.prototype.evaluate=function(m){var N=this.input.evaluate(m);if(typeof N=="string"||Array.isArray(N))return N.length;throw new Yl("Expected value to be of type string or array, but found "+nu(cu(N))+" instead.")},qa.prototype.eachChild=function(m){m(this.input)},qa.prototype.outputDefined=function(){return!1},qa.prototype.serialize=function(){var m=["length"];return this.eachChild(function(N){m.push(N.serialize())}),m};var gs={"==":na,"!=":io,">":Ko,"<":ns,">=":ps,"<=":ls,array:Cc,at:xh,boolean:Cc,case:df,coalesce:eh,collator:sh,format:Uh,image:_u,in:Bu,"index-of":iu,interpolate:gc,"interpolate-hcl":gc,"interpolate-lab":gc,length:qa,let:Ph,literal:rl,match:_h,number:Cc,"number-format":oo,object:Cc,slice:bh,step:Uc,string:Cc,"to-boolean":tl,"to-color":tl,"to-number":tl,"to-string":tl,var:Wh,within:Nc};function el(m,N){var X=N[0],wt=N[1],Ft=N[2],Zt=N[3];X=X.evaluate(m),wt=wt.evaluate(m),Ft=Ft.evaluate(m);var ie=Zt?Zt.evaluate(m):1,Re=fc(X,wt,Ft,ie);if(Re)throw new Yl(Re);return new Fl(X/255*ie,wt/255*ie,Ft/255*ie,ie)}function Pl(m,N){return m in N}function su(m,N){var X=N[m];return typeof X>"u"?null:X}function $l(m,N,X,wt){for(;X<=wt;){var Ft=X+wt>>1;if(N[Ft]===m)return!0;N[Ft]>m?wt=Ft-1:X=Ft+1}return!1}function lu(m){return{type:m}}Qo.register(gs,{error:[Su,[Ms],function(m,N){var X=N[0];throw new Yl(X.evaluate(m))}],typeof:[Ms,[ts],function(m,N){var X=N[0];return nu(cu(X.evaluate(m)))}],"to-rgba":[tu(lo,4),[ou],function(m,N){var X=N[0];return X.evaluate(m).toArray()}],rgb:[ou,[lo,lo,lo],el],rgba:[ou,[lo,lo,lo,lo],el],has:{type:Is,overloads:[[[Ms],function(m,N){var X=N[0];return Pl(X.evaluate(m),m.properties())}],[[Ms,hl],function(m,N){var X=N[0],wt=N[1];return Pl(X.evaluate(m),wt.evaluate(m))}]]},get:{type:ts,overloads:[[[Ms],function(m,N){var X=N[0];return su(X.evaluate(m),m.properties())}],[[Ms,hl],function(m,N){var X=N[0],wt=N[1];return su(X.evaluate(m),wt.evaluate(m))}]]},"feature-state":[ts,[Ms],function(m,N){var X=N[0];return su(X.evaluate(m),m.featureState||{})}],properties:[hl,[],function(m){return m.properties()}],"geometry-type":[Ms,[],function(m){return m.geometryType()}],id:[ts,[],function(m){return m.id()}],zoom:[lo,[],function(m){return m.globals.zoom}],"heatmap-density":[lo,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[lo,[],function(m){return m.globals.lineProgress||0}],accumulated:[ts,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[lo,lu(lo),function(m,N){for(var X=0,wt=0,Ft=N;wt":[Is,[Ms,ts],function(m,N){var X=N[0],wt=N[1],Ft=m.properties()[X.value],Zt=wt.value;return typeof Ft==typeof Zt&&Ft>Zt}],"filter-id->":[Is,[ts],function(m,N){var X=N[0],wt=m.id(),Ft=X.value;return typeof wt==typeof Ft&&wt>Ft}],"filter-<=":[Is,[Ms,ts],function(m,N){var X=N[0],wt=N[1],Ft=m.properties()[X.value],Zt=wt.value;return typeof Ft==typeof Zt&&Ft<=Zt}],"filter-id-<=":[Is,[ts],function(m,N){var X=N[0],wt=m.id(),Ft=X.value;return typeof wt==typeof Ft&&wt<=Ft}],"filter->=":[Is,[Ms,ts],function(m,N){var X=N[0],wt=N[1],Ft=m.properties()[X.value],Zt=wt.value;return typeof Ft==typeof Zt&&Ft>=Zt}],"filter-id->=":[Is,[ts],function(m,N){var X=N[0],wt=m.id(),Ft=X.value;return typeof wt==typeof Ft&&wt>=Ft}],"filter-has":[Is,[ts],function(m,N){var X=N[0];return X.value in m.properties()}],"filter-has-id":[Is,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[Is,[tu(Ms)],function(m,N){var X=N[0];return X.value.indexOf(m.geometryType())>=0}],"filter-id-in":[Is,[tu(ts)],function(m,N){var X=N[0];return X.value.indexOf(m.id())>=0}],"filter-in-small":[Is,[Ms,tu(ts)],function(m,N){var X=N[0],wt=N[1];return wt.value.indexOf(m.properties()[X.value])>=0}],"filter-in-large":[Is,[Ms,tu(ts)],function(m,N){var X=N[0],wt=N[1];return $l(m.properties()[X.value],wt.value,0,wt.value.length-1)}],all:{type:Is,overloads:[[[Is,Is],function(m,N){var X=N[0],wt=N[1];return X.evaluate(m)&&wt.evaluate(m)}],[lu(Is),function(m,N){for(var X=0,wt=N;X-1}function Oo(m){return!!m.expression&&m.expression.interpolated}function Es(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function Kl(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Rl(m){return m}function vc(m,N){var X=N.type==="color",wt=m.stops&&typeof m.stops[0][0]=="object",Ft=wt||m.property!==void 0,Zt=wt||!Ft,ie=m.type||(Oo(N)?"exponential":"interval");if(X&&(m=Ql({},m),m.stops&&(m.stops=m.stops.map(function(Vo){return[Vo[0],Fl.parse(Vo[1])]})),m.default?m.default=Fl.parse(m.default):m.default=Fl.parse(N.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Pd[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Re,Je,yr;if(ie==="exponential")Re=Wc;else if(ie==="interval")Re=Ih;else if(ie==="categorical"){Re=Lc,Je=Object.create(null);for(var Cr=0,Kr=m.stops;Cr=m.stops[wt-1][0])return m.stops[wt-1][1];var Ft=Mc(m.stops.map(function(Zt){return Zt[0]}),X);return m.stops[Ft][1]}function Wc(m,N,X){var wt=m.base!==void 0?m.base:1;if(Es(X)!=="number")return Hc(m.default,N.default);var Ft=m.stops.length;if(Ft===1||X<=m.stops[0][0])return m.stops[0][1];if(X>=m.stops[Ft-1][0])return m.stops[Ft-1][1];var Zt=Mc(m.stops.map(function(Kr){return Kr[0]}),X),ie=Du(X,wt,m.stops[Zt][0],m.stops[Zt+1][0]),Re=m.stops[Zt][1],Je=m.stops[Zt+1][1],yr=qh[N.type]||Rl;if(m.colorSpace&&m.colorSpace!=="rgb"){var Cr=Pd[m.colorSpace];yr=function(Kr,an){return Cr.reverse(Cr.interpolate(Cr.forward(Kr),Cr.forward(an),ie))}}return typeof Re.evaluate=="function"?{evaluate:function(){for(var Kr=[],an=arguments.length;an--;)Kr[an]=arguments[an];var gn=Re.evaluate.apply(void 0,Kr),Rn=Je.evaluate.apply(void 0,Kr);if(!(gn===void 0||Rn===void 0))return yr(gn,Rn,ie)}}:yr(Re,Je,ie)}function zh(m,N,X){return N.type==="color"?X=Fl.parse(X):N.type==="formatted"?X=hc.fromString(X.toString()):N.type==="resolvedImage"?X=oc.fromString(X.toString()):Es(X)!==N.type&&(N.type!=="enum"||!N.values[X])&&(X=void 0),Hc(X,m.default,N.default)}function Du(m,N,X,wt){var Ft=wt-X,Zt=m-X;return Ft===0?0:N===1?Zt/Ft:(Math.pow(N,Zt)-1)/(Math.pow(N,Ft)-1)}var Oh=function(m,N){this.expression=m,this._warningHistory={},this._evaluator=new Ll,this._defaultValue=N?zt(N):null,this._enumValues=N&&N.type==="enum"?N.values:null};Oh.prototype.evaluateWithoutErrorHandling=function(m,N,X,wt,Ft,Zt){return this._evaluator.globals=m,this._evaluator.feature=N,this._evaluator.featureState=X,this._evaluator.canonical=wt,this._evaluator.availableImages=Ft||null,this._evaluator.formattedSection=Zt,this.expression.evaluate(this._evaluator)},Oh.prototype.evaluate=function(m,N,X,wt,Ft,Zt){this._evaluator.globals=m,this._evaluator.feature=N||null,this._evaluator.featureState=X||null,this._evaluator.canonical=wt,this._evaluator.availableImages=Ft||null,this._evaluator.formattedSection=Zt||null;try{var ie=this.expression.evaluate(this._evaluator);if(ie==null||typeof ie=="number"&&ie!==ie)return this._defaultValue;if(this._enumValues&&!(ie in this._enumValues))throw new Yl("Expected value to be one of "+Object.keys(this._enumValues).map(function(Re){return JSON.stringify(Re)}).join(", ")+", but found "+JSON.stringify(ie)+" instead.");return ie}catch(Re){return this._warningHistory[Re.message]||(this._warningHistory[Re.message]=!0,typeof console<"u"&&console.warn(Re.message)),this._defaultValue}};function rs(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in gs}function zs(m,N){var X=new hu(gs,[],N?Et(N):void 0),wt=X.parse(m,void 0,void 0,void 0,N&&N.type==="string"?{typeAnnotation:"coerce"}:void 0);return wt?ml(new Oh(wt,N)):qu(X.errors)}var qc=function(m,N){this.kind=m,this._styleExpression=N,this.isStateDependent=m!=="constant"&&!Ou(N.expression)};qc.prototype.evaluateWithoutErrorHandling=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,N,X,wt,Ft,Zt)},qc.prototype.evaluate=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluate(m,N,X,wt,Ft,Zt)};var $u=function(m,N,X,wt){this.kind=m,this.zoomStops=X,this._styleExpression=N,this.isStateDependent=m!=="camera"&&!Ou(N.expression),this.interpolationType=wt};$u.prototype.evaluateWithoutErrorHandling=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluateWithoutErrorHandling(m,N,X,wt,Ft,Zt)},$u.prototype.evaluate=function(m,N,X,wt,Ft,Zt){return this._styleExpression.evaluate(m,N,X,wt,Ft,Zt)},$u.prototype.interpolationFactor=function(m,N,X){return this.interpolationType?gc.interpolationFactor(this.interpolationType,m,N,X):0};function qf(m,N){if(m=zs(m,N),m.result==="error")return m;var X=m.value.expression,wt=Xf(X);if(!wt&&!Iu(N))return qu([new al("","data expressions not supported")]);var Ft=jc(X,["zoom"]);if(!Ft&&!fu(N))return qu([new al("","zoom expressions not supported")]);var Zt=ht(X);if(!Zt&&!Ft)return qu([new al("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Zt instanceof al)return qu([Zt]);if(Zt instanceof gc&&!Oo(N))return qu([new al("",'"interpolate" expressions cannot be used with this property')]);if(!Zt)return ml(wt?new qc("constant",m.value):new qc("source",m.value));var ie=Zt instanceof gc?Zt.interpolation:void 0;return ml(wt?new $u("camera",m.value,Zt.labels,ie):new $u("composite",m.value,Zt.labels,ie))}var $t=function(m,N){this._parameters=m,this._specification=N,Ql(this,vc(this._parameters,this._specification))};$t.deserialize=function(m){return new $t(m._parameters,m._specification)},$t.serialize=function(m){return{_parameters:m._parameters,_specification:m._specification}};function z(m,N){if(Kl(m))return new $t(m,N);if(rs(m)){var X=qf(m,N);if(X.result==="error")throw new Error(X.value.map(function(Ft){return Ft.key+": "+Ft.message}).join(", "));return X.value}else{var wt=m;return typeof m=="string"&&N.type==="color"&&(wt=Fl.parse(m)),{kind:"constant",evaluate:function(){return wt}}}}function ht(m){var N=null;if(m instanceof Ph)N=ht(m.result);else if(m instanceof eh)for(var X=0,wt=m.args;Xwt.maximum?[new fo(N,X,X+" is greater than the maximum value "+wt.maximum)]:[]}function Ke(m){var N=m.valueSpec,X=Xo(m.value.type),wt,Ft={},Zt,ie,Re=X!=="categorical"&&m.value.property===void 0,Je=!Re,yr=Es(m.value.stops)==="array"&&Es(m.value.stops[0])==="array"&&Es(m.value.stops[0][0])==="object",Cr=Ht({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:Kr,default:Rn}});return X==="identity"&&Re&&Cr.push(new fo(m.key,m.value,'missing required property "property"')),X!=="identity"&&!m.value.stops&&Cr.push(new fo(m.key,m.value,'missing required property "stops"')),X==="exponential"&&m.valueSpec.expression&&!Oo(m.valueSpec)&&Cr.push(new fo(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(Je&&!Iu(m.valueSpec)?Cr.push(new fo(m.key,m.value,"property functions not supported")):Re&&!fu(m.valueSpec)&&Cr.push(new fo(m.key,m.value,"zoom functions not supported"))),(X==="categorical"||yr)&&m.value.property===void 0&&Cr.push(new fo(m.key,m.value,'"property" property is required')),Cr;function Kr(gi){if(X==="identity")return[new fo(gi.key,gi.value,'identity function may not have a "stops" property')];var ua=[],oa=gi.value;return ua=ua.concat(ke({key:gi.key,value:oa,valueSpec:gi.valueSpec,style:gi.style,styleSpec:gi.styleSpec,arrayElementValidator:an})),Es(oa)==="array"&&oa.length===0&&ua.push(new fo(gi.key,oa,"array must have at least one stop")),ua}function an(gi){var ua=[],oa=gi.value,wa=gi.key;if(Es(oa)!=="array")return[new fo(wa,oa,"array expected, "+Es(oa)+" found")];if(oa.length!==2)return[new fo(wa,oa,"array length 2 expected, length "+oa.length+" found")];if(yr){if(Es(oa[0])!=="object")return[new fo(wa,oa,"object expected, "+Es(oa[0])+" found")];if(oa[0].zoom===void 0)return[new fo(wa,oa,"object stop key must have zoom")];if(oa[0].value===void 0)return[new fo(wa,oa,"object stop key must have value")];if(ie&&ie>Xo(oa[0].zoom))return[new fo(wa,oa[0].zoom,"stop zoom values must appear in ascending order")];Xo(oa[0].zoom)!==ie&&(ie=Xo(oa[0].zoom),Zt=void 0,Ft={}),ua=ua.concat(Ht({key:wa+"[0]",value:oa[0],valueSpec:{zoom:{}},style:gi.style,styleSpec:gi.styleSpec,objectElementValidators:{zoom:Fe,value:gn}}))}else ua=ua.concat(gn({key:wa+"[0]",value:oa[0],style:gi.style,styleSpec:gi.styleSpec},oa));return rs(Gl(oa[1]))?ua.concat([new fo(wa+"[1]",oa[1],"expressions are not allowed in function stops.")]):ua.concat(vl({key:wa+"[1]",value:oa[1],valueSpec:N,style:gi.style,styleSpec:gi.styleSpec}))}function gn(gi,ua){var oa=Es(gi.value),wa=Xo(gi.value),Ra=gi.value!==null?gi.value:ua;if(!wt)wt=oa;else if(oa!==wt)return[new fo(gi.key,Ra,oa+" stop domain type must match previous stop domain type "+wt)];if(oa!=="number"&&oa!=="string"&&oa!=="boolean")return[new fo(gi.key,Ra,"stop domain value must be a number, string, or boolean")];if(oa!=="number"&&X!=="categorical"){var xa="number expected, "+oa+" found";return Iu(N)&&X===void 0&&(xa+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new fo(gi.key,Ra,xa)]}return X==="categorical"&&oa==="number"&&(!isFinite(wa)||Math.floor(wa)!==wa)?[new fo(gi.key,Ra,"integer expected, found "+wa)]:X!=="categorical"&&oa==="number"&&Zt!==void 0&&wa=2&&m[1]!=="$id"&&m[1]!=="$type";case"in":return m.length>=3&&(typeof m[1]!="string"||Array.isArray(m[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return m.length!==3||Array.isArray(m[1])||Array.isArray(m[2]);case"any":case"all":for(var N=0,X=m.slice(1);NN?1:0}function Ae(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var N=1;N"||N==="<="||N===">="?Oe(m[1],m[2],N):N==="any"?$e(m.slice(1)):N==="all"?["all"].concat(m.slice(1).map(je)):N==="none"?["all"].concat(m.slice(1).map(je).map(Nr)):N==="in"?wr(m[1],m.slice(2)):N==="!in"?Nr(wr(m[1],m.slice(2))):N==="has"?Or(m[1]):N==="!has"?Nr(Or(m[1])):N==="within"?m:!0;return X}function Oe(m,N,X){switch(m){case"$type":return["filter-type-"+X,N];case"$id":return["filter-id-"+X,N];default:return["filter-"+X,m,N]}}function $e(m){return["any"].concat(m.map(je))}function wr(m,N){if(N.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",N]];case"$id":return["filter-id-in",["literal",N]];default:return N.length>200&&!N.some(function(X){return typeof X!=typeof N[0]})?["filter-in-large",m,["literal",N.sort(xe)]]:["filter-in-small",m,["literal",N]]}}function Or(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function Nr(m){return["!",m]}function en(m){return Sn(Gl(m.value))?vr(Ql({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):vn(m)}function vn(m){var N=m.value,X=m.key;if(Es(N)!=="array")return[new fo(X,N,"array expected, "+Es(N)+" found")];var wt=m.styleSpec,Ft,Zt=[];if(N.length<1)return[new fo(X,N,"filter array must have at least 1 element")];switch(Zt=Zt.concat(un({key:X+"[0]",value:N[0],valueSpec:wt.filter_operator,style:m.style,styleSpec:m.styleSpec})),Xo(N[0])){case"<":case"<=":case">":case">=":N.length>=2&&Xo(N[1])==="$type"&&Zt.push(new fo(X,N,'"$type" cannot be use with operator "'+N[0]+'"'));case"==":case"!=":N.length!==3&&Zt.push(new fo(X,N,'filter array for operator "'+N[0]+'" must have 3 elements'));case"in":case"!in":N.length>=2&&(Ft=Es(N[1]),Ft!=="string"&&Zt.push(new fo(X+"[1]",N[1],"string expected, "+Ft+" found")));for(var ie=2;ie=Cr[gn+0]&&wt>=Cr[gn+1])?(ie[an]=!0,Zt.push(yr[an])):ie[an]=!1}}},ue.prototype._forEachCell=function(m,N,X,wt,Ft,Zt,ie,Re){for(var Je=this._convertToCellCoord(m),yr=this._convertToCellCoord(N),Cr=this._convertToCellCoord(X),Kr=this._convertToCellCoord(wt),an=Je;an<=Cr;an++)for(var gn=yr;gn<=Kr;gn++){var Rn=this.d*gn+an;if(!(Re&&!Re(this._convertFromCellCoord(an),this._convertFromCellCoord(gn),this._convertFromCellCoord(an+1),this._convertFromCellCoord(gn+1)))&&Ft.call(this,m,N,X,wt,Rn,Zt,ie,Re))return}},ue.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},ue.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},ue.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,N=Ut+this.cells.length+1+1,X=0,wt=0;wt=0)){var Kr=m[Cr];yr[Cr]=Ne[Je].shallow.indexOf(Cr)>=0?Kr:Jr(Kr,N)}m instanceof Error&&(yr.message=m.message)}if(yr.$name)throw new Error("$name property is reserved for worker serialization logic.");return Je!=="Object"&&(yr.$name=Je),yr}throw new Error("can't serialize object of type "+typeof m)}function xn(m){if(m==null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp||Er(m)||rn(m)||ArrayBuffer.isView(m)||m instanceof Me)return m;if(Array.isArray(m))return m.map(xn);if(typeof m=="object"){var N=m.$name||"Object",X=Ne[N],wt=X.klass;if(!wt)throw new Error("can't deserialize unregistered class "+N);if(wt.deserialize)return wt.deserialize(m);for(var Ft=Object.create(wt.prototype),Zt=0,ie=Object.keys(m);Zt=0?Je:xn(Je)}}return Ft}throw new Error("can't deserialize object of type "+typeof m)}var zn=function(){this.first=!0};zn.prototype.update=function(m,N){var X=Math.floor(m);return this.first?(this.first=!1,this.lastIntegerZoom=X,this.lastIntegerZoomTime=0,this.lastZoom=m,this.lastFloorZoom=X,!0):(this.lastFloorZoom>X?(this.lastIntegerZoom=X+1,this.lastIntegerZoomTime=N):this.lastFloorZoom=128&&m<=255},Arabic:function(m){return m>=1536&&m<=1791},"Arabic Supplement":function(m){return m>=1872&&m<=1919},"Arabic Extended-A":function(m){return m>=2208&&m<=2303},"Hangul Jamo":function(m){return m>=4352&&m<=4607},"Unified Canadian Aboriginal Syllabics":function(m){return m>=5120&&m<=5759},Khmer:function(m){return m>=6016&&m<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(m){return m>=6320&&m<=6399},"General Punctuation":function(m){return m>=8192&&m<=8303},"Letterlike Symbols":function(m){return m>=8448&&m<=8527},"Number Forms":function(m){return m>=8528&&m<=8591},"Miscellaneous Technical":function(m){return m>=8960&&m<=9215},"Control Pictures":function(m){return m>=9216&&m<=9279},"Optical Character Recognition":function(m){return m>=9280&&m<=9311},"Enclosed Alphanumerics":function(m){return m>=9312&&m<=9471},"Geometric Shapes":function(m){return m>=9632&&m<=9727},"Miscellaneous Symbols":function(m){return m>=9728&&m<=9983},"Miscellaneous Symbols and Arrows":function(m){return m>=11008&&m<=11263},"CJK Radicals Supplement":function(m){return m>=11904&&m<=12031},"Kangxi Radicals":function(m){return m>=12032&&m<=12255},"Ideographic Description Characters":function(m){return m>=12272&&m<=12287},"CJK Symbols and Punctuation":function(m){return m>=12288&&m<=12351},Hiragana:function(m){return m>=12352&&m<=12447},Katakana:function(m){return m>=12448&&m<=12543},Bopomofo:function(m){return m>=12544&&m<=12591},"Hangul Compatibility Jamo":function(m){return m>=12592&&m<=12687},Kanbun:function(m){return m>=12688&&m<=12703},"Bopomofo Extended":function(m){return m>=12704&&m<=12735},"CJK Strokes":function(m){return m>=12736&&m<=12783},"Katakana Phonetic Extensions":function(m){return m>=12784&&m<=12799},"Enclosed CJK Letters and Months":function(m){return m>=12800&&m<=13055},"CJK Compatibility":function(m){return m>=13056&&m<=13311},"CJK Unified Ideographs Extension A":function(m){return m>=13312&&m<=19903},"Yijing Hexagram Symbols":function(m){return m>=19904&&m<=19967},"CJK Unified Ideographs":function(m){return m>=19968&&m<=40959},"Yi Syllables":function(m){return m>=40960&&m<=42127},"Yi Radicals":function(m){return m>=42128&&m<=42191},"Hangul Jamo Extended-A":function(m){return m>=43360&&m<=43391},"Hangul Syllables":function(m){return m>=44032&&m<=55215},"Hangul Jamo Extended-B":function(m){return m>=55216&&m<=55295},"Private Use Area":function(m){return m>=57344&&m<=63743},"CJK Compatibility Ideographs":function(m){return m>=63744&&m<=64255},"Arabic Presentation Forms-A":function(m){return m>=64336&&m<=65023},"Vertical Forms":function(m){return m>=65040&&m<=65055},"CJK Compatibility Forms":function(m){return m>=65072&&m<=65103},"Small Form Variants":function(m){return m>=65104&&m<=65135},"Arabic Presentation Forms-B":function(m){return m>=65136&&m<=65279},"Halfwidth and Fullwidth Forms":function(m){return m>=65280&&m<=65519}};function Hi(m){for(var N=0,X=m;N=65097&&m<=65103)||On["CJK Compatibility Ideographs"](m)||On["CJK Compatibility"](m)||On["CJK Radicals Supplement"](m)||On["CJK Strokes"](m)||On["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||On["CJK Unified Ideographs Extension A"](m)||On["CJK Unified Ideographs"](m)||On["Enclosed CJK Letters and Months"](m)||On["Hangul Compatibility Jamo"](m)||On["Hangul Jamo Extended-A"](m)||On["Hangul Jamo Extended-B"](m)||On["Hangul Jamo"](m)||On["Hangul Syllables"](m)||On.Hiragana(m)||On["Ideographic Description Characters"](m)||On.Kanbun(m)||On["Kangxi Radicals"](m)||On["Katakana Phonetic Extensions"](m)||On.Katakana(m)&&m!==12540||On["Halfwidth and Fullwidth Forms"](m)&&m!==65288&&m!==65289&&m!==65293&&!(m>=65306&&m<=65310)&&m!==65339&&m!==65341&&m!==65343&&!(m>=65371&&m<=65503)&&m!==65507&&!(m>=65512&&m<=65519)||On["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||On["Unified Canadian Aboriginal Syllabics"](m)||On["Unified Canadian Aboriginal Syllabics Extended"](m)||On["Vertical Forms"](m)||On["Yijing Hexagram Symbols"](m)||On["Yi Syllables"](m)||On["Yi Radicals"](m))}function Gi(m){return!!(On["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||On["General Punctuation"](m)&&(m===8214||m===8224||m===8225||m===8240||m===8241||m===8251||m===8252||m===8258||m===8263||m===8264||m===8265||m===8273)||On["Letterlike Symbols"](m)||On["Number Forms"](m)||On["Miscellaneous Technical"](m)&&(m>=8960&&m<=8967||m>=8972&&m<=8991||m>=8996&&m<=9e3||m===9003||m>=9085&&m<=9114||m>=9150&&m<=9165||m===9167||m>=9169&&m<=9179||m>=9186&&m<=9215)||On["Control Pictures"](m)&&m!==9251||On["Optical Character Recognition"](m)||On["Enclosed Alphanumerics"](m)||On["Geometric Shapes"](m)||On["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||On["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||On["CJK Symbols and Punctuation"](m)||On.Katakana(m)||On["Private Use Area"](m)||On["CJK Compatibility Forms"](m)||On["Small Form Variants"](m)||On["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function Kn(m){return!(Ri(m)||Gi(m))}function Ua(m){return On.Arabic(m)||On["Arabic Supplement"](m)||On["Arabic Extended-A"](m)||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function Ha(m){return m>=1424&&m<=2303||On["Arabic Presentation Forms-A"](m)||On["Arabic Presentation Forms-B"](m)}function ao(m,N){return!(!N&&Ha(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||On.Khmer(m))}function Po(m){for(var N=0,X=m;N-1&&(Go=Wo.error),ol&&ol(m)};function Ku(){du.fire(new $r("pluginStateChange",{pluginStatus:Go,pluginURL:vs}))}var du=new Br,_o=function(){return Go},Gs=function(m){return m({pluginStatus:Go,pluginURL:vs}),du.on("pluginStateChange",m),m},nl=function(m,N,X){if(X===void 0&&(X=!1),Go===Wo.deferred||Go===Wo.loading||Go===Wo.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");vs=It.resolveURL(m),Go=Wo.deferred,ol=N,Ku(),X||uu()},uu=function(){if(Go!==Wo.deferred||!vs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Go=Wo.loading,Ku(),vs&&Tn({url:vs},function(m){m?Tl(m):(Go=Wo.loaded,Ku())})},Xl={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Go===Wo.loaded||Xl.applyArabicShaping!=null},isLoading:function(){return Go===Wo.loading},setState:function(m){Go=m.pluginStatus,vs=m.pluginURL},isParsed:function(){return Xl.applyArabicShaping!=null&&Xl.processBidirectionalText!=null&&Xl.processStyledBidirectionalText!=null},getPluginURL:function(){return vs}},rh=function(){!Xl.isLoading()&&!Xl.isLoaded()&&_o()==="deferred"&&uu()},jl=function(m,N){this.zoom=m,N?(this.now=N.now,this.fadeDuration=N.fadeDuration,this.zoomHistory=N.zoomHistory,this.transition=N.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new zn,this.transition={})};jl.prototype.isSupportedScript=function(m){return Ro(m,Xl.isLoaded())},jl.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},jl.prototype.getCrossfadeParameters=function(){var m=this.zoom,N=m-Math.floor(m),X=this.crossFadingFactor();return m>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:N+(1-N)*X}:{fromScale:.5,toScale:1,t:1-(1-X)*N}};var ru=function(m,N){this.property=m,this.value=N,this.expression=z(N===void 0?m.specification.default:N,m.specification)};ru.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ru.prototype.possiblyEvaluate=function(m,N,X){return this.property.possiblyEvaluate(this,m,N,X)};var wh=function(m){this.property=m,this.value=new ru(m,void 0)};wh.prototype.transitioned=function(m,N){return new kr(this.property,this.value,N,C({},m.transition,this.transition),m.now)},wh.prototype.untransitioned=function(){return new kr(this.property,this.value,null,{},0)};var _e=function(m){this._properties=m,this._values=Object.create(m.defaultTransitionablePropertyValues)};_e.prototype.getValue=function(m){return F(this._values[m].value.value)},_e.prototype.setValue=function(m,N){this._values.hasOwnProperty(m)||(this._values[m]=new wh(this._values[m].property)),this._values[m].value=new ru(this._values[m].property,N===null?void 0:F(N))},_e.prototype.getTransition=function(m){return F(this._values[m].transition)},_e.prototype.setTransition=function(m,N){this._values.hasOwnProperty(m)||(this._values[m]=new wh(this._values[m].property)),this._values[m].transition=F(N)||void 0},_e.prototype.serialize=function(){for(var m={},N=0,X=Object.keys(this._values);Nthis.end)return this.prior=null,Ft;if(this.value.isDataDriven())return this.prior=null,Ft;if(wtZt.zoomHistory.lastIntegerZoom?{from:X,to:wt}:{from:Ft,to:wt}},N.prototype.interpolate=function(X){return X},N}(ai),$i=function(m){this.specification=m};$i.prototype.possiblyEvaluate=function(m,N,X,wt){if(m.value!==void 0)if(m.expression.kind==="constant"){var Ft=m.expression.evaluate(N,null,{},X,wt);return this._calculate(Ft,Ft,Ft,N)}else return this._calculate(m.expression.evaluate(new jl(Math.floor(N.zoom-1),N)),m.expression.evaluate(new jl(Math.floor(N.zoom),N)),m.expression.evaluate(new jl(Math.floor(N.zoom+1),N)),N)},$i.prototype._calculate=function(m,N,X,wt){var Ft=wt.zoom;return Ft>wt.zoomHistory.lastIntegerZoom?{from:m,to:N}:{from:X,to:N}},$i.prototype.interpolate=function(m){return m};var ya=function(m){this.specification=m};ya.prototype.possiblyEvaluate=function(m,N,X,wt){return!!m.expression.evaluate(N,null,{},X,wt)},ya.prototype.interpolate=function(){return!1};var $a=function(m){this.properties=m,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var N in m){var X=m[N];X.specification.overridable&&this.overridableProperties.push(N);var wt=this.defaultPropertyValues[N]=new ru(X,void 0),Ft=this.defaultTransitionablePropertyValues[N]=new wh(X);this.defaultTransitioningPropertyValues[N]=Ft.untransitioned(),this.defaultPossiblyEvaluatedValues[N]=wt.possiblyEvaluate({})}};sr("DataDrivenProperty",ai),sr("DataConstantProperty",yn),sr("CrossFadedDataDrivenProperty",ta),sr("CrossFadedProperty",$i),sr("ColorRampProperty",ya);var Na="-transition",ia=function(m){function N(X,wt){if(m.call(this),this.id=X.id,this.type=X.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},X.type!=="custom"&&(X=X,this.metadata=X.metadata,this.minzoom=X.minzoom,this.maxzoom=X.maxzoom,X.type!=="background"&&(this.source=X.source,this.sourceLayer=X["source-layer"],this.filter=X.filter),wt.layout&&(this._unevaluatedLayout=new Dn(wt.layout)),wt.paint)){this._transitionablePaint=new _e(wt.paint);for(var Ft in X.paint)this.setPaintProperty(Ft,X.paint[Ft],{validate:!1});for(var Zt in X.layout)this.setLayoutProperty(Zt,X.layout[Zt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ti(wt.paint)}}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},N.prototype.getLayoutProperty=function(X){return X==="visibility"?this.visibility:this._unevaluatedLayout.getValue(X)},N.prototype.setLayoutProperty=function(X,wt,Ft){if(Ft===void 0&&(Ft={}),wt!=null){var Zt="layers."+this.id+".layout."+X;if(this._validate(dc,Zt,X,wt,Ft))return}if(X==="visibility"){this.visibility=wt;return}this._unevaluatedLayout.setValue(X,wt)},N.prototype.getPaintProperty=function(X){return j(X,Na)?this._transitionablePaint.getTransition(X.slice(0,-Na.length)):this._transitionablePaint.getValue(X)},N.prototype.setPaintProperty=function(X,wt,Ft){if(Ft===void 0&&(Ft={}),wt!=null){var Zt="layers."+this.id+".paint."+X;if(this._validate(Yu,Zt,X,wt,Ft))return!1}if(j(X,Na))return this._transitionablePaint.setTransition(X.slice(0,-Na.length),wt||void 0),!1;var ie=this._transitionablePaint._values[X],Re=ie.property.specification["property-type"]==="cross-faded-data-driven",Je=ie.value.isDataDriven(),yr=ie.value;this._transitionablePaint.setValue(X,wt),this._handleSpecialPaintPropertyUpdate(X);var Cr=this._transitionablePaint._values[X].value,Kr=Cr.isDataDriven();return Kr||Je||Re||this._handleOverridablePaintPropertyUpdate(X,yr,Cr)},N.prototype._handleSpecialPaintPropertyUpdate=function(X){},N.prototype._handleOverridablePaintPropertyUpdate=function(X,wt,Ft){return!1},N.prototype.isHidden=function(X){return this.minzoom&&X=this.maxzoom?!0:this.visibility==="none"},N.prototype.updateTransitions=function(X){this._transitioningPaint=this._transitionablePaint.transitioned(X,this._transitioningPaint)},N.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},N.prototype.recalculate=function(X,wt){X.getCrossfadeParameters&&(this._crossfadeParameters=X.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(X,void 0,wt)),this.paint=this._transitioningPaint.possiblyEvaluate(X,void 0,wt)},N.prototype.serialize=function(){var X={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(X.layout=X.layout||{},X.layout.visibility=this.visibility),H(X,function(wt,Ft){return wt!==void 0&&!(Ft==="layout"&&!Object.keys(wt).length)&&!(Ft==="paint"&&!Object.keys(wt).length)})},N.prototype._validate=function(X,wt,Ft,Zt,ie){return ie===void 0&&(ie={}),ie&&ie.validate===!1?!1:$c(this,X.call($s,{key:wt,layerType:this.type,objectKey:Ft,value:Zt,styleSpec:Pa,style:{glyphs:!0,sprite:!0}}))},N.prototype.is3D=function(){return!1},N.prototype.isTileClipped=function(){return!1},N.prototype.hasOffscreenPass=function(){return!1},N.prototype.resize=function(){},N.prototype.isStateDependent=function(){for(var X in this.paint._values){var wt=this.paint.get(X);if(!(!(wt instanceof li)||!Iu(wt.property.specification))&&(wt.value.kind==="source"||wt.value.kind==="composite")&&wt.value.isStateDependent)return!0}return!1},N}(Br),Ai={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},fn=function(m,N){this._structArray=m,this._pos1=N*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},jn=128,Bi=5,Ti=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Ti.serialize=function(m,N){return m._trim(),N&&(m.isTransferred=!0,N.push(m.arrayBuffer)),{length:m.length,arrayBuffer:m.arrayBuffer}},Ti.deserialize=function(m){var N=Object.create(this.prototype);return N.arrayBuffer=m.arrayBuffer,N.length=m.length,N.capacity=m.arrayBuffer.byteLength/N.bytesPerElement,N._refreshViews(),N},Ti.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ti.prototype.clear=function(){this.length=0},Ti.prototype.resize=function(m){this.reserve(m),this.length=m},Ti.prototype.reserve=function(m){if(m>this.capacity){this.capacity=Math.max(m,Math.floor(this.capacity*Bi),jn),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var N=this.uint8;this._refreshViews(),N&&this.uint8.set(N)}},Ti.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function ei(m,N){N===void 0&&(N=1);var X=0,wt=0,Ft=m.map(function(ie){var Re=Sa(ie.type),Je=X=ha(X,Math.max(N,Re)),yr=ie.components||1;return wt=Math.max(wt,Re),X+=Re*yr,{name:ie.name,type:ie.type,components:yr,offset:Je}}),Zt=ha(X,Math.max(wt,N));return{members:Ft,size:Zt,alignment:N}}function Sa(m){return Ai[m].BYTES_PER_ELEMENT}function ha(m,N){return Math.ceil(m/N)*N}var Va=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,X,wt)},N.prototype.emplace=function(X,wt,Ft){var Zt=X*2;return this.int16[Zt+0]=wt,this.int16[Zt+1]=Ft,X},N}(Ti);Va.prototype.bytesPerElement=4,sr("StructArrayLayout2i4",Va);var xi=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,X,wt,Ft,Zt)},N.prototype.emplace=function(X,wt,Ft,Zt,ie){var Re=X*4;return this.int16[Re+0]=wt,this.int16[Re+1]=Ft,this.int16[Re+2]=Zt,this.int16[Re+3]=ie,X},N}(Ti);xi.prototype.bytesPerElement=8,sr("StructArrayLayout4i8",xi);var ri=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re){var Je=this.length;return this.resize(Je+1),this.emplace(Je,X,wt,Ft,Zt,ie,Re)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je){var yr=X*6;return this.int16[yr+0]=wt,this.int16[yr+1]=Ft,this.int16[yr+2]=Zt,this.int16[yr+3]=ie,this.int16[yr+4]=Re,this.int16[yr+5]=Je,X},N}(Ti);ri.prototype.bytesPerElement=12,sr("StructArrayLayout2i4i12",ri);var Ea=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re){var Je=this.length;return this.resize(Je+1),this.emplace(Je,X,wt,Ft,Zt,ie,Re)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je){var yr=X*4,Cr=X*8;return this.int16[yr+0]=wt,this.int16[yr+1]=Ft,this.uint8[Cr+4]=Zt,this.uint8[Cr+5]=ie,this.uint8[Cr+6]=Re,this.uint8[Cr+7]=Je,X},N}(Ti);Ea.prototype.bytesPerElement=8,sr("StructArrayLayout2i4ub8",Ea);var ma=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,X,wt)},N.prototype.emplace=function(X,wt,Ft){var Zt=X*2;return this.float32[Zt+0]=wt,this.float32[Zt+1]=Ft,X},N}(Ti);ma.prototype.bytesPerElement=8,sr("StructArrayLayout2f8",ma);var Ki=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr){var an=this.length;return this.resize(an+1),this.emplace(an,X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an){var gn=X*10;return this.uint16[gn+0]=wt,this.uint16[gn+1]=Ft,this.uint16[gn+2]=Zt,this.uint16[gn+3]=ie,this.uint16[gn+4]=Re,this.uint16[gn+5]=Je,this.uint16[gn+6]=yr,this.uint16[gn+7]=Cr,this.uint16[gn+8]=Kr,this.uint16[gn+9]=an,X},N}(Ti);Ki.prototype.bytesPerElement=20,sr("StructArrayLayout10ui20",Ki);var Ji=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn){var Rn=this.length;return this.resize(Rn+1),this.emplace(Rn,X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn){var gi=X*12;return this.int16[gi+0]=wt,this.int16[gi+1]=Ft,this.int16[gi+2]=Zt,this.int16[gi+3]=ie,this.uint16[gi+4]=Re,this.uint16[gi+5]=Je,this.uint16[gi+6]=yr,this.uint16[gi+7]=Cr,this.int16[gi+8]=Kr,this.int16[gi+9]=an,this.int16[gi+10]=gn,this.int16[gi+11]=Rn,X},N}(Ti);Ji.prototype.bytesPerElement=24,sr("StructArrayLayout4i4ui4i24",Ji);var ba=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*3;return this.float32[ie+0]=wt,this.float32[ie+1]=Ft,this.float32[ie+2]=Zt,X},N}(Ti);ba.prototype.bytesPerElement=12,sr("StructArrayLayout3f12",ba);var Io=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X){var wt=this.length;return this.resize(wt+1),this.emplace(wt,X)},N.prototype.emplace=function(X,wt){var Ft=X*1;return this.uint32[Ft+0]=wt,X},N}(Ti);Io.prototype.bytesPerElement=4,sr("StructArrayLayout1ul4",Io);var wo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr){var Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,X,wt,Ft,Zt,ie,Re,Je,yr,Cr)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr){var an=X*10,gn=X*5;return this.int16[an+0]=wt,this.int16[an+1]=Ft,this.int16[an+2]=Zt,this.int16[an+3]=ie,this.int16[an+4]=Re,this.int16[an+5]=Je,this.uint32[gn+3]=yr,this.uint16[an+8]=Cr,this.uint16[an+9]=Kr,X},N}(Ti);wo.prototype.bytesPerElement=20,sr("StructArrayLayout6i1ul2ui20",wo);var _a=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re){var Je=this.length;return this.resize(Je+1),this.emplace(Je,X,wt,Ft,Zt,ie,Re)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je){var yr=X*6;return this.int16[yr+0]=wt,this.int16[yr+1]=Ft,this.int16[yr+2]=Zt,this.int16[yr+3]=ie,this.int16[yr+4]=Re,this.int16[yr+5]=Je,X},N}(Ti);_a.prototype.bytesPerElement=12,sr("StructArrayLayout2i2i2i12",_a);var Fa=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie){var Re=this.length;return this.resize(Re+1),this.emplace(Re,X,wt,Ft,Zt,ie)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re){var Je=X*4,yr=X*8;return this.float32[Je+0]=wt,this.float32[Je+1]=Ft,this.float32[Je+2]=Zt,this.int16[yr+6]=ie,this.int16[yr+7]=Re,X},N}(Ti);Fa.prototype.bytesPerElement=16,sr("StructArrayLayout2f1f2i16",Fa);var vo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,X,wt,Ft,Zt)},N.prototype.emplace=function(X,wt,Ft,Zt,ie){var Re=X*12,Je=X*3;return this.uint8[Re+0]=wt,this.uint8[Re+1]=Ft,this.float32[Je+1]=Zt,this.float32[Je+2]=ie,X},N}(Ti);vo.prototype.bytesPerElement=12,sr("StructArrayLayout2ub2f12",vo);var Eo=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*3;return this.uint16[ie+0]=wt,this.uint16[ie+1]=Ft,this.uint16[ie+2]=Zt,X},N}(Ti);Eo.prototype.bytesPerElement=6,sr("StructArrayLayout3ui6",Eo);var es=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa){var Ra=this.length;return this.resize(Ra+1),this.emplace(Ra,X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa,Ra){var xa=X*24,Xa=X*12,bo=X*48;return this.int16[xa+0]=wt,this.int16[xa+1]=Ft,this.uint16[xa+2]=Zt,this.uint16[xa+3]=ie,this.uint32[Xa+2]=Re,this.uint32[Xa+3]=Je,this.uint32[Xa+4]=yr,this.uint16[xa+10]=Cr,this.uint16[xa+11]=Kr,this.uint16[xa+12]=an,this.float32[Xa+7]=gn,this.float32[Xa+8]=Rn,this.uint8[bo+36]=gi,this.uint8[bo+37]=ua,this.uint8[bo+38]=oa,this.uint32[Xa+10]=wa,this.int16[xa+22]=Ra,X},N}(Ti);es.prototype.bytesPerElement=48,sr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",es);var Ul=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa,Ra,xa,Xa,bo,Uo,Vo,ws,ks,Rs,Ys,ll){var Bs=this.length;return this.resize(Bs+1),this.emplace(Bs,X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa,Ra,xa,Xa,bo,Uo,Vo,ws,ks,Rs,Ys,ll)},N.prototype.emplace=function(X,wt,Ft,Zt,ie,Re,Je,yr,Cr,Kr,an,gn,Rn,gi,ua,oa,wa,Ra,xa,Xa,bo,Uo,Vo,ws,ks,Rs,Ys,ll,Bs){var Hs=X*34,Nu=X*17;return this.int16[Hs+0]=wt,this.int16[Hs+1]=Ft,this.int16[Hs+2]=Zt,this.int16[Hs+3]=ie,this.int16[Hs+4]=Re,this.int16[Hs+5]=Je,this.int16[Hs+6]=yr,this.int16[Hs+7]=Cr,this.uint16[Hs+8]=Kr,this.uint16[Hs+9]=an,this.uint16[Hs+10]=gn,this.uint16[Hs+11]=Rn,this.uint16[Hs+12]=gi,this.uint16[Hs+13]=ua,this.uint16[Hs+14]=oa,this.uint16[Hs+15]=wa,this.uint16[Hs+16]=Ra,this.uint16[Hs+17]=xa,this.uint16[Hs+18]=Xa,this.uint16[Hs+19]=bo,this.uint16[Hs+20]=Uo,this.uint16[Hs+21]=Vo,this.uint16[Hs+22]=ws,this.uint32[Nu+12]=ks,this.float32[Nu+13]=Rs,this.float32[Nu+14]=Ys,this.float32[Nu+15]=ll,this.float32[Nu+16]=Bs,X},N}(Ti);Ul.prototype.bytesPerElement=68,sr("StructArrayLayout8i15ui1ul4f68",Ul);var Al=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X){var wt=this.length;return this.resize(wt+1),this.emplace(wt,X)},N.prototype.emplace=function(X,wt){var Ft=X*1;return this.float32[Ft+0]=wt,X},N}(Ti);Al.prototype.bytesPerElement=4,sr("StructArrayLayout1f4",Al);var hs=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*3;return this.int16[ie+0]=wt,this.int16[ie+1]=Ft,this.int16[ie+2]=Zt,X},N}(Ti);hs.prototype.bytesPerElement=6,sr("StructArrayLayout3i6",hs);var ku=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,X,wt,Ft)},N.prototype.emplace=function(X,wt,Ft,Zt){var ie=X*2,Re=X*4;return this.uint32[ie+0]=wt,this.uint16[Re+2]=Ft,this.uint16[Re+3]=Zt,X},N}(Ti);ku.prototype.bytesPerElement=8,sr("StructArrayLayout1ul2ui8",ku);var dl=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt){var Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,X,wt)},N.prototype.emplace=function(X,wt,Ft){var Zt=X*2;return this.uint16[Zt+0]=wt,this.uint16[Zt+1]=Ft,X},N}(Ti);dl.prototype.bytesPerElement=4,sr("StructArrayLayout2ui4",dl);var Cu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X){var wt=this.length;return this.resize(wt+1),this.emplace(wt,X)},N.prototype.emplace=function(X,wt){var Ft=X*1;return this.uint16[Ft+0]=wt,X},N}(Ti);Cu.prototype.bytesPerElement=2,sr("StructArrayLayout1ui2",Cu);var pc=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},N.prototype.emplaceBack=function(X,wt,Ft,Zt){var ie=this.length;return this.resize(ie+1),this.emplace(ie,X,wt,Ft,Zt)},N.prototype.emplace=function(X,wt,Ft,Zt,ie){var Re=X*4;return this.float32[Re+0]=wt,this.float32[Re+1]=Ft,this.float32[Re+2]=Zt,this.float32[Re+3]=ie,X},N}(Ti);pc.prototype.bytesPerElement=16,sr("StructArrayLayout4f16",pc);var yc=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return X.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},X.x1.get=function(){return this._structArray.int16[this._pos2+2]},X.y1.get=function(){return this._structArray.int16[this._pos2+3]},X.x2.get=function(){return this._structArray.int16[this._pos2+4]},X.y2.get=function(){return this._structArray.int16[this._pos2+5]},X.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},X.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},X.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},X.anchorPoint.get=function(){return new o(this.anchorPointX,this.anchorPointY)},Object.defineProperties(N.prototype,X),N}(fn);yc.prototype.size=20;var xu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new yc(this,X)},N}(wo);sr("CollisionBoxArray",xu);var pu=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return X.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},X.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},X.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},X.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},X.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},X.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},X.segment.get=function(){return this._structArray.uint16[this._pos2+10]},X.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},X.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},X.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},X.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},X.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},X.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},X.placedOrientation.set=function(wt){this._structArray.uint8[this._pos1+37]=wt},X.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},X.hidden.set=function(wt){this._structArray.uint8[this._pos1+38]=wt},X.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},X.crossTileID.set=function(wt){this._structArray.uint32[this._pos4+10]=wt},X.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(N.prototype,X),N}(fn);pu.prototype.size=48;var Tu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new pu(this,X)},N}(es);sr("PlacedSymbolArray",Tu);var No=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return X.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},X.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},X.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},X.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},X.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},X.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},X.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},X.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},X.key.get=function(){return this._structArray.uint16[this._pos2+8]},X.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},X.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},X.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},X.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},X.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},X.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},X.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},X.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},X.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},X.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},X.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},X.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},X.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},X.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},X.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},X.crossTileID.set=function(wt){this._structArray.uint32[this._pos4+12]=wt},X.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},X.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},X.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},X.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(N.prototype,X),N}(fn);No.prototype.size=68;var Au=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new No(this,X)},N}(Ul);sr("SymbolInstanceArray",Au);var sl=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.getoffsetX=function(X){return this.float32[X*1+0]},N}(Al);sr("GlyphOffsetArray",sl);var Lu=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.getx=function(X){return this.int16[X*3+0]},N.prototype.gety=function(X){return this.int16[X*3+1]},N.prototype.gettileUnitDistanceFromAnchor=function(X){return this.int16[X*3+2]},N}(hs);sr("SymbolLineVertexArray",Lu);var xc=function(m){function N(){m.apply(this,arguments)}m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N;var X={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return X.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},X.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},X.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(N.prototype,X),N}(fn);xc.prototype.size=8;var Co=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.get=function(X){return new xc(this,X)},N}(ku);sr("FeatureIndexArray",Co);var Cs=ei([{name:"a_pos",components:2,type:"Int16"}],4),Ml=Cs.members,yl=function(m){m===void 0&&(m=[]),this.segments=m};yl.prototype.prepareSegment=function(m,N,X,wt){var Ft=this.segments[this.segments.length-1];return m>yl.MAX_VERTEX_ARRAY_LENGTH&&q("Max vertices per segment is "+yl.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+m),(!Ft||Ft.vertexLength+m>yl.MAX_VERTEX_ARRAY_LENGTH||Ft.sortKey!==wt)&&(Ft={vertexOffset:N.length,primitiveOffset:X.length,vertexLength:0,primitiveLength:0},wt!==void 0&&(Ft.sortKey=wt),this.segments.push(Ft)),Ft},yl.prototype.get=function(){return this.segments},yl.prototype.destroy=function(){for(var m=0,N=this.segments;m>>16)*Je&65535)<<16)&4294967295,Cr=Cr<<15|Cr>>>17,Cr=(Cr&65535)*yr+(((Cr>>>16)*yr&65535)<<16)&4294967295,ie^=Cr,ie=ie<<13|ie>>>19,Re=(ie&65535)*5+(((ie>>>16)*5&65535)<<16)&4294967295,ie=(Re&65535)+27492+(((Re>>>16)+58964&65535)<<16);switch(Cr=0,Ft){case 3:Cr^=(X.charCodeAt(Kr+2)&255)<<16;case 2:Cr^=(X.charCodeAt(Kr+1)&255)<<8;case 1:Cr^=X.charCodeAt(Kr)&255,Cr=(Cr&65535)*Je+(((Cr>>>16)*Je&65535)<<16)&4294967295,Cr=Cr<<15|Cr>>>17,Cr=(Cr&65535)*yr+(((Cr>>>16)*yr&65535)<<16)&4294967295,ie^=Cr}return ie^=X.length,ie^=ie>>>16,ie=(ie&65535)*2246822507+(((ie>>>16)*2246822507&65535)<<16)&4294967295,ie^=ie>>>13,ie=(ie&65535)*3266489909+(((ie>>>16)*3266489909&65535)<<16)&4294967295,ie^=ie>>>16,ie>>>0}m.exports=N}),xt=e(function(m){function N(X,wt){for(var Ft=X.length,Zt=wt^Ft,ie=0,Re;Ft>=4;)Re=X.charCodeAt(ie)&255|(X.charCodeAt(++ie)&255)<<8|(X.charCodeAt(++ie)&255)<<16|(X.charCodeAt(++ie)&255)<<24,Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16),Re^=Re>>>24,Re=(Re&65535)*1540483477+(((Re>>>16)*1540483477&65535)<<16),Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)^Re,Ft-=4,++ie;switch(Ft){case 3:Zt^=(X.charCodeAt(ie+2)&255)<<16;case 2:Zt^=(X.charCodeAt(ie+1)&255)<<8;case 1:Zt^=X.charCodeAt(ie)&255,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16)}return Zt^=Zt>>>13,Zt=(Zt&65535)*1540483477+(((Zt>>>16)*1540483477&65535)<<16),Zt^=Zt>>>15,Zt>>>0}m.exports=N}),Vt=et,de=et,ye=xt;Vt.murmur3=de,Vt.murmur2=ye;var Yt=function(){this.ids=[],this.positions=[],this.indexed=!1};Yt.prototype.add=function(m,N,X,wt){this.ids.push(Se(m)),this.positions.push(N,X,wt)},Yt.prototype.getPositions=function(m){for(var N=Se(m),X=0,wt=this.ids.length-1;X>1;this.ids[Ft]>=N?wt=Ft:X=Ft+1}for(var Zt=[];this.ids[X]===N;){var ie=this.positions[3*X],Re=this.positions[3*X+1],Je=this.positions[3*X+2];Zt.push({index:ie,start:Re,end:Je}),X++}return Zt},Yt.serialize=function(m,N){var X=new Float64Array(m.ids),wt=new Uint32Array(m.positions);return ir(X,wt,0,X.length-1),N&&N.push(X.buffer,wt.buffer),{ids:X,positions:wt}},Yt.deserialize=function(m){var N=new Yt;return N.ids=m.ids,N.positions=m.positions,N.indexed=!0,N};var ce=Math.pow(2,53)-1;function Se(m){var N=+m;return!isNaN(N)&&N<=ce?N:Vt(String(m))}function ir(m,N,X,wt){for(;X>1],Zt=X-1,ie=wt+1;;){do Zt++;while(m[Zt]Ft);if(Zt>=ie)break;Ye(m,Zt,ie),Ye(N,3*Zt,3*ie),Ye(N,3*Zt+1,3*ie+1),Ye(N,3*Zt+2,3*ie+2)}ie-Xie.x+1||Jeie.y+1)&&q("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return X}function Hl(m,N){return{type:m.type,id:m.id,properties:m.properties,geometry:N?pl(m):[]}}function _c(m,N,X,wt,Ft){m.emplaceBack(N*2+(wt+1)/2,X*2+(Ft+1)/2)}var Fs=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(N){return N.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new Va,this.indexArray=new Eo,this.segments=new yl,this.programConfigurations=new Li(m.layers,m.zoom),this.stateDependentLayerIds=this.layers.filter(function(N){return N.isStateDependent()}).map(function(N){return N.id})};Fs.prototype.populate=function(m,N,X){var wt=this.layers[0],Ft=[],Zt=null;wt.type==="circle"&&(Zt=wt.layout.get("circle-sort-key"));for(var ie=0,Re=m;ie=qo||Kr<0||Kr>=qo)){var an=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,m.sortKey),gn=an.vertexLength;_c(this.layoutVertexArray,Cr,Kr,-1,-1),_c(this.layoutVertexArray,Cr,Kr,1,-1),_c(this.layoutVertexArray,Cr,Kr,1,1),_c(this.layoutVertexArray,Cr,Kr,-1,1),this.indexArray.emplaceBack(gn,gn+1,gn+2),this.indexArray.emplaceBack(gn,gn+3,gn+2),an.vertexLength+=4,an.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,m,X,{},wt)},sr("CircleBucket",Fs,{omit:["layers"]});function Mu(m,N){for(var X=0;X=3){for(var Zt=0;Zt1){if(Tp(m,N))return!0;for(var wt=0;wt1?m.distSqr(X):m.distSqr(X.sub(N)._mult(Ft)._add(N))}function Mp(m,N){for(var X=!1,wt,Ft,Zt,ie=0;ieN.y!=Zt.y>N.y&&N.x<(Zt.x-Ft.x)*(N.y-Ft.y)/(Zt.y-Ft.y)+Ft.x&&(X=!X)}return X}function Hd(m,N){for(var X=!1,wt=0,Ft=m.length-1;wtN.y!=ie.y>N.y&&N.x<(ie.x-Zt.x)*(N.y-Zt.y)/(ie.y-Zt.y)+Zt.x&&(X=!X)}return X}function Q0(m,N,X,wt,Ft){for(var Zt=0,ie=m;Zt=Re.x&&Ft>=Re.y)return!0}var Je=[new o(N,X),new o(N,Ft),new o(wt,Ft),new o(wt,X)];if(m.length>2)for(var yr=0,Cr=Je;yrFt.x&&N.x>Ft.x||m.yFt.y&&N.y>Ft.y)return!1;var Zt=J(m,N,X[0]);return Zt!==J(m,N,X[1])||Zt!==J(m,N,X[2])||Zt!==J(m,N,X[3])}function Sp(m,N,X){var wt=N.paint.get(m).value;return wt.kind==="constant"?wt.value:X.programConfigurations.get(N.id).getMaxValue(m)}function Ep(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function tp(m,N,X,wt,Ft){if(!N[0]&&!N[1])return m;var Zt=o.convert(N)._mult(Ft);X==="viewport"&&Zt._rotate(-wt);for(var ie=[],Re=0;Re0&&(Zt=1/Math.sqrt(Zt)),m[0]=N[0]*Zt,m[1]=N[1]*Zt,m[2]=N[2]*Zt,m}function RT(m,N){return m[0]*N[0]+m[1]*N[1]+m[2]*N[2]}function BT(m,N,X){var wt=N[0],Ft=N[1],Zt=N[2],ie=X[0],Re=X[1],Je=X[2];return m[0]=Ft*Je-Zt*Re,m[1]=Zt*ie-wt*Je,m[2]=wt*Re-Ft*ie,m}function NT(m,N,X){var wt=N[0],Ft=N[1],Zt=N[2];return m[0]=wt*X[0]+Ft*X[3]+Zt*X[6],m[1]=wt*X[1]+Ft*X[4]+Zt*X[7],m[2]=wt*X[2]+Ft*X[5]+Zt*X[8],m}var jT=xb;(function(){var m=kx();return function(N,X,wt,Ft,Zt,ie){var Re,Je;for(X||(X=3),wt||(wt=0),Ft?Je=Math.min(Ft*X+wt,N.length):Je=N.length,Re=wt;Rem.width||Ft.height>m.height||X.x>m.width-Ft.width||X.y>m.height-Ft.height)throw new RangeError("out of range source coordinates for image copy");if(Ft.width>N.width||Ft.height>N.height||wt.x>N.width-Ft.width||wt.y>N.height-Ft.height)throw new RangeError("out of range destination coordinates for image copy");for(var ie=m.data,Re=N.data,Je=0;Je80*X){Re=yr=m[0],Je=Cr=m[1];for(var Rn=X;Rnyr&&(yr=Kr),an>Cr&&(Cr=an);gn=Math.max(yr-Re,Cr-Je),gn=gn!==0?1/gn:0}return Ng(Zt,ie,X,Re,Je,gn),ie}function kb(m,N,X,wt,Ft){var Zt,ie;if(Ft===Cb(m,N,X,wt)>0)for(Zt=N;Zt=N;Zt-=wt)ie=U3(Zt,m[Zt],m[Zt+1],ie);return ie&&Fv(ie,ie.next)&&(Q1(ie),ie=ie.next),ie}function Tm(m,N){if(!m)return m;N||(N=m);var X=m,wt;do if(wt=!1,!X.steiner&&(Fv(X,X.next)||pf(X.prev,X,X.next)===0)){if(Q1(X),X=N=X.prev,X===X.next)break;wt=!0}else X=X.next;while(wt||X!==N);return N}function Ng(m,N,X,wt,Ft,Zt,ie){if(m){!ie&&Zt&&Ab(m,wt,Ft,Zt);for(var Re=m,Je,yr;m.prev!==m.next;){if(Je=m.prev,yr=m.next,Zt?ZT(m,wt,Ft,Zt):Tb(m)){N.push(Je.i/X),N.push(m.i/X),N.push(yr.i/X),Q1(m),m=yr.next,Re=yr.next;continue}if(m=yr,m===Re){ie?ie===1?(m=GT(Tm(m),N,X),Ng(m,N,X,wt,Ft,Zt,2)):ie===2&&B3(m,N,X,wt,Ft,Zt):Ng(Tm(m),N,X,wt,Ft,Zt,1);break}}}}function Tb(m){var N=m.prev,X=m,wt=m.next;if(pf(N,X,wt)>=0)return!1;for(var Ft=m.next.next;Ft!==m.prev;){if(Qm(N.x,N.y,X.x,X.y,wt.x,wt.y,Ft.x,Ft.y)&&pf(Ft.prev,Ft,Ft.next)>=0)return!1;Ft=Ft.next}return!0}function ZT(m,N,X,wt){var Ft=m.prev,Zt=m,ie=m.next;if(pf(Ft,Zt,ie)>=0)return!1;for(var Re=Ft.xZt.x?Ft.x>ie.x?Ft.x:ie.x:Zt.x>ie.x?Zt.x:ie.x,Cr=Ft.y>Zt.y?Ft.y>ie.y?Ft.y:ie.y:Zt.y>ie.y?Zt.y:ie.y,Kr=Mb(Re,Je,N,X,wt),an=Mb(yr,Cr,N,X,wt),gn=m.prevZ,Rn=m.nextZ;gn&&gn.z>=Kr&&Rn&&Rn.z<=an;){if(gn!==m.prev&&gn!==m.next&&Qm(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,gn.x,gn.y)&&pf(gn.prev,gn,gn.next)>=0||(gn=gn.prevZ,Rn!==m.prev&&Rn!==m.next&&Qm(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0))return!1;Rn=Rn.nextZ}for(;gn&&gn.z>=Kr;){if(gn!==m.prev&&gn!==m.next&&Qm(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,gn.x,gn.y)&&pf(gn.prev,gn,gn.next)>=0)return!1;gn=gn.prevZ}for(;Rn&&Rn.z<=an;){if(Rn!==m.prev&&Rn!==m.next&&Qm(Ft.x,Ft.y,Zt.x,Zt.y,ie.x,ie.y,Rn.x,Rn.y)&&pf(Rn.prev,Rn,Rn.next)>=0)return!1;Rn=Rn.nextZ}return!0}function GT(m,N,X){var wt=m;do{var Ft=wt.prev,Zt=wt.next.next;!Fv(Ft,Zt)&&jg(Ft,wt,wt.next,Zt)&&Rv(Ft,Zt)&&Rv(Zt,Ft)&&(N.push(Ft.i/X),N.push(wt.i/X),N.push(Zt.i/X),Q1(wt),Q1(wt.next),wt=m=Zt),wt=wt.next}while(wt!==m);return Tm(wt)}function B3(m,N,X,wt,Ft,Zt){var ie=m;do{for(var Re=ie.next.next;Re!==ie.prev;){if(ie.i!==Re.i&&KT(ie,Re)){var Je=Eb(ie,Re);ie=Tm(ie,ie.next),Je=Tm(Je,Je.next),Ng(ie,N,X,wt,Ft,Zt),Ng(Je,N,X,wt,Ft,Zt);return}Re=Re.next}ie=ie.next}while(ie!==m)}function N3(m,N,X,wt){var Ft=[],Zt,ie,Re,Je,yr;for(Zt=0,ie=N.length;Zt=X.next.y&&X.next.y!==X.y){var Re=X.x+(Ft-X.y)*(X.next.x-X.x)/(X.next.y-X.y);if(Re<=wt&&Re>Zt){if(Zt=Re,Re===wt){if(Ft===X.y)return X;if(Ft===X.next.y)return X.next}ie=X.x=X.x&&X.x>=yr&&wt!==X.x&&Qm(Ftie.x||X.x===ie.x&&j3(ie,X)))&&(ie=X,Kr=an)),X=X.next;while(X!==Je);return ie}function j3(m,N){return pf(m.prev,m,N.prev)<0&&pf(N.next,m,m.next)<0}function Ab(m,N,X,wt){var Ft=m;do Ft.z===null&&(Ft.z=Mb(Ft.x,Ft.y,N,X,wt)),Ft.prevZ=Ft.prev,Ft.nextZ=Ft.next,Ft=Ft.next;while(Ft!==m);Ft.prevZ.nextZ=null,Ft.prevZ=null,YT(Ft)}function YT(m){var N,X,wt,Ft,Zt,ie,Re,Je,yr=1;do{for(X=m,m=null,Zt=null,ie=0;X;){for(ie++,wt=X,Re=0,N=0;N0||Je>0&&wt;)Re!==0&&(Je===0||!wt||X.z<=wt.z)?(Ft=X,X=X.nextZ,Re--):(Ft=wt,wt=wt.nextZ,Je--),Zt?Zt.nextZ=Ft:m=Ft,Ft.prevZ=Zt,Zt=Ft;X=wt}Zt.nextZ=null,yr*=2}while(ie>1);return m}function Mb(m,N,X,wt,Ft){return m=32767*(m-X)*Ft,N=32767*(N-wt)*Ft,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,m|N<<1}function Ix(m){var N=m,X=m;do(N.x=0&&(m-ie)*(wt-Re)-(X-ie)*(N-Re)>=0&&(X-ie)*(Zt-Re)-(Ft-ie)*(wt-Re)>=0}function KT(m,N){return m.next.i!==N.i&&m.prev.i!==N.i&&!Sb(m,N)&&(Rv(m,N)&&Rv(N,m)&&zx(m,N)&&(pf(m.prev,m,N.prev)||pf(m,N.prev,N))||Fv(m,N)&&pf(m.prev,m,m.next)>0&&pf(N.prev,N,N.next)>0)}function pf(m,N,X){return(N.y-m.y)*(X.x-N.x)-(N.x-m.x)*(X.y-N.y)}function Fv(m,N){return m.x===N.x&&m.y===N.y}function jg(m,N,X,wt){var Ft=J1(pf(m,N,X)),Zt=J1(pf(m,N,wt)),ie=J1(pf(X,wt,m)),Re=J1(pf(X,wt,N));return!!(Ft!==Zt&&ie!==Re||Ft===0&&X1(m,X,N)||Zt===0&&X1(m,wt,N)||ie===0&&X1(X,m,wt)||Re===0&&X1(X,N,wt))}function X1(m,N,X){return N.x<=Math.max(m.x,X.x)&&N.x>=Math.min(m.x,X.x)&&N.y<=Math.max(m.y,X.y)&&N.y>=Math.min(m.y,X.y)}function J1(m){return m>0?1:m<0?-1:0}function Sb(m,N){var X=m;do{if(X.i!==m.i&&X.next.i!==m.i&&X.i!==N.i&&X.next.i!==N.i&&jg(X,X.next,m,N))return!0;X=X.next}while(X!==m);return!1}function Rv(m,N){return pf(m.prev,m,m.next)<0?pf(m,N,m.next)>=0&&pf(m,m.prev,N)>=0:pf(m,N,m.prev)<0||pf(m,m.next,N)<0}function zx(m,N){var X=m,wt=!1,Ft=(m.x+N.x)/2,Zt=(m.y+N.y)/2;do X.y>Zt!=X.next.y>Zt&&X.next.y!==X.y&&Ft<(X.next.x-X.x)*(Zt-X.y)/(X.next.y-X.y)+X.x&&(wt=!wt),X=X.next;while(X!==m);return wt}function Eb(m,N){var X=new Ox(m.i,m.x,m.y),wt=new Ox(N.i,N.x,N.y),Ft=m.next,Zt=N.prev;return m.next=N,N.prev=m,X.next=Ft,Ft.prev=X,wt.next=X,X.prev=wt,Zt.next=wt,wt.prev=Zt,wt}function U3(m,N,X,wt){var Ft=new Ox(m,N,X);return wt?(Ft.next=wt.next,Ft.prev=wt,wt.next.prev=Ft,wt.next=Ft):(Ft.prev=Ft,Ft.next=Ft),Ft}function Q1(m){m.next.prev=m.prev,m.prev.next=m.next,m.prevZ&&(m.prevZ.nextZ=m.nextZ),m.nextZ&&(m.nextZ.prevZ=m.prevZ)}function Ox(m,N,X){this.i=m,this.x=N,this.y=X,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}Px.deviation=function(m,N,X,wt){var Ft=N&&N.length,Zt=Ft?N[0]*X:m.length,ie=Math.abs(Cb(m,0,Zt,X));if(Ft)for(var Re=0,Je=N.length;Re0&&(wt+=m[Ft-1].length,X.holes.push(wt))}return X},Lx.default=R3;function XT(m,N,X,wt,Ft){V3(m,N,X,wt||m.length-1,Ft||Lb)}function V3(m,N,X,wt,Ft){for(;wt>X;){if(wt-X>600){var Zt=wt-X+1,ie=N-X+1,Re=Math.log(Zt),Je=.5*Math.exp(2*Re/3),yr=.5*Math.sqrt(Re*Je*(Zt-Je)/Zt)*(ie-Zt/2<0?-1:1),Cr=Math.max(X,Math.floor(N-ie*Je/Zt+yr)),Kr=Math.min(wt,Math.floor(N+(Zt-ie)*Je/Zt+yr));V3(m,N,Cr,Kr,Ft)}var an=m[N],gn=X,Rn=wt;for(ty(m,X,N),Ft(m[wt],an)>0&&ty(m,X,wt);gn0;)Rn--}Ft(m[X],an)===0?ty(m,X,Rn):(Rn++,ty(m,Rn,wt)),Rn<=N&&(X=Rn+1),N<=Rn&&(wt=Rn-1)}}function ty(m,N,X){var wt=m[N];m[N]=m[X],m[X]=wt}function Lb(m,N){return mN?1:0}function em(m,N){var X=m.length;if(X<=1)return[m];for(var wt=[],Ft,Zt,ie=0;ie1)for(var Je=0;Je>3}if(wt--,X===1||X===2)Ft+=m.readSVarint(),Zt+=m.readSVarint(),X===1&&(Re&&ie.push(Re),Re=[]),Re.push(new o(Ft,Zt));else if(X===7)Re&&Re.push(Re[0].clone());else throw new Error("unknown command "+X)}return Re&&ie.push(Re),ie},Ug.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var N=m.readVarint()+m.pos,X=1,wt=0,Ft=0,Zt=0,ie=1/0,Re=-1/0,Je=1/0,yr=-1/0;m.pos>3}if(wt--,X===1||X===2)Ft+=m.readSVarint(),Zt+=m.readSVarint(),FtRe&&(Re=Ft),Ztyr&&(yr=Zt);else if(X!==7)throw new Error("unknown command "+X)}return[ie,Je,Re,yr]},Ug.prototype.toGeoJSON=function(m,N,X){var wt=this.extent*Math.pow(2,X),Ft=this.extent*m,Zt=this.extent*N,ie=this.loadGeometry(),Re=Ug.types[this.type],Je,yr;function Cr(gn){for(var Rn=0;Rn>3;N=wt===1?m.readString():wt===2?m.readFloat():wt===3?m.readDouble():wt===4?m.readVarint64():wt===5?m.readVarint():wt===6?m.readSVarint():wt===7?m.readBoolean():null}return N}X3.prototype.feature=function(m){if(m<0||m>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[m];var N=this._pbf.readVarint()+this._pbf.pos;return new Bv(this._pbf,N,this.extent,this._keys,this._values)};var Q3=t5;function t5(m,N){this.layers=m.readFields(e5,{},N)}function e5(m,N,X){if(m===3){var wt=new zb(X,X.readVarint()+X.pos);wt.length&&(N[wt.name]=wt)}}var r5=Q3,JT=Bv,QT=zb,Vg={VectorTile:r5,VectorTileFeature:JT,VectorTileLayer:QT},Nv=Vg.VectorTileFeature.types,n5=500,jv=Math.pow(2,13);function Uv(m,N,X,wt,Ft,Zt,ie,Re){m.emplaceBack(N,X,Math.floor(wt*jv)*2+ie,Ft*jv*2,Zt*jv*2,Math.round(Re))}var Up=function(m){this.zoom=m.zoom,this.overscaling=m.overscaling,this.layers=m.layers,this.layerIds=this.layers.map(function(N){return N.id}),this.index=m.index,this.hasPattern=!1,this.layoutVertexArray=new ri,this.indexArray=new Eo,this.programConfigurations=new Li(m.layers,m.zoom),this.segments=new yl,this.stateDependentLayerIds=this.layers.filter(function(N){return N.isStateDependent()}).map(function(N){return N.id})};Up.prototype.populate=function(m,N,X){this.features=[],this.hasPattern=Dx("fill-extrusion",this.layers,N);for(var wt=0,Ft=m;wt=1){var Ra=gi[oa-1];if(!Rx(wa,Ra)){an.vertexLength+4>yl.MAX_VERTEX_ARRAY_LENGTH&&(an=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var xa=wa.sub(Ra)._perp()._unit(),Xa=Ra.dist(wa);ua+Xa>32768&&(ua=0),Uv(this.layoutVertexArray,wa.x,wa.y,xa.x,xa.y,0,0,ua),Uv(this.layoutVertexArray,wa.x,wa.y,xa.x,xa.y,0,1,ua),ua+=Xa,Uv(this.layoutVertexArray,Ra.x,Ra.y,xa.x,xa.y,0,0,ua),Uv(this.layoutVertexArray,Ra.x,Ra.y,xa.x,xa.y,0,1,ua);var bo=an.vertexLength;this.indexArray.emplaceBack(bo,bo+2,bo+1),this.indexArray.emplaceBack(bo+1,bo+2,bo+3),an.vertexLength+=4,an.primitiveLength+=2}}}}if(an.vertexLength+Je>yl.MAX_VERTEX_ARRAY_LENGTH&&(an=this.segments.prepareSegment(Je,this.layoutVertexArray,this.indexArray)),Nv[m.type]==="Polygon"){for(var Uo=[],Vo=[],ws=an.vertexLength,ks=0,Rs=Re;ksqo)||m.y===N.y&&(m.y<0||m.y>qo)}function Bx(m){return m.every(function(N){return N.x<0})||m.every(function(N){return N.x>qo})||m.every(function(N){return N.y<0})||m.every(function(N){return N.y>qo})}var t8=new $a({"fill-extrusion-opacity":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ai(Pa["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ta(Pa["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ai(Pa["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ai(Pa["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new yn(Pa["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),e8={paint:t8},r8=function(m){function N(X){m.call(this,X,e8)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.createBucket=function(X){return new Up(X)},N.prototype.queryRadius=function(){return Ep(this.paint.get("fill-extrusion-translate"))},N.prototype.is3D=function(){return!0},N.prototype.queryIntersectsFeature=function(X,wt,Ft,Zt,ie,Re,Je,yr){var Cr=tp(X,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Re.angle,Je),Kr=this.paint.get("fill-extrusion-height").evaluate(wt,Ft),an=this.paint.get("fill-extrusion-base").evaluate(wt,Ft),gn=i5(Cr,yr,Re,0),Rn=Ob(Zt,an,Kr,yr),gi=Rn[0],ua=Rn[1];return eg(gi,ua,gn)},N}(ia);function rm(m,N){return m.x*N.x+m.y*N.y}function Id(m,N){if(m.length===1){for(var X=0,wt=N[X++],Ft;!Ft||wt.equals(Ft);)if(Ft=N[X++],!Ft)return 1/0;for(;X=2&&m[Je-1].equals(m[Je-2]);)Je--;for(var yr=0;yr0;if(Uo&&oa>yr){var ws=an.dist(gn);if(ws>2*Cr){var ks=an.sub(an.sub(gn)._mult(Cr/ws)._round());this.updateDistance(gn,ks),this.addCurrentVertex(ks,gi,0,0,Kr),gn=ks}}var Rs=gn&&Rn,Ys=Rs?X:Re?"butt":wt;if(Rs&&Ys==="round"&&(XaFt&&(Ys="bevel"),Ys==="bevel"&&(Xa>2&&(Ys="flipbevel"),Xa100)wa=ua.mult(-1);else{var ll=Xa*gi.add(ua).mag()/gi.sub(ua).mag();wa._perp()._mult(ll*(Vo?-1:1))}this.addCurrentVertex(an,wa,0,0,Kr),this.addCurrentVertex(an,wa.mult(-1),0,0,Kr)}else if(Ys==="bevel"||Ys==="fakeround"){var Bs=-Math.sqrt(Xa*Xa-1),Hs=Vo?Bs:0,Nu=Vo?0:Bs;if(gn&&this.addCurrentVertex(an,gi,Hs,Nu,Kr),Ys==="fakeround")for(var zc=Math.round(bo*180/Math.PI/Rb),hh=1;hh2*Cr){var id=an.add(Rn.sub(an)._mult(Cr/Gd)._round());this.updateDistance(an,id),this.addCurrentVertex(id,ua,0,0,Kr),an=id}}}}},qd.prototype.addCurrentVertex=function(m,N,X,wt,Ft,Zt){Zt===void 0&&(Zt=!1);var ie=N.x+N.y*X,Re=N.y-N.x*X,Je=-N.x+N.y*wt,yr=-N.y-N.x*wt;this.addHalfVertex(m,ie,Re,Zt,!1,X,Ft),this.addHalfVertex(m,Je,yr,Zt,!0,-wt,Ft),this.distance>Nx/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(m,N,X,wt,Ft,Zt))},qd.prototype.addHalfVertex=function(m,N,X,wt,Ft,Zt,ie){var Re=m.x,Je=m.y,yr=this.lineClips?this.scaledDistance*(Nx-1):this.scaledDistance,Cr=yr*Vv;if(this.layoutVertexArray.emplaceBack((Re<<1)+(wt?1:0),(Je<<1)+(Ft?1:0),Math.round(l5*N)+128,Math.round(l5*X)+128,(Zt===0?0:Zt<0?-1:1)+1|(Cr&63)<<2,Cr>>6),this.lineClips){var Kr=this.scaledDistance-this.lineClips.start,an=this.lineClips.end-this.lineClips.start,gn=Kr/an;this.layoutVertexArray2.emplaceBack(gn,this.lineClipsArray.length)}var Rn=ie.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rn),ie.primitiveLength++),Ft?this.e2=Rn:this.e1=Rn},qd.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},qd.prototype.updateDistance=function(m,N){this.distance+=m.dist(N),this.updateScaledDistance()},sr("LineBucket",qd,{omit:["layers","patternFeatures"]});var Bb=new $a({"line-cap":new yn(Pa.layout_line["line-cap"]),"line-join":new ai(Pa.layout_line["line-join"]),"line-miter-limit":new yn(Pa.layout_line["line-miter-limit"]),"line-round-limit":new yn(Pa.layout_line["line-round-limit"]),"line-sort-key":new ai(Pa.layout_line["line-sort-key"])}),jx=new $a({"line-opacity":new ai(Pa.paint_line["line-opacity"]),"line-color":new ai(Pa.paint_line["line-color"]),"line-translate":new yn(Pa.paint_line["line-translate"]),"line-translate-anchor":new yn(Pa.paint_line["line-translate-anchor"]),"line-width":new ai(Pa.paint_line["line-width"]),"line-gap-width":new ai(Pa.paint_line["line-gap-width"]),"line-offset":new ai(Pa.paint_line["line-offset"]),"line-blur":new ai(Pa.paint_line["line-blur"]),"line-dasharray":new $i(Pa.paint_line["line-dasharray"]),"line-pattern":new ta(Pa.paint_line["line-pattern"]),"line-gradient":new ya(Pa.paint_line["line-gradient"])}),Hv={paint:jx,layout:Bb},Nb=function(m){function N(){m.apply(this,arguments)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.possiblyEvaluate=function(X,wt){return wt=new jl(Math.floor(wt.zoom),{now:wt.now,fadeDuration:wt.fadeDuration,zoomHistory:wt.zoomHistory,transition:wt.transition}),m.prototype.possiblyEvaluate.call(this,X,wt)},N.prototype.evaluate=function(X,wt,Ft,Zt){return wt=C({},wt,{zoom:Math.floor(wt.zoom)}),m.prototype.evaluate.call(this,X,wt,Ft,Zt)},N}(ai),Ux=new Nb(Hv.paint.properties["line-width"].specification);Ux.useIntegerZoom=!0;var jb=function(m){function N(X){m.call(this,X,Hv),this.gradientVersion=0}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype._handleSpecialPaintPropertyUpdate=function(X){if(X==="line-gradient"){var wt=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=wt._styleExpression.expression instanceof Uc,this.gradientVersion=(this.gradientVersion+1)%x}},N.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},N.prototype.recalculate=function(X,wt){m.prototype.recalculate.call(this,X,wt),this.paint._values["line-floorwidth"]=Ux.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,X)},N.prototype.createBucket=function(X){return new qd(X)},N.prototype.queryRadius=function(X){var wt=X,Ft=h5(Sp("line-width",this,wt),Sp("line-gap-width",this,wt)),Zt=Sp("line-offset",this,wt);return Ft/2+Math.abs(Zt)+Ep(this.paint.get("line-translate"))},N.prototype.queryIntersectsFeature=function(X,wt,Ft,Zt,ie,Re,Je){var yr=tp(X,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Re.angle,Je),Cr=Je/2*h5(this.paint.get("line-width").evaluate(wt,Ft),this.paint.get("line-gap-width").evaluate(wt,Ft)),Kr=this.paint.get("line-offset").evaluate(wt,Ft);return Kr&&(Zt=G(Zt,Kr*Je)),jp(yr,Zt,Cr)},N.prototype.isTileClipped=function(){return!0},N}(ia);function h5(m,N){return N>0?N+2*m:m}function G(m,N){for(var X=[],wt=new o(0,0),Ft=0;Ft":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function xr(m){for(var N="",X=0;X>1,Cr=-7,Kr=X?Ft-1:0,an=X?-1:1,gn=m[N+Kr];for(Kr+=an,Zt=gn&(1<<-Cr)-1,gn>>=-Cr,Cr+=Re;Cr>0;Zt=Zt*256+m[N+Kr],Kr+=an,Cr-=8);for(ie=Zt&(1<<-Cr)-1,Zt>>=-Cr,Cr+=wt;Cr>0;ie=ie*256+m[N+Kr],Kr+=an,Cr-=8);if(Zt===0)Zt=1-yr;else{if(Zt===Je)return ie?NaN:(gn?-1:1)*(1/0);ie=ie+Math.pow(2,wt),Zt=Zt-yr}return(gn?-1:1)*ie*Math.pow(2,Zt-wt)},ln=function(m,N,X,wt,Ft,Zt){var ie,Re,Je,yr=Zt*8-Ft-1,Cr=(1<>1,an=Ft===23?Math.pow(2,-24)-Math.pow(2,-77):0,gn=wt?0:Zt-1,Rn=wt?1:-1,gi=N<0||N===0&&1/N<0?1:0;for(N=Math.abs(N),isNaN(N)||N===1/0?(Re=isNaN(N)?1:0,ie=Cr):(ie=Math.floor(Math.log(N)/Math.LN2),N*(Je=Math.pow(2,-ie))<1&&(ie--,Je*=2),ie+Kr>=1?N+=an/Je:N+=an*Math.pow(2,1-Kr),N*Je>=2&&(ie++,Je/=2),ie+Kr>=Cr?(Re=0,ie=Cr):ie+Kr>=1?(Re=(N*Je-1)*Math.pow(2,Ft),ie=ie+Kr):(Re=N*Math.pow(2,Kr-1)*Math.pow(2,Ft),ie=0));Ft>=8;m[X+gn]=Re&255,gn+=Rn,Re/=256,Ft-=8);for(ie=ie<0;m[X+gn]=ie&255,gn+=Rn,ie/=256,yr-=8);m[X+gn-Rn]|=gi*128},bn={read:Zr,write:ln},Ln=Gn;function Gn(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}Gn.Varint=0,Gn.Fixed64=1,Gn.Bytes=2,Gn.Fixed32=5;var Mi=65536*65536,Aa=1/Mi,ra=12,ga=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Gn.prototype={destroy:function(){this.buf=null},readFields:function(m,N,X){for(X=X||this.length;this.pos>3,Zt=this.pos;this.type=wt&7,m(Ft,N,this),this.pos===Zt&&this.skip(wt)}return N},readMessage:function(m,N){return this.readFields(m,N,this.readVarint()+this.pos)},readFixed32:function(){var m=Cp(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=td(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Cp(this.buf,this.pos)+Cp(this.buf,this.pos+4)*Mi;return this.pos+=8,m},readSFixed64:function(){var m=Cp(this.buf,this.pos)+td(this.buf,this.pos+4)*Mi;return this.pos+=8,m},readFloat:function(){var m=bn.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=bn.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var N=this.buf,X,wt;return wt=N[this.pos++],X=wt&127,wt<128||(wt=N[this.pos++],X|=(wt&127)<<7,wt<128)||(wt=N[this.pos++],X|=(wt&127)<<14,wt<128)||(wt=N[this.pos++],X|=(wt&127)<<21,wt<128)?X:(wt=N[this.pos],X|=(wt&15)<<28,Ya(X,m,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var m=this.readVarint();return m%2===1?(m+1)/-2:m/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var m=this.readVarint()+this.pos,N=this.pos;return this.pos=m,m-N>=ra&&ga?pp(this.buf,N,m):dp(this.buf,N,m)},readBytes:function(){var m=this.readVarint()+this.pos,N=this.buf.subarray(this.pos,m);return this.pos=m,N},readPackedVarint:function(m,N){if(this.type!==Gn.Bytes)return m.push(this.readVarint(N));var X=Ao(this);for(m=m||[];this.pos127;);else if(N===Gn.Bytes)this.pos=this.readVarint()+this.pos;else if(N===Gn.Fixed32)this.pos+=4;else if(N===Gn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+N)},writeTag:function(m,N){this.writeVarint(m<<3|N)},realloc:function(m){for(var N=this.length||16;N268435455||m<0){Sl(m,this);return}this.realloc(4),this.buf[this.pos++]=m&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=m>>>7&127)))},writeSVarint:function(m){this.writeVarint(m<0?-m*2-1:m*2)},writeBoolean:function(m){this.writeVarint(!!m)},writeString:function(m){m=String(m),this.realloc(m.length*4),this.pos++;var N=this.pos;this.pos=mp(this.buf,m,this.pos);var X=this.pos-N;X>=128&&Xs(N,X,this),this.pos=N-1,this.writeVarint(X),this.pos+=X},writeFloat:function(m){this.realloc(4),bn.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),bn.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var N=m.length;this.writeVarint(N),this.realloc(N);for(var X=0;X=128&&Xs(X,wt,this),this.pos=X-1,this.writeVarint(wt),this.pos+=wt},writeMessage:function(m,N,X){this.writeTag(m,Gn.Bytes),this.writeRawMessage(N,X)},writePackedVarint:function(m,N){N.length&&this.writeMessage(m,js,N)},writePackedSVarint:function(m,N){N.length&&this.writeMessage(m,Os,N)},writePackedBoolean:function(m,N){N.length&&this.writeMessage(m,Js,N)},writePackedFloat:function(m,N){N.length&&this.writeMessage(m,uo,N)},writePackedDouble:function(m,N){N.length&&this.writeMessage(m,il,N)},writePackedFixed32:function(m,N){N.length&&this.writeMessage(m,Zl,N)},writePackedSFixed32:function(m,N){N.length&&this.writeMessage(m,uh,N)},writePackedFixed64:function(m,N){N.length&&this.writeMessage(m,nh,N)},writePackedSFixed64:function(m,N){N.length&&this.writeMessage(m,gd,N)},writeBytesField:function(m,N){this.writeTag(m,Gn.Bytes),this.writeBytes(N)},writeFixed32Field:function(m,N){this.writeTag(m,Gn.Fixed32),this.writeFixed32(N)},writeSFixed32Field:function(m,N){this.writeTag(m,Gn.Fixed32),this.writeSFixed32(N)},writeFixed64Field:function(m,N){this.writeTag(m,Gn.Fixed64),this.writeFixed64(N)},writeSFixed64Field:function(m,N){this.writeTag(m,Gn.Fixed64),this.writeSFixed64(N)},writeVarintField:function(m,N){this.writeTag(m,Gn.Varint),this.writeVarint(N)},writeSVarintField:function(m,N){this.writeTag(m,Gn.Varint),this.writeSVarint(N)},writeStringField:function(m,N){this.writeTag(m,Gn.Bytes),this.writeString(N)},writeFloatField:function(m,N){this.writeTag(m,Gn.Fixed32),this.writeFloat(N)},writeDoubleField:function(m,N){this.writeTag(m,Gn.Fixed64),this.writeDouble(N)},writeBooleanField:function(m,N){this.writeVarintField(m,!!N)}};function Ya(m,N,X){var wt=X.buf,Ft,Zt;if(Zt=wt[X.pos++],Ft=(Zt&112)>>4,Zt<128||(Zt=wt[X.pos++],Ft|=(Zt&127)<<3,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&127)<<10,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&127)<<17,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&127)<<24,Zt<128)||(Zt=wt[X.pos++],Ft|=(Zt&1)<<31,Zt<128))return Ss(m,Ft,N);throw new Error("Expected varint not more than 10 bytes")}function Ao(m){return m.type===Gn.Bytes?m.readVarint()+m.pos:m.pos+1}function Ss(m,N,X){return X?N*4294967296+(m>>>0):(N>>>0)*4294967296+(m>>>0)}function Sl(m,N){var X,wt;if(m>=0?(X=m%4294967296|0,wt=m/4294967296|0):(X=~(-m%4294967296),wt=~(-m/4294967296),X^4294967295?X=X+1|0:(X=0,wt=wt+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");N.realloc(10),_s(X,wt,N),fs(wt,N)}function _s(m,N,X){X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos++]=m&127|128,m>>>=7,X.buf[X.pos]=m&127}function fs(m,N){var X=(m&7)<<4;N.buf[N.pos++]|=X|((m>>>=3)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127|((m>>>=7)?128:0),m&&(N.buf[N.pos++]=m&127)))))}function Xs(m,N,X){var wt=N<=16383?1:N<=2097151?2:N<=268435455?3:Math.floor(Math.log(N)/(Math.LN2*7));X.realloc(wt);for(var Ft=X.pos-1;Ft>=m;Ft--)X.buf[Ft+wt]=X.buf[Ft]}function js(m,N){for(var X=0;X>>8,m[X+2]=N>>>16,m[X+3]=N>>>24}function td(m,N){return(m[N]|m[N+1]<<8|m[N+2]<<16)+(m[N+3]<<24)}function dp(m,N,X){for(var wt="",Ft=N;Ft239?4:Zt>223?3:Zt>191?2:1;if(Ft+Re>X)break;var Je,yr,Cr;Re===1?Zt<128&&(ie=Zt):Re===2?(Je=m[Ft+1],(Je&192)===128&&(ie=(Zt&31)<<6|Je&63,ie<=127&&(ie=null))):Re===3?(Je=m[Ft+1],yr=m[Ft+2],(Je&192)===128&&(yr&192)===128&&(ie=(Zt&15)<<12|(Je&63)<<6|yr&63,(ie<=2047||ie>=55296&&ie<=57343)&&(ie=null))):Re===4&&(Je=m[Ft+1],yr=m[Ft+2],Cr=m[Ft+3],(Je&192)===128&&(yr&192)===128&&(Cr&192)===128&&(ie=(Zt&15)<<18|(Je&63)<<12|(yr&63)<<6|Cr&63,(ie<=65535||ie>=1114112)&&(ie=null))),ie===null?(ie=65533,Re=1):ie>65535&&(ie-=65536,wt+=String.fromCharCode(ie>>>10&1023|55296),ie=56320|ie&1023),wt+=String.fromCharCode(ie),Ft+=Re}return wt}function pp(m,N,X){return ga.decode(m.subarray(N,X))}function mp(m,N,X){for(var wt=0,Ft,Zt;wt55295&&Ft<57344)if(Zt)if(Ft<56320){m[X++]=239,m[X++]=191,m[X++]=189,Zt=Ft;continue}else Ft=Zt-55296<<10|Ft-56320|65536,Zt=null;else{Ft>56319||wt+1===N.length?(m[X++]=239,m[X++]=191,m[X++]=189):Zt=Ft;continue}else Zt&&(m[X++]=239,m[X++]=191,m[X++]=189,Zt=null);Ft<128?m[X++]=Ft:(Ft<2048?m[X++]=Ft>>6|192:(Ft<65536?m[X++]=Ft>>12|224:(m[X++]=Ft>>18|240,m[X++]=Ft>>12&63|128),m[X++]=Ft>>6&63|128),m[X++]=Ft&63|128)}return X}var sf=3;function vd(m,N,X){m===1&&X.readMessage(ep,N)}function ep(m,N,X){if(m===3){var wt=X.readMessage($d,{}),Ft=wt.id,Zt=wt.bitmap,ie=wt.width,Re=wt.height,Je=wt.left,yr=wt.top,Cr=wt.advance;N.push({id:Ft,bitmap:new Qf({width:ie+2*sf,height:Re+2*sf},Zt),metrics:{width:ie,height:Re,left:Je,top:yr,advance:Cr}})}}function $d(m,N,X){m===1?N.id=X.readVarint():m===2?N.bitmap=X.readBytes():m===3?N.width=X.readVarint():m===4?N.height=X.readVarint():m===5?N.left=X.readSVarint():m===6?N.top=X.readSVarint():m===7&&(N.advance=X.readVarint())}function gp(m){return new Ln(m).readFields(vd,[])}var zd=sf;function Vp(m){for(var N=0,X=0,wt=0,Ft=m;wt=0;gn--){var Rn=Re[gn];if(!(an.w>Rn.w||an.h>Rn.h)){if(an.x=Rn.x,an.y=Rn.y,yr=Math.max(yr,an.y+an.h),Je=Math.max(Je,an.x+an.w),an.w===Rn.w&&an.h===Rn.h){var gi=Re.pop();gn=0&&wt>=m&&Hp[this.text.charCodeAt(wt)];wt--)X--;this.text=this.text.substring(m,X),this.sectionIndex=this.sectionIndex.slice(m,X)},ch.prototype.substring=function(m,N){var X=new ch;return X.text=this.text.substring(m,N),X.sectionIndex=this.sectionIndex.slice(m,N),X.sections=this.sections,X},ch.prototype.toString=function(){return this.text},ch.prototype.getMaxScale=function(){var m=this;return this.sectionIndex.reduce(function(N,X){return Math.max(N,m.sections[X].scale)},0)},ch.prototype.addTextSection=function(m,N){this.text+=m.text,this.sections.push(rp.forText(m.scale,m.fontStack||N));for(var X=this.sections.length-1,wt=0;wt=U0?null:++this.imageSectionID:(this.imageSectionID=j0,this.imageSectionID)};function Od(m,N){for(var X=[],wt=m.text,Ft=0,Zt=0,ie=N;Zt=0,Cr=0,Kr=0;Kr0&&ih>ws&&(ws=ih)}else{var Of=X[Rs.fontStack],Gd=Of&&Of[ll];if(Gd&&Gd.rect)Nu=Gd.rect,Hs=Gd.metrics;else{var id=N[Rs.fontStack],yp=id&&id[ll];if(!yp)continue;Hs=yp.metrics}Bs=(Xa-Rs.scale)*Lr}Xu?(m.verticalizable=!0,Vo.push({glyph:ll,imageName:zc,x:an,y:gn+Bs,vertical:Xu,scale:Rs.scale,fontStack:Rs.fontStack,sectionIndex:Ys,metrics:Hs,rect:Nu}),an+=hh*Rs.scale+yr):(Vo.push({glyph:ll,imageName:zc,x:an,y:gn+Bs,vertical:Xu,scale:Rs.scale,fontStack:Rs.fontStack,sectionIndex:Ys,metrics:Hs,rect:Nu}),an+=Hs.advance*Rs.scale+yr)}if(Vo.length!==0){var xp=an-yr;Rn=Math.max(xp,Rn),a8(Vo,0,Vo.length-1,ua,ws)}an=0;var _p=Zt*Xa+ws;Uo.lineOffset=Math.max(ws,bo),gn+=_p,gi=Math.max(_p,gi),++oa}var Fd=gn-Th,Lp=$b(ie),Pp=Lp.horizontalAlign,yd=Lp.verticalAlign;o8(m.positionedLines,ua,Pp,yd,Rn,gi,Zt,Fd,Ft.length),m.top+=-yd*Fd,m.bottom=m.top+Fd,m.left+=-Pp*Rn,m.right=m.left+Rn}function a8(m,N,X,wt,Ft){if(!(!wt&&!Ft))for(var Zt=m[X],ie=Zt.metrics.advance*Zt.scale,Re=(m[X].x+ie)*wt,Je=N;Je<=X;Je++)m[Je].x-=Re,m[Je].y+=Ft}function o8(m,N,X,wt,Ft,Zt,ie,Re,Je){var yr=(N-X)*Ft,Cr=0;Zt!==ie?Cr=-Re*wt-Th:Cr=(-wt*Je+.5)*ie;for(var Kr=0,an=m;Kr-X/2;){if(ie--,ie<0)return!1;Re-=m[ie].dist(Zt),Zt=m[ie]}Re+=m[ie].dist(m[ie+1]),ie++;for(var Je=[],yr=0;Rewt;)yr-=Je.shift().angleDelta;if(yr>Ft)return!1;ie++,Re+=Kr.dist(an)}return!0}function Zd(m){for(var N=0,X=0;Xyr){var Rn=(yr-Je)/gn,gi=bu(Kr.x,an.x,Rn),ua=bu(Kr.y,an.y,Rn),oa=new qv(gi,ua,an.angleTo(Kr),Cr);return oa._round(),!ie||p5(m,oa,Re,ie,N)?oa:void 0}Je+=gn}}function Hg(m,N,X,wt,Ft,Zt,ie,Re,Je){var yr=Wp(wt,Zt,ie),Cr=rg(wt,Ft),Kr=Cr*ie,an=m[0].x===0||m[0].x===Je||m[0].y===0||m[0].y===Je;N-Kr=0&&xa=0&&Xa=0&&an+yr<=Cr){var bo=new qv(xa,Xa,wa,Rn);bo._round(),(!wt||p5(m,bo,Zt,wt,Ft))&&gn.push(bo)}}Kr+=oa}return!Re&&!gn.length&&!ie&&(gn=H0(m,Kr/2,X,wt,Ft,Zt,ie,!0,Je)),gn}function hC(m,N,X,wt,Ft){for(var Zt=[],ie=0;ie=wt&&Kr.x>=wt)&&(Cr.x>=wt?Cr=new o(wt,Cr.y+(Kr.y-Cr.y)*((wt-Cr.x)/(Kr.x-Cr.x)))._round():Kr.x>=wt&&(Kr=new o(wt,Cr.y+(Kr.y-Cr.y)*((wt-Cr.x)/(Kr.x-Cr.x)))._round()),!(Cr.y>=Ft&&Kr.y>=Ft)&&(Cr.y>=Ft?Cr=new o(Cr.x+(Kr.x-Cr.x)*((Ft-Cr.y)/(Kr.y-Cr.y)),Ft)._round():Kr.y>=Ft&&(Kr=new o(Cr.x+(Kr.x-Cr.x)*((Ft-Cr.y)/(Kr.y-Cr.y)),Ft)._round()),(!Je||!Cr.equals(Je[Je.length-1]))&&(Je=[Cr],Zt.push(Je)),Je.push(Kr)))))}return Zt}var Hx=kh;function fC(m,N,X,wt){var Ft=[],Zt=m.image,ie=Zt.pixelRatio,Re=Zt.paddedRect.w-2*Hx,Je=Zt.paddedRect.h-2*Hx,yr=m.right-m.left,Cr=m.bottom-m.top,Kr=Zt.stretchX||[[0,Re]],an=Zt.stretchY||[[0,Je]],gn=function(Oc,ju){return Oc+ju[1]-ju[0]},Rn=Kr.reduce(gn,0),gi=an.reduce(gn,0),ua=Re-Rn,oa=Je-gi,wa=0,Ra=Rn,xa=0,Xa=gi,bo=0,Uo=ua,Vo=0,ws=oa;if(Zt.content&&wt){var ks=Zt.content;wa=m5(Kr,0,ks[0]),xa=m5(an,0,ks[1]),Ra=m5(Kr,ks[0],ks[2]),Xa=m5(an,ks[1],ks[3]),bo=ks[0]-wa,Vo=ks[1]-xa,Uo=ks[2]-ks[0]-Ra,ws=ks[3]-ks[1]-Xa}var Rs=function(Oc,ju,Dh,ih){var Of=g5(Oc.stretch-wa,Ra,yr,m.left),Gd=v5(Oc.fixed-bo,Uo,Oc.stretch,Rn),id=g5(ju.stretch-xa,Xa,Cr,m.top),yp=v5(ju.fixed-Vo,ws,ju.stretch,gi),xp=g5(Dh.stretch-wa,Ra,yr,m.left),_p=v5(Dh.fixed-bo,Uo,Dh.stretch,Rn),Fd=g5(ih.stretch-xa,Xa,Cr,m.top),Lp=v5(ih.fixed-Vo,ws,ih.stretch,gi),Pp=new o(Of,id),yd=new o(xp,id),Ip=new o(xp,Fd),T0=new o(Of,Fd),$g=new o(Gd/ie,yp/ie),Yv=new o(_p/ie,Lp/ie),Kv=N*Math.PI/180;if(Kv){var Xv=Math.sin(Kv),Xx=Math.cos(Kv),nm=[Xx,-Xv,Xv,Xx];Pp._matMult(nm),yd._matMult(nm),T0._matMult(nm),Ip._matMult(nm)}var k5=Oc.stretch+Oc.fixed,g8=Dh.stretch+Dh.fixed,T5=ju.stretch+ju.fixed,v8=ih.stretch+ih.fixed,W0={x:Zt.paddedRect.x+Hx+k5,y:Zt.paddedRect.y+Hx+T5,w:g8-k5,h:v8-T5},Jx=Uo/ie/yr,A5=ws/ie/Cr;return{tl:Pp,tr:yd,bl:T0,br:Ip,tex:W0,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:$g,pixelOffsetBR:Yv,minFontScaleX:Jx,minFontScaleY:A5,isSDF:X}};if(!wt||!Zt.stretchX&&!Zt.stretchY)Ft.push(Rs({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Re+1},{fixed:0,stretch:Je+1}));else for(var Ys=dC(Kr,ua,Rn),ll=dC(an,oa,gi),Bs=0;Bs0&&(gn=Math.max(10,gn),this.circleDiameter=gn)}else{var Rn=Zt.top*ie-Re,gi=Zt.bottom*ie+Re,ua=Zt.left*ie-Re,oa=Zt.right*ie+Re,wa=Zt.collisionPadding;if(wa&&(ua-=wa[0]*ie,Rn-=wa[1]*ie,oa+=wa[2]*ie,gi+=wa[3]*ie),yr){var Ra=new o(ua,Rn),xa=new o(oa,Rn),Xa=new o(ua,gi),bo=new o(oa,gi),Uo=yr*Math.PI/180;Ra._rotate(Uo),xa._rotate(Uo),Xa._rotate(Uo),bo._rotate(Uo),ua=Math.min(Ra.x,xa.x,Xa.x,bo.x),oa=Math.max(Ra.x,xa.x,Xa.x,bo.x),Rn=Math.min(Ra.y,xa.y,Xa.y,bo.y),gi=Math.max(Ra.y,xa.y,Xa.y,bo.y)}m.emplaceBack(N.x,N.y,ua,Rn,oa,gi,X,wt,Ft)}this.boxEndIndex=m.length},Wx=function(m,N){if(m===void 0&&(m=[]),N===void 0&&(N=EZ),this.data=m,this.length=this.data.length,this.compare=N,this.length>0)for(var X=(this.length>>1)-1;X>=0;X--)this._down(X)};Wx.prototype.push=function(m){this.data.push(m),this.length++,this._up(this.length-1)},Wx.prototype.pop=function(){if(this.length!==0){var m=this.data[0],N=this.data.pop();return this.length--,this.length>0&&(this.data[0]=N,this._down(0)),m}},Wx.prototype.peek=function(){return this.data[0]},Wx.prototype._up=function(m){for(var N=this,X=N.data,wt=N.compare,Ft=X[m];m>0;){var Zt=m-1>>1,ie=X[Zt];if(wt(Ft,ie)>=0)break;X[m]=ie,m=Zt}X[m]=Ft},Wx.prototype._down=function(m){for(var N=this,X=N.data,wt=N.compare,Ft=this.length>>1,Zt=X[m];m=0)break;X[m]=Re,m=ie}X[m]=Zt};function EZ(m,N){return mN?1:0}function CZ(m,N,X){X===void 0&&(X=!1);for(var wt=1/0,Ft=1/0,Zt=-1/0,ie=-1/0,Re=m[0],Je=0;JeZt)&&(Zt=yr.x),(!Je||yr.y>ie)&&(ie=yr.y)}var Cr=Zt-wt,Kr=ie-Ft,an=Math.min(Cr,Kr),gn=an/2,Rn=new Wx([],LZ);if(an===0)return new o(wt,Ft);for(var gi=wt;gioa.d||!oa.d)&&(oa=Ra,X&&console.log("found best %d after %d probes",Math.round(1e4*Ra.d)/1e4,wa)),!(Ra.max-oa.d<=N)&&(gn=Ra.h/2,Rn.push(new qx(Ra.p.x-gn,Ra.p.y-gn,gn,m)),Rn.push(new qx(Ra.p.x+gn,Ra.p.y-gn,gn,m)),Rn.push(new qx(Ra.p.x-gn,Ra.p.y+gn,gn,m)),Rn.push(new qx(Ra.p.x+gn,Ra.p.y+gn,gn,m)),wa+=4)}return X&&(console.log("num probes: "+wa),console.log("best distance: "+oa.d)),oa.p}function LZ(m,N){return N.max-m.max}function qx(m,N,X,wt){this.p=new o(m,N),this.h=X,this.d=PZ(this.p,wt),this.max=this.d+this.h*Math.SQRT2}function PZ(m,N){for(var X=!1,wt=1/0,Ft=0;Ftm.y!=Cr.y>m.y&&m.x<(Cr.x-yr.x)*(m.y-yr.y)/(Cr.y-yr.y)+yr.x&&(X=!X),wt=Math.min(wt,Qd(m,yr,Cr))}return(X?1:-1)*Math.sqrt(wt)}function IZ(m){for(var N=0,X=0,wt=0,Ft=m[0],Zt=0,ie=Ft.length,Re=ie-1;Zt=qo||nm.y<0||nm.y>=qo||DZ(m,nm,Xx,X,wt,Ft,ll,m.layers[0],m.collisionBoxArray,N.index,N.sourceLayerIndex,m.index,oa,Xa,Vo,Je,Ra,bo,ws,gn,N,Zt,yr,Cr,ie)};if(ks==="line")for(var Hs=0,Nu=hC(N.geometry,0,0,qo,qo);Hs1){var id=V0(Gd,Uo,X.vertical||Rn,wt,gi,wa);id&&Bs(Gd,id)}}else if(N.type==="Polygon")for(var yp=0,xp=em(N.geometry,0);ypZv&&q(m.layerIds[0]+': Value for "text-size" is >= '+Gb+'. Reduce your "text-size".')):ua.kind==="composite"&&(oa=[ed*gn.compositeTextSizes[0].evaluate(ie,{},Rn),ed*gn.compositeTextSizes[1].evaluate(ie,{},Rn)],(oa[0]>Zv||oa[1]>Zv)&&q(m.layerIds[0]+': Value for "text-size" is >= '+Gb+'. Reduce your "text-size".')),m.addSymbols(m.text,gi,oa,Re,Zt,ie,yr,N,Je.lineStartIndex,Je.lineLength,an,Rn);for(var wa=0,Ra=Cr;waZv&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Gb+'. Reduce your "icon-size".')):Pp.kind==="composite"&&(yd=[ed*Xa.compositeIconSizes[0].evaluate(xa,{},Uo),ed*Xa.compositeIconSizes[1].evaluate(xa,{},Uo)],(yd[0]>Zv||yd[1]>Zv)&&q(m.layerIds[0]+': Value for "icon-size" is >= '+Gb+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Fd,yd,Ra,wa,xa,!1,N,ks.lineStartIndex,ks.lineLength,-1,Uo),Xu=m.icon.placedSymbolArray.length-1,Lp&&(Nu=Lp.length*4,m.addSymbols(m.icon,Lp,yd,Ra,wa,xa,Gh.vertical,N,ks.lineStartIndex,ks.lineLength,-1,Uo),Oc=m.icon.placedSymbolArray.length-1)}for(var Ip in wt.horizontal){var T0=wt.horizontal[Ip];if(!Rs){Dh=Vt(T0.text);var $g=Re.layout.get("text-rotate").evaluate(xa,{},Uo);Rs=new y5(Je,N,yr,Cr,Kr,T0,an,gn,Rn,$g)}var Yv=T0.positionedLines.length===1;if(zc+=mC(m,N,T0,Zt,Re,Rn,xa,gi,ks,wt.vertical?Gh.horizontal:Gh.horizontalOnly,Yv?Object.keys(wt.horizontal):[Ip],ju,Xu,Xa,Uo),Yv)break}wt.vertical&&(hh+=mC(m,N,wt.vertical,Zt,Re,Rn,xa,gi,ks,Gh.vertical,["vertical"],ju,Oc,Xa,Uo));var Kv=Rs?Rs.boxStartIndex:m.collisionBoxArray.length,Xv=Rs?Rs.boxEndIndex:m.collisionBoxArray.length,Xx=ll?ll.boxStartIndex:m.collisionBoxArray.length,nm=ll?ll.boxEndIndex:m.collisionBoxArray.length,k5=Ys?Ys.boxStartIndex:m.collisionBoxArray.length,g8=Ys?Ys.boxEndIndex:m.collisionBoxArray.length,T5=Bs?Bs.boxStartIndex:m.collisionBoxArray.length,v8=Bs?Bs.boxEndIndex:m.collisionBoxArray.length,W0=-1,Jx=function(Xb,IC){return Xb&&Xb.circleDiameter?Math.max(Xb.circleDiameter,IC):IC};W0=Jx(Rs,W0),W0=Jx(ll,W0),W0=Jx(Ys,W0),W0=Jx(Bs,W0);var A5=W0>-1?1:0;A5&&(W0*=Vo/Lr),m.glyphOffsetArray.length>=Gc.MAX_GLYPHS&&q("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),xa.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,xa.sortKey),m.symbolInstances.emplaceBack(N.x,N.y,ju.right>=0?ju.right:-1,ju.center>=0?ju.center:-1,ju.left>=0?ju.left:-1,ju.vertical||-1,Xu,Oc,Dh,Kv,Xv,Xx,nm,k5,g8,T5,v8,yr,zc,hh,Hs,Nu,A5,0,an,ih,Of,W0)}function FZ(m,N,X,wt){var Ft=m.compareText;if(!(N in Ft))Ft[N]=[];else for(var Zt=Ft[N],ie=Zt.length-1;ie>=0;ie--)if(wt.dist(Zt[ie])0)&&(Zt.value.kind!=="constant"||Zt.value.value.length>0),yr=Re.value.kind!=="constant"||!!Re.value.value||Object.keys(Re.parameters).length>0,Cr=Ft.get("symbol-sort-key");if(this.features=[],!(!Je&&!yr)){for(var Kr=N.iconDependencies,an=N.glyphDependencies,gn=N.availableImages,Rn=new jl(this.zoom),gi=0,ua=m;gi=0;for(var zc=0,hh=Vo.sections;zc=0;Re--)Zt[Re]={x:N[Re].x,y:N[Re].y,tileUnitDistanceFromAnchor:Ft},Re>0&&(Ft+=N[Re-1].dist(N[Re]));for(var Je=0;Je0},Gc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Gc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Gc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Gc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Gc.prototype.addIndicesForPlacedSymbol=function(m,N){for(var X=m.placedSymbolArray.get(N),wt=X.vertexStartIndex+X.numGlyphs*4,Ft=X.vertexStartIndex;Ft1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(m),this.sortedAngle=m,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var X=0,wt=this.symbolInstanceIndexes;X=0&&Je.indexOf(ie)===Re&&N.addIndicesForPlacedSymbol(N.text,ie)}),Zt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Zt.verticalPlacedTextSymbolIndex),Zt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.placedIconSymbolIndex),Zt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Zt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},sr("SymbolBucket",Gc,{omit:["layers","collisionBoxArray","features","compareText"]}),Gc.MAX_GLYPHS=65535,Gc.addDynamicAttributes=h8;function jZ(m,N){return N.replace(/{([^{}]+)}/g,function(X,wt){return wt in m?String(m[wt]):""})}var UZ=new $a({"symbol-placement":new yn(Pa.layout_symbol["symbol-placement"]),"symbol-spacing":new yn(Pa.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new yn(Pa.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ai(Pa.layout_symbol["symbol-sort-key"]),"symbol-z-order":new yn(Pa.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new yn(Pa.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new yn(Pa.layout_symbol["icon-ignore-placement"]),"icon-optional":new yn(Pa.layout_symbol["icon-optional"]),"icon-rotation-alignment":new yn(Pa.layout_symbol["icon-rotation-alignment"]),"icon-size":new ai(Pa.layout_symbol["icon-size"]),"icon-text-fit":new yn(Pa.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new yn(Pa.layout_symbol["icon-text-fit-padding"]),"icon-image":new ai(Pa.layout_symbol["icon-image"]),"icon-rotate":new ai(Pa.layout_symbol["icon-rotate"]),"icon-padding":new yn(Pa.layout_symbol["icon-padding"]),"icon-keep-upright":new yn(Pa.layout_symbol["icon-keep-upright"]),"icon-offset":new ai(Pa.layout_symbol["icon-offset"]),"icon-anchor":new ai(Pa.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new yn(Pa.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new yn(Pa.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new yn(Pa.layout_symbol["text-rotation-alignment"]),"text-field":new ai(Pa.layout_symbol["text-field"]),"text-font":new ai(Pa.layout_symbol["text-font"]),"text-size":new ai(Pa.layout_symbol["text-size"]),"text-max-width":new ai(Pa.layout_symbol["text-max-width"]),"text-line-height":new yn(Pa.layout_symbol["text-line-height"]),"text-letter-spacing":new ai(Pa.layout_symbol["text-letter-spacing"]),"text-justify":new ai(Pa.layout_symbol["text-justify"]),"text-radial-offset":new ai(Pa.layout_symbol["text-radial-offset"]),"text-variable-anchor":new yn(Pa.layout_symbol["text-variable-anchor"]),"text-anchor":new ai(Pa.layout_symbol["text-anchor"]),"text-max-angle":new yn(Pa.layout_symbol["text-max-angle"]),"text-writing-mode":new yn(Pa.layout_symbol["text-writing-mode"]),"text-rotate":new ai(Pa.layout_symbol["text-rotate"]),"text-padding":new yn(Pa.layout_symbol["text-padding"]),"text-keep-upright":new yn(Pa.layout_symbol["text-keep-upright"]),"text-transform":new ai(Pa.layout_symbol["text-transform"]),"text-offset":new ai(Pa.layout_symbol["text-offset"]),"text-allow-overlap":new yn(Pa.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new yn(Pa.layout_symbol["text-ignore-placement"]),"text-optional":new yn(Pa.layout_symbol["text-optional"])}),VZ=new $a({"icon-opacity":new ai(Pa.paint_symbol["icon-opacity"]),"icon-color":new ai(Pa.paint_symbol["icon-color"]),"icon-halo-color":new ai(Pa.paint_symbol["icon-halo-color"]),"icon-halo-width":new ai(Pa.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ai(Pa.paint_symbol["icon-halo-blur"]),"icon-translate":new yn(Pa.paint_symbol["icon-translate"]),"icon-translate-anchor":new yn(Pa.paint_symbol["icon-translate-anchor"]),"text-opacity":new ai(Pa.paint_symbol["text-opacity"]),"text-color":new ai(Pa.paint_symbol["text-color"],{runtimeType:ou,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new ai(Pa.paint_symbol["text-halo-color"]),"text-halo-width":new ai(Pa.paint_symbol["text-halo-width"]),"text-halo-blur":new ai(Pa.paint_symbol["text-halo-blur"]),"text-translate":new yn(Pa.paint_symbol["text-translate"]),"text-translate-anchor":new yn(Pa.paint_symbol["text-translate-anchor"])}),f8={paint:VZ,layout:UZ},Gx=function(m){this.type=m.property.overrides?m.property.overrides.runtimeType:Ru,this.defaultValue=m};Gx.prototype.evaluate=function(m){if(m.formattedSection){var N=this.defaultValue.property.overrides;if(N&&N.hasOverride(m.formattedSection))return N.getOverride(m.formattedSection)}return m.feature&&m.featureState?this.defaultValue.evaluate(m.feature,m.featureState):this.defaultValue.property.specification.default},Gx.prototype.eachChild=function(m){if(!this.defaultValue.isConstant()){var N=this.defaultValue.value;m(N._styleExpression.expression)}},Gx.prototype.outputDefined=function(){return!1},Gx.prototype.serialize=function(){return null},sr("FormatSectionOverride",Gx,{omit:["defaultValue"]});var HZ=function(m){function N(X){m.call(this,X,f8)}return m&&(N.__proto__=m),N.prototype=Object.create(m&&m.prototype),N.prototype.constructor=N,N.prototype.recalculate=function(X,wt){if(m.prototype.recalculate.call(this,X,wt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var Ft=this.layout.get("text-writing-mode");if(Ft){for(var Zt=[],ie=0,Re=Ft;ie",targetMapId:wt,sourceMapId:Zt.mapId})}}},Yx.prototype.receive=function(m){var N=m.data,X=N.id;if(X&&!(N.targetMapId&&this.mapId!==N.targetMapId))if(N.type===""){delete this.tasks[X];var wt=this.cancelCallbacks[X];delete this.cancelCallbacks[X],wt&&wt()}else mt()||N.mustQueue?(this.tasks[X]=N,this.taskQueue.push(X),this.invoker.trigger()):this.processTask(X,N)},Yx.prototype.process=function(){if(this.taskQueue.length){var m=this.taskQueue.shift(),N=this.tasks[m];delete this.tasks[m],this.taskQueue.length&&this.invoker.trigger(),N&&this.processTask(m,N)}},Yx.prototype.processTask=function(m,N){var X=this;if(N.type===""){var wt=this.callbacks[m];delete this.callbacks[m],wt&&(N.error?wt(xn(N.error)):wt(null,xn(N.data)))}else{var Ft=!1,Zt=dt(this.globalScope)?void 0:[],ie=N.hasCallback?function(Kr,an){Ft=!0,delete X.cancelCallbacks[m],X.target.postMessage({id:m,type:"",sourceMapId:X.mapId,error:Kr?Jr(Kr):null,data:Jr(an,Zt)},Zt)}:function(Kr){Ft=!0},Re=null,Je=xn(N.data);if(this.parent[N.type])Re=this.parent[N.type](N.sourceMapId,Je,ie);else if(this.parent.getWorkerSource){var yr=N.type.split("."),Cr=this.parent.getWorkerSource(N.sourceMapId,yr[0],Je.source);Re=Cr[yr[1]](Je,ie)}else ie(new Error("Could not find function "+N.type));!Ft&&Re&&Re.cancel&&(this.cancelCallbacks[m]=Re.cancel)}},Yx.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function tG(m,N,X){N=Math.pow(2,X)-N-1;var wt=bC(m*256,N*256,X),Ft=bC((m+1)*256,(N+1)*256,X);return wt[0]+","+wt[1]+","+Ft[0]+","+Ft[1]}function bC(m,N,X){var wt=2*Math.PI*6378137/256/Math.pow(2,X),Ft=m*wt-2*Math.PI*6378137/2,Zt=N*wt-2*Math.PI*6378137/2;return[Ft,Zt]}var rd=function(m,N){m&&(N?this.setSouthWest(m).setNorthEast(N):m.length===4?this.setSouthWest([m[0],m[1]]).setNorthEast([m[2],m[3]]):this.setSouthWest(m[0]).setNorthEast(m[1]))};rd.prototype.setNorthEast=function(m){return this._ne=m instanceof Yh?new Yh(m.lng,m.lat):Yh.convert(m),this},rd.prototype.setSouthWest=function(m){return this._sw=m instanceof Yh?new Yh(m.lng,m.lat):Yh.convert(m),this},rd.prototype.extend=function(m){var N=this._sw,X=this._ne,wt,Ft;if(m instanceof Yh)wt=m,Ft=m;else if(m instanceof rd){if(wt=m._sw,Ft=m._ne,!wt||!Ft)return this}else{if(Array.isArray(m))if(m.length===4||m.every(Array.isArray)){var Zt=m;return this.extend(rd.convert(Zt))}else{var ie=m;return this.extend(Yh.convert(ie))}return this}return!N&&!X?(this._sw=new Yh(wt.lng,wt.lat),this._ne=new Yh(Ft.lng,Ft.lat)):(N.lng=Math.min(wt.lng,N.lng),N.lat=Math.min(wt.lat,N.lat),X.lng=Math.max(Ft.lng,X.lng),X.lat=Math.max(Ft.lat,X.lat)),this},rd.prototype.getCenter=function(){return new Yh((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},rd.prototype.getSouthWest=function(){return this._sw},rd.prototype.getNorthEast=function(){return this._ne},rd.prototype.getNorthWest=function(){return new Yh(this.getWest(),this.getNorth())},rd.prototype.getSouthEast=function(){return new Yh(this.getEast(),this.getSouth())},rd.prototype.getWest=function(){return this._sw.lng},rd.prototype.getSouth=function(){return this._sw.lat},rd.prototype.getEast=function(){return this._ne.lng},rd.prototype.getNorth=function(){return this._ne.lat},rd.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},rd.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},rd.prototype.isEmpty=function(){return!(this._sw&&this._ne)},rd.prototype.contains=function(m){var N=Yh.convert(m),X=N.lng,wt=N.lat,Ft=this._sw.lat<=wt&&wt<=this._ne.lat,Zt=this._sw.lng<=X&&X<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Zt=this._sw.lng>=X&&X>=this._ne.lng),Ft&&Zt},rd.convert=function(m){return!m||m instanceof rd?m:new rd(m)};var wC=63710088e-1,Yh=function(m,N){if(isNaN(m)||isNaN(N))throw new Error("Invalid LngLat object: ("+m+", "+N+")");if(this.lng=+m,this.lat=+N,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Yh.prototype.wrap=function(){return new Yh(b(this.lng,-180,180),this.lat)},Yh.prototype.toArray=function(){return[this.lng,this.lat]},Yh.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Yh.prototype.distanceTo=function(m){var N=Math.PI/180,X=this.lat*N,wt=m.lat*N,Ft=Math.sin(X)*Math.sin(wt)+Math.cos(X)*Math.cos(wt)*Math.cos((m.lng-this.lng)*N),Zt=wC*Math.acos(Math.min(Ft,1));return Zt},Yh.prototype.toBounds=function(m){m===void 0&&(m=0);var N=40075017,X=360*m/N,wt=X/Math.cos(Math.PI/180*this.lat);return new rd(new Yh(this.lng-wt,this.lat-X),new Yh(this.lng+wt,this.lat+X))},Yh.convert=function(m){if(m instanceof Yh)return m;if(Array.isArray(m)&&(m.length===2||m.length===3))return new Yh(Number(m[0]),Number(m[1]));if(!Array.isArray(m)&&typeof m=="object"&&m!==null)return new Yh(Number("lng"in m?m.lng:m.lon),Number(m.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var kC=2*Math.PI*wC;function TC(m){return kC*Math.cos(m*Math.PI/180)}function AC(m){return(180+m)/360}function MC(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function SC(m,N){return m/TC(N)}function eG(m){return m*360-180}function p8(m){var N=180-m*360;return 360/Math.PI*Math.atan(Math.exp(N*Math.PI/180))-90}function rG(m,N){return m*TC(p8(N))}function nG(m){return 1/Math.cos(m*Math.PI/180)}var ny=function(m,N,X){X===void 0&&(X=0),this.x=+m,this.y=+N,this.z=+X};ny.fromLngLat=function(m,N){N===void 0&&(N=0);var X=Yh.convert(m);return new ny(AC(X.lng),MC(X.lat),SC(N,X.lat))},ny.prototype.toLngLat=function(){return new Yh(eG(this.x),p8(this.y))},ny.prototype.toAltitude=function(){return rG(this.z,this.y)},ny.prototype.meterInMercatorCoordinateUnits=function(){return 1/kC*nG(p8(this.y))};var iy=function(m,N,X){this.z=m,this.x=N,this.y=X,this.key=Kb(0,m,m,N,X)};iy.prototype.equals=function(m){return this.z===m.z&&this.x===m.x&&this.y===m.y},iy.prototype.url=function(m,N){var X=tG(this.x,this.y,this.z),wt=iG(this.z,this.x,this.y);return m[(this.x+this.y)%m.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(N==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",wt).replace("{bbox-epsg-3857}",X)},iy.prototype.getTilePoint=function(m){var N=Math.pow(2,this.z);return new o((m.x*N-this.x)*qo,(m.y*N-this.y)*qo)},iy.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var EC=function(m,N){this.wrap=m,this.canonical=N,this.key=Kb(m,N.z,N.z,N.x,N.y)},nd=function(m,N,X,wt,Ft){this.overscaledZ=m,this.wrap=N,this.canonical=new iy(X,+wt,+Ft),this.key=Kb(N,m,X,wt,Ft)};nd.prototype.equals=function(m){return this.overscaledZ===m.overscaledZ&&this.wrap===m.wrap&&this.canonical.equals(m.canonical)},nd.prototype.scaledTo=function(m){var N=this.canonical.z-m;return m>this.canonical.z?new nd(m,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nd(m,this.wrap,m,this.canonical.x>>N,this.canonical.y>>N)},nd.prototype.calculateScaledKey=function(m,N){var X=this.canonical.z-m;return m>this.canonical.z?Kb(this.wrap*+N,m,this.canonical.z,this.canonical.x,this.canonical.y):Kb(this.wrap*+N,m,m,this.canonical.x>>X,this.canonical.y>>X)},nd.prototype.isChildOf=function(m){if(m.wrap!==this.wrap)return!1;var N=this.canonical.z-m.canonical.z;return m.overscaledZ===0||m.overscaledZ>N&&m.canonical.y===this.canonical.y>>N},nd.prototype.children=function(m){if(this.overscaledZ>=m)return[new nd(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var N=this.canonical.z+1,X=this.canonical.x*2,wt=this.canonical.y*2;return[new nd(N,this.wrap,N,X,wt),new nd(N,this.wrap,N,X+1,wt),new nd(N,this.wrap,N,X,wt+1),new nd(N,this.wrap,N,X+1,wt+1)]},nd.prototype.isLessThan=function(m){return this.wrapm.wrap?!1:this.overscaledZm.overscaledZ?!1:this.canonical.xm.canonical.x?!1:this.canonical.y0;Zt--)Ft=1<=this.dim+1||N<-1||N>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(N+1)*this.stride+(m+1)},Wg.prototype._unpackMapbox=function(m,N,X){return(m*256*256+N*256+X)/10-1e4},Wg.prototype._unpackTerrarium=function(m,N,X){return m*256+N+X/256-32768},Wg.prototype.getPixels=function(){return new Wd({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Wg.prototype.backfillBorder=function(m,N,X){if(this.dim!==m.dim)throw new Error("dem dimension mismatch");var wt=N*this.dim,Ft=N*this.dim+this.dim,Zt=X*this.dim,ie=X*this.dim+this.dim;switch(N){case-1:wt=Ft-1;break;case 1:Ft=wt+1;break}switch(X){case-1:Zt=ie-1;break;case 1:ie=Zt+1;break}for(var Re=-N*this.dim,Je=-X*this.dim,yr=Zt;yr=0&&Cr[3]>=0&&Re.insert(ie,Cr[0],Cr[1],Cr[2],Cr[3])}},qg.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Vg.VectorTile(new Ln(this.rawTileData)).layers,this.sourceLayerCoder=new b5(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},qg.prototype.query=function(m,N,X,wt){var Ft=this;this.loadVTLayers();for(var Zt=m.params||{},ie=qo/m.tileSize/m.scale,Re=ae(Zt.filter),Je=m.queryGeometry,yr=m.queryPadding*ie,Cr=LC(Je),Kr=this.grid.query(Cr.minX-yr,Cr.minY-yr,Cr.maxX+yr,Cr.maxY+yr),an=LC(m.cameraQueryGeometry),gn=this.grid3D.query(an.minX-yr,an.minY-yr,an.maxX+yr,an.maxY+yr,function(Xa,bo,Uo,Vo){return Q0(m.cameraQueryGeometry,Xa-yr,bo-yr,Uo+yr,Vo+yr)}),Rn=0,gi=gn;Rnwt)Ft=!1;else if(!N)Ft=!0;else if(this.expirationTime=Br.maxzoom)&&Br.visibility!=="none"){f(Gr,this.zoom,fr);var Yr=fi[Br.id]=Br.createBucket({index:Mn.bucketLayerIDs.length,layers:Gr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ci,sourceID:this.source});Yr.populate(za,ki,this.tileID.canonical),Mn.bucketLayerIDs.push(Gr.map(function(Pn){return Pn.id}))}}}}var pn,on,Ce,dr,Hr=t.mapObject(ki.glyphDependencies,function(Pn){return Object.keys(Pn).map(Number)});Object.keys(Hr).length?_r.send("getGlyphs",{uid:this.uid,stacks:Hr},function(Pn,En){pn||(pn=Pn,on=En,Qn.call(Cn))}):on={};var _n=Object.keys(ki.iconDependencies);_n.length?_r.send("getImages",{icons:_n,source:this.source,tileID:this.tileID,type:"icons"},function(Pn,En){pn||(pn=Pn,Ce=En,Qn.call(Cn))}):Ce={};var Fn=Object.keys(ki.patternDependencies);Fn.length?_r.send("getImages",{icons:Fn,source:this.source,tileID:this.tileID,type:"patterns"},function(Pn,En){pn||(pn=Pn,dr=En,Qn.call(Cn))}):dr={},Qn.call(this);function Qn(){if(pn)return tn(pn);if(on&&Ce&&dr){var Pn=new i(on),En=new t.ImageAtlas(Ce,dr);for(var Zn in fi){var La=fi[Zn];La instanceof t.SymbolBucket?(f(La.layers,this.zoom,fr),t.performSymbolLayout(La,on,Pn.positions,Ce,En.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):La.hasPattern&&(La instanceof t.LineBucket||La instanceof t.FillBucket||La instanceof t.FillExtrusionBucket)&&(f(La.layers,this.zoom,fr),La.addFeatures(ki,this.tileID.canonical,En.patternPositions))}this.status="done",tn(null,{buckets:t.values(fi).filter(function(Vi){return!Vi.isEmpty()}),featureIndex:Mn,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Pn.image,imageAtlas:En,glyphMap:this.returnDependencies?on:null,iconMap:this.returnDependencies?Ce:null,glyphPositions:this.returnDependencies?Pn.positions:null})}}};function f(We,nr,fr){for(var _r=new t.EvaluationParameters(nr),tn=0,Cn=We;tn=0!=!!nr&&We.reverse()}var M=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,C=function(We){this._feature=We,this.extent=t.EXTENT,this.type=We.type,this.properties=We.tags,"id"in We&&!isNaN(We.id)&&(this.id=parseInt(We.id,10))};C.prototype.loadGeometry=function(){if(this._feature.type===1){for(var We=[],nr=0,fr=this._feature.geometry;nr"u"&&(_r.push(Mn),fi=_r.length-1,Cn[Mn]=fi),nr.writeVarint(fi);var ki=fr.properties[Mn],Oi=typeof ki;Oi!=="string"&&Oi!=="boolean"&&Oi!=="number"&&(ki=JSON.stringify(ki));var ji=Oi+":"+ki,Xi=Tn[ji];typeof Xi>"u"&&(tn.push(ki),Xi=tn.length-1,Tn[ji]=Xi),nr.writeVarint(Xi)}}function lt(We,nr){return(nr<<3)+(We&7)}function yt(We){return We<<1^We>>31}function mt(We,nr){for(var fr=We.loadGeometry(),_r=We.type,tn=0,Cn=0,Tn=fr.length,Mn=0;Mn>1;dt(We,nr,Tn,_r,tn,Cn%2),tt(We,nr,fr,_r,Tn-1,Cn+1),tt(We,nr,fr,Tn+1,tn,Cn+1)}}function dt(We,nr,fr,_r,tn,Cn){for(;tn>_r;){if(tn-_r>600){var Tn=tn-_r+1,Mn=fr-_r+1,fi=Math.log(Tn),ki=.5*Math.exp(2*fi/3),Oi=.5*Math.sqrt(fi*ki*(Tn-ki)/Tn)*(Mn-Tn/2<0?-1:1),ji=Math.max(_r,Math.floor(fr-Mn*ki/Tn+Oi)),Xi=Math.min(tn,Math.floor(fr+(Tn-Mn)*ki/Tn+Oi));dt(We,nr,fr,ji,Xi,Cn)}var ci=nr[2*fr+Cn],za=_r,Wa=tn;for(rt(We,nr,_r,fr),nr[2*tn+Cn]>ci&&rt(We,nr,_r,tn);zaci;)Wa--}nr[2*_r+Cn]===ci?rt(We,nr,_r,Wa):(Wa++,rt(We,nr,Wa,tn)),Wa<=fr&&(_r=Wa+1),fr<=Wa&&(tn=Wa-1)}}function rt(We,nr,fr,_r){at(We,fr,_r),at(nr,2*fr,2*_r),at(nr,2*fr+1,2*_r+1)}function at(We,nr,fr){var _r=We[nr];We[nr]=We[fr],We[fr]=_r}function vt(We,nr,fr,_r,tn,Cn,Tn){for(var Mn=[0,We.length-1,0],fi=[],ki,Oi;Mn.length;){var ji=Mn.pop(),Xi=Mn.pop(),ci=Mn.pop();if(Xi-ci<=Tn){for(var za=ci;za<=Xi;za++)ki=nr[2*za],Oi=nr[2*za+1],ki>=fr&&ki<=tn&&Oi>=_r&&Oi<=Cn&&fi.push(We[za]);continue}var Wa=Math.floor((ci+Xi)/2);ki=nr[2*Wa],Oi=nr[2*Wa+1],ki>=fr&&ki<=tn&&Oi>=_r&&Oi<=Cn&&fi.push(We[Wa]);var ze=(ji+1)%2;(ji===0?fr<=ki:_r<=Oi)&&(Mn.push(ci),Mn.push(Wa-1),Mn.push(ze)),(ji===0?tn>=ki:Cn>=Oi)&&(Mn.push(Wa+1),Mn.push(Xi),Mn.push(ze))}return fi}function it(We,nr,fr,_r,tn,Cn){for(var Tn=[0,We.length-1,0],Mn=[],fi=tn*tn;Tn.length;){var ki=Tn.pop(),Oi=Tn.pop(),ji=Tn.pop();if(Oi-ji<=Cn){for(var Xi=ji;Xi<=Oi;Xi++)Y(nr[2*Xi],nr[2*Xi+1],fr,_r)<=fi&&Mn.push(We[Xi]);continue}var ci=Math.floor((ji+Oi)/2),za=nr[2*ci],Wa=nr[2*ci+1];Y(za,Wa,fr,_r)<=fi&&Mn.push(We[ci]);var ze=(ki+1)%2;(ki===0?fr-tn<=za:_r-tn<=Wa)&&(Tn.push(ji),Tn.push(ci-1),Tn.push(ze)),(ki===0?fr+tn>=za:_r+tn>=Wa)&&(Tn.push(ci+1),Tn.push(Oi),Tn.push(ze))}return Mn}function Y(We,nr,fr,_r){var tn=We-fr,Cn=nr-_r;return tn*tn+Cn*Cn}var ft=function(We){return We[0]},ut=function(We){return We[1]},kt=function(We,nr,fr,_r,tn){nr===void 0&&(nr=ft),fr===void 0&&(fr=ut),_r===void 0&&(_r=64),tn===void 0&&(tn=Float64Array),this.nodeSize=_r,this.points=We;for(var Cn=We.length<65536?Uint16Array:Uint32Array,Tn=this.ids=new Cn(We.length),Mn=this.coords=new tn(We.length*2),fi=0;fi=_r;ki--){var Oi=+Date.now();Mn=this._cluster(Mn,ki),this.trees[ki]=new kt(Mn,Mt,ee,Cn,Float32Array),fr&&console.log("z%d: %d clusters in %dms",ki,Mn.length,+Date.now()-Oi)}return fr&&console.timeEnd("total time"),this},Pt.prototype.getClusters=function(We,nr){var fr=((We[0]+180)%360+360)%360-180,_r=Math.max(-90,Math.min(90,We[1])),tn=We[2]===180?180:((We[2]+180)%360+360)%360-180,Cn=Math.max(-90,Math.min(90,We[3]));if(We[2]-We[0]>=360)fr=-180,tn=180;else if(fr>tn){var Tn=this.getClusters([fr,_r,180,Cn],nr),Mn=this.getClusters([-180,_r,tn,Cn],nr);return Tn.concat(Mn)}for(var fi=this.trees[this._limitZoom(nr)],ki=fi.range(fe(fr),pe(Cn),fe(tn),pe(_r)),Oi=[],ji=0,Xi=ki;jinr&&(za+=Rr.numPoints||1)}if(za>=Mn){for(var $r=Oi.x*ci,Gr=Oi.y*ci,Br=Tn&&ci>1?this._map(Oi,!0):null,Yr=(ki<<5)+(nr+1)+this.points.length,pn=0,on=Xi;pn1)for(var _n=0,Fn=Xi;_n>5},Pt.prototype._getOriginZoom=function(We){return(We-this.points.length)%32},Pt.prototype._map=function(We,nr){if(We.numPoints)return nr?Lt({},We.properties):We.properties;var fr=this.points[We.index].properties,_r=this.options.map(fr);return nr&&_r===fr?Lt({},_r):_r};function qt(We,nr,fr,_r,tn){return{x:We,y:nr,zoom:1/0,id:fr,parentId:-1,numPoints:_r,properties:tn}}function Wt(We,nr){var fr=We.geometry.coordinates,_r=fr[0],tn=fr[1];return{x:fe(_r),y:pe(tn),zoom:1/0,index:nr,parentId:-1}}function Jt(We){return{type:"Feature",id:We.id,properties:ge(We),geometry:{type:"Point",coordinates:[se(We.x),Tt(We.y)]}}}function ge(We){var nr=We.numPoints,fr=nr>=1e4?Math.round(nr/1e3)+"k":nr>=1e3?Math.round(nr/100)/10+"k":nr;return Lt(Lt({},We.properties),{cluster:!0,cluster_id:We.id,point_count:nr,point_count_abbreviated:fr})}function fe(We){return We/360+.5}function pe(We){var nr=Math.sin(We*Math.PI/180),fr=.5-.25*Math.log((1+nr)/(1-nr))/Math.PI;return fr<0?0:fr>1?1:fr}function se(We){return(We-.5)*360}function Tt(We){var nr=(180-We*360)*Math.PI/180;return 360*Math.atan(Math.exp(nr))/Math.PI-90}function Lt(We,nr){for(var fr in nr)We[fr]=nr[fr];return We}function Mt(We){return We.x}function ee(We){return We.y}function ve(We,nr,fr,_r){for(var tn=_r,Cn=fr-nr>>1,Tn=fr-nr,Mn,fi=We[nr],ki=We[nr+1],Oi=We[fr],ji=We[fr+1],Xi=nr+3;Xitn)Mn=Xi,tn=ci;else if(ci===tn){var za=Math.abs(Xi-Cn);za_r&&(Mn-nr>3&&ve(We,nr,Mn,_r),We[Mn+2]=tn,fr-Mn>3&&ve(We,Mn,fr,_r))}function oe(We,nr,fr,_r,tn,Cn){var Tn=tn-fr,Mn=Cn-_r;if(Tn!==0||Mn!==0){var fi=((We-fr)*Tn+(nr-_r)*Mn)/(Tn*Tn+Mn*Mn);fi>1?(fr=tn,_r=Cn):fi>0&&(fr+=Tn*fi,_r+=Mn*fi)}return Tn=We-fr,Mn=nr-_r,Tn*Tn+Mn*Mn}function Te(We,nr,fr,_r){var tn={id:typeof We>"u"?null:We,type:nr,geometry:fr,tags:_r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return He(tn),tn}function He(We){var nr=We.geometry,fr=We.type;if(fr==="Point"||fr==="MultiPoint"||fr==="LineString")Ge(We,nr);else if(fr==="Polygon"||fr==="MultiLineString")for(var _r=0;_r0&&(_r?Tn+=(tn*ki-fi*Cn)/2:Tn+=Math.sqrt(Math.pow(fi-tn,2)+Math.pow(ki-Cn,2))),tn=fi,Cn=ki}var Oi=nr.length-3;nr[2]=1,ve(nr,0,Oi,fr),nr[Oi+2]=1,nr.size=Math.abs(Tn),nr.start=0,nr.end=nr.size}function br(We,nr,fr,_r){for(var tn=0;tn1?1:fr}function Le(We,nr,fr,_r,tn,Cn,Tn,Mn){if(fr/=nr,_r/=nr,Cn>=fr&&Tn<_r)return We;if(Tn=_r)return null;for(var fi=[],ki=0;ki=fr&&za<_r){fi.push(Oi);continue}else if(za=_r)continue;var Wa=[];if(Xi==="Point"||Xi==="MultiPoint")Gt(ji,Wa,fr,_r,tn);else if(Xi==="LineString")ne(ji,Wa,fr,_r,tn,!1,Mn.lineMetrics);else if(Xi==="MultiLineString")gt(ji,Wa,fr,_r,tn,!1);else if(Xi==="Polygon")gt(ji,Wa,fr,_r,tn,!0);else if(Xi==="MultiPolygon")for(var ze=0;ze=fr&&Tn<=_r&&(nr.push(We[Cn]),nr.push(We[Cn+1]),nr.push(We[Cn+2]))}}function ne(We,nr,fr,_r,tn,Cn,Tn){for(var Mn=Ct(We),fi=tn===0?Nt:re,ki=We.start,Oi,ji,Xi=0;Xifr&&(ji=fi(Mn,ci,za,ze,Ie,fr),Tn&&(Mn.start=ki+Oi*ji)):Rr>_r?$r<_r&&(ji=fi(Mn,ci,za,ze,Ie,_r),Tn&&(Mn.start=ki+Oi*ji)):St(Mn,ci,za,Wa),$r=fr&&(ji=fi(Mn,ci,za,ze,Ie,fr),Gr=!0),$r>_r&&Rr<=_r&&(ji=fi(Mn,ci,za,ze,Ie,_r),Gr=!0),!Cn&&Gr&&(Tn&&(Mn.end=ki+Oi*ji),nr.push(Mn),Mn=Ct(We)),Tn&&(ki+=Oi)}var Br=We.length-3;ci=We[Br],za=We[Br+1],Wa=We[Br+2],Rr=tn===0?ci:za,Rr>=fr&&Rr<=_r&&St(Mn,ci,za,Wa),Br=Mn.length-3,Cn&&Br>=3&&(Mn[Br]!==Mn[0]||Mn[Br+1]!==Mn[1])&&St(Mn,Mn[0],Mn[1],Mn[2]),Mn.length&&nr.push(Mn)}function Ct(We){var nr=[];return nr.size=We.size,nr.start=We.start,nr.end=We.end,nr}function gt(We,nr,fr,_r,tn,Cn){for(var Tn=0;TnTn.maxX&&(Tn.maxX=Oi),ji>Tn.maxY&&(Tn.maxY=ji)}return Tn}function Ar(We,nr,fr,_r){var tn=nr.geometry,Cn=nr.type,Tn=[];if(Cn==="Point"||Cn==="MultiPoint")for(var Mn=0;Mn0&&nr.size<(tn?Tn:_r)){fr.numPoints+=nr.length/3;return}for(var Mn=[],fi=0;fiTn)&&(fr.numSimplified++,Mn.push(nr[fi]),Mn.push(nr[fi+1])),fr.numPoints++;tn&&Qr(Mn,Cn),We.push(Mn)}function Qr(We,nr){for(var fr=0,_r=0,tn=We.length,Cn=tn-2;_r0===nr)for(_r=0,tn=We.length;_r24)throw new Error("maxZoom should be in the 0-24 range");if(nr.promoteId&&nr.generateId)throw new Error("promoteId and generateId cannot be used together.");var _r=cr(We,nr);this.tiles={},this.tileCoords=[],fr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",nr.indexMaxZoom,nr.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),_r=le(_r,nr),_r.length&&this.splitTile(_r,0,0,0),fr&&(_r.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Wn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Wn.prototype.splitTile=function(We,nr,fr,_r,tn,Cn,Tn){for(var Mn=[We,nr,fr,_r],fi=this.options,ki=fi.debug;Mn.length;){_r=Mn.pop(),fr=Mn.pop(),nr=Mn.pop(),We=Mn.pop();var Oi=1<1&&console.time("creation"),Xi=this.tiles[ji]=Sr(We,nr,fr,_r,fi),this.tileCoords.push({z:nr,x:fr,y:_r}),ki)){ki>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",nr,fr,_r,Xi.numFeatures,Xi.numPoints,Xi.numSimplified),console.timeEnd("creation"));var ci="z"+nr;this.stats[ci]=(this.stats[ci]||0)+1,this.total++}if(Xi.source=We,tn){if(nr===fi.maxZoom||nr===tn)continue;var za=1<1&&console.time("clipping");var Wa=.5*fi.buffer/fi.extent,ze=.5-Wa,Ie=.5+Wa,Rr=1+Wa,$r,Gr,Br,Yr,pn,on;$r=Gr=Br=Yr=null,pn=Le(We,Oi,fr-Wa,fr+Ie,0,Xi.minX,Xi.maxX,fi),on=Le(We,Oi,fr+ze,fr+Rr,0,Xi.minX,Xi.maxX,fi),We=null,pn&&($r=Le(pn,Oi,_r-Wa,_r+Ie,1,Xi.minY,Xi.maxY,fi),Gr=Le(pn,Oi,_r+ze,_r+Rr,1,Xi.minY,Xi.maxY,fi),pn=null),on&&(Br=Le(on,Oi,_r-Wa,_r+Ie,1,Xi.minY,Xi.maxY,fi),Yr=Le(on,Oi,_r+ze,_r+Rr,1,Xi.minY,Xi.maxY,fi),on=null),ki>1&&console.timeEnd("clipping"),Mn.push($r||[],nr+1,fr*2,_r*2),Mn.push(Gr||[],nr+1,fr*2,_r*2+1),Mn.push(Br||[],nr+1,fr*2+1,_r*2),Mn.push(Yr||[],nr+1,fr*2+1,_r*2+1)}}},Wn.prototype.getTile=function(We,nr,fr){var _r=this.options,tn=_r.extent,Cn=_r.debug;if(We<0||We>24)return null;var Tn=1<1&&console.log("drilling down to z%d-%d-%d",We,nr,fr);for(var fi=We,ki=nr,Oi=fr,ji;!ji&&fi>0;)fi--,ki=Math.floor(ki/2),Oi=Math.floor(Oi/2),ji=this.tiles[Xn(fi,ki,Oi)];return!ji||!ji.source?null:(Cn>1&&console.log("found parent tile z%d-%d-%d",fi,ki,Oi),Cn>1&&console.time("drilling down"),this.splitTile(ji.source,fi,ki,Oi,We,nr,fr),Cn>1&&console.timeEnd("drilling down"),this.tiles[Mn]?qe(this.tiles[Mn],tn):null)};function Xn(We,nr,fr){return((1<=0?0:$.button},r.remove=function($){$.parentNode&&$.parentNode.removeChild($)};function v($,ot,et){var xt,Vt,de,ye=t.browser.devicePixelRatio>1?"@2x":"",Yt=t.getJSON(ot.transformRequest(ot.normalizeSpriteURL($,ye,".json"),t.ResourceType.SpriteJSON),function(ir,Ye){Yt=null,de||(de=ir,xt=Ye,Se())}),ce=t.getImage(ot.transformRequest(ot.normalizeSpriteURL($,ye,".png"),t.ResourceType.SpriteImage),function(ir,Ye){ce=null,de||(de=ir,Vt=Ye,Se())});function Se(){if(de)et(de);else if(xt&&Vt){var ir=t.browser.getImageData(Vt),Ye={};for(var tr in xt){var lr=xt[tr],hr=lr.width,Ve=lr.height,Xe=lr.x,Ze=lr.y,Pr=lr.sdf,sn=lr.pixelRatio,dn=lr.stretchX,pi=lr.stretchY,ui=lr.content,Yn=new t.RGBAImage({width:hr,height:Ve});t.RGBAImage.copy(ir,Yn,{x:Xe,y:Ze},{x:0,y:0},{width:hr,height:Ve}),Ye[tr]={data:Yn,pixelRatio:sn,sdf:Pr,stretchX:dn,stretchY:pi,content:ui}}et(null,Ye)}}return{cancel:function(){Yt&&(Yt.cancel(),Yt=null),ce&&(ce.cancel(),ce=null)}}}function T($){var ot=$.userImage;if(ot&&ot.render){var et=ot.render();if(et)return $.data.replace(new Uint8Array(ot.data.buffer)),!0}return!1}var u=1,b=function($){function ot(){$.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.isLoaded=function(){return this.loaded},ot.prototype.setLoaded=function(et){if(this.loaded!==et&&(this.loaded=et,et)){for(var xt=0,Vt=this.requestors;xt=0?1.2:1))}A.prototype.draw=function($){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText($,this.buffer,this.middle);for(var ot=this.ctx.getImageData(0,0,this.size,this.size),et=new Uint8ClampedArray(this.size*this.size),xt=0;xt65535){Se(new Error("glyphs > 65535 not supported"));return}if(tr.ranges[hr]){Se(null,{stack:ir,id:Ye,glyph:lr});return}var Ve=tr.requests[hr];Ve||(Ve=tr.requests[hr]=[],k.loadGlyphRange(ir,hr,et.url,et.requestManager,function(Xe,Ze){if(Ze){for(var Pr in Ze)et._doesCharSupportLocalGlyph(+Pr)||(tr.glyphs[+Pr]=Ze[+Pr]);tr.ranges[hr]=!0}for(var sn=0,dn=Ve;sn1&&(ce=$[++Yt]);var ir=Math.abs(Se-ce.left),Ye=Math.abs(Se-ce.right),tr=Math.min(ir,Ye),lr=void 0,hr=Vt/et*(xt+1);if(ce.isDash){var Ve=xt-Math.abs(hr);lr=Math.sqrt(tr*tr+Ve*Ve)}else lr=xt-Math.sqrt(tr*tr+hr*hr);this.data[ye+Se]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addRegularDash=function($){for(var ot=$.length-1;ot>=0;--ot){var et=$[ot],xt=$[ot+1];et.zeroLength?$.splice(ot,1):xt&&xt.isDash===et.isDash&&(xt.left=et.left,$.splice(ot,1))}var Vt=$[0],de=$[$.length-1];Vt.isDash===de.isDash&&(Vt.left=de.left-this.width,de.right=Vt.right+this.width);for(var ye=this.width*this.nextRow,Yt=0,ce=$[Yt],Se=0;Se1&&(ce=$[++Yt]);var ir=Math.abs(Se-ce.left),Ye=Math.abs(Se-ce.right),tr=Math.min(ir,Ye),lr=ce.isDash?tr:-tr;this.data[ye+Se]=Math.max(0,Math.min(255,lr+128))}},V.prototype.addDash=function($,ot){var et=ot?7:0,xt=2*et+1;if(this.nextRow+xt>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var Vt=0,de=0;de<$.length;de++)Vt+=$[de];if(Vt!==0){var ye=this.width/Vt,Yt=this.getDashRanges($,this.width,ye);ot?this.addRoundDash(Yt,ye,et):this.addRegularDash(Yt)}var ce={y:(this.nextRow+et+.5)/this.height,height:2*et/this.height,width:Vt};return this.nextRow+=xt,this.dirty=!0,ce},V.prototype.bind=function($){var ot=$.gl;this.texture?(ot.bindTexture(ot.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,ot.texSubImage2D(ot.TEXTURE_2D,0,0,0,this.width,this.height,ot.ALPHA,ot.UNSIGNED_BYTE,this.data))):(this.texture=ot.createTexture(),ot.bindTexture(ot.TEXTURE_2D,this.texture),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_WRAP_S,ot.REPEAT),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_WRAP_T,ot.REPEAT),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_MIN_FILTER,ot.LINEAR),ot.texParameteri(ot.TEXTURE_2D,ot.TEXTURE_MAG_FILTER,ot.LINEAR),ot.texImage2D(ot.TEXTURE_2D,0,ot.ALPHA,this.width,this.height,0,ot.ALPHA,ot.UNSIGNED_BYTE,this.data))};var H=function $(ot,et){this.workerPool=ot,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var xt=this.workerPool.acquire(this.id),Vt=0;Vt=et.minX&&$.x=et.minY&&$.y0&&(Se[new t.OverscaledTileID(et.overscaledZ,ye,xt.z,de,xt.y-1).key]={backfilled:!1},Se[new t.OverscaledTileID(et.overscaledZ,et.wrap,xt.z,xt.x,xt.y-1).key]={backfilled:!1},Se[new t.OverscaledTileID(et.overscaledZ,ce,xt.z,Yt,xt.y-1).key]={backfilled:!1}),xt.y+10&&(Vt.resourceTiming=et._resourceTiming,et._resourceTiming=[]),et.fire(new t.Event("data",Vt))})},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setData=function(et){var xt=this;return this._data=et,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Vt){if(Vt){xt.fire(new t.ErrorEvent(Vt));return}var de={dataType:"source",sourceDataType:"content"};xt._collectResourceTiming&&xt._resourceTiming&&xt._resourceTiming.length>0&&(de.resourceTiming=xt._resourceTiming,xt._resourceTiming=[]),xt.fire(new t.Event("data",de))}),this},ot.prototype.getClusterExpansionZoom=function(et,xt){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterChildren=function(et,xt){return this.actor.send("geojson.getClusterChildren",{clusterId:et,source:this.id},xt),this},ot.prototype.getClusterLeaves=function(et,xt,Vt,de){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:et,limit:xt,offset:Vt},de),this},ot.prototype._updateWorkerData=function(et){var xt=this;this._loaded=!1;var Vt=t.extend({},this.workerOptions),de=this._data;typeof de=="string"?(Vt.request=this.map._requestManager.transformRequest(t.browser.resolveURL(de),t.ResourceType.Source),Vt.request.collectResourceTiming=this._collectResourceTiming):Vt.data=JSON.stringify(de),this.actor.send(this.type+".loadData",Vt,function(ye,Yt){xt._removed||Yt&&Yt.abandoned||(xt._loaded=!0,Yt&&Yt.resourceTiming&&Yt.resourceTiming[xt.id]&&(xt._resourceTiming=Yt.resourceTiming[xt.id].slice(0)),xt.actor.send(xt.type+".coalesce",{source:Vt.source},null),et(ye))})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.loadTile=function(et,xt){var Vt=this,de=et.actor?"reloadTile":"loadTile";et.actor=this.actor;var ye={type:this.type,uid:et.uid,tileID:et.tileID,zoom:et.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};et.request=this.actor.send(de,ye,function(Yt,ce){return delete et.request,et.unloadVectorData(),et.aborted?xt(null):Yt?xt(Yt):(et.loadVectorData(ce,Vt.map.painter,de==="reloadTile"),xt(null))})},ot.prototype.abortTile=function(et){et.request&&(et.request.cancel(),delete et.request),et.aborted=!0},ot.prototype.unloadTile=function(et){et.unloadVectorData(),this.actor.send("removeTile",{uid:et.uid,type:this.type,source:this.id})},ot.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},ot.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented),yt=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),mt=function($){function ot(et,xt,Vt,de){$.call(this),this.id=et,this.dispatcher=Vt,this.coordinates=xt.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=xt}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(et,xt){var Vt=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function(de,ye){Vt._loaded=!0,de?Vt.fire(new t.ErrorEvent(de)):ye&&(Vt.image=ye,et&&(Vt.coordinates=et),xt&&xt(),Vt._finishLoading())})},ot.prototype.loaded=function(){return this._loaded},ot.prototype.updateImage=function(et){var xt=this;return!this.image||!et.url?this:(this.options.url=et.url,this.load(et.coordinates,function(){xt.texture=null}),this)},ot.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},ot.prototype.onAdd=function(et){this.map=et,this.load()},ot.prototype.setCoordinates=function(et){var xt=this;this.coordinates=et;var Vt=et.map(t.MercatorCoordinate.fromLngLat);this.tileID=st(Vt),this.minzoom=this.maxzoom=this.tileID.z;var de=Vt.map(function(ye){return xt.tileID.getTilePoint(ye)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(de[0].x,de[0].y,0,0),this._boundsArray.emplaceBack(de[1].x,de[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(de[3].x,de[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(de[2].x,de[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(et,this.image,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Vt in this.tiles){var de=this.tiles[Vt];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},ot.prototype.loadTile=function(et,xt){this.tileID&&this.tileID.equals(et.tileID.canonical)?(this.tiles[String(et.tileID.wrap)]=et,et.buckets={},xt(null)):(et.state="errored",xt(null))},ot.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return!1},ot}(t.Evented);function st($){for(var ot=1/0,et=1/0,xt=-1/0,Vt=-1/0,de=0,ye=$;dext.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+xt.start(0)+" and "+xt.end(0)+"-second mark."))):this.video.currentTime=et}},ot.prototype.getVideo=function(){return this.video},ot.prototype.onAdd=function(et){this.map||(this.map=et,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},ot.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var et=this.map.painter.context,xt=et.gl;this.boundsBuffer||(this.boundsBuffer=et.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE),xt.texSubImage2D(xt.TEXTURE_2D,0,0,0,xt.RGBA,xt.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(et,this.video,xt.RGBA),this.texture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE));for(var Vt in this.tiles){var de=this.tiles[Vt];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this.video&&!this.video.paused},ot}(mt),dt=function($){function ot(et,xt,Vt,de){$.call(this,et,xt,Vt,de),xt.coordinates?(!Array.isArray(xt.coordinates)||xt.coordinates.length!==4||xt.coordinates.some(function(ye){return!Array.isArray(ye)||ye.length!==2||ye.some(function(Yt){return typeof Yt!="number"})}))&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "coordinates"'))),xt.animate&&typeof xt.animate!="boolean"&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'optional "animate" property must be a boolean value'))),xt.canvas?typeof xt.canvas!="string"&&!(xt.canvas instanceof t.window.HTMLCanvasElement)&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+et,null,'missing required property "canvas"'))),this.options=xt,this.animate=xt.animate!==void 0?xt.animate:!0}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},ot.prototype.getCanvas=function(){return this.canvas},ot.prototype.onAdd=function(et){this.map=et,this.load(),this.canvas&&this.animate&&this.play()},ot.prototype.onRemove=function(){this.pause()},ot.prototype.prepare=function(){var et=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,et=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,et=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var xt=this.map.painter.context,Vt=xt.gl;this.boundsBuffer||(this.boundsBuffer=xt.createVertexBuffer(this._boundsArray,yt.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(et||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(xt,this.canvas,Vt.RGBA,{premultiply:!0});for(var de in this.tiles){var ye=this.tiles[de];ye.state!=="loaded"&&(ye.state="loaded",ye.texture=this.texture)}}},ot.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},ot.prototype.hasTransition=function(){return this._playing},ot.prototype._hasInvalidDimensions=function(){for(var et=0,xt=[this.canvas.width,this.canvas.height];etthis.max){var ye=this._getAndRemoveByKey(this.order[0]);ye&&this.onRemove(ye)}return this},Wt.prototype.has=function($){return $.wrapped().key in this.data},Wt.prototype.getAndRemove=function($){return this.has($)?this._getAndRemoveByKey($.wrapped().key):null},Wt.prototype._getAndRemoveByKey=function($){var ot=this.data[$].shift();return ot.timeout&&clearTimeout(ot.timeout),this.data[$].length===0&&delete this.data[$],this.order.splice(this.order.indexOf($),1),ot.value},Wt.prototype.getByKey=function($){var ot=this.data[$];return ot?ot[0].value:null},Wt.prototype.get=function($){if(!this.has($))return null;var ot=this.data[$.wrapped().key][0];return ot.value},Wt.prototype.remove=function($,ot){if(!this.has($))return this;var et=$.wrapped().key,xt=ot===void 0?0:this.data[et].indexOf(ot),Vt=this.data[et][xt];return this.data[et].splice(xt,1),Vt.timeout&&clearTimeout(Vt.timeout),this.data[et].length===0&&delete this.data[et],this.onRemove(Vt.value),this.order.splice(this.order.indexOf(et),1),this},Wt.prototype.setMaxSize=function($){for(this.max=$;this.order.length>this.max;){var ot=this._getAndRemoveByKey(this.order[0]);ot&&this.onRemove(ot)}return this},Wt.prototype.filter=function($){var ot=[];for(var et in this.data)for(var xt=0,Vt=this.data[et];xt1||(Math.abs(ir)>1&&(Math.abs(ir+tr)===1?ir+=tr:Math.abs(ir-tr)===1&&(ir-=tr)),!(!Se.dem||!ce.dem)&&(ce.dem.backfillBorder(Se.dem,ir,Ye),ce.neighboringTiles&&ce.neighboringTiles[lr]&&(ce.neighboringTiles[lr].backfilled=!0)))}},ot.prototype.getTile=function(et){return this.getTileByID(et.key)},ot.prototype.getTileByID=function(et){return this._tiles[et]},ot.prototype._retainLoadedChildren=function(et,xt,Vt,de){for(var ye in this._tiles){var Yt=this._tiles[ye];if(!(de[ye]||!Yt.hasData()||Yt.tileID.overscaledZ<=xt||Yt.tileID.overscaledZ>Vt)){for(var ce=Yt.tileID;Yt&&Yt.tileID.overscaledZ>xt+1;){var Se=Yt.tileID.scaledTo(Yt.tileID.overscaledZ-1);Yt=this._tiles[Se.key],Yt&&Yt.hasData()&&(ce=Se)}for(var ir=ce;ir.overscaledZ>xt;)if(ir=ir.scaledTo(ir.overscaledZ-1),et[ir.key]){de[ce.key]=ce;break}}}},ot.prototype.findLoadedParent=function(et,xt){if(et.key in this._loadedParentTiles){var Vt=this._loadedParentTiles[et.key];return Vt&&Vt.tileID.overscaledZ>=xt?Vt:null}for(var de=et.overscaledZ-1;de>=xt;de--){var ye=et.scaledTo(de),Yt=this._getLoadedTile(ye);if(Yt)return Yt}},ot.prototype._getLoadedTile=function(et){var xt=this._tiles[et.key];if(xt&&xt.hasData())return xt;var Vt=this._cache.getByKey(et.wrapped().key);return Vt},ot.prototype.updateCacheSize=function(et){var xt=Math.ceil(et.width/this._source.tileSize)+1,Vt=Math.ceil(et.height/this._source.tileSize)+1,de=xt*Vt,ye=5,Yt=Math.floor(de*ye),ce=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Yt):Yt;this._cache.setMaxSize(ce)},ot.prototype.handleWrapJump=function(et){var xt=this._prevLng===void 0?et:this._prevLng,Vt=et-xt,de=Vt/360,ye=Math.round(de);if(this._prevLng=et,ye){var Yt={};for(var ce in this._tiles){var Se=this._tiles[ce];Se.tileID=Se.tileID.unwrapTo(Se.tileID.wrap+ye),Yt[Se.tileID.key]=Se}this._tiles=Yt;for(var ir in this._timers)clearTimeout(this._timers[ir]),delete this._timers[ir];for(var Ye in this._tiles){var tr=this._tiles[Ye];this._setTileReloadTimer(Ye,tr)}}},ot.prototype.update=function(et){var xt=this;if(this.transform=et,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(et),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Vt;this.used?this._source.tileID?Vt=et.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(mi){return new t.OverscaledTileID(mi.canonical.z,mi.wrap,mi.canonical.z,mi.canonical.x,mi.canonical.y)}):(Vt=et.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Vt=Vt.filter(function(mi){return xt._source.hasTile(mi)}))):Vt=[];var de=et.coveringZoomLevel(this._source),ye=Math.max(de-ot.maxOverzooming,this._source.minzoom),Yt=Math.max(de+ot.maxUnderzooming,this._source.minzoom),ce=this._updateRetainedTiles(Vt,de);if(fi(this._source.type)){for(var Se={},ir={},Ye=Object.keys(ce),tr=0,lr=Ye;trthis._source.maxzoom){var Ze=Ve.children(this._source.maxzoom)[0],Pr=this.getTile(Ze);if(Pr&&Pr.hasData()){Vt[Ze.key]=Ze;continue}}else{var sn=Ve.children(this._source.maxzoom);if(Vt[sn[0].key]&&Vt[sn[1].key]&&Vt[sn[2].key]&&Vt[sn[3].key])continue}for(var dn=Xe.wasRequested(),pi=Ve.overscaledZ-1;pi>=ye;--pi){var ui=Ve.scaledTo(pi);if(de[ui.key]||(de[ui.key]=!0,Xe=this.getTile(ui),!Xe&&dn&&(Xe=this._addTile(ui)),Xe&&(Vt[ui.key]=ui,dn=Xe.wasRequested(),Xe.hasData())))break}}}return Vt},ot.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var et in this._tiles){for(var xt=[],Vt=void 0,de=this._tiles[et].tileID;de.overscaledZ>0;){if(de.key in this._loadedParentTiles){Vt=this._loadedParentTiles[de.key];break}xt.push(de.key);var ye=de.scaledTo(de.overscaledZ-1);if(Vt=this._getLoadedTile(ye),Vt)break;de=ye}for(var Yt=0,ce=xt;Yt0)&&(xt.hasData()&&xt.state!=="reloading"?this._cache.add(xt.tileID,xt,xt.getExpiryTimeout()):(xt.aborted=!0,this._abortTile(xt),this._unloadTile(xt))))},ot.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var et in this._tiles)this._removeTile(et);this._cache.reset()},ot.prototype.tilesIn=function(et,xt,Vt){var de=this,ye=[],Yt=this.transform;if(!Yt)return ye;for(var ce=Vt?Yt.getCameraQueryGeometry(et):et,Se=et.map(function(pi){return Yt.pointCoordinate(pi)}),ir=ce.map(function(pi){return Yt.pointCoordinate(pi)}),Ye=this.getIds(),tr=1/0,lr=1/0,hr=-1/0,Ve=-1/0,Xe=0,Ze=ir;Xe=0&&ea[1].y+mi>=0){var Ei=Se.map(function(la){return Yn.getTilePoint(la)}),Li=ir.map(function(la){return Yn.getTilePoint(la)});ye.push({tile:ui,tileID:Yn,queryGeometry:Ei,cameraQueryGeometry:Li,scale:Ci})}}},dn=0;dn=t.browser.now())return!0}return!1},ot.prototype.setFeatureState=function(et,xt,Vt){et=et||"_geojsonTileLayer",this._state.updateState(et,xt,Vt)},ot.prototype.removeFeatureState=function(et,xt,Vt){et=et||"_geojsonTileLayer",this._state.removeFeatureState(et,xt,Vt)},ot.prototype.getFeatureState=function(et,xt){return et=et||"_geojsonTileLayer",this._state.getState(et,xt)},ot.prototype.setDependencies=function(et,xt,Vt){var de=this._tiles[et];de&&de.setDependencies(xt,Vt)},ot.prototype.reloadTilesForDependencies=function(et,xt){for(var Vt in this._tiles){var de=this._tiles[Vt];de.hasDependency(et,xt)&&this._reloadTile(Vt,"reloading")}this._cache.filter(function(ye){return!ye.hasDependency(et,xt)})},ot}(t.Evented);Tn.maxOverzooming=10,Tn.maxUnderzooming=3;function Mn($,ot){var et=Math.abs($.wrap*2)-+($.wrap<0),xt=Math.abs(ot.wrap*2)-+(ot.wrap<0);return $.overscaledZ-ot.overscaledZ||xt-et||ot.canonical.y-$.canonical.y||ot.canonical.x-$.canonical.x}function fi($){return $==="raster"||$==="image"||$==="video"}function ki(){return new t.window.Worker(yl.workerUrl)}var Oi="mapboxgl_preloaded_worker_pool",ji=function(){this.active={}};ji.prototype.acquire=function($){if(!this.workers)for(this.workers=[];this.workers.length0?(xt-de)/ye:0;return this.points[Vt].mult(1-Yt).add(this.points[ot].mult(Yt))};var En=function($,ot,et){var xt=this.boxCells=[],Vt=this.circleCells=[];this.xCellCount=Math.ceil($/et),this.yCellCount=Math.ceil(ot/et);for(var de=0;dethis.width||xt<0||ot>this.height)return Vt?!1:[];var ye=[];if($<=0&&ot<=0&&this.width<=et&&this.height<=xt){if(Vt)return!0;for(var Yt=0;Yt0:ye}},En.prototype._queryCircle=function($,ot,et,xt,Vt){var de=$-et,ye=$+et,Yt=ot-et,ce=ot+et;if(ye<0||de>this.width||ce<0||Yt>this.height)return xt?!1:[];var Se=[],ir={hitTest:xt,circle:{x:$,y:ot,radius:et},seenUids:{box:{},circle:{}}};return this._forEachCell(de,Yt,ye,ce,this._queryCellCircle,Se,ir,Vt),xt?Se.length>0:Se},En.prototype.query=function($,ot,et,xt,Vt){return this._query($,ot,et,xt,!1,Vt)},En.prototype.hitTest=function($,ot,et,xt,Vt){return this._query($,ot,et,xt,!0,Vt)},En.prototype.hitTestCircle=function($,ot,et,xt){return this._queryCircle($,ot,et,!0,xt)},En.prototype._queryCell=function($,ot,et,xt,Vt,de,ye,Yt){var ce=ye.seenUids,Se=this.boxCells[Vt];if(Se!==null)for(var ir=this.bboxes,Ye=0,tr=Se;Ye=ir[hr+0]&&xt>=ir[hr+1]&&(!Yt||Yt(this.boxKeys[lr]))){if(ye.hitTest)return de.push(!0),!0;de.push({key:this.boxKeys[lr],x1:ir[hr],y1:ir[hr+1],x2:ir[hr+2],y2:ir[hr+3]})}}}var Ve=this.circleCells[Vt];if(Ve!==null)for(var Xe=this.circles,Ze=0,Pr=Ve;Zeye*ye+Yt*Yt},En.prototype._circleAndRectCollide=function($,ot,et,xt,Vt,de,ye){var Yt=(de-xt)/2,ce=Math.abs($-(xt+Yt));if(ce>Yt+et)return!1;var Se=(ye-Vt)/2,ir=Math.abs(ot-(Vt+Se));if(ir>Se+et)return!1;if(ce<=Yt||ir<=Se)return!0;var Ye=ce-Yt,tr=ir-Se;return Ye*Ye+tr*tr<=et*et};function Zn($,ot,et,xt,Vt){var de=t.create();return ot?(t.scale(de,de,[1/Vt,1/Vt,1]),et||t.rotateZ(de,de,xt.angle)):t.multiply(de,xt.labelPlaneMatrix,$),de}function La($,ot,et,xt,Vt){if(ot){var de=t.clone($);return t.scale(de,de,[Vt,Vt,1]),et||t.rotateZ(de,de,-xt.angle),de}else return xt.glCoordMatrix}function Vi($,ot){var et=[$.x,$.y,0,1];Ks(et,et,ot);var xt=et[3];return{point:new t.Point(et[0]/xt,et[1]/xt),signedDistanceFromCamera:xt}}function Qa($,ot){return .5+.5*($/ot)}function Ja($,ot){var et=$[0]/$[3],xt=$[1]/$[3],Vt=et>=-ot[0]&&et<=ot[0]&&xt>=-ot[1]&&xt<=ot[1];return Vt}function Do($,ot,et,xt,Vt,de,ye,Yt){var ce=xt?$.textSizeData:$.iconSizeData,Se=t.evaluateSizeForZoom(ce,et.transform.zoom),ir=[256/et.width*2+1,256/et.height*2+1],Ye=xt?$.text.dynamicLayoutVertexArray:$.icon.dynamicLayoutVertexArray;Ye.clear();for(var tr=$.lineVertexArray,lr=xt?$.text.placedSymbolArray:$.icon.placedSymbolArray,hr=et.transform.width/et.transform.height,Ve=!1,Xe=0;Xede)return{useVertical:!0}}return($===t.WritingMode.vertical?ot.yet.x)?{needsFlipping:!0}:null}function Da($,ot,et,xt,Vt,de,ye,Yt,ce,Se,ir,Ye,tr,lr){var hr=ot/24,Ve=$.lineOffsetX*hr,Xe=$.lineOffsetY*hr,Ze;if($.numGlyphs>1){var Pr=$.glyphStartIndex+$.numGlyphs,sn=$.lineStartIndex,dn=$.lineStartIndex+$.lineLength,pi=yo(hr,Yt,Ve,Xe,et,ir,Ye,$,ce,de,tr);if(!pi)return{notEnoughRoom:!0};var ui=Vi(pi.first.point,ye).point,Yn=Vi(pi.last.point,ye).point;if(xt&&!et){var Ci=Fo($.writingMode,ui,Yn,lr);if(Ci)return Ci}Ze=[pi.first];for(var mi=$.glyphStartIndex+1;mi0?la.point:ys(Ye,Li,ea,1,Vt),co=Fo($.writingMode,ea,to,lr);if(co)return co}var qo=os(hr*Yt.getoffsetX($.glyphStartIndex),Ve,Xe,et,ir,Ye,$.segment,$.lineStartIndex,$.lineStartIndex+$.lineLength,ce,de,tr);if(!qo)return{notEnoughRoom:!0};Ze=[qo]}for(var xs=0,Il=Ze;xs0?1:-1,hr=0;xt&&(lr*=-1,hr=Math.PI),lr<0&&(hr+=Math.PI);for(var Ve=lr>0?Yt+ye:Yt+ye+1,Xe=Vt,Ze=Vt,Pr=0,sn=0,dn=Math.abs(tr),pi=[];Pr+sn<=dn;){if(Ve+=lr,Ve=ce)return null;if(Ze=Xe,pi.push(Xe),Xe=Ye[Ve],Xe===void 0){var ui=new t.Point(Se.getx(Ve),Se.gety(Ve)),Yn=Vi(ui,ir);if(Yn.signedDistanceFromCamera>0)Xe=Ye[Ve]=Yn.point;else{var Ci=Ve-lr,mi=Pr===0?de:new t.Point(Se.getx(Ci),Se.gety(Ci));Xe=ys(mi,ui,Ze,dn-Pr+1,ir)}}Pr+=sn,sn=Ze.dist(Xe)}var ea=(dn-Pr)/sn,Ei=Xe.sub(Ze),Li=Ei.mult(ea)._add(Ze);Li._add(Ei._unit()._perp()._mult(et*lr));var la=hr+Math.atan2(Xe.y-Ze.y,Xe.x-Ze.x);return pi.push(Li),{point:Li,angle:la,path:pi}}var ul=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Zo($,ot){for(var et=0;et<$;et++){var xt=ot.length;ot.resize(xt+4),ot.float32.set(ul,xt*3)}}function Ks($,ot,et){var xt=ot[0],Vt=ot[1];return $[0]=et[0]*xt+et[4]*Vt+et[12],$[1]=et[1]*xt+et[5]*Vt+et[13],$[3]=et[3]*xt+et[7]*Vt+et[15],$}var ss=100,cl=function($,ot,et){ot===void 0&&(ot=new En($.width+2*ss,$.height+2*ss,25)),et===void 0&&(et=new En($.width+2*ss,$.height+2*ss,25)),this.transform=$,this.grid=ot,this.ignoredGrid=et,this.pitchfactor=Math.cos($._pitch)*$.cameraToCenterDistance,this.screenRightBoundary=$.width+ss,this.screenBottomBoundary=$.height+ss,this.gridRightBoundary=$.width+2*ss,this.gridBottomBoundary=$.height+2*ss};cl.prototype.placeCollisionBox=function($,ot,et,xt,Vt){var de=this.projectAndGetPerspectiveRatio(xt,$.anchorPointX,$.anchorPointY),ye=et*de.perspectiveRatio,Yt=$.x1*ye+de.point.x,ce=$.y1*ye+de.point.y,Se=$.x2*ye+de.point.x,ir=$.y2*ye+de.point.y;return!this.isInsideGrid(Yt,ce,Se,ir)||!ot&&this.grid.hitTest(Yt,ce,Se,ir,Vt)?{box:[],offscreen:!1}:{box:[Yt,ce,Se,ir],offscreen:this.isOffscreen(Yt,ce,Se,ir)}},cl.prototype.placeCollisionCircles=function($,ot,et,xt,Vt,de,ye,Yt,ce,Se,ir,Ye,tr){var lr=[],hr=new t.Point(ot.anchorX,ot.anchorY),Ve=Vi(hr,de),Xe=Qa(this.transform.cameraToCenterDistance,Ve.signedDistanceFromCamera),Ze=Se?Vt/Xe:Vt*Xe,Pr=Ze/t.ONE_EM,sn=Vi(hr,ye).point,dn={},pi=ot.lineOffsetX*Pr,ui=ot.lineOffsetY*Pr,Yn=yo(Pr,xt,pi,ui,!1,sn,hr,ot,et,ye,dn),Ci=!1,mi=!1,ea=!0;if(Yn){for(var Ei=Ye*.5*Xe+tr,Li=new t.Point(-ss,-ss),la=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),to=new Pn,co=Yn.first,qo=Yn.last,xs=[],Il=co.path.length-1;Il>=1;Il--)xs.push(co.path[Il]);for(var Vl=1;Vl0){for(var Fs=xs[0].clone(),Mu=xs[0].clone(),af=1;af=Li.x&&Mu.x<=la.x&&Fs.y>=Li.y&&Mu.y<=la.y?_c=[xs]:Mu.xla.x||Mu.yla.y?_c=[]:_c=t.clipLine([xs],Li.x,Li.y,la.x,la.y)}for(var If=0,jp=_c;If=this.screenRightBoundary||xtthis.screenBottomBoundary},cl.prototype.isInsideGrid=function($,ot,et,xt){return et>=0&&$=0&&ot0){var sn;return this.prevPlacement&&this.prevPlacement.variableOffsets[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID]&&this.prevPlacement.placements[Ye.crossTileID].text&&(sn=this.prevPlacement.variableOffsets[Ye.crossTileID].anchor),this.variableOffsets[Ye.crossTileID]={textOffset:Ve,width:et,height:xt,anchor:$,textBoxScale:Vt,prevAnchor:sn},this.markUsedJustification(tr,$,Ye,lr),tr.allowVerticalPlacement&&(this.markUsedOrientation(tr,lr,Ye),this.placedOrientations[Ye.crossTileID]=lr),{shift:Xe,placedGlyphBoxes:Ze}}},Us.prototype.placeLayerBucketPart=function($,ot,et){var xt=this,Vt=$.parameters,de=Vt.bucket,ye=Vt.layout,Yt=Vt.posMatrix,ce=Vt.textLabelPlaneMatrix,Se=Vt.labelToScreenMatrix,ir=Vt.textPixelRatio,Ye=Vt.holdingForFade,tr=Vt.collisionBoxArray,lr=Vt.partiallyEvaluatedTextSize,hr=Vt.collisionGroup,Ve=ye.get("text-optional"),Xe=ye.get("icon-optional"),Ze=ye.get("text-allow-overlap"),Pr=ye.get("icon-allow-overlap"),sn=ye.get("text-rotation-alignment")==="map",dn=ye.get("text-pitch-alignment")==="map",pi=ye.get("icon-text-fit")!=="none",ui=ye.get("symbol-z-order")==="viewport-y",Yn=Ze&&(Pr||!de.hasIconData()||Xe),Ci=Pr&&(Ze||!de.hasTextData()||Ve);!de.collisionArrays&&tr&&de.deserializeCollisionBoxes(tr);var mi=function(co,qo){if(!ot[co.crossTileID]){if(Ye){xt.placements[co.crossTileID]=new Ps(!1,!1,!1);return}var xs=!1,Il=!1,Vl=!0,pl=null,Hl={box:null,offscreen:null},_c={box:null,offscreen:null},Fs=null,Mu=null,af=null,If=0,jp=0,b0=0;qo.textFeatureIndex?If=qo.textFeatureIndex:co.useRuntimeCollisionCircles&&(If=co.featureIndex),qo.verticalTextFeatureIndex&&(jp=qo.verticalTextFeatureIndex);var Tp=qo.textBox;if(Tp){var Ap=function(of){var md=t.WritingMode.horizontal;if(de.allowVerticalPlacement&&!of&&xt.prevPlacement){var bc=xt.prevPlacement.placedOrientations[co.crossTileID];bc&&(xt.placedOrientations[co.crossTileID]=bc,md=bc,xt.markUsedOrientation(de,md,co))}return md},R0=function(of,md){if(de.allowVerticalPlacement&&co.numVerticalGlyphVertices>0&&qo.verticalTextBox)for(var bc=0,Rg=de.writingModes;bc0&&(Qd=Qd.filter(function(of){return of!==Mp.anchor}),Qd.unshift(Mp.anchor))}var Hd=function(of,md,bc){for(var Rg=of.x2-of.x1,Pv=of.y2-of.y1,wx=co.textBoxScale,Pc=pi&&!Pr?md:null,km={box:[],offscreen:!1},kx=Ze?Qd.length*2:Qd.length,Bg=0;Bg=Qd.length,Iv=xt.attemptAnchorPlacement(N0,of,Rg,Pv,wx,sn,dn,ir,Yt,hr,xb,co,de,bc,Pc);if(Iv&&(km=Iv.placedGlyphBoxes,km&&km.box&&km.box.length)){xs=!0,pl=Iv.shift;break}}return km},Q0=function(){return Hd(Tp,qo.iconBox,t.WritingMode.horizontal)},Zm=function(){var of=qo.verticalTextBox,md=Hl&&Hl.box&&Hl.box.length;return de.allowVerticalPlacement&&!md&&co.numVerticalGlyphVertices>0&&of?Hd(of,qo.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}};R0(Q0,Zm),Hl&&(xs=Hl.box,Vl=Hl.offscreen);var Sp=Ap(Hl&&Hl.box);if(!xs&&xt.prevPlacement){var Ep=xt.prevPlacement.variableOffsets[co.crossTileID];Ep&&(xt.variableOffsets[co.crossTileID]=Ep,xt.markUsedJustification(de,Ep.anchor,co,Sp))}}else{var tp=function(of,md){var bc=xt.collisionIndex.placeCollisionBox(of,Ze,ir,Yt,hr.predicate);return bc&&bc.box&&bc.box.length&&(xt.markUsedOrientation(de,md,co),xt.placedOrientations[co.crossTileID]=md),bc},Gm=function(){return tp(Tp,t.WritingMode.horizontal)},Og=function(){var of=qo.verticalTextBox;return de.allowVerticalPlacement&&co.numVerticalGlyphVertices>0&&of?tp(of,t.WritingMode.vertical):{box:null,offscreen:null}};R0(Gm,Og),Ap(Hl&&Hl.box&&Hl.box.length)}}if(Fs=Hl,xs=Fs&&Fs.box&&Fs.box.length>0,Vl=Fs&&Fs.offscreen,co.useRuntimeCollisionCircles){var Ym=de.text.placedSymbolArray.get(co.centerJustifiedTextSymbolIndex),dd=t.evaluateSizeForFeature(de.textSizeData,lr,Ym),wm=ye.get("text-padding"),Dg=co.collisionCircleDiameter;Mu=xt.collisionIndex.placeCollisionCircles(Ze,Ym,de.lineVertexArray,de.glyphOffsetArray,dd,Yt,ce,Se,et,dn,hr.predicate,Dg,wm),xs=Ze||Mu.circles.length>0&&!Mu.collisionDetected,Vl=Vl&&Mu.offscreen}if(qo.iconFeatureIndex&&(b0=qo.iconFeatureIndex),qo.iconBox){var pd=function(of){var md=pi&&pl?Jl(of,pl.x,pl.y,sn,dn,xt.transform.angle):of;return xt.collisionIndex.placeCollisionBox(md,Pr,ir,Yt,hr.predicate)};_c&&_c.box&&_c.box.length&&qo.verticalIconBox?(af=pd(qo.verticalIconBox),Il=af.box.length>0):(af=pd(qo.iconBox),Il=af.box.length>0),Vl=Vl&&af.offscreen}var Km=Ve||co.numHorizontalGlyphVertices===0&&co.numVerticalGlyphVertices===0,Cv=Xe||co.numIconVertices===0;if(!Km&&!Cv?Il=xs=Il&&xs:Cv?Km||(Il=Il&&xs):xs=Il&&xs,xs&&Fs&&Fs.box&&(_c&&_c.box&&jp?xt.collisionIndex.insertCollisionBox(Fs.box,ye.get("text-ignore-placement"),de.bucketInstanceId,jp,hr.ID):xt.collisionIndex.insertCollisionBox(Fs.box,ye.get("text-ignore-placement"),de.bucketInstanceId,If,hr.ID)),Il&&af&&xt.collisionIndex.insertCollisionBox(af.box,ye.get("icon-ignore-placement"),de.bucketInstanceId,b0,hr.ID),Mu&&(xs&&xt.collisionIndex.insertCollisionCircles(Mu.circles,ye.get("text-ignore-placement"),de.bucketInstanceId,If,hr.ID),et)){var Lv=de.bucketInstanceId,B0=xt.collisionCircleArrays[Lv];B0===void 0&&(B0=xt.collisionCircleArrays[Lv]=new Lo);for(var Fg=0;Fg=0;--Ei){var Li=ea[Ei];mi(de.symbolInstances.get(Li),de.collisionArrays[Li])}else for(var la=$.symbolInstanceStart;la<$.symbolInstanceEnd;la++)mi(de.symbolInstances.get(la),de.collisionArrays[la]);if(et&&de.bucketInstanceId in this.collisionCircleArrays){var to=this.collisionCircleArrays[de.bucketInstanceId];t.invert(to.invProjMatrix,Yt),to.viewportMatrix=this.collisionIndex.getViewportMatrix()}de.justReloaded=!1},Us.prototype.markUsedJustification=function($,ot,et,xt){var Vt={left:et.leftJustifiedTextSymbolIndex,center:et.centerJustifiedTextSymbolIndex,right:et.rightJustifiedTextSymbolIndex},de;xt===t.WritingMode.vertical?de=et.verticalPlacedTextSymbolIndex:de=Vt[t.getAnchorJustification(ot)];for(var ye=[et.leftJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.rightJustifiedTextSymbolIndex,et.verticalPlacedTextSymbolIndex],Yt=0,ce=ye;Yt=0&&(de>=0&&Se!==de?$.text.placedSymbolArray.get(Se).crossTileID=0:$.text.placedSymbolArray.get(Se).crossTileID=et.crossTileID)}},Us.prototype.markUsedOrientation=function($,ot,et){for(var xt=ot===t.WritingMode.horizontal||ot===t.WritingMode.horizontalOnly?ot:0,Vt=ot===t.WritingMode.vertical?ot:0,de=[et.leftJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.rightJustifiedTextSymbolIndex],ye=0,Yt=de;ye0||dn>0,mi=Pr.numIconVertices>0,ea=xt.placedOrientations[Pr.crossTileID],Ei=ea===t.WritingMode.vertical,Li=ea===t.WritingMode.horizontal||ea===t.WritingMode.horizontalOnly;if(Ci){var la=Ru(Yn.text),to=Ei?lo:la;lr($.text,sn,to);var co=Li?lo:la;lr($.text,dn,co);var qo=Yn.text.isHidden();[Pr.rightJustifiedTextSymbolIndex,Pr.centerJustifiedTextSymbolIndex,Pr.leftJustifiedTextSymbolIndex].forEach(function(b0){b0>=0&&($.text.placedSymbolArray.get(b0).hidden=qo||Ei?1:0)}),Pr.verticalPlacedTextSymbolIndex>=0&&($.text.placedSymbolArray.get(Pr.verticalPlacedTextSymbolIndex).hidden=qo||Li?1:0);var xs=xt.variableOffsets[Pr.crossTileID];xs&&xt.markUsedJustification($,xs.anchor,Pr,ea);var Il=xt.placedOrientations[Pr.crossTileID];Il&&(xt.markUsedJustification($,"left",Pr,Il),xt.markUsedOrientation($,Il,Pr))}if(mi){var Vl=Ru(Yn.icon),pl=!(Ye&&Pr.verticalPlacedIconSymbolIndex&&Ei);if(Pr.placedIconSymbolIndex>=0){var Hl=pl?Vl:lo;lr($.icon,Pr.numIconVertices,Hl),$.icon.placedSymbolArray.get(Pr.placedIconSymbolIndex).hidden=Yn.icon.isHidden()}if(Pr.verticalPlacedIconSymbolIndex>=0){var _c=pl?lo:Vl;lr($.icon,Pr.numVerticalIconVertices,_c),$.icon.placedSymbolArray.get(Pr.verticalPlacedIconSymbolIndex).hidden=Yn.icon.isHidden()}}if($.hasIconCollisionBoxData()||$.hasTextCollisionBoxData()){var Fs=$.collisionArrays[Ze];if(Fs){var Mu=new t.Point(0,0);if(Fs.textBox||Fs.verticalTextBox){var af=!0;if(ce){var If=xt.variableOffsets[pi];If?(Mu=ql(If.anchor,If.width,If.height,If.textOffset,If.textBoxScale),Se&&Mu._rotate(ir?xt.transform.angle:-xt.transform.angle)):af=!1}Fs.textBox&&Pa($.textCollisionBox.collisionVertexArray,Yn.text.placed,!af||Ei,Mu.x,Mu.y),Fs.verticalTextBox&&Pa($.textCollisionBox.collisionVertexArray,Yn.text.placed,!af||Li,Mu.x,Mu.y)}var jp=!!(!Li&&Fs.verticalIconBox);Fs.iconBox&&Pa($.iconCollisionBox.collisionVertexArray,Yn.icon.placed,jp,Ye?Mu.x:0,Ye?Mu.y:0),Fs.verticalIconBox&&Pa($.iconCollisionBox.collisionVertexArray,Yn.icon.placed,!jp,Ye?Mu.x:0,Ye?Mu.y:0)}}},Ve=0;Ve<$.symbolInstances.length;Ve++)hr(Ve);if($.sortFeatures(this.transform.angle),this.retainedQueryData[$.bucketInstanceId]&&(this.retainedQueryData[$.bucketInstanceId].featureSortOrder=$.featureSortOrder),$.hasTextData()&&$.text.opacityVertexBuffer&&$.text.opacityVertexBuffer.updateData($.text.opacityVertexArray),$.hasIconData()&&$.icon.opacityVertexBuffer&&$.icon.opacityVertexBuffer.updateData($.icon.opacityVertexArray),$.hasIconCollisionBoxData()&&$.iconCollisionBox.collisionVertexBuffer&&$.iconCollisionBox.collisionVertexBuffer.updateData($.iconCollisionBox.collisionVertexArray),$.hasTextCollisionBoxData()&&$.textCollisionBox.collisionVertexBuffer&&$.textCollisionBox.collisionVertexBuffer.updateData($.textCollisionBox.collisionVertexArray),$.bucketInstanceId in this.collisionCircleArrays){var Xe=this.collisionCircleArrays[$.bucketInstanceId];$.placementInvProjMatrix=Xe.invProjMatrix,$.placementViewportMatrix=Xe.viewportMatrix,$.collisionCircleArray=Xe.circles,delete this.collisionCircleArrays[$.bucketInstanceId]}},Us.prototype.symbolFadeChange=function($){return this.fadeDuration===0?1:($-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Us.prototype.zoomAdjustment=function($){return Math.max(0,(this.transform.zoom-$)/1.5)},Us.prototype.hasTransitions=function($){return this.stale||$-this.lastPlacementChangeTime$},Us.prototype.setStale=function(){this.stale=!0};function Pa($,ot,et,xt,Vt){$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0),$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0),$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0),$.emplaceBack(ot?1:0,et?1:0,xt||0,Vt||0)}var fo=Math.pow(2,25),qs=Math.pow(2,24),Ql=Math.pow(2,17),Xo=Math.pow(2,16),Gl=Math.pow(2,9),al=Math.pow(2,8),Cl=Math.pow(2,1);function Ru($){if($.opacity===0&&!$.placed)return 0;if($.opacity===1&&$.placed)return 4294967295;var ot=$.placed?1:0,et=Math.floor($.opacity*127);return et*fo+ot*qs+et*Ql+ot*Xo+et*Gl+ot*al+et*Cl+ot}var lo=0,Ms=function($){this._sortAcrossTiles=$.layout.get("symbol-z-order")!=="viewport-y"&&$.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Ms.prototype.continuePlacement=function($,ot,et,xt,Vt){for(var de=this._bucketParts;this._currentTileIndex<$.length;){var ye=$[this._currentTileIndex];if(ot.getBucketParts(de,xt,ye,this._sortAcrossTiles),this._currentTileIndex++,Vt())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,de.sort(function(ce,Se){return ce.sortKey-Se.sortKey}));this._currentPartIndex2};this._currentPlacementIndex>=0;){var ye=$[this._currentPlacementIndex],Yt=ot[ye],ce=this.placement.collisionIndex.transform.zoom;if(Yt.type==="symbol"&&(!Yt.minzoom||Yt.minzoom<=ce)&&(!Yt.maxzoom||Yt.maxzoom>ce)){this._inProgressLayer||(this._inProgressLayer=new Ms(Yt));var Se=this._inProgressLayer.continuePlacement(et[Yt.source],this.placement,this._showCollisionBoxes,Yt,de);if(Se)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Is.prototype.commit=function($){return this.placement.commit($),this.placement};var ou=512/t.EXTENT/2,hl=function($,ot,et){this.tileID=$,this.indexedSymbolInstances={},this.bucketInstanceId=et;for(var xt=0;xt$.overscaledZ)for(var ce in Yt){var Se=Yt[ce];Se.tileID.isChildOf($)&&Se.findMatches(ot.symbolInstances,$,de)}else{var ir=$.scaledTo(Number(ye)),Ye=Yt[ir.key];Ye&&Ye.findMatches(ot.symbolInstances,$,de)}}for(var tr=0;tr0)throw new Error("Unimplemented: "+de.map(function(ye){return ye.command}).join(", ")+".");return Vt.forEach(function(ye){ye.command!=="setTransition"&&xt[ye.command].apply(xt,ye.args)}),this.stylesheet=et,!0},ot.prototype.addImage=function(et,xt){if(this.getImage(et))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(et,xt),this._afterImageUpdated(et)},ot.prototype.updateImage=function(et,xt){this.imageManager.updateImage(et,xt)},ot.prototype.getImage=function(et){return this.imageManager.getImage(et)},ot.prototype.removeImage=function(et){if(!this.getImage(et))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(et),this._afterImageUpdated(et)},ot.prototype._afterImageUpdated=function(et){this._availableImages=this.imageManager.listImages(),this._changedImages[et]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},ot.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},ot.prototype.addSource=function(et,xt,Vt){var de=this;if(Vt===void 0&&(Vt={}),this._checkLoaded(),this.sourceCaches[et]!==void 0)throw new Error("There is already a source with this ID");if(!xt.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(xt).join(", ")+".");var ye=["vector","raster","geojson","video","image"],Yt=ye.indexOf(xt.type)>=0;if(!(Yt&&this._validate(t.validateStyle.source,"sources."+et,xt,null,Vt))){this.map&&this.map._collectResourceTiming&&(xt.collectResourceTiming=!0);var ce=this.sourceCaches[et]=new Tn(et,xt,this.dispatcher);ce.style=this,ce.setEventedParent(this,function(){return{isSourceLoaded:de.loaded(),source:ce.serialize(),sourceId:et}}),ce.onAdd(this.map),this._changed=!0}},ot.prototype.removeSource=function(et){if(this._checkLoaded(),this.sourceCaches[et]===void 0)throw new Error("There is no source with this ID");for(var xt in this._layers)if(this._layers[xt].source===et)return this.fire(new t.ErrorEvent(new Error('Source "'+et+'" cannot be removed while layer "'+xt+'" is using it.')));var Vt=this.sourceCaches[et];delete this.sourceCaches[et],delete this._updatedSources[et],Vt.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:et})),Vt.setEventedParent(null),Vt.clearTiles(),Vt.onRemove&&Vt.onRemove(this.map),this._changed=!0},ot.prototype.setGeoJSONSourceData=function(et,xt){this._checkLoaded();var Vt=this.sourceCaches[et].getSource();Vt.setData(xt),this._changed=!0},ot.prototype.getSource=function(et){return this.sourceCaches[et]&&this.sourceCaches[et].getSource()},ot.prototype.addLayer=function(et,xt,Vt){Vt===void 0&&(Vt={}),this._checkLoaded();var de=et.id;if(this.getLayer(de)){this.fire(new t.ErrorEvent(new Error('Layer with id "'+de+'" already exists on this map')));return}var ye;if(et.type==="custom"){if(bl(this,t.validateCustomStyleLayer(et)))return;ye=t.createStyleLayer(et)}else{if(typeof et.source=="object"&&(this.addSource(de,et.source),et=t.clone$1(et),et=t.extend(et,{source:de})),this._validate(t.validateStyle.layer,"layers."+de,et,{arrayIndex:-1},Vt))return;ye=t.createStyleLayer(et),this._validateLayer(ye),ye.setEventedParent(this,{layer:{id:de}}),this._serializedLayers[ye.id]=ye.serialize()}var Yt=xt?this._order.indexOf(xt):this._order.length;if(xt&&Yt===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}if(this._order.splice(Yt,0,de),this._layerOrderChanged=!0,this._layers[de]=ye,this._removedLayers[de]&&ye.source&&ye.type!=="custom"){var ce=this._removedLayers[de];delete this._removedLayers[de],ce.type!==ye.type?this._updatedSources[ye.source]="clear":(this._updatedSources[ye.source]="reload",this.sourceCaches[ye.source].pause())}this._updateLayer(ye),ye.onAdd&&ye.onAdd(this.map)},ot.prototype.moveLayer=function(et,xt){this._checkLoaded(),this._changed=!0;var Vt=this._layers[et];if(!Vt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be moved.")));return}if(et!==xt){var de=this._order.indexOf(et);this._order.splice(de,1);var ye=xt?this._order.indexOf(xt):this._order.length;if(xt&&ye===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+xt+'" does not exist on this map.')));return}this._order.splice(ye,0,et),this._layerOrderChanged=!0}},ot.prototype.removeLayer=function(et){this._checkLoaded();var xt=this._layers[et];if(!xt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be removed.")));return}xt.setEventedParent(null);var Vt=this._order.indexOf(et);this._order.splice(Vt,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[et]=xt,delete this._layers[et],delete this._serializedLayers[et],delete this._updatedLayers[et],delete this._updatedPaintProps[et],xt.onRemove&&xt.onRemove(this.map)},ot.prototype.getLayer=function(et){return this._layers[et]},ot.prototype.hasLayer=function(et){return et in this._layers},ot.prototype.setLayerZoomRange=function(et,xt,Vt){this._checkLoaded();var de=this.getLayer(et);if(!de){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot have zoom extent.")));return}de.minzoom===xt&&de.maxzoom===Vt||(xt!=null&&(de.minzoom=xt),Vt!=null&&(de.maxzoom=Vt),this._updateLayer(de))},ot.prototype.setFilter=function(et,xt,Vt){Vt===void 0&&(Vt={}),this._checkLoaded();var de=this.getLayer(et);if(!de){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be filtered.")));return}if(!t.deepEqual(de.filter,xt)){if(xt==null){de.filter=void 0,this._updateLayer(de);return}this._validate(t.validateStyle.filter,"layers."+de.id+".filter",xt,null,Vt)||(de.filter=t.clone$1(xt),this._updateLayer(de))}},ot.prototype.getFilter=function(et){return t.clone$1(this.getLayer(et).filter)},ot.prototype.setLayoutProperty=function(et,xt,Vt,de){de===void 0&&(de={}),this._checkLoaded();var ye=this.getLayer(et);if(!ye){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(ye.getLayoutProperty(xt),Vt)||(ye.setLayoutProperty(xt,Vt,de),this._updateLayer(ye))},ot.prototype.getLayoutProperty=function(et,xt){var Vt=this.getLayer(et);if(!Vt){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style.")));return}return Vt.getLayoutProperty(xt)},ot.prototype.setPaintProperty=function(et,xt,Vt,de){de===void 0&&(de={}),this._checkLoaded();var ye=this.getLayer(et);if(!ye){this.fire(new t.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be styled.")));return}if(!t.deepEqual(ye.getPaintProperty(xt),Vt)){var Yt=ye.setPaintProperty(xt,Vt,de);Yt&&this._updateLayer(ye),this._changed=!0,this._updatedPaintProps[et]=!0}},ot.prototype.getPaintProperty=function(et,xt){return this.getLayer(et).getPaintProperty(xt)},ot.prototype.setFeatureState=function(et,xt){this._checkLoaded();var Vt=et.source,de=et.sourceLayer,ye=this.sourceCaches[Vt];if(ye===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Vt+"' does not exist in the map's style.")));return}var Yt=ye.getSource().type;if(Yt==="geojson"&&de){this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Yt==="vector"&&!de){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),ye.setFeatureState(de,et.id,xt)},ot.prototype.removeFeatureState=function(et,xt){this._checkLoaded();var Vt=et.source,de=this.sourceCaches[Vt];if(de===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Vt+"' does not exist in the map's style.")));return}var ye=de.getSource().type,Yt=ye==="vector"?et.sourceLayer:void 0;if(ye==="vector"&&!Yt){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(xt&&typeof et.id!="string"&&typeof et.id!="number"){this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}de.removeFeatureState(Yt,et.id,xt)},ot.prototype.getFeatureState=function(et){this._checkLoaded();var xt=et.source,Vt=et.sourceLayer,de=this.sourceCaches[xt];if(de===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+xt+"' does not exist in the map's style.")));return}var ye=de.getSource().type;if(ye==="vector"&&!Vt){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return et.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),de.getFeatureState(Vt,et.id)},ot.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},ot.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(et){return et.serialize()}),layers:this._serializeLayers(this._order)},function(et){return et!==void 0})},ot.prototype._updateLayer=function(et){this._updatedLayers[et.id]=!0,et.source&&!this._updatedSources[et.source]&&this.sourceCaches[et.source].getSource().type!=="raster"&&(this._updatedSources[et.source]="reload",this.sourceCaches[et.source].pause()),this._changed=!0},ot.prototype._flattenAndSortRenderedFeatures=function(et){for(var xt=this,Vt=function(Li){return xt._layers[Li].type==="fill-extrusion"},de={},ye=[],Yt=this._order.length-1;Yt>=0;Yt--){var ce=this._order[Yt];if(Vt(ce)){de[ce]=Yt;for(var Se=0,ir=et;Se=0;Ze--){var Pr=this._order[Ze];if(Vt(Pr))for(var sn=ye.length-1;sn>=0;sn--){var dn=ye[sn].feature;if(de[dn.layer.id] 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,uc=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,lc=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -2993,7 +3034,7 @@ vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,md=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +}`,hd=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -3009,20 +3050,20 @@ void main() { #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos -: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Kf=`#ifdef GL_ES +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Zf=`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,_f="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Hh=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +}`,xf="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Hh=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Wf="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",qf=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +}`,Uf="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Vf=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3034,7 +3075,7 @@ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_rati #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,uh=` +}`,lh=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color @@ -3050,7 +3091,7 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Xf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Gf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { @@ -3092,7 +3133,7 @@ vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,cc=` +}`,uc=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; @@ -3117,7 +3158,7 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,ef=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,rf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3133,7 +3174,7 @@ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_rati #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Zf=` +}`,Hf=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; @@ -3152,11 +3193,11 @@ void main() { #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,tu=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,eu=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Lf="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",Od=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +}`,Ef="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",Cd=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity @@ -3164,13 +3205,13 @@ lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)* #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Jf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +}`,Yf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,bf=`#define SDF_PX 8.0 +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,_f=`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color @@ -3187,7 +3228,7 @@ float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scal #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Qf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +}`,Kf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3224,7 +3265,7 @@ return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float ga #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,td=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +}`,Xf=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3238,58 +3279,58 @@ void main() { #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,zu=vu(Jc,oh),jc=vu(Uf,Cf),Wh=vu(Fl,Bc),hu=vu(Vf,fc),Ch=vu(sc,dc),Ec=vu(sh,cu),Uc=vu(lc,nl),_u=vu(Gl,Sh),uf=vu(Pc,Uh),vh=vu(xu,Id),qh=vu(el,$d),Pf=vu(zl,ts),Dd=vu(lf,lh),rp=vu(ec,Hf),cf=vu(Vh,xf),zf=vu(uc,md),Tc=vu(Kf,_f),hf=vu(Hh,Wf),Qc=vu(qf,uh),ff=vu(Xf,Eh),If=vu(gh,cc),yh=vu(ef,Zf),bu=vu(tu,Lf),Lh=vu(Od,Jf),Vc=vu(bf,Qf),gd=vu(Nc,td);function vu(Z,ot){var et=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,xt=ot.match(/attribute ([\w]+) ([\w]+)/g),Ut=Z.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),fe=ot.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ye=fe?fe.concat(Ut):Ut,Yt={};return Z=Z.replace(et,function(ce,Se,nr,Ye,tr){return Yt[tr]=!0,Se==="define"?` +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,Ou=yu(Jc,ah),jc=yu(Bf,Sf),Wh=yu(Fl,Bc),hu=yu(Nf,hc),Ch=yu(oc,fc),Mc=yu(oh,cu),Uc=yu(sc,rl),bu=yu(Yl,Sh),uf=yu(Cc,Uh),vh=yu(_u,Ed),qh=yu(tl,Vd),Cf=yu(Ll,Qo),Ld=yu(lf,sh),Jd=yu(rc,jf),cf=yu(Vh,yf),Lf=yu(lc,hd),wc=yu(Zf,xf),hf=yu(Hh,Uf),Qc=yu(Vf,lh),ff=yu(Gf,Eh),Pf=yu(gh,uc),yh=yu(rf,Hf),wu=yu(eu,Ef),Lh=yu(Cd,Yf),Vc=yu(_f,Kf),fd=yu(Nc,Xf);function yu($,ot){var et=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,xt=ot.match(/attribute ([\w]+) ([\w]+)/g),Vt=$.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),de=ot.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ye=de?de.concat(Vt):Vt,Yt={};return $=$.replace(et,function(ce,Se,ir,Ye,tr){return Yt[tr]=!0,Se==="define"?` #ifndef HAS_UNIFORM_u_`+tr+` -varying `+nr+" "+Ye+" "+tr+`; +varying `+ir+" "+Ye+" "+tr+`; #else -uniform `+nr+" "+Ye+" u_"+tr+`; +uniform `+ir+" "+Ye+" u_"+tr+`; #endif `:` #ifdef HAS_UNIFORM_u_`+tr+` - `+nr+" "+Ye+" "+tr+" = u_"+tr+`; + `+ir+" "+Ye+" "+tr+" = u_"+tr+`; #endif -`}),ot=ot.replace(et,function(ce,Se,nr,Ye,tr){var lr=Ye==="float"?"vec2":"vec4",hr=tr.match(/color/)?"color":lr;return Yt[tr]?Se==="define"?` +`}),ot=ot.replace(et,function(ce,Se,ir,Ye,tr){var lr=Ye==="float"?"vec2":"vec4",hr=tr.match(/color/)?"color":lr;return Yt[tr]?Se==="define"?` #ifndef HAS_UNIFORM_u_`+tr+` uniform lowp float u_`+tr+`_t; -attribute `+nr+" "+lr+" a_"+tr+`; -varying `+nr+" "+Ye+" "+tr+`; +attribute `+ir+" "+lr+" a_"+tr+`; +varying `+ir+" "+Ye+" "+tr+`; #else -uniform `+nr+" "+Ye+" u_"+tr+`; +uniform `+ir+" "+Ye+" u_"+tr+`; #endif `:hr==="vec4"?` #ifndef HAS_UNIFORM_u_`+tr+` `+tr+" = a_"+tr+`; #else - `+nr+" "+Ye+" "+tr+" = u_"+tr+`; + `+ir+" "+Ye+" "+tr+" = u_"+tr+`; #endif `:` #ifndef HAS_UNIFORM_u_`+tr+` `+tr+" = unpack_mix_"+hr+"(a_"+tr+", u_"+tr+`_t); #else - `+nr+" "+Ye+" "+tr+" = u_"+tr+`; + `+ir+" "+Ye+" "+tr+" = u_"+tr+`; #endif `:Se==="define"?` #ifndef HAS_UNIFORM_u_`+tr+` uniform lowp float u_`+tr+`_t; -attribute `+nr+" "+lr+" a_"+tr+`; +attribute `+ir+" "+lr+" a_"+tr+`; #else -uniform `+nr+" "+Ye+" u_"+tr+`; +uniform `+ir+" "+Ye+" u_"+tr+`; #endif `:hr==="vec4"?` #ifndef HAS_UNIFORM_u_`+tr+` - `+nr+" "+Ye+" "+tr+" = a_"+tr+`; + `+ir+" "+Ye+" "+tr+" = a_"+tr+`; #else - `+nr+" "+Ye+" "+tr+" = u_"+tr+`; + `+ir+" "+Ye+" "+tr+" = u_"+tr+`; #endif `:` #ifndef HAS_UNIFORM_u_`+tr+` - `+nr+" "+Ye+" "+tr+" = unpack_mix_"+hr+"(a_"+tr+", u_"+tr+`_t); + `+ir+" "+Ye+" "+tr+" = unpack_mix_"+hr+"(a_"+tr+", u_"+tr+`_t); #else - `+nr+" "+Ye+" "+tr+" = u_"+tr+`; + `+ir+" "+Ye+" "+tr+" = u_"+tr+`; #endif -`}),{fragmentSource:Z,vertexSource:ot,staticAttributes:xt,staticUniforms:ye}}var wf=Object.freeze({__proto__:null,prelude:zu,background:jc,backgroundPattern:Wh,circle:hu,clippingMask:Ch,heatmap:Ec,heatmapTexture:Uc,collisionBox:_u,collisionCircle:uf,debug:vh,fill:qh,fillOutline:Pf,fillOutlinePattern:Dd,fillPattern:rp,fillExtrusion:cf,fillExtrusionPattern:zf,hillshadePrepare:Tc,hillshade:hf,line:Qc,lineGradient:ff,linePattern:If,lineSDF:yh,raster:bu,symbolIcon:Lh,symbolSDF:Vc,symbolTextAndIcon:gd}),Zh=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Zh.prototype.bind=function(Z,ot,et,xt,Ut,fe,ye,Yt){this.context=Z;for(var ce=this.boundPaintVertexBuffers.length!==xt.length,Se=0;!ce&&Se>16,Yt>>16],u_pixel_coord_lower:[ye&65535,Yt&65535]}}function kf(Z,ot,et,xt){var Ut=et.imageManager.getPattern(Z.from.toString()),fe=et.imageManager.getPattern(Z.to.toString()),ye=et.imageManager.getPixelSize(),Yt=ye.width,ce=ye.height,Se=Math.pow(2,xt.tileID.overscaledZ),nr=xt.tileSize*Math.pow(2,et.transform.tileZoom)/Se,Ye=nr*(xt.tileID.canonical.x+xt.tileID.wrap*Se),tr=nr*xt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ut.tl,u_pattern_br_a:Ut.br,u_pattern_tl_b:fe.tl,u_pattern_br_b:fe.br,u_texsize:[Yt,ce],u_mix:ot.t,u_pattern_size_a:Ut.displaySize,u_pattern_size_b:fe.displaySize,u_scale_a:ot.fromScale,u_scale_b:ot.toScale,u_tile_units_to_pixels:1/tl(xt,1,et.transform.tileZoom),u_pixel_coord_upper:[Ye>>16,tr>>16],u_pixel_coord_lower:[Ye&65535,tr&65535]}}var Fd=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_lightpos:new t.Uniform3f(Z,ot.u_lightpos),u_lightintensity:new t.Uniform1f(Z,ot.u_lightintensity),u_lightcolor:new t.Uniform3f(Z,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f(Z,ot.u_vertical_gradient),u_opacity:new t.Uniform1f(Z,ot.u_opacity)}},vc=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_lightpos:new t.Uniform3f(Z,ot.u_lightpos),u_lightintensity:new t.Uniform1f(Z,ot.u_lightintensity),u_lightcolor:new t.Uniform3f(Z,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f(Z,ot.u_vertical_gradient),u_height_factor:new t.Uniform1f(Z,ot.u_height_factor),u_image:new t.Uniform1i(Z,ot.u_image),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Z,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Z,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f(Z,ot.u_scale),u_fade:new t.Uniform1f(Z,ot.u_fade),u_opacity:new t.Uniform1f(Z,ot.u_opacity)}},ed=function(Z,ot,et,xt){var Ut=ot.style.light,fe=Ut.properties.get("position"),ye=[fe.x,fe.y,fe.z],Yt=t.create$1();Ut.properties.get("anchor")==="viewport"&&t.fromRotation(Yt,-ot.transform.angle),t.transformMat3(ye,ye,Yt);var ce=Ut.properties.get("color");return{u_matrix:Z,u_lightpos:ye,u_lightintensity:Ut.properties.get("intensity"),u_lightcolor:[ce.r,ce.g,ce.b],u_vertical_gradient:+et,u_opacity:xt}},eh=function(Z,ot,et,xt,Ut,fe,ye){return t.extend(ed(Z,ot,et,xt),$h(fe,ot,ye),{u_height_factor:-Math.pow(2,Ut.overscaledZ)/ye.tileSize/8})},Ph=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix)}},xh=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_image:new t.Uniform1i(Z,ot.u_image),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Z,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Z,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f(Z,ot.u_scale),u_fade:new t.Uniform1f(Z,ot.u_fade)}},Bu=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_world:new t.Uniform2f(Z,ot.u_world)}},nu=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_world:new t.Uniform2f(Z,ot.u_world),u_image:new t.Uniform1i(Z,ot.u_image),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Z,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Z,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f(Z,ot.u_scale),u_fade:new t.Uniform1f(Z,ot.u_fade)}},_h=function(Z){return{u_matrix:Z}},df=function(Z,ot,et,xt){return t.extend(_h(Z),$h(et,ot,xt))},bh=function(Z,ot){return{u_matrix:Z,u_world:ot}},$f=function(Z,ot,et,xt,Ut){return t.extend(df(Z,ot,et,xt),{u_world:Ut})},mr=function(Z,ot){return{u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(Z,ot.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(Z,ot.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(Z,ot.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix)}},Ur=function(Z,ot,et,xt){var Ut=Z.transform,fe,ye;if(xt.paint.get("circle-pitch-alignment")==="map"){var Yt=tl(et,1,Ut.zoom);fe=!0,ye=[Yt,Yt]}else fe=!1,ye=Ut.pixelsToGLUnits;return{u_camera_to_center_distance:Ut.cameraToCenterDistance,u_scale_with_map:+(xt.paint.get("circle-pitch-scale")==="map"),u_matrix:Z.translatePosMatrix(ot.posMatrix,et,xt.paint.get("circle-translate"),xt.paint.get("circle-translate-anchor")),u_pitch_with_map:+fe,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:ye}},xn=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(Z,ot.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(Z,ot.u_extrude_scale),u_overscale_factor:new t.Uniform1f(Z,ot.u_overscale_factor)}},un=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_inv_matrix:new t.UniformMatrix4f(Z,ot.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(Z,ot.u_viewport_size)}},Wn=function(Z,ot,et){var xt=tl(et,1,ot.zoom),Ut=Math.pow(2,ot.zoom-et.tileID.overscaledZ),fe=et.tileID.overscaleFactor();return{u_matrix:Z,u_camera_to_center_distance:ot.cameraToCenterDistance,u_pixels_to_tile_units:xt,u_extrude_scale:[ot.pixelsToGLUnits[0]/(xt*Ut),ot.pixelsToGLUnits[1]/(xt*Ut)],u_overscale_factor:fe}},hi=function(Z,ot,et){return{u_matrix:Z,u_inv_matrix:ot,u_camera_to_center_distance:et.cameraToCenterDistance,u_viewport_size:[et.width,et.height]}},ea=function(Z,ot){return{u_color:new t.UniformColor(Z,ot.u_color),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_overlay:new t.Uniform1i(Z,ot.u_overlay),u_overlay_scale:new t.Uniform1f(Z,ot.u_overlay_scale)}},pa=function(Z,ot,et){return et===void 0&&(et=1),{u_matrix:Z,u_color:ot,u_overlay:0,u_overlay_scale:et}},Da=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix)}},$a=function(Z){return{u_matrix:Z}},la=function(Z,ot){return{u_extrude_scale:new t.Uniform1f(Z,ot.u_extrude_scale),u_intensity:new t.Uniform1f(Z,ot.u_intensity),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix)}},Pa=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_world:new t.Uniform2f(Z,ot.u_world),u_image:new t.Uniform1i(Z,ot.u_image),u_color_ramp:new t.Uniform1i(Z,ot.u_color_ramp),u_opacity:new t.Uniform1f(Z,ot.u_opacity)}},ba=function(Z,ot,et,xt){return{u_matrix:Z,u_extrude_scale:tl(ot,1,et),u_intensity:xt}},Ji=function(Z,ot,et,xt){var Ut=t.create();t.ortho(Ut,0,Z.width,Z.height,0,0,1);var fe=Z.context.gl;return{u_matrix:Ut,u_world:[fe.drawingBufferWidth,fe.drawingBufferHeight],u_image:et,u_color_ramp:xt,u_opacity:ot.paint.get("heatmap-opacity")}},no=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_image:new t.Uniform1i(Z,ot.u_image),u_latrange:new t.Uniform2f(Z,ot.u_latrange),u_light:new t.Uniform2f(Z,ot.u_light),u_shadow:new t.UniformColor(Z,ot.u_shadow),u_highlight:new t.UniformColor(Z,ot.u_highlight),u_accent:new t.UniformColor(Z,ot.u_accent)}},as=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_image:new t.Uniform1i(Z,ot.u_image),u_dimension:new t.Uniform2f(Z,ot.u_dimension),u_zoom:new t.Uniform1f(Z,ot.u_zoom),u_unpack:new t.Uniform4f(Z,ot.u_unpack)}},Xo=function(Z,ot,et){var xt=et.paint.get("hillshade-shadow-color"),Ut=et.paint.get("hillshade-highlight-color"),fe=et.paint.get("hillshade-accent-color"),ye=et.paint.get("hillshade-illumination-direction")*(Math.PI/180);et.paint.get("hillshade-illumination-anchor")==="viewport"&&(ye-=Z.transform.angle);var Yt=!Z.options.moving;return{u_matrix:Z.transform.calculatePosMatrix(ot.tileID.toUnwrapped(),Yt),u_image:0,u_latrange:ms(Z,ot.tileID),u_light:[et.paint.get("hillshade-exaggeration"),ye],u_shadow:xt,u_highlight:Ut,u_accent:fe}},ls=function(Z,ot){var et=ot.stride,xt=t.create();return t.ortho(xt,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(xt,xt,[0,-t.EXTENT,0]),{u_matrix:xt,u_image:1,u_dimension:[et,et],u_zoom:Z.overscaledZ,u_unpack:ot.getUnpackVector()}};function ms(Z,ot){var et=Math.pow(2,ot.canonical.z),xt=ot.canonical.y;return[new t.MercatorCoordinate(0,xt/et).toLngLat().lat,new t.MercatorCoordinate(0,(xt+1)/et).toLngLat().lat]}var oo=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_ratio:new t.Uniform1f(Z,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Z,ot.u_units_to_pixels)}},qa=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_ratio:new t.Uniform1f(Z,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Z,ot.u_units_to_pixels),u_image:new t.Uniform1i(Z,ot.u_image),u_image_height:new t.Uniform1f(Z,ot.u_image_height)}},vs=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_ratio:new t.Uniform1f(Z,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_image:new t.Uniform1i(Z,ot.u_image),u_units_to_pixels:new t.Uniform2f(Z,ot.u_units_to_pixels),u_scale:new t.Uniform3f(Z,ot.u_scale),u_fade:new t.Uniform1f(Z,ot.u_fade)}},rl=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_ratio:new t.Uniform1f(Z,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Z,ot.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(Z,ot.u_patternscale_a),u_patternscale_b:new t.Uniform2f(Z,ot.u_patternscale_b),u_sdfgamma:new t.Uniform1f(Z,ot.u_sdfgamma),u_image:new t.Uniform1i(Z,ot.u_image),u_tex_y_a:new t.Uniform1f(Z,ot.u_tex_y_a),u_tex_y_b:new t.Uniform1f(Z,ot.u_tex_y_b),u_mix:new t.Uniform1f(Z,ot.u_mix)}},Il=function(Z,ot,et){var xt=Z.transform;return{u_matrix:qu(Z,ot,et),u_ratio:1/tl(ot,1,xt.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/xt.pixelsToGLUnits[0],1/xt.pixelsToGLUnits[1]]}},ou=function(Z,ot,et,xt){return t.extend(Il(Z,ot,et),{u_image:0,u_image_height:xt})},Wl=function(Z,ot,et,xt){var Ut=Z.transform,fe=vl(ot,Ut);return{u_matrix:qu(Z,ot,et),u_texsize:ot.imageAtlasTexture.size,u_ratio:1/tl(ot,1,Ut.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[fe,xt.fromScale,xt.toScale],u_fade:xt.t,u_units_to_pixels:[1/Ut.pixelsToGLUnits[0],1/Ut.pixelsToGLUnits[1]]}},su=function(Z,ot,et,xt,Ut){var fe=Z.transform,ye=Z.lineAtlas,Yt=vl(ot,fe),ce=et.layout.get("line-cap")==="round",Se=ye.getDash(xt.from,ce),nr=ye.getDash(xt.to,ce),Ye=Se.width*Ut.fromScale,tr=nr.width*Ut.toScale;return t.extend(Il(Z,ot,et),{u_patternscale_a:[Yt/Ye,-Se.height/2],u_patternscale_b:[Yt/tr,-nr.height/2],u_sdfgamma:ye.width/(Math.min(Ye,tr)*256*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Se.y,u_tex_y_b:nr.y,u_mix:Ut.t})};function vl(Z,ot){return 1/tl(Z,1,ot.tileZoom)}function qu(Z,ot,et){return Z.translatePosMatrix(ot.tileID.posMatrix,ot,et.paint.get("line-translate"),et.paint.get("line-translate-anchor"))}var Lu=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_tl_parent:new t.Uniform2f(Z,ot.u_tl_parent),u_scale_parent:new t.Uniform1f(Z,ot.u_scale_parent),u_buffer_scale:new t.Uniform1f(Z,ot.u_buffer_scale),u_fade_t:new t.Uniform1f(Z,ot.u_fade_t),u_opacity:new t.Uniform1f(Z,ot.u_opacity),u_image0:new t.Uniform1i(Z,ot.u_image0),u_image1:new t.Uniform1i(Z,ot.u_image1),u_brightness_low:new t.Uniform1f(Z,ot.u_brightness_low),u_brightness_high:new t.Uniform1f(Z,ot.u_brightness_high),u_saturation_factor:new t.Uniform1f(Z,ot.u_saturation_factor),u_contrast_factor:new t.Uniform1f(Z,ot.u_contrast_factor),u_spin_weights:new t.Uniform3f(Z,ot.u_spin_weights)}},fu=function(Z,ot,et,xt,Ut){return{u_matrix:Z,u_tl_parent:ot,u_scale_parent:et,u_buffer_scale:1,u_fade_t:xt.mix,u_opacity:xt.opacity*Ut.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Ut.paint.get("raster-brightness-min"),u_brightness_high:Ut.paint.get("raster-brightness-max"),u_saturation_factor:Yl(Ut.paint.get("raster-saturation")),u_contrast_factor:Es(Ut.paint.get("raster-contrast")),u_spin_weights:Oo(Ut.paint.get("raster-hue-rotate"))}};function Oo(Z){Z*=Math.PI/180;var ot=Math.sin(Z),et=Math.cos(Z);return[(2*et+1)/3,(-Math.sqrt(3)*ot-et+1)/3,(Math.sqrt(3)*ot-et+1)/3]}function Es(Z){return Z>0?1/(1-Z):1+Z}function Yl(Z){return Z>0?1-1/(1.001-Z):-Z}var Rl=function(Z,ot){return{u_is_size_zoom_constant:new t.Uniform1i(Z,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Z,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Z,ot.u_size_t),u_size:new t.Uniform1f(Z,ot.u_size),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Z,ot.u_pitch),u_rotate_symbol:new t.Uniform1i(Z,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Z,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f(Z,ot.u_fade_change),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Z,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Z,ot.u_coord_matrix),u_is_text:new t.Uniform1i(Z,ot.u_is_text),u_pitch_with_map:new t.Uniform1i(Z,ot.u_pitch_with_map),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_texture:new t.Uniform1i(Z,ot.u_texture)}},yc=function(Z,ot){return{u_is_size_zoom_constant:new t.Uniform1i(Z,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Z,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Z,ot.u_size_t),u_size:new t.Uniform1f(Z,ot.u_size),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Z,ot.u_pitch),u_rotate_symbol:new t.Uniform1i(Z,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Z,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f(Z,ot.u_fade_change),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Z,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Z,ot.u_coord_matrix),u_is_text:new t.Uniform1i(Z,ot.u_is_text),u_pitch_with_map:new t.Uniform1i(Z,ot.u_pitch_with_map),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_texture:new t.Uniform1i(Z,ot.u_texture),u_gamma_scale:new t.Uniform1f(Z,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(Z,ot.u_is_halo)}},Hc=function(Z,ot){return{u_is_size_zoom_constant:new t.Uniform1i(Z,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Z,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Z,ot.u_size_t),u_size:new t.Uniform1f(Z,ot.u_size),u_camera_to_center_distance:new t.Uniform1f(Z,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Z,ot.u_pitch),u_rotate_symbol:new t.Uniform1i(Z,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Z,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f(Z,ot.u_fade_change),u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Z,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Z,ot.u_coord_matrix),u_is_text:new t.Uniform1i(Z,ot.u_is_text),u_pitch_with_map:new t.Uniform1i(Z,ot.u_pitch_with_map),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_texsize_icon:new t.Uniform2f(Z,ot.u_texsize_icon),u_texture:new t.Uniform1i(Z,ot.u_texture),u_texture_icon:new t.Uniform1i(Z,ot.u_texture_icon),u_gamma_scale:new t.Uniform1f(Z,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(Z,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(Z,ot.u_is_halo)}},zc=function(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se){var nr=Ut.transform;return{u_is_size_zoom_constant:+(Z==="constant"||Z==="source"),u_is_size_feature_constant:+(Z==="constant"||Z==="camera"),u_size_t:ot?ot.uSizeT:0,u_size:ot?ot.uSize:0,u_camera_to_center_distance:nr.cameraToCenterDistance,u_pitch:nr.pitch/360*2*Math.PI,u_rotate_symbol:+et,u_aspect_ratio:nr.width/nr.height,u_fade_change:Ut.options.fadeDuration?Ut.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:ye,u_coord_matrix:Yt,u_is_text:+ce,u_pitch_with_map:+xt,u_texsize:Se,u_texture:0}},zh=function(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se,nr){var Ye=Ut.transform;return t.extend(zc(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se),{u_gamma_scale:xt?Math.cos(Ye._pitch)*Ye.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:1})},Wc=function(Z,ot,et,xt,Ut,fe,ye,Yt,ce,Se){return t.extend(zh(Z,ot,et,xt,Ut,fe,ye,Yt,!0,ce),{u_texsize_icon:Se,u_texture_icon:1})},Ih=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_opacity:new t.Uniform1f(Z,ot.u_opacity),u_color:new t.UniformColor(Z,ot.u_color)}},Iu=function(Z,ot){return{u_matrix:new t.UniformMatrix4f(Z,ot.u_matrix),u_opacity:new t.Uniform1f(Z,ot.u_opacity),u_image:new t.Uniform1i(Z,ot.u_image),u_pattern_tl_a:new t.Uniform2f(Z,ot.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(Z,ot.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(Z,ot.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(Z,ot.u_pattern_br_b),u_texsize:new t.Uniform2f(Z,ot.u_texsize),u_mix:new t.Uniform1f(Z,ot.u_mix),u_pattern_size_a:new t.Uniform2f(Z,ot.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(Z,ot.u_pattern_size_b),u_scale_a:new t.Uniform1f(Z,ot.u_scale_a),u_scale_b:new t.Uniform1f(Z,ot.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(Z,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Z,ot.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(Z,ot.u_tile_units_to_pixels)}},Oh=function(Z,ot,et){return{u_matrix:Z,u_opacity:ot,u_color:et}},is=function(Z,ot,et,xt,Ut,fe){return t.extend(kf(xt,fe,et,Ut),{u_matrix:Z,u_opacity:ot})},Os={fillExtrusion:Fd,fillExtrusionPattern:vc,fill:Ph,fillPattern:xh,fillOutline:Bu,fillOutlinePattern:nu,circle:mr,collisionBox:xn,collisionCircle:un,debug:ea,clippingMask:Da,heatmap:la,heatmapTexture:Pa,hillshade:no,hillshadePrepare:as,line:oo,lineGradient:qa,linePattern:vs,lineSDF:rl,raster:Lu,symbolIcon:Rl,symbolSDF:yc,symbolTextAndIcon:Hc,background:Ih,backgroundPattern:Iu},qc;function Zu(Z,ot,et,xt,Ut,fe,ye){for(var Yt=Z.context,ce=Yt.gl,Se=Z.useProgram("collisionBox"),nr=[],Ye=0,tr=0,lr=0;lr0){var hn=t.create(),fi=$e;t.mul(hn,Xe.placementInvProjMatrix,Z.transform.glCoordMatrix),t.mul(hn,hn,Xe.placementViewportMatrix),nr.push({circleArray:on,circleOffset:tr,transform:fi,invTransform:hn}),Ye+=on.length/4,tr=Ye}Cr&&Se.draw(Yt,ce.LINES,Kn.disabled,qn.disabled,Z.colorModeForRenderPass(),Qr.disabled,Wn($e,Z.transform,Ve),et.id,Cr.layoutVertexBuffer,Cr.indexBuffer,Cr.segments,null,Z.transform.zoom,null,null,Cr.collisionVertexBuffer)}}if(!(!ye||!nr.length)){var si=Z.useProgram("collisionCircle"),Gn=new t.StructArrayLayout2f1f2i16;Gn.resize(Ye*4),Gn._trim();for(var Ai=0,di=0,Ki=nr;di=0&&(hr[Xe.associatedIconIndex]={shiftedAnchor:oa,angle:Qa})}}if(nr){lr.clear();for(var qo=Z.icon.placedSymbolArray,_s=0;_s0){var ye=t.browser.now(),Yt=(ye-Z.timeAdded)/fe,ce=ot?(ye-ot.timeAdded)/fe:-1,Se=et.getSource(),nr=Ut.coveringZoomLevel({tileSize:Se.tileSize,roundZoom:Se.roundZoom}),Ye=!ot||Math.abs(ot.tileID.overscaledZ-nr)>Math.abs(Z.tileID.overscaledZ-nr),tr=Ye&&Z.refreshedUponExpiration?1:t.clamp(Ye?Yt:1-ce,0,1);return Z.refreshedUponExpiration&&Yt>=1&&(Z.refreshedUponExpiration=!1),ot?{opacity:1,mix:1-tr}:{opacity:tr,mix:0}}else return{opacity:1,mix:0}}function Nr(Z,ot,et){var xt=et.paint.get("background-color"),Ut=et.paint.get("background-opacity");if(Ut!==0){var fe=Z.context,ye=fe.gl,Yt=Z.transform,ce=Yt.tileSize,Se=et.paint.get("background-pattern");if(!Z.isPatternMissing(Se)){var nr=!Se&&xt.a===1&&Ut===1&&Z.opaquePassEnabledForLayer()?"opaque":"translucent";if(Z.renderPass===nr){var Ye=qn.disabled,tr=Z.depthModeForSublayer(0,nr==="opaque"?Kn.ReadWrite:Kn.ReadOnly),lr=Z.colorModeForRenderPass(),hr=Z.useProgram(Se?"backgroundPattern":"background"),Ve=Yt.coveringTiles({tileSize:ce});Se&&(fe.activeTexture.set(ye.TEXTURE0),Z.imageManager.bind(Z.context));for(var Xe=et.getCrossfadeParameters(),$e=0,Cr=Ve;$e "+et.overscaledZ);var $e=Xe+" "+lr+"kb";ds(Z,$e),ye.draw(xt,Ut.TRIANGLES,Yt,ce,rr.alphaBlended,Qr.disabled,pa(fe,t.Color.transparent,Ve),nr,Z.debugBuffer,Z.quadTriangleIndexBuffer,Z.debugSegments)}function ds(Z,ot){Z.initDebugOverlayCanvas();var et=Z.debugOverlayCanvas,xt=Z.context.gl,Ut=Z.debugOverlayCanvas.getContext("2d");Ut.clearRect(0,0,et.width,et.height),Ut.shadowColor="white",Ut.shadowBlur=2,Ut.lineWidth=1.5,Ut.strokeStyle="white",Ut.textBaseline="top",Ut.font="bold 36px Open Sans, sans-serif",Ut.fillText(ot,5,5),Ut.strokeText(ot,5,5),Z.debugOverlayTexture.update(et),Z.debugOverlayTexture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE)}function dl(Z,ot,et){var xt=Z.context,Ut=et.implementation;if(Z.renderPass==="offscreen"){var fe=Ut.prerender;fe&&(Z.setCustomLayerDefaults(),xt.setColorMode(Z.colorModeForRenderPass()),fe.call(Ut,xt.gl,Z.transform.customLayerMatrix()),xt.setDirty(),Z.setBaseState())}else if(Z.renderPass==="translucent"){Z.setCustomLayerDefaults(),xt.setColorMode(Z.colorModeForRenderPass()),xt.setStencilMode(qn.disabled);var ye=Ut.renderingMode==="3d"?new Kn(Z.context.gl.LEQUAL,Kn.ReadWrite,Z.depthRangeFor3D):Z.depthModeForSublayer(0,Kn.ReadOnly);xt.setDepthMode(ye),Ut.render(xt.gl,Z.transform.customLayerMatrix()),xt.setDirty(),Z.setBaseState(),xt.bindFramebuffer.set(null)}}var yl={symbol:I,circle:Ke,heatmap:gr,line:Mn,fill:Xt,"fill-extrusion":xe,hillshade:je,raster:wr,background:Nr,debug:Bo,custom:dl},Fs=function(Z,ot){this.context=new Cn(Z),this.transform=ot,this._tileTextures={},this.setup(),this.numSublayers=bn.maxUnderzooming+bn.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Gu,this.gpuTimers={}};Fs.prototype.resize=function(Z,ot){if(this.width=Z*t.browser.devicePixelRatio,this.height=ot*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var et=0,xt=this.style._order;et256&&this.clearStencil(),et.setColorMode(rr.disabled),et.setDepthMode(Kn.disabled);var Ut=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var fe=0,ye=ot;fe256&&this.clearStencil();var Z=this.nextStencilID++,ot=this.context.gl;return new qn({func:ot.NOTEQUAL,mask:255},Z,255,ot.KEEP,ot.KEEP,ot.REPLACE)},Fs.prototype.stencilModeForClipping=function(Z){var ot=this.context.gl;return new qn({func:ot.EQUAL,mask:255},this._tileClippingMaskIDs[Z.key],0,ot.KEEP,ot.KEEP,ot.REPLACE)},Fs.prototype.stencilConfigForOverlap=function(Z){var ot,et=this.context.gl,xt=Z.sort(function(ce,Se){return Se.overscaledZ-ce.overscaledZ}),Ut=xt[xt.length-1].overscaledZ,fe=xt[0].overscaledZ-Ut+1;if(fe>1){this.currentStencilSource=void 0,this.nextStencilID+fe>256&&this.clearStencil();for(var ye={},Yt=0;Yt=0;this.currentLayer--){var on=this.style._layers[xt[this.currentLayer]],hn=Ut[on.source],fi=Yt[on.source];this._renderTileClippingMasks(on,fi),this.renderLayer(this,hn,on,fi)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?ot.pop():null},Fs.prototype.isPatternMissing=function(Z){if(!Z)return!1;if(!Z.from||!Z.to)return!0;var ot=this.imageManager.getPattern(Z.from.toString()),et=this.imageManager.getPattern(Z.to.toString());return!ot||!et},Fs.prototype.useProgram=function(Z,ot){this.cache=this.cache||{};var et=""+Z+(ot?ot.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[et]||(this.cache[et]=new rf(this.context,Z,wf[Z],ot,Os[Z],this._showOverdrawInspector)),this.cache[et]},Fs.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Fs.prototype.setBaseState=function(){var Z=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(Z.FUNC_ADD)},Fs.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var Z=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,Z.RGBA)}},Fs.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wl=function(Z,ot){this.points=Z,this.planes=ot};wl.fromInvProjectionMatrix=function(Z,ot,et){var xt=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],Ut=Math.pow(2,et),fe=xt.map(function(ce){return t.transformMat4([],ce,Z)}).map(function(ce){return t.scale$1([],ce,1/ce[3]/ot*Ut)}),ye=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Yt=ye.map(function(ce){var Se=t.sub([],fe[ce[0]],fe[ce[1]]),nr=t.sub([],fe[ce[2]],fe[ce[1]]),Ye=t.normalize([],t.cross([],Se,nr)),tr=-t.dot(Ye,fe[ce[1]]);return Ye.concat(tr)});return new wl(fe,Yt)};var Su=function(Z,ot){this.min=Z,this.max=ot,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Su.prototype.quadrant=function(Z){for(var ot=[Z%2===0,Z<2],et=t.clone$2(this.min),xt=t.clone$2(this.max),Ut=0;Ut=0;if(fe===0)return 0;fe!==ot.length&&(et=!1)}if(et)return 2;for(var Yt=0;Yt<3;Yt++){for(var ce=Number.MAX_VALUE,Se=-Number.MAX_VALUE,nr=0;nrthis.max[Yt]-this.min[Yt])return 0}return 1};var gu=function(Z,ot,et,xt){if(Z===void 0&&(Z=0),ot===void 0&&(ot=0),et===void 0&&(et=0),xt===void 0&&(xt=0),isNaN(Z)||Z<0||isNaN(ot)||ot<0||isNaN(et)||et<0||isNaN(xt)||xt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=Z,this.bottom=ot,this.left=et,this.right=xt};gu.prototype.interpolate=function(Z,ot,et){return ot.top!=null&&Z.top!=null&&(this.top=t.number(Z.top,ot.top,et)),ot.bottom!=null&&Z.bottom!=null&&(this.bottom=t.number(Z.bottom,ot.bottom,et)),ot.left!=null&&Z.left!=null&&(this.left=t.number(Z.left,ot.left,et)),ot.right!=null&&Z.right!=null&&(this.right=t.number(Z.right,ot.right,et)),this},gu.prototype.getCenter=function(Z,ot){var et=t.clamp((this.left+Z-this.right)/2,0,Z),xt=t.clamp((this.top+ot-this.bottom)/2,0,ot);return new t.Point(et,xt)},gu.prototype.equals=function(Z){return this.top===Z.top&&this.bottom===Z.bottom&&this.left===Z.left&&this.right===Z.right},gu.prototype.clone=function(){return new gu(this.top,this.bottom,this.left,this.right)},gu.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Zs=function(Z,ot,et,xt,Ut){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ut===void 0?!0:Ut,this._minZoom=Z||0,this._maxZoom=ot||22,this._minPitch=et??0,this._maxPitch=xt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new gu,this._posMatrixCache={},this._alignedPosMatrixCache={}},$s={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Zs.prototype.clone=function(){var Z=new Zs(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return Z.tileSize=this.tileSize,Z.latRange=this.latRange,Z.width=this.width,Z.height=this.height,Z._center=this._center,Z.zoom=this.zoom,Z.angle=this.angle,Z._fov=this._fov,Z._pitch=this._pitch,Z._unmodified=this._unmodified,Z._edgeInsets=this._edgeInsets.clone(),Z._calcMatrices(),Z},$s.minZoom.get=function(){return this._minZoom},$s.minZoom.set=function(Z){this._minZoom!==Z&&(this._minZoom=Z,this.zoom=Math.max(this.zoom,Z))},$s.maxZoom.get=function(){return this._maxZoom},$s.maxZoom.set=function(Z){this._maxZoom!==Z&&(this._maxZoom=Z,this.zoom=Math.min(this.zoom,Z))},$s.minPitch.get=function(){return this._minPitch},$s.minPitch.set=function(Z){this._minPitch!==Z&&(this._minPitch=Z,this.pitch=Math.max(this.pitch,Z))},$s.maxPitch.get=function(){return this._maxPitch},$s.maxPitch.set=function(Z){this._maxPitch!==Z&&(this._maxPitch=Z,this.pitch=Math.min(this.pitch,Z))},$s.renderWorldCopies.get=function(){return this._renderWorldCopies},$s.renderWorldCopies.set=function(Z){Z===void 0?Z=!0:Z===null&&(Z=!1),this._renderWorldCopies=Z},$s.worldSize.get=function(){return this.tileSize*this.scale},$s.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},$s.size.get=function(){return new t.Point(this.width,this.height)},$s.bearing.get=function(){return-this.angle/Math.PI*180},$s.bearing.set=function(Z){var ot=-t.wrap(Z,-180,180)*Math.PI/180;this.angle!==ot&&(this._unmodified=!1,this.angle=ot,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},$s.pitch.get=function(){return this._pitch/Math.PI*180},$s.pitch.set=function(Z){var ot=t.clamp(Z,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ot&&(this._unmodified=!1,this._pitch=ot,this._calcMatrices())},$s.fov.get=function(){return this._fov/Math.PI*180},$s.fov.set=function(Z){Z=Math.max(.01,Math.min(60,Z)),this._fov!==Z&&(this._unmodified=!1,this._fov=Z/180*Math.PI,this._calcMatrices())},$s.zoom.get=function(){return this._zoom},$s.zoom.set=function(Z){var ot=Math.min(Math.max(Z,this.minZoom),this.maxZoom);this._zoom!==ot&&(this._unmodified=!1,this._zoom=ot,this.scale=this.zoomScale(ot),this.tileZoom=Math.floor(ot),this.zoomFraction=ot-this.tileZoom,this._constrain(),this._calcMatrices())},$s.center.get=function(){return this._center},$s.center.set=function(Z){Z.lat===this._center.lat&&Z.lng===this._center.lng||(this._unmodified=!1,this._center=Z,this._constrain(),this._calcMatrices())},$s.padding.get=function(){return this._edgeInsets.toJSON()},$s.padding.set=function(Z){this._edgeInsets.equals(Z)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Z,1),this._calcMatrices())},$s.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Zs.prototype.isPaddingEqual=function(Z){return this._edgeInsets.equals(Z)},Zs.prototype.interpolatePadding=function(Z,ot,et){this._unmodified=!1,this._edgeInsets.interpolate(Z,ot,et),this._constrain(),this._calcMatrices()},Zs.prototype.coveringZoomLevel=function(Z){var ot=(Z.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/Z.tileSize));return Math.max(0,ot)},Zs.prototype.getVisibleUnwrappedCoordinates=function(Z){var ot=[new t.UnwrappedTileID(0,Z)];if(this._renderWorldCopies)for(var et=this.pointCoordinate(new t.Point(0,0)),xt=this.pointCoordinate(new t.Point(this.width,0)),Ut=this.pointCoordinate(new t.Point(this.width,this.height)),fe=this.pointCoordinate(new t.Point(0,this.height)),ye=Math.floor(Math.min(et.x,xt.x,Ut.x,fe.x)),Yt=Math.floor(Math.max(et.x,xt.x,Ut.x,fe.x)),ce=1,Se=ye-ce;Se<=Yt+ce;Se++)Se!==0&&ot.push(new t.UnwrappedTileID(Se,Z));return ot},Zs.prototype.coveringTiles=function(Z){var ot=this.coveringZoomLevel(Z),et=ot;if(Z.minzoom!==void 0&&otZ.maxzoom&&(ot=Z.maxzoom);var xt=t.MercatorCoordinate.fromLngLat(this.center),Ut=Math.pow(2,ot),fe=[Ut*xt.x,Ut*xt.y,0],ye=wl.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ot),Yt=Z.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Yt=ot);var ce=3,Se=function(Ti){return{aabb:new Su([Ti*Ut,0,0],[(Ti+1)*Ut,Ut,0]),zoom:0,x:0,y:0,wrap:Ti,fullyVisible:!1}},nr=[],Ye=[],tr=ot,lr=Z.reparseOverscaled?et:ot;if(this._renderWorldCopies)for(var hr=1;hr<=3;hr++)nr.push(Se(-hr)),nr.push(Se(hr));for(nr.push(Se(0));nr.length>0;){var Ve=nr.pop(),Xe=Ve.x,$e=Ve.y,Cr=Ve.fullyVisible;if(!Cr){var on=Ve.aabb.intersects(ye);if(on===0)continue;Cr=on===2}var hn=Ve.aabb.distanceX(fe),fi=Ve.aabb.distanceY(fe),si=Math.max(Math.abs(hn),Math.abs(fi)),Gn=ce+(1<Gn&&Ve.zoom>=Yt){Ye.push({tileID:new t.OverscaledTileID(Ve.zoom===tr?lr:Ve.zoom,Ve.wrap,Ve.zoom,Xe,$e),distanceSq:t.sqrLen([fe[0]-.5-Xe,fe[1]-.5-$e])});continue}for(var Ai=0;Ai<4;Ai++){var di=(Xe<<1)+Ai%2,Ki=($e<<1)+(Ai>>1);nr.push({aabb:Ve.aabb.quadrant(Ai),zoom:Ve.zoom+1,x:di,y:Ki,wrap:Ve.wrap,fullyVisible:Cr})}}return Ye.sort(function(Ti,Mi){return Ti.distanceSq-Mi.distanceSq}).map(function(Ti){return Ti.tileID})},Zs.prototype.resize=function(Z,ot){this.width=Z,this.height=ot,this.pixelsToGLUnits=[2/Z,-2/ot],this._constrain(),this._calcMatrices()},$s.unmodified.get=function(){return this._unmodified},Zs.prototype.zoomScale=function(Z){return Math.pow(2,Z)},Zs.prototype.scaleZoom=function(Z){return Math.log(Z)/Math.LN2},Zs.prototype.project=function(Z){var ot=t.clamp(Z.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(Z.lng)*this.worldSize,t.mercatorYfromLat(ot)*this.worldSize)},Zs.prototype.unproject=function(Z){return new t.MercatorCoordinate(Z.x/this.worldSize,Z.y/this.worldSize).toLngLat()},$s.point.get=function(){return this.project(this.center)},Zs.prototype.setLocationAtPoint=function(Z,ot){var et=this.pointCoordinate(ot),xt=this.pointCoordinate(this.centerPoint),Ut=this.locationCoordinate(Z),fe=new t.MercatorCoordinate(Ut.x-(et.x-xt.x),Ut.y-(et.y-xt.y));this.center=this.coordinateLocation(fe),this._renderWorldCopies&&(this.center=this.center.wrap())},Zs.prototype.locationPoint=function(Z){return this.coordinatePoint(this.locationCoordinate(Z))},Zs.prototype.pointLocation=function(Z){return this.coordinateLocation(this.pointCoordinate(Z))},Zs.prototype.locationCoordinate=function(Z){return t.MercatorCoordinate.fromLngLat(Z)},Zs.prototype.coordinateLocation=function(Z){return Z.toLngLat()},Zs.prototype.pointCoordinate=function(Z){var ot=0,et=[Z.x,Z.y,0,1],xt=[Z.x,Z.y,1,1];t.transformMat4(et,et,this.pixelMatrixInverse),t.transformMat4(xt,xt,this.pixelMatrixInverse);var Ut=et[3],fe=xt[3],ye=et[0]/Ut,Yt=xt[0]/fe,ce=et[1]/Ut,Se=xt[1]/fe,nr=et[2]/Ut,Ye=xt[2]/fe,tr=nr===Ye?0:(ot-nr)/(Ye-nr);return new t.MercatorCoordinate(t.number(ye,Yt,tr)/this.worldSize,t.number(ce,Se,tr)/this.worldSize)},Zs.prototype.coordinatePoint=function(Z){var ot=[Z.x*this.worldSize,Z.y*this.worldSize,0,1];return t.transformMat4(ot,ot,this.pixelMatrix),new t.Point(ot[0]/ot[3],ot[1]/ot[3])},Zs.prototype.getBounds=function(){return new t.LngLatBounds().extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Zs.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Zs.prototype.setMaxBounds=function(Z){Z?(this.lngRange=[Z.getWest(),Z.getEast()],this.latRange=[Z.getSouth(),Z.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Zs.prototype.calculatePosMatrix=function(Z,ot){ot===void 0&&(ot=!1);var et=Z.key,xt=ot?this._alignedPosMatrixCache:this._posMatrixCache;if(xt[et])return xt[et];var Ut=Z.canonical,fe=this.worldSize/this.zoomScale(Ut.z),ye=Ut.x+Math.pow(2,Ut.z)*Z.wrap,Yt=t.identity(new Float64Array(16));return t.translate(Yt,Yt,[ye*fe,Ut.y*fe,0]),t.scale(Yt,Yt,[fe/t.EXTENT,fe/t.EXTENT,1]),t.multiply(Yt,ot?this.alignedProjMatrix:this.projMatrix,Yt),xt[et]=new Float32Array(Yt),xt[et]},Zs.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Zs.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var Z=-90,ot=90,et=-180,xt=180,Ut,fe,ye,Yt,ce=this.size,Se=this._unmodified;if(this.latRange){var nr=this.latRange;Z=t.mercatorYfromLat(nr[1])*this.worldSize,ot=t.mercatorYfromLat(nr[0])*this.worldSize,Ut=ot-Zot&&(Yt=ot-Ve)}if(this.lngRange){var Xe=tr.x,$e=ce.x/2;Xe-$ext&&(ye=xt-$e)}(ye!==void 0||Yt!==void 0)&&(this.center=this.unproject(new t.Point(ye!==void 0?ye:tr.x,Yt!==void 0?Yt:tr.y))),this._unmodified=Se,this._constraining=!1}},Zs.prototype._calcMatrices=function(){if(this.height){var Z=this._fov/2,ot=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(Z)*this.height;var et=Math.PI/2+this._pitch,xt=this._fov*(.5+ot.y/this.height),Ut=Math.sin(xt)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-et-xt,.01,Math.PI-.01)),fe=this.point,ye=fe.x,Yt=fe.y,ce=Math.cos(Math.PI/2-this._pitch)*Ut+this.cameraToCenterDistance,Se=ce*1.01,nr=this.height/50,Ye=new Float64Array(16);t.perspective(Ye,this._fov,this.width/this.height,nr,Se),Ye[8]=-ot.x*2/this.width,Ye[9]=ot.y*2/this.height,t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[0,0,-this.cameraToCenterDistance]),t.rotateX(Ye,Ye,this._pitch),t.rotateZ(Ye,Ye,this.angle),t.translate(Ye,Ye,[-ye,-Yt,0]),this.mercatorMatrix=t.scale([],Ye,[this.worldSize,this.worldSize,this.worldSize]),t.scale(Ye,Ye,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Ye,this.invProjMatrix=t.invert([],this.projMatrix);var tr=this.width%2/2,lr=this.height%2/2,hr=Math.cos(this.angle),Ve=Math.sin(this.angle),Xe=ye-Math.round(ye)+hr*tr+Ve*lr,$e=Yt-Math.round(Yt)+hr*lr+Ve*tr,Cr=new Float64Array(Ye);if(t.translate(Cr,Cr,[Xe>.5?Xe-1:Xe,$e>.5?$e-1:$e,0]),this.alignedProjMatrix=Cr,Ye=t.create(),t.scale(Ye,Ye,[this.width/2,-this.height/2,1]),t.translate(Ye,Ye,[1,-1,0]),this.labelPlaneMatrix=Ye,Ye=t.create(),t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[-1,-1,0]),t.scale(Ye,Ye,[2/this.width,2/this.height,1]),this.glCoordMatrix=Ye,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Ye=t.invert(new Float64Array(16),this.pixelMatrix),!Ye)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Ye,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Zs.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var Z=this.pointCoordinate(new t.Point(0,0)),ot=[Z.x*this.worldSize,Z.y*this.worldSize,0,1],et=t.transformMat4(ot,ot,this.pixelMatrix);return et[3]/this.cameraToCenterDistance},Zs.prototype.getCameraPoint=function(){var Z=this._pitch,ot=Math.tan(Z)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,ot))},Zs.prototype.getCameraQueryGeometry=function(Z){var ot=this.getCameraPoint();if(Z.length===1)return[Z[0],ot];for(var et=ot.x,xt=ot.y,Ut=ot.x,fe=ot.y,ye=0,Yt=Z;ye=3&&!Z.some(function(et){return isNaN(et)})){var ot=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(Z[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+Z[2],+Z[1]],zoom:+Z[0],bearing:ot,pitch:+(Z[4]||0)}),!0}return!1},pc.prototype._updateHashUnthrottled=function(){var Z=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,Z)}catch{}};var Zc={linearity:.3,easing:t.bezier(0,0,.3,1)},At=t.extend({deceleration:2500,maxSpeed:1400},Zc),jt=t.extend({deceleration:20,maxSpeed:1400},Zc),ue=t.extend({deceleration:1e3,maxSpeed:360},Zc),Me=t.extend({deceleration:1e3,maxSpeed:90},Zc),Le=function(Z){this._map=Z,this.clear()};Le.prototype.clear=function(){this._inertiaBuffer=[]},Le.prototype.record=function(Z){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:Z})},Le.prototype._drainInertiaBuffer=function(){for(var Z=this._inertiaBuffer,ot=t.browser.now(),et=160;Z.length>0&&ot-Z[0].time>et;)Z.shift()},Le.prototype._onMoveEnd=function(Z){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ot={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},et=0,xt=this._inertiaBuffer;et=this._clickTolerance||this._map.fire(new ar(Z.type,this._map,Z))},Xr.prototype.dblclick=function(Z){return this._firePreventable(new ar(Z.type,this._map,Z))},Xr.prototype.mouseover=function(Z){this._map.fire(new ar(Z.type,this._map,Z))},Xr.prototype.mouseout=function(Z){this._map.fire(new ar(Z.type,this._map,Z))},Xr.prototype.touchstart=function(Z){return this._firePreventable(new Mr(Z.type,this._map,Z))},Xr.prototype.touchmove=function(Z){this._map.fire(new Mr(Z.type,this._map,Z))},Xr.prototype.touchend=function(Z){this._map.fire(new Mr(Z.type,this._map,Z))},Xr.prototype.touchcancel=function(Z){this._map.fire(new Mr(Z.type,this._map,Z))},Xr.prototype._firePreventable=function(Z){if(this._map.fire(Z),Z.defaultPrevented)return{}},Xr.prototype.isEnabled=function(){return!0},Xr.prototype.isActive=function(){return!1},Xr.prototype.enable=function(){},Xr.prototype.disable=function(){};var gn=function(Z){this._map=Z};gn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},gn.prototype.mousemove=function(Z){this._map.fire(new ar(Z.type,this._map,Z))},gn.prototype.mousedown=function(){this._delayContextMenu=!0},gn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ar("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},gn.prototype.contextmenu=function(Z){this._delayContextMenu?this._contextMenuEvent=Z:this._map.fire(new ar(Z.type,this._map,Z)),this._map.listens("contextmenu")&&Z.preventDefault()},gn.prototype.isEnabled=function(){return!0},gn.prototype.isActive=function(){return!1},gn.prototype.enable=function(){},gn.prototype.disable=function(){};var In=function(Z,ot){this._map=Z,this._el=Z.getCanvasContainer(),this._container=Z.getContainer(),this._clickTolerance=ot.clickTolerance||1};In.prototype.isEnabled=function(){return!!this._enabled},In.prototype.isActive=function(){return!!this._active},In.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},In.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},In.prototype.mousedown=function(Z,ot){this.isEnabled()&&Z.shiftKey&&Z.button===0&&(r.disableDrag(),this._startPos=this._lastPos=ot,this._active=!0)},In.prototype.mousemoveWindow=function(Z,ot){if(this._active){var et=ot;if(!(this._lastPos.equals(et)||!this._box&&et.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=Z.timeStamp),et.length===this.numTouches&&(this.centroid=Bi(ot),this.touches=On(et,ot)))},Pi.prototype.touchmove=function(Z,ot,et){if(!(this.aborted||!this.centroid)){var xt=On(et,ot);for(var Ut in this.touches){var fe=this.touches[Ut],ye=xt[Ut];(!ye||ye.dist(fe)>ki)&&(this.aborted=!0)}}},Pi.prototype.touchend=function(Z,ot,et){if((!this.centroid||Z.timeStamp-this.startTime>mi)&&(this.aborted=!0),et.length===0){var xt=!this.aborted&&this.centroid;if(this.reset(),xt)return xt}};var Hi=function(Z){this.singleTap=new Pi(Z),this.numTaps=Z.numTaps,this.reset()};Hi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Hi.prototype.touchstart=function(Z,ot,et){this.singleTap.touchstart(Z,ot,et)},Hi.prototype.touchmove=function(Z,ot,et){this.singleTap.touchmove(Z,ot,et)},Hi.prototype.touchend=function(Z,ot,et){var xt=this.singleTap.touchend(Z,ot,et);if(xt){var Ut=Z.timeStamp-this.lastTime0&&(this._active=!0);var xt=On(et,ot),Ut=new t.Point(0,0),fe=new t.Point(0,0),ye=0;for(var Yt in xt){var ce=xt[Yt],Se=this._touches[Yt];Se&&(Ut._add(ce),fe._add(ce.sub(Se)),ye++,xt[Yt]=ce)}if(this._touches=xt,!(yeMath.abs(Z.x)}var Nl=100,eu=function(Z){function ot(){Z.apply(this,arguments)}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.reset=function(){Z.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},ot.prototype._start=function(et){this._lastPoints=et,rh(et[0].sub(et[1]))&&(this._valid=!1)},ot.prototype._move=function(et,xt,Ut){var fe=et[0].sub(this._lastPoints[0]),ye=et[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(fe,ye,Ut.timeStamp),!!this._valid){this._lastPoints=et,this._active=!0;var Yt=(fe.y+ye.y)/2,ce=-.5;return{pitchDelta:Yt*ce}}},ot.prototype.gestureBeginsVertically=function(et,xt,Ut){if(this._valid!==void 0)return this._valid;var fe=2,ye=et.mag()>=fe,Yt=xt.mag()>=fe;if(!(!ye&&!Yt)){if(!ye||!Yt)return this._firstMove===void 0&&(this._firstMove=Ut),Ut-this._firstMove0==xt.y>0;return rh(et)&&rh(xt)&&ce}},ot}(Tl),wh={panStep:100,bearingStep:15,pitchStep:10},_e=function(){var Z=wh;this._panStep=Z.panStep,this._bearingStep=Z.bearingStep,this._pitchStep=Z.pitchStep,this._rotationDisabled=!1};_e.prototype.reset=function(){this._active=!1},_e.prototype.keydown=function(Z){var ot=this;if(!(Z.altKey||Z.ctrlKey||Z.metaKey)){var et=0,xt=0,Ut=0,fe=0,ye=0;switch(Z.keyCode){case 61:case 107:case 171:case 187:et=1;break;case 189:case 109:case 173:et=-1;break;case 37:Z.shiftKey?xt=-1:(Z.preventDefault(),fe=-1);break;case 39:Z.shiftKey?xt=1:(Z.preventDefault(),fe=1);break;case 38:Z.shiftKey?Ut=1:(Z.preventDefault(),ye=-1);break;case 40:Z.shiftKey?Ut=-1:(Z.preventDefault(),ye=1);break;default:return}return this._rotationDisabled&&(xt=0,Ut=0),{cameraAnimation:function(Yt){var ce=Yt.getZoom();Yt.easeTo({duration:300,easeId:"keyboardHandler",easing:kr,zoom:et?Math.round(ce)+et*(Z.shiftKey?2:1):ce,bearing:Yt.getBearing()+xt*ot._bearingStep,pitch:Yt.getPitch()+Ut*ot._pitchStep,offset:[-fe*ot._panStep,-ye*ot._panStep],center:Yt.getCenter()},{originalEvent:Z})}}}},_e.prototype.enable=function(){this._enabled=!0},_e.prototype.disable=function(){this._enabled=!1,this.reset()},_e.prototype.isEnabled=function(){return this._enabled},_e.prototype.isActive=function(){return this._active},_e.prototype.disableRotation=function(){this._rotationDisabled=!0},_e.prototype.enableRotation=function(){this._rotationDisabled=!1};function kr(Z){return Z*(2-Z)}var Lr=4.000244140625,Dn=1/100,oi=1/450,Jn=2,mn=function(Z,ot){this._map=Z,this._el=Z.getCanvasContainer(),this._handler=ot,this._delta=0,this._defaultZoomRate=Dn,this._wheelZoomRate=oi,t.bindAll(["_onTimeout"],this)};mn.prototype.setZoomRate=function(Z){this._defaultZoomRate=Z},mn.prototype.setWheelZoomRate=function(Z){this._wheelZoomRate=Z},mn.prototype.isEnabled=function(){return!!this._enabled},mn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},mn.prototype.isZooming=function(){return!!this._zooming},mn.prototype.enable=function(Z){this.isEnabled()||(this._enabled=!0,this._aroundCenter=Z&&Z.around==="center")},mn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},mn.prototype.wheel=function(Z){if(this.isEnabled()){var ot=Z.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?Z.deltaY*40:Z.deltaY,et=t.browser.now(),xt=et-(this._lastWheelEventTime||0);this._lastWheelEventTime=et,ot!==0&&ot%Lr===0?this._type="wheel":ot!==0&&Math.abs(ot)<4?this._type="trackpad":xt>400?(this._type=null,this._lastValue=ot,this._timeout=setTimeout(this._onTimeout,40,Z)):this._type||(this._type=Math.abs(xt*ot)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ot+=this._lastValue)),Z.shiftKey&&ot&&(ot=ot/4),this._type&&(this._lastWheelEvent=Z,this._delta-=ot,this._active||this._start(Z)),Z.preventDefault()}},mn.prototype._onTimeout=function(Z){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Z)},mn.prototype._start=function(Z){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var ot=r.mousePos(this._el,Z);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ot)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},mn.prototype.renderFrame=function(){var Z=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ot=this._map.transform;if(this._delta!==0){var et=this._type==="wheel"&&Math.abs(this._delta)>Lr?this._wheelZoomRate:this._defaultZoomRate,xt=Jn/(1+Math.exp(-Math.abs(this._delta*et)));this._delta<0&&xt!==0&&(xt=1/xt);var Ut=typeof this._targetZoom=="number"?ot.zoomScale(this._targetZoom):ot.scale;this._targetZoom=Math.min(ot.maxZoom,Math.max(ot.minZoom,ot.scaleZoom(Ut*xt))),this._type==="wheel"&&(this._startZoom=ot.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var fe=typeof this._targetZoom=="number"?this._targetZoom:ot.zoom,ye=this._startZoom,Yt=this._easing,ce=!1,Se;if(this._type==="wheel"&&ye&&Yt){var nr=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),Ye=Yt(nr);Se=t.number(ye,fe,Ye),nr<1?this._frameId||(this._frameId=!0):ce=!0}else Se=fe,ce=!0;return this._active=!0,ce&&(this._active=!1,this._finishTimeout=setTimeout(function(){Z._zooming=!1,Z._handler._triggerRenderFrame(),delete Z._targetZoom,delete Z._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ce,zoomDelta:Se-ot.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},mn.prototype._smoothOutEasing=function(Z){var ot=t.ease;if(this._prevEase){var et=this._prevEase,xt=(t.browser.now()-et.start)/et.duration,Ut=et.easing(xt+.01)-et.easing(xt),fe=.27/Math.sqrt(Ut*Ut+1e-4)*.01,ye=Math.sqrt(.27*.27-fe*fe);ot=t.bezier(fe,ye,.25,1)}return this._prevEase={start:t.browser.now(),duration:Z,easing:ot},ot},mn.prototype.reset=function(){this._active=!1};var ni=function(Z,ot){this._clickZoom=Z,this._tapZoom=ot};ni.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ni.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ni.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ni.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Yi=function(){this.reset()};Yi.prototype.reset=function(){this._active=!1},Yi.prototype.dblclick=function(Z,ot){return Z.preventDefault(),{cameraAnimation:function(et){et.easeTo({duration:300,zoom:et.getZoom()+(Z.shiftKey?-1:1),around:et.unproject(ot)},{originalEvent:Z})}}},Yi.prototype.enable=function(){this._enabled=!0},Yi.prototype.disable=function(){this._enabled=!1,this.reset()},Yi.prototype.isEnabled=function(){return this._enabled},Yi.prototype.isActive=function(){return this._active};var Ui=function(){this._tap=new Hi({numTouches:1,numTaps:1}),this.reset()};Ui.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Ui.prototype.touchstart=function(Z,ot,et){this._swipePoint||(this._tapTime&&Z.timeStamp-this._tapTime>Un&&this.reset(),this._tapTime?et.length>0&&(this._swipePoint=ot[0],this._swipeTouch=et[0].identifier):this._tap.touchstart(Z,ot,et))},Ui.prototype.touchmove=function(Z,ot,et){if(!this._tapTime)this._tap.touchmove(Z,ot,et);else if(this._swipePoint){if(et[0].identifier!==this._swipeTouch)return;var xt=ot[0],Ut=xt.y-this._swipePoint.y;return this._swipePoint=xt,Z.preventDefault(),this._active=!0,{zoomDelta:Ut/128}}},Ui.prototype.touchend=function(Z,ot,et){if(this._tapTime)this._swipePoint&&et.length===0&&this.reset();else{var xt=this._tap.touchend(Z,ot,et);xt&&(this._tapTime=Z.timeStamp)}},Ui.prototype.touchcancel=function(){this.reset()},Ui.prototype.enable=function(){this._enabled=!0},Ui.prototype.disable=function(){this._enabled=!1,this.reset()},Ui.prototype.isEnabled=function(){return this._enabled},Ui.prototype.isActive=function(){return this._active};var ma=function(Z,ot,et){this._el=Z,this._mousePan=ot,this._touchPan=et};ma.prototype.enable=function(Z){this._inertiaOptions=Z||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ma.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ma.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ma.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Za=function(Z,ot,et){this._pitchWithRotate=Z.pitchWithRotate,this._mouseRotate=ot,this._mousePitch=et};Za.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Za.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Za.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Za.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Ra=function(Z,ot,et,xt){this._el=Z,this._touchZoom=ot,this._touchRotate=et,this._tapDragZoom=xt,this._rotationDisabled=!1,this._enabled=!0};Ra.prototype.enable=function(Z){this._touchZoom.enable(Z),this._rotationDisabled||this._touchRotate.enable(Z),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Ra.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Ra.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Ra.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Ra.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Ra.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ta=function(Z){return Z.zoom||Z.drag||Z.pitch||Z.rotate},bi=function(Z){function ot(){Z.apply(this,arguments)}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot}(t.Event);function cn(Z){return Z.panDelta&&Z.panDelta.mag()||Z.zoomDelta||Z.bearingDelta||Z.pitchDelta}var Nn=function(Z,ot){this._map=Z,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Le(Z),this._bearingSnap=ot.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ot),t.bindAll(["handleEvent","handleWindowEvent"],this);var et=this._el;this._listeners=[[et,"touchstart",{passive:!0}],[et,"touchmove",{passive:!1}],[et,"touchend",void 0],[et,"touchcancel",void 0],[et,"mousedown",void 0],[et,"mousemove",void 0],[et,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[et,"mouseover",void 0],[et,"mouseout",void 0],[et,"dblclick",void 0],[et,"click",void 0],[et,"keydown",{capture:!1}],[et,"keyup",void 0],[et,"wheel",{passive:!1}],[et,"contextmenu",void 0],[t.window,"blur",void 0]];for(var xt=0,Ut=this._listeners;xtye?Math.min(2,hn):Math.max(.5,hn),Ti=Math.pow(Ki,1-Ai),Mi=fe.unproject(Cr.add(on.mult(Ai*Ti)).mult(di));fe.setLocationAtPoint(fe.renderWorldCopies?Mi.wrap():Mi,Ve)}Ut._fireMoveEvents(xt)},function(Ai){Ut._afterEase(xt,Ai)},et),this},ot.prototype._prepareEase=function(et,xt,Ut){Ut===void 0&&(Ut={}),this._moving=!0,!xt&&!Ut.moving&&this.fire(new t.Event("movestart",et)),this._zooming&&!Ut.zooming&&this.fire(new t.Event("zoomstart",et)),this._rotating&&!Ut.rotating&&this.fire(new t.Event("rotatestart",et)),this._pitching&&!Ut.pitching&&this.fire(new t.Event("pitchstart",et))},ot.prototype._fireMoveEvents=function(et){this.fire(new t.Event("move",et)),this._zooming&&this.fire(new t.Event("zoom",et)),this._rotating&&this.fire(new t.Event("rotate",et)),this._pitching&&this.fire(new t.Event("pitch",et))},ot.prototype._afterEase=function(et,xt){if(!(this._easeId&&xt&&this._easeId===xt)){delete this._easeId;var Ut=this._zooming,fe=this._rotating,ye=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ut&&this.fire(new t.Event("zoomend",et)),fe&&this.fire(new t.Event("rotateend",et)),ye&&this.fire(new t.Event("pitchend",et)),this.fire(new t.Event("moveend",et))}},ot.prototype.flyTo=function(et,xt){var Ut=this;if(!et.essential&&t.browser.prefersReducedMotion){var fe=t.pick(et,["center","zoom","bearing","pitch","around"]);return this.jumpTo(fe,xt)}this.stop(),et=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},et);var ye=this.transform,Yt=this.getZoom(),ce=this.getBearing(),Se=this.getPitch(),nr=this.getPadding(),Ye="zoom"in et?t.clamp(+et.zoom,ye.minZoom,ye.maxZoom):Yt,tr="bearing"in et?this._normalizeBearing(et.bearing,ce):ce,lr="pitch"in et?+et.pitch:Se,hr="padding"in et?et.padding:ye.padding,Ve=ye.zoomScale(Ye-Yt),Xe=t.Point.convert(et.offset),$e=ye.centerPoint.add(Xe),Cr=ye.pointLocation($e),on=t.LngLat.convert(et.center||Cr);this._normalizeCenter(on);var hn=ye.project(Cr),fi=ye.project(on).sub(hn),si=et.curve,Gn=Math.max(ye.width,ye.height),Ai=Gn/Ve,di=fi.mag();if("minZoom"in et){var Ki=t.clamp(Math.min(et.minZoom,Yt,Ye),ye.minZoom,ye.maxZoom),Ti=Gn/ye.zoomScale(Ki-Yt);si=Math.sqrt(Ti/di*2)}var Mi=si*si;function oa(Rs){var Au=(Ai*Ai-Gn*Gn+(Rs?-1:1)*Mi*Mi*di*di)/(2*(Rs?Ai:Gn)*Mi*di);return Math.log(Math.sqrt(Au*Au+1)-Au)}function Qa(Rs){return(Math.exp(Rs)-Math.exp(-Rs))/2}function ho(Rs){return(Math.exp(Rs)+Math.exp(-Rs))/2}function qo(Rs){return Qa(Rs)/ho(Rs)}var _s=oa(0),Ol=function(Rs){return ho(_s)/ho(_s+si*Rs)},Ul=function(Rs){return Gn*((ho(_s)*qo(_s+si*Rs)-Qa(_s))/Mi)/di},ml=(oa(1)-_s)/si;if(Math.abs(di)<1e-6||!isFinite(ml)){if(Math.abs(Gn-Ai)<1e-6)return this.easeTo(et,xt);var Vl=Aiet.maxDuration&&(et.duration=0),this._zooming=!0,this._rotating=ce!==tr,this._pitching=lr!==Se,this._padding=!ye.isPaddingEqual(hr),this._prepareEase(xt,!1),this._ease(function(Rs){var Au=Rs*ml,nf=1/Ol(Au);ye.zoom=Rs===1?Ye:Yt+ye.scaleZoom(nf),Ut._rotating&&(ye.bearing=t.number(ce,tr,Rs)),Ut._pitching&&(ye.pitch=t.number(Se,lr,Rs)),Ut._padding&&(ye.interpolatePadding(nr,hr,Rs),$e=ye.centerPoint.add(Xe));var Of=Rs===1?on:ye.unproject(hn.add(fi.mult(Ul(Au))).mult(nf));ye.setLocationAtPoint(ye.renderWorldCopies?Of.wrap():Of,$e),Ut._fireMoveEvents(xt)},function(){return Ut._afterEase(xt)},et),this},ot.prototype.isEasing=function(){return!!this._easeFrameId},ot.prototype.stop=function(){return this._stop()},ot.prototype._stop=function(et,xt){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ut=this._onEaseEnd;delete this._onEaseEnd,Ut.call(this,xt)}if(!et){var fe=this.handlers;fe&&fe.stop(!1)}return this},ot.prototype._ease=function(et,xt,Ut){Ut.animate===!1||Ut.duration===0?(et(1),xt()):(this._easeStart=t.browser.now(),this._easeOptions=Ut,this._onEaseFrame=et,this._onEaseEnd=xt,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},ot.prototype._renderFrameCallback=function(){var et=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(et)),et<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},ot.prototype._normalizeBearing=function(et,xt){et=t.wrap(et,-180,180);var Ut=Math.abs(et-xt);return Math.abs(et-360-xt)180?-360:Ut<-180?360:0}},ot}(t.Evented),_i=function(Z){Z===void 0&&(Z={}),this.options=Z,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};_i.prototype.getDefaultPosition=function(){return"bottom-right"},_i.prototype.onAdd=function(Z){var ot=this.options&&this.options.compact;return this._map=Z,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ot&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),ot===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},_i.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},_i.prototype._setElementTitle=function(Z,ot){var et=this._map._getUIString("AttributionControl."+ot);Z.title=et,Z.setAttribute("aria-label",et)},_i.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},_i.prototype._updateEditLink=function(){var Z=this._editLink;Z||(Z=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ot=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(Z){var et=ot.reduce(function(xt,Ut,fe){return Ut.value&&(xt+=Ut.key+"="+Ut.value+(fe=0)return!1;return!0});var ye=Z.join(" | ");ye!==this._attribHTML&&(this._attribHTML=ye,Z.length?(this._innerContainer.innerHTML=ye,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},_i.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Qn=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Qn.prototype.onAdd=function(Z){this._map=Z,this._container=r.create("div","mapboxgl-ctrl");var ot=r.create("a","mapboxgl-ctrl-logo");return ot.target="_blank",ot.rel="noopener nofollow",ot.href="https://www.mapbox.com/",ot.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ot.setAttribute("rel","noopener nofollow"),this._container.appendChild(ot),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Qn.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Qn.prototype.getDefaultPosition=function(){return"bottom-left"},Qn.prototype._updateLogo=function(Z){(!Z||Z.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Qn.prototype._logoRequired=function(){if(this._map.style){var Z=this._map.style.sourceCaches;for(var ot in Z){var et=Z[ot].getSource();if(et.mapbox_logo)return!0}return!1}},Qn.prototype._updateCompact=function(){var Z=this._container.children;if(Z.length){var ot=Z[0];this._map.getCanvasContainer().offsetWidth<250?ot.classList.add("mapboxgl-compact"):ot.classList.remove("mapboxgl-compact")}};var Aa=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Aa.prototype.add=function(Z){var ot=++this._id,et=this._queue;return et.push({callback:Z,id:ot,cancelled:!1}),ot},Aa.prototype.remove=function(Z){for(var ot=this._currentlyRunning,et=ot?this._queue.concat(ot):this._queue,xt=0,Ut=et;xtxt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(xt.minPitch!=null&&xt.maxPitch!=null&&xt.minPitch>xt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(xt.minPitch!=null&&xt.minPitch$i)throw new Error("maxPitch must be less than or equal to "+$i);var fe=new Zs(xt.minZoom,xt.maxZoom,xt.minPitch,xt.maxPitch,xt.renderWorldCopies);if(Z.call(this,fe,xt),this._interactive=xt.interactive,this._maxTileCacheSize=xt.maxTileCacheSize,this._failIfMajorPerformanceCaveat=xt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=xt.preserveDrawingBuffer,this._antialias=xt.antialias,this._trackResize=xt.trackResize,this._bearingSnap=xt.bearingSnap,this._refreshExpiredTiles=xt.refreshExpiredTiles,this._fadeDuration=xt.fadeDuration,this._crossSourceCollisions=xt.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=xt.collectResourceTiming,this._renderTaskQueue=new Aa,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},ua,xt.locale),this._clickTolerance=xt.clickTolerance,this._requestManager=new t.RequestManager(xt.transformRequest,xt.accessToken),typeof xt.container=="string"){if(this._container=t.window.document.getElementById(xt.container),!this._container)throw new Error("Container '"+xt.container+"' not found.")}else if(xt.container instanceof gi)this._container=xt.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(xt.maxBounds&&this.setMaxBounds(xt.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return Ut._update(!1)}),this.on("moveend",function(){return Ut._update(!1)}),this.on("zoom",function(){return Ut._update(!0)}),typeof t.window<"u"&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Nn(this,xt);var ye=typeof xt.hash=="string"&&xt.hash||void 0;this._hash=xt.hash&&new pc(ye).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:xt.center,zoom:xt.zoom,bearing:xt.bearing,pitch:xt.pitch}),xt.bounds&&(this.resize(),this.fitBounds(xt.bounds,t.extend({},xt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=xt.localIdeographFontFamily,xt.style&&this.setStyle(xt.style,{localIdeographFontFamily:xt.localIdeographFontFamily}),xt.attributionControl&&this.addControl(new _i({customAttribution:xt.customAttribution})),this.addControl(new Qn,xt.logoPosition),this.on("style.load",function(){Ut.transform.unmodified&&Ut.jumpTo(Ut.style.stylesheet)}),this.on("data",function(Yt){Ut._update(Yt.dataType==="style"),Ut.fire(new t.Event(Yt.dataType+"data",Yt))}),this.on("dataloading",function(Yt){Ut.fire(new t.Event(Yt.dataType+"dataloading",Yt))})}Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot;var et={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return ot.prototype._getMapId=function(){return this._mapId},ot.prototype.addControl=function(xt,Ut){if(Ut===void 0&&(xt.getDefaultPosition?Ut=xt.getDefaultPosition():Ut="top-right"),!xt||!xt.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var fe=xt.onAdd(this);this._controls.push(xt);var ye=this._controlPositions[Ut];return Ut.indexOf("bottom")!==-1?ye.insertBefore(fe,ye.firstChild):ye.appendChild(fe),this},ot.prototype.removeControl=function(xt){if(!xt||!xt.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Ut=this._controls.indexOf(xt);return Ut>-1&&this._controls.splice(Ut,1),xt.onRemove(this),this},ot.prototype.hasControl=function(xt){return this._controls.indexOf(xt)>-1},ot.prototype.resize=function(xt){var Ut=this._containerDimensions(),fe=Ut[0],ye=Ut[1];this._resizeCanvas(fe,ye),this.transform.resize(fe,ye),this.painter.resize(fe,ye);var Yt=!this._moving;return Yt&&(this.stop(),this.fire(new t.Event("movestart",xt)).fire(new t.Event("move",xt))),this.fire(new t.Event("resize",xt)),Yt&&this.fire(new t.Event("moveend",xt)),this},ot.prototype.getBounds=function(){return this.transform.getBounds()},ot.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},ot.prototype.setMaxBounds=function(xt){return this.transform.setMaxBounds(t.LngLatBounds.convert(xt)),this._update()},ot.prototype.setMinZoom=function(xt){if(xt=xt??Ma,xt>=Ma&&xt<=this.transform.maxZoom)return this.transform.minZoom=xt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=xt,this._update(),this.getZoom()>xt&&this.setZoom(xt),this;throw new Error("maxZoom must be greater than the current minZoom")},ot.prototype.getMaxZoom=function(){return this.transform.maxZoom},ot.prototype.setMinPitch=function(xt){if(xt=xt??Wi,xt=Wi&&xt<=this.transform.maxPitch)return this.transform.minPitch=xt,this._update(),this.getPitch()$i)throw new Error("maxPitch must be less than or equal to "+$i);if(xt>=this.transform.minPitch)return this.transform.maxPitch=xt,this._update(),this.getPitch()>xt&&this.setPitch(xt),this;throw new Error("maxPitch must be greater than the current minPitch")},ot.prototype.getMaxPitch=function(){return this.transform.maxPitch},ot.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},ot.prototype.setRenderWorldCopies=function(xt){return this.transform.renderWorldCopies=xt,this._update()},ot.prototype.project=function(xt){return this.transform.locationPoint(t.LngLat.convert(xt))},ot.prototype.unproject=function(xt){return this.transform.pointLocation(t.Point.convert(xt))},ot.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},ot.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},ot.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},ot.prototype._createDelegatedListener=function(xt,Ut,fe){var ye=this,Yt;if(xt==="mouseenter"||xt==="mouseover"){var ce=!1,Se=function(Ve){var Xe=ye.getLayer(Ut)?ye.queryRenderedFeatures(Ve.point,{layers:[Ut]}):[];Xe.length?ce||(ce=!0,fe.call(ye,new ar(xt,ye,Ve.originalEvent,{features:Xe}))):ce=!1},nr=function(){ce=!1};return{layer:Ut,listener:fe,delegates:{mousemove:Se,mouseout:nr}}}else if(xt==="mouseleave"||xt==="mouseout"){var Ye=!1,tr=function(Ve){var Xe=ye.getLayer(Ut)?ye.queryRenderedFeatures(Ve.point,{layers:[Ut]}):[];Xe.length?Ye=!0:Ye&&(Ye=!1,fe.call(ye,new ar(xt,ye,Ve.originalEvent)))},lr=function(Ve){Ye&&(Ye=!1,fe.call(ye,new ar(xt,ye,Ve.originalEvent)))};return{layer:Ut,listener:fe,delegates:{mousemove:tr,mouseout:lr}}}else{var hr=function(Ve){var Xe=ye.getLayer(Ut)?ye.queryRenderedFeatures(Ve.point,{layers:[Ut]}):[];Xe.length&&(Ve.features=Xe,fe.call(ye,Ve),delete Ve.features)};return{layer:Ut,listener:fe,delegates:(Yt={},Yt[xt]=hr,Yt)}}},ot.prototype.on=function(xt,Ut,fe){if(fe===void 0)return Z.prototype.on.call(this,xt,Ut);var ye=this._createDelegatedListener(xt,Ut,fe);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[xt]=this._delegatedListeners[xt]||[],this._delegatedListeners[xt].push(ye);for(var Yt in ye.delegates)this.on(Yt,ye.delegates[Yt]);return this},ot.prototype.once=function(xt,Ut,fe){if(fe===void 0)return Z.prototype.once.call(this,xt,Ut);var ye=this._createDelegatedListener(xt,Ut,fe);for(var Yt in ye.delegates)this.once(Yt,ye.delegates[Yt]);return this},ot.prototype.off=function(xt,Ut,fe){var ye=this;if(fe===void 0)return Z.prototype.off.call(this,xt,Ut);var Yt=function(ce){for(var Se=ce[xt],nr=0;nr180;){var ye=et.locationPoint(Z);if(ye.x>=0&&ye.y>=0&&ye.x<=et.width&&ye.y<=et.height)break;Z.lng>et.center.lng?Z.lng-=360:Z.lng+=360}return Z}var ns={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function jl(Z,ot,et){var xt=Z.classList;for(var Ut in ns)xt.remove("mapboxgl-"+et+"-anchor-"+Ut);xt.add("mapboxgl-"+et+"-anchor-"+ot)}var Al=function(Z){function ot(et,xt){if(Z.call(this),(et instanceof t.window.HTMLElement||xt)&&(et=t.extend({element:et},xt)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=et&&et.anchor||"center",this._color=et&&et.color||"#3FB1CE",this._scale=et&&et.scale||1,this._draggable=et&&et.draggable||!1,this._clickTolerance=et&&et.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=et&&et.rotation||0,this._rotationAlignment=et&&et.rotationAlignment||"auto",this._pitchAlignment=et&&et.pitchAlignment&&et.pitchAlignment!=="auto"?et.pitchAlignment:this._rotationAlignment,!et||!et.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var Ut=r.createNS("http://www.w3.org/2000/svg","svg"),fe=41,ye=27;Ut.setAttributeNS(null,"display","block"),Ut.setAttributeNS(null,"height",fe+"px"),Ut.setAttributeNS(null,"width",ye+"px"),Ut.setAttributeNS(null,"viewBox","0 0 "+ye+" "+fe);var Yt=r.createNS("http://www.w3.org/2000/svg","g");Yt.setAttributeNS(null,"stroke","none"),Yt.setAttributeNS(null,"stroke-width","1"),Yt.setAttributeNS(null,"fill","none"),Yt.setAttributeNS(null,"fill-rule","evenodd");var ce=r.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"fill-rule","nonzero");var Se=r.createNS("http://www.w3.org/2000/svg","g");Se.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Se.setAttributeNS(null,"fill","#000000");for(var nr=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],Ye=0,tr=nr;Ye=xt}this._isDragging&&(this._pos=et.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag")))},ot.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.Event("dragend")),this._state="inactive"},ot.prototype._addDragHandler=function(et){this._element.contains(et.originalEvent.target)&&(et.preventDefault(),this._positionDelta=et.point.sub(this._pos).add(this._offset),this._pointerdownPos=et.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},ot.prototype.setDraggable=function(et){return this._draggable=!!et,this._map&&(et?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},ot.prototype.isDraggable=function(){return this._draggable},ot.prototype.setRotation=function(et){return this._rotation=et||0,this._update(),this},ot.prototype.getRotation=function(){return this._rotation},ot.prototype.setRotationAlignment=function(et){return this._rotationAlignment=et||"auto",this._update(),this},ot.prototype.getRotationAlignment=function(){return this._rotationAlignment},ot.prototype.setPitchAlignment=function(et){return this._pitchAlignment=et&&et!=="auto"?et:this._rotationAlignment,this._update(),this},ot.prototype.getPitchAlignment=function(){return this._pitchAlignment},ot}(t.Evented),hs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},wu;function pl(Z){wu!==void 0?Z(wu):t.window.navigator.permissions!==void 0?t.window.navigator.permissions.query({name:"geolocation"}).then(function(ot){wu=ot.state!=="denied",Z(wu)}):(wu=!!t.window.navigator.geolocation,Z(wu))}var Eu=0,mc=!1,xc=function(Z){function ot(et){Z.call(this),this.options=t.extend({},hs,et),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.onAdd=function(et){return this._map=et,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),pl(this._setupUI),this._container},ot.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Eu=0,mc=!1},ot.prototype._isOutOfMapMaxBounds=function(et){var xt=this._map.getMaxBounds(),Ut=et.coords;return xt&&(Ut.longitudext.getEast()||Ut.latitudext.getNorth())},ot.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},ot.prototype._onSuccess=function(et){if(this._map){if(this._isOutOfMapMaxBounds(et)){this._setErrorState(),this.fire(new t.Event("outofmaxbounds",et)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=et,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(et),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(et),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",et)),this._finish()}},ot.prototype._updateCamera=function(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude),Ut=et.coords.accuracy,fe=this._map.getBearing(),ye=t.extend({bearing:fe},this.options.fitBoundsOptions);this._map.fitBounds(xt.toBounds(Ut),ye,{geolocateSource:!0})},ot.prototype._updateMarker=function(et){if(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude);this._accuracyCircleMarker.setLngLat(xt).addTo(this._map),this._userLocationDotMarker.setLngLat(xt).addTo(this._map),this._accuracy=et.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},ot.prototype._updateCircleRadius=function(){var et=this._map._container.clientHeight/2,xt=this._map.unproject([0,et]),Ut=this._map.unproject([1,et]),fe=xt.distanceTo(Ut),ye=Math.ceil(2*this._accuracy/fe);this._circleElement.style.width=ye+"px",this._circleElement.style.height=ye+"px"},ot.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},ot.prototype._onError=function(et){if(this._map){if(this.options.trackUserLocation)if(et.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var xt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=xt,this._geolocateButton.setAttribute("aria-label",xt),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(et.code===3&&mc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",et)),this._finish()}},ot.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},ot.prototype._setupUI=function(et){var xt=this;if(this._container.addEventListener("contextmenu",function(ye){return ye.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",et===!1){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ut=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ut,this._geolocateButton.setAttribute("aria-label",Ut)}else{var fe=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=fe,this._geolocateButton.setAttribute("aria-label",fe)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Al(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Al({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ye){var Yt=ye.originalEvent&&ye.originalEvent.type==="resize";!ye.geolocateSource&&xt._watchState==="ACTIVE_LOCK"&&!Yt&&(xt._watchState="BACKGROUND",xt._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),xt._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),xt.fire(new t.Event("trackuserlocationend")))})},ot.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Eu--,mc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Eu++;var et;Eu>1?(et={maximumAge:6e5,timeout:0},mc=!0):(et=this.options.positionOptions,mc=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,et)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},ot.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},ot}(t.Evented),yu={maxWidth:100,unit:"metric"},pu=function(Z){this.options=t.extend({},yu,Z),t.bindAll(["_onMove","setUnit"],this)};pu.prototype.getDefaultPosition=function(){return"bottom-left"},pu.prototype._onMove=function(){ku(this._map,this._container,this.options)},pu.prototype.onAdd=function(Z){return this._map=Z,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",Z.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},pu.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},pu.prototype.setUnit=function(Z){this.options.unit=Z,ku(this._map,this._container,this.options)};function ku(Z,ot,et){var xt=et&&et.maxWidth||100,Ut=Z._container.clientHeight/2,fe=Z.unproject([0,Ut]),ye=Z.unproject([xt,Ut]),Yt=fe.distanceTo(ye);if(et&&et.unit==="imperial"){var ce=3.2808*Yt;if(ce>5280){var Se=ce/5280;No(ot,xt,Se,Z._getUIString("ScaleControl.Miles"))}else No(ot,xt,ce,Z._getUIString("ScaleControl.Feet"))}else if(et&&et.unit==="nautical"){var nr=Yt/1852;No(ot,xt,nr,Z._getUIString("ScaleControl.NauticalMiles"))}else Yt>=1e3?No(ot,xt,Yt/1e3,Z._getUIString("ScaleControl.Kilometers")):No(ot,xt,Yt,Z._getUIString("ScaleControl.Meters"))}function No(Z,ot,et,xt){var Ut=ll(et),fe=Ut/et;Z.style.width=ot*fe+"px",Z.innerHTML=Ut+" "+xt}function Tu(Z){var ot=Math.pow(10,Math.ceil(-Math.log(Z)/Math.LN10));return Math.round(Z*ot)/ot}function ll(Z){var ot=Math.pow(10,(""+Math.floor(Z)).length-1),et=Z/ot;return et=et>=10?10:et>=5?5:et>=3?3:et>=2?2:et>=1?1:Tu(et),ot*et}var Cu=function(Z){this._fullscreen=!1,Z&&Z.container&&(Z.container instanceof t.window.HTMLElement?this._container=Z.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Cu.prototype.onAdd=function(Z){return this._map=Z,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Cu.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Cu.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Cu.prototype._setupUI=function(){var Z=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",Z).setAttribute("aria-hidden",!0),Z.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Cu.prototype._updateTitle=function(){var Z=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Z),this._fullscreenButton.title=Z},Cu.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Cu.prototype._isFullscreen=function(){return this._fullscreen},Cu.prototype._changeIcon=function(){var Z=t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement;Z===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Cu.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var _c={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Lo=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Cs=function(Z){function ot(et){Z.call(this),this.options=t.extend(Object.create(_c),et),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Z&&(ot.__proto__=Z),ot.prototype=Object.create(Z&&Z.prototype),ot.prototype.constructor=ot,ot.prototype.addTo=function(et){return this._map&&this.remove(),this._map=et,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},ot.prototype.isOpen=function(){return!!this._map},ot.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},ot.prototype.getLngLat=function(){return this._lngLat},ot.prototype.setLngLat=function(et){return this._lngLat=t.LngLat.convert(et),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},ot.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},ot.prototype.getElement=function(){return this._container},ot.prototype.setText=function(et){return this.setDOMContent(t.window.document.createTextNode(et))},ot.prototype.setHTML=function(et){var xt=t.window.document.createDocumentFragment(),Ut=t.window.document.createElement("body"),fe;for(Ut.innerHTML=et;fe=Ut.firstChild,!!fe;)xt.appendChild(fe);return this.setDOMContent(xt)},ot.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},ot.prototype.setMaxWidth=function(et){return this.options.maxWidth=et,this._update(),this},ot.prototype.setDOMContent=function(et){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(et),this._createCloseButton(),this._update(),this._focusFirstElement(),this},ot.prototype.addClassName=function(et){this._container&&this._container.classList.add(et)},ot.prototype.removeClassName=function(et){this._container&&this._container.classList.remove(et)},ot.prototype.setOffset=function(et){return this.options.offset=et,this._update(),this},ot.prototype.toggleClassName=function(et){if(this._container)return this._container.classList.toggle(et)},ot.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},ot.prototype._onMouseUp=function(et){this._update(et.point)},ot.prototype._onMouseMove=function(et){this._update(et.point)},ot.prototype._onDrag=function(et){this._update(et.point)},ot.prototype._update=function(et){var xt=this,Ut=this._lngLat||this._trackPointer;if(!(!this._map||!Ut||!this._content)&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(tr){return xt._container.classList.add(tr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Co(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!et))){var fe=this._pos=this._trackPointer&&et?et:this._map.project(this._lngLat),ye=this.options.anchor,Yt=Ml(this.options.offset);if(!ye){var ce=this._container.offsetWidth,Se=this._container.offsetHeight,nr;fe.y+Yt.bottom.ythis._map.transform.height-Se?nr=["bottom"]:nr=[],fe.xthis._map.transform.width-ce/2&&nr.push("right"),nr.length===0?ye="bottom":ye=nr.join("-")}var Ye=fe.add(Yt[ye]).round();r.setTransform(this._container,ns[ye]+" translate("+Ye.x+"px,"+Ye.y+"px)"),jl(this._container,ye,"popup")}},ot.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var et=this._container.querySelector(Lo);et&&et.focus()}},ot.prototype._onClose=function(){this.remove()},ot}(t.Evented);function Ml(Z){if(Z)if(typeof Z=="number"){var ot=Math.round(Math.sqrt(.5*Math.pow(Z,2)));return{center:new t.Point(0,0),top:new t.Point(0,Z),"top-left":new t.Point(ot,ot),"top-right":new t.Point(-ot,ot),bottom:new t.Point(0,-Z),"bottom-left":new t.Point(ot,-ot),"bottom-right":new t.Point(-ot,-ot),left:new t.Point(Z,0),right:new t.Point(-Z,0)}}else if(Z instanceof t.Point||Array.isArray(Z)){var et=t.Point.convert(Z);return{center:et,top:et,"top-left":et,"top-right":et,bottom:et,"bottom-left":et,"bottom-right":et,left:et,right:et}}else return{center:t.Point.convert(Z.center||[0,0]),top:t.Point.convert(Z.top||[0,0]),"top-left":t.Point.convert(Z["top-left"]||[0,0]),"top-right":t.Point.convert(Z["top-right"]||[0,0]),bottom:t.Point.convert(Z.bottom||[0,0]),"bottom-left":t.Point.convert(Z["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(Z["bottom-right"]||[0,0]),left:t.Point.convert(Z.left||[0,0]),right:t.Point.convert(Z.right||[0,0])};else return Ml(new t.Point(0,0))}var xl={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Io,NavigationControl:Ia,GeolocateControl:xc,AttributionControl:_i,ScaleControl:pu,FullscreenControl:Cu,Popup:Cs,Marker:Al,Style:oc,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:Wa,clearPrewarmedResources:ze,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(Z){t.config.ACCESS_TOKEN=Z},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(Z){t.config.API_URL=Z},get workerCount(){return Oi.workerCount},set workerCount(Z){Oi.workerCount=Z},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Z){t.config.MAX_PARALLEL_IMAGE_REQUESTS=Z},clearStorage:function(Z){t.clearTileCache(Z)},workerUrl:""};return xl}),P})}),iW=Ft((Q,$)=>{var c=_n(),g=tc().sanitizeHTML,P=hE(),S=Ev();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var s=this.findFollowingMapboxLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var s=n(o);i.addSource(this.idSource,s)}},e.findFollowingMapboxLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function a(o){var i={},s={};switch(o.type){case"circle":c.extendFlat(s,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(s,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(s,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=P(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(s,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:s}}function n(o){var i=o.sourcetype,s=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof s=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=s,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}$.exports=function(o,i,s){var f=new t(o,i);return f.update(s),f}}),aW=Ft((Q,$)=>{var c=fE(),g=_n(),P=W1(),S=Qo(),t=Ls(),e=hp(),r=Qh(),a=x0(),n=a.drawMode,o=a.selectMode,i=yf().prepSelect,s=yf().clearOutline,f=yf().clearSelectionsCache,x=yf().selectOnClick,y=Ev(),v=iW();function T(E,A){this.id=A,this.gd=E;var h=E._fullLayout,p=E._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(E,A,h){var p=this,k=A[p.id];p.map&&k.accesstoken!==p.accessToken&&(p.map.remove(),p.map=null,p.styleObj=null,p.traceHash={},p.layerList=[]);var w;p.map?w=new Promise(function(R,O){p.updateMap(E,A,R,O)}):w=new Promise(function(R,O){p.createMap(E,A,R,O)}),h.push(w)},u.createMap=function(E,A,h,p){var k=this,w=A[k.id],R=k.styleObj=_(w.style,A);k.accessToken=w.accesstoken;var O=w.bounds,N=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:R.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:N,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0}));V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(E,A);var H=[];H.push(new Promise(function(F){V.once("load",F)})),H=H.concat(P.fetchTraceGeoData(E)),Promise.all(H).then(function(){k.fillBelowLookup(E,A),k.updateData(E),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(E,A,h,p){var k=this,w=k.map,R=A[this.id];k.rejectOnError(p);var O=[],N=_(R.style,A);JSON.stringify(k.styleObj)!==JSON.stringify(N)&&(k.styleObj=N,w.setStyle(N.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(P.fetchTraceGeoData(E)),Promise.all(O).then(function(){k.fillBelowLookup(E,A),k.updateData(E),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(E,A){var h=A[this.id],p=h.layers,k,w,R=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(N.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,N.originalEvent)}}},u.updateFx=function(E){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(N){var V=A.map.unproject(N);return[V.lng,V.lat]}var w=E.dragmode,R;R=function(N,V){if(V.isRect){var H=N.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=N.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:E.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:E[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:R},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(N,V,H){i(N,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(E){var A=E[this.id].domain,h=E._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(E){var A=E[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=_n(),g=I1(),P=Ld(),S=E3();$.exports=function(r,a,n){g(r,a,n,{type:"mapbox",attributes:S,handleDefaults:t,partition:"y",accessToken:a._mapboxAccessToken})};function t(r,a,n,o){n("accesstoken",o.accessToken),n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var i=n("bounds.west"),s=n("bounds.east"),f=n("bounds.south"),x=n("bounds.north");(i===void 0||s===void 0||f===void 0||x===void 0)&&delete a.bounds,P(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),s=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;s&&(f="raster");var x=n("type",f);s&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),mT=Ft(Q=>{var $=fE(),c=_n(),g=c.strTranslate,P=c.strScale,S=dd().getSubplotCalcData,t=Bp(),e=En(),r=Vs(),a=tc(),n=aW(),o="mapbox",i=Q.constants=Ev();Q.name=o,Q.attr="subplot",Q.idRoot=o,Q.idRegex=Q.attrRegex=c.counterRegex(o);var s=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Q.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},Q.layoutAttributes=E3(),Q.supplyLayoutDefaults=oW();var f=!0;Q.plot=function(v){f&&(f=!1,c.warn(s));var T=v._fullLayout,u=v.calcdata,b=T._subplots[o];if($.version!==i.requiredVersion)throw new Error(i.wrongVersionErrorMsg);var _=x(v,b);$.accessToken=_;for(var C=0;CH/2){var F=R.split("|").join("
");N.text(F).attr("data-unformatted",F).call(a.convertToTspans,v),V=r.bBox(N.node())}N.attr("transform",g(-3,-V.height+8)),O.insert("rect",".static-attribution").attr({x:-V.width-6,y:-V.height-3,width:V.width+6,height:V.height+3,fill:"rgba(255, 255, 255, 0.75)"});var U=1;V.width+6>H&&(U=H/(V.width+6));var W=[b.l+b.w*M.x[1],b.t+b.h*(1-M.y[0])];O.attr("transform",g(W[0],W[1])+P(U))}};function x(v,T){var u=v._fullLayout,b=v._context;if(b.mapboxAccessToken==="")return"";for(var _=[],C=[],M=!1,E=!1,A=0;A1&&c.warn(i.multipleTokensErrorMsg),_[0]):(C.length&&c.log(["Listed mapbox access token(s)",C.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function y(v){return typeof v=="string"&&(i.styleValuesMapbox.indexOf(v)!==-1||v.indexOf("mapbox://")===0||v.indexOf("stamen")===0)}Q.updateFx=function(v){for(var T=v._fullLayout,u=T._subplots[o],b=0;b{$.exports={attributes:dT(),supplyDefaults:QH(),colorbar:yo(),formatLabels:cE(),calc:$k(),plot:eW(),hoverPoints:pT().hoverPoints,eventData:rW(),selectPoints:nW(),styleOnSelect:function(c,g){if(g){var P=g[0].trace;P._glTrace.update(g)}},moduleType:"trace",name:"scattermapbox",basePlotModule:mT(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}),lW=Ft((Q,$)=>{$.exports=sW()}),dE=Ft((Q,$)=>{var c=yb(),g=Ac(),{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=Yo(),e=ya().extendFlat;$.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:P({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),uW=Ft((Q,$)=>{var c=_n(),g=gc(),P=dE();$.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,P,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var s=a("marker.line.width");s&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),pE=Ft((Q,$)=>{var c=ia(),g=_n(),P=Xc(),S=Vs(),t=H1().makeBlank,e=W1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,s={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:s,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=P.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var C;g.isArrayOrTypedArray(u.width)&&(C=function(k){return k.mlw});for(var M=0;M{var c=pE().convert,g=pE().convertOnSelect,P=Ev().traceLayerPrefix;function S(e,r){this.type="choroplethmapbox",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",P+r+"-fill"],["line",P+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},$.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),s=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,s),r[0].trace._glTrace=n,n}}),hW=Ft((Q,$)=>{$.exports={attributes:dE(),supplyDefaults:uW(),colorbar:z1(),calc:Xk(),plot:cW(),hoverPoints:Qk(),eventData:tT(),selectPoints:eT(),styleOnSelect:function(c,g){if(g){var P=g[0].trace;P._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var P=g.getMapLayers(),S=P.length-2;S>=0;S--){var t=P[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{$.exports=hW()}),mE=Ft((Q,$)=>{var c=Ac(),{hovertemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=Yo(),t=dT(),e=ya().extendFlat;$.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:P(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),dW=Ft((Q,$)=>{var c=_n(),g=gc(),P=mE();$.exports=function(S,t,e,r){function a(s,f){return c.coerce(S,t,P,s,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),pW=Ft((Q,$)=>{var c=ia(),g=_n().isArrayOrTypedArray,P=Ua().BADNUM,S=ep(),t=_n()._;$.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,s=0;s{var c=ia(),g=_n(),P=ui(),S=Xc(),t=Ua().BADNUM,e=H1().makeBlank;$.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var s=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),s.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),E=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=E[0][1],h=P.opacity(A)<1?A:P.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=mW(),g=Ev().traceLayerPrefix;function P(t,e){this.type="densitymapbox",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=P.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},$.exports=function(t,e){var r=e[0].trace,a=new P(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),vW=Ft((Q,$)=>{var c=Ls(),g=pT().hoverPoints,P=pT().getExtraText;$.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var s=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(s,s.c2l(i.z),"hover").text}return a.extraText=P(o,i,n[0].t.labels),[a]}}}),yW=Ft((Q,$)=>{$.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),xW=Ft((Q,$)=>{$.exports={attributes:mE(),supplyDefaults:dW(),colorbar:z1(),formatLabels:cE(),calc:pW(),plot:gW(),hoverPoints:vW(),eventData:yW(),getBelow:function(c,g){for(var P=g.getMapLayers(),S=0;S{$.exports=xW()}),bW=Ft((Q,$)=>{$.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} +`}),{fragmentSource:$,vertexSource:ot,staticAttributes:xt,staticUniforms:ye}}var bf=Object.freeze({__proto__:null,prelude:Ou,background:jc,backgroundPattern:Wh,circle:hu,clippingMask:Ch,heatmap:Mc,heatmapTexture:Uc,collisionBox:bu,collisionCircle:uf,debug:vh,fill:qh,fillOutline:Cf,fillOutlinePattern:Ld,fillPattern:Jd,fillExtrusion:cf,fillExtrusionPattern:Lf,hillshadePrepare:wc,hillshade:hf,line:Qc,lineGradient:ff,linePattern:Pf,lineSDF:yh,raster:wu,symbolIcon:Lh,symbolSDF:Vc,symbolTextAndIcon:fd}),$h=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};$h.prototype.bind=function($,ot,et,xt,Vt,de,ye,Yt){this.context=$;for(var ce=this.boundPaintVertexBuffers.length!==xt.length,Se=0;!ce&&Se>16,Yt>>16],u_pixel_coord_lower:[ye&65535,Yt&65535]}}function wf($,ot,et,xt){var Vt=et.imageManager.getPattern($.from.toString()),de=et.imageManager.getPattern($.to.toString()),ye=et.imageManager.getPixelSize(),Yt=ye.width,ce=ye.height,Se=Math.pow(2,xt.tileID.overscaledZ),ir=xt.tileSize*Math.pow(2,et.transform.tileZoom)/Se,Ye=ir*(xt.tileID.canonical.x+xt.tileID.wrap*Se),tr=ir*xt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Vt.tl,u_pattern_br_a:Vt.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[Yt,ce],u_mix:ot.t,u_pattern_size_a:Vt.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:ot.fromScale,u_scale_b:ot.toScale,u_tile_units_to_pixels:1/Qs(xt,1,et.transform.tileZoom),u_pixel_coord_upper:[Ye>>16,tr>>16],u_pixel_coord_lower:[Ye&65535,tr&65535]}}var Pd=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_lightpos:new t.Uniform3f($,ot.u_lightpos),u_lightintensity:new t.Uniform1f($,ot.u_lightintensity),u_lightcolor:new t.Uniform3f($,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f($,ot.u_vertical_gradient),u_opacity:new t.Uniform1f($,ot.u_opacity)}},gc=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_lightpos:new t.Uniform3f($,ot.u_lightpos),u_lightintensity:new t.Uniform1f($,ot.u_lightintensity),u_lightcolor:new t.Uniform3f($,ot.u_lightcolor),u_vertical_gradient:new t.Uniform1f($,ot.u_vertical_gradient),u_height_factor:new t.Uniform1f($,ot.u_height_factor),u_image:new t.Uniform1i($,ot.u_image),u_texsize:new t.Uniform2f($,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade),u_opacity:new t.Uniform1f($,ot.u_opacity)}},Jf=function($,ot,et,xt){var Vt=ot.style.light,de=Vt.properties.get("position"),ye=[de.x,de.y,de.z],Yt=t.create$1();Vt.properties.get("anchor")==="viewport"&&t.fromRotation(Yt,-ot.transform.angle),t.transformMat3(ye,ye,Yt);var ce=Vt.properties.get("color");return{u_matrix:$,u_lightpos:ye,u_lightintensity:Vt.properties.get("intensity"),u_lightcolor:[ce.r,ce.g,ce.b],u_vertical_gradient:+et,u_opacity:xt}},eh=function($,ot,et,xt,Vt,de,ye){return t.extend(Jf($,ot,et,xt),Zh(de,ot,ye),{u_height_factor:-Math.pow(2,Vt.overscaledZ)/ye.tileSize/8})},Ph=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},xh=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_image:new t.Uniform1i($,ot.u_image),u_texsize:new t.Uniform2f($,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade)}},Bu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_world:new t.Uniform2f($,ot.u_world)}},iu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_world:new t.Uniform2f($,ot.u_world),u_image:new t.Uniform1i($,ot.u_image),u_texsize:new t.Uniform2f($,ot.u_texsize),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade)}},_h=function($){return{u_matrix:$}},df=function($,ot,et,xt){return t.extend(_h($),Zh(et,ot,xt))},bh=function($,ot){return{u_matrix:$,u_world:ot}},Wf=function($,ot,et,xt,Vt){return t.extend(df($,ot,et,xt),{u_world:Vt})},gr=function($,ot){return{u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i($,ot.u_scale_with_map),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_extrude_scale:new t.Uniform2f($,ot.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},Ur=function($,ot,et,xt){var Vt=$.transform,de,ye;if(xt.paint.get("circle-pitch-alignment")==="map"){var Yt=Qs(et,1,Vt.zoom);de=!0,ye=[Yt,Yt]}else de=!1,ye=Vt.pixelsToGLUnits;return{u_camera_to_center_distance:Vt.cameraToCenterDistance,u_scale_with_map:+(xt.paint.get("circle-pitch-scale")==="map"),u_matrix:$.translatePosMatrix(ot.posMatrix,et,xt.paint.get("circle-translate"),xt.paint.get("circle-translate-anchor")),u_pitch_with_map:+de,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:ye}},wn=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f($,ot.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f($,ot.u_extrude_scale),u_overscale_factor:new t.Uniform1f($,ot.u_overscale_factor)}},hn=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_inv_matrix:new t.UniformMatrix4f($,ot.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f($,ot.u_viewport_size)}},qn=function($,ot,et){var xt=Qs(et,1,ot.zoom),Vt=Math.pow(2,ot.zoom-et.tileID.overscaledZ),de=et.tileID.overscaleFactor();return{u_matrix:$,u_camera_to_center_distance:ot.cameraToCenterDistance,u_pixels_to_tile_units:xt,u_extrude_scale:[ot.pixelsToGLUnits[0]/(xt*Vt),ot.pixelsToGLUnits[1]/(xt*Vt)],u_overscale_factor:de}},di=function($,ot,et){return{u_matrix:$,u_inv_matrix:ot,u_camera_to_center_distance:et.cameraToCenterDistance,u_viewport_size:[et.width,et.height]}},aa=function($,ot){return{u_color:new t.UniformColor($,ot.u_color),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_overlay:new t.Uniform1i($,ot.u_overlay),u_overlay_scale:new t.Uniform1f($,ot.u_overlay_scale)}},va=function($,ot,et){return et===void 0&&(et=1),{u_matrix:$,u_color:ot,u_overlay:0,u_overlay_scale:et}},Ba=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},Za=function($){return{u_matrix:$}},ca=function($,ot){return{u_extrude_scale:new t.Uniform1f($,ot.u_extrude_scale),u_intensity:new t.Uniform1f($,ot.u_intensity),u_matrix:new t.UniformMatrix4f($,ot.u_matrix)}},Oa=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_world:new t.Uniform2f($,ot.u_world),u_image:new t.Uniform1i($,ot.u_image),u_color_ramp:new t.Uniform1i($,ot.u_color_ramp),u_opacity:new t.Uniform1f($,ot.u_opacity)}},ka=function($,ot,et,xt){return{u_matrix:$,u_extrude_scale:Qs(ot,1,et),u_intensity:xt}},na=function($,ot,et,xt){var Vt=t.create();t.ortho(Vt,0,$.width,$.height,0,0,1);var de=$.context.gl;return{u_matrix:Vt,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:et,u_color_ramp:xt,u_opacity:ot.paint.get("heatmap-opacity")}},io=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_image:new t.Uniform1i($,ot.u_image),u_latrange:new t.Uniform2f($,ot.u_latrange),u_light:new t.Uniform2f($,ot.u_light),u_shadow:new t.UniformColor($,ot.u_shadow),u_highlight:new t.UniformColor($,ot.u_highlight),u_accent:new t.UniformColor($,ot.u_accent)}},ns=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_image:new t.Uniform1i($,ot.u_image),u_dimension:new t.Uniform2f($,ot.u_dimension),u_zoom:new t.Uniform1f($,ot.u_zoom),u_unpack:new t.Uniform4f($,ot.u_unpack)}},Ko=function($,ot,et){var xt=et.paint.get("hillshade-shadow-color"),Vt=et.paint.get("hillshade-highlight-color"),de=et.paint.get("hillshade-accent-color"),ye=et.paint.get("hillshade-illumination-direction")*(Math.PI/180);et.paint.get("hillshade-illumination-anchor")==="viewport"&&(ye-=$.transform.angle);var Yt=!$.options.moving;return{u_matrix:$.transform.calculatePosMatrix(ot.tileID.toUnwrapped(),Yt),u_image:0,u_latrange:ps($,ot.tileID),u_light:[et.paint.get("hillshade-exaggeration"),ye],u_shadow:xt,u_highlight:Vt,u_accent:de}},ls=function($,ot){var et=ot.stride,xt=t.create();return t.ortho(xt,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(xt,xt,[0,-t.EXTENT,0]),{u_matrix:xt,u_image:1,u_dimension:[et,et],u_zoom:$.overscaledZ,u_unpack:ot.getUnpackVector()}};function ps($,ot){var et=Math.pow(2,ot.canonical.z),xt=ot.canonical.y;return[new t.MercatorCoordinate(0,xt/et).toLngLat().lat,new t.MercatorCoordinate(0,(xt+1)/et).toLngLat().lat]}var oo=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels)}},qa=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels),u_image:new t.Uniform1i($,ot.u_image),u_image_height:new t.Uniform1f($,ot.u_image_height)}},gs=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_texsize:new t.Uniform2f($,ot.u_texsize),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_image:new t.Uniform1i($,ot.u_image),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels),u_scale:new t.Uniform3f($,ot.u_scale),u_fade:new t.Uniform1f($,ot.u_fade)}},el=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_ratio:new t.Uniform1f($,ot.u_ratio),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f($,ot.u_units_to_pixels),u_patternscale_a:new t.Uniform2f($,ot.u_patternscale_a),u_patternscale_b:new t.Uniform2f($,ot.u_patternscale_b),u_sdfgamma:new t.Uniform1f($,ot.u_sdfgamma),u_image:new t.Uniform1i($,ot.u_image),u_tex_y_a:new t.Uniform1f($,ot.u_tex_y_a),u_tex_y_b:new t.Uniform1f($,ot.u_tex_y_b),u_mix:new t.Uniform1f($,ot.u_mix)}},Pl=function($,ot,et){var xt=$.transform;return{u_matrix:qu($,ot,et),u_ratio:1/Qs(ot,1,xt.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/xt.pixelsToGLUnits[0],1/xt.pixelsToGLUnits[1]]}},su=function($,ot,et,xt){return t.extend(Pl($,ot,et),{u_image:0,u_image_height:xt})},$l=function($,ot,et,xt){var Vt=$.transform,de=ml(ot,Vt);return{u_matrix:qu($,ot,et),u_texsize:ot.imageAtlasTexture.size,u_ratio:1/Qs(ot,1,Vt.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[de,xt.fromScale,xt.toScale],u_fade:xt.t,u_units_to_pixels:[1/Vt.pixelsToGLUnits[0],1/Vt.pixelsToGLUnits[1]]}},lu=function($,ot,et,xt,Vt){var de=$.transform,ye=$.lineAtlas,Yt=ml(ot,de),ce=et.layout.get("line-cap")==="round",Se=ye.getDash(xt.from,ce),ir=ye.getDash(xt.to,ce),Ye=Se.width*Vt.fromScale,tr=ir.width*Vt.toScale;return t.extend(Pl($,ot,et),{u_patternscale_a:[Yt/Ye,-Se.height/2],u_patternscale_b:[Yt/tr,-ir.height/2],u_sdfgamma:ye.width/(Math.min(Ye,tr)*256*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Se.y,u_tex_y_b:ir.y,u_mix:Vt.t})};function ml($,ot){return 1/Qs($,1,ot.tileZoom)}function qu($,ot,et){return $.translatePosMatrix(ot.tileID.posMatrix,ot,et.paint.get("line-translate"),et.paint.get("line-translate-anchor"))}var Iu=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_tl_parent:new t.Uniform2f($,ot.u_tl_parent),u_scale_parent:new t.Uniform1f($,ot.u_scale_parent),u_buffer_scale:new t.Uniform1f($,ot.u_buffer_scale),u_fade_t:new t.Uniform1f($,ot.u_fade_t),u_opacity:new t.Uniform1f($,ot.u_opacity),u_image0:new t.Uniform1i($,ot.u_image0),u_image1:new t.Uniform1i($,ot.u_image1),u_brightness_low:new t.Uniform1f($,ot.u_brightness_low),u_brightness_high:new t.Uniform1f($,ot.u_brightness_high),u_saturation_factor:new t.Uniform1f($,ot.u_saturation_factor),u_contrast_factor:new t.Uniform1f($,ot.u_contrast_factor),u_spin_weights:new t.Uniform3f($,ot.u_spin_weights)}},fu=function($,ot,et,xt,Vt){return{u_matrix:$,u_tl_parent:ot,u_scale_parent:et,u_buffer_scale:1,u_fade_t:xt.mix,u_opacity:xt.opacity*Vt.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Vt.paint.get("raster-brightness-min"),u_brightness_high:Vt.paint.get("raster-brightness-max"),u_saturation_factor:Kl(Vt.paint.get("raster-saturation")),u_contrast_factor:Es(Vt.paint.get("raster-contrast")),u_spin_weights:Oo(Vt.paint.get("raster-hue-rotate"))}};function Oo($){$*=Math.PI/180;var ot=Math.sin($),et=Math.cos($);return[(2*et+1)/3,(-Math.sqrt(3)*ot-et+1)/3,(Math.sqrt(3)*ot-et+1)/3]}function Es($){return $>0?1/(1-$):1+$}function Kl($){return $>0?1-1/(1.001-$):-$}var Rl=function($,ot){return{u_is_size_zoom_constant:new t.Uniform1i($,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i($,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f($,ot.u_size_t),u_size:new t.Uniform1f($,ot.u_size),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f($,ot.u_pitch),u_rotate_symbol:new t.Uniform1i($,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f($,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f($,ot.u_fade_change),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f($,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f($,ot.u_coord_matrix),u_is_text:new t.Uniform1i($,ot.u_is_text),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_texsize:new t.Uniform2f($,ot.u_texsize),u_texture:new t.Uniform1i($,ot.u_texture)}},vc=function($,ot){return{u_is_size_zoom_constant:new t.Uniform1i($,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i($,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f($,ot.u_size_t),u_size:new t.Uniform1f($,ot.u_size),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f($,ot.u_pitch),u_rotate_symbol:new t.Uniform1i($,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f($,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f($,ot.u_fade_change),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f($,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f($,ot.u_coord_matrix),u_is_text:new t.Uniform1i($,ot.u_is_text),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_texsize:new t.Uniform2f($,ot.u_texsize),u_texture:new t.Uniform1i($,ot.u_texture),u_gamma_scale:new t.Uniform1f($,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i($,ot.u_is_halo)}},Hc=function($,ot){return{u_is_size_zoom_constant:new t.Uniform1i($,ot.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i($,ot.u_is_size_feature_constant),u_size_t:new t.Uniform1f($,ot.u_size_t),u_size:new t.Uniform1f($,ot.u_size),u_camera_to_center_distance:new t.Uniform1f($,ot.u_camera_to_center_distance),u_pitch:new t.Uniform1f($,ot.u_pitch),u_rotate_symbol:new t.Uniform1i($,ot.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f($,ot.u_aspect_ratio),u_fade_change:new t.Uniform1f($,ot.u_fade_change),u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f($,ot.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f($,ot.u_coord_matrix),u_is_text:new t.Uniform1i($,ot.u_is_text),u_pitch_with_map:new t.Uniform1i($,ot.u_pitch_with_map),u_texsize:new t.Uniform2f($,ot.u_texsize),u_texsize_icon:new t.Uniform2f($,ot.u_texsize_icon),u_texture:new t.Uniform1i($,ot.u_texture),u_texture_icon:new t.Uniform1i($,ot.u_texture_icon),u_gamma_scale:new t.Uniform1f($,ot.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f($,ot.u_device_pixel_ratio),u_is_halo:new t.Uniform1i($,ot.u_is_halo)}},Lc=function($,ot,et,xt,Vt,de,ye,Yt,ce,Se){var ir=Vt.transform;return{u_is_size_zoom_constant:+($==="constant"||$==="source"),u_is_size_feature_constant:+($==="constant"||$==="camera"),u_size_t:ot?ot.uSizeT:0,u_size:ot?ot.uSize:0,u_camera_to_center_distance:ir.cameraToCenterDistance,u_pitch:ir.pitch/360*2*Math.PI,u_rotate_symbol:+et,u_aspect_ratio:ir.width/ir.height,u_fade_change:Vt.options.fadeDuration?Vt.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ye,u_coord_matrix:Yt,u_is_text:+ce,u_pitch_with_map:+xt,u_texsize:Se,u_texture:0}},Ih=function($,ot,et,xt,Vt,de,ye,Yt,ce,Se,ir){var Ye=Vt.transform;return t.extend(Lc($,ot,et,xt,Vt,de,ye,Yt,ce,Se),{u_gamma_scale:xt?Math.cos(Ye._pitch)*Ye.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:1})},Wc=function($,ot,et,xt,Vt,de,ye,Yt,ce,Se){return t.extend(Ih($,ot,et,xt,Vt,de,ye,Yt,!0,ce),{u_texsize_icon:Se,u_texture_icon:1})},zh=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_opacity:new t.Uniform1f($,ot.u_opacity),u_color:new t.UniformColor($,ot.u_color)}},Du=function($,ot){return{u_matrix:new t.UniformMatrix4f($,ot.u_matrix),u_opacity:new t.Uniform1f($,ot.u_opacity),u_image:new t.Uniform1i($,ot.u_image),u_pattern_tl_a:new t.Uniform2f($,ot.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f($,ot.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f($,ot.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f($,ot.u_pattern_br_b),u_texsize:new t.Uniform2f($,ot.u_texsize),u_mix:new t.Uniform1f($,ot.u_mix),u_pattern_size_a:new t.Uniform2f($,ot.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f($,ot.u_pattern_size_b),u_scale_a:new t.Uniform1f($,ot.u_scale_a),u_scale_b:new t.Uniform1f($,ot.u_scale_b),u_pixel_coord_upper:new t.Uniform2f($,ot.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f($,ot.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f($,ot.u_tile_units_to_pixels)}},Oh=function($,ot,et){return{u_matrix:$,u_opacity:ot,u_color:et}},rs=function($,ot,et,xt,Vt,de){return t.extend(wf(xt,de,et,Vt),{u_matrix:$,u_opacity:ot})},zs={fillExtrusion:Pd,fillExtrusionPattern:gc,fill:Ph,fillPattern:xh,fillOutline:Bu,fillOutlinePattern:iu,circle:gr,collisionBox:wn,collisionCircle:hn,debug:aa,clippingMask:Ba,heatmap:ca,heatmapTexture:Oa,hillshade:io,hillshadePrepare:ns,line:oo,lineGradient:qa,linePattern:gs,lineSDF:el,raster:Iu,symbolIcon:Rl,symbolSDF:vc,symbolTextAndIcon:Hc,background:zh,backgroundPattern:Du},qc;function $u($,ot,et,xt,Vt,de,ye){for(var Yt=$.context,ce=Yt.gl,Se=$.useProgram("collisionBox"),ir=[],Ye=0,tr=0,lr=0;lr0){var dn=t.create(),pi=Ze;t.mul(dn,Xe.placementInvProjMatrix,$.transform.glCoordMatrix),t.mul(dn,dn,Xe.placementViewportMatrix),ir.push({circleArray:sn,circleOffset:tr,transform:pi,invTransform:dn}),Ye+=sn.length/4,tr=Ye}Pr&&Se.draw(Yt,ce.LINES,Xn.disabled,$n.disabled,$.colorModeForRenderPass(),tn.disabled,qn(Ze,$.transform,Ve),et.id,Pr.layoutVertexBuffer,Pr.indexBuffer,Pr.segments,null,$.transform.zoom,null,null,Pr.collisionVertexBuffer)}}if(!(!ye||!ir.length)){var ui=$.useProgram("collisionCircle"),Yn=new t.StructArrayLayout2f1f2i16;Yn.resize(Ye*4),Yn._trim();for(var Ci=0,mi=0,ea=ir;mi=0&&(hr[Xe.associatedIconIndex]={shiftedAnchor:la,angle:to})}}if(ir){lr.clear();for(var qo=$.icon.placedSymbolArray,xs=0;xs0){var ye=t.browser.now(),Yt=(ye-$.timeAdded)/de,ce=ot?(ye-ot.timeAdded)/de:-1,Se=et.getSource(),ir=Vt.coveringZoomLevel({tileSize:Se.tileSize,roundZoom:Se.roundZoom}),Ye=!ot||Math.abs(ot.tileID.overscaledZ-ir)>Math.abs($.tileID.overscaledZ-ir),tr=Ye&&$.refreshedUponExpiration?1:t.clamp(Ye?Yt:1-ce,0,1);return $.refreshedUponExpiration&&Yt>=1&&($.refreshedUponExpiration=!1),ot?{opacity:1,mix:1-tr}:{opacity:tr,mix:0}}else return{opacity:1,mix:0}}function Nr($,ot,et){var xt=et.paint.get("background-color"),Vt=et.paint.get("background-opacity");if(Vt!==0){var de=$.context,ye=de.gl,Yt=$.transform,ce=Yt.tileSize,Se=et.paint.get("background-pattern");if(!$.isPatternMissing(Se)){var ir=!Se&&xt.a===1&&Vt===1&&$.opaquePassEnabledForLayer()?"opaque":"translucent";if($.renderPass===ir){var Ye=$n.disabled,tr=$.depthModeForSublayer(0,ir==="opaque"?Xn.ReadWrite:Xn.ReadOnly),lr=$.colorModeForRenderPass(),hr=$.useProgram(Se?"backgroundPattern":"background"),Ve=Yt.coveringTiles({tileSize:ce});Se&&(de.activeTexture.set(ye.TEXTURE0),$.imageManager.bind($.context));for(var Xe=et.getCrossfadeParameters(),Ze=0,Pr=Ve;Ze "+et.overscaledZ);var Ze=Xe+" "+lr+"kb";ds($,Ze),ye.draw(xt,Vt.TRIANGLES,Yt,ce,nr.alphaBlended,tn.disabled,va(de,t.Color.transparent,Ve),ir,$.debugBuffer,$.quadTriangleIndexBuffer,$.debugSegments)}function ds($,ot){$.initDebugOverlayCanvas();var et=$.debugOverlayCanvas,xt=$.context.gl,Vt=$.debugOverlayCanvas.getContext("2d");Vt.clearRect(0,0,et.width,et.height),Vt.shadowColor="white",Vt.shadowBlur=2,Vt.lineWidth=1.5,Vt.strokeStyle="white",Vt.textBaseline="top",Vt.font="bold 36px Open Sans, sans-serif",Vt.fillText(ot,5,5),Vt.strokeText(ot,5,5),$.debugOverlayTexture.update(et),$.debugOverlayTexture.bind(xt.LINEAR,xt.CLAMP_TO_EDGE)}function fl($,ot,et){var xt=$.context,Vt=et.implementation;if($.renderPass==="offscreen"){var de=Vt.prerender;de&&($.setCustomLayerDefaults(),xt.setColorMode($.colorModeForRenderPass()),de.call(Vt,xt.gl,$.transform.customLayerMatrix()),xt.setDirty(),$.setBaseState())}else if($.renderPass==="translucent"){$.setCustomLayerDefaults(),xt.setColorMode($.colorModeForRenderPass()),xt.setStencilMode($n.disabled);var ye=Vt.renderingMode==="3d"?new Xn($.context.gl.LEQUAL,Xn.ReadWrite,$.depthRangeFor3D):$.depthModeForSublayer(0,Xn.ReadOnly);xt.setDepthMode(ye),Vt.render(xt.gl,$.transform.customLayerMatrix()),xt.setDirty(),$.setBaseState(),xt.bindFramebuffer.set(null)}}var vl={symbol:z,circle:Ke,heatmap:vr,line:Sn,fill:Xt,"fill-extrusion":xe,hillshade:je,raster:wr,background:Nr,debug:Bo,custom:fl},Ds=function($,ot){this.context=new Cn($),this.transform=ot,this._tileTextures={},this.setup(),this.numSublayers=Tn.maxUnderzooming+Tn.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Gu,this.gpuTimers={}};Ds.prototype.resize=function($,ot){if(this.width=$*t.browser.devicePixelRatio,this.height=ot*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var et=0,xt=this.style._order;et256&&this.clearStencil(),et.setColorMode(nr.disabled),et.setDepthMode(Xn.disabled);var Vt=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var de=0,ye=ot;de256&&this.clearStencil();var $=this.nextStencilID++,ot=this.context.gl;return new $n({func:ot.NOTEQUAL,mask:255},$,255,ot.KEEP,ot.KEEP,ot.REPLACE)},Ds.prototype.stencilModeForClipping=function($){var ot=this.context.gl;return new $n({func:ot.EQUAL,mask:255},this._tileClippingMaskIDs[$.key],0,ot.KEEP,ot.KEEP,ot.REPLACE)},Ds.prototype.stencilConfigForOverlap=function($){var ot,et=this.context.gl,xt=$.sort(function(ce,Se){return Se.overscaledZ-ce.overscaledZ}),Vt=xt[xt.length-1].overscaledZ,de=xt[0].overscaledZ-Vt+1;if(de>1){this.currentStencilSource=void 0,this.nextStencilID+de>256&&this.clearStencil();for(var ye={},Yt=0;Yt=0;this.currentLayer--){var sn=this.style._layers[xt[this.currentLayer]],dn=Vt[sn.source],pi=Yt[sn.source];this._renderTileClippingMasks(sn,pi),this.renderLayer(this,dn,sn,pi)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?ot.pop():null},Ds.prototype.isPatternMissing=function($){if(!$)return!1;if(!$.from||!$.to)return!0;var ot=this.imageManager.getPattern($.from.toString()),et=this.imageManager.getPattern($.to.toString());return!ot||!et},Ds.prototype.useProgram=function($,ot){this.cache=this.cache||{};var et=""+$+(ot?ot.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[et]||(this.cache[et]=new nf(this.context,$,bf[$],ot,zs[$],this._showOverdrawInspector)),this.cache[et]},Ds.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Ds.prototype.setBaseState=function(){var $=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set($.FUNC_ADD)},Ds.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var $=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,$.RGBA)}},Ds.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wl=function($,ot){this.points=$,this.planes=ot};wl.fromInvProjectionMatrix=function($,ot,et){var xt=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],Vt=Math.pow(2,et),de=xt.map(function(ce){return t.transformMat4([],ce,$)}).map(function(ce){return t.scale$1([],ce,1/ce[3]/ot*Vt)}),ye=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Yt=ye.map(function(ce){var Se=t.sub([],de[ce[0]],de[ce[1]]),ir=t.sub([],de[ce[2]],de[ce[1]]),Ye=t.normalize([],t.cross([],Se,ir)),tr=-t.dot(Ye,de[ce[1]]);return Ye.concat(tr)});return new wl(de,Yt)};var Eu=function($,ot){this.min=$,this.max=ot,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Eu.prototype.quadrant=function($){for(var ot=[$%2===0,$<2],et=t.clone$2(this.min),xt=t.clone$2(this.max),Vt=0;Vt=0;if(de===0)return 0;de!==ot.length&&(et=!1)}if(et)return 2;for(var Yt=0;Yt<3;Yt++){for(var ce=Number.MAX_VALUE,Se=-Number.MAX_VALUE,ir=0;ir<$.points.length;ir++){var Ye=$.points[ir][Yt]-this.min[Yt];ce=Math.min(ce,Ye),Se=Math.max(Se,Ye)}if(Se<0||ce>this.max[Yt]-this.min[Yt])return 0}return 1};var gu=function($,ot,et,xt){if($===void 0&&($=0),ot===void 0&&(ot=0),et===void 0&&(et=0),xt===void 0&&(xt=0),isNaN($)||$<0||isNaN(ot)||ot<0||isNaN(et)||et<0||isNaN(xt)||xt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=$,this.bottom=ot,this.left=et,this.right=xt};gu.prototype.interpolate=function($,ot,et){return ot.top!=null&&$.top!=null&&(this.top=t.number($.top,ot.top,et)),ot.bottom!=null&&$.bottom!=null&&(this.bottom=t.number($.bottom,ot.bottom,et)),ot.left!=null&&$.left!=null&&(this.left=t.number($.left,ot.left,et)),ot.right!=null&&$.right!=null&&(this.right=t.number($.right,ot.right,et)),this},gu.prototype.getCenter=function($,ot){var et=t.clamp((this.left+$-this.right)/2,0,$),xt=t.clamp((this.top+ot-this.bottom)/2,0,ot);return new t.Point(et,xt)},gu.prototype.equals=function($){return this.top===$.top&&this.bottom===$.bottom&&this.left===$.left&&this.right===$.right},gu.prototype.clone=function(){return new gu(this.top,this.bottom,this.left,this.right)},gu.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var $s=function($,ot,et,xt,Vt){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Vt===void 0?!0:Vt,this._minZoom=$||0,this._maxZoom=ot||22,this._minPitch=et??0,this._maxPitch=xt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new gu,this._posMatrixCache={},this._alignedPosMatrixCache={}},Zs={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};$s.prototype.clone=function(){var $=new $s(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return $.tileSize=this.tileSize,$.latRange=this.latRange,$.width=this.width,$.height=this.height,$._center=this._center,$.zoom=this.zoom,$.angle=this.angle,$._fov=this._fov,$._pitch=this._pitch,$._unmodified=this._unmodified,$._edgeInsets=this._edgeInsets.clone(),$._calcMatrices(),$},Zs.minZoom.get=function(){return this._minZoom},Zs.minZoom.set=function($){this._minZoom!==$&&(this._minZoom=$,this.zoom=Math.max(this.zoom,$))},Zs.maxZoom.get=function(){return this._maxZoom},Zs.maxZoom.set=function($){this._maxZoom!==$&&(this._maxZoom=$,this.zoom=Math.min(this.zoom,$))},Zs.minPitch.get=function(){return this._minPitch},Zs.minPitch.set=function($){this._minPitch!==$&&(this._minPitch=$,this.pitch=Math.max(this.pitch,$))},Zs.maxPitch.get=function(){return this._maxPitch},Zs.maxPitch.set=function($){this._maxPitch!==$&&(this._maxPitch=$,this.pitch=Math.min(this.pitch,$))},Zs.renderWorldCopies.get=function(){return this._renderWorldCopies},Zs.renderWorldCopies.set=function($){$===void 0?$=!0:$===null&&($=!1),this._renderWorldCopies=$},Zs.worldSize.get=function(){return this.tileSize*this.scale},Zs.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Zs.size.get=function(){return new t.Point(this.width,this.height)},Zs.bearing.get=function(){return-this.angle/Math.PI*180},Zs.bearing.set=function($){var ot=-t.wrap($,-180,180)*Math.PI/180;this.angle!==ot&&(this._unmodified=!1,this.angle=ot,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Zs.pitch.get=function(){return this._pitch/Math.PI*180},Zs.pitch.set=function($){var ot=t.clamp($,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ot&&(this._unmodified=!1,this._pitch=ot,this._calcMatrices())},Zs.fov.get=function(){return this._fov/Math.PI*180},Zs.fov.set=function($){$=Math.max(.01,Math.min(60,$)),this._fov!==$&&(this._unmodified=!1,this._fov=$/180*Math.PI,this._calcMatrices())},Zs.zoom.get=function(){return this._zoom},Zs.zoom.set=function($){var ot=Math.min(Math.max($,this.minZoom),this.maxZoom);this._zoom!==ot&&(this._unmodified=!1,this._zoom=ot,this.scale=this.zoomScale(ot),this.tileZoom=Math.floor(ot),this.zoomFraction=ot-this.tileZoom,this._constrain(),this._calcMatrices())},Zs.center.get=function(){return this._center},Zs.center.set=function($){$.lat===this._center.lat&&$.lng===this._center.lng||(this._unmodified=!1,this._center=$,this._constrain(),this._calcMatrices())},Zs.padding.get=function(){return this._edgeInsets.toJSON()},Zs.padding.set=function($){this._edgeInsets.equals($)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,$,1),this._calcMatrices())},Zs.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},$s.prototype.isPaddingEqual=function($){return this._edgeInsets.equals($)},$s.prototype.interpolatePadding=function($,ot,et){this._unmodified=!1,this._edgeInsets.interpolate($,ot,et),this._constrain(),this._calcMatrices()},$s.prototype.coveringZoomLevel=function($){var ot=($.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/$.tileSize));return Math.max(0,ot)},$s.prototype.getVisibleUnwrappedCoordinates=function($){var ot=[new t.UnwrappedTileID(0,$)];if(this._renderWorldCopies)for(var et=this.pointCoordinate(new t.Point(0,0)),xt=this.pointCoordinate(new t.Point(this.width,0)),Vt=this.pointCoordinate(new t.Point(this.width,this.height)),de=this.pointCoordinate(new t.Point(0,this.height)),ye=Math.floor(Math.min(et.x,xt.x,Vt.x,de.x)),Yt=Math.floor(Math.max(et.x,xt.x,Vt.x,de.x)),ce=1,Se=ye-ce;Se<=Yt+ce;Se++)Se!==0&&ot.push(new t.UnwrappedTileID(Se,$));return ot},$s.prototype.coveringTiles=function($){var ot=this.coveringZoomLevel($),et=ot;if($.minzoom!==void 0&&ot<$.minzoom)return[];$.maxzoom!==void 0&&ot>$.maxzoom&&(ot=$.maxzoom);var xt=t.MercatorCoordinate.fromLngLat(this.center),Vt=Math.pow(2,ot),de=[Vt*xt.x,Vt*xt.y,0],ye=wl.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ot),Yt=$.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Yt=ot);var ce=3,Se=function(Ei){return{aabb:new Eu([Ei*Vt,0,0],[(Ei+1)*Vt,Vt,0]),zoom:0,x:0,y:0,wrap:Ei,fullyVisible:!1}},ir=[],Ye=[],tr=ot,lr=$.reparseOverscaled?et:ot;if(this._renderWorldCopies)for(var hr=1;hr<=3;hr++)ir.push(Se(-hr)),ir.push(Se(hr));for(ir.push(Se(0));ir.length>0;){var Ve=ir.pop(),Xe=Ve.x,Ze=Ve.y,Pr=Ve.fullyVisible;if(!Pr){var sn=Ve.aabb.intersects(ye);if(sn===0)continue;Pr=sn===2}var dn=Ve.aabb.distanceX(de),pi=Ve.aabb.distanceY(de),ui=Math.max(Math.abs(dn),Math.abs(pi)),Yn=ce+(1<Yn&&Ve.zoom>=Yt){Ye.push({tileID:new t.OverscaledTileID(Ve.zoom===tr?lr:Ve.zoom,Ve.wrap,Ve.zoom,Xe,Ze),distanceSq:t.sqrLen([de[0]-.5-Xe,de[1]-.5-Ze])});continue}for(var Ci=0;Ci<4;Ci++){var mi=(Xe<<1)+Ci%2,ea=(Ze<<1)+(Ci>>1);ir.push({aabb:Ve.aabb.quadrant(Ci),zoom:Ve.zoom+1,x:mi,y:ea,wrap:Ve.wrap,fullyVisible:Pr})}}return Ye.sort(function(Ei,Li){return Ei.distanceSq-Li.distanceSq}).map(function(Ei){return Ei.tileID})},$s.prototype.resize=function($,ot){this.width=$,this.height=ot,this.pixelsToGLUnits=[2/$,-2/ot],this._constrain(),this._calcMatrices()},Zs.unmodified.get=function(){return this._unmodified},$s.prototype.zoomScale=function($){return Math.pow(2,$)},$s.prototype.scaleZoom=function($){return Math.log($)/Math.LN2},$s.prototype.project=function($){var ot=t.clamp($.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng($.lng)*this.worldSize,t.mercatorYfromLat(ot)*this.worldSize)},$s.prototype.unproject=function($){return new t.MercatorCoordinate($.x/this.worldSize,$.y/this.worldSize).toLngLat()},Zs.point.get=function(){return this.project(this.center)},$s.prototype.setLocationAtPoint=function($,ot){var et=this.pointCoordinate(ot),xt=this.pointCoordinate(this.centerPoint),Vt=this.locationCoordinate($),de=new t.MercatorCoordinate(Vt.x-(et.x-xt.x),Vt.y-(et.y-xt.y));this.center=this.coordinateLocation(de),this._renderWorldCopies&&(this.center=this.center.wrap())},$s.prototype.locationPoint=function($){return this.coordinatePoint(this.locationCoordinate($))},$s.prototype.pointLocation=function($){return this.coordinateLocation(this.pointCoordinate($))},$s.prototype.locationCoordinate=function($){return t.MercatorCoordinate.fromLngLat($)},$s.prototype.coordinateLocation=function($){return $.toLngLat()},$s.prototype.pointCoordinate=function($){var ot=0,et=[$.x,$.y,0,1],xt=[$.x,$.y,1,1];t.transformMat4(et,et,this.pixelMatrixInverse),t.transformMat4(xt,xt,this.pixelMatrixInverse);var Vt=et[3],de=xt[3],ye=et[0]/Vt,Yt=xt[0]/de,ce=et[1]/Vt,Se=xt[1]/de,ir=et[2]/Vt,Ye=xt[2]/de,tr=ir===Ye?0:(ot-ir)/(Ye-ir);return new t.MercatorCoordinate(t.number(ye,Yt,tr)/this.worldSize,t.number(ce,Se,tr)/this.worldSize)},$s.prototype.coordinatePoint=function($){var ot=[$.x*this.worldSize,$.y*this.worldSize,0,1];return t.transformMat4(ot,ot,this.pixelMatrix),new t.Point(ot[0]/ot[3],ot[1]/ot[3])},$s.prototype.getBounds=function(){return new t.LngLatBounds().extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},$s.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},$s.prototype.setMaxBounds=function($){$?(this.lngRange=[$.getWest(),$.getEast()],this.latRange=[$.getSouth(),$.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},$s.prototype.calculatePosMatrix=function($,ot){ot===void 0&&(ot=!1);var et=$.key,xt=ot?this._alignedPosMatrixCache:this._posMatrixCache;if(xt[et])return xt[et];var Vt=$.canonical,de=this.worldSize/this.zoomScale(Vt.z),ye=Vt.x+Math.pow(2,Vt.z)*$.wrap,Yt=t.identity(new Float64Array(16));return t.translate(Yt,Yt,[ye*de,Vt.y*de,0]),t.scale(Yt,Yt,[de/t.EXTENT,de/t.EXTENT,1]),t.multiply(Yt,ot?this.alignedProjMatrix:this.projMatrix,Yt),xt[et]=new Float32Array(Yt),xt[et]},$s.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},$s.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var $=-90,ot=90,et=-180,xt=180,Vt,de,ye,Yt,ce=this.size,Se=this._unmodified;if(this.latRange){var ir=this.latRange;$=t.mercatorYfromLat(ir[1])*this.worldSize,ot=t.mercatorYfromLat(ir[0])*this.worldSize,Vt=ot-$ot&&(Yt=ot-Ve)}if(this.lngRange){var Xe=tr.x,Ze=ce.x/2;Xe-Zext&&(ye=xt-Ze)}(ye!==void 0||Yt!==void 0)&&(this.center=this.unproject(new t.Point(ye!==void 0?ye:tr.x,Yt!==void 0?Yt:tr.y))),this._unmodified=Se,this._constraining=!1}},$s.prototype._calcMatrices=function(){if(this.height){var $=this._fov/2,ot=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan($)*this.height;var et=Math.PI/2+this._pitch,xt=this._fov*(.5+ot.y/this.height),Vt=Math.sin(xt)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-et-xt,.01,Math.PI-.01)),de=this.point,ye=de.x,Yt=de.y,ce=Math.cos(Math.PI/2-this._pitch)*Vt+this.cameraToCenterDistance,Se=ce*1.01,ir=this.height/50,Ye=new Float64Array(16);t.perspective(Ye,this._fov,this.width/this.height,ir,Se),Ye[8]=-ot.x*2/this.width,Ye[9]=ot.y*2/this.height,t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[0,0,-this.cameraToCenterDistance]),t.rotateX(Ye,Ye,this._pitch),t.rotateZ(Ye,Ye,this.angle),t.translate(Ye,Ye,[-ye,-Yt,0]),this.mercatorMatrix=t.scale([],Ye,[this.worldSize,this.worldSize,this.worldSize]),t.scale(Ye,Ye,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Ye,this.invProjMatrix=t.invert([],this.projMatrix);var tr=this.width%2/2,lr=this.height%2/2,hr=Math.cos(this.angle),Ve=Math.sin(this.angle),Xe=ye-Math.round(ye)+hr*tr+Ve*lr,Ze=Yt-Math.round(Yt)+hr*lr+Ve*tr,Pr=new Float64Array(Ye);if(t.translate(Pr,Pr,[Xe>.5?Xe-1:Xe,Ze>.5?Ze-1:Ze,0]),this.alignedProjMatrix=Pr,Ye=t.create(),t.scale(Ye,Ye,[this.width/2,-this.height/2,1]),t.translate(Ye,Ye,[1,-1,0]),this.labelPlaneMatrix=Ye,Ye=t.create(),t.scale(Ye,Ye,[1,-1,1]),t.translate(Ye,Ye,[-1,-1,0]),t.scale(Ye,Ye,[2/this.width,2/this.height,1]),this.glCoordMatrix=Ye,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Ye=t.invert(new Float64Array(16),this.pixelMatrix),!Ye)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Ye,this._posMatrixCache={},this._alignedPosMatrixCache={}}},$s.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var $=this.pointCoordinate(new t.Point(0,0)),ot=[$.x*this.worldSize,$.y*this.worldSize,0,1],et=t.transformMat4(ot,ot,this.pixelMatrix);return et[3]/this.cameraToCenterDistance},$s.prototype.getCameraPoint=function(){var $=this._pitch,ot=Math.tan($)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,ot))},$s.prototype.getCameraQueryGeometry=function($){var ot=this.getCameraPoint();if($.length===1)return[$[0],ot];for(var et=ot.x,xt=ot.y,Vt=ot.x,de=ot.y,ye=0,Yt=$;ye=3&&!$.some(function(et){return isNaN(et)})){var ot=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+($[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+$[2],+$[1]],zoom:+$[0],bearing:ot,pitch:+($[4]||0)}),!0}return!1},dc.prototype._updateHashUnthrottled=function(){var $=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,$)}catch{}};var $c={linearity:.3,easing:t.bezier(0,0,.3,1)},At=t.extend({deceleration:2500,maxSpeed:1400},$c),Ut=t.extend({deceleration:20,maxSpeed:1400},$c),ue=t.extend({deceleration:1e3,maxSpeed:360},$c),Me=t.extend({deceleration:1e3,maxSpeed:90},$c),Pe=function($){this._map=$,this.clear()};Pe.prototype.clear=function(){this._inertiaBuffer=[]},Pe.prototype.record=function($){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:$})},Pe.prototype._drainInertiaBuffer=function(){for(var $=this._inertiaBuffer,ot=t.browser.now(),et=160;$.length>0&&ot-$[0].time>et;)$.shift()},Pe.prototype._onMoveEnd=function($){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ot={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},et=0,xt=this._inertiaBuffer;et=this._clickTolerance||this._map.fire(new ar($.type,this._map,$))},Jr.prototype.dblclick=function($){return this._firePreventable(new ar($.type,this._map,$))},Jr.prototype.mouseover=function($){this._map.fire(new ar($.type,this._map,$))},Jr.prototype.mouseout=function($){this._map.fire(new ar($.type,this._map,$))},Jr.prototype.touchstart=function($){return this._firePreventable(new Er($.type,this._map,$))},Jr.prototype.touchmove=function($){this._map.fire(new Er($.type,this._map,$))},Jr.prototype.touchend=function($){this._map.fire(new Er($.type,this._map,$))},Jr.prototype.touchcancel=function($){this._map.fire(new Er($.type,this._map,$))},Jr.prototype._firePreventable=function($){if(this._map.fire($),$.defaultPrevented)return{}},Jr.prototype.isEnabled=function(){return!0},Jr.prototype.isActive=function(){return!1},Jr.prototype.enable=function(){},Jr.prototype.disable=function(){};var xn=function($){this._map=$};xn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},xn.prototype.mousemove=function($){this._map.fire(new ar($.type,this._map,$))},xn.prototype.mousedown=function(){this._delayContextMenu=!0},xn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ar("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},xn.prototype.contextmenu=function($){this._delayContextMenu?this._contextMenuEvent=$:this._map.fire(new ar($.type,this._map,$)),this._map.listens("contextmenu")&&$.preventDefault()},xn.prototype.isEnabled=function(){return!0},xn.prototype.isActive=function(){return!1},xn.prototype.enable=function(){},xn.prototype.disable=function(){};var zn=function($,ot){this._map=$,this._el=$.getCanvasContainer(),this._container=$.getContainer(),this._clickTolerance=ot.clickTolerance||1};zn.prototype.isEnabled=function(){return!!this._enabled},zn.prototype.isActive=function(){return!!this._active},zn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},zn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},zn.prototype.mousedown=function($,ot){this.isEnabled()&&$.shiftKey&&$.button===0&&(r.disableDrag(),this._startPos=this._lastPos=ot,this._active=!0)},zn.prototype.mousemoveWindow=function($,ot){if(this._active){var et=ot;if(!(this._lastPos.equals(et)||!this._box&&et.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=$.timeStamp),et.length===this.numTouches&&(this.centroid=Hi(ot),this.touches=On(et,ot)))},Ri.prototype.touchmove=function($,ot,et){if(!(this.aborted||!this.centroid)){var xt=On(et,ot);for(var Vt in this.touches){var de=this.touches[Vt],ye=xt[Vt];(!ye||ye.dist(de)>Si)&&(this.aborted=!0)}}},Ri.prototype.touchend=function($,ot,et){if((!this.centroid||$.timeStamp-this.startTime>yi)&&(this.aborted=!0),et.length===0){var xt=!this.aborted&&this.centroid;if(this.reset(),xt)return xt}};var Gi=function($){this.singleTap=new Ri($),this.numTaps=$.numTaps,this.reset()};Gi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Gi.prototype.touchstart=function($,ot,et){this.singleTap.touchstart($,ot,et)},Gi.prototype.touchmove=function($,ot,et){this.singleTap.touchmove($,ot,et)},Gi.prototype.touchend=function($,ot,et){var xt=this.singleTap.touchend($,ot,et);if(xt){var Vt=$.timeStamp-this.lastTime0&&(this._active=!0);var xt=On(et,ot),Vt=new t.Point(0,0),de=new t.Point(0,0),ye=0;for(var Yt in xt){var ce=xt[Yt],Se=this._touches[Yt];Se&&(Vt._add(ce),de._add(ce.sub(Se)),ye++,xt[Yt]=ce)}if(this._touches=xt,!(yeMath.abs($.x)}var jl=100,ru=function($){function ot(){$.apply(this,arguments)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.reset=function(){$.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},ot.prototype._start=function(et){this._lastPoints=et,rh(et[0].sub(et[1]))&&(this._valid=!1)},ot.prototype._move=function(et,xt,Vt){var de=et[0].sub(this._lastPoints[0]),ye=et[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(de,ye,Vt.timeStamp),!!this._valid){this._lastPoints=et,this._active=!0;var Yt=(de.y+ye.y)/2,ce=-.5;return{pitchDelta:Yt*ce}}},ot.prototype.gestureBeginsVertically=function(et,xt,Vt){if(this._valid!==void 0)return this._valid;var de=2,ye=et.mag()>=de,Yt=xt.mag()>=de;if(!(!ye&&!Yt)){if(!ye||!Yt)return this._firstMove===void 0&&(this._firstMove=Vt),Vt-this._firstMove0==xt.y>0;return rh(et)&&rh(xt)&&ce}},ot}(Tl),wh={panStep:100,bearingStep:15,pitchStep:10},_e=function(){var $=wh;this._panStep=$.panStep,this._bearingStep=$.bearingStep,this._pitchStep=$.pitchStep,this._rotationDisabled=!1};_e.prototype.reset=function(){this._active=!1},_e.prototype.keydown=function($){var ot=this;if(!($.altKey||$.ctrlKey||$.metaKey)){var et=0,xt=0,Vt=0,de=0,ye=0;switch($.keyCode){case 61:case 107:case 171:case 187:et=1;break;case 189:case 109:case 173:et=-1;break;case 37:$.shiftKey?xt=-1:($.preventDefault(),de=-1);break;case 39:$.shiftKey?xt=1:($.preventDefault(),de=1);break;case 38:$.shiftKey?Vt=1:($.preventDefault(),ye=-1);break;case 40:$.shiftKey?Vt=-1:($.preventDefault(),ye=1);break;default:return}return this._rotationDisabled&&(xt=0,Vt=0),{cameraAnimation:function(Yt){var ce=Yt.getZoom();Yt.easeTo({duration:300,easeId:"keyboardHandler",easing:kr,zoom:et?Math.round(ce)+et*($.shiftKey?2:1):ce,bearing:Yt.getBearing()+xt*ot._bearingStep,pitch:Yt.getPitch()+Vt*ot._pitchStep,offset:[-de*ot._panStep,-ye*ot._panStep],center:Yt.getCenter()},{originalEvent:$})}}}},_e.prototype.enable=function(){this._enabled=!0},_e.prototype.disable=function(){this._enabled=!1,this.reset()},_e.prototype.isEnabled=function(){return this._enabled},_e.prototype.isActive=function(){return this._active},_e.prototype.disableRotation=function(){this._rotationDisabled=!0},_e.prototype.enableRotation=function(){this._rotationDisabled=!1};function kr($){return $*(2-$)}var Ir=4.000244140625,Dn=1/100,li=1/450,ti=2,yn=function($,ot){this._map=$,this._el=$.getCanvasContainer(),this._handler=ot,this._delta=0,this._defaultZoomRate=Dn,this._wheelZoomRate=li,t.bindAll(["_onTimeout"],this)};yn.prototype.setZoomRate=function($){this._defaultZoomRate=$},yn.prototype.setWheelZoomRate=function($){this._wheelZoomRate=$},yn.prototype.isEnabled=function(){return!!this._enabled},yn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},yn.prototype.isZooming=function(){return!!this._zooming},yn.prototype.enable=function($){this.isEnabled()||(this._enabled=!0,this._aroundCenter=$&&$.around==="center")},yn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},yn.prototype.wheel=function($){if(this.isEnabled()){var ot=$.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?$.deltaY*40:$.deltaY,et=t.browser.now(),xt=et-(this._lastWheelEventTime||0);this._lastWheelEventTime=et,ot!==0&&ot%Ir===0?this._type="wheel":ot!==0&&Math.abs(ot)<4?this._type="trackpad":xt>400?(this._type=null,this._lastValue=ot,this._timeout=setTimeout(this._onTimeout,40,$)):this._type||(this._type=Math.abs(xt*ot)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ot+=this._lastValue)),$.shiftKey&&ot&&(ot=ot/4),this._type&&(this._lastWheelEvent=$,this._delta-=ot,this._active||this._start($)),$.preventDefault()}},yn.prototype._onTimeout=function($){this._type="wheel",this._delta-=this._lastValue,this._active||this._start($)},yn.prototype._start=function($){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var ot=r.mousePos(this._el,$);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ot)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},yn.prototype.renderFrame=function(){var $=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ot=this._map.transform;if(this._delta!==0){var et=this._type==="wheel"&&Math.abs(this._delta)>Ir?this._wheelZoomRate:this._defaultZoomRate,xt=ti/(1+Math.exp(-Math.abs(this._delta*et)));this._delta<0&&xt!==0&&(xt=1/xt);var Vt=typeof this._targetZoom=="number"?ot.zoomScale(this._targetZoom):ot.scale;this._targetZoom=Math.min(ot.maxZoom,Math.max(ot.minZoom,ot.scaleZoom(Vt*xt))),this._type==="wheel"&&(this._startZoom=ot.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var de=typeof this._targetZoom=="number"?this._targetZoom:ot.zoom,ye=this._startZoom,Yt=this._easing,ce=!1,Se;if(this._type==="wheel"&&ye&&Yt){var ir=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),Ye=Yt(ir);Se=t.number(ye,de,Ye),ir<1?this._frameId||(this._frameId=!0):ce=!0}else Se=de,ce=!0;return this._active=!0,ce&&(this._active=!1,this._finishTimeout=setTimeout(function(){$._zooming=!1,$._handler._triggerRenderFrame(),delete $._targetZoom,delete $._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ce,zoomDelta:Se-ot.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},yn.prototype._smoothOutEasing=function($){var ot=t.ease;if(this._prevEase){var et=this._prevEase,xt=(t.browser.now()-et.start)/et.duration,Vt=et.easing(xt+.01)-et.easing(xt),de=.27/Math.sqrt(Vt*Vt+1e-4)*.01,ye=Math.sqrt(.27*.27-de*de);ot=t.bezier(de,ye,.25,1)}return this._prevEase={start:t.browser.now(),duration:$,easing:ot},ot},yn.prototype.reset=function(){this._active=!1};var ai=function($,ot){this._clickZoom=$,this._tapZoom=ot};ai.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ai.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ai.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ai.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ta=function(){this.reset()};ta.prototype.reset=function(){this._active=!1},ta.prototype.dblclick=function($,ot){return $.preventDefault(),{cameraAnimation:function(et){et.easeTo({duration:300,zoom:et.getZoom()+($.shiftKey?-1:1),around:et.unproject(ot)},{originalEvent:$})}}},ta.prototype.enable=function(){this._enabled=!0},ta.prototype.disable=function(){this._enabled=!1,this.reset()},ta.prototype.isEnabled=function(){return this._enabled},ta.prototype.isActive=function(){return this._active};var $i=function(){this._tap=new Gi({numTouches:1,numTaps:1}),this.reset()};$i.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},$i.prototype.touchstart=function($,ot,et){this._swipePoint||(this._tapTime&&$.timeStamp-this._tapTime>Vn&&this.reset(),this._tapTime?et.length>0&&(this._swipePoint=ot[0],this._swipeTouch=et[0].identifier):this._tap.touchstart($,ot,et))},$i.prototype.touchmove=function($,ot,et){if(!this._tapTime)this._tap.touchmove($,ot,et);else if(this._swipePoint){if(et[0].identifier!==this._swipeTouch)return;var xt=ot[0],Vt=xt.y-this._swipePoint.y;return this._swipePoint=xt,$.preventDefault(),this._active=!0,{zoomDelta:Vt/128}}},$i.prototype.touchend=function($,ot,et){if(this._tapTime)this._swipePoint&&et.length===0&&this.reset();else{var xt=this._tap.touchend($,ot,et);xt&&(this._tapTime=$.timeStamp)}},$i.prototype.touchcancel=function(){this.reset()},$i.prototype.enable=function(){this._enabled=!0},$i.prototype.disable=function(){this._enabled=!1,this.reset()},$i.prototype.isEnabled=function(){return this._enabled},$i.prototype.isActive=function(){return this._active};var ya=function($,ot,et){this._el=$,this._mousePan=ot,this._touchPan=et};ya.prototype.enable=function($){this._inertiaOptions=$||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ya.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ya.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ya.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var $a=function($,ot,et){this._pitchWithRotate=$.pitchWithRotate,this._mouseRotate=ot,this._mousePitch=et};$a.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},$a.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},$a.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},$a.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Na=function($,ot,et,xt){this._el=$,this._touchZoom=ot,this._touchRotate=et,this._tapDragZoom=xt,this._rotationDisabled=!1,this._enabled=!0};Na.prototype.enable=function($){this._touchZoom.enable($),this._rotationDisabled||this._touchRotate.enable($),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Na.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Na.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Na.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Na.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Na.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ia=function($){return $.zoom||$.drag||$.pitch||$.rotate},Ai=function($){function ot(){$.apply(this,arguments)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot}(t.Event);function fn($){return $.panDelta&&$.panDelta.mag()||$.zoomDelta||$.bearingDelta||$.pitchDelta}var jn=function($,ot){this._map=$,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pe($),this._bearingSnap=ot.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ot),t.bindAll(["handleEvent","handleWindowEvent"],this);var et=this._el;this._listeners=[[et,"touchstart",{passive:!0}],[et,"touchmove",{passive:!1}],[et,"touchend",void 0],[et,"touchcancel",void 0],[et,"mousedown",void 0],[et,"mousemove",void 0],[et,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[et,"mouseover",void 0],[et,"mouseout",void 0],[et,"dblclick",void 0],[et,"click",void 0],[et,"keydown",{capture:!1}],[et,"keyup",void 0],[et,"wheel",{passive:!1}],[et,"contextmenu",void 0],[t.window,"blur",void 0]];for(var xt=0,Vt=this._listeners;xtye?Math.min(2,dn):Math.max(.5,dn),Ei=Math.pow(ea,1-Ci),Li=de.unproject(Pr.add(sn.mult(Ci*Ei)).mult(mi));de.setLocationAtPoint(de.renderWorldCopies?Li.wrap():Li,Ve)}Vt._fireMoveEvents(xt)},function(Ci){Vt._afterEase(xt,Ci)},et),this},ot.prototype._prepareEase=function(et,xt,Vt){Vt===void 0&&(Vt={}),this._moving=!0,!xt&&!Vt.moving&&this.fire(new t.Event("movestart",et)),this._zooming&&!Vt.zooming&&this.fire(new t.Event("zoomstart",et)),this._rotating&&!Vt.rotating&&this.fire(new t.Event("rotatestart",et)),this._pitching&&!Vt.pitching&&this.fire(new t.Event("pitchstart",et))},ot.prototype._fireMoveEvents=function(et){this.fire(new t.Event("move",et)),this._zooming&&this.fire(new t.Event("zoom",et)),this._rotating&&this.fire(new t.Event("rotate",et)),this._pitching&&this.fire(new t.Event("pitch",et))},ot.prototype._afterEase=function(et,xt){if(!(this._easeId&&xt&&this._easeId===xt)){delete this._easeId;var Vt=this._zooming,de=this._rotating,ye=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Vt&&this.fire(new t.Event("zoomend",et)),de&&this.fire(new t.Event("rotateend",et)),ye&&this.fire(new t.Event("pitchend",et)),this.fire(new t.Event("moveend",et))}},ot.prototype.flyTo=function(et,xt){var Vt=this;if(!et.essential&&t.browser.prefersReducedMotion){var de=t.pick(et,["center","zoom","bearing","pitch","around"]);return this.jumpTo(de,xt)}this.stop(),et=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},et);var ye=this.transform,Yt=this.getZoom(),ce=this.getBearing(),Se=this.getPitch(),ir=this.getPadding(),Ye="zoom"in et?t.clamp(+et.zoom,ye.minZoom,ye.maxZoom):Yt,tr="bearing"in et?this._normalizeBearing(et.bearing,ce):ce,lr="pitch"in et?+et.pitch:Se,hr="padding"in et?et.padding:ye.padding,Ve=ye.zoomScale(Ye-Yt),Xe=t.Point.convert(et.offset),Ze=ye.centerPoint.add(Xe),Pr=ye.pointLocation(Ze),sn=t.LngLat.convert(et.center||Pr);this._normalizeCenter(sn);var dn=ye.project(Pr),pi=ye.project(sn).sub(dn),ui=et.curve,Yn=Math.max(ye.width,ye.height),Ci=Yn/Ve,mi=pi.mag();if("minZoom"in et){var ea=t.clamp(Math.min(et.minZoom,Yt,Ye),ye.minZoom,ye.maxZoom),Ei=Yn/ye.zoomScale(ea-Yt);ui=Math.sqrt(Ei/mi*2)}var Li=ui*ui;function la(Fs){var Mu=(Ci*Ci-Yn*Yn+(Fs?-1:1)*Li*Li*mi*mi)/(2*(Fs?Ci:Yn)*Li*mi);return Math.log(Math.sqrt(Mu*Mu+1)-Mu)}function to(Fs){return(Math.exp(Fs)-Math.exp(-Fs))/2}function co(Fs){return(Math.exp(Fs)+Math.exp(-Fs))/2}function qo(Fs){return to(Fs)/co(Fs)}var xs=la(0),Il=function(Fs){return co(xs)/co(xs+ui*Fs)},Vl=function(Fs){return Yn*((co(xs)*qo(xs+ui*Fs)-to(xs))/Li)/mi},pl=(la(1)-xs)/ui;if(Math.abs(mi)<1e-6||!isFinite(pl)){if(Math.abs(Yn-Ci)<1e-6)return this.easeTo(et,xt);var Hl=Ciet.maxDuration&&(et.duration=0),this._zooming=!0,this._rotating=ce!==tr,this._pitching=lr!==Se,this._padding=!ye.isPaddingEqual(hr),this._prepareEase(xt,!1),this._ease(function(Fs){var Mu=Fs*pl,af=1/Il(Mu);ye.zoom=Fs===1?Ye:Yt+ye.scaleZoom(af),Vt._rotating&&(ye.bearing=t.number(ce,tr,Fs)),Vt._pitching&&(ye.pitch=t.number(Se,lr,Fs)),Vt._padding&&(ye.interpolatePadding(ir,hr,Fs),Ze=ye.centerPoint.add(Xe));var If=Fs===1?sn:ye.unproject(dn.add(pi.mult(Vl(Mu))).mult(af));ye.setLocationAtPoint(ye.renderWorldCopies?If.wrap():If,Ze),Vt._fireMoveEvents(xt)},function(){return Vt._afterEase(xt)},et),this},ot.prototype.isEasing=function(){return!!this._easeFrameId},ot.prototype.stop=function(){return this._stop()},ot.prototype._stop=function(et,xt){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Vt=this._onEaseEnd;delete this._onEaseEnd,Vt.call(this,xt)}if(!et){var de=this.handlers;de&&de.stop(!1)}return this},ot.prototype._ease=function(et,xt,Vt){Vt.animate===!1||Vt.duration===0?(et(1),xt()):(this._easeStart=t.browser.now(),this._easeOptions=Vt,this._onEaseFrame=et,this._onEaseEnd=xt,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},ot.prototype._renderFrameCallback=function(){var et=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(et)),et<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},ot.prototype._normalizeBearing=function(et,xt){et=t.wrap(et,-180,180);var Vt=Math.abs(et-xt);return Math.abs(et-360-xt)180?-360:Vt<-180?360:0}},ot}(t.Evented),Ti=function($){$===void 0&&($={}),this.options=$,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Ti.prototype.getDefaultPosition=function(){return"bottom-right"},Ti.prototype.onAdd=function($){var ot=this.options&&this.options.compact;return this._map=$,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ot&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),ot===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ti.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Ti.prototype._setElementTitle=function($,ot){var et=this._map._getUIString("AttributionControl."+ot);$.title=et,$.setAttribute("aria-label",et)},Ti.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Ti.prototype._updateEditLink=function(){var $=this._editLink;$||($=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ot=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if($){var et=ot.reduce(function(xt,Vt,de){return Vt.value&&(xt+=Vt.key+"="+Vt.value+(de=0)return!1;return!0});var ye=$.join(" | ");ye!==this._attribHTML&&(this._attribHTML=ye,$.length?(this._innerContainer.innerHTML=ye,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ti.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ei=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};ei.prototype.onAdd=function($){this._map=$,this._container=r.create("div","mapboxgl-ctrl");var ot=r.create("a","mapboxgl-ctrl-logo");return ot.target="_blank",ot.rel="noopener nofollow",ot.href="https://www.mapbox.com/",ot.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ot.setAttribute("rel","noopener nofollow"),this._container.appendChild(ot),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ei.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ei.prototype.getDefaultPosition=function(){return"bottom-left"},ei.prototype._updateLogo=function($){(!$||$.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ei.prototype._logoRequired=function(){if(this._map.style){var $=this._map.style.sourceCaches;for(var ot in $){var et=$[ot].getSource();if(et.mapbox_logo)return!0}return!1}},ei.prototype._updateCompact=function(){var $=this._container.children;if($.length){var ot=$[0];this._map.getCanvasContainer().offsetWidth<250?ot.classList.add("mapboxgl-compact"):ot.classList.remove("mapboxgl-compact")}};var Sa=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Sa.prototype.add=function($){var ot=++this._id,et=this._queue;return et.push({callback:$,id:ot,cancelled:!1}),ot},Sa.prototype.remove=function($){for(var ot=this._currentlyRunning,et=ot?this._queue.concat(ot):this._queue,xt=0,Vt=et;xtxt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(xt.minPitch!=null&&xt.maxPitch!=null&&xt.minPitch>xt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(xt.minPitch!=null&&xt.minPitchJi)throw new Error("maxPitch must be less than or equal to "+Ji);var de=new $s(xt.minZoom,xt.maxZoom,xt.minPitch,xt.maxPitch,xt.renderWorldCopies);if($.call(this,de,xt),this._interactive=xt.interactive,this._maxTileCacheSize=xt.maxTileCacheSize,this._failIfMajorPerformanceCaveat=xt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=xt.preserveDrawingBuffer,this._antialias=xt.antialias,this._trackResize=xt.trackResize,this._bearingSnap=xt.bearingSnap,this._refreshExpiredTiles=xt.refreshExpiredTiles,this._fadeDuration=xt.fadeDuration,this._crossSourceCollisions=xt.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=xt.collectResourceTiming,this._renderTaskQueue=new Sa,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},ha,xt.locale),this._clickTolerance=xt.clickTolerance,this._requestManager=new t.RequestManager(xt.transformRequest,xt.accessToken),typeof xt.container=="string"){if(this._container=t.window.document.getElementById(xt.container),!this._container)throw new Error("Container '"+xt.container+"' not found.")}else if(xt.container instanceof xi)this._container=xt.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(xt.maxBounds&&this.setMaxBounds(xt.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return Vt._update(!1)}),this.on("moveend",function(){return Vt._update(!1)}),this.on("zoom",function(){return Vt._update(!0)}),typeof t.window<"u"&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new jn(this,xt);var ye=typeof xt.hash=="string"&&xt.hash||void 0;this._hash=xt.hash&&new dc(ye).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:xt.center,zoom:xt.zoom,bearing:xt.bearing,pitch:xt.pitch}),xt.bounds&&(this.resize(),this.fitBounds(xt.bounds,t.extend({},xt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=xt.localIdeographFontFamily,xt.style&&this.setStyle(xt.style,{localIdeographFontFamily:xt.localIdeographFontFamily}),xt.attributionControl&&this.addControl(new Ti({customAttribution:xt.customAttribution})),this.addControl(new ei,xt.logoPosition),this.on("style.load",function(){Vt.transform.unmodified&&Vt.jumpTo(Vt.style.stylesheet)}),this.on("data",function(Yt){Vt._update(Yt.dataType==="style"),Vt.fire(new t.Event(Yt.dataType+"data",Yt))}),this.on("dataloading",function(Yt){Vt.fire(new t.Event(Yt.dataType+"dataloading",Yt))})}$&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot;var et={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return ot.prototype._getMapId=function(){return this._mapId},ot.prototype.addControl=function(xt,Vt){if(Vt===void 0&&(xt.getDefaultPosition?Vt=xt.getDefaultPosition():Vt="top-right"),!xt||!xt.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var de=xt.onAdd(this);this._controls.push(xt);var ye=this._controlPositions[Vt];return Vt.indexOf("bottom")!==-1?ye.insertBefore(de,ye.firstChild):ye.appendChild(de),this},ot.prototype.removeControl=function(xt){if(!xt||!xt.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Vt=this._controls.indexOf(xt);return Vt>-1&&this._controls.splice(Vt,1),xt.onRemove(this),this},ot.prototype.hasControl=function(xt){return this._controls.indexOf(xt)>-1},ot.prototype.resize=function(xt){var Vt=this._containerDimensions(),de=Vt[0],ye=Vt[1];this._resizeCanvas(de,ye),this.transform.resize(de,ye),this.painter.resize(de,ye);var Yt=!this._moving;return Yt&&(this.stop(),this.fire(new t.Event("movestart",xt)).fire(new t.Event("move",xt))),this.fire(new t.Event("resize",xt)),Yt&&this.fire(new t.Event("moveend",xt)),this},ot.prototype.getBounds=function(){return this.transform.getBounds()},ot.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},ot.prototype.setMaxBounds=function(xt){return this.transform.setMaxBounds(t.LngLatBounds.convert(xt)),this._update()},ot.prototype.setMinZoom=function(xt){if(xt=xt??Ea,xt>=Ea&&xt<=this.transform.maxZoom)return this.transform.minZoom=xt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=xt,this._update(),this.getZoom()>xt&&this.setZoom(xt),this;throw new Error("maxZoom must be greater than the current minZoom")},ot.prototype.getMaxZoom=function(){return this.transform.maxZoom},ot.prototype.setMinPitch=function(xt){if(xt=xt??Ki,xt=Ki&&xt<=this.transform.maxPitch)return this.transform.minPitch=xt,this._update(),this.getPitch()Ji)throw new Error("maxPitch must be less than or equal to "+Ji);if(xt>=this.transform.minPitch)return this.transform.maxPitch=xt,this._update(),this.getPitch()>xt&&this.setPitch(xt),this;throw new Error("maxPitch must be greater than the current minPitch")},ot.prototype.getMaxPitch=function(){return this.transform.maxPitch},ot.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},ot.prototype.setRenderWorldCopies=function(xt){return this.transform.renderWorldCopies=xt,this._update()},ot.prototype.project=function(xt){return this.transform.locationPoint(t.LngLat.convert(xt))},ot.prototype.unproject=function(xt){return this.transform.pointLocation(t.Point.convert(xt))},ot.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},ot.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},ot.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},ot.prototype._createDelegatedListener=function(xt,Vt,de){var ye=this,Yt;if(xt==="mouseenter"||xt==="mouseover"){var ce=!1,Se=function(Ve){var Xe=ye.getLayer(Vt)?ye.queryRenderedFeatures(Ve.point,{layers:[Vt]}):[];Xe.length?ce||(ce=!0,de.call(ye,new ar(xt,ye,Ve.originalEvent,{features:Xe}))):ce=!1},ir=function(){ce=!1};return{layer:Vt,listener:de,delegates:{mousemove:Se,mouseout:ir}}}else if(xt==="mouseleave"||xt==="mouseout"){var Ye=!1,tr=function(Ve){var Xe=ye.getLayer(Vt)?ye.queryRenderedFeatures(Ve.point,{layers:[Vt]}):[];Xe.length?Ye=!0:Ye&&(Ye=!1,de.call(ye,new ar(xt,ye,Ve.originalEvent)))},lr=function(Ve){Ye&&(Ye=!1,de.call(ye,new ar(xt,ye,Ve.originalEvent)))};return{layer:Vt,listener:de,delegates:{mousemove:tr,mouseout:lr}}}else{var hr=function(Ve){var Xe=ye.getLayer(Vt)?ye.queryRenderedFeatures(Ve.point,{layers:[Vt]}):[];Xe.length&&(Ve.features=Xe,de.call(ye,Ve),delete Ve.features)};return{layer:Vt,listener:de,delegates:(Yt={},Yt[xt]=hr,Yt)}}},ot.prototype.on=function(xt,Vt,de){if(de===void 0)return $.prototype.on.call(this,xt,Vt);var ye=this._createDelegatedListener(xt,Vt,de);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[xt]=this._delegatedListeners[xt]||[],this._delegatedListeners[xt].push(ye);for(var Yt in ye.delegates)this.on(Yt,ye.delegates[Yt]);return this},ot.prototype.once=function(xt,Vt,de){if(de===void 0)return $.prototype.once.call(this,xt,Vt);var ye=this._createDelegatedListener(xt,Vt,de);for(var Yt in ye.delegates)this.once(Yt,ye.delegates[Yt]);return this},ot.prototype.off=function(xt,Vt,de){var ye=this;if(de===void 0)return $.prototype.off.call(this,xt,Vt);var Yt=function(ce){for(var Se=ce[xt],ir=0;ir180;){var ye=et.locationPoint($);if(ye.x>=0&&ye.y>=0&&ye.x<=et.width&&ye.y<=et.height)break;$.lng>et.center.lng?$.lng-=360:$.lng+=360}return $}var es={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Ul($,ot,et){var xt=$.classList;for(var Vt in es)xt.remove("mapboxgl-"+et+"-anchor-"+Vt);xt.add("mapboxgl-"+et+"-anchor-"+ot)}var Al=function($){function ot(et,xt){if($.call(this),(et instanceof t.window.HTMLElement||xt)&&(et=t.extend({element:et},xt)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=et&&et.anchor||"center",this._color=et&&et.color||"#3FB1CE",this._scale=et&&et.scale||1,this._draggable=et&&et.draggable||!1,this._clickTolerance=et&&et.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=et&&et.rotation||0,this._rotationAlignment=et&&et.rotationAlignment||"auto",this._pitchAlignment=et&&et.pitchAlignment&&et.pitchAlignment!=="auto"?et.pitchAlignment:this._rotationAlignment,!et||!et.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var Vt=r.createNS("http://www.w3.org/2000/svg","svg"),de=41,ye=27;Vt.setAttributeNS(null,"display","block"),Vt.setAttributeNS(null,"height",de+"px"),Vt.setAttributeNS(null,"width",ye+"px"),Vt.setAttributeNS(null,"viewBox","0 0 "+ye+" "+de);var Yt=r.createNS("http://www.w3.org/2000/svg","g");Yt.setAttributeNS(null,"stroke","none"),Yt.setAttributeNS(null,"stroke-width","1"),Yt.setAttributeNS(null,"fill","none"),Yt.setAttributeNS(null,"fill-rule","evenodd");var ce=r.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"fill-rule","nonzero");var Se=r.createNS("http://www.w3.org/2000/svg","g");Se.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Se.setAttributeNS(null,"fill","#000000");for(var ir=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],Ye=0,tr=ir;Ye=xt}this._isDragging&&(this._pos=et.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag")))},ot.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.Event("dragend")),this._state="inactive"},ot.prototype._addDragHandler=function(et){this._element.contains(et.originalEvent.target)&&(et.preventDefault(),this._positionDelta=et.point.sub(this._pos).add(this._offset),this._pointerdownPos=et.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},ot.prototype.setDraggable=function(et){return this._draggable=!!et,this._map&&(et?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},ot.prototype.isDraggable=function(){return this._draggable},ot.prototype.setRotation=function(et){return this._rotation=et||0,this._update(),this},ot.prototype.getRotation=function(){return this._rotation},ot.prototype.setRotationAlignment=function(et){return this._rotationAlignment=et||"auto",this._update(),this},ot.prototype.getRotationAlignment=function(){return this._rotationAlignment},ot.prototype.setPitchAlignment=function(et){return this._pitchAlignment=et&&et!=="auto"?et:this._rotationAlignment,this._update(),this},ot.prototype.getPitchAlignment=function(){return this._pitchAlignment},ot}(t.Evented),hs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ku;function dl($){ku!==void 0?$(ku):t.window.navigator.permissions!==void 0?t.window.navigator.permissions.query({name:"geolocation"}).then(function(ot){ku=ot.state!=="denied",$(ku)}):(ku=!!t.window.navigator.geolocation,$(ku))}var Cu=0,pc=!1,yc=function($){function ot(et){$.call(this),this.options=t.extend({},hs,et),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.onAdd=function(et){return this._map=et,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),dl(this._setupUI),this._container},ot.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Cu=0,pc=!1},ot.prototype._isOutOfMapMaxBounds=function(et){var xt=this._map.getMaxBounds(),Vt=et.coords;return xt&&(Vt.longitudext.getEast()||Vt.latitudext.getNorth())},ot.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},ot.prototype._onSuccess=function(et){if(this._map){if(this._isOutOfMapMaxBounds(et)){this._setErrorState(),this.fire(new t.Event("outofmaxbounds",et)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=et,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(et),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(et),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",et)),this._finish()}},ot.prototype._updateCamera=function(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude),Vt=et.coords.accuracy,de=this._map.getBearing(),ye=t.extend({bearing:de},this.options.fitBoundsOptions);this._map.fitBounds(xt.toBounds(Vt),ye,{geolocateSource:!0})},ot.prototype._updateMarker=function(et){if(et){var xt=new t.LngLat(et.coords.longitude,et.coords.latitude);this._accuracyCircleMarker.setLngLat(xt).addTo(this._map),this._userLocationDotMarker.setLngLat(xt).addTo(this._map),this._accuracy=et.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},ot.prototype._updateCircleRadius=function(){var et=this._map._container.clientHeight/2,xt=this._map.unproject([0,et]),Vt=this._map.unproject([1,et]),de=xt.distanceTo(Vt),ye=Math.ceil(2*this._accuracy/de);this._circleElement.style.width=ye+"px",this._circleElement.style.height=ye+"px"},ot.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},ot.prototype._onError=function(et){if(this._map){if(this.options.trackUserLocation)if(et.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var xt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=xt,this._geolocateButton.setAttribute("aria-label",xt),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(et.code===3&&pc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",et)),this._finish()}},ot.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},ot.prototype._setupUI=function(et){var xt=this;if(this._container.addEventListener("contextmenu",function(ye){return ye.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",et===!1){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Vt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Vt,this._geolocateButton.setAttribute("aria-label",Vt)}else{var de=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Al(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Al({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ye){var Yt=ye.originalEvent&&ye.originalEvent.type==="resize";!ye.geolocateSource&&xt._watchState==="ACTIVE_LOCK"&&!Yt&&(xt._watchState="BACKGROUND",xt._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),xt._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),xt.fire(new t.Event("trackuserlocationend")))})},ot.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Cu--,pc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Cu++;var et;Cu>1?(et={maximumAge:6e5,timeout:0},pc=!0):(et=this.options.positionOptions,pc=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,et)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},ot.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},ot}(t.Evented),xu={maxWidth:100,unit:"metric"},pu=function($){this.options=t.extend({},xu,$),t.bindAll(["_onMove","setUnit"],this)};pu.prototype.getDefaultPosition=function(){return"bottom-left"},pu.prototype._onMove=function(){Tu(this._map,this._container,this.options)},pu.prototype.onAdd=function($){return this._map=$,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",$.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},pu.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},pu.prototype.setUnit=function($){this.options.unit=$,Tu(this._map,this._container,this.options)};function Tu($,ot,et){var xt=et&&et.maxWidth||100,Vt=$._container.clientHeight/2,de=$.unproject([0,Vt]),ye=$.unproject([xt,Vt]),Yt=de.distanceTo(ye);if(et&&et.unit==="imperial"){var ce=3.2808*Yt;if(ce>5280){var Se=ce/5280;No(ot,xt,Se,$._getUIString("ScaleControl.Miles"))}else No(ot,xt,ce,$._getUIString("ScaleControl.Feet"))}else if(et&&et.unit==="nautical"){var ir=Yt/1852;No(ot,xt,ir,$._getUIString("ScaleControl.NauticalMiles"))}else Yt>=1e3?No(ot,xt,Yt/1e3,$._getUIString("ScaleControl.Kilometers")):No(ot,xt,Yt,$._getUIString("ScaleControl.Meters"))}function No($,ot,et,xt){var Vt=sl(et),de=Vt/et;$.style.width=ot*de+"px",$.innerHTML=Vt+" "+xt}function Au($){var ot=Math.pow(10,Math.ceil(-Math.log($)/Math.LN10));return Math.round($*ot)/ot}function sl($){var ot=Math.pow(10,(""+Math.floor($)).length-1),et=$/ot;return et=et>=10?10:et>=5?5:et>=3?3:et>=2?2:et>=1?1:Au(et),ot*et}var Lu=function($){this._fullscreen=!1,$&&$.container&&($.container instanceof t.window.HTMLElement?this._container=$.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Lu.prototype.onAdd=function($){return this._map=$,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Lu.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Lu.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Lu.prototype._setupUI=function(){var $=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",$).setAttribute("aria-hidden",!0),$.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Lu.prototype._updateTitle=function(){var $=this._getTitle();this._fullscreenButton.setAttribute("aria-label",$),this._fullscreenButton.title=$},Lu.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Lu.prototype._isFullscreen=function(){return this._fullscreen},Lu.prototype._changeIcon=function(){var $=t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement;$===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Lu.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var xc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Co=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Cs=function($){function ot(et){$.call(this),this.options=t.extend(Object.create(xc),et),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return $&&(ot.__proto__=$),ot.prototype=Object.create($&&$.prototype),ot.prototype.constructor=ot,ot.prototype.addTo=function(et){return this._map&&this.remove(),this._map=et,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},ot.prototype.isOpen=function(){return!!this._map},ot.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},ot.prototype.getLngLat=function(){return this._lngLat},ot.prototype.setLngLat=function(et){return this._lngLat=t.LngLat.convert(et),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},ot.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},ot.prototype.getElement=function(){return this._container},ot.prototype.setText=function(et){return this.setDOMContent(t.window.document.createTextNode(et))},ot.prototype.setHTML=function(et){var xt=t.window.document.createDocumentFragment(),Vt=t.window.document.createElement("body"),de;for(Vt.innerHTML=et;de=Vt.firstChild,!!de;)xt.appendChild(de);return this.setDOMContent(xt)},ot.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},ot.prototype.setMaxWidth=function(et){return this.options.maxWidth=et,this._update(),this},ot.prototype.setDOMContent=function(et){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(et),this._createCloseButton(),this._update(),this._focusFirstElement(),this},ot.prototype.addClassName=function(et){this._container&&this._container.classList.add(et)},ot.prototype.removeClassName=function(et){this._container&&this._container.classList.remove(et)},ot.prototype.setOffset=function(et){return this.options.offset=et,this._update(),this},ot.prototype.toggleClassName=function(et){if(this._container)return this._container.classList.toggle(et)},ot.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},ot.prototype._onMouseUp=function(et){this._update(et.point)},ot.prototype._onMouseMove=function(et){this._update(et.point)},ot.prototype._onDrag=function(et){this._update(et.point)},ot.prototype._update=function(et){var xt=this,Vt=this._lngLat||this._trackPointer;if(!(!this._map||!Vt||!this._content)&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(tr){return xt._container.classList.add(tr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Eo(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!et))){var de=this._pos=this._trackPointer&&et?et:this._map.project(this._lngLat),ye=this.options.anchor,Yt=Ml(this.options.offset);if(!ye){var ce=this._container.offsetWidth,Se=this._container.offsetHeight,ir;de.y+Yt.bottom.ythis._map.transform.height-Se?ir=["bottom"]:ir=[],de.xthis._map.transform.width-ce/2&&ir.push("right"),ir.length===0?ye="bottom":ye=ir.join("-")}var Ye=de.add(Yt[ye]).round();r.setTransform(this._container,es[ye]+" translate("+Ye.x+"px,"+Ye.y+"px)"),Ul(this._container,ye,"popup")}},ot.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var et=this._container.querySelector(Co);et&&et.focus()}},ot.prototype._onClose=function(){this.remove()},ot}(t.Evented);function Ml($){if($)if(typeof $=="number"){var ot=Math.round(Math.sqrt(.5*Math.pow($,2)));return{center:new t.Point(0,0),top:new t.Point(0,$),"top-left":new t.Point(ot,ot),"top-right":new t.Point(-ot,ot),bottom:new t.Point(0,-$),"bottom-left":new t.Point(ot,-ot),"bottom-right":new t.Point(-ot,-ot),left:new t.Point($,0),right:new t.Point(-$,0)}}else if($ instanceof t.Point||Array.isArray($)){var et=t.Point.convert($);return{center:et,top:et,"top-left":et,"top-right":et,bottom:et,"bottom-left":et,"bottom-right":et,left:et,right:et}}else return{center:t.Point.convert($.center||[0,0]),top:t.Point.convert($.top||[0,0]),"top-left":t.Point.convert($["top-left"]||[0,0]),"top-right":t.Point.convert($["top-right"]||[0,0]),bottom:t.Point.convert($.bottom||[0,0]),"bottom-left":t.Point.convert($["bottom-left"]||[0,0]),"bottom-right":t.Point.convert($["bottom-right"]||[0,0]),left:t.Point.convert($.left||[0,0]),right:t.Point.convert($.right||[0,0])};else return Ml(new t.Point(0,0))}var yl={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Io,NavigationControl:Fa,GeolocateControl:yc,AttributionControl:Ti,ScaleControl:pu,FullscreenControl:Lu,Popup:Cs,Marker:Al,Style:ac,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:Wa,clearPrewarmedResources:ze,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken($){t.config.ACCESS_TOKEN=$},get baseApiUrl(){return t.config.API_URL},set baseApiUrl($){t.config.API_URL=$},get workerCount(){return ji.workerCount},set workerCount($){ji.workerCount=$},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests($){t.config.MAX_PARALLEL_IMAGE_REQUESTS=$},clearStorage:function($){t.clearTileCache($)},workerUrl:""};return yl}),I})}),SW=Dt((Q,Z)=>{var c=kn(),g=ec().sanitizeHTML,I=kE(),S=Ev();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var l=this.findFollowingMapboxLayerId(this.lookupBelow());l!==null&&this.subplot.map.moveLayer(this.idLayer,l)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var l=n(o);i.addSource(this.idSource,l)}},e.findFollowingMapboxLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),l=0;l0){for(var l=0;l0}function a(o){var i={},l={};switch(o.type){case"circle":c.extendFlat(l,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(l,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(l,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=I(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(l,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(l,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:l}}function n(o){var i=o.sourcetype,l=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof l=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=l,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}Z.exports=function(o,i,l){var f=new t(o,i);return f.update(l),f}}),EW=Dt((Q,Z)=>{var c=TE(),g=kn(),I=W1(),S=Jo(),t=Ls(),e=up(),r=tf(),a=v0(),n=a.drawMode,o=a.selectMode,i=vf().prepSelect,l=vf().clearOutline,f=vf().clearSelectionsCache,x=vf().selectOnClick,y=Ev(),v=SW();function T(C,A){this.id=A,this.gd=C;var h=C._fullLayout,p=C._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(C,A,h){var p=this,k=A[p.id];p.map&&k.accesstoken!==p.accessToken&&(p.map.remove(),p.map=null,p.styleObj=null,p.traceHash={},p.layerList=[]);var w;p.map?w=new Promise(function(R,O){p.updateMap(C,A,R,O)}):w=new Promise(function(R,O){p.createMap(C,A,R,O)}),h.push(w)},u.createMap=function(C,A,h,p){var k=this,w=A[k.id],R=k.styleObj=_(w.style,A);k.accessToken=w.accesstoken;var O=w.bounds,j=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:R.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:j,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0}));V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(C,A);var H=[];H.push(new Promise(function(F){V.once("load",F)})),H=H.concat(I.fetchTraceGeoData(C)),Promise.all(H).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(C,A,h,p){var k=this,w=k.map,R=A[this.id];k.rejectOnError(p);var O=[],j=_(R.style,A);JSON.stringify(k.styleObj)!==JSON.stringify(j)&&(k.styleObj=j,w.setStyle(j.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(I.fetchTraceGeoData(C)),Promise.all(O).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(C,A){var h=A[this.id],p=h.layers,k,w,R=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(j.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,j.originalEvent)}}},u.updateFx=function(C){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(j){var V=A.map.unproject(j);return[V.lng,V.lat]}var w=C.dragmode,R;R=function(j,V){if(V.isRect){var H=j.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=j.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:C.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:C[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:R},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(j,V,H){i(j,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(C){var A=C[this.id].domain,h=C._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(C){var A=C[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=kn(),g=z1(),I=Ad(),S=P3();Z.exports=function(r,a,n){g(r,a,n,{type:"mapbox",attributes:S,handleDefaults:t,partition:"y",accessToken:a._mapboxAccessToken})};function t(r,a,n,o){n("accesstoken",o.accessToken),n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var i=n("bounds.west"),l=n("bounds.east"),f=n("bounds.south"),x=n("bounds.north");(i===void 0||l===void 0||f===void 0||x===void 0)&&delete a.bounds,I(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),l=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;l&&(f="raster");var x=n("type",f);l&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),wT=Dt(Q=>{var Z=TE(),c=kn(),g=c.strTranslate,I=c.strScale,S=ud().getSubplotCalcData,t=Dp(),e=qr(),r=Vs(),a=ec(),n=EW(),o="mapbox",i=Q.constants=Ev();Q.name=o,Q.attr="subplot",Q.idRoot=o,Q.idRegex=Q.attrRegex=c.counterRegex(o);var l=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Q.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},Q.layoutAttributes=P3(),Q.supplyLayoutDefaults=CW();var f=!0;Q.plot=function(v){f&&(f=!1,c.warn(l));var T=v._fullLayout,u=v.calcdata,b=T._subplots[o];if(Z.version!==i.requiredVersion)throw new Error(i.wrongVersionErrorMsg);var _=x(v,b);Z.accessToken=_;for(var P=0;PH/2){var F=R.split("|").join("
");j.text(F).attr("data-unformatted",F).call(a.convertToTspans,v),V=r.bBox(j.node())}j.attr("transform",g(-3,-V.height+8)),O.insert("rect",".static-attribution").attr({x:-V.width-6,y:-V.height-3,width:V.width+6,height:V.height+3,fill:"rgba(255, 255, 255, 0.75)"});var U=1;V.width+6>H&&(U=H/(V.width+6));var W=[b.l+b.w*M.x[1],b.t+b.h*(1-M.y[0])];O.attr("transform",g(W[0],W[1])+I(U))}};function x(v,T){var u=v._fullLayout,b=v._context;if(b.mapboxAccessToken==="")return"";for(var _=[],P=[],M=!1,C=!1,A=0;A1&&c.warn(i.multipleTokensErrorMsg),_[0]):(P.length&&c.log(["Listed mapbox access token(s)",P.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function y(v){return typeof v=="string"&&(i.styleValuesMapbox.indexOf(v)!==-1||v.indexOf("mapbox://")===0||v.indexOf("stamen")===0)}Q.updateFx=function(v){for(var T=v._fullLayout,u=T._subplots[o],b=0;b{Z.exports={attributes:_T(),supplyDefaults:wW(),colorbar:xo(),formatLabels:wE(),calc:tT(),plot:TW(),hoverPoints:bT().hoverPoints,eventData:AW(),selectPoints:MW(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.update(g)}},moduleType:"trace",name:"scattermapbox",basePlotModule:wT(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}),PW=Dt((Q,Z)=>{Z.exports=LW()}),AE=Dt((Q,Z)=>{var c=gb(),g=kc(),{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=Ho(),e=Ia().extendFlat;Z.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:I({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),IW=Dt((Q,Z)=>{var c=kn(),g=mc(),I=AE();Z.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,I,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),ME=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Xc(),S=Vs(),t=H1().makeBlank,e=W1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,l={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:l,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=I.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var P;g.isArrayOrTypedArray(u.width)&&(P=function(k){return k.mlw});for(var M=0;M{var c=ME().convert,g=ME().convertOnSelect,I=Ev().traceLayerPrefix;function S(e,r){this.type="choroplethmapbox",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",I+r+"-fill"],["line",I+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},Z.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),l=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,l),r[0].trace._glTrace=n,n}}),OW=Dt((Q,Z)=>{Z.exports={attributes:AE(),supplyDefaults:IW(),colorbar:I1(),calc:iT(),plot:zW(),hoverPoints:oT(),eventData:sT(),selectPoints:lT(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var I=g.getMapLayers(),S=I.length-2;S>=0;S--){var t=I[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{Z.exports=OW()}),SE=Dt((Q,Z)=>{var c=kc(),{hovertemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ho(),t=_T(),e=Ia().extendFlat;Z.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:I(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),FW=Dt((Q,Z)=>{var c=kn(),g=mc(),I=SE();Z.exports=function(S,t,e,r){function a(l,f){return c.coerce(S,t,I,l,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),RW=Dt((Q,Z)=>{var c=Yi(),g=kn().isArrayOrTypedArray,I=Ca().BADNUM,S=Xd(),t=kn()._;Z.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,l=0;l{var c=Yi(),g=kn(),I=hi(),S=Xc(),t=Ca().BADNUM,e=H1().makeBlank;Z.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var l=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),C=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=C[0][1],h=I.opacity(A)<1?A:I.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=BW(),g=Ev().traceLayerPrefix;function I(t,e){this.type="densitymapbox",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=I.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(t,e){var r=e[0].trace,a=new I(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),jW=Dt((Q,Z)=>{var c=Ls(),g=bT().hoverPoints,I=bT().getExtraText;Z.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var l=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(l,l.c2l(i.z),"hover").text}return a.extraText=I(o,i,n[0].t.labels),[a]}}}),UW=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),VW=Dt((Q,Z)=>{Z.exports={attributes:SE(),supplyDefaults:FW(),colorbar:I1(),formatLabels:wE(),calc:RW(),plot:NW(),hoverPoints:jW(),eventData:UW(),getBelow:function(c,g){for(var I=g.getMapLayers(),S=0;S{Z.exports=VW()}),WW=Dt((Q,Z)=>{Z.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} @@ -3300,10 +3341,10 @@ uniform `+nr+" "+Ye+" u_"+tr+`; {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}),wW=Ft((Q,$)=>{$.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}),G1=Ft((Q,$)=>{var c=X0(),g=bW(),P=wW(),S='© OpenStreetMap contributors',t="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:r,streets:r,outdoors:r,light:t,dark:e,satellite:P,"satellite-streets":g,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":t,"carto-darkmatter":e,"carto-voyager":r,"carto-positron-nolabels":a,"carto-darkmatter-nolabels":n,"carto-voyager-nolabels":o},s=c(i);$.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error."}}),C3=Ft((Q,$)=>{var c=_n(),g=ui().defaultLine,P=jh().attributes,S=ka(),t=tf().textposition,e=Yc().overrideAll,r=mu().templatedArray,a=G1(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=$.exports=e({_arrayAttrRegexps:[c.counterRegex("map",".layers",!0)],domain:P({name:"map"}),style:{valType:"any",values:a.styleValuesMap,dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:g}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),gT=Ft((Q,$)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=D0(),t=gx(),e=tf(),r=C3(),a=Yo(),n=Ac(),o=ya().extendFlat,i=Yc().overrideAll,s=C3(),f=t.line,x=t.marker;$.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:P()},"calc","nested")}),gE=Ft((Q,$)=>{var c=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];$.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),kW=Ft((Q,$)=>{var c=_n(),g=Mc(),P=c0(),S=F0(),t=b0(),e=R0(),r=gT(),a=gE().isSupportedFont;$.exports=function(o,i,s,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){P(o,i,s,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,s,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||s),C=y("cluster.size"),M=y("cluster.opacity"),E=u!==!1||b!==!1||_!==!1||C!==!1||M!==!1,A=x("cluster.enabled",E);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,s,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,s){var f=s("lon")||[],x=s("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),vE=Ft((Q,$)=>{var c=Ls();$.exports=function(g,P,S){var t={},e=S[P.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),yE=Ft((Q,$)=>{var c=_n();$.exports=function(g,P){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(P)?c.mean(P):P,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var s;return o[0]&&o[1]?s=o.join("-"):o[0]?s=o[0]:o[1]?s=o[1]:s="center",{anchor:s,offset:i}}}),TW=Ft((Q,$)=>{var c=ia(),g=_n(),P=Ua().BADNUM,S=H1(),t=Xc(),e=Vs(),r=bg(),a=Mc(),n=gE().isSupportedFont,o=yE(),i=Np().appendArrayPointValue,s=tc().NEWLINES,f=tc().BR_TAG_ALL;$.exports=function(M,E){var A=E[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),R=a.hasText(A),O=w&&A.marker.symbol==="circle",N=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var X;if((p||k)&&(X=S.calcTraceToLineCoords(E)),p&&(H.geojson=S.makePolygon(X),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(X),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(E);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":C(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(N||R)&&(W.geojson=v(E,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),N&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),R)){var yt=(A.marker||{}).size,pt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":pt.anchor,"text-offset":pt.offset,"text-font":C(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var E=M[0].trace,A=E.marker,h=E.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),R;function O(pt){return E.opacity*pt}function N(pt){return pt/2}var V;p&&(t.hasColorscale(E,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(E));var F;w&&(F=function(pt){var st=c(pt)?+g.constrain(pt,0,1):0;return O(st)});var U=[];for(R=0;R850?R+=" Black":p>750?R+=" Extra Bold":p>650?R+=" Bold":p>550?R+=" Semi Bold":p>450?R+=" Medium":p>350?R+=" Regular":p>250?R+=" Light":p>150?R+=" Extra Light":R+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",p>750?R+=" Extrabold":p>650?R+=" Bold":p>550?R+=" Semibold":p>350?R+=" Regular":R+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",k[3]==="CJK"&&(R+=" CJK"),R+=p>500?" Bold":" Regular")),w&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),n(R)||(R=A);var O=R.split(", ");return O}}),AW=Ft((Q,$)=>{var c=_n(),g=TW(),P=G1().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermap",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:P+a+"-fill",line:P+a+"-line",circle:P+a+"-circle",symbol:P+a+"-symbol",cluster:P+a+"-cluster",clusterCount:P+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],s,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function C(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},$.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,s=new t(r,n.uid,o,i),f=g(r.gd,a),x=s.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(s.addSource("circle",f.circle,n.cluster),y=0;y{var c=Qh(),g=_n(),P=Fu(),S=g.fillText,t=Ua().BADNUM,e=G1().traceLayerPrefix;function r(n,o,i){var s=n.cd,f=s[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var C=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=C*360,E=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),X=q.x-x.c2p([E,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(X*X+lt*lt)-yt,1-3/yt)}if(c.getClosest(s,A,n),n.index!==!1){var h=s[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),R=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=R-O,n.y1=R+O;var N={};N[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,N);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=P(f,h),n.extraText=a(f,h,s[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var s=o.hi||n.hoverinfo,f=s.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}$.exports={hoverPoints:r,getExtraText:a}}),MW=Ft((Q,$)=>{$.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),SW=Ft((Q,$)=>{var c=_n(),g=Mc(),P=Ua().BADNUM;$.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof $<"u"?$.exports=g():(c=typeof globalThis<"u"?globalThis:c||self,c.maplibregl=g())})(Q,function(){var c={},g={};function P(t,e,r){if(g[t]=r,t==="index"){var a="var sharedModule = {}; ("+g.shared+")(sharedModule); ("+g.worker+")(sharedModule);",n={};return g.shared(n),g.index(c,n),typeof window<"u"&&c.setWorkerUrl(window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))),c}}P("shared",["exports"],function(t){function e(G,D,nt,_t){return new(nt||(nt=Promise))(function(Rt,Kt){function Qt(er){try{Re(_t.next(er))}catch(xr){Kt(xr)}}function be(er){try{Re(_t.throw(er))}catch(xr){Kt(xr)}}function Re(er){var xr;er.done?Rt(er.value):(xr=er.value,xr instanceof nt?xr:new nt(function(Er){Er(xr)})).then(Qt,be)}Re((_t=_t.apply(G,D||[])).next())})}function r(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}typeof SuppressedError=="function"&&SuppressedError;var a=n;function n(G,D){this.x=G,this.y=D}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(G){return this.clone()._add(G)},sub:function(G){return this.clone()._sub(G)},multByPoint:function(G){return this.clone()._multByPoint(G)},divByPoint:function(G){return this.clone()._divByPoint(G)},mult:function(G){return this.clone()._mult(G)},div:function(G){return this.clone()._div(G)},rotate:function(G){return this.clone()._rotate(G)},rotateAround:function(G,D){return this.clone()._rotateAround(G,D)},matMult:function(G){return this.clone()._matMult(G)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(G){return this.x===G.x&&this.y===G.y},dist:function(G){return Math.sqrt(this.distSqr(G))},distSqr:function(G){var D=G.x-this.x,nt=G.y-this.y;return D*D+nt*nt},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(G){return Math.atan2(this.y-G.y,this.x-G.x)},angleWith:function(G){return this.angleWithSep(G.x,G.y)},angleWithSep:function(G,D){return Math.atan2(this.x*D-this.y*G,this.x*G+this.y*D)},_matMult:function(G){var D=G[2]*this.x+G[3]*this.y;return this.x=G[0]*this.x+G[1]*this.y,this.y=D,this},_add:function(G){return this.x+=G.x,this.y+=G.y,this},_sub:function(G){return this.x-=G.x,this.y-=G.y,this},_mult:function(G){return this.x*=G,this.y*=G,this},_div:function(G){return this.x/=G,this.y/=G,this},_multByPoint:function(G){return this.x*=G.x,this.y*=G.y,this},_divByPoint:function(G){return this.x/=G.x,this.y/=G.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var G=this.y;return this.y=this.x,this.x=-G,this},_rotate:function(G){var D=Math.cos(G),nt=Math.sin(G),_t=nt*this.x+D*this.y;return this.x=D*this.x-nt*this.y,this.y=_t,this},_rotateAround:function(G,D){var nt=Math.cos(G),_t=Math.sin(G),Rt=D.y+_t*(this.x-D.x)+nt*(this.y-D.y);return this.x=D.x+nt*(this.x-D.x)-_t*(this.y-D.y),this.y=Rt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(G){return G instanceof n?G:Array.isArray(G)?new n(G[0],G[1]):G};var o=r(a),i=s;function s(G,D,nt,_t){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(_t-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=_t}s.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,_t=0;_t<8;_t++){var Rt=this.sampleCurveX(nt)-G;if(Math.abs(Rt)Rt?Qt=nt:be=nt,nt=.5*(be-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var f=r(i);let x,y;function v(){return x==null&&(x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),x}function T(){if(y==null&&(y=!1,v())){let G=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(G){for(let nt=0;nt<25;nt++){let _t=4*nt;G.fillStyle=`rgb(${_t},${_t+1},${_t+2})`,G.fillRect(nt%5,Math.floor(nt/5),1,1)}let D=G.getImageData(0,0,5,5).data;for(let nt=0;nt<100;nt++)if(nt%4!=3&&D[nt]!==nt){y=!0;break}}}return y||!1}function u(G,D,nt,_t){let Rt=new f(G,D,nt,_t);return Kt=>Rt.solve(Kt)}let b=u(.25,.1,.25,1);function _(G,D,nt){return Math.min(nt,Math.max(D,G))}function C(G,D,nt){let _t=nt-D,Rt=((G-D)%_t+_t)%_t+D;return Rt===D?nt:Rt}function M(G,...D){for(let nt of D)for(let _t in nt)G[_t]=nt[_t];return G}let E=1;function A(G,D,nt){let _t={};for(let Rt in G)_t[Rt]=D.call(this,G[Rt],Rt,G);return _t}function h(G,D,nt){let _t={};for(let Rt in G)D.call(this,G[Rt],Rt,G)&&(_t[Rt]=G[Rt]);return _t}function p(G){return Array.isArray(G)?G.map(p):typeof G=="object"&&G?A(G,p):G}let k={};function w(G){k[G]||(typeof console<"u"&&console.warn(G),k[G]=!0)}function R(G,D,nt){return(nt.y-G.y)*(D.x-G.x)>(D.y-G.y)*(nt.x-G.x)}function O(G){return typeof WorkerGlobalScope<"u"&&G!==void 0&&G instanceof WorkerGlobalScope}let N=null;function V(G){return typeof ImageBitmap<"u"&&G instanceof ImageBitmap}let H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function F(G,D,nt,_t,Rt){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let Kt=new VideoFrame(G,{timestamp:0});try{let Qt=Kt?.format;if(!Qt||!Qt.startsWith("BGR")&&!Qt.startsWith("RGB"))throw new Error(`Unrecognized format ${Qt}`);let be=Qt.startsWith("BGR"),Re=new Uint8ClampedArray(_t*Rt*4);if(yield Kt.copyTo(Re,function(er,xr,Er,Zr,sn){let yn=4*Math.max(-xr,0),Ln=(Math.max(0,Er)-Er)*Zr*4+yn,$n=4*Zr,wi=Math.max(0,xr),Ta=Math.max(0,Er);return{rect:{x:wi,y:Ta,width:Math.min(er.width,xr+Zr)-wi,height:Math.min(er.height,Er+sn)-Ta},layout:[{offset:Ln,stride:$n}]}}(G,D,nt,_t,Rt)),be)for(let er=0;erO(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,dt=function(G,D){if(/:\/\//.test(G.url)&&!/^https?:|^file:/.test(G.url)){let _t=yt(G.url);if(_t)return _t(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,targetMapId:pt},D)}if(!(/^file:/.test(nt=G.url)||/^file:/.test(tt())&&!/^\w+:/.test(nt))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(_t,Rt){return e(this,void 0,void 0,function*(){let Kt=new Request(_t.url,{method:_t.method||"GET",body:_t.body,credentials:_t.credentials,headers:_t.headers,cache:_t.cache,referrer:tt(),signal:Rt.signal});_t.type!=="json"||Kt.headers.has("Accept")||Kt.headers.set("Accept","application/json");let Qt=yield fetch(Kt);if(!Qt.ok){let er=yield Qt.blob();throw new st(Qt.status,Qt.statusText,_t.url,er)}let be;be=_t.type==="arrayBuffer"||_t.type==="image"?Qt.arrayBuffer():_t.type==="json"?Qt.json():Qt.text();let Re=yield be;if(Rt.signal.aborted)throw X();return{data:Re,cacheControl:Qt.headers.get("Cache-Control"),expires:Qt.headers.get("Expires")}})}(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,mustQueue:!0,targetMapId:pt},D)}var nt;return function(_t,Rt){return new Promise((Kt,Qt)=>{var be;let Re=new XMLHttpRequest;Re.open(_t.method||"GET",_t.url,!0),_t.type!=="arrayBuffer"&&_t.type!=="image"||(Re.responseType="arraybuffer");for(let er in _t.headers)Re.setRequestHeader(er,_t.headers[er]);_t.type==="json"&&(Re.responseType="text",!((be=_t.headers)===null||be===void 0)&&be.Accept||Re.setRequestHeader("Accept","application/json")),Re.withCredentials=_t.credentials==="include",Re.onerror=()=>{Qt(new Error(Re.statusText))},Re.onload=()=>{if(!Rt.signal.aborted)if((Re.status>=200&&Re.status<300||Re.status===0)&&Re.response!==null){let er=Re.response;if(_t.type==="json")try{er=JSON.parse(Re.response)}catch(xr){return void Qt(xr)}Kt({data:er,cacheControl:Re.getResponseHeader("Cache-Control"),expires:Re.getResponseHeader("Expires")})}else{let er=new Blob([Re.response],{type:Re.getResponseHeader("Content-Type")});Qt(new st(Re.status,Re.statusText,_t.url,er))}},Rt.signal.addEventListener("abort",()=>{Re.abort(),Qt(X())}),Re.send(_t.body)})}(G,D)};function rt(G){if(!G||G.indexOf("://")<=0||G.indexOf("data:image/")===0||G.indexOf("blob:")===0)return!0;let D=new URL(G),nt=window.location;return D.protocol===nt.protocol&&D.host===nt.host}function at(G,D,nt){nt[G]&&nt[G].indexOf(D)!==-1||(nt[G]=nt[G]||[],nt[G].push(D))}function vt(G,D,nt){if(nt&&nt[G]){let _t=nt[G].indexOf(D);_t!==-1&&nt[G].splice(_t,1)}}class it{constructor(D,nt={}){M(this,nt),this.type=D}}class Y extends it{constructor(D,nt={}){super("error",M({error:D},nt))}}class ft{on(D,nt){return this._listeners=this._listeners||{},at(D,nt,this._listeners),this}off(D,nt){return vt(D,nt,this._listeners),vt(D,nt,this._oneTimeListeners),this}once(D,nt){return nt?(this._oneTimeListeners=this._oneTimeListeners||{},at(D,nt,this._oneTimeListeners),this):new Promise(_t=>this.once(D,_t))}fire(D,nt){typeof D=="string"&&(D=new it(D,nt||{}));let _t=D.type;if(this.listens(_t)){D.target=this;let Rt=this._listeners&&this._listeners[_t]?this._listeners[_t].slice():[];for(let be of Rt)be.call(this,D);let Kt=this._oneTimeListeners&&this._oneTimeListeners[_t]?this._oneTimeListeners[_t].slice():[];for(let be of Kt)vt(_t,be,this._oneTimeListeners),be.call(this,D);let Qt=this._eventedParent;Qt&&(M(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Qt.fire(D))}else D instanceof Y&&console.error(D.error);return this}listens(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)}setEventedParent(D,nt){return this._eventedParent=D,this._eventedParentData=nt,this}}var ut={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let wt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function zt(G,D){let nt={};for(let _t in G)_t!=="ref"&&(nt[_t]=G[_t]);return wt.forEach(_t=>{_t in D&&(nt[_t]=D[_t])}),nt}function Pt(G,D){if(Array.isArray(G)){if(!Array.isArray(D)||G.length!==D.length)return!1;for(let nt=0;nt`:G.itemType.kind==="value"?"array":`array<${D}>`}return G.kind}let Ct=[oe,Te,He,Ge,cr,br,ur,Gt(jr),Kr,rn,Ce];function gt(G,D){if(D.kind==="error")return null;if(G.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!gt(G.itemType,D.itemType))&&(typeof G.N!="number"||G.N===D.N))return null}else{if(G.kind===D.kind)return null;if(G.kind==="value"){for(let nt of Ct)if(!gt(nt,D))return null}}return`Expected ${ne(G)} but found ${ne(D)} instead.`}function St(G,D){return D.some(nt=>nt.kind===G.kind)}function Nt(G,D){return D.some(nt=>nt==="null"?G===null:nt==="array"?Array.isArray(G):nt==="object"?G&&!Array.isArray(G)&&typeof G=="object":nt===typeof G)}function re(G,D){return G.kind==="array"&&D.kind==="array"?G.itemType.kind===D.itemType.kind&&typeof G.N=="number":G.kind===D.kind}let le=.96422,we=.82521,Ue=4/29,qe=6/29,or=3*qe*qe,Ar=qe*qe*qe,Tr=Math.PI/180,pr=180/Math.PI;function Jr(G){return(G%=360)<0&&(G+=360),G}function Vn([G,D,nt,_t]){let Rt,Kt,Qt=Kn((.2225045*(G=Hn(G))+.7168786*(D=Hn(D))+.0606169*(nt=Hn(nt)))/1);G===D&&D===nt?Rt=Kt=Qt:(Rt=Kn((.4360747*G+.3850649*D+.1430804*nt)/le),Kt=Kn((.0139322*G+.0971045*D+.7141733*nt)/we));let be=116*Qt-16;return[be<0?0:be,500*(Rt-Qt),200*(Qt-Kt),_t]}function Hn(G){return G<=.04045?G/12.92:Math.pow((G+.055)/1.055,2.4)}function Kn(G){return G>Ar?Math.pow(G,1/3):G/or+Ue}function Ci([G,D,nt,_t]){let Rt=(G+16)/116,Kt=isNaN(D)?Rt:Rt+D/500,Qt=isNaN(nt)?Rt:Rt-nt/200;return Rt=1*qn(Rt),Kt=le*qn(Kt),Qt=we*qn(Qt),[ii(3.1338561*Kt-1.6168667*Rt-.4906146*Qt),ii(-.9787684*Kt+1.9161415*Rt+.033454*Qt),ii(.0719453*Kt-.2289914*Rt+1.4052427*Qt),_t]}function ii(G){return(G=G<=.00304?12.92*G:1.055*Math.pow(G,1/2.4)-.055)<0?0:G>1?1:G}function qn(G){return G>qe?G*G*G:or*(G-Ue)}function aa(G){return parseInt(G.padEnd(2,G),16)/255}function Vi(G,D){return We(D?G/100:G,0,1)}function We(G,D,nt){return Math.min(Math.max(D,G),nt)}function rr(G){return!G.some(Number.isNaN)}let fr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class _r{constructor(D,nt,_t,Rt=1,Kt=!0){this.r=D,this.g=nt,this.b=_t,this.a=Rt,Kt||(this.r*=Rt,this.g*=Rt,this.b*=Rt,Rt||this.overwriteGetter("rgb",[D,nt,_t,Rt]))}static parse(D){if(D instanceof _r)return D;if(typeof D!="string")return;let nt=function(_t){if((_t=_t.toLowerCase().trim())==="transparent")return[0,0,0,0];let Rt=fr[_t];if(Rt){let[Qt,be,Re]=Rt;return[Qt/255,be/255,Re/255,1]}if(_t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(_t)){let Qt=_t.length<6?1:2,be=1;return[aa(_t.slice(be,be+=Qt)),aa(_t.slice(be,be+=Qt)),aa(_t.slice(be,be+=Qt)),aa(_t.slice(be,be+Qt)||"ff")]}if(_t.startsWith("rgb")){let Qt=_t.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Qt){let[be,Re,er,xr,Er,Zr,sn,yn,Ln,$n,wi,Ta]=Qt,Xi=[xr||" ",sn||" ",$n].join("");if(Xi===" "||Xi===" /"||Xi===",,"||Xi===",,,"){let da=[er,Zr,Ln].join(""),Ga=da==="%%%"?100:da===""?255:0;if(Ga){let Ao=[We(+Re/Ga,0,1),We(+Er/Ga,0,1),We(+yn/Ga,0,1),wi?Vi(+wi,Ta):1];if(rr(Ao))return Ao}}return}}let Kt=_t.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Kt){let[Qt,be,Re,er,xr,Er,Zr,sn,yn]=Kt,Ln=[Re||" ",xr||" ",Zr].join("");if(Ln===" "||Ln===" /"||Ln===",,"||Ln===",,,"){let $n=[+be,We(+er,0,100),We(+Er,0,100),sn?Vi(+sn,yn):1];if(rr($n))return function([wi,Ta,Xi,da]){function Ga(Ao){let Ms=(Ao+wi/30)%12,Sl=Ta*Math.min(Xi,1-Xi);return Xi-Sl*Math.max(-1,Math.min(Ms-3,9-Ms,1))}return wi=Jr(wi),Ta/=100,Xi/=100,[Ga(0),Ga(8),Ga(4),da]}($n)}}}(D);return nt?new _r(...nt,!1):void 0}get rgb(){let{r:D,g:nt,b:_t,a:Rt}=this,Kt=Rt||1/0;return this.overwriteGetter("rgb",[D/Kt,nt/Kt,_t/Kt,Rt])}get hcl(){return this.overwriteGetter("hcl",function(D){let[nt,_t,Rt,Kt]=Vn(D),Qt=Math.sqrt(_t*_t+Rt*Rt);return[Math.round(1e4*Qt)?Jr(Math.atan2(Rt,_t)*pr):NaN,Qt,nt,Kt]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Vn(this.rgb))}overwriteGetter(D,nt){return Object.defineProperty(this,D,{value:nt}),nt}toString(){let[D,nt,_t,Rt]=this.rgb;return`rgba(${[D,nt,_t].map(Kt=>Math.round(255*Kt)).join(",")},${Rt})`}}_r.black=new _r(0,0,0,1),_r.white=new _r(1,1,1,1),_r.transparent=new _r(0,0,0,0),_r.red=new _r(1,0,0,1);class Qr{constructor(D,nt,_t){this.sensitivity=D?nt?"variant":"case":nt?"accent":"base",this.locale=_t,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(D,nt){return this.collator.compare(D,nt)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Cn{constructor(D,nt,_t,Rt,Kt){this.text=D,this.image=nt,this.scale=_t,this.fontStack=Rt,this.textColor=Kt}}class bn{constructor(D){this.sections=D}static fromString(D){return new bn([new Cn(D,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(D=>D.text.length!==0||D.image&&D.image.name.length!==0)}static factory(D){return D instanceof bn?D:bn.fromString(D)}toString(){return this.sections.length===0?"":this.sections.map(D=>D.text).join("")}}class An{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof An)return D;if(typeof D=="number")return new An([D,D,D,D]);if(Array.isArray(D)&&!(D.length<1||D.length>4)){for(let nt of D)if(typeof nt!="number")return;switch(D.length){case 1:D=[D[0],D[0],D[0],D[0]];break;case 2:D=[D[0],D[1],D[0],D[1]];break;case 3:D=[D[0],D[1],D[2],D[1]]}return new An(D)}}toString(){return JSON.stringify(this.values)}}let ci=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class xi{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof xi)return D;if(Array.isArray(D)&&!(D.length<1)&&D.length%2==0){for(let nt=0;nt=0&&G<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof nt=="number"&&nt>=0&&nt<=255?_t===void 0||typeof _t=="number"&&_t>=0&&_t<=1?null:`Invalid rgba value [${[G,D,nt,_t].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof _t=="number"?[G,D,nt,_t]:[G,D,nt]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Zi(G){if(G===null||typeof G=="string"||typeof G=="boolean"||typeof G=="number"||G instanceof _r||G instanceof Qr||G instanceof bn||G instanceof An||G instanceof xi||G instanceof Li)return!0;if(Array.isArray(G)){for(let D of G)if(!Zi(D))return!1;return!0}if(typeof G=="object"){for(let D in G)if(!Zi(G[D]))return!1;return!0}return!1}function li(G){if(G===null)return oe;if(typeof G=="string")return He;if(typeof G=="boolean")return Ge;if(typeof G=="number")return Te;if(G instanceof _r)return cr;if(G instanceof Qr)return Hr;if(G instanceof bn)return br;if(G instanceof An)return Kr;if(G instanceof xi)return Ce;if(G instanceof Li)return rn;if(Array.isArray(G)){let D=G.length,nt;for(let _t of G){let Rt=li(_t);if(nt){if(nt===Rt)continue;nt=jr;break}nt=Rt}return Gt(nt||jr,D)}return ur}function La(G){let D=typeof G;return G===null?"":D==="string"||D==="number"||D==="boolean"?String(G):G instanceof _r||G instanceof bn||G instanceof An||G instanceof xi||G instanceof Li?G.toString():JSON.stringify(G)}class Wa{constructor(D,nt){this.type=D,this.value=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'literal' expression requires exactly one argument, but found ${D.length-1} instead.`);if(!Zi(D[1]))return nt.error("invalid value");let _t=D[1],Rt=li(_t),Kt=nt.expectedType;return Rt.kind!=="array"||Rt.N!==0||!Kt||Kt.kind!=="array"||typeof Kt.N=="number"&&Kt.N!==0||(Rt=Kt),new Wa(Rt,_t)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ze{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let Pe={string:He,number:Te,boolean:Ge,object:ur};class Rr{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let _t,Rt=1,Kt=D[0];if(Kt==="array"){let be,Re;if(D.length>2){let er=D[1];if(typeof er!="string"||!(er in Pe)||er==="object")return nt.error('The item type argument of "array" must be one of string, number, boolean',1);be=Pe[er],Rt++}else be=jr;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return nt.error('The length argument to "array" must be a positive integer literal',2);Re=D[2],Rt++}_t=Gt(be,Re)}else{if(!Pe[Kt])throw new Error(`Types doesn't contain name = ${Kt}`);_t=Pe[Kt]}let Qt=[];for(;RtD.outputDefined())}}let qr={"to-boolean":Ge,"to-color":cr,"to-number":Te,"to-string":He};class $r{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let _t=D[0];if(!qr[_t])throw new Error(`Can't parse ${_t} as it is not part of the known types`);if((_t==="to-boolean"||_t==="to-string")&&D.length!==2)return nt.error("Expected one argument.");let Rt=qr[_t],Kt=[];for(let Qt=1;Qt4?`Invalid rbga value ${JSON.stringify(nt)}: expected an array containing either three or four numeric values.`:Oi(nt[0],nt[1],nt[2],nt[3]),!_t))return new _r(nt[0]/255,nt[1]/255,nt[2]/255,nt[3])}throw new ze(_t||`Could not parse color from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"padding":{let nt;for(let _t of this.args){nt=_t.evaluate(D);let Rt=An.parse(nt);if(Rt)return Rt}throw new ze(`Could not parse padding from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"variableAnchorOffsetCollection":{let nt;for(let _t of this.args){nt=_t.evaluate(D);let Rt=xi.parse(nt);if(Rt)return Rt}throw new ze(`Could not parse variableAnchorOffsetCollection from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"number":{let nt=null;for(let _t of this.args){if(nt=_t.evaluate(D),nt===null)return 0;let Rt=Number(nt);if(!isNaN(Rt))return Rt}throw new ze(`Could not convert ${JSON.stringify(nt)} to number.`)}case"formatted":return bn.fromString(La(this.args[0].evaluate(D)));case"resolvedImage":return Li.fromString(La(this.args[0].evaluate(D)));default:return La(this.args[0].evaluate(D))}}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let Br=["Unknown","Point","LineString","Polygon"];class Gr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Br[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(D){let nt=this._parseColorCache[D];return nt||(nt=this._parseColorCache[D]=_r.parse(D)),nt}}class fn{constructor(D,nt,_t=[],Rt,Kt=new ve,Qt=[]){this.registry=D,this.path=_t,this.key=_t.map(be=>`[${be}]`).join(""),this.scope=Kt,this.errors=Qt,this.expectedType=Rt,this._isConstant=nt}parse(D,nt,_t,Rt,Kt={}){return nt?this.concat(nt,_t,Rt)._parse(D,Kt):this._parse(D,Kt)}_parse(D,nt){function _t(Rt,Kt,Qt){return Qt==="assert"?new Rr(Kt,[Rt]):Qt==="coerce"?new $r(Kt,[Rt]):Rt}if(D!==null&&typeof D!="string"&&typeof D!="boolean"&&typeof D!="number"||(D=["literal",D]),Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Rt=D[0];if(typeof Rt!="string")return this.error(`Expression name must be a string, but found ${typeof Rt} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let Kt=this.registry[Rt];if(Kt){let Qt=Kt.parse(D,this);if(!Qt)return null;if(this.expectedType){let be=this.expectedType,Re=Qt.type;if(be.kind!=="string"&&be.kind!=="number"&&be.kind!=="boolean"&&be.kind!=="object"&&be.kind!=="array"||Re.kind!=="value")if(be.kind!=="color"&&be.kind!=="formatted"&&be.kind!=="resolvedImage"||Re.kind!=="value"&&Re.kind!=="string")if(be.kind!=="padding"||Re.kind!=="value"&&Re.kind!=="number"&&Re.kind!=="array")if(be.kind!=="variableAnchorOffsetCollection"||Re.kind!=="value"&&Re.kind!=="array"){if(this.checkSubtype(be,Re))return null}else Qt=_t(Qt,be,nt.typeAnnotation||"coerce");else Qt=_t(Qt,be,nt.typeAnnotation||"coerce");else Qt=_t(Qt,be,nt.typeAnnotation||"coerce");else Qt=_t(Qt,be,nt.typeAnnotation||"assert")}if(!(Qt instanceof Wa)&&Qt.type.kind!=="resolvedImage"&&this._isConstant(Qt)){let be=new Gr;try{Qt=new Wa(Qt.type,Qt.evaluate(be))}catch(Re){return this.error(Re.message),null}}return Qt}return this.error(`Unknown expression "${Rt}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(D===void 0?"'undefined' value invalid. Use null instead.":typeof D=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof D} instead.`)}concat(D,nt,_t){let Rt=typeof D=="number"?this.path.concat(D):this.path,Kt=_t?this.scope.concat(_t):this.scope;return new fn(this.registry,this._isConstant,Rt,nt||null,Kt,this.errors)}error(D,...nt){let _t=`${this.key}${nt.map(Rt=>`[${Rt}]`).join("")}`;this.errors.push(new te(_t,D))}checkSubtype(D,nt){let _t=gt(D,nt);return _t&&this.error(_t),_t}}class an{constructor(D,nt){this.type=nt.type,this.bindings=[].concat(D),this.result=nt}evaluate(D){return this.result.evaluate(D)}eachChild(D){for(let nt of this.bindings)D(nt[1]);D(this.result)}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found ${D.length-1} instead.`);let _t=[];for(let Kt=1;Kt=_t.length)throw new ze(`Array index out of bounds: ${nt} > ${_t.length-1}.`);if(nt!==Math.floor(nt))throw new ze(`Array index must be an integer, but found ${nt} instead.`);return _t[nt]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class Vr{constructor(D,nt){this.type=Ge,this.needle=D,this.haystack=nt}static parse(D,nt){if(D.length!==3)return nt.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let _t=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,jr);return _t&&Rt?St(_t.type,[Ge,He,Te,oe,jr])?new Vr(_t,Rt):nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(_t.type)} instead`):null}evaluate(D){let nt=this.needle.evaluate(D),_t=this.haystack.evaluate(D);if(!_t)return!1;if(!Nt(nt,["boolean","string","number","null"]))throw new ze(`Expected first argument to be of type boolean, string, number or null, but found ${ne(li(nt))} instead.`);if(!Nt(_t,["string","array"]))throw new ze(`Expected second argument to be of type array or string, but found ${ne(li(_t))} instead.`);return _t.indexOf(nt)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class vn{constructor(D,nt,_t){this.type=Te,this.needle=D,this.haystack=nt,this.fromIndex=_t}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let _t=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,jr);if(!_t||!Rt)return null;if(!St(_t.type,[Ge,He,Te,oe,jr]))return nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(_t.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Te);return Kt?new vn(_t,Rt,Kt):null}return new vn(_t,Rt)}evaluate(D){let nt=this.needle.evaluate(D),_t=this.haystack.evaluate(D);if(!Nt(nt,["boolean","string","number","null"]))throw new ze(`Expected first argument to be of type boolean, string, number or null, but found ${ne(li(nt))} instead.`);let Rt;if(this.fromIndex&&(Rt=this.fromIndex.evaluate(D)),Nt(_t,["string"])){let Kt=_t.indexOf(nt,Rt);return Kt===-1?-1:[..._t.slice(0,Kt)].length}if(Nt(_t,["array"]))return _t.indexOf(nt,Rt);throw new ze(`Expected second argument to be of type array or string, but found ${ne(li(_t))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class Fn{constructor(D,nt,_t,Rt,Kt,Qt){this.inputType=D,this.type=nt,this.input=_t,this.cases=Rt,this.outputs=Kt,this.otherwise=Qt}static parse(D,nt){if(D.length<5)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if(D.length%2!=1)return nt.error("Expected an even number of arguments.");let _t,Rt;nt.expectedType&&nt.expectedType.kind!=="value"&&(Rt=nt.expectedType);let Kt={},Qt=[];for(let er=2;erNumber.MAX_SAFE_INTEGER)return Zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof yn=="number"&&Math.floor(yn)!==yn)return Zr.error("Numeric branch labels must be integer values.");if(_t){if(Zr.checkSubtype(_t,li(yn)))return null}else _t=li(yn);if(Kt[String(yn)]!==void 0)return Zr.error("Branch labels must be unique.");Kt[String(yn)]=Qt.length}let sn=nt.parse(Er,er,Rt);if(!sn)return null;Rt=Rt||sn.type,Qt.push(sn)}let be=nt.parse(D[1],1,jr);if(!be)return null;let Re=nt.parse(D[D.length-1],D.length-1,Rt);return Re?be.type.kind!=="value"&&nt.concat(1).checkSubtype(_t,be.type)?null:new Fn(_t,Rt,be,Kt,Qt,Re):null}evaluate(D){let nt=this.input.evaluate(D);return(li(nt)===this.inputType&&this.outputs[this.cases[nt]]||this.otherwise).evaluate(D)}eachChild(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)}outputDefined(){return this.outputs.every(D=>D.outputDefined())&&this.otherwise.outputDefined()}}class Xn{constructor(D,nt,_t){this.type=D,this.branches=nt,this.otherwise=_t}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found only ${D.length-1}.`);if(D.length%2!=0)return nt.error("Expected an odd number of arguments.");let _t;nt.expectedType&&nt.expectedType.kind!=="value"&&(_t=nt.expectedType);let Rt=[];for(let Qt=1;Qtnt.outputDefined())&&this.otherwise.outputDefined()}}class Pn{constructor(D,nt,_t,Rt){this.type=D,this.input=nt,this.beginIndex=_t,this.endIndex=Rt}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let _t=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,Te);if(!_t||!Rt)return null;if(!St(_t.type,[Gt(jr),He,jr]))return nt.error(`Expected first argument to be of type array or string, but found ${ne(_t.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Te);return Kt?new Pn(_t.type,_t,Rt,Kt):null}return new Pn(_t.type,_t,Rt)}evaluate(D){let nt=this.input.evaluate(D),_t=this.beginIndex.evaluate(D),Rt;if(this.endIndex&&(Rt=this.endIndex.evaluate(D)),Nt(nt,["string"]))return[...nt].slice(_t,Rt).join("");if(Nt(nt,["array"]))return nt.slice(_t,Rt);throw new ze(`Expected first argument to be of type array or string, but found ${ne(li(nt))} instead.`)}eachChild(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)}outputDefined(){return!1}}function Sn(G,D){let nt=G.length-1,_t,Rt,Kt=0,Qt=nt,be=0;for(;Kt<=Qt;)if(be=Math.floor((Kt+Qt)/2),_t=G[be],Rt=G[be+1],_t<=D){if(be===nt||DD))throw new ze("Input is not a number.");Qt=be-1}return 0}class Zn{constructor(D,nt,_t){this.type=D,this.input=nt,this.labels=[],this.outputs=[];for(let[Rt,Kt]of _t)this.labels.push(Rt),this.outputs.push(Kt)}static parse(D,nt){if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");let _t=nt.parse(D[1],1,Te);if(!_t)return null;let Rt=[],Kt=null;nt.expectedType&&nt.expectedType.kind!=="value"&&(Kt=nt.expectedType);for(let Qt=1;Qt=be)return nt.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',er);let Er=nt.parse(Re,xr,Kt);if(!Er)return null;Kt=Kt||Er.type,Rt.push([be,Er])}return new Zn(Kt,_t,Rt)}evaluate(D){let nt=this.labels,_t=this.outputs;if(nt.length===1)return _t[0].evaluate(D);let Rt=this.input.evaluate(D);if(Rt<=nt[0])return _t[0].evaluate(D);let Kt=nt.length;return Rt>=nt[Kt-1]?_t[Kt-1].evaluate(D):_t[Sn(nt,Rt)].evaluate(D)}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function Ea(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}var Ri=Ja;function Ja(G,D,nt,_t){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(_t-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=_t}Ja.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,_t=0;_t<8;_t++){var Rt=this.sampleCurveX(nt)-G;if(Math.abs(Rt)Rt?Qt=nt:be=nt,nt=.5*(be-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var Xa=Ea(Ri);function Do(G,D,nt){return G+nt*(D-G)}function go(G,D,nt){return G.map((_t,Rt)=>Do(_t,D[Rt],nt))}let Fo={number:Do,color:function(G,D,nt,_t="rgb"){switch(_t){case"rgb":{let[Rt,Kt,Qt,be]=go(G.rgb,D.rgb,nt);return new _r(Rt,Kt,Qt,be,!1)}case"hcl":{let[Rt,Kt,Qt,be]=G.hcl,[Re,er,xr,Er]=D.hcl,Zr,sn;if(isNaN(Rt)||isNaN(Re))isNaN(Rt)?isNaN(Re)?Zr=NaN:(Zr=Re,Qt!==1&&Qt!==0||(sn=er)):(Zr=Rt,xr!==1&&xr!==0||(sn=Kt));else{let Ta=Re-Rt;Re>Rt&&Ta>180?Ta-=360:Re180&&(Ta+=360),Zr=Rt+nt*Ta}let[yn,Ln,$n,wi]=function([Ta,Xi,da,Ga]){return Ta=isNaN(Ta)?0:Ta*Tr,Ci([da,Math.cos(Ta)*Xi,Math.sin(Ta)*Xi,Ga])}([Zr,sn??Do(Kt,er,nt),Do(Qt,xr,nt),Do(be,Er,nt)]);return new _r(yn,Ln,$n,wi,!1)}case"lab":{let[Rt,Kt,Qt,be]=Ci(go(G.lab,D.lab,nt));return new _r(Rt,Kt,Qt,be,!1)}}},array:go,padding:function(G,D,nt){return new An(go(G.values,D.values,nt))},variableAnchorOffsetCollection:function(G,D,nt){let _t=G.values,Rt=D.values;if(_t.length!==Rt.length)throw new ze(`Cannot interpolate values of different length. from: ${G.toString()}, to: ${D.toString()}`);let Kt=[];for(let Qt=0;Qt<_t.length;Qt+=2){if(_t[Qt]!==Rt[Qt])throw new ze(`Cannot interpolate values containing mismatched anchors. from[${Qt}]: ${_t[Qt]}, to[${Qt}]: ${Rt[Qt]}`);Kt.push(_t[Qt]);let[be,Re]=_t[Qt+1],[er,xr]=Rt[Qt+1];Kt.push([Do(be,er,nt),Do(Re,xr,nt)])}return new xi(Kt)}};class za{constructor(D,nt,_t,Rt,Kt){this.type=D,this.operator=nt,this.interpolation=_t,this.input=Rt,this.labels=[],this.outputs=[];for(let[Qt,be]of Kt)this.labels.push(Qt),this.outputs.push(be)}static interpolationFactor(D,nt,_t,Rt){let Kt=0;if(D.name==="exponential")Kt=xs(nt,D.base,_t,Rt);else if(D.name==="linear")Kt=xs(nt,1,_t,Rt);else if(D.name==="cubic-bezier"){let Qt=D.controlPoints;Kt=new Xa(Qt[0],Qt[1],Qt[2],Qt[3]).solve(xs(nt,1,_t,Rt))}return Kt}static parse(D,nt){let[_t,Rt,Kt,...Qt]=D;if(!Array.isArray(Rt)||Rt.length===0)return nt.error("Expected an interpolation type expression.",1);if(Rt[0]==="linear")Rt={name:"linear"};else if(Rt[0]==="exponential"){let er=Rt[1];if(typeof er!="number")return nt.error("Exponential interpolation requires a numeric base.",1,1);Rt={name:"exponential",base:er}}else{if(Rt[0]!=="cubic-bezier")return nt.error(`Unknown interpolation type ${String(Rt[0])}`,1,0);{let er=Rt.slice(1);if(er.length!==4||er.some(xr=>typeof xr!="number"||xr<0||xr>1))return nt.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Rt={name:"cubic-bezier",controlPoints:er}}}if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");if(Kt=nt.parse(Kt,2,Te),!Kt)return null;let be=[],Re=null;_t==="interpolate-hcl"||_t==="interpolate-lab"?Re=cr:nt.expectedType&&nt.expectedType.kind!=="value"&&(Re=nt.expectedType);for(let er=0;er=xr)return nt.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zr);let yn=nt.parse(Er,sn,Re);if(!yn)return null;Re=Re||yn.type,be.push([xr,yn])}return re(Re,Te)||re(Re,cr)||re(Re,Kr)||re(Re,Ce)||re(Re,Gt(Te))?new za(Re,_t,Rt,Kt,be):nt.error(`Type ${ne(Re)} is not interpolatable.`)}evaluate(D){let nt=this.labels,_t=this.outputs;if(nt.length===1)return _t[0].evaluate(D);let Rt=this.input.evaluate(D);if(Rt<=nt[0])return _t[0].evaluate(D);let Kt=nt.length;if(Rt>=nt[Kt-1])return _t[Kt-1].evaluate(D);let Qt=Sn(nt,Rt),be=za.interpolationFactor(this.interpolation,Rt,nt[Qt],nt[Qt+1]),Re=_t[Qt].evaluate(D),er=_t[Qt+1].evaluate(D);switch(this.operator){case"interpolate":return Fo[this.type.kind](Re,er,be);case"interpolate-hcl":return Fo.color(Re,er,be,"hcl");case"interpolate-lab":return Fo.color(Re,er,be,"lab")}}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function xs(G,D,nt,_t){let Rt=_t-nt,Kt=G-nt;return Rt===0?0:D===1?Kt/Rt:(Math.pow(D,Kt)-1)/(Math.pow(D,Rt)-1)}class os{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expectected at least one argument.");let _t=null,Rt=nt.expectedType;Rt&&Rt.kind!=="value"&&(_t=Rt);let Kt=[];for(let be of D.slice(1)){let Re=nt.parse(be,1+Kt.length,_t,void 0,{typeAnnotation:"omit"});if(!Re)return null;_t=_t||Re.type,Kt.push(Re)}if(!_t)throw new Error("No output type");let Qt=Rt&&Kt.some(be=>gt(Rt,be.type));return new os(Qt?jr:_t,Kt)}evaluate(D){let nt,_t=null,Rt=0;for(let Kt of this.args)if(Rt++,_t=Kt.evaluate(D),_t&&_t instanceof Li&&!_t.available&&(nt||(nt=_t.name),_t=null,Rt===this.args.length&&(_t=nt)),_t!==null)break;return _t}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function cl(G,D){return G==="=="||G==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function Zo(G,D,nt,_t){return _t.compare(D,nt)===0}function Ks(G,D,nt){let _t=G!=="=="&&G!=="!=";return class HD{constructor(Kt,Qt,be){this.type=Ge,this.lhs=Kt,this.rhs=Qt,this.collator=be,this.hasUntypedArgument=Kt.type.kind==="value"||Qt.type.kind==="value"}static parse(Kt,Qt){if(Kt.length!==3&&Kt.length!==4)return Qt.error("Expected two or three arguments.");let be=Kt[0],Re=Qt.parse(Kt[1],1,jr);if(!Re)return null;if(!cl(be,Re.type))return Qt.concat(1).error(`"${be}" comparisons are not supported for type '${ne(Re.type)}'.`);let er=Qt.parse(Kt[2],2,jr);if(!er)return null;if(!cl(be,er.type))return Qt.concat(2).error(`"${be}" comparisons are not supported for type '${ne(er.type)}'.`);if(Re.type.kind!==er.type.kind&&Re.type.kind!=="value"&&er.type.kind!=="value")return Qt.error(`Cannot compare types '${ne(Re.type)}' and '${ne(er.type)}'.`);_t&&(Re.type.kind==="value"&&er.type.kind!=="value"?Re=new Rr(er.type,[Re]):Re.type.kind!=="value"&&er.type.kind==="value"&&(er=new Rr(Re.type,[er])));let xr=null;if(Kt.length===4){if(Re.type.kind!=="string"&&er.type.kind!=="string"&&Re.type.kind!=="value"&&er.type.kind!=="value")return Qt.error("Cannot use collator to compare non-string types.");if(xr=Qt.parse(Kt[3],3,Hr),!xr)return null}return new HD(Re,er,xr)}evaluate(Kt){let Qt=this.lhs.evaluate(Kt),be=this.rhs.evaluate(Kt);if(_t&&this.hasUntypedArgument){let Re=li(Qt),er=li(be);if(Re.kind!==er.kind||Re.kind!=="string"&&Re.kind!=="number")throw new ze(`Expected arguments for "${G}" to be (string, string) or (number, number), but found (${Re.kind}, ${er.kind}) instead.`)}if(this.collator&&!_t&&this.hasUntypedArgument){let Re=li(Qt),er=li(be);if(Re.kind!=="string"||er.kind!=="string")return D(Kt,Qt,be)}return this.collator?nt(Kt,Qt,be,this.collator.evaluate(Kt)):D(Kt,Qt,be)}eachChild(Kt){Kt(this.lhs),Kt(this.rhs),this.collator&&Kt(this.collator)}outputDefined(){return!0}}}let ss=Ks("==",function(G,D,nt){return D===nt},Zo),hl=Ks("!=",function(G,D,nt){return D!==nt},function(G,D,nt,_t){return!Zo(0,D,nt,_t)}),tl=Ks("<",function(G,D,nt){return D",function(G,D,nt){return D>nt},function(G,D,nt,_t){return _t.compare(D,nt)>0}),cs=Ks("<=",function(G,D,nt){return D<=nt},function(G,D,nt,_t){return _t.compare(D,nt)<=0}),Ps=Ks(">=",function(G,D,nt){return D>=nt},function(G,D,nt,_t){return _t.compare(D,nt)>=0});class Po{constructor(D,nt,_t){this.type=Hr,this.locale=_t,this.caseSensitive=D,this.diacriticSensitive=nt}static parse(D,nt){if(D.length!==2)return nt.error("Expected one argument.");let _t=D[1];if(typeof _t!="object"||Array.isArray(_t))return nt.error("Collator options argument must be an object.");let Rt=nt.parse(_t["case-sensitive"]!==void 0&&_t["case-sensitive"],1,Ge);if(!Rt)return null;let Kt=nt.parse(_t["diacritic-sensitive"]!==void 0&&_t["diacritic-sensitive"],1,Ge);if(!Kt)return null;let Qt=null;return _t.locale&&(Qt=nt.parse(_t.locale,1,He),!Qt)?null:new Po(Rt,Kt,Qt)}evaluate(D){return new Qr(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)}eachChild(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)}outputDefined(){return!1}}class Ts{constructor(D,nt,_t,Rt,Kt){this.type=He,this.number=D,this.locale=nt,this.currency=_t,this.minFractionDigits=Rt,this.maxFractionDigits=Kt}static parse(D,nt){if(D.length!==3)return nt.error("Expected two arguments.");let _t=nt.parse(D[1],1,Te);if(!_t)return null;let Rt=D[2];if(typeof Rt!="object"||Array.isArray(Rt))return nt.error("NumberFormat options argument must be an object.");let Kt=null;if(Rt.locale&&(Kt=nt.parse(Rt.locale,1,He),!Kt))return null;let Qt=null;if(Rt.currency&&(Qt=nt.parse(Rt.currency,1,He),!Qt))return null;let be=null;if(Rt["min-fraction-digits"]&&(be=nt.parse(Rt["min-fraction-digits"],1,Te),!be))return null;let Re=null;return Rt["max-fraction-digits"]&&(Re=nt.parse(Rt["max-fraction-digits"],1,Te),!Re)?null:new Ts(_t,Kt,Qt,be,Re)}evaluate(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))}eachChild(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)}outputDefined(){return!1}}class kl{constructor(D){this.type=br,this.sections=D}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let _t=D[1];if(!Array.isArray(_t)&&typeof _t=="object")return nt.error("First argument must be an image or text section.");let Rt=[],Kt=!1;for(let Qt=1;Qt<=D.length-1;++Qt){let be=D[Qt];if(Kt&&typeof be=="object"&&!Array.isArray(be)){Kt=!1;let Re=null;if(be["font-scale"]&&(Re=nt.parse(be["font-scale"],1,Te),!Re))return null;let er=null;if(be["text-font"]&&(er=nt.parse(be["text-font"],1,Gt(He)),!er))return null;let xr=null;if(be["text-color"]&&(xr=nt.parse(be["text-color"],1,cr),!xr))return null;let Er=Rt[Rt.length-1];Er.scale=Re,Er.font=er,Er.textColor=xr}else{let Re=nt.parse(D[Qt],1,jr);if(!Re)return null;let er=Re.type.kind;if(er!=="string"&&er!=="value"&&er!=="null"&&er!=="resolvedImage")return nt.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Kt=!0,Rt.push({content:Re,scale:null,font:null,textColor:null})}}return new kl(Rt)}evaluate(D){return new bn(this.sections.map(nt=>{let _t=nt.content.evaluate(D);return li(_t)===rn?new Cn("",_t,null,null,null):new Cn(La(_t),null,nt.scale?nt.scale.evaluate(D):null,nt.font?nt.font.evaluate(D).join(","):null,nt.textColor?nt.textColor.evaluate(D):null)}))}eachChild(D){for(let nt of this.sections)D(nt.content),nt.scale&&D(nt.scale),nt.font&&D(nt.font),nt.textColor&&D(nt.textColor)}outputDefined(){return!1}}class Hl{constructor(D){this.type=rn,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error("Expected two arguments.");let _t=nt.parse(D[1],1,He);return _t?new Hl(_t):nt.error("No image name provided.")}evaluate(D){let nt=this.input.evaluate(D),_t=Li.fromString(nt);return _t&&D.availableImages&&(_t.available=D.availableImages.indexOf(nt)>-1),_t}eachChild(D){D(this.input)}outputDefined(){return!1}}class Xl{constructor(D){this.type=Te,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error(`Expected 1 argument, but found ${D.length-1} instead.`);let _t=nt.parse(D[1],1);return _t?_t.type.kind!=="array"&&_t.type.kind!=="string"&&_t.type.kind!=="value"?nt.error(`Expected argument of type string or array, but found ${ne(_t.type)} instead.`):new Xl(_t):null}evaluate(D){let nt=this.input.evaluate(D);if(typeof nt=="string")return[...nt].length;if(Array.isArray(nt))return nt.length;throw new ze(`Expected value to be of type string or array, but found ${ne(li(nt))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Us=8192;function Ca(G,D){let nt=(180+G[0])/360,_t=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G[1]*Math.PI/360)))/360,Rt=Math.pow(2,D.z);return[Math.round(nt*Rt*Us),Math.round(_t*Rt*Us)]}function fo(G,D){let nt=Math.pow(2,D.z);return[(Rt=(G[0]/Us+D.x)/nt,360*Rt-180),(_t=(G[1]/Us+D.y)/nt,360/Math.PI*Math.atan(Math.exp((180-360*_t)*Math.PI/180))-90)];var _t,Rt}function qs(G,D){G[0]=Math.min(G[0],D[0]),G[1]=Math.min(G[1],D[1]),G[2]=Math.max(G[2],D[0]),G[3]=Math.max(G[3],D[1])}function Jl(G,D){return!(G[0]<=D[0]||G[2]>=D[2]||G[1]<=D[1]||G[3]>=D[3])}function Jo(G,D,nt){let _t=G[0]-D[0],Rt=G[1]-D[1],Kt=G[0]-nt[0],Qt=G[1]-nt[1];return _t*Qt-Kt*Rt==0&&_t*Kt<=0&&Rt*Qt<=0}function $l(G,D,nt,_t){return(Rt=[_t[0]-nt[0],_t[1]-nt[1]])[0]*(Kt=[D[0]-G[0],D[1]-G[1]])[1]-Rt[1]*Kt[0]!=0&&!(!zs(G,D,nt,_t)||!zs(nt,_t,G,D));var Rt,Kt}function ol(G,D,nt){for(let _t of nt)for(let Rt=0;Rt<_t.length-1;++Rt)if($l(G,D,_t[Rt],_t[Rt+1]))return!0;return!1}function Pl(G,D,nt=!1){let _t=!1;for(let be of D)for(let Re=0;Re(Rt=G)[1]!=(Qt=be[Re+1])[1]>Rt[1]&&Rt[0]<(Qt[0]-Kt[0])*(Rt[1]-Kt[1])/(Qt[1]-Kt[1])+Kt[0]&&(_t=!_t)}var Rt,Kt,Qt;return _t}function Ru(G,D){for(let nt of D)if(Pl(G,nt))return!0;return!1}function lo(G,D){for(let nt of G)if(!Pl(nt,D))return!1;for(let nt=0;nt0&&be<0||Qt<0&&be>0}function au(G,D,nt){let _t=[];for(let Rt=0;Rtnt[2]){let Rt=.5*_t,Kt=G[0]-nt[0]>Rt?-_t:nt[0]-G[0]>Rt?_t:0;Kt===0&&(Kt=G[0]-nt[2]>Rt?-_t:nt[2]-G[0]>Rt?_t:0),G[0]+=Kt}qs(D,G)}function Mu(G,D,nt,_t){let Rt=Math.pow(2,_t.z)*Us,Kt=[_t.x*Us,_t.y*Us],Qt=[];for(let be of G)for(let Re of be){let er=[Re.x+Kt[0],Re.y+Kt[1]];rs(er,D,nt,Rt),Qt.push(er)}return Qt}function Gu(G,D,nt,_t){let Rt=Math.pow(2,_t.z)*Us,Kt=[_t.x*Us,_t.y*Us],Qt=[];for(let Re of G){let er=[];for(let xr of Re){let Er=[xr.x+Kt[0],xr.y+Kt[1]];qs(D,Er),er.push(Er)}Qt.push(er)}if(D[2]-D[0]<=Rt/2){(be=D)[0]=be[1]=1/0,be[2]=be[3]=-1/0;for(let Re of Qt)for(let er of Re)rs(er,D,nt,Rt)}var be;return Qt}class bl{constructor(D,nt){this.type=Ge,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'within' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Zi(D[1])){let _t=D[1];if(_t.type==="FeatureCollection"){let Rt=[];for(let Kt of _t.features){let{type:Qt,coordinates:be}=Kt.geometry;Qt==="Polygon"&&Rt.push(be),Qt==="MultiPolygon"&&Rt.push(...be)}if(Rt.length)return new bl(_t,{type:"MultiPolygon",coordinates:Rt})}else if(_t.type==="Feature"){let Rt=_t.geometry.type;if(Rt==="Polygon"||Rt==="MultiPolygon")return new bl(_t,_t.geometry)}else if(_t.type==="Polygon"||_t.type==="MultiPolygon")return new bl(_t,_t)}return nt.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,_t){let Rt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(_t.type==="Polygon"){let be=au(_t.coordinates,Kt,Qt),Re=Mu(nt.geometry(),Rt,Kt,Qt);if(!Jl(Rt,Kt))return!1;for(let er of Re)if(!Pl(er,be))return!1}if(_t.type==="MultiPolygon"){let be=fl(_t.coordinates,Kt,Qt),Re=Mu(nt.geometry(),Rt,Kt,Qt);if(!Jl(Rt,Kt))return!1;for(let er of Re)if(!Ru(er,be))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,_t){let Rt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(_t.type==="Polygon"){let be=au(_t.coordinates,Kt,Qt),Re=Gu(nt.geometry(),Rt,Kt,Qt);if(!Jl(Rt,Kt))return!1;for(let er of Re)if(!lo(er,be))return!1}if(_t.type==="MultiPolygon"){let be=fl(_t.coordinates,Kt,Qt),Re=Gu(nt.geometry(),Rt,Kt,Qt);if(!Jl(Rt,Kt))return!1;for(let er of Re)if(!As(er,be))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Dl=class{constructor(G=[],D=(nt,_t)=>nt<_t?-1:nt>_t?1:0){if(this.data=G,this.length=this.data.length,this.compare=D,this.length>0)for(let nt=(this.length>>1)-1;nt>=0;nt--)this._down(nt)}push(G){this.data.push(G),this._up(this.length++)}pop(){if(this.length===0)return;let G=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),G}peek(){return this.data[0]}_up(G){let{data:D,compare:nt}=this,_t=D[G];for(;G>0;){let Rt=G-1>>1,Kt=D[Rt];if(nt(_t,Kt)>=0)break;D[G]=Kt,G=Rt}D[G]=_t}_down(G){let{data:D,compare:nt}=this,_t=this.length>>1,Rt=D[G];for(;G<_t;){let Kt=1+(G<<1),Qt=Kt+1;if(Qt=0)break;D[G]=D[Kt],G=Kt}D[G]=Rt}};function Ql(G,D,nt,_t,Rt){ru(G,D,nt,_t||G.length-1,Rt||mh)}function ru(G,D,nt,_t,Rt){for(;_t>nt;){if(_t-nt>600){var Kt=_t-nt+1,Qt=D-nt+1,be=Math.log(Kt),Re=.5*Math.exp(2*be/3),er=.5*Math.sqrt(be*Re*(Kt-Re)/Kt)*(Qt-Kt/2<0?-1:1);ru(G,D,Math.max(nt,Math.floor(D-Qt*Re/Kt+er)),Math.min(_t,Math.floor(D+(Kt-Qt)*Re/Kt+er)),Rt)}var xr=G[D],Er=nt,Zr=_t;for(oc(G,nt,D),Rt(G[_t],xr)>0&&oc(G,nt,_t);Er0;)Zr--}Rt(G[nt],xr)===0?oc(G,nt,Zr):oc(G,++Zr,_t),Zr<=D&&(nt=Zr+1),D<=Zr&&(_t=Zr-1)}}function oc(G,D,nt){var _t=G[D];G[D]=G[nt],G[nt]=_t}function mh(G,D){return GD?1:0}function Jc(G,D){if(G.length<=1)return[G];let nt=[],_t,Rt;for(let Kt of G){let Qt=Uf(Kt);Qt!==0&&(Kt.area=Math.abs(Qt),Rt===void 0&&(Rt=Qt<0),Rt===Qt<0?(_t&&nt.push(_t),_t=[Kt]):_t.push(Kt))}if(_t&&nt.push(_t),D>1)for(let Kt=0;Kt1?(er=D[Re+1][0],xr=D[Re+1][1]):sn>0&&(er+=Er/this.kx*sn,xr+=Zr/this.ky*sn)),Er=this.wrap(nt[0]-er)*this.kx,Zr=(nt[1]-xr)*this.ky;let yn=Er*Er+Zr*Zr;yn180;)D-=360;return D}}function fc(G,D){return D[0]-G[0]}function sc(G){return G[1]-G[0]+1}function dc(G,D){return G[1]>=G[0]&&G[1]G[1])return[null,null];let nt=sc(G);if(D){if(nt===2)return[G,null];let Rt=Math.floor(nt/2);return[[G[0],G[0]+Rt],[G[0]+Rt,G[1]]]}if(nt===1)return[G,null];let _t=Math.floor(nt/2)-1;return[[G[0],G[0]+_t],[G[0]+_t+1,G[1]]]}function cu(G,D){if(!dc(D,G.length))return[1/0,1/0,-1/0,-1/0];let nt=[1/0,1/0,-1/0,-1/0];for(let _t=D[0];_t<=D[1];++_t)qs(nt,G[_t]);return nt}function lc(G){let D=[1/0,1/0,-1/0,-1/0];for(let nt of G)for(let _t of nt)qs(D,_t);return D}function nl(G){return G[0]!==-1/0&&G[1]!==-1/0&&G[2]!==1/0&&G[3]!==1/0}function Gl(G,D,nt){if(!nl(G)||!nl(D))return NaN;let _t=0,Rt=0;return G[2]D[2]&&(_t=G[0]-D[2]),G[1]>D[3]&&(Rt=G[1]-D[3]),G[3]=_t)return _t;if(Jl(Rt,Kt)){if($d(G,D))return 0}else if($d(D,G))return 0;let Qt=1/0;for(let be of G)for(let Re=0,er=be.length,xr=er-1;Re0;){let Re=Qt.pop();if(Re[0]>=Kt)continue;let er=Re[1],xr=D?50:100;if(sc(er)<=xr){if(!dc(er,G.length))return NaN;if(D){let Er=el(G,er,nt,_t);if(isNaN(Er)||Er===0)return Er;Kt=Math.min(Kt,Er)}else for(let Er=er[0];Er<=er[1];++Er){let Zr=Id(G[Er],nt,_t);if(Kt=Math.min(Kt,Zr),Kt===0)return 0}}else{let Er=sh(er,D);ts(Qt,Kt,_t,G,be,Er[0]),ts(Qt,Kt,_t,G,be,Er[1])}}return Kt}function ec(G,D,nt,_t,Rt,Kt=1/0){let Qt=Math.min(Kt,Rt.distance(G[0],nt[0]));if(Qt===0)return Qt;let be=new Dl([[0,[0,G.length-1],[0,nt.length-1]]],fc);for(;be.length>0;){let Re=be.pop();if(Re[0]>=Qt)continue;let er=Re[1],xr=Re[2],Er=D?50:100,Zr=_t?50:100;if(sc(er)<=Er&&sc(xr)<=Zr){if(!dc(er,G.length)&&dc(xr,nt.length))return NaN;let sn;if(D&&_t)sn=Uh(G,er,nt,xr,Rt),Qt=Math.min(Qt,sn);else if(D&&!_t){let yn=G.slice(er[0],er[1]+1);for(let Ln=xr[0];Ln<=xr[1];++Ln)if(sn=Sh(nt[Ln],yn,Rt),Qt=Math.min(Qt,sn),Qt===0)return Qt}else if(!D&&_t){let yn=nt.slice(xr[0],xr[1]+1);for(let Ln=er[0];Ln<=er[1];++Ln)if(sn=Sh(G[Ln],yn,Rt),Qt=Math.min(Qt,sn),Qt===0)return Qt}else sn=xu(G,er,nt,xr,Rt),Qt=Math.min(Qt,sn)}else{let sn=sh(er,D),yn=sh(xr,_t);lf(be,Qt,Rt,G,nt,sn[0],yn[0]),lf(be,Qt,Rt,G,nt,sn[0],yn[1]),lf(be,Qt,Rt,G,nt,sn[1],yn[0]),lf(be,Qt,Rt,G,nt,sn[1],yn[1])}}return Qt}function Hf(G){return G.type==="MultiPolygon"?G.coordinates.map(D=>({type:"Polygon",coordinates:D})):G.type==="MultiLineString"?G.coordinates.map(D=>({type:"LineString",coordinates:D})):G.type==="MultiPoint"?G.coordinates.map(D=>({type:"Point",coordinates:D})):[G]}class Vh{constructor(D,nt){this.type=Te,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'distance' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Zi(D[1])){let _t=D[1];if(_t.type==="FeatureCollection")return new Vh(_t,_t.features.map(Rt=>Hf(Rt.geometry)).flat());if(_t.type==="Feature")return new Vh(_t,Hf(_t.geometry));if("type"in _t&&"coordinates"in _t)return new Vh(_t,Hf(_t))}return nt.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,_t){let Rt=nt.geometry(),Kt=Rt.flat().map(Re=>fo([Re.x,Re.y],nt.canonical));if(Rt.length===0)return NaN;let Qt=new Vf(Kt[0][1]),be=1/0;for(let Re of _t){switch(Re.type){case"Point":be=Math.min(be,ec(Kt,!1,[Re.coordinates],!1,Qt,be));break;case"LineString":be=Math.min(be,ec(Kt,!1,Re.coordinates,!0,Qt,be));break;case"Polygon":be=Math.min(be,lh(Kt,!1,Re.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,_t){let Rt=nt.geometry(),Kt=Rt.flat().map(Re=>fo([Re.x,Re.y],nt.canonical));if(Rt.length===0)return NaN;let Qt=new Vf(Kt[0][1]),be=1/0;for(let Re of _t){switch(Re.type){case"Point":be=Math.min(be,ec(Kt,!0,[Re.coordinates],!1,Qt,be));break;case"LineString":be=Math.min(be,ec(Kt,!0,Re.coordinates,!0,Qt,be));break;case"Polygon":be=Math.min(be,lh(Kt,!0,Re.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries);if(D.geometryType()==="Polygon")return function(nt,_t){let Rt=nt.geometry();if(Rt.length===0||Rt[0].length===0)return NaN;let Kt=Jc(Rt,0).map(Re=>Re.map(er=>er.map(xr=>fo([xr.x,xr.y],nt.canonical)))),Qt=new Vf(Kt[0][0][0][1]),be=1/0;for(let Re of _t)for(let er of Kt){switch(Re.type){case"Point":be=Math.min(be,lh([Re.coordinates],!1,er,Qt,be));break;case"LineString":be=Math.min(be,lh(Re.coordinates,!0,er,Qt,be));break;case"Polygon":be=Math.min(be,zl(er,Re.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let xf={"==":ss,"!=":hl,">":Bl,"<":tl,">=":Ps,"<=":cs,array:Rr,at:dr,boolean:Rr,case:Xn,coalesce:os,collator:Po,format:kl,image:Hl,in:Vr,"index-of":vn,interpolate:za,"interpolate-hcl":za,"interpolate-lab":za,length:Xl,let:an,literal:Wa,match:Fn,number:Rr,"number-format":Ts,object:Rr,slice:Pn,step:Zn,string:Rr,"to-boolean":$r,"to-color":$r,"to-number":$r,"to-string":$r,var:Ee,within:bl,distance:Vh};class uc{constructor(D,nt,_t,Rt){this.name=D,this.type=nt,this._evaluate=_t,this.args=Rt}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,nt){let _t=D[0],Rt=uc.definitions[_t];if(!Rt)return nt.error(`Unknown expression "${_t}". If you wanted a literal array, use ["literal", [...]].`,0);let Kt=Array.isArray(Rt)?Rt[0]:Rt.type,Qt=Array.isArray(Rt)?[[Rt[1],Rt[2]]]:Rt.overloads,be=Qt.filter(([er])=>!Array.isArray(er)||er.length===D.length-1),Re=null;for(let[er,xr]of be){Re=new fn(nt.registry,Wf,nt.path,null,nt.scope);let Er=[],Zr=!1;for(let sn=1;sn{return Zr=Er,Array.isArray(Zr)?`(${Zr.map(ne).join(", ")})`:`(${ne(Zr.type)}...)`;var Zr}).join(" | "),xr=[];for(let Er=1;Er{nt=D?nt&&Wf(_t):nt&&_t instanceof Wa}),!!nt&&qf(G)&&Xf(G,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function qf(G){if(G instanceof uc&&(G.name==="get"&&G.args.length===1||G.name==="feature-state"||G.name==="has"&&G.args.length===1||G.name==="properties"||G.name==="geometry-type"||G.name==="id"||/^filter-/.test(G.name))||G instanceof bl||G instanceof Vh)return!1;let D=!0;return G.eachChild(nt=>{D&&!qf(nt)&&(D=!1)}),D}function uh(G){if(G instanceof uc&&G.name==="feature-state")return!1;let D=!0;return G.eachChild(nt=>{D&&!uh(nt)&&(D=!1)}),D}function Xf(G,D){if(G instanceof uc&&D.indexOf(G.name)>=0)return!1;let nt=!0;return G.eachChild(_t=>{nt&&!Xf(_t,D)&&(nt=!1)}),nt}function Eh(G){return{result:"success",value:G}}function gh(G){return{result:"error",value:G}}function cc(G){return G["property-type"]==="data-driven"||G["property-type"]==="cross-faded-data-driven"}function ef(G){return!!G.expression&&G.expression.parameters.indexOf("zoom")>-1}function Zf(G){return!!G.expression&&G.expression.interpolated}function tu(G){return G instanceof Number?"number":G instanceof String?"string":G instanceof Boolean?"boolean":Array.isArray(G)?"array":G===null?"null":typeof G}function Lf(G){return typeof G=="object"&&G!==null&&!Array.isArray(G)}function Od(G){return G}function Jf(G,D){let nt=D.type==="color",_t=G.stops&&typeof G.stops[0][0]=="object",Rt=_t||!(_t||G.property!==void 0),Kt=G.type||(Zf(D)?"exponential":"interval");if(nt||D.type==="padding"){let xr=nt?_r.parse:An.parse;(G=Mt({},G)).stops&&(G.stops=G.stops.map(Er=>[Er[0],xr(Er[1])])),G.default=xr(G.default?G.default:D.default)}if(G.colorSpace&&(Qt=G.colorSpace)!=="rgb"&&Qt!=="hcl"&&Qt!=="lab")throw new Error(`Unknown color space: "${G.colorSpace}"`);var Qt;let be,Re,er;if(Kt==="exponential")be=td;else if(Kt==="interval")be=Nc;else if(Kt==="categorical"){be=Qf,Re=Object.create(null);for(let xr of G.stops)Re[xr[0]]=xr[1];er=typeof G.stops[0][0]}else{if(Kt!=="identity")throw new Error(`Unknown function type "${Kt}"`);be=zu}if(_t){let xr={},Er=[];for(let yn=0;ynyn[0]),evaluate:({zoom:yn},Ln)=>td({stops:Zr,base:G.base},D,yn).evaluate(yn,Ln)}}if(Rt){let xr=Kt==="exponential"?{name:"exponential",base:G.base!==void 0?G.base:1}:null;return{kind:"camera",interpolationType:xr,interpolationFactor:za.interpolationFactor.bind(void 0,xr),zoomStops:G.stops.map(Er=>Er[0]),evaluate:({zoom:Er})=>be(G,D,Er,Re,er)}}return{kind:"source",evaluate(xr,Er){let Zr=Er&&Er.properties?Er.properties[G.property]:void 0;return Zr===void 0?bf(G.default,D.default):be(G,D,Zr,Re,er)}}}function bf(G,D,nt){return G!==void 0?G:D!==void 0?D:nt!==void 0?nt:void 0}function Qf(G,D,nt,_t,Rt){return bf(typeof nt===Rt?_t[nt]:void 0,G.default,D.default)}function Nc(G,D,nt){if(tu(nt)!=="number")return bf(G.default,D.default);let _t=G.stops.length;if(_t===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[_t-1][0])return G.stops[_t-1][1];let Rt=Sn(G.stops.map(Kt=>Kt[0]),nt);return G.stops[Rt][1]}function td(G,D,nt){let _t=G.base!==void 0?G.base:1;if(tu(nt)!=="number")return bf(G.default,D.default);let Rt=G.stops.length;if(Rt===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[Rt-1][0])return G.stops[Rt-1][1];let Kt=Sn(G.stops.map(xr=>xr[0]),nt),Qt=function(xr,Er,Zr,sn){let yn=sn-Zr,Ln=xr-Zr;return yn===0?0:Er===1?Ln/yn:(Math.pow(Er,Ln)-1)/(Math.pow(Er,yn)-1)}(nt,_t,G.stops[Kt][0],G.stops[Kt+1][0]),be=G.stops[Kt][1],Re=G.stops[Kt+1][1],er=Fo[D.type]||Od;return typeof be.evaluate=="function"?{evaluate(...xr){let Er=be.evaluate.apply(void 0,xr),Zr=Re.evaluate.apply(void 0,xr);if(Er!==void 0&&Zr!==void 0)return er(Er,Zr,Qt,G.colorSpace)}}:er(be,Re,Qt,G.colorSpace)}function zu(G,D,nt){switch(D.type){case"color":nt=_r.parse(nt);break;case"formatted":nt=bn.fromString(nt.toString());break;case"resolvedImage":nt=Li.fromString(nt.toString());break;case"padding":nt=An.parse(nt);break;default:tu(nt)===D.type||D.type==="enum"&&D.values[nt]||(nt=void 0)}return bf(nt,G.default,D.default)}uc.register(xf,{error:[{kind:"error"},[He],(G,[D])=>{throw new ze(D.evaluate(G))}],typeof:[He,[jr],(G,[D])=>ne(li(D.evaluate(G)))],"to-rgba":[Gt(Te,4),[cr],(G,[D])=>{let[nt,_t,Rt,Kt]=D.evaluate(G).rgb;return[255*nt,255*_t,255*Rt,Kt]}],rgb:[cr,[Te,Te,Te],md],rgba:[cr,[Te,Te,Te,Te],md],has:{type:Ge,overloads:[[[He],(G,[D])=>Kf(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>Kf(D.evaluate(G),nt.evaluate(G))]]},get:{type:jr,overloads:[[[He],(G,[D])=>_f(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>_f(D.evaluate(G),nt.evaluate(G))]]},"feature-state":[jr,[He],(G,[D])=>_f(D.evaluate(G),G.featureState||{})],properties:[ur,[],G=>G.properties()],"geometry-type":[He,[],G=>G.geometryType()],id:[jr,[],G=>G.id()],zoom:[Te,[],G=>G.globals.zoom],"heatmap-density":[Te,[],G=>G.globals.heatmapDensity||0],"line-progress":[Te,[],G=>G.globals.lineProgress||0],accumulated:[jr,[],G=>G.globals.accumulated===void 0?null:G.globals.accumulated],"+":[Te,Hh(Te),(G,D)=>{let nt=0;for(let _t of D)nt+=_t.evaluate(G);return nt}],"*":[Te,Hh(Te),(G,D)=>{let nt=1;for(let _t of D)nt*=_t.evaluate(G);return nt}],"-":{type:Te,overloads:[[[Te,Te],(G,[D,nt])=>D.evaluate(G)-nt.evaluate(G)],[[Te],(G,[D])=>-D.evaluate(G)]]},"/":[Te,[Te,Te],(G,[D,nt])=>D.evaluate(G)/nt.evaluate(G)],"%":[Te,[Te,Te],(G,[D,nt])=>D.evaluate(G)%nt.evaluate(G)],ln2:[Te,[],()=>Math.LN2],pi:[Te,[],()=>Math.PI],e:[Te,[],()=>Math.E],"^":[Te,[Te,Te],(G,[D,nt])=>Math.pow(D.evaluate(G),nt.evaluate(G))],sqrt:[Te,[Te],(G,[D])=>Math.sqrt(D.evaluate(G))],log10:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))/Math.LN10],ln:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))],log2:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))/Math.LN2],sin:[Te,[Te],(G,[D])=>Math.sin(D.evaluate(G))],cos:[Te,[Te],(G,[D])=>Math.cos(D.evaluate(G))],tan:[Te,[Te],(G,[D])=>Math.tan(D.evaluate(G))],asin:[Te,[Te],(G,[D])=>Math.asin(D.evaluate(G))],acos:[Te,[Te],(G,[D])=>Math.acos(D.evaluate(G))],atan:[Te,[Te],(G,[D])=>Math.atan(D.evaluate(G))],min:[Te,Hh(Te),(G,D)=>Math.min(...D.map(nt=>nt.evaluate(G)))],max:[Te,Hh(Te),(G,D)=>Math.max(...D.map(nt=>nt.evaluate(G)))],abs:[Te,[Te],(G,[D])=>Math.abs(D.evaluate(G))],round:[Te,[Te],(G,[D])=>{let nt=D.evaluate(G);return nt<0?-Math.round(-nt):Math.round(nt)}],floor:[Te,[Te],(G,[D])=>Math.floor(D.evaluate(G))],ceil:[Te,[Te],(G,[D])=>Math.ceil(D.evaluate(G))],"filter-==":[Ge,[He,jr],(G,[D,nt])=>G.properties()[D.value]===nt.value],"filter-id-==":[Ge,[jr],(G,[D])=>G.id()===D.value],"filter-type-==":[Ge,[He],(G,[D])=>G.geometryType()===D.value],"filter-<":[Ge,[He,jr],(G,[D,nt])=>{let _t=G.properties()[D.value],Rt=nt.value;return typeof _t==typeof Rt&&_t{let nt=G.id(),_t=D.value;return typeof nt==typeof _t&&nt<_t}],"filter->":[Ge,[He,jr],(G,[D,nt])=>{let _t=G.properties()[D.value],Rt=nt.value;return typeof _t==typeof Rt&&_t>Rt}],"filter-id->":[Ge,[jr],(G,[D])=>{let nt=G.id(),_t=D.value;return typeof nt==typeof _t&&nt>_t}],"filter-<=":[Ge,[He,jr],(G,[D,nt])=>{let _t=G.properties()[D.value],Rt=nt.value;return typeof _t==typeof Rt&&_t<=Rt}],"filter-id-<=":[Ge,[jr],(G,[D])=>{let nt=G.id(),_t=D.value;return typeof nt==typeof _t&&nt<=_t}],"filter->=":[Ge,[He,jr],(G,[D,nt])=>{let _t=G.properties()[D.value],Rt=nt.value;return typeof _t==typeof Rt&&_t>=Rt}],"filter-id->=":[Ge,[jr],(G,[D])=>{let nt=G.id(),_t=D.value;return typeof nt==typeof _t&&nt>=_t}],"filter-has":[Ge,[jr],(G,[D])=>D.value in G.properties()],"filter-has-id":[Ge,[],G=>G.id()!==null&&G.id()!==void 0],"filter-type-in":[Ge,[Gt(He)],(G,[D])=>D.value.indexOf(G.geometryType())>=0],"filter-id-in":[Ge,[Gt(jr)],(G,[D])=>D.value.indexOf(G.id())>=0],"filter-in-small":[Ge,[He,Gt(jr)],(G,[D,nt])=>nt.value.indexOf(G.properties()[D.value])>=0],"filter-in-large":[Ge,[He,Gt(jr)],(G,[D,nt])=>function(_t,Rt,Kt,Qt){for(;Kt<=Qt;){let be=Kt+Qt>>1;if(Rt[be]===_t)return!0;Rt[be]>_t?Qt=be-1:Kt=be+1}return!1}(G.properties()[D.value],nt.value,0,nt.value.length-1)],all:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)&&nt.evaluate(G)],[Hh(Ge),(G,D)=>{for(let nt of D)if(!nt.evaluate(G))return!1;return!0}]]},any:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)||nt.evaluate(G)],[Hh(Ge),(G,D)=>{for(let nt of D)if(nt.evaluate(G))return!0;return!1}]]},"!":[Ge,[Ge],(G,[D])=>!D.evaluate(G)],"is-supported-script":[Ge,[He],(G,[D])=>{let nt=G.globals&&G.globals.isSupportedScript;return!nt||nt(D.evaluate(G))}],upcase:[He,[He],(G,[D])=>D.evaluate(G).toUpperCase()],downcase:[He,[He],(G,[D])=>D.evaluate(G).toLowerCase()],concat:[He,Hh(jr),(G,D)=>D.map(nt=>La(nt.evaluate(G))).join("")],"resolved-locale":[He,[Hr],(G,[D])=>D.evaluate(G).resolvedLocale()]});class jc{constructor(D,nt){var _t;this.expression=D,this._warningHistory={},this._evaluator=new Gr,this._defaultValue=nt?(_t=nt).type==="color"&&Lf(_t.default)?new _r(0,0,0,0):_t.type==="color"?_r.parse(_t.default)||null:_t.type==="padding"?An.parse(_t.default)||null:_t.type==="variableAnchorOffsetCollection"?xi.parse(_t.default)||null:_t.default===void 0?null:_t.default:null,this._enumValues=nt&&nt.type==="enum"?nt.values:null}evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt){return this._evaluator.globals=D,this._evaluator.feature=nt,this._evaluator.featureState=_t,this._evaluator.canonical=Rt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt,this.expression.evaluate(this._evaluator)}evaluate(D,nt,_t,Rt,Kt,Qt){this._evaluator.globals=D,this._evaluator.feature=nt||null,this._evaluator.featureState=_t||null,this._evaluator.canonical=Rt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt||null;try{let be=this.expression.evaluate(this._evaluator);if(be==null||typeof be=="number"&&be!=be)return this._defaultValue;if(this._enumValues&&!(be in this._enumValues))throw new ze(`Expected value to be one of ${Object.keys(this._enumValues).map(Re=>JSON.stringify(Re)).join(", ")}, but found ${JSON.stringify(be)} instead.`);return be}catch(be){return this._warningHistory[be.message]||(this._warningHistory[be.message]=!0,typeof console<"u"&&console.warn(be.message)),this._defaultValue}}}function Wh(G){return Array.isArray(G)&&G.length>0&&typeof G[0]=="string"&&G[0]in xf}function hu(G,D){let nt=new fn(xf,Wf,[],D?function(Rt){let Kt={color:cr,string:He,number:Te,enum:He,boolean:Ge,formatted:br,padding:Kr,resolvedImage:rn,variableAnchorOffsetCollection:Ce};return Rt.type==="array"?Gt(Kt[Rt.value]||jr,Rt.length):Kt[Rt.type]}(D):void 0),_t=nt.parse(G,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return _t?Eh(new jc(_t,D)):gh(nt.errors)}class Ch{constructor(D,nt){this.kind=D,this._styleExpression=nt,this.isStateDependent=D!=="constant"&&!uh(nt.expression)}evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt)}evaluate(D,nt,_t,Rt,Kt,Qt){return this._styleExpression.evaluate(D,nt,_t,Rt,Kt,Qt)}}class Ec{constructor(D,nt,_t,Rt){this.kind=D,this.zoomStops=_t,this._styleExpression=nt,this.isStateDependent=D!=="camera"&&!uh(nt.expression),this.interpolationType=Rt}evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,_t,Rt,Kt,Qt)}evaluate(D,nt,_t,Rt,Kt,Qt){return this._styleExpression.evaluate(D,nt,_t,Rt,Kt,Qt)}interpolationFactor(D,nt,_t){return this.interpolationType?za.interpolationFactor(this.interpolationType,D,nt,_t):0}}function Uc(G,D){let nt=hu(G,D);if(nt.result==="error")return nt;let _t=nt.value.expression,Rt=qf(_t);if(!Rt&&!cc(D))return gh([new te("","data expressions not supported")]);let Kt=Xf(_t,["zoom"]);if(!Kt&&!ef(D))return gh([new te("","zoom expressions not supported")]);let Qt=uf(_t);return Qt||Kt?Qt instanceof te?gh([Qt]):Qt instanceof za&&!Zf(D)?gh([new te("",'"interpolate" expressions cannot be used with this property')]):Eh(Qt?new Ec(Rt?"camera":"composite",nt.value,Qt.labels,Qt instanceof za?Qt.interpolation:void 0):new Ch(Rt?"constant":"source",nt.value)):gh([new te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class _u{constructor(D,nt){this._parameters=D,this._specification=nt,Mt(this,Jf(this._parameters,this._specification))}static deserialize(D){return new _u(D._parameters,D._specification)}static serialize(D){return{_parameters:D._parameters,_specification:D._specification}}}function uf(G){let D=null;if(G instanceof an)D=uf(G.result);else if(G instanceof os){for(let nt of G.args)if(D=uf(nt),D)break}else(G instanceof Zn||G instanceof za)&&G.input instanceof uc&&G.input.name==="zoom"&&(D=G);return D instanceof te||G.eachChild(nt=>{let _t=uf(nt);_t instanceof te?D=_t:!D&&_t?D=new te("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&_t&&D!==_t&&(D=new te("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function vh(G){if(G===!0||G===!1)return!0;if(!Array.isArray(G)||G.length===0)return!1;switch(G[0]){case"has":return G.length>=2&&G[1]!=="$id"&&G[1]!=="$type";case"in":return G.length>=3&&(typeof G[1]!="string"||Array.isArray(G[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return G.length!==3||Array.isArray(G[1])||Array.isArray(G[2]);case"any":case"all":for(let D of G.slice(1))if(!vh(D)&&typeof D!="boolean")return!1;return!0;default:return!0}}let qh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Pf(G){if(G==null)return{filter:()=>!0,needGeometry:!1};vh(G)||(G=cf(G));let D=hu(G,qh);if(D.result==="error")throw new Error(D.value.map(nt=>`${nt.key}: ${nt.message}`).join(", "));return{filter:(nt,_t,Rt)=>D.value.evaluate(nt,_t,{},Rt),needGeometry:rp(G)}}function Dd(G,D){return GD?1:0}function rp(G){if(!Array.isArray(G))return!1;if(G[0]==="within"||G[0]==="distance")return!0;for(let D=1;D"||D==="<="||D===">="?zf(G[1],G[2],D):D==="any"?(nt=G.slice(1),["any"].concat(nt.map(cf))):D==="all"?["all"].concat(G.slice(1).map(cf)):D==="none"?["all"].concat(G.slice(1).map(cf).map(Qc)):D==="in"?Tc(G[1],G.slice(2)):D==="!in"?Qc(Tc(G[1],G.slice(2))):D==="has"?hf(G[1]):D!=="!has"||Qc(hf(G[1]));var nt}function zf(G,D,nt){switch(G){case"$type":return[`filter-type-${nt}`,D];case"$id":return[`filter-id-${nt}`,D];default:return[`filter-${nt}`,G,D]}}function Tc(G,D){if(D.length===0)return!1;switch(G){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(nt=>typeof nt!=typeof D[0])?["filter-in-large",G,["literal",D.sort(Dd)]]:["filter-in-small",G,["literal",D]]}}function hf(G){switch(G){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",G]}}function Qc(G){return["!",G]}function ff(G){let D=typeof G;if(D==="number"||D==="boolean"||D==="string"||G==null)return JSON.stringify(G);if(Array.isArray(G)){let Rt="[";for(let Kt of G)Rt+=`${ff(Kt)},`;return`${Rt}]`}let nt=Object.keys(G).sort(),_t="{";for(let Rt=0;Rt_t.maximum?[new Lt(D,nt,`${nt} is greater than the maximum value ${_t.maximum}`)]:[]}function wf(G){let D=G.valueSpec,nt=bu(G.value.type),_t,Rt,Kt,Qt={},be=nt!=="categorical"&&G.value.property===void 0,Re=!be,er=tu(G.value.stops)==="array"&&tu(G.value.stops[0])==="array"&&tu(G.value.stops[0][0])==="object",xr=Vc({key:G.key,value:G.value,valueSpec:G.styleSpec.function,validateSpec:G.validateSpec,style:G.style,styleSpec:G.styleSpec,objectElementValidators:{stops:function(sn){if(nt==="identity")return[new Lt(sn.key,sn.value,'identity function may not have a "stops" property')];let yn=[],Ln=sn.value;return yn=yn.concat(gd({key:sn.key,value:Ln,valueSpec:sn.valueSpec,validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec,arrayElementValidator:Er})),tu(Ln)==="array"&&Ln.length===0&&yn.push(new Lt(sn.key,Ln,"array must have at least one stop")),yn},default:function(sn){return sn.validateSpec({key:sn.key,value:sn.value,valueSpec:D,validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec})}}});return nt==="identity"&&be&&xr.push(new Lt(G.key,G.value,'missing required property "property"')),nt==="identity"||G.value.stops||xr.push(new Lt(G.key,G.value,'missing required property "stops"')),nt==="exponential"&&G.valueSpec.expression&&!Zf(G.valueSpec)&&xr.push(new Lt(G.key,G.value,"exponential functions not supported")),G.styleSpec.$version>=8&&(Re&&!cc(G.valueSpec)?xr.push(new Lt(G.key,G.value,"property functions not supported")):be&&!ef(G.valueSpec)&&xr.push(new Lt(G.key,G.value,"zoom functions not supported"))),nt!=="categorical"&&!er||G.value.property!==void 0||xr.push(new Lt(G.key,G.value,'"property" property is required')),xr;function Er(sn){let yn=[],Ln=sn.value,$n=sn.key;if(tu(Ln)!=="array")return[new Lt($n,Ln,`array expected, ${tu(Ln)} found`)];if(Ln.length!==2)return[new Lt($n,Ln,`array length 2 expected, length ${Ln.length} found`)];if(er){if(tu(Ln[0])!=="object")return[new Lt($n,Ln,`object expected, ${tu(Ln[0])} found`)];if(Ln[0].zoom===void 0)return[new Lt($n,Ln,"object stop key must have zoom")];if(Ln[0].value===void 0)return[new Lt($n,Ln,"object stop key must have value")];if(Kt&&Kt>bu(Ln[0].zoom))return[new Lt($n,Ln[0].zoom,"stop zoom values must appear in ascending order")];bu(Ln[0].zoom)!==Kt&&(Kt=bu(Ln[0].zoom),Rt=void 0,Qt={}),yn=yn.concat(Vc({key:`${$n}[0]`,value:Ln[0],valueSpec:{zoom:{}},validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec,objectElementValidators:{zoom:vu,value:Zr}}))}else yn=yn.concat(Zr({key:`${$n}[0]`,value:Ln[0],validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec},Ln));return Wh(Lh(Ln[1]))?yn.concat([new Lt(`${$n}[1]`,Ln[1],"expressions are not allowed in function stops.")]):yn.concat(sn.validateSpec({key:`${$n}[1]`,value:Ln[1],valueSpec:D,validateSpec:sn.validateSpec,style:sn.style,styleSpec:sn.styleSpec}))}function Zr(sn,yn){let Ln=tu(sn.value),$n=bu(sn.value),wi=sn.value!==null?sn.value:yn;if(_t){if(Ln!==_t)return[new Lt(sn.key,wi,`${Ln} stop domain type must match previous stop domain type ${_t}`)]}else _t=Ln;if(Ln!=="number"&&Ln!=="string"&&Ln!=="boolean")return[new Lt(sn.key,wi,"stop domain value must be a number, string, or boolean")];if(Ln!=="number"&&nt!=="categorical"){let Ta=`number expected, ${Ln} found`;return cc(D)&&nt===void 0&&(Ta+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Lt(sn.key,wi,Ta)]}return nt!=="categorical"||Ln!=="number"||isFinite($n)&&Math.floor($n)===$n?nt!=="categorical"&&Ln==="number"&&Rt!==void 0&&$nnew Lt(`${G.key}${_t.key}`,G.value,_t.message));let nt=D.value.expression||D.value._styleExpression.expression;if(G.expressionContext==="property"&&G.propertyKey==="text-font"&&!nt.outputDefined())return[new Lt(G.key,G.value,`Invalid data expression for "${G.propertyKey}". Output values must be contained as literals within the expression.`)];if(G.expressionContext==="property"&&G.propertyType==="layout"&&!uh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with layout properties.')];if(G.expressionContext==="filter"&&!uh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with filters.')];if(G.expressionContext&&G.expressionContext.indexOf("cluster")===0){if(!Xf(nt,["zoom","feature-state"]))return[new Lt(G.key,G.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(G.expressionContext==="cluster-initial"&&!qf(nt))return[new Lt(G.key,G.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function th(G){let D=G.key,nt=G.value,_t=G.valueSpec,Rt=[];return Array.isArray(_t.values)?_t.values.indexOf(bu(nt))===-1&&Rt.push(new Lt(D,nt,`expected one of [${_t.values.join(", ")}], ${JSON.stringify(nt)} found`)):Object.keys(_t.values).indexOf(bu(nt))===-1&&Rt.push(new Lt(D,nt,`expected one of [${Object.keys(_t.values).join(", ")}], ${JSON.stringify(nt)} found`)),Rt}function rf(G){return vh(Lh(G.value))?Zh(Mt({},G,{expressionContext:"filter",valueSpec:{value:"boolean"}})):$h(G)}function $h(G){let D=G.value,nt=G.key;if(tu(D)!=="array")return[new Lt(nt,D,`array expected, ${tu(D)} found`)];let _t=G.styleSpec,Rt,Kt=[];if(D.length<1)return[new Lt(nt,D,"filter array must have at least 1 element")];switch(Kt=Kt.concat(th({key:`${nt}[0]`,value:D[0],valueSpec:_t.filter_operator,style:G.style,styleSpec:G.styleSpec})),bu(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&bu(D[1])==="$type"&&Kt.push(new Lt(nt,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&Kt.push(new Lt(nt,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(Rt=tu(D[1]),Rt!=="string"&&Kt.push(new Lt(`${nt}[1]`,D[1],`string expected, ${Rt} found`)));for(let Qt=2;Qt{er in nt&&D.push(new Lt(_t,nt[er],`"${er}" is prohibited for ref layers`))}),Rt.layers.forEach(er=>{bu(er.id)===be&&(Re=er)}),Re?Re.ref?D.push(new Lt(_t,nt.ref,"ref cannot reference another ref layer")):Qt=bu(Re.type):D.push(new Lt(_t,nt.ref,`ref layer "${be}" not found`))}else if(Qt!=="background")if(nt.source){let Re=Rt.sources&&Rt.sources[nt.source],er=Re&&bu(Re.type);Re?er==="vector"&&Qt==="raster"?D.push(new Lt(_t,nt.source,`layer "${nt.id}" requires a raster source`)):er!=="raster-dem"&&Qt==="hillshade"?D.push(new Lt(_t,nt.source,`layer "${nt.id}" requires a raster-dem source`)):er==="raster"&&Qt!=="raster"?D.push(new Lt(_t,nt.source,`layer "${nt.id}" requires a vector source`)):er!=="vector"||nt["source-layer"]?er==="raster-dem"&&Qt!=="hillshade"?D.push(new Lt(_t,nt.source,"raster-dem source can only be used with layer type 'hillshade'.")):Qt!=="line"||!nt.paint||!nt.paint["line-gradient"]||er==="geojson"&&Re.lineMetrics||D.push(new Lt(_t,nt,`layer "${nt.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new Lt(_t,nt,`layer "${nt.id}" must specify a "source-layer"`)):D.push(new Lt(_t,nt.source,`source "${nt.source}" not found`))}else D.push(new Lt(_t,nt,'missing required property "source"'));return D=D.concat(Vc({key:_t,value:nt,valueSpec:Kt.layer,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,objectElementValidators:{"*":()=>[],type:()=>G.validateSpec({key:`${_t}.type`,value:nt.type,valueSpec:Kt.layer.type,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,object:nt,objectKey:"type"}),filter:rf,layout:Re=>Vc({layer:nt,key:Re.key,value:Re.value,style:Re.style,styleSpec:Re.styleSpec,validateSpec:Re.validateSpec,objectElementValidators:{"*":er=>vc(Mt({layerType:Qt},er))}}),paint:Re=>Vc({layer:nt,key:Re.key,value:Re.value,style:Re.style,styleSpec:Re.styleSpec,validateSpec:Re.validateSpec,objectElementValidators:{"*":er=>Fd(Mt({layerType:Qt},er))}})}})),D}function eh(G){let D=G.value,nt=G.key,_t=tu(D);return _t!=="string"?[new Lt(nt,D,`string expected, ${_t} found`)]:[]}let Ph={promoteId:function({key:G,value:D}){if(tu(D)==="string")return eh({key:G,value:D});{let nt=[];for(let _t in D)nt.push(...eh({key:`${G}.${_t}`,value:D[_t]}));return nt}}};function xh(G){let D=G.value,nt=G.key,_t=G.styleSpec,Rt=G.style,Kt=G.validateSpec;if(!D.type)return[new Lt(nt,D,'"type" is required')];let Qt=bu(D.type),be;switch(Qt){case"vector":case"raster":return be=Vc({key:nt,value:D,valueSpec:_t[`source_${Qt.replace("-","_")}`],style:G.style,styleSpec:_t,objectElementValidators:Ph,validateSpec:Kt}),be;case"raster-dem":return be=function(Re){var er;let xr=(er=Re.sourceName)!==null&&er!==void 0?er:"",Er=Re.value,Zr=Re.styleSpec,sn=Zr.source_raster_dem,yn=Re.style,Ln=[],$n=tu(Er);if(Er===void 0)return Ln;if($n!=="object")return Ln.push(new Lt("source_raster_dem",Er,`object expected, ${$n} found`)),Ln;let wi=bu(Er.encoding)==="custom",Ta=["redFactor","greenFactor","blueFactor","baseShift"],Xi=Re.value.encoding?`"${Re.value.encoding}"`:"Default";for(let da in Er)!wi&&Ta.includes(da)?Ln.push(new Lt(da,Er[da],`In "${xr}": "${da}" is only valid when "encoding" is set to "custom". ${Xi} encoding found`)):sn[da]?Ln=Ln.concat(Re.validateSpec({key:da,value:Er[da],valueSpec:sn[da],validateSpec:Re.validateSpec,style:yn,styleSpec:Zr})):Ln.push(new Lt(da,Er[da],`unknown property "${da}"`));return Ln}({sourceName:nt,value:D,style:G.style,styleSpec:_t,validateSpec:Kt}),be;case"geojson":if(be=Vc({key:nt,value:D,valueSpec:_t.source_geojson,style:Rt,styleSpec:_t,validateSpec:Kt,objectElementValidators:Ph}),D.cluster)for(let Re in D.clusterProperties){let[er,xr]=D.clusterProperties[Re],Er=typeof er=="string"?[er,["accumulated"],["get",Re]]:er;be.push(...Zh({key:`${nt}.${Re}.map`,value:xr,expressionContext:"cluster-map"})),be.push(...Zh({key:`${nt}.${Re}.reduce`,value:Er,expressionContext:"cluster-reduce"}))}return be;case"video":return Vc({key:nt,value:D,valueSpec:_t.source_video,style:Rt,validateSpec:Kt,styleSpec:_t});case"image":return Vc({key:nt,value:D,valueSpec:_t.source_image,style:Rt,validateSpec:Kt,styleSpec:_t});case"canvas":return[new Lt(nt,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return th({key:`${nt}.type`,value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Bu(G){let D=G.value,nt=G.styleSpec,_t=nt.light,Rt=G.style,Kt=[],Qt=tu(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("light",D,`object expected, ${Qt} found`)]),Kt;for(let be in D){let Re=be.match(/^(.*)-transition$/);Kt=Kt.concat(Re&&_t[Re[1]]&&_t[Re[1]].transition?G.validateSpec({key:be,value:D[be],valueSpec:nt.transition,validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):_t[be]?G.validateSpec({key:be,value:D[be],valueSpec:_t[be],validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)])}return Kt}function nu(G){let D=G.value,nt=G.styleSpec,_t=nt.sky,Rt=G.style,Kt=tu(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("sky",D,`object expected, ${Kt} found`)];let Qt=[];for(let be in D)Qt=Qt.concat(_t[be]?G.validateSpec({key:be,value:D[be],valueSpec:_t[be],style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Qt}function _h(G){let D=G.value,nt=G.styleSpec,_t=nt.terrain,Rt=G.style,Kt=[],Qt=tu(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("terrain",D,`object expected, ${Qt} found`)]),Kt;for(let be in D)Kt=Kt.concat(_t[be]?G.validateSpec({key:be,value:D[be],valueSpec:_t[be],validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Kt}function df(G){let D=[],nt=G.value,_t=G.key;if(Array.isArray(nt)){let Rt=[],Kt=[];for(let Qt in nt)nt[Qt].id&&Rt.includes(nt[Qt].id)&&D.push(new Lt(_t,nt,`all the sprites' ids must be unique, but ${nt[Qt].id} is duplicated`)),Rt.push(nt[Qt].id),nt[Qt].url&&Kt.includes(nt[Qt].url)&&D.push(new Lt(_t,nt,`all the sprites' URLs must be unique, but ${nt[Qt].url} is duplicated`)),Kt.push(nt[Qt].url),D=D.concat(Vc({key:`${_t}[${Qt}]`,value:nt[Qt],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:G.validateSpec}));return D}return eh({key:_t,value:nt})}let bh={"*":()=>[],array:gd,boolean:function(G){let D=G.value,nt=G.key,_t=tu(D);return _t!=="boolean"?[new Lt(nt,D,`boolean expected, ${_t} found`)]:[]},number:vu,color:function(G){let D=G.key,nt=G.value,_t=tu(nt);return _t!=="string"?[new Lt(D,nt,`color expected, ${_t} found`)]:_r.parse(String(nt))?[]:[new Lt(D,nt,`color expected, "${nt}" found`)]},constants:yh,enum:th,filter:rf,function:wf,layer:ed,object:Vc,source:xh,light:Bu,sky:nu,terrain:_h,projection:function(G){let D=G.value,nt=G.styleSpec,_t=nt.projection,Rt=G.style,Kt=tu(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("projection",D,`object expected, ${Kt} found`)];let Qt=[];for(let be in D)Qt=Qt.concat(_t[be]?G.validateSpec({key:be,value:D[be],valueSpec:_t[be],style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Qt},string:eh,formatted:function(G){return eh(G).length===0?[]:Zh(G)},resolvedImage:function(G){return eh(G).length===0?[]:Zh(G)},padding:function(G){let D=G.key,nt=G.value;if(tu(nt)==="array"){if(nt.length<1||nt.length>4)return[new Lt(D,nt,`padding requires 1 to 4 values; ${nt.length} values found`)];let _t={type:"number"},Rt=[];for(let Kt=0;Kt[]}})),G.constants&&(nt=nt.concat(yh({key:"constants",value:G.constants}))),un(nt)}function xn(G){return function(D){return G(Pr(Ir({},D),{validateSpec:$f}))}}function un(G){return[].concat(G).sort((D,nt)=>D.line-nt.line)}function Wn(G){return function(...D){return un(G.apply(this,D))}}Ur.source=Wn(xn(xh)),Ur.sprite=Wn(xn(df)),Ur.glyphs=Wn(xn(mr)),Ur.light=Wn(xn(Bu)),Ur.sky=Wn(xn(nu)),Ur.terrain=Wn(xn(_h)),Ur.layer=Wn(xn(ed)),Ur.filter=Wn(xn(rf)),Ur.paintProperty=Wn(xn(Fd)),Ur.layoutProperty=Wn(xn(vc));let hi=Ur,ea=hi.light,pa=hi.sky,Da=hi.paintProperty,$a=hi.layoutProperty;function la(G,D){let nt=!1;if(D&&D.length)for(let _t of D)G.fire(new Y(new Error(_t.message))),nt=!0;return nt}class Pa{constructor(D,nt,_t){let Rt=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let Qt=new Int32Array(this.arrayBuffer);D=Qt[0],this.d=(nt=Qt[1])+2*(_t=Qt[2]);for(let Re=0;Re=Er[yn+0]&&Rt>=Er[yn+1])?(be[sn]=!0,Qt.push(xr[sn])):be[sn]=!1}}}}_forEachCell(D,nt,_t,Rt,Kt,Qt,be,Re){let er=this._convertToCellCoord(D),xr=this._convertToCellCoord(nt),Er=this._convertToCellCoord(_t),Zr=this._convertToCellCoord(Rt);for(let sn=er;sn<=Er;sn++)for(let yn=xr;yn<=Zr;yn++){let Ln=this.d*yn+sn;if((!Re||Re(this._convertFromCellCoord(sn),this._convertFromCellCoord(yn),this._convertFromCellCoord(sn+1),this._convertFromCellCoord(yn+1)))&&Kt.call(this,D,nt,_t,Rt,Ln,Qt,be,Re))return}}_convertFromCellCoord(D){return(D-this.padding)/this.scale}_convertToCellCoord(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let D=this.cells,nt=3+this.cells.length+1+1,_t=0;for(let Qt=0;Qt=0)continue;let Qt=G[Kt];Rt[Kt]=ba[nt].shallow.indexOf(Kt)>=0?Qt:ls(Qt,D)}G instanceof Error&&(Rt.message=G.message)}if(Rt.$name)throw new Error("$name property is reserved for worker serialization logic.");return nt!=="Object"&&(Rt.$name=nt),Rt}function ms(G){if(Xo(G))return G;if(Array.isArray(G))return G.map(ms);if(typeof G!="object")throw new Error("can't deserialize object of type "+typeof G);let D=as(G)||"Object";if(!ba[D])throw new Error(`can't deserialize unregistered class ${D}`);let{klass:nt}=ba[D];if(!nt)throw new Error(`can't deserialize unregistered class ${D}`);if(nt.deserialize)return nt.deserialize(G);let _t=Object.create(nt.prototype);for(let Rt of Object.keys(G)){if(Rt==="$name")continue;let Kt=G[Rt];_t[Rt]=ba[D].shallow.indexOf(Rt)>=0?Kt:ms(Kt)}return _t}class oo{constructor(){this.first=!0}update(D,nt){let _t=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=_t,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=_t,!0):(this.lastFloorZoom>_t?(this.lastIntegerZoom=_t+1,this.lastIntegerZoomTime=nt):this.lastFloorZoom<_t&&(this.lastIntegerZoom=_t,this.lastIntegerZoomTime=nt),D!==this.lastZoom&&(this.lastZoom=D,this.lastFloorZoom=_t,!0))}}let qa={"Latin-1 Supplement":G=>G>=128&&G<=255,"Hangul Jamo":G=>G>=4352&&G<=4607,Khmer:G=>G>=6016&&G<=6143,"General Punctuation":G=>G>=8192&&G<=8303,"Letterlike Symbols":G=>G>=8448&&G<=8527,"Number Forms":G=>G>=8528&&G<=8591,"Miscellaneous Technical":G=>G>=8960&&G<=9215,"Control Pictures":G=>G>=9216&&G<=9279,"Optical Character Recognition":G=>G>=9280&&G<=9311,"Enclosed Alphanumerics":G=>G>=9312&&G<=9471,"Geometric Shapes":G=>G>=9632&&G<=9727,"Miscellaneous Symbols":G=>G>=9728&&G<=9983,"Miscellaneous Symbols and Arrows":G=>G>=11008&&G<=11263,"Ideographic Description Characters":G=>G>=12272&&G<=12287,"CJK Symbols and Punctuation":G=>G>=12288&&G<=12351,Katakana:G=>G>=12448&&G<=12543,Kanbun:G=>G>=12688&&G<=12703,"CJK Strokes":G=>G>=12736&&G<=12783,"Enclosed CJK Letters and Months":G=>G>=12800&&G<=13055,"CJK Compatibility":G=>G>=13056&&G<=13311,"Yijing Hexagram Symbols":G=>G>=19904&&G<=19967,"Private Use Area":G=>G>=57344&&G<=63743,"Vertical Forms":G=>G>=65040&&G<=65055,"CJK Compatibility Forms":G=>G>=65072&&G<=65103,"Small Form Variants":G=>G>=65104&&G<=65135,"Halfwidth and Fullwidth Forms":G=>G>=65280&&G<=65519};function vs(G){for(let D of G)if(vl(D.charCodeAt(0)))return!0;return!1}function rl(G){for(let D of G)if(!Wl(D.charCodeAt(0)))return!1;return!0}function Il(G){let D=G.map(nt=>{try{return new RegExp(`\\p{sc=${nt}}`,"u").source}catch{return null}}).filter(nt=>nt);return new RegExp(D.join("|"),"u")}let ou=Il(["Arab","Dupl","Mong","Ougr","Syrc"]);function Wl(G){return!ou.test(String.fromCodePoint(G))}let su=Il(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function vl(G){return!(G!==746&&G!==747&&(G<4352||!(qa["CJK Compatibility Forms"](G)&&!(G>=65097&&G<=65103)||qa["CJK Compatibility"](G)||qa["CJK Strokes"](G)||!(!qa["CJK Symbols and Punctuation"](G)||G>=12296&&G<=12305||G>=12308&&G<=12319||G===12336)||qa["Enclosed CJK Letters and Months"](G)||qa["Ideographic Description Characters"](G)||qa.Kanbun(G)||qa.Katakana(G)&&G!==12540||!(!qa["Halfwidth and Fullwidth Forms"](G)||G===65288||G===65289||G===65293||G>=65306&&G<=65310||G===65339||G===65341||G===65343||G>=65371&&G<=65503||G===65507||G>=65512&&G<=65519)||!(!qa["Small Form Variants"](G)||G>=65112&&G<=65118||G>=65123&&G<=65126)||qa["Vertical Forms"](G)||qa["Yijing Hexagram Symbols"](G)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(G))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(G))||su.test(String.fromCodePoint(G)))))}function qu(G){return!(vl(G)||function(D){return!!(qa["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||qa["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||qa["Letterlike Symbols"](D)||qa["Number Forms"](D)||qa["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||qa["Control Pictures"](D)&&D!==9251||qa["Optical Character Recognition"](D)||qa["Enclosed Alphanumerics"](D)||qa["Geometric Shapes"](D)||qa["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||qa["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||qa["CJK Symbols and Punctuation"](D)||qa.Katakana(D)||qa["Private Use Area"](D)||qa["CJK Compatibility Forms"](D)||qa["Small Form Variants"](D)||qa["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}(G))}let Lu=Il(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function fu(G){return Lu.test(String.fromCodePoint(G))}function Oo(G,D){return!(!D&&fu(G)||G>=2304&&G<=3583||G>=3840&&G<=4255||qa.Khmer(G))}function Es(G){for(let D of G)if(fu(D.charCodeAt(0)))return!0;return!1}let Yl=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(G){this.pluginStatus=G.pluginStatus,this.pluginURL=G.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(G){this.applyArabicShaping=G.applyArabicShaping,this.processBidirectionalText=G.processBidirectionalText,this.processStyledBidirectionalText=G.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Rl{constructor(D,nt){this.zoom=D,nt?(this.now=nt.now,this.fadeDuration=nt.fadeDuration,this.zoomHistory=nt.zoomHistory,this.transition=nt.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new oo,this.transition={})}isSupportedScript(D){return function(nt,_t){for(let Rt of nt)if(!Oo(Rt.charCodeAt(0),_t))return!1;return!0}(D,Yl.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let D=this.zoom,nt=D-Math.floor(D),_t=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:nt+(1-nt)*_t}:{fromScale:.5,toScale:1,t:1-(1-_t)*nt}}}class yc{constructor(D,nt){this.property=D,this.value=nt,this.expression=function(_t,Rt){if(Lf(_t))return new _u(_t,Rt);if(Wh(_t)){let Kt=Uc(_t,Rt);if(Kt.result==="error")throw new Error(Kt.value.map(Qt=>`${Qt.key}: ${Qt.message}`).join(", "));return Kt.value}{let Kt=_t;return Rt.type==="color"&&typeof _t=="string"?Kt=_r.parse(_t):Rt.type!=="padding"||typeof _t!="number"&&!Array.isArray(_t)?Rt.type==="variableAnchorOffsetCollection"&&Array.isArray(_t)&&(Kt=xi.parse(_t)):Kt=An.parse(_t),{kind:"constant",evaluate:()=>Kt}}}(nt===void 0?D.specification.default:nt,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,nt,_t){return this.property.possiblyEvaluate(this,D,nt,_t)}}class Hc{constructor(D){this.property=D,this.value=new yc(D,void 0)}transitioned(D,nt){return new zh(this.property,this.value,nt,M({},D.transition,this.transition),D.now)}untransitioned(){return new zh(this.property,this.value,null,{},0)}}class zc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)}getValue(D){return p(this._values[D].value.value)}setValue(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].value=new yc(this._values[D].property,nt===null?void 0:p(nt))}getTransition(D){return p(this._values[D].transition)}setTransition(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].transition=p(nt)||void 0}serialize(){let D={};for(let nt of Object.keys(this._values)){let _t=this.getValue(nt);_t!==void 0&&(D[nt]=_t);let Rt=this.getTransition(nt);Rt!==void 0&&(D[`${nt}-transition`]=Rt)}return D}transitioned(D,nt){let _t=new Wc(this._properties);for(let Rt of Object.keys(this._values))_t._values[Rt]=this._values[Rt].transitioned(D,nt._values[Rt]);return _t}untransitioned(){let D=new Wc(this._properties);for(let nt of Object.keys(this._values))D._values[nt]=this._values[nt].untransitioned();return D}}class zh{constructor(D,nt,_t,Rt,Kt){this.property=D,this.value=nt,this.begin=Kt+Rt.delay||0,this.end=this.begin+Rt.duration||0,D.specification.transition&&(Rt.delay||Rt.duration)&&(this.prior=_t)}possiblyEvaluate(D,nt,_t){let Rt=D.now||0,Kt=this.value.possiblyEvaluate(D,nt,_t),Qt=this.prior;if(Qt){if(Rt>this.end)return this.prior=null,Kt;if(this.value.isDataDriven())return this.prior=null,Kt;if(Rt=1)return 1;let er=Re*Re,xr=er*Re;return 4*(Re<.5?xr:3*(Re-er)+xr-.75)}(be))}}return Kt}}class Wc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,nt,_t){let Rt=new Oh(this._properties);for(let Kt of Object.keys(this._values))Rt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,_t);return Rt}hasTransition(){for(let D of Object.keys(this._values))if(this._values[D].prior)return!0;return!1}}class Ih{constructor(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)}hasValue(D){return this._values[D].value!==void 0}getValue(D){return p(this._values[D].value)}setValue(D,nt){this._values[D]=new yc(this._values[D].property,nt===null?void 0:p(nt))}serialize(){let D={};for(let nt of Object.keys(this._values)){let _t=this.getValue(nt);_t!==void 0&&(D[nt]=_t)}return D}possiblyEvaluate(D,nt,_t){let Rt=new Oh(this._properties);for(let Kt of Object.keys(this._values))Rt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,_t);return Rt}}class Iu{constructor(D,nt,_t){this.property=D,this.value=nt,this.parameters=_t}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,nt,_t,Rt){return this.property.evaluate(this.value,this.parameters,D,nt,_t,Rt)}}class Oh{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class is{constructor(D){this.specification=D}possiblyEvaluate(D,nt){if(D.isDataDriven())throw new Error("Value should not be data driven");return D.expression.evaluate(nt)}interpolate(D,nt,_t){let Rt=Fo[this.specification.type];return Rt?Rt(D,nt,_t):D}}class Os{constructor(D,nt){this.specification=D,this.overrides=nt}possiblyEvaluate(D,nt,_t,Rt){return new Iu(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(nt,null,{},_t,Rt)}:D.expression,nt)}interpolate(D,nt,_t){if(D.value.kind!=="constant"||nt.value.kind!=="constant")return D;if(D.value.value===void 0||nt.value.value===void 0)return new Iu(this,{kind:"constant",value:void 0},D.parameters);let Rt=Fo[this.specification.type];if(Rt){let Kt=Rt(D.value.value,nt.value.value,_t);return new Iu(this,{kind:"constant",value:Kt},D.parameters)}return D}evaluate(D,nt,_t,Rt,Kt,Qt){return D.kind==="constant"?D.value:D.evaluate(nt,_t,Rt,Kt,Qt)}}class qc extends Os{possiblyEvaluate(D,nt,_t,Rt){if(D.value===void 0)return new Iu(this,{kind:"constant",value:void 0},nt);if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},_t,Rt),Qt=D.property.specification.type==="resolvedImage"&&typeof Kt!="string"?Kt.name:Kt,be=this._calculate(Qt,Qt,Qt,nt);return new Iu(this,{kind:"constant",value:be},nt)}if(D.expression.kind==="camera"){let Kt=this._calculate(D.expression.evaluate({zoom:nt.zoom-1}),D.expression.evaluate({zoom:nt.zoom}),D.expression.evaluate({zoom:nt.zoom+1}),nt);return new Iu(this,{kind:"constant",value:Kt},nt)}return new Iu(this,D.expression,nt)}evaluate(D,nt,_t,Rt,Kt,Qt){if(D.kind==="source"){let be=D.evaluate(nt,_t,Rt,Kt,Qt);return this._calculate(be,be,be,nt)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(nt.zoom)-1},_t,Rt),D.evaluate({zoom:Math.floor(nt.zoom)},_t,Rt),D.evaluate({zoom:Math.floor(nt.zoom)+1},_t,Rt),nt):D.value}_calculate(D,nt,_t,Rt){return Rt.zoom>Rt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:_t,to:nt}}interpolate(D){return D}}class Zu{constructor(D){this.specification=D}possiblyEvaluate(D,nt,_t,Rt){if(D.value!==void 0){if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},_t,Rt);return this._calculate(Kt,Kt,Kt,nt)}return this._calculate(D.expression.evaluate(new Rl(Math.floor(nt.zoom-1),nt)),D.expression.evaluate(new Rl(Math.floor(nt.zoom),nt)),D.expression.evaluate(new Rl(Math.floor(nt.zoom+1),nt)),nt)}}_calculate(D,nt,_t,Rt){return Rt.zoom>Rt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:_t,to:nt}}interpolate(D){return D}}class Gf{constructor(D){this.specification=D}possiblyEvaluate(D,nt,_t,Rt){return!!D.expression.evaluate(nt,null,{},_t,Rt)}interpolate(){return!1}}class qt{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let nt in D){let _t=D[nt];_t.specification.overridable&&this.overridableProperties.push(nt);let Rt=this.defaultPropertyValues[nt]=new yc(_t,void 0),Kt=this.defaultTransitionablePropertyValues[nt]=new Hc(_t);this.defaultTransitioningPropertyValues[nt]=Kt.untransitioned(),this.defaultPossiblyEvaluatedValues[nt]=Rt.possiblyEvaluate({})}}}Ji("DataDrivenProperty",Os),Ji("DataConstantProperty",is),Ji("CrossFadedDataDrivenProperty",qc),Ji("CrossFadedProperty",Zu),Ji("ColorRampProperty",Gf);let I="-transition";class ht extends ft{constructor(D,nt){if(super(),this.id=D.id,this.type=D.type,this._featureFilter={filter:()=>!0,needGeometry:!1},D.type!=="custom"&&(this.metadata=D.metadata,this.minzoom=D.minzoom,this.maxzoom=D.maxzoom,D.type!=="background"&&(this.source=D.source,this.sourceLayer=D["source-layer"],this.filter=D.filter),nt.layout&&(this._unevaluatedLayout=new Ih(nt.layout)),nt.paint)){this._transitionablePaint=new zc(nt.paint);for(let _t in D.paint)this.setPaintProperty(_t,D.paint[_t],{validate:!1});for(let _t in D.layout)this.setLayoutProperty(_t,D.layout[_t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Oh(nt.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(D){return D==="visibility"?this.visibility:this._unevaluatedLayout.getValue(D)}setLayoutProperty(D,nt,_t={}){nt!=null&&this._validate($a,`layers.${this.id}.layout.${D}`,D,nt,_t)||(D!=="visibility"?this._unevaluatedLayout.setValue(D,nt):this.visibility=nt)}getPaintProperty(D){return D.endsWith(I)?this._transitionablePaint.getTransition(D.slice(0,-11)):this._transitionablePaint.getValue(D)}setPaintProperty(D,nt,_t={}){if(nt!=null&&this._validate(Da,`layers.${this.id}.paint.${D}`,D,nt,_t))return!1;if(D.endsWith(I))return this._transitionablePaint.setTransition(D.slice(0,-11),nt||void 0),!1;{let Rt=this._transitionablePaint._values[D],Kt=Rt.property.specification["property-type"]==="cross-faded-data-driven",Qt=Rt.value.isDataDriven(),be=Rt.value;this._transitionablePaint.setValue(D,nt),this._handleSpecialPaintPropertyUpdate(D);let Re=this._transitionablePaint._values[D].value;return Re.isDataDriven()||Qt||Kt||this._handleOverridablePaintPropertyUpdate(D,be,Re)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,nt,_t){return!1}isHidden(D){return!!(this.minzoom&&D=this.maxzoom)||this.visibility==="none"}updateTransitions(D){this._transitioningPaint=this._transitionablePaint.transitioned(D,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(D,nt){D.getCrossfadeParameters&&(this._crossfadeParameters=D.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(D,void 0,nt)),this.paint=this._transitioningPaint.possiblyEvaluate(D,void 0,nt)}serialize(){let D={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(D.layout=D.layout||{},D.layout.visibility=this.visibility),h(D,(nt,_t)=>!(nt===void 0||_t==="layout"&&!Object.keys(nt).length||_t==="paint"&&!Object.keys(nt).length))}_validate(D,nt,_t,Rt,Kt={}){return(!Kt||Kt.validate!==!1)&&la(this,D.call(hi,{key:nt,layerType:this.type,objectKey:_t,value:Rt,styleSpec:ut,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let D in this.paint._values){let nt=this.paint.get(D);if(nt instanceof Iu&&cc(nt.property.specification)&&(nt.value.kind==="source"||nt.value.kind==="composite")&&nt.value.isStateDependent)return!0}return!1}}let Et={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class It{constructor(D,nt){this._structArray=D,this._pos1=nt*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Vt{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(D,nt){return D._trim(),nt&&(D.isTransferred=!0,nt.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}}static deserialize(D){let nt=Object.create(this.prototype);return nt.arrayBuffer=D.arrayBuffer,nt.length=D.length,nt.capacity=D.arrayBuffer.byteLength/nt.bytesPerElement,nt._refreshViews(),nt}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(D){this.reserve(D),this.length=D}reserve(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let nt=this.uint8;this._refreshViews(),nt&&this.uint8.set(nt)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ke(G,D=1){let nt=0,_t=0;return{members:G.map(Rt=>{let Kt=Et[Rt.type].BYTES_PER_ELEMENT,Qt=nt=De(nt,Math.max(D,Kt)),be=Rt.components||1;return _t=Math.max(_t,Kt),nt+=Kt*be,{name:Rt.name,type:Rt.type,components:be,offset:Qt}}),size:De(nt,Math.max(_t,D)),alignment:D}}function De(G,D){return Math.ceil(G/D)*D}class Ke extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt){let _t=this.length;return this.resize(_t+1),this.emplace(_t,D,nt)}emplace(D,nt,_t){let Rt=2*D;return this.int16[Rt+0]=nt,this.int16[Rt+1]=_t,D}}Ke.prototype.bytesPerElement=4,Ji("StructArrayLayout2i4",Ke);class gr extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=3*D;return this.int16[Kt+0]=nt,this.int16[Kt+1]=_t,this.int16[Kt+2]=Rt,D}}gr.prototype.bytesPerElement=6,Ji("StructArrayLayout3i6",gr);class Dr extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,_t,Rt)}emplace(D,nt,_t,Rt,Kt){let Qt=4*D;return this.int16[Qt+0]=nt,this.int16[Qt+1]=_t,this.int16[Qt+2]=Rt,this.int16[Qt+3]=Kt,D}}Dr.prototype.bytesPerElement=8,Ji("StructArrayLayout4i8",Dr);class Fr extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,_t,Rt,Kt,Qt)}emplace(D,nt,_t,Rt,Kt,Qt,be){let Re=6*D;return this.int16[Re+0]=nt,this.int16[Re+1]=_t,this.int16[Re+2]=Rt,this.int16[Re+3]=Kt,this.int16[Re+4]=Qt,this.int16[Re+5]=be,D}}Fr.prototype.bytesPerElement=12,Ji("StructArrayLayout2i4i12",Fr);class ln extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,_t,Rt,Kt,Qt)}emplace(D,nt,_t,Rt,Kt,Qt,be){let Re=4*D,er=8*D;return this.int16[Re+0]=nt,this.int16[Re+1]=_t,this.uint8[er+4]=Rt,this.uint8[er+5]=Kt,this.uint8[er+6]=Qt,this.uint8[er+7]=be,D}}ln.prototype.bytesPerElement=8,Ji("StructArrayLayout2i4ub8",ln);class Mn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt){let _t=this.length;return this.resize(_t+1),this.emplace(_t,D,nt)}emplace(D,nt,_t){let Rt=2*D;return this.float32[Rt+0]=nt,this.float32[Rt+1]=_t,D}}Mn.prototype.bytesPerElement=8,Ji("StructArrayLayout2f8",Mn);class Xt extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr){let Er=this.length;return this.resize(Er+1),this.emplace(Er,D,nt,_t,Rt,Kt,Qt,be,Re,er,xr)}emplace(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er){let Zr=10*D;return this.uint16[Zr+0]=nt,this.uint16[Zr+1]=_t,this.uint16[Zr+2]=Rt,this.uint16[Zr+3]=Kt,this.uint16[Zr+4]=Qt,this.uint16[Zr+5]=be,this.uint16[Zr+6]=Re,this.uint16[Zr+7]=er,this.uint16[Zr+8]=xr,this.uint16[Zr+9]=Er,D}}Xt.prototype.bytesPerElement=20,Ji("StructArrayLayout10ui20",Xt);class ae extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr){let sn=this.length;return this.resize(sn+1),this.emplace(sn,D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr)}emplace(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn){let yn=12*D;return this.int16[yn+0]=nt,this.int16[yn+1]=_t,this.int16[yn+2]=Rt,this.int16[yn+3]=Kt,this.uint16[yn+4]=Qt,this.uint16[yn+5]=be,this.uint16[yn+6]=Re,this.uint16[yn+7]=er,this.int16[yn+8]=xr,this.int16[yn+9]=Er,this.int16[yn+10]=Zr,this.int16[yn+11]=sn,D}}ae.prototype.bytesPerElement=24,Ji("StructArrayLayout4i4ui4i24",ae);class xe extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=3*D;return this.float32[Kt+0]=nt,this.float32[Kt+1]=_t,this.float32[Kt+2]=Rt,D}}xe.prototype.bytesPerElement=12,Ji("StructArrayLayout3f12",xe);class Ae extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint32[1*D+0]=nt,D}}Ae.prototype.bytesPerElement=4,Ji("StructArrayLayout1ul4",Ae);class je extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Re,er){let xr=this.length;return this.resize(xr+1),this.emplace(xr,D,nt,_t,Rt,Kt,Qt,be,Re,er)}emplace(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr){let Er=10*D,Zr=5*D;return this.int16[Er+0]=nt,this.int16[Er+1]=_t,this.int16[Er+2]=Rt,this.int16[Er+3]=Kt,this.int16[Er+4]=Qt,this.int16[Er+5]=be,this.uint32[Zr+3]=Re,this.uint16[Er+8]=er,this.uint16[Er+9]=xr,D}}je.prototype.bytesPerElement=20,Ji("StructArrayLayout6i1ul2ui20",je);class Ie extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,_t,Rt,Kt,Qt)}emplace(D,nt,_t,Rt,Kt,Qt,be){let Re=6*D;return this.int16[Re+0]=nt,this.int16[Re+1]=_t,this.int16[Re+2]=Rt,this.int16[Re+3]=Kt,this.int16[Re+4]=Qt,this.int16[Re+5]=be,D}}Ie.prototype.bytesPerElement=12,Ji("StructArrayLayout2i2i2i12",Ie);class Ze extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt){let Qt=this.length;return this.resize(Qt+1),this.emplace(Qt,D,nt,_t,Rt,Kt)}emplace(D,nt,_t,Rt,Kt,Qt){let be=4*D,Re=8*D;return this.float32[be+0]=nt,this.float32[be+1]=_t,this.float32[be+2]=Rt,this.int16[Re+6]=Kt,this.int16[Re+7]=Qt,D}}Ze.prototype.bytesPerElement=16,Ji("StructArrayLayout2f1f2i16",Ze);class wr extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,_t,Rt,Kt,Qt)}emplace(D,nt,_t,Rt,Kt,Qt,be){let Re=16*D,er=4*D,xr=8*D;return this.uint8[Re+0]=nt,this.uint8[Re+1]=_t,this.float32[er+1]=Rt,this.float32[er+2]=Kt,this.int16[xr+6]=Qt,this.int16[xr+7]=be,D}}wr.prototype.bytesPerElement=16,Ji("StructArrayLayout2ub2f2i16",wr);class Or extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=3*D;return this.uint16[Kt+0]=nt,this.uint16[Kt+1]=_t,this.uint16[Kt+2]=Rt,D}}Or.prototype.bytesPerElement=6,Ji("StructArrayLayout3ui6",Or);class Nr extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn,yn,Ln,$n,wi){let Ta=this.length;return this.resize(Ta+1),this.emplace(Ta,D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn,yn,Ln,$n,wi)}emplace(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn,yn,Ln,$n,wi,Ta){let Xi=24*D,da=12*D,Ga=48*D;return this.int16[Xi+0]=nt,this.int16[Xi+1]=_t,this.uint16[Xi+2]=Rt,this.uint16[Xi+3]=Kt,this.uint32[da+2]=Qt,this.uint32[da+3]=be,this.uint32[da+4]=Re,this.uint16[Xi+10]=er,this.uint16[Xi+11]=xr,this.uint16[Xi+12]=Er,this.float32[da+7]=Zr,this.float32[da+8]=sn,this.uint8[Ga+36]=yn,this.uint8[Ga+37]=Ln,this.uint8[Ga+38]=$n,this.uint32[da+10]=wi,this.int16[Xi+22]=Ta,D}}Nr.prototype.bytesPerElement=48,Ji("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nr);class tn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn,yn,Ln,$n,wi,Ta,Xi,da,Ga,Ao,Ms,Sl,bs,fs,Js,js){let Ds=this.length;return this.resize(Ds+1),this.emplace(Ds,D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn,yn,Ln,$n,wi,Ta,Xi,da,Ga,Ao,Ms,Sl,bs,fs,Js,js)}emplace(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn,yn,Ln,$n,wi,Ta,Xi,da,Ga,Ao,Ms,Sl,bs,fs,Js,js,Ds){let uo=32*D,al=16*D;return this.int16[uo+0]=nt,this.int16[uo+1]=_t,this.int16[uo+2]=Rt,this.int16[uo+3]=Kt,this.int16[uo+4]=Qt,this.int16[uo+5]=be,this.int16[uo+6]=Re,this.int16[uo+7]=er,this.uint16[uo+8]=xr,this.uint16[uo+9]=Er,this.uint16[uo+10]=Zr,this.uint16[uo+11]=sn,this.uint16[uo+12]=yn,this.uint16[uo+13]=Ln,this.uint16[uo+14]=$n,this.uint16[uo+15]=wi,this.uint16[uo+16]=Ta,this.uint16[uo+17]=Xi,this.uint16[uo+18]=da,this.uint16[uo+19]=Ga,this.uint16[uo+20]=Ao,this.uint16[uo+21]=Ms,this.uint16[uo+22]=Sl,this.uint32[al+12]=bs,this.float32[al+13]=fs,this.float32[al+14]=Js,this.uint16[uo+30]=js,this.uint16[uo+31]=Ds,D}}tn.prototype.bytesPerElement=64,Ji("StructArrayLayout8i15ui1ul2f2ui64",tn);class pn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.float32[1*D+0]=nt,D}}pn.prototype.bytesPerElement=4,Ji("StructArrayLayout1f4",pn);class zn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=3*D;return this.uint16[6*D+0]=nt,this.float32[Kt+1]=_t,this.float32[Kt+2]=Rt,D}}zn.prototype.bytesPerElement=12,Ji("StructArrayLayout1ui2f12",zn);class Bn extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,_t){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,_t)}emplace(D,nt,_t,Rt){let Kt=4*D;return this.uint32[2*D+0]=nt,this.uint16[Kt+2]=_t,this.uint16[Kt+3]=Rt,D}}Bn.prototype.bytesPerElement=8,Ji("StructArrayLayout1ul2ui8",Bn);class ri extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt){let _t=this.length;return this.resize(_t+1),this.emplace(_t,D,nt)}emplace(D,nt,_t){let Rt=2*D;return this.uint16[Rt+0]=nt,this.uint16[Rt+1]=_t,D}}ri.prototype.bytesPerElement=4,Ji("StructArrayLayout2ui4",ri);class Di extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint16[1*D+0]=nt,D}}Di.prototype.bytesPerElement=2,Ji("StructArrayLayout1ui2",Di);class ha extends Vt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,_t,Rt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,_t,Rt)}emplace(D,nt,_t,Rt,Kt){let Qt=4*D;return this.float32[Qt+0]=nt,this.float32[Qt+1]=_t,this.float32[Qt+2]=Rt,this.float32[Qt+3]=Kt,D}}ha.prototype.bytesPerElement=16,Ji("StructArrayLayout4f16",ha);class ca extends It{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}ca.prototype.size=20;class wa extends je{get(D){return new ca(this,D)}}Ji("CollisionBoxArray",wa);class so extends It{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(D){this._structArray.uint8[this._pos1+37]=D}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(D){this._structArray.uint8[this._pos1+38]=D}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(D){this._structArray.uint32[this._pos4+10]=D}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}so.prototype.size=48;class Bo extends Nr{get(D){return new so(this,D)}}Ji("PlacedSymbolArray",Bo);class Eo extends It{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(D){this._structArray.uint32[this._pos4+12]=D}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Eo.prototype.size=64;class ds extends tn{get(D){return new Eo(this,D)}}Ji("SymbolInstanceArray",ds);class dl extends pn{getoffsetX(D){return this.float32[1*D+0]}}Ji("GlyphOffsetArray",dl);class yl extends gr{getx(D){return this.int16[3*D+0]}gety(D){return this.int16[3*D+1]}gettileUnitDistanceFromAnchor(D){return this.int16[3*D+2]}}Ji("SymbolLineVertexArray",yl);class Fs extends It{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Fs.prototype.size=12;class wl extends zn{get(D){return new Fs(this,D)}}Ji("TextAnchorOffsetArray",wl);class Su extends It{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Su.prototype.size=8;class gu extends Bn{get(D){return new Su(this,D)}}Ji("FeatureIndexArray",gu);class Zs extends Ke{}class $s extends Ke{}class Yu extends Ke{}class pc extends Fr{}class Zc extends ln{}class At extends Mn{}class jt extends Xt{}class ue extends ae{}class Me extends xe{}class Le extends Ae{}class Ne extends Ie{}class sr extends wr{}class ar extends Or{}class Mr extends ri{}let en=ke([{name:"a_pos",components:2,type:"Int16"}],4),{members:Xr}=en;class gn{constructor(D=[]){this.segments=D}prepareSegment(D,nt,_t,Rt){let Kt=this.segments[this.segments.length-1];return D>gn.MAX_VERTEX_ARRAY_LENGTH&&w(`Max vertices per segment is ${gn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!Kt||Kt.vertexLength+D>gn.MAX_VERTEX_ARRAY_LENGTH||Kt.sortKey!==Rt)&&(Kt={vertexOffset:nt.length,primitiveOffset:_t.length,vertexLength:0,primitiveLength:0},Rt!==void 0&&(Kt.sortKey=Rt),this.segments.push(Kt)),Kt}get(){return this.segments}destroy(){for(let D of this.segments)for(let nt in D.vaos)D.vaos[nt].destroy()}static simpleSegment(D,nt,_t,Rt){return new gn([{vertexOffset:D,primitiveOffset:nt,vertexLength:_t,primitiveLength:Rt,vaos:{},sortKey:0}])}}function In(G,D){return 256*(G=_(Math.floor(G),0,255))+_(Math.floor(D),0,255)}gn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ji("SegmentVector",gn);let On=ke([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Bi={exports:{}},Un={exports:{}};Un.exports=function(G,D){var nt,_t,Rt,Kt,Qt,be,Re,er;for(_t=G.length-(nt=3&G.length),Rt=D,Qt=3432918353,be=461845907,er=0;er<_t;)Re=255&G.charCodeAt(er)|(255&G.charCodeAt(++er))<<8|(255&G.charCodeAt(++er))<<16|(255&G.charCodeAt(++er))<<24,++er,Rt=27492+(65535&(Kt=5*(65535&(Rt=(Rt^=Re=(65535&(Re=(Re=(65535&Re)*Qt+(((Re>>>16)*Qt&65535)<<16)&4294967295)<<15|Re>>>17))*be+(((Re>>>16)*be&65535)<<16)&4294967295)<<13|Rt>>>19))+((5*(Rt>>>16)&65535)<<16)&4294967295))+((58964+(Kt>>>16)&65535)<<16);switch(Re=0,nt){case 3:Re^=(255&G.charCodeAt(er+2))<<16;case 2:Re^=(255&G.charCodeAt(er+1))<<8;case 1:Rt^=Re=(65535&(Re=(Re=(65535&(Re^=255&G.charCodeAt(er)))*Qt+(((Re>>>16)*Qt&65535)<<16)&4294967295)<<15|Re>>>17))*be+(((Re>>>16)*be&65535)<<16)&4294967295}return Rt^=G.length,Rt=2246822507*(65535&(Rt^=Rt>>>16))+((2246822507*(Rt>>>16)&65535)<<16)&4294967295,Rt=3266489909*(65535&(Rt^=Rt>>>13))+((3266489909*(Rt>>>16)&65535)<<16)&4294967295,(Rt^=Rt>>>16)>>>0};var mi=Un.exports,ki={exports:{}};ki.exports=function(G,D){for(var nt,_t=G.length,Rt=D^_t,Kt=0;_t>=4;)nt=1540483477*(65535&(nt=255&G.charCodeAt(Kt)|(255&G.charCodeAt(++Kt))<<8|(255&G.charCodeAt(++Kt))<<16|(255&G.charCodeAt(++Kt))<<24))+((1540483477*(nt>>>16)&65535)<<16),Rt=1540483477*(65535&Rt)+((1540483477*(Rt>>>16)&65535)<<16)^(nt=1540483477*(65535&(nt^=nt>>>24))+((1540483477*(nt>>>16)&65535)<<16)),_t-=4,++Kt;switch(_t){case 3:Rt^=(255&G.charCodeAt(Kt+2))<<16;case 2:Rt^=(255&G.charCodeAt(Kt+1))<<8;case 1:Rt=1540483477*(65535&(Rt^=255&G.charCodeAt(Kt)))+((1540483477*(Rt>>>16)&65535)<<16)}return Rt=1540483477*(65535&(Rt^=Rt>>>13))+((1540483477*(Rt>>>16)&65535)<<16),(Rt^=Rt>>>15)>>>0};var Pi=mi,Hi=ki.exports;Bi.exports=Pi,Bi.exports.murmur3=Pi,Bi.exports.murmur2=Hi;var Yn=r(Bi.exports);class Na{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,nt,_t,Rt){this.ids.push(Ha(D)),this.positions.push(nt,_t,Rt)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let nt=Ha(D),_t=0,Rt=this.ids.length-1;for(;_t>1;this.ids[Qt]>=nt?Rt=Qt:_t=Qt+1}let Kt=[];for(;this.ids[_t]===nt;)Kt.push({index:this.positions[3*_t],start:this.positions[3*_t+1],end:this.positions[3*_t+2]}),_t++;return Kt}static serialize(D,nt){let _t=new Float64Array(D.ids),Rt=new Uint32Array(D.positions);return io(_t,Rt,0,_t.length-1),nt&&nt.push(_t.buffer,Rt.buffer),{ids:_t,positions:Rt}}static deserialize(D){let nt=new Na;return nt.ids=D.ids,nt.positions=D.positions,nt.indexed=!0,nt}}function Ha(G){let D=+G;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:Yn(String(G))}function io(G,D,nt,_t){for(;nt<_t;){let Rt=G[nt+_t>>1],Kt=nt-1,Qt=_t+1;for(;;){do Kt++;while(G[Kt]Rt);if(Kt>=Qt)break;zo(G,Kt,Qt),zo(D,3*Kt,3*Qt),zo(D,3*Kt+1,3*Qt+1),zo(D,3*Kt+2,3*Qt+2)}Qt-nt<_t-Qt?(io(G,D,nt,Qt),nt=Qt+1):(io(G,D,Qt+1,_t),_t=Qt)}}function zo(G,D,nt){let _t=G[D];G[D]=G[nt],G[nt]=_t}Ji("FeaturePositionMap",Na);class Ro{constructor(D,nt){this.gl=D.gl,this.location=nt}}class Wo extends Ro{constructor(D,nt){super(D,nt),this.current=0}set(D){this.current!==D&&(this.current=D,this.gl.uniform1f(this.location,D))}}class sl extends Ro{constructor(D,nt){super(D,nt),this.current=[0,0,0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]&&D[2]===this.current[2]&&D[3]===this.current[3]||(this.current=D,this.gl.uniform4f(this.location,D[0],D[1],D[2],D[3]))}}class $o extends Ro{constructor(D,nt){super(D,nt),this.current=_r.transparent}set(D){D.r===this.current.r&&D.g===this.current.g&&D.b===this.current.b&&D.a===this.current.a||(this.current=D,this.gl.uniform4f(this.location,D.r,D.g,D.b,D.a))}}let ys=new Float32Array(16);function Tl(G){return[In(255*G.r,255*G.g),In(255*G.b,255*G.a)]}class Ku{constructor(D,nt,_t){this.value=D,this.uniformNames=nt.map(Rt=>`u_${Rt}`),this.type=_t}setUniform(D,nt,_t){D.set(_t.constantOr(this.value))}getBinding(D,nt,_t){return this.type==="color"?new $o(D,nt):new Wo(D,nt)}}class du{constructor(D,nt){this.uniformNames=nt.map(_t=>`u_${_t}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(D,nt){this.pixelRatioFrom=nt.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=nt.tlbr,this.patternTo=D.tlbr}setUniform(D,nt,_t,Rt){let Kt=Rt==="u_pattern_to"?this.patternTo:Rt==="u_pattern_from"?this.patternFrom:Rt==="u_pixel_ratio_to"?this.pixelRatioTo:Rt==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Kt&&D.set(Kt)}getBinding(D,nt,_t){return _t.substr(0,9)==="u_pattern"?new sl(D,nt):new Wo(D,nt)}}class _o{constructor(D,nt,_t,Rt){this.expression=D,this.type=_t,this.maxValue=0,this.paintVertexAttributes=nt.map(Kt=>({name:`a_${Kt}`,type:"Float32",components:_t==="color"?2:1,offset:0})),this.paintVertexArray=new Rt}populatePaintArray(D,nt,_t,Rt,Kt){let Qt=this.paintVertexArray.length,be=this.expression.evaluate(new Rl(0),nt,{},Rt,[],Kt);this.paintVertexArray.resize(D),this._setPaintValue(Qt,D,be)}updatePaintArray(D,nt,_t,Rt){let Kt=this.expression.evaluate({zoom:0},_t,Rt);this._setPaintValue(D,nt,Kt)}_setPaintValue(D,nt,_t){if(this.type==="color"){let Rt=Tl(_t);for(let Kt=D;Kt`u_${be}_t`),this.type=_t,this.useIntegerZoom=Rt,this.zoom=Kt,this.maxValue=0,this.paintVertexAttributes=nt.map(be=>({name:`a_${be}`,type:"Float32",components:_t==="color"?4:2,offset:0})),this.paintVertexArray=new Qt}populatePaintArray(D,nt,_t,Rt,Kt){let Qt=this.expression.evaluate(new Rl(this.zoom),nt,{},Rt,[],Kt),be=this.expression.evaluate(new Rl(this.zoom+1),nt,{},Rt,[],Kt),Re=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(Re,D,Qt,be)}updatePaintArray(D,nt,_t,Rt){let Kt=this.expression.evaluate({zoom:this.zoom},_t,Rt),Qt=this.expression.evaluate({zoom:this.zoom+1},_t,Rt);this._setPaintValue(D,nt,Kt,Qt)}_setPaintValue(D,nt,_t,Rt){if(this.type==="color"){let Kt=Tl(_t),Qt=Tl(Rt);for(let be=D;be`#define HAS_UNIFORM_${Rt}`))}return D}getBinderAttributes(){let D=[];for(let nt in this.binders){let _t=this.binders[nt];if(_t instanceof _o||_t instanceof Gs)for(let Rt=0;Rt<_t.paintVertexAttributes.length;Rt++)D.push(_t.paintVertexAttributes[Rt].name);else if(_t instanceof il)for(let Rt=0;Rt!0){this.programConfigurations={};for(let Rt of D)this.programConfigurations[Rt.id]=new lu(Rt,nt,_t);this.needsUpload=!1,this._featureMap=new Na,this._bufferOffset=0}populatePaintArrays(D,nt,_t,Rt,Kt,Qt){for(let be in this.programConfigurations)this.programConfigurations[be].populatePaintArrays(D,nt,Rt,Kt,Qt);nt.id!==void 0&&this._featureMap.add(nt.id,_t,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,nt,_t,Rt){for(let Kt of _t)this.needsUpload=this.programConfigurations[Kt.id].updatePaintArrays(D,this._featureMap,nt,Kt,Rt)||this.needsUpload}get(D){return this.programConfigurations[D]}upload(D){if(this.needsUpload){for(let nt in this.programConfigurations)this.programConfigurations[nt].upload(D);this.needsUpload=!1}}destroy(){for(let D in this.programConfigurations)this.programConfigurations[D].destroy()}}function rh(G,D){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[G]||[G.replace(`${D}-`,"").replace(/-/g,"_")]}function Nl(G,D,nt){let _t={color:{source:Mn,composite:ha},number:{source:pn,composite:Mn}},Rt=function(Kt){return{"line-pattern":{source:jt,composite:jt},"fill-pattern":{source:jt,composite:jt},"fill-extrusion-pattern":{source:jt,composite:jt}}[Kt]}(G);return Rt&&Rt[nt]||_t[D][nt]}Ji("ConstantBinder",Ku),Ji("CrossFadedConstantBinder",du),Ji("SourceExpressionBinder",_o),Ji("CrossFadedCompositeBinder",il),Ji("CompositeExpressionBinder",Gs),Ji("ProgramConfiguration",lu,{omit:["_buffers"]}),Ji("ProgramConfigurationSet",Kl);let eu=8192,wh=Math.pow(2,14)-1,_e=-wh-1;function kr(G){let D=eu/G.extent,nt=G.loadGeometry();for(let _t=0;_tQt.x+1||ReQt.y+1)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return nt}function Lr(G,D){return{type:G.type,id:G.id,properties:G.properties,geometry:D?kr(G):[]}}function Dn(G,D,nt,_t,Rt){G.emplaceBack(2*D+(_t+1)/2,2*nt+(Rt+1)/2)}class oi{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new $s,this.indexArray=new ar,this.segments=new gn,this.programConfigurations=new Kl(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,_t){let Rt=this.layers[0],Kt=[],Qt=null,be=!1;Rt.type==="circle"&&(Qt=Rt.layout.get("circle-sort-key"),be=!Qt.isConstant());for(let{feature:Re,id:er,index:xr,sourceLayerIndex:Er}of D){let Zr=this.layers[0]._featureFilter.needGeometry,sn=Lr(Re,Zr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),sn,_t))continue;let yn=be?Qt.evaluate(sn,{},_t):void 0,Ln={id:er,properties:Re.properties,type:Re.type,sourceLayerIndex:Er,index:xr,geometry:Zr?sn.geometry:kr(Re),patterns:{},sortKey:yn};Kt.push(Ln)}be&&Kt.sort((Re,er)=>Re.sortKey-er.sortKey);for(let Re of Kt){let{geometry:er,index:xr,sourceLayerIndex:Er}=Re,Zr=D[xr].feature;this.addFeature(Re,er,xr,_t),nt.featureIndex.insert(Zr,er,xr,Er,this.index)}}update(D,nt,_t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,_t)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Xr),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(D,nt,_t,Rt){for(let Kt of nt)for(let Qt of Kt){let be=Qt.x,Re=Qt.y;if(be<0||be>=eu||Re<0||Re>=eu)continue;let er=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),xr=er.vertexLength;Dn(this.layoutVertexArray,be,Re,-1,-1),Dn(this.layoutVertexArray,be,Re,1,-1),Dn(this.layoutVertexArray,be,Re,1,1),Dn(this.layoutVertexArray,be,Re,-1,1),this.indexArray.emplaceBack(xr,xr+1,xr+2),this.indexArray.emplaceBack(xr,xr+3,xr+2),er.vertexLength+=4,er.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,_t,{},Rt)}}function Jn(G,D){for(let nt=0;nt1){if(Ui(G,D))return!0;for(let _t=0;_t1?nt:nt.sub(D)._mult(Rt)._add(D))}function ta(G,D){let nt,_t,Rt,Kt=!1;for(let Qt=0;QtD.y!=Rt.y>D.y&&D.x<(Rt.x-_t.x)*(D.y-_t.y)/(Rt.y-_t.y)+_t.x&&(Kt=!Kt)}return Kt}function bi(G,D){let nt=!1;for(let _t=0,Rt=G.length-1;_tD.y!=Qt.y>D.y&&D.x<(Qt.x-Kt.x)*(D.y-Kt.y)/(Qt.y-Kt.y)+Kt.x&&(nt=!nt)}return nt}function cn(G,D,nt){let _t=nt[0],Rt=nt[2];if(G.x<_t.x&&D.x<_t.x||G.x>Rt.x&&D.x>Rt.x||G.y<_t.y&&D.y<_t.y||G.y>Rt.y&&D.y>Rt.y)return!1;let Kt=R(G,D,nt[0]);return Kt!==R(G,D,nt[1])||Kt!==R(G,D,nt[2])||Kt!==R(G,D,nt[3])}function Nn(G,D,nt){let _t=D.paint.get(G).value;return _t.kind==="constant"?_t.value:nt.programConfigurations.get(D.id).getMaxValue(G)}function Ii(G){return Math.sqrt(G[0]*G[0]+G[1]*G[1])}function _i(G,D,nt,_t,Rt){if(!D[0]&&!D[1])return G;let Kt=o.convert(D)._mult(Rt);nt==="viewport"&&Kt._rotate(-_t);let Qt=[];for(let be=0;beIo($n,Ln))}(er,Re),sn=Er?xr*be:xr;for(let yn of Rt)for(let Ln of yn){let $n=Er?Ln:Io(Ln,Re),wi=sn,Ta=$i([],[Ln.x,Ln.y,0,1],Re);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?wi*=Ta[3]/Qt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(wi*=Qt.cameraToCenterDistance/Ta[3]),mn(Zr,$n,wi))return!0}return!1}}function Io(G,D){let nt=$i([],[G.x,G.y,0,1],D);return new o(nt[0]/nt[3],nt[1]/nt[3])}class wo extends oi{}let va;Ji("HeatmapBucket",wo,{omit:["layers"]});var Ia={get paint(){return va=va||new qt({"heatmap-radius":new Os(ut.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Os(ut.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new is(ut.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Gf(ut.paint_heatmap["heatmap-color"]),"heatmap-opacity":new is(ut.paint_heatmap["heatmap-opacity"])})}};function po(G,{width:D,height:nt},_t,Rt){if(Rt){if(Rt instanceof Uint8ClampedArray)Rt=new Uint8Array(Rt.buffer);else if(Rt.length!==D*nt*_t)throw new RangeError(`mismatched image size. expected: ${Rt.length} but got: ${D*nt*_t}`)}else Rt=new Uint8Array(D*nt*_t);return G.width=D,G.height=nt,G.data=Rt,G}function Co(G,{width:D,height:nt},_t){if(D===G.width&&nt===G.height)return;let Rt=po({},{width:D,height:nt},_t);ns(G,Rt,{x:0,y:0},{x:0,y:0},{width:Math.min(G.width,D),height:Math.min(G.height,nt)},_t),G.width=D,G.height=nt,G.data=Rt.data}function ns(G,D,nt,_t,Rt,Kt){if(Rt.width===0||Rt.height===0)return D;if(Rt.width>G.width||Rt.height>G.height||nt.x>G.width-Rt.width||nt.y>G.height-Rt.height)throw new RangeError("out of range source coordinates for image copy");if(Rt.width>D.width||Rt.height>D.height||_t.x>D.width-Rt.width||_t.y>D.height-Rt.height)throw new RangeError("out of range destination coordinates for image copy");let Qt=G.data,be=D.data;if(Qt===be)throw new Error("srcData equals dstData, so image is already copied");for(let Re=0;Re{D[G.evaluationKey]=Re;let er=G.expression.evaluate(D);Rt.data[Qt+be+0]=Math.floor(255*er.r/er.a),Rt.data[Qt+be+1]=Math.floor(255*er.g/er.a),Rt.data[Qt+be+2]=Math.floor(255*er.b/er.a),Rt.data[Qt+be+3]=Math.floor(255*er.a)};if(G.clips)for(let Qt=0,be=0;Qt<_t;++Qt,be+=4*nt)for(let Re=0,er=0;Re80*nt){be=1/0,Re=1/0;let xr=-1/0,Er=-1/0;for(let Zr=nt;Zrxr&&(xr=sn),yn>Er&&(Er=yn)}er=Math.max(xr-be,Er-Re),er=er!==0?32767/er:0}return ll(Kt,Qt,nt,be,Re,er,0),Qt}function No(G,D,nt,_t,Rt){let Kt;if(Rt===function(Qt,be,Re,er){let xr=0;for(let Er=be,Zr=Re-er;Er0)for(let Qt=D;Qt=D;Qt-=_t)Kt=tr(Qt/_t|0,G[Qt],G[Qt+1],Kt);return Kt&&ye(Kt,Kt.next)&&(lr(Kt),Kt=Kt.next),Kt}function Tu(G,D){if(!G)return G;D||(D=G);let nt,_t=G;do if(nt=!1,_t.steiner||!ye(_t,_t.next)&&fe(_t.prev,_t,_t.next)!==0)_t=_t.next;else{if(lr(_t),_t=D=_t.prev,_t===_t.next)break;nt=!0}while(nt||_t!==D);return D}function ll(G,D,nt,_t,Rt,Kt,Qt){if(!G)return;!Qt&&Kt&&function(Re,er,xr,Er){let Zr=Re;do Zr.z===0&&(Zr.z=ot(Zr.x,Zr.y,er,xr,Er)),Zr.prevZ=Zr.prev,Zr.nextZ=Zr.next,Zr=Zr.next;while(Zr!==Re);Zr.prevZ.nextZ=null,Zr.prevZ=null,function(sn){let yn,Ln=1;do{let $n,wi=sn;sn=null;let Ta=null;for(yn=0;wi;){yn++;let Xi=wi,da=0;for(let Ao=0;Ao0||Ga>0&Ξ)da!==0&&(Ga===0||!Xi||wi.z<=Xi.z)?($n=wi,wi=wi.nextZ,da--):($n=Xi,Xi=Xi.nextZ,Ga--),Ta?Ta.nextZ=$n:sn=$n,$n.prevZ=Ta,Ta=$n;wi=Xi}Ta.nextZ=null,Ln*=2}while(yn>1)}(Zr)}(G,_t,Rt,Kt);let be=G;for(;G.prev!==G.next;){let Re=G.prev,er=G.next;if(Kt?_c(G,_t,Rt,Kt):Cu(G))D.push(Re.i,G.i,er.i),lr(G),G=er.next,be=er.next;else if((G=er)===be){Qt?Qt===1?ll(G=Lo(Tu(G),D),D,nt,_t,Rt,Kt,2):Qt===2&&Cs(G,D,nt,_t,Rt,Kt):ll(Tu(G),D,nt,_t,Rt,Kt,1);break}}}function Cu(G){let D=G.prev,nt=G,_t=G.next;if(fe(D,nt,_t)>=0)return!1;let Rt=D.x,Kt=nt.x,Qt=_t.x,be=D.y,Re=nt.y,er=_t.y,xr=RtKt?Rt>Qt?Rt:Qt:Kt>Qt?Kt:Qt,sn=be>Re?be>er?be:er:Re>er?Re:er,yn=_t.next;for(;yn!==D;){if(yn.x>=xr&&yn.x<=Zr&&yn.y>=Er&&yn.y<=sn&&xt(Rt,be,Kt,Re,Qt,er,yn.x,yn.y)&&fe(yn.prev,yn,yn.next)>=0)return!1;yn=yn.next}return!0}function _c(G,D,nt,_t){let Rt=G.prev,Kt=G,Qt=G.next;if(fe(Rt,Kt,Qt)>=0)return!1;let be=Rt.x,Re=Kt.x,er=Qt.x,xr=Rt.y,Er=Kt.y,Zr=Qt.y,sn=beRe?be>er?be:er:Re>er?Re:er,$n=xr>Er?xr>Zr?xr:Zr:Er>Zr?Er:Zr,wi=ot(sn,yn,D,nt,_t),Ta=ot(Ln,$n,D,nt,_t),Xi=G.prevZ,da=G.nextZ;for(;Xi&&Xi.z>=wi&&da&&da.z<=Ta;){if(Xi.x>=sn&&Xi.x<=Ln&&Xi.y>=yn&&Xi.y<=$n&&Xi!==Rt&&Xi!==Qt&&xt(be,xr,Re,Er,er,Zr,Xi.x,Xi.y)&&fe(Xi.prev,Xi,Xi.next)>=0||(Xi=Xi.prevZ,da.x>=sn&&da.x<=Ln&&da.y>=yn&&da.y<=$n&&da!==Rt&&da!==Qt&&xt(be,xr,Re,Er,er,Zr,da.x,da.y)&&fe(da.prev,da,da.next)>=0))return!1;da=da.nextZ}for(;Xi&&Xi.z>=wi;){if(Xi.x>=sn&&Xi.x<=Ln&&Xi.y>=yn&&Xi.y<=$n&&Xi!==Rt&&Xi!==Qt&&xt(be,xr,Re,Er,er,Zr,Xi.x,Xi.y)&&fe(Xi.prev,Xi,Xi.next)>=0)return!1;Xi=Xi.prevZ}for(;da&&da.z<=Ta;){if(da.x>=sn&&da.x<=Ln&&da.y>=yn&&da.y<=$n&&da!==Rt&&da!==Qt&&xt(be,xr,Re,Er,er,Zr,da.x,da.y)&&fe(da.prev,da,da.next)>=0)return!1;da=da.nextZ}return!0}function Lo(G,D){let nt=G;do{let _t=nt.prev,Rt=nt.next.next;!ye(_t,Rt)&&Yt(_t,nt,nt.next,Rt)&&nr(_t,Rt)&&nr(Rt,_t)&&(D.push(_t.i,nt.i,Rt.i),lr(nt),lr(nt.next),nt=G=Rt),nt=nt.next}while(nt!==G);return Tu(nt)}function Cs(G,D,nt,_t,Rt,Kt){let Qt=G;do{let be=Qt.next.next;for(;be!==Qt.prev;){if(Qt.i!==be.i&&Ut(Qt,be)){let Re=Ye(Qt,be);return Qt=Tu(Qt,Qt.next),Re=Tu(Re,Re.next),ll(Qt,D,nt,_t,Rt,Kt,0),void ll(Re,D,nt,_t,Rt,Kt,0)}be=be.next}Qt=Qt.next}while(Qt!==G)}function Ml(G,D){return G.x-D.x}function xl(G,D){let nt=function(Rt,Kt){let Qt=Kt,be=Rt.x,Re=Rt.y,er,xr=-1/0;do{if(Re<=Qt.y&&Re>=Qt.next.y&&Qt.next.y!==Qt.y){let Ln=Qt.x+(Re-Qt.y)*(Qt.next.x-Qt.x)/(Qt.next.y-Qt.y);if(Ln<=be&&Ln>xr&&(xr=Ln,er=Qt.x=Qt.x&&Qt.x>=Zr&&be!==Qt.x&&xt(Reer.x||Qt.x===er.x&&Z(er,Qt)))&&(er=Qt,yn=Ln)}Qt=Qt.next}while(Qt!==Er);return er}(G,D);if(!nt)return D;let _t=Ye(nt,G);return Tu(_t,_t.next),Tu(nt,nt.next)}function Z(G,D){return fe(G.prev,G,D.prev)<0&&fe(D.next,G,G.next)<0}function ot(G,D,nt,_t,Rt){return(G=1431655765&((G=858993459&((G=252645135&((G=16711935&((G=(G-nt)*Rt|0)|G<<8))|G<<4))|G<<2))|G<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-_t)*Rt|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function et(G){let D=G,nt=G;do(D.x=(G-Qt)*(Kt-be)&&(G-Qt)*(_t-be)>=(nt-Qt)*(D-be)&&(nt-Qt)*(Kt-be)>=(Rt-Qt)*(_t-be)}function Ut(G,D){return G.next.i!==D.i&&G.prev.i!==D.i&&!function(nt,_t){let Rt=nt;do{if(Rt.i!==nt.i&&Rt.next.i!==nt.i&&Rt.i!==_t.i&&Rt.next.i!==_t.i&&Yt(Rt,Rt.next,nt,_t))return!0;Rt=Rt.next}while(Rt!==nt);return!1}(G,D)&&(nr(G,D)&&nr(D,G)&&function(nt,_t){let Rt=nt,Kt=!1,Qt=(nt.x+_t.x)/2,be=(nt.y+_t.y)/2;do Rt.y>be!=Rt.next.y>be&&Rt.next.y!==Rt.y&&Qt<(Rt.next.x-Rt.x)*(be-Rt.y)/(Rt.next.y-Rt.y)+Rt.x&&(Kt=!Kt),Rt=Rt.next;while(Rt!==nt);return Kt}(G,D)&&(fe(G.prev,G,D.prev)||fe(G,D.prev,D))||ye(G,D)&&fe(G.prev,G,G.next)>0&&fe(D.prev,D,D.next)>0)}function fe(G,D,nt){return(D.y-G.y)*(nt.x-D.x)-(D.x-G.x)*(nt.y-D.y)}function ye(G,D){return G.x===D.x&&G.y===D.y}function Yt(G,D,nt,_t){let Rt=Se(fe(G,D,nt)),Kt=Se(fe(G,D,_t)),Qt=Se(fe(nt,_t,G)),be=Se(fe(nt,_t,D));return Rt!==Kt&&Qt!==be||!(Rt!==0||!ce(G,nt,D))||!(Kt!==0||!ce(G,_t,D))||!(Qt!==0||!ce(nt,G,_t))||!(be!==0||!ce(nt,D,_t))}function ce(G,D,nt){return D.x<=Math.max(G.x,nt.x)&&D.x>=Math.min(G.x,nt.x)&&D.y<=Math.max(G.y,nt.y)&&D.y>=Math.min(G.y,nt.y)}function Se(G){return G>0?1:G<0?-1:0}function nr(G,D){return fe(G.prev,G,G.next)<0?fe(G,D,G.next)>=0&&fe(G,G.prev,D)>=0:fe(G,D,G.prev)<0||fe(G,G.next,D)<0}function Ye(G,D){let nt=hr(G.i,G.x,G.y),_t=hr(D.i,D.x,D.y),Rt=G.next,Kt=D.prev;return G.next=D,D.prev=G,nt.next=Rt,Rt.prev=nt,_t.next=nt,nt.prev=_t,Kt.next=_t,_t.prev=Kt,_t}function tr(G,D,nt,_t){let Rt=hr(G,D,nt);return _t?(Rt.next=_t.next,Rt.prev=_t,_t.next.prev=Rt,_t.next=Rt):(Rt.prev=Rt,Rt.next=Rt),Rt}function lr(G){G.next.prev=G.prev,G.prev.next=G.next,G.prevZ&&(G.prevZ.nextZ=G.nextZ),G.nextZ&&(G.nextZ.prevZ=G.prevZ)}function hr(G,D,nt){return{i:G,x:D,y:nt,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ve(G,D,nt){let _t=nt.patternDependencies,Rt=!1;for(let Kt of D){let Qt=Kt.paint.get(`${G}-pattern`);Qt.isConstant()||(Rt=!0);let be=Qt.constantOr(null);be&&(Rt=!0,_t[be.to]=!0,_t[be.from]=!0)}return Rt}function Xe(G,D,nt,_t,Rt){let Kt=Rt.patternDependencies;for(let Qt of D){let be=Qt.paint.get(`${G}-pattern`).value;if(be.kind!=="constant"){let Re=be.evaluate({zoom:_t-1},nt,{},Rt.availableImages),er=be.evaluate({zoom:_t},nt,{},Rt.availableImages),xr=be.evaluate({zoom:_t+1},nt,{},Rt.availableImages);Re=Re&&Re.name?Re.name:Re,er=er&&er.name?er.name:er,xr=xr&&xr.name?xr.name:xr,Kt[Re]=!0,Kt[er]=!0,Kt[xr]=!0,nt.patterns[Qt.id]={min:Re,mid:er,max:xr}}}return nt}class $e{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Yu,this.indexArray=new ar,this.indexArray2=new Mr,this.programConfigurations=new Kl(D.layers,D.zoom),this.segments=new gn,this.segments2=new gn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,_t){this.hasPattern=Ve("fill",this.layers,nt);let Rt=this.layers[0].layout.get("fill-sort-key"),Kt=!Rt.isConstant(),Qt=[];for(let{feature:be,id:Re,index:er,sourceLayerIndex:xr}of D){let Er=this.layers[0]._featureFilter.needGeometry,Zr=Lr(be,Er);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),Zr,_t))continue;let sn=Kt?Rt.evaluate(Zr,{},_t,nt.availableImages):void 0,yn={id:Re,properties:be.properties,type:be.type,sourceLayerIndex:xr,index:er,geometry:Er?Zr.geometry:kr(be),patterns:{},sortKey:sn};Qt.push(yn)}Kt&&Qt.sort((be,Re)=>be.sortKey-Re.sortKey);for(let be of Qt){let{geometry:Re,index:er,sourceLayerIndex:xr}=be;if(this.hasPattern){let Er=Xe("fill",this.layers,be,this.zoom,nt);this.patternFeatures.push(Er)}else this.addFeature(be,Re,er,_t,{});nt.featureIndex.insert(D[er].feature,Re,er,xr,this.index)}}update(D,nt,_t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,_t)}addFeatures(D,nt,_t){for(let Rt of this.patternFeatures)this.addFeature(Rt,Rt.geometry,Rt.index,nt,_t)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,pu),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(D,nt,_t,Rt,Kt){for(let Qt of Jc(nt,500)){let be=0;for(let sn of Qt)be+=sn.length;let Re=this.segments.prepareSegment(be,this.layoutVertexArray,this.indexArray),er=Re.vertexLength,xr=[],Er=[];for(let sn of Qt){if(sn.length===0)continue;sn!==Qt[0]&&Er.push(xr.length/2);let yn=this.segments2.prepareSegment(sn.length,this.layoutVertexArray,this.indexArray2),Ln=yn.vertexLength;this.layoutVertexArray.emplaceBack(sn[0].x,sn[0].y),this.indexArray2.emplaceBack(Ln+sn.length-1,Ln),xr.push(sn[0].x),xr.push(sn[0].y);for(let $n=1;$n>3}if(Rt--,_t===1||_t===2)Kt+=G.readSVarint(),Qt+=G.readSVarint(),_t===1&&(D&&be.push(D),D=[]),D.push(new Ki(Kt,Qt));else{if(_t!==7)throw new Error("unknown command "+_t);D&&D.push(D[0].clone())}}return D&&be.push(D),be},Mi.prototype.bbox=function(){var G=this._pbf;G.pos=this._geometry;for(var D=G.readVarint()+G.pos,nt=1,_t=0,Rt=0,Kt=0,Qt=1/0,be=-1/0,Re=1/0,er=-1/0;G.pos>3}if(_t--,nt===1||nt===2)(Rt+=G.readSVarint())be&&(be=Rt),(Kt+=G.readSVarint())er&&(er=Kt);else if(nt!==7)throw new Error("unknown command "+nt)}return[Qt,Re,be,er]},Mi.prototype.toGeoJSON=function(G,D,nt){var _t,Rt,Kt=this.extent*Math.pow(2,nt),Qt=this.extent*G,be=this.extent*D,Re=this.loadGeometry(),er=Mi.types[this.type];function xr(sn){for(var yn=0;yn>3;Rt=Qt===1?_t.readString():Qt===2?_t.readFloat():Qt===3?_t.readDouble():Qt===4?_t.readVarint64():Qt===5?_t.readVarint():Qt===6?_t.readSVarint():Qt===7?_t.readBoolean():null}return Rt}(nt))}_s.prototype.feature=function(G){if(G<0||G>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[G];var D=this._pbf.readVarint()+this._pbf.pos;return new ho(this._pbf,D,this.extent,this._keys,this._values)};var Ul=qo;function ml(G,D,nt){if(G===3){var _t=new Ul(nt,nt.readVarint()+nt.pos);_t.length&&(D[_t.name]=_t)}}di.VectorTile=function(G,D){this.layers=G.readFields(ml,{},D)},di.VectorTileFeature=Ti,di.VectorTileLayer=qo;let Vl=di.VectorTileFeature.types,bc=Math.pow(2,13);function Rs(G,D,nt,_t,Rt,Kt,Qt,be){G.emplaceBack(D,nt,2*Math.floor(_t*bc)+Qt,Rt*bc*2,Kt*bc*2,Math.round(be))}class Au{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new pc,this.centroidVertexArray=new Zs,this.indexArray=new ar,this.programConfigurations=new Kl(D.layers,D.zoom),this.segments=new gn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,_t){this.features=[],this.hasPattern=Ve("fill-extrusion",this.layers,nt);for(let{feature:Rt,id:Kt,index:Qt,sourceLayerIndex:be}of D){let Re=this.layers[0]._featureFilter.needGeometry,er=Lr(Rt,Re);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),er,_t))continue;let xr={id:Kt,sourceLayerIndex:be,index:Qt,geometry:Re?er.geometry:kr(Rt),properties:Rt.properties,type:Rt.type,patterns:{}};this.hasPattern?this.features.push(Xe("fill-extrusion",this.layers,xr,this.zoom,nt)):this.addFeature(xr,xr.geometry,Qt,_t,{}),nt.featureIndex.insert(Rt,xr.geometry,Qt,be,this.index,!0)}}addFeatures(D,nt,_t){for(let Rt of this.features){let{geometry:Kt}=Rt;this.addFeature(Rt,Kt,Rt.index,nt,_t)}}update(D,nt,_t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,_t)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Ai),this.centroidVertexBuffer=D.createVertexBuffer(this.centroidVertexArray,Gn.members,!0),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(D,nt,_t,Rt,Kt){for(let Qt of Jc(nt,500)){let be={x:0,y:0,vertexCount:0},Re=0;for(let yn of Qt)Re+=yn.length;let er=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let yn of Qt){if(yn.length===0||Of(yn))continue;let Ln=0;for(let $n=0;$n=1){let Ta=yn[$n-1];if(!nf(wi,Ta)){er.vertexLength+4>gn.MAX_VERTEX_ARRAY_LENGTH&&(er=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Xi=wi.sub(Ta)._perp()._unit(),da=Ta.dist(wi);Ln+da>32768&&(Ln=0),Rs(this.layoutVertexArray,wi.x,wi.y,Xi.x,Xi.y,0,0,Ln),Rs(this.layoutVertexArray,wi.x,wi.y,Xi.x,Xi.y,0,1,Ln),be.x+=2*wi.x,be.y+=2*wi.y,be.vertexCount+=2,Ln+=da,Rs(this.layoutVertexArray,Ta.x,Ta.y,Xi.x,Xi.y,0,0,Ln),Rs(this.layoutVertexArray,Ta.x,Ta.y,Xi.x,Xi.y,0,1,Ln),be.x+=2*Ta.x,be.y+=2*Ta.y,be.vertexCount+=2;let Ga=er.vertexLength;this.indexArray.emplaceBack(Ga,Ga+2,Ga+1),this.indexArray.emplaceBack(Ga+1,Ga+2,Ga+3),er.vertexLength+=4,er.primitiveLength+=2}}}}if(er.vertexLength+Re>gn.MAX_VERTEX_ARRAY_LENGTH&&(er=this.segments.prepareSegment(Re,this.layoutVertexArray,this.indexArray)),Vl[D.type]!=="Polygon")continue;let xr=[],Er=[],Zr=er.vertexLength;for(let yn of Qt)if(yn.length!==0){yn!==Qt[0]&&Er.push(xr.length/2);for(let Ln=0;Lneu)||G.y===D.y&&(G.y<0||G.y>eu)}function Of(G){return G.every(D=>D.x<0)||G.every(D=>D.x>eu)||G.every(D=>D.y<0)||G.every(D=>D.y>eu)}let Hp;Ji("FillExtrusionBucket",Au,{omit:["layers","features"]});var k0={get paint(){return Hp=Hp||new qt({"fill-extrusion-opacity":new is(ut["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Os(ut["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new is(ut["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new is(ut["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new qc(ut["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Os(ut["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Os(ut["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new is(ut["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Ap extends ht{constructor(D){super(D,k0)}createBucket(D){return new Au(D)}queryRadius(){return Ii(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,nt,_t,Rt,Kt,Qt,be,Re){let er=_i(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Qt.angle,be),xr=this.paint.get("fill-extrusion-height").evaluate(nt,_t),Er=this.paint.get("fill-extrusion-base").evaluate(nt,_t),Zr=function(yn,Ln,$n,wi){let Ta=[];for(let Xi of yn){let da=[Xi.x,Xi.y,0,1];$i(da,da,Ln),Ta.push(new o(da[0]/da[3],da[1]/da[3]))}return Ta}(er,Re),sn=function(yn,Ln,$n,wi){let Ta=[],Xi=[],da=wi[8]*Ln,Ga=wi[9]*Ln,Ao=wi[10]*Ln,Ms=wi[11]*Ln,Sl=wi[8]*$n,bs=wi[9]*$n,fs=wi[10]*$n,Js=wi[11]*$n;for(let js of yn){let Ds=[],uo=[];for(let al of js){let Qs=al.x,ql=al.y,ch=wi[0]*Qs+wi[4]*ql+wi[12],nh=wi[1]*Qs+wi[5]*ql+wi[13],_d=wi[2]*Qs+wi[6]*ql+wi[14],Lp=wi[3]*Qs+wi[7]*ql+wi[15],Df=_d+Ao,nd=Lp+Ms,mp=ch+Sl,gp=nh+bs,vp=_d+fs,of=Lp+Js,bd=new o((ch+da)/nd,(nh+Ga)/nd);bd.z=Df/nd,Ds.push(bd);let ap=new o(mp/of,gp/of);ap.z=vp/of,uo.push(ap)}Ta.push(Ds),Xi.push(uo)}return[Ta,Xi]}(Rt,Er,xr,Re);return function(yn,Ln,$n){let wi=1/0;ni($n,Ln)&&(wi=j0($n,Ln[0]));for(let Ta=0;Tant.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(nt=>{this.gradients[nt.id]={}}),this.layoutVertexArray=new Zc,this.layoutVertexArray2=new At,this.indexArray=new ar,this.programConfigurations=new Kl(D.layers,D.zoom),this.segments=new gn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,_t){this.hasPattern=Ve("line",this.layers,nt);let Rt=this.layers[0].layout.get("line-sort-key"),Kt=!Rt.isConstant(),Qt=[];for(let{feature:be,id:Re,index:er,sourceLayerIndex:xr}of D){let Er=this.layers[0]._featureFilter.needGeometry,Zr=Lr(be,Er);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),Zr,_t))continue;let sn=Kt?Rt.evaluate(Zr,{},_t):void 0,yn={id:Re,properties:be.properties,type:be.type,sourceLayerIndex:xr,index:er,geometry:Er?Zr.geometry:kr(be),patterns:{},sortKey:sn};Qt.push(yn)}Kt&&Qt.sort((be,Re)=>be.sortKey-Re.sortKey);for(let be of Qt){let{geometry:Re,index:er,sourceLayerIndex:xr}=be;if(this.hasPattern){let Er=Xe("line",this.layers,be,this.zoom,nt);this.patternFeatures.push(Er)}else this.addFeature(be,Re,er,_t,{});nt.featureIndex.insert(D[er].feature,Re,er,xr,this.index)}}update(D,nt,_t){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,_t)}addFeatures(D,nt,_t){for(let Rt of this.patternFeatures)this.addFeature(Rt,Rt.geometry,Rt.index,nt,_t)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=D.createVertexBuffer(this.layoutVertexArray2,rm)),this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Sp),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(D){if(D.properties&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_end"))return{start:+D.properties.mapbox_clip_start,end:+D.properties.mapbox_clip_end}}addFeature(D,nt,_t,Rt,Kt){let Qt=this.layers[0].layout,be=Qt.get("line-join").evaluate(D,{}),Re=Qt.get("line-cap"),er=Qt.get("line-miter-limit"),xr=Qt.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Er of nt)this.addLine(Er,D,be,Re,er,xr);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,_t,Kt,Rt)}addLine(D,nt,_t,Rt,Kt,Qt){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let wi=0;wi=2&&D[Re-1].equals(D[Re-2]);)Re--;let er=0;for(;er0;if(Ms&&wi>er){let Js=Zr.dist(sn);if(Js>2*xr){let js=Zr.sub(Zr.sub(sn)._mult(xr/Js)._round());this.updateDistance(sn,js),this.addCurrentVertex(js,Ln,0,0,Er),sn=js}}let bs=sn&&yn,fs=bs?_t:be?"butt":Rt;if(bs&&fs==="round"&&(GaKt&&(fs="bevel"),fs==="bevel"&&(Ga>2&&(fs="flipbevel"),Ga100)Ta=$n.mult(-1);else{let Js=Ga*Ln.add($n).mag()/Ln.sub($n).mag();Ta._perp()._mult(Js*(Sl?-1:1))}this.addCurrentVertex(Zr,Ta,0,0,Er),this.addCurrentVertex(Zr,Ta.mult(-1),0,0,Er)}else if(fs==="bevel"||fs==="fakeround"){let Js=-Math.sqrt(Ga*Ga-1),js=Sl?Js:0,Ds=Sl?0:Js;if(sn&&this.addCurrentVertex(Zr,Ln,js,Ds,Er),fs==="fakeround"){let uo=Math.round(180*Ao/Math.PI/20);for(let al=1;al2*xr){let js=Zr.add(yn.sub(Zr)._mult(xr/Js)._round());this.updateDistance(Zr,js),this.addCurrentVertex(js,$n,0,0,Er),Zr=js}}}}addCurrentVertex(D,nt,_t,Rt,Kt,Qt=!1){let be=nt.y*Rt-nt.x,Re=-nt.y-nt.x*Rt;this.addHalfVertex(D,nt.x+nt.y*_t,nt.y-nt.x*_t,Qt,!1,_t,Kt),this.addHalfVertex(D,be,Re,Qt,!0,-Rt,Kt),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,nt,_t,Rt,Kt,Qt))}addHalfVertex({x:D,y:nt},_t,Rt,Kt,Qt,be,Re){let er=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(Kt?1:0),(nt<<1)+(Qt?1:0),Math.round(63*_t)+128,Math.round(63*Rt)+128,1+(be===0?0:be<0?-1:1)|(63&er)<<2,er>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let xr=Re.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,xr),Re.primitiveLength++),Qt?this.e2=xr:this.e1=xr}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(D,nt){this.distance+=D.dist(nt),this.updateScaledDistance()}}let Zm,Og;Ji("LineBucket",ip,{omit:["layers","patternFeatures"]});var $m={get paint(){return Og=Og||new qt({"line-opacity":new Os(ut.paint_line["line-opacity"]),"line-color":new Os(ut.paint_line["line-color"]),"line-translate":new is(ut.paint_line["line-translate"]),"line-translate-anchor":new is(ut.paint_line["line-translate-anchor"]),"line-width":new Os(ut.paint_line["line-width"]),"line-gap-width":new Os(ut.paint_line["line-gap-width"]),"line-offset":new Os(ut.paint_line["line-offset"]),"line-blur":new Os(ut.paint_line["line-blur"]),"line-dasharray":new Zu(ut.paint_line["line-dasharray"]),"line-pattern":new qc(ut.paint_line["line-pattern"]),"line-gradient":new Gf(ut.paint_line["line-gradient"])})},get layout(){return Zm=Zm||new qt({"line-cap":new is(ut.layout_line["line-cap"]),"line-join":new Os(ut.layout_line["line-join"]),"line-miter-limit":new is(ut.layout_line["line-miter-limit"]),"line-round-limit":new is(ut.layout_line["line-round-limit"]),"line-sort-key":new Os(ut.layout_line["line-sort-key"])})}};class vd extends Os{possiblyEvaluate(D,nt){return nt=new Rl(Math.floor(nt.zoom),{now:nt.now,fadeDuration:nt.fadeDuration,zoomHistory:nt.zoomHistory,transition:nt.transition}),super.possiblyEvaluate(D,nt)}evaluate(D,nt,_t,Rt){return nt=M({},nt,{zoom:Math.floor(nt.zoom)}),super.evaluate(D,nt,_t,Rt)}}let Am;class Dg extends ht{constructor(D){super(D,$m),this.gradientVersion=0,Am||(Am=new vd($m.paint.properties["line-width"].specification),Am.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(D){if(D==="line-gradient"){let nt=this.gradientExpression();this.stepInterpolant=!!function(_t){return _t._styleExpression!==void 0}(nt)&&nt._styleExpression.expression instanceof Zn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(D,nt){super.recalculate(D,nt),this.paint._values["line-floorwidth"]=Am.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,D)}createBucket(D){return new ip(D)}queryRadius(D){let nt=D,_t=yd(Nn("line-width",this,nt),Nn("line-gap-width",this,nt)),Rt=Nn("line-offset",this,nt);return _t/2+Math.abs(Rt)+Ii(this.paint.get("line-translate"))}queryIntersectsFeature(D,nt,_t,Rt,Kt,Qt,be){let Re=_i(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Qt.angle,be),er=be/2*yd(this.paint.get("line-width").evaluate(nt,_t),this.paint.get("line-gap-width").evaluate(nt,_t)),xr=this.paint.get("line-offset").evaluate(nt,_t);return xr&&(Rt=function(Er,Zr){let sn=[];for(let yn=0;yn=3){for(let $n=0;$n0?D+2*G:G}let Gm=ke([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Cv=ke([{name:"a_projected_pos",components:3,type:"Float32"}],4);ke([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let Lv=ke([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ke([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let U0=ke([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Fg=ke([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function af(G,D,nt){return G.sections.forEach(_t=>{_t.text=function(Rt,Kt,Qt){let be=Kt.layout.get("text-transform").evaluate(Qt,{});return be==="uppercase"?Rt=Rt.toLocaleUpperCase():be==="lowercase"&&(Rt=Rt.toLocaleLowerCase()),Yl.applyArabicShaping&&(Rt=Yl.applyArabicShaping(Rt)),Rt}(_t.text,D,nt)}),G}ke([{name:"triangle",components:3,type:"Uint16"}]),ke([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ke([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ke([{type:"Float32",name:"offsetX"}]),ke([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ke([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let xd={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var wc=24,Rg=Ic,Pv=function(G,D,nt,_t,Rt){var Kt,Qt,be=8*Rt-_t-1,Re=(1<>1,xr=-7,Er=Rt-1,Zr=-1,sn=G[D+Er];for(Er+=Zr,Kt=sn&(1<<-xr)-1,sn>>=-xr,xr+=be;xr>0;Kt=256*Kt+G[D+Er],Er+=Zr,xr-=8);for(Qt=Kt&(1<<-xr)-1,Kt>>=-xr,xr+=_t;xr>0;Qt=256*Qt+G[D+Er],Er+=Zr,xr-=8);if(Kt===0)Kt=1-er;else{if(Kt===Re)return Qt?NaN:1/0*(sn?-1:1);Qt+=Math.pow(2,_t),Kt-=er}return(sn?-1:1)*Qt*Math.pow(2,Kt-_t)},bx=function(G,D,nt,_t,Rt,Kt){var Qt,be,Re,er=8*Kt-Rt-1,xr=(1<>1,Zr=Rt===23?Math.pow(2,-24)-Math.pow(2,-77):0,sn=0,yn=1,Ln=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(be=isNaN(D)?1:0,Qt=xr):(Qt=Math.floor(Math.log(D)/Math.LN2),D*(Re=Math.pow(2,-Qt))<1&&(Qt--,Re*=2),(D+=Qt+Er>=1?Zr/Re:Zr*Math.pow(2,1-Er))*Re>=2&&(Qt++,Re/=2),Qt+Er>=xr?(be=0,Qt=xr):Qt+Er>=1?(be=(D*Re-1)*Math.pow(2,Rt),Qt+=Er):(be=D*Math.pow(2,Er-1)*Math.pow(2,Rt),Qt=0));Rt>=8;G[nt+sn]=255&be,sn+=yn,be/=256,Rt-=8);for(Qt=Qt<0;G[nt+sn]=255&Qt,sn+=yn,Qt/=256,er-=8);G[nt+sn-yn]|=128*Ln};function Ic(G){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(G)?G:new Uint8Array(G||0),this.pos=0,this.type=0,this.length=this.buf.length}Ic.Varint=0,Ic.Fixed64=1,Ic.Bytes=2,Ic.Fixed32=5;var Mm=4294967296,wx=1/Mm,Bg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function V0(G){return G.type===Ic.Bytes?G.readVarint()+G.pos:G.pos+1}function bb(G,D,nt){return nt?4294967296*D+(G>>>0):4294967296*(D>>>0)+(G>>>0)}function zv(G,D,nt){var _t=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));nt.realloc(_t);for(var Rt=nt.pos-1;Rt>=G;Rt--)nt.buf[Rt+_t]=nt.buf[Rt]}function CT(G,D){for(var nt=0;nt>>8,G[nt+2]=D>>>16,G[nt+3]=D>>>24}function P3(G,D){return(G[D]|G[D+1]<<8|G[D+2]<<16)+(G[D+3]<<24)}Ic.prototype={destroy:function(){this.buf=null},readFields:function(G,D,nt){for(nt=nt||this.length;this.pos>3,Kt=this.pos;this.type=7&_t,G(Rt,D,this),this.pos===Kt&&this.skip(_t)}return D},readMessage:function(G,D){return this.readFields(G,D,this.readVarint()+this.pos)},readFixed32:function(){var G=Tx(this.buf,this.pos);return this.pos+=4,G},readSFixed32:function(){var G=P3(this.buf,this.pos);return this.pos+=4,G},readFixed64:function(){var G=Tx(this.buf,this.pos)+Tx(this.buf,this.pos+4)*Mm;return this.pos+=8,G},readSFixed64:function(){var G=Tx(this.buf,this.pos)+P3(this.buf,this.pos+4)*Mm;return this.pos+=8,G},readFloat:function(){var G=Pv(this.buf,this.pos,!0,23,4);return this.pos+=4,G},readDouble:function(){var G=Pv(this.buf,this.pos,!0,52,8);return this.pos+=8,G},readVarint:function(G){var D,nt,_t=this.buf;return D=127&(nt=_t[this.pos++]),nt<128?D:(D|=(127&(nt=_t[this.pos++]))<<7,nt<128?D:(D|=(127&(nt=_t[this.pos++]))<<14,nt<128?D:(D|=(127&(nt=_t[this.pos++]))<<21,nt<128?D:function(Rt,Kt,Qt){var be,Re,er=Qt.buf;if(be=(112&(Re=er[Qt.pos++]))>>4,Re<128||(be|=(127&(Re=er[Qt.pos++]))<<3,Re<128)||(be|=(127&(Re=er[Qt.pos++]))<<10,Re<128)||(be|=(127&(Re=er[Qt.pos++]))<<17,Re<128)||(be|=(127&(Re=er[Qt.pos++]))<<24,Re<128)||(be|=(1&(Re=er[Qt.pos++]))<<31,Re<128))return bb(Rt,be,Kt);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(nt=_t[this.pos]))<<28,G,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var G=this.readVarint();return G%2==1?(G+1)/-2:G/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var G=this.readVarint()+this.pos,D=this.pos;return this.pos=G,G-D>=12&&Bg?function(nt,_t,Rt){return Bg.decode(nt.subarray(_t,Rt))}(this.buf,D,G):function(nt,_t,Rt){for(var Kt="",Qt=_t;Qt239?4:xr>223?3:xr>191?2:1;if(Qt+Zr>Rt)break;Zr===1?xr<128&&(Er=xr):Zr===2?(192&(be=nt[Qt+1]))==128&&(Er=(31&xr)<<6|63&be)<=127&&(Er=null):Zr===3?(Re=nt[Qt+2],(192&(be=nt[Qt+1]))==128&&(192&Re)==128&&((Er=(15&xr)<<12|(63&be)<<6|63&Re)<=2047||Er>=55296&&Er<=57343)&&(Er=null)):Zr===4&&(Re=nt[Qt+2],er=nt[Qt+3],(192&(be=nt[Qt+1]))==128&&(192&Re)==128&&(192&er)==128&&((Er=(15&xr)<<18|(63&be)<<12|(63&Re)<<6|63&er)<=65535||Er>=1114112)&&(Er=null)),Er===null?(Er=65533,Zr=1):Er>65535&&(Er-=65536,Kt+=String.fromCharCode(Er>>>10&1023|55296),Er=56320|1023&Er),Kt+=String.fromCharCode(Er),Qt+=Zr}return Kt}(this.buf,D,G)},readBytes:function(){var G=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,G);return this.pos=G,D},readPackedVarint:function(G,D){if(this.type!==Ic.Bytes)return G.push(this.readVarint(D));var nt=V0(this);for(G=G||[];this.pos127;);else if(D===Ic.Bytes)this.pos=this.readVarint()+this.pos;else if(D===Ic.Fixed32)this.pos+=4;else{if(D!==Ic.Fixed64)throw new Error("Unimplemented type: "+D);this.pos+=8}},writeTag:function(G,D){this.writeVarint(G<<3|D)},realloc:function(G){for(var D=this.length||16;D268435455||G<0?function(D,nt){var _t,Rt;if(D>=0?(_t=D%4294967296|0,Rt=D/4294967296|0):(Rt=~(-D/4294967296),4294967295^(_t=~(-D%4294967296))?_t=_t+1|0:(_t=0,Rt=Rt+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");nt.realloc(10),function(Kt,Qt,be){be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,be.buf[be.pos]=127&(Kt>>>=7)}(_t,0,nt),function(Kt,Qt){var be=(7&Kt)<<4;Qt.buf[Qt.pos++]|=be|((Kt>>>=3)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt)))))}(Rt,nt)}(G,this):(this.realloc(4),this.buf[this.pos++]=127&G|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=G>>>7&127))))},writeSVarint:function(G){this.writeVarint(G<0?2*-G-1:2*G)},writeBoolean:function(G){this.writeVarint(!!G)},writeString:function(G){G=String(G),this.realloc(4*G.length),this.pos++;var D=this.pos;this.pos=function(_t,Rt,Kt){for(var Qt,be,Re=0;Re55295&&Qt<57344){if(!be){Qt>56319||Re+1===Rt.length?(_t[Kt++]=239,_t[Kt++]=191,_t[Kt++]=189):be=Qt;continue}if(Qt<56320){_t[Kt++]=239,_t[Kt++]=191,_t[Kt++]=189,be=Qt;continue}Qt=be-55296<<10|Qt-56320|65536,be=null}else be&&(_t[Kt++]=239,_t[Kt++]=191,_t[Kt++]=189,be=null);Qt<128?_t[Kt++]=Qt:(Qt<2048?_t[Kt++]=Qt>>6|192:(Qt<65536?_t[Kt++]=Qt>>12|224:(_t[Kt++]=Qt>>18|240,_t[Kt++]=Qt>>12&63|128),_t[Kt++]=Qt>>6&63|128),_t[Kt++]=63&Qt|128)}return Kt}(this.buf,G,this.pos);var nt=this.pos-D;nt>=128&&zv(D,nt,this),this.pos=D-1,this.writeVarint(nt),this.pos+=nt},writeFloat:function(G){this.realloc(4),bx(this.buf,G,this.pos,!0,23,4),this.pos+=4},writeDouble:function(G){this.realloc(8),bx(this.buf,G,this.pos,!0,52,8),this.pos+=8},writeBytes:function(G){var D=G.length;this.writeVarint(D),this.realloc(D);for(var nt=0;nt=128&&zv(nt,_t,this),this.pos=nt-1,this.writeVarint(_t),this.pos+=_t},writeMessage:function(G,D,nt){this.writeTag(G,Ic.Bytes),this.writeRawMessage(D,nt)},writePackedVarint:function(G,D){D.length&&this.writeMessage(G,CT,D)},writePackedSVarint:function(G,D){D.length&&this.writeMessage(G,LT,D)},writePackedBoolean:function(G,D){D.length&&this.writeMessage(G,IT,D)},writePackedFloat:function(G,D){D.length&&this.writeMessage(G,PT,D)},writePackedDouble:function(G,D){D.length&&this.writeMessage(G,zT,D)},writePackedFixed32:function(G,D){D.length&&this.writeMessage(G,OT,D)},writePackedSFixed32:function(G,D){D.length&&this.writeMessage(G,DT,D)},writePackedFixed64:function(G,D){D.length&&this.writeMessage(G,FT,D)},writePackedSFixed64:function(G,D){D.length&&this.writeMessage(G,kx,D)},writeBytesField:function(G,D){this.writeTag(G,Ic.Bytes),this.writeBytes(D)},writeFixed32Field:function(G,D){this.writeTag(G,Ic.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(G,D){this.writeTag(G,Ic.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(G,D){this.writeTag(G,Ic.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(G,D){this.writeTag(G,Ic.Fixed64),this.writeSFixed64(D)},writeVarintField:function(G,D){this.writeTag(G,Ic.Varint),this.writeVarint(D)},writeSVarintField:function(G,D){this.writeTag(G,Ic.Varint),this.writeSVarint(D)},writeStringField:function(G,D){this.writeTag(G,Ic.Bytes),this.writeString(D)},writeFloatField:function(G,D){this.writeTag(G,Ic.Fixed32),this.writeFloat(D)},writeDoubleField:function(G,D){this.writeTag(G,Ic.Fixed64),this.writeDouble(D)},writeBooleanField:function(G,D){this.writeVarintField(G,!!D)}};var wb=r(Rg);let Ax=3;function RT(G,D,nt){G===1&&nt.readMessage(z3,D)}function z3(G,D,nt){if(G===3){let{id:_t,bitmap:Rt,width:Kt,height:Qt,left:be,top:Re,advance:er}=nt.readMessage(kb,{});D.push({id:_t,bitmap:new jl({width:Kt+2*Ax,height:Qt+2*Ax},Rt),metrics:{width:Kt,height:Qt,left:be,top:Re,advance:er}})}}function kb(G,D,nt){G===1?D.id=nt.readVarint():G===2?D.bitmap=nt.readBytes():G===3?D.width=nt.readVarint():G===4?D.height=nt.readVarint():G===5?D.left=nt.readSVarint():G===6?D.top=nt.readSVarint():G===7&&(D.advance=nt.readVarint())}let Tb=Ax;function Mx(G){let D=0,nt=0;for(let Qt of G)D+=Qt.w*Qt.h,nt=Math.max(nt,Qt.w);G.sort((Qt,be)=>be.h-Qt.h);let _t=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),nt),h:1/0}],Rt=0,Kt=0;for(let Qt of G)for(let be=_t.length-1;be>=0;be--){let Re=_t[be];if(!(Qt.w>Re.w||Qt.h>Re.h)){if(Qt.x=Re.x,Qt.y=Re.y,Kt=Math.max(Kt,Qt.y+Qt.h),Rt=Math.max(Rt,Qt.x+Qt.w),Qt.w===Re.w&&Qt.h===Re.h){let er=_t.pop();be<_t.length&&(_t[be]=er)}else Qt.h===Re.h?(Re.x+=Qt.w,Re.w-=Qt.w):Qt.w===Re.w?(Re.y+=Qt.h,Re.h-=Qt.h):(_t.push({x:Re.x+Qt.w,y:Re.y,w:Re.w-Qt.w,h:Qt.h}),Re.y+=Qt.h,Re.h-=Qt.h);break}}return{w:Rt,h:Kt,fill:D/(Rt*Kt)||0}}let rd=1;class Yd{constructor(D,{pixelRatio:nt,version:_t,stretchX:Rt,stretchY:Kt,content:Qt,textFitWidth:be,textFitHeight:Re}){this.paddedRect=D,this.pixelRatio=nt,this.stretchX=Rt,this.stretchY=Kt,this.content=Qt,this.version=_t,this.textFitWidth=be,this.textFitHeight=Re}get tl(){return[this.paddedRect.x+rd,this.paddedRect.y+rd]}get br(){return[this.paddedRect.x+this.paddedRect.w-rd,this.paddedRect.y+this.paddedRect.h-rd]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*rd)/this.pixelRatio,(this.paddedRect.h-2*rd)/this.pixelRatio]}}class I3{constructor(D,nt){let _t={},Rt={};this.haveRenderCallbacks=[];let Kt=[];this.addImages(D,_t,Kt),this.addImages(nt,Rt,Kt);let{w:Qt,h:be}=Mx(Kt),Re=new Al({width:Qt||1,height:be||1});for(let er in D){let xr=D[er],Er=_t[er].paddedRect;Al.copy(xr.data,Re,{x:0,y:0},{x:Er.x+rd,y:Er.y+rd},xr.data)}for(let er in nt){let xr=nt[er],Er=Rt[er].paddedRect,Zr=Er.x+rd,sn=Er.y+rd,yn=xr.data.width,Ln=xr.data.height;Al.copy(xr.data,Re,{x:0,y:0},{x:Zr,y:sn},xr.data),Al.copy(xr.data,Re,{x:0,y:Ln-1},{x:Zr,y:sn-1},{width:yn,height:1}),Al.copy(xr.data,Re,{x:0,y:0},{x:Zr,y:sn+Ln},{width:yn,height:1}),Al.copy(xr.data,Re,{x:yn-1,y:0},{x:Zr-1,y:sn},{width:1,height:Ln}),Al.copy(xr.data,Re,{x:0,y:0},{x:Zr+yn,y:sn},{width:1,height:Ln})}this.image=Re,this.iconPositions=_t,this.patternPositions=Rt}addImages(D,nt,_t){for(let Rt in D){let Kt=D[Rt],Qt={x:0,y:0,w:Kt.data.width+2*rd,h:Kt.data.height+2*rd};_t.push(Qt),nt[Rt]=new Yd(Qt,Kt),Kt.hasRenderCallback&&this.haveRenderCallbacks.push(Rt)}}patchUpdatedImages(D,nt){D.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let _t in D.updatedImages)this.patchUpdatedImage(this.iconPositions[_t],D.getImage(_t),nt),this.patchUpdatedImage(this.patternPositions[_t],D.getImage(_t),nt)}patchUpdatedImage(D,nt,_t){if(!D||!nt||D.version===nt.version)return;D.version=nt.version;let[Rt,Kt]=D.tl;_t.update(nt.data,void 0,{x:Rt,y:Kt})}}var Ym;Ji("ImagePosition",Yd),Ji("ImageAtlas",I3),t.ah=void 0,(Ym=t.ah||(t.ah={}))[Ym.none=0]="none",Ym[Ym.horizontal=1]="horizontal",Ym[Ym.vertical=2]="vertical",Ym[Ym.horizontalOnly=3]="horizontalOnly";let Ov=-17;class Y1{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(D,nt){let _t=new Y1;return _t.scale=D||1,_t.fontStack=nt,_t}static forImage(D){let nt=new Y1;return nt.imageName=D,nt}}class Dv{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(D,nt){let _t=new Dv;for(let Rt=0;Rt=0&&_t>=D&&Ex[this.text.charCodeAt(_t)];_t--)nt--;this.text=this.text.substring(D,nt),this.sectionIndex=this.sectionIndex.slice(D,nt)}substring(D,nt){let _t=new Dv;return _t.text=this.text.substring(D,nt),_t.sectionIndex=this.sectionIndex.slice(D,nt),_t.sections=this.sections,_t}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((D,nt)=>Math.max(D,this.sections[nt].scale),0)}addTextSection(D,nt){this.text+=D.text,this.sections.push(Y1.forText(D.scale,D.fontStack||nt));let _t=this.sections.length-1;for(let Rt=0;Rt=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Sx(G,D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn,yn){let Ln=Dv.fromFeature(G,Rt),$n;Er===t.ah.vertical&&Ln.verticalizePunctuation();let{processBidirectionalText:wi,processStyledBidirectionalText:Ta}=Yl;if(wi&&Ln.sections.length===1){$n=[];let Ga=wi(Ln.toString(),Ng(Ln,er,Kt,D,_t,sn));for(let Ao of Ga){let Ms=new Dv;Ms.text=Ao,Ms.sections=Ln.sections;for(let Sl=0;Sl0&&A0>Bd&&(Bd=A0)}else{let hh=Ms[rc.fontStack],Nd=hh&&hh[$c];if(Nd&&Nd.rect)Wv=Nd.rect,Th=Nd.metrics;else{let A0=Ao[rc.fontStack],Zp=A0&&A0[$c];if(!Zp)continue;Th=Zp.metrics}Gh=(bd-rc.scale)*wc}op?(Ga.verticalizable=!0,yp.push({glyph:$c,imageName:H0,x:ql,y:ch+Gh,vertical:op,scale:rc.scale,fontStack:rc.fontStack,sectionIndex:Oc,metrics:Th,rect:Wv}),ql+=W0*rc.scale+uo):(yp.push({glyph:$c,imageName:H0,x:ql,y:ch+Gh,vertical:op,scale:rc.scale,fontStack:rc.fontStack,sectionIndex:Oc,metrics:Th,rect:Wv}),ql+=Th.advance*rc.scale+uo)}yp.length!==0&&(nh=Math.max(ql-uo,nh),jT(yp,0,yp.length-1,Lp,Bd)),ql=0;let qp=fs*bd+Bd;Xd.lineOffset=Math.max(Bd,ap),ch+=qp,_d=Math.max(qp,_d),++Df}var nd;let mp=ch-Ov,{horizontalAlign:gp,verticalAlign:vp}=Mb(Js);(function(of,bd,ap,Xd,yp,Bd,qp,kh,rc){let Oc=(bd-ap)*yp,$c=0;$c=Bd!==qp?-kh*Xd-Ov:(-Xd*rc+.5)*qp;for(let Gh of of)for(let Th of Gh.positionedGlyphs)Th.x+=Oc,Th.y+=$c})(Ga.positionedLines,Lp,gp,vp,nh,_d,fs,mp,bs.length),Ga.top+=-vp*mp,Ga.bottom=Ga.top+mp,Ga.left+=-gp*nh,Ga.right=Ga.left+nh}(da,D,nt,_t,$n,Qt,be,Re,Er,er,Zr,yn),!function(Ga){for(let Ao of Ga)if(Ao.positionedGlyphs.length!==0)return!1;return!0}(Xi)&&da}let Ex={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},BT={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},NT={40:!0};function Cx(G,D,nt,_t,Rt,Kt){if(D.imageName){let Qt=_t[D.imageName];return Qt?Qt.displaySize[0]*D.scale*wc/Kt+Rt:0}{let Qt=nt[D.fontStack],be=Qt&&Qt[G];return be?be.metrics.advance*D.scale+Rt:0}}function O3(G,D,nt,_t){let Rt=Math.pow(G-D,2);return _t?G=0,er=0;for(let Er=0;Erer){let xr=Math.ceil(Kt/er);Rt*=xr/Qt,Qt=xr}return{x1:_t,y1:Rt,x2:_t+Kt,y2:Rt+Qt}}function F3(G,D,nt,_t,Rt,Kt){let Qt=G.image,be;if(Qt.content){let $n=Qt.content,wi=Qt.pixelRatio||1;be=[$n[0]/wi,$n[1]/wi,Qt.displaySize[0]-$n[2]/wi,Qt.displaySize[1]-$n[3]/wi]}let Re=D.left*Kt,er=D.right*Kt,xr,Er,Zr,sn;nt==="width"||nt==="both"?(sn=Rt[0]+Re-_t[3],Er=Rt[0]+er+_t[1]):(sn=Rt[0]+(Re+er-Qt.displaySize[0])/2,Er=sn+Qt.displaySize[0]);let yn=D.top*Kt,Ln=D.bottom*Kt;return nt==="height"||nt==="both"?(xr=Rt[1]+yn-_t[0],Zr=Rt[1]+Ln+_t[2]):(xr=Rt[1]+(yn+Ln-Qt.displaySize[1])/2,Zr=xr+Qt.displaySize[1]),{image:Qt,top:xr,right:Er,bottom:Zr,left:sn,collisionPadding:be}}let K1=255,nm=128,Km=K1*nm;function R3(G,D){let{expression:nt}=D;if(nt.kind==="constant")return{kind:"constant",layoutSize:nt.evaluate(new Rl(G+1))};if(nt.kind==="source")return{kind:"source"};{let{zoomStops:_t,interpolationType:Rt}=nt,Kt=0;for(;Kt<_t.length&&_t[Kt]<=G;)Kt++;Kt=Math.max(0,Kt-1);let Qt=Kt;for(;Qt<_t.length&&_t[Qt]Qt.id),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ti([]),this.placementViewportMatrix=ti([]);let nt=this.layers[0]._unevaluatedLayout._values;this.textSizeData=R3(this.zoom,nt["text-size"]),this.iconSizeData=R3(this.zoom,nt["icon-size"]);let _t=this.layers[0].layout,Rt=_t.get("symbol-sort-key"),Kt=_t.get("symbol-z-order");this.canOverlap=Sb(_t,"text-overlap","text-allow-overlap")!=="never"||Sb(_t,"icon-overlap","icon-allow-overlap")!=="never"||_t.get("text-ignore-placement")||_t.get("icon-ignore-placement"),this.sortFeaturesByKey=Kt!=="viewport-y"&&!Rt.isConstant(),this.sortFeaturesByY=(Kt==="viewport-y"||Kt==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,_t.get("symbol-placement")==="point"&&(this.writingModes=_t.get("text-writing-mode").map(Qt=>t.ah[Qt])),this.stateDependentLayerIds=this.layers.filter(Qt=>Qt.isStateDependent()).map(Qt=>Qt.id),this.sourceID=D.sourceID}createArrays(){this.text=new pf(new Kl(this.layers,this.zoom,D=>/^text/.test(D))),this.icon=new pf(new Kl(this.layers,this.zoom,D=>/^icon/.test(D))),this.glyphOffsetArray=new dl,this.lineVertexArray=new yl,this.symbolInstances=new ds,this.textAnchorOffsets=new wl}calculateGlyphDependencies(D,nt,_t,Rt,Kt){for(let Qt=0;Qt0)&&(Qt.value.kind!=="constant"||Qt.value.value.length>0),xr=Re.value.kind!=="constant"||!!Re.value.value||Object.keys(Re.parameters).length>0,Er=Kt.get("symbol-sort-key");if(this.features=[],!er&&!xr)return;let Zr=nt.iconDependencies,sn=nt.glyphDependencies,yn=nt.availableImages,Ln=new Rl(this.zoom);for(let{feature:$n,id:wi,index:Ta,sourceLayerIndex:Xi}of D){let da=Rt._featureFilter.needGeometry,Ga=Lr($n,da);if(!Rt._featureFilter.filter(Ln,Ga,_t))continue;let Ao,Ms;if(da||(Ga.geometry=kr($n)),er){let bs=Rt.getValueAndResolveTokens("text-field",Ga,_t,yn),fs=bn.factory(bs),Js=this.hasRTLText=this.hasRTLText||HT(fs);(!Js||Yl.getRTLTextPluginStatus()==="unavailable"||Js&&Yl.isParsed())&&(Ao=af(fs,Rt,Ga))}if(xr){let bs=Rt.getValueAndResolveTokens("icon-image",Ga,_t,yn);Ms=bs instanceof Li?bs:Li.fromString(bs)}if(!Ao&&!Ms)continue;let Sl=this.sortFeaturesByKey?Er.evaluate(Ga,{},_t):void 0;if(this.features.push({id:wi,text:Ao,icon:Ms,index:Ta,sourceLayerIndex:Xi,geometry:Ga.geometry,properties:$n.properties,type:VT[$n.type],sortKey:Sl}),Ms&&(Zr[Ms.name]=!0),Ao){let bs=Qt.evaluate(Ga,{},_t).join(","),fs=Kt.get("text-rotation-alignment")!=="viewport"&&Kt.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.ah.vertical)>=0;for(let Js of Ao.sections)if(Js.image)Zr[Js.image.name]=!0;else{let js=vs(Ao.toString()),Ds=Js.fontStack||bs,uo=sn[Ds]=sn[Ds]||{};this.calculateGlyphDependencies(Js.text,uo,fs,this.allowVerticalPlacement,js)}}}Kt.get("symbol-placement")==="line"&&(this.features=function($n){let wi={},Ta={},Xi=[],da=0;function Ga(bs){Xi.push($n[bs]),da++}function Ao(bs,fs,Js){let js=Ta[bs];return delete Ta[bs],Ta[fs]=js,Xi[js].geometry[0].pop(),Xi[js].geometry[0]=Xi[js].geometry[0].concat(Js[0]),js}function Ms(bs,fs,Js){let js=wi[fs];return delete wi[fs],wi[bs]=js,Xi[js].geometry[0].shift(),Xi[js].geometry[0]=Js[0].concat(Xi[js].geometry[0]),js}function Sl(bs,fs,Js){let js=Js?fs[0][fs[0].length-1]:fs[0][0];return`${bs}:${js.x}:${js.y}`}for(let bs=0;bs<$n.length;bs++){let fs=$n[bs],Js=fs.geometry,js=fs.text?fs.text.toString():null;if(!js){Ga(bs);continue}let Ds=Sl(js,Js),uo=Sl(js,Js,!0);if(Ds in Ta&&uo in wi&&Ta[Ds]!==wi[uo]){let al=Ms(Ds,uo,Js),Qs=Ao(Ds,uo,Xi[al].geometry);delete wi[Ds],delete Ta[uo],Ta[Sl(js,Xi[Qs].geometry,!0)]=Qs,Xi[al].geometry=null}else Ds in Ta?Ao(Ds,uo,Js):uo in wi?Ms(Ds,uo,Js):(Ga(bs),wi[Ds]=da-1,Ta[uo]=da-1)}return Xi.filter(bs=>bs.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort(($n,wi)=>$n.sortKey-wi.sortKey)}update(D,nt,_t){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,nt,this.layers,_t),this.icon.programConfigurations.updatePaintArrays(D,nt,this.layers,_t))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(D,nt){let _t=this.lineVertexArray.length;if(D.segment!==void 0){let Rt=D.dist(nt[D.segment+1]),Kt=D.dist(nt[D.segment]),Qt={};for(let be=D.segment+1;be=0;be--)Qt[be]={x:nt[be].x,y:nt[be].y,tileUnitDistanceFromAnchor:Kt},be>0&&(Kt+=nt[be-1].dist(nt[be]));for(let be=0;be0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(D,nt){let _t=D.placedSymbolArray.get(nt),Rt=_t.vertexStartIndex+4*_t.numGlyphs;for(let Kt=_t.vertexStartIndex;KtRt[be]-Rt[Re]||Kt[Re]-Kt[be]),Qt}addToSortKeyRanges(D,nt){let _t=this.sortKeyRanges[this.sortKeyRanges.length-1];_t&&_t.sortKey===nt?_t.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:nt,symbolInstanceStart:D,symbolInstanceEnd:D+1})}sortFeatures(D){if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let nt of this.symbolInstanceIndexes){let _t=this.symbolInstances.get(nt);this.featureSortOrder.push(_t.featureIndex),[_t.rightJustifiedTextSymbolIndex,_t.centerJustifiedTextSymbolIndex,_t.leftJustifiedTextSymbolIndex].forEach((Rt,Kt,Qt)=>{Rt>=0&&Qt.indexOf(Rt)===Kt&&this.addIndicesForPlacedSymbol(this.text,Rt)}),_t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,_t.verticalPlacedTextSymbolIndex),_t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,_t.placedIconSymbolIndex),_t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,_t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let X1,J1;Ji("SymbolBucket",jg,{omit:["layers","collisionBoxArray","features","compareText"]}),jg.MAX_GLYPHS=65535,jg.addDynamicAttributes=Xm;var Cb={get paint(){return J1=J1||new qt({"icon-opacity":new Os(ut.paint_symbol["icon-opacity"]),"icon-color":new Os(ut.paint_symbol["icon-color"]),"icon-halo-color":new Os(ut.paint_symbol["icon-halo-color"]),"icon-halo-width":new Os(ut.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Os(ut.paint_symbol["icon-halo-blur"]),"icon-translate":new is(ut.paint_symbol["icon-translate"]),"icon-translate-anchor":new is(ut.paint_symbol["icon-translate-anchor"]),"text-opacity":new Os(ut.paint_symbol["text-opacity"]),"text-color":new Os(ut.paint_symbol["text-color"],{runtimeType:cr,getOverride:G=>G.textColor,hasOverride:G=>!!G.textColor}),"text-halo-color":new Os(ut.paint_symbol["text-halo-color"]),"text-halo-width":new Os(ut.paint_symbol["text-halo-width"]),"text-halo-blur":new Os(ut.paint_symbol["text-halo-blur"]),"text-translate":new is(ut.paint_symbol["text-translate"]),"text-translate-anchor":new is(ut.paint_symbol["text-translate-anchor"])})},get layout(){return X1=X1||new qt({"symbol-placement":new is(ut.layout_symbol["symbol-placement"]),"symbol-spacing":new is(ut.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new is(ut.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Os(ut.layout_symbol["symbol-sort-key"]),"symbol-z-order":new is(ut.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new is(ut.layout_symbol["icon-allow-overlap"]),"icon-overlap":new is(ut.layout_symbol["icon-overlap"]),"icon-ignore-placement":new is(ut.layout_symbol["icon-ignore-placement"]),"icon-optional":new is(ut.layout_symbol["icon-optional"]),"icon-rotation-alignment":new is(ut.layout_symbol["icon-rotation-alignment"]),"icon-size":new Os(ut.layout_symbol["icon-size"]),"icon-text-fit":new is(ut.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new is(ut.layout_symbol["icon-text-fit-padding"]),"icon-image":new Os(ut.layout_symbol["icon-image"]),"icon-rotate":new Os(ut.layout_symbol["icon-rotate"]),"icon-padding":new Os(ut.layout_symbol["icon-padding"]),"icon-keep-upright":new is(ut.layout_symbol["icon-keep-upright"]),"icon-offset":new Os(ut.layout_symbol["icon-offset"]),"icon-anchor":new Os(ut.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new is(ut.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new is(ut.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new is(ut.layout_symbol["text-rotation-alignment"]),"text-field":new Os(ut.layout_symbol["text-field"]),"text-font":new Os(ut.layout_symbol["text-font"]),"text-size":new Os(ut.layout_symbol["text-size"]),"text-max-width":new Os(ut.layout_symbol["text-max-width"]),"text-line-height":new is(ut.layout_symbol["text-line-height"]),"text-letter-spacing":new Os(ut.layout_symbol["text-letter-spacing"]),"text-justify":new Os(ut.layout_symbol["text-justify"]),"text-radial-offset":new Os(ut.layout_symbol["text-radial-offset"]),"text-variable-anchor":new is(ut.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Os(ut.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Os(ut.layout_symbol["text-anchor"]),"text-max-angle":new is(ut.layout_symbol["text-max-angle"]),"text-writing-mode":new is(ut.layout_symbol["text-writing-mode"]),"text-rotate":new Os(ut.layout_symbol["text-rotate"]),"text-padding":new is(ut.layout_symbol["text-padding"]),"text-keep-upright":new is(ut.layout_symbol["text-keep-upright"]),"text-transform":new Os(ut.layout_symbol["text-transform"]),"text-offset":new Os(ut.layout_symbol["text-offset"]),"text-allow-overlap":new is(ut.layout_symbol["text-allow-overlap"]),"text-overlap":new is(ut.layout_symbol["text-overlap"]),"text-ignore-placement":new is(ut.layout_symbol["text-ignore-placement"]),"text-optional":new is(ut.layout_symbol["text-optional"])})}};class Rv{constructor(D){if(D.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=D.property.overrides?D.property.overrides.runtimeType:oe,this.defaultValue=D}evaluate(D){if(D.formattedSection){let nt=this.defaultValue.property.overrides;if(nt&&nt.hasOverride(D.formattedSection))return nt.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default}eachChild(D){this.defaultValue.isConstant()||D(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ji("FormatSectionOverride",Rv,{omit:["defaultValue"]});class zx extends ht{constructor(D){super(D,Cb)}recalculate(D,nt){if(super.recalculate(D,nt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let _t=this.layout.get("text-writing-mode");if(_t){let Rt=[];for(let Kt of _t)Rt.indexOf(Kt)<0&&Rt.push(Kt);this.layout._values["text-writing-mode"]=Rt}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,nt,_t,Rt){let Kt=this.layout.get(D).evaluate(nt,{},_t,Rt),Qt=this._unevaluatedLayout._values[D];return Qt.isDataDriven()||Wh(Qt.value)||!Kt?Kt:function(be,Re){return Re.replace(/{([^{}]+)}/g,(er,xr)=>be&&xr in be?String(be[xr]):"")}(nt.properties,Kt)}createBucket(D){return new jg(D)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let D of Cb.paint.overridableProperties){if(!zx.hasPaintOverride(this.layout,D))continue;let nt=this.paint.get(D),_t=new Rv(nt),Rt=new jc(_t,nt.property.specification),Kt=null;Kt=nt.value.kind==="constant"||nt.value.kind==="source"?new Ch("source",Rt):new Ec("composite",Rt,nt.value.zoomStops),this.paint._values[D]=new Iu(nt.property,Kt,nt.parameters)}}_handleOverridablePaintPropertyUpdate(D,nt,_t){return!(!this.layout||nt.isDataDriven()||_t.isDataDriven())&&zx.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,nt){let _t=D.get("text-field"),Rt=Cb.paint.properties[nt],Kt=!1,Qt=be=>{for(let Re of be)if(Rt.overrides&&Rt.overrides.hasOverride(Re))return void(Kt=!0)};if(_t.value.kind==="constant"&&_t.value.value instanceof bn)Qt(_t.value.value.sections);else if(_t.value.kind==="source"){let be=er=>{Kt||(er instanceof Wa&&li(er.value)===br?Qt(er.value.sections):er instanceof kl?Qt(er.sections):er.eachChild(be))},Re=_t.value;Re._styleExpression&&be(Re._styleExpression.expression)}return Kt}}let Lb;var B3={get paint(){return Lb=Lb||new qt({"background-color":new is(ut.paint_background["background-color"]),"background-pattern":new Zu(ut.paint_background["background-pattern"]),"background-opacity":new is(ut.paint_background["background-opacity"])})}};class Q1 extends ht{constructor(D){super(D,B3)}}let Ix;var Pb={get paint(){return Ix=Ix||new qt({"raster-opacity":new is(ut.paint_raster["raster-opacity"]),"raster-hue-rotate":new is(ut.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new is(ut.paint_raster["raster-brightness-min"]),"raster-brightness-max":new is(ut.paint_raster["raster-brightness-max"]),"raster-saturation":new is(ut.paint_raster["raster-saturation"]),"raster-contrast":new is(ut.paint_raster["raster-contrast"]),"raster-resampling":new is(ut.paint_raster["raster-resampling"]),"raster-fade-duration":new is(ut.paint_raster["raster-fade-duration"])})}};class WT extends ht{constructor(D){super(D,Pb)}}class N3 extends ht{constructor(D){super(D,{}),this.onAdd=nt=>{this.implementation.onAdd&&this.implementation.onAdd(nt,nt.painter.context.gl)},this.onRemove=nt=>{this.implementation.onRemove&&this.implementation.onRemove(nt,nt.painter.context.gl)},this.implementation=D}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class ty{constructor(D){this._methodToThrottle=D,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let zb=63710088e-1;class im{constructor(D,nt){if(isNaN(D)||isNaN(nt))throw new Error(`Invalid LngLat object: (${D}, ${nt})`);if(this.lng=+D,this.lat=+nt,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new im(C(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(D){let nt=Math.PI/180,_t=this.lat*nt,Rt=D.lat*nt,Kt=Math.sin(_t)*Math.sin(Rt)+Math.cos(_t)*Math.cos(Rt)*Math.cos((D.lng-this.lng)*nt);return zb*Math.acos(Math.min(Kt,1))}static convert(D){if(D instanceof im)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new im(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new im(Number("lng"in D?D.lng:D.lon),Number(D.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let j3=2*Math.PI*zb;function Ox(G){return j3*Math.cos(G*Math.PI/180)}function Dx(G){return(180+G)/360}function U3(G){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G*Math.PI/360)))/360}function T0(G,D){return G/Ox(D)}function Ib(G){return 360/Math.PI*Math.atan(Math.exp((180-360*G)*Math.PI/180))-90}class ey{constructor(D,nt,_t=0){this.x=+D,this.y=+nt,this.z=+_t}static fromLngLat(D,nt=0){let _t=im.convert(D);return new ey(Dx(_t.lng),U3(_t.lat),T0(nt,_t.lat))}toLngLat(){return new im(360*this.x-180,Ib(this.y))}toAltitude(){return this.z*Ox(Ib(this.y))}meterInMercatorCoordinateUnits(){return 1/j3*(D=Ib(this.y),1/Math.cos(D*Math.PI/180));var D}}function V3(G,D,nt){var _t=2*Math.PI*6378137/256/Math.pow(2,nt);return[G*_t-2*Math.PI*6378137/2,D*_t-2*Math.PI*6378137/2]}class Ob{constructor(D,nt,_t){if(!function(Rt,Kt,Qt){return!(Rt<0||Rt>25||Qt<0||Qt>=Math.pow(2,Rt)||Kt<0||Kt>=Math.pow(2,Rt))}(D,nt,_t))throw new Error(`x=${nt}, y=${_t}, z=${D} outside of bounds. 0<=x<${Math.pow(2,D)}, 0<=y<${Math.pow(2,D)} 0<=z<=25 `);this.z=D,this.x=nt,this.y=_t,this.key=Bv(0,D,D,nt,_t)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,nt,_t){let Rt=(Qt=this.y,be=this.z,Re=V3(256*(Kt=this.x),256*(Qt=Math.pow(2,be)-Qt-1),be),er=V3(256*(Kt+1),256*(Qt+1),be),Re[0]+","+Re[1]+","+er[0]+","+er[1]);var Kt,Qt,be,Re,er;let xr=function(Er,Zr,sn){let yn,Ln="";for(let $n=Er;$n>0;$n--)yn=1<<$n-1,Ln+=(Zr&yn?1:0)+(sn&yn?2:0);return Ln}(this.z,this.x,this.y);return D[(this.x+this.y)%D.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(_t==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,nt>1?"@2x":"").replace(/{quadkey}/g,xr).replace(/{bbox-epsg-3857}/g,Rt)}isChildOf(D){let nt=this.z-D.z;return nt>0&&D.x===this.x>>nt&&D.y===this.y>>nt}getTilePoint(D){let nt=Math.pow(2,this.z);return new o((D.x*nt-this.x)*eu,(D.y*nt-this.y)*eu)}toString(){return`${this.z}/${this.x}/${this.y}`}}class H3{constructor(D,nt){this.wrap=D,this.canonical=nt,this.key=Bv(D,nt.z,nt.z,nt.x,nt.y)}}class h0{constructor(D,nt,_t,Rt,Kt){if(D<_t)throw new Error(`overscaledZ should be >= z; overscaledZ = ${D}; z = ${_t}`);this.overscaledZ=D,this.wrap=nt,this.canonical=new Ob(_t,+Rt,+Kt),this.key=Bv(nt,D,_t,Rt,Kt)}clone(){return new h0(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)}scaledTo(D){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let nt=this.canonical.z-D;return D>this.canonical.z?new h0(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new h0(D,this.wrap,D,this.canonical.x>>nt,this.canonical.y>>nt)}calculateScaledKey(D,nt){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let _t=this.canonical.z-D;return D>this.canonical.z?Bv(this.wrap*+nt,D,this.canonical.z,this.canonical.x,this.canonical.y):Bv(this.wrap*+nt,D,D,this.canonical.x>>_t,this.canonical.y>>_t)}isChildOf(D){if(D.wrap!==this.wrap)return!1;let nt=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ>nt&&D.canonical.y===this.canonical.y>>nt}children(D){if(this.overscaledZ>=D)return[new h0(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let nt=this.canonical.z+1,_t=2*this.canonical.x,Rt=2*this.canonical.y;return[new h0(nt,this.wrap,nt,_t,Rt),new h0(nt,this.wrap,nt,_t+1,Rt),new h0(nt,this.wrap,nt,_t,Rt+1),new h0(nt,this.wrap,nt,_t+1,Rt+1)]}isLessThan(D){return this.wrapD.wrap)&&(this.overscaledZD.overscaledZ)&&(this.canonical.xD.canonical.x)&&this.canonical.ythis.max&&(this.max=Er),Er=this.dim+1||nt<-1||nt>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(nt+1)*this.stride+(D+1)}unpack(D,nt,_t){return D*this.redFactor+nt*this.greenFactor+_t*this.blueFactor-this.baseShift}getPixels(){return new Al({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,nt,_t){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let Rt=nt*this.dim,Kt=nt*this.dim+this.dim,Qt=_t*this.dim,be=_t*this.dim+this.dim;switch(nt){case-1:Rt=Kt-1;break;case 1:Kt=Rt+1}switch(_t){case-1:Qt=be-1;break;case 1:be=Qt+1}let Re=-nt*this.dim,er=-_t*this.dim;for(let xr=Qt;xr=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${D} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[D]}}class q3{constructor(D,nt,_t,Rt,Kt){this.type="Feature",this._vectorTileFeature=D,D._z=nt,D._x=_t,D._y=Rt,this.properties=D.properties,this.id=Kt}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(D){this._geometry=D}toJSON(){let D={geometry:this.geometry};for(let nt in this)nt!=="_geometry"&&nt!=="_vectorTileFeature"&&(D[nt]=this[nt]);return D}}class Z3{constructor(D,nt){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new Pa(eu,16,0),this.grid3D=new Pa(eu,16,0),this.featureIndexArray=new gu,this.promoteId=nt}insert(D,nt,_t,Rt,Kt,Qt){let be=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(_t,Rt,Kt);let Re=Qt?this.grid3D:this.grid;for(let er=0;er=0&&Er[3]>=0&&Re.insert(be,Er[0],Er[1],Er[2],Er[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new di.VectorTile(new wb(this.rawTileData)).layers,this.sourceLayerCoder=new W3(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(D,nt,_t,Rt){this.loadVTLayers();let Kt=D.params||{},Qt=eu/D.tileSize/D.scale,be=Pf(Kt.filter),Re=D.queryGeometry,er=D.queryPadding*Qt,xr=Db(Re),Er=this.grid.query(xr.minX-er,xr.minY-er,xr.maxX+er,xr.maxY+er),Zr=Db(D.cameraQueryGeometry),sn=this.grid3D.query(Zr.minX-er,Zr.minY-er,Zr.maxX+er,Zr.maxY+er,($n,wi,Ta,Xi)=>function(da,Ga,Ao,Ms,Sl){for(let fs of da)if(Ga<=fs.x&&Ao<=fs.y&&Ms>=fs.x&&Sl>=fs.y)return!0;let bs=[new o(Ga,Ao),new o(Ga,Sl),new o(Ms,Sl),new o(Ms,Ao)];if(da.length>2){for(let fs of bs)if(bi(da,fs))return!0}for(let fs=0;fs(Xi||(Xi=kr(da)),Ga.queryIntersectsFeature(Re,da,Ao,Xi,this.z,D.transform,Qt,D.pixelPosMatrix)))}return yn}loadMatchingFeature(D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er){let Zr=this.bucketLayerIDs[nt];if(Qt&&!function($n,wi){for(let Ta=0;Ta<$n.length;Ta++)if(wi.indexOf($n[Ta])>=0)return!0;return!1}(Qt,Zr))return;let sn=this.sourceLayerCoder.decode(_t),yn=this.vtLayers[sn].feature(Rt);if(Kt.needGeometry){let $n=Lr(yn,!0);if(!Kt.filter(new Rl(this.tileID.overscaledZ),$n,this.tileID.canonical))return}else if(!Kt.filter(new Rl(this.tileID.overscaledZ),yn))return;let Ln=this.getId(yn,sn);for(let $n=0;$n{let be=D instanceof Oh?D.get(Qt):null;return be&&be.evaluate?be.evaluate(nt,_t,Rt):be})}function Db(G){let D=1/0,nt=1/0,_t=-1/0,Rt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),_t=Math.max(_t,Kt.x),Rt=Math.max(Rt,Kt.y);return{minX:D,minY:nt,maxX:_t,maxY:Rt}}function G3(G,D){return D-G}function Y3(G,D,nt,_t,Rt){let Kt=[];for(let Qt=0;Qt=_t&&Er.x>=_t||(xr.x>=_t?xr=new o(_t,xr.y+(_t-xr.x)/(Er.x-xr.x)*(Er.y-xr.y))._round():Er.x>=_t&&(Er=new o(_t,xr.y+(_t-xr.x)/(Er.x-xr.x)*(Er.y-xr.y))._round()),xr.y>=Rt&&Er.y>=Rt||(xr.y>=Rt?xr=new o(xr.x+(Rt-xr.y)/(Er.y-xr.y)*(Er.x-xr.x),Rt)._round():Er.y>=Rt&&(Er=new o(xr.x+(Rt-xr.y)/(Er.y-xr.y)*(Er.x-xr.x),Rt)._round()),Re&&xr.equals(Re[Re.length-1])||(Re=[xr],Kt.push(Re)),Re.push(Er)))))}}return Kt}Ji("FeatureIndex",Z3,{omit:["rawTileData","sourceLayerCoder"]});class Jm extends o{constructor(D,nt,_t,Rt){super(D,nt),this.angle=_t,Rt!==void 0&&(this.segment=Rt)}clone(){return new Jm(this.x,this.y,this.angle,this.segment)}}function K3(G,D,nt,_t,Rt){if(D.segment===void 0||nt===0)return!0;let Kt=D,Qt=D.segment+1,be=0;for(;be>-nt/2;){if(Qt--,Qt<0)return!1;be-=G[Qt].dist(Kt),Kt=G[Qt]}be+=G[Qt].dist(G[Qt+1]),Qt++;let Re=[],er=0;for(;be_t;)er-=Re.shift().angleDelta;if(er>Rt)return!1;Qt++,be+=xr.dist(Er)}return!0}function X3(G){let D=0;for(let nt=0;nter){let yn=(er-Re)/sn,Ln=Fo.number(Er.x,Zr.x,yn),$n=Fo.number(Er.y,Zr.y,yn),wi=new Jm(Ln,$n,Zr.angleTo(Er),xr);return wi._round(),!Qt||K3(G,wi,be,Qt,D)?wi:void 0}Re+=sn}}function ZT(G,D,nt,_t,Rt,Kt,Qt,be,Re){let er=J3(_t,Kt,Qt),xr=Q3(_t,Rt),Er=xr*Qt,Zr=G[0].x===0||G[0].x===Re||G[0].y===0||G[0].y===Re;return D-Er=0&&da=0&&Ga=0&&Zr+er<=xr){let Ao=new Jm(da,Ga,Ta,yn);Ao._round(),_t&&!K3(G,Ao,Kt,_t,Rt)||sn.push(Ao)}}Er+=wi}return be||sn.length||Qt||(sn=Vg(G,Er/2,nt,_t,Rt,Kt,Qt,!0,Re)),sn}Ji("Anchor",Jm);let Nv=rd;function t5(G,D,nt,_t){let Rt=[],Kt=G.image,Qt=Kt.pixelRatio,be=Kt.paddedRect.w-2*Nv,Re=Kt.paddedRect.h-2*Nv,er={x1:G.left,y1:G.top,x2:G.right,y2:G.bottom},xr=Kt.stretchX||[[0,be]],Er=Kt.stretchY||[[0,Re]],Zr=(uo,al)=>uo+al[1]-al[0],sn=xr.reduce(Zr,0),yn=Er.reduce(Zr,0),Ln=be-sn,$n=Re-yn,wi=0,Ta=sn,Xi=0,da=yn,Ga=0,Ao=Ln,Ms=0,Sl=$n;if(Kt.content&&_t){let uo=Kt.content,al=uo[2]-uo[0],Qs=uo[3]-uo[1];(Kt.textFitWidth||Kt.textFitHeight)&&(er=D3(G)),wi=jv(xr,0,uo[0]),Xi=jv(Er,0,uo[1]),Ta=jv(xr,uo[0],uo[2]),da=jv(Er,uo[1],uo[3]),Ga=uo[0]-wi,Ms=uo[1]-Xi,Ao=al-Ta,Sl=Qs-da}let bs=er.x1,fs=er.y1,Js=er.x2-bs,js=er.y2-fs,Ds=(uo,al,Qs,ql)=>{let ch=Wp(uo.stretch-wi,Ta,Js,bs),nh=Fx(uo.fixed-Ga,Ao,uo.stretch,sn),_d=Wp(al.stretch-Xi,da,js,fs),Lp=Fx(al.fixed-Ms,Sl,al.stretch,yn),Df=Wp(Qs.stretch-wi,Ta,Js,bs),nd=Fx(Qs.fixed-Ga,Ao,Qs.stretch,sn),mp=Wp(ql.stretch-Xi,da,js,fs),gp=Fx(ql.fixed-Ms,Sl,ql.stretch,yn),vp=new o(ch,_d),of=new o(Df,_d),bd=new o(Df,mp),ap=new o(ch,mp),Xd=new o(nh/Qt,Lp/Qt),yp=new o(nd/Qt,gp/Qt),Bd=D*Math.PI/180;if(Bd){let rc=Math.sin(Bd),Oc=Math.cos(Bd),$c=[Oc,-rc,rc,Oc];vp._matMult($c),of._matMult($c),ap._matMult($c),bd._matMult($c)}let qp=uo.stretch+uo.fixed,kh=al.stretch+al.fixed;return{tl:vp,tr:of,bl:ap,br:bd,tex:{x:Kt.paddedRect.x+Nv+qp,y:Kt.paddedRect.y+Nv+kh,w:Qs.stretch+Qs.fixed-qp,h:ql.stretch+ql.fixed-kh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Xd,pixelOffsetBR:yp,minFontScaleX:Ao/Qt/Js,minFontScaleY:Sl/Qt/js,isSDF:nt}};if(_t&&(Kt.stretchX||Kt.stretchY)){let uo=Uv(xr,Ln,sn),al=Uv(Er,$n,yn);for(let Qs=0;Qs0&&(Ln=Math.max(10,Ln),this.circleDiameter=Ln)}else{let Zr=!((Er=Qt.image)===null||Er===void 0)&&Er.content&&(Qt.image.textFitWidth||Qt.image.textFitHeight)?D3(Qt):{x1:Qt.left,y1:Qt.top,x2:Qt.right,y2:Qt.bottom};Zr.y1=Zr.y1*be-Re[0],Zr.y2=Zr.y2*be+Re[2],Zr.x1=Zr.x1*be-Re[3],Zr.x2=Zr.x2*be+Re[1];let sn=Qt.collisionPadding;if(sn&&(Zr.x1-=sn[0]*be,Zr.y1-=sn[1]*be,Zr.x2+=sn[2]*be,Zr.y2+=sn[3]*be),xr){let yn=new o(Zr.x1,Zr.y1),Ln=new o(Zr.x2,Zr.y1),$n=new o(Zr.x1,Zr.y2),wi=new o(Zr.x2,Zr.y2),Ta=xr*Math.PI/180;yn._rotate(Ta),Ln._rotate(Ta),$n._rotate(Ta),wi._rotate(Ta),Zr.x1=Math.min(yn.x,Ln.x,$n.x,wi.x),Zr.x2=Math.max(yn.x,Ln.x,$n.x,wi.x),Zr.y1=Math.min(yn.y,Ln.y,$n.y,wi.y),Zr.y2=Math.max(yn.y,Ln.y,$n.y,wi.y)}D.emplaceBack(nt.x,nt.y,Zr.x1,Zr.y1,Zr.x2,Zr.y2,_t,Rt,Kt)}this.boxEndIndex=D.length}}class $T{constructor(D=[],nt=(_t,Rt)=>_tRt?1:0){if(this.data=D,this.length=this.data.length,this.compare=nt,this.length>0)for(let _t=(this.length>>1)-1;_t>=0;_t--)this._down(_t)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],nt=this.data.pop();return--this.length>0&&(this.data[0]=nt,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:nt,compare:_t}=this,Rt=nt[D];for(;D>0;){let Kt=D-1>>1,Qt=nt[Kt];if(_t(Rt,Qt)>=0)break;nt[D]=Qt,D=Kt}nt[D]=Rt}_down(D){let{data:nt,compare:_t}=this,Rt=this.length>>1,Kt=nt[D];for(;D=0)break;nt[D]=nt[Qt],D=Qt}nt[D]=Kt}}function GT(G,D=1,nt=!1){let _t=1/0,Rt=1/0,Kt=-1/0,Qt=-1/0,be=G[0];for(let sn=0;snKt)&&(Kt=yn.x),(!sn||yn.y>Qt)&&(Qt=yn.y)}let Re=Math.min(Kt-_t,Qt-Rt),er=Re/2,xr=new $T([],YT);if(Re===0)return new o(_t,Rt);for(let sn=_t;snEr.d||!Er.d)&&(Er=sn,nt&&console.log("found best %d after %d probes",Math.round(1e4*sn.d)/1e4,Zr)),sn.max-Er.d<=D||(er=sn.h/2,xr.push(new am(sn.p.x-er,sn.p.y-er,er,G)),xr.push(new am(sn.p.x+er,sn.p.y-er,er,G)),xr.push(new am(sn.p.x-er,sn.p.y+er,er,G)),xr.push(new am(sn.p.x+er,sn.p.y+er,er,G)),Zr+=4)}return nt&&(console.log(`num probes: ${Zr}`),console.log(`best distance: ${Er.d}`)),Er.p}function YT(G,D){return D.max-G.max}function am(G,D,nt,_t){this.p=new o(G,D),this.h=nt,this.d=function(Rt,Kt){let Qt=!1,be=1/0;for(let Re=0;ReRt.y!=yn.y>Rt.y&&Rt.x<(yn.x-sn.x)*(Rt.y-sn.y)/(yn.y-sn.y)+sn.x&&(Qt=!Qt),be=Math.min(be,Ra(Rt,sn,yn))}}return(Qt?1:-1)*Math.sqrt(be)}(this.p,_t),this.max=this.d+this.h*Math.SQRT2}var Rd;t.aq=void 0,(Rd=t.aq||(t.aq={}))[Rd.center=1]="center",Rd[Rd.left=2]="left",Rd[Rd.right=3]="right",Rd[Rd.top=4]="top",Rd[Rd.bottom=5]="bottom",Rd[Rd["top-left"]=6]="top-left",Rd[Rd["top-right"]=7]="top-right",Rd[Rd["bottom-left"]=8]="bottom-left",Rd[Rd["bottom-right"]=9]="bottom-right";let Qm=7,Fb=Number.POSITIVE_INFINITY;function e5(G,D){return D[1]!==Fb?function(nt,_t,Rt){let Kt=0,Qt=0;switch(_t=Math.abs(_t),Rt=Math.abs(Rt),nt){case"top-right":case"top-left":case"top":Qt=Rt-Qm;break;case"bottom-right":case"bottom-left":case"bottom":Qt=-Rt+Qm}switch(nt){case"top-right":case"bottom-right":case"right":Kt=-_t;break;case"top-left":case"bottom-left":case"left":Kt=_t}return[Kt,Qt]}(G,D[0],D[1]):function(nt,_t){let Rt=0,Kt=0;_t<0&&(_t=0);let Qt=_t/Math.SQRT2;switch(nt){case"top-right":case"top-left":Kt=Qt-Qm;break;case"bottom-right":case"bottom-left":Kt=-Qt+Qm;break;case"bottom":Kt=-_t+Qm;break;case"top":Kt=_t-Qm}switch(nt){case"top-right":case"bottom-right":Rt=-Qt;break;case"top-left":case"bottom-left":Rt=Qt;break;case"left":Rt=_t;break;case"right":Rt=-_t}return[Rt,Kt]}(G,D[0])}function r5(G,D,nt){var _t;let Rt=G.layout,Kt=(_t=Rt.get("text-variable-anchor-offset"))===null||_t===void 0?void 0:_t.evaluate(D,{},nt);if(Kt){let be=Kt.values,Re=[];for(let er=0;erZr*wc);xr.startsWith("top")?Er[1]-=Qm:xr.startsWith("bottom")&&(Er[1]+=Qm),Re[er+1]=Er}return new xi(Re)}let Qt=Rt.get("text-variable-anchor");if(Qt){let be;be=G._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Rt.get("text-radial-offset").evaluate(D,{},nt)*wc,Fb]:Rt.get("text-offset").evaluate(D,{},nt).map(er=>er*wc);let Re=[];for(let er of Qt)Re.push(er,e5(er,be));return new xi(Re)}return null}function Rb(G){switch(G){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function KT(G,D,nt,_t,Rt,Kt,Qt,be,Re,er,xr){let Er=Kt.textMaxSize.evaluate(D,{});Er===void 0&&(Er=Qt);let Zr=G.layers[0].layout,sn=Zr.get("icon-offset").evaluate(D,{},xr),yn=i5(nt.horizontal),Ln=Qt/24,$n=G.tilePixelRatio*Ln,wi=G.tilePixelRatio*Er/24,Ta=G.tilePixelRatio*be,Xi=G.tilePixelRatio*Zr.get("symbol-spacing"),da=Zr.get("text-padding")*G.tilePixelRatio,Ga=function(uo,al,Qs,ql=1){let ch=uo.get("icon-padding").evaluate(al,{},Qs),nh=ch&&ch.values;return[nh[0]*ql,nh[1]*ql,nh[2]*ql,nh[3]*ql]}(Zr,D,xr,G.tilePixelRatio),Ao=Zr.get("text-max-angle")/180*Math.PI,Ms=Zr.get("text-rotation-alignment")!=="viewport"&&Zr.get("symbol-placement")!=="point",Sl=Zr.get("icon-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",bs=Zr.get("symbol-placement"),fs=Xi/2,Js=Zr.get("icon-text-fit"),js;_t&&Js!=="none"&&(G.allowVerticalPlacement&&nt.vertical&&(js=F3(_t,nt.vertical,Js,Zr.get("icon-text-fit-padding"),sn,Ln)),yn&&(_t=F3(_t,yn,Js,Zr.get("icon-text-fit-padding"),sn,Ln)));let Ds=(uo,al)=>{al.x<0||al.x>=eu||al.y<0||al.y>=eu||function(Qs,ql,ch,nh,_d,Lp,Df,nd,mp,gp,vp,of,bd,ap,Xd,yp,Bd,qp,kh,rc,Oc,$c,Gh,Th,Wv){let H0=Qs.addToLineVertexArray(ql,ch),W0,op,hh,Nd,A0=0,Zp=0,xp=0,Hb=0,Wb=-1,Ux=-1,Em={},qb=Yn("");if(Qs.allowVerticalPlacement&&nh.vertical){let Jd=nd.layout.get("text-rotate").evaluate(Oc,{},Th)+90;hh=new Rx(mp,ql,gp,vp,of,nh.vertical,bd,ap,Xd,Jd),Df&&(Nd=new Rx(mp,ql,gp,vp,of,Df,Bd,qp,Xd,Jd))}if(_d){let Jd=nd.layout.get("icon-rotate").evaluate(Oc,{}),$p=nd.layout.get("icon-text-fit")!=="none",tg=t5(_d,Jd,Gh,$p),q0=Df?t5(Df,Jd,Gh,$p):void 0;op=new Rx(mp,ql,gp,vp,of,_d,Bd,qp,!1,Jd),A0=4*tg.length;let Hg=Qs.iconSizeData,Z0=null;Hg.kind==="source"?(Z0=[nm*nd.layout.get("icon-size").evaluate(Oc,{})],Z0[0]>Km&&w(`${Qs.layerIds[0]}: Value for "icon-size" is >= ${K1}. Reduce your "icon-size".`)):Hg.kind==="composite"&&(Z0=[nm*$c.compositeIconSizes[0].evaluate(Oc,{},Th),nm*$c.compositeIconSizes[1].evaluate(Oc,{},Th)],(Z0[0]>Km||Z0[1]>Km)&&w(`${Qs.layerIds[0]}: Value for "icon-size" is >= ${K1}. Reduce your "icon-size".`)),Qs.addSymbols(Qs.icon,tg,Z0,rc,kh,Oc,t.ah.none,ql,H0.lineStartIndex,H0.lineLength,-1,Th),Wb=Qs.icon.placedSymbolArray.length-1,q0&&(Zp=4*q0.length,Qs.addSymbols(Qs.icon,q0,Z0,rc,kh,Oc,t.ah.vertical,ql,H0.lineStartIndex,H0.lineLength,-1,Th),Ux=Qs.icon.placedSymbolArray.length-1)}let Zb=Object.keys(nh.horizontal);for(let Jd of Zb){let $p=nh.horizontal[Jd];if(!W0){qb=Yn($p.text);let q0=nd.layout.get("text-rotate").evaluate(Oc,{},Th);W0=new Rx(mp,ql,gp,vp,of,$p,bd,ap,Xd,q0)}let tg=$p.positionedLines.length===1;if(xp+=n5(Qs,ql,$p,Lp,nd,Xd,Oc,yp,H0,nh.vertical?t.ah.horizontal:t.ah.horizontalOnly,tg?Zb:[Jd],Em,Wb,$c,Th),tg)break}nh.vertical&&(Hb+=n5(Qs,ql,nh.vertical,Lp,nd,Xd,Oc,yp,H0,t.ah.vertical,["vertical"],Em,Ux,$c,Th));let $b=W0?W0.boxStartIndex:Qs.collisionBoxArray.length,Gb=W0?W0.boxEndIndex:Qs.collisionBoxArray.length,XT=hh?hh.boxStartIndex:Qs.collisionBoxArray.length,JT=hh?hh.boxEndIndex:Qs.collisionBoxArray.length,QT=op?op.boxStartIndex:Qs.collisionBoxArray.length,t8=op?op.boxEndIndex:Qs.collisionBoxArray.length,u5=Nd?Nd.boxStartIndex:Qs.collisionBoxArray.length,qv=Nd?Nd.boxEndIndex:Qs.collisionBoxArray.length,id=-1,Zv=(Jd,$p)=>Jd&&Jd.circleDiameter?Math.max(Jd.circleDiameter,$p):$p;id=Zv(W0,id),id=Zv(hh,id),id=Zv(op,id),id=Zv(Nd,id);let Yb=id>-1?1:0;Yb&&(id*=Wv/wc),Qs.glyphOffsetArray.length>=jg.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Oc.sortKey!==void 0&&Qs.addToSortKeyRanges(Qs.symbolInstances.length,Oc.sortKey);let c5=r5(nd,Oc,Th),[e8,h5]=function(Jd,$p){let tg=Jd.length,q0=$p?.values;if(q0?.length>0)for(let Hg=0;Hg=0?Em.right:-1,Em.center>=0?Em.center:-1,Em.left>=0?Em.left:-1,Em.vertical||-1,Wb,Ux,qb,$b,Gb,XT,JT,QT,t8,u5,qv,gp,xp,Hb,A0,Zp,Yb,0,bd,id,e8,h5)}(G,al,uo,nt,_t,Rt,js,G.layers[0],G.collisionBoxArray,D.index,D.sourceLayerIndex,G.index,$n,[da,da,da,da],Ms,Re,Ta,Ga,Sl,sn,D,Kt,er,xr,Qt)};if(bs==="line")for(let uo of Y3(D.geometry,0,0,eu,eu)){let al=ZT(uo,Xi,Ao,nt.vertical||yn,_t,24,wi,G.overscaling,eu);for(let Qs of al)yn&&a5(G,yn.text,fs,Qs)||Ds(uo,Qs)}else if(bs==="line-center"){for(let uo of D.geometry)if(uo.length>1){let al=qT(uo,Ao,nt.vertical||yn,_t,24,wi);al&&Ds(uo,al)}}else if(D.type==="Polygon")for(let uo of Jc(D.geometry,0)){let al=GT(uo,16);Ds(uo[0],new Jm(al.x,al.y,0))}else if(D.type==="LineString")for(let uo of D.geometry)Ds(uo,new Jm(uo[0].x,uo[0].y,0));else if(D.type==="Point")for(let uo of D.geometry)for(let al of uo)Ds([al],new Jm(al.x,al.y,0))}function n5(G,D,nt,_t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn,yn){let Ln=function(Ta,Xi,da,Ga,Ao,Ms,Sl,bs){let fs=Ga.layout.get("text-rotate").evaluate(Ms,{})*Math.PI/180,Js=[];for(let js of Xi.positionedLines)for(let Ds of js.positionedGlyphs){if(!Ds.rect)continue;let uo=Ds.rect||{},al=Tb+1,Qs=!0,ql=1,ch=0,nh=(Ao||bs)&&Ds.vertical,_d=Ds.metrics.advance*Ds.scale/2;if(bs&&Xi.verticalizable&&(ch=js.lineOffset/2-(Ds.imageName?-(wc-Ds.metrics.width*Ds.scale)/2:(Ds.scale-1)*wc)),Ds.imageName){let rc=Sl[Ds.imageName];Qs=rc.sdf,ql=rc.pixelRatio,al=rd/ql}let Lp=Ao?[Ds.x+_d,Ds.y]:[0,0],Df=Ao?[0,0]:[Ds.x+_d+da[0],Ds.y+da[1]-ch],nd=[0,0];nh&&(nd=Df,Df=[0,0]);let mp=Ds.metrics.isDoubleResolution?2:1,gp=(Ds.metrics.left-al)*Ds.scale-_d+Df[0],vp=(-Ds.metrics.top-al)*Ds.scale+Df[1],of=gp+uo.w/mp*Ds.scale/ql,bd=vp+uo.h/mp*Ds.scale/ql,ap=new o(gp,vp),Xd=new o(of,vp),yp=new o(gp,bd),Bd=new o(of,bd);if(nh){let rc=new o(-_d,_d-Ov),Oc=-Math.PI/2,$c=wc/2-_d,Gh=new o(5-Ov-$c,-(Ds.imageName?$c:0)),Th=new o(...nd);ap._rotateAround(Oc,rc)._add(Gh)._add(Th),Xd._rotateAround(Oc,rc)._add(Gh)._add(Th),yp._rotateAround(Oc,rc)._add(Gh)._add(Th),Bd._rotateAround(Oc,rc)._add(Gh)._add(Th)}if(fs){let rc=Math.sin(fs),Oc=Math.cos(fs),$c=[Oc,-rc,rc,Oc];ap._matMult($c),Xd._matMult($c),yp._matMult($c),Bd._matMult($c)}let qp=new o(0,0),kh=new o(0,0);Js.push({tl:ap,tr:Xd,bl:yp,br:Bd,tex:uo,writingMode:Xi.writingMode,glyphOffset:Lp,sectionIndex:Ds.sectionIndex,isSDF:Qs,pixelOffsetTL:qp,pixelOffsetBR:kh,minFontScaleX:0,minFontScaleY:0})}return Js}(0,nt,be,Rt,Kt,Qt,_t,G.allowVerticalPlacement),$n=G.textSizeData,wi=null;$n.kind==="source"?(wi=[nm*Rt.layout.get("text-size").evaluate(Qt,{})],wi[0]>Km&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${K1}. Reduce your "text-size".`)):$n.kind==="composite"&&(wi=[nm*sn.compositeTextSizes[0].evaluate(Qt,{},yn),nm*sn.compositeTextSizes[1].evaluate(Qt,{},yn)],(wi[0]>Km||wi[1]>Km)&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${K1}. Reduce your "text-size".`)),G.addSymbols(G.text,Ln,wi,be,Kt,Qt,er,D,Re.lineStartIndex,Re.lineLength,Zr,yn);for(let Ta of xr)Er[Ta]=G.text.placedSymbolArray.length-1;return 4*Ln.length}function i5(G){for(let D in G)return G[D];return null}function a5(G,D,nt,_t){let Rt=G.compareText;if(D in Rt){let Kt=Rt[D];for(let Qt=Kt.length-1;Qt>=0;Qt--)if(_t.dist(Kt[Qt])>4;if(Rt!==1)throw new Error(`Got v${Rt} data when expected v1.`);let Kt=o5[15&_t];if(!Kt)throw new Error("Unrecognized array type.");let[Qt]=new Uint16Array(D,2,1),[be]=new Uint32Array(D,4,1);return new Bb(be,Qt,Kt,D)}constructor(D,nt=64,_t=Float64Array,Rt){if(isNaN(D)||D<0)throw new Error(`Unpexpected numItems value: ${D}.`);this.numItems=+D,this.nodeSize=Math.min(Math.max(+nt,2),65535),this.ArrayType=_t,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let Kt=o5.indexOf(this.ArrayType),Qt=2*D*this.ArrayType.BYTES_PER_ELEMENT,be=D*this.IndexArrayType.BYTES_PER_ELEMENT,Re=(8-be%8)%8;if(Kt<0)throw new Error(`Unexpected typed array class: ${_t}.`);Rt&&Rt instanceof ArrayBuffer?(this.data=Rt,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+be+Re,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+Qt+be+Re),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+be+Re,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Kt]),new Uint16Array(this.data,2,1)[0]=nt,new Uint32Array(this.data,4,1)[0]=D)}add(D,nt){let _t=this._pos>>1;return this.ids[_t]=_t,this.coords[this._pos++]=D,this.coords[this._pos++]=nt,_t}finish(){let D=this._pos>>1;if(D!==this.numItems)throw new Error(`Added ${D} items when expected ${this.numItems}.`);return Nb(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(D,nt,_t,Rt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Kt,coords:Qt,nodeSize:be}=this,Re=[0,Kt.length-1,0],er=[];for(;Re.length;){let xr=Re.pop()||0,Er=Re.pop()||0,Zr=Re.pop()||0;if(Er-Zr<=be){for(let $n=Zr;$n<=Er;$n++){let wi=Qt[2*$n],Ta=Qt[2*$n+1];wi>=D&&wi<=_t&&Ta>=nt&&Ta<=Rt&&er.push(Kt[$n])}continue}let sn=Zr+Er>>1,yn=Qt[2*sn],Ln=Qt[2*sn+1];yn>=D&&yn<=_t&&Ln>=nt&&Ln<=Rt&&er.push(Kt[sn]),(xr===0?D<=yn:nt<=Ln)&&(Re.push(Zr),Re.push(sn-1),Re.push(1-xr)),(xr===0?_t>=yn:Rt>=Ln)&&(Re.push(sn+1),Re.push(Er),Re.push(1-xr))}return er}within(D,nt,_t){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Rt,coords:Kt,nodeSize:Qt}=this,be=[0,Rt.length-1,0],Re=[],er=_t*_t;for(;be.length;){let xr=be.pop()||0,Er=be.pop()||0,Zr=be.pop()||0;if(Er-Zr<=Qt){for(let $n=Zr;$n<=Er;$n++)Kd(Kt[2*$n],Kt[2*$n+1],D,nt)<=er&&Re.push(Rt[$n]);continue}let sn=Zr+Er>>1,yn=Kt[2*sn],Ln=Kt[2*sn+1];Kd(yn,Ln,D,nt)<=er&&Re.push(Rt[sn]),(xr===0?D-_t<=yn:nt-_t<=Ln)&&(be.push(Zr),be.push(sn-1),be.push(1-xr)),(xr===0?D+_t>=yn:nt+_t>=Ln)&&(be.push(sn+1),be.push(Er),be.push(1-xr))}return Re}}function Nb(G,D,nt,_t,Rt,Kt){if(Rt-_t<=nt)return;let Qt=_t+Rt>>1;s5(G,D,Qt,_t,Rt,Kt),Nb(G,D,nt,_t,Qt-1,1-Kt),Nb(G,D,nt,Qt+1,Rt,1-Kt)}function s5(G,D,nt,_t,Rt,Kt){for(;Rt>_t;){if(Rt-_t>600){let er=Rt-_t+1,xr=nt-_t+1,Er=Math.log(er),Zr=.5*Math.exp(2*Er/3),sn=.5*Math.sqrt(Er*Zr*(er-Zr)/er)*(xr-er/2<0?-1:1);s5(G,D,nt,Math.max(_t,Math.floor(nt-xr*Zr/er+sn)),Math.min(Rt,Math.floor(nt+(er-xr)*Zr/er+sn)),Kt)}let Qt=D[2*nt+Kt],be=_t,Re=Rt;for(Vv(G,D,_t,nt),D[2*Rt+Kt]>Qt&&Vv(G,D,_t,Rt);beQt;)Re--}D[2*_t+Kt]===Qt?Vv(G,D,_t,Re):(Re++,Vv(G,D,Re,Rt)),Re<=nt&&(_t=Re+1),nt<=Re&&(Rt=Re-1)}}function Vv(G,D,nt,_t){Bx(G,nt,_t),Bx(D,2*nt,2*_t),Bx(D,2*nt+1,2*_t+1)}function Bx(G,D,nt){let _t=G[D];G[D]=G[nt],G[nt]=_t}function Kd(G,D,nt,_t){let Rt=G-nt,Kt=D-_t;return Rt*Rt+Kt*Kt}var jb;t.bg=void 0,(jb=t.bg||(t.bg={})).create="create",jb.load="load",jb.fullLoad="fullLoad";let Nx=null,Hv=[],Ub=1e3/60,jx="loadTime",Vb="fullLoadTime",l5={mark(G){performance.mark(G)},frame(G){let D=G;Nx!=null&&Hv.push(D-Nx),Nx=D},clearMetrics(){Nx=null,Hv=[],performance.clearMeasures(jx),performance.clearMeasures(Vb);for(let G in t.bg)performance.clearMarks(t.bg[G])},getPerformanceMetrics(){performance.measure(jx,t.bg.create,t.bg.load),performance.measure(Vb,t.bg.create,t.bg.fullLoad);let G=performance.getEntriesByName(jx)[0].duration,D=performance.getEntriesByName(Vb)[0].duration,nt=Hv.length,_t=1/(Hv.reduce((Kt,Qt)=>Kt+Qt,0)/nt/1e3),Rt=Hv.filter(Kt=>Kt>Ub).reduce((Kt,Qt)=>Kt+(Qt-Ub)/Ub,0);return{loadTime:G,fullLoadTime:D,fps:_t,percentDroppedFrames:Rt/(nt+Rt)*100,totalFrames:nt}}};t.$=class extends Dr{},t.A=gi,t.B=pa,t.C=function(G){if(N==null){let D=G.navigator?G.navigator.userAgent:null;N=!!G.safari||!(!D||!(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return N},t.D=is,t.E=ft,t.F=class{constructor(G,D){this.target=G,this.mapId=D,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new ty(()=>this.process()),this.subscription=function(nt,_t,Rt,Kt){return nt.addEventListener(_t,Rt,!1),{unsubscribe:()=>{nt.removeEventListener(_t,Rt,!1)}}}(this.target,"message",nt=>this.receive(nt)),this.globalScope=O(self)?G:window}registerMessageHandler(G,D){this.messageHandlers[G]=D}sendAsync(G,D){return new Promise((nt,_t)=>{let Rt=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Rt]={resolve:nt,reject:_t},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[Rt];let be={id:Rt,type:"",origin:location.origin,targetMapId:G.targetMapId,sourceMapId:this.mapId};this.target.postMessage(be)},{once:!0});let Kt=[],Qt=Object.assign(Object.assign({},G),{id:Rt,sourceMapId:this.mapId,origin:location.origin,data:ls(G.data,Kt)});this.target.postMessage(Qt,{transfer:Kt})})}receive(G){let D=G.data,nt=D.id;if(!(D.origin!=="file://"&&location.origin!=="file://"&&D.origin!=="resource://android"&&location.origin!=="resource://android"&&D.origin!==location.origin||D.targetMapId&&this.mapId!==D.targetMapId)){if(D.type===""){delete this.tasks[nt];let _t=this.abortControllers[nt];return delete this.abortControllers[nt],void(_t&&_t.abort())}if(O(self)||D.mustQueue)return this.tasks[nt]=D,this.taskQueue.push(nt),void this.invoker.trigger();this.processTask(nt,D)}}process(){if(this.taskQueue.length===0)return;let G=this.taskQueue.shift(),D=this.tasks[G];delete this.tasks[G],this.taskQueue.length>0&&this.invoker.trigger(),D&&this.processTask(G,D)}processTask(G,D){return e(this,void 0,void 0,function*(){if(D.type===""){let Rt=this.resolveRejects[G];return delete this.resolveRejects[G],Rt?void(D.error?Rt.reject(ms(D.error)):Rt.resolve(ms(D.data))):void 0}if(!this.messageHandlers[D.type])return void this.completeTask(G,new Error(`Could not find a registered handler for ${D.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let nt=ms(D.data),_t=new AbortController;this.abortControllers[G]=_t;try{let Rt=yield this.messageHandlers[D.type](D.sourceMapId,nt,_t);this.completeTask(G,null,Rt)}catch(Rt){this.completeTask(G,Rt)}})}completeTask(G,D,nt){let _t=[];delete this.abortControllers[G];let Rt={id:G,type:"",sourceMapId:this.mapId,origin:location.origin,error:D?ls(D):null,data:ls(nt,_t)};this.target.postMessage(Rt,{transfer:_t})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},t.G=pt,t.H=function(){var G=new gi(16);return gi!=Float32Array&&(G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[11]=0,G[12]=0,G[13]=0,G[14]=0),G[0]=1,G[5]=1,G[10]=1,G[15]=1,G},t.I=Yd,t.J=function(G,D,nt){var _t,Rt,Kt,Qt,be,Re,er,xr,Er,Zr,sn,yn,Ln=nt[0],$n=nt[1],wi=nt[2];return D===G?(G[12]=D[0]*Ln+D[4]*$n+D[8]*wi+D[12],G[13]=D[1]*Ln+D[5]*$n+D[9]*wi+D[13],G[14]=D[2]*Ln+D[6]*$n+D[10]*wi+D[14],G[15]=D[3]*Ln+D[7]*$n+D[11]*wi+D[15]):(Rt=D[1],Kt=D[2],Qt=D[3],be=D[4],Re=D[5],er=D[6],xr=D[7],Er=D[8],Zr=D[9],sn=D[10],yn=D[11],G[0]=_t=D[0],G[1]=Rt,G[2]=Kt,G[3]=Qt,G[4]=be,G[5]=Re,G[6]=er,G[7]=xr,G[8]=Er,G[9]=Zr,G[10]=sn,G[11]=yn,G[12]=_t*Ln+be*$n+Er*wi+D[12],G[13]=Rt*Ln+Re*$n+Zr*wi+D[13],G[14]=Kt*Ln+er*$n+sn*wi+D[14],G[15]=Qt*Ln+xr*$n+yn*wi+D[15]),G},t.K=function(G,D,nt){var _t=nt[0],Rt=nt[1],Kt=nt[2];return G[0]=D[0]*_t,G[1]=D[1]*_t,G[2]=D[2]*_t,G[3]=D[3]*_t,G[4]=D[4]*Rt,G[5]=D[5]*Rt,G[6]=D[6]*Rt,G[7]=D[7]*Rt,G[8]=D[8]*Kt,G[9]=D[9]*Kt,G[10]=D[10]*Kt,G[11]=D[11]*Kt,G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15],G},t.L=Ma,t.M=function(G,D){let nt={};for(let _t=0;_t{let D=window.document.createElement("video");return D.muted=!0,new Promise(nt=>{D.onloadstart=()=>{nt(D)};for(let _t of G){let Rt=window.document.createElement("source");rt(_t)||(D.crossOrigin="Anonymous"),Rt.src=_t,D.appendChild(Rt)}})},t.a4=function(){return E++},t.a5=wa,t.a6=jg,t.a7=Pf,t.a8=Lr,t.a9=q3,t.aA=function(G){if(G.type==="custom")return new N3(G);switch(G.type){case"background":return new Q1(G);case"circle":return new xa(G);case"fill":return new fi(G);case"fill-extrusion":return new Ap(G);case"heatmap":return new pl(G);case"hillshade":return new xc(G);case"line":return new Dg(G);case"raster":return new WT(G);case"symbol":return new zx(G)}},t.aB=p,t.aC=function(G,D){if(!G)return[{command:"setStyle",args:[D]}];let nt=[];try{if(!Pt(G.version,D.version))return[{command:"setStyle",args:[D]}];Pt(G.center,D.center)||nt.push({command:"setCenter",args:[D.center]}),Pt(G.zoom,D.zoom)||nt.push({command:"setZoom",args:[D.zoom]}),Pt(G.bearing,D.bearing)||nt.push({command:"setBearing",args:[D.bearing]}),Pt(G.pitch,D.pitch)||nt.push({command:"setPitch",args:[D.pitch]}),Pt(G.sprite,D.sprite)||nt.push({command:"setSprite",args:[D.sprite]}),Pt(G.glyphs,D.glyphs)||nt.push({command:"setGlyphs",args:[D.glyphs]}),Pt(G.transition,D.transition)||nt.push({command:"setTransition",args:[D.transition]}),Pt(G.light,D.light)||nt.push({command:"setLight",args:[D.light]}),Pt(G.terrain,D.terrain)||nt.push({command:"setTerrain",args:[D.terrain]}),Pt(G.sky,D.sky)||nt.push({command:"setSky",args:[D.sky]}),Pt(G.projection,D.projection)||nt.push({command:"setProjection",args:[D.projection]});let _t={},Rt=[];(function(Qt,be,Re,er){let xr;for(xr in be=be||{},Qt=Qt||{})Object.prototype.hasOwnProperty.call(Qt,xr)&&(Object.prototype.hasOwnProperty.call(be,xr)||Jt(xr,Re,er));for(xr in be)Object.prototype.hasOwnProperty.call(be,xr)&&(Object.prototype.hasOwnProperty.call(Qt,xr)?Pt(Qt[xr],be[xr])||(Qt[xr].type==="geojson"&&be[xr].type==="geojson"&&he(Qt,be,xr)?Wt(Re,{command:"setGeoJSONSourceData",args:[xr,be[xr].data]}):ge(xr,be,Re,er)):Ht(xr,be,Re))})(G.sources,D.sources,Rt,_t);let Kt=[];G.layers&&G.layers.forEach(Qt=>{"source"in Qt&&_t[Qt.source]?nt.push({command:"removeLayer",args:[Qt.id]}):Kt.push(Qt)}),nt=nt.concat(Rt),function(Qt,be,Re){be=be||[];let er=(Qt=Qt||[]).map(se),xr=be.map(se),Er=Qt.reduce(Tt,{}),Zr=be.reduce(Tt,{}),sn=er.slice(),yn=Object.create(null),Ln,$n,wi,Ta,Xi;for(let da=0,Ga=0;da@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(nt,_t,Rt,Kt)=>{let Qt=Rt||Kt;return D[_t]=!Qt||Qt.toLowerCase(),""}),D["max-age"]){let nt=parseInt(D["max-age"],10);isNaN(nt)?delete D["max-age"]:D["max-age"]=nt}return D},t.ab=function(G,D){let nt=[];for(let _t in G)_t in D||nt.push(_t);return nt},t.ac=_,t.ad=function(G,D,nt){var _t=Math.sin(nt),Rt=Math.cos(nt),Kt=D[0],Qt=D[1],be=D[2],Re=D[3],er=D[4],xr=D[5],Er=D[6],Zr=D[7];return D!==G&&(G[8]=D[8],G[9]=D[9],G[10]=D[10],G[11]=D[11],G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15]),G[0]=Kt*Rt+er*_t,G[1]=Qt*Rt+xr*_t,G[2]=be*Rt+Er*_t,G[3]=Re*Rt+Zr*_t,G[4]=er*Rt-Kt*_t,G[5]=xr*Rt-Qt*_t,G[6]=Er*Rt-be*_t,G[7]=Zr*Rt-Re*_t,G},t.ae=function(G){var D=new gi(16);return D[0]=G[0],D[1]=G[1],D[2]=G[2],D[3]=G[3],D[4]=G[4],D[5]=G[5],D[6]=G[6],D[7]=G[7],D[8]=G[8],D[9]=G[9],D[10]=G[10],D[11]=G[11],D[12]=G[12],D[13]=G[13],D[14]=G[14],D[15]=G[15],D},t.af=$i,t.ag=function(G,D){let nt=0,_t=0;if(G.kind==="constant")_t=G.layoutSize;else if(G.kind!=="source"){let{interpolationType:Rt,minZoom:Kt,maxZoom:Qt}=G,be=Rt?_(za.interpolationFactor(Rt,D,Kt,Qt),0,1):0;G.kind==="camera"?_t=Fo.number(G.minSize,G.maxSize,be):nt=be}return{uSizeT:nt,uSize:_t}},t.ai=function(G,{uSize:D,uSizeT:nt},{lowerSize:_t,upperSize:Rt}){return G.kind==="source"?_t/nm:G.kind==="composite"?Fo.number(_t/nm,Rt/nm,nt):D},t.aj=Xm,t.ak=function(G,D,nt,_t){let Rt=D.y-G.y,Kt=D.x-G.x,Qt=_t.y-nt.y,be=_t.x-nt.x,Re=Qt*Kt-be*Rt;if(Re===0)return null;let er=(be*(G.y-nt.y)-Qt*(G.x-nt.x))/Re;return new o(G.x+er*Kt,G.y+er*Rt)},t.al=Y3,t.am=Jn,t.an=ti,t.ao=function(G){let D=1/0,nt=1/0,_t=-1/0,Rt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),_t=Math.max(_t,Kt.x),Rt=Math.max(Rt,Kt.y);return[D,nt,_t,Rt]},t.ap=wc,t.ar=Sb,t.as=function(G,D){var nt=D[0],_t=D[1],Rt=D[2],Kt=D[3],Qt=D[4],be=D[5],Re=D[6],er=D[7],xr=D[8],Er=D[9],Zr=D[10],sn=D[11],yn=D[12],Ln=D[13],$n=D[14],wi=D[15],Ta=nt*be-_t*Qt,Xi=nt*Re-Rt*Qt,da=nt*er-Kt*Qt,Ga=_t*Re-Rt*be,Ao=_t*er-Kt*be,Ms=Rt*er-Kt*Re,Sl=xr*Ln-Er*yn,bs=xr*$n-Zr*yn,fs=xr*wi-sn*yn,Js=Er*$n-Zr*Ln,js=Er*wi-sn*Ln,Ds=Zr*wi-sn*$n,uo=Ta*Ds-Xi*js+da*Js+Ga*fs-Ao*bs+Ms*Sl;return uo?(G[0]=(be*Ds-Re*js+er*Js)*(uo=1/uo),G[1]=(Rt*js-_t*Ds-Kt*Js)*uo,G[2]=(Ln*Ms-$n*Ao+wi*Ga)*uo,G[3]=(Zr*Ao-Er*Ms-sn*Ga)*uo,G[4]=(Re*fs-Qt*Ds-er*bs)*uo,G[5]=(nt*Ds-Rt*fs+Kt*bs)*uo,G[6]=($n*da-yn*Ms-wi*Xi)*uo,G[7]=(xr*Ms-Zr*da+sn*Xi)*uo,G[8]=(Qt*js-be*fs+er*Sl)*uo,G[9]=(_t*fs-nt*js-Kt*Sl)*uo,G[10]=(yn*Ao-Ln*da+wi*Ta)*uo,G[11]=(Er*da-xr*Ao-sn*Ta)*uo,G[12]=(be*bs-Qt*Js-Re*Sl)*uo,G[13]=(nt*Js-_t*bs+Rt*Sl)*uo,G[14]=(Ln*Xi-yn*Ga-$n*Ta)*uo,G[15]=(xr*Ga-Er*Xi+Zr*Ta)*uo,G):null},t.at=Rb,t.au=Mb,t.av=Bb,t.aw=function(){let G={},D=ut.$version;for(let nt in ut.$root){let _t=ut.$root[nt];if(_t.required){let Rt=null;Rt=nt==="version"?D:_t.type==="array"?[]:{},Rt!=null&&(G[nt]=Rt)}}return G},t.ax=oo,t.ay=tt,t.az=function(G){G=G.slice();let D=Object.create(null);for(let nt=0;nt25||_t<0||_t>=1||nt<0||nt>=1)},t.bc=function(G,D){return G[0]=D[0],G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[5]=D[1],G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[10]=D[2],G[11]=0,G[12]=0,G[13]=0,G[14]=0,G[15]=1,G},t.bd=class extends gr{},t.be=zb,t.bf=l5,t.bh=st,t.bi=function(G,D){lt.REGISTERED_PROTOCOLS[G]=D},t.bj=function(G){delete lt.REGISTERED_PROTOCOLS[G]},t.bk=function(G,D){let nt={};for(let Rt=0;RtDs*wc)}let bs=Qt?"center":nt.get("text-justify").evaluate(er,{},G.canonical),fs=nt.get("symbol-placement")==="point"?nt.get("text-max-width").evaluate(er,{},G.canonical)*wc:1/0,Js=()=>{G.bucket.allowVerticalPlacement&&vs(da)&&(yn.vertical=Sx(Ln,G.glyphMap,G.glyphPositions,G.imagePositions,xr,fs,Kt,Ms,"left",Ao,wi,t.ah.vertical,!0,Zr,Er))};if(!Qt&&Sl){let js=new Set;if(bs==="auto")for(let uo=0;uoe(void 0,void 0,void 0,function*(){if(G.byteLength===0)return createImageBitmap(new ImageData(1,1));let D=new Blob([new Uint8Array(G)],{type:"image/png"});try{return createImageBitmap(D)}catch(nt){throw new Error(`Could not load image because of ${nt.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),t.e=M,t.f=G=>new Promise((D,nt)=>{let _t=new Image;_t.onload=()=>{D(_t),URL.revokeObjectURL(_t.src),_t.onload=null,window.requestAnimationFrame(()=>{_t.src=H})},_t.onerror=()=>nt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let Rt=new Blob([new Uint8Array(G)],{type:"image/png"});_t.src=G.byteLength?URL.createObjectURL(Rt):H}),t.g=yt,t.h=(G,D)=>dt(M(G,{type:"json"}),D),t.i=O,t.j=Y,t.k=it,t.l=(G,D)=>dt(M(G,{type:"arrayBuffer"}),D),t.m=dt,t.n=function(G){return new wb(G).readFields(RT,[])},t.o=jl,t.p=Mx,t.q=qt,t.r=ea,t.s=rt,t.t=la,t.u=hi,t.v=ut,t.w=w,t.x=function([G,D,nt]){return D+=90,D*=Math.PI/180,nt*=Math.PI/180,{x:G*Math.cos(D)*Math.sin(nt),y:G*Math.sin(D)*Math.sin(nt),z:G*Math.cos(nt)}},t.y=Fo,t.z=Rl}),P("worker",["./shared"],function(t){class e{constructor(Gt){this.keyCache={},Gt&&this.replace(Gt)}replace(Gt){this._layerConfigs={},this._layers={},this.update(Gt,[])}update(Gt,ne){for(let gt of Gt){this._layerConfigs[gt.id]=gt;let St=this._layers[gt.id]=t.aA(gt);St._featureFilter=t.a7(St.filter),this.keyCache[gt.id]&&delete this.keyCache[gt.id]}for(let gt of ne)delete this.keyCache[gt],delete this._layerConfigs[gt],delete this._layers[gt];this.familiesBySource={};let Ct=t.bk(Object.values(this._layerConfigs),this.keyCache);for(let gt of Ct){let St=gt.map(qe=>this._layers[qe.id]),Nt=St[0];if(Nt.visibility==="none")continue;let re=Nt.source||"",le=this.familiesBySource[re];le||(le=this.familiesBySource[re]={});let we=Nt.sourceLayer||"_geojsonTileLayer",Ue=le[we];Ue||(Ue=le[we]=[]),Ue.push(St)}}}class r{constructor(Gt){let ne={},Ct=[];for(let re in Gt){let le=Gt[re],we=ne[re]={};for(let Ue in le){let qe=le[+Ue];if(!qe||qe.bitmap.width===0||qe.bitmap.height===0)continue;let or={x:0,y:0,w:qe.bitmap.width+2,h:qe.bitmap.height+2};Ct.push(or),we[Ue]={rect:or,metrics:qe.metrics}}}let{w:gt,h:St}=t.p(Ct),Nt=new t.o({width:gt||1,height:St||1});for(let re in Gt){let le=Gt[re];for(let we in le){let Ue=le[+we];if(!Ue||Ue.bitmap.width===0||Ue.bitmap.height===0)continue;let qe=ne[re][we].rect;t.o.copy(Ue.bitmap,Nt,{x:0,y:0},{x:qe.x+1,y:qe.y+1},Ue.bitmap)}}this.image=Nt,this.positions=ne}}t.bl("GlyphAtlas",r);class a{constructor(Gt){this.tileID=new t.S(Gt.tileID.overscaledZ,Gt.tileID.wrap,Gt.tileID.canonical.z,Gt.tileID.canonical.x,Gt.tileID.canonical.y),this.uid=Gt.uid,this.zoom=Gt.zoom,this.pixelRatio=Gt.pixelRatio,this.tileSize=Gt.tileSize,this.source=Gt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Gt.showCollisionBoxes,this.collectResourceTiming=!!Gt.collectResourceTiming,this.returnDependencies=!!Gt.returnDependencies,this.promoteId=Gt.promoteId,this.inFlightDependencies=[]}parse(Gt,ne,Ct,gt){return t._(this,void 0,void 0,function*(){this.status="parsing",this.data=Gt,this.collisionBoxArray=new t.a5;let St=new t.bm(Object.keys(Gt.layers).sort()),Nt=new t.bn(this.tileID,this.promoteId);Nt.bucketLayerIDs=[];let re={},le={featureIndex:Nt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ct},we=ne.familiesBySource[this.source];for(let ii in we){let qn=Gt.layers[ii];if(!qn)continue;qn.version===1&&t.w(`Vector tile source "${this.source}" layer "${ii}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let aa=St.encode(ii),Vi=[];for(let We=0;We=rr.maxzoom||rr.visibility!=="none"&&(n(We,this.zoom,Ct),(re[rr.id]=rr.createBucket({index:Nt.bucketLayerIDs.length,layers:We,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:aa,sourceID:this.source})).populate(Vi,le,this.tileID.canonical),Nt.bucketLayerIDs.push(We.map(fr=>fr.id)))}}let Ue=t.aF(le.glyphDependencies,ii=>Object.keys(ii).map(Number));this.inFlightDependencies.forEach(ii=>ii?.abort()),this.inFlightDependencies=[];let qe=Promise.resolve({});if(Object.keys(Ue).length){let ii=new AbortController;this.inFlightDependencies.push(ii),qe=gt.sendAsync({type:"GG",data:{stacks:Ue,source:this.source,tileID:this.tileID,type:"glyphs"}},ii)}let or=Object.keys(le.iconDependencies),Ar=Promise.resolve({});if(or.length){let ii=new AbortController;this.inFlightDependencies.push(ii),Ar=gt.sendAsync({type:"GI",data:{icons:or,source:this.source,tileID:this.tileID,type:"icons"}},ii)}let Tr=Object.keys(le.patternDependencies),pr=Promise.resolve({});if(Tr.length){let ii=new AbortController;this.inFlightDependencies.push(ii),pr=gt.sendAsync({type:"GI",data:{icons:Tr,source:this.source,tileID:this.tileID,type:"patterns"}},ii)}let[Jr,Vn,Hn]=yield Promise.all([qe,Ar,pr]),Kn=new r(Jr),Ci=new t.bo(Vn,Hn);for(let ii in re){let qn=re[ii];qn instanceof t.a6?(n(qn.layers,this.zoom,Ct),t.bp({bucket:qn,glyphMap:Jr,glyphPositions:Kn.positions,imageMap:Vn,imagePositions:Ci.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):qn.hasPattern&&(qn instanceof t.bq||qn instanceof t.br||qn instanceof t.bs)&&(n(qn.layers,this.zoom,Ct),qn.addFeatures(le,this.tileID.canonical,Ci.patternPositions))}return this.status="done",{buckets:Object.values(re).filter(ii=>!ii.isEmpty()),featureIndex:Nt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Kn.image,imageAtlas:Ci,glyphMap:this.returnDependencies?Jr:null,iconMap:this.returnDependencies?Vn:null,glyphPositions:this.returnDependencies?Kn.positions:null}})}}function n(Ce,Gt,ne){let Ct=new t.z(Gt);for(let gt of Ce)gt.recalculate(Ct,ne)}class o{constructor(Gt,ne,Ct){this.actor=Gt,this.layerIndex=ne,this.availableImages=Ct,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Gt,ne){return t._(this,void 0,void 0,function*(){let Ct=yield t.l(Gt.request,ne);try{return{vectorTile:new t.bt.VectorTile(new t.bu(Ct.data)),rawData:Ct.data,cacheControl:Ct.cacheControl,expires:Ct.expires}}catch(gt){let St=new Uint8Array(Ct.data),Nt=`Unable to parse the tile at ${Gt.request.url}, `;throw Nt+=St[0]===31&&St[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${gt.message}`,new Error(Nt)}})}loadTile(Gt){return t._(this,void 0,void 0,function*(){let ne=Gt.uid,Ct=!!(Gt&&Gt.request&&Gt.request.collectResourceTiming)&&new t.bv(Gt.request),gt=new a(Gt);this.loading[ne]=gt;let St=new AbortController;gt.abort=St;try{let Nt=yield this.loadVectorTile(Gt,St);if(delete this.loading[ne],!Nt)return null;let re=Nt.rawData,le={};Nt.expires&&(le.expires=Nt.expires),Nt.cacheControl&&(le.cacheControl=Nt.cacheControl);let we={};if(Ct){let qe=Ct.finish();qe&&(we.resourceTiming=JSON.parse(JSON.stringify(qe)))}gt.vectorTile=Nt.vectorTile;let Ue=gt.parse(Nt.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[ne]=gt,this.fetching[ne]={rawTileData:re,cacheControl:le,resourceTiming:we};try{let qe=yield Ue;return t.e({rawTileData:re.slice(0)},qe,le,we)}finally{delete this.fetching[ne]}}catch(Nt){throw delete this.loading[ne],gt.status="done",this.loaded[ne]=gt,Nt}})}reloadTile(Gt){return t._(this,void 0,void 0,function*(){let ne=Gt.uid;if(!this.loaded||!this.loaded[ne])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ct=this.loaded[ne];if(Ct.showCollisionBoxes=Gt.showCollisionBoxes,Ct.status==="parsing"){let gt=yield Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor),St;if(this.fetching[ne]){let{rawTileData:Nt,cacheControl:re,resourceTiming:le}=this.fetching[ne];delete this.fetching[ne],St=t.e({rawTileData:Nt.slice(0)},gt,re,le)}else St=gt;return St}if(Ct.status==="done"&&Ct.vectorTile)return Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Gt){return t._(this,void 0,void 0,function*(){let ne=this.loading,Ct=Gt.uid;ne&&ne[Ct]&&ne[Ct].abort&&(ne[Ct].abort.abort(),delete ne[Ct])})}removeTile(Gt){return t._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Gt.uid]&&delete this.loaded[Gt.uid]})}}class i{constructor(){this.loaded={}}loadTile(Gt){return t._(this,void 0,void 0,function*(){let{uid:ne,encoding:Ct,rawImageData:gt,redFactor:St,greenFactor:Nt,blueFactor:re,baseShift:le}=Gt,we=gt.width+2,Ue=gt.height+2,qe=t.b(gt)?new t.R({width:we,height:Ue},yield t.bw(gt,-1,-1,we,Ue)):gt,or=new t.bx(ne,qe,Ct,St,Nt,re,le);return this.loaded=this.loaded||{},this.loaded[ne]=or,or})}removeTile(Gt){let ne=this.loaded,Ct=Gt.uid;ne&&ne[Ct]&&delete ne[Ct]}}function s(Ce,Gt){if(Ce.length!==0){f(Ce[0],Gt);for(var ne=1;ne=Math.abs(re)?ne-le+re:re-le+ne,ne=le}ne+Ct>=0!=!!Gt&&Ce.reverse()}var x=t.by(function Ce(Gt,ne){var Ct,gt=Gt&&Gt.type;if(gt==="FeatureCollection")for(Ct=0;Ct>31}function O(Ce,Gt){for(var ne=Ce.loadGeometry(),Ct=Ce.type,gt=0,St=0,Nt=ne.length,re=0;reCe},F=Math.fround||(U=new Float32Array(1),Ce=>(U[0]=+Ce,U[0]));var U;let W=3,q=5,X=6;class lt{constructor(Gt){this.options=Object.assign(Object.create(H),Gt),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Gt){let{log:ne,minZoom:Ct,maxZoom:gt}=this.options;ne&&console.time("total time");let St=`prepare ${Gt.length} points`;ne&&console.time(St),this.points=Gt;let Nt=[];for(let le=0;le=Ct;le--){let we=+Date.now();re=this.trees[le]=this._createTree(this._cluster(re,le)),ne&&console.log("z%d: %d clusters in %dms",le,re.numItems,+Date.now()-we)}return ne&&console.timeEnd("total time"),this}getClusters(Gt,ne){let Ct=((Gt[0]+180)%360+360)%360-180,gt=Math.max(-90,Math.min(90,Gt[1])),St=Gt[2]===180?180:((Gt[2]+180)%360+360)%360-180,Nt=Math.max(-90,Math.min(90,Gt[3]));if(Gt[2]-Gt[0]>=360)Ct=-180,St=180;else if(Ct>St){let qe=this.getClusters([Ct,gt,180,Nt],ne),or=this.getClusters([-180,gt,St,Nt],ne);return qe.concat(or)}let re=this.trees[this._limitZoom(ne)],le=re.range(st(Ct),tt(Nt),st(St),tt(gt)),we=re.data,Ue=[];for(let qe of le){let or=this.stride*qe;Ue.push(we[or+q]>1?yt(we,or,this.clusterProps):this.points[we[or+W]])}return Ue}getChildren(Gt){let ne=this._getOriginId(Gt),Ct=this._getOriginZoom(Gt),gt="No cluster with the specified id.",St=this.trees[Ct];if(!St)throw new Error(gt);let Nt=St.data;if(ne*this.stride>=Nt.length)throw new Error(gt);let re=this.options.radius/(this.options.extent*Math.pow(2,Ct-1)),le=St.within(Nt[ne*this.stride],Nt[ne*this.stride+1],re),we=[];for(let Ue of le){let qe=Ue*this.stride;Nt[qe+4]===Gt&&we.push(Nt[qe+q]>1?yt(Nt,qe,this.clusterProps):this.points[Nt[qe+W]])}if(we.length===0)throw new Error(gt);return we}getLeaves(Gt,ne,Ct){let gt=[];return this._appendLeaves(gt,Gt,ne=ne||10,Ct=Ct||0,0),gt}getTile(Gt,ne,Ct){let gt=this.trees[this._limitZoom(Gt)],St=Math.pow(2,Gt),{extent:Nt,radius:re}=this.options,le=re/Nt,we=(Ct-le)/St,Ue=(Ct+1+le)/St,qe={features:[]};return this._addTileFeatures(gt.range((ne-le)/St,we,(ne+1+le)/St,Ue),gt.data,ne,Ct,St,qe),ne===0&&this._addTileFeatures(gt.range(1-le/St,we,1,Ue),gt.data,St,Ct,St,qe),ne===St-1&&this._addTileFeatures(gt.range(0,we,le/St,Ue),gt.data,-1,Ct,St,qe),qe.features.length?qe:null}getClusterExpansionZoom(Gt){let ne=this._getOriginZoom(Gt)-1;for(;ne<=this.options.maxZoom;){let Ct=this.getChildren(Gt);if(ne++,Ct.length!==1)break;Gt=Ct[0].properties.cluster_id}return ne}_appendLeaves(Gt,ne,Ct,gt,St){let Nt=this.getChildren(ne);for(let re of Nt){let le=re.properties;if(le&&le.cluster?St+le.point_count<=gt?St+=le.point_count:St=this._appendLeaves(Gt,le.cluster_id,Ct,gt,St):St1,Ue,qe,or;if(we)Ue=pt(ne,le,this.clusterProps),qe=ne[le],or=ne[le+1];else{let pr=this.points[ne[le+W]];Ue=pr.properties;let[Jr,Vn]=pr.geometry.coordinates;qe=st(Jr),or=tt(Vn)}let Ar={type:1,geometry:[[Math.round(this.options.extent*(qe*St-Ct)),Math.round(this.options.extent*(or*St-gt))]],tags:Ue},Tr;Tr=we||this.options.generateId?ne[le+W]:this.points[ne[le+W]].id,Tr!==void 0&&(Ar.id=Tr),Nt.features.push(Ar)}}_limitZoom(Gt){return Math.max(this.options.minZoom,Math.min(Math.floor(+Gt),this.options.maxZoom+1))}_cluster(Gt,ne){let{radius:Ct,extent:gt,reduce:St,minPoints:Nt}=this.options,re=Ct/(gt*Math.pow(2,ne)),le=Gt.data,we=[],Ue=this.stride;for(let qe=0;qene&&(Jr+=le[Hn+q])}if(Jr>pr&&Jr>=Nt){let Vn,Hn=or*pr,Kn=Ar*pr,Ci=-1,ii=((qe/Ue|0)<<5)+(ne+1)+this.points.length;for(let qn of Tr){let aa=qn*Ue;if(le[aa+2]<=ne)continue;le[aa+2]=ne;let Vi=le[aa+q];Hn+=le[aa]*Vi,Kn+=le[aa+1]*Vi,le[aa+4]=ii,St&&(Vn||(Vn=this._map(le,qe,!0),Ci=this.clusterProps.length,this.clusterProps.push(Vn)),St(Vn,this._map(le,aa)))}le[qe+4]=ii,we.push(Hn/Jr,Kn/Jr,1/0,ii,-1,Jr),St&&we.push(Ci)}else{for(let Vn=0;Vn1)for(let Vn of Tr){let Hn=Vn*Ue;if(!(le[Hn+2]<=ne)){le[Hn+2]=ne;for(let Kn=0;Kn>5}_getOriginZoom(Gt){return(Gt-this.points.length)%32}_map(Gt,ne,Ct){if(Gt[ne+q]>1){let Nt=this.clusterProps[Gt[ne+X]];return Ct?Object.assign({},Nt):Nt}let gt=this.points[Gt[ne+W]].properties,St=this.options.map(gt);return Ct&&St===gt?Object.assign({},St):St}}function yt(Ce,Gt,ne){return{type:"Feature",id:Ce[Gt+W],properties:pt(Ce,Gt,ne),geometry:{type:"Point",coordinates:[(Ct=Ce[Gt],360*(Ct-.5)),dt(Ce[Gt+1])]}};var Ct}function pt(Ce,Gt,ne){let Ct=Ce[Gt+q],gt=Ct>=1e4?`${Math.round(Ct/1e3)}k`:Ct>=1e3?Math.round(Ct/100)/10+"k":Ct,St=Ce[Gt+X],Nt=St===-1?{}:Object.assign({},ne[St]);return Object.assign(Nt,{cluster:!0,cluster_id:Ce[Gt+W],point_count:Ct,point_count_abbreviated:gt})}function st(Ce){return Ce/360+.5}function tt(Ce){let Gt=Math.sin(Ce*Math.PI/180),ne=.5-.25*Math.log((1+Gt)/(1-Gt))/Math.PI;return ne<0?0:ne>1?1:ne}function dt(Ce){let Gt=(180-360*Ce)*Math.PI/180;return 360*Math.atan(Math.exp(Gt))/Math.PI-90}function rt(Ce,Gt,ne,Ct){let gt=Ct,St=Gt+(ne-Gt>>1),Nt,re=ne-Gt,le=Ce[Gt],we=Ce[Gt+1],Ue=Ce[ne],qe=Ce[ne+1];for(let or=Gt+3;orgt)Nt=or,gt=Ar;else if(Ar===gt){let Tr=Math.abs(or-St);TrCt&&(Nt-Gt>3&&rt(Ce,Gt,Nt,Ct),Ce[Nt+2]=gt,ne-Nt>3&&rt(Ce,Nt,ne,Ct))}function at(Ce,Gt,ne,Ct,gt,St){let Nt=gt-ne,re=St-Ct;if(Nt!==0||re!==0){let le=((Ce-ne)*Nt+(Gt-Ct)*re)/(Nt*Nt+re*re);le>1?(ne=gt,Ct=St):le>0&&(ne+=Nt*le,Ct+=re*le)}return Nt=Ce-ne,re=Gt-Ct,Nt*Nt+re*re}function vt(Ce,Gt,ne,Ct){let gt={id:Ce??null,type:Gt,geometry:ne,tags:Ct,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Gt==="Point"||Gt==="MultiPoint"||Gt==="LineString")it(gt,ne);else if(Gt==="Polygon")it(gt,ne[0]);else if(Gt==="MultiLineString")for(let St of ne)it(gt,St);else if(Gt==="MultiPolygon")for(let St of ne)it(gt,St[0]);return gt}function it(Ce,Gt){for(let ne=0;ne0&&(Nt+=Ct?(gt*Ue-we*St)/2:Math.sqrt(Math.pow(we-gt,2)+Math.pow(Ue-St,2))),gt=we,St=Ue}let re=Gt.length-3;Gt[2]=1,rt(Gt,0,re,ne),Gt[re+2]=1,Gt.size=Math.abs(Nt),Gt.start=0,Gt.end=Gt.size}function wt(Ce,Gt,ne,Ct){for(let gt=0;gt1?1:ne}function Wt(Ce,Gt,ne,Ct,gt,St,Nt,re){if(Ct/=Gt,St>=(ne/=Gt)&&Nt=Ct)return null;let le=[];for(let we of Ce){let Ue=we.geometry,qe=we.type,or=gt===0?we.minX:we.minY,Ar=gt===0?we.maxX:we.maxY;if(or>=ne&&Ar=Ct)continue;let Tr=[];if(qe==="Point"||qe==="MultiPoint")Ht(Ue,Tr,ne,Ct,gt);else if(qe==="LineString")Jt(Ue,Tr,ne,Ct,gt,!1,re.lineMetrics);else if(qe==="MultiLineString")he(Ue,Tr,ne,Ct,gt,!1);else if(qe==="Polygon")he(Ue,Tr,ne,Ct,gt,!0);else if(qe==="MultiPolygon")for(let pr of Ue){let Jr=[];he(pr,Jr,ne,Ct,gt,!0),Jr.length&&Tr.push(Jr)}if(Tr.length){if(re.lineMetrics&&qe==="LineString"){for(let pr of Tr)le.push(vt(we.id,qe,pr,we.tags));continue}qe!=="LineString"&&qe!=="MultiLineString"||(Tr.length===1?(qe="LineString",Tr=Tr[0]):qe="MultiLineString"),qe!=="Point"&&qe!=="MultiPoint"||(qe=Tr.length===3?"Point":"MultiPoint"),le.push(vt(we.id,qe,Tr,we.tags))}}return le.length?le:null}function Ht(Ce,Gt,ne,Ct,gt){for(let St=0;St=ne&&Nt<=Ct&&de(Gt,Ce[St],Ce[St+1],Ce[St+2])}}function Jt(Ce,Gt,ne,Ct,gt,St,Nt){let re=ge(Ce),le=gt===0?se:Tt,we,Ue,qe=Ce.start;for(let Jr=0;Jrne&&(Ue=le(re,Vn,Hn,Ci,ii,ne),Nt&&(re.start=qe+we*Ue)):qn>Ct?aa=ne&&(Ue=le(re,Vn,Hn,Ci,ii,ne),Vi=!0),aa>Ct&&qn<=Ct&&(Ue=le(re,Vn,Hn,Ci,ii,Ct),Vi=!0),!St&&Vi&&(Nt&&(re.end=qe+we*Ue),Gt.push(re),re=ge(Ce)),Nt&&(qe+=we)}let or=Ce.length-3,Ar=Ce[or],Tr=Ce[or+1],pr=gt===0?Ar:Tr;pr>=ne&&pr<=Ct&&de(re,Ar,Tr,Ce[or+2]),or=re.length-3,St&&or>=3&&(re[or]!==re[0]||re[or+1]!==re[1])&&de(re,re[0],re[1],re[2]),re.length&&Gt.push(re)}function ge(Ce){let Gt=[];return Gt.size=Ce.size,Gt.start=Ce.start,Gt.end=Ce.end,Gt}function he(Ce,Gt,ne,Ct,gt,St){for(let Nt of Ce)Jt(Nt,Gt,ne,Ct,gt,St,!1)}function de(Ce,Gt,ne,Ct){Ce.push(Gt,ne,Ct)}function se(Ce,Gt,ne,Ct,gt,St){let Nt=(St-Gt)/(Ct-Gt);return de(Ce,St,ne+(gt-ne)*Nt,1),Nt}function Tt(Ce,Gt,ne,Ct,gt,St){let Nt=(St-ne)/(gt-ne);return de(Ce,Gt+(Ct-Gt)*Nt,St,1),Nt}function Lt(Ce,Gt){let ne=[];for(let Ct=0;Ct0&&Gt.size<(gt?Nt:Ct))return void(ne.numPoints+=Gt.length/3);let re=[];for(let le=0;leNt)&&(ne.numSimplified++,re.push(Gt[le],Gt[le+1])),ne.numPoints++;gt&&function(le,we){let Ue=0;for(let qe=0,or=le.length,Ar=or-2;qe0===we)for(let qe=0,or=le.length;qe24)throw new Error("maxZoom should be in the 0-24 range");if(ne.promoteId&&ne.generateId)throw new Error("promoteId and generateId cannot be used together.");let gt=function(St,Nt){let re=[];if(St.type==="FeatureCollection")for(let le=0;le1&&console.time("creation"),Ar=this.tiles[or]=oe(Gt,ne,Ct,gt,we),this.tileCoords.push({z:ne,x:Ct,y:gt}),Ue)){Ue>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ne,Ct,gt,Ar.numFeatures,Ar.numPoints,Ar.numSimplified),console.timeEnd("creation"));let Vi=`z${ne}`;this.stats[Vi]=(this.stats[Vi]||0)+1,this.total++}if(Ar.source=Gt,St==null){if(ne===we.indexMaxZoom||Ar.numPoints<=we.indexMaxPoints)continue}else{if(ne===we.maxZoom||ne===St)continue;if(St!=null){let Vi=St-ne;if(Ct!==Nt>>Vi||gt!==re>>Vi)continue}}if(Ar.source=null,Gt.length===0)continue;Ue>1&&console.time("clipping");let Tr=.5*we.buffer/we.extent,pr=.5-Tr,Jr=.5+Tr,Vn=1+Tr,Hn=null,Kn=null,Ci=null,ii=null,qn=Wt(Gt,qe,Ct-Tr,Ct+Jr,0,Ar.minX,Ar.maxX,we),aa=Wt(Gt,qe,Ct+pr,Ct+Vn,0,Ar.minX,Ar.maxX,we);Gt=null,qn&&(Hn=Wt(qn,qe,gt-Tr,gt+Jr,1,Ar.minY,Ar.maxY,we),Kn=Wt(qn,qe,gt+pr,gt+Vn,1,Ar.minY,Ar.maxY,we),qn=null),aa&&(Ci=Wt(aa,qe,gt-Tr,gt+Jr,1,Ar.minY,Ar.maxY,we),ii=Wt(aa,qe,gt+pr,gt+Vn,1,Ar.minY,Ar.maxY,we),aa=null),Ue>1&&console.timeEnd("clipping"),le.push(Hn||[],ne+1,2*Ct,2*gt),le.push(Kn||[],ne+1,2*Ct,2*gt+1),le.push(Ci||[],ne+1,2*Ct+1,2*gt),le.push(ii||[],ne+1,2*Ct+1,2*gt+1)}}getTile(Gt,ne,Ct){Gt=+Gt,ne=+ne,Ct=+Ct;let gt=this.options,{extent:St,debug:Nt}=gt;if(Gt<0||Gt>24)return null;let re=1<1&&console.log("drilling down to z%d-%d-%d",Gt,ne,Ct);let we,Ue=Gt,qe=ne,or=Ct;for(;!we&&Ue>0;)Ue--,qe>>=1,or>>=1,we=this.tiles[ur(Ue,qe,or)];return we&&we.source?(Nt>1&&(console.log("found parent tile z%d-%d-%d",Ue,qe,or),console.time("drilling down")),this.splitTile(we.source,Ue,qe,or,Gt,ne,Ct),Nt>1&&console.timeEnd("drilling down"),this.tiles[le]?te(this.tiles[le],St):null):null}}function ur(Ce,Gt,ne){return 32*((1<{qe.properties=Ar;let Tr={};for(let pr of or)Tr[pr]=le[pr].evaluate(Ue,qe);return Tr},Nt.reduce=(Ar,Tr)=>{qe.properties=Tr;for(let pr of or)Ue.accumulated=Ar[pr],Ar[pr]=we[pr].evaluate(Ue,qe)},Nt}(Gt)).load((yield this._pendingData).features):(gt=yield this._pendingData,new cr(gt,Gt.geojsonVtOptions)),this.loaded={};let St={};if(Ct){let Nt=Ct.finish();Nt&&(St.resourceTiming={},St.resourceTiming[Gt.source]=JSON.parse(JSON.stringify(Nt)))}return St}catch(St){if(delete this._pendingRequest,t.bB(St))return{abandoned:!0};throw St}var gt})}getData(){return t._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Gt){let ne=this.loaded;return ne&&ne[Gt.uid]?super.reloadTile(Gt):this.loadTile(Gt)}loadAndProcessGeoJSON(Gt,ne){return t._(this,void 0,void 0,function*(){let Ct=yield this.loadGeoJSON(Gt,ne);if(delete this._pendingRequest,typeof Ct!="object")throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`);if(x(Ct,!0),Gt.filter){let gt=t.bC(Gt.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(gt.result==="error")throw new Error(gt.value.map(St=>`${St.key}: ${St.message}`).join(", "));Ct={type:"FeatureCollection",features:Ct.features.filter(St=>gt.value.evaluate({zoom:0},St))}}return Ct})}loadGeoJSON(Gt,ne){return t._(this,void 0,void 0,function*(){let{promoteId:Ct}=Gt;if(Gt.request){let gt=yield t.h(Gt.request,ne);return this._dataUpdateable=Hr(gt.data,Ct)?br(gt.data,Ct):void 0,gt.data}if(typeof Gt.data=="string")try{let gt=JSON.parse(Gt.data);return this._dataUpdateable=Hr(gt,Ct)?br(gt,Ct):void 0,gt}catch{throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`)}if(!Gt.dataDiff)throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Gt.source}`);return function(gt,St,Nt){var re,le,we,Ue;if(St.removeAll&>.clear(),St.remove)for(let qe of St.remove)gt.delete(qe);if(St.add)for(let qe of St.add){let or=jr(qe,Nt);or!=null&>.set(or,qe)}if(St.update)for(let qe of St.update){let or=gt.get(qe.id);if(or==null)continue;let Ar=!qe.removeAllProperties&&(((re=qe.removeProperties)===null||re===void 0?void 0:re.length)>0||((le=qe.addOrUpdateProperties)===null||le===void 0?void 0:le.length)>0);if((qe.newGeometry||qe.removeAllProperties||Ar)&&(or=Object.assign({},or),gt.set(qe.id,or),Ar&&(or.properties=Object.assign({},or.properties))),qe.newGeometry&&(or.geometry=qe.newGeometry),qe.removeAllProperties)or.properties={};else if(((we=qe.removeProperties)===null||we===void 0?void 0:we.length)>0)for(let Tr of qe.removeProperties)Object.prototype.hasOwnProperty.call(or.properties,Tr)&&delete or.properties[Tr];if(((Ue=qe.addOrUpdateProperties)===null||Ue===void 0?void 0:Ue.length)>0)for(let{key:Tr,value:pr}of qe.addOrUpdateProperties)or.properties[Tr]=pr}}(this._dataUpdateable,Gt.dataDiff,Ct),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Gt){return t._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Gt){return this._geoJSONIndex.getClusterExpansionZoom(Gt.clusterId)}getClusterChildren(Gt){return this._geoJSONIndex.getChildren(Gt.clusterId)}getClusterLeaves(Gt){return this._geoJSONIndex.getLeaves(Gt.clusterId,Gt.limit,Gt.offset)}}class rn{constructor(Gt){this.self=Gt,this.actor=new t.F(Gt),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ne,Ct)=>{if(this.externalWorkerSourceTypes[ne])throw new Error(`Worker source with name "${ne}" already registered.`);this.externalWorkerSourceTypes[ne]=Ct},this.self.addProtocol=t.bi,this.self.removeProtocol=t.bj,this.self.registerRTLTextPlugin=ne=>{if(t.bD.isParsed())throw new Error("RTL text plugin already registered.");t.bD.setMethods(ne)},this.actor.registerMessageHandler("LDT",(ne,Ct)=>this._getDEMWorkerSource(ne,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RDT",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ne,Ct.source).removeTile(Ct)})),this.actor.registerMessageHandler("GCEZ",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterExpansionZoom(Ct)})),this.actor.registerMessageHandler("GCC",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterChildren(Ct)})),this.actor.registerMessageHandler("GCL",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterLeaves(Ct)})),this.actor.registerMessageHandler("LD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadData(Ct)),this.actor.registerMessageHandler("GD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).getData()),this.actor.registerMessageHandler("LT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).reloadTile(Ct)),this.actor.registerMessageHandler("AT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).abortTile(Ct)),this.actor.registerMessageHandler("RMT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).removeTile(Ct)),this.actor.registerMessageHandler("RS",(ne,Ct)=>t._(this,void 0,void 0,function*(){if(!this.workerSources[ne]||!this.workerSources[ne][Ct.type]||!this.workerSources[ne][Ct.type][Ct.source])return;let gt=this.workerSources[ne][Ct.type][Ct.source];delete this.workerSources[ne][Ct.type][Ct.source],gt.removeSource!==void 0&>.removeSource(Ct)})),this.actor.registerMessageHandler("RM",ne=>t._(this,void 0,void 0,function*(){delete this.layerIndexes[ne],delete this.availableImages[ne],delete this.workerSources[ne],delete this.demWorkerSources[ne]})),this.actor.registerMessageHandler("SR",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.referrer=Ct})),this.actor.registerMessageHandler("SRPS",(ne,Ct)=>this._syncRTLPluginState(ne,Ct)),this.actor.registerMessageHandler("IS",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.self.importScripts(Ct)})),this.actor.registerMessageHandler("SI",(ne,Ct)=>this._setImages(ne,Ct)),this.actor.registerMessageHandler("UL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).update(Ct.layers,Ct.removedIds)})),this.actor.registerMessageHandler("SL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).replace(Ct)}))}_setImages(Gt,ne){return t._(this,void 0,void 0,function*(){this.availableImages[Gt]=ne;for(let Ct in this.workerSources[Gt]){let gt=this.workerSources[Gt][Ct];for(let St in gt)gt[St].availableImages=ne}})}_syncRTLPluginState(Gt,ne){return t._(this,void 0,void 0,function*(){if(t.bD.isParsed())return t.bD.getState();if(ne.pluginStatus!=="loading")return t.bD.setState(ne),ne;let Ct=ne.pluginURL;if(this.self.importScripts(Ct),t.bD.isParsed()){let gt={pluginStatus:"loaded",pluginURL:Ct};return t.bD.setState(gt),gt}throw t.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ct}`)})}_getAvailableImages(Gt){let ne=this.availableImages[Gt];return ne||(ne=[]),ne}_getLayerIndex(Gt){let ne=this.layerIndexes[Gt];return ne||(ne=this.layerIndexes[Gt]=new e),ne}_getWorkerSource(Gt,ne,Ct){if(this.workerSources[Gt]||(this.workerSources[Gt]={}),this.workerSources[Gt][ne]||(this.workerSources[Gt][ne]={}),!this.workerSources[Gt][ne][Ct]){let gt={sendAsync:(St,Nt)=>(St.targetMapId=Gt,this.actor.sendAsync(St,Nt))};switch(ne){case"vector":this.workerSources[Gt][ne][Ct]=new o(gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt));break;case"geojson":this.workerSources[Gt][ne][Ct]=new Kr(gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt));break;default:this.workerSources[Gt][ne][Ct]=new this.externalWorkerSourceTypes[ne](gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt))}}return this.workerSources[Gt][ne][Ct]}_getDEMWorkerSource(Gt,ne){return this.demWorkerSources[Gt]||(this.demWorkerSources[Gt]={}),this.demWorkerSources[Gt][ne]||(this.demWorkerSources[Gt][ne]=new i),this.demWorkerSources[Gt][ne]}}return t.i(self)&&(self.worker=new rn(self)),rn}),P("index",["exports","./shared"],function(t,e){var r="4.7.1";let a,n,o={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:qt=>new Promise((I,ht)=>{let Et=requestAnimationFrame(I);qt.signal.addEventListener("abort",()=>{cancelAnimationFrame(Et),ht(e.c())})}),getImageData(qt,I=0){return this.getImageCanvasContext(qt).getImageData(-I,-I,qt.width+2*I,qt.height+2*I)},getImageCanvasContext(qt){let I=window.document.createElement("canvas"),ht=I.getContext("2d",{willReadFrequently:!0});if(!ht)throw new Error("failed to create canvas 2d context");return I.width=qt.width,I.height=qt.height,ht.drawImage(qt,0,0,qt.width,qt.height),ht},resolveURL:qt=>(a||(a=document.createElement("a")),a.href=qt,a.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(n==null&&(n=matchMedia("(prefers-reduced-motion: reduce)")),n.matches)}};class i{static testProp(I){if(!i.docStyle)return I[0];for(let ht=0;ht{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(I){let ht=I.getBoundingClientRect();return{x:ht.width/I.offsetWidth||1,y:ht.height/I.offsetHeight||1,boundingClientRect:ht}}static getPoint(I,ht,Et){let It=ht.boundingClientRect;return new e.P((Et.clientX-It.left)/ht.x-I.clientLeft,(Et.clientY-It.top)/ht.y-I.clientTop)}static mousePos(I,ht){let Et=i.getScale(I);return i.getPoint(I,Et,ht)}static touchPos(I,ht){let Et=[],It=i.getScale(I);for(let Vt=0;Vt{f&&T(f),f=null,v=!0},x.onerror=()=>{y=!0,f=null},x.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(qt){let I,ht,Et,It;qt.resetRequestQueue=()=>{I=[],ht=0,Et=0,It={}},qt.addThrottleControl=Ke=>{let gr=Et++;return It[gr]=Ke,gr},qt.removeThrottleControl=Ke=>{delete It[Ke],ke()},qt.getImage=(Ke,gr,Dr=!0)=>new Promise((Fr,ln)=>{s.supported&&(Ke.headers||(Ke.headers={}),Ke.headers.accept="image/webp,*/*"),e.e(Ke,{type:"image"}),I.push({abortController:gr,requestParameters:Ke,supportImageRefresh:Dr,state:"queued",onError:Mn=>{ln(Mn)},onSuccess:Mn=>{Fr(Mn)}}),ke()});let Vt=Ke=>e._(this,void 0,void 0,function*(){Ke.state="running";let{requestParameters:gr,supportImageRefresh:Dr,onError:Fr,onSuccess:ln,abortController:Mn}=Ke,Xt=Dr===!1&&!e.i(self)&&!e.g(gr.url)&&(!gr.headers||Object.keys(gr.headers).reduce((Ae,je)=>Ae&&je==="accept",!0));ht++;let ae=Xt?De(gr,Mn):e.m(gr,Mn);try{let Ae=yield ae;delete Ke.abortController,Ke.state="completed",Ae.data instanceof HTMLImageElement||e.b(Ae.data)?ln(Ae):Ae.data&&ln({data:yield(xe=Ae.data,typeof createImageBitmap=="function"?e.d(xe):e.f(xe)),cacheControl:Ae.cacheControl,expires:Ae.expires})}catch(Ae){delete Ke.abortController,Fr(Ae)}finally{ht--,ke()}var xe}),ke=()=>{let Ke=(()=>{for(let gr of Object.keys(It))if(It[gr]())return!0;return!1})()?e.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let gr=ht;gr0;gr++){let Dr=I.shift();Dr.abortController.signal.aborted?gr--:Vt(Dr)}},De=(Ke,gr)=>new Promise((Dr,Fr)=>{let ln=new Image,Mn=Ke.url,Xt=Ke.credentials;Xt&&Xt==="include"?ln.crossOrigin="use-credentials":(Xt&&Xt==="same-origin"||!e.s(Mn))&&(ln.crossOrigin="anonymous"),gr.signal.addEventListener("abort",()=>{ln.src="",Fr(e.c())}),ln.fetchPriority="high",ln.onload=()=>{ln.onerror=ln.onload=null,Dr({data:ln})},ln.onerror=()=>{ln.onerror=ln.onload=null,gr.signal.aborted||Fr(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},ln.src=Mn})}(u||(u={})),u.resetRequestQueue();class b{constructor(I){this._transformRequestFn=I}transformRequest(I,ht){return this._transformRequestFn&&this._transformRequestFn(I,ht)||{url:I}}setTransformRequest(I){this._transformRequestFn=I}}function _(qt){var I=new e.A(3);return I[0]=qt[0],I[1]=qt[1],I[2]=qt[2],I}var C,M=function(qt,I,ht){return qt[0]=I[0]-ht[0],qt[1]=I[1]-ht[1],qt[2]=I[2]-ht[2],qt};C=new e.A(3),e.A!=Float32Array&&(C[0]=0,C[1]=0,C[2]=0);var E=function(qt){var I=qt[0],ht=qt[1];return I*I+ht*ht};function A(qt){let I=[];if(typeof qt=="string")I.push({id:"default",url:qt});else if(qt&&qt.length>0){let ht=[];for(let{id:Et,url:It}of qt){let Vt=`${Et}${It}`;ht.indexOf(Vt)===-1&&(ht.push(Vt),I.push({id:Et,url:It}))}}return I}function h(qt,I,ht){let Et=qt.split("?");return Et[0]+=`${I}${ht}`,Et.join("?")}(function(){var qt=new e.A(2);e.A!=Float32Array&&(qt[0]=0,qt[1]=0)})();class p{constructor(I,ht,Et,It){this.context=I,this.format=Et,this.texture=I.gl.createTexture(),this.update(ht,It)}update(I,ht,Et){let{width:It,height:Vt}=I,ke=!(this.size&&this.size[0]===It&&this.size[1]===Vt||Et),{context:De}=this,{gl:Ke}=De;if(this.useMipmap=!!(ht&&ht.useMipmap),Ke.bindTexture(Ke.TEXTURE_2D,this.texture),De.pixelStoreUnpackFlipY.set(!1),De.pixelStoreUnpack.set(1),De.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ke.RGBA&&(!ht||ht.premultiply!==!1)),ke)this.size=[It,Vt],I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||e.b(I)?Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,this.format,Ke.UNSIGNED_BYTE,I):Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,It,Vt,0,this.format,Ke.UNSIGNED_BYTE,I.data);else{let{x:gr,y:Dr}=Et||{x:0,y:0};I instanceof HTMLImageElement||I instanceof HTMLCanvasElement||I instanceof HTMLVideoElement||I instanceof ImageData||e.b(I)?Ke.texSubImage2D(Ke.TEXTURE_2D,0,gr,Dr,Ke.RGBA,Ke.UNSIGNED_BYTE,I):Ke.texSubImage2D(Ke.TEXTURE_2D,0,gr,Dr,It,Vt,Ke.RGBA,Ke.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ke.generateMipmap(Ke.TEXTURE_2D)}bind(I,ht,Et){let{context:It}=this,{gl:Vt}=It;Vt.bindTexture(Vt.TEXTURE_2D,this.texture),Et!==Vt.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Et=Vt.LINEAR),I!==this.filter&&(Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_MAG_FILTER,I),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_MIN_FILTER,Et||I),this.filter=I),ht!==this.wrap&&(Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_WRAP_S,ht),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_WRAP_T,ht),this.wrap=ht)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:I}=this.context;I.deleteTexture(this.texture),this.texture=null}}function k(qt){let{userImage:I}=qt;return!!(I&&I.render&&I.render())&&(qt.data.replace(new Uint8Array(I.data.buffer)),!0)}class w extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(I){if(this.loaded!==I&&(this.loaded=I,I)){for(let{ids:ht,promiseResolve:Et}of this.requestors)Et(this._getImagesForIds(ht));this.requestors=[]}}getImage(I){let ht=this.images[I];if(ht&&!ht.data&&ht.spriteData){let Et=ht.spriteData;ht.data=new e.R({width:Et.width,height:Et.height},Et.context.getImageData(Et.x,Et.y,Et.width,Et.height).data),ht.spriteData=null}return ht}addImage(I,ht){if(this.images[I])throw new Error(`Image id ${I} already exist, use updateImage instead`);this._validate(I,ht)&&(this.images[I]=ht)}_validate(I,ht){let Et=!0,It=ht.data||ht.spriteData;return this._validateStretch(ht.stretchX,It&&It.width)||(this.fire(new e.j(new Error(`Image "${I}" has invalid "stretchX" value`))),Et=!1),this._validateStretch(ht.stretchY,It&&It.height)||(this.fire(new e.j(new Error(`Image "${I}" has invalid "stretchY" value`))),Et=!1),this._validateContent(ht.content,ht)||(this.fire(new e.j(new Error(`Image "${I}" has invalid "content" value`))),Et=!1),Et}_validateStretch(I,ht){if(!I)return!0;let Et=0;for(let It of I){if(It[0]{let It=!0;if(!this.isLoaded())for(let Vt of I)this.images[Vt]||(It=!1);this.isLoaded()||It?ht(this._getImagesForIds(I)):this.requestors.push({ids:I,promiseResolve:ht})})}_getImagesForIds(I){let ht={};for(let Et of I){let It=this.getImage(Et);It||(this.fire(new e.k("styleimagemissing",{id:Et})),It=this.getImage(Et)),It?ht[Et]={data:It.data.clone(),pixelRatio:It.pixelRatio,sdf:It.sdf,version:It.version,stretchX:It.stretchX,stretchY:It.stretchY,content:It.content,textFitWidth:It.textFitWidth,textFitHeight:It.textFitHeight,hasRenderCallback:!!(It.userImage&&It.userImage.render)}:e.w(`Image "${Et}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ht}getPixelSize(){let{width:I,height:ht}=this.atlasImage;return{width:I,height:ht}}getPattern(I){let ht=this.patterns[I],Et=this.getImage(I);if(!Et)return null;if(ht&&ht.position.version===Et.version)return ht.position;if(ht)ht.position.version=Et.version;else{let It={w:Et.data.width+2,h:Et.data.height+2,x:0,y:0},Vt=new e.I(It,Et);this.patterns[I]={bin:It,position:Vt}}return this._updatePatternAtlas(),this.patterns[I].position}bind(I){let ht=I.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new p(I,this.atlasImage,ht.RGBA),this.atlasTexture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE)}_updatePatternAtlas(){let I=[];for(let Vt in this.patterns)I.push(this.patterns[Vt].bin);let{w:ht,h:Et}=e.p(I),It=this.atlasImage;It.resize({width:ht||1,height:Et||1});for(let Vt in this.patterns){let{bin:ke}=this.patterns[Vt],De=ke.x+1,Ke=ke.y+1,gr=this.getImage(Vt).data,Dr=gr.width,Fr=gr.height;e.R.copy(gr,It,{x:0,y:0},{x:De,y:Ke},{width:Dr,height:Fr}),e.R.copy(gr,It,{x:0,y:Fr-1},{x:De,y:Ke-1},{width:Dr,height:1}),e.R.copy(gr,It,{x:0,y:0},{x:De,y:Ke+Fr},{width:Dr,height:1}),e.R.copy(gr,It,{x:Dr-1,y:0},{x:De-1,y:Ke},{width:1,height:Fr}),e.R.copy(gr,It,{x:0,y:0},{x:De+Dr,y:Ke},{width:1,height:Fr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(I){for(let ht of I){if(this.callbackDispatchedThisFrame[ht])continue;this.callbackDispatchedThisFrame[ht]=!0;let Et=this.getImage(ht);Et||e.w(`Image with ID: "${ht}" was not found`),k(Et)&&this.updateImage(ht,Et)}}}let R=1e20;function O(qt,I,ht,Et,It,Vt,ke,De,Ke){for(let gr=I;gr-1);Ke++,Vt[Ke]=De,ke[Ke]=gr,ke[Ke+1]=R}for(let De=0,Ke=0;De65535)throw new Error("glyphs > 65535 not supported");if(Et.ranges[Vt])return{stack:I,id:ht,glyph:It};if(!this.url)throw new Error("glyphsUrl is not set");if(!Et.requests[Vt]){let De=V.loadGlyphRange(I,Vt,this.url,this.requestManager);Et.requests[Vt]=De}let ke=yield Et.requests[Vt];for(let De in ke)this._doesCharSupportLocalGlyph(+De)||(Et.glyphs[+De]=ke[+De]);return Et.ranges[Vt]=!0,{stack:I,id:ht,glyph:ke[ht]||null}})}_doesCharSupportLocalGlyph(I){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(I))}_tinySDF(I,ht,Et){let It=this.localIdeographFontFamily;if(!It||!this._doesCharSupportLocalGlyph(Et))return;let Vt=I.tinySDF;if(!Vt){let De="400";/bold/i.test(ht)?De="900":/medium/i.test(ht)?De="500":/light/i.test(ht)&&(De="200"),Vt=I.tinySDF=new V.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:It,fontWeight:De})}let ke=Vt.draw(String.fromCharCode(Et));return{id:Et,bitmap:new e.o({width:ke.width||60,height:ke.height||60},ke.data),metrics:{width:ke.glyphWidth/2||24,height:ke.glyphHeight/2||24,left:ke.glyphLeft/2+.5||0,top:ke.glyphTop/2-27.5||-8,advance:ke.glyphAdvance/2||24,isDoubleResolution:!0}}}}V.loadGlyphRange=function(qt,I,ht,Et){return e._(this,void 0,void 0,function*(){let It=256*I,Vt=It+255,ke=Et.transformRequest(ht.replace("{fontstack}",qt).replace("{range}",`${It}-${Vt}`),"Glyphs"),De=yield e.l(ke,new AbortController);if(!De||!De.data)throw new Error(`Could not load glyph range. range: ${I}, ${It}-${Vt}`);let Ke={};for(let gr of e.n(De.data))Ke[gr.id]=gr;return Ke})},V.TinySDF=class{constructor({fontSize:qt=24,buffer:I=3,radius:ht=8,cutoff:Et=.25,fontFamily:It="sans-serif",fontWeight:Vt="normal",fontStyle:ke="normal"}={}){this.buffer=I,this.cutoff=Et,this.radius=ht;let De=this.size=qt+4*I,Ke=this._createCanvas(De),gr=this.ctx=Ke.getContext("2d",{willReadFrequently:!0});gr.font=`${ke} ${Vt} ${qt}px ${It}`,gr.textBaseline="alphabetic",gr.textAlign="left",gr.fillStyle="black",this.gridOuter=new Float64Array(De*De),this.gridInner=new Float64Array(De*De),this.f=new Float64Array(De),this.z=new Float64Array(De+1),this.v=new Uint16Array(De)}_createCanvas(qt){let I=document.createElement("canvas");return I.width=I.height=qt,I}draw(qt){let{width:I,actualBoundingBoxAscent:ht,actualBoundingBoxDescent:Et,actualBoundingBoxLeft:It,actualBoundingBoxRight:Vt}=this.ctx.measureText(qt),ke=Math.ceil(ht),De=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Vt-It))),Ke=Math.min(this.size-this.buffer,ke+Math.ceil(Et)),gr=De+2*this.buffer,Dr=Ke+2*this.buffer,Fr=Math.max(gr*Dr,0),ln=new Uint8ClampedArray(Fr),Mn={data:ln,width:gr,height:Dr,glyphWidth:De,glyphHeight:Ke,glyphTop:ke,glyphLeft:0,glyphAdvance:I};if(De===0||Ke===0)return Mn;let{ctx:Xt,buffer:ae,gridInner:xe,gridOuter:Ae}=this;Xt.clearRect(ae,ae,De,Ke),Xt.fillText(qt,ae,ae+ke);let je=Xt.getImageData(ae,ae,De,Ke);Ae.fill(R,0,Fr),xe.fill(0,0,Fr);for(let Ie=0;Ie0?Nr*Nr:0,xe[Or]=Nr<0?Nr*Nr:0}}O(Ae,0,0,gr,Dr,gr,this.f,this.v,this.z),O(xe,ae,ae,De,Ke,gr,this.f,this.v,this.z);for(let Ie=0;Ie1&&(Ke=I[++De]);let Dr=Math.abs(gr-Ke.left),Fr=Math.abs(gr-Ke.right),ln=Math.min(Dr,Fr),Mn,Xt=Vt/Et*(It+1);if(Ke.isDash){let ae=It-Math.abs(Xt);Mn=Math.sqrt(ln*ln+ae*ae)}else Mn=It-Math.sqrt(ln*ln+Xt*Xt);this.data[ke+gr]=Math.max(0,Math.min(255,Mn+128))}}}addRegularDash(I){for(let De=I.length-1;De>=0;--De){let Ke=I[De],gr=I[De+1];Ke.zeroLength?I.splice(De,1):gr&&gr.isDash===Ke.isDash&&(gr.left=Ke.left,I.splice(De,1))}let ht=I[0],Et=I[I.length-1];ht.isDash===Et.isDash&&(ht.left=Et.left-this.width,Et.right=ht.right+this.width);let It=this.width*this.nextRow,Vt=0,ke=I[Vt];for(let De=0;De1&&(ke=I[++Vt]);let Ke=Math.abs(De-ke.left),gr=Math.abs(De-ke.right),Dr=Math.min(Ke,gr);this.data[It+De]=Math.max(0,Math.min(255,(ke.isDash?Dr:-Dr)+128))}}addDash(I,ht){let Et=ht?7:0,It=2*Et+1;if(this.nextRow+It>this.height)return e.w("LineAtlas out of space"),null;let Vt=0;for(let De=0;De{ht.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[lt]}numActive(){return Object.keys(this.active).length}}let pt=Math.floor(o.hardwareConcurrency/2),st,tt;function dt(){return st||(st=new yt),st}yt.workerCount=e.C(globalThis)?Math.max(Math.min(pt,3),1):1;class rt{constructor(I,ht){this.workerPool=I,this.actors=[],this.currentActor=0,this.id=ht;let Et=this.workerPool.acquire(ht);for(let It=0;It{ht.remove()}),this.actors=[],I&&this.workerPool.release(this.id)}registerMessageHandler(I,ht){for(let Et of this.actors)Et.registerMessageHandler(I,ht)}}function at(){return tt||(tt=new rt(dt(),e.G),tt.registerMessageHandler("GR",(qt,I,ht)=>e.m(I,ht))),tt}function vt(qt,I){let ht=e.H();return e.J(ht,ht,[1,1,0]),e.K(ht,ht,[.5*qt.width,.5*qt.height,1]),e.L(ht,ht,qt.calculatePosMatrix(I.toUnwrapped()))}function it(qt,I,ht,Et,It,Vt){let ke=function(Fr,ln,Mn){if(Fr)for(let Xt of Fr){let ae=ln[Xt];if(ae&&ae.source===Mn&&ae.type==="fill-extrusion")return!0}else for(let Xt in ln){let ae=ln[Xt];if(ae.source===Mn&&ae.type==="fill-extrusion")return!0}return!1}(It&&It.layers,I,qt.id),De=Vt.maxPitchScaleFactor(),Ke=qt.tilesIn(Et,De,ke);Ke.sort(Y);let gr=[];for(let Fr of Ke)gr.push({wrappedTileID:Fr.tileID.wrapped().key,queryResults:Fr.tile.queryRenderedFeatures(I,ht,qt._state,Fr.queryGeometry,Fr.cameraQueryGeometry,Fr.scale,It,Vt,De,vt(qt.transform,Fr.tileID))});let Dr=function(Fr){let ln={},Mn={};for(let Xt of Fr){let ae=Xt.queryResults,xe=Xt.wrappedTileID,Ae=Mn[xe]=Mn[xe]||{};for(let je in ae){let Ie=ae[je],Ze=Ae[je]=Ae[je]||{},wr=ln[je]=ln[je]||[];for(let Or of Ie)Ze[Or.featureIndex]||(Ze[Or.featureIndex]=!0,wr.push(Or))}}return ln}(gr);for(let Fr in Dr)Dr[Fr].forEach(ln=>{let Mn=ln.feature,Xt=qt.getFeatureState(Mn.layer["source-layer"],Mn.id);Mn.source=Mn.layer.source,Mn.layer["source-layer"]&&(Mn.sourceLayer=Mn.layer["source-layer"]),Mn.state=Xt});return Dr}function Y(qt,I){let ht=qt.tileID,Et=I.tileID;return ht.overscaledZ-Et.overscaledZ||ht.canonical.y-Et.canonical.y||ht.wrap-Et.wrap||ht.canonical.x-Et.canonical.x}function ft(qt,I,ht){return e._(this,void 0,void 0,function*(){let Et=qt;if(qt.url?Et=(yield e.h(I.transformRequest(qt.url,"Source"),ht)).data:yield o.frameAsync(ht),!Et)return null;let It=e.M(e.e(Et,qt),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Et&&Et.vector_layers&&(It.vectorLayerIds=Et.vector_layers.map(Vt=>Vt.id)),It})}class ut{constructor(I,ht){I&&(ht?this.setSouthWest(I).setNorthEast(ht):Array.isArray(I)&&(I.length===4?this.setSouthWest([I[0],I[1]]).setNorthEast([I[2],I[3]]):this.setSouthWest(I[0]).setNorthEast(I[1])))}setNorthEast(I){return this._ne=I instanceof e.N?new e.N(I.lng,I.lat):e.N.convert(I),this}setSouthWest(I){return this._sw=I instanceof e.N?new e.N(I.lng,I.lat):e.N.convert(I),this}extend(I){let ht=this._sw,Et=this._ne,It,Vt;if(I instanceof e.N)It=I,Vt=I;else{if(!(I instanceof ut))return Array.isArray(I)?I.length===4||I.every(Array.isArray)?this.extend(ut.convert(I)):this.extend(e.N.convert(I)):I&&("lng"in I||"lon"in I)&&"lat"in I?this.extend(e.N.convert(I)):this;if(It=I._sw,Vt=I._ne,!It||!Vt)return this}return ht||Et?(ht.lng=Math.min(It.lng,ht.lng),ht.lat=Math.min(It.lat,ht.lat),Et.lng=Math.max(Vt.lng,Et.lng),Et.lat=Math.max(Vt.lat,Et.lat)):(this._sw=new e.N(It.lng,It.lat),this._ne=new e.N(Vt.lng,Vt.lat)),this}getCenter(){return new e.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.N(this.getWest(),this.getNorth())}getSouthEast(){return new e.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(I){let{lng:ht,lat:Et}=e.N.convert(I),It=this._sw.lng<=ht&&ht<=this._ne.lng;return this._sw.lng>this._ne.lng&&(It=this._sw.lng>=ht&&ht>=this._ne.lng),this._sw.lat<=Et&&Et<=this._ne.lat&&It}static convert(I){return I instanceof ut?I:I&&new ut(I)}static fromLngLat(I,ht=0){let Et=360*ht/40075017,It=Et/Math.cos(Math.PI/180*I.lat);return new ut(new e.N(I.lng-It,I.lat-Et),new e.N(I.lng+It,I.lat+Et))}adjustAntiMeridian(){let I=new e.N(this._sw.lng,this._sw.lat),ht=new e.N(this._ne.lng,this._ne.lat);return new ut(I,I.lng>ht.lng?new e.N(ht.lng+360,ht.lat):ht)}}class wt{constructor(I,ht,Et){this.bounds=ut.convert(this.validateBounds(I)),this.minzoom=ht||0,this.maxzoom=Et||24}validateBounds(I){return Array.isArray(I)&&I.length===4?[Math.max(-180,I[0]),Math.max(-90,I[1]),Math.min(180,I[2]),Math.min(90,I[3])]:[-180,-90,180,90]}contains(I){let ht=Math.pow(2,I.z),Et=Math.floor(e.O(this.bounds.getWest())*ht),It=Math.floor(e.Q(this.bounds.getNorth())*ht),Vt=Math.ceil(e.O(this.bounds.getEast())*ht),ke=Math.ceil(e.Q(this.bounds.getSouth())*ht);return I.x>=Et&&I.x=It&&I.y{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(I){return e._(this,void 0,void 0,function*(){let ht=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et={request:this.map._requestManager.transformRequest(ht,"Tile"),uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,tileSize:this.tileSize*I.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Et.request.collectResourceTiming=this._collectResourceTiming;let It="RT";if(I.actor&&I.state!=="expired"){if(I.state==="loading")return new Promise((Vt,ke)=>{I.reloadPromise={resolve:Vt,reject:ke}})}else I.actor=this.dispatcher.getActor(),It="LT";I.abortController=new AbortController;try{let Vt=yield I.actor.sendAsync({type:It,data:Et},I.abortController);if(delete I.abortController,I.aborted)return;this._afterTileLoadWorkerResponse(I,Vt)}catch(Vt){if(delete I.abortController,I.aborted)return;if(Vt&&Vt.status!==404)throw Vt;this._afterTileLoadWorkerResponse(I,null)}})}_afterTileLoadWorkerResponse(I,ht){if(ht&&ht.resourceTiming&&(I.resourceTiming=ht.resourceTiming),ht&&this.map._refreshExpiredTiles&&I.setExpiryData(ht),I.loadVectorData(ht,this.map.painter),I.reloadPromise){let Et=I.reloadPromise;I.reloadPromise=null,this.loadTile(I).then(Et.resolve).catch(Et.reject)}}abortTile(I){return e._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.actor&&(yield I.actor.sendAsync({type:"AT",data:{uid:I.uid,type:this.type,source:this.id}}))})}unloadTile(I){return e._(this,void 0,void 0,function*(){I.unloadVectorData(),I.actor&&(yield I.actor.sendAsync({type:"RMT",data:{uid:I.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Pt extends e.E{constructor(I,ht,Et,It){super(),this.id=I,this.dispatcher=Et,this.setEventedParent(It),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},ht),e.e(this,e.M(ht,["url","scheme","tileSize"]))}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let I=yield ft(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,I&&(e.e(this,I),I.bounds&&(this.tileBounds=new wt(I.bounds,this.minzoom,this.maxzoom)),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})))}catch(I){this._tileJSONRequest=null,this.fire(new e.j(I))}})}loaded(){return this._loaded}onAdd(I){this.map=I,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(I){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),I(),this.load()}setTiles(I){return this.setSourceProperty(()=>{this._options.tiles=I}),this}setUrl(I){return this.setSourceProperty(()=>{this.url=I,this._options.url=I}),this}serialize(){return e.e({},this._options)}hasTile(I){return!this.tileBounds||this.tileBounds.contains(I.canonical)}loadTile(I){return e._(this,void 0,void 0,function*(){let ht=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);I.abortController=new AbortController;try{let Et=yield u.getImage(this.map._requestManager.transformRequest(ht,"Tile"),I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(Et&&Et.data){this.map._refreshExpiredTiles&&Et.cacheControl&&Et.expires&&I.setExpiryData({cacheControl:Et.cacheControl,expires:Et.expires});let It=this.map.painter.context,Vt=It.gl,ke=Et.data;I.texture=this.map.painter.getTileTexture(ke.width),I.texture?I.texture.update(ke,{useMipmap:!0}):(I.texture=new p(It,ke,Vt.RGBA,{useMipmap:!0}),I.texture.bind(Vt.LINEAR,Vt.CLAMP_TO_EDGE,Vt.LINEAR_MIPMAP_NEAREST)),I.state="loaded"}}catch(Et){if(delete I.abortController,I.aborted)I.state="unloaded";else if(Et)throw I.state="errored",Et}})}abortTile(I){return e._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController)})}unloadTile(I){return e._(this,void 0,void 0,function*(){I.texture&&this.map.painter.saveTileTexture(I.texture)})}hasTransition(){return!1}}class Wt extends Pt{constructor(I,ht,Et,It){super(I,ht,Et,It),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},ht),this.encoding=ht.encoding||"mapbox",this.redFactor=ht.redFactor,this.greenFactor=ht.greenFactor,this.blueFactor=ht.blueFactor,this.baseShift=ht.baseShift}loadTile(I){return e._(this,void 0,void 0,function*(){let ht=I.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et=this.map._requestManager.transformRequest(ht,"Tile");I.neighboringTiles=this._getNeighboringTiles(I.tileID),I.abortController=new AbortController;try{let It=yield u.getImage(Et,I.abortController,this.map._refreshExpiredTiles);if(delete I.abortController,I.aborted)return void(I.state="unloaded");if(It&&It.data){let Vt=It.data;this.map._refreshExpiredTiles&&It.cacheControl&&It.expires&&I.setExpiryData({cacheControl:It.cacheControl,expires:It.expires});let ke=e.b(Vt)&&e.U()?Vt:yield this.readImageNow(Vt),De={type:this.type,uid:I.uid,source:this.id,rawImageData:ke,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!I.actor||I.state==="expired"){I.actor=this.dispatcher.getActor();let Ke=yield I.actor.sendAsync({type:"LDT",data:De});I.dem=Ke,I.needsHillshadePrepare=!0,I.needsTerrainPrepare=!0,I.state="loaded"}}}catch(It){if(delete I.abortController,I.aborted)I.state="unloaded";else if(It)throw I.state="errored",It}})}readImageNow(I){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.V()){let ht=I.width+2,Et=I.height+2;try{return new e.R({width:ht,height:Et},yield e.W(I,-1,-1,ht,Et))}catch{}}return o.getImageData(I,1)})}_getNeighboringTiles(I){let ht=I.canonical,Et=Math.pow(2,ht.z),It=(ht.x-1+Et)%Et,Vt=ht.x===0?I.wrap-1:I.wrap,ke=(ht.x+1+Et)%Et,De=ht.x+1===Et?I.wrap+1:I.wrap,Ke={};return Ke[new e.S(I.overscaledZ,Vt,ht.z,It,ht.y).key]={backfilled:!1},Ke[new e.S(I.overscaledZ,De,ht.z,ke,ht.y).key]={backfilled:!1},ht.y>0&&(Ke[new e.S(I.overscaledZ,Vt,ht.z,It,ht.y-1).key]={backfilled:!1},Ke[new e.S(I.overscaledZ,I.wrap,ht.z,ht.x,ht.y-1).key]={backfilled:!1},Ke[new e.S(I.overscaledZ,De,ht.z,ke,ht.y-1).key]={backfilled:!1}),ht.y+10&&e.e(Vt,{resourceTiming:It}),this.fire(new e.k("data",Object.assign(Object.assign({},Vt),{sourceDataType:"metadata"}))),this.fire(new e.k("data",Object.assign(Object.assign({},Vt),{sourceDataType:"content"})))}catch(Et){if(this._pendingLoads--,this._removed)return void this.fire(new e.k("dataabort",{dataType:"source"}));this.fire(new e.j(Et))}})}loaded(){return this._pendingLoads===0}loadTile(I){return e._(this,void 0,void 0,function*(){let ht=I.actor?"RT":"LT";I.actor=this.actor;let Et={type:this.type,uid:I.uid,tileID:I.tileID,zoom:I.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};I.abortController=new AbortController;let It=yield this.actor.sendAsync({type:ht,data:Et},I.abortController);delete I.abortController,I.unloadVectorData(),I.aborted||I.loadVectorData(It,this.map.painter,ht==="RT")})}abortTile(I){return e._(this,void 0,void 0,function*(){I.abortController&&(I.abortController.abort(),delete I.abortController),I.aborted=!0})}unloadTile(I){return e._(this,void 0,void 0,function*(){I.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:I.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Jt=e.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ge extends e.E{constructor(I,ht,Et,It){super(),this.id=I,this.dispatcher=Et,this.coordinates=ht.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(It),this.options=ht}load(I){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let ht=yield u.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ht&&ht.data&&(this.image=ht.data,I&&(this.coordinates=I),this._finishLoading())}catch(ht){this._request=null,this._loaded=!0,this.fire(new e.j(ht))}})}loaded(){return this._loaded}updateImage(I){return I.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=I.url,this.load(I.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(I){this.map=I,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(I){this.coordinates=I;let ht=I.map(e.Z.fromLngLat);this.tileID=function(It){let Vt=1/0,ke=1/0,De=-1/0,Ke=-1/0;for(let ln of It)Vt=Math.min(Vt,ln.x),ke=Math.min(ke,ln.y),De=Math.max(De,ln.x),Ke=Math.max(Ke,ln.y);let gr=Math.max(De-Vt,Ke-ke),Dr=Math.max(0,Math.floor(-Math.log(gr)/Math.LN2)),Fr=Math.pow(2,Dr);return new e.a1(Dr,Math.floor((Vt+De)/2*Fr),Math.floor((ke+Ke)/2*Fr))}(ht),this.minzoom=this.maxzoom=this.tileID.z;let Et=ht.map(It=>this.tileID.getTilePoint(It)._round());return this._boundsArray=new e.$,this._boundsArray.emplaceBack(Et[0].x,Et[0].y,0,0),this._boundsArray.emplaceBack(Et[1].x,Et[1].y,e.X,0),this._boundsArray.emplaceBack(Et[3].x,Et[3].y,0,e.X),this._boundsArray.emplaceBack(Et[2].x,Et[2].y,e.X,e.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let I=this.map.painter.context,ht=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new p(I,this.image,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let It in this.tiles){let Vt=this.tiles[It];Vt.state!=="loaded"&&(Vt.state="loaded",Vt.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(I){return e._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(I.tileID.canonical)?(this.tiles[String(I.tileID.wrap)]=I,I.buckets={}):I.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class he extends ge{constructor(I,ht,Et,It){super(I,ht,Et,It),this.roundZoom=!0,this.type="video",this.options=ht}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let I=this.options;this.urls=[];for(let ht of I.urls)this.urls.push(this.map._requestManager.transformRequest(ht,"Source").url);try{let ht=yield e.a3(this.urls);if(this._loaded=!0,!ht)return;this.video=ht,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ht){this.fire(new e.j(ht))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(I){if(this.video){let ht=this.video.seekable;Iht.end(0)?this.fire(new e.j(new e.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ht.start(0)} and ${ht.end(0)}-second mark.`))):this.video.currentTime=I}}getVideo(){return this.video}onAdd(I){this.map||(this.map=I,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let I=this.map.painter.context,ht=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE),ht.texSubImage2D(ht.TEXTURE_2D,0,0,0,ht.RGBA,ht.UNSIGNED_BYTE,this.video)):(this.texture=new p(I,this.video,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let It in this.tiles){let Vt=this.tiles[It];Vt.state!=="loaded"&&(Vt.state="loaded",Vt.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class de extends ge{constructor(I,ht,Et,It){super(I,ht,Et,It),ht.coordinates?Array.isArray(ht.coordinates)&&ht.coordinates.length===4&&!ht.coordinates.some(Vt=>!Array.isArray(Vt)||Vt.length!==2||Vt.some(ke=>typeof ke!="number"))||this.fire(new e.j(new e.a2(`sources.${I}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.j(new e.a2(`sources.${I}`,null,'missing required property "coordinates"'))),ht.animate&&typeof ht.animate!="boolean"&&this.fire(new e.j(new e.a2(`sources.${I}`,null,'optional "animate" property must be a boolean value'))),ht.canvas?typeof ht.canvas=="string"||ht.canvas instanceof HTMLCanvasElement||this.fire(new e.j(new e.a2(`sources.${I}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.j(new e.a2(`sources.${I}`,null,'missing required property "canvas"'))),this.options=ht,this.animate=ht.animate===void 0||ht.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(I){this.map=I,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let I=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,I=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,I=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ht=this.map.painter.context,Et=ht.gl;this.boundsBuffer||(this.boundsBuffer=ht.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?(I||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new p(ht,this.canvas,Et.RGBA,{premultiply:!0});let It=!1;for(let Vt in this.tiles){let ke=this.tiles[Vt];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture,It=!0)}It&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let I of[this.canvas.width,this.canvas.height])if(isNaN(I)||I<=0)return!0;return!1}}let se={},Tt=qt=>{switch(qt){case"geojson":return Ht;case"image":return ge;case"raster":return Pt;case"raster-dem":return Wt;case"vector":return zt;case"video":return he;case"canvas":return de}return se[qt]},Lt="RTLPluginLoaded";class Mt extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=at()}_syncState(I){return this.status=I,this.dispatcher.broadcast("SRPS",{pluginStatus:I,pluginURL:this.url}).catch(ht=>{throw this.status="error",ht})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(I){return e._(this,arguments,void 0,function*(ht,Et=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=o.resolveURL(ht),!this.url)throw new Error(`requested url ${ht} is invalid`);if(this.status==="unavailable"){if(!Et)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.k(Lt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let te=null;function ve(){return te||(te=new Mt),te}class oe{constructor(I,ht){this.timeAdded=0,this.fadeEndTime=0,this.tileID=I,this.uid=e.a4(),this.uses=0,this.tileSize=ht,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(I){let ht=I+this.timeAdded;htVt.getLayer(gr)).filter(Boolean);if(Ke.length!==0){De.layers=Ke,De.stateDependentLayerIds&&(De.stateDependentLayers=De.stateDependentLayerIds.map(gr=>Ke.filter(Dr=>Dr.id===gr)[0]));for(let gr of Ke)ke[gr.id]=De}}return ke}(I.buckets,ht.style),this.hasSymbolBuckets=!1;for(let It in this.buckets){let Vt=this.buckets[It];if(Vt instanceof e.a6){if(this.hasSymbolBuckets=!0,!Et)break;Vt.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let It in this.buckets){let Vt=this.buckets[It];if(Vt instanceof e.a6&&Vt.hasRTLText){this.hasRTLText=!0,ve().lazyLoad();break}}this.queryPadding=0;for(let It in this.buckets){let Vt=this.buckets[It];this.queryPadding=Math.max(this.queryPadding,ht.style.getLayer(It).queryRadius(Vt))}I.imageAtlas&&(this.imageAtlas=I.imageAtlas),I.glyphAtlasImage&&(this.glyphAtlasImage=I.glyphAtlasImage)}else this.collisionBoxArray=new e.a5}unloadVectorData(){for(let I in this.buckets)this.buckets[I].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(I){return this.buckets[I.id]}upload(I){for(let Et in this.buckets){let It=this.buckets[Et];It.uploadPending()&&It.upload(I)}let ht=I.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new p(I,this.imageAtlas.image,ht.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new p(I,this.glyphAtlasImage,ht.ALPHA),this.glyphAtlasImage=null)}prepare(I){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(I,this.imageAtlasTexture)}queryRenderedFeatures(I,ht,Et,It,Vt,ke,De,Ke,gr,Dr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:It,cameraQueryGeometry:Vt,scale:ke,tileSize:this.tileSize,pixelPosMatrix:Dr,transform:Ke,params:De,queryPadding:this.queryPadding*gr},I,ht,Et):{}}querySourceFeatures(I,ht){let Et=this.latestFeatureIndex;if(!Et||!Et.rawTileData)return;let It=Et.loadVTLayers(),Vt=ht&&ht.sourceLayer?ht.sourceLayer:"",ke=It._geojsonTileLayer||It[Vt];if(!ke)return;let De=e.a7(ht&&ht.filter),{z:Ke,x:gr,y:Dr}=this.tileID.canonical,Fr={z:Ke,x:gr,y:Dr};for(let ln=0;lnEt)It=!1;else if(ht)if(this.expirationTime{this.remove(I,Vt)},Et)),this.data[It].push(Vt),this.order.push(It),this.order.length>this.max){let ke=this._getAndRemoveByKey(this.order[0]);ke&&this.onRemove(ke)}return this}has(I){return I.wrapped().key in this.data}getAndRemove(I){return this.has(I)?this._getAndRemoveByKey(I.wrapped().key):null}_getAndRemoveByKey(I){let ht=this.data[I].shift();return ht.timeout&&clearTimeout(ht.timeout),this.data[I].length===0&&delete this.data[I],this.order.splice(this.order.indexOf(I),1),ht.value}getByKey(I){let ht=this.data[I];return ht?ht[0].value:null}get(I){return this.has(I)?this.data[I.wrapped().key][0].value:null}remove(I,ht){if(!this.has(I))return this;let Et=I.wrapped().key,It=ht===void 0?0:this.data[Et].indexOf(ht),Vt=this.data[Et][It];return this.data[Et].splice(It,1),Vt.timeout&&clearTimeout(Vt.timeout),this.data[Et].length===0&&delete this.data[Et],this.onRemove(Vt.value),this.order.splice(this.order.indexOf(Et),1),this}setMaxSize(I){for(this.max=I;this.order.length>this.max;){let ht=this._getAndRemoveByKey(this.order[0]);ht&&this.onRemove(ht)}return this}filter(I){let ht=[];for(let Et in this.data)for(let It of this.data[Et])I(It.value)||ht.push(It);for(let Et of ht)this.remove(Et.value.tileID,Et)}}class He{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(I,ht,Et){let It=String(ht);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][It]=this.stateChanges[I][It]||{},e.e(this.stateChanges[I][It],Et),this.deletedStates[I]===null){this.deletedStates[I]={};for(let Vt in this.state[I])Vt!==It&&(this.deletedStates[I][Vt]=null)}else if(this.deletedStates[I]&&this.deletedStates[I][It]===null){this.deletedStates[I][It]={};for(let Vt in this.state[I][It])Et[Vt]||(this.deletedStates[I][It][Vt]=null)}else for(let Vt in Et)this.deletedStates[I]&&this.deletedStates[I][It]&&this.deletedStates[I][It][Vt]===null&&delete this.deletedStates[I][It][Vt]}removeFeatureState(I,ht,Et){if(this.deletedStates[I]===null)return;let It=String(ht);if(this.deletedStates[I]=this.deletedStates[I]||{},Et&&ht!==void 0)this.deletedStates[I][It]!==null&&(this.deletedStates[I][It]=this.deletedStates[I][It]||{},this.deletedStates[I][It][Et]=null);else if(ht!==void 0)if(this.stateChanges[I]&&this.stateChanges[I][It])for(Et in this.deletedStates[I][It]={},this.stateChanges[I][It])this.deletedStates[I][It][Et]=null;else this.deletedStates[I][It]=null;else this.deletedStates[I]=null}getState(I,ht){let Et=String(ht),It=e.e({},(this.state[I]||{})[Et],(this.stateChanges[I]||{})[Et]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){let Vt=this.deletedStates[I][ht];if(Vt===null)return{};for(let ke in Vt)delete It[ke]}return It}initializeTileState(I,ht){I.setFeatureState(this.state,ht)}coalesceChanges(I,ht){let Et={};for(let It in this.stateChanges){this.state[It]=this.state[It]||{};let Vt={};for(let ke in this.stateChanges[It])this.state[It][ke]||(this.state[It][ke]={}),e.e(this.state[It][ke],this.stateChanges[It][ke]),Vt[ke]=this.state[It][ke];Et[It]=Vt}for(let It in this.deletedStates){this.state[It]=this.state[It]||{};let Vt={};if(this.deletedStates[It]===null)for(let ke in this.state[It])Vt[ke]={},this.state[It][ke]={};else for(let ke in this.deletedStates[It]){if(this.deletedStates[It][ke]===null)this.state[It][ke]={};else for(let De of Object.keys(this.deletedStates[It][ke]))delete this.state[It][ke][De];Vt[ke]=this.state[It][ke]}Et[It]=Et[It]||{},e.e(Et[It],Vt)}if(this.stateChanges={},this.deletedStates={},Object.keys(Et).length!==0)for(let It in I)I[It].setFeatureState(Et,ht)}}class Ge extends e.E{constructor(I,ht,Et){super(),this.id=I,this.dispatcher=Et,this.on("data",It=>this._dataHandler(It)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((It,Vt,ke,De)=>{let Ke=new(Tt(Vt.type))(It,Vt,ke,De);if(Ke.id!==It)throw new Error(`Expected Source id to be ${It} instead of ${Ke.id}`);return Ke})(I,ht,Et,this),this._tiles={},this._cache=new Te(0,It=>this._unloadTile(It)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new He,this._didEmitContent=!1,this._updated=!1}onAdd(I){this.map=I,this._maxTileCacheSize=I?I._maxTileCacheSize:null,this._maxTileCacheZoomLevels=I?I._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(I)}onRemove(I){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(I)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let I in this._tiles){let ht=this._tiles[I];if(ht.state!=="loaded"&&ht.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let I=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,I&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(I,ht,Et){return e._(this,void 0,void 0,function*(){try{yield this._source.loadTile(I),this._tileLoaded(I,ht,Et)}catch(It){I.state="errored",It.status!==404?this._source.fire(new e.j(It,{tile:I})):this.update(this.transform,this.terrain)}})}_unloadTile(I){this._source.unloadTile&&this._source.unloadTile(I)}_abortTile(I){this._source.abortTile&&this._source.abortTile(I),this._source.fire(new e.k("dataabort",{tile:I,coord:I.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(I){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ht in this._tiles){let Et=this._tiles[ht];Et.upload(I),Et.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(I=>I.tileID).sort(cr).map(I=>I.key)}getRenderableIds(I){let ht=[];for(let Et in this._tiles)this._isIdRenderable(Et,I)&&ht.push(this._tiles[Et]);return I?ht.sort((Et,It)=>{let Vt=Et.tileID,ke=It.tileID,De=new e.P(Vt.canonical.x,Vt.canonical.y)._rotate(this.transform.angle),Ke=new e.P(ke.canonical.x,ke.canonical.y)._rotate(this.transform.angle);return Vt.overscaledZ-ke.overscaledZ||Ke.y-De.y||Ke.x-De.x}).map(Et=>Et.tileID.key):ht.map(Et=>Et.tileID).sort(cr).map(Et=>Et.key)}hasRenderableParent(I){let ht=this.findLoadedParent(I,0);return!!ht&&this._isIdRenderable(ht.tileID.key)}_isIdRenderable(I,ht){return this._tiles[I]&&this._tiles[I].hasData()&&!this._coveredTiles[I]&&(ht||!this._tiles[I].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let I in this._tiles)this._tiles[I].state!=="errored"&&this._reloadTile(I,"reloading")}}_reloadTile(I,ht){return e._(this,void 0,void 0,function*(){let Et=this._tiles[I];Et&&(Et.state!=="loading"&&(Et.state=ht),yield this._loadTile(Et,I,ht))})}_tileLoaded(I,ht,Et){I.timeAdded=o.now(),Et==="expired"&&(I.refreshedUponExpiration=!0),this._setTileReloadTimer(ht,I),this.getSource().type==="raster-dem"&&I.dem&&this._backfillDEM(I),this._state.initializeTileState(I,this.map?this.map.painter:null),I.aborted||this._source.fire(new e.k("data",{dataType:"source",tile:I,coord:I.tileID}))}_backfillDEM(I){let ht=this.getRenderableIds();for(let It=0;It1||(Math.abs(ke)>1&&(Math.abs(ke+Ke)===1?ke+=Ke:Math.abs(ke-Ke)===1&&(ke-=Ke)),Vt.dem&&It.dem&&(It.dem.backfillBorder(Vt.dem,ke,De),It.neighboringTiles&&It.neighboringTiles[gr]&&(It.neighboringTiles[gr].backfilled=!0)))}}getTile(I){return this.getTileByID(I.key)}getTileByID(I){return this._tiles[I]}_retainLoadedChildren(I,ht,Et,It){for(let Vt in this._tiles){let ke=this._tiles[Vt];if(It[Vt]||!ke.hasData()||ke.tileID.overscaledZ<=ht||ke.tileID.overscaledZ>Et)continue;let De=ke.tileID;for(;ke&&ke.tileID.overscaledZ>ht+1;){let gr=ke.tileID.scaledTo(ke.tileID.overscaledZ-1);ke=this._tiles[gr.key],ke&&ke.hasData()&&(De=gr)}let Ke=De;for(;Ke.overscaledZ>ht;)if(Ke=Ke.scaledTo(Ke.overscaledZ-1),I[Ke.key]){It[De.key]=De;break}}}findLoadedParent(I,ht){if(I.key in this._loadedParentTiles){let Et=this._loadedParentTiles[I.key];return Et&&Et.tileID.overscaledZ>=ht?Et:null}for(let Et=I.overscaledZ-1;Et>=ht;Et--){let It=I.scaledTo(Et),Vt=this._getLoadedTile(It);if(Vt)return Vt}}findLoadedSibling(I){return this._getLoadedTile(I)}_getLoadedTile(I){let ht=this._tiles[I.key];return ht&&ht.hasData()?ht:this._cache.getByKey(I.wrapped().key)}updateCacheSize(I){let ht=Math.ceil(I.width/this._source.tileSize)+1,Et=Math.ceil(I.height/this._source.tileSize)+1,It=Math.floor(ht*Et*(this._maxTileCacheZoomLevels===null?e.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Vt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,It):It;this._cache.setMaxSize(Vt)}handleWrapJump(I){let ht=Math.round((I-(this._prevLng===void 0?I:this._prevLng))/360);if(this._prevLng=I,ht){let Et={};for(let It in this._tiles){let Vt=this._tiles[It];Vt.tileID=Vt.tileID.unwrapTo(Vt.tileID.wrap+ht),Et[Vt.tileID.key]=Vt}this._tiles=Et;for(let It in this._timers)clearTimeout(this._timers[It]),delete this._timers[It];for(let It in this._tiles)this._setTileReloadTimer(It,this._tiles[It])}}_updateCoveredAndRetainedTiles(I,ht,Et,It,Vt,ke){let De={},Ke={},gr=Object.keys(I),Dr=o.now();for(let Fr of gr){let ln=I[Fr],Mn=this._tiles[Fr];if(!Mn||Mn.fadeEndTime!==0&&Mn.fadeEndTime<=Dr)continue;let Xt=this.findLoadedParent(ln,ht),ae=this.findLoadedSibling(ln),xe=Xt||ae||null;xe&&(this._addTile(xe.tileID),De[xe.tileID.key]=xe.tileID),Ke[Fr]=ln}this._retainLoadedChildren(Ke,It,Et,I);for(let Fr in De)I[Fr]||(this._coveredTiles[Fr]=!0,I[Fr]=De[Fr]);if(ke){let Fr={},ln={};for(let Mn of Vt)this._tiles[Mn.key].hasData()?Fr[Mn.key]=Mn:ln[Mn.key]=Mn;for(let Mn in ln){let Xt=ln[Mn].children(this._source.maxzoom);this._tiles[Xt[0].key]&&this._tiles[Xt[1].key]&&this._tiles[Xt[2].key]&&this._tiles[Xt[3].key]&&(Fr[Xt[0].key]=I[Xt[0].key]=Xt[0],Fr[Xt[1].key]=I[Xt[1].key]=Xt[1],Fr[Xt[2].key]=I[Xt[2].key]=Xt[2],Fr[Xt[3].key]=I[Xt[3].key]=Xt[3],delete ln[Mn])}for(let Mn in ln){let Xt=ln[Mn],ae=this.findLoadedParent(Xt,this._source.minzoom),xe=this.findLoadedSibling(Xt),Ae=ae||xe||null;if(Ae){Fr[Ae.tileID.key]=I[Ae.tileID.key]=Ae.tileID;for(let je in Fr)Fr[je].isChildOf(Ae.tileID)&&delete Fr[je]}}for(let Mn in this._tiles)Fr[Mn]||(this._coveredTiles[Mn]=!0)}}update(I,ht){if(!this._sourceLoaded||this._paused)return;let Et;this.transform=I,this.terrain=ht,this.updateCacheSize(I),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Et=I.getVisibleUnwrappedCoordinates(this._source.tileID).map(Dr=>new e.S(Dr.canonical.z,Dr.wrap,Dr.canonical.z,Dr.canonical.x,Dr.canonical.y)):(Et=I.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:ht}),this._source.hasTile&&(Et=Et.filter(Dr=>this._source.hasTile(Dr)))):Et=[];let It=I.coveringZoomLevel(this._source),Vt=Math.max(It-Ge.maxOverzooming,this._source.minzoom),ke=Math.max(It+Ge.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Dr={};for(let Fr of Et)if(Fr.canonical.z>this._source.minzoom){let ln=Fr.scaledTo(Fr.canonical.z-1);Dr[ln.key]=ln;let Mn=Fr.scaledTo(Math.max(this._source.minzoom,Math.min(Fr.canonical.z,5)));Dr[Mn.key]=Mn}Et=Et.concat(Object.values(Dr))}let De=Et.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,De&&this.fire(new e.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ke=this._updateRetainedTiles(Et,It);ur(this._source.type)&&this._updateCoveredAndRetainedTiles(Ke,Vt,ke,It,Et,ht);for(let Dr in Ke)this._tiles[Dr].clearFadeHold();let gr=e.ab(this._tiles,Ke);for(let Dr of gr){let Fr=this._tiles[Dr];Fr.hasSymbolBuckets&&!Fr.holdingForFade()?Fr.setHoldDuration(this.map._fadeDuration):Fr.hasSymbolBuckets&&!Fr.symbolFadeFinished()||this._removeTile(Dr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let I in this._tiles)this._tiles[I].holdingForFade()&&this._removeTile(I)}_updateRetainedTiles(I,ht){var Et;let It={},Vt={},ke=Math.max(ht-Ge.maxOverzooming,this._source.minzoom),De=Math.max(ht+Ge.maxUnderzooming,this._source.minzoom),Ke={};for(let gr of I){let Dr=this._addTile(gr);It[gr.key]=gr,Dr.hasData()||htthis._source.maxzoom){let ln=gr.children(this._source.maxzoom)[0],Mn=this.getTile(ln);if(Mn&&Mn.hasData()){It[ln.key]=ln;continue}}else{let ln=gr.children(this._source.maxzoom);if(It[ln[0].key]&&It[ln[1].key]&&It[ln[2].key]&&It[ln[3].key])continue}let Fr=Dr.wasRequested();for(let ln=gr.overscaledZ-1;ln>=ke;--ln){let Mn=gr.scaledTo(ln);if(Vt[Mn.key])break;if(Vt[Mn.key]=!0,Dr=this.getTile(Mn),!Dr&&Fr&&(Dr=this._addTile(Mn)),Dr){let Xt=Dr.hasData();if((Xt||!(!((Et=this.map)===null||Et===void 0)&&Et.cancelPendingTileRequestsWhileZooming)||Fr)&&(It[Mn.key]=Mn),Fr=Dr.wasRequested(),Xt)break}}}return It}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let I in this._tiles){let ht=[],Et,It=this._tiles[I].tileID;for(;It.overscaledZ>0;){if(It.key in this._loadedParentTiles){Et=this._loadedParentTiles[It.key];break}ht.push(It.key);let Vt=It.scaledTo(It.overscaledZ-1);if(Et=this._getLoadedTile(Vt),Et)break;It=Vt}for(let Vt of ht)this._loadedParentTiles[Vt]=Et}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let I in this._tiles){let ht=this._tiles[I].tileID,Et=this._getLoadedTile(ht);this._loadedSiblingTiles[ht.key]=Et}}_addTile(I){let ht=this._tiles[I.key];if(ht)return ht;ht=this._cache.getAndRemove(I),ht&&(this._setTileReloadTimer(I.key,ht),ht.tileID=I,this._state.initializeTileState(ht,this.map?this.map.painter:null),this._cacheTimers[I.key]&&(clearTimeout(this._cacheTimers[I.key]),delete this._cacheTimers[I.key],this._setTileReloadTimer(I.key,ht)));let Et=ht;return ht||(ht=new oe(I,this._source.tileSize*I.overscaleFactor()),this._loadTile(ht,I.key,ht.state)),ht.uses++,this._tiles[I.key]=ht,Et||this._source.fire(new e.k("dataloading",{tile:ht,coord:ht.tileID,dataType:"source"})),ht}_setTileReloadTimer(I,ht){I in this._timers&&(clearTimeout(this._timers[I]),delete this._timers[I]);let Et=ht.getExpiryTimeout();Et&&(this._timers[I]=setTimeout(()=>{this._reloadTile(I,"expired"),delete this._timers[I]},Et))}_removeTile(I){let ht=this._tiles[I];ht&&(ht.uses--,delete this._tiles[I],this._timers[I]&&(clearTimeout(this._timers[I]),delete this._timers[I]),ht.uses>0||(ht.hasData()&&ht.state!=="reloading"?this._cache.add(ht.tileID,ht,ht.getExpiryTimeout()):(ht.aborted=!0,this._abortTile(ht),this._unloadTile(ht))))}_dataHandler(I){let ht=I.sourceDataType;I.dataType==="source"&&ht==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&I.dataType==="source"&&ht==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let I in this._tiles)this._removeTile(I);this._cache.reset()}tilesIn(I,ht,Et){let It=[],Vt=this.transform;if(!Vt)return It;let ke=Et?Vt.getCameraQueryGeometry(I):I,De=I.map(Xt=>Vt.pointCoordinate(Xt,this.terrain)),Ke=ke.map(Xt=>Vt.pointCoordinate(Xt,this.terrain)),gr=this.getIds(),Dr=1/0,Fr=1/0,ln=-1/0,Mn=-1/0;for(let Xt of Ke)Dr=Math.min(Dr,Xt.x),Fr=Math.min(Fr,Xt.y),ln=Math.max(ln,Xt.x),Mn=Math.max(Mn,Xt.y);for(let Xt=0;Xt=0&&Ie[1].y+je>=0){let Ze=De.map(Or=>xe.getTilePoint(Or)),wr=Ke.map(Or=>xe.getTilePoint(Or));It.push({tile:ae,tileID:xe,queryGeometry:Ze,cameraQueryGeometry:wr,scale:Ae})}}return It}getVisibleCoordinates(I){let ht=this.getRenderableIds(I).map(Et=>this._tiles[Et].tileID);for(let Et of ht)Et.posMatrix=this.transform.calculatePosMatrix(Et.toUnwrapped());return ht}hasTransition(){if(this._source.hasTransition())return!0;if(ur(this._source.type)){let I=o.now();for(let ht in this._tiles)if(this._tiles[ht].fadeEndTime>=I)return!0}return!1}setFeatureState(I,ht,Et){this._state.updateState(I=I||"_geojsonTileLayer",ht,Et)}removeFeatureState(I,ht,Et){this._state.removeFeatureState(I=I||"_geojsonTileLayer",ht,Et)}getFeatureState(I,ht){return this._state.getState(I=I||"_geojsonTileLayer",ht)}setDependencies(I,ht,Et){let It=this._tiles[I];It&&It.setDependencies(ht,Et)}reloadTilesForDependencies(I,ht){for(let Et in this._tiles)this._tiles[Et].hasDependency(I,ht)&&this._reloadTile(Et,"reloading");this._cache.filter(Et=>!Et.hasDependency(I,ht))}}function cr(qt,I){let ht=Math.abs(2*qt.wrap)-+(qt.wrap<0),Et=Math.abs(2*I.wrap)-+(I.wrap<0);return qt.overscaledZ-I.overscaledZ||Et-ht||I.canonical.y-qt.canonical.y||I.canonical.x-qt.canonical.x}function ur(qt){return qt==="raster"||qt==="image"||qt==="video"}Ge.maxOverzooming=10,Ge.maxUnderzooming=3;class jr{constructor(I,ht){this.reset(I,ht)}reset(I,ht){this.points=I||[],this._distances=[0];for(let Et=1;Et0?(It-ke)/De:0;return this.points[Vt].mult(1-Ke).add(this.points[ht].mult(Ke))}}function Hr(qt,I){let ht=!0;return qt==="always"||qt!=="never"&&I!=="never"||(ht=!1),ht}class br{constructor(I,ht,Et){let It=this.boxCells=[],Vt=this.circleCells=[];this.xCellCount=Math.ceil(I/Et),this.yCellCount=Math.ceil(ht/Et);for(let ke=0;kethis.width||It<0||ht>this.height)return[];let Ke=[];if(I<=0&&ht<=0&&this.width<=Et&&this.height<=It){if(Vt)return[{key:null,x1:I,y1:ht,x2:Et,y2:It}];for(let gr=0;gr0}hitTestCircle(I,ht,Et,It,Vt){let ke=I-Et,De=I+Et,Ke=ht-Et,gr=ht+Et;if(De<0||ke>this.width||gr<0||Ke>this.height)return!1;let Dr=[];return this._forEachCell(ke,Ke,De,gr,this._queryCellCircle,Dr,{hitTest:!0,overlapMode:It,circle:{x:I,y:ht,radius:Et},seenUids:{box:{},circle:{}}},Vt),Dr.length>0}_queryCell(I,ht,Et,It,Vt,ke,De,Ke){let{seenUids:gr,hitTest:Dr,overlapMode:Fr}=De,ln=this.boxCells[Vt];if(ln!==null){let Xt=this.bboxes;for(let ae of ln)if(!gr.box[ae]){gr.box[ae]=!0;let xe=4*ae,Ae=this.boxKeys[ae];if(I<=Xt[xe+2]&&ht<=Xt[xe+3]&&Et>=Xt[xe+0]&&It>=Xt[xe+1]&&(!Ke||Ke(Ae))&&(!Dr||!Hr(Fr,Ae.overlapMode))&&(ke.push({key:Ae,x1:Xt[xe],y1:Xt[xe+1],x2:Xt[xe+2],y2:Xt[xe+3]}),Dr))return!0}}let Mn=this.circleCells[Vt];if(Mn!==null){let Xt=this.circles;for(let ae of Mn)if(!gr.circle[ae]){gr.circle[ae]=!0;let xe=3*ae,Ae=this.circleKeys[ae];if(this._circleAndRectCollide(Xt[xe],Xt[xe+1],Xt[xe+2],I,ht,Et,It)&&(!Ke||Ke(Ae))&&(!Dr||!Hr(Fr,Ae.overlapMode))){let je=Xt[xe],Ie=Xt[xe+1],Ze=Xt[xe+2];if(ke.push({key:Ae,x1:je-Ze,y1:Ie-Ze,x2:je+Ze,y2:Ie+Ze}),Dr)return!0}}}return!1}_queryCellCircle(I,ht,Et,It,Vt,ke,De,Ke){let{circle:gr,seenUids:Dr,overlapMode:Fr}=De,ln=this.boxCells[Vt];if(ln!==null){let Xt=this.bboxes;for(let ae of ln)if(!Dr.box[ae]){Dr.box[ae]=!0;let xe=4*ae,Ae=this.boxKeys[ae];if(this._circleAndRectCollide(gr.x,gr.y,gr.radius,Xt[xe+0],Xt[xe+1],Xt[xe+2],Xt[xe+3])&&(!Ke||Ke(Ae))&&!Hr(Fr,Ae.overlapMode))return ke.push(!0),!0}}let Mn=this.circleCells[Vt];if(Mn!==null){let Xt=this.circles;for(let ae of Mn)if(!Dr.circle[ae]){Dr.circle[ae]=!0;let xe=3*ae,Ae=this.circleKeys[ae];if(this._circlesCollide(Xt[xe],Xt[xe+1],Xt[xe+2],gr.x,gr.y,gr.radius)&&(!Ke||Ke(Ae))&&!Hr(Fr,Ae.overlapMode))return ke.push(!0),!0}}}_forEachCell(I,ht,Et,It,Vt,ke,De,Ke){let gr=this._convertToXCellCoord(I),Dr=this._convertToYCellCoord(ht),Fr=this._convertToXCellCoord(Et),ln=this._convertToYCellCoord(It);for(let Mn=gr;Mn<=Fr;Mn++)for(let Xt=Dr;Xt<=ln;Xt++)if(Vt.call(this,I,ht,Et,It,this.xCellCount*Xt+Mn,ke,De,Ke))return}_convertToXCellCoord(I){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(I*this.xScale)))}_convertToYCellCoord(I){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(I*this.yScale)))}_circlesCollide(I,ht,Et,It,Vt,ke){let De=It-I,Ke=Vt-ht,gr=Et+ke;return gr*gr>De*De+Ke*Ke}_circleAndRectCollide(I,ht,Et,It,Vt,ke,De){let Ke=(ke-It)/2,gr=Math.abs(I-(It+Ke));if(gr>Ke+Et)return!1;let Dr=(De-Vt)/2,Fr=Math.abs(ht-(Vt+Dr));if(Fr>Dr+Et)return!1;if(gr<=Ke||Fr<=Dr)return!0;let ln=gr-Ke,Mn=Fr-Dr;return ln*ln+Mn*Mn<=Et*Et}}function Kr(qt,I,ht,Et,It){let Vt=e.H();return I?(e.K(Vt,Vt,[1/It,1/It,1]),ht||e.ad(Vt,Vt,Et.angle)):e.L(Vt,Et.labelPlaneMatrix,qt),Vt}function rn(qt,I,ht,Et,It){if(I){let Vt=e.ae(qt);return e.K(Vt,Vt,[It,It,1]),ht||e.ad(Vt,Vt,-Et.angle),Vt}return Et.glCoordMatrix}function Ce(qt,I,ht,Et){let It;Et?(It=[qt,I,Et(qt,I),1],e.af(It,It,ht)):(It=[qt,I,0,1],pr(It,It,ht));let Vt=It[3];return{point:new e.P(It[0]/Vt,It[1]/Vt),signedDistanceFromCamera:Vt,isOccluded:!1}}function Gt(qt,I){return .5+qt/I*.5}function ne(qt,I){return qt.x>=-I[0]&&qt.x<=I[0]&&qt.y>=-I[1]&&qt.y<=I[1]}function Ct(qt,I,ht,Et,It,Vt,ke,De,Ke,gr,Dr,Fr,ln,Mn,Xt){let ae=Et?qt.textSizeData:qt.iconSizeData,xe=e.ag(ae,ht.transform.zoom),Ae=[256/ht.width*2+1,256/ht.height*2+1],je=Et?qt.text.dynamicLayoutVertexArray:qt.icon.dynamicLayoutVertexArray;je.clear();let Ie=qt.lineVertexArray,Ze=Et?qt.text.placedSymbolArray:qt.icon.placedSymbolArray,wr=ht.transform.width/ht.transform.height,Or=!1;for(let Nr=0;NrMath.abs(ht.x-I.x)*Et?{useVertical:!0}:(qt===e.ah.vertical?I.yht.x)?{needsFlipping:!0}:null}function Nt(qt,I,ht,Et,It,Vt,ke,De,Ke,gr,Dr){let Fr=ht/24,ln=I.lineOffsetX*Fr,Mn=I.lineOffsetY*Fr,Xt;if(I.numGlyphs>1){let ae=I.glyphStartIndex+I.numGlyphs,xe=I.lineStartIndex,Ae=I.lineStartIndex+I.lineLength,je=gt(Fr,De,ln,Mn,Et,I,Dr,qt);if(!je)return{notEnoughRoom:!0};let Ie=Ce(je.first.point.x,je.first.point.y,ke,qt.getElevation).point,Ze=Ce(je.last.point.x,je.last.point.y,ke,qt.getElevation).point;if(It&&!Et){let wr=St(I.writingMode,Ie,Ze,gr);if(wr)return wr}Xt=[je.first];for(let wr=I.glyphStartIndex+1;wr0?Ie.point:function(Or,Nr,tn,pn,zn,Bn){return re(Or,Nr,tn,1,zn,Bn)}(qt.tileAnchorPoint,je,xe,0,Vt,qt),wr=St(I.writingMode,xe,Ze,gr);if(wr)return wr}let ae=or(Fr*De.getoffsetX(I.glyphStartIndex),ln,Mn,Et,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,qt,Dr);if(!ae||qt.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Xt=[ae]}for(let ae of Xt)e.aj(Ke,ae.point,ae.angle);return{}}function re(qt,I,ht,Et,It,Vt){let ke=qt.add(qt.sub(I)._unit()),De=It!==void 0?Ce(ke.x,ke.y,It,Vt.getElevation).point:we(ke.x,ke.y,Vt).point,Ke=ht.sub(De);return ht.add(Ke._mult(Et/Ke.mag()))}function le(qt,I,ht){let Et=I.projectionCache;if(Et.projections[qt])return Et.projections[qt];let It=new e.P(I.lineVertexArray.getx(qt),I.lineVertexArray.gety(qt)),Vt=we(It.x,It.y,I);if(Vt.signedDistanceFromCamera>0)return Et.projections[qt]=Vt.point,Et.anyProjectionOccluded=Et.anyProjectionOccluded||Vt.isOccluded,Vt.point;let ke=qt-ht.direction;return function(De,Ke,gr,Dr,Fr){return re(De,Ke,gr,Dr,void 0,Fr)}(ht.distanceFromAnchor===0?I.tileAnchorPoint:new e.P(I.lineVertexArray.getx(ke),I.lineVertexArray.gety(ke)),It,ht.previousVertex,ht.absOffsetX-ht.distanceFromAnchor+1,I)}function we(qt,I,ht){let Et=qt+ht.translation[0],It=I+ht.translation[1],Vt;return!ht.pitchWithMap&&ht.projection.useSpecialProjectionForSymbols?(Vt=ht.projection.projectTileCoordinates(Et,It,ht.unwrappedTileID,ht.getElevation),Vt.point.x=(.5*Vt.point.x+.5)*ht.width,Vt.point.y=(.5*-Vt.point.y+.5)*ht.height):(Vt=Ce(Et,It,ht.labelPlaneMatrix,ht.getElevation),Vt.isOccluded=!1),Vt}function Ue(qt,I,ht){return qt._unit()._perp()._mult(I*ht)}function qe(qt,I,ht,Et,It,Vt,ke,De,Ke){if(De.projectionCache.offsets[qt])return De.projectionCache.offsets[qt];let gr=ht.add(I);if(qt+Ke.direction=It)return De.projectionCache.offsets[qt]=gr,gr;let Dr=le(qt+Ke.direction,De,Ke),Fr=Ue(Dr.sub(ht),ke,Ke.direction),ln=ht.add(Fr),Mn=Dr.add(Fr);return De.projectionCache.offsets[qt]=e.ak(Vt,gr,ln,Mn)||gr,De.projectionCache.offsets[qt]}function or(qt,I,ht,Et,It,Vt,ke,De,Ke){let gr=Et?qt-I:qt+I,Dr=gr>0?1:-1,Fr=0;Et&&(Dr*=-1,Fr=Math.PI),Dr<0&&(Fr+=Math.PI);let ln,Mn=Dr>0?Vt+It:Vt+It+1;De.projectionCache.cachedAnchorPoint?ln=De.projectionCache.cachedAnchorPoint:(ln=we(De.tileAnchorPoint.x,De.tileAnchorPoint.y,De).point,De.projectionCache.cachedAnchorPoint=ln);let Xt,ae,xe=ln,Ae=ln,je=0,Ie=0,Ze=Math.abs(gr),wr=[],Or;for(;je+Ie<=Ze;){if(Mn+=Dr,Mn=ke)return null;je+=Ie,Ae=xe,ae=Xt;let pn={absOffsetX:Ze,direction:Dr,distanceFromAnchor:je,previousVertex:Ae};if(xe=le(Mn,De,pn),ht===0)wr.push(Ae),Or=xe.sub(Ae);else{let zn,Bn=xe.sub(Ae);zn=Bn.mag()===0?Ue(le(Mn+Dr,De,pn).sub(xe),ht,Dr):Ue(Bn,ht,Dr),ae||(ae=Ae.add(zn)),Xt=qe(Mn,zn,xe,Vt,ke,ae,ht,De,pn),wr.push(ae),Or=Xt.sub(ae)}Ie=Or.mag()}let Nr=Or._mult((Ze-je)/Ie)._add(ae||Ae),tn=Fr+Math.atan2(xe.y-Ae.y,xe.x-Ae.x);return wr.push(Nr),{point:Nr,angle:Ke?tn:0,path:wr}}let Ar=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Tr(qt,I){for(let ht=0;ht=1;Eo--)wa.push(ha.path[Eo]);for(let Eo=1;Eods.signedDistanceFromCamera<=0)?[]:Eo.map(ds=>ds.point)}let Bo=[];if(wa.length>0){let Eo=wa[0].clone(),ds=wa[0].clone();for(let dl=1;dl=Bn.x&&ds.x<=ri.x&&Eo.y>=Bn.y&&ds.y<=ri.y?[wa]:ds.xri.x||ds.yri.y?[]:e.al([wa],Bn.x,Bn.y,ri.x,ri.y)}for(let Eo of Bo){Di.reset(Eo,.25*zn);let ds=0;ds=Di.length<=.5*zn?1:Math.ceil(Di.paddedLength/so)+1;for(let dl=0;dlCe(It.x,It.y,Et,ht.getElevation))}queryRenderedSymbols(I){if(I.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ht=[],Et=1/0,It=1/0,Vt=-1/0,ke=-1/0;for(let Dr of I){let Fr=new e.P(Dr.x+Jr,Dr.y+Jr);Et=Math.min(Et,Fr.x),It=Math.min(It,Fr.y),Vt=Math.max(Vt,Fr.x),ke=Math.max(ke,Fr.y),ht.push(Fr)}let De=this.grid.query(Et,It,Vt,ke).concat(this.ignoredGrid.query(Et,It,Vt,ke)),Ke={},gr={};for(let Dr of De){let Fr=Dr.key;if(Ke[Fr.bucketInstanceId]===void 0&&(Ke[Fr.bucketInstanceId]={}),Ke[Fr.bucketInstanceId][Fr.featureIndex])continue;let ln=[new e.P(Dr.x1,Dr.y1),new e.P(Dr.x2,Dr.y1),new e.P(Dr.x2,Dr.y2),new e.P(Dr.x1,Dr.y2)];e.am(ht,ln)&&(Ke[Fr.bucketInstanceId][Fr.featureIndex]=!0,gr[Fr.bucketInstanceId]===void 0&&(gr[Fr.bucketInstanceId]=[]),gr[Fr.bucketInstanceId].push(Fr.featureIndex))}return gr}insertCollisionBox(I,ht,Et,It,Vt,ke){(Et?this.ignoredGrid:this.grid).insert({bucketInstanceId:It,featureIndex:Vt,collisionGroupID:ke,overlapMode:ht},I[0],I[1],I[2],I[3])}insertCollisionCircles(I,ht,Et,It,Vt,ke){let De=Et?this.ignoredGrid:this.grid,Ke={bucketInstanceId:It,featureIndex:Vt,collisionGroupID:ke,overlapMode:ht};for(let gr=0;gr=this.screenRightBoundary||Itthis.screenBottomBoundary}isInsideGrid(I,ht,Et,It){return Et>=0&&I=0&&htthis.projectAndGetPerspectiveRatio(Et,zn.x,zn.y,It,gr));tn=pn.some(zn=>!zn.isOccluded),Nr=pn.map(zn=>zn.point)}else tn=!0;return{box:e.ao(Nr),allPointsOccluded:!tn}}}function Hn(qt,I,ht){return I*(e.X/(qt.tileSize*Math.pow(2,ht-qt.tileID.overscaledZ)))}class Kn{constructor(I,ht,Et,It){this.opacity=I?Math.max(0,Math.min(1,I.opacity+(I.placed?ht:-ht))):It&&Et?1:0,this.placed=Et}isHidden(){return this.opacity===0&&!this.placed}}class Ci{constructor(I,ht,Et,It,Vt){this.text=new Kn(I?I.text:null,ht,Et,Vt),this.icon=new Kn(I?I.icon:null,ht,It,Vt)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ii{constructor(I,ht,Et){this.text=I,this.icon=ht,this.skipFade=Et}}class qn{constructor(){this.invProjMatrix=e.H(),this.viewportMatrix=e.H(),this.circles=[]}}class aa{constructor(I,ht,Et,It,Vt){this.bucketInstanceId=I,this.featureIndex=ht,this.sourceLayerIndex=Et,this.bucketIndex=It,this.tileID=Vt}}class Vi{constructor(I){this.crossSourceCollisions=I,this.maxGroupID=0,this.collisionGroups={}}get(I){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[I]){let ht=++this.maxGroupID;this.collisionGroups[I]={ID:ht,predicate:Et=>Et.collisionGroupID===ht}}return this.collisionGroups[I]}}function We(qt,I,ht,Et,It){let{horizontalAlign:Vt,verticalAlign:ke}=e.au(qt);return new e.P(-(Vt-.5)*I+Et[0]*It,-(ke-.5)*ht+Et[1]*It)}class rr{constructor(I,ht,Et,It,Vt,ke){this.transform=I.clone(),this.terrain=Et,this.collisionIndex=new Vn(this.transform,ht),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=It,this.retainedQueryData={},this.collisionGroups=new Vi(Vt),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ke,ke&&(ke.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(I){let ht=this.terrain;return ht?(Et,It)=>ht.getElevation(I,Et,It):null}getBucketParts(I,ht,Et,It){let Vt=Et.getBucket(ht),ke=Et.latestFeatureIndex;if(!Vt||!ke||ht.id!==Vt.layerIds[0])return;let De=Et.collisionBoxArray,Ke=Vt.layers[0].layout,gr=Vt.layers[0].paint,Dr=Math.pow(2,this.transform.zoom-Et.tileID.overscaledZ),Fr=Et.tileSize/e.X,ln=Et.tileID.toUnwrapped(),Mn=this.transform.calculatePosMatrix(ln),Xt=Ke.get("text-pitch-alignment")==="map",ae=Ke.get("text-rotation-alignment")==="map",xe=Hn(Et,1,this.transform.zoom),Ae=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,gr.get("text-translate"),gr.get("text-translate-anchor")),je=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,gr.get("icon-translate"),gr.get("icon-translate-anchor")),Ie=Kr(Mn,Xt,ae,this.transform,xe),Ze=null;if(Xt){let Or=rn(Mn,Xt,ae,this.transform,xe);Ze=e.L([],this.transform.labelPlaneMatrix,Or)}this.retainedQueryData[Vt.bucketInstanceId]=new aa(Vt.bucketInstanceId,ke,Vt.sourceLayerIndex,Vt.index,Et.tileID);let wr={bucket:Vt,layout:Ke,translationText:Ae,translationIcon:je,posMatrix:Mn,unwrappedTileID:ln,textLabelPlaneMatrix:Ie,labelToScreenMatrix:Ze,scale:Dr,textPixelRatio:Fr,holdingForFade:Et.holdingForFade(),collisionBoxArray:De,partiallyEvaluatedTextSize:e.ag(Vt.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Vt.sourceID)};if(It)for(let Or of Vt.sortKeyRanges){let{sortKey:Nr,symbolInstanceStart:tn,symbolInstanceEnd:pn}=Or;I.push({sortKey:Nr,symbolInstanceStart:tn,symbolInstanceEnd:pn,parameters:wr})}else I.push({symbolInstanceStart:0,symbolInstanceEnd:Vt.symbolInstances.length,parameters:wr})}attemptAnchorPlacement(I,ht,Et,It,Vt,ke,De,Ke,gr,Dr,Fr,ln,Mn,Xt,ae,xe,Ae,je,Ie){let Ze=e.aq[I.textAnchor],wr=[I.textOffset0,I.textOffset1],Or=We(Ze,Et,It,wr,Vt),Nr=this.collisionIndex.placeCollisionBox(ht,ln,Ke,gr,Dr,De,ke,xe,Fr.predicate,Ie,Or);if((!je||this.collisionIndex.placeCollisionBox(je,ln,Ke,gr,Dr,De,ke,Ae,Fr.predicate,Ie,Or).placeable)&&Nr.placeable){let tn;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Mn.crossTileID]&&this.prevPlacement.placements[Mn.crossTileID]&&this.prevPlacement.placements[Mn.crossTileID].text&&(tn=this.prevPlacement.variableOffsets[Mn.crossTileID].anchor),Mn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Mn.crossTileID]={textOffset:wr,width:Et,height:It,anchor:Ze,textBoxScale:Vt,prevAnchor:tn},this.markUsedJustification(Xt,Ze,Mn,ae),Xt.allowVerticalPlacement&&(this.markUsedOrientation(Xt,ae,Mn),this.placedOrientations[Mn.crossTileID]=ae),{shift:Or,placedGlyphBoxes:Nr}}}placeLayerBucketPart(I,ht,Et){let{bucket:It,layout:Vt,translationText:ke,translationIcon:De,posMatrix:Ke,unwrappedTileID:gr,textLabelPlaneMatrix:Dr,labelToScreenMatrix:Fr,textPixelRatio:ln,holdingForFade:Mn,collisionBoxArray:Xt,partiallyEvaluatedTextSize:ae,collisionGroup:xe}=I.parameters,Ae=Vt.get("text-optional"),je=Vt.get("icon-optional"),Ie=e.ar(Vt,"text-overlap","text-allow-overlap"),Ze=Ie==="always",wr=e.ar(Vt,"icon-overlap","icon-allow-overlap"),Or=wr==="always",Nr=Vt.get("text-rotation-alignment")==="map",tn=Vt.get("text-pitch-alignment")==="map",pn=Vt.get("icon-text-fit")!=="none",zn=Vt.get("symbol-z-order")==="viewport-y",Bn=Ze&&(Or||!It.hasIconData()||je),ri=Or&&(Ze||!It.hasTextData()||Ae);!It.collisionArrays&&Xt&&It.deserializeCollisionBoxes(Xt);let Di=this._getTerrainElevationFunc(this.retainedQueryData[It.bucketInstanceId].tileID),ha=(ca,wa,so)=>{var Bo,Eo;if(ht[ca.crossTileID])return;if(Mn)return void(this.placements[ca.crossTileID]=new ii(!1,!1,!1));let ds=!1,dl=!1,yl=!0,Fs=null,wl={box:null,placeable:!1,offscreen:null},Su={placeable:!1},gu=null,Zs=null,$s=null,Yu=0,pc=0,Zc=0;wa.textFeatureIndex?Yu=wa.textFeatureIndex:ca.useRuntimeCollisionCircles&&(Yu=ca.featureIndex),wa.verticalTextFeatureIndex&&(pc=wa.verticalTextFeatureIndex);let At=wa.textBox;if(At){let Le=Mr=>{let en=e.ah.horizontal;if(It.allowVerticalPlacement&&!Mr&&this.prevPlacement){let Xr=this.prevPlacement.placedOrientations[ca.crossTileID];Xr&&(this.placedOrientations[ca.crossTileID]=Xr,en=Xr,this.markUsedOrientation(It,en,ca))}return en},Ne=(Mr,en)=>{if(It.allowVerticalPlacement&&ca.numVerticalGlyphVertices>0&&wa.verticalTextBox){for(let Xr of It.writingModes)if(Xr===e.ah.vertical?(wl=en(),Su=wl):wl=Mr(),wl&&wl.placeable)break}else wl=Mr()},sr=ca.textAnchorOffsetStartIndex,ar=ca.textAnchorOffsetEndIndex;if(ar===sr){let Mr=(en,Xr)=>{let gn=this.collisionIndex.placeCollisionBox(en,Ie,ln,Ke,gr,tn,Nr,ke,xe.predicate,Di);return gn&&gn.placeable&&(this.markUsedOrientation(It,Xr,ca),this.placedOrientations[ca.crossTileID]=Xr),gn};Ne(()=>Mr(At,e.ah.horizontal),()=>{let en=wa.verticalTextBox;return It.allowVerticalPlacement&&ca.numVerticalGlyphVertices>0&&en?Mr(en,e.ah.vertical):{box:null,offscreen:null}}),Le(wl&&wl.placeable)}else{let Mr=e.aq[(Eo=(Bo=this.prevPlacement)===null||Bo===void 0?void 0:Bo.variableOffsets[ca.crossTileID])===null||Eo===void 0?void 0:Eo.anchor],en=(gn,In,On)=>{let Bi=gn.x2-gn.x1,Un=gn.y2-gn.y1,mi=ca.textBoxScale,ki=pn&&wr==="never"?In:null,Pi=null,Hi=Ie==="never"?1:2,Yn="never";Mr&&Hi++;for(let Na=0;Naen(At,wa.iconBox,e.ah.horizontal),()=>{let gn=wa.verticalTextBox;return It.allowVerticalPlacement&&(!wl||!wl.placeable)&&ca.numVerticalGlyphVertices>0&&gn?en(gn,wa.verticalIconBox,e.ah.vertical):{box:null,occluded:!0,offscreen:null}}),wl&&(ds=wl.placeable,yl=wl.offscreen);let Xr=Le(wl&&wl.placeable);if(!ds&&this.prevPlacement){let gn=this.prevPlacement.variableOffsets[ca.crossTileID];gn&&(this.variableOffsets[ca.crossTileID]=gn,this.markUsedJustification(It,gn.anchor,ca,Xr))}}}if(gu=wl,ds=gu&&gu.placeable,yl=gu&&gu.offscreen,ca.useRuntimeCollisionCircles){let Le=It.text.placedSymbolArray.get(ca.centerJustifiedTextSymbolIndex),Ne=e.ai(It.textSizeData,ae,Le),sr=Vt.get("text-padding");Zs=this.collisionIndex.placeCollisionCircles(Ie,Le,It.lineVertexArray,It.glyphOffsetArray,Ne,Ke,gr,Dr,Fr,Et,tn,xe.predicate,ca.collisionCircleDiameter,sr,ke,Di),Zs.circles.length&&Zs.collisionDetected&&!Et&&e.w("Collisions detected, but collision boxes are not shown"),ds=Ze||Zs.circles.length>0&&!Zs.collisionDetected,yl=yl&&Zs.offscreen}if(wa.iconFeatureIndex&&(Zc=wa.iconFeatureIndex),wa.iconBox){let Le=Ne=>this.collisionIndex.placeCollisionBox(Ne,wr,ln,Ke,gr,tn,Nr,De,xe.predicate,Di,pn&&Fs?Fs:void 0);Su&&Su.placeable&&wa.verticalIconBox?($s=Le(wa.verticalIconBox),dl=$s.placeable):($s=Le(wa.iconBox),dl=$s.placeable),yl=yl&&$s.offscreen}let jt=Ae||ca.numHorizontalGlyphVertices===0&&ca.numVerticalGlyphVertices===0,ue=je||ca.numIconVertices===0;jt||ue?ue?jt||(dl=dl&&ds):ds=dl&&ds:dl=ds=dl&&ds;let Me=dl&&$s.placeable;if(ds&&gu.placeable&&this.collisionIndex.insertCollisionBox(gu.box,Ie,Vt.get("text-ignore-placement"),It.bucketInstanceId,Su&&Su.placeable&&pc?pc:Yu,xe.ID),Me&&this.collisionIndex.insertCollisionBox($s.box,wr,Vt.get("icon-ignore-placement"),It.bucketInstanceId,Zc,xe.ID),Zs&&ds&&this.collisionIndex.insertCollisionCircles(Zs.circles,Ie,Vt.get("text-ignore-placement"),It.bucketInstanceId,Yu,xe.ID),Et&&this.storeCollisionData(It.bucketInstanceId,so,wa,gu,$s,Zs),ca.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(It.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ca.crossTileID]=new ii(ds||Bn,dl||ri,yl||It.justReloaded),ht[ca.crossTileID]=!0};if(zn){if(I.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ca=It.getSortedSymbolIndexes(this.transform.angle);for(let wa=ca.length-1;wa>=0;--wa){let so=ca[wa];ha(It.symbolInstances.get(so),It.collisionArrays[so],so)}}else for(let ca=I.symbolInstanceStart;ca=0&&(I.text.placedSymbolArray.get(De).crossTileID=Vt>=0&&De!==Vt?0:Et.crossTileID)}markUsedOrientation(I,ht,Et){let It=ht===e.ah.horizontal||ht===e.ah.horizontalOnly?ht:0,Vt=ht===e.ah.vertical?ht:0,ke=[Et.leftJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.rightJustifiedTextSymbolIndex];for(let De of ke)I.text.placedSymbolArray.get(De).placedOrientation=It;Et.verticalPlacedTextSymbolIndex&&(I.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).placedOrientation=Vt)}commit(I){this.commitTime=I,this.zoomAtLastRecencyCheck=this.transform.zoom;let ht=this.prevPlacement,Et=!1;this.prevZoomAdjustment=ht?ht.zoomAdjustment(this.transform.zoom):0;let It=ht?ht.symbolFadeChange(I):1,Vt=ht?ht.opacities:{},ke=ht?ht.variableOffsets:{},De=ht?ht.placedOrientations:{};for(let Ke in this.placements){let gr=this.placements[Ke],Dr=Vt[Ke];Dr?(this.opacities[Ke]=new Ci(Dr,It,gr.text,gr.icon),Et=Et||gr.text!==Dr.text.placed||gr.icon!==Dr.icon.placed):(this.opacities[Ke]=new Ci(null,It,gr.text,gr.icon,gr.skipFade),Et=Et||gr.text||gr.icon)}for(let Ke in Vt){let gr=Vt[Ke];if(!this.opacities[Ke]){let Dr=new Ci(gr,It,!1,!1);Dr.isHidden()||(this.opacities[Ke]=Dr,Et=Et||gr.text.placed||gr.icon.placed)}}for(let Ke in ke)this.variableOffsets[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.variableOffsets[Ke]=ke[Ke]);for(let Ke in De)this.placedOrientations[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.placedOrientations[Ke]=De[Ke]);if(ht&&ht.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Et?this.lastPlacementChangeTime=I:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ht?ht.lastPlacementChangeTime:I)}updateLayerOpacities(I,ht){let Et={};for(let It of ht){let Vt=It.getBucket(I);Vt&&It.latestFeatureIndex&&I.id===Vt.layerIds[0]&&this.updateBucketOpacities(Vt,It.tileID,Et,It.collisionBoxArray)}}updateBucketOpacities(I,ht,Et,It){I.hasTextData()&&(I.text.opacityVertexArray.clear(),I.text.hasVisibleVertices=!1),I.hasIconData()&&(I.icon.opacityVertexArray.clear(),I.icon.hasVisibleVertices=!1),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexArray.clear(),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexArray.clear();let Vt=I.layers[0],ke=Vt.layout,De=new Ci(null,0,!1,!1,!0),Ke=ke.get("text-allow-overlap"),gr=ke.get("icon-allow-overlap"),Dr=Vt._unevaluatedLayout.hasValue("text-variable-anchor")||Vt._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Fr=ke.get("text-rotation-alignment")==="map",ln=ke.get("text-pitch-alignment")==="map",Mn=ke.get("icon-text-fit")!=="none",Xt=new Ci(null,0,Ke&&(gr||!I.hasIconData()||ke.get("icon-optional")),gr&&(Ke||!I.hasTextData()||ke.get("text-optional")),!0);!I.collisionArrays&&It&&(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData())&&I.deserializeCollisionBoxes(It);let ae=(Ae,je,Ie)=>{for(let Ze=0;Ze0,tn=this.placedOrientations[je.crossTileID],pn=tn===e.ah.vertical,zn=tn===e.ah.horizontal||tn===e.ah.horizontalOnly;if(Ie>0||Ze>0){let ri=Li(Or.text);ae(I.text,Ie,pn?Oi:ri),ae(I.text,Ze,zn?Oi:ri);let Di=Or.text.isHidden();[je.rightJustifiedTextSymbolIndex,je.centerJustifiedTextSymbolIndex,je.leftJustifiedTextSymbolIndex].forEach(wa=>{wa>=0&&(I.text.placedSymbolArray.get(wa).hidden=Di||pn?1:0)}),je.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(je.verticalPlacedTextSymbolIndex).hidden=Di||zn?1:0);let ha=this.variableOffsets[je.crossTileID];ha&&this.markUsedJustification(I,ha.anchor,je,tn);let ca=this.placedOrientations[je.crossTileID];ca&&(this.markUsedJustification(I,"left",je,ca),this.markUsedOrientation(I,ca,je))}if(Nr){let ri=Li(Or.icon),Di=!(Mn&&je.verticalPlacedIconSymbolIndex&&pn);je.placedIconSymbolIndex>=0&&(ae(I.icon,je.numIconVertices,Di?ri:Oi),I.icon.placedSymbolArray.get(je.placedIconSymbolIndex).hidden=Or.icon.isHidden()),je.verticalPlacedIconSymbolIndex>=0&&(ae(I.icon,je.numVerticalIconVertices,Di?Oi:ri),I.icon.placedSymbolArray.get(je.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Bn=xe&&xe.has(Ae)?xe.get(Ae):{text:null,icon:null};if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){let ri=I.collisionArrays[Ae];if(ri){let Di=new e.P(0,0);if(ri.textBox||ri.verticalTextBox){let ha=!0;if(Dr){let ca=this.variableOffsets[wr];ca?(Di=We(ca.anchor,ca.width,ca.height,ca.textOffset,ca.textBoxScale),Fr&&Di._rotate(ln?this.transform.angle:-this.transform.angle)):ha=!1}if(ri.textBox||ri.verticalTextBox){let ca;ri.textBox&&(ca=pn),ri.verticalTextBox&&(ca=zn),fr(I.textCollisionBox.collisionVertexArray,Or.text.placed,!ha||ca,Bn.text,Di.x,Di.y)}}if(ri.iconBox||ri.verticalIconBox){let ha=!!(!zn&&ri.verticalIconBox),ca;ri.iconBox&&(ca=ha),ri.verticalIconBox&&(ca=!ha),fr(I.iconCollisionBox.collisionVertexArray,Or.icon.placed,ca,Bn.icon,Mn?Di.x:0,Mn?Di.y:0)}}}}if(I.sortFeatures(this.transform.angle),this.retainedQueryData[I.bucketInstanceId]&&(this.retainedQueryData[I.bucketInstanceId].featureSortOrder=I.featureSortOrder),I.hasTextData()&&I.text.opacityVertexBuffer&&I.text.opacityVertexBuffer.updateData(I.text.opacityVertexArray),I.hasIconData()&&I.icon.opacityVertexBuffer&&I.icon.opacityVertexBuffer.updateData(I.icon.opacityVertexArray),I.hasIconCollisionBoxData()&&I.iconCollisionBox.collisionVertexBuffer&&I.iconCollisionBox.collisionVertexBuffer.updateData(I.iconCollisionBox.collisionVertexArray),I.hasTextCollisionBoxData()&&I.textCollisionBox.collisionVertexBuffer&&I.textCollisionBox.collisionVertexBuffer.updateData(I.textCollisionBox.collisionVertexArray),I.text.opacityVertexArray.length!==I.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${I.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${I.text.layoutVertexArray.length}) / 4`);if(I.icon.opacityVertexArray.length!==I.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${I.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${I.icon.layoutVertexArray.length}) / 4`);if(I.bucketInstanceId in this.collisionCircleArrays){let Ae=this.collisionCircleArrays[I.bucketInstanceId];I.placementInvProjMatrix=Ae.invProjMatrix,I.placementViewportMatrix=Ae.viewportMatrix,I.collisionCircleArray=Ae.circles,delete this.collisionCircleArrays[I.bucketInstanceId]}}symbolFadeChange(I){return this.fadeDuration===0?1:(I-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(I){return Math.max(0,(this.transform.zoom-I)/1.5)}hasTransitions(I){return this.stale||I-this.lastPlacementChangeTimeI}setStale(){this.stale=!0}}function fr(qt,I,ht,Et,It,Vt){Et&&Et.length!==0||(Et=[0,0,0,0]);let ke=Et[0]-Jr,De=Et[1]-Jr,Ke=Et[2]-Jr,gr=Et[3]-Jr;qt.emplaceBack(I?1:0,ht?1:0,It||0,Vt||0,ke,De),qt.emplaceBack(I?1:0,ht?1:0,It||0,Vt||0,Ke,De),qt.emplaceBack(I?1:0,ht?1:0,It||0,Vt||0,Ke,gr),qt.emplaceBack(I?1:0,ht?1:0,It||0,Vt||0,ke,gr)}let _r=Math.pow(2,25),Qr=Math.pow(2,24),Cn=Math.pow(2,17),bn=Math.pow(2,16),An=Math.pow(2,9),ci=Math.pow(2,8),xi=Math.pow(2,1);function Li(qt){if(qt.opacity===0&&!qt.placed)return 0;if(qt.opacity===1&&qt.placed)return 4294967295;let I=qt.placed?1:0,ht=Math.floor(127*qt.opacity);return ht*_r+I*Qr+ht*Cn+I*bn+ht*An+I*ci+ht*xi+I}let Oi=0;function Zi(){return{isOccluded:(qt,I,ht)=>!1,getPitchedTextCorrection:(qt,I,ht)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(qt,I,ht,Et){throw new Error("Not implemented.")},translatePosition:(qt,I,ht,Et)=>function(It,Vt,ke,De,Ke=!1){if(!ke[0]&&!ke[1])return[0,0];let gr=Ke?De==="map"?It.angle:0:De==="viewport"?-It.angle:0;if(gr){let Dr=Math.sin(gr),Fr=Math.cos(gr);ke=[ke[0]*Fr-ke[1]*Dr,ke[0]*Dr+ke[1]*Fr]}return[Ke?ke[0]:Hn(Vt,ke[0],It.zoom),Ke?ke[1]:Hn(Vt,ke[1],It.zoom)]}(qt,I,ht,Et),getCircleRadiusCorrection:qt=>1}}class li{constructor(I){this._sortAcrossTiles=I.layout.get("symbol-z-order")!=="viewport-y"&&!I.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(I,ht,Et,It,Vt){let ke=this._bucketParts;for(;this._currentTileIndexDe.sortKey-Ke.sortKey));this._currentPartIndex!this._forceFullPlacement&&o.now()-It>2;for(;this._currentPlacementIndex>=0;){let ke=ht[I[this._currentPlacementIndex]],De=this.placement.collisionIndex.transform.zoom;if(ke.type==="symbol"&&(!ke.minzoom||ke.minzoom<=De)&&(!ke.maxzoom||ke.maxzoom>De)){if(this._inProgressLayer||(this._inProgressLayer=new li(ke)),this._inProgressLayer.continuePlacement(Et[ke.source],this.placement,this._showCollisionBoxes,ke,Vt))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(I){return this.placement.commit(I),this.placement}}let Wa=512/e.X/2;class ze{constructor(I,ht,Et){this.tileID=I,this.bucketInstanceId=Et,this._symbolsByKey={};let It=new Map;for(let Vt=0;Vt({x:Math.floor(Ke.anchorX*Wa),y:Math.floor(Ke.anchorY*Wa)})),crossTileIDs:ke.map(Ke=>Ke.crossTileID)};if(De.positions.length>128){let Ke=new e.av(De.positions.length,16,Uint16Array);for(let{x:gr,y:Dr}of De.positions)Ke.add(gr,Dr);Ke.finish(),delete De.positions,De.index=Ke}this._symbolsByKey[Vt]=De}}getScaledCoordinates(I,ht){let{x:Et,y:It,z:Vt}=this.tileID.canonical,{x:ke,y:De,z:Ke}=ht.canonical,gr=Wa/Math.pow(2,Ke-Vt),Dr=(De*e.X+I.anchorY)*gr,Fr=It*e.X*Wa;return{x:Math.floor((ke*e.X+I.anchorX)*gr-Et*e.X*Wa),y:Math.floor(Dr-Fr)}}findMatches(I,ht,Et){let It=this.tileID.canonical.zI)}}class Pe{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Rr{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(I){let ht=Math.round((I-this.lng)/360);if(ht!==0)for(let Et in this.indexes){let It=this.indexes[Et],Vt={};for(let ke in It){let De=It[ke];De.tileID=De.tileID.unwrapTo(De.tileID.wrap+ht),Vt[De.tileID.key]=De}this.indexes[Et]=Vt}this.lng=I}addBucket(I,ht,Et){if(this.indexes[I.overscaledZ]&&this.indexes[I.overscaledZ][I.key]){if(this.indexes[I.overscaledZ][I.key].bucketInstanceId===ht.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(I.overscaledZ,this.indexes[I.overscaledZ][I.key])}for(let Vt=0;VtI.overscaledZ)for(let De in ke){let Ke=ke[De];Ke.tileID.isChildOf(I)&&Ke.findMatches(ht.symbolInstances,I,It)}else{let De=ke[I.scaledTo(Number(Vt)).key];De&&De.findMatches(ht.symbolInstances,I,It)}}for(let Vt=0;Vt{ht[Et]=!0});for(let Et in this.layerIndexes)ht[Et]||delete this.layerIndexes[Et]}}let $r=(qt,I)=>e.t(qt,I&&I.filter(ht=>ht.identifier!=="source.canvas")),Br=e.aw();class Gr extends e.E{constructor(I,ht={}){super(),this._rtlPluginLoaded=()=>{for(let Et in this.sourceCaches){let It=this.sourceCaches[Et].getSource().type;It!=="vector"&&It!=="geojson"||this.sourceCaches[Et].reload()}},this.map=I,this.dispatcher=new rt(dt(),I._getMapId()),this.dispatcher.registerMessageHandler("GG",(Et,It)=>this.getGlyphs(Et,It)),this.dispatcher.registerMessageHandler("GI",(Et,It)=>this.getImages(Et,It)),this.imageManager=new w,this.imageManager.setEventedParent(this),this.glyphManager=new V(I._requestManager,ht.localIdeographFontFamily),this.lineAtlas=new X(256,512),this.crossTileSymbolIndex=new qr,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",e.ay()),ve().on(Lt,this._rtlPluginLoaded),this.on("data",Et=>{if(Et.dataType!=="source"||Et.sourceDataType!=="metadata")return;let It=this.sourceCaches[Et.sourceId];if(!It)return;let Vt=It.getSource();if(Vt&&Vt.vectorLayerIds)for(let ke in this._layers){let De=this._layers[ke];De.source===Vt.id&&this._validateLayer(De)}})}loadURL(I,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),ht.validate=typeof ht.validate!="boolean"||ht.validate;let It=this.map._requestManager.transformRequest(I,"Style");this._loadStyleRequest=new AbortController;let Vt=this._loadStyleRequest;e.h(It,this._loadStyleRequest).then(ke=>{this._loadStyleRequest=null,this._load(ke.data,ht,Et)}).catch(ke=>{this._loadStyleRequest=null,ke&&!Vt.signal.aborted&&this.fire(new e.j(ke))})}loadJSON(I,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ht.validate=ht.validate!==!1,this._load(I,ht,Et)}).catch(()=>{})}loadEmpty(){this.fire(new e.k("dataloading",{dataType:"style"})),this._load(Br,{validate:!1})}_load(I,ht,Et){var It;let Vt=ht.transformStyle?ht.transformStyle(Et,I):I;if(!ht.validate||!$r(this,e.u(Vt))){this._loaded=!0,this.stylesheet=Vt;for(let ke in Vt.sources)this.addSource(ke,Vt.sources[ke],{validate:!1});Vt.sprite?this._loadSprite(Vt.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Vt.glyphs),this._createLayers(),this.light=new U(this.stylesheet.light),this.sky=new q(this.stylesheet.sky),this.map.setTerrain((It=this.stylesheet.terrain)!==null&&It!==void 0?It:null),this.fire(new e.k("data",{dataType:"style"})),this.fire(new e.k("style.load"))}}_createLayers(){let I=e.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",I),this._order=I.map(ht=>ht.id),this._layers={},this._serializedLayers=null;for(let ht of I){let Et=e.aA(ht);Et.setEventedParent(this,{layer:{id:ht.id}}),this._layers[ht.id]=Et}}_loadSprite(I,ht=!1,Et=void 0){let It;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Vt,ke,De,Ke){return e._(this,void 0,void 0,function*(){let gr=A(Vt),Dr=De>1?"@2x":"",Fr={},ln={};for(let{id:Mn,url:Xt}of gr){let ae=ke.transformRequest(h(Xt,Dr,".json"),"SpriteJSON");Fr[Mn]=e.h(ae,Ke);let xe=ke.transformRequest(h(Xt,Dr,".png"),"SpriteImage");ln[Mn]=u.getImage(xe,Ke)}return yield Promise.all([...Object.values(Fr),...Object.values(ln)]),function(Mn,Xt){return e._(this,void 0,void 0,function*(){let ae={};for(let xe in Mn){ae[xe]={};let Ae=o.getImageCanvasContext((yield Xt[xe]).data),je=(yield Mn[xe]).data;for(let Ie in je){let{width:Ze,height:wr,x:Or,y:Nr,sdf:tn,pixelRatio:pn,stretchX:zn,stretchY:Bn,content:ri,textFitWidth:Di,textFitHeight:ha}=je[Ie];ae[xe][Ie]={data:null,pixelRatio:pn,sdf:tn,stretchX:zn,stretchY:Bn,content:ri,textFitWidth:Di,textFitHeight:ha,spriteData:{width:Ze,height:wr,x:Or,y:Nr,context:Ae}}}}return ae})}(Fr,ln)})}(I,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Vt=>{if(this._spriteRequest=null,Vt)for(let ke in Vt){this._spritesImagesIds[ke]=[];let De=this._spritesImagesIds[ke]?this._spritesImagesIds[ke].filter(Ke=>!(Ke in Vt)):[];for(let Ke of De)this.imageManager.removeImage(Ke),this._changedImages[Ke]=!0;for(let Ke in Vt[ke]){let gr=ke==="default"?Ke:`${ke}:${Ke}`;this._spritesImagesIds[ke].push(gr),gr in this.imageManager.images?this.imageManager.updateImage(gr,Vt[ke][Ke],!1):this.imageManager.addImage(gr,Vt[ke][Ke]),ht&&(this._changedImages[gr]=!0)}}}).catch(Vt=>{this._spriteRequest=null,It=Vt,this.fire(new e.j(It))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ht&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"})),Et&&Et(It)})}_unloadSprite(){for(let I of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(I),this._changedImages[I]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}_validateLayer(I){let ht=this.sourceCaches[I.source];if(!ht)return;let Et=I.sourceLayer;if(!Et)return;let It=ht.getSource();(It.type==="geojson"||It.vectorLayerIds&&It.vectorLayerIds.indexOf(Et)===-1)&&this.fire(new e.j(new Error(`Source layer "${Et}" does not exist on source "${It.id}" as specified by style layer "${I.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let I in this.sourceCaches)if(!this.sourceCaches[I].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(I,ht=!1){let Et=this._serializedAllLayers();if(!I||I.length===0)return Object.values(ht?e.aB(Et):Et);let It=[];for(let Vt of I)if(Et[Vt]){let ke=ht?e.aB(Et[Vt]):Et[Vt];It.push(ke)}return It}_serializedAllLayers(){let I=this._serializedLayers;if(I)return I;I=this._serializedLayers={};let ht=Object.keys(this._layers);for(let Et of ht){let It=this._layers[Et];It.type!=="custom"&&(I[Et]=It.serialize())}return I}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let I in this.sourceCaches)if(this.sourceCaches[I].hasTransition())return!0;for(let I in this._layers)if(this._layers[I].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(I){if(!this._loaded)return;let ht=this._changed;if(ht){let It=Object.keys(this._updatedLayers),Vt=Object.keys(this._removedLayers);(It.length||Vt.length)&&this._updateWorkerLayers(It,Vt);for(let ke in this._updatedSources){let De=this._updatedSources[ke];if(De==="reload")this._reloadSource(ke);else{if(De!=="clear")throw new Error(`Invalid action ${De}`);this._clearSource(ke)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ke in this._updatedPaintProps)this._layers[ke].updateTransitions(I);this.light.updateTransitions(I),this.sky.updateTransitions(I),this._resetUpdates()}let Et={};for(let It in this.sourceCaches){let Vt=this.sourceCaches[It];Et[It]=Vt.used,Vt.used=!1}for(let It of this._order){let Vt=this._layers[It];Vt.recalculate(I,this._availableImages),!Vt.isHidden(I.zoom)&&Vt.source&&(this.sourceCaches[Vt.source].used=!0)}for(let It in Et){let Vt=this.sourceCaches[It];!!Et[It]!=!!Vt.used&&Vt.fire(new e.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:It}))}this.light.recalculate(I),this.sky.recalculate(I),this.z=I.zoom,ht&&this.fire(new e.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let I=Object.keys(this._changedImages);if(I.length){for(let ht in this.sourceCaches)this.sourceCaches[ht].reloadTilesForDependencies(["icons","patterns"],I);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let I in this.sourceCaches)this.sourceCaches[I].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(I,ht){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(I,!1),removedIds:ht})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(I,ht={}){var Et;this._checkLoaded();let It=this.serialize();if(I=ht.transformStyle?ht.transformStyle(It,I):I,((Et=ht.validate)===null||Et===void 0||Et)&&$r(this,e.u(I)))return!1;(I=e.aB(I)).layers=e.az(I.layers);let Vt=e.aC(It,I),ke=this._getOperationsToPerform(Vt);if(ke.unimplemented.length>0)throw new Error(`Unimplemented: ${ke.unimplemented.join(", ")}.`);if(ke.operations.length===0)return!1;for(let De of ke.operations)De();return this.stylesheet=I,this._serializedLayers=null,!0}_getOperationsToPerform(I){let ht=[],Et=[];for(let It of I)switch(It.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ht.push(()=>this.addLayer.apply(this,It.args));break;case"removeLayer":ht.push(()=>this.removeLayer.apply(this,It.args));break;case"setPaintProperty":ht.push(()=>this.setPaintProperty.apply(this,It.args));break;case"setLayoutProperty":ht.push(()=>this.setLayoutProperty.apply(this,It.args));break;case"setFilter":ht.push(()=>this.setFilter.apply(this,It.args));break;case"addSource":ht.push(()=>this.addSource.apply(this,It.args));break;case"removeSource":ht.push(()=>this.removeSource.apply(this,It.args));break;case"setLayerZoomRange":ht.push(()=>this.setLayerZoomRange.apply(this,It.args));break;case"setLight":ht.push(()=>this.setLight.apply(this,It.args));break;case"setGeoJSONSourceData":ht.push(()=>this.setGeoJSONSourceData.apply(this,It.args));break;case"setGlyphs":ht.push(()=>this.setGlyphs.apply(this,It.args));break;case"setSprite":ht.push(()=>this.setSprite.apply(this,It.args));break;case"setSky":ht.push(()=>this.setSky.apply(this,It.args));break;case"setTerrain":ht.push(()=>this.map.setTerrain.apply(this,It.args));break;case"setTransition":ht.push(()=>{});break;default:Et.push(It.command)}return{operations:ht,unimplemented:Et}}addImage(I,ht){if(this.getImage(I))return this.fire(new e.j(new Error(`An image named "${I}" already exists.`)));this.imageManager.addImage(I,ht),this._afterImageUpdated(I)}updateImage(I,ht){this.imageManager.updateImage(I,ht)}getImage(I){return this.imageManager.getImage(I)}removeImage(I){if(!this.getImage(I))return this.fire(new e.j(new Error(`An image named "${I}" does not exist.`)));this.imageManager.removeImage(I),this._afterImageUpdated(I)}_afterImageUpdated(I){this._availableImages=this.imageManager.listImages(),this._changedImages[I]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(I,ht,Et={}){if(this._checkLoaded(),this.sourceCaches[I]!==void 0)throw new Error(`Source "${I}" already exists.`);if(!ht.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ht).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ht.type)>=0&&this._validate(e.u.source,`sources.${I}`,ht,null,Et))return;this.map&&this.map._collectResourceTiming&&(ht.collectResourceTiming=!0);let It=this.sourceCaches[I]=new Ge(I,ht,this.dispatcher);It.style=this,It.setEventedParent(this,()=>({isSourceLoaded:It.loaded(),source:It.serialize(),sourceId:I})),It.onAdd(this.map),this._changed=!0}removeSource(I){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error("There is no source with this ID");for(let Et in this._layers)if(this._layers[Et].source===I)return this.fire(new e.j(new Error(`Source "${I}" cannot be removed while layer "${Et}" is using it.`)));let ht=this.sourceCaches[I];delete this.sourceCaches[I],delete this._updatedSources[I],ht.fire(new e.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:I})),ht.setEventedParent(null),ht.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(I,ht){if(this._checkLoaded(),this.sourceCaches[I]===void 0)throw new Error(`There is no source with this ID=${I}`);let Et=this.sourceCaches[I].getSource();if(Et.type!=="geojson")throw new Error(`geojsonSource.type is ${Et.type}, which is !== 'geojson`);Et.setData(ht),this._changed=!0}getSource(I){return this.sourceCaches[I]&&this.sourceCaches[I].getSource()}addLayer(I,ht,Et={}){this._checkLoaded();let It=I.id;if(this.getLayer(It))return void this.fire(new e.j(new Error(`Layer "${It}" already exists on this map.`)));let Vt;if(I.type==="custom"){if($r(this,e.aD(I)))return;Vt=e.aA(I)}else{if("source"in I&&typeof I.source=="object"&&(this.addSource(It,I.source),I=e.aB(I),I=e.e(I,{source:It})),this._validate(e.u.layer,`layers.${It}`,I,{arrayIndex:-1},Et))return;Vt=e.aA(I),this._validateLayer(Vt),Vt.setEventedParent(this,{layer:{id:It}})}let ke=ht?this._order.indexOf(ht):this._order.length;if(ht&&ke===-1)this.fire(new e.j(new Error(`Cannot add layer "${It}" before non-existing layer "${ht}".`)));else{if(this._order.splice(ke,0,It),this._layerOrderChanged=!0,this._layers[It]=Vt,this._removedLayers[It]&&Vt.source&&Vt.type!=="custom"){let De=this._removedLayers[It];delete this._removedLayers[It],De.type!==Vt.type?this._updatedSources[Vt.source]="clear":(this._updatedSources[Vt.source]="reload",this.sourceCaches[Vt.source].pause())}this._updateLayer(Vt),Vt.onAdd&&Vt.onAdd(this.map)}}moveLayer(I,ht){if(this._checkLoaded(),this._changed=!0,!this._layers[I])return void this.fire(new e.j(new Error(`The layer '${I}' does not exist in the map's style and cannot be moved.`)));if(I===ht)return;let Et=this._order.indexOf(I);this._order.splice(Et,1);let It=ht?this._order.indexOf(ht):this._order.length;ht&&It===-1?this.fire(new e.j(new Error(`Cannot move layer "${I}" before non-existing layer "${ht}".`))):(this._order.splice(It,0,I),this._layerOrderChanged=!0)}removeLayer(I){this._checkLoaded();let ht=this._layers[I];if(!ht)return void this.fire(new e.j(new Error(`Cannot remove non-existing layer "${I}".`)));ht.setEventedParent(null);let Et=this._order.indexOf(I);this._order.splice(Et,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[I]=ht,delete this._layers[I],this._serializedLayers&&delete this._serializedLayers[I],delete this._updatedLayers[I],delete this._updatedPaintProps[I],ht.onRemove&&ht.onRemove(this.map)}getLayer(I){return this._layers[I]}getLayersOrder(){return[...this._order]}hasLayer(I){return I in this._layers}setLayerZoomRange(I,ht,Et){this._checkLoaded();let It=this.getLayer(I);It?It.minzoom===ht&&It.maxzoom===Et||(ht!=null&&(It.minzoom=ht),Et!=null&&(It.maxzoom=Et),this._updateLayer(It)):this.fire(new e.j(new Error(`Cannot set the zoom range of non-existing layer "${I}".`)))}setFilter(I,ht,Et={}){this._checkLoaded();let It=this.getLayer(I);if(It){if(!e.aE(It.filter,ht))return ht==null?(It.filter=void 0,void this._updateLayer(It)):void(this._validate(e.u.filter,`layers.${It.id}.filter`,ht,null,Et)||(It.filter=e.aB(ht),this._updateLayer(It)))}else this.fire(new e.j(new Error(`Cannot filter non-existing layer "${I}".`)))}getFilter(I){return e.aB(this.getLayer(I).filter)}setLayoutProperty(I,ht,Et,It={}){this._checkLoaded();let Vt=this.getLayer(I);Vt?e.aE(Vt.getLayoutProperty(ht),Et)||(Vt.setLayoutProperty(ht,Et,It),this._updateLayer(Vt)):this.fire(new e.j(new Error(`Cannot style non-existing layer "${I}".`)))}getLayoutProperty(I,ht){let Et=this.getLayer(I);if(Et)return Et.getLayoutProperty(ht);this.fire(new e.j(new Error(`Cannot get style of non-existing layer "${I}".`)))}setPaintProperty(I,ht,Et,It={}){this._checkLoaded();let Vt=this.getLayer(I);Vt?e.aE(Vt.getPaintProperty(ht),Et)||(Vt.setPaintProperty(ht,Et,It)&&this._updateLayer(Vt),this._changed=!0,this._updatedPaintProps[I]=!0,this._serializedLayers=null):this.fire(new e.j(new Error(`Cannot style non-existing layer "${I}".`)))}getPaintProperty(I,ht){return this.getLayer(I).getPaintProperty(ht)}setFeatureState(I,ht){this._checkLoaded();let Et=I.source,It=I.sourceLayer,Vt=this.sourceCaches[Et];if(Vt===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let ke=Vt.getSource().type;ke==="geojson"&&It?this.fire(new e.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ke!=="vector"||It?(I.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),Vt.setFeatureState(It,I.id,ht)):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(I,ht){this._checkLoaded();let Et=I.source,It=this.sourceCaches[Et];if(It===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let Vt=It.getSource().type,ke=Vt==="vector"?I.sourceLayer:void 0;Vt!=="vector"||ke?ht&&typeof I.id!="string"&&typeof I.id!="number"?this.fire(new e.j(new Error("A feature id is required to remove its specific state property."))):It.removeFeatureState(ke,I.id,ht):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(I){this._checkLoaded();let ht=I.source,Et=I.sourceLayer,It=this.sourceCaches[ht];if(It!==void 0)return It.getSource().type!=="vector"||Et?(I.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),It.getFeatureState(Et,I.id)):void this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.j(new Error(`The source '${ht}' does not exist in the map's style.`)))}getTransition(){return e.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let I=e.aF(this.sourceCaches,Vt=>Vt.serialize()),ht=this._serializeByIds(this._order,!0),Et=this.map.getTerrain()||void 0,It=this.stylesheet;return e.aG({version:It.version,name:It.name,metadata:It.metadata,light:It.light,sky:It.sky,center:It.center,zoom:It.zoom,bearing:It.bearing,pitch:It.pitch,sprite:It.sprite,glyphs:It.glyphs,transition:It.transition,sources:I,layers:ht,terrain:Et},Vt=>Vt!==void 0)}_updateLayer(I){this._updatedLayers[I.id]=!0,I.source&&!this._updatedSources[I.source]&&this.sourceCaches[I.source].getSource().type!=="raster"&&(this._updatedSources[I.source]="reload",this.sourceCaches[I.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(I){let ht=ke=>this._layers[ke].type==="fill-extrusion",Et={},It=[];for(let ke=this._order.length-1;ke>=0;ke--){let De=this._order[ke];if(ht(De)){Et[De]=ke;for(let Ke of I){let gr=Ke[De];if(gr)for(let Dr of gr)It.push(Dr)}}}It.sort((ke,De)=>De.intersectionZ-ke.intersectionZ);let Vt=[];for(let ke=this._order.length-1;ke>=0;ke--){let De=this._order[ke];if(ht(De))for(let Ke=It.length-1;Ke>=0;Ke--){let gr=It[Ke].feature;if(Et[gr.layer.id]{let tn=Ae.featureSortOrder;if(tn){let pn=tn.indexOf(Or.featureIndex);return tn.indexOf(Nr.featureIndex)-pn}return Nr.featureIndex-Or.featureIndex});for(let Or of wr)Ze.push(Or)}}for(let Ae in Xt)Xt[Ae].forEach(je=>{let Ie=je.feature,Ze=gr[De[Ae].source].getFeatureState(Ie.layer["source-layer"],Ie.id);Ie.source=Ie.layer.source,Ie.layer["source-layer"]&&(Ie.sourceLayer=Ie.layer["source-layer"]),Ie.state=Ze});return Xt}(this._layers,ke,this.sourceCaches,I,ht,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Vt)}querySourceFeatures(I,ht){ht&&ht.filter&&this._validate(e.u.filter,"querySourceFeatures.filter",ht.filter,null,ht);let Et=this.sourceCaches[I];return Et?function(It,Vt){let ke=It.getRenderableIds().map(gr=>It.getTileByID(gr)),De=[],Ke={};for(let gr=0;grln.getTileByID(Mn)).sort((Mn,Xt)=>Xt.tileID.overscaledZ-Mn.tileID.overscaledZ||(Mn.tileID.isLessThan(Xt.tileID)?-1:1))}let Fr=this.crossTileSymbolIndex.addLayer(Dr,Ke[Dr.source],I.center.lng);ke=ke||Fr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Vt=Vt||this._layerOrderChanged||Et===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.now(),I.zoom))&&(this.pauseablePlacement=new La(I,this.map.terrain,this._order,Vt,ht,Et,It,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ke),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.now()),De=!0),ke&&this.pauseablePlacement.placement.setStale()),De||ke)for(let gr of this._order){let Dr=this._layers[gr];Dr.type==="symbol"&&this.placement.updateLayerOpacities(Dr,Ke[Dr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(o.now())}_releaseSymbolFadeTiles(){for(let I in this.sourceCaches)this.sourceCaches[I].releaseSymbolFadeTiles()}getImages(I,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.imageManager.getImages(ht.icons);this._updateTilesForChangedImages();let It=this.sourceCaches[ht.source];return It&&It.setDependencies(ht.tileID.key,ht.type,ht.icons),Et})}getGlyphs(I,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.glyphManager.getGlyphs(ht.stacks),It=this.sourceCaches[ht.source];return It&&It.setDependencies(ht.tileID.key,ht.type,[""]),Et})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(I,ht={}){this._checkLoaded(),I&&this._validate(e.u.glyphs,"glyphs",I,null,ht)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=I,this.glyphManager.entries={},this.glyphManager.setURL(I))}addSprite(I,ht,Et={},It){this._checkLoaded();let Vt=[{id:I,url:ht}],ke=[...A(this.stylesheet.sprite),...Vt];this._validate(e.u.sprite,"sprite",ke,null,Et)||(this.stylesheet.sprite=ke,this._loadSprite(Vt,!0,It))}removeSprite(I){this._checkLoaded();let ht=A(this.stylesheet.sprite);if(ht.find(Et=>Et.id===I)){if(this._spritesImagesIds[I])for(let Et of this._spritesImagesIds[I])this.imageManager.removeImage(Et),this._changedImages[Et]=!0;ht.splice(ht.findIndex(Et=>Et.id===I),1),this.stylesheet.sprite=ht.length>0?ht:void 0,delete this._spritesImagesIds[I],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}else this.fire(new e.j(new Error(`Sprite "${I}" doesn't exists on this map.`)))}getSprite(){return A(this.stylesheet.sprite)}setSprite(I,ht={},Et){this._checkLoaded(),I&&this._validate(e.u.sprite,"sprite",I,null,ht)||(this.stylesheet.sprite=I,I?this._loadSprite(I,!0,Et):(this._unloadSprite(),Et&&Et(null)))}}var fn=e.Y([{name:"a_pos",type:"Int16",components:2}]);let an={prelude:Ee(`#ifdef GL_ES +{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}),qW=Dt((Q,Z)=>{Z.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}),G1=Dt((Q,Z)=>{var c=G0(),g=WW(),I=qW(),S='© OpenStreetMap contributors',t="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:r,streets:r,outdoors:r,light:t,dark:e,satellite:I,"satellite-streets":g,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":t,"carto-darkmatter":e,"carto-voyager":r,"carto-positron-nolabels":a,"carto-darkmatter-nolabels":n,"carto-voyager-nolabels":o},l=c(i);Z.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",l.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error."}}),I3=Dt((Q,Z)=>{var c=kn(),g=hi().defaultLine,I=jh().attributes,S=da(),t=ef().textposition,e=Yc().overrideAll,r=mu().templatedArray,a=G1(),n=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});n.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var o=Z.exports=e({_arrayAttrRegexps:[c.counterRegex("map",".layers",!0)],domain:I({name:"map"}),style:{valType:"any",values:a.styleValuesMap,dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:r("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:g},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:g}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:n,textposition:c.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}),kT=Dt((Q,Z)=>{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=I0(),t=vx(),e=ef(),r=I3(),a=Ho(),n=kc(),o=Ia().extendFlat,i=Yc().overrideAll,l=I3(),f=t.line,x=t.marker;Z.exports=i({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:o({},l.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:o({},x.opacity,{dflt:1})},mode:o({},e.mode,{dflt:"markers"}),text:o({},e.text,{}),texttemplate:g({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:o({},e.hovertext,{}),line:{color:f.color,width:f.width},connectgaps:e.connectgaps,marker:o({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:x.opacity,size:x.size,sizeref:x.sizeref,sizemin:x.sizemin,sizemode:x.sizemode},n("marker")),fill:t.fill,fillcolor:S(),textfont:r.layers.symbol.textfont,textposition:r.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:o({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:c(),hovertemplatefallback:I()},"calc","nested")}),EE=Dt((Q,Z)=>{var c=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];Z.exports={isSupportedFont:function(g){return c.indexOf(g)!==-1}}}),$W=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=x0(),e=O0(),r=kT(),a=EE().isSupportedFont;Z.exports=function(o,i,l,f){function x(p,k){return c.coerce(o,i,r,p,k)}function y(p,k){return c.coerce2(o,i,r,p,k)}var v=n(o,i,x);if(!v){i.visible=!1;return}if(x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback"),x("mode"),x("below"),g.hasMarkers(i)){I(o,i,l,f,x,{noLine:!0,noAngle:!0}),x("marker.allowoverlap"),x("marker.angle");var T=i.marker;T.symbol!=="circle"&&(c.isArrayOrTypedArray(T.size)&&(T.size=T.size[0]),c.isArrayOrTypedArray(T.color)&&(T.color=T.color[0]))}g.hasLines(i)&&(S(o,i,l,f,x,{noDash:!0}),x("connectgaps"));var u=y("cluster.maxzoom"),b=y("cluster.step"),_=y("cluster.color",i.marker&&i.marker.color||l),P=y("cluster.size"),M=y("cluster.opacity"),C=u!==!1||b!==!1||_!==!1||P!==!1||M!==!1,A=x("cluster.enabled",C);if(A||g.hasText(i)){var h=f.font.family;t(o,i,f,x,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}x("fill"),i.fill!=="none"&&e(o,i,l,x),c.coerceSelectionMarkerOpacity(i,x)};function n(o,i,l){var f=l("lon")||[],x=l("lat")||[],y=Math.min(f.length,x.length);return i._length=y,y}}),CE=Dt((Q,Z)=>{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot,r=e.mockAxis,a=g.lonlat;return t.lonLabel=c.tickText(r,r.c2l(a[0]),!0).text,t.latLabel=c.tickText(r,r.c2l(a[1]),!0).text,t}}),LE=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I){var S=g.split(" "),t=S[0],e=S[1],r=c.isArrayOrTypedArray(I)?c.mean(I):I,a=.5+r/100,n=1.5+r/100,o=["",""],i=[0,0];switch(t){case"top":o[0]="top",i[1]=-n;break;case"bottom":o[0]="bottom",i[1]=n;break}switch(e){case"left":o[1]="right",i[0]=-a;break;case"right":o[1]="left",i[0]=a;break}var l;return o[0]&&o[1]?l=o.join("-"):o[0]?l=o[0]:o[1]?l=o[1]:l="center",{anchor:l,offset:i}}}),ZW=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Ca().BADNUM,S=H1(),t=Xc(),e=Vs(),r=bg(),a=Tc(),n=EE().isSupportedFont,o=LE(),i=Fp().appendArrayPointValue,l=ec().NEWLINES,f=ec().BR_TAG_ALL;Z.exports=function(M,C){var A=C[0].trace,h=A.visible===!0&&A._length!==0,p=A.fill!=="none",k=a.hasLines(A),w=a.hasMarkers(A),R=a.hasText(A),O=w&&A.marker.symbol==="circle",j=w&&A.marker.symbol!=="circle",V=A.cluster&&A.cluster.enabled,H=x("fill"),F=x("line"),U=x("circle"),W=x("symbol"),q={fill:H,line:F,circle:U,symbol:W};if(!h)return q;var J;if((p||k)&&(J=S.calcTraceToLineCoords(C)),p&&(H.geojson=S.makePolygon(J),H.layout.visibility="visible",g.extendFlat(H.paint,{"fill-color":A.fillcolor})),k&&(F.geojson=S.makeLine(J),F.layout.visibility="visible",g.extendFlat(F.paint,{"line-width":A.line.width,"line-color":A.line.color,"line-opacity":A.opacity})),O){var lt=y(C);U.geojson=lt.geojson,U.layout.visibility="visible",V&&(U.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(A.cluster.color,A.cluster.step),"circle-radius":_(A.cluster.size,A.cluster.step),"circle-opacity":_(A.cluster.opacity,A.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":P(A),"text-size":12}}),g.extendFlat(U.paint,{"circle-color":lt.mcc,"circle-radius":lt.mrc,"circle-opacity":lt.mo})}if(O&&V&&(U.filter=["!",["has","point_count"]]),(j||R)&&(W.geojson=v(C,M),g.extendFlat(W.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),j&&(g.extendFlat(W.layout,{"icon-size":A.marker.size/10}),"angle"in A.marker&&A.marker.angle!=="auto"&&g.extendFlat(W.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),W.layout["icon-allow-overlap"]=A.marker.allowoverlap,g.extendFlat(W.paint,{"icon-opacity":A.opacity*A.marker.opacity,"icon-color":A.marker.color})),R)){var yt=(A.marker||{}).size,mt=o(A.textposition,yt);g.extendFlat(W.layout,{"text-size":A.textfont.size,"text-anchor":mt.anchor,"text-offset":mt.offset,"text-font":P(A)}),g.extendFlat(W.paint,{"text-color":A.textfont.color,"text-opacity":A.opacity})}return q};function x(M){return{type:M,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(M){var C=M[0].trace,A=C.marker,h=C.selectedpoints,p=g.isArrayOrTypedArray(A.color),k=g.isArrayOrTypedArray(A.size),w=g.isArrayOrTypedArray(A.opacity),R;function O(mt){return C.opacity*mt}function j(mt){return mt/2}var V;p&&(t.hasColorscale(C,"marker")?V=t.makeColorScaleFuncFromTrace(A):V=g.identity);var H;k&&(H=r(C));var F;w&&(F=function(mt){var st=c(mt)?+g.constrain(mt,0,1):0;return O(st)});var U=[];for(R=0;R850?R+=" Black":p>750?R+=" Extra Bold":p>650?R+=" Bold":p>550?R+=" Semi Bold":p>450?R+=" Medium":p>350?R+=" Regular":p>250?R+=" Light":p>150?R+=" Extra Light":R+=" Thin"):k.slice(0,2).join(" ")==="Open Sans"?(R="Open Sans",p>750?R+=" Extrabold":p>650?R+=" Bold":p>550?R+=" Semibold":p>350?R+=" Regular":R+=" Light"):k.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(R="Klokantech Noto Sans",k[3]==="CJK"&&(R+=" CJK"),R+=p>500?" Bold":" Regular")),w&&(R+=" Italic"),R==="Open Sans Regular Italic"?R="Open Sans Italic":R==="Open Sans Regular Bold"?R="Open Sans Bold":R==="Open Sans Regular Bold Italic"?R="Open Sans Bold Italic":R==="Klokantech Noto Sans Regular Italic"&&(R="Klokantech Noto Sans Italic"),n(R)||(R=A);var O=R.split(", ");return O}}),GW=Dt((Q,Z)=>{var c=kn(),g=ZW(),I=G1().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(r,a,n,o){this.type="scattermap",this.subplot=r,this.uid=a,this.clusterEnabled=n,this.isHidden=o,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:I+a+"-fill",line:I+a+"-line",circle:I+a+"-circle",symbol:I+a+"-symbol",cluster:I+a+"-cluster",clusterCount:I+a+"-cluster-count"},this.below=null}var e=t.prototype;e.addSource=function(r,a,n){var o={type:"geojson",data:a.geojson};n&&n.enabled&&c.extendFlat(o,{cluster:!0,clusterMaxZoom:n.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[r]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[r],o)},e.setSourceData=function(r,a){this.subplot.map.getSource(this.sourceIds[r]).setData(a.geojson)},e.addLayer=function(r,a,n){var o={type:a.type,id:this.layerIds[r],source:this.sourceIds[r],layout:a.layout,paint:a.paint};a.filter&&(o.filter=a.filter);for(var i=this.layerIds[r],l,f=this.subplot.getMapLayers(),x=0;x=0;k--){var w=p[k];o.removeLayer(y.layerIds[w])}h||o.removeSource(y.sourceIds.circle)}function u(h){for(var p=S.nonCluster,k=0;k=0;k--){var w=p[k];o.removeLayer(y.layerIds[w]),h||o.removeSource(y.sourceIds[w])}}function _(h){x?T(h):b(h)}function P(h){f?v(h):u(h)}function M(){for(var h=f?S.cluster:S.nonCluster,p=0;p=0;n--){var o=a[n];r.removeLayer(this.layerIds[o]),r.removeSource(this.sourceIds[o])}},Z.exports=function(r,a){var n=a[0].trace,o=n.cluster&&n.cluster.enabled,i=n.visible!==!0,l=new t(r,n.uid,o,i),f=g(r.gd,a),x=l.below=r.belowLookup["trace-"+n.uid],y,v,T;if(o)for(l.addSource("circle",f.circle,n.cluster),y=0;y{var c=tf(),g=kn(),I=Fu(),S=g.fillText,t=Ca().BADNUM,e=G1().traceLayerPrefix;function r(n,o,i){var l=n.cd,f=l[0].trace,x=n.xa,y=n.ya,v=n.subplot,T=[],u=e+f.uid+"-circle",b=f.cluster&&f.cluster.enabled;if(b){var _=v.map.queryRenderedFeatures(null,{layers:[u]});T=_.map(function(H){return H.id})}var P=o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360),M=P*360,C=o-M;function A(H){var F=H.lonlat;if(F[0]===t||b&&T.indexOf(H.i+1)===-1)return 1/0;var U=g.modHalf(F[0],360),W=F[1],q=v.project([U,W]),J=q.x-x.c2p([C,W]),lt=q.y-y.c2p([U,i]),yt=Math.max(3,H.mrc||0);return Math.max(Math.sqrt(J*J+lt*lt)-yt,1-3/yt)}if(c.getClosest(l,A,n),n.index!==!1){var h=l[n.index],p=h.lonlat,k=[g.modHalf(p[0],360)+M,p[1]],w=x.c2p(k),R=y.c2p(k),O=h.mrc||1;n.x0=w-O,n.x1=w+O,n.y0=R-O,n.y1=R+O;var j={};j[f.subplot]={_subplot:v};var V=f._module.formatLabels(h,f,j);return n.lonLabel=V.lonLabel,n.latLabel=V.latLabel,n.color=I(f,h),n.extraText=a(f,h,l[0].t.labels),n.hovertemplate=f.hovertemplate,[n]}}function a(n,o,i){if(n.hovertemplate)return;var l=o.hi||n.hoverinfo,f=l.split("+"),x=f.indexOf("all")!==-1,y=f.indexOf("lon")!==-1,v=f.indexOf("lat")!==-1,T=o.lonlat,u=[];function b(_){return _+"°"}return x||y&&v?u.push("("+b(T[1])+", "+b(T[0])+")"):y?u.push(i.lon+b(T[0])):v&&u.push(i.lat+b(T[1])),(x||f.indexOf("text")!==-1)&&S(o,n,u),u.join("
")}Z.exports={hoverPoints:r,getExtraText:a}}),YW=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c}}),KW=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=Ca().BADNUM;Z.exports=function(S,t){var e=S.cd,r=S.xaxis,a=S.yaxis,n=[],o=e[0].trace,i;if(!g.hasMarkers(o))return[];if(t===!1)for(i=0;i{(function(c,g){typeof Q=="object"&&typeof Z<"u"?Z.exports=g():(c=typeof globalThis<"u"?globalThis:c||self,c.maplibregl=g())})(Q,function(){var c={},g={};function I(t,e,r){if(g[t]=r,t==="index"){var a="var sharedModule = {}; ("+g.shared+")(sharedModule); ("+g.worker+")(sharedModule);",n={};return g.shared(n),g.index(c,n),typeof window<"u"&&c.setWorkerUrl(window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))),c}}I("shared",["exports"],function(t){function e(G,D,nt,bt){return new(nt||(nt=Promise))(function(Rt,Kt){function Qt(rr){try{Be(bt.next(rr))}catch(xr){Kt(xr)}}function be(rr){try{Be(bt.throw(rr))}catch(xr){Kt(xr)}}function Be(rr){var xr;rr.done?Rt(rr.value):(xr=rr.value,xr instanceof nt?xr:new nt(function(Lr){Lr(xr)})).then(Qt,be)}Be((bt=bt.apply(G,D||[])).next())})}function r(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}typeof SuppressedError=="function"&&SuppressedError;var a=n;function n(G,D){this.x=G,this.y=D}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(G){return this.clone()._add(G)},sub:function(G){return this.clone()._sub(G)},multByPoint:function(G){return this.clone()._multByPoint(G)},divByPoint:function(G){return this.clone()._divByPoint(G)},mult:function(G){return this.clone()._mult(G)},div:function(G){return this.clone()._div(G)},rotate:function(G){return this.clone()._rotate(G)},rotateAround:function(G,D){return this.clone()._rotateAround(G,D)},matMult:function(G){return this.clone()._matMult(G)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(G){return this.x===G.x&&this.y===G.y},dist:function(G){return Math.sqrt(this.distSqr(G))},distSqr:function(G){var D=G.x-this.x,nt=G.y-this.y;return D*D+nt*nt},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(G){return Math.atan2(this.y-G.y,this.x-G.x)},angleWith:function(G){return this.angleWithSep(G.x,G.y)},angleWithSep:function(G,D){return Math.atan2(this.x*D-this.y*G,this.x*G+this.y*D)},_matMult:function(G){var D=G[2]*this.x+G[3]*this.y;return this.x=G[0]*this.x+G[1]*this.y,this.y=D,this},_add:function(G){return this.x+=G.x,this.y+=G.y,this},_sub:function(G){return this.x-=G.x,this.y-=G.y,this},_mult:function(G){return this.x*=G,this.y*=G,this},_div:function(G){return this.x/=G,this.y/=G,this},_multByPoint:function(G){return this.x*=G.x,this.y*=G.y,this},_divByPoint:function(G){return this.x/=G.x,this.y/=G.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var G=this.y;return this.y=this.x,this.x=-G,this},_rotate:function(G){var D=Math.cos(G),nt=Math.sin(G),bt=nt*this.x+D*this.y;return this.x=D*this.x-nt*this.y,this.y=bt,this},_rotateAround:function(G,D){var nt=Math.cos(G),bt=Math.sin(G),Rt=D.y+bt*(this.x-D.x)+nt*(this.y-D.y);return this.x=D.x+nt*(this.x-D.x)-bt*(this.y-D.y),this.y=Rt,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(G){return G instanceof n?G:Array.isArray(G)?new n(G[0],G[1]):G};var o=r(a),i=l;function l(G,D,nt,bt){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(bt-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=bt}l.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,bt=0;bt<8;bt++){var Rt=this.sampleCurveX(nt)-G;if(Math.abs(Rt)Rt?Qt=nt:be=nt,nt=.5*(be-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var f=r(i);let x,y;function v(){return x==null&&(x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),x}function T(){if(y==null&&(y=!1,v())){let G=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(G){for(let nt=0;nt<25;nt++){let bt=4*nt;G.fillStyle=`rgb(${bt},${bt+1},${bt+2})`,G.fillRect(nt%5,Math.floor(nt/5),1,1)}let D=G.getImageData(0,0,5,5).data;for(let nt=0;nt<100;nt++)if(nt%4!=3&&D[nt]!==nt){y=!0;break}}}return y||!1}function u(G,D,nt,bt){let Rt=new f(G,D,nt,bt);return Kt=>Rt.solve(Kt)}let b=u(.25,.1,.25,1);function _(G,D,nt){return Math.min(nt,Math.max(D,G))}function P(G,D,nt){let bt=nt-D,Rt=((G-D)%bt+bt)%bt+D;return Rt===D?nt:Rt}function M(G,...D){for(let nt of D)for(let bt in nt)G[bt]=nt[bt];return G}let C=1;function A(G,D,nt){let bt={};for(let Rt in G)bt[Rt]=D.call(this,G[Rt],Rt,G);return bt}function h(G,D,nt){let bt={};for(let Rt in G)D.call(this,G[Rt],Rt,G)&&(bt[Rt]=G[Rt]);return bt}function p(G){return Array.isArray(G)?G.map(p):typeof G=="object"&&G?A(G,p):G}let k={};function w(G){k[G]||(typeof console<"u"&&console.warn(G),k[G]=!0)}function R(G,D,nt){return(nt.y-G.y)*(D.x-G.x)>(D.y-G.y)*(nt.x-G.x)}function O(G){return typeof WorkerGlobalScope<"u"&&G!==void 0&&G instanceof WorkerGlobalScope}let j=null;function V(G){return typeof ImageBitmap<"u"&&G instanceof ImageBitmap}let H="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function F(G,D,nt,bt,Rt){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let Kt=new VideoFrame(G,{timestamp:0});try{let Qt=Kt?.format;if(!Qt||!Qt.startsWith("BGR")&&!Qt.startsWith("RGB"))throw new Error(`Unrecognized format ${Qt}`);let be=Qt.startsWith("BGR"),Be=new Uint8ClampedArray(bt*Rt*4);if(yield Kt.copyTo(Be,function(rr,xr,Lr,Zr,ln){let bn=4*Math.max(-xr,0),Ln=(Math.max(0,Lr)-Lr)*Zr*4+bn,Gn=4*Zr,Mi=Math.max(0,xr),Aa=Math.max(0,Lr);return{rect:{x:Mi,y:Aa,width:Math.min(rr.width,xr+Zr)-Mi,height:Math.min(rr.height,Lr+ln)-Aa},layout:[{offset:Ln,stride:Gn}]}}(G,D,nt,bt,Rt)),be)for(let rr=0;rrO(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,dt=function(G,D){if(/:\/\//.test(G.url)&&!/^https?:|^file:/.test(G.url)){let bt=yt(G.url);if(bt)return bt(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,targetMapId:mt},D)}if(!(/^file:/.test(nt=G.url)||/^file:/.test(tt())&&!/^\w+:/.test(nt))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(bt,Rt){return e(this,void 0,void 0,function*(){let Kt=new Request(bt.url,{method:bt.method||"GET",body:bt.body,credentials:bt.credentials,headers:bt.headers,cache:bt.cache,referrer:tt(),signal:Rt.signal});bt.type!=="json"||Kt.headers.has("Accept")||Kt.headers.set("Accept","application/json");let Qt=yield fetch(Kt);if(!Qt.ok){let rr=yield Qt.blob();throw new st(Qt.status,Qt.statusText,bt.url,rr)}let be;be=bt.type==="arrayBuffer"||bt.type==="image"?Qt.arrayBuffer():bt.type==="json"?Qt.json():Qt.text();let Be=yield be;if(Rt.signal.aborted)throw J();return{data:Be,cacheControl:Qt.headers.get("Cache-Control"),expires:Qt.headers.get("Expires")}})}(G,D);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,mustQueue:!0,targetMapId:mt},D)}var nt;return function(bt,Rt){return new Promise((Kt,Qt)=>{var be;let Be=new XMLHttpRequest;Be.open(bt.method||"GET",bt.url,!0),bt.type!=="arrayBuffer"&&bt.type!=="image"||(Be.responseType="arraybuffer");for(let rr in bt.headers)Be.setRequestHeader(rr,bt.headers[rr]);bt.type==="json"&&(Be.responseType="text",!((be=bt.headers)===null||be===void 0)&&be.Accept||Be.setRequestHeader("Accept","application/json")),Be.withCredentials=bt.credentials==="include",Be.onerror=()=>{Qt(new Error(Be.statusText))},Be.onload=()=>{if(!Rt.signal.aborted)if((Be.status>=200&&Be.status<300||Be.status===0)&&Be.response!==null){let rr=Be.response;if(bt.type==="json")try{rr=JSON.parse(Be.response)}catch(xr){return void Qt(xr)}Kt({data:rr,cacheControl:Be.getResponseHeader("Cache-Control"),expires:Be.getResponseHeader("Expires")})}else{let rr=new Blob([Be.response],{type:Be.getResponseHeader("Content-Type")});Qt(new st(Be.status,Be.statusText,bt.url,rr))}},Rt.signal.addEventListener("abort",()=>{Be.abort(),Qt(J())}),Be.send(bt.body)})}(G,D)};function rt(G){if(!G||G.indexOf("://")<=0||G.indexOf("data:image/")===0||G.indexOf("blob:")===0)return!0;let D=new URL(G),nt=window.location;return D.protocol===nt.protocol&&D.host===nt.host}function at(G,D,nt){nt[G]&&nt[G].indexOf(D)!==-1||(nt[G]=nt[G]||[],nt[G].push(D))}function vt(G,D,nt){if(nt&&nt[G]){let bt=nt[G].indexOf(D);bt!==-1&&nt[G].splice(bt,1)}}class it{constructor(D,nt={}){M(this,nt),this.type=D}}class Y extends it{constructor(D,nt={}){super("error",M({error:D},nt))}}class ft{on(D,nt){return this._listeners=this._listeners||{},at(D,nt,this._listeners),this}off(D,nt){return vt(D,nt,this._listeners),vt(D,nt,this._oneTimeListeners),this}once(D,nt){return nt?(this._oneTimeListeners=this._oneTimeListeners||{},at(D,nt,this._oneTimeListeners),this):new Promise(bt=>this.once(D,bt))}fire(D,nt){typeof D=="string"&&(D=new it(D,nt||{}));let bt=D.type;if(this.listens(bt)){D.target=this;let Rt=this._listeners&&this._listeners[bt]?this._listeners[bt].slice():[];for(let be of Rt)be.call(this,D);let Kt=this._oneTimeListeners&&this._oneTimeListeners[bt]?this._oneTimeListeners[bt].slice():[];for(let be of Kt)vt(bt,be,this._oneTimeListeners),be.call(this,D);let Qt=this._eventedParent;Qt&&(M(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Qt.fire(D))}else D instanceof Y&&console.error(D.error);return this}listens(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)}setEventedParent(D,nt){return this._eventedParent=D,this._eventedParentData=nt,this}}var ut={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let kt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function It(G,D){let nt={};for(let bt in G)bt!=="ref"&&(nt[bt]=G[bt]);return kt.forEach(bt=>{bt in D&&(nt[bt]=D[bt])}),nt}function Pt(G,D){if(Array.isArray(G)){if(!Array.isArray(D)||G.length!==D.length)return!1;for(let nt=0;nt`:G.itemType.kind==="value"?"array":`array<${D}>`}return G.kind}let Ct=[oe,Te,He,Ge,cr,br,ur,Gt(jr),Xr,nn,Le];function gt(G,D){if(D.kind==="error")return null;if(G.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!gt(G.itemType,D.itemType))&&(typeof G.N!="number"||G.N===D.N))return null}else{if(G.kind===D.kind)return null;if(G.kind==="value"){for(let nt of Ct)if(!gt(nt,D))return null}}return`Expected ${ne(G)} but found ${ne(D)} instead.`}function St(G,D){return D.some(nt=>nt.kind===G.kind)}function Nt(G,D){return D.some(nt=>nt==="null"?G===null:nt==="array"?Array.isArray(G):nt==="object"?G&&!Array.isArray(G)&&typeof G=="object":nt===typeof G)}function re(G,D){return G.kind==="array"&&D.kind==="array"?G.itemType.kind===D.itemType.kind&&typeof G.N=="number":G.kind===D.kind}let le=.96422,we=.82521,Ue=4/29,qe=6/29,or=3*qe*qe,Sr=qe*qe*qe,Ar=Math.PI/180,mr=180/Math.PI;function Qr(G){return(G%=360)<0&&(G+=360),G}function Hn([G,D,nt,bt]){let Rt,Kt,Qt=Xn((.2225045*(G=Wn(G))+.7168786*(D=Wn(D))+.0606169*(nt=Wn(nt)))/1);G===D&&D===nt?Rt=Kt=Qt:(Rt=Xn((.4360747*G+.3850649*D+.1430804*nt)/le),Kt=Xn((.0139322*G+.0971045*D+.7141733*nt)/we));let be=116*Qt-16;return[be<0?0:be,500*(Rt-Qt),200*(Qt-Kt),bt]}function Wn(G){return G<=.04045?G/12.92:Math.pow((G+.055)/1.055,2.4)}function Xn(G){return G>Sr?Math.pow(G,1/3):G/or+Ue}function Ii([G,D,nt,bt]){let Rt=(G+16)/116,Kt=isNaN(D)?Rt:Rt+D/500,Qt=isNaN(nt)?Rt:Rt-nt/200;return Rt=1*$n(Rt),Kt=le*$n(Kt),Qt=we*$n(Qt),[oi(3.1338561*Kt-1.6168667*Rt-.4906146*Qt),oi(-.9787684*Kt+1.9161415*Rt+.033454*Qt),oi(.0719453*Kt-.2289914*Rt+1.4052427*Qt),bt]}function oi(G){return(G=G<=.00304?12.92*G:1.055*Math.pow(G,1/2.4)-.055)<0?0:G>1?1:G}function $n(G){return G>qe?G*G*G:or*(G-Ue)}function sa(G){return parseInt(G.padEnd(2,G),16)/255}function Zi(G,D){return We(D?G/100:G,0,1)}function We(G,D,nt){return Math.min(Math.max(D,G),nt)}function nr(G){return!G.some(Number.isNaN)}let fr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class _r{constructor(D,nt,bt,Rt=1,Kt=!0){this.r=D,this.g=nt,this.b=bt,this.a=Rt,Kt||(this.r*=Rt,this.g*=Rt,this.b*=Rt,Rt||this.overwriteGetter("rgb",[D,nt,bt,Rt]))}static parse(D){if(D instanceof _r)return D;if(typeof D!="string")return;let nt=function(bt){if((bt=bt.toLowerCase().trim())==="transparent")return[0,0,0,0];let Rt=fr[bt];if(Rt){let[Qt,be,Be]=Rt;return[Qt/255,be/255,Be/255,1]}if(bt.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(bt)){let Qt=bt.length<6?1:2,be=1;return[sa(bt.slice(be,be+=Qt)),sa(bt.slice(be,be+=Qt)),sa(bt.slice(be,be+=Qt)),sa(bt.slice(be,be+Qt)||"ff")]}if(bt.startsWith("rgb")){let Qt=bt.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Qt){let[be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa]=Qt,ra=[xr||" ",ln||" ",Gn].join("");if(ra===" "||ra===" /"||ra===",,"||ra===",,,"){let ga=[rr,Zr,Ln].join(""),Ya=ga==="%%%"?100:ga===""?255:0;if(Ya){let Ao=[We(+Be/Ya,0,1),We(+Lr/Ya,0,1),We(+bn/Ya,0,1),Mi?Zi(+Mi,Aa):1];if(nr(Ao))return Ao}}return}}let Kt=bt.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Kt){let[Qt,be,Be,rr,xr,Lr,Zr,ln,bn]=Kt,Ln=[Be||" ",xr||" ",Zr].join("");if(Ln===" "||Ln===" /"||Ln===",,"||Ln===",,,"){let Gn=[+be,We(+rr,0,100),We(+Lr,0,100),ln?Zi(+ln,bn):1];if(nr(Gn))return function([Mi,Aa,ra,ga]){function Ya(Ao){let Ss=(Ao+Mi/30)%12,Sl=Aa*Math.min(ra,1-ra);return ra-Sl*Math.max(-1,Math.min(Ss-3,9-Ss,1))}return Mi=Qr(Mi),Aa/=100,ra/=100,[Ya(0),Ya(8),Ya(4),ga]}(Gn)}}}(D);return nt?new _r(...nt,!1):void 0}get rgb(){let{r:D,g:nt,b:bt,a:Rt}=this,Kt=Rt||1/0;return this.overwriteGetter("rgb",[D/Kt,nt/Kt,bt/Kt,Rt])}get hcl(){return this.overwriteGetter("hcl",function(D){let[nt,bt,Rt,Kt]=Hn(D),Qt=Math.sqrt(bt*bt+Rt*Rt);return[Math.round(1e4*Qt)?Qr(Math.atan2(Rt,bt)*mr):NaN,Qt,nt,Kt]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Hn(this.rgb))}overwriteGetter(D,nt){return Object.defineProperty(this,D,{value:nt}),nt}toString(){let[D,nt,bt,Rt]=this.rgb;return`rgba(${[D,nt,bt].map(Kt=>Math.round(255*Kt)).join(",")},${Rt})`}}_r.black=new _r(0,0,0,1),_r.white=new _r(1,1,1,1),_r.transparent=new _r(0,0,0,0),_r.red=new _r(1,0,0,1);class tn{constructor(D,nt,bt){this.sensitivity=D?nt?"variant":"case":nt?"accent":"base",this.locale=bt,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(D,nt){return this.collator.compare(D,nt)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Cn{constructor(D,nt,bt,Rt,Kt){this.text=D,this.image=nt,this.scale=bt,this.fontStack=Rt,this.textColor=Kt}}class Tn{constructor(D){this.sections=D}static fromString(D){return new Tn([new Cn(D,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(D=>D.text.length!==0||D.image&&D.image.name.length!==0)}static factory(D){return D instanceof Tn?D:Tn.fromString(D)}toString(){return this.sections.length===0?"":this.sections.map(D=>D.text).join("")}}class Mn{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof Mn)return D;if(typeof D=="number")return new Mn([D,D,D,D]);if(Array.isArray(D)&&!(D.length<1||D.length>4)){for(let nt of D)if(typeof nt!="number")return;switch(D.length){case 1:D=[D[0],D[0],D[0],D[0]];break;case 2:D=[D[0],D[1],D[0],D[1]];break;case 3:D=[D[0],D[1],D[2],D[1]]}return new Mn(D)}}toString(){return JSON.stringify(this.values)}}let fi=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class ki{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof ki)return D;if(Array.isArray(D)&&!(D.length<1)&&D.length%2==0){for(let nt=0;nt=0&&G<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof nt=="number"&&nt>=0&&nt<=255?bt===void 0||typeof bt=="number"&&bt>=0&&bt<=1?null:`Invalid rgba value [${[G,D,nt,bt].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof bt=="number"?[G,D,nt,bt]:[G,D,nt]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Xi(G){if(G===null||typeof G=="string"||typeof G=="boolean"||typeof G=="number"||G instanceof _r||G instanceof tn||G instanceof Tn||G instanceof Mn||G instanceof ki||G instanceof Oi)return!0;if(Array.isArray(G)){for(let D of G)if(!Xi(D))return!1;return!0}if(typeof G=="object"){for(let D in G)if(!Xi(G[D]))return!1;return!0}return!1}function ci(G){if(G===null)return oe;if(typeof G=="string")return He;if(typeof G=="boolean")return Ge;if(typeof G=="number")return Te;if(G instanceof _r)return cr;if(G instanceof tn)return Wr;if(G instanceof Tn)return br;if(G instanceof Mn)return Xr;if(G instanceof ki)return Le;if(G instanceof Oi)return nn;if(Array.isArray(G)){let D=G.length,nt;for(let bt of G){let Rt=ci(bt);if(nt){if(nt===Rt)continue;nt=jr;break}nt=Rt}return Gt(nt||jr,D)}return ur}function za(G){let D=typeof G;return G===null?"":D==="string"||D==="number"||D==="boolean"?String(G):G instanceof _r||G instanceof Tn||G instanceof Mn||G instanceof ki||G instanceof Oi?G.toString():JSON.stringify(G)}class Wa{constructor(D,nt){this.type=D,this.value=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'literal' expression requires exactly one argument, but found ${D.length-1} instead.`);if(!Xi(D[1]))return nt.error("invalid value");let bt=D[1],Rt=ci(bt),Kt=nt.expectedType;return Rt.kind!=="array"||Rt.N!==0||!Kt||Kt.kind!=="array"||typeof Kt.N=="number"&&Kt.N!==0||(Rt=Kt),new Wa(Rt,bt)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ze{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let Ie={string:He,number:Te,boolean:Ge,object:ur};class Rr{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let bt,Rt=1,Kt=D[0];if(Kt==="array"){let be,Be;if(D.length>2){let rr=D[1];if(typeof rr!="string"||!(rr in Ie)||rr==="object")return nt.error('The item type argument of "array" must be one of string, number, boolean',1);be=Ie[rr],Rt++}else be=jr;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return nt.error('The length argument to "array" must be a positive integer literal',2);Be=D[2],Rt++}bt=Gt(be,Be)}else{if(!Ie[Kt])throw new Error(`Types doesn't contain name = ${Kt}`);bt=Ie[Kt]}let Qt=[];for(;RtD.outputDefined())}}let $r={"to-boolean":Ge,"to-color":cr,"to-number":Te,"to-string":He};class Gr{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let bt=D[0];if(!$r[bt])throw new Error(`Can't parse ${bt} as it is not part of the known types`);if((bt==="to-boolean"||bt==="to-string")&&D.length!==2)return nt.error("Expected one argument.");let Rt=$r[bt],Kt=[];for(let Qt=1;Qt4?`Invalid rbga value ${JSON.stringify(nt)}: expected an array containing either three or four numeric values.`:ji(nt[0],nt[1],nt[2],nt[3]),!bt))return new _r(nt[0]/255,nt[1]/255,nt[2]/255,nt[3])}throw new ze(bt||`Could not parse color from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"padding":{let nt;for(let bt of this.args){nt=bt.evaluate(D);let Rt=Mn.parse(nt);if(Rt)return Rt}throw new ze(`Could not parse padding from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"variableAnchorOffsetCollection":{let nt;for(let bt of this.args){nt=bt.evaluate(D);let Rt=ki.parse(nt);if(Rt)return Rt}throw new ze(`Could not parse variableAnchorOffsetCollection from value '${typeof nt=="string"?nt:JSON.stringify(nt)}'`)}case"number":{let nt=null;for(let bt of this.args){if(nt=bt.evaluate(D),nt===null)return 0;let Rt=Number(nt);if(!isNaN(Rt))return Rt}throw new ze(`Could not convert ${JSON.stringify(nt)} to number.`)}case"formatted":return Tn.fromString(za(this.args[0].evaluate(D)));case"resolvedImage":return Oi.fromString(za(this.args[0].evaluate(D)));default:return za(this.args[0].evaluate(D))}}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let Br=["Unknown","Point","LineString","Polygon"];class Yr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Br[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(D){let nt=this._parseColorCache[D];return nt||(nt=this._parseColorCache[D]=_r.parse(D)),nt}}class pn{constructor(D,nt,bt=[],Rt,Kt=new ve,Qt=[]){this.registry=D,this.path=bt,this.key=bt.map(be=>`[${be}]`).join(""),this.scope=Kt,this.errors=Qt,this.expectedType=Rt,this._isConstant=nt}parse(D,nt,bt,Rt,Kt={}){return nt?this.concat(nt,bt,Rt)._parse(D,Kt):this._parse(D,Kt)}_parse(D,nt){function bt(Rt,Kt,Qt){return Qt==="assert"?new Rr(Kt,[Rt]):Qt==="coerce"?new Gr(Kt,[Rt]):Rt}if(D!==null&&typeof D!="string"&&typeof D!="boolean"&&typeof D!="number"||(D=["literal",D]),Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let Rt=D[0];if(typeof Rt!="string")return this.error(`Expression name must be a string, but found ${typeof Rt} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let Kt=this.registry[Rt];if(Kt){let Qt=Kt.parse(D,this);if(!Qt)return null;if(this.expectedType){let be=this.expectedType,Be=Qt.type;if(be.kind!=="string"&&be.kind!=="number"&&be.kind!=="boolean"&&be.kind!=="object"&&be.kind!=="array"||Be.kind!=="value")if(be.kind!=="color"&&be.kind!=="formatted"&&be.kind!=="resolvedImage"||Be.kind!=="value"&&Be.kind!=="string")if(be.kind!=="padding"||Be.kind!=="value"&&Be.kind!=="number"&&Be.kind!=="array")if(be.kind!=="variableAnchorOffsetCollection"||Be.kind!=="value"&&Be.kind!=="array"){if(this.checkSubtype(be,Be))return null}else Qt=bt(Qt,be,nt.typeAnnotation||"coerce");else Qt=bt(Qt,be,nt.typeAnnotation||"coerce");else Qt=bt(Qt,be,nt.typeAnnotation||"coerce");else Qt=bt(Qt,be,nt.typeAnnotation||"assert")}if(!(Qt instanceof Wa)&&Qt.type.kind!=="resolvedImage"&&this._isConstant(Qt)){let be=new Yr;try{Qt=new Wa(Qt.type,Qt.evaluate(be))}catch(Be){return this.error(Be.message),null}}return Qt}return this.error(`Unknown expression "${Rt}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(D===void 0?"'undefined' value invalid. Use null instead.":typeof D=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof D} instead.`)}concat(D,nt,bt){let Rt=typeof D=="number"?this.path.concat(D):this.path,Kt=bt?this.scope.concat(bt):this.scope;return new pn(this.registry,this._isConstant,Rt,nt||null,Kt,this.errors)}error(D,...nt){let bt=`${this.key}${nt.map(Rt=>`[${Rt}]`).join("")}`;this.errors.push(new ee(bt,D))}checkSubtype(D,nt){let bt=gt(D,nt);return bt&&this.error(bt),bt}}class on{constructor(D,nt){this.type=nt.type,this.bindings=[].concat(D),this.result=nt}evaluate(D){return this.result.evaluate(D)}eachChild(D){for(let nt of this.bindings)D(nt[1]);D(this.result)}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found ${D.length-1} instead.`);let bt=[];for(let Kt=1;Kt=bt.length)throw new ze(`Array index out of bounds: ${nt} > ${bt.length-1}.`);if(nt!==Math.floor(nt))throw new ze(`Array index must be an integer, but found ${nt} instead.`);return bt[nt]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class Hr{constructor(D,nt){this.type=Ge,this.needle=D,this.haystack=nt}static parse(D,nt){if(D.length!==3)return nt.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,jr);return bt&&Rt?St(bt.type,[Ge,He,Te,oe,jr])?new Hr(bt,Rt):nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(bt.type)} instead`):null}evaluate(D){let nt=this.needle.evaluate(D),bt=this.haystack.evaluate(D);if(!bt)return!1;if(!Nt(nt,["boolean","string","number","null"]))throw new ze(`Expected first argument to be of type boolean, string, number or null, but found ${ne(ci(nt))} instead.`);if(!Nt(bt,["string","array"]))throw new ze(`Expected second argument to be of type array or string, but found ${ne(ci(bt))} instead.`);return bt.indexOf(nt)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class _n{constructor(D,nt,bt){this.type=Te,this.needle=D,this.haystack=nt,this.fromIndex=bt}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,jr);if(!bt||!Rt)return null;if(!St(bt.type,[Ge,He,Te,oe,jr]))return nt.error(`Expected first argument to be of type boolean, string, number or null, but found ${ne(bt.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Te);return Kt?new _n(bt,Rt,Kt):null}return new _n(bt,Rt)}evaluate(D){let nt=this.needle.evaluate(D),bt=this.haystack.evaluate(D);if(!Nt(nt,["boolean","string","number","null"]))throw new ze(`Expected first argument to be of type boolean, string, number or null, but found ${ne(ci(nt))} instead.`);let Rt;if(this.fromIndex&&(Rt=this.fromIndex.evaluate(D)),Nt(bt,["string"])){let Kt=bt.indexOf(nt,Rt);return Kt===-1?-1:[...bt.slice(0,Kt)].length}if(Nt(bt,["array"]))return bt.indexOf(nt,Rt);throw new ze(`Expected second argument to be of type array or string, but found ${ne(ci(bt))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class Fn{constructor(D,nt,bt,Rt,Kt,Qt){this.inputType=D,this.type=nt,this.input=bt,this.cases=Rt,this.outputs=Kt,this.otherwise=Qt}static parse(D,nt){if(D.length<5)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if(D.length%2!=1)return nt.error("Expected an even number of arguments.");let bt,Rt;nt.expectedType&&nt.expectedType.kind!=="value"&&(Rt=nt.expectedType);let Kt={},Qt=[];for(let rr=2;rrNumber.MAX_SAFE_INTEGER)return Zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bn=="number"&&Math.floor(bn)!==bn)return Zr.error("Numeric branch labels must be integer values.");if(bt){if(Zr.checkSubtype(bt,ci(bn)))return null}else bt=ci(bn);if(Kt[String(bn)]!==void 0)return Zr.error("Branch labels must be unique.");Kt[String(bn)]=Qt.length}let ln=nt.parse(Lr,rr,Rt);if(!ln)return null;Rt=Rt||ln.type,Qt.push(ln)}let be=nt.parse(D[1],1,jr);if(!be)return null;let Be=nt.parse(D[D.length-1],D.length-1,Rt);return Be?be.type.kind!=="value"&&nt.concat(1).checkSubtype(bt,be.type)?null:new Fn(bt,Rt,be,Kt,Qt,Be):null}evaluate(D){let nt=this.input.evaluate(D);return(ci(nt)===this.inputType&&this.outputs[this.cases[nt]]||this.otherwise).evaluate(D)}eachChild(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)}outputDefined(){return this.outputs.every(D=>D.outputDefined())&&this.otherwise.outputDefined()}}class Qn{constructor(D,nt,bt){this.type=D,this.branches=nt,this.otherwise=bt}static parse(D,nt){if(D.length<4)return nt.error(`Expected at least 3 arguments, but found only ${D.length-1}.`);if(D.length%2!=0)return nt.error("Expected an odd number of arguments.");let bt;nt.expectedType&&nt.expectedType.kind!=="value"&&(bt=nt.expectedType);let Rt=[];for(let Qt=1;Qtnt.outputDefined())&&this.otherwise.outputDefined()}}class Pn{constructor(D,nt,bt,Rt){this.type=D,this.input=nt,this.beginIndex=bt,this.endIndex=Rt}static parse(D,nt){if(D.length<=2||D.length>=5)return nt.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1,jr),Rt=nt.parse(D[2],2,Te);if(!bt||!Rt)return null;if(!St(bt.type,[Gt(jr),He,jr]))return nt.error(`Expected first argument to be of type array or string, but found ${ne(bt.type)} instead`);if(D.length===4){let Kt=nt.parse(D[3],3,Te);return Kt?new Pn(bt.type,bt,Rt,Kt):null}return new Pn(bt.type,bt,Rt)}evaluate(D){let nt=this.input.evaluate(D),bt=this.beginIndex.evaluate(D),Rt;if(this.endIndex&&(Rt=this.endIndex.evaluate(D)),Nt(nt,["string"]))return[...nt].slice(bt,Rt).join("");if(Nt(nt,["array"]))return nt.slice(bt,Rt);throw new ze(`Expected first argument to be of type array or string, but found ${ne(ci(nt))} instead.`)}eachChild(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)}outputDefined(){return!1}}function En(G,D){let nt=G.length-1,bt,Rt,Kt=0,Qt=nt,be=0;for(;Kt<=Qt;)if(be=Math.floor((Kt+Qt)/2),bt=G[be],Rt=G[be+1],bt<=D){if(be===nt||DD))throw new ze("Input is not a number.");Qt=be-1}return 0}class Zn{constructor(D,nt,bt){this.type=D,this.input=nt,this.labels=[],this.outputs=[];for(let[Rt,Kt]of bt)this.labels.push(Rt),this.outputs.push(Kt)}static parse(D,nt){if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");let bt=nt.parse(D[1],1,Te);if(!bt)return null;let Rt=[],Kt=null;nt.expectedType&&nt.expectedType.kind!=="value"&&(Kt=nt.expectedType);for(let Qt=1;Qt=be)return nt.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',rr);let Lr=nt.parse(Be,xr,Kt);if(!Lr)return null;Kt=Kt||Lr.type,Rt.push([be,Lr])}return new Zn(Kt,bt,Rt)}evaluate(D){let nt=this.labels,bt=this.outputs;if(nt.length===1)return bt[0].evaluate(D);let Rt=this.input.evaluate(D);if(Rt<=nt[0])return bt[0].evaluate(D);let Kt=nt.length;return Rt>=nt[Kt-1]?bt[Kt-1].evaluate(D):bt[En(nt,Rt)].evaluate(D)}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function La(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}var Vi=Qa;function Qa(G,D,nt,bt){this.cx=3*G,this.bx=3*(nt-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(bt-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=D,this.p2x=nt,this.p2y=bt}Qa.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,D){if(D===void 0&&(D=1e-6),G<0)return 0;if(G>1)return 1;for(var nt=G,bt=0;bt<8;bt++){var Rt=this.sampleCurveX(nt)-G;if(Math.abs(Rt)Rt?Qt=nt:be=nt,nt=.5*(be-Qt)+Qt;return nt},solve:function(G,D){return this.sampleCurveY(this.solveCurveX(G,D))}};var Ja=La(Vi);function Do(G,D,nt){return G+nt*(D-G)}function yo(G,D,nt){return G.map((bt,Rt)=>Do(bt,D[Rt],nt))}let Fo={number:Do,color:function(G,D,nt,bt="rgb"){switch(bt){case"rgb":{let[Rt,Kt,Qt,be]=yo(G.rgb,D.rgb,nt);return new _r(Rt,Kt,Qt,be,!1)}case"hcl":{let[Rt,Kt,Qt,be]=G.hcl,[Be,rr,xr,Lr]=D.hcl,Zr,ln;if(isNaN(Rt)||isNaN(Be))isNaN(Rt)?isNaN(Be)?Zr=NaN:(Zr=Be,Qt!==1&&Qt!==0||(ln=rr)):(Zr=Rt,xr!==1&&xr!==0||(ln=Kt));else{let Aa=Be-Rt;Be>Rt&&Aa>180?Aa-=360:Be180&&(Aa+=360),Zr=Rt+nt*Aa}let[bn,Ln,Gn,Mi]=function([Aa,ra,ga,Ya]){return Aa=isNaN(Aa)?0:Aa*Ar,Ii([ga,Math.cos(Aa)*ra,Math.sin(Aa)*ra,Ya])}([Zr,ln??Do(Kt,rr,nt),Do(Qt,xr,nt),Do(be,Lr,nt)]);return new _r(bn,Ln,Gn,Mi,!1)}case"lab":{let[Rt,Kt,Qt,be]=Ii(yo(G.lab,D.lab,nt));return new _r(Rt,Kt,Qt,be,!1)}}},array:yo,padding:function(G,D,nt){return new Mn(yo(G.values,D.values,nt))},variableAnchorOffsetCollection:function(G,D,nt){let bt=G.values,Rt=D.values;if(bt.length!==Rt.length)throw new ze(`Cannot interpolate values of different length. from: ${G.toString()}, to: ${D.toString()}`);let Kt=[];for(let Qt=0;Qttypeof xr!="number"||xr<0||xr>1))return nt.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Rt={name:"cubic-bezier",controlPoints:rr}}}if(D.length-1<4)return nt.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return nt.error("Expected an even number of arguments.");if(Kt=nt.parse(Kt,2,Te),!Kt)return null;let be=[],Be=null;bt==="interpolate-hcl"||bt==="interpolate-lab"?Be=cr:nt.expectedType&&nt.expectedType.kind!=="value"&&(Be=nt.expectedType);for(let rr=0;rr=xr)return nt.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zr);let bn=nt.parse(Lr,ln,Be);if(!bn)return null;Be=Be||bn.type,be.push([xr,bn])}return re(Be,Te)||re(Be,cr)||re(Be,Xr)||re(Be,Le)||re(Be,Gt(Te))?new Da(Be,bt,Rt,Kt,be):nt.error(`Type ${ne(Be)} is not interpolatable.`)}evaluate(D){let nt=this.labels,bt=this.outputs;if(nt.length===1)return bt[0].evaluate(D);let Rt=this.input.evaluate(D);if(Rt<=nt[0])return bt[0].evaluate(D);let Kt=nt.length;if(Rt>=nt[Kt-1])return bt[Kt-1].evaluate(D);let Qt=En(nt,Rt),be=Da.interpolationFactor(this.interpolation,Rt,nt[Qt],nt[Qt+1]),Be=bt[Qt].evaluate(D),rr=bt[Qt+1].evaluate(D);switch(this.operator){case"interpolate":return Fo[this.type.kind](Be,rr,be);case"interpolate-hcl":return Fo.color(Be,rr,be,"hcl");case"interpolate-lab":return Fo.color(Be,rr,be,"lab")}}eachChild(D){D(this.input);for(let nt of this.outputs)D(nt)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function ys(G,D,nt,bt){let Rt=bt-nt,Kt=G-nt;return Rt===0?0:D===1?Kt/Rt:(Math.pow(D,Kt)-1)/(Math.pow(D,Rt)-1)}class os{constructor(D,nt){this.type=D,this.args=nt}static parse(D,nt){if(D.length<2)return nt.error("Expectected at least one argument.");let bt=null,Rt=nt.expectedType;Rt&&Rt.kind!=="value"&&(bt=Rt);let Kt=[];for(let be of D.slice(1)){let Be=nt.parse(be,1+Kt.length,bt,void 0,{typeAnnotation:"omit"});if(!Be)return null;bt=bt||Be.type,Kt.push(Be)}if(!bt)throw new Error("No output type");let Qt=Rt&&Kt.some(be=>gt(Rt,be.type));return new os(Qt?jr:bt,Kt)}evaluate(D){let nt,bt=null,Rt=0;for(let Kt of this.args)if(Rt++,bt=Kt.evaluate(D),bt&&bt instanceof Oi&&!bt.available&&(nt||(nt=bt.name),bt=null,Rt===this.args.length&&(bt=nt)),bt!==null)break;return bt}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function ul(G,D){return G==="=="||G==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function Zo(G,D,nt,bt){return bt.compare(D,nt)===0}function Ks(G,D,nt){let bt=G!=="=="&&G!=="!=";return class fF{constructor(Kt,Qt,be){this.type=Ge,this.lhs=Kt,this.rhs=Qt,this.collator=be,this.hasUntypedArgument=Kt.type.kind==="value"||Qt.type.kind==="value"}static parse(Kt,Qt){if(Kt.length!==3&&Kt.length!==4)return Qt.error("Expected two or three arguments.");let be=Kt[0],Be=Qt.parse(Kt[1],1,jr);if(!Be)return null;if(!ul(be,Be.type))return Qt.concat(1).error(`"${be}" comparisons are not supported for type '${ne(Be.type)}'.`);let rr=Qt.parse(Kt[2],2,jr);if(!rr)return null;if(!ul(be,rr.type))return Qt.concat(2).error(`"${be}" comparisons are not supported for type '${ne(rr.type)}'.`);if(Be.type.kind!==rr.type.kind&&Be.type.kind!=="value"&&rr.type.kind!=="value")return Qt.error(`Cannot compare types '${ne(Be.type)}' and '${ne(rr.type)}'.`);bt&&(Be.type.kind==="value"&&rr.type.kind!=="value"?Be=new Rr(rr.type,[Be]):Be.type.kind!=="value"&&rr.type.kind==="value"&&(rr=new Rr(Be.type,[rr])));let xr=null;if(Kt.length===4){if(Be.type.kind!=="string"&&rr.type.kind!=="string"&&Be.type.kind!=="value"&&rr.type.kind!=="value")return Qt.error("Cannot use collator to compare non-string types.");if(xr=Qt.parse(Kt[3],3,Wr),!xr)return null}return new fF(Be,rr,xr)}evaluate(Kt){let Qt=this.lhs.evaluate(Kt),be=this.rhs.evaluate(Kt);if(bt&&this.hasUntypedArgument){let Be=ci(Qt),rr=ci(be);if(Be.kind!==rr.kind||Be.kind!=="string"&&Be.kind!=="number")throw new ze(`Expected arguments for "${G}" to be (string, string) or (number, number), but found (${Be.kind}, ${rr.kind}) instead.`)}if(this.collator&&!bt&&this.hasUntypedArgument){let Be=ci(Qt),rr=ci(be);if(Be.kind!=="string"||rr.kind!=="string")return D(Kt,Qt,be)}return this.collator?nt(Kt,Qt,be,this.collator.evaluate(Kt)):D(Kt,Qt,be)}eachChild(Kt){Kt(this.lhs),Kt(this.rhs),this.collator&&Kt(this.collator)}outputDefined(){return!0}}}let ss=Ks("==",function(G,D,nt){return D===nt},Zo),cl=Ks("!=",function(G,D,nt){return D!==nt},function(G,D,nt,bt){return!Zo(0,D,nt,bt)}),Qs=Ks("<",function(G,D,nt){return D",function(G,D,nt){return D>nt},function(G,D,nt,bt){return bt.compare(D,nt)>0}),cs=Ks("<=",function(G,D,nt){return D<=nt},function(G,D,nt,bt){return bt.compare(D,nt)<=0}),Ps=Ks(">=",function(G,D,nt){return D>=nt},function(G,D,nt,bt){return bt.compare(D,nt)>=0});class Lo{constructor(D,nt,bt){this.type=Wr,this.locale=bt,this.caseSensitive=D,this.diacriticSensitive=nt}static parse(D,nt){if(D.length!==2)return nt.error("Expected one argument.");let bt=D[1];if(typeof bt!="object"||Array.isArray(bt))return nt.error("Collator options argument must be an object.");let Rt=nt.parse(bt["case-sensitive"]!==void 0&&bt["case-sensitive"],1,Ge);if(!Rt)return null;let Kt=nt.parse(bt["diacritic-sensitive"]!==void 0&&bt["diacritic-sensitive"],1,Ge);if(!Kt)return null;let Qt=null;return bt.locale&&(Qt=nt.parse(bt.locale,1,He),!Qt)?null:new Lo(Rt,Kt,Qt)}evaluate(D){return new tn(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)}eachChild(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)}outputDefined(){return!1}}class As{constructor(D,nt,bt,Rt,Kt){this.type=He,this.number=D,this.locale=nt,this.currency=bt,this.minFractionDigits=Rt,this.maxFractionDigits=Kt}static parse(D,nt){if(D.length!==3)return nt.error("Expected two arguments.");let bt=nt.parse(D[1],1,Te);if(!bt)return null;let Rt=D[2];if(typeof Rt!="object"||Array.isArray(Rt))return nt.error("NumberFormat options argument must be an object.");let Kt=null;if(Rt.locale&&(Kt=nt.parse(Rt.locale,1,He),!Kt))return null;let Qt=null;if(Rt.currency&&(Qt=nt.parse(Rt.currency,1,He),!Qt))return null;let be=null;if(Rt["min-fraction-digits"]&&(be=nt.parse(Rt["min-fraction-digits"],1,Te),!be))return null;let Be=null;return Rt["max-fraction-digits"]&&(Be=nt.parse(Rt["max-fraction-digits"],1,Te),!Be)?null:new As(bt,Kt,Qt,be,Be)}evaluate(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))}eachChild(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)}outputDefined(){return!1}}class kl{constructor(D){this.type=br,this.sections=D}static parse(D,nt){if(D.length<2)return nt.error("Expected at least one argument.");let bt=D[1];if(!Array.isArray(bt)&&typeof bt=="object")return nt.error("First argument must be an image or text section.");let Rt=[],Kt=!1;for(let Qt=1;Qt<=D.length-1;++Qt){let be=D[Qt];if(Kt&&typeof be=="object"&&!Array.isArray(be)){Kt=!1;let Be=null;if(be["font-scale"]&&(Be=nt.parse(be["font-scale"],1,Te),!Be))return null;let rr=null;if(be["text-font"]&&(rr=nt.parse(be["text-font"],1,Gt(He)),!rr))return null;let xr=null;if(be["text-color"]&&(xr=nt.parse(be["text-color"],1,cr),!xr))return null;let Lr=Rt[Rt.length-1];Lr.scale=Be,Lr.font=rr,Lr.textColor=xr}else{let Be=nt.parse(D[Qt],1,jr);if(!Be)return null;let rr=Be.type.kind;if(rr!=="string"&&rr!=="value"&&rr!=="null"&&rr!=="resolvedImage")return nt.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Kt=!0,Rt.push({content:Be,scale:null,font:null,textColor:null})}}return new kl(Rt)}evaluate(D){return new Tn(this.sections.map(nt=>{let bt=nt.content.evaluate(D);return ci(bt)===nn?new Cn("",bt,null,null,null):new Cn(za(bt),null,nt.scale?nt.scale.evaluate(D):null,nt.font?nt.font.evaluate(D).join(","):null,nt.textColor?nt.textColor.evaluate(D):null)}))}eachChild(D){for(let nt of this.sections)D(nt.content),nt.scale&&D(nt.scale),nt.font&&D(nt.font),nt.textColor&&D(nt.textColor)}outputDefined(){return!1}}class ql{constructor(D){this.type=nn,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error("Expected two arguments.");let bt=nt.parse(D[1],1,He);return bt?new ql(bt):nt.error("No image name provided.")}evaluate(D){let nt=this.input.evaluate(D),bt=Oi.fromString(nt);return bt&&D.availableImages&&(bt.available=D.availableImages.indexOf(nt)>-1),bt}eachChild(D){D(this.input)}outputDefined(){return!1}}class Jl{constructor(D){this.type=Te,this.input=D}static parse(D,nt){if(D.length!==2)return nt.error(`Expected 1 argument, but found ${D.length-1} instead.`);let bt=nt.parse(D[1],1);return bt?bt.type.kind!=="array"&&bt.type.kind!=="string"&&bt.type.kind!=="value"?nt.error(`Expected argument of type string or array, but found ${ne(bt.type)} instead.`):new Jl(bt):null}evaluate(D){let nt=this.input.evaluate(D);if(typeof nt=="string")return[...nt].length;if(Array.isArray(nt))return nt.length;throw new ze(`Expected value to be of type string or array, but found ${ne(ci(nt))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Us=8192;function Pa(G,D){let nt=(180+G[0])/360,bt=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G[1]*Math.PI/360)))/360,Rt=Math.pow(2,D.z);return[Math.round(nt*Rt*Us),Math.round(bt*Rt*Us)]}function fo(G,D){let nt=Math.pow(2,D.z);return[(Rt=(G[0]/Us+D.x)/nt,360*Rt-180),(bt=(G[1]/Us+D.y)/nt,360/Math.PI*Math.atan(Math.exp((180-360*bt)*Math.PI/180))-90)];var bt,Rt}function qs(G,D){G[0]=Math.min(G[0],D[0]),G[1]=Math.min(G[1],D[1]),G[2]=Math.max(G[2],D[0]),G[3]=Math.max(G[3],D[1])}function Ql(G,D){return!(G[0]<=D[0]||G[2]>=D[2]||G[1]<=D[1]||G[3]>=D[3])}function Xo(G,D,nt){let bt=G[0]-D[0],Rt=G[1]-D[1],Kt=G[0]-nt[0],Qt=G[1]-nt[1];return bt*Qt-Kt*Rt==0&&bt*Kt<=0&&Rt*Qt<=0}function Gl(G,D,nt,bt){return(Rt=[bt[0]-nt[0],bt[1]-nt[1]])[0]*(Kt=[D[0]-G[0],D[1]-G[1]])[1]-Rt[1]*Kt[0]!=0&&!(!Is(G,D,nt,bt)||!Is(nt,bt,G,D));var Rt,Kt}function al(G,D,nt){for(let bt of nt)for(let Rt=0;Rt(Rt=G)[1]!=(Qt=be[Be+1])[1]>Rt[1]&&Rt[0]<(Qt[0]-Kt[0])*(Rt[1]-Kt[1])/(Qt[1]-Kt[1])+Kt[0]&&(bt=!bt)}var Rt,Kt,Qt;return bt}function Ru(G,D){for(let nt of D)if(Cl(G,nt))return!0;return!1}function lo(G,D){for(let nt of G)if(!Cl(nt,D))return!1;for(let nt=0;nt0&&be<0||Qt<0&&be>0}function ou(G,D,nt){let bt=[];for(let Rt=0;Rtnt[2]){let Rt=.5*bt,Kt=G[0]-nt[0]>Rt?-bt:nt[0]-G[0]>Rt?bt:0;Kt===0&&(Kt=G[0]-nt[2]>Rt?-bt:nt[2]-G[0]>Rt?bt:0),G[0]+=Kt}qs(D,G)}function Su(G,D,nt,bt){let Rt=Math.pow(2,bt.z)*Us,Kt=[bt.x*Us,bt.y*Us],Qt=[];for(let be of G)for(let Be of be){let rr=[Be.x+Kt[0],Be.y+Kt[1]];ts(rr,D,nt,Rt),Qt.push(rr)}return Qt}function Gu(G,D,nt,bt){let Rt=Math.pow(2,bt.z)*Us,Kt=[bt.x*Us,bt.y*Us],Qt=[];for(let Be of G){let rr=[];for(let xr of Be){let Lr=[xr.x+Kt[0],xr.y+Kt[1]];qs(D,Lr),rr.push(Lr)}Qt.push(rr)}if(D[2]-D[0]<=Rt/2){(be=D)[0]=be[1]=1/0,be[2]=be[3]=-1/0;for(let Be of Qt)for(let rr of Be)ts(rr,D,nt,Rt)}var be;return Qt}class bl{constructor(D,nt){this.type=Ge,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'within' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Xi(D[1])){let bt=D[1];if(bt.type==="FeatureCollection"){let Rt=[];for(let Kt of bt.features){let{type:Qt,coordinates:be}=Kt.geometry;Qt==="Polygon"&&Rt.push(be),Qt==="MultiPolygon"&&Rt.push(...be)}if(Rt.length)return new bl(bt,{type:"MultiPolygon",coordinates:Rt})}else if(bt.type==="Feature"){let Rt=bt.geometry.type;if(Rt==="Polygon"||Rt==="MultiPolygon")return new bl(bt,bt.geometry)}else if(bt.type==="Polygon"||bt.type==="MultiPolygon")return new bl(bt,bt)}return nt.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,bt){let Rt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(bt.type==="Polygon"){let be=ou(bt.coordinates,Kt,Qt),Be=Su(nt.geometry(),Rt,Kt,Qt);if(!Ql(Rt,Kt))return!1;for(let rr of Be)if(!Cl(rr,be))return!1}if(bt.type==="MultiPolygon"){let be=hl(bt.coordinates,Kt,Qt),Be=Su(nt.geometry(),Rt,Kt,Qt);if(!Ql(Rt,Kt))return!1;for(let rr of Be)if(!Ru(rr,be))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,bt){let Rt=[1/0,1/0,-1/0,-1/0],Kt=[1/0,1/0,-1/0,-1/0],Qt=nt.canonicalID();if(bt.type==="Polygon"){let be=ou(bt.coordinates,Kt,Qt),Be=Gu(nt.geometry(),Rt,Kt,Qt);if(!Ql(Rt,Kt))return!1;for(let rr of Be)if(!lo(rr,be))return!1}if(bt.type==="MultiPolygon"){let be=hl(bt.coordinates,Kt,Qt),Be=Gu(nt.geometry(),Rt,Kt,Qt);if(!Ql(Rt,Kt))return!1;for(let rr of Be)if(!Ms(rr,be))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Dl=class{constructor(G=[],D=(nt,bt)=>ntbt?1:0){if(this.data=G,this.length=this.data.length,this.compare=D,this.length>0)for(let nt=(this.length>>1)-1;nt>=0;nt--)this._down(nt)}push(G){this.data.push(G),this._up(this.length++)}pop(){if(this.length===0)return;let G=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),G}peek(){return this.data[0]}_up(G){let{data:D,compare:nt}=this,bt=D[G];for(;G>0;){let Rt=G-1>>1,Kt=D[Rt];if(nt(bt,Kt)>=0)break;D[G]=Kt,G=Rt}D[G]=bt}_down(G){let{data:D,compare:nt}=this,bt=this.length>>1,Rt=D[G];for(;G=0)break;D[G]=D[Kt],G=Kt}D[G]=Rt}};function tu(G,D,nt,bt,Rt){nu(G,D,nt,bt||G.length-1,Rt||mh)}function nu(G,D,nt,bt,Rt){for(;bt>nt;){if(bt-nt>600){var Kt=bt-nt+1,Qt=D-nt+1,be=Math.log(Kt),Be=.5*Math.exp(2*be/3),rr=.5*Math.sqrt(be*Be*(Kt-Be)/Kt)*(Qt-Kt/2<0?-1:1);nu(G,D,Math.max(nt,Math.floor(D-Qt*Be/Kt+rr)),Math.min(bt,Math.floor(D+(Kt-Qt)*Be/Kt+rr)),Rt)}var xr=G[D],Lr=nt,Zr=bt;for(ac(G,nt,D),Rt(G[bt],xr)>0&&ac(G,nt,bt);Lr0;)Zr--}Rt(G[nt],xr)===0?ac(G,nt,Zr):ac(G,++Zr,bt),Zr<=D&&(nt=Zr+1),D<=Zr&&(bt=Zr-1)}}function ac(G,D,nt){var bt=G[D];G[D]=G[nt],G[nt]=bt}function mh(G,D){return GD?1:0}function Jc(G,D){if(G.length<=1)return[G];let nt=[],bt,Rt;for(let Kt of G){let Qt=Bf(Kt);Qt!==0&&(Kt.area=Math.abs(Qt),Rt===void 0&&(Rt=Qt<0),Rt===Qt<0?(bt&&nt.push(bt),bt=[Kt]):bt.push(Kt))}if(bt&&nt.push(bt),D>1)for(let Kt=0;Kt1?(rr=D[Be+1][0],xr=D[Be+1][1]):ln>0&&(rr+=Lr/this.kx*ln,xr+=Zr/this.ky*ln)),Lr=this.wrap(nt[0]-rr)*this.kx,Zr=(nt[1]-xr)*this.ky;let bn=Lr*Lr+Zr*Zr;bn180;)D-=360;return D}}function hc(G,D){return D[0]-G[0]}function oc(G){return G[1]-G[0]+1}function fc(G,D){return G[1]>=G[0]&&G[1]G[1])return[null,null];let nt=oc(G);if(D){if(nt===2)return[G,null];let Rt=Math.floor(nt/2);return[[G[0],G[0]+Rt],[G[0]+Rt,G[1]]]}if(nt===1)return[G,null];let bt=Math.floor(nt/2)-1;return[[G[0],G[0]+bt],[G[0]+bt+1,G[1]]]}function cu(G,D){if(!fc(D,G.length))return[1/0,1/0,-1/0,-1/0];let nt=[1/0,1/0,-1/0,-1/0];for(let bt=D[0];bt<=D[1];++bt)qs(nt,G[bt]);return nt}function sc(G){let D=[1/0,1/0,-1/0,-1/0];for(let nt of G)for(let bt of nt)qs(D,bt);return D}function rl(G){return G[0]!==-1/0&&G[1]!==-1/0&&G[2]!==1/0&&G[3]!==1/0}function Yl(G,D,nt){if(!rl(G)||!rl(D))return NaN;let bt=0,Rt=0;return G[2]D[2]&&(bt=G[0]-D[2]),G[1]>D[3]&&(Rt=G[1]-D[3]),G[3]=bt)return bt;if(Ql(Rt,Kt)){if(Vd(G,D))return 0}else if(Vd(D,G))return 0;let Qt=1/0;for(let be of G)for(let Be=0,rr=be.length,xr=rr-1;Be0;){let Be=Qt.pop();if(Be[0]>=Kt)continue;let rr=Be[1],xr=D?50:100;if(oc(rr)<=xr){if(!fc(rr,G.length))return NaN;if(D){let Lr=tl(G,rr,nt,bt);if(isNaN(Lr)||Lr===0)return Lr;Kt=Math.min(Kt,Lr)}else for(let Lr=rr[0];Lr<=rr[1];++Lr){let Zr=Ed(G[Lr],nt,bt);if(Kt=Math.min(Kt,Zr),Kt===0)return 0}}else{let Lr=oh(rr,D);Qo(Qt,Kt,bt,G,be,Lr[0]),Qo(Qt,Kt,bt,G,be,Lr[1])}}return Kt}function rc(G,D,nt,bt,Rt,Kt=1/0){let Qt=Math.min(Kt,Rt.distance(G[0],nt[0]));if(Qt===0)return Qt;let be=new Dl([[0,[0,G.length-1],[0,nt.length-1]]],hc);for(;be.length>0;){let Be=be.pop();if(Be[0]>=Qt)continue;let rr=Be[1],xr=Be[2],Lr=D?50:100,Zr=bt?50:100;if(oc(rr)<=Lr&&oc(xr)<=Zr){if(!fc(rr,G.length)&&fc(xr,nt.length))return NaN;let ln;if(D&&bt)ln=Uh(G,rr,nt,xr,Rt),Qt=Math.min(Qt,ln);else if(D&&!bt){let bn=G.slice(rr[0],rr[1]+1);for(let Ln=xr[0];Ln<=xr[1];++Ln)if(ln=Sh(nt[Ln],bn,Rt),Qt=Math.min(Qt,ln),Qt===0)return Qt}else if(!D&&bt){let bn=nt.slice(xr[0],xr[1]+1);for(let Ln=rr[0];Ln<=rr[1];++Ln)if(ln=Sh(G[Ln],bn,Rt),Qt=Math.min(Qt,ln),Qt===0)return Qt}else ln=_u(G,rr,nt,xr,Rt),Qt=Math.min(Qt,ln)}else{let ln=oh(rr,D),bn=oh(xr,bt);lf(be,Qt,Rt,G,nt,ln[0],bn[0]),lf(be,Qt,Rt,G,nt,ln[0],bn[1]),lf(be,Qt,Rt,G,nt,ln[1],bn[0]),lf(be,Qt,Rt,G,nt,ln[1],bn[1])}}return Qt}function jf(G){return G.type==="MultiPolygon"?G.coordinates.map(D=>({type:"Polygon",coordinates:D})):G.type==="MultiLineString"?G.coordinates.map(D=>({type:"LineString",coordinates:D})):G.type==="MultiPoint"?G.coordinates.map(D=>({type:"Point",coordinates:D})):[G]}class Vh{constructor(D,nt){this.type=Te,this.geojson=D,this.geometries=nt}static parse(D,nt){if(D.length!==2)return nt.error(`'distance' expression requires exactly one argument, but found ${D.length-1} instead.`);if(Xi(D[1])){let bt=D[1];if(bt.type==="FeatureCollection")return new Vh(bt,bt.features.map(Rt=>jf(Rt.geometry)).flat());if(bt.type==="Feature")return new Vh(bt,jf(bt.geometry));if("type"in bt&&"coordinates"in bt)return new Vh(bt,jf(bt))}return nt.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(nt,bt){let Rt=nt.geometry(),Kt=Rt.flat().map(Be=>fo([Be.x,Be.y],nt.canonical));if(Rt.length===0)return NaN;let Qt=new Nf(Kt[0][1]),be=1/0;for(let Be of bt){switch(Be.type){case"Point":be=Math.min(be,rc(Kt,!1,[Be.coordinates],!1,Qt,be));break;case"LineString":be=Math.min(be,rc(Kt,!1,Be.coordinates,!0,Qt,be));break;case"Polygon":be=Math.min(be,sh(Kt,!1,Be.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries);if(D.geometryType()==="LineString")return function(nt,bt){let Rt=nt.geometry(),Kt=Rt.flat().map(Be=>fo([Be.x,Be.y],nt.canonical));if(Rt.length===0)return NaN;let Qt=new Nf(Kt[0][1]),be=1/0;for(let Be of bt){switch(Be.type){case"Point":be=Math.min(be,rc(Kt,!0,[Be.coordinates],!1,Qt,be));break;case"LineString":be=Math.min(be,rc(Kt,!0,Be.coordinates,!0,Qt,be));break;case"Polygon":be=Math.min(be,sh(Kt,!0,Be.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries);if(D.geometryType()==="Polygon")return function(nt,bt){let Rt=nt.geometry();if(Rt.length===0||Rt[0].length===0)return NaN;let Kt=Jc(Rt,0).map(Be=>Be.map(rr=>rr.map(xr=>fo([xr.x,xr.y],nt.canonical)))),Qt=new Nf(Kt[0][0][0][1]),be=1/0;for(let Be of bt)for(let rr of Kt){switch(Be.type){case"Point":be=Math.min(be,sh([Be.coordinates],!1,rr,Qt,be));break;case"LineString":be=Math.min(be,sh(Be.coordinates,!0,rr,Qt,be));break;case"Polygon":be=Math.min(be,Ll(rr,Be.coordinates,Qt,be))}if(be===0)return be}return be}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={"==":ss,"!=":cl,">":Nl,"<":Qs,">=":Ps,"<=":cs,array:Rr,at:dr,boolean:Rr,case:Qn,coalesce:os,collator:Lo,format:kl,image:ql,in:Hr,"index-of":_n,interpolate:Da,"interpolate-hcl":Da,"interpolate-lab":Da,length:Jl,let:on,literal:Wa,match:Fn,number:Rr,"number-format":As,object:Rr,slice:Pn,step:Zn,string:Rr,"to-boolean":Gr,"to-color":Gr,"to-number":Gr,"to-string":Gr,var:Ce,within:bl,distance:Vh};class lc{constructor(D,nt,bt,Rt){this.name=D,this.type=nt,this._evaluate=bt,this.args=Rt}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,nt){let bt=D[0],Rt=lc.definitions[bt];if(!Rt)return nt.error(`Unknown expression "${bt}". If you wanted a literal array, use ["literal", [...]].`,0);let Kt=Array.isArray(Rt)?Rt[0]:Rt.type,Qt=Array.isArray(Rt)?[[Rt[1],Rt[2]]]:Rt.overloads,be=Qt.filter(([rr])=>!Array.isArray(rr)||rr.length===D.length-1),Be=null;for(let[rr,xr]of be){Be=new pn(nt.registry,Uf,nt.path,null,nt.scope);let Lr=[],Zr=!1;for(let ln=1;ln{return Zr=Lr,Array.isArray(Zr)?`(${Zr.map(ne).join(", ")})`:`(${ne(Zr.type)}...)`;var Zr}).join(" | "),xr=[];for(let Lr=1;Lr{nt=D?nt&&Uf(bt):nt&&bt instanceof Wa}),!!nt&&Vf(G)&&Gf(G,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Vf(G){if(G instanceof lc&&(G.name==="get"&&G.args.length===1||G.name==="feature-state"||G.name==="has"&&G.args.length===1||G.name==="properties"||G.name==="geometry-type"||G.name==="id"||/^filter-/.test(G.name))||G instanceof bl||G instanceof Vh)return!1;let D=!0;return G.eachChild(nt=>{D&&!Vf(nt)&&(D=!1)}),D}function lh(G){if(G instanceof lc&&G.name==="feature-state")return!1;let D=!0;return G.eachChild(nt=>{D&&!lh(nt)&&(D=!1)}),D}function Gf(G,D){if(G instanceof lc&&D.indexOf(G.name)>=0)return!1;let nt=!0;return G.eachChild(bt=>{nt&&!Gf(bt,D)&&(nt=!1)}),nt}function Eh(G){return{result:"success",value:G}}function gh(G){return{result:"error",value:G}}function uc(G){return G["property-type"]==="data-driven"||G["property-type"]==="cross-faded-data-driven"}function rf(G){return!!G.expression&&G.expression.parameters.indexOf("zoom")>-1}function Hf(G){return!!G.expression&&G.expression.interpolated}function eu(G){return G instanceof Number?"number":G instanceof String?"string":G instanceof Boolean?"boolean":Array.isArray(G)?"array":G===null?"null":typeof G}function Ef(G){return typeof G=="object"&&G!==null&&!Array.isArray(G)}function Cd(G){return G}function Yf(G,D){let nt=D.type==="color",bt=G.stops&&typeof G.stops[0][0]=="object",Rt=bt||!(bt||G.property!==void 0),Kt=G.type||(Hf(D)?"exponential":"interval");if(nt||D.type==="padding"){let xr=nt?_r.parse:Mn.parse;(G=Mt({},G)).stops&&(G.stops=G.stops.map(Lr=>[Lr[0],xr(Lr[1])])),G.default=xr(G.default?G.default:D.default)}if(G.colorSpace&&(Qt=G.colorSpace)!=="rgb"&&Qt!=="hcl"&&Qt!=="lab")throw new Error(`Unknown color space: "${G.colorSpace}"`);var Qt;let be,Be,rr;if(Kt==="exponential")be=Xf;else if(Kt==="interval")be=Nc;else if(Kt==="categorical"){be=Kf,Be=Object.create(null);for(let xr of G.stops)Be[xr[0]]=xr[1];rr=typeof G.stops[0][0]}else{if(Kt!=="identity")throw new Error(`Unknown function type "${Kt}"`);be=Ou}if(bt){let xr={},Lr=[];for(let bn=0;bnbn[0]),evaluate:({zoom:bn},Ln)=>Xf({stops:Zr,base:G.base},D,bn).evaluate(bn,Ln)}}if(Rt){let xr=Kt==="exponential"?{name:"exponential",base:G.base!==void 0?G.base:1}:null;return{kind:"camera",interpolationType:xr,interpolationFactor:Da.interpolationFactor.bind(void 0,xr),zoomStops:G.stops.map(Lr=>Lr[0]),evaluate:({zoom:Lr})=>be(G,D,Lr,Be,rr)}}return{kind:"source",evaluate(xr,Lr){let Zr=Lr&&Lr.properties?Lr.properties[G.property]:void 0;return Zr===void 0?_f(G.default,D.default):be(G,D,Zr,Be,rr)}}}function _f(G,D,nt){return G!==void 0?G:D!==void 0?D:nt!==void 0?nt:void 0}function Kf(G,D,nt,bt,Rt){return _f(typeof nt===Rt?bt[nt]:void 0,G.default,D.default)}function Nc(G,D,nt){if(eu(nt)!=="number")return _f(G.default,D.default);let bt=G.stops.length;if(bt===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[bt-1][0])return G.stops[bt-1][1];let Rt=En(G.stops.map(Kt=>Kt[0]),nt);return G.stops[Rt][1]}function Xf(G,D,nt){let bt=G.base!==void 0?G.base:1;if(eu(nt)!=="number")return _f(G.default,D.default);let Rt=G.stops.length;if(Rt===1||nt<=G.stops[0][0])return G.stops[0][1];if(nt>=G.stops[Rt-1][0])return G.stops[Rt-1][1];let Kt=En(G.stops.map(xr=>xr[0]),nt),Qt=function(xr,Lr,Zr,ln){let bn=ln-Zr,Ln=xr-Zr;return bn===0?0:Lr===1?Ln/bn:(Math.pow(Lr,Ln)-1)/(Math.pow(Lr,bn)-1)}(nt,bt,G.stops[Kt][0],G.stops[Kt+1][0]),be=G.stops[Kt][1],Be=G.stops[Kt+1][1],rr=Fo[D.type]||Cd;return typeof be.evaluate=="function"?{evaluate(...xr){let Lr=be.evaluate.apply(void 0,xr),Zr=Be.evaluate.apply(void 0,xr);if(Lr!==void 0&&Zr!==void 0)return rr(Lr,Zr,Qt,G.colorSpace)}}:rr(be,Be,Qt,G.colorSpace)}function Ou(G,D,nt){switch(D.type){case"color":nt=_r.parse(nt);break;case"formatted":nt=Tn.fromString(nt.toString());break;case"resolvedImage":nt=Oi.fromString(nt.toString());break;case"padding":nt=Mn.parse(nt);break;default:eu(nt)===D.type||D.type==="enum"&&D.values[nt]||(nt=void 0)}return _f(nt,G.default,D.default)}lc.register(yf,{error:[{kind:"error"},[He],(G,[D])=>{throw new ze(D.evaluate(G))}],typeof:[He,[jr],(G,[D])=>ne(ci(D.evaluate(G)))],"to-rgba":[Gt(Te,4),[cr],(G,[D])=>{let[nt,bt,Rt,Kt]=D.evaluate(G).rgb;return[255*nt,255*bt,255*Rt,Kt]}],rgb:[cr,[Te,Te,Te],hd],rgba:[cr,[Te,Te,Te,Te],hd],has:{type:Ge,overloads:[[[He],(G,[D])=>Zf(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>Zf(D.evaluate(G),nt.evaluate(G))]]},get:{type:jr,overloads:[[[He],(G,[D])=>xf(D.evaluate(G),G.properties())],[[He,ur],(G,[D,nt])=>xf(D.evaluate(G),nt.evaluate(G))]]},"feature-state":[jr,[He],(G,[D])=>xf(D.evaluate(G),G.featureState||{})],properties:[ur,[],G=>G.properties()],"geometry-type":[He,[],G=>G.geometryType()],id:[jr,[],G=>G.id()],zoom:[Te,[],G=>G.globals.zoom],"heatmap-density":[Te,[],G=>G.globals.heatmapDensity||0],"line-progress":[Te,[],G=>G.globals.lineProgress||0],accumulated:[jr,[],G=>G.globals.accumulated===void 0?null:G.globals.accumulated],"+":[Te,Hh(Te),(G,D)=>{let nt=0;for(let bt of D)nt+=bt.evaluate(G);return nt}],"*":[Te,Hh(Te),(G,D)=>{let nt=1;for(let bt of D)nt*=bt.evaluate(G);return nt}],"-":{type:Te,overloads:[[[Te,Te],(G,[D,nt])=>D.evaluate(G)-nt.evaluate(G)],[[Te],(G,[D])=>-D.evaluate(G)]]},"/":[Te,[Te,Te],(G,[D,nt])=>D.evaluate(G)/nt.evaluate(G)],"%":[Te,[Te,Te],(G,[D,nt])=>D.evaluate(G)%nt.evaluate(G)],ln2:[Te,[],()=>Math.LN2],pi:[Te,[],()=>Math.PI],e:[Te,[],()=>Math.E],"^":[Te,[Te,Te],(G,[D,nt])=>Math.pow(D.evaluate(G),nt.evaluate(G))],sqrt:[Te,[Te],(G,[D])=>Math.sqrt(D.evaluate(G))],log10:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))/Math.LN10],ln:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))],log2:[Te,[Te],(G,[D])=>Math.log(D.evaluate(G))/Math.LN2],sin:[Te,[Te],(G,[D])=>Math.sin(D.evaluate(G))],cos:[Te,[Te],(G,[D])=>Math.cos(D.evaluate(G))],tan:[Te,[Te],(G,[D])=>Math.tan(D.evaluate(G))],asin:[Te,[Te],(G,[D])=>Math.asin(D.evaluate(G))],acos:[Te,[Te],(G,[D])=>Math.acos(D.evaluate(G))],atan:[Te,[Te],(G,[D])=>Math.atan(D.evaluate(G))],min:[Te,Hh(Te),(G,D)=>Math.min(...D.map(nt=>nt.evaluate(G)))],max:[Te,Hh(Te),(G,D)=>Math.max(...D.map(nt=>nt.evaluate(G)))],abs:[Te,[Te],(G,[D])=>Math.abs(D.evaluate(G))],round:[Te,[Te],(G,[D])=>{let nt=D.evaluate(G);return nt<0?-Math.round(-nt):Math.round(nt)}],floor:[Te,[Te],(G,[D])=>Math.floor(D.evaluate(G))],ceil:[Te,[Te],(G,[D])=>Math.ceil(D.evaluate(G))],"filter-==":[Ge,[He,jr],(G,[D,nt])=>G.properties()[D.value]===nt.value],"filter-id-==":[Ge,[jr],(G,[D])=>G.id()===D.value],"filter-type-==":[Ge,[He],(G,[D])=>G.geometryType()===D.value],"filter-<":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Rt=nt.value;return typeof bt==typeof Rt&&bt{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Rt=nt.value;return typeof bt==typeof Rt&&bt>Rt}],"filter-id->":[Ge,[jr],(G,[D])=>{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt>bt}],"filter-<=":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Rt=nt.value;return typeof bt==typeof Rt&&bt<=Rt}],"filter-id-<=":[Ge,[jr],(G,[D])=>{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt<=bt}],"filter->=":[Ge,[He,jr],(G,[D,nt])=>{let bt=G.properties()[D.value],Rt=nt.value;return typeof bt==typeof Rt&&bt>=Rt}],"filter-id->=":[Ge,[jr],(G,[D])=>{let nt=G.id(),bt=D.value;return typeof nt==typeof bt&&nt>=bt}],"filter-has":[Ge,[jr],(G,[D])=>D.value in G.properties()],"filter-has-id":[Ge,[],G=>G.id()!==null&&G.id()!==void 0],"filter-type-in":[Ge,[Gt(He)],(G,[D])=>D.value.indexOf(G.geometryType())>=0],"filter-id-in":[Ge,[Gt(jr)],(G,[D])=>D.value.indexOf(G.id())>=0],"filter-in-small":[Ge,[He,Gt(jr)],(G,[D,nt])=>nt.value.indexOf(G.properties()[D.value])>=0],"filter-in-large":[Ge,[He,Gt(jr)],(G,[D,nt])=>function(bt,Rt,Kt,Qt){for(;Kt<=Qt;){let be=Kt+Qt>>1;if(Rt[be]===bt)return!0;Rt[be]>bt?Qt=be-1:Kt=be+1}return!1}(G.properties()[D.value],nt.value,0,nt.value.length-1)],all:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)&&nt.evaluate(G)],[Hh(Ge),(G,D)=>{for(let nt of D)if(!nt.evaluate(G))return!1;return!0}]]},any:{type:Ge,overloads:[[[Ge,Ge],(G,[D,nt])=>D.evaluate(G)||nt.evaluate(G)],[Hh(Ge),(G,D)=>{for(let nt of D)if(nt.evaluate(G))return!0;return!1}]]},"!":[Ge,[Ge],(G,[D])=>!D.evaluate(G)],"is-supported-script":[Ge,[He],(G,[D])=>{let nt=G.globals&&G.globals.isSupportedScript;return!nt||nt(D.evaluate(G))}],upcase:[He,[He],(G,[D])=>D.evaluate(G).toUpperCase()],downcase:[He,[He],(G,[D])=>D.evaluate(G).toLowerCase()],concat:[He,Hh(jr),(G,D)=>D.map(nt=>za(nt.evaluate(G))).join("")],"resolved-locale":[He,[Wr],(G,[D])=>D.evaluate(G).resolvedLocale()]});class jc{constructor(D,nt){var bt;this.expression=D,this._warningHistory={},this._evaluator=new Yr,this._defaultValue=nt?(bt=nt).type==="color"&&Ef(bt.default)?new _r(0,0,0,0):bt.type==="color"?_r.parse(bt.default)||null:bt.type==="padding"?Mn.parse(bt.default)||null:bt.type==="variableAnchorOffsetCollection"?ki.parse(bt.default)||null:bt.default===void 0?null:bt.default:null,this._enumValues=nt&&nt.type==="enum"?nt.values:null}evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt){return this._evaluator.globals=D,this._evaluator.feature=nt,this._evaluator.featureState=bt,this._evaluator.canonical=Rt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt,this.expression.evaluate(this._evaluator)}evaluate(D,nt,bt,Rt,Kt,Qt){this._evaluator.globals=D,this._evaluator.feature=nt||null,this._evaluator.featureState=bt||null,this._evaluator.canonical=Rt,this._evaluator.availableImages=Kt||null,this._evaluator.formattedSection=Qt||null;try{let be=this.expression.evaluate(this._evaluator);if(be==null||typeof be=="number"&&be!=be)return this._defaultValue;if(this._enumValues&&!(be in this._enumValues))throw new ze(`Expected value to be one of ${Object.keys(this._enumValues).map(Be=>JSON.stringify(Be)).join(", ")}, but found ${JSON.stringify(be)} instead.`);return be}catch(be){return this._warningHistory[be.message]||(this._warningHistory[be.message]=!0,typeof console<"u"&&console.warn(be.message)),this._defaultValue}}}function Wh(G){return Array.isArray(G)&&G.length>0&&typeof G[0]=="string"&&G[0]in yf}function hu(G,D){let nt=new pn(yf,Uf,[],D?function(Rt){let Kt={color:cr,string:He,number:Te,enum:He,boolean:Ge,formatted:br,padding:Xr,resolvedImage:nn,variableAnchorOffsetCollection:Le};return Rt.type==="array"?Gt(Kt[Rt.value]||jr,Rt.length):Kt[Rt.type]}(D):void 0),bt=nt.parse(G,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return bt?Eh(new jc(bt,D)):gh(nt.errors)}class Ch{constructor(D,nt){this.kind=D,this._styleExpression=nt,this.isStateDependent=D!=="constant"&&!lh(nt.expression)}evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt)}evaluate(D,nt,bt,Rt,Kt,Qt){return this._styleExpression.evaluate(D,nt,bt,Rt,Kt,Qt)}}class Mc{constructor(D,nt,bt,Rt){this.kind=D,this.zoomStops=bt,this._styleExpression=nt,this.isStateDependent=D!=="camera"&&!lh(nt.expression),this.interpolationType=Rt}evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt){return this._styleExpression.evaluateWithoutErrorHandling(D,nt,bt,Rt,Kt,Qt)}evaluate(D,nt,bt,Rt,Kt,Qt){return this._styleExpression.evaluate(D,nt,bt,Rt,Kt,Qt)}interpolationFactor(D,nt,bt){return this.interpolationType?Da.interpolationFactor(this.interpolationType,D,nt,bt):0}}function Uc(G,D){let nt=hu(G,D);if(nt.result==="error")return nt;let bt=nt.value.expression,Rt=Vf(bt);if(!Rt&&!uc(D))return gh([new ee("","data expressions not supported")]);let Kt=Gf(bt,["zoom"]);if(!Kt&&!rf(D))return gh([new ee("","zoom expressions not supported")]);let Qt=uf(bt);return Qt||Kt?Qt instanceof ee?gh([Qt]):Qt instanceof Da&&!Hf(D)?gh([new ee("",'"interpolate" expressions cannot be used with this property')]):Eh(Qt?new Mc(Rt?"camera":"composite",nt.value,Qt.labels,Qt instanceof Da?Qt.interpolation:void 0):new Ch(Rt?"constant":"source",nt.value)):gh([new ee("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class bu{constructor(D,nt){this._parameters=D,this._specification=nt,Mt(this,Yf(this._parameters,this._specification))}static deserialize(D){return new bu(D._parameters,D._specification)}static serialize(D){return{_parameters:D._parameters,_specification:D._specification}}}function uf(G){let D=null;if(G instanceof on)D=uf(G.result);else if(G instanceof os){for(let nt of G.args)if(D=uf(nt),D)break}else(G instanceof Zn||G instanceof Da)&&G.input instanceof lc&&G.input.name==="zoom"&&(D=G);return D instanceof ee||G.eachChild(nt=>{let bt=uf(nt);bt instanceof ee?D=bt:!D&&bt?D=new ee("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&bt&&D!==bt&&(D=new ee("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function vh(G){if(G===!0||G===!1)return!0;if(!Array.isArray(G)||G.length===0)return!1;switch(G[0]){case"has":return G.length>=2&&G[1]!=="$id"&&G[1]!=="$type";case"in":return G.length>=3&&(typeof G[1]!="string"||Array.isArray(G[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return G.length!==3||Array.isArray(G[1])||Array.isArray(G[2]);case"any":case"all":for(let D of G.slice(1))if(!vh(D)&&typeof D!="boolean")return!1;return!0;default:return!0}}let qh={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Cf(G){if(G==null)return{filter:()=>!0,needGeometry:!1};vh(G)||(G=cf(G));let D=hu(G,qh);if(D.result==="error")throw new Error(D.value.map(nt=>`${nt.key}: ${nt.message}`).join(", "));return{filter:(nt,bt,Rt)=>D.value.evaluate(nt,bt,{},Rt),needGeometry:Jd(G)}}function Ld(G,D){return GD?1:0}function Jd(G){if(!Array.isArray(G))return!1;if(G[0]==="within"||G[0]==="distance")return!0;for(let D=1;D"||D==="<="||D===">="?Lf(G[1],G[2],D):D==="any"?(nt=G.slice(1),["any"].concat(nt.map(cf))):D==="all"?["all"].concat(G.slice(1).map(cf)):D==="none"?["all"].concat(G.slice(1).map(cf).map(Qc)):D==="in"?wc(G[1],G.slice(2)):D==="!in"?Qc(wc(G[1],G.slice(2))):D==="has"?hf(G[1]):D!=="!has"||Qc(hf(G[1]));var nt}function Lf(G,D,nt){switch(G){case"$type":return[`filter-type-${nt}`,D];case"$id":return[`filter-id-${nt}`,D];default:return[`filter-${nt}`,G,D]}}function wc(G,D){if(D.length===0)return!1;switch(G){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(nt=>typeof nt!=typeof D[0])?["filter-in-large",G,["literal",D.sort(Ld)]]:["filter-in-small",G,["literal",D]]}}function hf(G){switch(G){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",G]}}function Qc(G){return["!",G]}function ff(G){let D=typeof G;if(D==="number"||D==="boolean"||D==="string"||G==null)return JSON.stringify(G);if(Array.isArray(G)){let Rt="[";for(let Kt of G)Rt+=`${ff(Kt)},`;return`${Rt}]`}let nt=Object.keys(G).sort(),bt="{";for(let Rt=0;Rtbt.maximum?[new Lt(D,nt,`${nt} is greater than the maximum value ${bt.maximum}`)]:[]}function bf(G){let D=G.valueSpec,nt=wu(G.value.type),bt,Rt,Kt,Qt={},be=nt!=="categorical"&&G.value.property===void 0,Be=!be,rr=eu(G.value.stops)==="array"&&eu(G.value.stops[0])==="array"&&eu(G.value.stops[0][0])==="object",xr=Vc({key:G.key,value:G.value,valueSpec:G.styleSpec.function,validateSpec:G.validateSpec,style:G.style,styleSpec:G.styleSpec,objectElementValidators:{stops:function(ln){if(nt==="identity")return[new Lt(ln.key,ln.value,'identity function may not have a "stops" property')];let bn=[],Ln=ln.value;return bn=bn.concat(fd({key:ln.key,value:Ln,valueSpec:ln.valueSpec,validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec,arrayElementValidator:Lr})),eu(Ln)==="array"&&Ln.length===0&&bn.push(new Lt(ln.key,Ln,"array must have at least one stop")),bn},default:function(ln){return ln.validateSpec({key:ln.key,value:ln.value,valueSpec:D,validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec})}}});return nt==="identity"&&be&&xr.push(new Lt(G.key,G.value,'missing required property "property"')),nt==="identity"||G.value.stops||xr.push(new Lt(G.key,G.value,'missing required property "stops"')),nt==="exponential"&&G.valueSpec.expression&&!Hf(G.valueSpec)&&xr.push(new Lt(G.key,G.value,"exponential functions not supported")),G.styleSpec.$version>=8&&(Be&&!uc(G.valueSpec)?xr.push(new Lt(G.key,G.value,"property functions not supported")):be&&!rf(G.valueSpec)&&xr.push(new Lt(G.key,G.value,"zoom functions not supported"))),nt!=="categorical"&&!rr||G.value.property!==void 0||xr.push(new Lt(G.key,G.value,'"property" property is required')),xr;function Lr(ln){let bn=[],Ln=ln.value,Gn=ln.key;if(eu(Ln)!=="array")return[new Lt(Gn,Ln,`array expected, ${eu(Ln)} found`)];if(Ln.length!==2)return[new Lt(Gn,Ln,`array length 2 expected, length ${Ln.length} found`)];if(rr){if(eu(Ln[0])!=="object")return[new Lt(Gn,Ln,`object expected, ${eu(Ln[0])} found`)];if(Ln[0].zoom===void 0)return[new Lt(Gn,Ln,"object stop key must have zoom")];if(Ln[0].value===void 0)return[new Lt(Gn,Ln,"object stop key must have value")];if(Kt&&Kt>wu(Ln[0].zoom))return[new Lt(Gn,Ln[0].zoom,"stop zoom values must appear in ascending order")];wu(Ln[0].zoom)!==Kt&&(Kt=wu(Ln[0].zoom),Rt=void 0,Qt={}),bn=bn.concat(Vc({key:`${Gn}[0]`,value:Ln[0],valueSpec:{zoom:{}},validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec,objectElementValidators:{zoom:yu,value:Zr}}))}else bn=bn.concat(Zr({key:`${Gn}[0]`,value:Ln[0],validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec},Ln));return Wh(Lh(Ln[1]))?bn.concat([new Lt(`${Gn}[1]`,Ln[1],"expressions are not allowed in function stops.")]):bn.concat(ln.validateSpec({key:`${Gn}[1]`,value:Ln[1],valueSpec:D,validateSpec:ln.validateSpec,style:ln.style,styleSpec:ln.styleSpec}))}function Zr(ln,bn){let Ln=eu(ln.value),Gn=wu(ln.value),Mi=ln.value!==null?ln.value:bn;if(bt){if(Ln!==bt)return[new Lt(ln.key,Mi,`${Ln} stop domain type must match previous stop domain type ${bt}`)]}else bt=Ln;if(Ln!=="number"&&Ln!=="string"&&Ln!=="boolean")return[new Lt(ln.key,Mi,"stop domain value must be a number, string, or boolean")];if(Ln!=="number"&&nt!=="categorical"){let Aa=`number expected, ${Ln} found`;return uc(D)&&nt===void 0&&(Aa+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Lt(ln.key,Mi,Aa)]}return nt!=="categorical"||Ln!=="number"||isFinite(Gn)&&Math.floor(Gn)===Gn?nt!=="categorical"&&Ln==="number"&&Rt!==void 0&&Gnnew Lt(`${G.key}${bt.key}`,G.value,bt.message));let nt=D.value.expression||D.value._styleExpression.expression;if(G.expressionContext==="property"&&G.propertyKey==="text-font"&&!nt.outputDefined())return[new Lt(G.key,G.value,`Invalid data expression for "${G.propertyKey}". Output values must be contained as literals within the expression.`)];if(G.expressionContext==="property"&&G.propertyType==="layout"&&!lh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with layout properties.')];if(G.expressionContext==="filter"&&!lh(nt))return[new Lt(G.key,G.value,'"feature-state" data expressions are not supported with filters.')];if(G.expressionContext&&G.expressionContext.indexOf("cluster")===0){if(!Gf(nt,["zoom","feature-state"]))return[new Lt(G.key,G.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(G.expressionContext==="cluster-initial"&&!Vf(nt))return[new Lt(G.key,G.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function th(G){let D=G.key,nt=G.value,bt=G.valueSpec,Rt=[];return Array.isArray(bt.values)?bt.values.indexOf(wu(nt))===-1&&Rt.push(new Lt(D,nt,`expected one of [${bt.values.join(", ")}], ${JSON.stringify(nt)} found`)):Object.keys(bt.values).indexOf(wu(nt))===-1&&Rt.push(new Lt(D,nt,`expected one of [${Object.keys(bt.values).join(", ")}], ${JSON.stringify(nt)} found`)),Rt}function nf(G){return vh(Lh(G.value))?$h(Mt({},G,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Zh(G)}function Zh(G){let D=G.value,nt=G.key;if(eu(D)!=="array")return[new Lt(nt,D,`array expected, ${eu(D)} found`)];let bt=G.styleSpec,Rt,Kt=[];if(D.length<1)return[new Lt(nt,D,"filter array must have at least 1 element")];switch(Kt=Kt.concat(th({key:`${nt}[0]`,value:D[0],valueSpec:bt.filter_operator,style:G.style,styleSpec:G.styleSpec})),wu(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&wu(D[1])==="$type"&&Kt.push(new Lt(nt,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&Kt.push(new Lt(nt,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(Rt=eu(D[1]),Rt!=="string"&&Kt.push(new Lt(`${nt}[1]`,D[1],`string expected, ${Rt} found`)));for(let Qt=2;Qt{rr in nt&&D.push(new Lt(bt,nt[rr],`"${rr}" is prohibited for ref layers`))}),Rt.layers.forEach(rr=>{wu(rr.id)===be&&(Be=rr)}),Be?Be.ref?D.push(new Lt(bt,nt.ref,"ref cannot reference another ref layer")):Qt=wu(Be.type):D.push(new Lt(bt,nt.ref,`ref layer "${be}" not found`))}else if(Qt!=="background")if(nt.source){let Be=Rt.sources&&Rt.sources[nt.source],rr=Be&&wu(Be.type);Be?rr==="vector"&&Qt==="raster"?D.push(new Lt(bt,nt.source,`layer "${nt.id}" requires a raster source`)):rr!=="raster-dem"&&Qt==="hillshade"?D.push(new Lt(bt,nt.source,`layer "${nt.id}" requires a raster-dem source`)):rr==="raster"&&Qt!=="raster"?D.push(new Lt(bt,nt.source,`layer "${nt.id}" requires a vector source`)):rr!=="vector"||nt["source-layer"]?rr==="raster-dem"&&Qt!=="hillshade"?D.push(new Lt(bt,nt.source,"raster-dem source can only be used with layer type 'hillshade'.")):Qt!=="line"||!nt.paint||!nt.paint["line-gradient"]||rr==="geojson"&&Be.lineMetrics||D.push(new Lt(bt,nt,`layer "${nt.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new Lt(bt,nt,`layer "${nt.id}" must specify a "source-layer"`)):D.push(new Lt(bt,nt.source,`source "${nt.source}" not found`))}else D.push(new Lt(bt,nt,'missing required property "source"'));return D=D.concat(Vc({key:bt,value:nt,valueSpec:Kt.layer,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,objectElementValidators:{"*":()=>[],type:()=>G.validateSpec({key:`${bt}.type`,value:nt.type,valueSpec:Kt.layer.type,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,object:nt,objectKey:"type"}),filter:nf,layout:Be=>Vc({layer:nt,key:Be.key,value:Be.value,style:Be.style,styleSpec:Be.styleSpec,validateSpec:Be.validateSpec,objectElementValidators:{"*":rr=>gc(Mt({layerType:Qt},rr))}}),paint:Be=>Vc({layer:nt,key:Be.key,value:Be.value,style:Be.style,styleSpec:Be.styleSpec,validateSpec:Be.validateSpec,objectElementValidators:{"*":rr=>Pd(Mt({layerType:Qt},rr))}})}})),D}function eh(G){let D=G.value,nt=G.key,bt=eu(D);return bt!=="string"?[new Lt(nt,D,`string expected, ${bt} found`)]:[]}let Ph={promoteId:function({key:G,value:D}){if(eu(D)==="string")return eh({key:G,value:D});{let nt=[];for(let bt in D)nt.push(...eh({key:`${G}.${bt}`,value:D[bt]}));return nt}}};function xh(G){let D=G.value,nt=G.key,bt=G.styleSpec,Rt=G.style,Kt=G.validateSpec;if(!D.type)return[new Lt(nt,D,'"type" is required')];let Qt=wu(D.type),be;switch(Qt){case"vector":case"raster":return be=Vc({key:nt,value:D,valueSpec:bt[`source_${Qt.replace("-","_")}`],style:G.style,styleSpec:bt,objectElementValidators:Ph,validateSpec:Kt}),be;case"raster-dem":return be=function(Be){var rr;let xr=(rr=Be.sourceName)!==null&&rr!==void 0?rr:"",Lr=Be.value,Zr=Be.styleSpec,ln=Zr.source_raster_dem,bn=Be.style,Ln=[],Gn=eu(Lr);if(Lr===void 0)return Ln;if(Gn!=="object")return Ln.push(new Lt("source_raster_dem",Lr,`object expected, ${Gn} found`)),Ln;let Mi=wu(Lr.encoding)==="custom",Aa=["redFactor","greenFactor","blueFactor","baseShift"],ra=Be.value.encoding?`"${Be.value.encoding}"`:"Default";for(let ga in Lr)!Mi&&Aa.includes(ga)?Ln.push(new Lt(ga,Lr[ga],`In "${xr}": "${ga}" is only valid when "encoding" is set to "custom". ${ra} encoding found`)):ln[ga]?Ln=Ln.concat(Be.validateSpec({key:ga,value:Lr[ga],valueSpec:ln[ga],validateSpec:Be.validateSpec,style:bn,styleSpec:Zr})):Ln.push(new Lt(ga,Lr[ga],`unknown property "${ga}"`));return Ln}({sourceName:nt,value:D,style:G.style,styleSpec:bt,validateSpec:Kt}),be;case"geojson":if(be=Vc({key:nt,value:D,valueSpec:bt.source_geojson,style:Rt,styleSpec:bt,validateSpec:Kt,objectElementValidators:Ph}),D.cluster)for(let Be in D.clusterProperties){let[rr,xr]=D.clusterProperties[Be],Lr=typeof rr=="string"?[rr,["accumulated"],["get",Be]]:rr;be.push(...$h({key:`${nt}.${Be}.map`,value:xr,expressionContext:"cluster-map"})),be.push(...$h({key:`${nt}.${Be}.reduce`,value:Lr,expressionContext:"cluster-reduce"}))}return be;case"video":return Vc({key:nt,value:D,valueSpec:bt.source_video,style:Rt,validateSpec:Kt,styleSpec:bt});case"image":return Vc({key:nt,value:D,valueSpec:bt.source_image,style:Rt,validateSpec:Kt,styleSpec:bt});case"canvas":return[new Lt(nt,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return th({key:`${nt}.type`,value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Bu(G){let D=G.value,nt=G.styleSpec,bt=nt.light,Rt=G.style,Kt=[],Qt=eu(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("light",D,`object expected, ${Qt} found`)]),Kt;for(let be in D){let Be=be.match(/^(.*)-transition$/);Kt=Kt.concat(Be&&bt[Be[1]]&&bt[Be[1]].transition?G.validateSpec({key:be,value:D[be],valueSpec:nt.transition,validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):bt[be]?G.validateSpec({key:be,value:D[be],valueSpec:bt[be],validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)])}return Kt}function iu(G){let D=G.value,nt=G.styleSpec,bt=nt.sky,Rt=G.style,Kt=eu(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("sky",D,`object expected, ${Kt} found`)];let Qt=[];for(let be in D)Qt=Qt.concat(bt[be]?G.validateSpec({key:be,value:D[be],valueSpec:bt[be],style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Qt}function _h(G){let D=G.value,nt=G.styleSpec,bt=nt.terrain,Rt=G.style,Kt=[],Qt=eu(D);if(D===void 0)return Kt;if(Qt!=="object")return Kt=Kt.concat([new Lt("terrain",D,`object expected, ${Qt} found`)]),Kt;for(let be in D)Kt=Kt.concat(bt[be]?G.validateSpec({key:be,value:D[be],valueSpec:bt[be],validateSpec:G.validateSpec,style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Kt}function df(G){let D=[],nt=G.value,bt=G.key;if(Array.isArray(nt)){let Rt=[],Kt=[];for(let Qt in nt)nt[Qt].id&&Rt.includes(nt[Qt].id)&&D.push(new Lt(bt,nt,`all the sprites' ids must be unique, but ${nt[Qt].id} is duplicated`)),Rt.push(nt[Qt].id),nt[Qt].url&&Kt.includes(nt[Qt].url)&&D.push(new Lt(bt,nt,`all the sprites' URLs must be unique, but ${nt[Qt].url} is duplicated`)),Kt.push(nt[Qt].url),D=D.concat(Vc({key:`${bt}[${Qt}]`,value:nt[Qt],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:G.validateSpec}));return D}return eh({key:bt,value:nt})}let bh={"*":()=>[],array:fd,boolean:function(G){let D=G.value,nt=G.key,bt=eu(D);return bt!=="boolean"?[new Lt(nt,D,`boolean expected, ${bt} found`)]:[]},number:yu,color:function(G){let D=G.key,nt=G.value,bt=eu(nt);return bt!=="string"?[new Lt(D,nt,`color expected, ${bt} found`)]:_r.parse(String(nt))?[]:[new Lt(D,nt,`color expected, "${nt}" found`)]},constants:yh,enum:th,filter:nf,function:bf,layer:Jf,object:Vc,source:xh,light:Bu,sky:iu,terrain:_h,projection:function(G){let D=G.value,nt=G.styleSpec,bt=nt.projection,Rt=G.style,Kt=eu(D);if(D===void 0)return[];if(Kt!=="object")return[new Lt("projection",D,`object expected, ${Kt} found`)];let Qt=[];for(let be in D)Qt=Qt.concat(bt[be]?G.validateSpec({key:be,value:D[be],valueSpec:bt[be],style:Rt,styleSpec:nt}):[new Lt(be,D[be],`unknown property "${be}"`)]);return Qt},string:eh,formatted:function(G){return eh(G).length===0?[]:$h(G)},resolvedImage:function(G){return eh(G).length===0?[]:$h(G)},padding:function(G){let D=G.key,nt=G.value;if(eu(nt)==="array"){if(nt.length<1||nt.length>4)return[new Lt(D,nt,`padding requires 1 to 4 values; ${nt.length} values found`)];let bt={type:"number"},Rt=[];for(let Kt=0;Kt[]}})),G.constants&&(nt=nt.concat(yh({key:"constants",value:G.constants}))),hn(nt)}function wn(G){return function(D){return G(Tr(Mr({},D),{validateSpec:Wf}))}}function hn(G){return[].concat(G).sort((D,nt)=>D.line-nt.line)}function qn(G){return function(...D){return hn(G.apply(this,D))}}Ur.source=qn(wn(xh)),Ur.sprite=qn(wn(df)),Ur.glyphs=qn(wn(gr)),Ur.light=qn(wn(Bu)),Ur.sky=qn(wn(iu)),Ur.terrain=qn(wn(_h)),Ur.layer=qn(wn(Jf)),Ur.filter=qn(wn(nf)),Ur.paintProperty=qn(wn(Pd)),Ur.layoutProperty=qn(wn(gc));let di=Ur,aa=di.light,va=di.sky,Ba=di.paintProperty,Za=di.layoutProperty;function ca(G,D){let nt=!1;if(D&&D.length)for(let bt of D)G.fire(new Y(new Error(bt.message))),nt=!0;return nt}class Oa{constructor(D,nt,bt){let Rt=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let Qt=new Int32Array(this.arrayBuffer);D=Qt[0],this.d=(nt=Qt[1])+2*(bt=Qt[2]);for(let Be=0;Be=Lr[bn+0]&&Rt>=Lr[bn+1])?(be[ln]=!0,Qt.push(xr[ln])):be[ln]=!1}}}}_forEachCell(D,nt,bt,Rt,Kt,Qt,be,Be){let rr=this._convertToCellCoord(D),xr=this._convertToCellCoord(nt),Lr=this._convertToCellCoord(bt),Zr=this._convertToCellCoord(Rt);for(let ln=rr;ln<=Lr;ln++)for(let bn=xr;bn<=Zr;bn++){let Ln=this.d*bn+ln;if((!Be||Be(this._convertFromCellCoord(ln),this._convertFromCellCoord(bn),this._convertFromCellCoord(ln+1),this._convertFromCellCoord(bn+1)))&&Kt.call(this,D,nt,bt,Rt,Ln,Qt,be,Be))return}}_convertFromCellCoord(D){return(D-this.padding)/this.scale}_convertToCellCoord(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let D=this.cells,nt=3+this.cells.length+1+1,bt=0;for(let Qt=0;Qt=0)continue;let Qt=G[Kt];Rt[Kt]=ka[nt].shallow.indexOf(Kt)>=0?Qt:ls(Qt,D)}G instanceof Error&&(Rt.message=G.message)}if(Rt.$name)throw new Error("$name property is reserved for worker serialization logic.");return nt!=="Object"&&(Rt.$name=nt),Rt}function ps(G){if(Ko(G))return G;if(Array.isArray(G))return G.map(ps);if(typeof G!="object")throw new Error("can't deserialize object of type "+typeof G);let D=ns(G)||"Object";if(!ka[D])throw new Error(`can't deserialize unregistered class ${D}`);let{klass:nt}=ka[D];if(!nt)throw new Error(`can't deserialize unregistered class ${D}`);if(nt.deserialize)return nt.deserialize(G);let bt=Object.create(nt.prototype);for(let Rt of Object.keys(G)){if(Rt==="$name")continue;let Kt=G[Rt];bt[Rt]=ka[D].shallow.indexOf(Rt)>=0?Kt:ps(Kt)}return bt}class oo{constructor(){this.first=!0}update(D,nt){let bt=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=bt,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=bt,!0):(this.lastFloorZoom>bt?(this.lastIntegerZoom=bt+1,this.lastIntegerZoomTime=nt):this.lastFloorZoomG>=128&&G<=255,"Hangul Jamo":G=>G>=4352&&G<=4607,Khmer:G=>G>=6016&&G<=6143,"General Punctuation":G=>G>=8192&&G<=8303,"Letterlike Symbols":G=>G>=8448&&G<=8527,"Number Forms":G=>G>=8528&&G<=8591,"Miscellaneous Technical":G=>G>=8960&&G<=9215,"Control Pictures":G=>G>=9216&&G<=9279,"Optical Character Recognition":G=>G>=9280&&G<=9311,"Enclosed Alphanumerics":G=>G>=9312&&G<=9471,"Geometric Shapes":G=>G>=9632&&G<=9727,"Miscellaneous Symbols":G=>G>=9728&&G<=9983,"Miscellaneous Symbols and Arrows":G=>G>=11008&&G<=11263,"Ideographic Description Characters":G=>G>=12272&&G<=12287,"CJK Symbols and Punctuation":G=>G>=12288&&G<=12351,Katakana:G=>G>=12448&&G<=12543,Kanbun:G=>G>=12688&&G<=12703,"CJK Strokes":G=>G>=12736&&G<=12783,"Enclosed CJK Letters and Months":G=>G>=12800&&G<=13055,"CJK Compatibility":G=>G>=13056&&G<=13311,"Yijing Hexagram Symbols":G=>G>=19904&&G<=19967,"Private Use Area":G=>G>=57344&&G<=63743,"Vertical Forms":G=>G>=65040&&G<=65055,"CJK Compatibility Forms":G=>G>=65072&&G<=65103,"Small Form Variants":G=>G>=65104&&G<=65135,"Halfwidth and Fullwidth Forms":G=>G>=65280&&G<=65519};function gs(G){for(let D of G)if(ml(D.charCodeAt(0)))return!0;return!1}function el(G){for(let D of G)if(!$l(D.charCodeAt(0)))return!1;return!0}function Pl(G){let D=G.map(nt=>{try{return new RegExp(`\\p{sc=${nt}}`,"u").source}catch{return null}}).filter(nt=>nt);return new RegExp(D.join("|"),"u")}let su=Pl(["Arab","Dupl","Mong","Ougr","Syrc"]);function $l(G){return!su.test(String.fromCodePoint(G))}let lu=Pl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ml(G){return!(G!==746&&G!==747&&(G<4352||!(qa["CJK Compatibility Forms"](G)&&!(G>=65097&&G<=65103)||qa["CJK Compatibility"](G)||qa["CJK Strokes"](G)||!(!qa["CJK Symbols and Punctuation"](G)||G>=12296&&G<=12305||G>=12308&&G<=12319||G===12336)||qa["Enclosed CJK Letters and Months"](G)||qa["Ideographic Description Characters"](G)||qa.Kanbun(G)||qa.Katakana(G)&&G!==12540||!(!qa["Halfwidth and Fullwidth Forms"](G)||G===65288||G===65289||G===65293||G>=65306&&G<=65310||G===65339||G===65341||G===65343||G>=65371&&G<=65503||G===65507||G>=65512&&G<=65519)||!(!qa["Small Form Variants"](G)||G>=65112&&G<=65118||G>=65123&&G<=65126)||qa["Vertical Forms"](G)||qa["Yijing Hexagram Symbols"](G)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(G))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(G))||lu.test(String.fromCodePoint(G)))))}function qu(G){return!(ml(G)||function(D){return!!(qa["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||qa["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||qa["Letterlike Symbols"](D)||qa["Number Forms"](D)||qa["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||qa["Control Pictures"](D)&&D!==9251||qa["Optical Character Recognition"](D)||qa["Enclosed Alphanumerics"](D)||qa["Geometric Shapes"](D)||qa["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||qa["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||qa["CJK Symbols and Punctuation"](D)||qa.Katakana(D)||qa["Private Use Area"](D)||qa["CJK Compatibility Forms"](D)||qa["Small Form Variants"](D)||qa["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}(G))}let Iu=Pl(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function fu(G){return Iu.test(String.fromCodePoint(G))}function Oo(G,D){return!(!D&&fu(G)||G>=2304&&G<=3583||G>=3840&&G<=4255||qa.Khmer(G))}function Es(G){for(let D of G)if(fu(D.charCodeAt(0)))return!0;return!1}let Kl=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(G){this.pluginStatus=G.pluginStatus,this.pluginURL=G.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(G){this.applyArabicShaping=G.applyArabicShaping,this.processBidirectionalText=G.processBidirectionalText,this.processStyledBidirectionalText=G.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Rl{constructor(D,nt){this.zoom=D,nt?(this.now=nt.now,this.fadeDuration=nt.fadeDuration,this.zoomHistory=nt.zoomHistory,this.transition=nt.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new oo,this.transition={})}isSupportedScript(D){return function(nt,bt){for(let Rt of nt)if(!Oo(Rt.charCodeAt(0),bt))return!1;return!0}(D,Kl.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let D=this.zoom,nt=D-Math.floor(D),bt=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:nt+(1-nt)*bt}:{fromScale:.5,toScale:1,t:1-(1-bt)*nt}}}class vc{constructor(D,nt){this.property=D,this.value=nt,this.expression=function(bt,Rt){if(Ef(bt))return new bu(bt,Rt);if(Wh(bt)){let Kt=Uc(bt,Rt);if(Kt.result==="error")throw new Error(Kt.value.map(Qt=>`${Qt.key}: ${Qt.message}`).join(", "));return Kt.value}{let Kt=bt;return Rt.type==="color"&&typeof bt=="string"?Kt=_r.parse(bt):Rt.type!=="padding"||typeof bt!="number"&&!Array.isArray(bt)?Rt.type==="variableAnchorOffsetCollection"&&Array.isArray(bt)&&(Kt=ki.parse(bt)):Kt=Mn.parse(bt),{kind:"constant",evaluate:()=>Kt}}}(nt===void 0?D.specification.default:nt,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,nt,bt){return this.property.possiblyEvaluate(this,D,nt,bt)}}class Hc{constructor(D){this.property=D,this.value=new vc(D,void 0)}transitioned(D,nt){return new Ih(this.property,this.value,nt,M({},D.transition,this.transition),D.now)}untransitioned(){return new Ih(this.property,this.value,null,{},0)}}class Lc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)}getValue(D){return p(this._values[D].value.value)}setValue(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].value=new vc(this._values[D].property,nt===null?void 0:p(nt))}getTransition(D){return p(this._values[D].transition)}setTransition(D,nt){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Hc(this._values[D].property)),this._values[D].transition=p(nt)||void 0}serialize(){let D={};for(let nt of Object.keys(this._values)){let bt=this.getValue(nt);bt!==void 0&&(D[nt]=bt);let Rt=this.getTransition(nt);Rt!==void 0&&(D[`${nt}-transition`]=Rt)}return D}transitioned(D,nt){let bt=new Wc(this._properties);for(let Rt of Object.keys(this._values))bt._values[Rt]=this._values[Rt].transitioned(D,nt._values[Rt]);return bt}untransitioned(){let D=new Wc(this._properties);for(let nt of Object.keys(this._values))D._values[nt]=this._values[nt].untransitioned();return D}}class Ih{constructor(D,nt,bt,Rt,Kt){this.property=D,this.value=nt,this.begin=Kt+Rt.delay||0,this.end=this.begin+Rt.duration||0,D.specification.transition&&(Rt.delay||Rt.duration)&&(this.prior=bt)}possiblyEvaluate(D,nt,bt){let Rt=D.now||0,Kt=this.value.possiblyEvaluate(D,nt,bt),Qt=this.prior;if(Qt){if(Rt>this.end)return this.prior=null,Kt;if(this.value.isDataDriven())return this.prior=null,Kt;if(Rt=1)return 1;let rr=Be*Be,xr=rr*Be;return 4*(Be<.5?xr:3*(Be-rr)+xr-.75)}(be))}}return Kt}}class Wc{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,nt,bt){let Rt=new Oh(this._properties);for(let Kt of Object.keys(this._values))Rt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,bt);return Rt}hasTransition(){for(let D of Object.keys(this._values))if(this._values[D].prior)return!0;return!1}}class zh{constructor(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)}hasValue(D){return this._values[D].value!==void 0}getValue(D){return p(this._values[D].value)}setValue(D,nt){this._values[D]=new vc(this._values[D].property,nt===null?void 0:p(nt))}serialize(){let D={};for(let nt of Object.keys(this._values)){let bt=this.getValue(nt);bt!==void 0&&(D[nt]=bt)}return D}possiblyEvaluate(D,nt,bt){let Rt=new Oh(this._properties);for(let Kt of Object.keys(this._values))Rt._values[Kt]=this._values[Kt].possiblyEvaluate(D,nt,bt);return Rt}}class Du{constructor(D,nt,bt){this.property=D,this.value=nt,this.parameters=bt}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,nt,bt,Rt){return this.property.evaluate(this.value,this.parameters,D,nt,bt,Rt)}}class Oh{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class rs{constructor(D){this.specification=D}possiblyEvaluate(D,nt){if(D.isDataDriven())throw new Error("Value should not be data driven");return D.expression.evaluate(nt)}interpolate(D,nt,bt){let Rt=Fo[this.specification.type];return Rt?Rt(D,nt,bt):D}}class zs{constructor(D,nt){this.specification=D,this.overrides=nt}possiblyEvaluate(D,nt,bt,Rt){return new Du(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(nt,null,{},bt,Rt)}:D.expression,nt)}interpolate(D,nt,bt){if(D.value.kind!=="constant"||nt.value.kind!=="constant")return D;if(D.value.value===void 0||nt.value.value===void 0)return new Du(this,{kind:"constant",value:void 0},D.parameters);let Rt=Fo[this.specification.type];if(Rt){let Kt=Rt(D.value.value,nt.value.value,bt);return new Du(this,{kind:"constant",value:Kt},D.parameters)}return D}evaluate(D,nt,bt,Rt,Kt,Qt){return D.kind==="constant"?D.value:D.evaluate(nt,bt,Rt,Kt,Qt)}}class qc extends zs{possiblyEvaluate(D,nt,bt,Rt){if(D.value===void 0)return new Du(this,{kind:"constant",value:void 0},nt);if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},bt,Rt),Qt=D.property.specification.type==="resolvedImage"&&typeof Kt!="string"?Kt.name:Kt,be=this._calculate(Qt,Qt,Qt,nt);return new Du(this,{kind:"constant",value:be},nt)}if(D.expression.kind==="camera"){let Kt=this._calculate(D.expression.evaluate({zoom:nt.zoom-1}),D.expression.evaluate({zoom:nt.zoom}),D.expression.evaluate({zoom:nt.zoom+1}),nt);return new Du(this,{kind:"constant",value:Kt},nt)}return new Du(this,D.expression,nt)}evaluate(D,nt,bt,Rt,Kt,Qt){if(D.kind==="source"){let be=D.evaluate(nt,bt,Rt,Kt,Qt);return this._calculate(be,be,be,nt)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(nt.zoom)-1},bt,Rt),D.evaluate({zoom:Math.floor(nt.zoom)},bt,Rt),D.evaluate({zoom:Math.floor(nt.zoom)+1},bt,Rt),nt):D.value}_calculate(D,nt,bt,Rt){return Rt.zoom>Rt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:bt,to:nt}}interpolate(D){return D}}class $u{constructor(D){this.specification=D}possiblyEvaluate(D,nt,bt,Rt){if(D.value!==void 0){if(D.expression.kind==="constant"){let Kt=D.expression.evaluate(nt,null,{},bt,Rt);return this._calculate(Kt,Kt,Kt,nt)}return this._calculate(D.expression.evaluate(new Rl(Math.floor(nt.zoom-1),nt)),D.expression.evaluate(new Rl(Math.floor(nt.zoom),nt)),D.expression.evaluate(new Rl(Math.floor(nt.zoom+1),nt)),nt)}}_calculate(D,nt,bt,Rt){return Rt.zoom>Rt.zoomHistory.lastIntegerZoom?{from:D,to:nt}:{from:bt,to:nt}}interpolate(D){return D}}class qf{constructor(D){this.specification=D}possiblyEvaluate(D,nt,bt,Rt){return!!D.expression.evaluate(nt,null,{},bt,Rt)}interpolate(){return!1}}class $t{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let nt in D){let bt=D[nt];bt.specification.overridable&&this.overridableProperties.push(nt);let Rt=this.defaultPropertyValues[nt]=new vc(bt,void 0),Kt=this.defaultTransitionablePropertyValues[nt]=new Hc(bt);this.defaultTransitioningPropertyValues[nt]=Kt.untransitioned(),this.defaultPossiblyEvaluatedValues[nt]=Rt.possiblyEvaluate({})}}}na("DataDrivenProperty",zs),na("DataConstantProperty",rs),na("CrossFadedDataDrivenProperty",qc),na("CrossFadedProperty",$u),na("ColorRampProperty",qf);let z="-transition";class ht extends ft{constructor(D,nt){if(super(),this.id=D.id,this.type=D.type,this._featureFilter={filter:()=>!0,needGeometry:!1},D.type!=="custom"&&(this.metadata=D.metadata,this.minzoom=D.minzoom,this.maxzoom=D.maxzoom,D.type!=="background"&&(this.source=D.source,this.sourceLayer=D["source-layer"],this.filter=D.filter),nt.layout&&(this._unevaluatedLayout=new zh(nt.layout)),nt.paint)){this._transitionablePaint=new Lc(nt.paint);for(let bt in D.paint)this.setPaintProperty(bt,D.paint[bt],{validate:!1});for(let bt in D.layout)this.setLayoutProperty(bt,D.layout[bt],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Oh(nt.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(D){return D==="visibility"?this.visibility:this._unevaluatedLayout.getValue(D)}setLayoutProperty(D,nt,bt={}){nt!=null&&this._validate(Za,`layers.${this.id}.layout.${D}`,D,nt,bt)||(D!=="visibility"?this._unevaluatedLayout.setValue(D,nt):this.visibility=nt)}getPaintProperty(D){return D.endsWith(z)?this._transitionablePaint.getTransition(D.slice(0,-11)):this._transitionablePaint.getValue(D)}setPaintProperty(D,nt,bt={}){if(nt!=null&&this._validate(Ba,`layers.${this.id}.paint.${D}`,D,nt,bt))return!1;if(D.endsWith(z))return this._transitionablePaint.setTransition(D.slice(0,-11),nt||void 0),!1;{let Rt=this._transitionablePaint._values[D],Kt=Rt.property.specification["property-type"]==="cross-faded-data-driven",Qt=Rt.value.isDataDriven(),be=Rt.value;this._transitionablePaint.setValue(D,nt),this._handleSpecialPaintPropertyUpdate(D);let Be=this._transitionablePaint._values[D].value;return Be.isDataDriven()||Qt||Kt||this._handleOverridablePaintPropertyUpdate(D,be,Be)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,nt,bt){return!1}isHidden(D){return!!(this.minzoom&&D=this.maxzoom)||this.visibility==="none"}updateTransitions(D){this._transitioningPaint=this._transitionablePaint.transitioned(D,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(D,nt){D.getCrossfadeParameters&&(this._crossfadeParameters=D.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(D,void 0,nt)),this.paint=this._transitioningPaint.possiblyEvaluate(D,void 0,nt)}serialize(){let D={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(D.layout=D.layout||{},D.layout.visibility=this.visibility),h(D,(nt,bt)=>!(nt===void 0||bt==="layout"&&!Object.keys(nt).length||bt==="paint"&&!Object.keys(nt).length))}_validate(D,nt,bt,Rt,Kt={}){return(!Kt||Kt.validate!==!1)&&ca(this,D.call(di,{key:nt,layerType:this.type,objectKey:bt,value:Rt,styleSpec:ut,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let D in this.paint._values){let nt=this.paint.get(D);if(nt instanceof Du&&uc(nt.property.specification)&&(nt.value.kind==="source"||nt.value.kind==="composite")&&nt.value.isStateDependent)return!0}return!1}}let Et={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class zt{constructor(D,nt){this._structArray=D,this._pos1=nt*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Ht{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(D,nt){return D._trim(),nt&&(D.isTransferred=!0,nt.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}}static deserialize(D){let nt=Object.create(this.prototype);return nt.arrayBuffer=D.arrayBuffer,nt.length=D.length,nt.capacity=D.arrayBuffer.byteLength/nt.bytesPerElement,nt._refreshViews(),nt}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(D){this.reserve(D),this.length=D}reserve(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let nt=this.uint8;this._refreshViews(),nt&&this.uint8.set(nt)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ke(G,D=1){let nt=0,bt=0;return{members:G.map(Rt=>{let Kt=Et[Rt.type].BYTES_PER_ELEMENT,Qt=nt=Fe(nt,Math.max(D,Kt)),be=Rt.components||1;return bt=Math.max(bt,Kt),nt+=Kt*be,{name:Rt.name,type:Rt.type,components:be,offset:Qt}}),size:Fe(nt,Math.max(bt,D)),alignment:D}}function Fe(G,D){return Math.ceil(G/D)*D}class Ke extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt){let bt=this.length;return this.resize(bt+1),this.emplace(bt,D,nt)}emplace(D,nt,bt){let Rt=2*D;return this.int16[Rt+0]=nt,this.int16[Rt+1]=bt,D}}Ke.prototype.bytesPerElement=4,na("StructArrayLayout2i4",Ke);class vr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=3*D;return this.int16[Kt+0]=nt,this.int16[Kt+1]=bt,this.int16[Kt+2]=Rt,D}}vr.prototype.bytesPerElement=6,na("StructArrayLayout3i6",vr);class Dr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,bt,Rt)}emplace(D,nt,bt,Rt,Kt){let Qt=4*D;return this.int16[Qt+0]=nt,this.int16[Qt+1]=bt,this.int16[Qt+2]=Rt,this.int16[Qt+3]=Kt,D}}Dr.prototype.bytesPerElement=8,na("StructArrayLayout4i8",Dr);class Fr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,bt,Rt,Kt,Qt)}emplace(D,nt,bt,Rt,Kt,Qt,be){let Be=6*D;return this.int16[Be+0]=nt,this.int16[Be+1]=bt,this.int16[Be+2]=Rt,this.int16[Be+3]=Kt,this.int16[Be+4]=Qt,this.int16[Be+5]=be,D}}Fr.prototype.bytesPerElement=12,na("StructArrayLayout2i4i12",Fr);class un extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,bt,Rt,Kt,Qt)}emplace(D,nt,bt,Rt,Kt,Qt,be){let Be=4*D,rr=8*D;return this.int16[Be+0]=nt,this.int16[Be+1]=bt,this.uint8[rr+4]=Rt,this.uint8[rr+5]=Kt,this.uint8[rr+6]=Qt,this.uint8[rr+7]=be,D}}un.prototype.bytesPerElement=8,na("StructArrayLayout2i4ub8",un);class Sn extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt){let bt=this.length;return this.resize(bt+1),this.emplace(bt,D,nt)}emplace(D,nt,bt){let Rt=2*D;return this.float32[Rt+0]=nt,this.float32[Rt+1]=bt,D}}Sn.prototype.bytesPerElement=8,na("StructArrayLayout2f8",Sn);class Xt extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr){let Lr=this.length;return this.resize(Lr+1),this.emplace(Lr,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr){let Zr=10*D;return this.uint16[Zr+0]=nt,this.uint16[Zr+1]=bt,this.uint16[Zr+2]=Rt,this.uint16[Zr+3]=Kt,this.uint16[Zr+4]=Qt,this.uint16[Zr+5]=be,this.uint16[Zr+6]=Be,this.uint16[Zr+7]=rr,this.uint16[Zr+8]=xr,this.uint16[Zr+9]=Lr,D}}Xt.prototype.bytesPerElement=20,na("StructArrayLayout10ui20",Xt);class ae extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr){let ln=this.length;return this.resize(ln+1),this.emplace(ln,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln){let bn=12*D;return this.int16[bn+0]=nt,this.int16[bn+1]=bt,this.int16[bn+2]=Rt,this.int16[bn+3]=Kt,this.uint16[bn+4]=Qt,this.uint16[bn+5]=be,this.uint16[bn+6]=Be,this.uint16[bn+7]=rr,this.int16[bn+8]=xr,this.int16[bn+9]=Lr,this.int16[bn+10]=Zr,this.int16[bn+11]=ln,D}}ae.prototype.bytesPerElement=24,na("StructArrayLayout4i4ui4i24",ae);class xe extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=3*D;return this.float32[Kt+0]=nt,this.float32[Kt+1]=bt,this.float32[Kt+2]=Rt,D}}xe.prototype.bytesPerElement=12,na("StructArrayLayout3f12",xe);class Ae extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint32[1*D+0]=nt,D}}Ae.prototype.bytesPerElement=4,na("StructArrayLayout1ul4",Ae);class je extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr){let xr=this.length;return this.resize(xr+1),this.emplace(xr,D,nt,bt,Rt,Kt,Qt,be,Be,rr)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr){let Lr=10*D,Zr=5*D;return this.int16[Lr+0]=nt,this.int16[Lr+1]=bt,this.int16[Lr+2]=Rt,this.int16[Lr+3]=Kt,this.int16[Lr+4]=Qt,this.int16[Lr+5]=be,this.uint32[Zr+3]=Be,this.uint16[Lr+8]=rr,this.uint16[Lr+9]=xr,D}}je.prototype.bytesPerElement=20,na("StructArrayLayout6i1ul2ui20",je);class Oe extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,bt,Rt,Kt,Qt)}emplace(D,nt,bt,Rt,Kt,Qt,be){let Be=6*D;return this.int16[Be+0]=nt,this.int16[Be+1]=bt,this.int16[Be+2]=Rt,this.int16[Be+3]=Kt,this.int16[Be+4]=Qt,this.int16[Be+5]=be,D}}Oe.prototype.bytesPerElement=12,na("StructArrayLayout2i2i2i12",Oe);class $e extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt){let Qt=this.length;return this.resize(Qt+1),this.emplace(Qt,D,nt,bt,Rt,Kt)}emplace(D,nt,bt,Rt,Kt,Qt){let be=4*D,Be=8*D;return this.float32[be+0]=nt,this.float32[be+1]=bt,this.float32[be+2]=Rt,this.int16[Be+6]=Kt,this.int16[Be+7]=Qt,D}}$e.prototype.bytesPerElement=16,na("StructArrayLayout2f1f2i16",$e);class wr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt){let be=this.length;return this.resize(be+1),this.emplace(be,D,nt,bt,Rt,Kt,Qt)}emplace(D,nt,bt,Rt,Kt,Qt,be){let Be=16*D,rr=4*D,xr=8*D;return this.uint8[Be+0]=nt,this.uint8[Be+1]=bt,this.float32[rr+1]=Rt,this.float32[rr+2]=Kt,this.int16[xr+6]=Qt,this.int16[xr+7]=be,D}}wr.prototype.bytesPerElement=16,na("StructArrayLayout2ub2f2i16",wr);class Or extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=3*D;return this.uint16[Kt+0]=nt,this.uint16[Kt+1]=bt,this.uint16[Kt+2]=Rt,D}}Or.prototype.bytesPerElement=6,na("StructArrayLayout3ui6",Or);class Nr extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi){let Aa=this.length;return this.resize(Aa+1),this.emplace(Aa,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa){let ra=24*D,ga=12*D,Ya=48*D;return this.int16[ra+0]=nt,this.int16[ra+1]=bt,this.uint16[ra+2]=Rt,this.uint16[ra+3]=Kt,this.uint32[ga+2]=Qt,this.uint32[ga+3]=be,this.uint32[ga+4]=Be,this.uint16[ra+10]=rr,this.uint16[ra+11]=xr,this.uint16[ra+12]=Lr,this.float32[ga+7]=Zr,this.float32[ga+8]=ln,this.uint8[Ya+36]=bn,this.uint8[Ya+37]=Ln,this.uint8[Ya+38]=Gn,this.uint32[ga+10]=Mi,this.int16[ra+22]=Aa,D}}Nr.prototype.bytesPerElement=48,na("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nr);class en extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa,ra,ga,Ya,Ao,Ss,Sl,_s,fs,Xs,js){let Os=this.length;return this.resize(Os+1),this.emplace(Os,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa,ra,ga,Ya,Ao,Ss,Sl,_s,fs,Xs,js)}emplace(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln,Gn,Mi,Aa,ra,ga,Ya,Ao,Ss,Sl,_s,fs,Xs,js,Os){let uo=32*D,il=16*D;return this.int16[uo+0]=nt,this.int16[uo+1]=bt,this.int16[uo+2]=Rt,this.int16[uo+3]=Kt,this.int16[uo+4]=Qt,this.int16[uo+5]=be,this.int16[uo+6]=Be,this.int16[uo+7]=rr,this.uint16[uo+8]=xr,this.uint16[uo+9]=Lr,this.uint16[uo+10]=Zr,this.uint16[uo+11]=ln,this.uint16[uo+12]=bn,this.uint16[uo+13]=Ln,this.uint16[uo+14]=Gn,this.uint16[uo+15]=Mi,this.uint16[uo+16]=Aa,this.uint16[uo+17]=ra,this.uint16[uo+18]=ga,this.uint16[uo+19]=Ya,this.uint16[uo+20]=Ao,this.uint16[uo+21]=Ss,this.uint16[uo+22]=Sl,this.uint32[il+12]=_s,this.float32[il+13]=fs,this.float32[il+14]=Xs,this.uint16[uo+30]=js,this.uint16[uo+31]=Os,D}}en.prototype.bytesPerElement=64,na("StructArrayLayout8i15ui1ul2f2ui64",en);class vn extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.float32[1*D+0]=nt,D}}vn.prototype.bytesPerElement=4,na("StructArrayLayout1f4",vn);class In extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=3*D;return this.uint16[6*D+0]=nt,this.float32[Kt+1]=bt,this.float32[Kt+2]=Rt,D}}In.prototype.bytesPerElement=12,na("StructArrayLayout1ui2f12",In);class Nn extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt,bt){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,D,nt,bt)}emplace(D,nt,bt,Rt){let Kt=4*D;return this.uint32[2*D+0]=nt,this.uint16[Kt+2]=bt,this.uint16[Kt+3]=Rt,D}}Nn.prototype.bytesPerElement=8,na("StructArrayLayout1ul2ui8",Nn);class ii extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,nt){let bt=this.length;return this.resize(bt+1),this.emplace(bt,D,nt)}emplace(D,nt,bt){let Rt=2*D;return this.uint16[Rt+0]=nt,this.uint16[Rt+1]=bt,D}}ii.prototype.bytesPerElement=4,na("StructArrayLayout2ui4",ii);class Ui extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D){let nt=this.length;return this.resize(nt+1),this.emplace(nt,D)}emplace(D,nt){return this.uint16[1*D+0]=nt,D}}Ui.prototype.bytesPerElement=2,na("StructArrayLayout1ui2",Ui);class pa extends Ht{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,nt,bt,Rt){let Kt=this.length;return this.resize(Kt+1),this.emplace(Kt,D,nt,bt,Rt)}emplace(D,nt,bt,Rt,Kt){let Qt=4*D;return this.float32[Qt+0]=nt,this.float32[Qt+1]=bt,this.float32[Qt+2]=Rt,this.float32[Qt+3]=Kt,D}}pa.prototype.bytesPerElement=16,na("StructArrayLayout4f16",pa);class fa extends zt{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}fa.prototype.size=20;class Ta extends je{get(D){return new fa(this,D)}}na("CollisionBoxArray",Ta);class so extends zt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(D){this._structArray.uint8[this._pos1+37]=D}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(D){this._structArray.uint8[this._pos1+38]=D}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(D){this._structArray.uint32[this._pos4+10]=D}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}so.prototype.size=48;class Bo extends Nr{get(D){return new so(this,D)}}na("PlacedSymbolArray",Bo);class So extends zt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(D){this._structArray.uint32[this._pos4+12]=D}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}So.prototype.size=64;class ds extends en{get(D){return new So(this,D)}}na("SymbolInstanceArray",ds);class fl extends vn{getoffsetX(D){return this.float32[1*D+0]}}na("GlyphOffsetArray",fl);class vl extends vr{getx(D){return this.int16[3*D+0]}gety(D){return this.int16[3*D+1]}gettileUnitDistanceFromAnchor(D){return this.int16[3*D+2]}}na("SymbolLineVertexArray",vl);class Ds extends zt{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ds.prototype.size=12;class wl extends In{get(D){return new Ds(this,D)}}na("TextAnchorOffsetArray",wl);class Eu extends zt{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Eu.prototype.size=8;class gu extends Nn{get(D){return new Eu(this,D)}}na("FeatureIndexArray",gu);class $s extends Ke{}class Zs extends Ke{}class Yu extends Ke{}class dc extends Fr{}class $c extends un{}class At extends Sn{}class Ut extends Xt{}class ue extends ae{}class Me extends xe{}class Pe extends Ae{}class Ne extends Oe{}class sr extends wr{}class ar extends Or{}class Er extends ii{}let rn=ke([{name:"a_pos",components:2,type:"Int16"}],4),{members:Jr}=rn;class xn{constructor(D=[]){this.segments=D}prepareSegment(D,nt,bt,Rt){let Kt=this.segments[this.segments.length-1];return D>xn.MAX_VERTEX_ARRAY_LENGTH&&w(`Max vertices per segment is ${xn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!Kt||Kt.vertexLength+D>xn.MAX_VERTEX_ARRAY_LENGTH||Kt.sortKey!==Rt)&&(Kt={vertexOffset:nt.length,primitiveOffset:bt.length,vertexLength:0,primitiveLength:0},Rt!==void 0&&(Kt.sortKey=Rt),this.segments.push(Kt)),Kt}get(){return this.segments}destroy(){for(let D of this.segments)for(let nt in D.vaos)D.vaos[nt].destroy()}static simpleSegment(D,nt,bt,Rt){return new xn([{vertexOffset:D,primitiveOffset:nt,vertexLength:bt,primitiveLength:Rt,vaos:{},sortKey:0}])}}function zn(G,D){return 256*(G=_(Math.floor(G),0,255))+_(Math.floor(D),0,255)}xn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,na("SegmentVector",xn);let On=ke([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Hi={exports:{}},Vn={exports:{}};Vn.exports=function(G,D){var nt,bt,Rt,Kt,Qt,be,Be,rr;for(bt=G.length-(nt=3&G.length),Rt=D,Qt=3432918353,be=461845907,rr=0;rr>>16)*Qt&65535)<<16)&4294967295)<<15|Be>>>17))*be+(((Be>>>16)*be&65535)<<16)&4294967295)<<13|Rt>>>19))+((5*(Rt>>>16)&65535)<<16)&4294967295))+((58964+(Kt>>>16)&65535)<<16);switch(Be=0,nt){case 3:Be^=(255&G.charCodeAt(rr+2))<<16;case 2:Be^=(255&G.charCodeAt(rr+1))<<8;case 1:Rt^=Be=(65535&(Be=(Be=(65535&(Be^=255&G.charCodeAt(rr)))*Qt+(((Be>>>16)*Qt&65535)<<16)&4294967295)<<15|Be>>>17))*be+(((Be>>>16)*be&65535)<<16)&4294967295}return Rt^=G.length,Rt=2246822507*(65535&(Rt^=Rt>>>16))+((2246822507*(Rt>>>16)&65535)<<16)&4294967295,Rt=3266489909*(65535&(Rt^=Rt>>>13))+((3266489909*(Rt>>>16)&65535)<<16)&4294967295,(Rt^=Rt>>>16)>>>0};var yi=Vn.exports,Si={exports:{}};Si.exports=function(G,D){for(var nt,bt=G.length,Rt=D^bt,Kt=0;bt>=4;)nt=1540483477*(65535&(nt=255&G.charCodeAt(Kt)|(255&G.charCodeAt(++Kt))<<8|(255&G.charCodeAt(++Kt))<<16|(255&G.charCodeAt(++Kt))<<24))+((1540483477*(nt>>>16)&65535)<<16),Rt=1540483477*(65535&Rt)+((1540483477*(Rt>>>16)&65535)<<16)^(nt=1540483477*(65535&(nt^=nt>>>24))+((1540483477*(nt>>>16)&65535)<<16)),bt-=4,++Kt;switch(bt){case 3:Rt^=(255&G.charCodeAt(Kt+2))<<16;case 2:Rt^=(255&G.charCodeAt(Kt+1))<<8;case 1:Rt=1540483477*(65535&(Rt^=255&G.charCodeAt(Kt)))+((1540483477*(Rt>>>16)&65535)<<16)}return Rt=1540483477*(65535&(Rt^=Rt>>>13))+((1540483477*(Rt>>>16)&65535)<<16),(Rt^=Rt>>>15)>>>0};var Ri=yi,Gi=Si.exports;Hi.exports=Ri,Hi.exports.murmur3=Ri,Hi.exports.murmur2=Gi;var Kn=r(Hi.exports);class Ua{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,nt,bt,Rt){this.ids.push(Ha(D)),this.positions.push(nt,bt,Rt)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let nt=Ha(D),bt=0,Rt=this.ids.length-1;for(;bt>1;this.ids[Qt]>=nt?Rt=Qt:bt=Qt+1}let Kt=[];for(;this.ids[bt]===nt;)Kt.push({index:this.positions[3*bt],start:this.positions[3*bt+1],end:this.positions[3*bt+2]}),bt++;return Kt}static serialize(D,nt){let bt=new Float64Array(D.ids),Rt=new Uint32Array(D.positions);return ao(bt,Rt,0,bt.length-1),nt&&nt.push(bt.buffer,Rt.buffer),{ids:bt,positions:Rt}}static deserialize(D){let nt=new Ua;return nt.ids=D.ids,nt.positions=D.positions,nt.indexed=!0,nt}}function Ha(G){let D=+G;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:Kn(String(G))}function ao(G,D,nt,bt){for(;nt>1],Kt=nt-1,Qt=bt+1;for(;;){do Kt++;while(G[Kt]Rt);if(Kt>=Qt)break;Po(G,Kt,Qt),Po(D,3*Kt,3*Qt),Po(D,3*Kt+1,3*Qt+1),Po(D,3*Kt+2,3*Qt+2)}Qt-nt`u_${Rt}`),this.type=bt}setUniform(D,nt,bt){D.set(bt.constantOr(this.value))}getBinding(D,nt,bt){return this.type==="color"?new Go(D,nt):new Wo(D,nt)}}class du{constructor(D,nt){this.uniformNames=nt.map(bt=>`u_${bt}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(D,nt){this.pixelRatioFrom=nt.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=nt.tlbr,this.patternTo=D.tlbr}setUniform(D,nt,bt,Rt){let Kt=Rt==="u_pattern_to"?this.patternTo:Rt==="u_pattern_from"?this.patternFrom:Rt==="u_pixel_ratio_to"?this.pixelRatioTo:Rt==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Kt&&D.set(Kt)}getBinding(D,nt,bt){return bt.substr(0,9)==="u_pattern"?new ol(D,nt):new Wo(D,nt)}}class _o{constructor(D,nt,bt,Rt){this.expression=D,this.type=bt,this.maxValue=0,this.paintVertexAttributes=nt.map(Kt=>({name:`a_${Kt}`,type:"Float32",components:bt==="color"?2:1,offset:0})),this.paintVertexArray=new Rt}populatePaintArray(D,nt,bt,Rt,Kt){let Qt=this.paintVertexArray.length,be=this.expression.evaluate(new Rl(0),nt,{},Rt,[],Kt);this.paintVertexArray.resize(D),this._setPaintValue(Qt,D,be)}updatePaintArray(D,nt,bt,Rt){let Kt=this.expression.evaluate({zoom:0},bt,Rt);this._setPaintValue(D,nt,Kt)}_setPaintValue(D,nt,bt){if(this.type==="color"){let Rt=Tl(bt);for(let Kt=D;Kt`u_${be}_t`),this.type=bt,this.useIntegerZoom=Rt,this.zoom=Kt,this.maxValue=0,this.paintVertexAttributes=nt.map(be=>({name:`a_${be}`,type:"Float32",components:bt==="color"?4:2,offset:0})),this.paintVertexArray=new Qt}populatePaintArray(D,nt,bt,Rt,Kt){let Qt=this.expression.evaluate(new Rl(this.zoom),nt,{},Rt,[],Kt),be=this.expression.evaluate(new Rl(this.zoom+1),nt,{},Rt,[],Kt),Be=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(Be,D,Qt,be)}updatePaintArray(D,nt,bt,Rt){let Kt=this.expression.evaluate({zoom:this.zoom},bt,Rt),Qt=this.expression.evaluate({zoom:this.zoom+1},bt,Rt);this._setPaintValue(D,nt,Kt,Qt)}_setPaintValue(D,nt,bt,Rt){if(this.type==="color"){let Kt=Tl(bt),Qt=Tl(Rt);for(let be=D;be`#define HAS_UNIFORM_${Rt}`))}return D}getBinderAttributes(){let D=[];for(let nt in this.binders){let bt=this.binders[nt];if(bt instanceof _o||bt instanceof Gs)for(let Rt=0;Rt!0){this.programConfigurations={};for(let Rt of D)this.programConfigurations[Rt.id]=new uu(Rt,nt,bt);this.needsUpload=!1,this._featureMap=new Ua,this._bufferOffset=0}populatePaintArrays(D,nt,bt,Rt,Kt,Qt){for(let be in this.programConfigurations)this.programConfigurations[be].populatePaintArrays(D,nt,Rt,Kt,Qt);nt.id!==void 0&&this._featureMap.add(nt.id,bt,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,nt,bt,Rt){for(let Kt of bt)this.needsUpload=this.programConfigurations[Kt.id].updatePaintArrays(D,this._featureMap,nt,Kt,Rt)||this.needsUpload}get(D){return this.programConfigurations[D]}upload(D){if(this.needsUpload){for(let nt in this.programConfigurations)this.programConfigurations[nt].upload(D);this.needsUpload=!1}}destroy(){for(let D in this.programConfigurations)this.programConfigurations[D].destroy()}}function rh(G,D){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[G]||[G.replace(`${D}-`,"").replace(/-/g,"_")]}function jl(G,D,nt){let bt={color:{source:Sn,composite:pa},number:{source:vn,composite:Sn}},Rt=function(Kt){return{"line-pattern":{source:Ut,composite:Ut},"fill-pattern":{source:Ut,composite:Ut},"fill-extrusion-pattern":{source:Ut,composite:Ut}}[Kt]}(G);return Rt&&Rt[nt]||bt[D][nt]}na("ConstantBinder",Ku),na("CrossFadedConstantBinder",du),na("SourceExpressionBinder",_o),na("CrossFadedCompositeBinder",nl),na("CompositeExpressionBinder",Gs),na("ProgramConfiguration",uu,{omit:["_buffers"]}),na("ProgramConfigurationSet",Xl);let ru=8192,wh=Math.pow(2,14)-1,_e=-wh-1;function kr(G){let D=ru/G.extent,nt=G.loadGeometry();for(let bt=0;btQt.x+1||BeQt.y+1)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return nt}function Ir(G,D){return{type:G.type,id:G.id,properties:G.properties,geometry:D?kr(G):[]}}function Dn(G,D,nt,bt,Rt){G.emplaceBack(2*D+(bt+1)/2,2*nt+(Rt+1)/2)}class li{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new Zs,this.indexArray=new ar,this.segments=new xn,this.programConfigurations=new Xl(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){let Rt=this.layers[0],Kt=[],Qt=null,be=!1;Rt.type==="circle"&&(Qt=Rt.layout.get("circle-sort-key"),be=!Qt.isConstant());for(let{feature:Be,id:rr,index:xr,sourceLayerIndex:Lr}of D){let Zr=this.layers[0]._featureFilter.needGeometry,ln=Ir(Be,Zr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),ln,bt))continue;let bn=be?Qt.evaluate(ln,{},bt):void 0,Ln={id:rr,properties:Be.properties,type:Be.type,sourceLayerIndex:Lr,index:xr,geometry:Zr?ln.geometry:kr(Be),patterns:{},sortKey:bn};Kt.push(Ln)}be&&Kt.sort((Be,rr)=>Be.sortKey-rr.sortKey);for(let Be of Kt){let{geometry:rr,index:xr,sourceLayerIndex:Lr}=Be,Zr=D[xr].feature;this.addFeature(Be,rr,xr,bt),nt.featureIndex.insert(Zr,rr,xr,Lr,this.index)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Jr),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(D,nt,bt,Rt){for(let Kt of nt)for(let Qt of Kt){let be=Qt.x,Be=Qt.y;if(be<0||be>=ru||Be<0||Be>=ru)continue;let rr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),xr=rr.vertexLength;Dn(this.layoutVertexArray,be,Be,-1,-1),Dn(this.layoutVertexArray,be,Be,1,-1),Dn(this.layoutVertexArray,be,Be,1,1),Dn(this.layoutVertexArray,be,Be,-1,1),this.indexArray.emplaceBack(xr,xr+1,xr+2),this.indexArray.emplaceBack(xr,xr+3,xr+2),rr.vertexLength+=4,rr.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,bt,{},Rt)}}function ti(G,D){for(let nt=0;nt1){if($i(G,D))return!0;for(let bt=0;bt1?nt:nt.sub(D)._mult(Rt)._add(D))}function ia(G,D){let nt,bt,Rt,Kt=!1;for(let Qt=0;QtD.y!=Rt.y>D.y&&D.x<(Rt.x-bt.x)*(D.y-bt.y)/(Rt.y-bt.y)+bt.x&&(Kt=!Kt)}return Kt}function Ai(G,D){let nt=!1;for(let bt=0,Rt=G.length-1;btD.y!=Qt.y>D.y&&D.x<(Qt.x-Kt.x)*(D.y-Kt.y)/(Qt.y-Kt.y)+Kt.x&&(nt=!nt)}return nt}function fn(G,D,nt){let bt=nt[0],Rt=nt[2];if(G.xRt.x&&D.x>Rt.x||G.yRt.y&&D.y>Rt.y)return!1;let Kt=R(G,D,nt[0]);return Kt!==R(G,D,nt[1])||Kt!==R(G,D,nt[2])||Kt!==R(G,D,nt[3])}function jn(G,D,nt){let bt=D.paint.get(G).value;return bt.kind==="constant"?bt.value:nt.programConfigurations.get(D.id).getMaxValue(G)}function Bi(G){return Math.sqrt(G[0]*G[0]+G[1]*G[1])}function Ti(G,D,nt,bt,Rt){if(!D[0]&&!D[1])return G;let Kt=o.convert(D)._mult(Rt);nt==="viewport"&&Kt._rotate(-bt);let Qt=[];for(let be=0;beIo(Gn,Ln))}(rr,Be),ln=Lr?xr*be:xr;for(let bn of Rt)for(let Ln of bn){let Gn=Lr?Ln:Io(Ln,Be),Mi=ln,Aa=Ji([],[Ln.x,Ln.y,0,1],Be);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Mi*=Aa[3]/Qt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Mi*=Qt.cameraToCenterDistance/Aa[3]),yn(Zr,Gn,Mi))return!0}return!1}}function Io(G,D){let nt=Ji([],[G.x,G.y,0,1],D);return new o(nt[0]/nt[3],nt[1]/nt[3])}class wo extends li{}let _a;na("HeatmapBucket",wo,{omit:["layers"]});var Fa={get paint(){return _a=_a||new $t({"heatmap-radius":new zs(ut.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zs(ut.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new rs(ut.paint_heatmap["heatmap-intensity"]),"heatmap-color":new qf(ut.paint_heatmap["heatmap-color"]),"heatmap-opacity":new rs(ut.paint_heatmap["heatmap-opacity"])})}};function vo(G,{width:D,height:nt},bt,Rt){if(Rt){if(Rt instanceof Uint8ClampedArray)Rt=new Uint8Array(Rt.buffer);else if(Rt.length!==D*nt*bt)throw new RangeError(`mismatched image size. expected: ${Rt.length} but got: ${D*nt*bt}`)}else Rt=new Uint8Array(D*nt*bt);return G.width=D,G.height=nt,G.data=Rt,G}function Eo(G,{width:D,height:nt},bt){if(D===G.width&&nt===G.height)return;let Rt=vo({},{width:D,height:nt},bt);es(G,Rt,{x:0,y:0},{x:0,y:0},{width:Math.min(G.width,D),height:Math.min(G.height,nt)},bt),G.width=D,G.height=nt,G.data=Rt.data}function es(G,D,nt,bt,Rt,Kt){if(Rt.width===0||Rt.height===0)return D;if(Rt.width>G.width||Rt.height>G.height||nt.x>G.width-Rt.width||nt.y>G.height-Rt.height)throw new RangeError("out of range source coordinates for image copy");if(Rt.width>D.width||Rt.height>D.height||bt.x>D.width-Rt.width||bt.y>D.height-Rt.height)throw new RangeError("out of range destination coordinates for image copy");let Qt=G.data,be=D.data;if(Qt===be)throw new Error("srcData equals dstData, so image is already copied");for(let Be=0;Be{D[G.evaluationKey]=Be;let rr=G.expression.evaluate(D);Rt.data[Qt+be+0]=Math.floor(255*rr.r/rr.a),Rt.data[Qt+be+1]=Math.floor(255*rr.g/rr.a),Rt.data[Qt+be+2]=Math.floor(255*rr.b/rr.a),Rt.data[Qt+be+3]=Math.floor(255*rr.a)};if(G.clips)for(let Qt=0,be=0;Qt80*nt){be=1/0,Be=1/0;let xr=-1/0,Lr=-1/0;for(let Zr=nt;Zrxr&&(xr=ln),bn>Lr&&(Lr=bn)}rr=Math.max(xr-be,Lr-Be),rr=rr!==0?32767/rr:0}return sl(Kt,Qt,nt,be,Be,rr,0),Qt}function No(G,D,nt,bt,Rt){let Kt;if(Rt===function(Qt,be,Be,rr){let xr=0;for(let Lr=be,Zr=Be-rr;Lr0)for(let Qt=D;Qt=D;Qt-=bt)Kt=tr(Qt/bt|0,G[Qt],G[Qt+1],Kt);return Kt&&ye(Kt,Kt.next)&&(lr(Kt),Kt=Kt.next),Kt}function Au(G,D){if(!G)return G;D||(D=G);let nt,bt=G;do if(nt=!1,bt.steiner||!ye(bt,bt.next)&&de(bt.prev,bt,bt.next)!==0)bt=bt.next;else{if(lr(bt),bt=D=bt.prev,bt===bt.next)break;nt=!0}while(nt||bt!==D);return D}function sl(G,D,nt,bt,Rt,Kt,Qt){if(!G)return;!Qt&&Kt&&function(Be,rr,xr,Lr){let Zr=Be;do Zr.z===0&&(Zr.z=ot(Zr.x,Zr.y,rr,xr,Lr)),Zr.prevZ=Zr.prev,Zr.nextZ=Zr.next,Zr=Zr.next;while(Zr!==Be);Zr.prevZ.nextZ=null,Zr.prevZ=null,function(ln){let bn,Ln=1;do{let Gn,Mi=ln;ln=null;let Aa=null;for(bn=0;Mi;){bn++;let ra=Mi,ga=0;for(let Ao=0;Ao0||Ya>0&&ra;)ga!==0&&(Ya===0||!ra||Mi.z<=ra.z)?(Gn=Mi,Mi=Mi.nextZ,ga--):(Gn=ra,ra=ra.nextZ,Ya--),Aa?Aa.nextZ=Gn:ln=Gn,Gn.prevZ=Aa,Aa=Gn;Mi=ra}Aa.nextZ=null,Ln*=2}while(bn>1)}(Zr)}(G,bt,Rt,Kt);let be=G;for(;G.prev!==G.next;){let Be=G.prev,rr=G.next;if(Kt?xc(G,bt,Rt,Kt):Lu(G))D.push(Be.i,G.i,rr.i),lr(G),G=rr.next,be=rr.next;else if((G=rr)===be){Qt?Qt===1?sl(G=Co(Au(G),D),D,nt,bt,Rt,Kt,2):Qt===2&&Cs(G,D,nt,bt,Rt,Kt):sl(Au(G),D,nt,bt,Rt,Kt,1);break}}}function Lu(G){let D=G.prev,nt=G,bt=G.next;if(de(D,nt,bt)>=0)return!1;let Rt=D.x,Kt=nt.x,Qt=bt.x,be=D.y,Be=nt.y,rr=bt.y,xr=RtKt?Rt>Qt?Rt:Qt:Kt>Qt?Kt:Qt,ln=be>Be?be>rr?be:rr:Be>rr?Be:rr,bn=bt.next;for(;bn!==D;){if(bn.x>=xr&&bn.x<=Zr&&bn.y>=Lr&&bn.y<=ln&&xt(Rt,be,Kt,Be,Qt,rr,bn.x,bn.y)&&de(bn.prev,bn,bn.next)>=0)return!1;bn=bn.next}return!0}function xc(G,D,nt,bt){let Rt=G.prev,Kt=G,Qt=G.next;if(de(Rt,Kt,Qt)>=0)return!1;let be=Rt.x,Be=Kt.x,rr=Qt.x,xr=Rt.y,Lr=Kt.y,Zr=Qt.y,ln=beBe?be>rr?be:rr:Be>rr?Be:rr,Gn=xr>Lr?xr>Zr?xr:Zr:Lr>Zr?Lr:Zr,Mi=ot(ln,bn,D,nt,bt),Aa=ot(Ln,Gn,D,nt,bt),ra=G.prevZ,ga=G.nextZ;for(;ra&&ra.z>=Mi&&ga&&ga.z<=Aa;){if(ra.x>=ln&&ra.x<=Ln&&ra.y>=bn&&ra.y<=Gn&&ra!==Rt&&ra!==Qt&&xt(be,xr,Be,Lr,rr,Zr,ra.x,ra.y)&&de(ra.prev,ra,ra.next)>=0||(ra=ra.prevZ,ga.x>=ln&&ga.x<=Ln&&ga.y>=bn&&ga.y<=Gn&&ga!==Rt&&ga!==Qt&&xt(be,xr,Be,Lr,rr,Zr,ga.x,ga.y)&&de(ga.prev,ga,ga.next)>=0))return!1;ga=ga.nextZ}for(;ra&&ra.z>=Mi;){if(ra.x>=ln&&ra.x<=Ln&&ra.y>=bn&&ra.y<=Gn&&ra!==Rt&&ra!==Qt&&xt(be,xr,Be,Lr,rr,Zr,ra.x,ra.y)&&de(ra.prev,ra,ra.next)>=0)return!1;ra=ra.prevZ}for(;ga&&ga.z<=Aa;){if(ga.x>=ln&&ga.x<=Ln&&ga.y>=bn&&ga.y<=Gn&&ga!==Rt&&ga!==Qt&&xt(be,xr,Be,Lr,rr,Zr,ga.x,ga.y)&&de(ga.prev,ga,ga.next)>=0)return!1;ga=ga.nextZ}return!0}function Co(G,D){let nt=G;do{let bt=nt.prev,Rt=nt.next.next;!ye(bt,Rt)&&Yt(bt,nt,nt.next,Rt)&&ir(bt,Rt)&&ir(Rt,bt)&&(D.push(bt.i,nt.i,Rt.i),lr(nt),lr(nt.next),nt=G=Rt),nt=nt.next}while(nt!==G);return Au(nt)}function Cs(G,D,nt,bt,Rt,Kt){let Qt=G;do{let be=Qt.next.next;for(;be!==Qt.prev;){if(Qt.i!==be.i&&Vt(Qt,be)){let Be=Ye(Qt,be);return Qt=Au(Qt,Qt.next),Be=Au(Be,Be.next),sl(Qt,D,nt,bt,Rt,Kt,0),void sl(Be,D,nt,bt,Rt,Kt,0)}be=be.next}Qt=Qt.next}while(Qt!==G)}function Ml(G,D){return G.x-D.x}function yl(G,D){let nt=function(Rt,Kt){let Qt=Kt,be=Rt.x,Be=Rt.y,rr,xr=-1/0;do{if(Be<=Qt.y&&Be>=Qt.next.y&&Qt.next.y!==Qt.y){let Ln=Qt.x+(Be-Qt.y)*(Qt.next.x-Qt.x)/(Qt.next.y-Qt.y);if(Ln<=be&&Ln>xr&&(xr=Ln,rr=Qt.x=Qt.x&&Qt.x>=Zr&&be!==Qt.x&&xt(Berr.x||Qt.x===rr.x&&$(rr,Qt)))&&(rr=Qt,bn=Ln)}Qt=Qt.next}while(Qt!==Lr);return rr}(G,D);if(!nt)return D;let bt=Ye(nt,G);return Au(bt,bt.next),Au(nt,nt.next)}function $(G,D){return de(G.prev,G,D.prev)<0&&de(D.next,G,G.next)<0}function ot(G,D,nt,bt,Rt){return(G=1431655765&((G=858993459&((G=252645135&((G=16711935&((G=(G-nt)*Rt|0)|G<<8))|G<<4))|G<<2))|G<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-bt)*Rt|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function et(G){let D=G,nt=G;do(D.x=(G-Qt)*(Kt-be)&&(G-Qt)*(bt-be)>=(nt-Qt)*(D-be)&&(nt-Qt)*(Kt-be)>=(Rt-Qt)*(bt-be)}function Vt(G,D){return G.next.i!==D.i&&G.prev.i!==D.i&&!function(nt,bt){let Rt=nt;do{if(Rt.i!==nt.i&&Rt.next.i!==nt.i&&Rt.i!==bt.i&&Rt.next.i!==bt.i&&Yt(Rt,Rt.next,nt,bt))return!0;Rt=Rt.next}while(Rt!==nt);return!1}(G,D)&&(ir(G,D)&&ir(D,G)&&function(nt,bt){let Rt=nt,Kt=!1,Qt=(nt.x+bt.x)/2,be=(nt.y+bt.y)/2;do Rt.y>be!=Rt.next.y>be&&Rt.next.y!==Rt.y&&Qt<(Rt.next.x-Rt.x)*(be-Rt.y)/(Rt.next.y-Rt.y)+Rt.x&&(Kt=!Kt),Rt=Rt.next;while(Rt!==nt);return Kt}(G,D)&&(de(G.prev,G,D.prev)||de(G,D.prev,D))||ye(G,D)&&de(G.prev,G,G.next)>0&&de(D.prev,D,D.next)>0)}function de(G,D,nt){return(D.y-G.y)*(nt.x-D.x)-(D.x-G.x)*(nt.y-D.y)}function ye(G,D){return G.x===D.x&&G.y===D.y}function Yt(G,D,nt,bt){let Rt=Se(de(G,D,nt)),Kt=Se(de(G,D,bt)),Qt=Se(de(nt,bt,G)),be=Se(de(nt,bt,D));return Rt!==Kt&&Qt!==be||!(Rt!==0||!ce(G,nt,D))||!(Kt!==0||!ce(G,bt,D))||!(Qt!==0||!ce(nt,G,bt))||!(be!==0||!ce(nt,D,bt))}function ce(G,D,nt){return D.x<=Math.max(G.x,nt.x)&&D.x>=Math.min(G.x,nt.x)&&D.y<=Math.max(G.y,nt.y)&&D.y>=Math.min(G.y,nt.y)}function Se(G){return G>0?1:G<0?-1:0}function ir(G,D){return de(G.prev,G,G.next)<0?de(G,D,G.next)>=0&&de(G,G.prev,D)>=0:de(G,D,G.prev)<0||de(G,G.next,D)<0}function Ye(G,D){let nt=hr(G.i,G.x,G.y),bt=hr(D.i,D.x,D.y),Rt=G.next,Kt=D.prev;return G.next=D,D.prev=G,nt.next=Rt,Rt.prev=nt,bt.next=nt,nt.prev=bt,Kt.next=bt,bt.prev=Kt,bt}function tr(G,D,nt,bt){let Rt=hr(G,D,nt);return bt?(Rt.next=bt.next,Rt.prev=bt,bt.next.prev=Rt,bt.next=Rt):(Rt.prev=Rt,Rt.next=Rt),Rt}function lr(G){G.next.prev=G.prev,G.prev.next=G.next,G.prevZ&&(G.prevZ.nextZ=G.nextZ),G.nextZ&&(G.nextZ.prevZ=G.prevZ)}function hr(G,D,nt){return{i:G,x:D,y:nt,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ve(G,D,nt){let bt=nt.patternDependencies,Rt=!1;for(let Kt of D){let Qt=Kt.paint.get(`${G}-pattern`);Qt.isConstant()||(Rt=!0);let be=Qt.constantOr(null);be&&(Rt=!0,bt[be.to]=!0,bt[be.from]=!0)}return Rt}function Xe(G,D,nt,bt,Rt){let Kt=Rt.patternDependencies;for(let Qt of D){let be=Qt.paint.get(`${G}-pattern`).value;if(be.kind!=="constant"){let Be=be.evaluate({zoom:bt-1},nt,{},Rt.availableImages),rr=be.evaluate({zoom:bt},nt,{},Rt.availableImages),xr=be.evaluate({zoom:bt+1},nt,{},Rt.availableImages);Be=Be&&Be.name?Be.name:Be,rr=rr&&rr.name?rr.name:rr,xr=xr&&xr.name?xr.name:xr,Kt[Be]=!0,Kt[rr]=!0,Kt[xr]=!0,nt.patterns[Qt.id]={min:Be,mid:rr,max:xr}}}return nt}class Ze{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Yu,this.indexArray=new ar,this.indexArray2=new Er,this.programConfigurations=new Xl(D.layers,D.zoom),this.segments=new xn,this.segments2=new xn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){this.hasPattern=Ve("fill",this.layers,nt);let Rt=this.layers[0].layout.get("fill-sort-key"),Kt=!Rt.isConstant(),Qt=[];for(let{feature:be,id:Be,index:rr,sourceLayerIndex:xr}of D){let Lr=this.layers[0]._featureFilter.needGeometry,Zr=Ir(be,Lr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),Zr,bt))continue;let ln=Kt?Rt.evaluate(Zr,{},bt,nt.availableImages):void 0,bn={id:Be,properties:be.properties,type:be.type,sourceLayerIndex:xr,index:rr,geometry:Lr?Zr.geometry:kr(be),patterns:{},sortKey:ln};Qt.push(bn)}Kt&&Qt.sort((be,Be)=>be.sortKey-Be.sortKey);for(let be of Qt){let{geometry:Be,index:rr,sourceLayerIndex:xr}=be;if(this.hasPattern){let Lr=Xe("fill",this.layers,be,this.zoom,nt);this.patternFeatures.push(Lr)}else this.addFeature(be,Be,rr,bt,{});nt.featureIndex.insert(D[rr].feature,Be,rr,xr,this.index)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}addFeatures(D,nt,bt){for(let Rt of this.patternFeatures)this.addFeature(Rt,Rt.geometry,Rt.index,nt,bt)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,pu),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(D,nt,bt,Rt,Kt){for(let Qt of Jc(nt,500)){let be=0;for(let ln of Qt)be+=ln.length;let Be=this.segments.prepareSegment(be,this.layoutVertexArray,this.indexArray),rr=Be.vertexLength,xr=[],Lr=[];for(let ln of Qt){if(ln.length===0)continue;ln!==Qt[0]&&Lr.push(xr.length/2);let bn=this.segments2.prepareSegment(ln.length,this.layoutVertexArray,this.indexArray2),Ln=bn.vertexLength;this.layoutVertexArray.emplaceBack(ln[0].x,ln[0].y),this.indexArray2.emplaceBack(Ln+ln.length-1,Ln),xr.push(ln[0].x),xr.push(ln[0].y);for(let Gn=1;Gn>3}if(Rt--,bt===1||bt===2)Kt+=G.readSVarint(),Qt+=G.readSVarint(),bt===1&&(D&&be.push(D),D=[]),D.push(new ea(Kt,Qt));else{if(bt!==7)throw new Error("unknown command "+bt);D&&D.push(D[0].clone())}}return D&&be.push(D),be},Li.prototype.bbox=function(){var G=this._pbf;G.pos=this._geometry;for(var D=G.readVarint()+G.pos,nt=1,bt=0,Rt=0,Kt=0,Qt=1/0,be=-1/0,Be=1/0,rr=-1/0;G.pos>3}if(bt--,nt===1||nt===2)(Rt+=G.readSVarint())be&&(be=Rt),(Kt+=G.readSVarint())rr&&(rr=Kt);else if(nt!==7)throw new Error("unknown command "+nt)}return[Qt,Be,be,rr]},Li.prototype.toGeoJSON=function(G,D,nt){var bt,Rt,Kt=this.extent*Math.pow(2,nt),Qt=this.extent*G,be=this.extent*D,Be=this.loadGeometry(),rr=Li.types[this.type];function xr(ln){for(var bn=0;bn>3;Rt=Qt===1?bt.readString():Qt===2?bt.readFloat():Qt===3?bt.readDouble():Qt===4?bt.readVarint64():Qt===5?bt.readVarint():Qt===6?bt.readSVarint():Qt===7?bt.readBoolean():null}return Rt}(nt))}xs.prototype.feature=function(G){if(G<0||G>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[G];var D=this._pbf.readVarint()+this._pbf.pos;return new co(this._pbf,D,this.extent,this._keys,this._values)};var Vl=qo;function pl(G,D,nt){if(G===3){var bt=new Vl(nt,nt.readVarint()+nt.pos);bt.length&&(D[bt.name]=bt)}}mi.VectorTile=function(G,D){this.layers=G.readFields(pl,{},D)},mi.VectorTileFeature=Ei,mi.VectorTileLayer=qo;let Hl=mi.VectorTileFeature.types,_c=Math.pow(2,13);function Fs(G,D,nt,bt,Rt,Kt,Qt,be){G.emplaceBack(D,nt,2*Math.floor(bt*_c)+Qt,Rt*_c*2,Kt*_c*2,Math.round(be))}class Mu{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(nt=>nt.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new dc,this.centroidVertexArray=new $s,this.indexArray=new ar,this.programConfigurations=new Xl(D.layers,D.zoom),this.segments=new xn,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){this.features=[],this.hasPattern=Ve("fill-extrusion",this.layers,nt);for(let{feature:Rt,id:Kt,index:Qt,sourceLayerIndex:be}of D){let Be=this.layers[0]._featureFilter.needGeometry,rr=Ir(Rt,Be);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),rr,bt))continue;let xr={id:Kt,sourceLayerIndex:be,index:Qt,geometry:Be?rr.geometry:kr(Rt),properties:Rt.properties,type:Rt.type,patterns:{}};this.hasPattern?this.features.push(Xe("fill-extrusion",this.layers,xr,this.zoom,nt)):this.addFeature(xr,xr.geometry,Qt,bt,{}),nt.featureIndex.insert(Rt,xr.geometry,Qt,be,this.index,!0)}}addFeatures(D,nt,bt){for(let Rt of this.features){let{geometry:Kt}=Rt;this.addFeature(Rt,Kt,Rt.index,nt,bt)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Ci),this.centroidVertexBuffer=D.createVertexBuffer(this.centroidVertexArray,Yn.members,!0),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(D,nt,bt,Rt,Kt){for(let Qt of Jc(nt,500)){let be={x:0,y:0,vertexCount:0},Be=0;for(let bn of Qt)Be+=bn.length;let rr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let bn of Qt){if(bn.length===0||If(bn))continue;let Ln=0;for(let Gn=0;Gn=1){let Aa=bn[Gn-1];if(!af(Mi,Aa)){rr.vertexLength+4>xn.MAX_VERTEX_ARRAY_LENGTH&&(rr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ra=Mi.sub(Aa)._perp()._unit(),ga=Aa.dist(Mi);Ln+ga>32768&&(Ln=0),Fs(this.layoutVertexArray,Mi.x,Mi.y,ra.x,ra.y,0,0,Ln),Fs(this.layoutVertexArray,Mi.x,Mi.y,ra.x,ra.y,0,1,Ln),be.x+=2*Mi.x,be.y+=2*Mi.y,be.vertexCount+=2,Ln+=ga,Fs(this.layoutVertexArray,Aa.x,Aa.y,ra.x,ra.y,0,0,Ln),Fs(this.layoutVertexArray,Aa.x,Aa.y,ra.x,ra.y,0,1,Ln),be.x+=2*Aa.x,be.y+=2*Aa.y,be.vertexCount+=2;let Ya=rr.vertexLength;this.indexArray.emplaceBack(Ya,Ya+2,Ya+1),this.indexArray.emplaceBack(Ya+1,Ya+2,Ya+3),rr.vertexLength+=4,rr.primitiveLength+=2}}}}if(rr.vertexLength+Be>xn.MAX_VERTEX_ARRAY_LENGTH&&(rr=this.segments.prepareSegment(Be,this.layoutVertexArray,this.indexArray)),Hl[D.type]!=="Polygon")continue;let xr=[],Lr=[],Zr=rr.vertexLength;for(let bn of Qt)if(bn.length!==0){bn!==Qt[0]&&Lr.push(xr.length/2);for(let Ln=0;Lnru)||G.y===D.y&&(G.y<0||G.y>ru)}function If(G){return G.every(D=>D.x<0)||G.every(D=>D.x>ru)||G.every(D=>D.y<0)||G.every(D=>D.y>ru)}let jp;na("FillExtrusionBucket",Mu,{omit:["layers","features"]});var b0={get paint(){return jp=jp||new $t({"fill-extrusion-opacity":new rs(ut["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zs(ut["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new rs(ut["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new rs(ut["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new qc(ut["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zs(ut["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zs(ut["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new rs(ut["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Tp extends ht{constructor(D){super(D,b0)}createBucket(D){return new Mu(D)}queryRadius(){return Bi(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,nt,bt,Rt,Kt,Qt,be,Be){let rr=Ti(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Qt.angle,be),xr=this.paint.get("fill-extrusion-height").evaluate(nt,bt),Lr=this.paint.get("fill-extrusion-base").evaluate(nt,bt),Zr=function(bn,Ln,Gn,Mi){let Aa=[];for(let ra of bn){let ga=[ra.x,ra.y,0,1];Ji(ga,ga,Ln),Aa.push(new o(ga[0]/ga[3],ga[1]/ga[3]))}return Aa}(rr,Be),ln=function(bn,Ln,Gn,Mi){let Aa=[],ra=[],ga=Mi[8]*Ln,Ya=Mi[9]*Ln,Ao=Mi[10]*Ln,Ss=Mi[11]*Ln,Sl=Mi[8]*Gn,_s=Mi[9]*Gn,fs=Mi[10]*Gn,Xs=Mi[11]*Gn;for(let js of bn){let Os=[],uo=[];for(let il of js){let Js=il.x,Zl=il.y,uh=Mi[0]*Js+Mi[4]*Zl+Mi[12],nh=Mi[1]*Js+Mi[5]*Zl+Mi[13],gd=Mi[2]*Js+Mi[6]*Zl+Mi[14],Cp=Mi[3]*Js+Mi[7]*Zl+Mi[15],zf=gd+Ao,td=Cp+Ss,dp=uh+Sl,pp=nh+_s,mp=gd+fs,sf=Cp+Xs,vd=new o((uh+ga)/td,(nh+Ya)/td);vd.z=zf/td,Os.push(vd);let ep=new o(dp/sf,pp/sf);ep.z=mp/sf,uo.push(ep)}Aa.push(Os),ra.push(uo)}return[Aa,ra]}(Rt,Lr,xr,Be);return function(bn,Ln,Gn){let Mi=1/0;ai(Gn,Ln)&&(Mi=R0(Gn,Ln[0]));for(let Aa=0;Aant.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(nt=>{this.gradients[nt.id]={}}),this.layoutVertexArray=new $c,this.layoutVertexArray2=new At,this.indexArray=new ar,this.programConfigurations=new Xl(D.layers,D.zoom),this.segments=new xn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(nt=>nt.isStateDependent()).map(nt=>nt.id)}populate(D,nt,bt){this.hasPattern=Ve("line",this.layers,nt);let Rt=this.layers[0].layout.get("line-sort-key"),Kt=!Rt.isConstant(),Qt=[];for(let{feature:be,id:Be,index:rr,sourceLayerIndex:xr}of D){let Lr=this.layers[0]._featureFilter.needGeometry,Zr=Ir(be,Lr);if(!this.layers[0]._featureFilter.filter(new Rl(this.zoom),Zr,bt))continue;let ln=Kt?Rt.evaluate(Zr,{},bt):void 0,bn={id:Be,properties:be.properties,type:be.type,sourceLayerIndex:xr,index:rr,geometry:Lr?Zr.geometry:kr(be),patterns:{},sortKey:ln};Qt.push(bn)}Kt&&Qt.sort((be,Be)=>be.sortKey-Be.sortKey);for(let be of Qt){let{geometry:Be,index:rr,sourceLayerIndex:xr}=be;if(this.hasPattern){let Lr=Xe("line",this.layers,be,this.zoom,nt);this.patternFeatures.push(Lr)}else this.addFeature(be,Be,rr,bt,{});nt.featureIndex.insert(D[rr].feature,Be,rr,xr,this.index)}}update(D,nt,bt){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,nt,this.stateDependentLayers,bt)}addFeatures(D,nt,bt){for(let Rt of this.patternFeatures)this.addFeature(Rt,Rt.geometry,Rt.index,nt,bt)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=D.createVertexBuffer(this.layoutVertexArray2,Q0)),this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Mp),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(D){if(D.properties&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_end"))return{start:+D.properties.mapbox_clip_start,end:+D.properties.mapbox_clip_end}}addFeature(D,nt,bt,Rt,Kt){let Qt=this.layers[0].layout,be=Qt.get("line-join").evaluate(D,{}),Be=Qt.get("line-cap"),rr=Qt.get("line-miter-limit"),xr=Qt.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Lr of nt)this.addLine(Lr,D,be,Be,rr,xr);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,bt,Kt,Rt)}addLine(D,nt,bt,Rt,Kt,Qt){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Mi=0;Mi=2&&D[Be-1].equals(D[Be-2]);)Be--;let rr=0;for(;rr0;if(Ss&&Mi>rr){let Xs=Zr.dist(ln);if(Xs>2*xr){let js=Zr.sub(Zr.sub(ln)._mult(xr/Xs)._round());this.updateDistance(ln,js),this.addCurrentVertex(js,Ln,0,0,Lr),ln=js}}let _s=ln&&bn,fs=_s?bt:be?"butt":Rt;if(_s&&fs==="round"&&(YaKt&&(fs="bevel"),fs==="bevel"&&(Ya>2&&(fs="flipbevel"),Ya100)Aa=Gn.mult(-1);else{let Xs=Ya*Ln.add(Gn).mag()/Ln.sub(Gn).mag();Aa._perp()._mult(Xs*(Sl?-1:1))}this.addCurrentVertex(Zr,Aa,0,0,Lr),this.addCurrentVertex(Zr,Aa.mult(-1),0,0,Lr)}else if(fs==="bevel"||fs==="fakeround"){let Xs=-Math.sqrt(Ya*Ya-1),js=Sl?Xs:0,Os=Sl?0:Xs;if(ln&&this.addCurrentVertex(Zr,Ln,js,Os,Lr),fs==="fakeround"){let uo=Math.round(180*Ao/Math.PI/20);for(let il=1;il2*xr){let js=Zr.add(bn.sub(Zr)._mult(xr/Xs)._round());this.updateDistance(Zr,js),this.addCurrentVertex(js,Gn,0,0,Lr),Zr=js}}}}addCurrentVertex(D,nt,bt,Rt,Kt,Qt=!1){let be=nt.y*Rt-nt.x,Be=-nt.y-nt.x*Rt;this.addHalfVertex(D,nt.x+nt.y*bt,nt.y-nt.x*bt,Qt,!1,bt,Kt),this.addHalfVertex(D,be,Be,Qt,!0,-Rt,Kt),this.distance>Ep/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,nt,bt,Rt,Kt,Qt))}addHalfVertex({x:D,y:nt},bt,Rt,Kt,Qt,be,Be){let rr=.5*(this.lineClips?this.scaledDistance*(Ep-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(Kt?1:0),(nt<<1)+(Qt?1:0),Math.round(63*bt)+128,Math.round(63*Rt)+128,1+(be===0?0:be<0?-1:1)|(63&rr)<<2,rr>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let xr=Be.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,xr),Be.primitiveLength++),Qt?this.e2=xr:this.e1=xr}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(D,nt){this.distance+=D.dist(nt),this.updateScaledDistance()}}let Gm,Og;na("LineBucket",tp,{omit:["layers","patternFeatures"]});var Ym={get paint(){return Og=Og||new $t({"line-opacity":new zs(ut.paint_line["line-opacity"]),"line-color":new zs(ut.paint_line["line-color"]),"line-translate":new rs(ut.paint_line["line-translate"]),"line-translate-anchor":new rs(ut.paint_line["line-translate-anchor"]),"line-width":new zs(ut.paint_line["line-width"]),"line-gap-width":new zs(ut.paint_line["line-gap-width"]),"line-offset":new zs(ut.paint_line["line-offset"]),"line-blur":new zs(ut.paint_line["line-blur"]),"line-dasharray":new $u(ut.paint_line["line-dasharray"]),"line-pattern":new qc(ut.paint_line["line-pattern"]),"line-gradient":new qf(ut.paint_line["line-gradient"])})},get layout(){return Gm=Gm||new $t({"line-cap":new rs(ut.layout_line["line-cap"]),"line-join":new zs(ut.layout_line["line-join"]),"line-miter-limit":new rs(ut.layout_line["line-miter-limit"]),"line-round-limit":new rs(ut.layout_line["line-round-limit"]),"line-sort-key":new zs(ut.layout_line["line-sort-key"])})}};class dd extends zs{possiblyEvaluate(D,nt){return nt=new Rl(Math.floor(nt.zoom),{now:nt.now,fadeDuration:nt.fadeDuration,zoomHistory:nt.zoomHistory,transition:nt.transition}),super.possiblyEvaluate(D,nt)}evaluate(D,nt,bt,Rt){return nt=M({},nt,{zoom:Math.floor(nt.zoom)}),super.evaluate(D,nt,bt,Rt)}}let wm;class Dg extends ht{constructor(D){super(D,Ym),this.gradientVersion=0,wm||(wm=new dd(Ym.paint.properties["line-width"].specification),wm.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(D){if(D==="line-gradient"){let nt=this.gradientExpression();this.stepInterpolant=!!function(bt){return bt._styleExpression!==void 0}(nt)&&nt._styleExpression.expression instanceof Zn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(D,nt){super.recalculate(D,nt),this.paint._values["line-floorwidth"]=wm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,D)}createBucket(D){return new tp(D)}queryRadius(D){let nt=D,bt=pd(jn("line-width",this,nt),jn("line-gap-width",this,nt)),Rt=jn("line-offset",this,nt);return bt/2+Math.abs(Rt)+Bi(this.paint.get("line-translate"))}queryIntersectsFeature(D,nt,bt,Rt,Kt,Qt,be){let Be=Ti(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Qt.angle,be),rr=be/2*pd(this.paint.get("line-width").evaluate(nt,bt),this.paint.get("line-gap-width").evaluate(nt,bt)),xr=this.paint.get("line-offset").evaluate(nt,bt);return xr&&(Rt=function(Lr,Zr){let ln=[];for(let bn=0;bn=3){for(let Gn=0;Gn0?D+2*G:G}let Km=ke([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Cv=ke([{name:"a_projected_pos",components:3,type:"Float32"}],4);ke([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let Lv=ke([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ke([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let B0=ke([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Fg=ke([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function of(G,D,nt){return G.sections.forEach(bt=>{bt.text=function(Rt,Kt,Qt){let be=Kt.layout.get("text-transform").evaluate(Qt,{});return be==="uppercase"?Rt=Rt.toLocaleUpperCase():be==="lowercase"&&(Rt=Rt.toLocaleLowerCase()),Kl.applyArabicShaping&&(Rt=Kl.applyArabicShaping(Rt)),Rt}(bt.text,D,nt)}),G}ke([{name:"triangle",components:3,type:"Uint16"}]),ke([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ke([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ke([{type:"Float32",name:"offsetX"}]),ke([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ke([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let md={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var bc=24,Rg=Pc,Pv=function(G,D,nt,bt,Rt){var Kt,Qt,be=8*Rt-bt-1,Be=(1<>1,xr=-7,Lr=Rt-1,Zr=-1,ln=G[D+Lr];for(Lr+=Zr,Kt=ln&(1<<-xr)-1,ln>>=-xr,xr+=be;xr>0;Kt=256*Kt+G[D+Lr],Lr+=Zr,xr-=8);for(Qt=Kt&(1<<-xr)-1,Kt>>=-xr,xr+=bt;xr>0;Qt=256*Qt+G[D+Lr],Lr+=Zr,xr-=8);if(Kt===0)Kt=1-rr;else{if(Kt===Be)return Qt?NaN:1/0*(ln?-1:1);Qt+=Math.pow(2,bt),Kt-=rr}return(ln?-1:1)*Qt*Math.pow(2,Kt-bt)},wx=function(G,D,nt,bt,Rt,Kt){var Qt,be,Be,rr=8*Kt-Rt-1,xr=(1<>1,Zr=Rt===23?Math.pow(2,-24)-Math.pow(2,-77):0,ln=0,bn=1,Ln=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(be=isNaN(D)?1:0,Qt=xr):(Qt=Math.floor(Math.log(D)/Math.LN2),D*(Be=Math.pow(2,-Qt))<1&&(Qt--,Be*=2),(D+=Qt+Lr>=1?Zr/Be:Zr*Math.pow(2,1-Lr))*Be>=2&&(Qt++,Be/=2),Qt+Lr>=xr?(be=0,Qt=xr):Qt+Lr>=1?(be=(D*Be-1)*Math.pow(2,Rt),Qt+=Lr):(be=D*Math.pow(2,Lr-1)*Math.pow(2,Rt),Qt=0));Rt>=8;G[nt+ln]=255&be,ln+=bn,be/=256,Rt-=8);for(Qt=Qt<0;G[nt+ln]=255&Qt,ln+=bn,Qt/=256,rr-=8);G[nt+ln-bn]|=128*Ln};function Pc(G){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(G)?G:new Uint8Array(G||0),this.pos=0,this.type=0,this.length=this.buf.length}Pc.Varint=0,Pc.Fixed64=1,Pc.Bytes=2,Pc.Fixed32=5;var km=4294967296,kx=1/km,Bg=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function N0(G){return G.type===Pc.Bytes?G.readVarint()+G.pos:G.pos+1}function xb(G,D,nt){return nt?4294967296*D+(G>>>0):4294967296*(D>>>0)+(G>>>0)}function Iv(G,D,nt){var bt=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));nt.realloc(bt);for(var Rt=nt.pos-1;Rt>=G;Rt--)nt.buf[Rt+bt]=nt.buf[Rt]}function FT(G,D){for(var nt=0;nt>>8,G[nt+2]=D>>>16,G[nt+3]=D>>>24}function O3(G,D){return(G[D]|G[D+1]<<8|G[D+2]<<16)+(G[D+3]<<24)}Pc.prototype={destroy:function(){this.buf=null},readFields:function(G,D,nt){for(nt=nt||this.length;this.pos>3,Kt=this.pos;this.type=7&bt,G(Rt,D,this),this.pos===Kt&&this.skip(bt)}return D},readMessage:function(G,D){return this.readFields(G,D,this.readVarint()+this.pos)},readFixed32:function(){var G=Ax(this.buf,this.pos);return this.pos+=4,G},readSFixed32:function(){var G=O3(this.buf,this.pos);return this.pos+=4,G},readFixed64:function(){var G=Ax(this.buf,this.pos)+Ax(this.buf,this.pos+4)*km;return this.pos+=8,G},readSFixed64:function(){var G=Ax(this.buf,this.pos)+O3(this.buf,this.pos+4)*km;return this.pos+=8,G},readFloat:function(){var G=Pv(this.buf,this.pos,!0,23,4);return this.pos+=4,G},readDouble:function(){var G=Pv(this.buf,this.pos,!0,52,8);return this.pos+=8,G},readVarint:function(G){var D,nt,bt=this.buf;return D=127&(nt=bt[this.pos++]),nt<128?D:(D|=(127&(nt=bt[this.pos++]))<<7,nt<128?D:(D|=(127&(nt=bt[this.pos++]))<<14,nt<128?D:(D|=(127&(nt=bt[this.pos++]))<<21,nt<128?D:function(Rt,Kt,Qt){var be,Be,rr=Qt.buf;if(be=(112&(Be=rr[Qt.pos++]))>>4,Be<128||(be|=(127&(Be=rr[Qt.pos++]))<<3,Be<128)||(be|=(127&(Be=rr[Qt.pos++]))<<10,Be<128)||(be|=(127&(Be=rr[Qt.pos++]))<<17,Be<128)||(be|=(127&(Be=rr[Qt.pos++]))<<24,Be<128)||(be|=(1&(Be=rr[Qt.pos++]))<<31,Be<128))return xb(Rt,be,Kt);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(nt=bt[this.pos]))<<28,G,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var G=this.readVarint();return G%2==1?(G+1)/-2:G/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var G=this.readVarint()+this.pos,D=this.pos;return this.pos=G,G-D>=12&&Bg?function(nt,bt,Rt){return Bg.decode(nt.subarray(bt,Rt))}(this.buf,D,G):function(nt,bt,Rt){for(var Kt="",Qt=bt;Qt239?4:xr>223?3:xr>191?2:1;if(Qt+Zr>Rt)break;Zr===1?xr<128&&(Lr=xr):Zr===2?(192&(be=nt[Qt+1]))==128&&(Lr=(31&xr)<<6|63&be)<=127&&(Lr=null):Zr===3?(Be=nt[Qt+2],(192&(be=nt[Qt+1]))==128&&(192&Be)==128&&((Lr=(15&xr)<<12|(63&be)<<6|63&Be)<=2047||Lr>=55296&&Lr<=57343)&&(Lr=null)):Zr===4&&(Be=nt[Qt+2],rr=nt[Qt+3],(192&(be=nt[Qt+1]))==128&&(192&Be)==128&&(192&rr)==128&&((Lr=(15&xr)<<18|(63&be)<<12|(63&Be)<<6|63&rr)<=65535||Lr>=1114112)&&(Lr=null)),Lr===null?(Lr=65533,Zr=1):Lr>65535&&(Lr-=65536,Kt+=String.fromCharCode(Lr>>>10&1023|55296),Lr=56320|1023&Lr),Kt+=String.fromCharCode(Lr),Qt+=Zr}return Kt}(this.buf,D,G)},readBytes:function(){var G=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,G);return this.pos=G,D},readPackedVarint:function(G,D){if(this.type!==Pc.Bytes)return G.push(this.readVarint(D));var nt=N0(this);for(G=G||[];this.pos127;);else if(D===Pc.Bytes)this.pos=this.readVarint()+this.pos;else if(D===Pc.Fixed32)this.pos+=4;else{if(D!==Pc.Fixed64)throw new Error("Unimplemented type: "+D);this.pos+=8}},writeTag:function(G,D){this.writeVarint(G<<3|D)},realloc:function(G){for(var D=this.length||16;D268435455||G<0?function(D,nt){var bt,Rt;if(D>=0?(bt=D%4294967296|0,Rt=D/4294967296|0):(Rt=~(-D/4294967296),4294967295^(bt=~(-D%4294967296))?bt=bt+1|0:(bt=0,Rt=Rt+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");nt.realloc(10),function(Kt,Qt,be){be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,Kt>>>=7,be.buf[be.pos++]=127&Kt|128,be.buf[be.pos]=127&(Kt>>>=7)}(bt,0,nt),function(Kt,Qt){var be=(7&Kt)<<4;Qt.buf[Qt.pos++]|=be|((Kt>>>=3)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt|((Kt>>>=7)?128:0),Kt&&(Qt.buf[Qt.pos++]=127&Kt)))))}(Rt,nt)}(G,this):(this.realloc(4),this.buf[this.pos++]=127&G|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=G>>>7&127))))},writeSVarint:function(G){this.writeVarint(G<0?2*-G-1:2*G)},writeBoolean:function(G){this.writeVarint(!!G)},writeString:function(G){G=String(G),this.realloc(4*G.length),this.pos++;var D=this.pos;this.pos=function(bt,Rt,Kt){for(var Qt,be,Be=0;Be55295&&Qt<57344){if(!be){Qt>56319||Be+1===Rt.length?(bt[Kt++]=239,bt[Kt++]=191,bt[Kt++]=189):be=Qt;continue}if(Qt<56320){bt[Kt++]=239,bt[Kt++]=191,bt[Kt++]=189,be=Qt;continue}Qt=be-55296<<10|Qt-56320|65536,be=null}else be&&(bt[Kt++]=239,bt[Kt++]=191,bt[Kt++]=189,be=null);Qt<128?bt[Kt++]=Qt:(Qt<2048?bt[Kt++]=Qt>>6|192:(Qt<65536?bt[Kt++]=Qt>>12|224:(bt[Kt++]=Qt>>18|240,bt[Kt++]=Qt>>12&63|128),bt[Kt++]=Qt>>6&63|128),bt[Kt++]=63&Qt|128)}return Kt}(this.buf,G,this.pos);var nt=this.pos-D;nt>=128&&Iv(D,nt,this),this.pos=D-1,this.writeVarint(nt),this.pos+=nt},writeFloat:function(G){this.realloc(4),wx(this.buf,G,this.pos,!0,23,4),this.pos+=4},writeDouble:function(G){this.realloc(8),wx(this.buf,G,this.pos,!0,52,8),this.pos+=8},writeBytes:function(G){var D=G.length;this.writeVarint(D),this.realloc(D);for(var nt=0;nt=128&&Iv(nt,bt,this),this.pos=nt-1,this.writeVarint(bt),this.pos+=bt},writeMessage:function(G,D,nt){this.writeTag(G,Pc.Bytes),this.writeRawMessage(D,nt)},writePackedVarint:function(G,D){D.length&&this.writeMessage(G,FT,D)},writePackedSVarint:function(G,D){D.length&&this.writeMessage(G,RT,D)},writePackedBoolean:function(G,D){D.length&&this.writeMessage(G,jT,D)},writePackedFloat:function(G,D){D.length&&this.writeMessage(G,BT,D)},writePackedDouble:function(G,D){D.length&&this.writeMessage(G,NT,D)},writePackedFixed32:function(G,D){D.length&&this.writeMessage(G,UT,D)},writePackedSFixed32:function(G,D){D.length&&this.writeMessage(G,VT,D)},writePackedFixed64:function(G,D){D.length&&this.writeMessage(G,HT,D)},writePackedSFixed64:function(G,D){D.length&&this.writeMessage(G,Tx,D)},writeBytesField:function(G,D){this.writeTag(G,Pc.Bytes),this.writeBytes(D)},writeFixed32Field:function(G,D){this.writeTag(G,Pc.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(G,D){this.writeTag(G,Pc.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(G,D){this.writeTag(G,Pc.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(G,D){this.writeTag(G,Pc.Fixed64),this.writeSFixed64(D)},writeVarintField:function(G,D){this.writeTag(G,Pc.Varint),this.writeVarint(D)},writeSVarintField:function(G,D){this.writeTag(G,Pc.Varint),this.writeSVarint(D)},writeStringField:function(G,D){this.writeTag(G,Pc.Bytes),this.writeString(D)},writeFloatField:function(G,D){this.writeTag(G,Pc.Fixed32),this.writeFloat(D)},writeDoubleField:function(G,D){this.writeTag(G,Pc.Fixed64),this.writeDouble(D)},writeBooleanField:function(G,D){this.writeVarintField(G,!!D)}};var _b=r(Rg);let Mx=3;function WT(G,D,nt){G===1&&nt.readMessage(D3,D)}function D3(G,D,nt){if(G===3){let{id:bt,bitmap:Rt,width:Kt,height:Qt,left:be,top:Be,advance:rr}=nt.readMessage(bb,{});D.push({id:bt,bitmap:new Ul({width:Kt+2*Mx,height:Qt+2*Mx},Rt),metrics:{width:Kt,height:Qt,left:be,top:Be,advance:rr}})}}function bb(G,D,nt){G===1?D.id=nt.readVarint():G===2?D.bitmap=nt.readBytes():G===3?D.width=nt.readVarint():G===4?D.height=nt.readVarint():G===5?D.left=nt.readSVarint():G===6?D.top=nt.readSVarint():G===7&&(D.advance=nt.readVarint())}let wb=Mx;function Sx(G){let D=0,nt=0;for(let Qt of G)D+=Qt.w*Qt.h,nt=Math.max(nt,Qt.w);G.sort((Qt,be)=>be.h-Qt.h);let bt=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),nt),h:1/0}],Rt=0,Kt=0;for(let Qt of G)for(let be=bt.length-1;be>=0;be--){let Be=bt[be];if(!(Qt.w>Be.w||Qt.h>Be.h)){if(Qt.x=Be.x,Qt.y=Be.y,Kt=Math.max(Kt,Qt.y+Qt.h),Rt=Math.max(Rt,Qt.x+Qt.w),Qt.w===Be.w&&Qt.h===Be.h){let rr=bt.pop();be=0&&bt>=D&&Cx[this.text.charCodeAt(bt)];bt--)nt--;this.text=this.text.substring(D,nt),this.sectionIndex=this.sectionIndex.slice(D,nt)}substring(D,nt){let bt=new Dv;return bt.text=this.text.substring(D,nt),bt.sectionIndex=this.sectionIndex.slice(D,nt),bt.sections=this.sections,bt}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((D,nt)=>Math.max(D,this.sections[nt].scale),0)}addTextSection(D,nt){this.text+=D.text,this.sections.push(Y1.forText(D.scale,D.fontStack||nt));let bt=this.sections.length-1;for(let Rt=0;Rt=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Ex(G,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn){let Ln=Dv.fromFeature(G,Rt),Gn;Lr===t.ah.vertical&&Ln.verticalizePunctuation();let{processBidirectionalText:Mi,processStyledBidirectionalText:Aa}=Kl;if(Mi&&Ln.sections.length===1){Gn=[];let Ya=Mi(Ln.toString(),Ng(Ln,rr,Kt,D,bt,ln));for(let Ao of Ya){let Ss=new Dv;Ss.text=Ao,Ss.sections=Ln.sections;for(let Sl=0;Sl0&&k0>zd&&(zd=k0)}else{let ch=Ss[nc.fontStack],Od=ch&&ch[Zc];if(Od&&Od.rect)Wv=Od.rect,Th=Od.metrics;else{let k0=Ao[nc.fontStack],Hp=k0&&k0[Zc];if(!Hp)continue;Th=Hp.metrics}Gh=(vd-nc.scale)*bc}rp?(Ya.verticalizable=!0,gp.push({glyph:Zc,imageName:j0,x:Zl,y:uh+Gh,vertical:rp,scale:nc.scale,fontStack:nc.fontStack,sectionIndex:Ic,metrics:Th,rect:Wv}),Zl+=U0*nc.scale+uo):(gp.push({glyph:Zc,imageName:j0,x:Zl,y:uh+Gh,vertical:rp,scale:nc.scale,fontStack:nc.fontStack,sectionIndex:Ic,metrics:Th,rect:Wv}),Zl+=Th.advance*nc.scale+uo)}gp.length!==0&&(nh=Math.max(Zl-uo,nh),ZT(gp,0,gp.length-1,Cp,zd)),Zl=0;let Vp=fs*vd+zd;$d.lineOffset=Math.max(zd,ep),uh+=Vp,gd=Math.max(Vp,gd),++zf}var td;let dp=uh-Ov,{horizontalAlign:pp,verticalAlign:mp}=Tb(Xs);(function(sf,vd,ep,$d,gp,zd,Vp,kh,nc){let Ic=(vd-ep)*gp,Zc=0;Zc=zd!==Vp?-kh*$d-Ov:(-$d*nc+.5)*Vp;for(let Gh of sf)for(let Th of Gh.positionedGlyphs)Th.x+=Ic,Th.y+=Zc})(Ya.positionedLines,Cp,pp,mp,nh,gd,fs,dp,_s.length),Ya.top+=-mp*dp,Ya.bottom=Ya.top+dp,Ya.left+=-pp*nh,Ya.right=Ya.left+nh}(ga,D,nt,bt,Gn,Qt,be,Be,Lr,rr,Zr,bn),!function(Ya){for(let Ao of Ya)if(Ao.positionedGlyphs.length!==0)return!1;return!0}(ra)&&ga}let Cx={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},qT={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},$T={40:!0};function Lx(G,D,nt,bt,Rt,Kt){if(D.imageName){let Qt=bt[D.imageName];return Qt?Qt.displaySize[0]*D.scale*bc/Kt+Rt:0}{let Qt=nt[D.fontStack],be=Qt&&Qt[G];return be?be.metrics.advance*D.scale+Rt:0}}function R3(G,D,nt,bt){let Rt=Math.pow(G-D,2);return bt?G=0,rr=0;for(let Lr=0;Lrrr){let xr=Math.ceil(Kt/rr);Rt*=xr/Qt,Qt=xr}return{x1:bt,y1:Rt,x2:bt+Kt,y2:Rt+Qt}}function N3(G,D,nt,bt,Rt,Kt){let Qt=G.image,be;if(Qt.content){let Gn=Qt.content,Mi=Qt.pixelRatio||1;be=[Gn[0]/Mi,Gn[1]/Mi,Qt.displaySize[0]-Gn[2]/Mi,Qt.displaySize[1]-Gn[3]/Mi]}let Be=D.left*Kt,rr=D.right*Kt,xr,Lr,Zr,ln;nt==="width"||nt==="both"?(ln=Rt[0]+Be-bt[3],Lr=Rt[0]+rr+bt[1]):(ln=Rt[0]+(Be+rr-Qt.displaySize[0])/2,Lr=ln+Qt.displaySize[0]);let bn=D.top*Kt,Ln=D.bottom*Kt;return nt==="height"||nt==="both"?(xr=Rt[1]+bn-bt[0],Zr=Rt[1]+Ln+bt[2]):(xr=Rt[1]+(bn+Ln-Qt.displaySize[1])/2,Zr=xr+Qt.displaySize[1]),{image:Qt,top:xr,right:Lr,bottom:Zr,left:ln,collisionPadding:be}}let K1=255,tm=128,Jm=K1*tm;function j3(G,D){let{expression:nt}=D;if(nt.kind==="constant")return{kind:"constant",layoutSize:nt.evaluate(new Rl(G+1))};if(nt.kind==="source")return{kind:"source"};{let{zoomStops:bt,interpolationType:Rt}=nt,Kt=0;for(;KtQt.id),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ri([]),this.placementViewportMatrix=ri([]);let nt=this.layers[0]._unevaluatedLayout._values;this.textSizeData=j3(this.zoom,nt["text-size"]),this.iconSizeData=j3(this.zoom,nt["icon-size"]);let bt=this.layers[0].layout,Rt=bt.get("symbol-sort-key"),Kt=bt.get("symbol-z-order");this.canOverlap=Ab(bt,"text-overlap","text-allow-overlap")!=="never"||Ab(bt,"icon-overlap","icon-allow-overlap")!=="never"||bt.get("text-ignore-placement")||bt.get("icon-ignore-placement"),this.sortFeaturesByKey=Kt!=="viewport-y"&&!Rt.isConstant(),this.sortFeaturesByY=(Kt==="viewport-y"||Kt==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,bt.get("symbol-placement")==="point"&&(this.writingModes=bt.get("text-writing-mode").map(Qt=>t.ah[Qt])),this.stateDependentLayerIds=this.layers.filter(Qt=>Qt.isStateDependent()).map(Qt=>Qt.id),this.sourceID=D.sourceID}createArrays(){this.text=new pf(new Xl(this.layers,this.zoom,D=>/^text/.test(D))),this.icon=new pf(new Xl(this.layers,this.zoom,D=>/^icon/.test(D))),this.glyphOffsetArray=new fl,this.lineVertexArray=new vl,this.symbolInstances=new ds,this.textAnchorOffsets=new wl}calculateGlyphDependencies(D,nt,bt,Rt,Kt){for(let Qt=0;Qt0)&&(Qt.value.kind!=="constant"||Qt.value.value.length>0),xr=Be.value.kind!=="constant"||!!Be.value.value||Object.keys(Be.parameters).length>0,Lr=Kt.get("symbol-sort-key");if(this.features=[],!rr&&!xr)return;let Zr=nt.iconDependencies,ln=nt.glyphDependencies,bn=nt.availableImages,Ln=new Rl(this.zoom);for(let{feature:Gn,id:Mi,index:Aa,sourceLayerIndex:ra}of D){let ga=Rt._featureFilter.needGeometry,Ya=Ir(Gn,ga);if(!Rt._featureFilter.filter(Ln,Ya,bt))continue;let Ao,Ss;if(ga||(Ya.geometry=kr(Gn)),rr){let _s=Rt.getValueAndResolveTokens("text-field",Ya,bt,bn),fs=Tn.factory(_s),Xs=this.hasRTLText=this.hasRTLText||KT(fs);(!Xs||Kl.getRTLTextPluginStatus()==="unavailable"||Xs&&Kl.isParsed())&&(Ao=of(fs,Rt,Ya))}if(xr){let _s=Rt.getValueAndResolveTokens("icon-image",Ya,bt,bn);Ss=_s instanceof Oi?_s:Oi.fromString(_s)}if(!Ao&&!Ss)continue;let Sl=this.sortFeaturesByKey?Lr.evaluate(Ya,{},bt):void 0;if(this.features.push({id:Mi,text:Ao,icon:Ss,index:Aa,sourceLayerIndex:ra,geometry:Ya.geometry,properties:Gn.properties,type:YT[Gn.type],sortKey:Sl}),Ss&&(Zr[Ss.name]=!0),Ao){let _s=Qt.evaluate(Ya,{},bt).join(","),fs=Kt.get("text-rotation-alignment")!=="viewport"&&Kt.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.ah.vertical)>=0;for(let Xs of Ao.sections)if(Xs.image)Zr[Xs.image.name]=!0;else{let js=gs(Ao.toString()),Os=Xs.fontStack||_s,uo=ln[Os]=ln[Os]||{};this.calculateGlyphDependencies(Xs.text,uo,fs,this.allowVerticalPlacement,js)}}}Kt.get("symbol-placement")==="line"&&(this.features=function(Gn){let Mi={},Aa={},ra=[],ga=0;function Ya(_s){ra.push(Gn[_s]),ga++}function Ao(_s,fs,Xs){let js=Aa[_s];return delete Aa[_s],Aa[fs]=js,ra[js].geometry[0].pop(),ra[js].geometry[0]=ra[js].geometry[0].concat(Xs[0]),js}function Ss(_s,fs,Xs){let js=Mi[fs];return delete Mi[fs],Mi[_s]=js,ra[js].geometry[0].shift(),ra[js].geometry[0]=Xs[0].concat(ra[js].geometry[0]),js}function Sl(_s,fs,Xs){let js=Xs?fs[0][fs[0].length-1]:fs[0][0];return`${_s}:${js.x}:${js.y}`}for(let _s=0;_s_s.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Gn,Mi)=>Gn.sortKey-Mi.sortKey)}update(D,nt,bt){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,nt,this.layers,bt),this.icon.programConfigurations.updatePaintArrays(D,nt,this.layers,bt))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(D,nt){let bt=this.lineVertexArray.length;if(D.segment!==void 0){let Rt=D.dist(nt[D.segment+1]),Kt=D.dist(nt[D.segment]),Qt={};for(let be=D.segment+1;be=0;be--)Qt[be]={x:nt[be].x,y:nt[be].y,tileUnitDistanceFromAnchor:Kt},be>0&&(Kt+=nt[be-1].dist(nt[be]));for(let be=0;be0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(D,nt){let bt=D.placedSymbolArray.get(nt),Rt=bt.vertexStartIndex+4*bt.numGlyphs;for(let Kt=bt.vertexStartIndex;KtRt[be]-Rt[Be]||Kt[Be]-Kt[be]),Qt}addToSortKeyRanges(D,nt){let bt=this.sortKeyRanges[this.sortKeyRanges.length-1];bt&&bt.sortKey===nt?bt.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:nt,symbolInstanceStart:D,symbolInstanceEnd:D+1})}sortFeatures(D){if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let nt of this.symbolInstanceIndexes){let bt=this.symbolInstances.get(nt);this.featureSortOrder.push(bt.featureIndex),[bt.rightJustifiedTextSymbolIndex,bt.centerJustifiedTextSymbolIndex,bt.leftJustifiedTextSymbolIndex].forEach((Rt,Kt,Qt)=>{Rt>=0&&Qt.indexOf(Rt)===Kt&&this.addIndicesForPlacedSymbol(this.text,Rt)}),bt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,bt.verticalPlacedTextSymbolIndex),bt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,bt.placedIconSymbolIndex),bt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,bt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let X1,J1;na("SymbolBucket",jg,{omit:["layers","collisionBoxArray","features","compareText"]}),jg.MAX_GLYPHS=65535,jg.addDynamicAttributes=Qm;var Sb={get paint(){return J1=J1||new $t({"icon-opacity":new zs(ut.paint_symbol["icon-opacity"]),"icon-color":new zs(ut.paint_symbol["icon-color"]),"icon-halo-color":new zs(ut.paint_symbol["icon-halo-color"]),"icon-halo-width":new zs(ut.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zs(ut.paint_symbol["icon-halo-blur"]),"icon-translate":new rs(ut.paint_symbol["icon-translate"]),"icon-translate-anchor":new rs(ut.paint_symbol["icon-translate-anchor"]),"text-opacity":new zs(ut.paint_symbol["text-opacity"]),"text-color":new zs(ut.paint_symbol["text-color"],{runtimeType:cr,getOverride:G=>G.textColor,hasOverride:G=>!!G.textColor}),"text-halo-color":new zs(ut.paint_symbol["text-halo-color"]),"text-halo-width":new zs(ut.paint_symbol["text-halo-width"]),"text-halo-blur":new zs(ut.paint_symbol["text-halo-blur"]),"text-translate":new rs(ut.paint_symbol["text-translate"]),"text-translate-anchor":new rs(ut.paint_symbol["text-translate-anchor"])})},get layout(){return X1=X1||new $t({"symbol-placement":new rs(ut.layout_symbol["symbol-placement"]),"symbol-spacing":new rs(ut.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new rs(ut.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zs(ut.layout_symbol["symbol-sort-key"]),"symbol-z-order":new rs(ut.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new rs(ut.layout_symbol["icon-allow-overlap"]),"icon-overlap":new rs(ut.layout_symbol["icon-overlap"]),"icon-ignore-placement":new rs(ut.layout_symbol["icon-ignore-placement"]),"icon-optional":new rs(ut.layout_symbol["icon-optional"]),"icon-rotation-alignment":new rs(ut.layout_symbol["icon-rotation-alignment"]),"icon-size":new zs(ut.layout_symbol["icon-size"]),"icon-text-fit":new rs(ut.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new rs(ut.layout_symbol["icon-text-fit-padding"]),"icon-image":new zs(ut.layout_symbol["icon-image"]),"icon-rotate":new zs(ut.layout_symbol["icon-rotate"]),"icon-padding":new zs(ut.layout_symbol["icon-padding"]),"icon-keep-upright":new rs(ut.layout_symbol["icon-keep-upright"]),"icon-offset":new zs(ut.layout_symbol["icon-offset"]),"icon-anchor":new zs(ut.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new rs(ut.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new rs(ut.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new rs(ut.layout_symbol["text-rotation-alignment"]),"text-field":new zs(ut.layout_symbol["text-field"]),"text-font":new zs(ut.layout_symbol["text-font"]),"text-size":new zs(ut.layout_symbol["text-size"]),"text-max-width":new zs(ut.layout_symbol["text-max-width"]),"text-line-height":new rs(ut.layout_symbol["text-line-height"]),"text-letter-spacing":new zs(ut.layout_symbol["text-letter-spacing"]),"text-justify":new zs(ut.layout_symbol["text-justify"]),"text-radial-offset":new zs(ut.layout_symbol["text-radial-offset"]),"text-variable-anchor":new rs(ut.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new zs(ut.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new zs(ut.layout_symbol["text-anchor"]),"text-max-angle":new rs(ut.layout_symbol["text-max-angle"]),"text-writing-mode":new rs(ut.layout_symbol["text-writing-mode"]),"text-rotate":new zs(ut.layout_symbol["text-rotate"]),"text-padding":new rs(ut.layout_symbol["text-padding"]),"text-keep-upright":new rs(ut.layout_symbol["text-keep-upright"]),"text-transform":new zs(ut.layout_symbol["text-transform"]),"text-offset":new zs(ut.layout_symbol["text-offset"]),"text-allow-overlap":new rs(ut.layout_symbol["text-allow-overlap"]),"text-overlap":new rs(ut.layout_symbol["text-overlap"]),"text-ignore-placement":new rs(ut.layout_symbol["text-ignore-placement"]),"text-optional":new rs(ut.layout_symbol["text-optional"])})}};class Rv{constructor(D){if(D.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=D.property.overrides?D.property.overrides.runtimeType:oe,this.defaultValue=D}evaluate(D){if(D.formattedSection){let nt=this.defaultValue.property.overrides;if(nt&&nt.hasOverride(D.formattedSection))return nt.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default}eachChild(D){this.defaultValue.isConstant()||D(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}na("FormatSectionOverride",Rv,{omit:["defaultValue"]});class zx extends ht{constructor(D){super(D,Sb)}recalculate(D,nt){if(super.recalculate(D,nt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let bt=this.layout.get("text-writing-mode");if(bt){let Rt=[];for(let Kt of bt)Rt.indexOf(Kt)<0&&Rt.push(Kt);this.layout._values["text-writing-mode"]=Rt}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,nt,bt,Rt){let Kt=this.layout.get(D).evaluate(nt,{},bt,Rt),Qt=this._unevaluatedLayout._values[D];return Qt.isDataDriven()||Wh(Qt.value)||!Kt?Kt:function(be,Be){return Be.replace(/{([^{}]+)}/g,(rr,xr)=>be&&xr in be?String(be[xr]):"")}(nt.properties,Kt)}createBucket(D){return new jg(D)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let D of Sb.paint.overridableProperties){if(!zx.hasPaintOverride(this.layout,D))continue;let nt=this.paint.get(D),bt=new Rv(nt),Rt=new jc(bt,nt.property.specification),Kt=null;Kt=nt.value.kind==="constant"||nt.value.kind==="source"?new Ch("source",Rt):new Mc("composite",Rt,nt.value.zoomStops),this.paint._values[D]=new Du(nt.property,Kt,nt.parameters)}}_handleOverridablePaintPropertyUpdate(D,nt,bt){return!(!this.layout||nt.isDataDriven()||bt.isDataDriven())&&zx.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,nt){let bt=D.get("text-field"),Rt=Sb.paint.properties[nt],Kt=!1,Qt=be=>{for(let Be of be)if(Rt.overrides&&Rt.overrides.hasOverride(Be))return void(Kt=!0)};if(bt.value.kind==="constant"&&bt.value.value instanceof Tn)Qt(bt.value.value.sections);else if(bt.value.kind==="source"){let be=rr=>{Kt||(rr instanceof Wa&&ci(rr.value)===br?Qt(rr.value.sections):rr instanceof kl?Qt(rr.sections):rr.eachChild(be))},Be=bt.value;Be._styleExpression&&be(Be._styleExpression.expression)}return Kt}}let Eb;var U3={get paint(){return Eb=Eb||new $t({"background-color":new rs(ut.paint_background["background-color"]),"background-pattern":new $u(ut.paint_background["background-pattern"]),"background-opacity":new rs(ut.paint_background["background-opacity"])})}};class Q1 extends ht{constructor(D){super(D,U3)}}let Ox;var Cb={get paint(){return Ox=Ox||new $t({"raster-opacity":new rs(ut.paint_raster["raster-opacity"]),"raster-hue-rotate":new rs(ut.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new rs(ut.paint_raster["raster-brightness-min"]),"raster-brightness-max":new rs(ut.paint_raster["raster-brightness-max"]),"raster-saturation":new rs(ut.paint_raster["raster-saturation"]),"raster-contrast":new rs(ut.paint_raster["raster-contrast"]),"raster-resampling":new rs(ut.paint_raster["raster-resampling"]),"raster-fade-duration":new rs(ut.paint_raster["raster-fade-duration"])})}};class XT extends ht{constructor(D){super(D,Cb)}}class V3 extends ht{constructor(D){super(D,{}),this.onAdd=nt=>{this.implementation.onAdd&&this.implementation.onAdd(nt,nt.painter.context.gl)},this.onRemove=nt=>{this.implementation.onRemove&&this.implementation.onRemove(nt,nt.painter.context.gl)},this.implementation=D}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class ty{constructor(D){this._methodToThrottle=D,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let Lb=63710088e-1;class em{constructor(D,nt){if(isNaN(D)||isNaN(nt))throw new Error(`Invalid LngLat object: (${D}, ${nt})`);if(this.lng=+D,this.lat=+nt,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new em(P(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(D){let nt=Math.PI/180,bt=this.lat*nt,Rt=D.lat*nt,Kt=Math.sin(bt)*Math.sin(Rt)+Math.cos(bt)*Math.cos(Rt)*Math.cos((D.lng-this.lng)*nt);return Lb*Math.acos(Math.min(Kt,1))}static convert(D){if(D instanceof em)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new em(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new em(Number("lng"in D?D.lng:D.lon),Number(D.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let H3=2*Math.PI*Lb;function Dx(G){return H3*Math.cos(G*Math.PI/180)}function Fx(G){return(180+G)/360}function W3(G){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G*Math.PI/360)))/360}function w0(G,D){return G/Dx(D)}function Pb(G){return 360/Math.PI*Math.atan(Math.exp((180-360*G)*Math.PI/180))-90}class ey{constructor(D,nt,bt=0){this.x=+D,this.y=+nt,this.z=+bt}static fromLngLat(D,nt=0){let bt=em.convert(D);return new ey(Fx(bt.lng),W3(bt.lat),w0(nt,bt.lat))}toLngLat(){return new em(360*this.x-180,Pb(this.y))}toAltitude(){return this.z*Dx(Pb(this.y))}meterInMercatorCoordinateUnits(){return 1/H3*(D=Pb(this.y),1/Math.cos(D*Math.PI/180));var D}}function q3(G,D,nt){var bt=2*Math.PI*6378137/256/Math.pow(2,nt);return[G*bt-2*Math.PI*6378137/2,D*bt-2*Math.PI*6378137/2]}class Ib{constructor(D,nt,bt){if(!function(Rt,Kt,Qt){return!(Rt<0||Rt>25||Qt<0||Qt>=Math.pow(2,Rt)||Kt<0||Kt>=Math.pow(2,Rt))}(D,nt,bt))throw new Error(`x=${nt}, y=${bt}, z=${D} outside of bounds. 0<=x<${Math.pow(2,D)}, 0<=y<${Math.pow(2,D)} 0<=z<=25 `);this.z=D,this.x=nt,this.y=bt,this.key=Bv(0,D,D,nt,bt)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,nt,bt){let Rt=(Qt=this.y,be=this.z,Be=q3(256*(Kt=this.x),256*(Qt=Math.pow(2,be)-Qt-1),be),rr=q3(256*(Kt+1),256*(Qt+1),be),Be[0]+","+Be[1]+","+rr[0]+","+rr[1]);var Kt,Qt,be,Be,rr;let xr=function(Lr,Zr,ln){let bn,Ln="";for(let Gn=Lr;Gn>0;Gn--)bn=1<1?"@2x":"").replace(/{quadkey}/g,xr).replace(/{bbox-epsg-3857}/g,Rt)}isChildOf(D){let nt=this.z-D.z;return nt>0&&D.x===this.x>>nt&&D.y===this.y>>nt}getTilePoint(D){let nt=Math.pow(2,this.z);return new o((D.x*nt-this.x)*ru,(D.y*nt-this.y)*ru)}toString(){return`${this.z}/${this.x}/${this.y}`}}class $3{constructor(D,nt){this.wrap=D,this.canonical=nt,this.key=Bv(D,nt.z,nt.z,nt.x,nt.y)}}class l0{constructor(D,nt,bt,Rt,Kt){if(D= z; overscaledZ = ${D}; z = ${bt}`);this.overscaledZ=D,this.wrap=nt,this.canonical=new Ib(bt,+Rt,+Kt),this.key=Bv(nt,D,bt,Rt,Kt)}clone(){return new l0(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)}scaledTo(D){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let nt=this.canonical.z-D;return D>this.canonical.z?new l0(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new l0(D,this.wrap,D,this.canonical.x>>nt,this.canonical.y>>nt)}calculateScaledKey(D,nt){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let bt=this.canonical.z-D;return D>this.canonical.z?Bv(this.wrap*+nt,D,this.canonical.z,this.canonical.x,this.canonical.y):Bv(this.wrap*+nt,D,D,this.canonical.x>>bt,this.canonical.y>>bt)}isChildOf(D){if(D.wrap!==this.wrap)return!1;let nt=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ>nt&&D.canonical.y===this.canonical.y>>nt}children(D){if(this.overscaledZ>=D)return[new l0(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let nt=this.canonical.z+1,bt=2*this.canonical.x,Rt=2*this.canonical.y;return[new l0(nt,this.wrap,nt,bt,Rt),new l0(nt,this.wrap,nt,bt+1,Rt),new l0(nt,this.wrap,nt,bt,Rt+1),new l0(nt,this.wrap,nt,bt+1,Rt+1)]}isLessThan(D){return this.wrapD.wrap)&&(this.overscaledZD.overscaledZ)&&(this.canonical.xD.canonical.x)&&this.canonical.ythis.max&&(this.max=Lr),Lr=this.dim+1||nt<-1||nt>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(nt+1)*this.stride+(D+1)}unpack(D,nt,bt){return D*this.redFactor+nt*this.greenFactor+bt*this.blueFactor-this.baseShift}getPixels(){return new Al({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,nt,bt){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let Rt=nt*this.dim,Kt=nt*this.dim+this.dim,Qt=bt*this.dim,be=bt*this.dim+this.dim;switch(nt){case-1:Rt=Kt-1;break;case 1:Kt=Rt+1}switch(bt){case-1:Qt=be-1;break;case 1:be=Qt+1}let Be=-nt*this.dim,rr=-bt*this.dim;for(let xr=Qt;xr=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${D} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[D]}}class G3{constructor(D,nt,bt,Rt,Kt){this.type="Feature",this._vectorTileFeature=D,D._z=nt,D._x=bt,D._y=Rt,this.properties=D.properties,this.id=Kt}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(D){this._geometry=D}toJSON(){let D={geometry:this.geometry};for(let nt in this)nt!=="_geometry"&&nt!=="_vectorTileFeature"&&(D[nt]=this[nt]);return D}}class Y3{constructor(D,nt){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new Oa(ru,16,0),this.grid3D=new Oa(ru,16,0),this.featureIndexArray=new gu,this.promoteId=nt}insert(D,nt,bt,Rt,Kt,Qt){let be=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(bt,Rt,Kt);let Be=Qt?this.grid3D:this.grid;for(let rr=0;rr=0&&Lr[3]>=0&&Be.insert(be,Lr[0],Lr[1],Lr[2],Lr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new mi.VectorTile(new _b(this.rawTileData)).layers,this.sourceLayerCoder=new Z3(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(D,nt,bt,Rt){this.loadVTLayers();let Kt=D.params||{},Qt=ru/D.tileSize/D.scale,be=Cf(Kt.filter),Be=D.queryGeometry,rr=D.queryPadding*Qt,xr=zb(Be),Lr=this.grid.query(xr.minX-rr,xr.minY-rr,xr.maxX+rr,xr.maxY+rr),Zr=zb(D.cameraQueryGeometry),ln=this.grid3D.query(Zr.minX-rr,Zr.minY-rr,Zr.maxX+rr,Zr.maxY+rr,(Gn,Mi,Aa,ra)=>function(ga,Ya,Ao,Ss,Sl){for(let fs of ga)if(Ya<=fs.x&&Ao<=fs.y&&Ss>=fs.x&&Sl>=fs.y)return!0;let _s=[new o(Ya,Ao),new o(Ya,Sl),new o(Ss,Sl),new o(Ss,Ao)];if(ga.length>2){for(let fs of _s)if(Ai(ga,fs))return!0}for(let fs=0;fs(ra||(ra=kr(ga)),Ya.queryIntersectsFeature(Be,ga,Ao,ra,this.z,D.transform,Qt,D.pixelPosMatrix)))}return bn}loadMatchingFeature(D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr){let Zr=this.bucketLayerIDs[nt];if(Qt&&!function(Gn,Mi){for(let Aa=0;Aa=0)return!0;return!1}(Qt,Zr))return;let ln=this.sourceLayerCoder.decode(bt),bn=this.vtLayers[ln].feature(Rt);if(Kt.needGeometry){let Gn=Ir(bn,!0);if(!Kt.filter(new Rl(this.tileID.overscaledZ),Gn,this.tileID.canonical))return}else if(!Kt.filter(new Rl(this.tileID.overscaledZ),bn))return;let Ln=this.getId(bn,ln);for(let Gn=0;Gn{let be=D instanceof Oh?D.get(Qt):null;return be&&be.evaluate?be.evaluate(nt,bt,Rt):be})}function zb(G){let D=1/0,nt=1/0,bt=-1/0,Rt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),bt=Math.max(bt,Kt.x),Rt=Math.max(Rt,Kt.y);return{minX:D,minY:nt,maxX:bt,maxY:Rt}}function X3(G,D){return D-G}function J3(G,D,nt,bt,Rt){let Kt=[];for(let Qt=0;Qt=bt&&Lr.x>=bt||(xr.x>=bt?xr=new o(bt,xr.y+(bt-xr.x)/(Lr.x-xr.x)*(Lr.y-xr.y))._round():Lr.x>=bt&&(Lr=new o(bt,xr.y+(bt-xr.x)/(Lr.x-xr.x)*(Lr.y-xr.y))._round()),xr.y>=Rt&&Lr.y>=Rt||(xr.y>=Rt?xr=new o(xr.x+(Rt-xr.y)/(Lr.y-xr.y)*(Lr.x-xr.x),Rt)._round():Lr.y>=Rt&&(Lr=new o(xr.x+(Rt-xr.y)/(Lr.y-xr.y)*(Lr.x-xr.x),Rt)._round()),Be&&xr.equals(Be[Be.length-1])||(Be=[xr],Kt.push(Be)),Be.push(Lr)))))}}return Kt}na("FeatureIndex",Y3,{omit:["rawTileData","sourceLayerCoder"]});class tg extends o{constructor(D,nt,bt,Rt){super(D,nt),this.angle=bt,Rt!==void 0&&(this.segment=Rt)}clone(){return new tg(this.x,this.y,this.angle,this.segment)}}function Q3(G,D,nt,bt,Rt){if(D.segment===void 0||nt===0)return!0;let Kt=D,Qt=D.segment+1,be=0;for(;be>-nt/2;){if(Qt--,Qt<0)return!1;be-=G[Qt].dist(Kt),Kt=G[Qt]}be+=G[Qt].dist(G[Qt+1]),Qt++;let Be=[],rr=0;for(;bebt;)rr-=Be.shift().angleDelta;if(rr>Rt)return!1;Qt++,be+=xr.dist(Lr)}return!0}function t5(G){let D=0;for(let nt=0;ntrr){let bn=(rr-Be)/ln,Ln=Fo.number(Lr.x,Zr.x,bn),Gn=Fo.number(Lr.y,Zr.y,bn),Mi=new tg(Ln,Gn,Zr.angleTo(Lr),xr);return Mi._round(),!Qt||Q3(G,Mi,be,Qt,D)?Mi:void 0}Be+=ln}}function QT(G,D,nt,bt,Rt,Kt,Qt,be,Be){let rr=e5(bt,Kt,Qt),xr=r5(bt,Rt),Lr=xr*Qt,Zr=G[0].x===0||G[0].x===Be||G[0].y===0||G[0].y===Be;return D-Lr=0&&ga=0&&Ya=0&&Zr+rr<=xr){let Ao=new tg(ga,Ya,Aa,bn);Ao._round(),bt&&!Q3(G,Ao,Kt,bt,Rt)||ln.push(Ao)}}Lr+=Mi}return be||ln.length||Qt||(ln=Vg(G,Lr/2,nt,bt,Rt,Kt,Qt,!0,Be)),ln}na("Anchor",tg);let Nv=Qf;function n5(G,D,nt,bt){let Rt=[],Kt=G.image,Qt=Kt.pixelRatio,be=Kt.paddedRect.w-2*Nv,Be=Kt.paddedRect.h-2*Nv,rr={x1:G.left,y1:G.top,x2:G.right,y2:G.bottom},xr=Kt.stretchX||[[0,be]],Lr=Kt.stretchY||[[0,Be]],Zr=(uo,il)=>uo+il[1]-il[0],ln=xr.reduce(Zr,0),bn=Lr.reduce(Zr,0),Ln=be-ln,Gn=Be-bn,Mi=0,Aa=ln,ra=0,ga=bn,Ya=0,Ao=Ln,Ss=0,Sl=Gn;if(Kt.content&&bt){let uo=Kt.content,il=uo[2]-uo[0],Js=uo[3]-uo[1];(Kt.textFitWidth||Kt.textFitHeight)&&(rr=B3(G)),Mi=jv(xr,0,uo[0]),ra=jv(Lr,0,uo[1]),Aa=jv(xr,uo[0],uo[2]),ga=jv(Lr,uo[1],uo[3]),Ya=uo[0]-Mi,Ss=uo[1]-ra,Ao=il-Aa,Sl=Js-ga}let _s=rr.x1,fs=rr.y1,Xs=rr.x2-_s,js=rr.y2-fs,Os=(uo,il,Js,Zl)=>{let uh=Up(uo.stretch-Mi,Aa,Xs,_s),nh=Rx(uo.fixed-Ya,Ao,uo.stretch,ln),gd=Up(il.stretch-ra,ga,js,fs),Cp=Rx(il.fixed-Ss,Sl,il.stretch,bn),zf=Up(Js.stretch-Mi,Aa,Xs,_s),td=Rx(Js.fixed-Ya,Ao,Js.stretch,ln),dp=Up(Zl.stretch-ra,ga,js,fs),pp=Rx(Zl.fixed-Ss,Sl,Zl.stretch,bn),mp=new o(uh,gd),sf=new o(zf,gd),vd=new o(zf,dp),ep=new o(uh,dp),$d=new o(nh/Qt,Cp/Qt),gp=new o(td/Qt,pp/Qt),zd=D*Math.PI/180;if(zd){let nc=Math.sin(zd),Ic=Math.cos(zd),Zc=[Ic,-nc,nc,Ic];mp._matMult(Zc),sf._matMult(Zc),ep._matMult(Zc),vd._matMult(Zc)}let Vp=uo.stretch+uo.fixed,kh=il.stretch+il.fixed;return{tl:mp,tr:sf,bl:ep,br:vd,tex:{x:Kt.paddedRect.x+Nv+Vp,y:Kt.paddedRect.y+Nv+kh,w:Js.stretch+Js.fixed-Vp,h:Zl.stretch+Zl.fixed-kh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:$d,pixelOffsetBR:gp,minFontScaleX:Ao/Qt/Xs,minFontScaleY:Sl/Qt/js,isSDF:nt}};if(bt&&(Kt.stretchX||Kt.stretchY)){let uo=Uv(xr,Ln,ln),il=Uv(Lr,Gn,bn);for(let Js=0;Js0&&(Ln=Math.max(10,Ln),this.circleDiameter=Ln)}else{let Zr=!((Lr=Qt.image)===null||Lr===void 0)&&Lr.content&&(Qt.image.textFitWidth||Qt.image.textFitHeight)?B3(Qt):{x1:Qt.left,y1:Qt.top,x2:Qt.right,y2:Qt.bottom};Zr.y1=Zr.y1*be-Be[0],Zr.y2=Zr.y2*be+Be[2],Zr.x1=Zr.x1*be-Be[3],Zr.x2=Zr.x2*be+Be[1];let ln=Qt.collisionPadding;if(ln&&(Zr.x1-=ln[0]*be,Zr.y1-=ln[1]*be,Zr.x2+=ln[2]*be,Zr.y2+=ln[3]*be),xr){let bn=new o(Zr.x1,Zr.y1),Ln=new o(Zr.x2,Zr.y1),Gn=new o(Zr.x1,Zr.y2),Mi=new o(Zr.x2,Zr.y2),Aa=xr*Math.PI/180;bn._rotate(Aa),Ln._rotate(Aa),Gn._rotate(Aa),Mi._rotate(Aa),Zr.x1=Math.min(bn.x,Ln.x,Gn.x,Mi.x),Zr.x2=Math.max(bn.x,Ln.x,Gn.x,Mi.x),Zr.y1=Math.min(bn.y,Ln.y,Gn.y,Mi.y),Zr.y2=Math.max(bn.y,Ln.y,Gn.y,Mi.y)}D.emplaceBack(nt.x,nt.y,Zr.x1,Zr.y1,Zr.x2,Zr.y2,bt,Rt,Kt)}this.boxEndIndex=D.length}}class t8{constructor(D=[],nt=(bt,Rt)=>btRt?1:0){if(this.data=D,this.length=this.data.length,this.compare=nt,this.length>0)for(let bt=(this.length>>1)-1;bt>=0;bt--)this._down(bt)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],nt=this.data.pop();return--this.length>0&&(this.data[0]=nt,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:nt,compare:bt}=this,Rt=nt[D];for(;D>0;){let Kt=D-1>>1,Qt=nt[Kt];if(bt(Rt,Qt)>=0)break;nt[D]=Qt,D=Kt}nt[D]=Rt}_down(D){let{data:nt,compare:bt}=this,Rt=this.length>>1,Kt=nt[D];for(;D=0)break;nt[D]=nt[Qt],D=Qt}nt[D]=Kt}}function e8(G,D=1,nt=!1){let bt=1/0,Rt=1/0,Kt=-1/0,Qt=-1/0,be=G[0];for(let ln=0;lnKt)&&(Kt=bn.x),(!ln||bn.y>Qt)&&(Qt=bn.y)}let Be=Math.min(Kt-bt,Qt-Rt),rr=Be/2,xr=new t8([],r8);if(Be===0)return new o(bt,Rt);for(let ln=bt;lnLr.d||!Lr.d)&&(Lr=ln,nt&&console.log("found best %d after %d probes",Math.round(1e4*ln.d)/1e4,Zr)),ln.max-Lr.d<=D||(rr=ln.h/2,xr.push(new rm(ln.p.x-rr,ln.p.y-rr,rr,G)),xr.push(new rm(ln.p.x+rr,ln.p.y-rr,rr,G)),xr.push(new rm(ln.p.x-rr,ln.p.y+rr,rr,G)),xr.push(new rm(ln.p.x+rr,ln.p.y+rr,rr,G)),Zr+=4)}return nt&&(console.log(`num probes: ${Zr}`),console.log(`best distance: ${Lr.d}`)),Lr.p}function r8(G,D){return D.max-G.max}function rm(G,D,nt,bt){this.p=new o(G,D),this.h=nt,this.d=function(Rt,Kt){let Qt=!1,be=1/0;for(let Be=0;BeRt.y!=bn.y>Rt.y&&Rt.x<(bn.x-ln.x)*(Rt.y-ln.y)/(bn.y-ln.y)+ln.x&&(Qt=!Qt),be=Math.min(be,Na(Rt,ln,bn))}}return(Qt?1:-1)*Math.sqrt(be)}(this.p,bt),this.max=this.d+this.h*Math.SQRT2}var Id;t.aq=void 0,(Id=t.aq||(t.aq={}))[Id.center=1]="center",Id[Id.left=2]="left",Id[Id.right=3]="right",Id[Id.top=4]="top",Id[Id.bottom=5]="bottom",Id[Id["top-left"]=6]="top-left",Id[Id["top-right"]=7]="top-right",Id[Id["bottom-left"]=8]="bottom-left",Id[Id["bottom-right"]=9]="bottom-right";let eg=7,Ob=Number.POSITIVE_INFINITY;function i5(G,D){return D[1]!==Ob?function(nt,bt,Rt){let Kt=0,Qt=0;switch(bt=Math.abs(bt),Rt=Math.abs(Rt),nt){case"top-right":case"top-left":case"top":Qt=Rt-eg;break;case"bottom-right":case"bottom-left":case"bottom":Qt=-Rt+eg}switch(nt){case"top-right":case"bottom-right":case"right":Kt=-bt;break;case"top-left":case"bottom-left":case"left":Kt=bt}return[Kt,Qt]}(G,D[0],D[1]):function(nt,bt){let Rt=0,Kt=0;bt<0&&(bt=0);let Qt=bt/Math.SQRT2;switch(nt){case"top-right":case"top-left":Kt=Qt-eg;break;case"bottom-right":case"bottom-left":Kt=-Qt+eg;break;case"bottom":Kt=-bt+eg;break;case"top":Kt=bt-eg}switch(nt){case"top-right":case"bottom-right":Rt=-Qt;break;case"top-left":case"bottom-left":Rt=Qt;break;case"left":Rt=bt;break;case"right":Rt=-bt}return[Rt,Kt]}(G,D[0])}function a5(G,D,nt){var bt;let Rt=G.layout,Kt=(bt=Rt.get("text-variable-anchor-offset"))===null||bt===void 0?void 0:bt.evaluate(D,{},nt);if(Kt){let be=Kt.values,Be=[];for(let rr=0;rrZr*bc);xr.startsWith("top")?Lr[1]-=eg:xr.startsWith("bottom")&&(Lr[1]+=eg),Be[rr+1]=Lr}return new ki(Be)}let Qt=Rt.get("text-variable-anchor");if(Qt){let be;be=G._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[Rt.get("text-radial-offset").evaluate(D,{},nt)*bc,Ob]:Rt.get("text-offset").evaluate(D,{},nt).map(rr=>rr*bc);let Be=[];for(let rr of Qt)Be.push(rr,i5(rr,be));return new ki(Be)}return null}function Db(G){switch(G){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function n8(G,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr){let Lr=Kt.textMaxSize.evaluate(D,{});Lr===void 0&&(Lr=Qt);let Zr=G.layers[0].layout,ln=Zr.get("icon-offset").evaluate(D,{},xr),bn=s5(nt.horizontal),Ln=Qt/24,Gn=G.tilePixelRatio*Ln,Mi=G.tilePixelRatio*Lr/24,Aa=G.tilePixelRatio*be,ra=G.tilePixelRatio*Zr.get("symbol-spacing"),ga=Zr.get("text-padding")*G.tilePixelRatio,Ya=function(uo,il,Js,Zl=1){let uh=uo.get("icon-padding").evaluate(il,{},Js),nh=uh&&uh.values;return[nh[0]*Zl,nh[1]*Zl,nh[2]*Zl,nh[3]*Zl]}(Zr,D,xr,G.tilePixelRatio),Ao=Zr.get("text-max-angle")/180*Math.PI,Ss=Zr.get("text-rotation-alignment")!=="viewport"&&Zr.get("symbol-placement")!=="point",Sl=Zr.get("icon-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",_s=Zr.get("symbol-placement"),fs=ra/2,Xs=Zr.get("icon-text-fit"),js;bt&&Xs!=="none"&&(G.allowVerticalPlacement&&nt.vertical&&(js=N3(bt,nt.vertical,Xs,Zr.get("icon-text-fit-padding"),ln,Ln)),bn&&(bt=N3(bt,bn,Xs,Zr.get("icon-text-fit-padding"),ln,Ln)));let Os=(uo,il)=>{il.x<0||il.x>=ru||il.y<0||il.y>=ru||function(Js,Zl,uh,nh,gd,Cp,zf,td,dp,pp,mp,sf,vd,ep,$d,gp,zd,Vp,kh,nc,Ic,Zc,Gh,Th,Wv){let j0=Js.addToLineVertexArray(Zl,uh),U0,rp,ch,Od,k0=0,Hp=0,vp=0,Ub=0,Vb=-1,Vx=-1,Am={},Hb=Kn("");if(Js.allowVerticalPlacement&&nh.vertical){let Zd=td.layout.get("text-rotate").evaluate(Ic,{},Th)+90;ch=new Bx(dp,Zl,pp,mp,sf,nh.vertical,vd,ep,$d,Zd),zf&&(Od=new Bx(dp,Zl,pp,mp,sf,zf,zd,Vp,$d,Zd))}if(gd){let Zd=td.layout.get("icon-rotate").evaluate(Ic,{}),Wp=td.layout.get("icon-text-fit")!=="none",rg=n5(gd,Zd,Gh,Wp),V0=zf?n5(zf,Zd,Gh,Wp):void 0;rp=new Bx(dp,Zl,pp,mp,sf,gd,zd,Vp,!1,Zd),k0=4*rg.length;let Hg=Js.iconSizeData,H0=null;Hg.kind==="source"?(H0=[tm*td.layout.get("icon-size").evaluate(Ic,{})],H0[0]>Jm&&w(`${Js.layerIds[0]}: Value for "icon-size" is >= ${K1}. Reduce your "icon-size".`)):Hg.kind==="composite"&&(H0=[tm*Zc.compositeIconSizes[0].evaluate(Ic,{},Th),tm*Zc.compositeIconSizes[1].evaluate(Ic,{},Th)],(H0[0]>Jm||H0[1]>Jm)&&w(`${Js.layerIds[0]}: Value for "icon-size" is >= ${K1}. Reduce your "icon-size".`)),Js.addSymbols(Js.icon,rg,H0,nc,kh,Ic,t.ah.none,Zl,j0.lineStartIndex,j0.lineLength,-1,Th),Vb=Js.icon.placedSymbolArray.length-1,V0&&(Hp=4*V0.length,Js.addSymbols(Js.icon,V0,H0,nc,kh,Ic,t.ah.vertical,Zl,j0.lineStartIndex,j0.lineLength,-1,Th),Vx=Js.icon.placedSymbolArray.length-1)}let Wb=Object.keys(nh.horizontal);for(let Zd of Wb){let Wp=nh.horizontal[Zd];if(!U0){Hb=Kn(Wp.text);let V0=td.layout.get("text-rotate").evaluate(Ic,{},Th);U0=new Bx(dp,Zl,pp,mp,sf,Wp,vd,ep,$d,V0)}let rg=Wp.positionedLines.length===1;if(vp+=o5(Js,Zl,Wp,Cp,td,$d,Ic,gp,j0,nh.vertical?t.ah.horizontal:t.ah.horizontalOnly,rg?Wb:[Zd],Am,Vb,Zc,Th),rg)break}nh.vertical&&(Ub+=o5(Js,Zl,nh.vertical,Cp,td,$d,Ic,gp,j0,t.ah.vertical,["vertical"],Am,Vx,Zc,Th));let qb=U0?U0.boxStartIndex:Js.collisionBoxArray.length,$b=U0?U0.boxEndIndex:Js.collisionBoxArray.length,i8=ch?ch.boxStartIndex:Js.collisionBoxArray.length,a8=ch?ch.boxEndIndex:Js.collisionBoxArray.length,o8=rp?rp.boxStartIndex:Js.collisionBoxArray.length,s8=rp?rp.boxEndIndex:Js.collisionBoxArray.length,f5=Od?Od.boxStartIndex:Js.collisionBoxArray.length,qv=Od?Od.boxEndIndex:Js.collisionBoxArray.length,ed=-1,$v=(Zd,Wp)=>Zd&&Zd.circleDiameter?Math.max(Zd.circleDiameter,Wp):Wp;ed=$v(U0,ed),ed=$v(ch,ed),ed=$v(rp,ed),ed=$v(Od,ed);let Zb=ed>-1?1:0;Zb&&(ed*=Wv/bc),Js.glyphOffsetArray.length>=jg.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ic.sortKey!==void 0&&Js.addToSortKeyRanges(Js.symbolInstances.length,Ic.sortKey);let d5=a5(td,Ic,Th),[l8,p5]=function(Zd,Wp){let rg=Zd.length,V0=Wp?.values;if(V0?.length>0)for(let Hg=0;Hg=0?Am.right:-1,Am.center>=0?Am.center:-1,Am.left>=0?Am.left:-1,Am.vertical||-1,Vb,Vx,Hb,qb,$b,i8,a8,o8,s8,f5,qv,pp,vp,Ub,k0,Hp,Zb,0,vd,ed,l8,p5)}(G,il,uo,nt,bt,Rt,js,G.layers[0],G.collisionBoxArray,D.index,D.sourceLayerIndex,G.index,Gn,[ga,ga,ga,ga],Ss,Be,Aa,Ya,Sl,ln,D,Kt,rr,xr,Qt)};if(_s==="line")for(let uo of J3(D.geometry,0,0,ru,ru)){let il=QT(uo,ra,Ao,nt.vertical||bn,bt,24,Mi,G.overscaling,ru);for(let Js of il)bn&&l5(G,bn.text,fs,Js)||Os(uo,Js)}else if(_s==="line-center"){for(let uo of D.geometry)if(uo.length>1){let il=JT(uo,Ao,nt.vertical||bn,bt,24,Mi);il&&Os(uo,il)}}else if(D.type==="Polygon")for(let uo of Jc(D.geometry,0)){let il=e8(uo,16);Os(uo[0],new tg(il.x,il.y,0))}else if(D.type==="LineString")for(let uo of D.geometry)Os(uo,new tg(uo[0].x,uo[0].y,0));else if(D.type==="Point")for(let uo of D.geometry)for(let il of uo)Os([il],new tg(il.x,il.y,0))}function o5(G,D,nt,bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn){let Ln=function(Aa,ra,ga,Ya,Ao,Ss,Sl,_s){let fs=Ya.layout.get("text-rotate").evaluate(Ss,{})*Math.PI/180,Xs=[];for(let js of ra.positionedLines)for(let Os of js.positionedGlyphs){if(!Os.rect)continue;let uo=Os.rect||{},il=wb+1,Js=!0,Zl=1,uh=0,nh=(Ao||_s)&&Os.vertical,gd=Os.metrics.advance*Os.scale/2;if(_s&&ra.verticalizable&&(uh=js.lineOffset/2-(Os.imageName?-(bc-Os.metrics.width*Os.scale)/2:(Os.scale-1)*bc)),Os.imageName){let nc=Sl[Os.imageName];Js=nc.sdf,Zl=nc.pixelRatio,il=Qf/Zl}let Cp=Ao?[Os.x+gd,Os.y]:[0,0],zf=Ao?[0,0]:[Os.x+gd+ga[0],Os.y+ga[1]-uh],td=[0,0];nh&&(td=zf,zf=[0,0]);let dp=Os.metrics.isDoubleResolution?2:1,pp=(Os.metrics.left-il)*Os.scale-gd+zf[0],mp=(-Os.metrics.top-il)*Os.scale+zf[1],sf=pp+uo.w/dp*Os.scale/Zl,vd=mp+uo.h/dp*Os.scale/Zl,ep=new o(pp,mp),$d=new o(sf,mp),gp=new o(pp,vd),zd=new o(sf,vd);if(nh){let nc=new o(-gd,gd-Ov),Ic=-Math.PI/2,Zc=bc/2-gd,Gh=new o(5-Ov-Zc,-(Os.imageName?Zc:0)),Th=new o(...td);ep._rotateAround(Ic,nc)._add(Gh)._add(Th),$d._rotateAround(Ic,nc)._add(Gh)._add(Th),gp._rotateAround(Ic,nc)._add(Gh)._add(Th),zd._rotateAround(Ic,nc)._add(Gh)._add(Th)}if(fs){let nc=Math.sin(fs),Ic=Math.cos(fs),Zc=[Ic,-nc,nc,Ic];ep._matMult(Zc),$d._matMult(Zc),gp._matMult(Zc),zd._matMult(Zc)}let Vp=new o(0,0),kh=new o(0,0);Xs.push({tl:ep,tr:$d,bl:gp,br:zd,tex:uo,writingMode:ra.writingMode,glyphOffset:Cp,sectionIndex:Os.sectionIndex,isSDF:Js,pixelOffsetTL:Vp,pixelOffsetBR:kh,minFontScaleX:0,minFontScaleY:0})}return Xs}(0,nt,be,Rt,Kt,Qt,bt,G.allowVerticalPlacement),Gn=G.textSizeData,Mi=null;Gn.kind==="source"?(Mi=[tm*Rt.layout.get("text-size").evaluate(Qt,{})],Mi[0]>Jm&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${K1}. Reduce your "text-size".`)):Gn.kind==="composite"&&(Mi=[tm*ln.compositeTextSizes[0].evaluate(Qt,{},bn),tm*ln.compositeTextSizes[1].evaluate(Qt,{},bn)],(Mi[0]>Jm||Mi[1]>Jm)&&w(`${G.layerIds[0]}: Value for "text-size" is >= ${K1}. Reduce your "text-size".`)),G.addSymbols(G.text,Ln,Mi,be,Kt,Qt,rr,D,Be.lineStartIndex,Be.lineLength,Zr,bn);for(let Aa of xr)Lr[Aa]=G.text.placedSymbolArray.length-1;return 4*Ln.length}function s5(G){for(let D in G)return G[D];return null}function l5(G,D,nt,bt){let Rt=G.compareText;if(D in Rt){let Kt=Rt[D];for(let Qt=Kt.length-1;Qt>=0;Qt--)if(bt.dist(Kt[Qt])>4;if(Rt!==1)throw new Error(`Got v${Rt} data when expected v1.`);let Kt=u5[15&bt];if(!Kt)throw new Error("Unrecognized array type.");let[Qt]=new Uint16Array(D,2,1),[be]=new Uint32Array(D,4,1);return new Fb(be,Qt,Kt,D)}constructor(D,nt=64,bt=Float64Array,Rt){if(isNaN(D)||D<0)throw new Error(`Unpexpected numItems value: ${D}.`);this.numItems=+D,this.nodeSize=Math.min(Math.max(+nt,2),65535),this.ArrayType=bt,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let Kt=u5.indexOf(this.ArrayType),Qt=2*D*this.ArrayType.BYTES_PER_ELEMENT,be=D*this.IndexArrayType.BYTES_PER_ELEMENT,Be=(8-be%8)%8;if(Kt<0)throw new Error(`Unexpected typed array class: ${bt}.`);Rt&&Rt instanceof ArrayBuffer?(this.data=Rt,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+be+Be,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+Qt+be+Be),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+be+Be,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Kt]),new Uint16Array(this.data,2,1)[0]=nt,new Uint32Array(this.data,4,1)[0]=D)}add(D,nt){let bt=this._pos>>1;return this.ids[bt]=bt,this.coords[this._pos++]=D,this.coords[this._pos++]=nt,bt}finish(){let D=this._pos>>1;if(D!==this.numItems)throw new Error(`Added ${D} items when expected ${this.numItems}.`);return Rb(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(D,nt,bt,Rt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Kt,coords:Qt,nodeSize:be}=this,Be=[0,Kt.length-1,0],rr=[];for(;Be.length;){let xr=Be.pop()||0,Lr=Be.pop()||0,Zr=Be.pop()||0;if(Lr-Zr<=be){for(let Gn=Zr;Gn<=Lr;Gn++){let Mi=Qt[2*Gn],Aa=Qt[2*Gn+1];Mi>=D&&Mi<=bt&&Aa>=nt&&Aa<=Rt&&rr.push(Kt[Gn])}continue}let ln=Zr+Lr>>1,bn=Qt[2*ln],Ln=Qt[2*ln+1];bn>=D&&bn<=bt&&Ln>=nt&&Ln<=Rt&&rr.push(Kt[ln]),(xr===0?D<=bn:nt<=Ln)&&(Be.push(Zr),Be.push(ln-1),Be.push(1-xr)),(xr===0?bt>=bn:Rt>=Ln)&&(Be.push(ln+1),Be.push(Lr),Be.push(1-xr))}return rr}within(D,nt,bt){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:Rt,coords:Kt,nodeSize:Qt}=this,be=[0,Rt.length-1,0],Be=[],rr=bt*bt;for(;be.length;){let xr=be.pop()||0,Lr=be.pop()||0,Zr=be.pop()||0;if(Lr-Zr<=Qt){for(let Gn=Zr;Gn<=Lr;Gn++)qd(Kt[2*Gn],Kt[2*Gn+1],D,nt)<=rr&&Be.push(Rt[Gn]);continue}let ln=Zr+Lr>>1,bn=Kt[2*ln],Ln=Kt[2*ln+1];qd(bn,Ln,D,nt)<=rr&&Be.push(Rt[ln]),(xr===0?D-bt<=bn:nt-bt<=Ln)&&(be.push(Zr),be.push(ln-1),be.push(1-xr)),(xr===0?D+bt>=bn:nt+bt>=Ln)&&(be.push(ln+1),be.push(Lr),be.push(1-xr))}return Be}}function Rb(G,D,nt,bt,Rt,Kt){if(Rt-bt<=nt)return;let Qt=bt+Rt>>1;c5(G,D,Qt,bt,Rt,Kt),Rb(G,D,nt,bt,Qt-1,1-Kt),Rb(G,D,nt,Qt+1,Rt,1-Kt)}function c5(G,D,nt,bt,Rt,Kt){for(;Rt>bt;){if(Rt-bt>600){let rr=Rt-bt+1,xr=nt-bt+1,Lr=Math.log(rr),Zr=.5*Math.exp(2*Lr/3),ln=.5*Math.sqrt(Lr*Zr*(rr-Zr)/rr)*(xr-rr/2<0?-1:1);c5(G,D,nt,Math.max(bt,Math.floor(nt-xr*Zr/rr+ln)),Math.min(Rt,Math.floor(nt+(rr-xr)*Zr/rr+ln)),Kt)}let Qt=D[2*nt+Kt],be=bt,Be=Rt;for(Vv(G,D,bt,nt),D[2*Rt+Kt]>Qt&&Vv(G,D,bt,Rt);beQt;)Be--}D[2*bt+Kt]===Qt?Vv(G,D,bt,Be):(Be++,Vv(G,D,Be,Rt)),Be<=nt&&(bt=Be+1),nt<=Be&&(Rt=Be-1)}}function Vv(G,D,nt,bt){Nx(G,nt,bt),Nx(D,2*nt,2*bt),Nx(D,2*nt+1,2*bt+1)}function Nx(G,D,nt){let bt=G[D];G[D]=G[nt],G[nt]=bt}function qd(G,D,nt,bt){let Rt=G-nt,Kt=D-bt;return Rt*Rt+Kt*Kt}var Bb;t.bg=void 0,(Bb=t.bg||(t.bg={})).create="create",Bb.load="load",Bb.fullLoad="fullLoad";let jx=null,Hv=[],Nb=1e3/60,Ux="loadTime",jb="fullLoadTime",h5={mark(G){performance.mark(G)},frame(G){let D=G;jx!=null&&Hv.push(D-jx),jx=D},clearMetrics(){jx=null,Hv=[],performance.clearMeasures(Ux),performance.clearMeasures(jb);for(let G in t.bg)performance.clearMarks(t.bg[G])},getPerformanceMetrics(){performance.measure(Ux,t.bg.create,t.bg.load),performance.measure(jb,t.bg.create,t.bg.fullLoad);let G=performance.getEntriesByName(Ux)[0].duration,D=performance.getEntriesByName(jb)[0].duration,nt=Hv.length,bt=1/(Hv.reduce((Kt,Qt)=>Kt+Qt,0)/nt/1e3),Rt=Hv.filter(Kt=>Kt>Nb).reduce((Kt,Qt)=>Kt+(Qt-Nb)/Nb,0);return{loadTime:G,fullLoadTime:D,fps:bt,percentDroppedFrames:Rt/(nt+Rt)*100,totalFrames:nt}}};t.$=class extends Dr{},t.A=xi,t.B=va,t.C=function(G){if(j==null){let D=G.navigator?G.navigator.userAgent:null;j=!!G.safari||!(!D||!(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return j},t.D=rs,t.E=ft,t.F=class{constructor(G,D){this.target=G,this.mapId=D,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new ty(()=>this.process()),this.subscription=function(nt,bt,Rt,Kt){return nt.addEventListener(bt,Rt,!1),{unsubscribe:()=>{nt.removeEventListener(bt,Rt,!1)}}}(this.target,"message",nt=>this.receive(nt)),this.globalScope=O(self)?G:window}registerMessageHandler(G,D){this.messageHandlers[G]=D}sendAsync(G,D){return new Promise((nt,bt)=>{let Rt=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[Rt]={resolve:nt,reject:bt},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[Rt];let be={id:Rt,type:"",origin:location.origin,targetMapId:G.targetMapId,sourceMapId:this.mapId};this.target.postMessage(be)},{once:!0});let Kt=[],Qt=Object.assign(Object.assign({},G),{id:Rt,sourceMapId:this.mapId,origin:location.origin,data:ls(G.data,Kt)});this.target.postMessage(Qt,{transfer:Kt})})}receive(G){let D=G.data,nt=D.id;if(!(D.origin!=="file://"&&location.origin!=="file://"&&D.origin!=="resource://android"&&location.origin!=="resource://android"&&D.origin!==location.origin||D.targetMapId&&this.mapId!==D.targetMapId)){if(D.type===""){delete this.tasks[nt];let bt=this.abortControllers[nt];return delete this.abortControllers[nt],void(bt&&bt.abort())}if(O(self)||D.mustQueue)return this.tasks[nt]=D,this.taskQueue.push(nt),void this.invoker.trigger();this.processTask(nt,D)}}process(){if(this.taskQueue.length===0)return;let G=this.taskQueue.shift(),D=this.tasks[G];delete this.tasks[G],this.taskQueue.length>0&&this.invoker.trigger(),D&&this.processTask(G,D)}processTask(G,D){return e(this,void 0,void 0,function*(){if(D.type===""){let Rt=this.resolveRejects[G];return delete this.resolveRejects[G],Rt?void(D.error?Rt.reject(ps(D.error)):Rt.resolve(ps(D.data))):void 0}if(!this.messageHandlers[D.type])return void this.completeTask(G,new Error(`Could not find a registered handler for ${D.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let nt=ps(D.data),bt=new AbortController;this.abortControllers[G]=bt;try{let Rt=yield this.messageHandlers[D.type](D.sourceMapId,nt,bt);this.completeTask(G,null,Rt)}catch(Rt){this.completeTask(G,Rt)}})}completeTask(G,D,nt){let bt=[];delete this.abortControllers[G];let Rt={id:G,type:"",sourceMapId:this.mapId,origin:location.origin,error:D?ls(D):null,data:ls(nt,bt)};this.target.postMessage(Rt,{transfer:bt})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},t.G=mt,t.H=function(){var G=new xi(16);return xi!=Float32Array&&(G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[11]=0,G[12]=0,G[13]=0,G[14]=0),G[0]=1,G[5]=1,G[10]=1,G[15]=1,G},t.I=Wd,t.J=function(G,D,nt){var bt,Rt,Kt,Qt,be,Be,rr,xr,Lr,Zr,ln,bn,Ln=nt[0],Gn=nt[1],Mi=nt[2];return D===G?(G[12]=D[0]*Ln+D[4]*Gn+D[8]*Mi+D[12],G[13]=D[1]*Ln+D[5]*Gn+D[9]*Mi+D[13],G[14]=D[2]*Ln+D[6]*Gn+D[10]*Mi+D[14],G[15]=D[3]*Ln+D[7]*Gn+D[11]*Mi+D[15]):(Rt=D[1],Kt=D[2],Qt=D[3],be=D[4],Be=D[5],rr=D[6],xr=D[7],Lr=D[8],Zr=D[9],ln=D[10],bn=D[11],G[0]=bt=D[0],G[1]=Rt,G[2]=Kt,G[3]=Qt,G[4]=be,G[5]=Be,G[6]=rr,G[7]=xr,G[8]=Lr,G[9]=Zr,G[10]=ln,G[11]=bn,G[12]=bt*Ln+be*Gn+Lr*Mi+D[12],G[13]=Rt*Ln+Be*Gn+Zr*Mi+D[13],G[14]=Kt*Ln+rr*Gn+ln*Mi+D[14],G[15]=Qt*Ln+xr*Gn+bn*Mi+D[15]),G},t.K=function(G,D,nt){var bt=nt[0],Rt=nt[1],Kt=nt[2];return G[0]=D[0]*bt,G[1]=D[1]*bt,G[2]=D[2]*bt,G[3]=D[3]*bt,G[4]=D[4]*Rt,G[5]=D[5]*Rt,G[6]=D[6]*Rt,G[7]=D[7]*Rt,G[8]=D[8]*Kt,G[9]=D[9]*Kt,G[10]=D[10]*Kt,G[11]=D[11]*Kt,G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15],G},t.L=Ea,t.M=function(G,D){let nt={};for(let bt=0;bt{let D=window.document.createElement("video");return D.muted=!0,new Promise(nt=>{D.onloadstart=()=>{nt(D)};for(let bt of G){let Rt=window.document.createElement("source");rt(bt)||(D.crossOrigin="Anonymous"),Rt.src=bt,D.appendChild(Rt)}})},t.a4=function(){return C++},t.a5=Ta,t.a6=jg,t.a7=Cf,t.a8=Ir,t.a9=G3,t.aA=function(G){if(G.type==="custom")return new V3(G);switch(G.type){case"background":return new Q1(G);case"circle":return new ba(G);case"fill":return new pi(G);case"fill-extrusion":return new Tp(G);case"heatmap":return new dl(G);case"hillshade":return new yc(G);case"line":return new Dg(G);case"raster":return new XT(G);case"symbol":return new zx(G)}},t.aB=p,t.aC=function(G,D){if(!G)return[{command:"setStyle",args:[D]}];let nt=[];try{if(!Pt(G.version,D.version))return[{command:"setStyle",args:[D]}];Pt(G.center,D.center)||nt.push({command:"setCenter",args:[D.center]}),Pt(G.zoom,D.zoom)||nt.push({command:"setZoom",args:[D.zoom]}),Pt(G.bearing,D.bearing)||nt.push({command:"setBearing",args:[D.bearing]}),Pt(G.pitch,D.pitch)||nt.push({command:"setPitch",args:[D.pitch]}),Pt(G.sprite,D.sprite)||nt.push({command:"setSprite",args:[D.sprite]}),Pt(G.glyphs,D.glyphs)||nt.push({command:"setGlyphs",args:[D.glyphs]}),Pt(G.transition,D.transition)||nt.push({command:"setTransition",args:[D.transition]}),Pt(G.light,D.light)||nt.push({command:"setLight",args:[D.light]}),Pt(G.terrain,D.terrain)||nt.push({command:"setTerrain",args:[D.terrain]}),Pt(G.sky,D.sky)||nt.push({command:"setSky",args:[D.sky]}),Pt(G.projection,D.projection)||nt.push({command:"setProjection",args:[D.projection]});let bt={},Rt=[];(function(Qt,be,Be,rr){let xr;for(xr in be=be||{},Qt=Qt||{})Object.prototype.hasOwnProperty.call(Qt,xr)&&(Object.prototype.hasOwnProperty.call(be,xr)||Jt(xr,Be,rr));for(xr in be)Object.prototype.hasOwnProperty.call(be,xr)&&(Object.prototype.hasOwnProperty.call(Qt,xr)?Pt(Qt[xr],be[xr])||(Qt[xr].type==="geojson"&&be[xr].type==="geojson"&&fe(Qt,be,xr)?qt(Be,{command:"setGeoJSONSourceData",args:[xr,be[xr].data]}):ge(xr,be,Be,rr)):Wt(xr,be,Be))})(G.sources,D.sources,Rt,bt);let Kt=[];G.layers&&G.layers.forEach(Qt=>{"source"in Qt&&bt[Qt.source]?nt.push({command:"removeLayer",args:[Qt.id]}):Kt.push(Qt)}),nt=nt.concat(Rt),function(Qt,be,Be){be=be||[];let rr=(Qt=Qt||[]).map(se),xr=be.map(se),Lr=Qt.reduce(Tt,{}),Zr=be.reduce(Tt,{}),ln=rr.slice(),bn=Object.create(null),Ln,Gn,Mi,Aa,ra;for(let ga=0,Ya=0;ga@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(nt,bt,Rt,Kt)=>{let Qt=Rt||Kt;return D[bt]=!Qt||Qt.toLowerCase(),""}),D["max-age"]){let nt=parseInt(D["max-age"],10);isNaN(nt)?delete D["max-age"]:D["max-age"]=nt}return D},t.ab=function(G,D){let nt=[];for(let bt in G)bt in D||nt.push(bt);return nt},t.ac=_,t.ad=function(G,D,nt){var bt=Math.sin(nt),Rt=Math.cos(nt),Kt=D[0],Qt=D[1],be=D[2],Be=D[3],rr=D[4],xr=D[5],Lr=D[6],Zr=D[7];return D!==G&&(G[8]=D[8],G[9]=D[9],G[10]=D[10],G[11]=D[11],G[12]=D[12],G[13]=D[13],G[14]=D[14],G[15]=D[15]),G[0]=Kt*Rt+rr*bt,G[1]=Qt*Rt+xr*bt,G[2]=be*Rt+Lr*bt,G[3]=Be*Rt+Zr*bt,G[4]=rr*Rt-Kt*bt,G[5]=xr*Rt-Qt*bt,G[6]=Lr*Rt-be*bt,G[7]=Zr*Rt-Be*bt,G},t.ae=function(G){var D=new xi(16);return D[0]=G[0],D[1]=G[1],D[2]=G[2],D[3]=G[3],D[4]=G[4],D[5]=G[5],D[6]=G[6],D[7]=G[7],D[8]=G[8],D[9]=G[9],D[10]=G[10],D[11]=G[11],D[12]=G[12],D[13]=G[13],D[14]=G[14],D[15]=G[15],D},t.af=Ji,t.ag=function(G,D){let nt=0,bt=0;if(G.kind==="constant")bt=G.layoutSize;else if(G.kind!=="source"){let{interpolationType:Rt,minZoom:Kt,maxZoom:Qt}=G,be=Rt?_(Da.interpolationFactor(Rt,D,Kt,Qt),0,1):0;G.kind==="camera"?bt=Fo.number(G.minSize,G.maxSize,be):nt=be}return{uSizeT:nt,uSize:bt}},t.ai=function(G,{uSize:D,uSizeT:nt},{lowerSize:bt,upperSize:Rt}){return G.kind==="source"?bt/tm:G.kind==="composite"?Fo.number(bt/tm,Rt/tm,nt):D},t.aj=Qm,t.ak=function(G,D,nt,bt){let Rt=D.y-G.y,Kt=D.x-G.x,Qt=bt.y-nt.y,be=bt.x-nt.x,Be=Qt*Kt-be*Rt;if(Be===0)return null;let rr=(be*(G.y-nt.y)-Qt*(G.x-nt.x))/Be;return new o(G.x+rr*Kt,G.y+rr*Rt)},t.al=J3,t.am=ti,t.an=ri,t.ao=function(G){let D=1/0,nt=1/0,bt=-1/0,Rt=-1/0;for(let Kt of G)D=Math.min(D,Kt.x),nt=Math.min(nt,Kt.y),bt=Math.max(bt,Kt.x),Rt=Math.max(Rt,Kt.y);return[D,nt,bt,Rt]},t.ap=bc,t.ar=Ab,t.as=function(G,D){var nt=D[0],bt=D[1],Rt=D[2],Kt=D[3],Qt=D[4],be=D[5],Be=D[6],rr=D[7],xr=D[8],Lr=D[9],Zr=D[10],ln=D[11],bn=D[12],Ln=D[13],Gn=D[14],Mi=D[15],Aa=nt*be-bt*Qt,ra=nt*Be-Rt*Qt,ga=nt*rr-Kt*Qt,Ya=bt*Be-Rt*be,Ao=bt*rr-Kt*be,Ss=Rt*rr-Kt*Be,Sl=xr*Ln-Lr*bn,_s=xr*Gn-Zr*bn,fs=xr*Mi-ln*bn,Xs=Lr*Gn-Zr*Ln,js=Lr*Mi-ln*Ln,Os=Zr*Mi-ln*Gn,uo=Aa*Os-ra*js+ga*Xs+Ya*fs-Ao*_s+Ss*Sl;return uo?(G[0]=(be*Os-Be*js+rr*Xs)*(uo=1/uo),G[1]=(Rt*js-bt*Os-Kt*Xs)*uo,G[2]=(Ln*Ss-Gn*Ao+Mi*Ya)*uo,G[3]=(Zr*Ao-Lr*Ss-ln*Ya)*uo,G[4]=(Be*fs-Qt*Os-rr*_s)*uo,G[5]=(nt*Os-Rt*fs+Kt*_s)*uo,G[6]=(Gn*ga-bn*Ss-Mi*ra)*uo,G[7]=(xr*Ss-Zr*ga+ln*ra)*uo,G[8]=(Qt*js-be*fs+rr*Sl)*uo,G[9]=(bt*fs-nt*js-Kt*Sl)*uo,G[10]=(bn*Ao-Ln*ga+Mi*Aa)*uo,G[11]=(Lr*ga-xr*Ao-ln*Aa)*uo,G[12]=(be*_s-Qt*Xs-Be*Sl)*uo,G[13]=(nt*Xs-bt*_s+Rt*Sl)*uo,G[14]=(Ln*ra-bn*Ya-Gn*Aa)*uo,G[15]=(xr*Ya-Lr*ra+Zr*Aa)*uo,G):null},t.at=Db,t.au=Tb,t.av=Fb,t.aw=function(){let G={},D=ut.$version;for(let nt in ut.$root){let bt=ut.$root[nt];if(bt.required){let Rt=null;Rt=nt==="version"?D:bt.type==="array"?[]:{},Rt!=null&&(G[nt]=Rt)}}return G},t.ax=oo,t.ay=tt,t.az=function(G){G=G.slice();let D=Object.create(null);for(let nt=0;nt25||bt<0||bt>=1||nt<0||nt>=1)},t.bc=function(G,D){return G[0]=D[0],G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[5]=D[1],G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[10]=D[2],G[11]=0,G[12]=0,G[13]=0,G[14]=0,G[15]=1,G},t.bd=class extends vr{},t.be=Lb,t.bf=h5,t.bh=st,t.bi=function(G,D){lt.REGISTERED_PROTOCOLS[G]=D},t.bj=function(G){delete lt.REGISTERED_PROTOCOLS[G]},t.bk=function(G,D){let nt={};for(let Rt=0;RtOs*bc)}let _s=Qt?"center":nt.get("text-justify").evaluate(rr,{},G.canonical),fs=nt.get("symbol-placement")==="point"?nt.get("text-max-width").evaluate(rr,{},G.canonical)*bc:1/0,Xs=()=>{G.bucket.allowVerticalPlacement&&gs(ga)&&(bn.vertical=Ex(Ln,G.glyphMap,G.glyphPositions,G.imagePositions,xr,fs,Kt,Ss,"left",Ao,Mi,t.ah.vertical,!0,Zr,Lr))};if(!Qt&&Sl){let js=new Set;if(_s==="auto")for(let uo=0;uoe(void 0,void 0,void 0,function*(){if(G.byteLength===0)return createImageBitmap(new ImageData(1,1));let D=new Blob([new Uint8Array(G)],{type:"image/png"});try{return createImageBitmap(D)}catch(nt){throw new Error(`Could not load image because of ${nt.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),t.e=M,t.f=G=>new Promise((D,nt)=>{let bt=new Image;bt.onload=()=>{D(bt),URL.revokeObjectURL(bt.src),bt.onload=null,window.requestAnimationFrame(()=>{bt.src=H})},bt.onerror=()=>nt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let Rt=new Blob([new Uint8Array(G)],{type:"image/png"});bt.src=G.byteLength?URL.createObjectURL(Rt):H}),t.g=yt,t.h=(G,D)=>dt(M(G,{type:"json"}),D),t.i=O,t.j=Y,t.k=it,t.l=(G,D)=>dt(M(G,{type:"arrayBuffer"}),D),t.m=dt,t.n=function(G){return new _b(G).readFields(WT,[])},t.o=Ul,t.p=Sx,t.q=$t,t.r=aa,t.s=rt,t.t=ca,t.u=di,t.v=ut,t.w=w,t.x=function([G,D,nt]){return D+=90,D*=Math.PI/180,nt*=Math.PI/180,{x:G*Math.cos(D)*Math.sin(nt),y:G*Math.sin(D)*Math.sin(nt),z:G*Math.cos(nt)}},t.y=Fo,t.z=Rl}),I("worker",["./shared"],function(t){class e{constructor(Gt){this.keyCache={},Gt&&this.replace(Gt)}replace(Gt){this._layerConfigs={},this._layers={},this.update(Gt,[])}update(Gt,ne){for(let gt of Gt){this._layerConfigs[gt.id]=gt;let St=this._layers[gt.id]=t.aA(gt);St._featureFilter=t.a7(St.filter),this.keyCache[gt.id]&&delete this.keyCache[gt.id]}for(let gt of ne)delete this.keyCache[gt],delete this._layerConfigs[gt],delete this._layers[gt];this.familiesBySource={};let Ct=t.bk(Object.values(this._layerConfigs),this.keyCache);for(let gt of Ct){let St=gt.map(qe=>this._layers[qe.id]),Nt=St[0];if(Nt.visibility==="none")continue;let re=Nt.source||"",le=this.familiesBySource[re];le||(le=this.familiesBySource[re]={});let we=Nt.sourceLayer||"_geojsonTileLayer",Ue=le[we];Ue||(Ue=le[we]=[]),Ue.push(St)}}}class r{constructor(Gt){let ne={},Ct=[];for(let re in Gt){let le=Gt[re],we=ne[re]={};for(let Ue in le){let qe=le[+Ue];if(!qe||qe.bitmap.width===0||qe.bitmap.height===0)continue;let or={x:0,y:0,w:qe.bitmap.width+2,h:qe.bitmap.height+2};Ct.push(or),we[Ue]={rect:or,metrics:qe.metrics}}}let{w:gt,h:St}=t.p(Ct),Nt=new t.o({width:gt||1,height:St||1});for(let re in Gt){let le=Gt[re];for(let we in le){let Ue=le[+we];if(!Ue||Ue.bitmap.width===0||Ue.bitmap.height===0)continue;let qe=ne[re][we].rect;t.o.copy(Ue.bitmap,Nt,{x:0,y:0},{x:qe.x+1,y:qe.y+1},Ue.bitmap)}}this.image=Nt,this.positions=ne}}t.bl("GlyphAtlas",r);class a{constructor(Gt){this.tileID=new t.S(Gt.tileID.overscaledZ,Gt.tileID.wrap,Gt.tileID.canonical.z,Gt.tileID.canonical.x,Gt.tileID.canonical.y),this.uid=Gt.uid,this.zoom=Gt.zoom,this.pixelRatio=Gt.pixelRatio,this.tileSize=Gt.tileSize,this.source=Gt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Gt.showCollisionBoxes,this.collectResourceTiming=!!Gt.collectResourceTiming,this.returnDependencies=!!Gt.returnDependencies,this.promoteId=Gt.promoteId,this.inFlightDependencies=[]}parse(Gt,ne,Ct,gt){return t._(this,void 0,void 0,function*(){this.status="parsing",this.data=Gt,this.collisionBoxArray=new t.a5;let St=new t.bm(Object.keys(Gt.layers).sort()),Nt=new t.bn(this.tileID,this.promoteId);Nt.bucketLayerIDs=[];let re={},le={featureIndex:Nt,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ct},we=ne.familiesBySource[this.source];for(let oi in we){let $n=Gt.layers[oi];if(!$n)continue;$n.version===1&&t.w(`Vector tile source "${this.source}" layer "${oi}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let sa=St.encode(oi),Zi=[];for(let We=0;We<$n.length;We++){let nr=$n.feature(We),fr=Nt.getId(nr,oi);Zi.push({feature:nr,id:fr,index:We,sourceLayerIndex:sa})}for(let We of we[oi]){let nr=We[0];nr.source!==this.source&&t.w(`layer.source = ${nr.source} does not equal this.source = ${this.source}`),nr.minzoom&&this.zoom=nr.maxzoom||nr.visibility!=="none"&&(n(We,this.zoom,Ct),(re[nr.id]=nr.createBucket({index:Nt.bucketLayerIDs.length,layers:We,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:sa,sourceID:this.source})).populate(Zi,le,this.tileID.canonical),Nt.bucketLayerIDs.push(We.map(fr=>fr.id)))}}let Ue=t.aF(le.glyphDependencies,oi=>Object.keys(oi).map(Number));this.inFlightDependencies.forEach(oi=>oi?.abort()),this.inFlightDependencies=[];let qe=Promise.resolve({});if(Object.keys(Ue).length){let oi=new AbortController;this.inFlightDependencies.push(oi),qe=gt.sendAsync({type:"GG",data:{stacks:Ue,source:this.source,tileID:this.tileID,type:"glyphs"}},oi)}let or=Object.keys(le.iconDependencies),Sr=Promise.resolve({});if(or.length){let oi=new AbortController;this.inFlightDependencies.push(oi),Sr=gt.sendAsync({type:"GI",data:{icons:or,source:this.source,tileID:this.tileID,type:"icons"}},oi)}let Ar=Object.keys(le.patternDependencies),mr=Promise.resolve({});if(Ar.length){let oi=new AbortController;this.inFlightDependencies.push(oi),mr=gt.sendAsync({type:"GI",data:{icons:Ar,source:this.source,tileID:this.tileID,type:"patterns"}},oi)}let[Qr,Hn,Wn]=yield Promise.all([qe,Sr,mr]),Xn=new r(Qr),Ii=new t.bo(Hn,Wn);for(let oi in re){let $n=re[oi];$n instanceof t.a6?(n($n.layers,this.zoom,Ct),t.bp({bucket:$n,glyphMap:Qr,glyphPositions:Xn.positions,imageMap:Hn,imagePositions:Ii.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):$n.hasPattern&&($n instanceof t.bq||$n instanceof t.br||$n instanceof t.bs)&&(n($n.layers,this.zoom,Ct),$n.addFeatures(le,this.tileID.canonical,Ii.patternPositions))}return this.status="done",{buckets:Object.values(re).filter(oi=>!oi.isEmpty()),featureIndex:Nt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Xn.image,imageAtlas:Ii,glyphMap:this.returnDependencies?Qr:null,iconMap:this.returnDependencies?Hn:null,glyphPositions:this.returnDependencies?Xn.positions:null}})}}function n(Le,Gt,ne){let Ct=new t.z(Gt);for(let gt of Le)gt.recalculate(Ct,ne)}class o{constructor(Gt,ne,Ct){this.actor=Gt,this.layerIndex=ne,this.availableImages=Ct,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Gt,ne){return t._(this,void 0,void 0,function*(){let Ct=yield t.l(Gt.request,ne);try{return{vectorTile:new t.bt.VectorTile(new t.bu(Ct.data)),rawData:Ct.data,cacheControl:Ct.cacheControl,expires:Ct.expires}}catch(gt){let St=new Uint8Array(Ct.data),Nt=`Unable to parse the tile at ${Gt.request.url}, `;throw Nt+=St[0]===31&&St[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${gt.message}`,new Error(Nt)}})}loadTile(Gt){return t._(this,void 0,void 0,function*(){let ne=Gt.uid,Ct=!!(Gt&&Gt.request&&Gt.request.collectResourceTiming)&&new t.bv(Gt.request),gt=new a(Gt);this.loading[ne]=gt;let St=new AbortController;gt.abort=St;try{let Nt=yield this.loadVectorTile(Gt,St);if(delete this.loading[ne],!Nt)return null;let re=Nt.rawData,le={};Nt.expires&&(le.expires=Nt.expires),Nt.cacheControl&&(le.cacheControl=Nt.cacheControl);let we={};if(Ct){let qe=Ct.finish();qe&&(we.resourceTiming=JSON.parse(JSON.stringify(qe)))}gt.vectorTile=Nt.vectorTile;let Ue=gt.parse(Nt.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[ne]=gt,this.fetching[ne]={rawTileData:re,cacheControl:le,resourceTiming:we};try{let qe=yield Ue;return t.e({rawTileData:re.slice(0)},qe,le,we)}finally{delete this.fetching[ne]}}catch(Nt){throw delete this.loading[ne],gt.status="done",this.loaded[ne]=gt,Nt}})}reloadTile(Gt){return t._(this,void 0,void 0,function*(){let ne=Gt.uid;if(!this.loaded||!this.loaded[ne])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ct=this.loaded[ne];if(Ct.showCollisionBoxes=Gt.showCollisionBoxes,Ct.status==="parsing"){let gt=yield Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor),St;if(this.fetching[ne]){let{rawTileData:Nt,cacheControl:re,resourceTiming:le}=this.fetching[ne];delete this.fetching[ne],St=t.e({rawTileData:Nt.slice(0)},gt,re,le)}else St=gt;return St}if(Ct.status==="done"&&Ct.vectorTile)return Ct.parse(Ct.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Gt){return t._(this,void 0,void 0,function*(){let ne=this.loading,Ct=Gt.uid;ne&&ne[Ct]&&ne[Ct].abort&&(ne[Ct].abort.abort(),delete ne[Ct])})}removeTile(Gt){return t._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Gt.uid]&&delete this.loaded[Gt.uid]})}}class i{constructor(){this.loaded={}}loadTile(Gt){return t._(this,void 0,void 0,function*(){let{uid:ne,encoding:Ct,rawImageData:gt,redFactor:St,greenFactor:Nt,blueFactor:re,baseShift:le}=Gt,we=gt.width+2,Ue=gt.height+2,qe=t.b(gt)?new t.R({width:we,height:Ue},yield t.bw(gt,-1,-1,we,Ue)):gt,or=new t.bx(ne,qe,Ct,St,Nt,re,le);return this.loaded=this.loaded||{},this.loaded[ne]=or,or})}removeTile(Gt){let ne=this.loaded,Ct=Gt.uid;ne&&ne[Ct]&&delete ne[Ct]}}function l(Le,Gt){if(Le.length!==0){f(Le[0],Gt);for(var ne=1;ne=Math.abs(re)?ne-le+re:re-le+ne,ne=le}ne+Ct>=0!=!!Gt&&Le.reverse()}var x=t.by(function Le(Gt,ne){var Ct,gt=Gt&&Gt.type;if(gt==="FeatureCollection")for(Ct=0;Ct>31}function O(Le,Gt){for(var ne=Le.loadGeometry(),Ct=Le.type,gt=0,St=0,Nt=ne.length,re=0;reLe},F=Math.fround||(U=new Float32Array(1),Le=>(U[0]=+Le,U[0]));var U;let W=3,q=5,J=6;class lt{constructor(Gt){this.options=Object.assign(Object.create(H),Gt),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Gt){let{log:ne,minZoom:Ct,maxZoom:gt}=this.options;ne&&console.time("total time");let St=`prepare ${Gt.length} points`;ne&&console.time(St),this.points=Gt;let Nt=[];for(let le=0;le=Ct;le--){let we=+Date.now();re=this.trees[le]=this._createTree(this._cluster(re,le)),ne&&console.log("z%d: %d clusters in %dms",le,re.numItems,+Date.now()-we)}return ne&&console.timeEnd("total time"),this}getClusters(Gt,ne){let Ct=((Gt[0]+180)%360+360)%360-180,gt=Math.max(-90,Math.min(90,Gt[1])),St=Gt[2]===180?180:((Gt[2]+180)%360+360)%360-180,Nt=Math.max(-90,Math.min(90,Gt[3]));if(Gt[2]-Gt[0]>=360)Ct=-180,St=180;else if(Ct>St){let qe=this.getClusters([Ct,gt,180,Nt],ne),or=this.getClusters([-180,gt,St,Nt],ne);return qe.concat(or)}let re=this.trees[this._limitZoom(ne)],le=re.range(st(Ct),tt(Nt),st(St),tt(gt)),we=re.data,Ue=[];for(let qe of le){let or=this.stride*qe;Ue.push(we[or+q]>1?yt(we,or,this.clusterProps):this.points[we[or+W]])}return Ue}getChildren(Gt){let ne=this._getOriginId(Gt),Ct=this._getOriginZoom(Gt),gt="No cluster with the specified id.",St=this.trees[Ct];if(!St)throw new Error(gt);let Nt=St.data;if(ne*this.stride>=Nt.length)throw new Error(gt);let re=this.options.radius/(this.options.extent*Math.pow(2,Ct-1)),le=St.within(Nt[ne*this.stride],Nt[ne*this.stride+1],re),we=[];for(let Ue of le){let qe=Ue*this.stride;Nt[qe+4]===Gt&&we.push(Nt[qe+q]>1?yt(Nt,qe,this.clusterProps):this.points[Nt[qe+W]])}if(we.length===0)throw new Error(gt);return we}getLeaves(Gt,ne,Ct){let gt=[];return this._appendLeaves(gt,Gt,ne=ne||10,Ct=Ct||0,0),gt}getTile(Gt,ne,Ct){let gt=this.trees[this._limitZoom(Gt)],St=Math.pow(2,Gt),{extent:Nt,radius:re}=this.options,le=re/Nt,we=(Ct-le)/St,Ue=(Ct+1+le)/St,qe={features:[]};return this._addTileFeatures(gt.range((ne-le)/St,we,(ne+1+le)/St,Ue),gt.data,ne,Ct,St,qe),ne===0&&this._addTileFeatures(gt.range(1-le/St,we,1,Ue),gt.data,St,Ct,St,qe),ne===St-1&&this._addTileFeatures(gt.range(0,we,le/St,Ue),gt.data,-1,Ct,St,qe),qe.features.length?qe:null}getClusterExpansionZoom(Gt){let ne=this._getOriginZoom(Gt)-1;for(;ne<=this.options.maxZoom;){let Ct=this.getChildren(Gt);if(ne++,Ct.length!==1)break;Gt=Ct[0].properties.cluster_id}return ne}_appendLeaves(Gt,ne,Ct,gt,St){let Nt=this.getChildren(ne);for(let re of Nt){let le=re.properties;if(le&&le.cluster?St+le.point_count<=gt?St+=le.point_count:St=this._appendLeaves(Gt,le.cluster_id,Ct,gt,St):St1,Ue,qe,or;if(we)Ue=mt(ne,le,this.clusterProps),qe=ne[le],or=ne[le+1];else{let mr=this.points[ne[le+W]];Ue=mr.properties;let[Qr,Hn]=mr.geometry.coordinates;qe=st(Qr),or=tt(Hn)}let Sr={type:1,geometry:[[Math.round(this.options.extent*(qe*St-Ct)),Math.round(this.options.extent*(or*St-gt))]],tags:Ue},Ar;Ar=we||this.options.generateId?ne[le+W]:this.points[ne[le+W]].id,Ar!==void 0&&(Sr.id=Ar),Nt.features.push(Sr)}}_limitZoom(Gt){return Math.max(this.options.minZoom,Math.min(Math.floor(+Gt),this.options.maxZoom+1))}_cluster(Gt,ne){let{radius:Ct,extent:gt,reduce:St,minPoints:Nt}=this.options,re=Ct/(gt*Math.pow(2,ne)),le=Gt.data,we=[],Ue=this.stride;for(let qe=0;qene&&(Qr+=le[Wn+q])}if(Qr>mr&&Qr>=Nt){let Hn,Wn=or*mr,Xn=Sr*mr,Ii=-1,oi=((qe/Ue|0)<<5)+(ne+1)+this.points.length;for(let $n of Ar){let sa=$n*Ue;if(le[sa+2]<=ne)continue;le[sa+2]=ne;let Zi=le[sa+q];Wn+=le[sa]*Zi,Xn+=le[sa+1]*Zi,le[sa+4]=oi,St&&(Hn||(Hn=this._map(le,qe,!0),Ii=this.clusterProps.length,this.clusterProps.push(Hn)),St(Hn,this._map(le,sa)))}le[qe+4]=oi,we.push(Wn/Qr,Xn/Qr,1/0,oi,-1,Qr),St&&we.push(Ii)}else{for(let Hn=0;Hn1)for(let Hn of Ar){let Wn=Hn*Ue;if(!(le[Wn+2]<=ne)){le[Wn+2]=ne;for(let Xn=0;Xn>5}_getOriginZoom(Gt){return(Gt-this.points.length)%32}_map(Gt,ne,Ct){if(Gt[ne+q]>1){let Nt=this.clusterProps[Gt[ne+J]];return Ct?Object.assign({},Nt):Nt}let gt=this.points[Gt[ne+W]].properties,St=this.options.map(gt);return Ct&&St===gt?Object.assign({},St):St}}function yt(Le,Gt,ne){return{type:"Feature",id:Le[Gt+W],properties:mt(Le,Gt,ne),geometry:{type:"Point",coordinates:[(Ct=Le[Gt],360*(Ct-.5)),dt(Le[Gt+1])]}};var Ct}function mt(Le,Gt,ne){let Ct=Le[Gt+q],gt=Ct>=1e4?`${Math.round(Ct/1e3)}k`:Ct>=1e3?Math.round(Ct/100)/10+"k":Ct,St=Le[Gt+J],Nt=St===-1?{}:Object.assign({},ne[St]);return Object.assign(Nt,{cluster:!0,cluster_id:Le[Gt+W],point_count:Ct,point_count_abbreviated:gt})}function st(Le){return Le/360+.5}function tt(Le){let Gt=Math.sin(Le*Math.PI/180),ne=.5-.25*Math.log((1+Gt)/(1-Gt))/Math.PI;return ne<0?0:ne>1?1:ne}function dt(Le){let Gt=(180-360*Le)*Math.PI/180;return 360*Math.atan(Math.exp(Gt))/Math.PI-90}function rt(Le,Gt,ne,Ct){let gt=Ct,St=Gt+(ne-Gt>>1),Nt,re=ne-Gt,le=Le[Gt],we=Le[Gt+1],Ue=Le[ne],qe=Le[ne+1];for(let or=Gt+3;orgt)Nt=or,gt=Sr;else if(Sr===gt){let Ar=Math.abs(or-St);ArCt&&(Nt-Gt>3&&rt(Le,Gt,Nt,Ct),Le[Nt+2]=gt,ne-Nt>3&&rt(Le,Nt,ne,Ct))}function at(Le,Gt,ne,Ct,gt,St){let Nt=gt-ne,re=St-Ct;if(Nt!==0||re!==0){let le=((Le-ne)*Nt+(Gt-Ct)*re)/(Nt*Nt+re*re);le>1?(ne=gt,Ct=St):le>0&&(ne+=Nt*le,Ct+=re*le)}return Nt=Le-ne,re=Gt-Ct,Nt*Nt+re*re}function vt(Le,Gt,ne,Ct){let gt={id:Le??null,type:Gt,geometry:ne,tags:Ct,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Gt==="Point"||Gt==="MultiPoint"||Gt==="LineString")it(gt,ne);else if(Gt==="Polygon")it(gt,ne[0]);else if(Gt==="MultiLineString")for(let St of ne)it(gt,St);else if(Gt==="MultiPolygon")for(let St of ne)it(gt,St[0]);return gt}function it(Le,Gt){for(let ne=0;ne0&&(Nt+=Ct?(gt*Ue-we*St)/2:Math.sqrt(Math.pow(we-gt,2)+Math.pow(Ue-St,2))),gt=we,St=Ue}let re=Gt.length-3;Gt[2]=1,rt(Gt,0,re,ne),Gt[re+2]=1,Gt.size=Math.abs(Nt),Gt.start=0,Gt.end=Gt.size}function kt(Le,Gt,ne,Ct){for(let gt=0;gt1?1:ne}function qt(Le,Gt,ne,Ct,gt,St,Nt,re){if(Ct/=Gt,St>=(ne/=Gt)&&Nt=Ct)return null;let le=[];for(let we of Le){let Ue=we.geometry,qe=we.type,or=gt===0?we.minX:we.minY,Sr=gt===0?we.maxX:we.maxY;if(or>=ne&&Sr=Ct)continue;let Ar=[];if(qe==="Point"||qe==="MultiPoint")Wt(Ue,Ar,ne,Ct,gt);else if(qe==="LineString")Jt(Ue,Ar,ne,Ct,gt,!1,re.lineMetrics);else if(qe==="MultiLineString")fe(Ue,Ar,ne,Ct,gt,!1);else if(qe==="Polygon")fe(Ue,Ar,ne,Ct,gt,!0);else if(qe==="MultiPolygon")for(let mr of Ue){let Qr=[];fe(mr,Qr,ne,Ct,gt,!0),Qr.length&&Ar.push(Qr)}if(Ar.length){if(re.lineMetrics&&qe==="LineString"){for(let mr of Ar)le.push(vt(we.id,qe,mr,we.tags));continue}qe!=="LineString"&&qe!=="MultiLineString"||(Ar.length===1?(qe="LineString",Ar=Ar[0]):qe="MultiLineString"),qe!=="Point"&&qe!=="MultiPoint"||(qe=Ar.length===3?"Point":"MultiPoint"),le.push(vt(we.id,qe,Ar,we.tags))}}return le.length?le:null}function Wt(Le,Gt,ne,Ct,gt){for(let St=0;St=ne&&Nt<=Ct&&pe(Gt,Le[St],Le[St+1],Le[St+2])}}function Jt(Le,Gt,ne,Ct,gt,St,Nt){let re=ge(Le),le=gt===0?se:Tt,we,Ue,qe=Le.start;for(let Qr=0;Qrne&&(Ue=le(re,Hn,Wn,Ii,oi,ne),Nt&&(re.start=qe+we*Ue)):$n>Ct?sa=ne&&(Ue=le(re,Hn,Wn,Ii,oi,ne),Zi=!0),sa>Ct&&$n<=Ct&&(Ue=le(re,Hn,Wn,Ii,oi,Ct),Zi=!0),!St&&Zi&&(Nt&&(re.end=qe+we*Ue),Gt.push(re),re=ge(Le)),Nt&&(qe+=we)}let or=Le.length-3,Sr=Le[or],Ar=Le[or+1],mr=gt===0?Sr:Ar;mr>=ne&&mr<=Ct&&pe(re,Sr,Ar,Le[or+2]),or=re.length-3,St&&or>=3&&(re[or]!==re[0]||re[or+1]!==re[1])&&pe(re,re[0],re[1],re[2]),re.length&&Gt.push(re)}function ge(Le){let Gt=[];return Gt.size=Le.size,Gt.start=Le.start,Gt.end=Le.end,Gt}function fe(Le,Gt,ne,Ct,gt,St){for(let Nt of Le)Jt(Nt,Gt,ne,Ct,gt,St,!1)}function pe(Le,Gt,ne,Ct){Le.push(Gt,ne,Ct)}function se(Le,Gt,ne,Ct,gt,St){let Nt=(St-Gt)/(Ct-Gt);return pe(Le,St,ne+(gt-ne)*Nt,1),Nt}function Tt(Le,Gt,ne,Ct,gt,St){let Nt=(St-ne)/(gt-ne);return pe(Le,Gt+(Ct-Gt)*Nt,St,1),Nt}function Lt(Le,Gt){let ne=[];for(let Ct=0;Ct0&&Gt.size<(gt?Nt:Ct))return void(ne.numPoints+=Gt.length/3);let re=[];for(let le=0;leNt)&&(ne.numSimplified++,re.push(Gt[le],Gt[le+1])),ne.numPoints++;gt&&function(le,we){let Ue=0;for(let qe=0,or=le.length,Sr=or-2;qe0===we)for(let qe=0,or=le.length;qe24)throw new Error("maxZoom should be in the 0-24 range");if(ne.promoteId&&ne.generateId)throw new Error("promoteId and generateId cannot be used together.");let gt=function(St,Nt){let re=[];if(St.type==="FeatureCollection")for(let le=0;le1&&console.time("creation"),Sr=this.tiles[or]=oe(Gt,ne,Ct,gt,we),this.tileCoords.push({z:ne,x:Ct,y:gt}),Ue)){Ue>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ne,Ct,gt,Sr.numFeatures,Sr.numPoints,Sr.numSimplified),console.timeEnd("creation"));let Zi=`z${ne}`;this.stats[Zi]=(this.stats[Zi]||0)+1,this.total++}if(Sr.source=Gt,St==null){if(ne===we.indexMaxZoom||Sr.numPoints<=we.indexMaxPoints)continue}else{if(ne===we.maxZoom||ne===St)continue;if(St!=null){let Zi=St-ne;if(Ct!==Nt>>Zi||gt!==re>>Zi)continue}}if(Sr.source=null,Gt.length===0)continue;Ue>1&&console.time("clipping");let Ar=.5*we.buffer/we.extent,mr=.5-Ar,Qr=.5+Ar,Hn=1+Ar,Wn=null,Xn=null,Ii=null,oi=null,$n=qt(Gt,qe,Ct-Ar,Ct+Qr,0,Sr.minX,Sr.maxX,we),sa=qt(Gt,qe,Ct+mr,Ct+Hn,0,Sr.minX,Sr.maxX,we);Gt=null,$n&&(Wn=qt($n,qe,gt-Ar,gt+Qr,1,Sr.minY,Sr.maxY,we),Xn=qt($n,qe,gt+mr,gt+Hn,1,Sr.minY,Sr.maxY,we),$n=null),sa&&(Ii=qt(sa,qe,gt-Ar,gt+Qr,1,Sr.minY,Sr.maxY,we),oi=qt(sa,qe,gt+mr,gt+Hn,1,Sr.minY,Sr.maxY,we),sa=null),Ue>1&&console.timeEnd("clipping"),le.push(Wn||[],ne+1,2*Ct,2*gt),le.push(Xn||[],ne+1,2*Ct,2*gt+1),le.push(Ii||[],ne+1,2*Ct+1,2*gt),le.push(oi||[],ne+1,2*Ct+1,2*gt+1)}}getTile(Gt,ne,Ct){Gt=+Gt,ne=+ne,Ct=+Ct;let gt=this.options,{extent:St,debug:Nt}=gt;if(Gt<0||Gt>24)return null;let re=1<1&&console.log("drilling down to z%d-%d-%d",Gt,ne,Ct);let we,Ue=Gt,qe=ne,or=Ct;for(;!we&&Ue>0;)Ue--,qe>>=1,or>>=1,we=this.tiles[ur(Ue,qe,or)];return we&&we.source?(Nt>1&&(console.log("found parent tile z%d-%d-%d",Ue,qe,or),console.time("drilling down")),this.splitTile(we.source,Ue,qe,or,Gt,ne,Ct),Nt>1&&console.timeEnd("drilling down"),this.tiles[le]?ee(this.tiles[le],St):null):null}}function ur(Le,Gt,ne){return 32*((1<{qe.properties=Sr;let Ar={};for(let mr of or)Ar[mr]=le[mr].evaluate(Ue,qe);return Ar},Nt.reduce=(Sr,Ar)=>{qe.properties=Ar;for(let mr of or)Ue.accumulated=Sr[mr],Sr[mr]=we[mr].evaluate(Ue,qe)},Nt}(Gt)).load((yield this._pendingData).features):(gt=yield this._pendingData,new cr(gt,Gt.geojsonVtOptions)),this.loaded={};let St={};if(Ct){let Nt=Ct.finish();Nt&&(St.resourceTiming={},St.resourceTiming[Gt.source]=JSON.parse(JSON.stringify(Nt)))}return St}catch(St){if(delete this._pendingRequest,t.bB(St))return{abandoned:!0};throw St}var gt})}getData(){return t._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Gt){let ne=this.loaded;return ne&&ne[Gt.uid]?super.reloadTile(Gt):this.loadTile(Gt)}loadAndProcessGeoJSON(Gt,ne){return t._(this,void 0,void 0,function*(){let Ct=yield this.loadGeoJSON(Gt,ne);if(delete this._pendingRequest,typeof Ct!="object")throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`);if(x(Ct,!0),Gt.filter){let gt=t.bC(Gt.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(gt.result==="error")throw new Error(gt.value.map(St=>`${St.key}: ${St.message}`).join(", "));Ct={type:"FeatureCollection",features:Ct.features.filter(St=>gt.value.evaluate({zoom:0},St))}}return Ct})}loadGeoJSON(Gt,ne){return t._(this,void 0,void 0,function*(){let{promoteId:Ct}=Gt;if(Gt.request){let gt=yield t.h(Gt.request,ne);return this._dataUpdateable=Wr(gt.data,Ct)?br(gt.data,Ct):void 0,gt.data}if(typeof Gt.data=="string")try{let gt=JSON.parse(Gt.data);return this._dataUpdateable=Wr(gt,Ct)?br(gt,Ct):void 0,gt}catch{throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`)}if(!Gt.dataDiff)throw new Error(`Input data given to '${Gt.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Gt.source}`);return function(gt,St,Nt){var re,le,we,Ue;if(St.removeAll&>.clear(),St.remove)for(let qe of St.remove)gt.delete(qe);if(St.add)for(let qe of St.add){let or=jr(qe,Nt);or!=null&>.set(or,qe)}if(St.update)for(let qe of St.update){let or=gt.get(qe.id);if(or==null)continue;let Sr=!qe.removeAllProperties&&(((re=qe.removeProperties)===null||re===void 0?void 0:re.length)>0||((le=qe.addOrUpdateProperties)===null||le===void 0?void 0:le.length)>0);if((qe.newGeometry||qe.removeAllProperties||Sr)&&(or=Object.assign({},or),gt.set(qe.id,or),Sr&&(or.properties=Object.assign({},or.properties))),qe.newGeometry&&(or.geometry=qe.newGeometry),qe.removeAllProperties)or.properties={};else if(((we=qe.removeProperties)===null||we===void 0?void 0:we.length)>0)for(let Ar of qe.removeProperties)Object.prototype.hasOwnProperty.call(or.properties,Ar)&&delete or.properties[Ar];if(((Ue=qe.addOrUpdateProperties)===null||Ue===void 0?void 0:Ue.length)>0)for(let{key:Ar,value:mr}of qe.addOrUpdateProperties)or.properties[Ar]=mr}}(this._dataUpdateable,Gt.dataDiff,Ct),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Gt){return t._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Gt){return this._geoJSONIndex.getClusterExpansionZoom(Gt.clusterId)}getClusterChildren(Gt){return this._geoJSONIndex.getChildren(Gt.clusterId)}getClusterLeaves(Gt){return this._geoJSONIndex.getLeaves(Gt.clusterId,Gt.limit,Gt.offset)}}class nn{constructor(Gt){this.self=Gt,this.actor=new t.F(Gt),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ne,Ct)=>{if(this.externalWorkerSourceTypes[ne])throw new Error(`Worker source with name "${ne}" already registered.`);this.externalWorkerSourceTypes[ne]=Ct},this.self.addProtocol=t.bi,this.self.removeProtocol=t.bj,this.self.registerRTLTextPlugin=ne=>{if(t.bD.isParsed())throw new Error("RTL text plugin already registered.");t.bD.setMethods(ne)},this.actor.registerMessageHandler("LDT",(ne,Ct)=>this._getDEMWorkerSource(ne,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RDT",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ne,Ct.source).removeTile(Ct)})),this.actor.registerMessageHandler("GCEZ",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterExpansionZoom(Ct)})),this.actor.registerMessageHandler("GCC",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterChildren(Ct)})),this.actor.registerMessageHandler("GCL",(ne,Ct)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ne,Ct.type,Ct.source).getClusterLeaves(Ct)})),this.actor.registerMessageHandler("LD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadData(Ct)),this.actor.registerMessageHandler("GD",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).getData()),this.actor.registerMessageHandler("LT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).loadTile(Ct)),this.actor.registerMessageHandler("RT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).reloadTile(Ct)),this.actor.registerMessageHandler("AT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).abortTile(Ct)),this.actor.registerMessageHandler("RMT",(ne,Ct)=>this._getWorkerSource(ne,Ct.type,Ct.source).removeTile(Ct)),this.actor.registerMessageHandler("RS",(ne,Ct)=>t._(this,void 0,void 0,function*(){if(!this.workerSources[ne]||!this.workerSources[ne][Ct.type]||!this.workerSources[ne][Ct.type][Ct.source])return;let gt=this.workerSources[ne][Ct.type][Ct.source];delete this.workerSources[ne][Ct.type][Ct.source],gt.removeSource!==void 0&>.removeSource(Ct)})),this.actor.registerMessageHandler("RM",ne=>t._(this,void 0,void 0,function*(){delete this.layerIndexes[ne],delete this.availableImages[ne],delete this.workerSources[ne],delete this.demWorkerSources[ne]})),this.actor.registerMessageHandler("SR",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.referrer=Ct})),this.actor.registerMessageHandler("SRPS",(ne,Ct)=>this._syncRTLPluginState(ne,Ct)),this.actor.registerMessageHandler("IS",(ne,Ct)=>t._(this,void 0,void 0,function*(){this.self.importScripts(Ct)})),this.actor.registerMessageHandler("SI",(ne,Ct)=>this._setImages(ne,Ct)),this.actor.registerMessageHandler("UL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).update(Ct.layers,Ct.removedIds)})),this.actor.registerMessageHandler("SL",(ne,Ct)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ne).replace(Ct)}))}_setImages(Gt,ne){return t._(this,void 0,void 0,function*(){this.availableImages[Gt]=ne;for(let Ct in this.workerSources[Gt]){let gt=this.workerSources[Gt][Ct];for(let St in gt)gt[St].availableImages=ne}})}_syncRTLPluginState(Gt,ne){return t._(this,void 0,void 0,function*(){if(t.bD.isParsed())return t.bD.getState();if(ne.pluginStatus!=="loading")return t.bD.setState(ne),ne;let Ct=ne.pluginURL;if(this.self.importScripts(Ct),t.bD.isParsed()){let gt={pluginStatus:"loaded",pluginURL:Ct};return t.bD.setState(gt),gt}throw t.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ct}`)})}_getAvailableImages(Gt){let ne=this.availableImages[Gt];return ne||(ne=[]),ne}_getLayerIndex(Gt){let ne=this.layerIndexes[Gt];return ne||(ne=this.layerIndexes[Gt]=new e),ne}_getWorkerSource(Gt,ne,Ct){if(this.workerSources[Gt]||(this.workerSources[Gt]={}),this.workerSources[Gt][ne]||(this.workerSources[Gt][ne]={}),!this.workerSources[Gt][ne][Ct]){let gt={sendAsync:(St,Nt)=>(St.targetMapId=Gt,this.actor.sendAsync(St,Nt))};switch(ne){case"vector":this.workerSources[Gt][ne][Ct]=new o(gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt));break;case"geojson":this.workerSources[Gt][ne][Ct]=new Xr(gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt));break;default:this.workerSources[Gt][ne][Ct]=new this.externalWorkerSourceTypes[ne](gt,this._getLayerIndex(Gt),this._getAvailableImages(Gt))}}return this.workerSources[Gt][ne][Ct]}_getDEMWorkerSource(Gt,ne){return this.demWorkerSources[Gt]||(this.demWorkerSources[Gt]={}),this.demWorkerSources[Gt][ne]||(this.demWorkerSources[Gt][ne]=new i),this.demWorkerSources[Gt][ne]}}return t.i(self)&&(self.worker=new nn(self)),nn}),I("index",["exports","./shared"],function(t,e){var r="4.7.1";let a,n,o={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:$t=>new Promise((z,ht)=>{let Et=requestAnimationFrame(z);$t.signal.addEventListener("abort",()=>{cancelAnimationFrame(Et),ht(e.c())})}),getImageData($t,z=0){return this.getImageCanvasContext($t).getImageData(-z,-z,$t.width+2*z,$t.height+2*z)},getImageCanvasContext($t){let z=window.document.createElement("canvas"),ht=z.getContext("2d",{willReadFrequently:!0});if(!ht)throw new Error("failed to create canvas 2d context");return z.width=$t.width,z.height=$t.height,ht.drawImage($t,0,0,$t.width,$t.height),ht},resolveURL:$t=>(a||(a=document.createElement("a")),a.href=$t,a.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(n==null&&(n=matchMedia("(prefers-reduced-motion: reduce)")),n.matches)}};class i{static testProp(z){if(!i.docStyle)return z[0];for(let ht=0;ht{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(z){let ht=z.getBoundingClientRect();return{x:ht.width/z.offsetWidth||1,y:ht.height/z.offsetHeight||1,boundingClientRect:ht}}static getPoint(z,ht,Et){let zt=ht.boundingClientRect;return new e.P((Et.clientX-zt.left)/ht.x-z.clientLeft,(Et.clientY-zt.top)/ht.y-z.clientTop)}static mousePos(z,ht){let Et=i.getScale(z);return i.getPoint(z,Et,ht)}static touchPos(z,ht){let Et=[],zt=i.getScale(z);for(let Ht=0;Ht{f&&T(f),f=null,v=!0},x.onerror=()=>{y=!0,f=null},x.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function($t){let z,ht,Et,zt;$t.resetRequestQueue=()=>{z=[],ht=0,Et=0,zt={}},$t.addThrottleControl=Ke=>{let vr=Et++;return zt[vr]=Ke,vr},$t.removeThrottleControl=Ke=>{delete zt[Ke],ke()},$t.getImage=(Ke,vr,Dr=!0)=>new Promise((Fr,un)=>{l.supported&&(Ke.headers||(Ke.headers={}),Ke.headers.accept="image/webp,*/*"),e.e(Ke,{type:"image"}),z.push({abortController:vr,requestParameters:Ke,supportImageRefresh:Dr,state:"queued",onError:Sn=>{un(Sn)},onSuccess:Sn=>{Fr(Sn)}}),ke()});let Ht=Ke=>e._(this,void 0,void 0,function*(){Ke.state="running";let{requestParameters:vr,supportImageRefresh:Dr,onError:Fr,onSuccess:un,abortController:Sn}=Ke,Xt=Dr===!1&&!e.i(self)&&!e.g(vr.url)&&(!vr.headers||Object.keys(vr.headers).reduce((Ae,je)=>Ae&&je==="accept",!0));ht++;let ae=Xt?Fe(vr,Sn):e.m(vr,Sn);try{let Ae=yield ae;delete Ke.abortController,Ke.state="completed",Ae.data instanceof HTMLImageElement||e.b(Ae.data)?un(Ae):Ae.data&&un({data:yield(xe=Ae.data,typeof createImageBitmap=="function"?e.d(xe):e.f(xe)),cacheControl:Ae.cacheControl,expires:Ae.expires})}catch(Ae){delete Ke.abortController,Fr(Ae)}finally{ht--,ke()}var xe}),ke=()=>{let Ke=(()=>{for(let vr of Object.keys(zt))if(zt[vr]())return!0;return!1})()?e.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let vr=ht;vr0;vr++){let Dr=z.shift();Dr.abortController.signal.aborted?vr--:Ht(Dr)}},Fe=(Ke,vr)=>new Promise((Dr,Fr)=>{let un=new Image,Sn=Ke.url,Xt=Ke.credentials;Xt&&Xt==="include"?un.crossOrigin="use-credentials":(Xt&&Xt==="same-origin"||!e.s(Sn))&&(un.crossOrigin="anonymous"),vr.signal.addEventListener("abort",()=>{un.src="",Fr(e.c())}),un.fetchPriority="high",un.onload=()=>{un.onerror=un.onload=null,Dr({data:un})},un.onerror=()=>{un.onerror=un.onload=null,vr.signal.aborted||Fr(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},un.src=Sn})}(u||(u={})),u.resetRequestQueue();class b{constructor(z){this._transformRequestFn=z}transformRequest(z,ht){return this._transformRequestFn&&this._transformRequestFn(z,ht)||{url:z}}setTransformRequest(z){this._transformRequestFn=z}}function _($t){var z=new e.A(3);return z[0]=$t[0],z[1]=$t[1],z[2]=$t[2],z}var P,M=function($t,z,ht){return $t[0]=z[0]-ht[0],$t[1]=z[1]-ht[1],$t[2]=z[2]-ht[2],$t};P=new e.A(3),e.A!=Float32Array&&(P[0]=0,P[1]=0,P[2]=0);var C=function($t){var z=$t[0],ht=$t[1];return z*z+ht*ht};function A($t){let z=[];if(typeof $t=="string")z.push({id:"default",url:$t});else if($t&&$t.length>0){let ht=[];for(let{id:Et,url:zt}of $t){let Ht=`${Et}${zt}`;ht.indexOf(Ht)===-1&&(ht.push(Ht),z.push({id:Et,url:zt}))}}return z}function h($t,z,ht){let Et=$t.split("?");return Et[0]+=`${z}${ht}`,Et.join("?")}(function(){var $t=new e.A(2);e.A!=Float32Array&&($t[0]=0,$t[1]=0)})();class p{constructor(z,ht,Et,zt){this.context=z,this.format=Et,this.texture=z.gl.createTexture(),this.update(ht,zt)}update(z,ht,Et){let{width:zt,height:Ht}=z,ke=!(this.size&&this.size[0]===zt&&this.size[1]===Ht||Et),{context:Fe}=this,{gl:Ke}=Fe;if(this.useMipmap=!!(ht&&ht.useMipmap),Ke.bindTexture(Ke.TEXTURE_2D,this.texture),Fe.pixelStoreUnpackFlipY.set(!1),Fe.pixelStoreUnpack.set(1),Fe.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ke.RGBA&&(!ht||ht.premultiply!==!1)),ke)this.size=[zt,Ht],z instanceof HTMLImageElement||z instanceof HTMLCanvasElement||z instanceof HTMLVideoElement||z instanceof ImageData||e.b(z)?Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,this.format,Ke.UNSIGNED_BYTE,z):Ke.texImage2D(Ke.TEXTURE_2D,0,this.format,zt,Ht,0,this.format,Ke.UNSIGNED_BYTE,z.data);else{let{x:vr,y:Dr}=Et||{x:0,y:0};z instanceof HTMLImageElement||z instanceof HTMLCanvasElement||z instanceof HTMLVideoElement||z instanceof ImageData||e.b(z)?Ke.texSubImage2D(Ke.TEXTURE_2D,0,vr,Dr,Ke.RGBA,Ke.UNSIGNED_BYTE,z):Ke.texSubImage2D(Ke.TEXTURE_2D,0,vr,Dr,zt,Ht,Ke.RGBA,Ke.UNSIGNED_BYTE,z.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ke.generateMipmap(Ke.TEXTURE_2D)}bind(z,ht,Et){let{context:zt}=this,{gl:Ht}=zt;Ht.bindTexture(Ht.TEXTURE_2D,this.texture),Et!==Ht.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Et=Ht.LINEAR),z!==this.filter&&(Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MAG_FILTER,z),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MIN_FILTER,Et||z),this.filter=z),ht!==this.wrap&&(Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_S,ht),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_T,ht),this.wrap=ht)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:z}=this.context;z.deleteTexture(this.texture),this.texture=null}}function k($t){let{userImage:z}=$t;return!!(z&&z.render&&z.render())&&($t.data.replace(new Uint8Array(z.data.buffer)),!0)}class w extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(z){if(this.loaded!==z&&(this.loaded=z,z)){for(let{ids:ht,promiseResolve:Et}of this.requestors)Et(this._getImagesForIds(ht));this.requestors=[]}}getImage(z){let ht=this.images[z];if(ht&&!ht.data&&ht.spriteData){let Et=ht.spriteData;ht.data=new e.R({width:Et.width,height:Et.height},Et.context.getImageData(Et.x,Et.y,Et.width,Et.height).data),ht.spriteData=null}return ht}addImage(z,ht){if(this.images[z])throw new Error(`Image id ${z} already exist, use updateImage instead`);this._validate(z,ht)&&(this.images[z]=ht)}_validate(z,ht){let Et=!0,zt=ht.data||ht.spriteData;return this._validateStretch(ht.stretchX,zt&&zt.width)||(this.fire(new e.j(new Error(`Image "${z}" has invalid "stretchX" value`))),Et=!1),this._validateStretch(ht.stretchY,zt&&zt.height)||(this.fire(new e.j(new Error(`Image "${z}" has invalid "stretchY" value`))),Et=!1),this._validateContent(ht.content,ht)||(this.fire(new e.j(new Error(`Image "${z}" has invalid "content" value`))),Et=!1),Et}_validateStretch(z,ht){if(!z)return!0;let Et=0;for(let zt of z){if(zt[0]{let zt=!0;if(!this.isLoaded())for(let Ht of z)this.images[Ht]||(zt=!1);this.isLoaded()||zt?ht(this._getImagesForIds(z)):this.requestors.push({ids:z,promiseResolve:ht})})}_getImagesForIds(z){let ht={};for(let Et of z){let zt=this.getImage(Et);zt||(this.fire(new e.k("styleimagemissing",{id:Et})),zt=this.getImage(Et)),zt?ht[Et]={data:zt.data.clone(),pixelRatio:zt.pixelRatio,sdf:zt.sdf,version:zt.version,stretchX:zt.stretchX,stretchY:zt.stretchY,content:zt.content,textFitWidth:zt.textFitWidth,textFitHeight:zt.textFitHeight,hasRenderCallback:!!(zt.userImage&&zt.userImage.render)}:e.w(`Image "${Et}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ht}getPixelSize(){let{width:z,height:ht}=this.atlasImage;return{width:z,height:ht}}getPattern(z){let ht=this.patterns[z],Et=this.getImage(z);if(!Et)return null;if(ht&&ht.position.version===Et.version)return ht.position;if(ht)ht.position.version=Et.version;else{let zt={w:Et.data.width+2,h:Et.data.height+2,x:0,y:0},Ht=new e.I(zt,Et);this.patterns[z]={bin:zt,position:Ht}}return this._updatePatternAtlas(),this.patterns[z].position}bind(z){let ht=z.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new p(z,this.atlasImage,ht.RGBA),this.atlasTexture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE)}_updatePatternAtlas(){let z=[];for(let Ht in this.patterns)z.push(this.patterns[Ht].bin);let{w:ht,h:Et}=e.p(z),zt=this.atlasImage;zt.resize({width:ht||1,height:Et||1});for(let Ht in this.patterns){let{bin:ke}=this.patterns[Ht],Fe=ke.x+1,Ke=ke.y+1,vr=this.getImage(Ht).data,Dr=vr.width,Fr=vr.height;e.R.copy(vr,zt,{x:0,y:0},{x:Fe,y:Ke},{width:Dr,height:Fr}),e.R.copy(vr,zt,{x:0,y:Fr-1},{x:Fe,y:Ke-1},{width:Dr,height:1}),e.R.copy(vr,zt,{x:0,y:0},{x:Fe,y:Ke+Fr},{width:Dr,height:1}),e.R.copy(vr,zt,{x:Dr-1,y:0},{x:Fe-1,y:Ke},{width:1,height:Fr}),e.R.copy(vr,zt,{x:0,y:0},{x:Fe+Dr,y:Ke},{width:1,height:Fr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(z){for(let ht of z){if(this.callbackDispatchedThisFrame[ht])continue;this.callbackDispatchedThisFrame[ht]=!0;let Et=this.getImage(ht);Et||e.w(`Image with ID: "${ht}" was not found`),k(Et)&&this.updateImage(ht,Et)}}}let R=1e20;function O($t,z,ht,Et,zt,Ht,ke,Fe,Ke){for(let vr=z;vr-1);Ke++,Ht[Ke]=Fe,ke[Ke]=vr,ke[Ke+1]=R}for(let Fe=0,Ke=0;Fe65535)throw new Error("glyphs > 65535 not supported");if(Et.ranges[Ht])return{stack:z,id:ht,glyph:zt};if(!this.url)throw new Error("glyphsUrl is not set");if(!Et.requests[Ht]){let Fe=V.loadGlyphRange(z,Ht,this.url,this.requestManager);Et.requests[Ht]=Fe}let ke=yield Et.requests[Ht];for(let Fe in ke)this._doesCharSupportLocalGlyph(+Fe)||(Et.glyphs[+Fe]=ke[+Fe]);return Et.ranges[Ht]=!0,{stack:z,id:ht,glyph:ke[ht]||null}})}_doesCharSupportLocalGlyph(z){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(z))}_tinySDF(z,ht,Et){let zt=this.localIdeographFontFamily;if(!zt||!this._doesCharSupportLocalGlyph(Et))return;let Ht=z.tinySDF;if(!Ht){let Fe="400";/bold/i.test(ht)?Fe="900":/medium/i.test(ht)?Fe="500":/light/i.test(ht)&&(Fe="200"),Ht=z.tinySDF=new V.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:zt,fontWeight:Fe})}let ke=Ht.draw(String.fromCharCode(Et));return{id:Et,bitmap:new e.o({width:ke.width||60,height:ke.height||60},ke.data),metrics:{width:ke.glyphWidth/2||24,height:ke.glyphHeight/2||24,left:ke.glyphLeft/2+.5||0,top:ke.glyphTop/2-27.5||-8,advance:ke.glyphAdvance/2||24,isDoubleResolution:!0}}}}V.loadGlyphRange=function($t,z,ht,Et){return e._(this,void 0,void 0,function*(){let zt=256*z,Ht=zt+255,ke=Et.transformRequest(ht.replace("{fontstack}",$t).replace("{range}",`${zt}-${Ht}`),"Glyphs"),Fe=yield e.l(ke,new AbortController);if(!Fe||!Fe.data)throw new Error(`Could not load glyph range. range: ${z}, ${zt}-${Ht}`);let Ke={};for(let vr of e.n(Fe.data))Ke[vr.id]=vr;return Ke})},V.TinySDF=class{constructor({fontSize:$t=24,buffer:z=3,radius:ht=8,cutoff:Et=.25,fontFamily:zt="sans-serif",fontWeight:Ht="normal",fontStyle:ke="normal"}={}){this.buffer=z,this.cutoff=Et,this.radius=ht;let Fe=this.size=$t+4*z,Ke=this._createCanvas(Fe),vr=this.ctx=Ke.getContext("2d",{willReadFrequently:!0});vr.font=`${ke} ${Ht} ${$t}px ${zt}`,vr.textBaseline="alphabetic",vr.textAlign="left",vr.fillStyle="black",this.gridOuter=new Float64Array(Fe*Fe),this.gridInner=new Float64Array(Fe*Fe),this.f=new Float64Array(Fe),this.z=new Float64Array(Fe+1),this.v=new Uint16Array(Fe)}_createCanvas($t){let z=document.createElement("canvas");return z.width=z.height=$t,z}draw($t){let{width:z,actualBoundingBoxAscent:ht,actualBoundingBoxDescent:Et,actualBoundingBoxLeft:zt,actualBoundingBoxRight:Ht}=this.ctx.measureText($t),ke=Math.ceil(ht),Fe=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Ht-zt))),Ke=Math.min(this.size-this.buffer,ke+Math.ceil(Et)),vr=Fe+2*this.buffer,Dr=Ke+2*this.buffer,Fr=Math.max(vr*Dr,0),un=new Uint8ClampedArray(Fr),Sn={data:un,width:vr,height:Dr,glyphWidth:Fe,glyphHeight:Ke,glyphTop:ke,glyphLeft:0,glyphAdvance:z};if(Fe===0||Ke===0)return Sn;let{ctx:Xt,buffer:ae,gridInner:xe,gridOuter:Ae}=this;Xt.clearRect(ae,ae,Fe,Ke),Xt.fillText($t,ae,ae+ke);let je=Xt.getImageData(ae,ae,Fe,Ke);Ae.fill(R,0,Fr),xe.fill(0,0,Fr);for(let Oe=0;Oe0?Nr*Nr:0,xe[Or]=Nr<0?Nr*Nr:0}}O(Ae,0,0,vr,Dr,vr,this.f,this.v,this.z),O(xe,ae,ae,Fe,Ke,vr,this.f,this.v,this.z);for(let Oe=0;Oe1&&(Ke=z[++Fe]);let Dr=Math.abs(vr-Ke.left),Fr=Math.abs(vr-Ke.right),un=Math.min(Dr,Fr),Sn,Xt=Ht/Et*(zt+1);if(Ke.isDash){let ae=zt-Math.abs(Xt);Sn=Math.sqrt(un*un+ae*ae)}else Sn=zt-Math.sqrt(un*un+Xt*Xt);this.data[ke+vr]=Math.max(0,Math.min(255,Sn+128))}}}addRegularDash(z){for(let Fe=z.length-1;Fe>=0;--Fe){let Ke=z[Fe],vr=z[Fe+1];Ke.zeroLength?z.splice(Fe,1):vr&&vr.isDash===Ke.isDash&&(vr.left=Ke.left,z.splice(Fe,1))}let ht=z[0],Et=z[z.length-1];ht.isDash===Et.isDash&&(ht.left=Et.left-this.width,Et.right=ht.right+this.width);let zt=this.width*this.nextRow,Ht=0,ke=z[Ht];for(let Fe=0;Fe1&&(ke=z[++Ht]);let Ke=Math.abs(Fe-ke.left),vr=Math.abs(Fe-ke.right),Dr=Math.min(Ke,vr);this.data[zt+Fe]=Math.max(0,Math.min(255,(ke.isDash?Dr:-Dr)+128))}}addDash(z,ht){let Et=ht?7:0,zt=2*Et+1;if(this.nextRow+zt>this.height)return e.w("LineAtlas out of space"),null;let Ht=0;for(let Fe=0;Fe{ht.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[lt]}numActive(){return Object.keys(this.active).length}}let mt=Math.floor(o.hardwareConcurrency/2),st,tt;function dt(){return st||(st=new yt),st}yt.workerCount=e.C(globalThis)?Math.max(Math.min(mt,3),1):1;class rt{constructor(z,ht){this.workerPool=z,this.actors=[],this.currentActor=0,this.id=ht;let Et=this.workerPool.acquire(ht);for(let zt=0;zt{ht.remove()}),this.actors=[],z&&this.workerPool.release(this.id)}registerMessageHandler(z,ht){for(let Et of this.actors)Et.registerMessageHandler(z,ht)}}function at(){return tt||(tt=new rt(dt(),e.G),tt.registerMessageHandler("GR",($t,z,ht)=>e.m(z,ht))),tt}function vt($t,z){let ht=e.H();return e.J(ht,ht,[1,1,0]),e.K(ht,ht,[.5*$t.width,.5*$t.height,1]),e.L(ht,ht,$t.calculatePosMatrix(z.toUnwrapped()))}function it($t,z,ht,Et,zt,Ht){let ke=function(Fr,un,Sn){if(Fr)for(let Xt of Fr){let ae=un[Xt];if(ae&&ae.source===Sn&&ae.type==="fill-extrusion")return!0}else for(let Xt in un){let ae=un[Xt];if(ae.source===Sn&&ae.type==="fill-extrusion")return!0}return!1}(zt&&zt.layers,z,$t.id),Fe=Ht.maxPitchScaleFactor(),Ke=$t.tilesIn(Et,Fe,ke);Ke.sort(Y);let vr=[];for(let Fr of Ke)vr.push({wrappedTileID:Fr.tileID.wrapped().key,queryResults:Fr.tile.queryRenderedFeatures(z,ht,$t._state,Fr.queryGeometry,Fr.cameraQueryGeometry,Fr.scale,zt,Ht,Fe,vt($t.transform,Fr.tileID))});let Dr=function(Fr){let un={},Sn={};for(let Xt of Fr){let ae=Xt.queryResults,xe=Xt.wrappedTileID,Ae=Sn[xe]=Sn[xe]||{};for(let je in ae){let Oe=ae[je],$e=Ae[je]=Ae[je]||{},wr=un[je]=un[je]||[];for(let Or of Oe)$e[Or.featureIndex]||($e[Or.featureIndex]=!0,wr.push(Or))}}return un}(vr);for(let Fr in Dr)Dr[Fr].forEach(un=>{let Sn=un.feature,Xt=$t.getFeatureState(Sn.layer["source-layer"],Sn.id);Sn.source=Sn.layer.source,Sn.layer["source-layer"]&&(Sn.sourceLayer=Sn.layer["source-layer"]),Sn.state=Xt});return Dr}function Y($t,z){let ht=$t.tileID,Et=z.tileID;return ht.overscaledZ-Et.overscaledZ||ht.canonical.y-Et.canonical.y||ht.wrap-Et.wrap||ht.canonical.x-Et.canonical.x}function ft($t,z,ht){return e._(this,void 0,void 0,function*(){let Et=$t;if($t.url?Et=(yield e.h(z.transformRequest($t.url,"Source"),ht)).data:yield o.frameAsync(ht),!Et)return null;let zt=e.M(e.e(Et,$t),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Et&&Et.vector_layers&&(zt.vectorLayerIds=Et.vector_layers.map(Ht=>Ht.id)),zt})}class ut{constructor(z,ht){z&&(ht?this.setSouthWest(z).setNorthEast(ht):Array.isArray(z)&&(z.length===4?this.setSouthWest([z[0],z[1]]).setNorthEast([z[2],z[3]]):this.setSouthWest(z[0]).setNorthEast(z[1])))}setNorthEast(z){return this._ne=z instanceof e.N?new e.N(z.lng,z.lat):e.N.convert(z),this}setSouthWest(z){return this._sw=z instanceof e.N?new e.N(z.lng,z.lat):e.N.convert(z),this}extend(z){let ht=this._sw,Et=this._ne,zt,Ht;if(z instanceof e.N)zt=z,Ht=z;else{if(!(z instanceof ut))return Array.isArray(z)?z.length===4||z.every(Array.isArray)?this.extend(ut.convert(z)):this.extend(e.N.convert(z)):z&&("lng"in z||"lon"in z)&&"lat"in z?this.extend(e.N.convert(z)):this;if(zt=z._sw,Ht=z._ne,!zt||!Ht)return this}return ht||Et?(ht.lng=Math.min(zt.lng,ht.lng),ht.lat=Math.min(zt.lat,ht.lat),Et.lng=Math.max(Ht.lng,Et.lng),Et.lat=Math.max(Ht.lat,Et.lat)):(this._sw=new e.N(zt.lng,zt.lat),this._ne=new e.N(Ht.lng,Ht.lat)),this}getCenter(){return new e.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.N(this.getWest(),this.getNorth())}getSouthEast(){return new e.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(z){let{lng:ht,lat:Et}=e.N.convert(z),zt=this._sw.lng<=ht&&ht<=this._ne.lng;return this._sw.lng>this._ne.lng&&(zt=this._sw.lng>=ht&&ht>=this._ne.lng),this._sw.lat<=Et&&Et<=this._ne.lat&&zt}static convert(z){return z instanceof ut?z:z&&new ut(z)}static fromLngLat(z,ht=0){let Et=360*ht/40075017,zt=Et/Math.cos(Math.PI/180*z.lat);return new ut(new e.N(z.lng-zt,z.lat-Et),new e.N(z.lng+zt,z.lat+Et))}adjustAntiMeridian(){let z=new e.N(this._sw.lng,this._sw.lat),ht=new e.N(this._ne.lng,this._ne.lat);return new ut(z,z.lng>ht.lng?new e.N(ht.lng+360,ht.lat):ht)}}class kt{constructor(z,ht,Et){this.bounds=ut.convert(this.validateBounds(z)),this.minzoom=ht||0,this.maxzoom=Et||24}validateBounds(z){return Array.isArray(z)&&z.length===4?[Math.max(-180,z[0]),Math.max(-90,z[1]),Math.min(180,z[2]),Math.min(90,z[3])]:[-180,-90,180,90]}contains(z){let ht=Math.pow(2,z.z),Et=Math.floor(e.O(this.bounds.getWest())*ht),zt=Math.floor(e.Q(this.bounds.getNorth())*ht),Ht=Math.ceil(e.O(this.bounds.getEast())*ht),ke=Math.ceil(e.Q(this.bounds.getSouth())*ht);return z.x>=Et&&z.x=zt&&z.y{this._options.tiles=z}),this}setUrl(z){return this.setSourceProperty(()=>{this.url=z,this._options.url=z}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et={request:this.map._requestManager.transformRequest(ht,"Tile"),uid:z.uid,tileID:z.tileID,zoom:z.tileID.overscaledZ,tileSize:this.tileSize*z.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Et.request.collectResourceTiming=this._collectResourceTiming;let zt="RT";if(z.actor&&z.state!=="expired"){if(z.state==="loading")return new Promise((Ht,ke)=>{z.reloadPromise={resolve:Ht,reject:ke}})}else z.actor=this.dispatcher.getActor(),zt="LT";z.abortController=new AbortController;try{let Ht=yield z.actor.sendAsync({type:zt,data:Et},z.abortController);if(delete z.abortController,z.aborted)return;this._afterTileLoadWorkerResponse(z,Ht)}catch(Ht){if(delete z.abortController,z.aborted)return;if(Ht&&Ht.status!==404)throw Ht;this._afterTileLoadWorkerResponse(z,null)}})}_afterTileLoadWorkerResponse(z,ht){if(ht&&ht.resourceTiming&&(z.resourceTiming=ht.resourceTiming),ht&&this.map._refreshExpiredTiles&&z.setExpiryData(ht),z.loadVectorData(ht,this.map.painter),z.reloadPromise){let Et=z.reloadPromise;z.reloadPromise=null,this.loadTile(z).then(Et.resolve).catch(Et.reject)}}abortTile(z){return e._(this,void 0,void 0,function*(){z.abortController&&(z.abortController.abort(),delete z.abortController),z.actor&&(yield z.actor.sendAsync({type:"AT",data:{uid:z.uid,type:this.type,source:this.id}}))})}unloadTile(z){return e._(this,void 0,void 0,function*(){z.unloadVectorData(),z.actor&&(yield z.actor.sendAsync({type:"RMT",data:{uid:z.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Pt extends e.E{constructor(z,ht,Et,zt){super(),this.id=z,this.dispatcher=Et,this.setEventedParent(zt),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},ht),e.e(this,e.M(ht,["url","scheme","tileSize"]))}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let z=yield ft(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,z&&(e.e(this,z),z.bounds&&(this.tileBounds=new kt(z.bounds,this.minzoom,this.maxzoom)),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})))}catch(z){this._tileJSONRequest=null,this.fire(new e.j(z))}})}loaded(){return this._loaded}onAdd(z){this.map=z,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(z){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),z(),this.load()}setTiles(z){return this.setSourceProperty(()=>{this._options.tiles=z}),this}setUrl(z){return this.setSourceProperty(()=>{this.url=z,this._options.url=z}),this}serialize(){return e.e({},this._options)}hasTile(z){return!this.tileBounds||this.tileBounds.contains(z.canonical)}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);z.abortController=new AbortController;try{let Et=yield u.getImage(this.map._requestManager.transformRequest(ht,"Tile"),z.abortController,this.map._refreshExpiredTiles);if(delete z.abortController,z.aborted)return void(z.state="unloaded");if(Et&&Et.data){this.map._refreshExpiredTiles&&Et.cacheControl&&Et.expires&&z.setExpiryData({cacheControl:Et.cacheControl,expires:Et.expires});let zt=this.map.painter.context,Ht=zt.gl,ke=Et.data;z.texture=this.map.painter.getTileTexture(ke.width),z.texture?z.texture.update(ke,{useMipmap:!0}):(z.texture=new p(zt,ke,Ht.RGBA,{useMipmap:!0}),z.texture.bind(Ht.LINEAR,Ht.CLAMP_TO_EDGE,Ht.LINEAR_MIPMAP_NEAREST)),z.state="loaded"}}catch(Et){if(delete z.abortController,z.aborted)z.state="unloaded";else if(Et)throw z.state="errored",Et}})}abortTile(z){return e._(this,void 0,void 0,function*(){z.abortController&&(z.abortController.abort(),delete z.abortController)})}unloadTile(z){return e._(this,void 0,void 0,function*(){z.texture&&this.map.painter.saveTileTexture(z.texture)})}hasTransition(){return!1}}class qt extends Pt{constructor(z,ht,Et,zt){super(z,ht,Et,zt),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},ht),this.encoding=ht.encoding||"mapbox",this.redFactor=ht.redFactor,this.greenFactor=ht.greenFactor,this.blueFactor=ht.blueFactor,this.baseShift=ht.baseShift}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Et=this.map._requestManager.transformRequest(ht,"Tile");z.neighboringTiles=this._getNeighboringTiles(z.tileID),z.abortController=new AbortController;try{let zt=yield u.getImage(Et,z.abortController,this.map._refreshExpiredTiles);if(delete z.abortController,z.aborted)return void(z.state="unloaded");if(zt&&zt.data){let Ht=zt.data;this.map._refreshExpiredTiles&&zt.cacheControl&&zt.expires&&z.setExpiryData({cacheControl:zt.cacheControl,expires:zt.expires});let ke=e.b(Ht)&&e.U()?Ht:yield this.readImageNow(Ht),Fe={type:this.type,uid:z.uid,source:this.id,rawImageData:ke,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!z.actor||z.state==="expired"){z.actor=this.dispatcher.getActor();let Ke=yield z.actor.sendAsync({type:"LDT",data:Fe});z.dem=Ke,z.needsHillshadePrepare=!0,z.needsTerrainPrepare=!0,z.state="loaded"}}}catch(zt){if(delete z.abortController,z.aborted)z.state="unloaded";else if(zt)throw z.state="errored",zt}})}readImageNow(z){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.V()){let ht=z.width+2,Et=z.height+2;try{return new e.R({width:ht,height:Et},yield e.W(z,-1,-1,ht,Et))}catch{}}return o.getImageData(z,1)})}_getNeighboringTiles(z){let ht=z.canonical,Et=Math.pow(2,ht.z),zt=(ht.x-1+Et)%Et,Ht=ht.x===0?z.wrap-1:z.wrap,ke=(ht.x+1+Et)%Et,Fe=ht.x+1===Et?z.wrap+1:z.wrap,Ke={};return Ke[new e.S(z.overscaledZ,Ht,ht.z,zt,ht.y).key]={backfilled:!1},Ke[new e.S(z.overscaledZ,Fe,ht.z,ke,ht.y).key]={backfilled:!1},ht.y>0&&(Ke[new e.S(z.overscaledZ,Ht,ht.z,zt,ht.y-1).key]={backfilled:!1},Ke[new e.S(z.overscaledZ,z.wrap,ht.z,ht.x,ht.y-1).key]={backfilled:!1},Ke[new e.S(z.overscaledZ,Fe,ht.z,ke,ht.y-1).key]={backfilled:!1}),ht.y+10&&e.e(Ht,{resourceTiming:zt}),this.fire(new e.k("data",Object.assign(Object.assign({},Ht),{sourceDataType:"metadata"}))),this.fire(new e.k("data",Object.assign(Object.assign({},Ht),{sourceDataType:"content"})))}catch(Et){if(this._pendingLoads--,this._removed)return void this.fire(new e.k("dataabort",{dataType:"source"}));this.fire(new e.j(Et))}})}loaded(){return this._pendingLoads===0}loadTile(z){return e._(this,void 0,void 0,function*(){let ht=z.actor?"RT":"LT";z.actor=this.actor;let Et={type:this.type,uid:z.uid,tileID:z.tileID,zoom:z.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};z.abortController=new AbortController;let zt=yield this.actor.sendAsync({type:ht,data:Et},z.abortController);delete z.abortController,z.unloadVectorData(),z.aborted||z.loadVectorData(zt,this.map.painter,ht==="RT")})}abortTile(z){return e._(this,void 0,void 0,function*(){z.abortController&&(z.abortController.abort(),delete z.abortController),z.aborted=!0})}unloadTile(z){return e._(this,void 0,void 0,function*(){z.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:z.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Jt=e.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ge extends e.E{constructor(z,ht,Et,zt){super(),this.id=z,this.dispatcher=Et,this.coordinates=ht.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(zt),this.options=ht}load(z){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let ht=yield u.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ht&&ht.data&&(this.image=ht.data,z&&(this.coordinates=z),this._finishLoading())}catch(ht){this._request=null,this._loaded=!0,this.fire(new e.j(ht))}})}loaded(){return this._loaded}updateImage(z){return z.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=z.url,this.load(z.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(z){this.map=z,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(z){this.coordinates=z;let ht=z.map(e.Z.fromLngLat);this.tileID=function(zt){let Ht=1/0,ke=1/0,Fe=-1/0,Ke=-1/0;for(let un of zt)Ht=Math.min(Ht,un.x),ke=Math.min(ke,un.y),Fe=Math.max(Fe,un.x),Ke=Math.max(Ke,un.y);let vr=Math.max(Fe-Ht,Ke-ke),Dr=Math.max(0,Math.floor(-Math.log(vr)/Math.LN2)),Fr=Math.pow(2,Dr);return new e.a1(Dr,Math.floor((Ht+Fe)/2*Fr),Math.floor((ke+Ke)/2*Fr))}(ht),this.minzoom=this.maxzoom=this.tileID.z;let Et=ht.map(zt=>this.tileID.getTilePoint(zt)._round());return this._boundsArray=new e.$,this._boundsArray.emplaceBack(Et[0].x,Et[0].y,0,0),this._boundsArray.emplaceBack(Et[1].x,Et[1].y,e.X,0),this._boundsArray.emplaceBack(Et[3].x,Et[3].y,0,e.X),this._boundsArray.emplaceBack(Et[2].x,Et[2].y,e.X,e.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let z=this.map.painter.context,ht=z.gl;this.boundsBuffer||(this.boundsBuffer=z.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new p(z,this.image,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let zt in this.tiles){let Ht=this.tiles[zt];Ht.state!=="loaded"&&(Ht.state="loaded",Ht.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(z){return e._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(z.tileID.canonical)?(this.tiles[String(z.tileID.wrap)]=z,z.buckets={}):z.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class fe extends ge{constructor(z,ht,Et,zt){super(z,ht,Et,zt),this.roundZoom=!0,this.type="video",this.options=ht}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let z=this.options;this.urls=[];for(let ht of z.urls)this.urls.push(this.map._requestManager.transformRequest(ht,"Source").url);try{let ht=yield e.a3(this.urls);if(this._loaded=!0,!ht)return;this.video=ht,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ht){this.fire(new e.j(ht))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(z){if(this.video){let ht=this.video.seekable;zht.end(0)?this.fire(new e.j(new e.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ht.start(0)} and ${ht.end(0)}-second mark.`))):this.video.currentTime=z}}getVideo(){return this.video}onAdd(z){this.map||(this.map=z,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let z=this.map.painter.context,ht=z.gl;this.boundsBuffer||(this.boundsBuffer=z.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE),ht.texSubImage2D(ht.TEXTURE_2D,0,0,0,ht.RGBA,ht.UNSIGNED_BYTE,this.video)):(this.texture=new p(z,this.video,ht.RGBA),this.texture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE));let Et=!1;for(let zt in this.tiles){let Ht=this.tiles[zt];Ht.state!=="loaded"&&(Ht.state="loaded",Ht.texture=this.texture,Et=!0)}Et&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class pe extends ge{constructor(z,ht,Et,zt){super(z,ht,Et,zt),ht.coordinates?Array.isArray(ht.coordinates)&&ht.coordinates.length===4&&!ht.coordinates.some(Ht=>!Array.isArray(Ht)||Ht.length!==2||Ht.some(ke=>typeof ke!="number"))||this.fire(new e.j(new e.a2(`sources.${z}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.j(new e.a2(`sources.${z}`,null,'missing required property "coordinates"'))),ht.animate&&typeof ht.animate!="boolean"&&this.fire(new e.j(new e.a2(`sources.${z}`,null,'optional "animate" property must be a boolean value'))),ht.canvas?typeof ht.canvas=="string"||ht.canvas instanceof HTMLCanvasElement||this.fire(new e.j(new e.a2(`sources.${z}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.j(new e.a2(`sources.${z}`,null,'missing required property "canvas"'))),this.options=ht,this.animate=ht.animate===void 0||ht.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(z){this.map=z,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let z=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,z=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,z=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ht=this.map.painter.context,Et=ht.gl;this.boundsBuffer||(this.boundsBuffer=ht.createVertexBuffer(this._boundsArray,Jt.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?(z||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new p(ht,this.canvas,Et.RGBA,{premultiply:!0});let zt=!1;for(let Ht in this.tiles){let ke=this.tiles[Ht];ke.state!=="loaded"&&(ke.state="loaded",ke.texture=this.texture,zt=!0)}zt&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let z of[this.canvas.width,this.canvas.height])if(isNaN(z)||z<=0)return!0;return!1}}let se={},Tt=$t=>{switch($t){case"geojson":return Wt;case"image":return ge;case"raster":return Pt;case"raster-dem":return qt;case"vector":return It;case"video":return fe;case"canvas":return pe}return se[$t]},Lt="RTLPluginLoaded";class Mt extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=at()}_syncState(z){return this.status=z,this.dispatcher.broadcast("SRPS",{pluginStatus:z,pluginURL:this.url}).catch(ht=>{throw this.status="error",ht})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(z){return e._(this,arguments,void 0,function*(ht,Et=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=o.resolveURL(ht),!this.url)throw new Error(`requested url ${ht} is invalid`);if(this.status==="unavailable"){if(!Et)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.k(Lt))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let ee=null;function ve(){return ee||(ee=new Mt),ee}class oe{constructor(z,ht){this.timeAdded=0,this.fadeEndTime=0,this.tileID=z,this.uid=e.a4(),this.uses=0,this.tileSize=ht,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(z){let ht=z+this.timeAdded;htHt.getLayer(vr)).filter(Boolean);if(Ke.length!==0){Fe.layers=Ke,Fe.stateDependentLayerIds&&(Fe.stateDependentLayers=Fe.stateDependentLayerIds.map(vr=>Ke.filter(Dr=>Dr.id===vr)[0]));for(let vr of Ke)ke[vr.id]=Fe}}return ke}(z.buckets,ht.style),this.hasSymbolBuckets=!1;for(let zt in this.buckets){let Ht=this.buckets[zt];if(Ht instanceof e.a6){if(this.hasSymbolBuckets=!0,!Et)break;Ht.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let zt in this.buckets){let Ht=this.buckets[zt];if(Ht instanceof e.a6&&Ht.hasRTLText){this.hasRTLText=!0,ve().lazyLoad();break}}this.queryPadding=0;for(let zt in this.buckets){let Ht=this.buckets[zt];this.queryPadding=Math.max(this.queryPadding,ht.style.getLayer(zt).queryRadius(Ht))}z.imageAtlas&&(this.imageAtlas=z.imageAtlas),z.glyphAtlasImage&&(this.glyphAtlasImage=z.glyphAtlasImage)}else this.collisionBoxArray=new e.a5}unloadVectorData(){for(let z in this.buckets)this.buckets[z].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(z){return this.buckets[z.id]}upload(z){for(let Et in this.buckets){let zt=this.buckets[Et];zt.uploadPending()&&zt.upload(z)}let ht=z.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new p(z,this.imageAtlas.image,ht.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new p(z,this.glyphAtlasImage,ht.ALPHA),this.glyphAtlasImage=null)}prepare(z){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(z,this.imageAtlasTexture)}queryRenderedFeatures(z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:zt,cameraQueryGeometry:Ht,scale:ke,tileSize:this.tileSize,pixelPosMatrix:Dr,transform:Ke,params:Fe,queryPadding:this.queryPadding*vr},z,ht,Et):{}}querySourceFeatures(z,ht){let Et=this.latestFeatureIndex;if(!Et||!Et.rawTileData)return;let zt=Et.loadVTLayers(),Ht=ht&&ht.sourceLayer?ht.sourceLayer:"",ke=zt._geojsonTileLayer||zt[Ht];if(!ke)return;let Fe=e.a7(ht&&ht.filter),{z:Ke,x:vr,y:Dr}=this.tileID.canonical,Fr={z:Ke,x:vr,y:Dr};for(let un=0;unEt)zt=!1;else if(ht)if(this.expirationTime{this.remove(z,Ht)},Et)),this.data[zt].push(Ht),this.order.push(zt),this.order.length>this.max){let ke=this._getAndRemoveByKey(this.order[0]);ke&&this.onRemove(ke)}return this}has(z){return z.wrapped().key in this.data}getAndRemove(z){return this.has(z)?this._getAndRemoveByKey(z.wrapped().key):null}_getAndRemoveByKey(z){let ht=this.data[z].shift();return ht.timeout&&clearTimeout(ht.timeout),this.data[z].length===0&&delete this.data[z],this.order.splice(this.order.indexOf(z),1),ht.value}getByKey(z){let ht=this.data[z];return ht?ht[0].value:null}get(z){return this.has(z)?this.data[z.wrapped().key][0].value:null}remove(z,ht){if(!this.has(z))return this;let Et=z.wrapped().key,zt=ht===void 0?0:this.data[Et].indexOf(ht),Ht=this.data[Et][zt];return this.data[Et].splice(zt,1),Ht.timeout&&clearTimeout(Ht.timeout),this.data[Et].length===0&&delete this.data[Et],this.onRemove(Ht.value),this.order.splice(this.order.indexOf(Et),1),this}setMaxSize(z){for(this.max=z;this.order.length>this.max;){let ht=this._getAndRemoveByKey(this.order[0]);ht&&this.onRemove(ht)}return this}filter(z){let ht=[];for(let Et in this.data)for(let zt of this.data[Et])z(zt.value)||ht.push(zt);for(let Et of ht)this.remove(Et.value.tileID,Et)}}class He{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(z,ht,Et){let zt=String(ht);if(this.stateChanges[z]=this.stateChanges[z]||{},this.stateChanges[z][zt]=this.stateChanges[z][zt]||{},e.e(this.stateChanges[z][zt],Et),this.deletedStates[z]===null){this.deletedStates[z]={};for(let Ht in this.state[z])Ht!==zt&&(this.deletedStates[z][Ht]=null)}else if(this.deletedStates[z]&&this.deletedStates[z][zt]===null){this.deletedStates[z][zt]={};for(let Ht in this.state[z][zt])Et[Ht]||(this.deletedStates[z][zt][Ht]=null)}else for(let Ht in Et)this.deletedStates[z]&&this.deletedStates[z][zt]&&this.deletedStates[z][zt][Ht]===null&&delete this.deletedStates[z][zt][Ht]}removeFeatureState(z,ht,Et){if(this.deletedStates[z]===null)return;let zt=String(ht);if(this.deletedStates[z]=this.deletedStates[z]||{},Et&&ht!==void 0)this.deletedStates[z][zt]!==null&&(this.deletedStates[z][zt]=this.deletedStates[z][zt]||{},this.deletedStates[z][zt][Et]=null);else if(ht!==void 0)if(this.stateChanges[z]&&this.stateChanges[z][zt])for(Et in this.deletedStates[z][zt]={},this.stateChanges[z][zt])this.deletedStates[z][zt][Et]=null;else this.deletedStates[z][zt]=null;else this.deletedStates[z]=null}getState(z,ht){let Et=String(ht),zt=e.e({},(this.state[z]||{})[Et],(this.stateChanges[z]||{})[Et]);if(this.deletedStates[z]===null)return{};if(this.deletedStates[z]){let Ht=this.deletedStates[z][ht];if(Ht===null)return{};for(let ke in Ht)delete zt[ke]}return zt}initializeTileState(z,ht){z.setFeatureState(this.state,ht)}coalesceChanges(z,ht){let Et={};for(let zt in this.stateChanges){this.state[zt]=this.state[zt]||{};let Ht={};for(let ke in this.stateChanges[zt])this.state[zt][ke]||(this.state[zt][ke]={}),e.e(this.state[zt][ke],this.stateChanges[zt][ke]),Ht[ke]=this.state[zt][ke];Et[zt]=Ht}for(let zt in this.deletedStates){this.state[zt]=this.state[zt]||{};let Ht={};if(this.deletedStates[zt]===null)for(let ke in this.state[zt])Ht[ke]={},this.state[zt][ke]={};else for(let ke in this.deletedStates[zt]){if(this.deletedStates[zt][ke]===null)this.state[zt][ke]={};else for(let Fe of Object.keys(this.deletedStates[zt][ke]))delete this.state[zt][ke][Fe];Ht[ke]=this.state[zt][ke]}Et[zt]=Et[zt]||{},e.e(Et[zt],Ht)}if(this.stateChanges={},this.deletedStates={},Object.keys(Et).length!==0)for(let zt in z)z[zt].setFeatureState(Et,ht)}}class Ge extends e.E{constructor(z,ht,Et){super(),this.id=z,this.dispatcher=Et,this.on("data",zt=>this._dataHandler(zt)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((zt,Ht,ke,Fe)=>{let Ke=new(Tt(Ht.type))(zt,Ht,ke,Fe);if(Ke.id!==zt)throw new Error(`Expected Source id to be ${zt} instead of ${Ke.id}`);return Ke})(z,ht,Et,this),this._tiles={},this._cache=new Te(0,zt=>this._unloadTile(zt)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new He,this._didEmitContent=!1,this._updated=!1}onAdd(z){this.map=z,this._maxTileCacheSize=z?z._maxTileCacheSize:null,this._maxTileCacheZoomLevels=z?z._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(z)}onRemove(z){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(z)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let z in this._tiles){let ht=this._tiles[z];if(ht.state!=="loaded"&&ht.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let z=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,z&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(z,ht,Et){return e._(this,void 0,void 0,function*(){try{yield this._source.loadTile(z),this._tileLoaded(z,ht,Et)}catch(zt){z.state="errored",zt.status!==404?this._source.fire(new e.j(zt,{tile:z})):this.update(this.transform,this.terrain)}})}_unloadTile(z){this._source.unloadTile&&this._source.unloadTile(z)}_abortTile(z){this._source.abortTile&&this._source.abortTile(z),this._source.fire(new e.k("dataabort",{tile:z,coord:z.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(z){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ht in this._tiles){let Et=this._tiles[ht];Et.upload(z),Et.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(z=>z.tileID).sort(cr).map(z=>z.key)}getRenderableIds(z){let ht=[];for(let Et in this._tiles)this._isIdRenderable(Et,z)&&ht.push(this._tiles[Et]);return z?ht.sort((Et,zt)=>{let Ht=Et.tileID,ke=zt.tileID,Fe=new e.P(Ht.canonical.x,Ht.canonical.y)._rotate(this.transform.angle),Ke=new e.P(ke.canonical.x,ke.canonical.y)._rotate(this.transform.angle);return Ht.overscaledZ-ke.overscaledZ||Ke.y-Fe.y||Ke.x-Fe.x}).map(Et=>Et.tileID.key):ht.map(Et=>Et.tileID).sort(cr).map(Et=>Et.key)}hasRenderableParent(z){let ht=this.findLoadedParent(z,0);return!!ht&&this._isIdRenderable(ht.tileID.key)}_isIdRenderable(z,ht){return this._tiles[z]&&this._tiles[z].hasData()&&!this._coveredTiles[z]&&(ht||!this._tiles[z].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let z in this._tiles)this._tiles[z].state!=="errored"&&this._reloadTile(z,"reloading")}}_reloadTile(z,ht){return e._(this,void 0,void 0,function*(){let Et=this._tiles[z];Et&&(Et.state!=="loading"&&(Et.state=ht),yield this._loadTile(Et,z,ht))})}_tileLoaded(z,ht,Et){z.timeAdded=o.now(),Et==="expired"&&(z.refreshedUponExpiration=!0),this._setTileReloadTimer(ht,z),this.getSource().type==="raster-dem"&&z.dem&&this._backfillDEM(z),this._state.initializeTileState(z,this.map?this.map.painter:null),z.aborted||this._source.fire(new e.k("data",{dataType:"source",tile:z,coord:z.tileID}))}_backfillDEM(z){let ht=this.getRenderableIds();for(let zt=0;zt1||(Math.abs(ke)>1&&(Math.abs(ke+Ke)===1?ke+=Ke:Math.abs(ke-Ke)===1&&(ke-=Ke)),Ht.dem&&zt.dem&&(zt.dem.backfillBorder(Ht.dem,ke,Fe),zt.neighboringTiles&&zt.neighboringTiles[vr]&&(zt.neighboringTiles[vr].backfilled=!0)))}}getTile(z){return this.getTileByID(z.key)}getTileByID(z){return this._tiles[z]}_retainLoadedChildren(z,ht,Et,zt){for(let Ht in this._tiles){let ke=this._tiles[Ht];if(zt[Ht]||!ke.hasData()||ke.tileID.overscaledZ<=ht||ke.tileID.overscaledZ>Et)continue;let Fe=ke.tileID;for(;ke&&ke.tileID.overscaledZ>ht+1;){let vr=ke.tileID.scaledTo(ke.tileID.overscaledZ-1);ke=this._tiles[vr.key],ke&&ke.hasData()&&(Fe=vr)}let Ke=Fe;for(;Ke.overscaledZ>ht;)if(Ke=Ke.scaledTo(Ke.overscaledZ-1),z[Ke.key]){zt[Fe.key]=Fe;break}}}findLoadedParent(z,ht){if(z.key in this._loadedParentTiles){let Et=this._loadedParentTiles[z.key];return Et&&Et.tileID.overscaledZ>=ht?Et:null}for(let Et=z.overscaledZ-1;Et>=ht;Et--){let zt=z.scaledTo(Et),Ht=this._getLoadedTile(zt);if(Ht)return Ht}}findLoadedSibling(z){return this._getLoadedTile(z)}_getLoadedTile(z){let ht=this._tiles[z.key];return ht&&ht.hasData()?ht:this._cache.getByKey(z.wrapped().key)}updateCacheSize(z){let ht=Math.ceil(z.width/this._source.tileSize)+1,Et=Math.ceil(z.height/this._source.tileSize)+1,zt=Math.floor(ht*Et*(this._maxTileCacheZoomLevels===null?e.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Ht=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,zt):zt;this._cache.setMaxSize(Ht)}handleWrapJump(z){let ht=Math.round((z-(this._prevLng===void 0?z:this._prevLng))/360);if(this._prevLng=z,ht){let Et={};for(let zt in this._tiles){let Ht=this._tiles[zt];Ht.tileID=Ht.tileID.unwrapTo(Ht.tileID.wrap+ht),Et[Ht.tileID.key]=Ht}this._tiles=Et;for(let zt in this._timers)clearTimeout(this._timers[zt]),delete this._timers[zt];for(let zt in this._tiles)this._setTileReloadTimer(zt,this._tiles[zt])}}_updateCoveredAndRetainedTiles(z,ht,Et,zt,Ht,ke){let Fe={},Ke={},vr=Object.keys(z),Dr=o.now();for(let Fr of vr){let un=z[Fr],Sn=this._tiles[Fr];if(!Sn||Sn.fadeEndTime!==0&&Sn.fadeEndTime<=Dr)continue;let Xt=this.findLoadedParent(un,ht),ae=this.findLoadedSibling(un),xe=Xt||ae||null;xe&&(this._addTile(xe.tileID),Fe[xe.tileID.key]=xe.tileID),Ke[Fr]=un}this._retainLoadedChildren(Ke,zt,Et,z);for(let Fr in Fe)z[Fr]||(this._coveredTiles[Fr]=!0,z[Fr]=Fe[Fr]);if(ke){let Fr={},un={};for(let Sn of Ht)this._tiles[Sn.key].hasData()?Fr[Sn.key]=Sn:un[Sn.key]=Sn;for(let Sn in un){let Xt=un[Sn].children(this._source.maxzoom);this._tiles[Xt[0].key]&&this._tiles[Xt[1].key]&&this._tiles[Xt[2].key]&&this._tiles[Xt[3].key]&&(Fr[Xt[0].key]=z[Xt[0].key]=Xt[0],Fr[Xt[1].key]=z[Xt[1].key]=Xt[1],Fr[Xt[2].key]=z[Xt[2].key]=Xt[2],Fr[Xt[3].key]=z[Xt[3].key]=Xt[3],delete un[Sn])}for(let Sn in un){let Xt=un[Sn],ae=this.findLoadedParent(Xt,this._source.minzoom),xe=this.findLoadedSibling(Xt),Ae=ae||xe||null;if(Ae){Fr[Ae.tileID.key]=z[Ae.tileID.key]=Ae.tileID;for(let je in Fr)Fr[je].isChildOf(Ae.tileID)&&delete Fr[je]}}for(let Sn in this._tiles)Fr[Sn]||(this._coveredTiles[Sn]=!0)}}update(z,ht){if(!this._sourceLoaded||this._paused)return;let Et;this.transform=z,this.terrain=ht,this.updateCacheSize(z),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Et=z.getVisibleUnwrappedCoordinates(this._source.tileID).map(Dr=>new e.S(Dr.canonical.z,Dr.wrap,Dr.canonical.z,Dr.canonical.x,Dr.canonical.y)):(Et=z.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:ht}),this._source.hasTile&&(Et=Et.filter(Dr=>this._source.hasTile(Dr)))):Et=[];let zt=z.coveringZoomLevel(this._source),Ht=Math.max(zt-Ge.maxOverzooming,this._source.minzoom),ke=Math.max(zt+Ge.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Dr={};for(let Fr of Et)if(Fr.canonical.z>this._source.minzoom){let un=Fr.scaledTo(Fr.canonical.z-1);Dr[un.key]=un;let Sn=Fr.scaledTo(Math.max(this._source.minzoom,Math.min(Fr.canonical.z,5)));Dr[Sn.key]=Sn}Et=Et.concat(Object.values(Dr))}let Fe=Et.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Fe&&this.fire(new e.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ke=this._updateRetainedTiles(Et,zt);ur(this._source.type)&&this._updateCoveredAndRetainedTiles(Ke,Ht,ke,zt,Et,ht);for(let Dr in Ke)this._tiles[Dr].clearFadeHold();let vr=e.ab(this._tiles,Ke);for(let Dr of vr){let Fr=this._tiles[Dr];Fr.hasSymbolBuckets&&!Fr.holdingForFade()?Fr.setHoldDuration(this.map._fadeDuration):Fr.hasSymbolBuckets&&!Fr.symbolFadeFinished()||this._removeTile(Dr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let z in this._tiles)this._tiles[z].holdingForFade()&&this._removeTile(z)}_updateRetainedTiles(z,ht){var Et;let zt={},Ht={},ke=Math.max(ht-Ge.maxOverzooming,this._source.minzoom),Fe=Math.max(ht+Ge.maxUnderzooming,this._source.minzoom),Ke={};for(let vr of z){let Dr=this._addTile(vr);zt[vr.key]=vr,Dr.hasData()||htthis._source.maxzoom){let un=vr.children(this._source.maxzoom)[0],Sn=this.getTile(un);if(Sn&&Sn.hasData()){zt[un.key]=un;continue}}else{let un=vr.children(this._source.maxzoom);if(zt[un[0].key]&&zt[un[1].key]&&zt[un[2].key]&&zt[un[3].key])continue}let Fr=Dr.wasRequested();for(let un=vr.overscaledZ-1;un>=ke;--un){let Sn=vr.scaledTo(un);if(Ht[Sn.key])break;if(Ht[Sn.key]=!0,Dr=this.getTile(Sn),!Dr&&Fr&&(Dr=this._addTile(Sn)),Dr){let Xt=Dr.hasData();if((Xt||!(!((Et=this.map)===null||Et===void 0)&&Et.cancelPendingTileRequestsWhileZooming)||Fr)&&(zt[Sn.key]=Sn),Fr=Dr.wasRequested(),Xt)break}}}return zt}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let z in this._tiles){let ht=[],Et,zt=this._tiles[z].tileID;for(;zt.overscaledZ>0;){if(zt.key in this._loadedParentTiles){Et=this._loadedParentTiles[zt.key];break}ht.push(zt.key);let Ht=zt.scaledTo(zt.overscaledZ-1);if(Et=this._getLoadedTile(Ht),Et)break;zt=Ht}for(let Ht of ht)this._loadedParentTiles[Ht]=Et}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let z in this._tiles){let ht=this._tiles[z].tileID,Et=this._getLoadedTile(ht);this._loadedSiblingTiles[ht.key]=Et}}_addTile(z){let ht=this._tiles[z.key];if(ht)return ht;ht=this._cache.getAndRemove(z),ht&&(this._setTileReloadTimer(z.key,ht),ht.tileID=z,this._state.initializeTileState(ht,this.map?this.map.painter:null),this._cacheTimers[z.key]&&(clearTimeout(this._cacheTimers[z.key]),delete this._cacheTimers[z.key],this._setTileReloadTimer(z.key,ht)));let Et=ht;return ht||(ht=new oe(z,this._source.tileSize*z.overscaleFactor()),this._loadTile(ht,z.key,ht.state)),ht.uses++,this._tiles[z.key]=ht,Et||this._source.fire(new e.k("dataloading",{tile:ht,coord:ht.tileID,dataType:"source"})),ht}_setTileReloadTimer(z,ht){z in this._timers&&(clearTimeout(this._timers[z]),delete this._timers[z]);let Et=ht.getExpiryTimeout();Et&&(this._timers[z]=setTimeout(()=>{this._reloadTile(z,"expired"),delete this._timers[z]},Et))}_removeTile(z){let ht=this._tiles[z];ht&&(ht.uses--,delete this._tiles[z],this._timers[z]&&(clearTimeout(this._timers[z]),delete this._timers[z]),ht.uses>0||(ht.hasData()&&ht.state!=="reloading"?this._cache.add(ht.tileID,ht,ht.getExpiryTimeout()):(ht.aborted=!0,this._abortTile(ht),this._unloadTile(ht))))}_dataHandler(z){let ht=z.sourceDataType;z.dataType==="source"&&ht==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&z.dataType==="source"&&ht==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let z in this._tiles)this._removeTile(z);this._cache.reset()}tilesIn(z,ht,Et){let zt=[],Ht=this.transform;if(!Ht)return zt;let ke=Et?Ht.getCameraQueryGeometry(z):z,Fe=z.map(Xt=>Ht.pointCoordinate(Xt,this.terrain)),Ke=ke.map(Xt=>Ht.pointCoordinate(Xt,this.terrain)),vr=this.getIds(),Dr=1/0,Fr=1/0,un=-1/0,Sn=-1/0;for(let Xt of Ke)Dr=Math.min(Dr,Xt.x),Fr=Math.min(Fr,Xt.y),un=Math.max(un,Xt.x),Sn=Math.max(Sn,Xt.y);for(let Xt=0;Xt=0&&Oe[1].y+je>=0){let $e=Fe.map(Or=>xe.getTilePoint(Or)),wr=Ke.map(Or=>xe.getTilePoint(Or));zt.push({tile:ae,tileID:xe,queryGeometry:$e,cameraQueryGeometry:wr,scale:Ae})}}return zt}getVisibleCoordinates(z){let ht=this.getRenderableIds(z).map(Et=>this._tiles[Et].tileID);for(let Et of ht)Et.posMatrix=this.transform.calculatePosMatrix(Et.toUnwrapped());return ht}hasTransition(){if(this._source.hasTransition())return!0;if(ur(this._source.type)){let z=o.now();for(let ht in this._tiles)if(this._tiles[ht].fadeEndTime>=z)return!0}return!1}setFeatureState(z,ht,Et){this._state.updateState(z=z||"_geojsonTileLayer",ht,Et)}removeFeatureState(z,ht,Et){this._state.removeFeatureState(z=z||"_geojsonTileLayer",ht,Et)}getFeatureState(z,ht){return this._state.getState(z=z||"_geojsonTileLayer",ht)}setDependencies(z,ht,Et){let zt=this._tiles[z];zt&&zt.setDependencies(ht,Et)}reloadTilesForDependencies(z,ht){for(let Et in this._tiles)this._tiles[Et].hasDependency(z,ht)&&this._reloadTile(Et,"reloading");this._cache.filter(Et=>!Et.hasDependency(z,ht))}}function cr($t,z){let ht=Math.abs(2*$t.wrap)-+($t.wrap<0),Et=Math.abs(2*z.wrap)-+(z.wrap<0);return $t.overscaledZ-z.overscaledZ||Et-ht||z.canonical.y-$t.canonical.y||z.canonical.x-$t.canonical.x}function ur($t){return $t==="raster"||$t==="image"||$t==="video"}Ge.maxOverzooming=10,Ge.maxUnderzooming=3;class jr{constructor(z,ht){this.reset(z,ht)}reset(z,ht){this.points=z||[],this._distances=[0];for(let Et=1;Et0?(zt-ke)/Fe:0;return this.points[Ht].mult(1-Ke).add(this.points[ht].mult(Ke))}}function Wr($t,z){let ht=!0;return $t==="always"||$t!=="never"&&z!=="never"||(ht=!1),ht}class br{constructor(z,ht,Et){let zt=this.boxCells=[],Ht=this.circleCells=[];this.xCellCount=Math.ceil(z/Et),this.yCellCount=Math.ceil(ht/Et);for(let ke=0;kethis.width||zt<0||ht>this.height)return[];let Ke=[];if(z<=0&&ht<=0&&this.width<=Et&&this.height<=zt){if(Ht)return[{key:null,x1:z,y1:ht,x2:Et,y2:zt}];for(let vr=0;vr0}hitTestCircle(z,ht,Et,zt,Ht){let ke=z-Et,Fe=z+Et,Ke=ht-Et,vr=ht+Et;if(Fe<0||ke>this.width||vr<0||Ke>this.height)return!1;let Dr=[];return this._forEachCell(ke,Ke,Fe,vr,this._queryCellCircle,Dr,{hitTest:!0,overlapMode:zt,circle:{x:z,y:ht,radius:Et},seenUids:{box:{},circle:{}}},Ht),Dr.length>0}_queryCell(z,ht,Et,zt,Ht,ke,Fe,Ke){let{seenUids:vr,hitTest:Dr,overlapMode:Fr}=Fe,un=this.boxCells[Ht];if(un!==null){let Xt=this.bboxes;for(let ae of un)if(!vr.box[ae]){vr.box[ae]=!0;let xe=4*ae,Ae=this.boxKeys[ae];if(z<=Xt[xe+2]&&ht<=Xt[xe+3]&&Et>=Xt[xe+0]&&zt>=Xt[xe+1]&&(!Ke||Ke(Ae))&&(!Dr||!Wr(Fr,Ae.overlapMode))&&(ke.push({key:Ae,x1:Xt[xe],y1:Xt[xe+1],x2:Xt[xe+2],y2:Xt[xe+3]}),Dr))return!0}}let Sn=this.circleCells[Ht];if(Sn!==null){let Xt=this.circles;for(let ae of Sn)if(!vr.circle[ae]){vr.circle[ae]=!0;let xe=3*ae,Ae=this.circleKeys[ae];if(this._circleAndRectCollide(Xt[xe],Xt[xe+1],Xt[xe+2],z,ht,Et,zt)&&(!Ke||Ke(Ae))&&(!Dr||!Wr(Fr,Ae.overlapMode))){let je=Xt[xe],Oe=Xt[xe+1],$e=Xt[xe+2];if(ke.push({key:Ae,x1:je-$e,y1:Oe-$e,x2:je+$e,y2:Oe+$e}),Dr)return!0}}}return!1}_queryCellCircle(z,ht,Et,zt,Ht,ke,Fe,Ke){let{circle:vr,seenUids:Dr,overlapMode:Fr}=Fe,un=this.boxCells[Ht];if(un!==null){let Xt=this.bboxes;for(let ae of un)if(!Dr.box[ae]){Dr.box[ae]=!0;let xe=4*ae,Ae=this.boxKeys[ae];if(this._circleAndRectCollide(vr.x,vr.y,vr.radius,Xt[xe+0],Xt[xe+1],Xt[xe+2],Xt[xe+3])&&(!Ke||Ke(Ae))&&!Wr(Fr,Ae.overlapMode))return ke.push(!0),!0}}let Sn=this.circleCells[Ht];if(Sn!==null){let Xt=this.circles;for(let ae of Sn)if(!Dr.circle[ae]){Dr.circle[ae]=!0;let xe=3*ae,Ae=this.circleKeys[ae];if(this._circlesCollide(Xt[xe],Xt[xe+1],Xt[xe+2],vr.x,vr.y,vr.radius)&&(!Ke||Ke(Ae))&&!Wr(Fr,Ae.overlapMode))return ke.push(!0),!0}}}_forEachCell(z,ht,Et,zt,Ht,ke,Fe,Ke){let vr=this._convertToXCellCoord(z),Dr=this._convertToYCellCoord(ht),Fr=this._convertToXCellCoord(Et),un=this._convertToYCellCoord(zt);for(let Sn=vr;Sn<=Fr;Sn++)for(let Xt=Dr;Xt<=un;Xt++)if(Ht.call(this,z,ht,Et,zt,this.xCellCount*Xt+Sn,ke,Fe,Ke))return}_convertToXCellCoord(z){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(z*this.xScale)))}_convertToYCellCoord(z){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(z*this.yScale)))}_circlesCollide(z,ht,Et,zt,Ht,ke){let Fe=zt-z,Ke=Ht-ht,vr=Et+ke;return vr*vr>Fe*Fe+Ke*Ke}_circleAndRectCollide(z,ht,Et,zt,Ht,ke,Fe){let Ke=(ke-zt)/2,vr=Math.abs(z-(zt+Ke));if(vr>Ke+Et)return!1;let Dr=(Fe-Ht)/2,Fr=Math.abs(ht-(Ht+Dr));if(Fr>Dr+Et)return!1;if(vr<=Ke||Fr<=Dr)return!0;let un=vr-Ke,Sn=Fr-Dr;return un*un+Sn*Sn<=Et*Et}}function Xr($t,z,ht,Et,zt){let Ht=e.H();return z?(e.K(Ht,Ht,[1/zt,1/zt,1]),ht||e.ad(Ht,Ht,Et.angle)):e.L(Ht,Et.labelPlaneMatrix,$t),Ht}function nn($t,z,ht,Et,zt){if(z){let Ht=e.ae($t);return e.K(Ht,Ht,[zt,zt,1]),ht||e.ad(Ht,Ht,-Et.angle),Ht}return Et.glCoordMatrix}function Le($t,z,ht,Et){let zt;Et?(zt=[$t,z,Et($t,z),1],e.af(zt,zt,ht)):(zt=[$t,z,0,1],mr(zt,zt,ht));let Ht=zt[3];return{point:new e.P(zt[0]/Ht,zt[1]/Ht),signedDistanceFromCamera:Ht,isOccluded:!1}}function Gt($t,z){return .5+$t/z*.5}function ne($t,z){return $t.x>=-z[0]&&$t.x<=z[0]&&$t.y>=-z[1]&&$t.y<=z[1]}function Ct($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn,Xt){let ae=Et?$t.textSizeData:$t.iconSizeData,xe=e.ag(ae,ht.transform.zoom),Ae=[256/ht.width*2+1,256/ht.height*2+1],je=Et?$t.text.dynamicLayoutVertexArray:$t.icon.dynamicLayoutVertexArray;je.clear();let Oe=$t.lineVertexArray,$e=Et?$t.text.placedSymbolArray:$t.icon.placedSymbolArray,wr=ht.transform.width/ht.transform.height,Or=!1;for(let Nr=0;Nr<$e.length;Nr++){let en=$e.get(Nr);if(en.hidden||en.writingMode===e.ah.vertical&&!Or){Ar(en.numGlyphs,je);continue}Or=!1;let vn=Le(en.anchorX,en.anchorY,z,Xt);if(!ne(vn.point,Ae)){Ar(en.numGlyphs,je);continue}let In=Gt(ht.transform.cameraToCenterDistance,vn.signedDistanceFromCamera),Nn=e.ai(ae,xe,en),ii=ke?Nn/In:Nn*In,Ui={getElevation:Xt,labelPlaneMatrix:zt,lineVertexArray:Oe,pitchWithMap:ke,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:vr,tileAnchorPoint:new e.P(en.anchorX,en.anchorY),unwrappedTileID:Dr,width:Fr,height:un,translation:Sn},pa=Nt(Ui,en,ii,!1,Fe,z,Ht,$t.glyphOffsetArray,je,wr,Ke);Or=pa.useVertical,(pa.notEnoughRoom||Or||pa.needsFlipping&&Nt(Ui,en,ii,!0,Fe,z,Ht,$t.glyphOffsetArray,je,wr,Ke).notEnoughRoom)&&Ar(en.numGlyphs,je)}Et?$t.text.dynamicLayoutVertexBuffer.updateData(je):$t.icon.dynamicLayoutVertexBuffer.updateData(je)}function gt($t,z,ht,Et,zt,Ht,ke,Fe){let Ke=Ht.glyphStartIndex+Ht.numGlyphs,vr=Ht.lineStartIndex,Dr=Ht.lineStartIndex+Ht.lineLength,Fr=z.getoffsetX(Ht.glyphStartIndex),un=z.getoffsetX(Ke-1),Sn=or($t*Fr,ht,Et,zt,Ht.segment,vr,Dr,Fe,ke);if(!Sn)return null;let Xt=or($t*un,ht,Et,zt,Ht.segment,vr,Dr,Fe,ke);return Xt?Fe.projectionCache.anyProjectionOccluded?null:{first:Sn,last:Xt}:null}function St($t,z,ht,Et){return $t===e.ah.horizontal&&Math.abs(ht.y-z.y)>Math.abs(ht.x-z.x)*Et?{useVertical:!0}:($t===e.ah.vertical?z.yht.x)?{needsFlipping:!0}:null}function Nt($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr){let Fr=ht/24,un=z.lineOffsetX*Fr,Sn=z.lineOffsetY*Fr,Xt;if(z.numGlyphs>1){let ae=z.glyphStartIndex+z.numGlyphs,xe=z.lineStartIndex,Ae=z.lineStartIndex+z.lineLength,je=gt(Fr,Fe,un,Sn,Et,z,Dr,$t);if(!je)return{notEnoughRoom:!0};let Oe=Le(je.first.point.x,je.first.point.y,ke,$t.getElevation).point,$e=Le(je.last.point.x,je.last.point.y,ke,$t.getElevation).point;if(zt&&!Et){let wr=St(z.writingMode,Oe,$e,vr);if(wr)return wr}Xt=[je.first];for(let wr=z.glyphStartIndex+1;wr0?Oe.point:function(Or,Nr,en,vn,In,Nn){return re(Or,Nr,en,1,In,Nn)}($t.tileAnchorPoint,je,xe,0,Ht,$t),wr=St(z.writingMode,xe,$e,vr);if(wr)return wr}let ae=or(Fr*Fe.getoffsetX(z.glyphStartIndex),un,Sn,Et,z.segment,z.lineStartIndex,z.lineStartIndex+z.lineLength,$t,Dr);if(!ae||$t.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Xt=[ae]}for(let ae of Xt)e.aj(Ke,ae.point,ae.angle);return{}}function re($t,z,ht,Et,zt,Ht){let ke=$t.add($t.sub(z)._unit()),Fe=zt!==void 0?Le(ke.x,ke.y,zt,Ht.getElevation).point:we(ke.x,ke.y,Ht).point,Ke=ht.sub(Fe);return ht.add(Ke._mult(Et/Ke.mag()))}function le($t,z,ht){let Et=z.projectionCache;if(Et.projections[$t])return Et.projections[$t];let zt=new e.P(z.lineVertexArray.getx($t),z.lineVertexArray.gety($t)),Ht=we(zt.x,zt.y,z);if(Ht.signedDistanceFromCamera>0)return Et.projections[$t]=Ht.point,Et.anyProjectionOccluded=Et.anyProjectionOccluded||Ht.isOccluded,Ht.point;let ke=$t-ht.direction;return function(Fe,Ke,vr,Dr,Fr){return re(Fe,Ke,vr,Dr,void 0,Fr)}(ht.distanceFromAnchor===0?z.tileAnchorPoint:new e.P(z.lineVertexArray.getx(ke),z.lineVertexArray.gety(ke)),zt,ht.previousVertex,ht.absOffsetX-ht.distanceFromAnchor+1,z)}function we($t,z,ht){let Et=$t+ht.translation[0],zt=z+ht.translation[1],Ht;return!ht.pitchWithMap&&ht.projection.useSpecialProjectionForSymbols?(Ht=ht.projection.projectTileCoordinates(Et,zt,ht.unwrappedTileID,ht.getElevation),Ht.point.x=(.5*Ht.point.x+.5)*ht.width,Ht.point.y=(.5*-Ht.point.y+.5)*ht.height):(Ht=Le(Et,zt,ht.labelPlaneMatrix,ht.getElevation),Ht.isOccluded=!1),Ht}function Ue($t,z,ht){return $t._unit()._perp()._mult(z*ht)}function qe($t,z,ht,Et,zt,Ht,ke,Fe,Ke){if(Fe.projectionCache.offsets[$t])return Fe.projectionCache.offsets[$t];let vr=ht.add(z);if($t+Ke.direction=zt)return Fe.projectionCache.offsets[$t]=vr,vr;let Dr=le($t+Ke.direction,Fe,Ke),Fr=Ue(Dr.sub(ht),ke,Ke.direction),un=ht.add(Fr),Sn=Dr.add(Fr);return Fe.projectionCache.offsets[$t]=e.ak(Ht,vr,un,Sn)||vr,Fe.projectionCache.offsets[$t]}function or($t,z,ht,Et,zt,Ht,ke,Fe,Ke){let vr=Et?$t-z:$t+z,Dr=vr>0?1:-1,Fr=0;Et&&(Dr*=-1,Fr=Math.PI),Dr<0&&(Fr+=Math.PI);let un,Sn=Dr>0?Ht+zt:Ht+zt+1;Fe.projectionCache.cachedAnchorPoint?un=Fe.projectionCache.cachedAnchorPoint:(un=we(Fe.tileAnchorPoint.x,Fe.tileAnchorPoint.y,Fe).point,Fe.projectionCache.cachedAnchorPoint=un);let Xt,ae,xe=un,Ae=un,je=0,Oe=0,$e=Math.abs(vr),wr=[],Or;for(;je+Oe<=$e;){if(Sn+=Dr,Sn=ke)return null;je+=Oe,Ae=xe,ae=Xt;let vn={absOffsetX:$e,direction:Dr,distanceFromAnchor:je,previousVertex:Ae};if(xe=le(Sn,Fe,vn),ht===0)wr.push(Ae),Or=xe.sub(Ae);else{let In,Nn=xe.sub(Ae);In=Nn.mag()===0?Ue(le(Sn+Dr,Fe,vn).sub(xe),ht,Dr):Ue(Nn,ht,Dr),ae||(ae=Ae.add(In)),Xt=qe(Sn,In,xe,Ht,ke,ae,ht,Fe,vn),wr.push(ae),Or=Xt.sub(ae)}Oe=Or.mag()}let Nr=Or._mult(($e-je)/Oe)._add(ae||Ae),en=Fr+Math.atan2(xe.y-Ae.y,xe.x-Ae.x);return wr.push(Nr),{point:Nr,angle:Ke?en:0,path:wr}}let Sr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ar($t,z){for(let ht=0;ht<$t;ht++){let Et=z.length;z.resize(Et+4),z.float32.set(Sr,3*Et)}}function mr($t,z,ht){let Et=z[0],zt=z[1];return $t[0]=ht[0]*Et+ht[4]*zt+ht[12],$t[1]=ht[1]*Et+ht[5]*zt+ht[13],$t[3]=ht[3]*Et+ht[7]*zt+ht[15],$t}let Qr=100;class Hn{constructor(z,ht,Et=new br(z.width+200,z.height+200,25),zt=new br(z.width+200,z.height+200,25)){this.transform=z,this.mapProjection=ht,this.grid=Et,this.ignoredGrid=zt,this.pitchFactor=Math.cos(z._pitch)*z.cameraToCenterDistance,this.screenRightBoundary=z.width+Qr,this.screenBottomBoundary=z.height+Qr,this.gridRightBoundary=z.width+200,this.gridBottomBoundary=z.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr){let un=z.anchorPointX+Ke[0],Sn=z.anchorPointY+Ke[1],Xt=this.projectAndGetPerspectiveRatio(zt,un,Sn,Ht,Dr),ae=Et*Xt.perspectiveRatio,xe;if(ke||Fe)xe=this._projectCollisionBox(z,ae,zt,Ht,ke,Fe,Ke,Xt,Dr,Fr);else{let wr=Xt.point.x+(Fr?Fr.x*ae:0),Or=Xt.point.y+(Fr?Fr.y*ae:0);xe={allPointsOccluded:!1,box:[wr+z.x1*ae,Or+z.y1*ae,wr+z.x2*ae,Or+z.y2*ae]}}let[Ae,je,Oe,$e]=xe.box;return this.mapProjection.useSpecialProjectionForSymbols&&(ke?xe.allPointsOccluded:this.mapProjection.isOccluded(un,Sn,Ht))||Xt.perspectiveRatio=1;So--)Ta.push(pa.path[So]);for(let So=1;Sods.signedDistanceFromCamera<=0)?[]:So.map(ds=>ds.point)}let Bo=[];if(Ta.length>0){let So=Ta[0].clone(),ds=Ta[0].clone();for(let fl=1;fl=Nn.x&&ds.x<=ii.x&&So.y>=Nn.y&&ds.y<=ii.y?[Ta]:ds.xii.x||ds.yii.y?[]:e.al([Ta],Nn.x,Nn.y,ii.x,ii.y)}for(let So of Bo){Ui.reset(So,.25*In);let ds=0;ds=Ui.length<=.5*In?1:Math.ceil(Ui.paddedLength/so)+1;for(let fl=0;flLe(zt.x,zt.y,Et,ht.getElevation))}queryRenderedSymbols(z){if(z.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ht=[],Et=1/0,zt=1/0,Ht=-1/0,ke=-1/0;for(let Dr of z){let Fr=new e.P(Dr.x+Qr,Dr.y+Qr);Et=Math.min(Et,Fr.x),zt=Math.min(zt,Fr.y),Ht=Math.max(Ht,Fr.x),ke=Math.max(ke,Fr.y),ht.push(Fr)}let Fe=this.grid.query(Et,zt,Ht,ke).concat(this.ignoredGrid.query(Et,zt,Ht,ke)),Ke={},vr={};for(let Dr of Fe){let Fr=Dr.key;if(Ke[Fr.bucketInstanceId]===void 0&&(Ke[Fr.bucketInstanceId]={}),Ke[Fr.bucketInstanceId][Fr.featureIndex])continue;let un=[new e.P(Dr.x1,Dr.y1),new e.P(Dr.x2,Dr.y1),new e.P(Dr.x2,Dr.y2),new e.P(Dr.x1,Dr.y2)];e.am(ht,un)&&(Ke[Fr.bucketInstanceId][Fr.featureIndex]=!0,vr[Fr.bucketInstanceId]===void 0&&(vr[Fr.bucketInstanceId]=[]),vr[Fr.bucketInstanceId].push(Fr.featureIndex))}return vr}insertCollisionBox(z,ht,Et,zt,Ht,ke){(Et?this.ignoredGrid:this.grid).insert({bucketInstanceId:zt,featureIndex:Ht,collisionGroupID:ke,overlapMode:ht},z[0],z[1],z[2],z[3])}insertCollisionCircles(z,ht,Et,zt,Ht,ke){let Fe=Et?this.ignoredGrid:this.grid,Ke={bucketInstanceId:zt,featureIndex:Ht,collisionGroupID:ke,overlapMode:ht};for(let vr=0;vr=this.screenRightBoundary||ztthis.screenBottomBoundary}isInsideGrid(z,ht,Et,zt){return Et>=0&&z=0&&htthis.projectAndGetPerspectiveRatio(Et,In.x,In.y,zt,vr));en=vn.some(In=>!In.isOccluded),Nr=vn.map(In=>In.point)}else en=!0;return{box:e.ao(Nr),allPointsOccluded:!en}}}function Wn($t,z,ht){return z*(e.X/($t.tileSize*Math.pow(2,ht-$t.tileID.overscaledZ)))}class Xn{constructor(z,ht,Et,zt){this.opacity=z?Math.max(0,Math.min(1,z.opacity+(z.placed?ht:-ht))):zt&&Et?1:0,this.placed=Et}isHidden(){return this.opacity===0&&!this.placed}}class Ii{constructor(z,ht,Et,zt,Ht){this.text=new Xn(z?z.text:null,ht,Et,Ht),this.icon=new Xn(z?z.icon:null,ht,zt,Ht)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class oi{constructor(z,ht,Et){this.text=z,this.icon=ht,this.skipFade=Et}}class $n{constructor(){this.invProjMatrix=e.H(),this.viewportMatrix=e.H(),this.circles=[]}}class sa{constructor(z,ht,Et,zt,Ht){this.bucketInstanceId=z,this.featureIndex=ht,this.sourceLayerIndex=Et,this.bucketIndex=zt,this.tileID=Ht}}class Zi{constructor(z){this.crossSourceCollisions=z,this.maxGroupID=0,this.collisionGroups={}}get(z){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[z]){let ht=++this.maxGroupID;this.collisionGroups[z]={ID:ht,predicate:Et=>Et.collisionGroupID===ht}}return this.collisionGroups[z]}}function We($t,z,ht,Et,zt){let{horizontalAlign:Ht,verticalAlign:ke}=e.au($t);return new e.P(-(Ht-.5)*z+Et[0]*zt,-(ke-.5)*ht+Et[1]*zt)}class nr{constructor(z,ht,Et,zt,Ht,ke){this.transform=z.clone(),this.terrain=Et,this.collisionIndex=new Hn(this.transform,ht),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=zt,this.retainedQueryData={},this.collisionGroups=new Zi(Ht),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ke,ke&&(ke.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(z){let ht=this.terrain;return ht?(Et,zt)=>ht.getElevation(z,Et,zt):null}getBucketParts(z,ht,Et,zt){let Ht=Et.getBucket(ht),ke=Et.latestFeatureIndex;if(!Ht||!ke||ht.id!==Ht.layerIds[0])return;let Fe=Et.collisionBoxArray,Ke=Ht.layers[0].layout,vr=Ht.layers[0].paint,Dr=Math.pow(2,this.transform.zoom-Et.tileID.overscaledZ),Fr=Et.tileSize/e.X,un=Et.tileID.toUnwrapped(),Sn=this.transform.calculatePosMatrix(un),Xt=Ke.get("text-pitch-alignment")==="map",ae=Ke.get("text-rotation-alignment")==="map",xe=Wn(Et,1,this.transform.zoom),Ae=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,vr.get("text-translate"),vr.get("text-translate-anchor")),je=this.collisionIndex.mapProjection.translatePosition(this.transform,Et,vr.get("icon-translate"),vr.get("icon-translate-anchor")),Oe=Xr(Sn,Xt,ae,this.transform,xe),$e=null;if(Xt){let Or=nn(Sn,Xt,ae,this.transform,xe);$e=e.L([],this.transform.labelPlaneMatrix,Or)}this.retainedQueryData[Ht.bucketInstanceId]=new sa(Ht.bucketInstanceId,ke,Ht.sourceLayerIndex,Ht.index,Et.tileID);let wr={bucket:Ht,layout:Ke,translationText:Ae,translationIcon:je,posMatrix:Sn,unwrappedTileID:un,textLabelPlaneMatrix:Oe,labelToScreenMatrix:$e,scale:Dr,textPixelRatio:Fr,holdingForFade:Et.holdingForFade(),collisionBoxArray:Fe,partiallyEvaluatedTextSize:e.ag(Ht.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Ht.sourceID)};if(zt)for(let Or of Ht.sortKeyRanges){let{sortKey:Nr,symbolInstanceStart:en,symbolInstanceEnd:vn}=Or;z.push({sortKey:Nr,symbolInstanceStart:en,symbolInstanceEnd:vn,parameters:wr})}else z.push({symbolInstanceStart:0,symbolInstanceEnd:Ht.symbolInstances.length,parameters:wr})}attemptAnchorPlacement(z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn,Xt,ae,xe,Ae,je,Oe){let $e=e.aq[z.textAnchor],wr=[z.textOffset0,z.textOffset1],Or=We($e,Et,zt,wr,Ht),Nr=this.collisionIndex.placeCollisionBox(ht,un,Ke,vr,Dr,Fe,ke,xe,Fr.predicate,Oe,Or);if((!je||this.collisionIndex.placeCollisionBox(je,un,Ke,vr,Dr,Fe,ke,Ae,Fr.predicate,Oe,Or).placeable)&&Nr.placeable){let en;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Sn.crossTileID]&&this.prevPlacement.placements[Sn.crossTileID]&&this.prevPlacement.placements[Sn.crossTileID].text&&(en=this.prevPlacement.variableOffsets[Sn.crossTileID].anchor),Sn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Sn.crossTileID]={textOffset:wr,width:Et,height:zt,anchor:$e,textBoxScale:Ht,prevAnchor:en},this.markUsedJustification(Xt,$e,Sn,ae),Xt.allowVerticalPlacement&&(this.markUsedOrientation(Xt,ae,Sn),this.placedOrientations[Sn.crossTileID]=ae),{shift:Or,placedGlyphBoxes:Nr}}}placeLayerBucketPart(z,ht,Et){let{bucket:zt,layout:Ht,translationText:ke,translationIcon:Fe,posMatrix:Ke,unwrappedTileID:vr,textLabelPlaneMatrix:Dr,labelToScreenMatrix:Fr,textPixelRatio:un,holdingForFade:Sn,collisionBoxArray:Xt,partiallyEvaluatedTextSize:ae,collisionGroup:xe}=z.parameters,Ae=Ht.get("text-optional"),je=Ht.get("icon-optional"),Oe=e.ar(Ht,"text-overlap","text-allow-overlap"),$e=Oe==="always",wr=e.ar(Ht,"icon-overlap","icon-allow-overlap"),Or=wr==="always",Nr=Ht.get("text-rotation-alignment")==="map",en=Ht.get("text-pitch-alignment")==="map",vn=Ht.get("icon-text-fit")!=="none",In=Ht.get("symbol-z-order")==="viewport-y",Nn=$e&&(Or||!zt.hasIconData()||je),ii=Or&&($e||!zt.hasTextData()||Ae);!zt.collisionArrays&&Xt&&zt.deserializeCollisionBoxes(Xt);let Ui=this._getTerrainElevationFunc(this.retainedQueryData[zt.bucketInstanceId].tileID),pa=(fa,Ta,so)=>{var Bo,So;if(ht[fa.crossTileID])return;if(Sn)return void(this.placements[fa.crossTileID]=new oi(!1,!1,!1));let ds=!1,fl=!1,vl=!0,Ds=null,wl={box:null,placeable:!1,offscreen:null},Eu={placeable:!1},gu=null,$s=null,Zs=null,Yu=0,dc=0,$c=0;Ta.textFeatureIndex?Yu=Ta.textFeatureIndex:fa.useRuntimeCollisionCircles&&(Yu=fa.featureIndex),Ta.verticalTextFeatureIndex&&(dc=Ta.verticalTextFeatureIndex);let At=Ta.textBox;if(At){let Pe=Er=>{let rn=e.ah.horizontal;if(zt.allowVerticalPlacement&&!Er&&this.prevPlacement){let Jr=this.prevPlacement.placedOrientations[fa.crossTileID];Jr&&(this.placedOrientations[fa.crossTileID]=Jr,rn=Jr,this.markUsedOrientation(zt,rn,fa))}return rn},Ne=(Er,rn)=>{if(zt.allowVerticalPlacement&&fa.numVerticalGlyphVertices>0&&Ta.verticalTextBox){for(let Jr of zt.writingModes)if(Jr===e.ah.vertical?(wl=rn(),Eu=wl):wl=Er(),wl&&wl.placeable)break}else wl=Er()},sr=fa.textAnchorOffsetStartIndex,ar=fa.textAnchorOffsetEndIndex;if(ar===sr){let Er=(rn,Jr)=>{let xn=this.collisionIndex.placeCollisionBox(rn,Oe,un,Ke,vr,en,Nr,ke,xe.predicate,Ui);return xn&&xn.placeable&&(this.markUsedOrientation(zt,Jr,fa),this.placedOrientations[fa.crossTileID]=Jr),xn};Ne(()=>Er(At,e.ah.horizontal),()=>{let rn=Ta.verticalTextBox;return zt.allowVerticalPlacement&&fa.numVerticalGlyphVertices>0&&rn?Er(rn,e.ah.vertical):{box:null,offscreen:null}}),Pe(wl&&wl.placeable)}else{let Er=e.aq[(So=(Bo=this.prevPlacement)===null||Bo===void 0?void 0:Bo.variableOffsets[fa.crossTileID])===null||So===void 0?void 0:So.anchor],rn=(xn,zn,On)=>{let Hi=xn.x2-xn.x1,Vn=xn.y2-xn.y1,yi=fa.textBoxScale,Si=vn&&wr==="never"?zn:null,Ri=null,Gi=Oe==="never"?1:2,Kn="never";Er&&Gi++;for(let Ua=0;Uarn(At,Ta.iconBox,e.ah.horizontal),()=>{let xn=Ta.verticalTextBox;return zt.allowVerticalPlacement&&(!wl||!wl.placeable)&&fa.numVerticalGlyphVertices>0&&xn?rn(xn,Ta.verticalIconBox,e.ah.vertical):{box:null,occluded:!0,offscreen:null}}),wl&&(ds=wl.placeable,vl=wl.offscreen);let Jr=Pe(wl&&wl.placeable);if(!ds&&this.prevPlacement){let xn=this.prevPlacement.variableOffsets[fa.crossTileID];xn&&(this.variableOffsets[fa.crossTileID]=xn,this.markUsedJustification(zt,xn.anchor,fa,Jr))}}}if(gu=wl,ds=gu&&gu.placeable,vl=gu&&gu.offscreen,fa.useRuntimeCollisionCircles){let Pe=zt.text.placedSymbolArray.get(fa.centerJustifiedTextSymbolIndex),Ne=e.ai(zt.textSizeData,ae,Pe),sr=Ht.get("text-padding");$s=this.collisionIndex.placeCollisionCircles(Oe,Pe,zt.lineVertexArray,zt.glyphOffsetArray,Ne,Ke,vr,Dr,Fr,Et,en,xe.predicate,fa.collisionCircleDiameter,sr,ke,Ui),$s.circles.length&&$s.collisionDetected&&!Et&&e.w("Collisions detected, but collision boxes are not shown"),ds=$e||$s.circles.length>0&&!$s.collisionDetected,vl=vl&&$s.offscreen}if(Ta.iconFeatureIndex&&($c=Ta.iconFeatureIndex),Ta.iconBox){let Pe=Ne=>this.collisionIndex.placeCollisionBox(Ne,wr,un,Ke,vr,en,Nr,Fe,xe.predicate,Ui,vn&&Ds?Ds:void 0);Eu&&Eu.placeable&&Ta.verticalIconBox?(Zs=Pe(Ta.verticalIconBox),fl=Zs.placeable):(Zs=Pe(Ta.iconBox),fl=Zs.placeable),vl=vl&&Zs.offscreen}let Ut=Ae||fa.numHorizontalGlyphVertices===0&&fa.numVerticalGlyphVertices===0,ue=je||fa.numIconVertices===0;Ut||ue?ue?Ut||(fl=fl&&ds):ds=fl&&ds:fl=ds=fl&&ds;let Me=fl&&Zs.placeable;if(ds&&gu.placeable&&this.collisionIndex.insertCollisionBox(gu.box,Oe,Ht.get("text-ignore-placement"),zt.bucketInstanceId,Eu&&Eu.placeable&&dc?dc:Yu,xe.ID),Me&&this.collisionIndex.insertCollisionBox(Zs.box,wr,Ht.get("icon-ignore-placement"),zt.bucketInstanceId,$c,xe.ID),$s&&ds&&this.collisionIndex.insertCollisionCircles($s.circles,Oe,Ht.get("text-ignore-placement"),zt.bucketInstanceId,Yu,xe.ID),Et&&this.storeCollisionData(zt.bucketInstanceId,so,Ta,gu,Zs,$s),fa.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(zt.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[fa.crossTileID]=new oi(ds||Nn,fl||ii,vl||zt.justReloaded),ht[fa.crossTileID]=!0};if(In){if(z.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let fa=zt.getSortedSymbolIndexes(this.transform.angle);for(let Ta=fa.length-1;Ta>=0;--Ta){let so=fa[Ta];pa(zt.symbolInstances.get(so),zt.collisionArrays[so],so)}}else for(let fa=z.symbolInstanceStart;fa=0&&(z.text.placedSymbolArray.get(Fe).crossTileID=Ht>=0&&Fe!==Ht?0:Et.crossTileID)}markUsedOrientation(z,ht,Et){let zt=ht===e.ah.horizontal||ht===e.ah.horizontalOnly?ht:0,Ht=ht===e.ah.vertical?ht:0,ke=[Et.leftJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.rightJustifiedTextSymbolIndex];for(let Fe of ke)z.text.placedSymbolArray.get(Fe).placedOrientation=zt;Et.verticalPlacedTextSymbolIndex&&(z.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).placedOrientation=Ht)}commit(z){this.commitTime=z,this.zoomAtLastRecencyCheck=this.transform.zoom;let ht=this.prevPlacement,Et=!1;this.prevZoomAdjustment=ht?ht.zoomAdjustment(this.transform.zoom):0;let zt=ht?ht.symbolFadeChange(z):1,Ht=ht?ht.opacities:{},ke=ht?ht.variableOffsets:{},Fe=ht?ht.placedOrientations:{};for(let Ke in this.placements){let vr=this.placements[Ke],Dr=Ht[Ke];Dr?(this.opacities[Ke]=new Ii(Dr,zt,vr.text,vr.icon),Et=Et||vr.text!==Dr.text.placed||vr.icon!==Dr.icon.placed):(this.opacities[Ke]=new Ii(null,zt,vr.text,vr.icon,vr.skipFade),Et=Et||vr.text||vr.icon)}for(let Ke in Ht){let vr=Ht[Ke];if(!this.opacities[Ke]){let Dr=new Ii(vr,zt,!1,!1);Dr.isHidden()||(this.opacities[Ke]=Dr,Et=Et||vr.text.placed||vr.icon.placed)}}for(let Ke in ke)this.variableOffsets[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.variableOffsets[Ke]=ke[Ke]);for(let Ke in Fe)this.placedOrientations[Ke]||!this.opacities[Ke]||this.opacities[Ke].isHidden()||(this.placedOrientations[Ke]=Fe[Ke]);if(ht&&ht.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Et?this.lastPlacementChangeTime=z:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ht?ht.lastPlacementChangeTime:z)}updateLayerOpacities(z,ht){let Et={};for(let zt of ht){let Ht=zt.getBucket(z);Ht&&zt.latestFeatureIndex&&z.id===Ht.layerIds[0]&&this.updateBucketOpacities(Ht,zt.tileID,Et,zt.collisionBoxArray)}}updateBucketOpacities(z,ht,Et,zt){z.hasTextData()&&(z.text.opacityVertexArray.clear(),z.text.hasVisibleVertices=!1),z.hasIconData()&&(z.icon.opacityVertexArray.clear(),z.icon.hasVisibleVertices=!1),z.hasIconCollisionBoxData()&&z.iconCollisionBox.collisionVertexArray.clear(),z.hasTextCollisionBoxData()&&z.textCollisionBox.collisionVertexArray.clear();let Ht=z.layers[0],ke=Ht.layout,Fe=new Ii(null,0,!1,!1,!0),Ke=ke.get("text-allow-overlap"),vr=ke.get("icon-allow-overlap"),Dr=Ht._unevaluatedLayout.hasValue("text-variable-anchor")||Ht._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Fr=ke.get("text-rotation-alignment")==="map",un=ke.get("text-pitch-alignment")==="map",Sn=ke.get("icon-text-fit")!=="none",Xt=new Ii(null,0,Ke&&(vr||!z.hasIconData()||ke.get("icon-optional")),vr&&(Ke||!z.hasTextData()||ke.get("text-optional")),!0);!z.collisionArrays&&zt&&(z.hasIconCollisionBoxData()||z.hasTextCollisionBoxData())&&z.deserializeCollisionBoxes(zt);let ae=(Ae,je,Oe)=>{for(let $e=0;$e0,en=this.placedOrientations[je.crossTileID],vn=en===e.ah.vertical,In=en===e.ah.horizontal||en===e.ah.horizontalOnly;if(Oe>0||$e>0){let ii=Oi(Or.text);ae(z.text,Oe,vn?ji:ii),ae(z.text,$e,In?ji:ii);let Ui=Or.text.isHidden();[je.rightJustifiedTextSymbolIndex,je.centerJustifiedTextSymbolIndex,je.leftJustifiedTextSymbolIndex].forEach(Ta=>{Ta>=0&&(z.text.placedSymbolArray.get(Ta).hidden=Ui||vn?1:0)}),je.verticalPlacedTextSymbolIndex>=0&&(z.text.placedSymbolArray.get(je.verticalPlacedTextSymbolIndex).hidden=Ui||In?1:0);let pa=this.variableOffsets[je.crossTileID];pa&&this.markUsedJustification(z,pa.anchor,je,en);let fa=this.placedOrientations[je.crossTileID];fa&&(this.markUsedJustification(z,"left",je,fa),this.markUsedOrientation(z,fa,je))}if(Nr){let ii=Oi(Or.icon),Ui=!(Sn&&je.verticalPlacedIconSymbolIndex&&vn);je.placedIconSymbolIndex>=0&&(ae(z.icon,je.numIconVertices,Ui?ii:ji),z.icon.placedSymbolArray.get(je.placedIconSymbolIndex).hidden=Or.icon.isHidden()),je.verticalPlacedIconSymbolIndex>=0&&(ae(z.icon,je.numVerticalIconVertices,Ui?ji:ii),z.icon.placedSymbolArray.get(je.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Nn=xe&&xe.has(Ae)?xe.get(Ae):{text:null,icon:null};if(z.hasIconCollisionBoxData()||z.hasTextCollisionBoxData()){let ii=z.collisionArrays[Ae];if(ii){let Ui=new e.P(0,0);if(ii.textBox||ii.verticalTextBox){let pa=!0;if(Dr){let fa=this.variableOffsets[wr];fa?(Ui=We(fa.anchor,fa.width,fa.height,fa.textOffset,fa.textBoxScale),Fr&&Ui._rotate(un?this.transform.angle:-this.transform.angle)):pa=!1}if(ii.textBox||ii.verticalTextBox){let fa;ii.textBox&&(fa=vn),ii.verticalTextBox&&(fa=In),fr(z.textCollisionBox.collisionVertexArray,Or.text.placed,!pa||fa,Nn.text,Ui.x,Ui.y)}}if(ii.iconBox||ii.verticalIconBox){let pa=!!(!In&&ii.verticalIconBox),fa;ii.iconBox&&(fa=pa),ii.verticalIconBox&&(fa=!pa),fr(z.iconCollisionBox.collisionVertexArray,Or.icon.placed,fa,Nn.icon,Sn?Ui.x:0,Sn?Ui.y:0)}}}}if(z.sortFeatures(this.transform.angle),this.retainedQueryData[z.bucketInstanceId]&&(this.retainedQueryData[z.bucketInstanceId].featureSortOrder=z.featureSortOrder),z.hasTextData()&&z.text.opacityVertexBuffer&&z.text.opacityVertexBuffer.updateData(z.text.opacityVertexArray),z.hasIconData()&&z.icon.opacityVertexBuffer&&z.icon.opacityVertexBuffer.updateData(z.icon.opacityVertexArray),z.hasIconCollisionBoxData()&&z.iconCollisionBox.collisionVertexBuffer&&z.iconCollisionBox.collisionVertexBuffer.updateData(z.iconCollisionBox.collisionVertexArray),z.hasTextCollisionBoxData()&&z.textCollisionBox.collisionVertexBuffer&&z.textCollisionBox.collisionVertexBuffer.updateData(z.textCollisionBox.collisionVertexArray),z.text.opacityVertexArray.length!==z.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${z.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${z.text.layoutVertexArray.length}) / 4`);if(z.icon.opacityVertexArray.length!==z.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${z.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${z.icon.layoutVertexArray.length}) / 4`);if(z.bucketInstanceId in this.collisionCircleArrays){let Ae=this.collisionCircleArrays[z.bucketInstanceId];z.placementInvProjMatrix=Ae.invProjMatrix,z.placementViewportMatrix=Ae.viewportMatrix,z.collisionCircleArray=Ae.circles,delete this.collisionCircleArrays[z.bucketInstanceId]}}symbolFadeChange(z){return this.fadeDuration===0?1:(z-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(z){return Math.max(0,(this.transform.zoom-z)/1.5)}hasTransitions(z){return this.stale||z-this.lastPlacementChangeTimez}setStale(){this.stale=!0}}function fr($t,z,ht,Et,zt,Ht){Et&&Et.length!==0||(Et=[0,0,0,0]);let ke=Et[0]-Qr,Fe=Et[1]-Qr,Ke=Et[2]-Qr,vr=Et[3]-Qr;$t.emplaceBack(z?1:0,ht?1:0,zt||0,Ht||0,ke,Fe),$t.emplaceBack(z?1:0,ht?1:0,zt||0,Ht||0,Ke,Fe),$t.emplaceBack(z?1:0,ht?1:0,zt||0,Ht||0,Ke,vr),$t.emplaceBack(z?1:0,ht?1:0,zt||0,Ht||0,ke,vr)}let _r=Math.pow(2,25),tn=Math.pow(2,24),Cn=Math.pow(2,17),Tn=Math.pow(2,16),Mn=Math.pow(2,9),fi=Math.pow(2,8),ki=Math.pow(2,1);function Oi($t){if($t.opacity===0&&!$t.placed)return 0;if($t.opacity===1&&$t.placed)return 4294967295;let z=$t.placed?1:0,ht=Math.floor(127*$t.opacity);return ht*_r+z*tn+ht*Cn+z*Tn+ht*Mn+z*fi+ht*ki+z}let ji=0;function Xi(){return{isOccluded:($t,z,ht)=>!1,getPitchedTextCorrection:($t,z,ht)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates($t,z,ht,Et){throw new Error("Not implemented.")},translatePosition:($t,z,ht,Et)=>function(zt,Ht,ke,Fe,Ke=!1){if(!ke[0]&&!ke[1])return[0,0];let vr=Ke?Fe==="map"?zt.angle:0:Fe==="viewport"?-zt.angle:0;if(vr){let Dr=Math.sin(vr),Fr=Math.cos(vr);ke=[ke[0]*Fr-ke[1]*Dr,ke[0]*Dr+ke[1]*Fr]}return[Ke?ke[0]:Wn(Ht,ke[0],zt.zoom),Ke?ke[1]:Wn(Ht,ke[1],zt.zoom)]}($t,z,ht,Et),getCircleRadiusCorrection:$t=>1}}class ci{constructor(z){this._sortAcrossTiles=z.layout.get("symbol-z-order")!=="viewport-y"&&!z.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(z,ht,Et,zt,Ht){let ke=this._bucketParts;for(;this._currentTileIndexFe.sortKey-Ke.sortKey));this._currentPartIndex!this._forceFullPlacement&&o.now()-zt>2;for(;this._currentPlacementIndex>=0;){let ke=ht[z[this._currentPlacementIndex]],Fe=this.placement.collisionIndex.transform.zoom;if(ke.type==="symbol"&&(!ke.minzoom||ke.minzoom<=Fe)&&(!ke.maxzoom||ke.maxzoom>Fe)){if(this._inProgressLayer||(this._inProgressLayer=new ci(ke)),this._inProgressLayer.continuePlacement(Et[ke.source],this.placement,this._showCollisionBoxes,ke,Ht))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(z){return this.placement.commit(z),this.placement}}let Wa=512/e.X/2;class ze{constructor(z,ht,Et){this.tileID=z,this.bucketInstanceId=Et,this._symbolsByKey={};let zt=new Map;for(let Ht=0;Ht({x:Math.floor(Ke.anchorX*Wa),y:Math.floor(Ke.anchorY*Wa)})),crossTileIDs:ke.map(Ke=>Ke.crossTileID)};if(Fe.positions.length>128){let Ke=new e.av(Fe.positions.length,16,Uint16Array);for(let{x:vr,y:Dr}of Fe.positions)Ke.add(vr,Dr);Ke.finish(),delete Fe.positions,Fe.index=Ke}this._symbolsByKey[Ht]=Fe}}getScaledCoordinates(z,ht){let{x:Et,y:zt,z:Ht}=this.tileID.canonical,{x:ke,y:Fe,z:Ke}=ht.canonical,vr=Wa/Math.pow(2,Ke-Ht),Dr=(Fe*e.X+z.anchorY)*vr,Fr=zt*e.X*Wa;return{x:Math.floor((ke*e.X+z.anchorX)*vr-Et*e.X*Wa),y:Math.floor(Dr-Fr)}}findMatches(z,ht,Et){let zt=this.tileID.canonical.zz)}}class Ie{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Rr{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(z){let ht=Math.round((z-this.lng)/360);if(ht!==0)for(let Et in this.indexes){let zt=this.indexes[Et],Ht={};for(let ke in zt){let Fe=zt[ke];Fe.tileID=Fe.tileID.unwrapTo(Fe.tileID.wrap+ht),Ht[Fe.tileID.key]=Fe}this.indexes[Et]=Ht}this.lng=z}addBucket(z,ht,Et){if(this.indexes[z.overscaledZ]&&this.indexes[z.overscaledZ][z.key]){if(this.indexes[z.overscaledZ][z.key].bucketInstanceId===ht.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(z.overscaledZ,this.indexes[z.overscaledZ][z.key])}for(let Ht=0;Htz.overscaledZ)for(let Fe in ke){let Ke=ke[Fe];Ke.tileID.isChildOf(z)&&Ke.findMatches(ht.symbolInstances,z,zt)}else{let Fe=ke[z.scaledTo(Number(Ht)).key];Fe&&Fe.findMatches(ht.symbolInstances,z,zt)}}for(let Ht=0;Ht{ht[Et]=!0});for(let Et in this.layerIndexes)ht[Et]||delete this.layerIndexes[Et]}}let Gr=($t,z)=>e.t($t,z&&z.filter(ht=>ht.identifier!=="source.canvas")),Br=e.aw();class Yr extends e.E{constructor(z,ht={}){super(),this._rtlPluginLoaded=()=>{for(let Et in this.sourceCaches){let zt=this.sourceCaches[Et].getSource().type;zt!=="vector"&&zt!=="geojson"||this.sourceCaches[Et].reload()}},this.map=z,this.dispatcher=new rt(dt(),z._getMapId()),this.dispatcher.registerMessageHandler("GG",(Et,zt)=>this.getGlyphs(Et,zt)),this.dispatcher.registerMessageHandler("GI",(Et,zt)=>this.getImages(Et,zt)),this.imageManager=new w,this.imageManager.setEventedParent(this),this.glyphManager=new V(z._requestManager,ht.localIdeographFontFamily),this.lineAtlas=new J(256,512),this.crossTileSymbolIndex=new $r,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",e.ay()),ve().on(Lt,this._rtlPluginLoaded),this.on("data",Et=>{if(Et.dataType!=="source"||Et.sourceDataType!=="metadata")return;let zt=this.sourceCaches[Et.sourceId];if(!zt)return;let Ht=zt.getSource();if(Ht&&Ht.vectorLayerIds)for(let ke in this._layers){let Fe=this._layers[ke];Fe.source===Ht.id&&this._validateLayer(Fe)}})}loadURL(z,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),ht.validate=typeof ht.validate!="boolean"||ht.validate;let zt=this.map._requestManager.transformRequest(z,"Style");this._loadStyleRequest=new AbortController;let Ht=this._loadStyleRequest;e.h(zt,this._loadStyleRequest).then(ke=>{this._loadStyleRequest=null,this._load(ke.data,ht,Et)}).catch(ke=>{this._loadStyleRequest=null,ke&&!Ht.signal.aborted&&this.fire(new e.j(ke))})}loadJSON(z,ht={},Et){this.fire(new e.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ht.validate=ht.validate!==!1,this._load(z,ht,Et)}).catch(()=>{})}loadEmpty(){this.fire(new e.k("dataloading",{dataType:"style"})),this._load(Br,{validate:!1})}_load(z,ht,Et){var zt;let Ht=ht.transformStyle?ht.transformStyle(Et,z):z;if(!ht.validate||!Gr(this,e.u(Ht))){this._loaded=!0,this.stylesheet=Ht;for(let ke in Ht.sources)this.addSource(ke,Ht.sources[ke],{validate:!1});Ht.sprite?this._loadSprite(Ht.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Ht.glyphs),this._createLayers(),this.light=new U(this.stylesheet.light),this.sky=new q(this.stylesheet.sky),this.map.setTerrain((zt=this.stylesheet.terrain)!==null&&zt!==void 0?zt:null),this.fire(new e.k("data",{dataType:"style"})),this.fire(new e.k("style.load"))}}_createLayers(){let z=e.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",z),this._order=z.map(ht=>ht.id),this._layers={},this._serializedLayers=null;for(let ht of z){let Et=e.aA(ht);Et.setEventedParent(this,{layer:{id:ht.id}}),this._layers[ht.id]=Et}}_loadSprite(z,ht=!1,Et=void 0){let zt;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Ht,ke,Fe,Ke){return e._(this,void 0,void 0,function*(){let vr=A(Ht),Dr=Fe>1?"@2x":"",Fr={},un={};for(let{id:Sn,url:Xt}of vr){let ae=ke.transformRequest(h(Xt,Dr,".json"),"SpriteJSON");Fr[Sn]=e.h(ae,Ke);let xe=ke.transformRequest(h(Xt,Dr,".png"),"SpriteImage");un[Sn]=u.getImage(xe,Ke)}return yield Promise.all([...Object.values(Fr),...Object.values(un)]),function(Sn,Xt){return e._(this,void 0,void 0,function*(){let ae={};for(let xe in Sn){ae[xe]={};let Ae=o.getImageCanvasContext((yield Xt[xe]).data),je=(yield Sn[xe]).data;for(let Oe in je){let{width:$e,height:wr,x:Or,y:Nr,sdf:en,pixelRatio:vn,stretchX:In,stretchY:Nn,content:ii,textFitWidth:Ui,textFitHeight:pa}=je[Oe];ae[xe][Oe]={data:null,pixelRatio:vn,sdf:en,stretchX:In,stretchY:Nn,content:ii,textFitWidth:Ui,textFitHeight:pa,spriteData:{width:$e,height:wr,x:Or,y:Nr,context:Ae}}}}return ae})}(Fr,un)})}(z,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Ht=>{if(this._spriteRequest=null,Ht)for(let ke in Ht){this._spritesImagesIds[ke]=[];let Fe=this._spritesImagesIds[ke]?this._spritesImagesIds[ke].filter(Ke=>!(Ke in Ht)):[];for(let Ke of Fe)this.imageManager.removeImage(Ke),this._changedImages[Ke]=!0;for(let Ke in Ht[ke]){let vr=ke==="default"?Ke:`${ke}:${Ke}`;this._spritesImagesIds[ke].push(vr),vr in this.imageManager.images?this.imageManager.updateImage(vr,Ht[ke][Ke],!1):this.imageManager.addImage(vr,Ht[ke][Ke]),ht&&(this._changedImages[vr]=!0)}}}).catch(Ht=>{this._spriteRequest=null,zt=Ht,this.fire(new e.j(zt))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ht&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"})),Et&&Et(zt)})}_unloadSprite(){for(let z of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(z),this._changedImages[z]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}_validateLayer(z){let ht=this.sourceCaches[z.source];if(!ht)return;let Et=z.sourceLayer;if(!Et)return;let zt=ht.getSource();(zt.type==="geojson"||zt.vectorLayerIds&&zt.vectorLayerIds.indexOf(Et)===-1)&&this.fire(new e.j(new Error(`Source layer "${Et}" does not exist on source "${zt.id}" as specified by style layer "${z.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let z in this.sourceCaches)if(!this.sourceCaches[z].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(z,ht=!1){let Et=this._serializedAllLayers();if(!z||z.length===0)return Object.values(ht?e.aB(Et):Et);let zt=[];for(let Ht of z)if(Et[Ht]){let ke=ht?e.aB(Et[Ht]):Et[Ht];zt.push(ke)}return zt}_serializedAllLayers(){let z=this._serializedLayers;if(z)return z;z=this._serializedLayers={};let ht=Object.keys(this._layers);for(let Et of ht){let zt=this._layers[Et];zt.type!=="custom"&&(z[Et]=zt.serialize())}return z}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let z in this.sourceCaches)if(this.sourceCaches[z].hasTransition())return!0;for(let z in this._layers)if(this._layers[z].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(z){if(!this._loaded)return;let ht=this._changed;if(ht){let zt=Object.keys(this._updatedLayers),Ht=Object.keys(this._removedLayers);(zt.length||Ht.length)&&this._updateWorkerLayers(zt,Ht);for(let ke in this._updatedSources){let Fe=this._updatedSources[ke];if(Fe==="reload")this._reloadSource(ke);else{if(Fe!=="clear")throw new Error(`Invalid action ${Fe}`);this._clearSource(ke)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ke in this._updatedPaintProps)this._layers[ke].updateTransitions(z);this.light.updateTransitions(z),this.sky.updateTransitions(z),this._resetUpdates()}let Et={};for(let zt in this.sourceCaches){let Ht=this.sourceCaches[zt];Et[zt]=Ht.used,Ht.used=!1}for(let zt of this._order){let Ht=this._layers[zt];Ht.recalculate(z,this._availableImages),!Ht.isHidden(z.zoom)&&Ht.source&&(this.sourceCaches[Ht.source].used=!0)}for(let zt in Et){let Ht=this.sourceCaches[zt];!!Et[zt]!=!!Ht.used&&Ht.fire(new e.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:zt}))}this.light.recalculate(z),this.sky.recalculate(z),this.z=z.zoom,ht&&this.fire(new e.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let z=Object.keys(this._changedImages);if(z.length){for(let ht in this.sourceCaches)this.sourceCaches[ht].reloadTilesForDependencies(["icons","patterns"],z);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let z in this.sourceCaches)this.sourceCaches[z].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(z,ht){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(z,!1),removedIds:ht})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(z,ht={}){var Et;this._checkLoaded();let zt=this.serialize();if(z=ht.transformStyle?ht.transformStyle(zt,z):z,((Et=ht.validate)===null||Et===void 0||Et)&&Gr(this,e.u(z)))return!1;(z=e.aB(z)).layers=e.az(z.layers);let Ht=e.aC(zt,z),ke=this._getOperationsToPerform(Ht);if(ke.unimplemented.length>0)throw new Error(`Unimplemented: ${ke.unimplemented.join(", ")}.`);if(ke.operations.length===0)return!1;for(let Fe of ke.operations)Fe();return this.stylesheet=z,this._serializedLayers=null,!0}_getOperationsToPerform(z){let ht=[],Et=[];for(let zt of z)switch(zt.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ht.push(()=>this.addLayer.apply(this,zt.args));break;case"removeLayer":ht.push(()=>this.removeLayer.apply(this,zt.args));break;case"setPaintProperty":ht.push(()=>this.setPaintProperty.apply(this,zt.args));break;case"setLayoutProperty":ht.push(()=>this.setLayoutProperty.apply(this,zt.args));break;case"setFilter":ht.push(()=>this.setFilter.apply(this,zt.args));break;case"addSource":ht.push(()=>this.addSource.apply(this,zt.args));break;case"removeSource":ht.push(()=>this.removeSource.apply(this,zt.args));break;case"setLayerZoomRange":ht.push(()=>this.setLayerZoomRange.apply(this,zt.args));break;case"setLight":ht.push(()=>this.setLight.apply(this,zt.args));break;case"setGeoJSONSourceData":ht.push(()=>this.setGeoJSONSourceData.apply(this,zt.args));break;case"setGlyphs":ht.push(()=>this.setGlyphs.apply(this,zt.args));break;case"setSprite":ht.push(()=>this.setSprite.apply(this,zt.args));break;case"setSky":ht.push(()=>this.setSky.apply(this,zt.args));break;case"setTerrain":ht.push(()=>this.map.setTerrain.apply(this,zt.args));break;case"setTransition":ht.push(()=>{});break;default:Et.push(zt.command)}return{operations:ht,unimplemented:Et}}addImage(z,ht){if(this.getImage(z))return this.fire(new e.j(new Error(`An image named "${z}" already exists.`)));this.imageManager.addImage(z,ht),this._afterImageUpdated(z)}updateImage(z,ht){this.imageManager.updateImage(z,ht)}getImage(z){return this.imageManager.getImage(z)}removeImage(z){if(!this.getImage(z))return this.fire(new e.j(new Error(`An image named "${z}" does not exist.`)));this.imageManager.removeImage(z),this._afterImageUpdated(z)}_afterImageUpdated(z){this._availableImages=this.imageManager.listImages(),this._changedImages[z]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(z,ht,Et={}){if(this._checkLoaded(),this.sourceCaches[z]!==void 0)throw new Error(`Source "${z}" already exists.`);if(!ht.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ht).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ht.type)>=0&&this._validate(e.u.source,`sources.${z}`,ht,null,Et))return;this.map&&this.map._collectResourceTiming&&(ht.collectResourceTiming=!0);let zt=this.sourceCaches[z]=new Ge(z,ht,this.dispatcher);zt.style=this,zt.setEventedParent(this,()=>({isSourceLoaded:zt.loaded(),source:zt.serialize(),sourceId:z})),zt.onAdd(this.map),this._changed=!0}removeSource(z){if(this._checkLoaded(),this.sourceCaches[z]===void 0)throw new Error("There is no source with this ID");for(let Et in this._layers)if(this._layers[Et].source===z)return this.fire(new e.j(new Error(`Source "${z}" cannot be removed while layer "${Et}" is using it.`)));let ht=this.sourceCaches[z];delete this.sourceCaches[z],delete this._updatedSources[z],ht.fire(new e.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:z})),ht.setEventedParent(null),ht.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(z,ht){if(this._checkLoaded(),this.sourceCaches[z]===void 0)throw new Error(`There is no source with this ID=${z}`);let Et=this.sourceCaches[z].getSource();if(Et.type!=="geojson")throw new Error(`geojsonSource.type is ${Et.type}, which is !== 'geojson`);Et.setData(ht),this._changed=!0}getSource(z){return this.sourceCaches[z]&&this.sourceCaches[z].getSource()}addLayer(z,ht,Et={}){this._checkLoaded();let zt=z.id;if(this.getLayer(zt))return void this.fire(new e.j(new Error(`Layer "${zt}" already exists on this map.`)));let Ht;if(z.type==="custom"){if(Gr(this,e.aD(z)))return;Ht=e.aA(z)}else{if("source"in z&&typeof z.source=="object"&&(this.addSource(zt,z.source),z=e.aB(z),z=e.e(z,{source:zt})),this._validate(e.u.layer,`layers.${zt}`,z,{arrayIndex:-1},Et))return;Ht=e.aA(z),this._validateLayer(Ht),Ht.setEventedParent(this,{layer:{id:zt}})}let ke=ht?this._order.indexOf(ht):this._order.length;if(ht&&ke===-1)this.fire(new e.j(new Error(`Cannot add layer "${zt}" before non-existing layer "${ht}".`)));else{if(this._order.splice(ke,0,zt),this._layerOrderChanged=!0,this._layers[zt]=Ht,this._removedLayers[zt]&&Ht.source&&Ht.type!=="custom"){let Fe=this._removedLayers[zt];delete this._removedLayers[zt],Fe.type!==Ht.type?this._updatedSources[Ht.source]="clear":(this._updatedSources[Ht.source]="reload",this.sourceCaches[Ht.source].pause())}this._updateLayer(Ht),Ht.onAdd&&Ht.onAdd(this.map)}}moveLayer(z,ht){if(this._checkLoaded(),this._changed=!0,!this._layers[z])return void this.fire(new e.j(new Error(`The layer '${z}' does not exist in the map's style and cannot be moved.`)));if(z===ht)return;let Et=this._order.indexOf(z);this._order.splice(Et,1);let zt=ht?this._order.indexOf(ht):this._order.length;ht&&zt===-1?this.fire(new e.j(new Error(`Cannot move layer "${z}" before non-existing layer "${ht}".`))):(this._order.splice(zt,0,z),this._layerOrderChanged=!0)}removeLayer(z){this._checkLoaded();let ht=this._layers[z];if(!ht)return void this.fire(new e.j(new Error(`Cannot remove non-existing layer "${z}".`)));ht.setEventedParent(null);let Et=this._order.indexOf(z);this._order.splice(Et,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[z]=ht,delete this._layers[z],this._serializedLayers&&delete this._serializedLayers[z],delete this._updatedLayers[z],delete this._updatedPaintProps[z],ht.onRemove&&ht.onRemove(this.map)}getLayer(z){return this._layers[z]}getLayersOrder(){return[...this._order]}hasLayer(z){return z in this._layers}setLayerZoomRange(z,ht,Et){this._checkLoaded();let zt=this.getLayer(z);zt?zt.minzoom===ht&&zt.maxzoom===Et||(ht!=null&&(zt.minzoom=ht),Et!=null&&(zt.maxzoom=Et),this._updateLayer(zt)):this.fire(new e.j(new Error(`Cannot set the zoom range of non-existing layer "${z}".`)))}setFilter(z,ht,Et={}){this._checkLoaded();let zt=this.getLayer(z);if(zt){if(!e.aE(zt.filter,ht))return ht==null?(zt.filter=void 0,void this._updateLayer(zt)):void(this._validate(e.u.filter,`layers.${zt.id}.filter`,ht,null,Et)||(zt.filter=e.aB(ht),this._updateLayer(zt)))}else this.fire(new e.j(new Error(`Cannot filter non-existing layer "${z}".`)))}getFilter(z){return e.aB(this.getLayer(z).filter)}setLayoutProperty(z,ht,Et,zt={}){this._checkLoaded();let Ht=this.getLayer(z);Ht?e.aE(Ht.getLayoutProperty(ht),Et)||(Ht.setLayoutProperty(ht,Et,zt),this._updateLayer(Ht)):this.fire(new e.j(new Error(`Cannot style non-existing layer "${z}".`)))}getLayoutProperty(z,ht){let Et=this.getLayer(z);if(Et)return Et.getLayoutProperty(ht);this.fire(new e.j(new Error(`Cannot get style of non-existing layer "${z}".`)))}setPaintProperty(z,ht,Et,zt={}){this._checkLoaded();let Ht=this.getLayer(z);Ht?e.aE(Ht.getPaintProperty(ht),Et)||(Ht.setPaintProperty(ht,Et,zt)&&this._updateLayer(Ht),this._changed=!0,this._updatedPaintProps[z]=!0,this._serializedLayers=null):this.fire(new e.j(new Error(`Cannot style non-existing layer "${z}".`)))}getPaintProperty(z,ht){return this.getLayer(z).getPaintProperty(ht)}setFeatureState(z,ht){this._checkLoaded();let Et=z.source,zt=z.sourceLayer,Ht=this.sourceCaches[Et];if(Ht===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let ke=Ht.getSource().type;ke==="geojson"&&zt?this.fire(new e.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ke!=="vector"||zt?(z.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),Ht.setFeatureState(zt,z.id,ht)):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(z,ht){this._checkLoaded();let Et=z.source,zt=this.sourceCaches[Et];if(zt===void 0)return void this.fire(new e.j(new Error(`The source '${Et}' does not exist in the map's style.`)));let Ht=zt.getSource().type,ke=Ht==="vector"?z.sourceLayer:void 0;Ht!=="vector"||ke?ht&&typeof z.id!="string"&&typeof z.id!="number"?this.fire(new e.j(new Error("A feature id is required to remove its specific state property."))):zt.removeFeatureState(ke,z.id,ht):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(z){this._checkLoaded();let ht=z.source,Et=z.sourceLayer,zt=this.sourceCaches[ht];if(zt!==void 0)return zt.getSource().type!=="vector"||Et?(z.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),zt.getFeatureState(Et,z.id)):void this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.j(new Error(`The source '${ht}' does not exist in the map's style.`)))}getTransition(){return e.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let z=e.aF(this.sourceCaches,Ht=>Ht.serialize()),ht=this._serializeByIds(this._order,!0),Et=this.map.getTerrain()||void 0,zt=this.stylesheet;return e.aG({version:zt.version,name:zt.name,metadata:zt.metadata,light:zt.light,sky:zt.sky,center:zt.center,zoom:zt.zoom,bearing:zt.bearing,pitch:zt.pitch,sprite:zt.sprite,glyphs:zt.glyphs,transition:zt.transition,sources:z,layers:ht,terrain:Et},Ht=>Ht!==void 0)}_updateLayer(z){this._updatedLayers[z.id]=!0,z.source&&!this._updatedSources[z.source]&&this.sourceCaches[z.source].getSource().type!=="raster"&&(this._updatedSources[z.source]="reload",this.sourceCaches[z.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(z){let ht=ke=>this._layers[ke].type==="fill-extrusion",Et={},zt=[];for(let ke=this._order.length-1;ke>=0;ke--){let Fe=this._order[ke];if(ht(Fe)){Et[Fe]=ke;for(let Ke of z){let vr=Ke[Fe];if(vr)for(let Dr of vr)zt.push(Dr)}}}zt.sort((ke,Fe)=>Fe.intersectionZ-ke.intersectionZ);let Ht=[];for(let ke=this._order.length-1;ke>=0;ke--){let Fe=this._order[ke];if(ht(Fe))for(let Ke=zt.length-1;Ke>=0;Ke--){let vr=zt[Ke].feature;if(Et[vr.layer.id]{let en=Ae.featureSortOrder;if(en){let vn=en.indexOf(Or.featureIndex);return en.indexOf(Nr.featureIndex)-vn}return Nr.featureIndex-Or.featureIndex});for(let Or of wr)$e.push(Or)}}for(let Ae in Xt)Xt[Ae].forEach(je=>{let Oe=je.feature,$e=vr[Fe[Ae].source].getFeatureState(Oe.layer["source-layer"],Oe.id);Oe.source=Oe.layer.source,Oe.layer["source-layer"]&&(Oe.sourceLayer=Oe.layer["source-layer"]),Oe.state=$e});return Xt}(this._layers,ke,this.sourceCaches,z,ht,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Ht)}querySourceFeatures(z,ht){ht&&ht.filter&&this._validate(e.u.filter,"querySourceFeatures.filter",ht.filter,null,ht);let Et=this.sourceCaches[z];return Et?function(zt,Ht){let ke=zt.getRenderableIds().map(vr=>zt.getTileByID(vr)),Fe=[],Ke={};for(let vr=0;vrun.getTileByID(Sn)).sort((Sn,Xt)=>Xt.tileID.overscaledZ-Sn.tileID.overscaledZ||(Sn.tileID.isLessThan(Xt.tileID)?-1:1))}let Fr=this.crossTileSymbolIndex.addLayer(Dr,Ke[Dr.source],z.center.lng);ke=ke||Fr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Ht=Ht||this._layerOrderChanged||Et===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.now(),z.zoom))&&(this.pauseablePlacement=new za(z,this.map.terrain,this._order,Ht,ht,Et,zt,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ke),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.now()),Fe=!0),ke&&this.pauseablePlacement.placement.setStale()),Fe||ke)for(let vr of this._order){let Dr=this._layers[vr];Dr.type==="symbol"&&this.placement.updateLayerOpacities(Dr,Ke[Dr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(o.now())}_releaseSymbolFadeTiles(){for(let z in this.sourceCaches)this.sourceCaches[z].releaseSymbolFadeTiles()}getImages(z,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.imageManager.getImages(ht.icons);this._updateTilesForChangedImages();let zt=this.sourceCaches[ht.source];return zt&&zt.setDependencies(ht.tileID.key,ht.type,ht.icons),Et})}getGlyphs(z,ht){return e._(this,void 0,void 0,function*(){let Et=yield this.glyphManager.getGlyphs(ht.stacks),zt=this.sourceCaches[ht.source];return zt&&zt.setDependencies(ht.tileID.key,ht.type,[""]),Et})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(z,ht={}){this._checkLoaded(),z&&this._validate(e.u.glyphs,"glyphs",z,null,ht)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=z,this.glyphManager.entries={},this.glyphManager.setURL(z))}addSprite(z,ht,Et={},zt){this._checkLoaded();let Ht=[{id:z,url:ht}],ke=[...A(this.stylesheet.sprite),...Ht];this._validate(e.u.sprite,"sprite",ke,null,Et)||(this.stylesheet.sprite=ke,this._loadSprite(Ht,!0,zt))}removeSprite(z){this._checkLoaded();let ht=A(this.stylesheet.sprite);if(ht.find(Et=>Et.id===z)){if(this._spritesImagesIds[z])for(let Et of this._spritesImagesIds[z])this.imageManager.removeImage(Et),this._changedImages[Et]=!0;ht.splice(ht.findIndex(Et=>Et.id===z),1),this.stylesheet.sprite=ht.length>0?ht:void 0,delete this._spritesImagesIds[z],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}else this.fire(new e.j(new Error(`Sprite "${z}" doesn't exists on this map.`)))}getSprite(){return A(this.stylesheet.sprite)}setSprite(z,ht={},Et){this._checkLoaded(),z&&this._validate(e.u.sprite,"sprite",z,null,ht)||(this.stylesheet.sprite=z,z?this._loadSprite(z,!0,Et):(this._unloadSprite(),Et&&Et(null)))}}var pn=e.Y([{name:"a_pos",type:"Int16",components:2}]);let on={prelude:Ce(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -3358,15 +3399,15 @@ vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=frac #else return 0.0; #endif -}`),background:Ee(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +}`),background:Ce(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Ee(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Ce(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Ee(`varying vec3 v_data;varying float v_visibility; +}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Ce(`varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur @@ -3402,7 +3443,7 @@ void main(void) { #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Ee("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Ee(`uniform highp float u_intensity;varying vec2 v_extrude; +vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Ce("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Ce(`uniform highp float u_intensity;varying vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { @@ -3419,11 +3460,11 @@ const highp float ZERO=1.0/255.0/16.0; void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius -vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Ee(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Ce(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(0.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Ee("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Ee("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Ee("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Ee(`#pragma mapbox: define highp vec4 color +}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Ce("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Ce("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Ce("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Ce(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color @@ -3438,7 +3479,7 @@ gl_FragColor=vec4(1.0); void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Ee(`varying vec2 v_pos; +gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Ce(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { @@ -3454,7 +3495,7 @@ gl_FragColor=vec4(1.0); void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Ee(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Ce(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -3478,7 +3519,7 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Ee(`#ifdef GL_ES +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Ce(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; @@ -3505,7 +3546,7 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Ee(`varying vec4 v_color;void main() {gl_FragColor=v_color; +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Ce(`varying vec4 v_color;void main() {gl_FragColor=v_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif @@ -3527,7 +3568,7 @@ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_off #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Ee(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Ce(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -3571,20 +3612,20 @@ float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos -: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Ee(`#ifdef GL_ES +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Ce(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Ee(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Ce(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Ee(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Ce(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3618,7 +3659,7 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),lineGradient:Ee(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +v_width2=vec2(outset,inset);}`),lineGradient:Ce(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { @@ -3648,7 +3689,7 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),linePattern:Ee(`#ifdef GL_ES +v_width2=vec2(outset,inset);}`),linePattern:Ce(`#ifdef GL_ES precision highp float; #endif uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; @@ -3700,7 +3741,7 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Ee(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Ce(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3741,11 +3782,11 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Ee(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Ce(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Ee(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Ce(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity @@ -3759,7 +3800,7 @@ void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Ee(`#define SDF_PX 8.0 +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Ce(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color @@ -3790,7 +3831,7 @@ void main() { #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Ee(`#define SDF_PX 8.0 +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Ce(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; @@ -3827,58 +3868,58 @@ void main() { #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Ee("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ee("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ee("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Ee("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ee(qt,I){let ht=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Et=I.match(/attribute ([\w]+) ([\w]+)/g),It=qt.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Vt=I.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ke=Vt?Vt.concat(It):It,De={};return{fragmentSource:qt=qt.replace(ht,(Ke,gr,Dr,Fr,ln)=>(De[ln]=!0,gr==="define"?` -#ifndef HAS_UNIFORM_u_${ln} -varying ${Dr} ${Fr} ${ln}; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Ce("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ce("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ce("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Ce("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ce($t,z){let ht=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Et=z.match(/attribute ([\w]+) ([\w]+)/g),zt=$t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ht=z.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ke=Ht?Ht.concat(zt):zt,Fe={};return{fragmentSource:$t=$t.replace(ht,(Ke,vr,Dr,Fr,un)=>(Fe[un]=!0,vr==="define"?` +#ifndef HAS_UNIFORM_u_${un} +varying ${Dr} ${Fr} ${un}; #else -uniform ${Dr} ${Fr} u_${ln}; +uniform ${Dr} ${Fr} u_${un}; #endif `:` -#ifdef HAS_UNIFORM_u_${ln} - ${Dr} ${Fr} ${ln} = u_${ln}; +#ifdef HAS_UNIFORM_u_${un} + ${Dr} ${Fr} ${un} = u_${un}; #endif -`)),vertexSource:I=I.replace(ht,(Ke,gr,Dr,Fr,ln)=>{let Mn=Fr==="float"?"vec2":"vec4",Xt=ln.match(/color/)?"color":Mn;return De[ln]?gr==="define"?` -#ifndef HAS_UNIFORM_u_${ln} -uniform lowp float u_${ln}_t; -attribute ${Dr} ${Mn} a_${ln}; -varying ${Dr} ${Fr} ${ln}; +`)),vertexSource:z=z.replace(ht,(Ke,vr,Dr,Fr,un)=>{let Sn=Fr==="float"?"vec2":"vec4",Xt=un.match(/color/)?"color":Sn;return Fe[un]?vr==="define"?` +#ifndef HAS_UNIFORM_u_${un} +uniform lowp float u_${un}_t; +attribute ${Dr} ${Sn} a_${un}; +varying ${Dr} ${Fr} ${un}; #else -uniform ${Dr} ${Fr} u_${ln}; +uniform ${Dr} ${Fr} u_${un}; #endif `:Xt==="vec4"?` -#ifndef HAS_UNIFORM_u_${ln} - ${ln} = a_${ln}; +#ifndef HAS_UNIFORM_u_${un} + ${un} = a_${un}; #else - ${Dr} ${Fr} ${ln} = u_${ln}; + ${Dr} ${Fr} ${un} = u_${un}; #endif `:` -#ifndef HAS_UNIFORM_u_${ln} - ${ln} = unpack_mix_${Xt}(a_${ln}, u_${ln}_t); +#ifndef HAS_UNIFORM_u_${un} + ${un} = unpack_mix_${Xt}(a_${un}, u_${un}_t); #else - ${Dr} ${Fr} ${ln} = u_${ln}; + ${Dr} ${Fr} ${un} = u_${un}; #endif -`:gr==="define"?` -#ifndef HAS_UNIFORM_u_${ln} -uniform lowp float u_${ln}_t; -attribute ${Dr} ${Mn} a_${ln}; +`:vr==="define"?` +#ifndef HAS_UNIFORM_u_${un} +uniform lowp float u_${un}_t; +attribute ${Dr} ${Sn} a_${un}; #else -uniform ${Dr} ${Fr} u_${ln}; +uniform ${Dr} ${Fr} u_${un}; #endif `:Xt==="vec4"?` -#ifndef HAS_UNIFORM_u_${ln} - ${Dr} ${Fr} ${ln} = a_${ln}; +#ifndef HAS_UNIFORM_u_${un} + ${Dr} ${Fr} ${un} = a_${un}; #else - ${Dr} ${Fr} ${ln} = u_${ln}; + ${Dr} ${Fr} ${un} = u_${un}; #endif `:` -#ifndef HAS_UNIFORM_u_${ln} - ${Dr} ${Fr} ${ln} = unpack_mix_${Xt}(a_${ln}, u_${ln}_t); +#ifndef HAS_UNIFORM_u_${un} + ${Dr} ${Fr} ${un} = unpack_mix_${Xt}(a_${un}, u_${un}_t); #else - ${Dr} ${Fr} ${ln} = u_${ln}; + ${Dr} ${Fr} ${un} = u_${un}; #endif -`}),staticAttributes:Et,staticUniforms:ke}}class dr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(I,ht,Et,It,Vt,ke,De,Ke,gr){this.context=I;let Dr=this.boundPaintVertexBuffers.length!==It.length;for(let Fr=0;!Dr&&Fr({u_matrix:qt,u_texture:0,u_ele_delta:I,u_fog_matrix:ht,u_fog_color:Et?Et.properties.get("fog-color"):e.aM.white,u_fog_ground_blend:Et?Et.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Et?Et.calculateFogBlendOpacity(It):0,u_horizon_color:Et?Et.properties.get("horizon-color"):e.aM.white,u_horizon_fog_blend:Et?Et.properties.get("horizon-fog-blend"):1});function vn(qt){let I=[];for(let ht=0;ht({u_depth:new e.aH(Or,Nr.u_depth),u_terrain:new e.aH(Or,Nr.u_terrain),u_terrain_dim:new e.aI(Or,Nr.u_terrain_dim),u_terrain_matrix:new e.aJ(Or,Nr.u_terrain_matrix),u_terrain_unpack:new e.aK(Or,Nr.u_terrain_unpack),u_terrain_exaggeration:new e.aI(Or,Nr.u_terrain_exaggeration)}))(I,wr),this.binderUniforms=Et?Et.getUniforms(I,wr):[]}draw(I,ht,Et,It,Vt,ke,De,Ke,gr,Dr,Fr,ln,Mn,Xt,ae,xe,Ae,je){let Ie=I.gl;if(this.failedToCreate)return;if(I.program.set(this.program),I.setDepthMode(Et),I.setStencilMode(It),I.setColorMode(Vt),I.setCullFace(ke),Ke){I.activeTexture.set(Ie.TEXTURE2),Ie.bindTexture(Ie.TEXTURE_2D,Ke.depthTexture),I.activeTexture.set(Ie.TEXTURE3),Ie.bindTexture(Ie.TEXTURE_2D,Ke.texture);for(let wr in this.terrainUniforms)this.terrainUniforms[wr].set(Ke[wr])}for(let wr in this.fixedUniforms)this.fixedUniforms[wr].set(De[wr]);ae&&ae.setUniforms(I,this.binderUniforms,Mn,{zoom:Xt});let Ze=0;switch(ht){case Ie.LINES:Ze=2;break;case Ie.TRIANGLES:Ze=3;break;case Ie.LINE_STRIP:Ze=1}for(let wr of ln.get()){let Or=wr.vaos||(wr.vaos={});(Or[gr]||(Or[gr]=new dr)).bind(I,this,Dr,ae?ae.getPaintVertexBuffers():[],Fr,wr.vertexOffset,xe,Ae,je),Ie.drawElements(ht,wr.primitiveLength*Ze,Ie.UNSIGNED_SHORT,wr.primitiveOffset*Ze*2)}}}function Xn(qt,I,ht){let Et=1/Hn(ht,1,I.transform.tileZoom),It=Math.pow(2,ht.tileID.overscaledZ),Vt=ht.tileSize*Math.pow(2,I.transform.tileZoom)/It,ke=Vt*(ht.tileID.canonical.x+ht.tileID.wrap*It),De=Vt*ht.tileID.canonical.y;return{u_image:0,u_texsize:ht.imageAtlasTexture.size,u_scale:[Et,qt.fromScale,qt.toScale],u_fade:qt.t,u_pixel_coord_upper:[ke>>16,De>>16],u_pixel_coord_lower:[65535&ke,65535&De]}}let Pn=(qt,I,ht,Et)=>{let It=I.style.light,Vt=It.properties.get("position"),ke=[Vt.x,Vt.y,Vt.z],De=function(){var gr=new e.A(9);return e.A!=Float32Array&&(gr[1]=0,gr[2]=0,gr[3]=0,gr[5]=0,gr[6]=0,gr[7]=0),gr[0]=1,gr[4]=1,gr[8]=1,gr}();It.properties.get("anchor")==="viewport"&&function(gr,Dr){var Fr=Math.sin(Dr),ln=Math.cos(Dr);gr[0]=ln,gr[1]=Fr,gr[2]=0,gr[3]=-Fr,gr[4]=ln,gr[5]=0,gr[6]=0,gr[7]=0,gr[8]=1}(De,-I.transform.angle),function(gr,Dr,Fr){var ln=Dr[0],Mn=Dr[1],Xt=Dr[2];gr[0]=ln*Fr[0]+Mn*Fr[3]+Xt*Fr[6],gr[1]=ln*Fr[1]+Mn*Fr[4]+Xt*Fr[7],gr[2]=ln*Fr[2]+Mn*Fr[5]+Xt*Fr[8]}(ke,ke,De);let Ke=It.properties.get("color");return{u_matrix:qt,u_lightpos:ke,u_lightintensity:It.properties.get("intensity"),u_lightcolor:[Ke.r,Ke.g,Ke.b],u_vertical_gradient:+ht,u_opacity:Et}},Sn=(qt,I,ht,Et,It,Vt,ke)=>e.e(Pn(qt,I,ht,Et),Xn(Vt,I,ke),{u_height_factor:-Math.pow(2,It.overscaledZ)/ke.tileSize/8}),Zn=qt=>({u_matrix:qt}),Ea=(qt,I,ht,Et)=>e.e(Zn(qt),Xn(ht,I,Et)),Ri=(qt,I)=>({u_matrix:qt,u_world:I}),Ja=(qt,I,ht,Et,It)=>e.e(Ea(qt,I,ht,Et),{u_world:It}),Xa=(qt,I,ht,Et)=>{let It=qt.transform,Vt,ke;if(Et.paint.get("circle-pitch-alignment")==="map"){let De=Hn(ht,1,It.zoom);Vt=!0,ke=[De,De]}else Vt=!1,ke=It.pixelsToGLUnits;return{u_camera_to_center_distance:It.cameraToCenterDistance,u_scale_with_map:+(Et.paint.get("circle-pitch-scale")==="map"),u_matrix:qt.translatePosMatrix(I.posMatrix,ht,Et.paint.get("circle-translate"),Et.paint.get("circle-translate-anchor")),u_pitch_with_map:+Vt,u_device_pixel_ratio:qt.pixelRatio,u_extrude_scale:ke}},Do=(qt,I,ht)=>({u_matrix:qt,u_inv_matrix:I,u_camera_to_center_distance:ht.cameraToCenterDistance,u_viewport_size:[ht.width,ht.height]}),go=(qt,I,ht=1)=>({u_matrix:qt,u_color:I,u_overlay:0,u_overlay_scale:ht}),Fo=qt=>({u_matrix:qt}),za=(qt,I,ht,Et)=>({u_matrix:qt,u_extrude_scale:Hn(I,1,ht),u_intensity:Et}),xs=(qt,I,ht,Et)=>{let It=e.H();e.aP(It,0,qt.width,qt.height,0,0,1);let Vt=qt.context.gl;return{u_matrix:It,u_world:[Vt.drawingBufferWidth,Vt.drawingBufferHeight],u_image:ht,u_color_ramp:Et,u_opacity:I.paint.get("heatmap-opacity")}};function os(qt,I){let ht=Math.pow(2,I.canonical.z),Et=I.canonical.y;return[new e.Z(0,Et/ht).toLngLat().lat,new e.Z(0,(Et+1)/ht).toLngLat().lat]}let cl=(qt,I,ht,Et)=>{let It=qt.transform;return{u_matrix:tl(qt,I,ht,Et),u_ratio:1/Hn(I,1,It.zoom),u_device_pixel_ratio:qt.pixelRatio,u_units_to_pixels:[1/It.pixelsToGLUnits[0],1/It.pixelsToGLUnits[1]]}},Zo=(qt,I,ht,Et,It)=>e.e(cl(qt,I,ht,It),{u_image:0,u_image_height:Et}),Ks=(qt,I,ht,Et,It)=>{let Vt=qt.transform,ke=hl(I,Vt);return{u_matrix:tl(qt,I,ht,It),u_texsize:I.imageAtlasTexture.size,u_ratio:1/Hn(I,1,Vt.zoom),u_device_pixel_ratio:qt.pixelRatio,u_image:0,u_scale:[ke,Et.fromScale,Et.toScale],u_fade:Et.t,u_units_to_pixels:[1/Vt.pixelsToGLUnits[0],1/Vt.pixelsToGLUnits[1]]}},ss=(qt,I,ht,Et,It,Vt)=>{let ke=qt.lineAtlas,De=hl(I,qt.transform),Ke=ht.layout.get("line-cap")==="round",gr=ke.getDash(Et.from,Ke),Dr=ke.getDash(Et.to,Ke),Fr=gr.width*It.fromScale,ln=Dr.width*It.toScale;return e.e(cl(qt,I,ht,Vt),{u_patternscale_a:[De/Fr,-gr.height/2],u_patternscale_b:[De/ln,-Dr.height/2],u_sdfgamma:ke.width/(256*Math.min(Fr,ln)*qt.pixelRatio)/2,u_image:0,u_tex_y_a:gr.y,u_tex_y_b:Dr.y,u_mix:It.t})};function hl(qt,I){return 1/Hn(qt,1,I.tileZoom)}function tl(qt,I,ht,Et){return qt.translatePosMatrix(Et?Et.posMatrix:I.tileID.posMatrix,I,ht.paint.get("line-translate"),ht.paint.get("line-translate-anchor"))}let Bl=(qt,I,ht,Et,It)=>{return{u_matrix:qt,u_tl_parent:I,u_scale_parent:ht,u_buffer_scale:1,u_fade_t:Et.mix,u_opacity:Et.opacity*It.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:It.paint.get("raster-brightness-min"),u_brightness_high:It.paint.get("raster-brightness-max"),u_saturation_factor:(ke=It.paint.get("raster-saturation"),ke>0?1-1/(1.001-ke):-ke),u_contrast_factor:(Vt=It.paint.get("raster-contrast"),Vt>0?1/(1-Vt):1+Vt),u_spin_weights:cs(It.paint.get("raster-hue-rotate"))};var Vt,ke};function cs(qt){qt*=Math.PI/180;let I=Math.sin(qt),ht=Math.cos(qt);return[(2*ht+1)/3,(-Math.sqrt(3)*I-ht+1)/3,(Math.sqrt(3)*I-ht+1)/3]}let Ps=(qt,I,ht,Et,It,Vt,ke,De,Ke,gr,Dr,Fr,ln,Mn)=>{let Xt=ke.transform;return{u_is_size_zoom_constant:+(qt==="constant"||qt==="source"),u_is_size_feature_constant:+(qt==="constant"||qt==="camera"),u_size_t:I?I.uSizeT:0,u_size:I?I.uSize:0,u_camera_to_center_distance:Xt.cameraToCenterDistance,u_pitch:Xt.pitch/360*2*Math.PI,u_rotate_symbol:+ht,u_aspect_ratio:Xt.width/Xt.height,u_fade_change:ke.options.fadeDuration?ke.symbolFadeChange:1,u_matrix:De,u_label_plane_matrix:Ke,u_coord_matrix:gr,u_is_text:+Fr,u_pitch_with_map:+Et,u_is_along_line:It,u_is_variable_anchor:Vt,u_texsize:ln,u_texture:0,u_translation:Dr,u_pitched_scale:Mn}},Po=(qt,I,ht,Et,It,Vt,ke,De,Ke,gr,Dr,Fr,ln,Mn,Xt)=>{let ae=ke.transform;return e.e(Ps(qt,I,ht,Et,It,Vt,ke,De,Ke,gr,Dr,Fr,ln,Xt),{u_gamma_scale:Et?Math.cos(ae._pitch)*ae.cameraToCenterDistance:1,u_device_pixel_ratio:ke.pixelRatio,u_is_halo:1})},Ts=(qt,I,ht,Et,It,Vt,ke,De,Ke,gr,Dr,Fr,ln,Mn)=>e.e(Po(qt,I,ht,Et,It,Vt,ke,De,Ke,gr,Dr,!0,Fr,!0,Mn),{u_texsize_icon:ln,u_texture_icon:1}),kl=(qt,I,ht)=>({u_matrix:qt,u_opacity:I,u_color:ht}),Hl=(qt,I,ht,Et,It,Vt)=>e.e(function(ke,De,Ke,gr){let Dr=Ke.imageManager.getPattern(ke.from.toString()),Fr=Ke.imageManager.getPattern(ke.to.toString()),{width:ln,height:Mn}=Ke.imageManager.getPixelSize(),Xt=Math.pow(2,gr.tileID.overscaledZ),ae=gr.tileSize*Math.pow(2,Ke.transform.tileZoom)/Xt,xe=ae*(gr.tileID.canonical.x+gr.tileID.wrap*Xt),Ae=ae*gr.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Dr.tl,u_pattern_br_a:Dr.br,u_pattern_tl_b:Fr.tl,u_pattern_br_b:Fr.br,u_texsize:[ln,Mn],u_mix:De.t,u_pattern_size_a:Dr.displaySize,u_pattern_size_b:Fr.displaySize,u_scale_a:De.fromScale,u_scale_b:De.toScale,u_tile_units_to_pixels:1/Hn(gr,1,Ke.transform.tileZoom),u_pixel_coord_upper:[xe>>16,Ae>>16],u_pixel_coord_lower:[65535&xe,65535&Ae]}}(Et,Vt,ht,It),{u_matrix:qt,u_opacity:I}),Xl={fillExtrusion:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_lightpos:new e.aN(qt,I.u_lightpos),u_lightintensity:new e.aI(qt,I.u_lightintensity),u_lightcolor:new e.aN(qt,I.u_lightcolor),u_vertical_gradient:new e.aI(qt,I.u_vertical_gradient),u_opacity:new e.aI(qt,I.u_opacity)}),fillExtrusionPattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_lightpos:new e.aN(qt,I.u_lightpos),u_lightintensity:new e.aI(qt,I.u_lightintensity),u_lightcolor:new e.aN(qt,I.u_lightcolor),u_vertical_gradient:new e.aI(qt,I.u_vertical_gradient),u_height_factor:new e.aI(qt,I.u_height_factor),u_image:new e.aH(qt,I.u_image),u_texsize:new e.aO(qt,I.u_texsize),u_pixel_coord_upper:new e.aO(qt,I.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(qt,I.u_pixel_coord_lower),u_scale:new e.aN(qt,I.u_scale),u_fade:new e.aI(qt,I.u_fade),u_opacity:new e.aI(qt,I.u_opacity)}),fill:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix)}),fillPattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_image:new e.aH(qt,I.u_image),u_texsize:new e.aO(qt,I.u_texsize),u_pixel_coord_upper:new e.aO(qt,I.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(qt,I.u_pixel_coord_lower),u_scale:new e.aN(qt,I.u_scale),u_fade:new e.aI(qt,I.u_fade)}),fillOutline:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_world:new e.aO(qt,I.u_world)}),fillOutlinePattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_world:new e.aO(qt,I.u_world),u_image:new e.aH(qt,I.u_image),u_texsize:new e.aO(qt,I.u_texsize),u_pixel_coord_upper:new e.aO(qt,I.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(qt,I.u_pixel_coord_lower),u_scale:new e.aN(qt,I.u_scale),u_fade:new e.aI(qt,I.u_fade)}),circle:(qt,I)=>({u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_scale_with_map:new e.aH(qt,I.u_scale_with_map),u_pitch_with_map:new e.aH(qt,I.u_pitch_with_map),u_extrude_scale:new e.aO(qt,I.u_extrude_scale),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_matrix:new e.aJ(qt,I.u_matrix)}),collisionBox:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_pixel_extrude_scale:new e.aO(qt,I.u_pixel_extrude_scale)}),collisionCircle:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_inv_matrix:new e.aJ(qt,I.u_inv_matrix),u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_viewport_size:new e.aO(qt,I.u_viewport_size)}),debug:(qt,I)=>({u_color:new e.aL(qt,I.u_color),u_matrix:new e.aJ(qt,I.u_matrix),u_overlay:new e.aH(qt,I.u_overlay),u_overlay_scale:new e.aI(qt,I.u_overlay_scale)}),clippingMask:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix)}),heatmap:(qt,I)=>({u_extrude_scale:new e.aI(qt,I.u_extrude_scale),u_intensity:new e.aI(qt,I.u_intensity),u_matrix:new e.aJ(qt,I.u_matrix)}),heatmapTexture:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_world:new e.aO(qt,I.u_world),u_image:new e.aH(qt,I.u_image),u_color_ramp:new e.aH(qt,I.u_color_ramp),u_opacity:new e.aI(qt,I.u_opacity)}),hillshade:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_image:new e.aH(qt,I.u_image),u_latrange:new e.aO(qt,I.u_latrange),u_light:new e.aO(qt,I.u_light),u_shadow:new e.aL(qt,I.u_shadow),u_highlight:new e.aL(qt,I.u_highlight),u_accent:new e.aL(qt,I.u_accent)}),hillshadePrepare:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_image:new e.aH(qt,I.u_image),u_dimension:new e.aO(qt,I.u_dimension),u_zoom:new e.aI(qt,I.u_zoom),u_unpack:new e.aK(qt,I.u_unpack)}),line:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_ratio:new e.aI(qt,I.u_ratio),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_units_to_pixels:new e.aO(qt,I.u_units_to_pixels)}),lineGradient:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_ratio:new e.aI(qt,I.u_ratio),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_units_to_pixels:new e.aO(qt,I.u_units_to_pixels),u_image:new e.aH(qt,I.u_image),u_image_height:new e.aI(qt,I.u_image_height)}),linePattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_texsize:new e.aO(qt,I.u_texsize),u_ratio:new e.aI(qt,I.u_ratio),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_image:new e.aH(qt,I.u_image),u_units_to_pixels:new e.aO(qt,I.u_units_to_pixels),u_scale:new e.aN(qt,I.u_scale),u_fade:new e.aI(qt,I.u_fade)}),lineSDF:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_ratio:new e.aI(qt,I.u_ratio),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_units_to_pixels:new e.aO(qt,I.u_units_to_pixels),u_patternscale_a:new e.aO(qt,I.u_patternscale_a),u_patternscale_b:new e.aO(qt,I.u_patternscale_b),u_sdfgamma:new e.aI(qt,I.u_sdfgamma),u_image:new e.aH(qt,I.u_image),u_tex_y_a:new e.aI(qt,I.u_tex_y_a),u_tex_y_b:new e.aI(qt,I.u_tex_y_b),u_mix:new e.aI(qt,I.u_mix)}),raster:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_tl_parent:new e.aO(qt,I.u_tl_parent),u_scale_parent:new e.aI(qt,I.u_scale_parent),u_buffer_scale:new e.aI(qt,I.u_buffer_scale),u_fade_t:new e.aI(qt,I.u_fade_t),u_opacity:new e.aI(qt,I.u_opacity),u_image0:new e.aH(qt,I.u_image0),u_image1:new e.aH(qt,I.u_image1),u_brightness_low:new e.aI(qt,I.u_brightness_low),u_brightness_high:new e.aI(qt,I.u_brightness_high),u_saturation_factor:new e.aI(qt,I.u_saturation_factor),u_contrast_factor:new e.aI(qt,I.u_contrast_factor),u_spin_weights:new e.aN(qt,I.u_spin_weights)}),symbolIcon:(qt,I)=>({u_is_size_zoom_constant:new e.aH(qt,I.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(qt,I.u_is_size_feature_constant),u_size_t:new e.aI(qt,I.u_size_t),u_size:new e.aI(qt,I.u_size),u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_pitch:new e.aI(qt,I.u_pitch),u_rotate_symbol:new e.aH(qt,I.u_rotate_symbol),u_aspect_ratio:new e.aI(qt,I.u_aspect_ratio),u_fade_change:new e.aI(qt,I.u_fade_change),u_matrix:new e.aJ(qt,I.u_matrix),u_label_plane_matrix:new e.aJ(qt,I.u_label_plane_matrix),u_coord_matrix:new e.aJ(qt,I.u_coord_matrix),u_is_text:new e.aH(qt,I.u_is_text),u_pitch_with_map:new e.aH(qt,I.u_pitch_with_map),u_is_along_line:new e.aH(qt,I.u_is_along_line),u_is_variable_anchor:new e.aH(qt,I.u_is_variable_anchor),u_texsize:new e.aO(qt,I.u_texsize),u_texture:new e.aH(qt,I.u_texture),u_translation:new e.aO(qt,I.u_translation),u_pitched_scale:new e.aI(qt,I.u_pitched_scale)}),symbolSDF:(qt,I)=>({u_is_size_zoom_constant:new e.aH(qt,I.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(qt,I.u_is_size_feature_constant),u_size_t:new e.aI(qt,I.u_size_t),u_size:new e.aI(qt,I.u_size),u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_pitch:new e.aI(qt,I.u_pitch),u_rotate_symbol:new e.aH(qt,I.u_rotate_symbol),u_aspect_ratio:new e.aI(qt,I.u_aspect_ratio),u_fade_change:new e.aI(qt,I.u_fade_change),u_matrix:new e.aJ(qt,I.u_matrix),u_label_plane_matrix:new e.aJ(qt,I.u_label_plane_matrix),u_coord_matrix:new e.aJ(qt,I.u_coord_matrix),u_is_text:new e.aH(qt,I.u_is_text),u_pitch_with_map:new e.aH(qt,I.u_pitch_with_map),u_is_along_line:new e.aH(qt,I.u_is_along_line),u_is_variable_anchor:new e.aH(qt,I.u_is_variable_anchor),u_texsize:new e.aO(qt,I.u_texsize),u_texture:new e.aH(qt,I.u_texture),u_gamma_scale:new e.aI(qt,I.u_gamma_scale),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_is_halo:new e.aH(qt,I.u_is_halo),u_translation:new e.aO(qt,I.u_translation),u_pitched_scale:new e.aI(qt,I.u_pitched_scale)}),symbolTextAndIcon:(qt,I)=>({u_is_size_zoom_constant:new e.aH(qt,I.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(qt,I.u_is_size_feature_constant),u_size_t:new e.aI(qt,I.u_size_t),u_size:new e.aI(qt,I.u_size),u_camera_to_center_distance:new e.aI(qt,I.u_camera_to_center_distance),u_pitch:new e.aI(qt,I.u_pitch),u_rotate_symbol:new e.aH(qt,I.u_rotate_symbol),u_aspect_ratio:new e.aI(qt,I.u_aspect_ratio),u_fade_change:new e.aI(qt,I.u_fade_change),u_matrix:new e.aJ(qt,I.u_matrix),u_label_plane_matrix:new e.aJ(qt,I.u_label_plane_matrix),u_coord_matrix:new e.aJ(qt,I.u_coord_matrix),u_is_text:new e.aH(qt,I.u_is_text),u_pitch_with_map:new e.aH(qt,I.u_pitch_with_map),u_is_along_line:new e.aH(qt,I.u_is_along_line),u_is_variable_anchor:new e.aH(qt,I.u_is_variable_anchor),u_texsize:new e.aO(qt,I.u_texsize),u_texsize_icon:new e.aO(qt,I.u_texsize_icon),u_texture:new e.aH(qt,I.u_texture),u_texture_icon:new e.aH(qt,I.u_texture_icon),u_gamma_scale:new e.aI(qt,I.u_gamma_scale),u_device_pixel_ratio:new e.aI(qt,I.u_device_pixel_ratio),u_is_halo:new e.aH(qt,I.u_is_halo),u_translation:new e.aO(qt,I.u_translation),u_pitched_scale:new e.aI(qt,I.u_pitched_scale)}),background:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_opacity:new e.aI(qt,I.u_opacity),u_color:new e.aL(qt,I.u_color)}),backgroundPattern:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_opacity:new e.aI(qt,I.u_opacity),u_image:new e.aH(qt,I.u_image),u_pattern_tl_a:new e.aO(qt,I.u_pattern_tl_a),u_pattern_br_a:new e.aO(qt,I.u_pattern_br_a),u_pattern_tl_b:new e.aO(qt,I.u_pattern_tl_b),u_pattern_br_b:new e.aO(qt,I.u_pattern_br_b),u_texsize:new e.aO(qt,I.u_texsize),u_mix:new e.aI(qt,I.u_mix),u_pattern_size_a:new e.aO(qt,I.u_pattern_size_a),u_pattern_size_b:new e.aO(qt,I.u_pattern_size_b),u_scale_a:new e.aI(qt,I.u_scale_a),u_scale_b:new e.aI(qt,I.u_scale_b),u_pixel_coord_upper:new e.aO(qt,I.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(qt,I.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aI(qt,I.u_tile_units_to_pixels)}),terrain:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_texture:new e.aH(qt,I.u_texture),u_ele_delta:new e.aI(qt,I.u_ele_delta),u_fog_matrix:new e.aJ(qt,I.u_fog_matrix),u_fog_color:new e.aL(qt,I.u_fog_color),u_fog_ground_blend:new e.aI(qt,I.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.aI(qt,I.u_fog_ground_blend_opacity),u_horizon_color:new e.aL(qt,I.u_horizon_color),u_horizon_fog_blend:new e.aI(qt,I.u_horizon_fog_blend)}),terrainDepth:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_ele_delta:new e.aI(qt,I.u_ele_delta)}),terrainCoords:(qt,I)=>({u_matrix:new e.aJ(qt,I.u_matrix),u_texture:new e.aH(qt,I.u_texture),u_terrain_coords_id:new e.aI(qt,I.u_terrain_coords_id),u_ele_delta:new e.aI(qt,I.u_ele_delta)}),sky:(qt,I)=>({u_sky_color:new e.aL(qt,I.u_sky_color),u_horizon_color:new e.aL(qt,I.u_horizon_color),u_horizon:new e.aI(qt,I.u_horizon),u_sky_horizon_blend:new e.aI(qt,I.u_sky_horizon_blend)})};class Us{constructor(I,ht,Et){this.context=I;let It=I.gl;this.buffer=It.createBuffer(),this.dynamicDraw=!!Et,this.context.unbindVAO(),I.bindElementBuffer.set(this.buffer),It.bufferData(It.ELEMENT_ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?It.DYNAMIC_DRAW:It.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(I){let ht=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ht.bufferSubData(ht.ELEMENT_ARRAY_BUFFER,0,I.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Ca={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class fo{constructor(I,ht,Et,It){this.length=ht.length,this.attributes=Et,this.itemSize=ht.bytesPerElement,this.dynamicDraw=It,this.context=I;let Vt=I.gl;this.buffer=Vt.createBuffer(),I.bindVertexBuffer.set(this.buffer),Vt.bufferData(Vt.ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?Vt.DYNAMIC_DRAW:Vt.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(I){if(I.length!==this.length)throw new Error(`Length of new data is ${I.length}, which doesn't match current length of ${this.length}`);let ht=this.context.gl;this.bind(),ht.bufferSubData(ht.ARRAY_BUFFER,0,I.arrayBuffer)}enableAttributes(I,ht){for(let Et=0;Et0){let Or=e.H();e.aQ(Or,Ie.placementInvProjMatrix,qt.transform.glCoordMatrix),e.aQ(Or,Or,Ie.placementViewportMatrix),Ke.push({circleArray:wr,circleOffset:Dr,transform:je.posMatrix,invTransform:Or,coord:je}),gr+=wr.length/4,Dr=gr}Ze&&De.draw(Vt,ke.LINES,el.disabled,zl.disabled,qt.colorModeForRenderPass(),ts.disabled,{u_matrix:je.posMatrix,u_pixel_extrude_scale:[1/(Fr=qt.transform).width,1/Fr.height]},qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(je),ht.id,Ze.layoutVertexBuffer,Ze.indexBuffer,Ze.segments,null,qt.transform.zoom,null,null,Ze.collisionVertexBuffer)}var Fr;if(!It||!Ke.length)return;let ln=qt.useProgram("collisionCircle"),Mn=new e.aR;Mn.resize(4*gr),Mn._trim();let Xt=0;for(let Ae of Ke)for(let je=0;je=0&&(Ae[Ie.associatedIconIndex]={shiftedAnchor:so,angle:Bo})}else Tr(Ie.numGlyphs,ae)}if(gr){xe.clear();let je=qt.icon.placedSymbolArray;for(let Ie=0;Ieqt.style.map.terrain.getElevation(Bn,On,Bi):null,In=ht.layout.get("text-rotation-alignment")==="map";Ct(Di,Bn.posMatrix,qt,It,pc,At,Ae,gr,In,ae,Bn.toUnwrapped(),Xt.width,Xt.height,jt,gn)}let Le=Bn.posMatrix,Ne=It&&tn||Me,sr=je||Ne?ec:pc,ar=Zc,Mr=wa&&ht.paint.get(It?"text-halo-width":"icon-halo-width").constantOr(1)!==0,en;en=wa?Di.iconsInText?Ts(so.kind,ds,Ie,Ae,je,Ne,qt,Le,sr,ar,jt,yl,gu,zn):Po(so.kind,ds,Ie,Ae,je,Ne,qt,Le,sr,ar,jt,It,yl,!0,zn):Ps(so.kind,ds,Ie,Ae,je,Ne,qt,Le,sr,ar,jt,It,yl,zn);let Xr={program:Eo,buffers:ha,uniformValues:en,atlasTexture:Fs,atlasTextureIcon:Zs,atlasInterpolation:wl,atlasInterpolationIcon:Su,isSDF:wa,hasHalo:Mr};if(wr&&Di.canOverlap){Or=!0;let gn=ha.segments.get();for(let In of gn)pn.push({segments:new e.a0([In]),sortKey:In.sortKey,state:Xr,terrainData:dl})}else pn.push({segments:ha.segments,sortKey:0,state:Xr,terrainData:dl})}Or&&pn.sort((Bn,ri)=>Bn.sortKey-ri.sortKey);for(let Bn of pn){let ri=Bn.state;if(ln.activeTexture.set(Mn.TEXTURE0),ri.atlasTexture.bind(ri.atlasInterpolation,Mn.CLAMP_TO_EDGE),ri.atlasTextureIcon&&(ln.activeTexture.set(Mn.TEXTURE1),ri.atlasTextureIcon&&ri.atlasTextureIcon.bind(ri.atlasInterpolationIcon,Mn.CLAMP_TO_EDGE)),ri.isSDF){let Di=ri.uniformValues;ri.hasHalo&&(Di.u_is_halo=1,Kf(ri.buffers,Bn.segments,ht,qt,ri.program,Nr,Dr,Fr,Di,Bn.terrainData)),Di.u_is_halo=0}Kf(ri.buffers,Bn.segments,ht,qt,ri.program,Nr,Dr,Fr,ri.uniformValues,Bn.terrainData)}}function Kf(qt,I,ht,Et,It,Vt,ke,De,Ke,gr){let Dr=Et.context;It.draw(Dr,Dr.gl.TRIANGLES,Vt,ke,De,ts.disabled,Ke,gr,ht.id,qt.layoutVertexBuffer,qt.indexBuffer,I,ht.paint,Et.transform.zoom,qt.programConfigurations.get(ht.id),qt.dynamicLayoutVertexBuffer,qt.opacityVertexBuffer)}function _f(qt,I,ht,Et){let It=qt.context,Vt=It.gl,ke=zl.disabled,De=new xu([Vt.ONE,Vt.ONE],e.aM.transparent,[!0,!0,!0,!0]),Ke=I.getBucket(ht);if(!Ke)return;let gr=Et.key,Dr=ht.heatmapFbos.get(gr);Dr||(Dr=Wf(It,I.tileSize,I.tileSize),ht.heatmapFbos.set(gr,Dr)),It.bindFramebuffer.set(Dr.framebuffer),It.viewport.set([0,0,I.tileSize,I.tileSize]),It.clear({color:e.aM.transparent});let Fr=Ke.programConfigurations.get(ht.id),ln=qt.useProgram("heatmap",Fr),Mn=qt.style.map.terrain.getTerrainData(Et);ln.draw(It,Vt.TRIANGLES,el.disabled,ke,De,ts.disabled,za(Et.posMatrix,I,qt.transform.zoom,ht.paint.get("heatmap-intensity")),Mn,ht.id,Ke.layoutVertexBuffer,Ke.indexBuffer,Ke.segments,ht.paint,qt.transform.zoom,Fr)}function Hh(qt,I,ht){let Et=qt.context,It=Et.gl;Et.setColorMode(qt.colorModeForRenderPass());let Vt=qf(Et,I),ke=ht.key,De=I.heatmapFbos.get(ke);De&&(Et.activeTexture.set(It.TEXTURE0),It.bindTexture(It.TEXTURE_2D,De.colorAttachment.get()),Et.activeTexture.set(It.TEXTURE1),Vt.bind(It.LINEAR,It.CLAMP_TO_EDGE),qt.useProgram("heatmapTexture").draw(Et,It.TRIANGLES,el.disabled,zl.disabled,qt.colorModeForRenderPass(),ts.disabled,xs(qt,I,0,1),null,I.id,qt.rasterBoundsBuffer,qt.quadTriangleIndexBuffer,qt.rasterBoundsSegments,I.paint,qt.transform.zoom),De.destroy(),I.heatmapFbos.delete(ke))}function Wf(qt,I,ht){var Et,It;let Vt=qt.gl,ke=Vt.createTexture();Vt.bindTexture(Vt.TEXTURE_2D,ke),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_WRAP_S,Vt.CLAMP_TO_EDGE),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_WRAP_T,Vt.CLAMP_TO_EDGE),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_MIN_FILTER,Vt.LINEAR),Vt.texParameteri(Vt.TEXTURE_2D,Vt.TEXTURE_MAG_FILTER,Vt.LINEAR);let De=(Et=qt.HALF_FLOAT)!==null&&Et!==void 0?Et:Vt.UNSIGNED_BYTE,Ke=(It=qt.RGBA16F)!==null&&It!==void 0?It:Vt.RGBA;Vt.texImage2D(Vt.TEXTURE_2D,0,Ke,I,ht,0,Vt.RGBA,De,null);let gr=qt.createFramebuffer(I,ht,!1,!1);return gr.colorAttachment.set(ke),gr}function qf(qt,I){return I.colorRampTexture||(I.colorRampTexture=new p(qt,I.colorRamp,qt.gl.RGBA)),I.colorRampTexture}function uh(qt,I,ht,Et,It){if(!ht||!Et||!Et.imageAtlas)return;let Vt=Et.imageAtlas.patternPositions,ke=Vt[ht.to.toString()],De=Vt[ht.from.toString()];if(!ke&&De&&(ke=De),!De&&ke&&(De=ke),!ke||!De){let Ke=It.getPaintProperty(I);ke=Vt[Ke],De=Vt[Ke]}ke&&De&&qt.setConstantPatternPositions(ke,De)}function Xf(qt,I,ht,Et,It,Vt,ke){let De=qt.context.gl,Ke="fill-pattern",gr=ht.paint.get(Ke),Dr=gr&&gr.constantOr(1),Fr=ht.getCrossfadeParameters(),ln,Mn,Xt,ae,xe;ke?(Mn=Dr&&!ht.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ln=De.LINES):(Mn=Dr?"fillPattern":"fill",ln=De.TRIANGLES);let Ae=gr.constantOr(null);for(let je of Et){let Ie=I.getTile(je);if(Dr&&!Ie.patternsLoaded())continue;let Ze=Ie.getBucket(ht);if(!Ze)continue;let wr=Ze.programConfigurations.get(ht.id),Or=qt.useProgram(Mn,wr),Nr=qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(je);Dr&&(qt.context.activeTexture.set(De.TEXTURE0),Ie.imageAtlasTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE),wr.updatePaintBuffers(Fr)),uh(wr,Ke,Ae,Ie,ht);let tn=Nr?je:null,pn=qt.translatePosMatrix(tn?tn.posMatrix:je.posMatrix,Ie,ht.paint.get("fill-translate"),ht.paint.get("fill-translate-anchor"));if(ke){ae=Ze.indexBuffer2,xe=Ze.segments2;let zn=[De.drawingBufferWidth,De.drawingBufferHeight];Xt=Mn==="fillOutlinePattern"&&Dr?Ja(pn,qt,Fr,Ie,zn):Ri(pn,zn)}else ae=Ze.indexBuffer,xe=Ze.segments,Xt=Dr?Ea(pn,qt,Fr,Ie):Zn(pn);Or.draw(qt.context,ln,It,qt.stencilModeForClipping(je),Vt,ts.disabled,Xt,Nr,ht.id,Ze.layoutVertexBuffer,ae,xe,ht.paint,qt.transform.zoom,wr)}}function Eh(qt,I,ht,Et,It,Vt,ke){let De=qt.context,Ke=De.gl,gr="fill-extrusion-pattern",Dr=ht.paint.get(gr),Fr=Dr.constantOr(1),ln=ht.getCrossfadeParameters(),Mn=ht.paint.get("fill-extrusion-opacity"),Xt=Dr.constantOr(null);for(let ae of Et){let xe=I.getTile(ae),Ae=xe.getBucket(ht);if(!Ae)continue;let je=qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(ae),Ie=Ae.programConfigurations.get(ht.id),Ze=qt.useProgram(Fr?"fillExtrusionPattern":"fillExtrusion",Ie);Fr&&(qt.context.activeTexture.set(Ke.TEXTURE0),xe.imageAtlasTexture.bind(Ke.LINEAR,Ke.CLAMP_TO_EDGE),Ie.updatePaintBuffers(ln)),uh(Ie,gr,Xt,xe,ht);let wr=qt.translatePosMatrix(ae.posMatrix,xe,ht.paint.get("fill-extrusion-translate"),ht.paint.get("fill-extrusion-translate-anchor")),Or=ht.paint.get("fill-extrusion-vertical-gradient"),Nr=Fr?Sn(wr,qt,Or,Mn,ae,ln,xe):Pn(wr,qt,Or,Mn);Ze.draw(De,De.gl.TRIANGLES,It,Vt,ke,ts.backCCW,Nr,je,ht.id,Ae.layoutVertexBuffer,Ae.indexBuffer,Ae.segments,ht.paint,qt.transform.zoom,Ie,qt.style.map.terrain&&Ae.centroidVertexBuffer)}}function gh(qt,I,ht,Et,It,Vt,ke){let De=qt.context,Ke=De.gl,gr=ht.fbo;if(!gr)return;let Dr=qt.useProgram("hillshade"),Fr=qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(I);De.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,gr.colorAttachment.get()),Dr.draw(De,Ke.TRIANGLES,It,Vt,ke,ts.disabled,((ln,Mn,Xt,ae)=>{let xe=Xt.paint.get("hillshade-shadow-color"),Ae=Xt.paint.get("hillshade-highlight-color"),je=Xt.paint.get("hillshade-accent-color"),Ie=Xt.paint.get("hillshade-illumination-direction")*(Math.PI/180);Xt.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ie-=ln.transform.angle);let Ze=!ln.options.moving;return{u_matrix:ae?ae.posMatrix:ln.transform.calculatePosMatrix(Mn.tileID.toUnwrapped(),Ze),u_image:0,u_latrange:os(0,Mn.tileID),u_light:[Xt.paint.get("hillshade-exaggeration"),Ie],u_shadow:xe,u_highlight:Ae,u_accent:je}})(qt,ht,Et,Fr?I:null),Fr,Et.id,qt.rasterBoundsBuffer,qt.quadTriangleIndexBuffer,qt.rasterBoundsSegments)}function cc(qt,I,ht,Et,It,Vt){let ke=qt.context,De=ke.gl,Ke=I.dem;if(Ke&&Ke.data){let gr=Ke.dim,Dr=Ke.stride,Fr=Ke.getPixels();if(ke.activeTexture.set(De.TEXTURE1),ke.pixelStoreUnpackPremultiplyAlpha.set(!1),I.demTexture=I.demTexture||qt.getTileTexture(Dr),I.demTexture){let Mn=I.demTexture;Mn.update(Fr,{premultiply:!1}),Mn.bind(De.NEAREST,De.CLAMP_TO_EDGE)}else I.demTexture=new p(ke,Fr,De.RGBA,{premultiply:!1}),I.demTexture.bind(De.NEAREST,De.CLAMP_TO_EDGE);ke.activeTexture.set(De.TEXTURE0);let ln=I.fbo;if(!ln){let Mn=new p(ke,{width:gr,height:gr,data:null},De.RGBA);Mn.bind(De.LINEAR,De.CLAMP_TO_EDGE),ln=I.fbo=ke.createFramebuffer(gr,gr,!0,!1),ln.colorAttachment.set(Mn.texture)}ke.bindFramebuffer.set(ln.framebuffer),ke.viewport.set([0,0,gr,gr]),qt.useProgram("hillshadePrepare").draw(ke,De.TRIANGLES,Et,It,Vt,ts.disabled,((Mn,Xt)=>{let ae=Xt.stride,xe=e.H();return e.aP(xe,0,e.X,-e.X,0,0,1),e.J(xe,xe,[0,-e.X,0]),{u_matrix:xe,u_image:1,u_dimension:[ae,ae],u_zoom:Mn.overscaledZ,u_unpack:Xt.getUnpackVector()}})(I.tileID,Ke),null,ht.id,qt.rasterBoundsBuffer,qt.quadTriangleIndexBuffer,qt.rasterBoundsSegments),I.needsHillshadePrepare=!1}}function ef(qt,I,ht,Et,It,Vt){let ke=Et.paint.get("raster-fade-duration");if(!Vt&&ke>0){let De=o.now(),Ke=(De-qt.timeAdded)/ke,gr=I?(De-I.timeAdded)/ke:-1,Dr=ht.getSource(),Fr=It.coveringZoomLevel({tileSize:Dr.tileSize,roundZoom:Dr.roundZoom}),ln=!I||Math.abs(I.tileID.overscaledZ-Fr)>Math.abs(qt.tileID.overscaledZ-Fr),Mn=ln&&qt.refreshedUponExpiration?1:e.ac(ln?Ke:1-gr,0,1);return qt.refreshedUponExpiration&&Ke>=1&&(qt.refreshedUponExpiration=!1),I?{opacity:1,mix:1-Mn}:{opacity:Mn,mix:0}}return{opacity:1,mix:0}}let Zf=new e.aM(1,0,0,1),tu=new e.aM(0,1,0,1),Lf=new e.aM(0,0,1,1),Od=new e.aM(1,0,1,1),Jf=new e.aM(0,1,1,1);function bf(qt,I,ht,Et){Nc(qt,0,I+ht/2,qt.transform.width,ht,Et)}function Qf(qt,I,ht,Et){Nc(qt,I-ht/2,0,ht,qt.transform.height,Et)}function Nc(qt,I,ht,Et,It,Vt){let ke=qt.context,De=ke.gl;De.enable(De.SCISSOR_TEST),De.scissor(I*qt.pixelRatio,ht*qt.pixelRatio,Et*qt.pixelRatio,It*qt.pixelRatio),ke.clear({color:Vt}),De.disable(De.SCISSOR_TEST)}function td(qt,I,ht){let Et=qt.context,It=Et.gl,Vt=ht.posMatrix,ke=qt.useProgram("debug"),De=el.disabled,Ke=zl.disabled,gr=qt.colorModeForRenderPass(),Dr="$debug",Fr=qt.style.map.terrain&&qt.style.map.terrain.getTerrainData(ht);Et.activeTexture.set(It.TEXTURE0);let ln=I.getTileByID(ht.key).latestRawTileData,Mn=Math.floor((ln&&ln.byteLength||0)/1024),Xt=I.getTile(ht).tileSize,ae=512/Math.min(Xt,512)*(ht.overscaledZ/qt.transform.zoom)*.5,xe=ht.canonical.toString();ht.overscaledZ!==ht.canonical.z&&(xe+=` => ${ht.overscaledZ}`),function(Ae,je){Ae.initDebugOverlayCanvas();let Ie=Ae.debugOverlayCanvas,Ze=Ae.context.gl,wr=Ae.debugOverlayCanvas.getContext("2d");wr.clearRect(0,0,Ie.width,Ie.height),wr.shadowColor="white",wr.shadowBlur=2,wr.lineWidth=1.5,wr.strokeStyle="white",wr.textBaseline="top",wr.font="bold 36px Open Sans, sans-serif",wr.fillText(je,5,5),wr.strokeText(je,5,5),Ae.debugOverlayTexture.update(Ie),Ae.debugOverlayTexture.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE)}(qt,`${xe} ${Mn}kB`),ke.draw(Et,It.TRIANGLES,De,Ke,xu.alphaBlended,ts.disabled,go(Vt,e.aM.transparent,ae),null,Dr,qt.debugBuffer,qt.quadTriangleIndexBuffer,qt.debugSegments),ke.draw(Et,It.LINE_STRIP,De,Ke,gr,ts.disabled,go(Vt,e.aM.red),Fr,Dr,qt.debugBuffer,qt.tileBorderIndexBuffer,qt.debugSegments)}function zu(qt,I,ht){let Et=qt.context,It=Et.gl,Vt=qt.colorModeForRenderPass(),ke=new el(It.LEQUAL,el.ReadWrite,qt.depthRangeFor3D),De=qt.useProgram("terrain"),Ke=I.getTerrainMesh();Et.bindFramebuffer.set(null),Et.viewport.set([0,0,qt.width,qt.height]);for(let gr of ht){let Dr=qt.renderToTexture.getTexture(gr),Fr=I.getTerrainData(gr.tileID);Et.activeTexture.set(It.TEXTURE0),It.bindTexture(It.TEXTURE_2D,Dr.texture);let ln=qt.transform.calculatePosMatrix(gr.tileID.toUnwrapped()),Mn=I.getMeshFrameDelta(qt.transform.zoom),Xt=qt.transform.calculateFogMatrix(gr.tileID.toUnwrapped()),ae=Vr(ln,Mn,Xt,qt.style.sky,qt.transform.pitch);De.draw(Et,It.TRIANGLES,ke,zl.disabled,Vt,ts.backCCW,ae,Fr,"terrain",Ke.vertexBuffer,Ke.indexBuffer,Ke.segments)}}class jc{constructor(I,ht,Et){this.vertexBuffer=I,this.indexBuffer=ht,this.segments=Et}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Wh{constructor(I,ht){this.context=new Id(I),this.transform=ht,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ge.maxUnderzooming+Ge.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new qr}resize(I,ht,Et){if(this.width=Math.floor(I*Et),this.height=Math.floor(ht*Et),this.pixelRatio=Et,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let It of this.style._order)this.style._layers[It].resize()}setup(){let I=this.context,ht=new e.aX;ht.emplaceBack(0,0),ht.emplaceBack(e.X,0),ht.emplaceBack(0,e.X),ht.emplaceBack(e.X,e.X),this.tileExtentBuffer=I.createVertexBuffer(ht,fn.members),this.tileExtentSegments=e.a0.simpleSegment(0,0,4,2);let Et=new e.aX;Et.emplaceBack(0,0),Et.emplaceBack(e.X,0),Et.emplaceBack(0,e.X),Et.emplaceBack(e.X,e.X),this.debugBuffer=I.createVertexBuffer(Et,fn.members),this.debugSegments=e.a0.simpleSegment(0,0,4,5);let It=new e.$;It.emplaceBack(0,0,0,0),It.emplaceBack(e.X,0,e.X,0),It.emplaceBack(0,e.X,0,e.X),It.emplaceBack(e.X,e.X,e.X,e.X),this.rasterBoundsBuffer=I.createVertexBuffer(It,Jt.members),this.rasterBoundsSegments=e.a0.simpleSegment(0,0,4,2);let Vt=new e.aX;Vt.emplaceBack(0,0),Vt.emplaceBack(1,0),Vt.emplaceBack(0,1),Vt.emplaceBack(1,1),this.viewportBuffer=I.createVertexBuffer(Vt,fn.members),this.viewportSegments=e.a0.simpleSegment(0,0,4,2);let ke=new e.aZ;ke.emplaceBack(0),ke.emplaceBack(1),ke.emplaceBack(3),ke.emplaceBack(2),ke.emplaceBack(0),this.tileBorderIndexBuffer=I.createIndexBuffer(ke);let De=new e.aY;De.emplaceBack(0,1,2),De.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=I.createIndexBuffer(De);let Ke=this.context.gl;this.stencilClearMode=new zl({func:Ke.ALWAYS,mask:0},0,255,Ke.ZERO,Ke.ZERO,Ke.ZERO)}clearStencil(){let I=this.context,ht=I.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Et=e.H();e.aP(Et,0,this.width,this.height,0,0,1),e.K(Et,Et,[ht.drawingBufferWidth,ht.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(I,ht.TRIANGLES,el.disabled,this.stencilClearMode,xu.disabled,ts.disabled,Fo(Et),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(I,ht){if(this.currentStencilSource===I.source||!I.isTileClipped()||!ht||!ht.length)return;this.currentStencilSource=I.source;let Et=this.context,It=Et.gl;this.nextStencilID+ht.length>256&&this.clearStencil(),Et.setColorMode(xu.disabled),Et.setDepthMode(el.disabled);let Vt=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ke of ht){let De=this._tileClippingMaskIDs[ke.key]=this.nextStencilID++,Ke=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ke);Vt.draw(Et,It.TRIANGLES,el.disabled,new zl({func:It.ALWAYS,mask:0},De,255,It.KEEP,It.KEEP,It.REPLACE),xu.disabled,ts.disabled,Fo(ke.posMatrix),Ke,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let I=this.nextStencilID++,ht=this.context.gl;return new zl({func:ht.NOTEQUAL,mask:255},I,255,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilModeForClipping(I){let ht=this.context.gl;return new zl({func:ht.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilConfigForOverlap(I){let ht=this.context.gl,Et=I.sort((ke,De)=>De.overscaledZ-ke.overscaledZ),It=Et[Et.length-1].overscaledZ,Vt=Et[0].overscaledZ-It+1;if(Vt>1){this.currentStencilSource=void 0,this.nextStencilID+Vt>256&&this.clearStencil();let ke={};for(let De=0;De({u_sky_color:Ae.properties.get("sky-color"),u_horizon_color:Ae.properties.get("horizon-color"),u_horizon:(je.height/2+je.getHorizon())*Ie,u_sky_horizon_blend:Ae.properties.get("sky-horizon-blend")*je.height/2*Ie}))(gr,Ke.style.map.transform,Ke.pixelRatio),Mn=new el(Fr.LEQUAL,el.ReadWrite,[0,1]),Xt=zl.disabled,ae=Ke.colorModeForRenderPass(),xe=Ke.useProgram("sky");if(!gr.mesh){let Ae=new e.aX;Ae.emplaceBack(-1,-1),Ae.emplaceBack(1,-1),Ae.emplaceBack(1,1),Ae.emplaceBack(-1,1);let je=new e.aY;je.emplaceBack(0,1,2),je.emplaceBack(0,2,3),gr.mesh=new jc(Dr.createVertexBuffer(Ae,fn.members),Dr.createIndexBuffer(je),e.a0.simpleSegment(0,0,Ae.length,je.length))}xe.draw(Dr,Fr.TRIANGLES,Mn,Xt,ae,ts.disabled,ln,void 0,"sky",gr.mesh.vertexBuffer,gr.mesh.indexBuffer,gr.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ht.showOverdrawInspector,this.depthRangeFor3D=[0,1-(I._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Et.length-1;this.currentLayer>=0;this.currentLayer--){let Ke=this.style._layers[Et[this.currentLayer]],gr=It[Ke.source],Dr=Vt[Ke.source];this._renderTileClippingMasks(Ke,Dr),this.renderLayer(this,gr,Ke,Dr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerxe.source&&!xe.isHidden(Dr)?[gr.sourceCaches[xe.source]]:[]),Mn=ln.filter(xe=>xe.getSource().type==="vector"),Xt=ln.filter(xe=>xe.getSource().type!=="vector"),ae=xe=>{(!Fr||Fr.getSource().maxzoomae(xe)),Fr||Xt.forEach(xe=>ae(xe)),Fr}(this.style,this.transform.zoom);Ke&&function(gr,Dr,Fr){for(let ln=0;ln0),It&&(e.b0(ht,Et),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Vt,ke){let De=Vt.context,Ke=De.gl,gr=xu.unblended,Dr=new el(Ke.LEQUAL,el.ReadWrite,[0,1]),Fr=ke.getTerrainMesh(),ln=ke.sourceCache.getRenderableTiles(),Mn=Vt.useProgram("terrainDepth");De.bindFramebuffer.set(ke.getFramebuffer("depth").framebuffer),De.viewport.set([0,0,Vt.width/devicePixelRatio,Vt.height/devicePixelRatio]),De.clear({color:e.aM.transparent,depth:1});for(let Xt of ln){let ae=ke.getTerrainData(Xt.tileID),xe={u_matrix:Vt.transform.calculatePosMatrix(Xt.tileID.toUnwrapped()),u_ele_delta:ke.getMeshFrameDelta(Vt.transform.zoom)};Mn.draw(De,Ke.TRIANGLES,Dr,zl.disabled,gr,ts.backCCW,xe,ae,"terrain",Fr.vertexBuffer,Fr.indexBuffer,Fr.segments)}De.bindFramebuffer.set(null),De.viewport.set([0,0,Vt.width,Vt.height])}(this,this.style.map.terrain),function(Vt,ke){let De=Vt.context,Ke=De.gl,gr=xu.unblended,Dr=new el(Ke.LEQUAL,el.ReadWrite,[0,1]),Fr=ke.getTerrainMesh(),ln=ke.getCoordsTexture(),Mn=ke.sourceCache.getRenderableTiles(),Xt=Vt.useProgram("terrainCoords");De.bindFramebuffer.set(ke.getFramebuffer("coords").framebuffer),De.viewport.set([0,0,Vt.width/devicePixelRatio,Vt.height/devicePixelRatio]),De.clear({color:e.aM.transparent,depth:1}),ke.coordsIndex=[];for(let ae of Mn){let xe=ke.getTerrainData(ae.tileID);De.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,ln.texture);let Ae={u_matrix:Vt.transform.calculatePosMatrix(ae.tileID.toUnwrapped()),u_terrain_coords_id:(255-ke.coordsIndex.length)/255,u_texture:0,u_ele_delta:ke.getMeshFrameDelta(Vt.transform.zoom)};Xt.draw(De,Ke.TRIANGLES,Dr,zl.disabled,gr,ts.backCCW,Ae,xe,"terrain",Fr.vertexBuffer,Fr.indexBuffer,Fr.segments),ke.coordsIndex.push(ae.tileID.key)}De.bindFramebuffer.set(null),De.viewport.set([0,0,Vt.width,Vt.height])}(this,this.style.map.terrain))}renderLayer(I,ht,Et,It){if(!Et.isHidden(this.transform.zoom)&&(Et.type==="background"||Et.type==="custom"||(It||[]).length))switch(this.id=Et.id,Et.type){case"symbol":(function(Vt,ke,De,Ke,gr){if(Vt.renderPass!=="translucent")return;let Dr=zl.disabled,Fr=Vt.colorModeForRenderPass();(De._unevaluatedLayout.hasValue("text-variable-anchor")||De._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ln,Mn,Xt,ae,xe,Ae,je,Ie,Ze){let wr=Mn.transform,Or=Zi(),Nr=xe==="map",tn=Ae==="map";for(let pn of ln){let zn=ae.getTile(pn),Bn=zn.getBucket(Xt);if(!Bn||!Bn.text||!Bn.text.segments.get().length)continue;let ri=e.ag(Bn.textSizeData,wr.zoom),Di=Hn(zn,1,Mn.transform.zoom),ha=Kr(pn.posMatrix,tn,Nr,Mn.transform,Di),ca=Xt.layout.get("icon-text-fit")!=="none"&&Bn.hasIconData();if(ri){let wa=Math.pow(2,wr.zoom-zn.tileID.overscaledZ),so=Mn.style.map.terrain?(Eo,ds)=>Mn.style.map.terrain.getElevation(pn,Eo,ds):null,Bo=Or.translatePosition(wr,zn,je,Ie);xf(Bn,Nr,tn,Ze,wr,ha,pn.posMatrix,wa,ri,ca,Or,Bo,pn.toUnwrapped(),so)}}}(Ke,Vt,De,ke,De.layout.get("text-rotation-alignment"),De.layout.get("text-pitch-alignment"),De.paint.get("text-translate"),De.paint.get("text-translate-anchor"),gr),De.paint.get("icon-opacity").constantOr(1)!==0&&md(Vt,ke,De,Ke,!1,De.paint.get("icon-translate"),De.paint.get("icon-translate-anchor"),De.layout.get("icon-rotation-alignment"),De.layout.get("icon-pitch-alignment"),De.layout.get("icon-keep-upright"),Dr,Fr),De.paint.get("text-opacity").constantOr(1)!==0&&md(Vt,ke,De,Ke,!0,De.paint.get("text-translate"),De.paint.get("text-translate-anchor"),De.layout.get("text-rotation-alignment"),De.layout.get("text-pitch-alignment"),De.layout.get("text-keep-upright"),Dr,Fr),ke.map.showCollisionBoxes&&(lh(Vt,ke,De,Ke,!0),lh(Vt,ke,De,Ke,!1))})(I,ht,Et,It,this.style.placement.variableOffsets);break;case"circle":(function(Vt,ke,De,Ke){if(Vt.renderPass!=="translucent")return;let gr=De.paint.get("circle-opacity"),Dr=De.paint.get("circle-stroke-width"),Fr=De.paint.get("circle-stroke-opacity"),ln=!De.layout.get("circle-sort-key").isConstant();if(gr.constantOr(1)===0&&(Dr.constantOr(1)===0||Fr.constantOr(1)===0))return;let Mn=Vt.context,Xt=Mn.gl,ae=Vt.depthModeForSublayer(0,el.ReadOnly),xe=zl.disabled,Ae=Vt.colorModeForRenderPass(),je=[];for(let Ie=0;IeIe.sortKey-Ze.sortKey);for(let Ie of je){let{programConfiguration:Ze,program:wr,layoutVertexBuffer:Or,indexBuffer:Nr,uniformValues:tn,terrainData:pn}=Ie.state;wr.draw(Mn,Xt.TRIANGLES,ae,xe,Ae,ts.disabled,tn,pn,De.id,Or,Nr,Ie.segments,De.paint,Vt.transform.zoom,Ze)}})(I,ht,Et,It);break;case"heatmap":(function(Vt,ke,De,Ke){if(De.paint.get("heatmap-opacity")===0)return;let gr=Vt.context;if(Vt.style.map.terrain){for(let Dr of Ke){let Fr=ke.getTile(Dr);ke.hasRenderableParent(Dr)||(Vt.renderPass==="offscreen"?_f(Vt,Fr,De,Dr):Vt.renderPass==="translucent"&&Hh(Vt,De,Dr))}gr.viewport.set([0,0,Vt.width,Vt.height])}else Vt.renderPass==="offscreen"?function(Dr,Fr,ln,Mn){let Xt=Dr.context,ae=Xt.gl,xe=zl.disabled,Ae=new xu([ae.ONE,ae.ONE],e.aM.transparent,[!0,!0,!0,!0]);(function(je,Ie,Ze){let wr=je.gl;je.activeTexture.set(wr.TEXTURE1),je.viewport.set([0,0,Ie.width/4,Ie.height/4]);let Or=Ze.heatmapFbos.get(e.aU);Or?(wr.bindTexture(wr.TEXTURE_2D,Or.colorAttachment.get()),je.bindFramebuffer.set(Or.framebuffer)):(Or=Wf(je,Ie.width/4,Ie.height/4),Ze.heatmapFbos.set(e.aU,Or))})(Xt,Dr,ln),Xt.clear({color:e.aM.transparent});for(let je=0;je20&&Dr.texParameterf(Dr.TEXTURE_2D,gr.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,gr.extTextureFilterAnisotropicMax);let Bn=Vt.style.map.terrain&&Vt.style.map.terrain.getTerrainData(je),ri=Bn?je:null,Di=ri?ri.posMatrix:Vt.transform.calculatePosMatrix(je.toUnwrapped(),Ae),ha=Bl(Di,pn||[0,0],tn||1,Nr,De);Fr instanceof ge?ln.draw(gr,Dr.TRIANGLES,Ie,zl.disabled,Mn,ts.disabled,ha,Bn,De.id,Fr.boundsBuffer,Vt.quadTriangleIndexBuffer,Fr.boundsSegments):ln.draw(gr,Dr.TRIANGLES,Ie,Xt[je.overscaledZ],Mn,ts.disabled,ha,Bn,De.id,Vt.rasterBoundsBuffer,Vt.quadTriangleIndexBuffer,Vt.rasterBoundsSegments)}})(I,ht,Et,It);break;case"background":(function(Vt,ke,De,Ke){let gr=De.paint.get("background-color"),Dr=De.paint.get("background-opacity");if(Dr===0)return;let Fr=Vt.context,ln=Fr.gl,Mn=Vt.transform,Xt=Mn.tileSize,ae=De.paint.get("background-pattern");if(Vt.isPatternMissing(ae))return;let xe=!ae&&gr.a===1&&Dr===1&&Vt.opaquePassEnabledForLayer()?"opaque":"translucent";if(Vt.renderPass!==xe)return;let Ae=zl.disabled,je=Vt.depthModeForSublayer(0,xe==="opaque"?el.ReadWrite:el.ReadOnly),Ie=Vt.colorModeForRenderPass(),Ze=Vt.useProgram(ae?"backgroundPattern":"background"),wr=Ke||Mn.coveringTiles({tileSize:Xt,terrain:Vt.style.map.terrain});ae&&(Fr.activeTexture.set(ln.TEXTURE0),Vt.imageManager.bind(Vt.context));let Or=De.getCrossfadeParameters();for(let Nr of wr){let tn=Ke?Nr.posMatrix:Vt.transform.calculatePosMatrix(Nr.toUnwrapped()),pn=ae?Hl(tn,Dr,Vt,ae,{tileID:Nr,tileSize:Xt},Or):kl(tn,Dr,gr),zn=Vt.style.map.terrain&&Vt.style.map.terrain.getTerrainData(Nr);Ze.draw(Fr,ln.TRIANGLES,je,Ae,Ie,ts.disabled,pn,zn,De.id,Vt.tileExtentBuffer,Vt.quadTriangleIndexBuffer,Vt.tileExtentSegments)}})(I,0,Et,It);break;case"custom":(function(Vt,ke,De){let Ke=Vt.context,gr=De.implementation;if(Vt.renderPass==="offscreen"){let Dr=gr.prerender;Dr&&(Vt.setCustomLayerDefaults(),Ke.setColorMode(Vt.colorModeForRenderPass()),Dr.call(gr,Ke.gl,Vt.transform.customLayerMatrix()),Ke.setDirty(),Vt.setBaseState())}else if(Vt.renderPass==="translucent"){Vt.setCustomLayerDefaults(),Ke.setColorMode(Vt.colorModeForRenderPass()),Ke.setStencilMode(zl.disabled);let Dr=gr.renderingMode==="3d"?new el(Vt.context.gl.LEQUAL,el.ReadWrite,Vt.depthRangeFor3D):Vt.depthModeForSublayer(0,el.ReadOnly);Ke.setDepthMode(Dr),gr.render(Ke.gl,Vt.transform.customLayerMatrix(),{farZ:Vt.transform.farZ,nearZ:Vt.transform.nearZ,fov:Vt.transform._fov,modelViewProjectionMatrix:Vt.transform.modelViewProjectionMatrix,projectionMatrix:Vt.transform.projectionMatrix}),Ke.setDirty(),Vt.setBaseState(),Ke.bindFramebuffer.set(null)}})(I,0,Et)}}translatePosMatrix(I,ht,Et,It,Vt){if(!Et[0]&&!Et[1])return I;let ke=Vt?It==="map"?this.transform.angle:0:It==="viewport"?-this.transform.angle:0;if(ke){let gr=Math.sin(ke),Dr=Math.cos(ke);Et=[Et[0]*Dr-Et[1]*gr,Et[0]*gr+Et[1]*Dr]}let De=[Vt?Et[0]:Hn(ht,Et[0],this.transform.zoom),Vt?Et[1]:Hn(ht,Et[1],this.transform.zoom),0],Ke=new Float32Array(16);return e.J(Ke,I,De),Ke}saveTileTexture(I){let ht=this._tileTextures[I.size[0]];ht?ht.push(I):this._tileTextures[I.size[0]]=[I]}getTileTexture(I){let ht=this._tileTextures[I];return ht&&ht.length>0?ht.pop():null}isPatternMissing(I){if(!I)return!1;if(!I.from||!I.to)return!0;let ht=this.imageManager.getPattern(I.from.toString()),Et=this.imageManager.getPattern(I.to.toString());return!ht||!Et}useProgram(I,ht){this.cache=this.cache||{};let Et=I+(ht?ht.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Et]||(this.cache[Et]=new Fn(this.context,an[I],ht,Xl[I],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Et]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let I=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(I.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new p(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:I,drawingBufferHeight:ht}=this.context.gl;return this.width!==I||this.height!==ht}}class hu{constructor(I,ht){this.points=I,this.planes=ht}static fromInvProjectionMatrix(I,ht,Et){let It=Math.pow(2,Et),Vt=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(De=>{let Ke=1/(De=e.af([],De,I))[3]/ht*It;return e.b1(De,De,[Ke,Ke,1/De[3],Ke])}),ke=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(De=>{let Ke=function(ln,Mn){var Xt=Mn[0],ae=Mn[1],xe=Mn[2],Ae=Xt*Xt+ae*ae+xe*xe;return Ae>0&&(Ae=1/Math.sqrt(Ae)),ln[0]=Mn[0]*Ae,ln[1]=Mn[1]*Ae,ln[2]=Mn[2]*Ae,ln}([],function(ln,Mn,Xt){var ae=Mn[0],xe=Mn[1],Ae=Mn[2],je=Xt[0],Ie=Xt[1],Ze=Xt[2];return ln[0]=xe*Ze-Ae*Ie,ln[1]=Ae*je-ae*Ze,ln[2]=ae*Ie-xe*je,ln}([],M([],Vt[De[0]],Vt[De[1]]),M([],Vt[De[2]],Vt[De[1]]))),gr=-((Dr=Ke)[0]*(Fr=Vt[De[1]])[0]+Dr[1]*Fr[1]+Dr[2]*Fr[2]);var Dr,Fr;return Ke.concat(gr)});return new hu(Vt,ke)}}class Ch{constructor(I,ht){this.min=I,this.max=ht,this.center=function(Et,It,Vt){return Et[0]=.5*It[0],Et[1]=.5*It[1],Et[2]=.5*It[2],Et}([],function(Et,It,Vt){return Et[0]=It[0]+Vt[0],Et[1]=It[1]+Vt[1],Et[2]=It[2]+Vt[2],Et}([],this.min,this.max))}quadrant(I){let ht=[I%2==0,I<2],Et=_(this.min),It=_(this.max);for(let Vt=0;Vt=0&&ke++;if(ke===0)return 0;ke!==ht.length&&(Et=!1)}if(Et)return 2;for(let It=0;It<3;It++){let Vt=Number.MAX_VALUE,ke=-Number.MAX_VALUE;for(let De=0;Dethis.max[It]-this.min[It])return 0}return 1}}class Ec{constructor(I=0,ht=0,Et=0,It=0){if(isNaN(I)||I<0||isNaN(ht)||ht<0||isNaN(Et)||Et<0||isNaN(It)||It<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=I,this.bottom=ht,this.left=Et,this.right=It}interpolate(I,ht,Et){return ht.top!=null&&I.top!=null&&(this.top=e.y.number(I.top,ht.top,Et)),ht.bottom!=null&&I.bottom!=null&&(this.bottom=e.y.number(I.bottom,ht.bottom,Et)),ht.left!=null&&I.left!=null&&(this.left=e.y.number(I.left,ht.left,Et)),ht.right!=null&&I.right!=null&&(this.right=e.y.number(I.right,ht.right,Et)),this}getCenter(I,ht){let Et=e.ac((this.left+I-this.right)/2,0,I),It=e.ac((this.top+ht-this.bottom)/2,0,ht);return new e.P(Et,It)}equals(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right}clone(){return new Ec(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Uc=85.051129;class _u{constructor(I,ht,Et,It,Vt){this.tileSize=512,this._renderWorldCopies=Vt===void 0||!!Vt,this._minZoom=I||0,this._maxZoom=ht||22,this._minPitch=Et??0,this._maxPitch=It??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ec,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let I=new _u(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.apply(this),I}apply(I){this.tileSize=I.tileSize,this.latRange=I.latRange,this.lngRange=I.lngRange,this.width=I.width,this.height=I.height,this._center=I._center,this._elevation=I._elevation,this.minElevationForCurrentTile=I.minElevationForCurrentTile,this.zoom=I.zoom,this.angle=I.angle,this._fov=I._fov,this._pitch=I._pitch,this._unmodified=I._unmodified,this._edgeInsets=I._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))}get maxZoom(){return this._maxZoom}set maxZoom(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))}get minPitch(){return this._minPitch}set minPitch(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))}get maxPitch(){return this._maxPitch}set maxPitch(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(I){let ht=-e.b3(I,-180,180)*Math.PI/180;this.angle!==ht&&(this._unmodified=!1,this.angle=ht,this._calcMatrices(),this.rotationMatrix=function(){var Et=new e.A(4);return e.A!=Float32Array&&(Et[1]=0,Et[2]=0),Et[0]=1,Et[3]=1,Et}(),function(Et,It,Vt){var ke=It[0],De=It[1],Ke=It[2],gr=It[3],Dr=Math.sin(Vt),Fr=Math.cos(Vt);Et[0]=ke*Fr+Ke*Dr,Et[1]=De*Fr+gr*Dr,Et[2]=ke*-Dr+Ke*Fr,Et[3]=De*-Dr+gr*Fr}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(I){let ht=e.ac(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ht&&(this._unmodified=!1,this._pitch=ht,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(I){let ht=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==ht&&(this._unmodified=!1,this._zoom=ht,this.tileZoom=Math.max(0,Math.floor(ht)),this.scale=this.zoomScale(ht),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(I){I!==this._elevation&&(this._elevation=I,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(I){return this._edgeInsets.equals(I)}interpolatePadding(I,ht,Et){this._unmodified=!1,this._edgeInsets.interpolate(I,ht,Et),this._constrain(),this._calcMatrices()}coveringZoomLevel(I){let ht=(I.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/I.tileSize));return Math.max(0,ht)}getVisibleUnwrappedCoordinates(I){let ht=[new e.b4(0,I)];if(this._renderWorldCopies){let Et=this.pointCoordinate(new e.P(0,0)),It=this.pointCoordinate(new e.P(this.width,0)),Vt=this.pointCoordinate(new e.P(this.width,this.height)),ke=this.pointCoordinate(new e.P(0,this.height)),De=Math.floor(Math.min(Et.x,It.x,Vt.x,ke.x)),Ke=Math.floor(Math.max(Et.x,It.x,Vt.x,ke.x)),gr=1;for(let Dr=De-gr;Dr<=Ke+gr;Dr++)Dr!==0&&ht.push(new e.b4(Dr,I))}return ht}coveringTiles(I){var ht,Et;let It=this.coveringZoomLevel(I),Vt=It;if(I.minzoom!==void 0&&ItI.maxzoom&&(It=I.maxzoom);let ke=this.pointCoordinate(this.getCameraPoint()),De=e.Z.fromLngLat(this.center),Ke=Math.pow(2,It),gr=[Ke*ke.x,Ke*ke.y,0],Dr=[Ke*De.x,Ke*De.y,0],Fr=hu.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,It),ln=I.minzoom||0;!I.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(ln=It);let Mn=I.terrain?2/Math.min(this.tileSize,I.tileSize)*this.tileSize:3,Xt=Ie=>({aabb:new Ch([Ie*Ke,0,0],[(Ie+1)*Ke,Ke,0]),zoom:0,x:0,y:0,wrap:Ie,fullyVisible:!1}),ae=[],xe=[],Ae=It,je=I.reparseOverscaled?Vt:It;if(this._renderWorldCopies)for(let Ie=1;Ie<=3;Ie++)ae.push(Xt(-Ie)),ae.push(Xt(Ie));for(ae.push(Xt(0));ae.length>0;){let Ie=ae.pop(),Ze=Ie.x,wr=Ie.y,Or=Ie.fullyVisible;if(!Or){let Bn=Ie.aabb.intersects(Fr);if(Bn===0)continue;Or=Bn===2}let Nr=I.terrain?gr:Dr,tn=Ie.aabb.distanceX(Nr),pn=Ie.aabb.distanceY(Nr),zn=Math.max(Math.abs(tn),Math.abs(pn));if(Ie.zoom===Ae||zn>Mn+(1<=ln){let Bn=Ae-Ie.zoom,ri=gr[0]-.5-(Ze<>1),ha=Ie.zoom+1,ca=Ie.aabb.quadrant(Bn);if(I.terrain){let wa=new e.S(ha,Ie.wrap,ha,ri,Di),so=I.terrain.getMinMaxElevation(wa),Bo=(ht=so.minElevation)!==null&&ht!==void 0?ht:this.elevation,Eo=(Et=so.maxElevation)!==null&&Et!==void 0?Et:this.elevation;ca=new Ch([ca.min[0],ca.min[1],Bo],[ca.max[0],ca.max[1],Eo])}ae.push({aabb:ca,zoom:ha,x:ri,y:Di,wrap:Ie.wrap,fullyVisible:Or})}}return xe.sort((Ie,Ze)=>Ie.distanceSq-Ze.distanceSq).map(Ie=>Ie.tileID)}resize(I,ht){this.width=I,this.height=ht,this.pixelsToGLUnits=[2/I,-2/ht],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(I){return Math.pow(2,I)}scaleZoom(I){return Math.log(I)/Math.LN2}project(I){let ht=e.ac(I.lat,-85.051129,Uc);return new e.P(e.O(I.lng)*this.worldSize,e.Q(ht)*this.worldSize)}unproject(I){return new e.Z(I.x/this.worldSize,I.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(I){let ht=this.elevation,Et=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,It=this.pointLocation(this.centerPoint,I),Vt=I.getElevationForLngLatZoom(It,this.tileZoom);if(!(this.elevation-Vt))return;let ke=Et+ht-Vt,De=Math.cos(this._pitch)*this.cameraToCenterDistance/ke/e.b5(1,It.lat),Ke=this.scaleZoom(De/this.tileSize);this._elevation=Vt,this._center=It,this.zoom=Ke}setLocationAtPoint(I,ht){let Et=this.pointCoordinate(ht),It=this.pointCoordinate(this.centerPoint),Vt=this.locationCoordinate(I),ke=new e.Z(Vt.x-(Et.x-It.x),Vt.y-(Et.y-It.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(I,ht){return ht?this.coordinatePoint(this.locationCoordinate(I),ht.getElevationForLngLatZoom(I,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(I))}pointLocation(I,ht){return this.coordinateLocation(this.pointCoordinate(I,ht))}locationCoordinate(I){return e.Z.fromLngLat(I)}coordinateLocation(I){return I&&I.toLngLat()}pointCoordinate(I,ht){if(ht){let ln=ht.pointCoordinate(I);if(ln!=null)return ln}let Et=[I.x,I.y,0,1],It=[I.x,I.y,1,1];e.af(Et,Et,this.pixelMatrixInverse),e.af(It,It,this.pixelMatrixInverse);let Vt=Et[3],ke=It[3],De=Et[1]/Vt,Ke=It[1]/ke,gr=Et[2]/Vt,Dr=It[2]/ke,Fr=gr===Dr?0:(0-gr)/(Dr-gr);return new e.Z(e.y.number(Et[0]/Vt,It[0]/ke,Fr)/this.worldSize,e.y.number(De,Ke,Fr)/this.worldSize)}coordinatePoint(I,ht=0,Et=this.pixelMatrix){let It=[I.x*this.worldSize,I.y*this.worldSize,ht,1];return e.af(It,It,Et),new e.P(It[0]/It[3],It[1]/It[3])}getBounds(){let I=Math.max(0,this.height/2-this.getHorizon());return new ut().extend(this.pointLocation(new e.P(0,I))).extend(this.pointLocation(new e.P(this.width,I))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ut([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Uc])}calculateTileMatrix(I){let ht=I.canonical,Et=this.worldSize/this.zoomScale(ht.z),It=ht.x+Math.pow(2,ht.z)*I.wrap,Vt=e.an(new Float64Array(16));return e.J(Vt,Vt,[It*Et,ht.y*Et,0]),e.K(Vt,Vt,[Et/e.X,Et/e.X,1]),Vt}calculatePosMatrix(I,ht=!1){let Et=I.key,It=ht?this._alignedPosMatrixCache:this._posMatrixCache;if(It[Et])return It[Et];let Vt=this.calculateTileMatrix(I);return e.L(Vt,ht?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Vt),It[Et]=new Float32Array(Vt),It[Et]}calculateFogMatrix(I){let ht=I.key,Et=this._fogMatrixCache;if(Et[ht])return Et[ht];let It=this.calculateTileMatrix(I);return e.L(It,this.fogMatrix,It),Et[ht]=new Float32Array(It),Et[ht]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(I,ht){ht=e.ac(+ht,this.minZoom,this.maxZoom);let Et={center:new e.N(I.lng,I.lat),zoom:ht},It=this.lngRange;if(!this._renderWorldCopies&&It===null){let Ie=179.9999999999;It=[-Ie,Ie]}let Vt=this.tileSize*this.zoomScale(Et.zoom),ke=0,De=Vt,Ke=0,gr=Vt,Dr=0,Fr=0,{x:ln,y:Mn}=this.size;if(this.latRange){let Ie=this.latRange;ke=e.Q(Ie[1])*Vt,De=e.Q(Ie[0])*Vt,De-keDe&&(Ae=De-Ie)}if(It){let Ie=(Ke+gr)/2,Ze=Xt;this._renderWorldCopies&&(Ze=e.b3(Xt,Ie-Vt/2,Ie+Vt/2));let wr=ln/2;Ze-wrgr&&(xe=gr-wr)}if(xe!==void 0||Ae!==void 0){let Ie=new e.P(xe??Xt,Ae??ae);Et.center=this.unproject.call({worldSize:Vt},Ie).wrap()}return Et}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let I=this._unmodified,{center:ht,zoom:Et}=this.getConstrained(this.center,this.zoom);this.center=ht,this.zoom=Et,this._unmodified=I,this._constraining=!1}_calcMatrices(){if(!this.height)return;let I=this.centerOffset,ht=this.point.x,Et=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=e.b5(1,this.center.lat)*this.worldSize;let It=e.an(new Float64Array(16));e.K(It,It,[this.width/2,-this.height/2,1]),e.J(It,It,[1,-1,0]),this.labelPlaneMatrix=It,It=e.an(new Float64Array(16)),e.K(It,It,[1,-1,1]),e.J(It,It,[-1,-1,0]),e.K(It,It,[2/this.width,2/this.height,1]),this.glCoordMatrix=It;let Vt=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ke=Math.min(this.elevation,this.minElevationForCurrentTile),De=Vt-ke*this._pixelPerMeter/Math.cos(this._pitch),Ke=ke<0?De:Vt,gr=Math.PI/2+this._pitch,Dr=this._fov*(.5+I.y/this.height),Fr=Math.sin(Dr)*Ke/Math.sin(e.ac(Math.PI-gr-Dr,.01,Math.PI-.01)),ln=this.getHorizon(),Mn=2*Math.atan(ln/this.cameraToCenterDistance)*(.5+I.y/(2*ln)),Xt=Math.sin(Mn)*Ke/Math.sin(e.ac(Math.PI-gr-Mn,.01,Math.PI-.01)),ae=Math.min(Fr,Xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ae+Ke),this.nearZ=this.height/50,It=new Float64Array(16),e.b6(It,this._fov,this.width/this.height,this.nearZ,this.farZ),It[8]=2*-I.x/this.width,It[9]=2*I.y/this.height,this.projectionMatrix=e.ae(It),e.K(It,It,[1,-1,1]),e.J(It,It,[0,0,-this.cameraToCenterDistance]),e.b7(It,It,this._pitch),e.ad(It,It,this.angle),e.J(It,It,[-ht,-Et,0]),this.mercatorMatrix=e.K([],It,[this.worldSize,this.worldSize,this.worldSize]),e.K(It,It,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.L(new Float64Array(16),this.labelPlaneMatrix,It),e.J(It,It,[0,0,-this.elevation]),this.modelViewProjectionMatrix=It,this.invModelViewProjectionMatrix=e.as([],It),this.fogMatrix=new Float64Array(16),e.b6(this.fogMatrix,this._fov,this.width/this.height,Vt,this.farZ),this.fogMatrix[8]=2*-I.x/this.width,this.fogMatrix[9]=2*I.y/this.height,e.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),e.b7(this.fogMatrix,this.fogMatrix,this._pitch),e.ad(this.fogMatrix,this.fogMatrix,this.angle),e.J(this.fogMatrix,this.fogMatrix,[-ht,-Et,0]),e.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=e.L(new Float64Array(16),this.labelPlaneMatrix,It);let xe=this.width%2/2,Ae=this.height%2/2,je=Math.cos(this.angle),Ie=Math.sin(this.angle),Ze=ht-Math.round(ht)+je*xe+Ie*Ae,wr=Et-Math.round(Et)+je*Ae+Ie*xe,Or=new Float64Array(It);if(e.J(Or,Or,[Ze>.5?Ze-1:Ze,wr>.5?wr-1:wr,0]),this.alignedModelViewProjectionMatrix=Or,It=e.as(new Float64Array(16),this.pixelMatrix),!It)throw new Error("failed to invert matrix");this.pixelMatrixInverse=It,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let I=this.pointCoordinate(new e.P(0,0)),ht=[I.x*this.worldSize,I.y*this.worldSize,0,1];return e.af(ht,ht,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let I=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,I))}getCameraQueryGeometry(I){let ht=this.getCameraPoint();if(I.length===1)return[I[0],ht];{let Et=ht.x,It=ht.y,Vt=ht.x,ke=ht.y;for(let De of I)Et=Math.min(Et,De.x),It=Math.min(It,De.y),Vt=Math.max(Vt,De.x),ke=Math.max(ke,De.y);return[new e.P(Et,It),new e.P(Vt,It),new e.P(Vt,ke),new e.P(Et,ke),new e.P(Et,It)]}}lngLatToCameraDepth(I,ht){let Et=this.locationCoordinate(I),It=[Et.x*this.worldSize,Et.y*this.worldSize,ht,1];return e.af(It,It,this.modelViewProjectionMatrix),It[2]/It[3]}}function uf(qt,I){let ht,Et=!1,It=null,Vt=null,ke=()=>{It=null,Et&&(qt.apply(Vt,ht),It=setTimeout(ke,I),Et=!1)};return(...De)=>(Et=!0,Vt=this,ht=De,It||ke(),It)}class vh{constructor(I){this._getCurrentHash=()=>{let ht=window.location.hash.replace("#","");if(this._hashName){let Et;return ht.split("&").map(It=>It.split("=")).forEach(It=>{It[0]===this._hashName&&(Et=It)}),(Et&&Et[1]||"").split("/")}return ht.split("/")},this._onHashChange=()=>{let ht=this._getCurrentHash();if(ht.length>=3&&!ht.some(Et=>isNaN(Et))){let Et=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ht[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ht[2],+ht[1]],zoom:+ht[0],bearing:Et,pitch:+(ht[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ht=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ht)},this._removeHash=()=>{let ht=this._getCurrentHash();if(ht.length===0)return;let Et=ht.join("/"),It=Et;It.split("&").length>0&&(It=It.split("&")[0]),this._hashName&&(It=`${this._hashName}=${Et}`);let Vt=window.location.hash.replace(It,"");Vt.startsWith("#&")?Vt=Vt.slice(0,1)+Vt.slice(2):Vt==="#"&&(Vt="");let ke=window.location.href.replace(/(#.+)?$/,Vt);ke=ke.replace("&&","&"),window.history.replaceState(window.history.state,null,ke)},this._updateHash=uf(this._updateHashUnthrottled,300),this._hashName=I&&encodeURIComponent(I)}addTo(I){return this._map=I,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(I){let ht=this._map.getCenter(),Et=Math.round(100*this._map.getZoom())/100,It=Math.ceil((Et*Math.LN2+Math.log(512/360/.5))/Math.LN10),Vt=Math.pow(10,It),ke=Math.round(ht.lng*Vt)/Vt,De=Math.round(ht.lat*Vt)/Vt,Ke=this._map.getBearing(),gr=this._map.getPitch(),Dr="";if(Dr+=I?`/${ke}/${De}/${Et}`:`${Et}/${De}/${ke}`,(Ke||gr)&&(Dr+="/"+Math.round(10*Ke)/10),gr&&(Dr+=`/${Math.round(gr)}`),this._hashName){let Fr=this._hashName,ln=!1,Mn=window.location.hash.slice(1).split("&").map(Xt=>{let ae=Xt.split("=")[0];return ae===Fr?(ln=!0,`${ae}=${Dr}`):Xt}).filter(Xt=>Xt);return ln||Mn.push(`${Fr}=${Dr}`),`#${Mn.join("&")}`}return`#${Dr}`}}let qh={linearity:.3,easing:e.b8(0,0,.3,1)},Pf=e.e({deceleration:2500,maxSpeed:1400},qh),Dd=e.e({deceleration:20,maxSpeed:1400},qh),rp=e.e({deceleration:1e3,maxSpeed:360},qh),cf=e.e({deceleration:1e3,maxSpeed:90},qh);class zf{constructor(I){this._map=I,this.clear()}clear(){this._inertiaBuffer=[]}record(I){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.now(),settings:I})}_drainInertiaBuffer(){let I=this._inertiaBuffer,ht=o.now();for(;I.length>0&&ht-I[0].time>160;)I.shift()}_onMoveEnd(I){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ht={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Vt}of this._inertiaBuffer)ht.zoom+=Vt.zoomDelta||0,ht.bearing+=Vt.bearingDelta||0,ht.pitch+=Vt.pitchDelta||0,Vt.panDelta&&ht.pan._add(Vt.panDelta),Vt.around&&(ht.around=Vt.around),Vt.pinchAround&&(ht.pinchAround=Vt.pinchAround);let Et=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,It={};if(ht.pan.mag()){let Vt=hf(ht.pan.mag(),Et,e.e({},Pf,I||{}));It.offset=ht.pan.mult(Vt.amount/ht.pan.mag()),It.center=this._map.transform.center,Tc(It,Vt)}if(ht.zoom){let Vt=hf(ht.zoom,Et,Dd);It.zoom=this._map.transform.zoom+Vt.amount,Tc(It,Vt)}if(ht.bearing){let Vt=hf(ht.bearing,Et,rp);It.bearing=this._map.transform.bearing+e.ac(Vt.amount,-179,179),Tc(It,Vt)}if(ht.pitch){let Vt=hf(ht.pitch,Et,cf);It.pitch=this._map.transform.pitch+Vt.amount,Tc(It,Vt)}if(It.zoom||It.bearing){let Vt=ht.pinchAround===void 0?ht.around:ht.pinchAround;It.around=Vt?this._map.unproject(Vt):this._map.getCenter()}return this.clear(),e.e(It,{noMoveStart:!0})}}function Tc(qt,I){(!qt.duration||qt.durationht.unproject(Ke)),De=Vt.reduce((Ke,gr,Dr,Fr)=>Ke.add(gr.div(Fr.length)),new e.P(0,0));super(I,{points:Vt,point:De,lngLats:ke,lngLat:ht.unproject(De),originalEvent:Et}),this._defaultPrevented=!1}}class If extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(I,ht,Et){super(I,{originalEvent:Et}),this._defaultPrevented=!1}}class yh{constructor(I,ht){this._map=I,this._clickTolerance=ht.clickTolerance}reset(){delete this._mousedownPos}wheel(I){return this._firePreventable(new If(I.type,this._map,I))}mousedown(I,ht){return this._mousedownPos=ht,this._firePreventable(new Qc(I.type,this._map,I))}mouseup(I){this._map.fire(new Qc(I.type,this._map,I))}click(I,ht){this._mousedownPos&&this._mousedownPos.dist(ht)>=this._clickTolerance||this._map.fire(new Qc(I.type,this._map,I))}dblclick(I){return this._firePreventable(new Qc(I.type,this._map,I))}mouseover(I){this._map.fire(new Qc(I.type,this._map,I))}mouseout(I){this._map.fire(new Qc(I.type,this._map,I))}touchstart(I){return this._firePreventable(new ff(I.type,this._map,I))}touchmove(I){this._map.fire(new ff(I.type,this._map,I))}touchend(I){this._map.fire(new ff(I.type,this._map,I))}touchcancel(I){this._map.fire(new ff(I.type,this._map,I))}_firePreventable(I){if(this._map.fire(I),I.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class bu{constructor(I){this._map=I}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(I){this._map.fire(new Qc(I.type,this._map,I))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qc("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(I){this._delayContextMenu?this._contextMenuEvent=I:this._ignoreContextMenu||this._map.fire(new Qc(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Lh{constructor(I){this._map=I}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(I){return this.transform.pointLocation(e.P.convert(I),this._map.terrain)}}class Vc{constructor(I,ht){this._map=I,this._tr=new Lh(I),this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=ht.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(I,ht){this.isEnabled()&&I.shiftKey&&I.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ht,this._active=!0)}mousemoveWindow(I,ht){if(!this._active)return;let Et=ht;if(this._lastPos.equals(Et)||!this._box&&Et.dist(this._startPos)Vt.fitScreenCoordinates(Et,It,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",I)}keydown(I){this._active&&I.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",I))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(I,ht){return this._map.fire(new e.k(I,{originalEvent:ht}))}}function gd(qt,I){if(qt.length!==I.length)throw new Error(`The number of touches and points are not equal - touches ${qt.length}, points ${I.length}`);let ht={};for(let Et=0;Etthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),Et.length===this.numTouches&&(this.centroid=function(It){let Vt=new e.P(0,0);for(let ke of It)Vt._add(ke);return Vt.div(It.length)}(ht),this.touches=gd(Et,ht)))}touchmove(I,ht,Et){if(this.aborted||!this.centroid)return;let It=gd(Et,ht);for(let Vt in this.touches){let ke=It[Vt];(!ke||ke.dist(this.touches[Vt])>30)&&(this.aborted=!0)}}touchend(I,ht,Et){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),Et.length===0){let It=!this.aborted&&this.centroid;if(this.reset(),It)return It}}}class wf{constructor(I){this.singleTap=new vu(I),this.numTaps=I.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(I,ht,Et){this.singleTap.touchstart(I,ht,Et)}touchmove(I,ht,Et){this.singleTap.touchmove(I,ht,Et)}touchend(I,ht,Et){let It=this.singleTap.touchend(I,ht,Et);if(It){let Vt=I.timeStamp-this.lastTime<500,ke=!this.lastTap||this.lastTap.dist(It)<30;if(Vt&&ke||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=It,this.count===this.numTaps)return this.reset(),It}}}class Zh{constructor(I){this._tr=new Lh(I),this._zoomIn=new wf({numTouches:1,numTaps:2}),this._zoomOut=new wf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(I,ht,Et){this._zoomIn.touchstart(I,ht,Et),this._zoomOut.touchstart(I,ht,Et)}touchmove(I,ht,Et){this._zoomIn.touchmove(I,ht,Et),this._zoomOut.touchmove(I,ht,Et)}touchend(I,ht,Et){let It=this._zoomIn.touchend(I,ht,Et),Vt=this._zoomOut.touchend(I,ht,Et),ke=this._tr;return It?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:De=>De.easeTo({duration:300,zoom:ke.zoom+1,around:ke.unproject(It)},{originalEvent:I})}):Vt?(this._active=!0,I.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:De=>De.easeTo({duration:300,zoom:ke.zoom-1,around:ke.unproject(Vt)},{originalEvent:I})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class th{constructor(I){this._enabled=!!I.enable,this._moveStateManager=I.moveStateManager,this._clickTolerance=I.clickTolerance||1,this._moveFunction=I.move,this._activateOnStart=!!I.activateOnStart,I.assignEvents(this),this.reset()}reset(I){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(I)}_move(...I){let ht=this._moveFunction(...I);if(ht.bearingDelta||ht.pitchDelta||ht.around||ht.panDelta)return this._active=!0,ht}dragStart(I,ht){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(I)&&(this._moveStateManager.startMove(I),this._lastPoint=ht.length?ht[0]:ht,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(I,ht){if(!this.isEnabled())return;let Et=this._lastPoint;if(!Et)return;if(I.preventDefault(),!this._moveStateManager.isValidMoveEvent(I))return void this.reset(I);let It=ht.length?ht[0]:ht;return!this._moved&&It.dist(Et){qt.mousedown=qt.dragStart,qt.mousemoveWindow=qt.dragMove,qt.mouseup=qt.dragEnd,qt.contextmenu=I=>{I.preventDefault()}},vc=({enable:qt,clickTolerance:I,bearingDegreesPerPixelMoved:ht=.8})=>{let Et=new $h({checkCorrectEvent:It=>i.mouseButton(It)===0&&It.ctrlKey||i.mouseButton(It)===2});return new th({clickTolerance:I,move:(It,Vt)=>({bearingDelta:(Vt.x-It.x)*ht}),moveStateManager:Et,enable:qt,assignEvents:Fd})},ed=({enable:qt,clickTolerance:I,pitchDegreesPerPixelMoved:ht=-.5})=>{let Et=new $h({checkCorrectEvent:It=>i.mouseButton(It)===0&&It.ctrlKey||i.mouseButton(It)===2});return new th({clickTolerance:I,move:(It,Vt)=>({pitchDelta:(Vt.y-It.y)*ht}),moveStateManager:Et,enable:qt,assignEvents:Fd})};class eh{constructor(I,ht){this._clickTolerance=I.clickTolerance||1,this._map=ht,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(I){return I<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(I,ht,Et){return this._calculateTransform(I,ht,Et)}touchmove(I,ht,Et){if(this._active){if(!this._shouldBePrevented(Et.length))return I.preventDefault(),this._calculateTransform(I,ht,Et);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",I)}}touchend(I,ht,Et){this._calculateTransform(I,ht,Et),this._active&&this._shouldBePrevented(Et.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(I,ht,Et){Et.length>0&&(this._active=!0);let It=gd(Et,ht),Vt=new e.P(0,0),ke=new e.P(0,0),De=0;for(let gr in It){let Dr=It[gr],Fr=this._touches[gr];Fr&&(Vt._add(Dr),ke._add(Dr.sub(Fr)),De++,It[gr]=Dr)}if(this._touches=It,this._shouldBePrevented(De)||!ke.mag())return;let Ke=ke.div(De);return this._sum._add(Ke),this._sum.mag()Math.abs(qt.x)}class $f extends Ph{constructor(I){super(),this._currentTouchCount=0,this._map=I}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(I,ht,Et){super.touchstart(I,ht,Et),this._currentTouchCount=Et.length}_start(I){this._lastPoints=I,bh(I[0].sub(I[1]))&&(this._valid=!1)}_move(I,ht,Et){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let It=I[0].sub(this._lastPoints[0]),Vt=I[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(It,Vt,Et.timeStamp),this._valid?(this._lastPoints=I,this._active=!0,{pitchDelta:(It.y+Vt.y)/2*-.5}):void 0}gestureBeginsVertically(I,ht,Et){if(this._valid!==void 0)return this._valid;let It=I.mag()>=2,Vt=ht.mag()>=2;if(!It&&!Vt)return;if(!It||!Vt)return this._firstMove===void 0&&(this._firstMove=Et),Et-this._firstMove<100&&void 0;let ke=I.y>0==ht.y>0;return bh(I)&&bh(ht)&&ke}}let mr={panStep:100,bearingStep:15,pitchStep:10};class Ur{constructor(I){this._tr=new Lh(I);let ht=mr;this._panStep=ht.panStep,this._bearingStep=ht.bearingStep,this._pitchStep=ht.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(I){if(I.altKey||I.ctrlKey||I.metaKey)return;let ht=0,Et=0,It=0,Vt=0,ke=0;switch(I.keyCode){case 61:case 107:case 171:case 187:ht=1;break;case 189:case 109:case 173:ht=-1;break;case 37:I.shiftKey?Et=-1:(I.preventDefault(),Vt=-1);break;case 39:I.shiftKey?Et=1:(I.preventDefault(),Vt=1);break;case 38:I.shiftKey?It=1:(I.preventDefault(),ke=-1);break;case 40:I.shiftKey?It=-1:(I.preventDefault(),ke=1);break;default:return}return this._rotationDisabled&&(Et=0,It=0),{cameraAnimation:De=>{let Ke=this._tr;De.easeTo({duration:300,easeId:"keyboardHandler",easing:xn,zoom:ht?Math.round(Ke.zoom)+ht*(I.shiftKey?2:1):Ke.zoom,bearing:Ke.bearing+Et*this._bearingStep,pitch:Ke.pitch+It*this._pitchStep,offset:[-Vt*this._panStep,-ke*this._panStep],center:Ke.center},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function xn(qt){return qt*(2-qt)}let un=4.000244140625;class Wn{constructor(I,ht){this._onTimeout=Et=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Et)},this._map=I,this._tr=new Lh(I),this._triggerRenderFrame=ht,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(I){this._defaultZoomRate=I}setWheelZoomRate(I){this._wheelZoomRate=I}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(I){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!I&&I.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(I){return!!this._map.cooperativeGestures.isEnabled()&&!(I.ctrlKey||this._map.cooperativeGestures.isBypassed(I))}wheel(I){if(!this.isEnabled())return;if(this._shouldBePrevented(I))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",I);let ht=I.deltaMode===WheelEvent.DOM_DELTA_LINE?40*I.deltaY:I.deltaY,Et=o.now(),It=Et-(this._lastWheelEventTime||0);this._lastWheelEventTime=Et,ht!==0&&ht%un==0?this._type="wheel":ht!==0&&Math.abs(ht)<4?this._type="trackpad":It>400?(this._type=null,this._lastValue=ht,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(It*ht)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ht+=this._lastValue)),I.shiftKey&&ht&&(ht/=4),this._type&&(this._lastWheelEvent=I,this._delta-=ht,this._active||this._start(I)),I.preventDefault()}_start(I){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let ht=i.mousePos(this._map.getCanvas(),I),Et=this._tr;this._around=ht.y>Et.transform.height/2-Et.transform.getHorizon()?e.N.convert(this._aroundCenter?Et.center:Et.unproject(ht)):e.N.convert(Et.center),this._aroundPoint=Et.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let I=this._tr.transform;if(this._delta!==0){let Ke=this._type==="wheel"&&Math.abs(this._delta)>un?this._wheelZoomRate:this._defaultZoomRate,gr=2/(1+Math.exp(-Math.abs(this._delta*Ke)));this._delta<0&&gr!==0&&(gr=1/gr);let Dr=typeof this._targetZoom=="number"?I.zoomScale(this._targetZoom):I.scale;this._targetZoom=Math.min(I.maxZoom,Math.max(I.minZoom,I.scaleZoom(Dr*gr))),this._type==="wheel"&&(this._startZoom=I.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ht=typeof this._targetZoom=="number"?this._targetZoom:I.zoom,Et=this._startZoom,It=this._easing,Vt,ke=!1,De=o.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Et&&It&&De){let Ke=Math.min(De/200,1),gr=It(Ke);Vt=e.y.number(Et,ht,gr),Ke<1?this._frameId||(this._frameId=!0):ke=!0}else Vt=ht,ke=!0;return this._active=!0,ke&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ke,zoomDelta:Vt-I.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(I){let ht=e.b9;if(this._prevEase){let Et=this._prevEase,It=(o.now()-Et.start)/Et.duration,Vt=Et.easing(It+.01)-Et.easing(It),ke=.27/Math.sqrt(Vt*Vt+1e-4)*.01,De=Math.sqrt(.0729-ke*ke);ht=e.b8(ke,De,.25,1)}return this._prevEase={start:o.now(),duration:I,easing:ht},ht}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class hi{constructor(I,ht){this._clickZoom=I,this._tapZoom=ht}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class ea{constructor(I){this._tr=new Lh(I),this.reset()}reset(){this._active=!1}dblclick(I,ht){return I.preventDefault(),{cameraAnimation:Et=>{Et.easeTo({duration:300,zoom:this._tr.zoom+(I.shiftKey?-1:1),around:this._tr.unproject(ht)},{originalEvent:I})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class pa{constructor(){this._tap=new wf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(I,ht,Et){if(!this._swipePoint)if(this._tapTime){let It=ht[0],Vt=I.timeStamp-this._tapTime<500,ke=this._tapPoint.dist(It)<30;Vt&&ke?Et.length>0&&(this._swipePoint=It,this._swipeTouch=Et[0].identifier):this.reset()}else this._tap.touchstart(I,ht,Et)}touchmove(I,ht,Et){if(this._tapTime){if(this._swipePoint){if(Et[0].identifier!==this._swipeTouch)return;let It=ht[0],Vt=It.y-this._swipePoint.y;return this._swipePoint=It,I.preventDefault(),this._active=!0,{zoomDelta:Vt/128}}}else this._tap.touchmove(I,ht,Et)}touchend(I,ht,Et){if(this._tapTime)this._swipePoint&&Et.length===0&&this.reset();else{let It=this._tap.touchend(I,ht,Et);It&&(this._tapTime=I.timeStamp,this._tapPoint=It)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Da{constructor(I,ht,Et){this._el=I,this._mousePan=ht,this._touchPan=Et}enable(I){this._inertiaOptions=I||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class $a{constructor(I,ht,Et){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=ht,this._mousePitch=Et}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class la{constructor(I,ht,Et,It){this._el=I,this._touchZoom=ht,this._touchRotate=Et,this._tapDragZoom=It,this._rotationDisabled=!1,this._enabled=!0}enable(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Pa{constructor(I,ht){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=I,this._options=ht,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let I=this._map.getCanvasContainer();I.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",I);let ht=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ht=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Et=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),It=document.createElement("div");It.className="maplibregl-desktop-message",It.textContent=ht,this._container.appendChild(It);let Vt=document.createElement("div");Vt.className="maplibregl-mobile-message",Vt.textContent=Et,this._container.appendChild(Vt),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(I){return I[this._bypassKey]}notifyGestureBlocked(I,ht){this._enabled&&(this._map.fire(new e.k("cooperativegestureprevented",{gestureType:I,originalEvent:ht})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let ba=qt=>qt.zoom||qt.drag||qt.pitch||qt.rotate;class Ji extends e.k{}function no(qt){return qt.panDelta&&qt.panDelta.mag()||qt.zoomDelta||qt.bearingDelta||qt.pitchDelta}class as{constructor(I,ht){this.handleWindowEvent=It=>{this.handleEvent(It,`${It.type}Window`)},this.handleEvent=(It,Vt)=>{if(It.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ke=It.type==="renderFrame"?void 0:It,De={needsRenderFrame:!1},Ke={},gr={},Dr=It.touches,Fr=Dr?this._getMapTouches(Dr):void 0,ln=Fr?i.touchPos(this._map.getCanvas(),Fr):i.mousePos(this._map.getCanvas(),It);for(let{handlerName:ae,handler:xe,allowed:Ae}of this._handlers){if(!xe.isEnabled())continue;let je;this._blockedByActive(gr,Ae,ae)?xe.reset():xe[Vt||It.type]&&(je=xe[Vt||It.type](It,ln,Fr),this.mergeHandlerResult(De,Ke,je,ae,ke),je&&je.needsRenderFrame&&this._triggerRenderFrame()),(je||xe.isActive())&&(gr[ae]=xe)}let Mn={};for(let ae in this._previousActiveHandlers)gr[ae]||(Mn[ae]=ke);this._previousActiveHandlers=gr,(Object.keys(Mn).length||no(De))&&(this._changes.push([De,Ke,Mn]),this._triggerRenderFrame()),(Object.keys(gr).length||no(De))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Xt}=De;Xt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Xt(this._map))},this._map=I,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new zf(I),this._bearingSnap=ht.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ht);let Et=this._el;this._listeners=[[Et,"touchstart",{passive:!0}],[Et,"touchmove",{passive:!1}],[Et,"touchend",void 0],[Et,"touchcancel",void 0],[Et,"mousedown",void 0],[Et,"mousemove",void 0],[Et,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Et,"mouseover",void 0],[Et,"mouseout",void 0],[Et,"dblclick",void 0],[Et,"click",void 0],[Et,"keydown",{capture:!1}],[Et,"keyup",void 0],[Et,"wheel",{passive:!1}],[Et,"contextmenu",void 0],[window,"blur",void 0]];for(let[It,Vt,ke]of this._listeners)i.addEventListener(It,Vt,It===document?this.handleWindowEvent:this.handleEvent,ke)}destroy(){for(let[I,ht,Et]of this._listeners)i.removeEventListener(I,ht,I===document?this.handleWindowEvent:this.handleEvent,Et)}_addDefaultHandlers(I){let ht=this._map,Et=ht.getCanvasContainer();this._add("mapEvent",new yh(ht,I));let It=ht.boxZoom=new Vc(ht,I);this._add("boxZoom",It),I.interactive&&I.boxZoom&&It.enable();let Vt=ht.cooperativeGestures=new Pa(ht,I.cooperativeGestures);this._add("cooperativeGestures",Vt),I.cooperativeGestures&&Vt.enable();let ke=new Zh(ht),De=new ea(ht);ht.doubleClickZoom=new hi(De,ke),this._add("tapZoom",ke),this._add("clickZoom",De),I.interactive&&I.doubleClickZoom&&ht.doubleClickZoom.enable();let Ke=new pa;this._add("tapDragZoom",Ke);let gr=ht.touchPitch=new $f(ht);this._add("touchPitch",gr),I.interactive&&I.touchPitch&&ht.touchPitch.enable(I.touchPitch);let Dr=vc(I),Fr=ed(I);ht.dragRotate=new $a(I,Dr,Fr),this._add("mouseRotate",Dr,["mousePitch"]),this._add("mousePitch",Fr,["mouseRotate"]),I.interactive&&I.dragRotate&&ht.dragRotate.enable();let ln=(({enable:je,clickTolerance:Ie})=>{let Ze=new $h({checkCorrectEvent:wr=>i.mouseButton(wr)===0&&!wr.ctrlKey});return new th({clickTolerance:Ie,move:(wr,Or)=>({around:Or,panDelta:Or.sub(wr)}),activateOnStart:!0,moveStateManager:Ze,enable:je,assignEvents:Fd})})(I),Mn=new eh(I,ht);ht.dragPan=new Da(Et,ln,Mn),this._add("mousePan",ln),this._add("touchPan",Mn,["touchZoom","touchRotate"]),I.interactive&&I.dragPan&&ht.dragPan.enable(I.dragPan);let Xt=new df,ae=new nu;ht.touchZoomRotate=new la(Et,ae,Xt,Ke),this._add("touchRotate",Xt,["touchPan","touchZoom"]),this._add("touchZoom",ae,["touchPan","touchRotate"]),I.interactive&&I.touchZoomRotate&&ht.touchZoomRotate.enable(I.touchZoomRotate);let xe=ht.scrollZoom=new Wn(ht,()=>this._triggerRenderFrame());this._add("scrollZoom",xe,["mousePan"]),I.interactive&&I.scrollZoom&&ht.scrollZoom.enable(I.scrollZoom);let Ae=ht.keyboard=new Ur(ht);this._add("keyboard",Ae),I.interactive&&I.keyboard&&ht.keyboard.enable(),this._add("blockableMapEvent",new bu(ht))}_add(I,ht,Et){this._handlers.push({handlerName:I,handler:ht,allowed:Et}),this._handlersById[I]=ht}stop(I){if(!this._updatingCamera){for(let{handler:ht}of this._handlers)ht.reset();this._inertia.clear(),this._fireEvents({},{},I),this._changes=[]}}isActive(){for(let{handler:I}of this._handlers)if(I.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!ba(this._eventsInProgress)||this.isZooming()}_blockedByActive(I,ht,Et){for(let It in I)if(It!==Et&&(!ht||ht.indexOf(It)<0))return!0;return!1}_getMapTouches(I){let ht=[];for(let Et of I)this._el.contains(Et.target)&&ht.push(Et);return ht}mergeHandlerResult(I,ht,Et,It,Vt){if(!Et)return;e.e(I,Et);let ke={handlerName:It,originalEvent:Et.originalEvent||Vt};Et.zoomDelta!==void 0&&(ht.zoom=ke),Et.panDelta!==void 0&&(ht.drag=ke),Et.pitchDelta!==void 0&&(ht.pitch=ke),Et.bearingDelta!==void 0&&(ht.rotate=ke)}_applyChanges(){let I={},ht={},Et={};for(let[It,Vt,ke]of this._changes)It.panDelta&&(I.panDelta=(I.panDelta||new e.P(0,0))._add(It.panDelta)),It.zoomDelta&&(I.zoomDelta=(I.zoomDelta||0)+It.zoomDelta),It.bearingDelta&&(I.bearingDelta=(I.bearingDelta||0)+It.bearingDelta),It.pitchDelta&&(I.pitchDelta=(I.pitchDelta||0)+It.pitchDelta),It.around!==void 0&&(I.around=It.around),It.pinchAround!==void 0&&(I.pinchAround=It.pinchAround),It.noInertia&&(I.noInertia=It.noInertia),e.e(ht,Vt),e.e(Et,ke);this._updateMapTransform(I,ht,Et),this._changes=[]}_updateMapTransform(I,ht,Et){let It=this._map,Vt=It._getTransformForUpdate(),ke=It.terrain;if(!(no(I)||ke&&this._terrainMovement))return this._fireEvents(ht,Et,!0);let{panDelta:De,zoomDelta:Ke,bearingDelta:gr,pitchDelta:Dr,around:Fr,pinchAround:ln}=I;ln!==void 0&&(Fr=ln),It._stop(!0),Fr=Fr||It.transform.centerPoint;let Mn=Vt.pointLocation(De?Fr.sub(De):Fr);gr&&(Vt.bearing+=gr),Dr&&(Vt.pitch+=Dr),Ke&&(Vt.zoom+=Ke),ke?this._terrainMovement||!ht.drag&&!ht.zoom?ht.drag&&this._terrainMovement?Vt.center=Vt.pointLocation(Vt.centerPoint.sub(De)):Vt.setLocationAtPoint(Mn,Fr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Vt.setLocationAtPoint(Mn,Fr)):Vt.setLocationAtPoint(Mn,Fr),It._applyUpdatedTransform(Vt),this._map._update(),I.noInertia||this._inertia.record(I),this._fireEvents(ht,Et,!0)}_fireEvents(I,ht,Et){let It=ba(this._eventsInProgress),Vt=ba(I),ke={};for(let Fr in I){let{originalEvent:ln}=I[Fr];this._eventsInProgress[Fr]||(ke[`${Fr}start`]=ln),this._eventsInProgress[Fr]=I[Fr]}!It&&Vt&&this._fireEvent("movestart",Vt.originalEvent);for(let Fr in ke)this._fireEvent(Fr,ke[Fr]);Vt&&this._fireEvent("move",Vt.originalEvent);for(let Fr in I){let{originalEvent:ln}=I[Fr];this._fireEvent(Fr,ln)}let De={},Ke;for(let Fr in this._eventsInProgress){let{handlerName:ln,originalEvent:Mn}=this._eventsInProgress[Fr];this._handlersById[ln].isActive()||(delete this._eventsInProgress[Fr],Ke=ht[ln]||Mn,De[`${Fr}end`]=Ke)}for(let Fr in De)this._fireEvent(Fr,De[Fr]);let gr=ba(this._eventsInProgress),Dr=(It||Vt)&&!gr;if(Dr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Fr=this._map._getTransformForUpdate();Fr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Fr)}if(Et&&Dr){this._updatingCamera=!0;let Fr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),ln=Mn=>Mn!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Ji("renderFrame",{timeStamp:I})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Xo extends e.E{constructor(I,ht){super(),this._renderFrameCallback=()=>{let Et=Math.min((o.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Et)),Et<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=I,this._bearingSnap=ht.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.N(this.transform.center.lng,this.transform.center.lat)}setCenter(I,ht){return this.jumpTo({center:I},ht)}panBy(I,ht,Et){return I=e.P.convert(I).mult(-1),this.panTo(this.transform.center,e.e({offset:I},ht),Et)}panTo(I,ht,Et){return this.easeTo(e.e({center:I},ht),Et)}getZoom(){return this.transform.zoom}setZoom(I,ht){return this.jumpTo({zoom:I},ht),this}zoomTo(I,ht,Et){return this.easeTo(e.e({zoom:I},ht),Et)}zoomIn(I,ht){return this.zoomTo(this.getZoom()+1,I,ht),this}zoomOut(I,ht){return this.zoomTo(this.getZoom()-1,I,ht),this}getBearing(){return this.transform.bearing}setBearing(I,ht){return this.jumpTo({bearing:I},ht),this}getPadding(){return this.transform.padding}setPadding(I,ht){return this.jumpTo({padding:I},ht),this}rotateTo(I,ht,Et){return this.easeTo(e.e({bearing:I},ht),Et)}resetNorth(I,ht){return this.rotateTo(0,e.e({duration:1e3},I),ht),this}resetNorthPitch(I,ht){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},I),ht),this}snapToNorth(I,ht){return Math.abs(this.getBearing()){if(this._zooming&&(It.zoom=e.y.number(Vt,xe,Nr)),this._rotating&&(It.bearing=e.y.number(ke,gr,Nr)),this._pitching&&(It.pitch=e.y.number(De,Dr,Nr)),this._padding&&(It.interpolatePadding(Ke,Fr,Nr),Mn=It.centerPoint.add(ln)),this.terrain&&!I.freezeElevation&&this._updateElevation(Nr),Ze)It.setLocationAtPoint(Ze,wr);else{let tn=It.zoomScale(It.zoom-Vt),pn=xe>Vt?Math.min(2,Ie):Math.max(.5,Ie),zn=Math.pow(pn,1-Nr),Bn=It.unproject(Ae.add(je.mult(Nr*zn)).mult(tn));It.setLocationAtPoint(It.renderWorldCopies?Bn.wrap():Bn,Mn)}this._applyUpdatedTransform(It),this._fireMoveEvents(ht)},Nr=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ht,Nr)},I),this}_prepareEase(I,ht,Et={}){this._moving=!0,ht||Et.moving||this.fire(new e.k("movestart",I)),this._zooming&&!Et.zooming&&this.fire(new e.k("zoomstart",I)),this._rotating&&!Et.rotating&&this.fire(new e.k("rotatestart",I)),this._pitching&&!Et.pitching&&this.fire(new e.k("pitchstart",I))}_prepareElevation(I){this._elevationCenter=I,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(I,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(I){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ht=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(I<1&&ht!==this._elevationTarget){let Et=this._elevationTarget-this._elevationStart;this._elevationStart+=I*(Et-(ht-(Et*I+this._elevationStart))/(1-I)),this._elevationTarget=ht}this.transform.elevation=e.y.number(this._elevationStart,this._elevationTarget,I)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(I){let ht=I.getCameraPosition(),Et=this.terrain.getElevationForLngLatZoom(ht.lngLat,I.zoom);if(ht.altitudethis._elevateCameraIfInsideTerrain(It)),this.transformCameraUpdate&&ht.push(It=>this.transformCameraUpdate(It)),!ht.length)return;let Et=I.clone();for(let It of ht){let Vt=Et.clone(),{center:ke,zoom:De,pitch:Ke,bearing:gr,elevation:Dr}=It(Vt);ke&&(Vt.center=ke),De!==void 0&&(Vt.zoom=De),Ke!==void 0&&(Vt.pitch=Ke),gr!==void 0&&(Vt.bearing=gr),Dr!==void 0&&(Vt.elevation=Dr),Et.apply(Vt)}this.transform.apply(Et)}_fireMoveEvents(I){this.fire(new e.k("move",I)),this._zooming&&this.fire(new e.k("zoom",I)),this._rotating&&this.fire(new e.k("rotate",I)),this._pitching&&this.fire(new e.k("pitch",I))}_afterEase(I,ht){if(this._easeId&&ht&&this._easeId===ht)return;delete this._easeId;let Et=this._zooming,It=this._rotating,Vt=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Et&&this.fire(new e.k("zoomend",I)),It&&this.fire(new e.k("rotateend",I)),Vt&&this.fire(new e.k("pitchend",I)),this.fire(new e.k("moveend",I))}flyTo(I,ht){var Et;if(!I.essential&&o.prefersReducedMotion){let wa=e.M(I,["center","zoom","bearing","pitch","around"]);return this.jumpTo(wa,ht)}this.stop(),I=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.b9},I);let It=this._getTransformForUpdate(),Vt=It.zoom,ke=It.bearing,De=It.pitch,Ke=It.padding,gr="bearing"in I?this._normalizeBearing(I.bearing,ke):ke,Dr="pitch"in I?+I.pitch:De,Fr="padding"in I?I.padding:It.padding,ln=e.P.convert(I.offset),Mn=It.centerPoint.add(ln),Xt=It.pointLocation(Mn),{center:ae,zoom:xe}=It.getConstrained(e.N.convert(I.center||Xt),(Et=I.zoom)!==null&&Et!==void 0?Et:Vt);this._normalizeCenter(ae,It);let Ae=It.zoomScale(xe-Vt),je=It.project(Xt),Ie=It.project(ae).sub(je),Ze=I.curve,wr=Math.max(It.width,It.height),Or=wr/Ae,Nr=Ie.mag();if("minZoom"in I){let wa=e.ac(Math.min(I.minZoom,Vt,xe),It.minZoom,It.maxZoom),so=wr/It.zoomScale(wa-Vt);Ze=Math.sqrt(so/Nr*2)}let tn=Ze*Ze;function pn(wa){let so=(Or*Or-wr*wr+(wa?-1:1)*tn*tn*Nr*Nr)/(2*(wa?Or:wr)*tn*Nr);return Math.log(Math.sqrt(so*so+1)-so)}function zn(wa){return(Math.exp(wa)-Math.exp(-wa))/2}function Bn(wa){return(Math.exp(wa)+Math.exp(-wa))/2}let ri=pn(!1),Di=function(wa){return Bn(ri)/Bn(ri+Ze*wa)},ha=function(wa){return wr*((Bn(ri)*(zn(so=ri+Ze*wa)/Bn(so))-zn(ri))/tn)/Nr;var so},ca=(pn(!0)-ri)/Ze;if(Math.abs(Nr)<1e-6||!isFinite(ca)){if(Math.abs(wr-Or)<1e-6)return this.easeTo(I,ht);let wa=Or0,Di=so=>Math.exp(wa*Ze*so)}return I.duration="duration"in I?+I.duration:1e3*ca/("screenSpeed"in I?+I.screenSpeed/Ze:+I.speed),I.maxDuration&&I.duration>I.maxDuration&&(I.duration=0),this._zooming=!0,this._rotating=ke!==gr,this._pitching=Dr!==De,this._padding=!It.isPaddingEqual(Fr),this._prepareEase(ht,!1),this.terrain&&this._prepareElevation(ae),this._ease(wa=>{let so=wa*ca,Bo=1/Di(so);It.zoom=wa===1?xe:Vt+It.scaleZoom(Bo),this._rotating&&(It.bearing=e.y.number(ke,gr,wa)),this._pitching&&(It.pitch=e.y.number(De,Dr,wa)),this._padding&&(It.interpolatePadding(Ke,Fr,wa),Mn=It.centerPoint.add(ln)),this.terrain&&!I.freezeElevation&&this._updateElevation(wa);let Eo=wa===1?ae:It.unproject(je.add(Ie.mult(ha(so))).mult(Bo));It.setLocationAtPoint(It.renderWorldCopies?Eo.wrap():Eo,Mn),this._applyUpdatedTransform(It),this._fireMoveEvents(ht)},()=>{this.terrain&&I.freezeElevation&&this._finalizeElevation(),this._afterEase(ht)},I),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(I,ht){var Et;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let It=this._onEaseEnd;delete this._onEaseEnd,It.call(this,ht)}return I||(Et=this.handlers)===null||Et===void 0||Et.stop(!1),this}_ease(I,ht,Et){Et.animate===!1||Et.duration===0?(I(1),ht()):(this._easeStart=o.now(),this._easeOptions=Et,this._onEaseFrame=I,this._onEaseEnd=ht,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(I,ht){I=e.b3(I,-180,180);let Et=Math.abs(I-ht);return Math.abs(I-360-ht)180?-360:Et<-180?360:0}queryTerrainElevation(I){return this.terrain?this.terrain.getElevationForLngLatZoom(e.N.convert(I),this.transform.tileZoom)-this.transform.elevation:null}}let ls={compact:!0,customAttribution:'MapLibre'};class ms{constructor(I=ls){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=ht=>{!ht||ht.sourceDataType!=="metadata"&&ht.sourceDataType!=="visibility"&&ht.dataType!=="style"&&ht.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=I}getDefaultPosition(){return"bottom-right"}onAdd(I){return this._map=I,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(I,ht){let Et=this._map._getUIString(`AttributionControl.${ht}`);I.title=Et,I.setAttribute("aria-label",Et)}_updateAttributions(){if(!this._map.style)return;let I=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?I=I.concat(this.options.customAttribution.map(It=>typeof It!="string"?"":It)):typeof this.options.customAttribution=="string"&&I.push(this.options.customAttribution)),this._map.style.stylesheet){let It=this._map.style.stylesheet;this.styleOwner=It.owner,this.styleId=It.id}let ht=this._map.style.sourceCaches;for(let It in ht){let Vt=ht[It];if(Vt.used||Vt.usedForTerrain){let ke=Vt.getSource();ke.attribution&&I.indexOf(ke.attribution)<0&&I.push(ke.attribution)}}I=I.filter(It=>String(It).trim()),I.sort((It,Vt)=>It.length-Vt.length),I=I.filter((It,Vt)=>{for(let ke=Vt+1;ke=0)return!1;return!0});let Et=I.join(" | ");Et!==this._attribHTML&&(this._attribHTML=Et,I.length?(this._innerContainer.innerHTML=Et,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class oo{constructor(I={}){this._updateCompact=()=>{let ht=this._container.children;if(ht.length){let Et=ht[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Et.classList.add("maplibregl-compact"):Et.classList.remove("maplibregl-compact")}},this.options=I}getDefaultPosition(){return"bottom-left"}onAdd(I){this._map=I,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let ht=i.create("a","maplibregl-ctrl-logo");return ht.target="_blank",ht.rel="noopener nofollow",ht.href="https://maplibre.org/",ht.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ht.setAttribute("rel","noopener nofollow"),this._container.appendChild(ht),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class qa{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(I){let ht=++this._id;return this._queue.push({callback:I,id:ht,cancelled:!1}),ht}remove(I){let ht=this._currentlyRunning,Et=ht?this._queue.concat(ht):this._queue;for(let It of Et)if(It.id===I)return void(It.cancelled=!0)}run(I=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ht=this._currentlyRunning=this._queue;this._queue=[];for(let Et of ht)if(!Et.cancelled&&(Et.callback(I),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var vs=e.Y([{name:"a_pos3d",type:"Int16",components:3}]);class rl extends e.E{constructor(I){super(),this.sourceCache=I,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,I.usedForTerrain=!0,I.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(I,ht){this.sourceCache.update(I,ht),this._renderableTilesKeys=[];let Et={};for(let It of I.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ht}))Et[It.key]=!0,this._renderableTilesKeys.push(It.key),this._tiles[It.key]||(It.posMatrix=new Float64Array(16),e.aP(It.posMatrix,0,e.X,0,e.X,0,1),this._tiles[It.key]=new oe(It,this.tileSize));for(let It in this._tiles)Et[It]||delete this._tiles[It]}freeRtt(I){for(let ht in this._tiles){let Et=this._tiles[ht];(!I||Et.tileID.equals(I)||Et.tileID.isChildOf(I)||I.isChildOf(Et.tileID))&&(Et.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(I=>this.getTileByID(I))}getTileByID(I){return this._tiles[I]}getTerrainCoords(I){let ht={};for(let Et of this._renderableTilesKeys){let It=this._tiles[Et].tileID;if(It.canonical.equals(I.canonical)){let Vt=I.clone();Vt.posMatrix=new Float64Array(16),e.aP(Vt.posMatrix,0,e.X,0,e.X,0,1),ht[Et]=Vt}else if(It.canonical.isChildOf(I.canonical)){let Vt=I.clone();Vt.posMatrix=new Float64Array(16);let ke=It.canonical.z-I.canonical.z,De=It.canonical.x-(It.canonical.x>>ke<>ke<>ke;e.aP(Vt.posMatrix,0,gr,0,gr,0,1),e.J(Vt.posMatrix,Vt.posMatrix,[-De*gr,-Ke*gr,0]),ht[Et]=Vt}else if(I.canonical.isChildOf(It.canonical)){let Vt=I.clone();Vt.posMatrix=new Float64Array(16);let ke=I.canonical.z-It.canonical.z,De=I.canonical.x-(I.canonical.x>>ke<>ke<>ke;e.aP(Vt.posMatrix,0,e.X,0,e.X,0,1),e.J(Vt.posMatrix,Vt.posMatrix,[De*gr,Ke*gr,0]),e.K(Vt.posMatrix,Vt.posMatrix,[1/2**ke,1/2**ke,0]),ht[Et]=Vt}}return ht}getSourceTile(I,ht){let Et=this.sourceCache._source,It=I.overscaledZ-this.deltaZoom;if(It>Et.maxzoom&&(It=Et.maxzoom),It=Et.minzoom&&(!Vt||!Vt.dem);)Vt=this.sourceCache.getTileByID(I.scaledTo(It--).key);return Vt}tilesAfterTime(I=Date.now()){return Object.values(this._tiles).filter(ht=>ht.timeAdded>=I)}}class Il{constructor(I,ht,Et){this.painter=I,this.sourceCache=new rl(ht),this.options=Et,this.exaggeration=typeof Et.exaggeration=="number"?Et.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(I,ht,Et,It=e.X){var Vt;if(!(ht>=0&&ht=0&&EtI.canonical.z&&(I.canonical.z>=It?Vt=I.canonical.z-It:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ke=I.canonical.x-(I.canonical.x>>Vt<>Vt<>8<<4|Vt>>8,ht[ke+3]=0;let Et=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ht.buffer)),It=new p(I,Et,I.gl.RGBA,{premultiply:!1});return It.bind(I.gl.NEAREST,I.gl.CLAMP_TO_EDGE),this._coordsTexture=It,It}pointCoordinate(I){this.painter.maybeDrawDepthAndCoords(!0);let ht=new Uint8Array(4),Et=this.painter.context,It=Et.gl,Vt=Math.round(I.x*this.painter.pixelRatio/devicePixelRatio),ke=Math.round(I.y*this.painter.pixelRatio/devicePixelRatio),De=Math.round(this.painter.height/devicePixelRatio);Et.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),It.readPixels(Vt,De-ke-1,1,1,It.RGBA,It.UNSIGNED_BYTE,ht),Et.bindFramebuffer.set(null);let Ke=ht[0]+(ht[2]>>4<<8),gr=ht[1]+((15&ht[2])<<8),Dr=this.coordsIndex[255-ht[3]],Fr=Dr&&this.sourceCache.getTileByID(Dr);if(!Fr)return null;let ln=this._coordsTextureSize,Mn=(1<I.id!==ht),this._recentlyUsed.push(I.id)}stampObject(I){I.stamp=++this._stamp}getOrCreateFreeObject(){for(let ht of this._recentlyUsed)if(!this._objects[ht].inUse)return this._objects[ht];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let I=this._createObject(this._objects.length);return this._objects.push(I),I}freeObject(I){I.inUse=!1}freeAllObjects(){for(let I of this._objects)this.freeObject(I)}isFull(){return!(this._objects.length!I.inUse)===!1}}let Wl={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class su{constructor(I,ht){this.painter=I,this.terrain=ht,this.pool=new ou(I.context,30,ht.sourceCache.tileSize*ht.qualityFactor)}destruct(){this.pool.destruct()}getTexture(I){return this.pool.getObjectForId(I.rtt[this._stacks.length-1].id).texture}prepareForRender(I,ht){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=I._order.filter(Et=>!I._layers[Et].isHidden(ht)),this._coordsDescendingInv={};for(let Et in I.sourceCaches){this._coordsDescendingInv[Et]={};let It=I.sourceCaches[Et].getVisibleCoordinates();for(let Vt of It){let ke=this.terrain.sourceCache.getTerrainCoords(Vt);for(let De in ke)this._coordsDescendingInv[Et][De]||(this._coordsDescendingInv[Et][De]=[]),this._coordsDescendingInv[Et][De].push(ke[De])}}this._coordsDescendingInvStr={};for(let Et of I._order){let It=I._layers[Et],Vt=It.source;if(Wl[It.type]&&!this._coordsDescendingInvStr[Vt]){this._coordsDescendingInvStr[Vt]={};for(let ke in this._coordsDescendingInv[Vt])this._coordsDescendingInvStr[Vt][ke]=this._coordsDescendingInv[Vt][ke].map(De=>De.key).sort().join()}}for(let Et of this._renderableTiles)for(let It in this._coordsDescendingInvStr){let Vt=this._coordsDescendingInvStr[It][Et.tileID.key];Vt&&Vt!==Et.rttCoords[It]&&(Et.rtt=[])}}renderLayer(I){if(I.isHidden(this.painter.transform.zoom))return!1;let ht=I.type,Et=this.painter,It=this._renderableLayerIds[this._renderableLayerIds.length-1]===I.id;if(Wl[ht]&&(this._prevType&&Wl[this._prevType]||this._stacks.push([]),this._prevType=ht,this._stacks[this._stacks.length-1].push(I.id),!It))return!0;if(Wl[this._prevType]||Wl[ht]&&It){this._prevType=ht;let Vt=this._stacks.length-1,ke=this._stacks[Vt]||[];for(let De of this._renderableTiles){if(this.pool.isFull()&&(zu(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(De),De.rtt[Vt]){let gr=this.pool.getObjectForId(De.rtt[Vt].id);if(gr.stamp===De.rtt[Vt].stamp){this.pool.useObject(gr);continue}}let Ke=this.pool.getOrCreateFreeObject();this.pool.useObject(Ke),this.pool.stampObject(Ke),De.rtt[Vt]={id:Ke.id,stamp:Ke.stamp},Et.context.bindFramebuffer.set(Ke.fbo.framebuffer),Et.context.clear({color:e.aM.transparent,stencil:0}),Et.currentStencilSource=void 0;for(let gr=0;gr{qt.touchstart=qt.dragStart,qt.touchmoveWindow=qt.dragMove,qt.touchend=qt.dragEnd},Oo={showCompass:!0,showZoom:!0,visualizePitch:!1};class Es{constructor(I,ht,Et=!1){this.mousedown=ke=>{this.startMouse(e.e({},ke,{ctrlKey:!0,preventDefault:()=>ke.preventDefault()}),i.mousePos(this.element,ke)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ke=>{this.moveMouse(ke,i.mousePos(this.element,ke))},this.mouseup=ke=>{this.mouseRotate.dragEnd(ke),this.mousePitch&&this.mousePitch.dragEnd(ke),this.offTemp()},this.touchstart=ke=>{ke.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,ke.targetTouches)[0],this.startTouch(ke,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=ke=>{ke.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,ke.targetTouches)[0],this.moveTouch(ke,this._lastPos))},this.touchend=ke=>{ke.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let It=I.dragRotate._mouseRotate.getClickTolerance(),Vt=I.dragRotate._mousePitch.getClickTolerance();this.element=ht,this.mouseRotate=vc({clickTolerance:It,enable:!0}),this.touchRotate=(({enable:ke,clickTolerance:De,bearingDegreesPerPixelMoved:Ke=.8})=>{let gr=new kf;return new th({clickTolerance:De,move:(Dr,Fr)=>({bearingDelta:(Fr.x-Dr.x)*Ke}),moveStateManager:gr,enable:ke,assignEvents:fu})})({clickTolerance:It,enable:!0}),this.map=I,Et&&(this.mousePitch=ed({clickTolerance:Vt,enable:!0}),this.touchPitch=(({enable:ke,clickTolerance:De,pitchDegreesPerPixelMoved:Ke=-.5})=>{let gr=new kf;return new th({clickTolerance:De,move:(Dr,Fr)=>({pitchDelta:(Fr.y-Dr.y)*Ke}),moveStateManager:gr,enable:ke,assignEvents:fu})})({clickTolerance:Vt,enable:!0})),i.addEventListener(ht,"mousedown",this.mousedown),i.addEventListener(ht,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(ht,"touchcancel",this.reset)}startMouse(I,ht){this.mouseRotate.dragStart(I,ht),this.mousePitch&&this.mousePitch.dragStart(I,ht),i.disableDrag()}startTouch(I,ht){this.touchRotate.dragStart(I,ht),this.touchPitch&&this.touchPitch.dragStart(I,ht),i.disableDrag()}moveMouse(I,ht){let Et=this.map,{bearingDelta:It}=this.mouseRotate.dragMove(I,ht)||{};if(It&&Et.setBearing(Et.getBearing()+It),this.mousePitch){let{pitchDelta:Vt}=this.mousePitch.dragMove(I,ht)||{};Vt&&Et.setPitch(Et.getPitch()+Vt)}}moveTouch(I,ht){let Et=this.map,{bearingDelta:It}=this.touchRotate.dragMove(I,ht)||{};if(It&&Et.setBearing(Et.getBearing()+It),this.touchPitch){let{pitchDelta:Vt}=this.touchPitch.dragMove(I,ht)||{};Vt&&Et.setPitch(Et.getPitch()+Vt)}}off(){let I=this.element;i.removeEventListener(I,"mousedown",this.mousedown),i.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(I,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let Yl;function Rl(qt,I,ht){let Et=new e.N(qt.lng,qt.lat);if(qt=new e.N(qt.lng,qt.lat),I){let It=new e.N(qt.lng-360,qt.lat),Vt=new e.N(qt.lng+360,qt.lat),ke=ht.locationPoint(qt).distSqr(I);ht.locationPoint(It).distSqr(I)180;){let It=ht.locationPoint(qt);if(It.x>=0&&It.y>=0&&It.x<=ht.width&&It.y<=ht.height)break;qt.lng>ht.center.lng?qt.lng-=360:qt.lng+=360}return qt.lng!==Et.lng&&ht.locationPoint(qt).y>ht.height/2-ht.getHorizon()?qt:Et}let yc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Hc(qt,I,ht){let Et=qt.classList;for(let It in yc)Et.remove(`maplibregl-${ht}-anchor-${It}`);Et.add(`maplibregl-${ht}-anchor-${I}`)}class zc extends e.E{constructor(I){if(super(),this._onKeyPress=ht=>{let Et=ht.code,It=ht.charCode||ht.keyCode;Et!=="Space"&&Et!=="Enter"&&It!==32&&It!==13||this.togglePopup()},this._onMapClick=ht=>{let Et=ht.originalEvent.target,It=this._element;this._popup&&(Et===It||It.contains(Et))&&this.togglePopup()},this._update=ht=>{var Et;if(!this._map)return;let It=this._map.loaded()&&!this._map.isMoving();(ht?.type==="terrain"||ht?.type==="render"&&!It)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Rl(this._lngLat,this._flatPos,this._map.transform):(Et=this._lngLat)===null||Et===void 0?void 0:Et.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Vt="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Vt=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Vt=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ke="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ke="rotateX(0deg)":this._pitchAlignment==="map"&&(ke=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ht&&ht.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${yc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ke} ${Vt}`),o.frameAsync(new AbortController).then(()=>{this._updateOpacity(ht&&ht.type==="moveend")}).catch(()=>{})},this._onMove=ht=>{if(!this._isDragging){let Et=this._clickTolerance||this._map._clickTolerance;this._isDragging=ht.point.dist(this._pointerdownPos)>=Et}this._isDragging&&(this._pos=ht.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.k("dragend")),this._state="inactive"},this._addDragHandler=ht=>{this._element.contains(ht.originalEvent.target)&&(ht.preventDefault(),this._positionDelta=ht.point.sub(this._pos).add(this._offset),this._pointerdownPos=ht.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=I&&I.anchor||"center",this._color=I&&I.color||"#3FB1CE",this._scale=I&&I.scale||1,this._draggable=I&&I.draggable||!1,this._clickTolerance=I&&I.clickTolerance||0,this._subpixelPositioning=I&&I.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=I&&I.rotation||0,this._rotationAlignment=I&&I.rotationAlignment||"auto",this._pitchAlignment=I&&I.pitchAlignment&&I.pitchAlignment!=="auto"?I.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(I?.opacity,I?.opacityWhenCovered),I&&I.element)this._element=I.element,this._offset=e.P.convert(I&&I.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let ht=i.createNS("http://www.w3.org/2000/svg","svg"),Et=41,It=27;ht.setAttributeNS(null,"display","block"),ht.setAttributeNS(null,"height",`${Et}px`),ht.setAttributeNS(null,"width",`${It}px`),ht.setAttributeNS(null,"viewBox",`0 0 ${It} ${Et}`);let Vt=i.createNS("http://www.w3.org/2000/svg","g");Vt.setAttributeNS(null,"stroke","none"),Vt.setAttributeNS(null,"stroke-width","1"),Vt.setAttributeNS(null,"fill","none"),Vt.setAttributeNS(null,"fill-rule","evenodd");let ke=i.createNS("http://www.w3.org/2000/svg","g");ke.setAttributeNS(null,"fill-rule","nonzero");let De=i.createNS("http://www.w3.org/2000/svg","g");De.setAttributeNS(null,"transform","translate(3.0, 29.0)"),De.setAttributeNS(null,"fill","#000000");let Ke=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let Ae of Ke){let je=i.createNS("http://www.w3.org/2000/svg","ellipse");je.setAttributeNS(null,"opacity","0.04"),je.setAttributeNS(null,"cx","10.5"),je.setAttributeNS(null,"cy","5.80029008"),je.setAttributeNS(null,"rx",Ae.rx),je.setAttributeNS(null,"ry",Ae.ry),De.appendChild(je)}let gr=i.createNS("http://www.w3.org/2000/svg","g");gr.setAttributeNS(null,"fill",this._color);let Dr=i.createNS("http://www.w3.org/2000/svg","path");Dr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),gr.appendChild(Dr);let Fr=i.createNS("http://www.w3.org/2000/svg","g");Fr.setAttributeNS(null,"opacity","0.25"),Fr.setAttributeNS(null,"fill","#000000");let ln=i.createNS("http://www.w3.org/2000/svg","path");ln.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Fr.appendChild(ln);let Mn=i.createNS("http://www.w3.org/2000/svg","g");Mn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Mn.setAttributeNS(null,"fill","#FFFFFF");let Xt=i.createNS("http://www.w3.org/2000/svg","g");Xt.setAttributeNS(null,"transform","translate(8.0, 8.0)");let ae=i.createNS("http://www.w3.org/2000/svg","circle");ae.setAttributeNS(null,"fill","#000000"),ae.setAttributeNS(null,"opacity","0.25"),ae.setAttributeNS(null,"cx","5.5"),ae.setAttributeNS(null,"cy","5.5"),ae.setAttributeNS(null,"r","5.4999962");let xe=i.createNS("http://www.w3.org/2000/svg","circle");xe.setAttributeNS(null,"fill","#FFFFFF"),xe.setAttributeNS(null,"cx","5.5"),xe.setAttributeNS(null,"cy","5.5"),xe.setAttributeNS(null,"r","5.4999962"),Xt.appendChild(ae),Xt.appendChild(xe),ke.appendChild(De),ke.appendChild(gr),ke.appendChild(Fr),ke.appendChild(Mn),ke.appendChild(Xt),ht.appendChild(ke),ht.setAttributeNS(null,"height",Et*this._scale+"px"),ht.setAttributeNS(null,"width",It*this._scale+"px"),this._element.appendChild(ht),this._offset=e.P.convert(I&&I.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ht=>{ht.preventDefault()}),this._element.addEventListener("mousedown",ht=>{ht.preventDefault()}),Hc(this._element,this._anchor,"marker"),I&&I.className)for(let ht of I.className.split(" "))this._element.classList.add(ht);this._popup=null}addTo(I){return this.remove(),this._map=I,this._element.setAttribute("aria-label",I._getUIString("Marker.Title")),I.getCanvasContainer().appendChild(this._element),I.on("move",this._update),I.on("moveend",this._update),I.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(I){return this._lngLat=e.N.convert(I),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(I){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),I){if(!("offset"in I.options)){let ht=Math.abs(13.5)/Math.SQRT2;I.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ht,-1*(38.1-13.5+ht)],"bottom-right":[-ht,-1*(38.1-13.5+ht)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=I,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(I){return this._subpixelPositioning=I,this}getPopup(){return this._popup}togglePopup(){let I=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:I?(I.isOpen()?I.remove():(I.setLngLat(this._lngLat),I.addTo(this._map)),this):this}_updateOpacity(I=!1){var ht,Et;if(!(!((ht=this._map)===null||ht===void 0)&&ht.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(I)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let It=this._map,Vt=It.terrain.depthAtPoint(this._pos),ke=It.terrain.getElevationForLngLatZoom(this._lngLat,It.transform.tileZoom);if(It.transform.lngLatToCameraDepth(this._lngLat,ke)-Vt<.006)return void(this._element.style.opacity=this._opacity);let De=-this._offset.y/It.transform._pixelPerMeter,Ke=Math.sin(It.getPitch()*Math.PI/180)*De,gr=It.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Dr=It.transform.lngLatToCameraDepth(this._lngLat,ke+Ke)-gr>.006;!((Et=this._popup)===null||Et===void 0)&&Et.isOpen()&&Dr&&this._popup.remove(),this._element.style.opacity=Dr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(I){return this._offset=e.P.convert(I),this._update(),this}addClassName(I){this._element.classList.add(I)}removeClassName(I){this._element.classList.remove(I)}toggleClassName(I){return this._element.classList.toggle(I)}setDraggable(I){return this._draggable=!!I,this._map&&(I?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(I){return this._rotation=I||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(I){return this._rotationAlignment=I||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(I){return this._pitchAlignment=I&&I!=="auto"?I:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(I,ht){return I===void 0&&ht===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),I!==void 0&&(this._opacity=I),ht!==void 0&&(this._opacityWhenCovered=ht),this._map&&this._updateOpacity(!0),this}}let zh={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wc=0,Ih=!1,Iu={maxWidth:100,unit:"metric"};function Oh(qt,I,ht){let Et=ht&&ht.maxWidth||100,It=qt._container.clientHeight/2,Vt=qt.unproject([0,It]),ke=qt.unproject([Et,It]),De=Vt.distanceTo(ke);if(ht&&ht.unit==="imperial"){let Ke=3.2808*De;Ke>5280?is(I,Et,Ke/5280,qt._getUIString("ScaleControl.Miles")):is(I,Et,Ke,qt._getUIString("ScaleControl.Feet"))}else ht&&ht.unit==="nautical"?is(I,Et,De/1852,qt._getUIString("ScaleControl.NauticalMiles")):De>=1e3?is(I,Et,De/1e3,qt._getUIString("ScaleControl.Kilometers")):is(I,Et,De,qt._getUIString("ScaleControl.Meters"))}function is(qt,I,ht,Et){let It=function(Vt){let ke=Math.pow(10,`${Math.floor(Vt)}`.length-1),De=Vt/ke;return De=De>=10?10:De>=5?5:De>=3?3:De>=2?2:De>=1?1:function(Ke){let gr=Math.pow(10,Math.ceil(-Math.log(Ke)/Math.LN10));return Math.round(Ke*gr)/gr}(De),ke*De}(ht);qt.style.width=I*(It/ht)+"px",qt.innerHTML=`${It} ${Et}`}let Os={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},qc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Zu(qt){if(qt){if(typeof qt=="number"){let I=Math.round(Math.abs(qt)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,qt),"top-left":new e.P(I,I),"top-right":new e.P(-I,I),bottom:new e.P(0,-qt),"bottom-left":new e.P(I,-I),"bottom-right":new e.P(-I,-I),left:new e.P(qt,0),right:new e.P(-qt,0)}}if(qt instanceof e.P||Array.isArray(qt)){let I=e.P.convert(qt);return{center:I,top:I,"top-left":I,"top-right":I,bottom:I,"bottom-left":I,"bottom-right":I,left:I,right:I}}return{center:e.P.convert(qt.center||[0,0]),top:e.P.convert(qt.top||[0,0]),"top-left":e.P.convert(qt["top-left"]||[0,0]),"top-right":e.P.convert(qt["top-right"]||[0,0]),bottom:e.P.convert(qt.bottom||[0,0]),"bottom-left":e.P.convert(qt["bottom-left"]||[0,0]),"bottom-right":e.P.convert(qt["bottom-right"]||[0,0]),left:e.P.convert(qt.left||[0,0]),right:e.P.convert(qt.right||[0,0])}}return Zu(new e.P(0,0))}let Gf=r;t.AJAXError=e.bh,t.Evented=e.E,t.LngLat=e.N,t.MercatorCoordinate=e.Z,t.Point=e.P,t.addProtocol=e.bi,t.config=e.a,t.removeProtocol=e.bj,t.AttributionControl=ms,t.BoxZoomHandler=Vc,t.CanvasSource=de,t.CooperativeGesturesHandler=Pa,t.DoubleClickZoomHandler=hi,t.DragPanHandler=Da,t.DragRotateHandler=$a,t.EdgeInsets=Ec,t.FullscreenControl=class extends e.E{constructor(qt={}){super(),this._onFullscreenChange=()=>{var I;let ht=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((I=ht?.shadowRoot)===null||I===void 0)&&I.fullscreenElement;)ht=ht.shadowRoot.fullscreenElement;ht===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,qt&&qt.container&&(qt.container instanceof HTMLElement?this._container=qt.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(qt){return this._map=qt,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let qt=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",qt).setAttribute("aria-hidden","true"),qt.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let qt=this._getTitle();this._fullscreenButton.setAttribute("aria-label",qt),this._fullscreenButton.title=qt}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},t.GeoJSONSource=Ht,t.GeolocateControl=class extends e.E{constructor(qt){super(),this._onSuccess=I=>{if(this._map){if(this._isOutOfMapMaxBounds(I))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",I)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=I,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(I),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(I),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",I)),this._finish()}},this._updateCamera=I=>{let ht=new e.N(I.coords.longitude,I.coords.latitude),Et=I.coords.accuracy,It=this._map.getBearing(),Vt=e.e({bearing:It},this.options.fitBoundsOptions),ke=ut.fromLngLat(ht,Et);this._map.fitBounds(ke,Vt,{geolocateSource:!0})},this._updateMarker=I=>{if(I){let ht=new e.N(I.coords.longitude,I.coords.latitude);this._accuracyCircleMarker.setLngLat(ht).addTo(this._map),this._userLocationDotMarker.setLngLat(ht).addTo(this._map),this._accuracy=I.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=I=>{if(this._map){if(this.options.trackUserLocation)if(I.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(I.code===3&&Ih)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",I)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",I=>I.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=I=>{if(this._map){if(I===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}else{let ht=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new zc({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new zc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ht=>{ht.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ht.originalEvent&&ht.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")),this.fire(new e.k("userlocationlostfocus")))})}},this.options=e.e({},zh,qt)}onAdd(qt){return this._map=qt,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(I=!1){if(Yl!==void 0&&!I)return Yl;if(window.navigator.permissions===void 0)return Yl=!!window.navigator.geolocation,Yl;try{Yl=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Yl=!!window.navigator.geolocation}return Yl})}().then(I=>this._finishSetupUI(I)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Wc=0,Ih=!1}_isOutOfMapMaxBounds(qt){let I=this._map.getMaxBounds(),ht=qt.coords;return I&&(ht.longitudeI.getEast()||ht.latitudeI.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let qt=this._map.getBounds(),I=qt.getSouthEast(),ht=qt.getNorthEast(),Et=I.distanceTo(ht),It=Math.ceil(this._accuracy/(Et/this._map._container.clientHeight)*2);this._circleElement.style.width=`${It}px`,this._circleElement.style.height=`${It}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wc--,Ih=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.k("trackuserlocationstart")),this.fire(new e.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let qt;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Wc++,Wc>1?(qt={maximumAge:6e5,timeout:0},Ih=!0):(qt=this.options.positionOptions,Ih=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,qt)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},t.Hash=vh,t.ImageSource=ge,t.KeyboardHandler=Ur,t.LngLatBounds=ut,t.LogoControl=oo,t.Map=class extends Xo{constructor(qt){e.bf.mark(e.bg.create);let I=Object.assign(Object.assign({},Lu),qt);if(I.minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new _u(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),{bearingSnap:I.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new qa,this._controls=[],this._mapId=e.a4(),this._contextLost=ht=>{ht.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new e.k("webglcontextlost",{originalEvent:ht}))},this._contextRestored=ht=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:ht}))},this._onMapScroll=ht=>{if(ht.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=I.interactive,this._maxTileCacheSize=I.maxTileCacheSize,this._maxTileCacheZoomLevels=I.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=I.preserveDrawingBuffer===!0,this._antialias=I.antialias===!0,this._trackResize=I.trackResize===!0,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles===!0,this._fadeDuration=I.fadeDuration,this._crossSourceCollisions=I.crossSourceCollisions===!0,this._collectResourceTiming=I.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},vl),I.locale),this._clickTolerance=I.clickTolerance,this._overridePixelRatio=I.pixelRatio,this._maxCanvasSize=I.maxCanvasSize,this.transformCameraUpdate=I.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=I.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=u.addThrottleControl(()=>this.isMoving()),this._requestManager=new b(I.transformRequest),typeof I.container=="string"){if(this._container=document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(I.maxBounds&&this.setMaxBounds(I.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ht=!1,Et=uf(It=>{this._trackResize&&!this._removed&&(this.resize(It),this.redraw())},50);this._resizeObserver=new ResizeObserver(It=>{ht?Et(It):ht=!0}),this._resizeObserver.observe(this._container)}this.handlers=new as(this,I),this._hash=I.hash&&new vh(typeof I.hash=="string"&&I.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:I.center,zoom:I.zoom,bearing:I.bearing,pitch:I.pitch}),I.bounds&&(this.resize(),this.fitBounds(I.bounds,e.e({},I.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=I.localIdeographFontFamily,this._validateStyle=I.validateStyle,I.style&&this.setStyle(I.style,{localIdeographFontFamily:I.localIdeographFontFamily}),I.attributionControl&&this.addControl(new ms(typeof I.attributionControl=="boolean"?void 0:I.attributionControl)),I.maplibreLogo&&this.addControl(new oo,I.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ht=>{this._update(ht.dataType==="style"),this.fire(new e.k(`${ht.dataType}data`,ht))}),this.on("dataloading",ht=>{this.fire(new e.k(`${ht.dataType}dataloading`,ht))}),this.on("dataabort",ht=>{this.fire(new e.k("sourcedataabort",ht))})}_getMapId(){return this._mapId}addControl(qt,I){if(I===void 0&&(I=qt.getDefaultPosition?qt.getDefaultPosition():"top-right"),!qt||!qt.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let ht=qt.onAdd(this);this._controls.push(qt);let Et=this._controlPositions[I];return I.indexOf("bottom")!==-1?Et.insertBefore(ht,Et.firstChild):Et.appendChild(ht),this}removeControl(qt){if(!qt||!qt.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let I=this._controls.indexOf(qt);return I>-1&&this._controls.splice(I,1),qt.onRemove(this),this}hasControl(qt){return this._controls.indexOf(qt)>-1}calculateCameraOptionsFromTo(qt,I,ht,Et){return Et==null&&this.terrain&&(Et=this.terrain.getElevationForLngLatZoom(ht,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(qt,I,ht,Et)}resize(qt){var I;let ht=this._containerDimensions(),Et=ht[0],It=ht[1],Vt=this._getClampedPixelRatio(Et,It);if(this._resizeCanvas(Et,It,Vt),this.painter.resize(Et,It,Vt),this.painter.overLimit()){let De=this.painter.context.gl;this._maxCanvasSize=[De.drawingBufferWidth,De.drawingBufferHeight];let Ke=this._getClampedPixelRatio(Et,It);this._resizeCanvas(Et,It,Ke),this.painter.resize(Et,It,Ke)}this.transform.resize(Et,It),(I=this._requestedCameraState)===null||I===void 0||I.resize(Et,It);let ke=!this._moving;return ke&&(this.stop(),this.fire(new e.k("movestart",qt)).fire(new e.k("move",qt))),this.fire(new e.k("resize",qt)),ke&&this.fire(new e.k("moveend",qt)),this}_getClampedPixelRatio(qt,I){let{0:ht,1:Et}=this._maxCanvasSize,It=this.getPixelRatio(),Vt=qt*It,ke=I*It;return Math.min(Vt>ht?ht/Vt:1,ke>Et?Et/ke:1)*It}getPixelRatio(){var qt;return(qt=this._overridePixelRatio)!==null&&qt!==void 0?qt:devicePixelRatio}setPixelRatio(qt){this._overridePixelRatio=qt,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(qt){return this.transform.setMaxBounds(ut.convert(qt)),this._update()}setMinZoom(qt){if((qt=qt??-2)>=-2&&qt<=this.transform.maxZoom)return this.transform.minZoom=qt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=qt,this._update(),this.getZoom()>qt&&this.setZoom(qt),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(qt){if((qt=qt??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(qt>=0&&qt<=this.transform.maxPitch)return this.transform.minPitch=qt,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(qt>=this.transform.minPitch)return this.transform.maxPitch=qt,this._update(),this.getPitch()>qt&&this.setPitch(qt),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(qt){return this.transform.renderWorldCopies=qt,this._update()}project(qt){return this.transform.locationPoint(e.N.convert(qt),this.style&&this.terrain)}unproject(qt){return this.transform.pointLocation(e.P.convert(qt),this.terrain)}isMoving(){var qt;return this._moving||((qt=this.handlers)===null||qt===void 0?void 0:qt.isMoving())}isZooming(){var qt;return this._zooming||((qt=this.handlers)===null||qt===void 0?void 0:qt.isZooming())}isRotating(){var qt;return this._rotating||((qt=this.handlers)===null||qt===void 0?void 0:qt.isRotating())}_createDelegatedListener(qt,I,ht){if(qt==="mouseenter"||qt==="mouseover"){let Et=!1;return{layers:I,listener:ht,delegates:{mousemove:It=>{let Vt=I.filter(De=>this.getLayer(De)),ke=Vt.length!==0?this.queryRenderedFeatures(It.point,{layers:Vt}):[];ke.length?Et||(Et=!0,ht.call(this,new Qc(qt,this,It.originalEvent,{features:ke}))):Et=!1},mouseout:()=>{Et=!1}}}}if(qt==="mouseleave"||qt==="mouseout"){let Et=!1;return{layers:I,listener:ht,delegates:{mousemove:It=>{let Vt=I.filter(ke=>this.getLayer(ke));(Vt.length!==0?this.queryRenderedFeatures(It.point,{layers:Vt}):[]).length?Et=!0:Et&&(Et=!1,ht.call(this,new Qc(qt,this,It.originalEvent)))},mouseout:It=>{Et&&(Et=!1,ht.call(this,new Qc(qt,this,It.originalEvent)))}}}}{let Et=It=>{let Vt=I.filter(De=>this.getLayer(De)),ke=Vt.length!==0?this.queryRenderedFeatures(It.point,{layers:Vt}):[];ke.length&&(It.features=ke,ht.call(this,It),delete It.features)};return{layers:I,listener:ht,delegates:{[qt]:Et}}}}_saveDelegatedListener(qt,I){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[qt]=this._delegatedListeners[qt]||[],this._delegatedListeners[qt].push(I)}_removeDelegatedListener(qt,I,ht){if(!this._delegatedListeners||!this._delegatedListeners[qt])return;let Et=this._delegatedListeners[qt];for(let It=0;ItI.includes(ke))){for(let ke in Vt.delegates)this.off(ke,Vt.delegates[ke]);return void Et.splice(It,1)}}}on(qt,I,ht){if(ht===void 0)return super.on(qt,I);let Et=this._createDelegatedListener(qt,typeof I=="string"?[I]:I,ht);this._saveDelegatedListener(qt,Et);for(let It in Et.delegates)this.on(It,Et.delegates[It]);return this}once(qt,I,ht){if(ht===void 0)return super.once(qt,I);let Et=typeof I=="string"?[I]:I,It=this._createDelegatedListener(qt,Et,ht);for(let Vt in It.delegates){let ke=It.delegates[Vt];It.delegates[Vt]=(...De)=>{this._removeDelegatedListener(qt,Et,ht),ke(...De)}}this._saveDelegatedListener(qt,It);for(let Vt in It.delegates)this.once(Vt,It.delegates[Vt]);return this}off(qt,I,ht){return ht===void 0?super.off(qt,I):(this._removeDelegatedListener(qt,typeof I=="string"?[I]:I,ht),this)}queryRenderedFeatures(qt,I){if(!this.style)return[];let ht,Et=qt instanceof e.P||Array.isArray(qt),It=Et?qt:[[0,0],[this.transform.width,this.transform.height]];if(I=I||(Et?{}:qt)||{},It instanceof e.P||typeof It[0]=="number")ht=[e.P.convert(It)];else{let Vt=e.P.convert(It[0]),ke=e.P.convert(It[1]);ht=[Vt,new e.P(ke.x,Vt.y),ke,new e.P(Vt.x,ke.y),Vt]}return this.style.queryRenderedFeatures(ht,I,this.transform)}querySourceFeatures(qt,I){return this.style.querySourceFeatures(qt,I)}setStyle(qt,I){return(I=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},I)).diff!==!1&&I.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&qt?(this._diffStyle(qt,I),this):(this._localIdeographFontFamily=I.localIdeographFontFamily,this._updateStyle(qt,I))}setTransformRequest(qt){return this._requestManager.setTransformRequest(qt),this}_getUIString(qt){let I=this._locale[qt];if(I==null)throw new Error(`Missing UI string '${qt}'`);return I}_updateStyle(qt,I){if(I.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(qt,I));let ht=this.style&&I.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!qt)),qt?(this.style=new Gr(this,I||{}),this.style.setEventedParent(this,{style:this.style}),typeof qt=="string"?this.style.loadURL(qt,I,ht):this.style.loadJSON(qt,I,ht),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Gr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(qt,I){if(typeof qt=="string"){let ht=this._requestManager.transformRequest(qt,"Style");e.h(ht,new AbortController).then(Et=>{this._updateDiff(Et.data,I)}).catch(Et=>{Et&&this.fire(new e.j(Et))})}else typeof qt=="object"&&this._updateDiff(qt,I)}_updateDiff(qt,I){try{this.style.setState(qt,I)&&this._update(!0)}catch(ht){e.w(`Unable to perform style diff: ${ht.message||ht.error||ht}. Rebuilding the style from scratch.`),this._updateStyle(qt,I)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource(qt,I){return this._lazyInitEmptyStyle(),this.style.addSource(qt,I),this._update(!0)}isSourceLoaded(qt){let I=this.style&&this.style.sourceCaches[qt];if(I!==void 0)return I.loaded();this.fire(new e.j(new Error(`There is no source with ID '${qt}'`)))}setTerrain(qt){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),qt){let I=this.style.sourceCaches[qt.source];if(!I)throw new Error(`cannot load terrain, because there exists no source with ID: ${qt.source}`);this.terrain===null&&I.reload();for(let ht in this.style._layers){let Et=this.style._layers[ht];Et.type==="hillshade"&&Et.source===qt.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Il(this.painter,I,qt),this.painter.renderToTexture=new su(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ht=>{ht.dataType==="style"?this.terrain.sourceCache.freeRtt():ht.dataType==="source"&&ht.tile&&(ht.sourceId!==qt.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ht.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:qt})),this}getTerrain(){var qt,I;return(I=(qt=this.terrain)===null||qt===void 0?void 0:qt.options)!==null&&I!==void 0?I:null}areTilesLoaded(){let qt=this.style&&this.style.sourceCaches;for(let I in qt){let ht=qt[I]._tiles;for(let Et in ht){let It=ht[Et];if(It.state!=="loaded"&&It.state!=="errored")return!1}}return!0}removeSource(qt){return this.style.removeSource(qt),this._update(!0)}getSource(qt){return this.style.getSource(qt)}addImage(qt,I,ht={}){let{pixelRatio:Et=1,sdf:It=!1,stretchX:Vt,stretchY:ke,content:De,textFitWidth:Ke,textFitHeight:gr}=ht;if(this._lazyInitEmptyStyle(),!(I instanceof HTMLImageElement||e.b(I))){if(I.width===void 0||I.height===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Dr,height:Fr,data:ln}=I,Mn=I;return this.style.addImage(qt,{data:new e.R({width:Dr,height:Fr},new Uint8Array(ln)),pixelRatio:Et,stretchX:Vt,stretchY:ke,content:De,textFitWidth:Ke,textFitHeight:gr,sdf:It,version:0,userImage:Mn}),Mn.onAdd&&Mn.onAdd(this,qt),this}}{let{width:Dr,height:Fr,data:ln}=o.getImageData(I);this.style.addImage(qt,{data:new e.R({width:Dr,height:Fr},ln),pixelRatio:Et,stretchX:Vt,stretchY:ke,content:De,textFitWidth:Ke,textFitHeight:gr,sdf:It,version:0})}}updateImage(qt,I){let ht=this.style.getImage(qt);if(!ht)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Et=I instanceof HTMLImageElement||e.b(I)?o.getImageData(I):I,{width:It,height:Vt,data:ke}=Et;if(It===void 0||Vt===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(It!==ht.data.width||Vt!==ht.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let De=!(I instanceof HTMLImageElement||e.b(I));return ht.data.replace(ke,De),this.style.updateImage(qt,ht),this}getImage(qt){return this.style.getImage(qt)}hasImage(qt){return qt?!!this.style.getImage(qt):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage(qt){this.style.removeImage(qt)}loadImage(qt){return u.getImage(this._requestManager.transformRequest(qt,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(qt,I){return this._lazyInitEmptyStyle(),this.style.addLayer(qt,I),this._update(!0)}moveLayer(qt,I){return this.style.moveLayer(qt,I),this._update(!0)}removeLayer(qt){return this.style.removeLayer(qt),this._update(!0)}getLayer(qt){return this.style.getLayer(qt)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(qt,I,ht){return this.style.setLayerZoomRange(qt,I,ht),this._update(!0)}setFilter(qt,I,ht={}){return this.style.setFilter(qt,I,ht),this._update(!0)}getFilter(qt){return this.style.getFilter(qt)}setPaintProperty(qt,I,ht,Et={}){return this.style.setPaintProperty(qt,I,ht,Et),this._update(!0)}getPaintProperty(qt,I){return this.style.getPaintProperty(qt,I)}setLayoutProperty(qt,I,ht,Et={}){return this.style.setLayoutProperty(qt,I,ht,Et),this._update(!0)}getLayoutProperty(qt,I){return this.style.getLayoutProperty(qt,I)}setGlyphs(qt,I={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(qt,I),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(qt,I,ht={}){return this._lazyInitEmptyStyle(),this.style.addSprite(qt,I,ht,Et=>{Et||this._update(!0)}),this}removeSprite(qt){return this._lazyInitEmptyStyle(),this.style.removeSprite(qt),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(qt,I={}){return this._lazyInitEmptyStyle(),this.style.setSprite(qt,I,ht=>{ht||this._update(!0)}),this}setLight(qt,I={}){return this._lazyInitEmptyStyle(),this.style.setLight(qt,I),this._update(!0)}getLight(){return this.style.getLight()}setSky(qt){return this._lazyInitEmptyStyle(),this.style.setSky(qt),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(qt,I){return this.style.setFeatureState(qt,I),this._update()}removeFeatureState(qt,I){return this.style.removeFeatureState(qt,I),this._update()}getFeatureState(qt){return this.style.getFeatureState(qt)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let qt=0,I=0;return this._container&&(qt=this._container.clientWidth||400,I=this._container.clientHeight||300),[qt,I]}_setupContainer(){let qt=this._container;qt.classList.add("maplibregl-map");let I=this._canvasContainer=i.create("div","maplibregl-canvas-container",qt);this._interactive&&I.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",I),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let ht=this._containerDimensions(),Et=this._getClampedPixelRatio(ht[0],ht[1]);this._resizeCanvas(ht[0],ht[1],Et);let It=this._controlContainer=i.create("div","maplibregl-control-container",qt),Vt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ke=>{Vt[ke]=i.create("div",`maplibregl-ctrl-${ke} `,It)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(qt,I,ht){this._canvas.width=Math.floor(ht*qt),this._canvas.height=Math.floor(ht*I),this._canvas.style.width=`${qt}px`,this._canvas.style.height=`${I}px`}_setupPainter(){let qt={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},I=null;this._canvas.addEventListener("webglcontextcreationerror",Et=>{I={requestedAttributes:qt},Et&&(I.statusMessage=Et.statusMessage,I.type=Et.type)},{once:!0});let ht=this._canvas.getContext("webgl2",qt)||this._canvas.getContext("webgl",qt);if(!ht){let Et="Failed to initialize WebGL";throw I?(I.message=Et,new Error(JSON.stringify(I))):new Error(Et)}this.painter=new Wh(ht,this.transform),s.testSupport(ht)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(qt){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||qt,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(qt){return this._update(),this._renderTaskQueue.add(qt)}_cancelRenderFrame(qt){this._renderTaskQueue.remove(qt)}_render(qt){let I=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(qt),this._removed)return;let ht=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let It=this.transform.zoom,Vt=o.now();this.style.zoomHistory.update(It,Vt);let ke=new e.z(It,{now:Vt,fadeDuration:I,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),De=ke.crossFadingFactor();De===1&&De===this._crossFadingFactor||(ht=!0,this._crossFadingFactor=De),this.style.update(ke)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,I,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:I,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.bf.mark(e.bg.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||ht)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Et=this._sourcesDirty||this._styleDirty||this._placementDirty;return Et||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||Et||(this._fullyLoaded=!0,e.bf.mark(e.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var qt;this._hash&&this._hash.remove();for(let ht of this._controls)ht.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),u.removeThrottleControl(this._imageQueueHandle),(qt=this._resizeObserver)===null||qt===void 0||qt.disconnect();let I=this.painter.context.gl.getExtension("WEBGL_lose_context");I!=null&&I.loseContext&&I.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),e.bf.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then(qt=>{e.bf.frame(qt),this._frameRequest=null,this._render(qt)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(qt){this._showTileBoundaries!==qt&&(this._showTileBoundaries=qt,this._update())}get showPadding(){return!!this._showPadding}set showPadding(qt){this._showPadding!==qt&&(this._showPadding=qt,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(qt){this._showCollisionBoxes!==qt&&(this._showCollisionBoxes=qt,qt?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(qt){this._showOverdrawInspector!==qt&&(this._showOverdrawInspector=qt,this._update())}get repaint(){return!!this._repaint}set repaint(qt){this._repaint!==qt&&(this._repaint=qt,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(qt){this._vertices=qt,this._update()}get version(){return qu}getCameraTargetElevation(){return this.transform.elevation}},t.MapMouseEvent=Qc,t.MapTouchEvent=ff,t.MapWheelEvent=If,t.Marker=zc,t.NavigationControl=class{constructor(qt){this._updateZoomButtons=()=>{let I=this._map.getZoom(),ht=I===this._map.getMaxZoom(),Et=I===this._map.getMinZoom();this._zoomInButton.disabled=ht,this._zoomOutButton.disabled=Et,this._zoomInButton.setAttribute("aria-disabled",ht.toString()),this._zoomOutButton.setAttribute("aria-disabled",Et.toString())},this._rotateCompassArrow=()=>{let I=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=I},this._setButtonTitle=(I,ht)=>{let Et=this._map._getUIString(`NavigationControl.${ht}`);I.title=Et,I.setAttribute("aria-label",Et)},this.options=e.e({},Oo,qt),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",I=>I.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",I=>this._map.zoomIn({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",I=>this._map.zoomOut({},{originalEvent:I})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",I=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:I}):this._map.resetNorth({},{originalEvent:I})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(qt){return this._map=qt,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Es(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(qt,I){let ht=i.create("button",qt,this._container);return ht.type="button",ht.addEventListener("click",I),ht}},t.Popup=class extends e.E{constructor(qt){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.k("close"))),this),this._onMouseUp=I=>{this._update(I.point)},this._onMouseMove=I=>{this._update(I.point)},this._onDrag=I=>{this._update(I.point)},this._update=I=>{var ht;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let De of this.options.className.split(" "))this._container.classList.add(De);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Rl(this._lngLat,this._flatPos,this._map.transform):(ht=this._lngLat)===null||ht===void 0?void 0:ht.wrap(),this._trackPointer&&!I)return;let Et=this._flatPos=this._pos=this._trackPointer&&I?I:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&I?I:this._map.transform.locationPoint(this._lngLat));let It=this.options.anchor,Vt=Zu(this.options.offset);if(!It){let De=this._container.offsetWidth,Ke=this._container.offsetHeight,gr;gr=Et.y+Vt.bottom.ythis._map.transform.height-Ke?["bottom"]:[],Et.xthis._map.transform.width-De/2&&gr.push("right"),It=gr.length===0?"bottom":gr.join("-")}let ke=Et.add(Vt[It]);this.options.subpixelPositioning||(ke=ke.round()),i.setTransform(this._container,`${yc[It]} translate(${ke.x}px,${ke.y}px)`),Hc(this._container,It,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(Os),qt)}addTo(qt){return this._map&&this.remove(),this._map=qt,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(qt){return this._lngLat=e.N.convert(qt),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(qt){return this.setDOMContent(document.createTextNode(qt))}setHTML(qt){let I=document.createDocumentFragment(),ht=document.createElement("body"),Et;for(ht.innerHTML=qt;Et=ht.firstChild,Et;)I.appendChild(Et);return this.setDOMContent(I)}getMaxWidth(){var qt;return(qt=this._container)===null||qt===void 0?void 0:qt.style.maxWidth}setMaxWidth(qt){return this.options.maxWidth=qt,this._update(),this}setDOMContent(qt){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(qt),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(qt){return this._container&&this._container.classList.add(qt),this}removeClassName(qt){return this._container&&this._container.classList.remove(qt),this}setOffset(qt){return this.options.offset=qt,this._update(),this}toggleClassName(qt){if(this._container)return this._container.classList.toggle(qt)}setSubpixelPositioning(qt){this.options.subpixelPositioning=qt}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let qt=this._container.querySelector(qc);qt&&qt.focus()}},t.RasterDEMTileSource=Wt,t.RasterTileSource=Pt,t.ScaleControl=class{constructor(qt){this._onMove=()=>{Oh(this._map,this._container,this.options)},this.setUnit=I=>{this.options.unit=I,Oh(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Iu),qt)}getDefaultPosition(){return"bottom-left"}onAdd(qt){return this._map=qt,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",qt.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},t.ScrollZoomHandler=Wn,t.Style=Gr,t.TerrainControl=class{constructor(qt){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=qt}onAdd(qt){return this._map=qt,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},t.TwoFingersTouchPitchHandler=$f,t.TwoFingersTouchRotateHandler=df,t.TwoFingersTouchZoomHandler=nu,t.TwoFingersTouchZoomRotateHandler=la,t.VectorTileSource=zt,t.VideoSource=he,t.addSourceType=(qt,I)=>e._(void 0,void 0,void 0,function*(){if(Tt(qt))throw new Error(`A source type called "${qt}" already exists.`);((ht,Et)=>{se[ht]=Et})(qt,I)}),t.clearPrewarmedResources=function(){let qt=st;qt&&(qt.isPreloaded()&&qt.numActive()===1?(qt.release(lt),st=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},t.getMaxParallelImageRequests=function(){return e.a.MAX_PARALLEL_IMAGE_REQUESTS},t.getRTLTextPluginStatus=function(){return ve().getRTLTextPluginStatus()},t.getVersion=function(){return Gf},t.getWorkerCount=function(){return yt.workerCount},t.getWorkerUrl=function(){return e.a.WORKER_URL},t.importScriptInWorkers=function(qt){return at().broadcast("IS",qt)},t.prewarm=function(){dt().acquire(lt)},t.setMaxParallelImageRequests=function(qt){e.a.MAX_PARALLEL_IMAGE_REQUESTS=qt},t.setRTLTextPlugin=function(qt,I){return ve().setRTLTextPlugin(qt,I)},t.setWorkerCount=function(qt){yt.workerCount=qt},t.setWorkerUrl=function(qt){e.a.WORKER_URL=qt}});var S=c;return S})}),CW=Ft((Q,$)=>{var c=_n(),g=tc().sanitizeHTML,P=yE(),S=G1();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var s=n(o);i.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function a(o){var i={},s={};switch(o.type){case"circle":c.extendFlat(s,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(s,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(s,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=P(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(s,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:s}}function n(o){var i=o.sourcetype,s=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof s=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=s,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}$.exports=function(o,i,s){var f=new t(o,i);return f.update(s),f}}),LW=Ft((Q,$)=>{var c=EW(),g=_n(),P=W1(),S=Qo(),t=Ls(),e=hp(),r=Qh(),a=x0(),n=a.drawMode,o=a.selectMode,i=yf().prepSelect,s=yf().clearOutline,f=yf().clearSelectionsCache,x=yf().selectOnClick,y=G1(),v=CW();function T(E,A){this.id=A,this.gd=E;var h=E._fullLayout,p=E._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(E,A,h){var p=this,k;p.map?k=new Promise(function(w,R){p.updateMap(E,A,w,R)}):k=new Promise(function(w,R){p.createMap(E,A,w,R)}),h.push(k)},u.createMap=function(E,A,h,p){var k=this,w=A[k.id],R=k.styleObj=_(w.style),O=w.bounds,N=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:R.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:N,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0})),H={};V.on("styleimagemissing",function(U){var W=U.id;if(!H[W]&&W.includes("-15")){H[W]=!0;var q=new Image(15,15);q.onload=function(){V.addImage(W,q)},q.crossOrigin="Anonymous",q.src="https://unpkg.com/maki@2.1.0/icons/"+W+".svg"}}),V.setTransformRequest(function(U){return U=U.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:U}}),V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(E,A);var F=[];F.push(new Promise(function(U){V.once("load",U)})),F=F.concat(P.fetchTraceGeoData(E)),Promise.all(F).then(function(){k.fillBelowLookup(E,A),k.updateData(E),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(E,A,h,p){var k=this,w=k.map,R=A[this.id];k.rejectOnError(p);var O=[],N=_(R.style);JSON.stringify(k.styleObj)!==JSON.stringify(N)&&(k.styleObj=N,w.setStyle(N.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(P.fetchTraceGeoData(E)),Promise.all(O).then(function(){k.fillBelowLookup(E,A),k.updateData(E),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(E,A){var h=A[this.id],p=h.layers,k,w,R=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(N.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,N.originalEvent)}}},u.updateFx=function(E){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(N){var V=A.map.unproject(N);return[V.lng,V.lat]}var w=E.dragmode,R;R=function(N,V){if(V.isRect){var H=N.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=N.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:E.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:E[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:R},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(N,V,H){i(N,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(E){var A=E[this.id].domain,h=E._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(E){var A=E[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=_n(),g=I1(),P=Ld(),S=C3();$.exports=function(r,a,n){g(r,a,n,{type:"map",attributes:S,handleDefaults:t,partition:"y"})};function t(r,a,n){n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var o=n("bounds.west"),i=n("bounds.east"),s=n("bounds.south"),f=n("bounds.north");(o===void 0||i===void 0||s===void 0||f===void 0)&&delete a.bounds,P(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),s=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;s&&(f="raster");var x=n("type",f);s&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),yT=Ft(Q=>{var $=_n(),c=$.strTranslate,g=$.strScale,P=dd().getSubplotCalcData,S=Bp(),t=En(),e=Vs(),r=tc(),a=LW(),n="map";Q.name=n,Q.attr="subplot",Q.idRoot=n,Q.idRegex=Q.attrRegex=$.counterRegex(n),Q.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Q.layoutAttributes=C3(),Q.supplyLayoutDefaults=PW(),Q.plot=function(o){for(var i=o._fullLayout,s=o.calcdata,f=i._subplots[n],x=0;xh/2){var p=C.split("|").join("
");E.text(p).attr("data-unformatted",p).call(r.convertToTspans,o),A=e.bBox(E.node())}E.attr("transform",c(-3,-A.height+8)),M.insert("rect",".static-attribution").attr({x:-A.width-6,y:-A.height-3,width:A.width+6,height:A.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;A.width+6>h&&(k=h/(A.width+6));var w=[f.l+f.w*v.x[1],f.t+f.h*(1-v.y[0])];M.attr("transform",c(w[0],w[1])+g(k))}},Q.updateFx=function(o){for(var i=o._fullLayout,s=i._subplots[n],f=0;f{$.exports={attributes:gT(),supplyDefaults:kW(),colorbar:yo(),formatLabels:vE(),calc:$k(),plot:AW(),hoverPoints:vT().hoverPoints,eventData:MW(),selectPoints:SW(),styleOnSelect:function(c,g){if(g){var P=g[0].trace;P._glTrace.update(g)}},moduleType:"trace",name:"scattermap",basePlotModule:yT(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}),IW=Ft((Q,$)=>{$.exports=zW()}),xE=Ft((Q,$)=>{var c=yb(),g=Ac(),{hovertemplateAttrs:P,templatefallbackAttrs:S}=$u(),t=Yo(),e=ya().extendFlat;$.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:P({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),OW=Ft((Q,$)=>{var c=_n(),g=gc(),P=xE();$.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,P,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var s=a("marker.line.width");s&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),_E=Ft((Q,$)=>{var c=ia(),g=_n(),P=Xc(),S=Vs(),t=H1().makeBlank,e=W1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,s={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:s,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=P.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var C;g.isArrayOrTypedArray(u.width)&&(C=function(k){return k.mlw});for(var M=0;M{var c=_E().convert,g=_E().convertOnSelect,P=G1().traceLayerPrefix;function S(e,r){this.type="choroplethmap",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",P+r+"-fill"],["line",P+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},$.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),s=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,s),r[0].trace._glTrace=n,n}}),FW=Ft((Q,$)=>{$.exports={attributes:xE(),supplyDefaults:OW(),colorbar:z1(),calc:Xk(),plot:DW(),hoverPoints:Qk(),eventData:tT(),selectPoints:eT(),styleOnSelect:function(c,g){if(g){var P=g[0].trace;P._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var P=g.getMapLayers(),S=P.length-2;S>=0;S--){var t=P[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{$.exports=FW()}),bE=Ft((Q,$)=>{var c=Ac(),{hovertemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=Yo(),t=gT(),e=ya().extendFlat;$.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:P(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),BW=Ft((Q,$)=>{var c=_n(),g=gc(),P=bE();$.exports=function(S,t,e,r){function a(s,f){return c.coerce(S,t,P,s,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),NW=Ft((Q,$)=>{var c=ia(),g=_n().isArrayOrTypedArray,P=Ua().BADNUM,S=ep(),t=_n()._;$.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,s=0;s{var c=ia(),g=_n(),P=ui(),S=Xc(),t=Ua().BADNUM,e=H1().makeBlank;$.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var s=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),s.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),E=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=E[0][1],h=P.opacity(A)<1?A:P.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=jW(),g=G1().traceLayerPrefix;function P(t,e){this.type="densitymap",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=P.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},$.exports=function(t,e){var r=e[0].trace,a=new P(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),VW=Ft((Q,$)=>{var c=Ls(),g=vT().hoverPoints,P=vT().getExtraText;$.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var s=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(s,s.c2l(i.z),"hover").text}return a.extraText=P(o,i,n[0].t.labels),[a]}}}),HW=Ft((Q,$)=>{$.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),WW=Ft((Q,$)=>{$.exports={attributes:bE(),supplyDefaults:BW(),colorbar:z1(),formatLabels:vE(),calc:NW(),plot:UW(),hoverPoints:VW(),eventData:HW(),getBelow:function(c,g){for(var P=g.getMapLayers(),S=0;S{$.exports=WW()}),wE=Ft((Q,$)=>{var c=ka(),g=Yo(),P=yi(),S=Ss(),t=jh().attributes,{hovertemplateAttrs:e,templatefallbackAttrs:r}=$u(),a=Ac(),n=mu().templatedArray,o=dh().descriptionOnlyNumbers,i=ya().extendFlat,s=Yc().overrideAll;$.exports=s({hoverinfo:i({},g.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:S.hoverlabel,domain:t({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:o("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:c({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:P.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:P.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),colorscales:n("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:i(a().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}),ZW=Ft((Q,$)=>{var c=_n(),g=wE(),P=ui(),S=eo(),t=jh().defaults,e=Tg(),r=mu(),a=Ld();$.exports=function(o,i,s,f){function x(R,O){return c.coerce(o,i,g,R,O)}var y=c.extendDeep(f.hoverlabel,o.hoverlabel),v=o.node,T=r.newContainer(i,"node");function u(R,O){return c.coerce(v,T,g.node,R,O)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",o.hoverinfo),e(v,T,u,y),u("hovertemplate"),u("align");var b=f.colorway,_=function(R){return b[R%b.length]};u("color",T.label.map(function(R,O){return P.addOpacity(_(O),.8)})),u("customdata");var C=o.link||{},M=r.newContainer(i,"link");function E(R,O){return c.coerce(C,M,g.link,R,O)}E("label"),E("arrowlen"),E("source"),E("target"),E("value"),E("line.color"),E("line.width"),E("hoverinfo",o.hoverinfo),e(C,M,E,y),E("hovertemplate");var A=S(f.paper_bgcolor).getLuminance()<.333,h=A?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=E("color",h);function k(R){var O=S(R);if(!O.isValid())return R;var N=O.getAlpha();return N<=.8?O.setAlpha(N+.2):O=A?O.brighten():O.darken(),O.toRgbString()}E("hovercolor",Array.isArray(p)?p.map(k):k(p)),E("customdata"),a(C,M,{name:"colorscales",handleItemDefaults:n}),t(i,f,x),x("orientation"),x("valueformat"),x("valuesuffix");var w;T.x.length&&T.y.length&&(w="freeform"),x("arrangement",w),c.coerceFont(x,"textfont",f.font,{autoShadowDflt:!0}),i._length=null};function n(o,i){function s(f,x){return c.coerce(o,i,g.link.colorscales,f,x)}s("label"),s("cmin"),s("cmax"),s("colorscale")}}),kE=Ft((Q,$)=>{$.exports=c;function c(g){for(var P=g.length,S=new Array(P),t=new Array(P),e=new Array(P),r=new Array(P),a=new Array(P),n=new Array(P),o=0;o0;){u=_[_.length-1];var C=g[u];if(r[u]=0&&n[u].push(a[E])}r[u]=M}else{if(t[u]===S[u]){for(var A=[],h=[],p=0,M=b.length-1;M>=0;--M){var k=b[M];if(e[k]=!1,A.push(k),h.push(n[k]),p+=n[k].length,a[k]=s.length,k===u){b.length=M;break}}s.push(A);for(var w=new Array(p),M=0;M{var c=kE(),g=_n(),P=Ig().wrap,S=g.isArrayOrTypedArray,t=g.isIndex,e=Xc();function r(n){var o=n.node,i=n.link,s=[],f=S(i.color),x=S(i.hovercolor),y=S(i.customdata),v={},T={},u=i.colorscales.length,b;for(b=0;bE&&(E=i.source[b]),i.target[b]>E&&(E=i.target[b]);var A=E+1;n.node._count=A;var h,p=n.node.groups,k={};for(b=0;b0&&t(H,A)&&t(F,A)&&!(k.hasOwnProperty(H)&&k.hasOwnProperty(F)&&k[H]===k[F])){k.hasOwnProperty(F)&&(F=k[F]),k.hasOwnProperty(H)&&(H=k[H]),H=+H,F=+F,v[H]=v[F]=!0;var U="";i.label&&i.label[b]&&(U=i.label[b]);var W=null;U&&T.hasOwnProperty(U)&&(W=T[U]),s.push({pointNumber:b,label:U,color:f?i.color[b]:i.color,hovercolor:x?i.hovercolor[b]:i.hovercolor,customdata:y?i.customdata[b]:i.customdata,concentrationscale:W,source:H,target:F,value:+V}),N.source.push(H),N.target.push(F)}}var q=A+p.length,X=S(o.color),lt=S(o.customdata),yt=[];for(b=0;bA-1,childrenNodes:[],pointNumber:b,label:pt,color:X?o.color[b]:o.color,customdata:lt?o.customdata[b]:o.customdata})}var st=!1;return a(q,N.source,N.target)&&(st=!0),{circular:st,links:s,nodes:yt,groups:p,groupLookup:k}}function a(n,o,i){for(var s=g.init2dArray(n,0),f=0;f1})}$.exports=function(n,o){var i=r(o);return P({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}}),GW=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){var h=+this._x.call(null,A),p=+this._y.call(null,A);return P(this.cover(h,p),h,p,A)}function P(A,h,p,k){if(isNaN(h)||isNaN(p))return A;var w,R=A._root,O={data:k},N=A._x0,V=A._y0,H=A._x1,F=A._y1,U,W,q,X,lt,yt,pt,st;if(!R)return A._root=O,A;for(;R.length;)if((lt=h>=(U=(N+H)/2))?N=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W,w=R,!(R=R[pt=yt<<1|lt]))return w[pt]=O,A;if(q=+A._x.call(null,R.data),X=+A._y.call(null,R.data),h===q&&p===X)return O.next=R,w?w[pt]=O:A._root=O,A;do w=w?w[pt]=new Array(4):A._root=new Array(4),(lt=h>=(U=(N+H)/2))?N=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W;while((pt=yt<<1|lt)===(st=(X>=W)<<1|q>=U));return w[st]=R,w[pt]=O,A}function S(A){var h,p,k=A.length,w,R,O=new Array(k),N=new Array(k),V=1/0,H=1/0,F=-1/0,U=-1/0;for(p=0;pF&&(F=w),RU&&(U=R));if(V>F||H>U)return this;for(this.cover(V,H).cover(F,U),p=0;pA||A>=w||k>h||h>=R;)switch(H=(hF||(N=X.y0)>U||(V=X.x1)=pt)<<1|A>=yt)&&(X=W[W.length-1],W[W.length-1]=W[W.length-1-lt],W[W.length-1-lt]=X)}else{var st=A-+this._x.call(null,q.data),tt=h-+this._y.call(null,q.data),dt=st*st+tt*tt;if(dt=(W=(O+V)/2))?O=W:V=W,(lt=U>=(q=(N+H)/2))?N=q:H=q,h=p,!(p=p[yt=lt<<1|X]))return this;if(!p.length)break;(h[yt+1&3]||h[yt+2&3]||h[yt+3&3])&&(k=h,pt=yt)}for(;p.data!==A;)if(w=p,!(p=p.next))return this;return(R=p.next)&&delete p.next,w?(R?w.next=R:delete w.next,this):h?(R?h[yt]=R:delete h[yt],(p=h[0]||h[1]||h[2]||h[3])&&p===(h[3]||h[2]||h[1]||h[0])&&!p.length&&(k?k[pt]=p:this._root=p),this):(this._root=R,this)}function i(A){for(var h=0,p=A.length;h{(function(c,g){g(typeof Q=="object"&&typeof $<"u"?Q:c.d3=c.d3||{})})(Q,function(c){var g="$";function P(){}P.prototype=S.prototype={constructor:P,has:function(v){return g+v in this},get:function(v){return this[g+v]},set:function(v,T){return this[g+v]=T,this},remove:function(v){var T=g+v;return T in this&&delete this[T]},clear:function(){for(var v in this)v[0]===g&&delete this[v]},keys:function(){var v=[];for(var T in this)T[0]===g&&v.push(T.slice(1));return v},values:function(){var v=[];for(var T in this)T[0]===g&&v.push(this[T]);return v},entries:function(){var v=[];for(var T in this)T[0]===g&&v.push({key:T.slice(1),value:this[T]});return v},size:function(){var v=0;for(var T in this)T[0]===g&&++v;return v},empty:function(){for(var v in this)if(v[0]===g)return!1;return!0},each:function(v){for(var T in this)T[0]===g&&v(this[T],T.slice(1),this)}};function S(v,T){var u=new P;if(v instanceof P)v.each(function(E,A){u.set(A,E)});else if(Array.isArray(v)){var b=-1,_=v.length,C;if(T==null)for(;++b<_;)u.set(b,v[b]);else for(;++b<_;)u.set(T(C=v[b],b,v),C)}else if(v)for(var M in v)u.set(M,v[M]);return u}function t(){var v=[],T=[],u,b,_;function C(E,A,h,p){if(A>=v.length)return u!=null&&E.sort(u),b!=null?b(E):E;for(var k=-1,w=E.length,R=v[A++],O,N,V=S(),H,F=h();++kv.length)return E;var h,p=T[A-1];return b!=null&&A>=v.length?h=E.entries():(h=[],E.each(function(k,w){h.push({key:w,values:M(k,A)})})),p!=null?h.sort(function(k,w){return p(k.key,w.key)}):h}return _={object:function(E){return C(E,0,e,r)},map:function(E){return C(E,0,a,n)},entries:function(E){return M(C(E,0,a,n),0)},key:function(E){return v.push(E),_},sortKeys:function(E){return T[v.length-1]=E,_},sortValues:function(E){return u=E,_},rollup:function(E){return b=E,_}}}function e(){return{}}function r(v,T,u){v[T]=u}function a(){return S()}function n(v,T,u){v.set(T,u)}function o(){}var i=S.prototype;o.prototype=s.prototype={constructor:o,has:i.has,add:function(v){return v+="",this[g+v]=v,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function s(v,T){var u=new o;if(v instanceof o)v.each(function(C){u.add(C)});else if(v){var b=-1,_=v.length;if(T==null)for(;++b<_;)u.add(v[b]);else for(;++b<_;)u.add(T(v[b],b,v))}return u}function f(v){var T=[];for(var u in v)T.push(u);return T}function x(v){var T=[];for(var u in v)T.push(v[u]);return T}function y(v){var T=[];for(var u in v)T.push({key:u,value:v[u]});return T}c.nest=t,c.set=s,c.map=S,c.keys=f,c.values=x,c.entries=y,Object.defineProperty(c,"__esModule",{value:!0})})}),YW=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g={value:function(){}};function P(){for(var a=0,n=arguments.length,o={},i;a=0&&(i=o.slice(s+1),o=o.slice(0,s)),o&&!n.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:i}})}S.prototype=P.prototype={constructor:S,on:function(a,n){var o=this._,i=t(a+"",o),s,f=-1,x=i.length;if(arguments.length<2){for(;++f0)for(var o=new Array(s),i=0,s,f;i{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=0,P=0,S=0,t=1e3,e,r,a=0,n=0,o=0,i=typeof performance=="object"&&performance.now?performance:Date,s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function f(){return n||(s(x),n=i.now()+o)}function x(){n=0}function y(){this._call=this._time=this._next=null}y.prototype=v.prototype={constructor:y,restart:function(A,h,p){if(typeof A!="function")throw new TypeError("callback is not a function");p=(p==null?f():+p)+(h==null?0:+h),!this._next&&r!==this&&(r?r._next=this:e=this,r=this),this._call=A,this._time=p,C()},stop:function(){this._call&&(this._call=null,this._time=1/0,C())}};function v(A,h,p){var k=new y;return k.restart(A,h,p),k}function T(){f(),++g;for(var A=e,h;A;)(h=n-A._time)>=0&&A._call.call(null,h),A=A._next;--g}function u(){n=(a=i.now())+o,g=P=0;try{T()}finally{g=0,_(),n=0}}function b(){var A=i.now(),h=A-a;h>t&&(o-=h,a=A)}function _(){for(var A,h=e,p,k=1/0;h;)h._call?(k>h._time&&(k=h._time),A=h,h=h._next):(p=h._next,h._next=null,h=A?A._next=p:e=p);r=A,C(k)}function C(A){if(!g){P&&(P=clearTimeout(P));var h=A-n;h>24?(A<1/0&&(P=setTimeout(u,A-i.now()-o)),S&&(S=clearInterval(S))):(S||(a=i.now(),S=setInterval(b,t)),g=1,s(u))}}function M(A,h,p){var k=new y;return h=h==null?0:+h,k.restart(function(w){k.stop(),A(w+h)},h,p),k}function E(A,h,p){var k=new y,w=h;return h==null?(k.restart(A,h,p),k):(h=+h,p=p==null?f():+p,k.restart(function R(O){O+=w,k.restart(R,w+=h,p),A(O)},h,p),k)}c.interval=E,c.now=f,c.timeout=M,c.timer=v,c.timerFlush=T,Object.defineProperty(c,"__esModule",{value:!0})})}),XW=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,GW(),xT(),YW(),KW()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,c.d3)})(Q,function(c,g,P,S,t){function e(A,h){var p;A==null&&(A=0),h==null&&(h=0);function k(){var w,R=p.length,O,N=0,V=0;for(w=0;wU.index){var ft=W-vt.x-vt.vx,ut=q-vt.y-vt.vy,wt=ft*ft+ut*ut;wtW+Y||rtq+Y||atV.r&&(V.r=V[H].r)}function N(){if(h){var V,H=h.length,F;for(p=new Array(H),V=0;V1?(lt==null?N.remove(X):N.set(X,q(lt)),h):N.get(X)},find:function(X,lt,yt){var pt=0,st=A.length,tt,dt,rt,at,vt;for(yt==null?yt=1/0:yt*=yt,pt=0;pt1?(H.on(X,lt),h):H.on(X)}}}function _(){var A,h,p,k=r(-30),w,R=1,O=1/0,N=.81;function V(W){var q,X=A.length,lt=g.quadtree(A,y,v).visitAfter(F);for(p=W,q=0;q=O)){(W.data!==h||W.next)&&(yt===0&&(yt=a(),tt+=yt*yt),pt===0&&(pt=a(),tt+=pt*pt),tt{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=Math.PI,P=2*g,S=1e-6,t=P-S;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new e}e.prototype=r.prototype={constructor:e,moveTo:function(a,n){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(a,n){this._+="L"+(this._x1=+a)+","+(this._y1=+n)},quadraticCurveTo:function(a,n,o,i){this._+="Q"+ +a+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},bezierCurveTo:function(a,n,o,i,s,f){this._+="C"+ +a+","+ +n+","+ +o+","+ +i+","+(this._x1=+s)+","+(this._y1=+f)},arcTo:function(a,n,o,i,s){a=+a,n=+n,o=+o,i=+i,s=+s;var f=this._x1,x=this._y1,y=o-a,v=i-n,T=f-a,u=x-n,b=T*T+u*u;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=a)+","+(this._y1=n);else if(b>S)if(!(Math.abs(u*y-v*T)>S)||!s)this._+="L"+(this._x1=a)+","+(this._y1=n);else{var _=o-f,C=i-x,M=y*y+v*v,E=_*_+C*C,A=Math.sqrt(M),h=Math.sqrt(b),p=s*Math.tan((g-Math.acos((M+b-E)/(2*A*h)))/2),k=p/h,w=p/A;Math.abs(k-1)>S&&(this._+="L"+(a+k*T)+","+(n+k*u)),this._+="A"+s+","+s+",0,0,"+ +(u*_>T*C)+","+(this._x1=a+w*y)+","+(this._y1=n+w*v)}},arc:function(a,n,o,i,s,f){a=+a,n=+n,o=+o,f=!!f;var x=o*Math.cos(i),y=o*Math.sin(i),v=a+x,T=n+y,u=1^f,b=f?i-s:s-i;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+v+","+T:(Math.abs(this._x1-v)>S||Math.abs(this._y1-T)>S)&&(this._+="L"+v+","+T),o&&(b<0&&(b=b%P+P),b>t?this._+="A"+o+","+o+",0,1,"+u+","+(a-x)+","+(n-y)+"A"+o+","+o+",0,1,"+u+","+(this._x1=v)+","+(this._y1=T):b>S&&(this._+="A"+o+","+o+",0,"+ +(b>=g)+","+u+","+(this._x1=a+o*Math.cos(s))+","+(this._y1=n+o*Math.sin(s))))},rect:function(a,n,o,i){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)+"h"+ +o+"v"+ +i+"h"+-o+"Z"},toString:function(){return this._}},c.path=r,Object.defineProperty(c,"__esModule",{value:!0})})}),TE=Ft((Q,$)=>{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,JW()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function P(Ee){return function(){return Ee}}var S=Math.abs,t=Math.atan2,e=Math.cos,r=Math.max,a=Math.min,n=Math.sin,o=Math.sqrt,i=1e-12,s=Math.PI,f=s/2,x=2*s;function y(Ee){return Ee>1?0:Ee<-1?s:Math.acos(Ee)}function v(Ee){return Ee>=1?f:Ee<=-1?-f:Math.asin(Ee)}function T(Ee){return Ee.innerRadius}function u(Ee){return Ee.outerRadius}function b(Ee){return Ee.startAngle}function _(Ee){return Ee.endAngle}function C(Ee){return Ee&&Ee.padAngle}function M(Ee,dr,Vr,vn,Fn,Xn,Pn,Sn){var Zn=Vr-Ee,Ea=vn-dr,Ri=Pn-Fn,Ja=Sn-Xn,Xa=Ja*Zn-Ri*Ea;if(!(Xa*Xakl*kl+Hl*Hl&&(tl=cs,Bl=Ps),{cx:tl,cy:Bl,x01:-Ri,y01:-Ja,x11:tl*(Fn/Ks-1),y11:Bl*(Fn/Ks-1)}}function A(){var Ee=T,dr=u,Vr=P(0),vn=null,Fn=b,Xn=_,Pn=C,Sn=null;function Zn(){var Ea,Ri,Ja=+Ee.apply(this,arguments),Xa=+dr.apply(this,arguments),Do=Fn.apply(this,arguments)-f,go=Xn.apply(this,arguments)-f,Fo=S(go-Do),za=go>Do;if(Sn||(Sn=Ea=g.path()),Xai))Sn.moveTo(0,0);else if(Fo>x-i)Sn.moveTo(Xa*e(Do),Xa*n(Do)),Sn.arc(0,0,Xa,Do,go,!za),Ja>i&&(Sn.moveTo(Ja*e(go),Ja*n(go)),Sn.arc(0,0,Ja,go,Do,za));else{var xs=Do,os=go,cl=Do,Zo=go,Ks=Fo,ss=Fo,hl=Pn.apply(this,arguments)/2,tl=hl>i&&(vn?+vn.apply(this,arguments):o(Ja*Ja+Xa*Xa)),Bl=a(S(Xa-Ja)/2,+Vr.apply(this,arguments)),cs=Bl,Ps=Bl,Po,Ts;if(tl>i){var kl=v(tl/Ja*n(hl)),Hl=v(tl/Xa*n(hl));(Ks-=kl*2)>i?(kl*=za?1:-1,cl+=kl,Zo-=kl):(Ks=0,cl=Zo=(Do+go)/2),(ss-=Hl*2)>i?(Hl*=za?1:-1,xs+=Hl,os-=Hl):(ss=0,xs=os=(Do+go)/2)}var Xl=Xa*e(xs),Us=Xa*n(xs),Ca=Ja*e(Zo),fo=Ja*n(Zo);if(Bl>i){var qs=Xa*e(os),Jl=Xa*n(os),Jo=Ja*e(cl),$l=Ja*n(cl),ol;if(Foi?Ps>i?(Po=E(Jo,$l,Xl,Us,Xa,Ps,za),Ts=E(qs,Jl,Ca,fo,Xa,Ps,za),Sn.moveTo(Po.cx+Po.x01,Po.cy+Po.y01),Psi)||!(Ks>i)?Sn.lineTo(Ca,fo):cs>i?(Po=E(Ca,fo,qs,Jl,Ja,-cs,za),Ts=E(Xl,Us,Jo,$l,Ja,-cs,za),Sn.lineTo(Po.cx+Po.x01,Po.cy+Po.y01),cs=Xa;--Do)Sn.point(os[Do],cl[Do]);Sn.lineEnd(),Sn.areaEnd()}za&&(os[Ja]=+Ee(Fo,Ja,Ri),cl[Ja]=+Vr(Fo,Ja,Ri),Sn.point(dr?+dr(Fo,Ja,Ri):os[Ja],vn?+vn(Fo,Ja,Ri):cl[Ja]))}if(xs)return Sn=null,xs+""||null}function Ea(){return R().defined(Fn).curve(Pn).context(Xn)}return Zn.x=function(Ri){return arguments.length?(Ee=typeof Ri=="function"?Ri:P(+Ri),dr=null,Zn):Ee},Zn.x0=function(Ri){return arguments.length?(Ee=typeof Ri=="function"?Ri:P(+Ri),Zn):Ee},Zn.x1=function(Ri){return arguments.length?(dr=Ri==null?null:typeof Ri=="function"?Ri:P(+Ri),Zn):dr},Zn.y=function(Ri){return arguments.length?(Vr=typeof Ri=="function"?Ri:P(+Ri),vn=null,Zn):Vr},Zn.y0=function(Ri){return arguments.length?(Vr=typeof Ri=="function"?Ri:P(+Ri),Zn):Vr},Zn.y1=function(Ri){return arguments.length?(vn=Ri==null?null:typeof Ri=="function"?Ri:P(+Ri),Zn):vn},Zn.lineX0=Zn.lineY0=function(){return Ea().x(Ee).y(Vr)},Zn.lineY1=function(){return Ea().x(Ee).y(vn)},Zn.lineX1=function(){return Ea().x(dr).y(Vr)},Zn.defined=function(Ri){return arguments.length?(Fn=typeof Ri=="function"?Ri:P(!!Ri),Zn):Fn},Zn.curve=function(Ri){return arguments.length?(Pn=Ri,Xn!=null&&(Sn=Pn(Xn)),Zn):Pn},Zn.context=function(Ri){return arguments.length?(Ri==null?Xn=Sn=null:Sn=Pn(Xn=Ri),Zn):Xn},Zn}function N(Ee,dr){return drEe?1:dr>=Ee?0:NaN}function V(Ee){return Ee}function H(){var Ee=V,dr=N,Vr=null,vn=P(0),Fn=P(x),Xn=P(0);function Pn(Sn){var Zn,Ea=Sn.length,Ri,Ja,Xa=0,Do=new Array(Ea),go=new Array(Ea),Fo=+vn.apply(this,arguments),za=Math.min(x,Math.max(-x,Fn.apply(this,arguments)-Fo)),xs,os=Math.min(Math.abs(za)/Ea,Xn.apply(this,arguments)),cl=os*(za<0?-1:1),Zo;for(Zn=0;Zn0&&(Xa+=Zo);for(dr!=null?Do.sort(function(Ks,ss){return dr(go[Ks],go[ss])}):Vr!=null&&Do.sort(function(Ks,ss){return Vr(Sn[Ks],Sn[ss])}),Zn=0,Ja=Xa?(za-Ea*cl)/Xa:0;Zn0?Zo*Ja:0)+cl,go[Ri]={data:Sn[Ri],index:Zn,value:Zo,startAngle:Fo,endAngle:xs,padAngle:os};return go}return Pn.value=function(Sn){return arguments.length?(Ee=typeof Sn=="function"?Sn:P(+Sn),Pn):Ee},Pn.sortValues=function(Sn){return arguments.length?(dr=Sn,Vr=null,Pn):dr},Pn.sort=function(Sn){return arguments.length?(Vr=Sn,dr=null,Pn):Vr},Pn.startAngle=function(Sn){return arguments.length?(vn=typeof Sn=="function"?Sn:P(+Sn),Pn):vn},Pn.endAngle=function(Sn){return arguments.length?(Fn=typeof Sn=="function"?Sn:P(+Sn),Pn):Fn},Pn.padAngle=function(Sn){return arguments.length?(Xn=typeof Sn=="function"?Sn:P(+Sn),Pn):Xn},Pn}var F=W(p);function U(Ee){this._curve=Ee}U.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Ee,dr){this._curve.point(dr*Math.sin(Ee),dr*-Math.cos(Ee))}};function W(Ee){function dr(Vr){return new U(Ee(Vr))}return dr._curve=Ee,dr}function q(Ee){var dr=Ee.curve;return Ee.angle=Ee.x,delete Ee.x,Ee.radius=Ee.y,delete Ee.y,Ee.curve=function(Vr){return arguments.length?dr(W(Vr)):dr()._curve},Ee}function X(){return q(R().curve(F))}function lt(){var Ee=O().curve(F),dr=Ee.curve,Vr=Ee.lineX0,vn=Ee.lineX1,Fn=Ee.lineY0,Xn=Ee.lineY1;return Ee.angle=Ee.x,delete Ee.x,Ee.startAngle=Ee.x0,delete Ee.x0,Ee.endAngle=Ee.x1,delete Ee.x1,Ee.radius=Ee.y,delete Ee.y,Ee.innerRadius=Ee.y0,delete Ee.y0,Ee.outerRadius=Ee.y1,delete Ee.y1,Ee.lineStartAngle=function(){return q(Vr())},delete Ee.lineX0,Ee.lineEndAngle=function(){return q(vn())},delete Ee.lineX1,Ee.lineInnerRadius=function(){return q(Fn())},delete Ee.lineY0,Ee.lineOuterRadius=function(){return q(Xn())},delete Ee.lineY1,Ee.curve=function(Pn){return arguments.length?dr(W(Pn)):dr()._curve},Ee}function yt(Ee,dr){return[(dr=+dr)*Math.cos(Ee-=Math.PI/2),dr*Math.sin(Ee)]}var pt=Array.prototype.slice;function st(Ee){return Ee.source}function tt(Ee){return Ee.target}function dt(Ee){var dr=st,Vr=tt,vn=k,Fn=w,Xn=null;function Pn(){var Sn,Zn=pt.call(arguments),Ea=dr.apply(this,Zn),Ri=Vr.apply(this,Zn);if(Xn||(Xn=Sn=g.path()),Ee(Xn,+vn.apply(this,(Zn[0]=Ea,Zn)),+Fn.apply(this,Zn),+vn.apply(this,(Zn[0]=Ri,Zn)),+Fn.apply(this,Zn)),Sn)return Xn=null,Sn+""||null}return Pn.source=function(Sn){return arguments.length?(dr=Sn,Pn):dr},Pn.target=function(Sn){return arguments.length?(Vr=Sn,Pn):Vr},Pn.x=function(Sn){return arguments.length?(vn=typeof Sn=="function"?Sn:P(+Sn),Pn):vn},Pn.y=function(Sn){return arguments.length?(Fn=typeof Sn=="function"?Sn:P(+Sn),Pn):Fn},Pn.context=function(Sn){return arguments.length?(Xn=Sn??null,Pn):Xn},Pn}function rt(Ee,dr,Vr,vn,Fn){Ee.moveTo(dr,Vr),Ee.bezierCurveTo(dr=(dr+vn)/2,Vr,dr,Fn,vn,Fn)}function at(Ee,dr,Vr,vn,Fn){Ee.moveTo(dr,Vr),Ee.bezierCurveTo(dr,Vr=(Vr+Fn)/2,vn,Vr,vn,Fn)}function vt(Ee,dr,Vr,vn,Fn){var Xn=yt(dr,Vr),Pn=yt(dr,Vr=(Vr+Fn)/2),Sn=yt(vn,Vr),Zn=yt(vn,Fn);Ee.moveTo(Xn[0],Xn[1]),Ee.bezierCurveTo(Pn[0],Pn[1],Sn[0],Sn[1],Zn[0],Zn[1])}function it(){return dt(rt)}function Y(){return dt(at)}function ft(){var Ee=dt(vt);return Ee.angle=Ee.x,delete Ee.x,Ee.radius=Ee.y,delete Ee.y,Ee}var ut={draw:function(Ee,dr){var Vr=Math.sqrt(dr/s);Ee.moveTo(Vr,0),Ee.arc(0,0,Vr,0,x)}},wt={draw:function(Ee,dr){var Vr=Math.sqrt(dr/5)/2;Ee.moveTo(-3*Vr,-Vr),Ee.lineTo(-Vr,-Vr),Ee.lineTo(-Vr,-3*Vr),Ee.lineTo(Vr,-3*Vr),Ee.lineTo(Vr,-Vr),Ee.lineTo(3*Vr,-Vr),Ee.lineTo(3*Vr,Vr),Ee.lineTo(Vr,Vr),Ee.lineTo(Vr,3*Vr),Ee.lineTo(-Vr,3*Vr),Ee.lineTo(-Vr,Vr),Ee.lineTo(-3*Vr,Vr),Ee.closePath()}},zt=Math.sqrt(1/3),Pt=zt*2,Wt={draw:function(Ee,dr){var Vr=Math.sqrt(dr/Pt),vn=Vr*zt;Ee.moveTo(0,-Vr),Ee.lineTo(vn,0),Ee.lineTo(0,Vr),Ee.lineTo(-vn,0),Ee.closePath()}},Ht=.8908130915292852,Jt=Math.sin(s/10)/Math.sin(7*s/10),ge=Math.sin(x/10)*Jt,he=-Math.cos(x/10)*Jt,de={draw:function(Ee,dr){var Vr=Math.sqrt(dr*Ht),vn=ge*Vr,Fn=he*Vr;Ee.moveTo(0,-Vr),Ee.lineTo(vn,Fn);for(var Xn=1;Xn<5;++Xn){var Pn=x*Xn/5,Sn=Math.cos(Pn),Zn=Math.sin(Pn);Ee.lineTo(Zn*Vr,-Sn*Vr),Ee.lineTo(Sn*vn-Zn*Fn,Zn*vn+Sn*Fn)}Ee.closePath()}},se={draw:function(Ee,dr){var Vr=Math.sqrt(dr),vn=-Vr/2;Ee.rect(vn,vn,Vr,Vr)}},Tt=Math.sqrt(3),Lt={draw:function(Ee,dr){var Vr=-Math.sqrt(dr/(Tt*3));Ee.moveTo(0,Vr*2),Ee.lineTo(-Tt*Vr,-Vr),Ee.lineTo(Tt*Vr,-Vr),Ee.closePath()}},Mt=-.5,te=Math.sqrt(3)/2,ve=1/Math.sqrt(12),oe=(ve/2+1)*3,Te={draw:function(Ee,dr){var Vr=Math.sqrt(dr/oe),vn=Vr/2,Fn=Vr*ve,Xn=vn,Pn=Vr*ve+Vr,Sn=-Xn,Zn=Pn;Ee.moveTo(vn,Fn),Ee.lineTo(Xn,Pn),Ee.lineTo(Sn,Zn),Ee.lineTo(Mt*vn-te*Fn,te*vn+Mt*Fn),Ee.lineTo(Mt*Xn-te*Pn,te*Xn+Mt*Pn),Ee.lineTo(Mt*Sn-te*Zn,te*Sn+Mt*Zn),Ee.lineTo(Mt*vn+te*Fn,Mt*Fn-te*vn),Ee.lineTo(Mt*Xn+te*Pn,Mt*Pn-te*Xn),Ee.lineTo(Mt*Sn+te*Zn,Mt*Zn-te*Sn),Ee.closePath()}},He=[ut,wt,Wt,se,de,Lt,Te];function Ge(){var Ee=P(ut),dr=P(64),Vr=null;function vn(){var Fn;if(Vr||(Vr=Fn=g.path()),Ee.apply(this,arguments).draw(Vr,+dr.apply(this,arguments)),Fn)return Vr=null,Fn+""||null}return vn.type=function(Fn){return arguments.length?(Ee=typeof Fn=="function"?Fn:P(Fn),vn):Ee},vn.size=function(Fn){return arguments.length?(dr=typeof Fn=="function"?Fn:P(+Fn),vn):dr},vn.context=function(Fn){return arguments.length?(Vr=Fn??null,vn):Vr},vn}function cr(){}function ur(Ee,dr,Vr){Ee._context.bezierCurveTo((2*Ee._x0+Ee._x1)/3,(2*Ee._y0+Ee._y1)/3,(Ee._x0+2*Ee._x1)/3,(Ee._y0+2*Ee._y1)/3,(Ee._x0+4*Ee._x1+dr)/6,(Ee._y0+4*Ee._y1+Vr)/6)}function jr(Ee){this._context=Ee}jr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ur(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ur(this,Ee,dr);break}this._x0=this._x1,this._x1=Ee,this._y0=this._y1,this._y1=dr}};function Hr(Ee){return new jr(Ee)}function br(Ee){this._context=Ee}br.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._x2=Ee,this._y2=dr;break;case 1:this._point=2,this._x3=Ee,this._y3=dr;break;case 2:this._point=3,this._x4=Ee,this._y4=dr,this._context.moveTo((this._x0+4*this._x1+Ee)/6,(this._y0+4*this._y1+dr)/6);break;default:ur(this,Ee,dr);break}this._x0=this._x1,this._x1=Ee,this._y0=this._y1,this._y1=dr}};function Kr(Ee){return new br(Ee)}function rn(Ee){this._context=Ee}rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Vr=(this._x0+4*this._x1+Ee)/6,vn=(this._y0+4*this._y1+dr)/6;this._line?this._context.lineTo(Vr,vn):this._context.moveTo(Vr,vn);break;case 3:this._point=4;default:ur(this,Ee,dr);break}this._x0=this._x1,this._x1=Ee,this._y0=this._y1,this._y1=dr}};function Ce(Ee){return new rn(Ee)}function Gt(Ee,dr){this._basis=new jr(Ee),this._beta=dr}Gt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Ee=this._x,dr=this._y,Vr=Ee.length-1;if(Vr>0)for(var vn=Ee[0],Fn=dr[0],Xn=Ee[Vr]-vn,Pn=dr[Vr]-Fn,Sn=-1,Zn;++Sn<=Vr;)Zn=Sn/Vr,this._basis.point(this._beta*Ee[Sn]+(1-this._beta)*(vn+Zn*Xn),this._beta*dr[Sn]+(1-this._beta)*(Fn+Zn*Pn));this._x=this._y=null,this._basis.lineEnd()},point:function(Ee,dr){this._x.push(+Ee),this._y.push(+dr)}};var ne=function Ee(dr){function Vr(vn){return dr===1?new jr(vn):new Gt(vn,dr)}return Vr.beta=function(vn){return Ee(+vn)},Vr}(.85);function Ct(Ee,dr,Vr){Ee._context.bezierCurveTo(Ee._x1+Ee._k*(Ee._x2-Ee._x0),Ee._y1+Ee._k*(Ee._y2-Ee._y0),Ee._x2+Ee._k*(Ee._x1-dr),Ee._y2+Ee._k*(Ee._y1-Vr),Ee._x2,Ee._y2)}function gt(Ee,dr){this._context=Ee,this._k=(1-dr)/6}gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ct(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2,this._x1=Ee,this._y1=dr;break;case 2:this._point=3;default:Ct(this,Ee,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var St=function Ee(dr){function Vr(vn){return new gt(vn,dr)}return Vr.tension=function(vn){return Ee(+vn)},Vr}(0);function Nt(Ee,dr){this._context=Ee,this._k=(1-dr)/6}Nt.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._x3=Ee,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ee,this._y4=dr);break;case 2:this._point=3,this._x5=Ee,this._y5=dr;break;default:Ct(this,Ee,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var re=function Ee(dr){function Vr(vn){return new Nt(vn,dr)}return Vr.tension=function(vn){return Ee(+vn)},Vr}(0);function le(Ee,dr){this._context=Ee,this._k=(1-dr)/6}le.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,Ee,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var we=function Ee(dr){function Vr(vn){return new le(vn,dr)}return Vr.tension=function(vn){return Ee(+vn)},Vr}(0);function Ue(Ee,dr,Vr){var vn=Ee._x1,Fn=Ee._y1,Xn=Ee._x2,Pn=Ee._y2;if(Ee._l01_a>i){var Sn=2*Ee._l01_2a+3*Ee._l01_a*Ee._l12_a+Ee._l12_2a,Zn=3*Ee._l01_a*(Ee._l01_a+Ee._l12_a);vn=(vn*Sn-Ee._x0*Ee._l12_2a+Ee._x2*Ee._l01_2a)/Zn,Fn=(Fn*Sn-Ee._y0*Ee._l12_2a+Ee._y2*Ee._l01_2a)/Zn}if(Ee._l23_a>i){var Ea=2*Ee._l23_2a+3*Ee._l23_a*Ee._l12_a+Ee._l12_2a,Ri=3*Ee._l23_a*(Ee._l23_a+Ee._l12_a);Xn=(Xn*Ea+Ee._x1*Ee._l23_2a-dr*Ee._l12_2a)/Ri,Pn=(Pn*Ea+Ee._y1*Ee._l23_2a-Vr*Ee._l12_2a)/Ri}Ee._context.bezierCurveTo(vn,Fn,Xn,Pn,Ee._x2,Ee._y2)}function qe(Ee,dr){this._context=Ee,this._alpha=dr}qe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){if(Ee=+Ee,dr=+dr,this._point){var Vr=this._x2-Ee,vn=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Vr*Vr+vn*vn,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2;break;case 2:this._point=3;default:Ue(this,Ee,dr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var or=function Ee(dr){function Vr(vn){return dr?new qe(vn,dr):new gt(vn,0)}return Vr.alpha=function(vn){return Ee(+vn)},Vr}(.5);function Ar(Ee,dr){this._context=Ee,this._alpha=dr}Ar.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ee,dr){if(Ee=+Ee,dr=+dr,this._point){var Vr=this._x2-Ee,vn=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Vr*Vr+vn*vn,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Ee,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ee,this._y4=dr);break;case 2:this._point=3,this._x5=Ee,this._y5=dr;break;default:Ue(this,Ee,dr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Tr=function Ee(dr){function Vr(vn){return dr?new Ar(vn,dr):new Nt(vn,0)}return Vr.alpha=function(vn){return Ee(+vn)},Vr}(.5);function pr(Ee,dr){this._context=Ee,this._alpha=dr}pr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){if(Ee=+Ee,dr=+dr,this._point){var Vr=this._x2-Ee,vn=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Vr*Vr+vn*vn,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ue(this,Ee,dr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ee,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Jr=function Ee(dr){function Vr(vn){return dr?new pr(vn,dr):new le(vn,0)}return Vr.alpha=function(vn){return Ee(+vn)},Vr}(.5);function Vn(Ee){this._context=Ee}Vn.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Ee,dr){Ee=+Ee,dr=+dr,this._point?this._context.lineTo(Ee,dr):(this._point=1,this._context.moveTo(Ee,dr))}};function Hn(Ee){return new Vn(Ee)}function Kn(Ee){return Ee<0?-1:1}function Ci(Ee,dr,Vr){var vn=Ee._x1-Ee._x0,Fn=dr-Ee._x1,Xn=(Ee._y1-Ee._y0)/(vn||Fn<0&&-0),Pn=(Vr-Ee._y1)/(Fn||vn<0&&-0),Sn=(Xn*Fn+Pn*vn)/(vn+Fn);return(Kn(Xn)+Kn(Pn))*Math.min(Math.abs(Xn),Math.abs(Pn),.5*Math.abs(Sn))||0}function ii(Ee,dr){var Vr=Ee._x1-Ee._x0;return Vr?(3*(Ee._y1-Ee._y0)/Vr-dr)/2:dr}function qn(Ee,dr,Vr){var vn=Ee._x0,Fn=Ee._y0,Xn=Ee._x1,Pn=Ee._y1,Sn=(Xn-vn)/3;Ee._context.bezierCurveTo(vn+Sn,Fn+Sn*dr,Xn-Sn,Pn-Sn*Vr,Xn,Pn)}function aa(Ee){this._context=Ee}aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:qn(this,this._t0,ii(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ee,dr){var Vr=NaN;if(Ee=+Ee,dr=+dr,!(Ee===this._x1&&dr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2;break;case 2:this._point=3,qn(this,ii(this,Vr=Ci(this,Ee,dr)),Vr);break;default:qn(this,this._t0,Vr=Ci(this,Ee,dr));break}this._x0=this._x1,this._x1=Ee,this._y0=this._y1,this._y1=dr,this._t0=Vr}}};function Vi(Ee){this._context=new We(Ee)}(Vi.prototype=Object.create(aa.prototype)).point=function(Ee,dr){aa.prototype.point.call(this,dr,Ee)};function We(Ee){this._context=Ee}We.prototype={moveTo:function(Ee,dr){this._context.moveTo(dr,Ee)},closePath:function(){this._context.closePath()},lineTo:function(Ee,dr){this._context.lineTo(dr,Ee)},bezierCurveTo:function(Ee,dr,Vr,vn,Fn,Xn){this._context.bezierCurveTo(dr,Ee,vn,Vr,Xn,Fn)}};function rr(Ee){return new aa(Ee)}function fr(Ee){return new Vi(Ee)}function _r(Ee){this._context=Ee}_r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Ee=this._x,dr=this._y,Vr=Ee.length;if(Vr)if(this._line?this._context.lineTo(Ee[0],dr[0]):this._context.moveTo(Ee[0],dr[0]),Vr===2)this._context.lineTo(Ee[1],dr[1]);else for(var vn=Qr(Ee),Fn=Qr(dr),Xn=0,Pn=1;Pn=0;--dr)Fn[dr]=(Pn[dr]-Fn[dr+1])/Xn[dr];for(Xn[Vr-1]=(Ee[Vr]+Fn[Vr-1])/2,dr=0;dr=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Ee,dr){switch(Ee=+Ee,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ee,dr):this._context.moveTo(Ee,dr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,dr),this._context.lineTo(Ee,dr);else{var Vr=this._x*(1-this._t)+Ee*this._t;this._context.lineTo(Vr,this._y),this._context.lineTo(Vr,dr)}break}}this._x=Ee,this._y=dr}};function An(Ee){return new bn(Ee,.5)}function ci(Ee){return new bn(Ee,0)}function xi(Ee){return new bn(Ee,1)}function Li(Ee,dr){if((Pn=Ee.length)>1)for(var Vr=1,vn,Fn,Xn=Ee[dr[0]],Pn,Sn=Xn.length;Vr=0;)Vr[dr]=dr;return Vr}function Zi(Ee,dr){return Ee[dr]}function li(){var Ee=P([]),dr=Oi,Vr=Li,vn=Zi;function Fn(Xn){var Pn=Ee.apply(this,arguments),Sn,Zn=Xn.length,Ea=Pn.length,Ri=new Array(Ea),Ja;for(Sn=0;Sn0){for(var Vr,vn,Fn=0,Xn=Ee[0].length,Pn;Fn0)for(var Vr,vn=0,Fn,Xn,Pn,Sn,Zn,Ea=Ee[dr[0]].length;vn0?(Fn[0]=Pn,Fn[1]=Pn+=Xn):Xn<0?(Fn[1]=Sn,Fn[0]=Sn+=Xn):(Fn[0]=0,Fn[1]=Xn)}function ze(Ee,dr){if((Fn=Ee.length)>0){for(var Vr=0,vn=Ee[dr[0]],Fn,Xn=vn.length;Vr0)||!((Xn=(Fn=Ee[dr[0]]).length)>0))){for(var Vr=0,vn=1,Fn,Xn,Pn;vnXn&&(Xn=Fn,Vr=dr);return Vr}function $r(Ee){var dr=Ee.map(Br);return Oi(Ee).sort(function(Vr,vn){return dr[Vr]-dr[vn]})}function Br(Ee){for(var dr=0,Vr=-1,vn=Ee.length,Fn;++Vr{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,_3(),xT(),TE()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3)})(Q,function(c,g,P,S){function t(p){return p.target.depth}function e(p){return p.depth}function r(p,k){return k-1-p.height}function a(p,k){return p.sourceLinks.length?p.depth:k-1}function n(p){return p.targetLinks.length?p.depth:p.sourceLinks.length?g.min(p.sourceLinks,t)-1:0}function o(p){return function(){return p}}function i(p,k){return f(p.source,k.source)||p.index-k.index}function s(p,k){return f(p.target,k.target)||p.index-k.index}function f(p,k){return p.y0-k.y0}function x(p){return p.value}function y(p){return(p.y0+p.y1)/2}function v(p){return y(p.source)*p.value}function T(p){return y(p.target)*p.value}function u(p){return p.index}function b(p){return p.nodes}function _(p){return p.links}function C(p,k){var w=p.get(k);if(!w)throw new Error("missing: "+k);return w}var M=function(){var p=0,k=0,w=1,R=1,O=24,N=8,V=u,H=a,F=b,U=_,W=32,q=2/3;function X(){var dt={nodes:F.apply(null,arguments),links:U.apply(null,arguments)};return lt(dt),yt(dt),pt(dt),st(dt),tt(dt),dt}X.update=function(dt){return tt(dt),dt},X.nodeId=function(dt){return arguments.length?(V=typeof dt=="function"?dt:o(dt),X):V},X.nodeAlign=function(dt){return arguments.length?(H=typeof dt=="function"?dt:o(dt),X):H},X.nodeWidth=function(dt){return arguments.length?(O=+dt,X):O},X.nodePadding=function(dt){return arguments.length?(N=+dt,X):N},X.nodes=function(dt){return arguments.length?(F=typeof dt=="function"?dt:o(dt),X):F},X.links=function(dt){return arguments.length?(U=typeof dt=="function"?dt:o(dt),X):U},X.size=function(dt){return arguments.length?(p=k=0,w=+dt[0],R=+dt[1],X):[w-p,R-k]},X.extent=function(dt){return arguments.length?(p=+dt[0][0],w=+dt[1][0],k=+dt[0][1],R=+dt[1][1],X):[[p,k],[w,R]]},X.iterations=function(dt){return arguments.length?(W=+dt,X):W};function lt(dt){dt.nodes.forEach(function(at,vt){at.index=vt,at.sourceLinks=[],at.targetLinks=[]});var rt=P.map(dt.nodes,V);dt.links.forEach(function(at,vt){at.index=vt;var it=at.source,Y=at.target;typeof it!="object"&&(it=at.source=C(rt,it)),typeof Y!="object"&&(Y=at.target=C(rt,Y)),it.sourceLinks.push(at),Y.targetLinks.push(at)})}function yt(dt){dt.nodes.forEach(function(rt){rt.value=Math.max(g.sum(rt.sourceLinks,x),g.sum(rt.targetLinks,x))})}function pt(dt){var rt,at,vt;for(rt=dt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(Y){Y.depth=vt,Y.sourceLinks.forEach(function(ft){at.indexOf(ft.target)<0&&at.push(ft.target)})});for(rt=dt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(Y){Y.height=vt,Y.targetLinks.forEach(function(ft){at.indexOf(ft.source)<0&&at.push(ft.source)})});var it=(w-p-O)/(vt-1);dt.nodes.forEach(function(Y){Y.x1=(Y.x0=p+Math.max(0,Math.min(vt-1,Math.floor(H.call(null,Y,vt))))*it)+O})}function st(dt){var rt=P.nest().key(function(wt){return wt.x0}).sortKeys(g.ascending).entries(dt.nodes).map(function(wt){return wt.values});it(),ut();for(var at=1,vt=W;vt>0;--vt)ft(at*=.99),ut(),Y(at),ut();function it(){var wt=g.max(rt,function(Wt){return Wt.length}),zt=q*(R-k)/(wt-1);N>zt&&(N=zt);var Pt=g.min(rt,function(Wt){return(R-k-(Wt.length-1)*N)/g.sum(Wt,x)});rt.forEach(function(Wt){Wt.forEach(function(Ht,Jt){Ht.y1=(Ht.y0=Jt)+Ht.value*Pt})}),dt.links.forEach(function(Wt){Wt.width=Wt.value*Pt})}function Y(wt){rt.forEach(function(zt){zt.forEach(function(Pt){if(Pt.targetLinks.length){var Wt=(g.sum(Pt.targetLinks,v)/g.sum(Pt.targetLinks,x)-y(Pt))*wt;Pt.y0+=Wt,Pt.y1+=Wt}})})}function ft(wt){rt.slice().reverse().forEach(function(zt){zt.forEach(function(Pt){if(Pt.sourceLinks.length){var Wt=(g.sum(Pt.sourceLinks,T)/g.sum(Pt.sourceLinks,x)-y(Pt))*wt;Pt.y0+=Wt,Pt.y1+=Wt}})})}function ut(){rt.forEach(function(wt){var zt,Pt,Wt=k,Ht=wt.length,Jt;for(wt.sort(f),Jt=0;Jt0&&(zt.y0+=Pt,zt.y1+=Pt),Wt=zt.y1+N;if(Pt=Wt-N-R,Pt>0)for(Wt=zt.y0-=Pt,zt.y1-=Pt,Jt=Ht-2;Jt>=0;--Jt)zt=wt[Jt],Pt=zt.y1+N-Wt,Pt>0&&(zt.y0-=Pt,zt.y1-=Pt),Wt=zt.y0})}}function tt(dt){dt.nodes.forEach(function(rt){rt.sourceLinks.sort(s),rt.targetLinks.sort(i)}),dt.nodes.forEach(function(rt){var at=rt.y0,vt=at;rt.sourceLinks.forEach(function(it){it.y0=at+it.width/2,at+=it.width}),rt.targetLinks.forEach(function(it){it.y1=vt+it.width/2,vt+=it.width})})}return X};function E(p){return[p.source.x1,p.y0]}function A(p){return[p.target.x0,p.y1]}var h=function(){return S.linkHorizontal().source(E).target(A)};c.sankey=M,c.sankeyCenter=n,c.sankeyLeft=e,c.sankeyRight=r,c.sankeyJustify=a,c.sankeyLinkHorizontal=h,Object.defineProperty(c,"__esModule",{value:!0})})}),tq=Ft((Q,$)=>{var c=kE();$.exports=function(g,P){var S=[],t=[],e=[],r={},a=[],n;function o(_){e[_]=!1,r.hasOwnProperty(_)&&Object.keys(r[_]).forEach(function(C){delete r[_][C],e[C]&&o(C)})}function i(_){var C=!1;t.push(_),e[_]=!0;var M,E;for(M=0;M=_})}function x(_){f(_);for(var C=g,M=c(C),E=M.components.filter(function(O){return O.length>1}),A=1/0,h,p=0;p{(function(c,g){typeof Q=="object"&&typeof $<"u"?g(Q,_3(),xT(),TE(),tq()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,null)})(Q,function(c,g,P,S,t){t=t&&t.hasOwnProperty("default")?t.default:t;function e(Ht){return Ht.target.depth}function r(Ht){return Ht.depth}function a(Ht,Jt){return Jt-1-Ht.height}function n(Ht,Jt){return Ht.sourceLinks.length?Ht.depth:Jt-1}function o(Ht){return Ht.targetLinks.length?Ht.depth:Ht.sourceLinks.length?g.min(Ht.sourceLinks,e)-1:0}function i(Ht){return function(){return Ht}}var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ht){return typeof Ht}:function(Ht){return Ht&&typeof Symbol=="function"&&Ht.constructor===Symbol&&Ht!==Symbol.prototype?"symbol":typeof Ht};function f(Ht,Jt){return y(Ht.source,Jt.source)||Ht.index-Jt.index}function x(Ht,Jt){return y(Ht.target,Jt.target)||Ht.index-Jt.index}function y(Ht,Jt){return Ht.partOfCycle===Jt.partOfCycle?Ht.y0-Jt.y0:Ht.circularLinkType==="top"||Jt.circularLinkType==="bottom"?-1:1}function v(Ht){return Ht.value}function T(Ht){return(Ht.y0+Ht.y1)/2}function u(Ht){return T(Ht.source)}function b(Ht){return T(Ht.target)}function _(Ht){return Ht.index}function C(Ht){return Ht.nodes}function M(Ht){return Ht.links}function E(Ht,Jt){var ge=Ht.get(Jt);if(!ge)throw new Error("missing: "+Jt);return ge}function A(Ht,Jt){return Jt(Ht)}var h=25,p=10,k=.3;function w(){var Ht=0,Jt=0,ge=1,he=1,de=24,se,Tt=_,Lt=n,Mt=C,te=M,ve=32,oe=2,Te,He=null;function Ge(){var Ce={nodes:Mt.apply(null,arguments),links:te.apply(null,arguments)};cr(Ce),R(Ce,Tt,He),ur(Ce),br(Ce),O(Ce,Tt),Kr(Ce,ve,Tt),rn(Ce);for(var Gt=4,ne=0;ne"u"?"undefined":s(gt))!=="object"&&(gt=ne.source=E(Gt,gt)),(typeof St>"u"?"undefined":s(St))!=="object"&&(St=ne.target=E(Gt,St)),gt.sourceLinks.push(ne),St.targetLinks.push(ne)}),Ce}function ur(Ce){Ce.nodes.forEach(function(Gt){Gt.partOfCycle=!1,Gt.value=Math.max(g.sum(Gt.sourceLinks,v),g.sum(Gt.targetLinks,v)),Gt.sourceLinks.forEach(function(ne){ne.circular&&(Gt.partOfCycle=!0,Gt.circularLinkType=ne.circularLinkType)}),Gt.targetLinks.forEach(function(ne){ne.circular&&(Gt.partOfCycle=!0,Gt.circularLinkType=ne.circularLinkType)})})}function jr(Ce){var Gt=0,ne=0,Ct=0,gt=0,St=g.max(Ce.nodes,function(Nt){return Nt.column});return Ce.links.forEach(function(Nt){Nt.circular&&(Nt.circularLinkType=="top"?Gt=Gt+Nt.width:ne=ne+Nt.width,Nt.target.column==0&&(gt=gt+Nt.width),Nt.source.column==St&&(Ct=Ct+Nt.width))}),Gt=Gt>0?Gt+h+p:Gt,ne=ne>0?ne+h+p:ne,Ct=Ct>0?Ct+h+p:Ct,gt=gt>0?gt+h+p:gt,{top:Gt,bottom:ne,left:gt,right:Ct}}function Hr(Ce,Gt){var ne=g.max(Ce.nodes,function(we){return we.column}),Ct=ge-Ht,gt=he-Jt,St=Ct+Gt.right+Gt.left,Nt=gt+Gt.top+Gt.bottom,re=Ct/St,le=gt/Nt;return Ht=Ht*re+Gt.left,ge=Gt.right==0?ge:ge*re,Jt=Jt*le+Gt.top,he=he*le,Ce.nodes.forEach(function(we){we.x0=Ht+we.column*((ge-Ht-de)/ne),we.x1=we.x0+de}),le}function br(Ce){var Gt,ne,Ct;for(Gt=Ce.nodes,ne=[],Ct=0;Gt.length;++Ct,Gt=ne,ne=[])Gt.forEach(function(gt){gt.depth=Ct,gt.sourceLinks.forEach(function(St){ne.indexOf(St.target)<0&&!St.circular&&ne.push(St.target)})});for(Gt=Ce.nodes,ne=[],Ct=0;Gt.length;++Ct,Gt=ne,ne=[])Gt.forEach(function(gt){gt.height=Ct,gt.targetLinks.forEach(function(St){ne.indexOf(St.source)<0&&!St.circular&&ne.push(St.source)})});Ce.nodes.forEach(function(gt){gt.column=Math.floor(Lt.call(null,gt,Ct))})}function Kr(Ce,Gt,ne){var Ct=P.nest().key(function(we){return we.column}).sortKeys(g.ascending).entries(Ce.nodes).map(function(we){return we.values});Nt(ne),le();for(var gt=1,St=Gt;St>0;--St)re(gt*=.99,ne),le();function Nt(we){if(Te){var Ue=1/0;Ct.forEach(function(Tr){var pr=he*Te/(Tr.length+1);Ue=pr0))if(Tr==0&&Ar==1)Jr=pr.y1-pr.y0,pr.y0=he/2-Jr/2,pr.y1=he/2+Jr/2;else if(Tr==qe-1&&Ar==1)Jr=pr.y1-pr.y0,pr.y0=he/2-Jr/2,pr.y1=he/2+Jr/2;else{var Vn=0,Hn=g.mean(pr.sourceLinks,b),Kn=g.mean(pr.targetLinks,u);Hn&&Kn?Vn=(Hn+Kn)/2:Vn=Hn||Kn;var Ci=(Vn-T(pr))*we;pr.y0+=Ci,pr.y1+=Ci}})})}function le(){Ct.forEach(function(we){var Ue,qe,or=Jt,Ar=we.length,Tr;for(we.sort(y),Tr=0;Tr0&&(Ue.y0+=qe,Ue.y1+=qe),or=Ue.y1+se;if(qe=or-se-he,qe>0)for(or=Ue.y0-=qe,Ue.y1-=qe,Tr=Ar-2;Tr>=0;--Tr)Ue=we[Tr],qe=Ue.y1+se-or,qe>0&&(Ue.y0-=qe,Ue.y1-=qe),or=Ue.y0})}}function rn(Ce){Ce.nodes.forEach(function(Gt){Gt.sourceLinks.sort(x),Gt.targetLinks.sort(f)}),Ce.nodes.forEach(function(Gt){var ne=Gt.y0,Ct=ne,gt=Gt.y1,St=gt;Gt.sourceLinks.forEach(function(Nt){Nt.circular?(Nt.y0=gt-Nt.width/2,gt=gt-Nt.width):(Nt.y0=ne+Nt.width/2,ne+=Nt.width)}),Gt.targetLinks.forEach(function(Nt){Nt.circular?(Nt.y1=St-Nt.width/2,St=St-Nt.width):(Nt.y1=Ct+Nt.width/2,Ct+=Nt.width)})})}return Ge}function R(Ht,Jt,ge){var he=0;if(ge===null){for(var de=[],se=0;seJt.source.column)}function H(Ht,Jt){var ge=0;Ht.sourceLinks.forEach(function(de){ge=de.circular&&!Pt(de,Jt)?ge+1:ge});var he=0;return Ht.targetLinks.forEach(function(de){he=de.circular&&!Pt(de,Jt)?he+1:he}),ge+he}function F(Ht){var Jt=Ht.source.sourceLinks,ge=0;Jt.forEach(function(se){ge=se.circular?ge+1:ge});var he=Ht.target.targetLinks,de=0;return he.forEach(function(se){de=se.circular?de+1:de}),!(ge>1||de>1)}function U(Ht,Jt,ge){return Ht.sort(X),Ht.forEach(function(he,de){var se=0;if(Pt(he,ge)&&F(he))he.circularPathData.verticalBuffer=se+he.width/2;else{var Tt=0;for(Tt;Ttse?Lt:se}he.circularPathData.verticalBuffer=se+he.width/2}}),Ht}function W(Ht,Jt,ge,he){var de=5,se=g.min(Ht.links,function(Mt){return Mt.source.y0});Ht.links.forEach(function(Mt){Mt.circular&&(Mt.circularPathData={})});var Tt=Ht.links.filter(function(Mt){return Mt.circularLinkType=="top"});U(Tt,Jt,he);var Lt=Ht.links.filter(function(Mt){return Mt.circularLinkType=="bottom"});U(Lt,Jt,he),Ht.links.forEach(function(Mt){if(Mt.circular){if(Mt.circularPathData.arcRadius=Mt.width+p,Mt.circularPathData.leftNodeBuffer=de,Mt.circularPathData.rightNodeBuffer=de,Mt.circularPathData.sourceWidth=Mt.source.x1-Mt.source.x0,Mt.circularPathData.sourceX=Mt.source.x0+Mt.circularPathData.sourceWidth,Mt.circularPathData.targetX=Mt.target.x0,Mt.circularPathData.sourceY=Mt.y0,Mt.circularPathData.targetY=Mt.y1,Pt(Mt,he)&&F(Mt))Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2,Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2,Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Mt.source.y1+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=Mt.source.y0-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius);else{var te=Mt.source.column,ve=Mt.circularLinkType,oe=Ht.links.filter(function(Ge){return Ge.source.column==te&&Ge.circularLinkType==ve});Mt.circularLinkType=="bottom"?oe.sort(yt):oe.sort(lt);var Te=0;oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2+Te,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2+cr*Jt+Te),Te=Te+Ge.width}),te=Mt.target.column,oe=Ht.links.filter(function(Ge){return Ge.target.column==te&&Ge.circularLinkType==ve}),Mt.circularLinkType=="bottom"?oe.sort(st):oe.sort(pt),Te=0,oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2+Te,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2+cr*Jt+Te),Te=Te+Ge.width}),Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Math.max(ge,Mt.source.y1,Mt.target.y1)+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=se-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius)}Mt.circularPathData.leftInnerExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightInnerExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightNodeBuffer,Mt.circularPathData.leftFullExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftLargeArcRadius+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightFullExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightLargeArcRadius-Mt.circularPathData.rightNodeBuffer}if(Mt.circular)Mt.path=q(Mt);else{var He=S.linkHorizontal().source(function(Ge){var cr=Ge.source.x0+(Ge.source.x1-Ge.source.x0),ur=Ge.y0;return[cr,ur]}).target(function(Ge){var cr=Ge.target.x0,ur=Ge.y1;return[cr,ur]});Mt.path=He(Mt)}})}function q(Ht){var Jt="";return Ht.circularLinkType=="top"?Jt="M"+Ht.circularPathData.sourceX+" "+Ht.circularPathData.sourceY+" L"+Ht.circularPathData.leftInnerExtent+" "+Ht.circularPathData.sourceY+" A"+Ht.circularPathData.leftLargeArcRadius+" "+Ht.circularPathData.leftSmallArcRadius+" 0 0 0 "+Ht.circularPathData.leftFullExtent+" "+(Ht.circularPathData.sourceY-Ht.circularPathData.leftSmallArcRadius)+" L"+Ht.circularPathData.leftFullExtent+" "+Ht.circularPathData.verticalLeftInnerExtent+" A"+Ht.circularPathData.leftLargeArcRadius+" "+Ht.circularPathData.leftLargeArcRadius+" 0 0 0 "+Ht.circularPathData.leftInnerExtent+" "+Ht.circularPathData.verticalFullExtent+" L"+Ht.circularPathData.rightInnerExtent+" "+Ht.circularPathData.verticalFullExtent+" A"+Ht.circularPathData.rightLargeArcRadius+" "+Ht.circularPathData.rightLargeArcRadius+" 0 0 0 "+Ht.circularPathData.rightFullExtent+" "+Ht.circularPathData.verticalRightInnerExtent+" L"+Ht.circularPathData.rightFullExtent+" "+(Ht.circularPathData.targetY-Ht.circularPathData.rightSmallArcRadius)+" A"+Ht.circularPathData.rightLargeArcRadius+" "+Ht.circularPathData.rightSmallArcRadius+" 0 0 0 "+Ht.circularPathData.rightInnerExtent+" "+Ht.circularPathData.targetY+" L"+Ht.circularPathData.targetX+" "+Ht.circularPathData.targetY:Jt="M"+Ht.circularPathData.sourceX+" "+Ht.circularPathData.sourceY+" L"+Ht.circularPathData.leftInnerExtent+" "+Ht.circularPathData.sourceY+" A"+Ht.circularPathData.leftLargeArcRadius+" "+Ht.circularPathData.leftSmallArcRadius+" 0 0 1 "+Ht.circularPathData.leftFullExtent+" "+(Ht.circularPathData.sourceY+Ht.circularPathData.leftSmallArcRadius)+" L"+Ht.circularPathData.leftFullExtent+" "+Ht.circularPathData.verticalLeftInnerExtent+" A"+Ht.circularPathData.leftLargeArcRadius+" "+Ht.circularPathData.leftLargeArcRadius+" 0 0 1 "+Ht.circularPathData.leftInnerExtent+" "+Ht.circularPathData.verticalFullExtent+" L"+Ht.circularPathData.rightInnerExtent+" "+Ht.circularPathData.verticalFullExtent+" A"+Ht.circularPathData.rightLargeArcRadius+" "+Ht.circularPathData.rightLargeArcRadius+" 0 0 1 "+Ht.circularPathData.rightFullExtent+" "+Ht.circularPathData.verticalRightInnerExtent+" L"+Ht.circularPathData.rightFullExtent+" "+(Ht.circularPathData.targetY+Ht.circularPathData.rightSmallArcRadius)+" A"+Ht.circularPathData.rightLargeArcRadius+" "+Ht.circularPathData.rightSmallArcRadius+" 0 0 1 "+Ht.circularPathData.rightInnerExtent+" "+Ht.circularPathData.targetY+" L"+Ht.circularPathData.targetX+" "+Ht.circularPathData.targetY,Jt}function X(Ht,Jt){return tt(Ht)==tt(Jt)?Ht.circularLinkType=="bottom"?yt(Ht,Jt):lt(Ht,Jt):tt(Jt)-tt(Ht)}function lt(Ht,Jt){return Ht.y0-Jt.y0}function yt(Ht,Jt){return Jt.y0-Ht.y0}function pt(Ht,Jt){return Ht.y1-Jt.y1}function st(Ht,Jt){return Jt.y1-Ht.y1}function tt(Ht){return Ht.target.column-Ht.source.column}function dt(Ht){return Ht.target.x0-Ht.source.x1}function rt(Ht,Jt){var ge=N(Ht),he=dt(Jt)/Math.tan(ge),de=zt(Ht)=="up"?Ht.y1+he:Ht.y1-he;return de}function at(Ht,Jt){var ge=N(Ht),he=dt(Jt)/Math.tan(ge),de=zt(Ht)=="up"?Ht.y1-he:Ht.y1+he;return de}function vt(Ht,Jt,ge,he){Ht.links.forEach(function(de){if(!de.circular&&de.target.column-de.source.column>1){var se=de.source.column+1,Tt=de.target.column-1,Lt=1,Mt=Tt-se+1;for(Lt=1;se<=Tt;se++,Lt++)Ht.nodes.forEach(function(te){if(te.column==se){var ve=Lt/(Mt+1),oe=Math.pow(1-ve,3),Te=3*ve*Math.pow(1-ve,2),He=3*Math.pow(ve,2)*(1-ve),Ge=Math.pow(ve,3),cr=oe*de.y0+Te*de.y0+He*de.y1+Ge*de.y1,ur=cr-de.width/2,jr=cr+de.width/2,Hr;ur>te.y0&&urte.y0&&jrte.y1&&Y(br,Hr,Jt,ge)})):urte.y1&&(Hr=jr-te.y0+10,te=Y(te,Hr,Jt,ge),Ht.nodes.forEach(function(br){A(br,he)==A(te,he)||br.column!=te.column||br.y0te.y1&&Y(br,Hr,Jt,ge)}))}})}})}function it(Ht,Jt){return Ht.y0>Jt.y0&&Ht.y0Jt.y0&&Ht.y1Jt.y1}function Y(Ht,Jt,ge,he){return Ht.y0+Jt>=ge&&Ht.y1+Jt<=he&&(Ht.y0=Ht.y0+Jt,Ht.y1=Ht.y1+Jt,Ht.targetLinks.forEach(function(de){de.y1=de.y1+Jt}),Ht.sourceLinks.forEach(function(de){de.y0=de.y0+Jt})),Ht}function ft(Ht,Jt,ge,he){Ht.nodes.forEach(function(de){he&&de.y+(de.y1-de.y0)>Jt&&(de.y=de.y-(de.y+(de.y1-de.y0)-Jt));var se=Ht.links.filter(function(Mt){return A(Mt.source,ge)==A(de,ge)}),Tt=se.length;Tt>1&&se.sort(function(Mt,te){if(!Mt.circular&&!te.circular){if(Mt.target.column==te.target.column)return Mt.y1-te.y1;if(wt(Mt,te)){if(Mt.target.column>te.target.column){var ve=at(te,Mt);return Mt.y1-ve}if(te.target.column>Mt.target.column){var oe=at(Mt,te);return oe-te.y1}}else return Mt.y1-te.y1}if(Mt.circular&&!te.circular)return Mt.circularLinkType=="top"?-1:1;if(te.circular&&!Mt.circular)return te.circularLinkType=="top"?1:-1;if(Mt.circular&&te.circular)return Mt.circularLinkType===te.circularLinkType&&Mt.circularLinkType=="top"?Mt.target.column===te.target.column?Mt.target.y1-te.target.y1:te.target.column-Mt.target.column:Mt.circularLinkType===te.circularLinkType&&Mt.circularLinkType=="bottom"?Mt.target.column===te.target.column?te.target.y1-Mt.target.y1:Mt.target.column-te.target.column:Mt.circularLinkType=="top"?-1:1});var Lt=de.y0;se.forEach(function(Mt){Mt.y0=Lt+Mt.width/2,Lt=Lt+Mt.width}),se.forEach(function(Mt,te){if(Mt.circularLinkType=="bottom"){var ve=te+1,oe=0;for(ve;ve1&&de.sort(function(Lt,Mt){if(!Lt.circular&&!Mt.circular){if(Lt.source.column==Mt.source.column)return Lt.y0-Mt.y0;if(wt(Lt,Mt)){if(Mt.source.column0?"up":"down"}function Pt(Ht,Jt){return A(Ht.source,Jt)==A(Ht.target,Jt)}function Wt(Ht,Jt,ge){var he=Ht.nodes,de=Ht.links,se=!1,Tt=!1;if(de.forEach(function(Te){Te.circularLinkType=="top"?se=!0:Te.circularLinkType=="bottom"&&(Tt=!0)}),se==!1||Tt==!1){var Lt=g.min(he,function(Te){return Te.y0}),Mt=g.max(he,function(Te){return Te.y1}),te=Mt-Lt,ve=ge-Jt,oe=ve/te;he.forEach(function(Te){var He=(Te.y1-Te.y0)*oe;Te.y0=(Te.y0-Lt)*oe,Te.y1=Te.y0+He}),de.forEach(function(Te){Te.y0=(Te.y0-Lt)*oe,Te.y1=(Te.y1-Lt)*oe,Te.width=Te.width*oe})}}c.sankeyCircular=w,c.sankeyCenter=o,c.sankeyLeft=r,c.sankeyRight=a,c.sankeyJustify=n,Object.defineProperty(c,"__esModule",{value:!0})})}),AE=Ft((Q,$)=>{$.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}),rq=Ft((Q,$)=>{var c=XW(),g=(px(),ai(j1)).interpolateNumber,P=En(),S=QW(),t=eq(),e=AE(),r=eo(),a=ui(),n=Vs(),o=_n(),i=o.strTranslate,s=o.strRotate,f=Ig(),x=f.keyFun,y=f.repeat,v=f.unwrap,T=tc(),u=Qo(),b=Sf(),_=b.CAP_SHIFT,C=b.LINE_SPACING,M=3;function E(rt,at,vt){var it=v(at),Y=it.trace,ft=Y.domain,ut=Y.orientation==="h",wt=Y.node.pad,zt=Y.node.thickness,Pt={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[Y.node.align],Wt=rt.width*(ft.x[1]-ft.x[0]),Ht=rt.height*(ft.y[1]-ft.y[0]),Jt=it._nodes,ge=it._links,he=it.circular,de;he?de=t.sankeyCircular().circularLinkGap(0):de=S.sankey(),de.iterations(e.sankeyIterations).size(ut?[Wt,Ht]:[Ht,Wt]).nodeWidth(zt).nodePadding(wt).nodeId(function(br){return br.pointNumber}).nodeAlign(Pt).nodes(Jt).links(ge);var se=de();de.nodePadding()=Gt||(Ce=Gt-rn.y0,Ce>1e-6&&(rn.y0+=Ce,rn.y1+=Ce)),Gt=rn.y1+wt})}function cr(br){var Kr=br.map(function(St,Nt){return{x0:St.x0,index:Nt}}).sort(function(St,Nt){return St.x0-Nt.x0}),rn=[],Ce=-1,Gt,ne=-1/0,Ct;for(Tt=0;Ttne+zt&&(Ce+=1,Gt=gt.x0),ne=gt.x0,rn[Ce]||(rn[Ce]=[]),rn[Ce].push(gt),Ct=Gt-gt.x0,gt.x0+=Ct,gt.x1+=Ct}return rn}if(Y.node.x.length&&Y.node.y.length){for(Tt=0;Tt0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"):(vt="M "+(Y.targetX-at)+" "+(Y.targetY-it)+" L "+(Y.rightInnerExtent-at)+" "+(Y.targetY-it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightSmallArcRadius+it)+" 0 0 0 "+(Y.rightFullExtent-it-at)+" "+(Y.targetY+Y.rightSmallArcRadius)+" L "+(Y.rightFullExtent-it-at)+" "+Y.verticalRightInnerExtent,ft&&ut?vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightInnerExtent-it-at)+" "+(Y.verticalFullExtent+it)+" L "+(Y.rightFullExtent+it-at-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent+it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent:ft?vt+=" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent-at-it-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" L "+(Y.leftFullExtent+it+(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent:vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightInnerExtent-at)+" "+(Y.verticalFullExtent+it)+" L "+Y.leftInnerExtent+" "+(Y.verticalFullExtent+it)+" A "+(Y.leftLargeArcRadius+it)+" "+(Y.leftLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent,vt+=" L "+(Y.leftFullExtent+it)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" A "+(Y.leftLargeArcRadius+it)+" "+(Y.leftSmallArcRadius+it)+" 0 0 0 "+Y.leftInnerExtent+" "+(Y.sourceY-it)+" L "+Y.sourceX+" "+(Y.sourceY-it)+" L "+Y.sourceX+" "+(Y.sourceY+it)+" L "+Y.leftInnerExtent+" "+(Y.sourceY+it)+" A "+(Y.leftLargeArcRadius-it)+" "+(Y.leftSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent-it)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" L "+(Y.leftFullExtent-it)+" "+Y.verticalLeftInnerExtent,ft&&ut?vt+=" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent-it-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" L "+(Y.rightFullExtent+it-at+(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent:ft?vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+(Y.verticalFullExtent+it)+" L "+(Y.rightFullExtent-at-it)+" "+(Y.verticalFullExtent+it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent:vt+=" A "+(Y.leftLargeArcRadius-it)+" "+(Y.leftLargeArcRadius-it)+" 0 0 1 "+Y.leftInnerExtent+" "+(Y.verticalFullExtent-it)+" L "+(Y.rightInnerExtent-at)+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightLargeArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent,vt+=" L "+(Y.rightFullExtent+it-at)+" "+(Y.targetY+Y.rightSmallArcRadius)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightInnerExtent-at)+" "+(Y.targetY+it)+" L "+(Y.targetX-at)+" "+(Y.targetY+it)+(at>0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"),vt}function p(){var rt=.5;function at(vt){var it=vt.linkArrowLength;if(vt.link.circular)return h(vt.link,it);var Y=Math.abs((vt.link.target.x0-vt.link.source.x1)/2);it>Y&&(it=Y);var ft=vt.link.source.x1,ut=vt.link.target.x0-it,wt=g(ft,ut),zt=wt(rt),Pt=wt(1-rt),Wt=vt.link.y0-vt.link.width/2,Ht=vt.link.y0+vt.link.width/2,Jt=vt.link.y1-vt.link.width/2,ge=vt.link.y1+vt.link.width/2,he="M"+ft+","+Wt,de="C"+zt+","+Wt+" "+Pt+","+Jt+" "+ut+","+Jt,se="C"+Pt+","+ge+" "+zt+","+Ht+" "+ft+","+Ht,Tt=it>0?"L"+(ut+it)+","+(Jt+vt.link.width/2):"";return Tt+="L"+ut+","+ge,he+de+Tt+se+"Z"}return at}function k(rt,at){var vt=r(at.color),it=e.nodePadAcross,Y=rt.nodePad/2;at.dx=at.x1-at.x0,at.dy=at.y1-at.y0;var ft=at.dx,ut=Math.max(.5,at.dy),wt="node_"+at.pointNumber;return at.group&&(wt=o.randstr()),at.trace=rt.trace,at.curveNumber=rt.trace.index,{index:at.pointNumber,key:wt,partOfGroup:at.partOfGroup||!1,group:at.group,traceId:rt.key,trace:rt.trace,node:at,nodePad:rt.nodePad,nodeLineColor:rt.nodeLineColor,nodeLineWidth:rt.nodeLineWidth,textFont:rt.textFont,size:rt.horizontal?rt.height:rt.width,visibleWidth:Math.ceil(ft),visibleHeight:ut,zoneX:-it,zoneY:-Y,zoneWidth:ft+2*it,zoneHeight:ut+2*Y,labelY:rt.horizontal?at.dy/2+1:at.dx/2+1,left:at.originalLayer===1,sizeAcross:rt.width,forceLayouts:rt.forceLayouts,horizontal:rt.horizontal,darkBackground:vt.getBrightness()<=128,tinyColorHue:a.tinyRGB(vt),tinyColorAlpha:vt.getAlpha(),valueFormat:rt.valueFormat,valueSuffix:rt.valueSuffix,sankey:rt.sankey,graph:rt.graph,arrangement:rt.arrangement,uniqueNodeLabelPathId:[rt.guid,rt.key,wt].join("_"),interactionState:rt.interactionState,figure:rt}}function w(rt){rt.attr("transform",function(at){return i(at.node.x0.toFixed(3),at.node.y0.toFixed(3))})}function R(rt){rt.call(w)}function O(rt,at){rt.call(R),at.attr("d",p())}function N(rt){rt.attr("width",function(at){return at.node.x1-at.node.x0}).attr("height",function(at){return at.visibleHeight})}function V(rt){return rt.link.width>1||rt.linkLineWidth>0}function H(rt){var at=i(rt.translateX,rt.translateY);return at+(rt.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function F(rt,at,vt){rt.on(".basic",null).on("mouseover.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.hover(this,it,at),it.interactionState.hovered=[this,it])}).on("mousemove.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.follow(this,it),it.interactionState.hovered=[this,it])}).on("mouseout.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.unhover(this,it,at),it.interactionState.hovered=!1)}).on("click.basic",function(it){it.interactionState.hovered&&(vt.unhover(this,it,at),it.interactionState.hovered=!1),!it.interactionState.dragInProgress&&!it.partOfGroup&&vt.select(this,it,at)})}function U(rt,at,vt,it){var Y=P.behavior.drag().origin(function(ft){return{x:ft.node.x0+ft.visibleWidth/2,y:ft.node.y0+ft.visibleHeight/2}}).on("dragstart",function(ft){if(ft.arrangement!=="fixed"&&(o.ensureSingle(it._fullLayout._infolayer,"g","dragcover",function(wt){it._fullLayout._dragCover=wt}),o.raiseToTop(this),ft.interactionState.dragInProgress=ft.node,pt(ft.node),ft.interactionState.hovered&&(vt.nodeEvents.unhover.apply(0,ft.interactionState.hovered),ft.interactionState.hovered=!1),ft.arrangement==="snap")){var ut=ft.traceId+"|"+ft.key;ft.forceLayouts[ut]?ft.forceLayouts[ut].alpha(1):W(rt,ut,ft),q(rt,at,ft,ut,it)}}).on("drag",function(ft){if(ft.arrangement!=="fixed"){var ut=P.event.x,wt=P.event.y;ft.arrangement==="snap"?(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2,ft.node.y0=wt-ft.visibleHeight/2,ft.node.y1=wt+ft.visibleHeight/2):(ft.arrangement==="freeform"&&(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2),wt=Math.max(0,Math.min(ft.size-ft.visibleHeight/2,wt)),ft.node.y0=wt-ft.visibleHeight/2,ft.node.y1=wt+ft.visibleHeight/2),pt(ft.node),ft.arrangement!=="snap"&&(ft.sankey.update(ft.graph),O(rt.filter(st(ft)),at))}}).on("dragend",function(ft){if(ft.arrangement!=="fixed"){ft.interactionState.dragInProgress=!1;for(var ut=0;ut0)window.requestAnimationFrame(ft);else{var zt=vt.node.originalX;vt.node.x0=zt-vt.visibleWidth/2,vt.node.x1=zt+vt.visibleWidth/2,lt(vt,Y)}})}function X(rt,at,vt,it){return function(){for(var Y=0,ft=0;ft0&&it.forceLayouts[at].alpha(0)}}function lt(rt,at){for(var vt=[],it=[],Y=0;Y{var c=En(),g=_n(),P=g.numberFormat,S=rq(),t=Qh(),e=ui(),r=AE().cn,a=g._;function n(_){return _!==""}function o(_,C){return _.filter(function(M){return M.key===C.traceId})}function i(_,C){c.select(_).select("path").style("fill-opacity",C),c.select(_).select("rect").style("fill-opacity",C)}function s(_){c.select(_).select("text.name").style("fill","black")}function f(_){return function(C){return _.node.sourceLinks.indexOf(C.link)!==-1||_.node.targetLinks.indexOf(C.link)!==-1}}function x(_){return function(C){return C.node.sourceLinks.indexOf(_.link)!==-1||C.node.targetLinks.indexOf(_.link)!==-1}}function y(_,C,M){C&&M&&o(M,C).selectAll("."+r.sankeyLink).filter(f(C)).call(T.bind(0,C,M,!1))}function v(_,C,M){C&&M&&o(M,C).selectAll("."+r.sankeyLink).filter(f(C)).call(u.bind(0,C,M,!1))}function T(_,C,M,E){E.style("fill",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverHue}).style("fill-opacity",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverAlpha}),E.each(function(A){var h=A.link.label;h!==""&&o(C,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverHue}).style("fill-opacity",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverAlpha})}),M&&o(C,_).selectAll("."+r.sankeyNode).filter(x(_)).call(y)}function u(_,C,M,E){E.style("fill",function(A){return A.tinyColorHue}).style("fill-opacity",function(A){return A.tinyColorAlpha}),E.each(function(A){var h=A.link.label;h!==""&&o(C,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){return p.tinyColorHue}).style("fill-opacity",function(p){return p.tinyColorAlpha})}),M&&o(C,_).selectAll(r.sankeyNode).filter(x(_)).call(v)}function b(_,C){var M=_.hoverlabel||{},E=g.nestedProperty(M,C).get();return Array.isArray(E)?!1:E}$.exports=function(_,C){for(var M=_._fullLayout,E=M._paper,A=M._size,h=0;h<_._fullData.length;h++)if(_._fullData[h].visible&&_._fullData[h].type===r.sankey&&!_._fullData[h]._viewInitial){var p=_._fullData[h].node;_._fullData[h]._viewInitial={node:{groups:p.groups.slice(),x:p.x.slice(),y:p.y.slice()}}}var k=function(yt,pt){var st=pt.link;st.originalEvent=c.event,_._hoverdata=[st],t.click(_,{target:!0})},w=function(yt,pt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(T.bind(0,pt,st,!0)),pt.link.trace.link.hoverinfo!=="skip"&&(pt.link.fullData=pt.link.trace,_.emit("plotly_hover",{event:c.event,points:[pt.link]})))},R=a(_,"source:")+" ",O=a(_,"target:")+" ",N=a(_,"concentration:")+" ",V=a(_,"incoming flow count:")+" ",H=a(_,"outgoing flow count:")+" ",F=function(yt,pt){if(_._fullLayout.hovermode===!1)return;var st=pt.link.trace.link;if(st.hoverinfo==="none"||st.hoverinfo==="skip")return;var tt=[];function dt(ut){var wt,zt;ut.circular?(wt=(ut.circularPathData.leftInnerExtent+ut.circularPathData.rightInnerExtent)/2,zt=ut.circularPathData.verticalFullExtent):(wt=(ut.source.x1+ut.target.x0)/2,zt=(ut.y0+ut.y1)/2);var Pt=[wt,zt];return ut.trace.orientation==="v"&&Pt.reverse(),Pt[0]+=pt.parent.translateX,Pt[1]+=pt.parent.translateY,Pt}for(var rt=0,at=0;at"),color:b(st,"bgcolor")||e.addOpacity(vt.color,1),borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:c.event.x"),color:b(st,"bgcolor")||pt.tinyColorHue,borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:"left",hovertemplate:st.hovertemplate,hovertemplateLabels:Y,eventData:[pt.node]},{container:M._hoverlayer.node(),outerContainer:M._paper.node(),gd:_});i(wt,.85),s(wt)}}},lt=function(yt,pt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(v,pt,st),pt.node.trace.node.hoverinfo!=="skip"&&(pt.node.fullData=pt.node.trace,_.emit("plotly_unhover",{event:c.event,points:[pt.node]})),t.loneUnhover(M._hoverlayer.node()))};S(_,E,C,{width:A.w,height:A.h,margin:{t:A.t,r:A.r,b:A.b,l:A.l}},{linkEvents:{hover:w,follow:F,unhover:U,select:k},nodeEvents:{hover:q,follow:X,unhover:lt,select:W}})}}),nq=Ft(Q=>{var $=Yc().overrideAll,c=dd().getModuleCalcData,g=ME(),P=vo(),S=O0(),t=hp(),e=yf().prepSelect,r=_n(),a=Qo(),n="sankey";Q.name=n,Q.baseLayoutAttrOverrides=$({hoverlabel:P.hoverlabel},"plot","nested"),Q.plot=function(i){var s=c(i.calcdata,n)[0];g(i,s),Q.updateFx(i)},Q.clean=function(i,s,f,x){var y=x._has&&x._has(n),v=s._has&&s._has(n);y&&!v&&(x._paperdiv.selectAll(".sankey").remove(),x._paperdiv.selectAll(".bgsankey").remove())},Q.updateFx=function(i){for(var s=0;s{$.exports=function(c,g){for(var P=c.cd,S=[],t=P[0].trace,e=t._sankey.graph.nodes,r=0;r{$.exports={attributes:wE(),supplyDefaults:ZW(),calc:$W(),plot:ME(),moduleType:"trace",name:"sankey",basePlotModule:nq(),selectPoints:iq(),categories:["noOpacity"],meta:{}}}),oq=Ft((Q,$)=>{$.exports=aq()}),sq=Ft(Q=>{var $=Kc();Q.name="indicator",Q.plot=function(c,g,P,S){$.plotBasePlot(Q.name,c,g,P,S)},Q.clean=function(c,g,P,S){$.cleanBasePlot(Q.name,c,g,P,S)}}),SE=Ft((Q,$)=>{var c=ya().extendFlat,g=ya().extendDeep,P=Yc().overrideAll,S=ka(),t=yi(),e=jh().attributes,r=Cd(),a=mu().templatedArray,n=ib(),o=dh().descriptionOnlyNumbers,i=S({editType:"plot",colorEditType:"plot"}),s={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:t.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},f={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},x=a("step",g({},s,{range:f}));$.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:e({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:c({},i,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:o("value")},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:o("value")},increasing:{symbol:{valType:"string",dflt:n.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:n.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:g({},s,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:t.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:P({range:f,visible:c({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:c({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:S({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:x,threshold:{line:{color:c({},s.line.color,{}),width:c({},s.line.width,{dflt:1}),editType:"plot"},thickness:c({},s.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}),EE=Ft((Q,$)=>{$.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}),lq=Ft((Q,$)=>{var c=_n(),g=SE(),P=jh().defaults,S=mu(),t=Ld(),e=EE(),r=yg(),a=xg(),n=o0(),o=gm();function i(f,x,y,v){function T(U,W){return c.coerce(f,x,g,U,W)}P(x,v,T),T("mode"),x._hasNumber=x.mode.indexOf("number")!==-1,x._hasDelta=x.mode.indexOf("delta")!==-1,x._hasGauge=x.mode.indexOf("gauge")!==-1;var u=T("value");x._range=[0,typeof u=="number"?1.5*u:1];var b=new Array(2),_;if(x._hasNumber){T("number.valueformat");var C=c.extendFlat({},v.font);C.size=void 0,c.coerceFont(T,"number.font",C),x.number.font.size===void 0&&(x.number.font.size=e.defaultNumberFontSize,b[0]=!0),T("number.prefix"),T("number.suffix"),_=x.number.font.size}var M;if(x._hasDelta){var E=c.extendFlat({},v.font);E.size=void 0,c.coerceFont(T,"delta.font",E),x.delta.font.size===void 0&&(x.delta.font.size=(x._hasNumber?.5:1)*(_||e.defaultNumberFontSize),b[1]=!0),T("delta.reference",x.value),T("delta.relative"),T("delta.valueformat",x.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),M=x.delta.font.size}x._scaleNumbers=(!x._hasNumber||b[0])&&(!x._hasDelta||b[1])||!1;var A=c.extendFlat({},v.font);A.size=.25*(_||M||e.defaultNumberFontSize),c.coerceFont(T,"title.font",A),T("title.text");var h,p,k,w;function R(U,W){return c.coerce(h,p,g.gauge,U,W)}function O(U,W){return c.coerce(k,w,g.gauge.axis,U,W)}if(x._hasGauge){h=f.gauge,h||(h={}),p=S.newContainer(x,"gauge"),R("shape");var N=x._isBullet=x.gauge.shape==="bullet";N||T("title.align","center");var V=x._isAngular=x.gauge.shape==="angular";V||T("align","center"),R("bgcolor",v.paper_bgcolor),R("borderwidth"),R("bordercolor"),R("bar.color"),R("bar.line.color"),R("bar.line.width");var H=e.valueThickness*(x.gauge.shape==="bullet"?.5:1);R("bar.thickness",H),t(h,p,{name:"steps",handleItemDefaults:s}),R("threshold.value"),R("threshold.thickness"),R("threshold.line.width"),R("threshold.line.color"),k={},h&&(k=h.axis||{}),w=S.newContainer(p,"axis"),O("visible"),x._range=O("range",x._range);var F={font:v.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(k,w,O,"linear"),o(k,w,O,"linear",F),n(k,w,O,"linear",F),a(k,w,O,F)}else T("title.align","center"),T("align","center"),x._isAngular=x._isBullet=!1;x._length=null}function s(f,x){function y(v,T){return c.coerce(f,x,g.gauge.steps,v,T)}y("color"),y("line.color"),y("line.width"),y("range"),y("thickness")}$.exports={supplyDefaults:i}}),uq=Ft((Q,$)=>{function c(g,P){var S=[],t=P.value;typeof P._lastValue!="number"&&(P._lastValue=P.value);var e=P._lastValue,r=e;return P._hasDelta&&typeof P.delta.reference=="number"&&(r=P.delta.reference),S[0]={y:t,lastY:e,delta:t-r,relativeDelta:(t-r)/r},S}$.exports={calc:c}}),cq=Ft((Q,$)=>{var c=En(),g=(px(),ai(j1)).interpolate,P=(px(),ai(j1)).interpolateNumber,S=_n(),t=S.strScale,e=S.strTranslate,r=S.rad2deg,a=Sf().MID_SHIFT,n=Vs(),o=EE(),i=tc(),s=Ls(),f=Qy(),x=J_(),y=Cd(),v=ui(),T={left:"start",center:"middle",right:"end"},u={left:0,center:.5,right:1},b=/[yzafpnµmkMGTPEZY]/;function _(N){return N&&N.duration>0}$.exports=function(N,V,H,F){var U=N._fullLayout,W;_(H)&&F&&(W=F()),S.makeTraceGroups(U._indicatorlayer,V,"trace").each(function(q){var X=q[0],lt=X.trace,yt=c.select(this),pt=lt._hasGauge,st=lt._isAngular,tt=lt._isBullet,dt=lt.domain,rt={w:U._size.w*(dt.x[1]-dt.x[0]),h:U._size.h*(dt.y[1]-dt.y[0]),l:U._size.l+U._size.w*dt.x[0],r:U._size.r+U._size.w*(1-dt.x[1]),t:U._size.t+U._size.h*(1-dt.y[1]),b:U._size.b+U._size.h*dt.y[0]},at=rt.l+rt.w/2,vt=rt.t+rt.h/2,it=Math.min(rt.w/2,rt.h),Y=o.innerRadius*it,ft,ut,wt,zt=lt.align||"center";if(ut=vt,!pt)ft=rt.l+u[zt]*rt.w,wt=function(Lt){return k(Lt,rt.w,rt.h)};else if(st&&(ft=at,ut=vt+it/2,wt=function(Lt){return w(Lt,.9*Y)}),tt){var Pt=o.bulletPadding,Wt=1-o.bulletNumberDomainSize+Pt;ft=rt.l+(Wt+(1-Wt)*u[zt])*rt.w,wt=function(Lt){return k(Lt,(o.bulletNumberDomainSize-Pt)*rt.w,rt.h)}}E(N,yt,q,{numbersX:ft,numbersY:ut,numbersScaler:wt,transitionOpts:H,onComplete:W});var Ht,Jt;pt&&(Ht={range:lt.gauge.axis.range,color:lt.gauge.bgcolor,line:{color:lt.gauge.bordercolor,width:0},thickness:1},Jt={range:lt.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:lt.gauge.bordercolor,width:lt.gauge.borderwidth},thickness:1});var ge=yt.selectAll("g.angular").data(st?q:[]);ge.exit().remove();var he=yt.selectAll("g.angularaxis").data(st?q:[]);he.exit().remove(),st&&M(N,yt,q,{radius:it,innerRadius:Y,gauge:ge,layer:he,size:rt,gaugeBg:Ht,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var de=yt.selectAll("g.bullet").data(tt?q:[]);de.exit().remove();var se=yt.selectAll("g.bulletaxis").data(tt?q:[]);se.exit().remove(),tt&&C(N,yt,q,{gauge:de,layer:se,size:rt,gaugeBg:Ht,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var Tt=yt.selectAll("text.title").data(q);Tt.exit().remove(),Tt.enter().append("text").classed("title",!0),Tt.attr("text-anchor",function(){return tt?T.right:T[lt.title.align]}).text(lt.title.text).call(n.font,lt.title.font).call(i.convertToTspans,N),Tt.attr("transform",function(){var Lt=rt.l+rt.w*u[lt.title.align],Mt,te=o.titlePadding,ve=n.bBox(Tt.node());if(pt){if(st)if(lt.gauge.axis.visible){var oe=n.bBox(he.node());Mt=oe.top-te-ve.bottom}else Mt=rt.t+rt.h/2-it/2-ve.bottom-te;tt&&(Mt=ut-(ve.top+ve.bottom)/2,Lt=rt.l-o.bulletPadding*rt.w)}else Mt=lt._numbersTop-te-ve.bottom;return e(Lt,Mt)})})};function C(N,V,H,F){var U=H[0].trace,W=F.gauge,q=F.layer,X=F.gaugeBg,lt=F.gaugeOutline,yt=F.size,pt=U.domain,st=F.transitionOpts,tt=F.onComplete,dt,rt,at,vt,it;W.enter().append("g").classed("bullet",!0),W.attr("transform",e(yt.l,yt.t)),q.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),q.selectAll("g.xbulletaxistick,path,text").remove();var Y=yt.h,ft=U.gauge.bar.thickness*Y,ut=pt.x[0],wt=pt.x[0]+(pt.x[1]-pt.x[0])*(U._hasNumber||U._hasDelta?1-o.bulletNumberDomainSize:1);dt=p(N,U.gauge.axis),dt._id="xbulletaxis",dt.domain=[ut,wt],dt.setScale(),rt=s.calcTicks(dt),at=s.makeTransTickFn(dt),vt=s.getTickSigns(dt)[2],it=yt.t+yt.h,dt.visible&&(s.drawTicks(N,dt,{vals:dt.ticks==="inside"?s.clipEnds(dt,rt):rt,layer:q,path:s.makeTickPath(dt,it,vt),transFn:at}),s.drawLabels(N,dt,{vals:rt,layer:q,transFn:at,labelFns:s.makeLabelFns(dt,it)}));function zt(de){de.attr("width",function(se){return Math.max(0,dt.c2p(se.range[1])-dt.c2p(se.range[0]))}).attr("x",function(se){return dt.c2p(se.range[0])}).attr("y",function(se){return .5*(1-se.thickness)*Y}).attr("height",function(se){return se.thickness*Y})}var Pt=[X].concat(U.gauge.steps),Wt=W.selectAll("g.bg-bullet").data(Pt);Wt.enter().append("g").classed("bg-bullet",!0).append("rect"),Wt.select("rect").call(zt).call(A),Wt.exit().remove();var Ht=W.selectAll("g.value-bullet").data([U.gauge.bar]);Ht.enter().append("g").classed("value-bullet",!0).append("rect"),Ht.select("rect").attr("height",ft).attr("y",(Y-ft)/2).call(A),_(st)?Ht.select("rect").transition().duration(st.duration).ease(st.easing).each("end",function(){tt&&tt()}).each("interrupt",function(){tt&&tt()}).attr("width",Math.max(0,dt.c2p(Math.min(U.gauge.axis.range[1],H[0].y)))):Ht.select("rect").attr("width",typeof H[0].y=="number"?Math.max(0,dt.c2p(Math.min(U.gauge.axis.range[1],H[0].y))):0),Ht.exit().remove();var Jt=H.filter(function(){return U.gauge.threshold.value||U.gauge.threshold.value===0}),ge=W.selectAll("g.threshold-bullet").data(Jt);ge.enter().append("g").classed("threshold-bullet",!0).append("line"),ge.select("line").attr("x1",dt.c2p(U.gauge.threshold.value)).attr("x2",dt.c2p(U.gauge.threshold.value)).attr("y1",(1-U.gauge.threshold.thickness)/2*Y).attr("y2",(1-(1-U.gauge.threshold.thickness)/2)*Y).call(v.stroke,U.gauge.threshold.line.color).style("stroke-width",U.gauge.threshold.line.width),ge.exit().remove();var he=W.selectAll("g.gauge-outline").data([lt]);he.enter().append("g").classed("gauge-outline",!0).append("rect"),he.select("rect").call(zt).call(A),he.exit().remove()}function M(N,V,H,F){var U=H[0].trace,W=F.size,q=F.radius,X=F.innerRadius,lt=F.gaugeBg,yt=F.gaugeOutline,pt=[W.l+W.w/2,W.t+W.h/2+q/2],st=F.gauge,tt=F.layer,dt=F.transitionOpts,rt=F.onComplete,at=Math.PI/2;function vt(He){var Ge=U.gauge.axis.range[0],cr=U.gauge.axis.range[1],ur=(He-Ge)/(cr-Ge)*Math.PI-at;return ur<-at?-at:ur>at?at:ur}function it(He){return c.svg.arc().innerRadius((X+q)/2-He/2*(q-X)).outerRadius((X+q)/2+He/2*(q-X)).startAngle(-at)}function Y(He){He.attr("d",function(Ge){return it(Ge.thickness).startAngle(vt(Ge.range[0])).endAngle(vt(Ge.range[1]))()})}var ft,ut,wt,zt;st.enter().append("g").classed("angular",!0),st.attr("transform",e(pt[0],pt[1])),tt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),tt.selectAll("g.xangularaxistick,path,text").remove(),ft=p(N,U.gauge.axis),ft.type="linear",ft.range=U.gauge.axis.range,ft._id="xangularaxis",ft.ticklabeloverflow="allow",ft.setScale();var Pt=function(He){return(ft.range[0]-He.x)/(ft.range[1]-ft.range[0])*Math.PI+Math.PI},Wt={},Ht=s.makeLabelFns(ft,0),Jt=Ht.labelStandoff;Wt.xFn=function(He){var Ge=Pt(He);return Math.cos(Ge)*Jt},Wt.yFn=function(He){var Ge=Pt(He),cr=Math.sin(Ge)>0?.2:1;return-Math.sin(Ge)*(Jt+He.fontSize*cr)+Math.abs(Math.cos(Ge))*(He.fontSize*a)},Wt.anchorFn=function(He){var Ge=Pt(He),cr=Math.cos(Ge);return Math.abs(cr)<.1?"middle":cr>0?"start":"end"},Wt.heightFn=function(He,Ge,cr){var ur=Pt(He);return-.5*(1+Math.sin(ur))*cr};var ge=function(He){return e(pt[0]+q*Math.cos(He),pt[1]-q*Math.sin(He))};wt=function(He){return ge(Pt(He))};var he=function(He){var Ge=Pt(He);return ge(Ge)+"rotate("+-r(Ge)+")"};if(ut=s.calcTicks(ft),zt=s.getTickSigns(ft)[2],ft.visible){zt=ft.ticks==="inside"?-1:1;var de=(ft.linewidth||1)/2;s.drawTicks(N,ft,{vals:ut,layer:tt,path:"M"+zt*de+",0h"+zt*ft.ticklen,transFn:he}),s.drawLabels(N,ft,{vals:ut,layer:tt,transFn:wt,labelFns:Wt})}var se=[lt].concat(U.gauge.steps),Tt=st.selectAll("g.bg-arc").data(se);Tt.enter().append("g").classed("bg-arc",!0).append("path"),Tt.select("path").call(Y).call(A),Tt.exit().remove();var Lt=it(U.gauge.bar.thickness),Mt=st.selectAll("g.value-arc").data([U.gauge.bar]);Mt.enter().append("g").classed("value-arc",!0).append("path");var te=Mt.select("path");_(dt)?(te.transition().duration(dt.duration).ease(dt.easing).each("end",function(){rt&&rt()}).each("interrupt",function(){rt&&rt()}).attrTween("d",h(Lt,vt(H[0].lastY),vt(H[0].y))),U._lastValue=H[0].y):te.attr("d",typeof H[0].y=="number"?Lt.endAngle(vt(H[0].y)):"M0,0Z"),te.call(A),Mt.exit().remove(),se=[];var ve=U.gauge.threshold.value;(ve||ve===0)&&se.push({range:[ve,ve],color:U.gauge.threshold.color,line:{color:U.gauge.threshold.line.color,width:U.gauge.threshold.line.width},thickness:U.gauge.threshold.thickness});var oe=st.selectAll("g.threshold-arc").data(se);oe.enter().append("g").classed("threshold-arc",!0).append("path"),oe.select("path").call(Y).call(A),oe.exit().remove();var Te=st.selectAll("g.gauge-outline").data([yt]);Te.enter().append("g").classed("gauge-outline",!0).append("path"),Te.select("path").call(Y).call(A),Te.exit().remove()}function E(N,V,H,F){var U=H[0].trace,W=F.numbersX,q=F.numbersY,X=U.align||"center",lt=T[X],yt=F.transitionOpts,pt=F.onComplete,st=S.ensureSingle(V,"g","numbers"),tt,dt,rt,at=[];U._hasNumber&&at.push("number"),U._hasDelta&&(at.push("delta"),U.delta.position==="left"&&at.reverse());var vt=st.selectAll("text").data(at);vt.enter().append("text"),vt.attr("text-anchor",function(){return lt}).attr("class",function(ge){return ge}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),vt.exit().remove();function it(ge,he,de,se){if(ge.match("s")&&de>=0!=se>=0&&!he(de).slice(-1).match(b)&&!he(se).slice(-1).match(b)){var Tt=ge.slice().replace("s","f").replace(/\d+/,function(Mt){return parseInt(Mt)-1}),Lt=p(N,{tickformat:Tt});return function(Mt){return Math.abs(Mt)<1?s.tickText(Lt,Mt).text:he(Mt)}}else return he}function Y(){var ge=p(N,{tickformat:U.number.valueformat},U._range);ge.setScale(),s.prepTicks(ge);var he=function(Mt){return s.tickText(ge,Mt).text},de=U.number.suffix,se=U.number.prefix,Tt=st.select("text.number");function Lt(){var Mt=typeof H[0].y=="number"?se+he(H[0].y)+de:"-";Tt.text(Mt).call(n.font,U.number.font).call(i.convertToTspans,N)}return _(yt)?Tt.transition().duration(yt.duration).ease(yt.easing).each("end",function(){Lt(),pt&&pt()}).each("interrupt",function(){Lt(),pt&&pt()}).attrTween("text",function(){var Mt=c.select(this),te=P(H[0].lastY,H[0].y);U._lastValue=H[0].y;var ve=it(U.number.valueformat,he,H[0].lastY,H[0].y);return function(oe){Mt.text(se+ve(te(oe))+de)}}):Lt(),tt=R(se+he(H[0].y)+de,U.number.font,lt,N),Tt}function ft(){var ge=p(N,{tickformat:U.delta.valueformat},U._range);ge.setScale(),s.prepTicks(ge);var he=function(oe){return s.tickText(ge,oe).text},de=U.delta.suffix,se=U.delta.prefix,Tt=function(oe){var Te=U.delta.relative?oe.relativeDelta:oe.delta;return Te},Lt=function(oe,Te){return oe===0||typeof oe!="number"||isNaN(oe)?"-":(oe>0?U.delta.increasing.symbol:U.delta.decreasing.symbol)+se+Te(oe)+de},Mt=function(oe){return oe.delta>=0?U.delta.increasing.color:U.delta.decreasing.color};U._deltaLastValue===void 0&&(U._deltaLastValue=Tt(H[0]));var te=st.select("text.delta");te.call(n.font,U.delta.font).call(v.fill,Mt({delta:U._deltaLastValue}));function ve(){te.text(Lt(Tt(H[0]),he)).call(v.fill,Mt(H[0])).call(i.convertToTspans,N)}return _(yt)?te.transition().duration(yt.duration).ease(yt.easing).tween("text",function(){var oe=c.select(this),Te=Tt(H[0]),He=U._deltaLastValue,Ge=it(U.delta.valueformat,he,He,Te),cr=P(He,Te);return U._deltaLastValue=Te,function(ur){oe.text(Lt(cr(ur),Ge)),oe.call(v.fill,Mt({delta:cr(ur)}))}}).each("end",function(){ve(),pt&&pt()}).each("interrupt",function(){ve(),pt&&pt()}):ve(),dt=R(Lt(Tt(H[0]),he),U.delta.font,lt,N),te}var ut=U.mode+U.align,wt;if(U._hasDelta&&(wt=ft(),ut+=U.delta.position+U.delta.font.size+U.delta.font.family+U.delta.valueformat,ut+=U.delta.increasing.symbol+U.delta.decreasing.symbol,rt=dt),U._hasNumber&&(Y(),ut+=U.number.font.size+U.number.font.family+U.number.valueformat+U.number.suffix+U.number.prefix,rt=tt),U._hasDelta&&U._hasNumber){var zt=[(tt.left+tt.right)/2,(tt.top+tt.bottom)/2],Pt=[(dt.left+dt.right)/2,(dt.top+dt.bottom)/2],Wt,Ht,Jt=.75*U.delta.font.size;U.delta.position==="left"&&(Wt=O(U,"deltaPos",0,-1*(tt.width*u[U.align]+dt.width*(1-u[U.align])+Jt),ut,Math.min),Ht=zt[1]-Pt[1],rt={width:tt.width+dt.width+Jt,height:Math.max(tt.height,dt.height),left:dt.left+Wt,right:tt.right,top:Math.min(tt.top,dt.top+Ht),bottom:Math.max(tt.bottom,dt.bottom+Ht)}),U.delta.position==="right"&&(Wt=O(U,"deltaPos",0,tt.width*(1-u[U.align])+dt.width*u[U.align]+Jt,ut,Math.max),Ht=zt[1]-Pt[1],rt={width:tt.width+dt.width+Jt,height:Math.max(tt.height,dt.height),left:tt.left,right:dt.right+Wt,top:Math.min(tt.top,dt.top+Ht),bottom:Math.max(tt.bottom,dt.bottom+Ht)}),U.delta.position==="bottom"&&(Wt=null,Ht=dt.height,rt={width:Math.max(tt.width,dt.width),height:tt.height+dt.height,left:Math.min(tt.left,dt.left),right:Math.max(tt.right,dt.right),top:tt.bottom-tt.height,bottom:tt.bottom+dt.height}),U.delta.position==="top"&&(Wt=null,Ht=tt.top,rt={width:Math.max(tt.width,dt.width),height:tt.height+dt.height,left:Math.min(tt.left,dt.left),right:Math.max(tt.right,dt.right),top:tt.bottom-tt.height-dt.height,bottom:tt.bottom}),wt.attr({dx:Wt,dy:Ht})}(U._hasNumber||U._hasDelta)&&st.attr("transform",function(){var ge=F.numbersScaler(rt);ut+=ge[2];var he=O(U,"numbersScale",1,ge[0],ut,Math.min),de;U._scaleNumbers||(he=1),U._isAngular?de=q-he*rt.bottom:de=q-he*(rt.top+rt.bottom)/2,U._numbersTop=he*rt.top+de;var se=rt[X];X==="center"&&(se=(rt.left+rt.right)/2);var Tt=W-he*se;return Tt=O(U,"numbersTranslate",0,Tt,ut,Math.max),e(Tt,de)+t(he)})}function A(N){N.each(function(V){v.stroke(c.select(this),V.line.color)}).each(function(V){v.fill(c.select(this),V.color)}).style("stroke-width",function(V){return V.line.width})}function h(N,V,H){return function(){var F=g(V,H);return function(U){return N.endAngle(F(U))()}}}function p(N,V,H){var F=N._fullLayout,U=S.extendFlat({type:"linear",ticks:"outside",range:H,showline:!0},V),W={type:"linear",_id:"x"+V._id},q={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function X(lt,yt){return S.coerce(U,W,y,lt,yt)}return f(U,W,X,q,F),x(U,W,X,q),W}function k(N,V,H){var F=Math.min(V/N.width,H/N.height);return[F,N,V+"x"+H]}function w(N,V){var H=Math.sqrt(N.width/2*(N.width/2)+N.height*N.height),F=V/H;return[F,N,V]}function R(N,V,H,F){var U=document.createElementNS("http://www.w3.org/2000/svg","text"),W=c.select(U);return W.text(N).attr("x",0).attr("y",0).attr("text-anchor",H).attr("data-unformatted",N).call(i.convertToTspans,F).call(n.font,V),n.bBox(W.node())}function O(N,V,H,F,U,W){var q="_cache"+V;N[q]&&N[q].key===U||(N[q]={key:U,value:H});var X=S.aggNums(W,null,[N[q].value,F],2);return N[q].value=X,X}}),hq=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"indicator",basePlotModule:sq(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:SE(),supplyDefaults:lq().supplyDefaults,calc:uq().calc,plot:cq(),meta:{}}}),fq=Ft((Q,$)=>{$.exports=hq()}),CE=Ft((Q,$)=>{var c=xm(),g=ya().extendFlat,P=Yc().overrideAll,S=ka(),t=jh().attributes,e=dh().descriptionOnlyNumbers;$.exports=P({domain:t({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:g({},c.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:g({},S({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:g({},c.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:g({},S({arrayOk:!0}))}},"calc","from-root")}),dq=Ft((Q,$)=>{var c=_n(),g=CE(),P=jh().defaults;function S(t,e){for(var r=t.columnorder||[],a=t.header.values.length,n=r.slice(0,a),o=n.slice().sort(function(f,x){return f-x}),i=n.map(function(f){return o.indexOf(f)}),s=i.length;s{var c=Ig().wrap;$.exports=function(){return c({})}}),LE=Ft((Q,$)=>{$.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}),mq=Ft((Q,$)=>{var c=LE(),g=ya().extendFlat,P=ia(),S=Va().isTypedArray,t=Va().isArrayOrTypedArray;$.exports=function(x,y){var v=a(y.cells.values),T=function(X){return X.slice(y.header.values.length,X.length)},u=a(y.header.values);u.length&&!u[0].length&&(u[0]=[""],u=a(u));var b=u.concat(T(v).map(function(){return n((u[0]||[""]).length)})),_=y.domain,C=Math.floor(x._fullLayout._size.w*(_.x[1]-_.x[0])),M=Math.floor(x._fullLayout._size.h*(_.y[1]-_.y[0])),E=y.header.values.length?b[0].map(function(){return y.header.height}):[c.emptyHeaderHeight],A=v.length?v[0].map(function(){return y.cells.height}):[],h=E.reduce(r,0),p=M-h,k=p+c.uplift,w=s(A,k),R=s(E,h),O=i(R,[]),N=i(w,O),V={},H=y._fullInput.columnorder;t(H)&&(H=Array.from(H)),H=H.concat(T(v.map(function(X,lt){return lt})));var F=b.map(function(X,lt){var yt=t(y.columnwidth)?y.columnwidth[Math.min(lt,y.columnwidth.length-1)]:y.columnwidth;return P(yt)?Number(yt):1}),U=F.reduce(r,0);F=F.map(function(X){return X/U*C});var W=Math.max(e(y.header.line.width),e(y.cells.line.width)),q={key:y.uid+x._context.staticPlot,translateX:_.x[0]*x._fullLayout._size.w,translateY:x._fullLayout._size.h*(1-_.y[1]),size:x._fullLayout._size,width:C,maxLineWidth:W,height:M,columnOrder:H,groupHeight:M,rowBlocks:N,headerRowBlocks:O,scrollY:0,cells:g({},y.cells,{values:v}),headerCells:g({},y.header,{values:b}),gdColumns:b.map(function(X){return X[0]}),gdColumnsOriginalOrder:b.map(function(X){return X[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:b.map(function(X,lt){var yt=V[X];V[X]=(yt||0)+1;var pt=X+"__"+V[X];return{key:pt,label:X,specIndex:lt,xIndex:H[lt],xScale:o,x:void 0,calcdata:void 0,columnWidth:F[lt]}})};return q.columns.forEach(function(X){X.calcdata=q,X.x=o(X)}),q};function e(x){if(t(x)){for(var y=0,v=0;v=y||E===x.length-1)&&(v[u]=_,_.key=M++,_.firstRowIndex=C,_.lastRowIndex=E,_=f(),u+=b,C=E+1,b=0);return v}function f(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}),gq=Ft(Q=>{var $=ya().extendFlat;Q.splitToPanels=function(g){var P=[0,0],S=$({},g,{key:"header",type:"header",page:0,prevPages:P,currentRepaint:[null,null],dragHandle:!0,values:g.calcdata.headerCells.values[g.specIndex],rowBlocks:g.calcdata.headerRowBlocks,calcdata:$({},g.calcdata,{cells:g.calcdata.headerCells})}),t=$({},g,{key:"cells1",type:"cells",page:0,prevPages:P,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks}),e=$({},g,{key:"cells2",type:"cells",page:1,prevPages:P,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks});return[t,e,S]},Q.splitToCells=function(g){var P=c(g);return(g.values||[]).slice(P[0],P[1]).map(function(S,t){var e=typeof S=="string"&&S.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:t+e,key:P[0]+t,column:g,calcdata:g.calcdata,page:g.page,rowBlocks:g.rowBlocks,value:S}})};function c(g){var P=g.rowBlocks[g.page],S=P?P.rows[0].rowIndex:0,t=P?S+P.rows.length:0;return[S,t]}}),PE=Ft((Q,$)=>{var c=LE(),g=En(),P=_n(),S=P.numberFormat,t=Ig(),e=Vs(),r=tc(),a=_n().raiseToTop,n=_n().strTranslate,o=_n().cancelTransition,i=mq(),s=gq(),f=ui();$.exports=function(ft,ut){var wt=!ft._context.staticPlot,zt=ft._fullLayout._paper.selectAll("."+c.cn.table).data(ut.map(function(oe){var Te=t.unwrap(oe),He=Te.trace;return i(ft,He)}),t.keyFun);zt.exit().remove(),zt.enter().append("g").classed(c.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),zt.attr("width",function(oe){return oe.width+oe.size.l+oe.size.r}).attr("height",function(oe){return oe.height+oe.size.t+oe.size.b}).attr("transform",function(oe){return n(oe.translateX,oe.translateY)});var Pt=zt.selectAll("."+c.cn.tableControlView).data(t.repeat,t.keyFun),Wt=Pt.enter().append("g").classed(c.cn.tableControlView,!0).style("box-sizing","content-box");if(wt){var Ht="onwheel"in document?"wheel":"mousewheel";Wt.on("mousemove",function(oe){Pt.filter(function(Te){return oe===Te}).call(u,ft)}).on(Ht,function(oe){if(!oe.scrollbarState.wheeling){oe.scrollbarState.wheeling=!0;var Te=oe.scrollY+g.event.deltaY,He=lt(ft,Pt,null,Te)(oe);He||(g.event.stopPropagation(),g.event.preventDefault()),oe.scrollbarState.wheeling=!1}}).call(u,ft,!0)}Pt.attr("transform",function(oe){return n(oe.size.l,oe.size.t)});var Jt=Pt.selectAll("."+c.cn.scrollBackground).data(t.repeat,t.keyFun);Jt.enter().append("rect").classed(c.cn.scrollBackground,!0).attr("fill","none"),Jt.attr("width",function(oe){return oe.width}).attr("height",function(oe){return oe.height}),Pt.each(function(oe){e.setClipUrl(g.select(this),y(ft,oe),ft)});var ge=Pt.selectAll("."+c.cn.yColumn).data(function(oe){return oe.columns},t.keyFun);ge.enter().append("g").classed(c.cn.yColumn,!0),ge.exit().remove(),ge.attr("transform",function(oe){return n(oe.x,0)}),wt&&ge.call(g.behavior.drag().origin(function(oe){var Te=g.select(this);return H(Te,oe,-c.uplift),a(this),oe.calcdata.columnDragInProgress=!0,u(Pt.filter(function(He){return oe.calcdata.key===He.key}),ft),oe}).on("drag",function(oe){var Te=g.select(this),He=function(ur){return(oe===ur?g.event.x:ur.x)+ur.columnWidth/2};oe.x=Math.max(-c.overdrag,Math.min(oe.calcdata.width+c.overdrag-oe.columnWidth,g.event.x));var Ge=T(ge).filter(function(ur){return ur.calcdata.key===oe.calcdata.key}),cr=Ge.sort(function(ur,jr){return He(ur)-He(jr)});cr.forEach(function(ur,jr){ur.xIndex=jr,ur.x=oe===ur?ur.x:ur.xScale(ur)}),ge.filter(function(ur){return oe!==ur}).transition().ease(c.transitionEase).duration(c.transitionDuration).attr("transform",function(ur){return n(ur.x,0)}),Te.call(o).attr("transform",n(oe.x,-c.uplift))}).on("dragend",function(oe){var Te=g.select(this),He=oe.calcdata;oe.x=oe.xScale(oe),oe.calcdata.columnDragInProgress=!1,H(Te,oe,0),N(ft,He,He.columns.map(function(Ge){return Ge.xIndex}))})),ge.each(function(oe){e.setClipUrl(g.select(this),v(ft,oe),ft)});var he=ge.selectAll("."+c.cn.columnBlock).data(s.splitToPanels,t.keyFun);he.enter().append("g").classed(c.cn.columnBlock,!0).attr("id",function(oe){return oe.key}),he.style("cursor",function(oe){return oe.dragHandle?"ew-resize":oe.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var de=he.filter(U),se=he.filter(F);wt&&se.call(g.behavior.drag().origin(function(oe){return g.event.stopPropagation(),oe}).on("drag",lt(ft,Pt,-1)).on("dragend",function(){})),b(ft,Pt,de,he),b(ft,Pt,se,he);var Tt=Pt.selectAll("."+c.cn.scrollAreaClip).data(t.repeat,t.keyFun);Tt.enter().append("clipPath").classed(c.cn.scrollAreaClip,!0).attr("id",function(oe){return y(ft,oe)});var Lt=Tt.selectAll("."+c.cn.scrollAreaClipRect).data(t.repeat,t.keyFun);Lt.enter().append("rect").classed(c.cn.scrollAreaClipRect,!0).attr("x",-c.overdrag).attr("y",-c.uplift).attr("fill","none"),Lt.attr("width",function(oe){return oe.width+2*c.overdrag}).attr("height",function(oe){return oe.height+c.uplift});var Mt=ge.selectAll("."+c.cn.columnBoundary).data(t.repeat,t.keyFun);Mt.enter().append("g").classed(c.cn.columnBoundary,!0);var te=ge.selectAll("."+c.cn.columnBoundaryClippath).data(t.repeat,t.keyFun);te.enter().append("clipPath").classed(c.cn.columnBoundaryClippath,!0),te.attr("id",function(oe){return v(ft,oe)});var ve=te.selectAll("."+c.cn.columnBoundaryRect).data(t.repeat,t.keyFun);ve.enter().append("rect").classed(c.cn.columnBoundaryRect,!0).attr("fill","none"),ve.attr("width",function(oe){return oe.columnWidth+2*x(oe)}).attr("height",function(oe){return oe.calcdata.height+2*x(oe)+c.uplift}).attr("x",function(oe){return-x(oe)}).attr("y",function(oe){return-x(oe)}),X(null,se,Pt)};function x(ft){return Math.ceil(ft.calcdata.maxLineWidth/2)}function y(ft,ut){return"clip"+ft._fullLayout._uid+"_scrollAreaBottomClip_"+ut.key}function v(ft,ut){return"clip"+ft._fullLayout._uid+"_columnBoundaryClippath_"+ut.calcdata.key+"_"+ut.specIndex}function T(ft){return[].concat.apply([],ft.map(function(ut){return ut})).map(function(ut){return ut.__data__})}function u(ft,ut,wt){function zt(he){var de=he.rowBlocks;return rt(de,de.length-1)+(de.length?at(de[de.length-1],1/0):1)}var Pt=ft.selectAll("."+c.cn.scrollbarKit).data(t.repeat,t.keyFun);Pt.enter().append("g").classed(c.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Pt.each(function(he){var de=he.scrollbarState;de.totalHeight=zt(he),de.scrollableAreaHeight=he.groupHeight-W(he),de.currentlyVisibleHeight=Math.min(de.totalHeight,de.scrollableAreaHeight),de.ratio=de.currentlyVisibleHeight/de.totalHeight,de.barLength=Math.max(de.ratio*de.currentlyVisibleHeight,c.goldenRatio*c.scrollbarWidth),de.barWiggleRoom=de.currentlyVisibleHeight-de.barLength,de.wiggleRoom=Math.max(0,de.totalHeight-de.scrollableAreaHeight),de.topY=de.barWiggleRoom===0?0:he.scrollY/de.wiggleRoom*de.barWiggleRoom,de.bottomY=de.topY+de.barLength,de.dragMultiplier=de.wiggleRoom/de.barWiggleRoom}).attr("transform",function(he){var de=he.width+c.scrollbarWidth/2+c.scrollbarOffset;return n(de,W(he))});var Wt=Pt.selectAll("."+c.cn.scrollbar).data(t.repeat,t.keyFun);Wt.enter().append("g").classed(c.cn.scrollbar,!0);var Ht=Wt.selectAll("."+c.cn.scrollbarSlider).data(t.repeat,t.keyFun);Ht.enter().append("g").classed(c.cn.scrollbarSlider,!0),Ht.attr("transform",function(he){return n(0,he.scrollbarState.topY||0)});var Jt=Ht.selectAll("."+c.cn.scrollbarGlyph).data(t.repeat,t.keyFun);Jt.enter().append("line").classed(c.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",c.scrollbarWidth).attr("stroke-linecap","round").attr("y1",c.scrollbarWidth/2),Jt.attr("y2",function(he){return he.scrollbarState.barLength-c.scrollbarWidth/2}).attr("stroke-opacity",function(he){return he.columnDragInProgress||!he.scrollbarState.barWiggleRoom||wt?0:.4}),Jt.transition().delay(0).duration(0),Jt.transition().delay(c.scrollbarHideDelay).duration(c.scrollbarHideDuration).attr("stroke-opacity",0);var ge=Wt.selectAll("."+c.cn.scrollbarCaptureZone).data(t.repeat,t.keyFun);ge.enter().append("line").classed(c.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",c.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(he){var de=g.event.y,se=this.getBoundingClientRect(),Tt=he.scrollbarState,Lt=de-se.top,Mt=g.scale.linear().domain([0,Tt.scrollableAreaHeight]).range([0,Tt.totalHeight]).clamp(!0);Tt.topY<=Lt&&Lt<=Tt.bottomY||lt(ut,ft,null,Mt(Lt-Tt.barLength/2))(he)}).call(g.behavior.drag().origin(function(he){return g.event.stopPropagation(),he.scrollbarState.scrollbarScrollInProgress=!0,he}).on("drag",lt(ut,ft)).on("dragend",function(){})),ge.attr("y2",function(he){return he.scrollbarState.scrollableAreaHeight}),ut._context.staticPlot&&(Jt.remove(),ge.remove())}function b(ft,ut,wt,zt){var Pt=_(wt),Wt=C(Pt);h(Wt);var Ht=M(Wt);k(Ht);var Jt=A(Wt),ge=E(Jt);p(ge),w(ge,ut,zt,ft),dt(Wt)}function _(ft){var ut=ft.selectAll("."+c.cn.columnCells).data(t.repeat,t.keyFun);return ut.enter().append("g").classed(c.cn.columnCells,!0),ut.exit().remove(),ut}function C(ft){var ut=ft.selectAll("."+c.cn.columnCell).data(s.splitToCells,function(wt){return wt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.columnCell,!0),ut.exit().remove(),ut}function M(ft){var ut=ft.selectAll("."+c.cn.cellRect).data(t.repeat,function(wt){return wt.keyWithinBlock});return ut.enter().append("rect").classed(c.cn.cellRect,!0),ut}function E(ft){var ut=ft.selectAll("."+c.cn.cellText).data(t.repeat,function(wt){return wt.keyWithinBlock});return ut.enter().append("text").classed(c.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){g.event.stopPropagation()}),ut}function A(ft){var ut=ft.selectAll("."+c.cn.cellTextHolder).data(t.repeat,function(wt){return wt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ut}function h(ft){ft.each(function(ut,wt){var zt=ut.calcdata.cells.font,Pt=ut.column.specIndex,Wt={size:V(zt.size,Pt,wt),color:V(zt.color,Pt,wt),family:V(zt.family,Pt,wt),weight:V(zt.weight,Pt,wt),style:V(zt.style,Pt,wt),variant:V(zt.variant,Pt,wt),textcase:V(zt.textcase,Pt,wt),lineposition:V(zt.lineposition,Pt,wt),shadow:V(zt.shadow,Pt,wt)};ut.rowNumber=ut.key,ut.align=V(ut.calcdata.cells.align,Pt,wt),ut.cellBorderWidth=V(ut.calcdata.cells.line.width,Pt,wt),ut.font=Wt})}function p(ft){ft.each(function(ut){e.font(g.select(this),ut.font)})}function k(ft){ft.attr("width",function(ut){return ut.column.columnWidth}).attr("stroke-width",function(ut){return ut.cellBorderWidth}).each(function(ut){var wt=g.select(this);f.stroke(wt,V(ut.calcdata.cells.line.color,ut.column.specIndex,ut.rowNumber)),f.fill(wt,V(ut.calcdata.cells.fill.color,ut.column.specIndex,ut.rowNumber))})}function w(ft,ut,wt,zt){ft.text(function(Pt){var Wt=Pt.column.specIndex,Ht=Pt.rowNumber,Jt=Pt.value,ge=typeof Jt=="string",he=ge&&Jt.match(/
/i),de=!ge||he;Pt.mayHaveMarkup=ge&&Jt.match(/[<&>]/);var se=R(Jt);Pt.latex=se;var Tt=se?"":V(Pt.calcdata.cells.prefix,Wt,Ht)||"",Lt=se?"":V(Pt.calcdata.cells.suffix,Wt,Ht)||"",Mt=se?null:V(Pt.calcdata.cells.format,Wt,Ht)||null,te=Tt+(Mt?S(Mt)(Pt.value):Pt.value)+Lt,ve;Pt.wrappingNeeded=!Pt.wrapped&&!de&&!se&&(ve=O(te)),Pt.cellHeightMayIncrease=he||se||Pt.mayHaveMarkup||(ve===void 0?O(te):ve),Pt.needsConvertToTspans=Pt.mayHaveMarkup||Pt.wrappingNeeded||Pt.latex;var oe;if(Pt.wrappingNeeded){var Te=c.wrapSplitCharacter===" "?te.replace(/Pt&&zt.push(Wt),Pt+=ge}return zt}function X(ft,ut,wt){var zt=T(ut)[0];if(zt!==void 0){var Pt=zt.rowBlocks,Wt=zt.calcdata,Ht=rt(Pt,Pt.length),Jt=zt.calcdata.groupHeight-W(zt),ge=Wt.scrollY=Math.max(0,Math.min(Ht-Jt,Wt.scrollY)),he=q(Pt,ge,Jt);he.length===1&&(he[0]===Pt.length-1?he.unshift(he[0]-1):he.push(he[0]+1)),he[0]%2&&he.reverse(),ut.each(function(de,se){de.page=he[se],de.scrollY=ge}),ut.attr("transform",function(de){var se=rt(de.rowBlocks,de.page)-de.scrollY;return n(0,se)}),ft&&(yt(ft,wt,ut,he,zt.prevPages,zt,0),yt(ft,wt,ut,he,zt.prevPages,zt,1),u(wt,ft))}}function lt(ft,ut,wt,zt){return function(Pt){var Wt=Pt.calcdata?Pt.calcdata:Pt,Ht=ut.filter(function(de){return Wt.key===de.key}),Jt=wt||Wt.scrollbarState.dragMultiplier,ge=Wt.scrollY;Wt.scrollY=zt===void 0?Wt.scrollY+Jt*g.event.dy:zt;var he=Ht.selectAll("."+c.cn.yColumn).selectAll("."+c.cn.columnBlock).filter(F);return X(ft,he,Ht),Wt.scrollY===ge}}function yt(ft,ut,wt,zt,Pt,Wt,Ht){var Jt=zt[Ht]!==Pt[Ht];Jt&&(clearTimeout(Wt.currentRepaint[Ht]),Wt.currentRepaint[Ht]=setTimeout(function(){var ge=wt.filter(function(he,de){return de===Ht&&zt[de]!==Pt[de]});b(ft,ut,ge,wt),Pt[Ht]=zt[Ht]}))}function pt(ft,ut,wt,zt){return function(){var Pt=g.select(ut.parentNode);Pt.each(function(Wt){var Ht=Wt.fragments;Pt.selectAll("tspan.line").each(function(Mt,te){Ht[te].width=this.getComputedTextLength()});var Jt=Ht[Ht.length-1].width,ge=Ht.slice(0,-1),he=[],de,se,Tt=0,Lt=Wt.column.columnWidth-2*c.cellPad;for(Wt.value="";ge.length;)de=ge.shift(),se=de.width+Jt,Tt+se>Lt&&(Wt.value+=he.join(c.wrapSpacer)+c.lineBreaker,he=[],Tt=0),he.push(de.text),Tt+=se;Tt&&(Wt.value+=he.join(c.wrapSpacer)),Wt.wrapped=!0}),Pt.selectAll("tspan.line").remove(),w(Pt.select("."+c.cn.cellText),wt,ft,zt),g.select(ut.parentNode.parentNode).call(dt)}}function st(ft,ut,wt,zt,Pt){return function(){if(!Pt.settledY){var Wt=g.select(ut.parentNode),Ht=it(Pt),Jt=Pt.key-Ht.firstRowIndex,ge=Ht.rows[Jt].rowHeight,he=Pt.cellHeightMayIncrease?ut.parentNode.getBoundingClientRect().height+2*c.cellPad:ge,de=Math.max(he,ge),se=de-Ht.rows[Jt].rowHeight;se&&(Ht.rows[Jt].rowHeight=de,ft.selectAll("."+c.cn.columnCell).call(dt),X(null,ft.filter(F),0),u(wt,zt,!0)),Wt.attr("transform",function(){var Tt=this,Lt=Tt.parentNode,Mt=Lt.getBoundingClientRect(),te=g.select(Tt.parentNode).select("."+c.cn.cellRect).node().getBoundingClientRect(),ve=Tt.transform.baseVal.consolidate(),oe=te.top-Mt.top+(ve?ve.matrix.f:c.cellPad);return n(tt(Pt,g.select(Tt.parentNode).select("."+c.cn.cellTextHolder).node().getBoundingClientRect().width),oe)}),Pt.settledY=!0}}}function tt(ft,ut){switch(ft.align){case"left":return c.cellPad;case"right":return ft.column.columnWidth-(ut||0)-c.cellPad;case"center":return(ft.column.columnWidth-(ut||0))/2;default:return c.cellPad}}function dt(ft){ft.attr("transform",function(ut){var wt=ut.rowBlocks[0].auxiliaryBlocks.reduce(function(Ht,Jt){return Ht+at(Jt,1/0)},0),zt=it(ut),Pt=at(zt,ut.key),Wt=Pt+wt;return n(0,Wt)}).selectAll("."+c.cn.cellRect).attr("height",function(ut){return Y(it(ut),ut.key).rowHeight})}function rt(ft,ut){for(var wt=0,zt=ut-1;zt>=0;zt--)wt+=vt(ft[zt]);return wt}function at(ft,ut){for(var wt=0,zt=0;zt{var $=dd().getModuleCalcData,c=PE(),g="table";Q.name=g,Q.plot=function(P){var S=$(P.calcdata,g)[0];S.length&&c(P,S)},Q.clean=function(P,S,t,e){var r=e._has&&e._has(g),a=S._has&&S._has(g);r&&!a&&e._paperdiv.selectAll(".table").remove()}}),yq=Ft((Q,$)=>{$.exports={attributes:CE(),supplyDefaults:dq(),calc:pq(),plot:PE(),moduleType:"trace",name:"table",basePlotModule:vq(),categories:["noOpacity"],meta:{}}}),xq=Ft((Q,$)=>{$.exports=yq()}),_q=Ft((Q,$)=>{var c=ka(),g=yi(),P=Cd(),S=dh().descriptionWithDates,t=Yc().overrideAll,e=Ed().dash,r=ya().extendFlat;$.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:c({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:P.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:r({},P.labelalias,{editType:"calc"}),tickfont:c({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:S("tick label")},tickformatstops:t(P.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:r({},e,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:r({},e,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:g.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}}),_T=Ft((Q,$)=>{var c=ka(),g=_q(),P=yi(),S=c({editType:"calc"}),t=tf().zorder;S.family.dflt='"Open Sans", verdana, arial, sans-serif',S.size.dflt=12,S.color.dflt=P.defaultLine,$.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:g,baxis:g,font:S,color:{valType:"color",dflt:P.defaultLine,editType:"plot"},zorder:t}}),bq=Ft((Q,$)=>{var c=_n().isArray1D;$.exports=function(g,P,S){var t=S("x"),e=t&&t.length,r=S("y"),a=r&&r.length;if(!e&&!a)return!1;if(P._cheater=!t,(!e||c(t))&&(!a||c(r))){var n=e?t.length:1/0;a&&(n=Math.min(n,r.length)),P.a&&P.a.length&&(n=Math.min(n,P.a.length)),P.b&&P.b.length&&(n=Math.min(n,P.b.length)),P._length=n}else P._length=null;return!0}}),wq=Ft((Q,$)=>{var c=_T(),g=ui().addOpacity,P=Qo(),S=_n(),t=yg(),e=o0(),r=gm(),a=Vm(),n=s0(),o=dv();$.exports=function(s,f,x){var y=x.letter,v=x.font||{},T=c[y+"axis"];function u(W,q){return S.coerce(s,f,T,W,q)}function b(W,q){return S.coerce2(s,f,T,W,q)}x.name&&(f._name=x.name,f._id=x.name),u("autotypenumbers",x.autotypenumbersDflt);var _=u("type");if(_==="-"&&(x.data&&i(f,x.data),f.type==="-"?f.type="linear":_=s.type=f.type),u("smoothing"),u("cheatertype"),u("showticklabels"),u("labelprefix",y+" = "),u("labelsuffix"),u("showtickprefix"),u("showticksuffix"),u("separatethousands"),u("tickformat"),u("exponentformat"),u("minexponent"),u("showexponent"),u("categoryorder"),u("tickmode"),u("tickvals"),u("ticktext"),u("tick0"),u("dtick"),f.tickmode==="array"&&(u("arraytick0"),u("arraydtick")),u("labelpadding"),f._hovertitle=y,_==="date"){var C=P.getComponentMethod("calendars","handleDefaults");C(s,f,"calendar",x.calendar)}n(f,x.fullLayout),f.c2p=S.identity;var M=u("color",x.dfltColor),E=M===s.color?M:v.color,A=u("title.text");A&&(S.coerceFont(u,"title.font",v,{overrideDflt:{size:S.bigFont(v.size),color:E}}),u("title.offset")),u("tickangle");var h=u("autorange",!f.isValidRange(s.range));h&&u("rangemode"),u("range"),f.cleanRange(),u("fixedrange"),t(s,f,u,_),r(s,f,u,_,x),e(s,f,u,_,x),a(s,f,u,{data:x.data,dataAttr:y});var p=b("gridcolor",g(M,.3)),k=b("gridwidth"),w=b("griddash"),R=u("showgrid");R||(delete f.gridcolor,delete f.gridwidth,delete f.griddash);var O=b("startlinecolor",M),N=b("startlinewidth",k),V=u("startline",f.showgrid||!!O||!!N);V||(delete f.startlinecolor,delete f.startlinewidth);var H=b("endlinecolor",M),F=b("endlinewidth",k),U=u("endline",f.showgrid||!!H||!!F);return U||(delete f.endlinecolor,delete f.endlinewidth),R?(u("minorgridcount"),u("minorgridwidth",k),u("minorgriddash",w),u("minorgridcolor",g(p,.06)),f.minorgridcount||(delete f.minorgridwidth,delete f.minorgriddash,delete f.minorgridcolor)):(delete f.gridcolor,delete f.gridwidth,delete f.griddash),f.showticklabels==="none"&&(delete f.tickfont,delete f.tickangle,delete f.showexponent,delete f.exponentformat,delete f.minexponent,delete f.tickformat,delete f.showticksuffix,delete f.showtickprefix),f.showticksuffix||delete f.ticksuffix,f.showtickprefix||delete f.tickprefix,u("tickmode"),f};function i(s,f){if(s.type==="-"){var x=s._id,y=x.charAt(0),v=y+"calendar",T=s[v];s.type=o(f,T,{autotypenumbers:s.autotypenumbers})}}}),kq=Ft((Q,$)=>{var c=wq(),g=mu();$.exports=function(S,t,e,r,a){var n=r("a");n||(r("da"),r("a0"));var o=r("b");o||(r("db"),r("b0")),P(S,t,e,a)};function P(S,t,e,r){var a=["aaxis","baxis"];a.forEach(function(n){var o=n.charAt(0),i=S[n]||{},s=g.newContainer(t,n),f={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:n,data:S[o],calendar:t.calendar,dfltColor:r,bgColor:e.paper_bgcolor,autotypenumbersDflt:e.autotypenumbers,fullLayout:e};c(i,s,f),s._categories=s._categories||[],!S[n]&&i.type!=="-"&&(S[n]={type:i.type})})}}),Tq=Ft((Q,$)=>{var c=_n(),g=bq(),P=kq(),S=_T(),t=yi();$.exports=function(e,r,a,n){function o(f,x){return c.coerce(e,r,S,f,x)}r._clipPathId="clip"+r.uid+"carpet";var i=o("color",t.defaultLine);if(c.coerceFont(o,"font",n.font),o("carpet"),P(e,r,n,o,i),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=g(e,r,o);s||(r.visible=!1),r._cheater&&o("cheaterslope"),o("zorder")}}),zE=Ft((Q,$)=>{var c=_n().isArrayOrTypedArray;$.exports=function(g,P,S){var t;for(c(g)?g.length>P.length&&(g=g.slice(0,P.length)):g=[],t=0;t{$.exports=function(c,g,P){if(c.length===0)return"";var S,t=[],e=P?3:1;for(S=0;S{$.exports=function(c,g,P,S,t,e){var r=t[0]*c.dpdx(g),a=t[1]*c.dpdy(P),n=1,o=1;if(e){var i=Math.sqrt(t[0]*t[0]+t[1]*t[1]),s=Math.sqrt(e[0]*e[0]+e[1]*e[1]),f=(t[0]*e[0]+t[1]*e[1])/i/s;o=Math.max(0,f)}var x=Math.atan2(a,r)*180/Math.PI;return x<-90?(x+=180,n=-n):x>90&&(x-=180,n=-n),{angle:x,flip:n,p:c.c2p(S,g,P),offsetMultplier:o}}}),Mq=Ft((Q,$)=>{var c=En(),g=Vs(),P=zE(),S=IE(),t=Aq(),e=tc(),r=_n(),a=r.strRotate,n=r.strTranslate,o=Sf();$.exports=function(u,b,_,C){var M=u._context.staticPlot,E=b.xaxis,A=b.yaxis,h=u._fullLayout,p=h._clips;r.makeTraceGroups(C,_,"trace").each(function(k){var w=c.select(this),R=k[0],O=R.trace,N=O.aaxis,V=O.baxis,H=r.ensureSingle(w,"g","minorlayer"),F=r.ensureSingle(w,"g","majorlayer"),U=r.ensureSingle(w,"g","boundarylayer"),W=r.ensureSingle(w,"g","labellayer");w.style("opacity",O.opacity),s(E,A,F,N,"a",N._gridlines,!0),s(E,A,F,V,"b",V._gridlines,!0),s(E,A,H,N,"a",N._minorgridlines,!0),s(E,A,H,V,"b",V._minorgridlines,!0),s(E,A,U,N,"a-boundary",N._boundarylines,M),s(E,A,U,V,"b-boundary",V._boundarylines,M);var q=f(u,E,A,O,R,W,N._labels,"a-label"),X=f(u,E,A,O,R,W,V._labels,"b-label");x(u,W,O,R,E,A,q,X),i(O,R,p,E,A)})};function i(u,b,_,C,M){var E,A,h,p,k=_.select("#"+u._clipPathId);k.size()||(k=_.append("clipPath").classed("carpetclip",!0));var w=r.ensureSingle(k,"path","carpetboundary"),R=b.clipsegments,O=[];for(p=0;p0?"start":"end","data-notex":1}).call(g.font,R.font).text(R.text).call(e.convertToTspans,u),U=g.bBox(this);F.attr("transform",n(N.p[0],N.p[1])+a(N.angle)+n(R.axis.labelpadding*H,U.height*.3)),k=Math.max(k,U.width+R.axis.labelpadding)}),p.exit().remove(),w.maxExtent=k,w}function x(u,b,_,C,M,E,A,h){var p,k,w,R,O=r.aggNums(Math.min,null,_.a),N=r.aggNums(Math.max,null,_.a),V=r.aggNums(Math.min,null,_.b),H=r.aggNums(Math.max,null,_.b);p=.5*(O+N),k=V,w=_.ab2xy(p,k,!0),R=_.dxyda_rough(p,k),A.angle===void 0&&r.extendFlat(A,t(_,M,E,w,_.dxydb_rough(p,k))),T(u,b,_,C,w,R,_.aaxis,M,E,A,"a-title"),p=O,k=.5*(V+H),w=_.ab2xy(p,k,!0),R=_.dxydb_rough(p,k),h.angle===void 0&&r.extendFlat(h,t(_,M,E,w,_.dxyda_rough(p,k))),T(u,b,_,C,w,R,_.baxis,M,E,h,"b-title")}var y=o.LINE_SPACING,v=(1-o.MID_SHIFT)/y+1;function T(u,b,_,C,M,E,A,h,p,k,w){var R=[];A.title.text&&R.push(A.title.text);var O=b.selectAll("text."+w).data(R),N=k.maxExtent;O.enter().append("text").classed(w,!0),O.each(function(){var V=t(_,h,p,M,E);["start","both"].indexOf(A.showticklabels)===-1&&(N=0);var H=A.title.font.size;N+=H+A.title.offset;var F=k.angle+(k.flip<0?180:0),U=(F-V.angle+450)%360,W=U>90&&U<270,q=c.select(this);q.text(A.title.text).call(e.convertToTspans,u),W&&(N=(-e.lineCount(q)+v)*y*H-N),q.attr("transform",n(V.p[0],V.p[1])+a(V.angle)+n(0,N)).attr("text-anchor","middle").call(g.font,A.title.font)}),O.exit().remove()}}),Sq=Ft((Q,$)=>{var c=_n().isArrayOrTypedArray;$.exports=function(g,P,S){var t,e,r,a,n,o,i=[],s=c(g)?g.length:g,f=c(P)?P.length:P,x=c(g)?g:null,y=c(P)?P:null;x&&(r=(x.length-1)/(x[x.length-1]-x[0])/(s-1)),y&&(a=(y.length-1)/(y[y.length-1]-y[0])/(f-1));var v,T=1/0,u=-1/0;for(e=0;e{var c=_n().isArrayOrTypedArray;$.exports=function(P){return g(P,0)};function g(P,S){if(!c(P)||S>=10)return null;for(var t=1/0,e=-1/0,r=P.length,a=0;a{var c=Ls(),g=ya().extendFlat;$.exports=function(P,S,t){var e,r,a,n,o,i,s,f,x,y,v,T,u,b,_=P["_"+S],C=P[S+"axis"],M=C._gridlines=[],E=C._minorgridlines=[],A=C._boundarylines=[],h=P["_"+t],p=P[t+"axis"];C.tickmode==="array"&&(C.tickvals=_.slice());var k=P._xctrl,w=P._yctrl,R=k[0].length,O=k.length,N=P._a.length,V=P._b.length;c.prepTicks(C),C.tickmode==="array"&&delete C.tickvals;var H=C.smoothing?3:1;function F(W){var q,X,lt,yt,pt,st,tt,dt,rt,at,vt,it,Y=[],ft=[],ut={};if(S==="b")for(X=P.b2j(W),lt=Math.floor(Math.max(0,Math.min(V-2,X))),yt=X-lt,ut.length=V,ut.crossLength=N,ut.xy=function(wt){return P.evalxy([],wt,X)},ut.dxy=function(wt,zt){return P.dxydi([],wt,lt,zt,yt)},q=0;q0&&(rt=P.dxydi([],q-1,lt,0,yt),Y.push(pt[0]+rt[0]/3),ft.push(pt[1]+rt[1]/3),at=P.dxydi([],q-1,lt,1,yt),Y.push(dt[0]-at[0]/3),ft.push(dt[1]-at[1]/3)),Y.push(dt[0]),ft.push(dt[1]),pt=dt;else for(q=P.a2i(W),st=Math.floor(Math.max(0,Math.min(N-2,q))),tt=q-st,ut.length=N,ut.crossLength=V,ut.xy=function(wt){return P.evalxy([],q,wt)},ut.dxy=function(wt,zt){return P.dxydj([],st,wt,tt,zt)},X=0;X0&&(vt=P.dxydj([],st,X-1,tt,0),Y.push(pt[0]+vt[0]/3),ft.push(pt[1]+vt[1]/3),it=P.dxydj([],st,X-1,tt,1),Y.push(dt[0]-it[0]/3),ft.push(dt[1]-it[1]/3)),Y.push(dt[0]),ft.push(dt[1]),pt=dt;return ut.axisLetter=S,ut.axis=C,ut.crossAxis=p,ut.value=W,ut.constvar=t,ut.index=f,ut.x=Y,ut.y=ft,ut.smoothing=p.smoothing,ut}function U(W){var q,X,lt,yt,pt,st=[],tt=[],dt={};if(dt.length=_.length,dt.crossLength=h.length,S==="b")for(lt=Math.max(0,Math.min(V-2,W)),pt=Math.min(1,Math.max(0,W-lt)),dt.xy=function(rt){return P.evalxy([],rt,W)},dt.dxy=function(rt,at){return P.dxydi([],rt,lt,at,pt)},q=0;q_.length-1)&&M.push(g(U(r),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(f=i;f_.length-1)&&!(v<0||v>_.length-1))for(T=_[a],u=_[v],e=0;e_[_.length-1])&&E.push(g(F(y),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&A.push(g(U(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&A.push(g(U(_.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(n=5e-15,o=[Math.floor((_[_.length-1]-C.tick0)/C.dtick*(1+n)),Math.ceil((_[0]-C.tick0)/C.dtick/(1+n))].sort(function(W,q){return W-q}),i=o[0],s=o[1],f=i;f<=s;f++)x=C.tick0+C.dtick*f,M.push(g(F(x),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(f=i-1;f_[_.length-1])&&E.push(g(F(y),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&A.push(g(F(_[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&A.push(g(F(_[_.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}),Lq=Ft((Q,$)=>{var c=Ls(),g=ya().extendFlat;$.exports=function(P,S){var t,e,r,a,n,o=S._labels=[],i=S._gridlines;for(t=0;t{$.exports=function(c,g,P,S){var t,e,r,a=[],n=!!P.smoothing,o=!!S.smoothing,i=c[0].length-1,s=c.length-1;for(t=0,e=[],r=[];t<=i;t++)e[t]=c[0][t],r[t]=g[0][t];for(a.push({x:e,y:r,bicubic:n}),t=0,e=[],r=[];t<=s;t++)e[t]=c[t][i],r[t]=g[t][i];for(a.push({x:e,y:r,bicubic:o}),t=i,e=[],r=[];t>=0;t--)e[i-t]=c[s][t],r[i-t]=g[s][t];for(a.push({x:e,y:r,bicubic:n}),t=s,e=[],r=[];t>=0;t--)e[s-t]=c[t][0],r[s-t]=g[t][0];return a.push({x:e,y:r,bicubic:o}),a}}),zq=Ft((Q,$)=>{var c=_n();$.exports=function(g,P,S){var t,e,r,a=[],n=[],o=g[0].length,i=g.length;function s(X,lt){var yt=0,pt,st=0;return X>0&&(pt=g[lt][X-1])!==void 0&&(st++,yt+=pt),X0&&(pt=g[lt-1][X])!==void 0&&(st++,yt+=pt),lt0&&e0&&th);return c.log("Smoother converged to",p,"after",w,"iterations"),g}}),Iq=Ft((Q,$)=>{$.exports={RELATIVE_CULL_TOLERANCE:1e-6}}),Oq=Ft((Q,$)=>{var c=.5;$.exports=function(g,P,S,t){var e=g[0]-P[0],r=g[1]-P[1],a=S[0]-P[0],n=S[1]-P[1],o=Math.pow(e*e+r*r,c/2),i=Math.pow(a*a+n*n,c/2),s=(i*i*e-o*o*a)*t,f=(i*i*r-o*o*n)*t,x=i*(o+i)*3,y=o*(o+i)*3;return[[P[0]+(x&&s/x),P[1]+(x&&f/x)],[P[0]-(y&&s/y),P[1]-(y&&f/y)]]}}),Dq=Ft((Q,$)=>{var c=Oq(),g=_n().ensureArray;function P(S,t,e){var r=-.5*e[0]+1.5*t[0],a=-.5*e[1]+1.5*t[1];return[(2*r+S[0])/3,(2*a+S[1])/3]}$.exports=function(S,t,e,r,a,n){var o,i,s,f,x,y,v,T,u,b,_=e[0].length,C=e.length,M=a?3*_-2:_,E=n?3*C-2:C;for(S=g(S,E),t=g(t,E),s=0;s{$.exports=function(c,g,P,S,t){var e=g-2,r=P-2;return S&&t?function(a,n,o){a||(a=[]);var i,s,f,x,y,v,T=Math.max(0,Math.min(Math.floor(n),e)),u=Math.max(0,Math.min(Math.floor(o),r)),b=Math.max(0,Math.min(1,n-T)),_=Math.max(0,Math.min(1,o-u));T*=3,u*=3;var C=b*b,M=C*b,E=1-b,A=E*E,h=A*E,p=_*_,k=p*_,w=1-_,R=w*w,O=R*w;for(v=0;v{$.exports=function(c,g,P){return g&&P?function(S,t,e,r,a){S||(S=[]);var n,o,i,s,f,x;t*=3,e*=3;var y=r*r,v=1-r,T=v*v,u=v*r*2,b=-3*T,_=3*(T-u),C=3*(u-y),M=3*y,E=a*a,A=E*a,h=1-a,p=h*h,k=p*h;for(x=0;x{$.exports=function(c,g,P){return g&&P?function(S,t,e,r,a){S||(S=[]);var n,o,i,s,f,x;t*=3,e*=3;var y=r*r,v=y*r,T=1-r,u=T*T,b=u*T,_=a*a,C=1-a,M=C*C,E=C*a*2,A=-3*M,h=3*(M-E),p=3*(E-_),k=3*_;for(x=0;x{var c=Iq(),g=L_().findBin,P=Dq(),S=Fq(),t=Rq(),e=Bq();$.exports=function(r){var a=r._a,n=r._b,o=a.length,i=n.length,s=r.aaxis,f=r.baxis,x=a[0],y=a[o-1],v=n[0],T=n[i-1],u=a[a.length-1]-a[0],b=n[n.length-1]-n[0],_=u*c.RELATIVE_CULL_TOLERANCE,C=b*c.RELATIVE_CULL_TOLERANCE;x-=_,y+=_,v-=C,T+=C,r.isVisible=function(M,E){return M>x&&Mv&&Ey||ET},r.setScale=function(){var M=r._x,E=r._y,A=P(r._xctrl,r._yctrl,M,E,s.smoothing,f.smoothing);r._xctrl=A[0],r._yctrl=A[1],r.evalxy=S([r._xctrl,r._yctrl],o,i,s.smoothing,f.smoothing),r.dxydi=t([r._xctrl,r._yctrl],s.smoothing,f.smoothing),r.dxydj=e([r._xctrl,r._yctrl],s.smoothing,f.smoothing)},r.i2a=function(M){var E=Math.max(0,Math.floor(M[0]),o-2),A=M[0]-E;return(1-A)*a[E]+A*a[E+1]},r.j2b=function(M){var E=Math.max(0,Math.floor(M[1]),o-2),A=M[1]-E;return(1-A)*n[E]+A*n[E+1]},r.ij2ab=function(M){return[r.i2a(M[0]),r.j2b(M[1])]},r.a2i=function(M){var E=Math.max(0,Math.min(g(M,a),o-2)),A=a[E],h=a[E+1];return Math.max(0,Math.min(o-1,E+(M-A)/(h-A)))},r.b2j=function(M){var E=Math.max(0,Math.min(g(M,n),i-2)),A=n[E],h=n[E+1];return Math.max(0,Math.min(i-1,E+(M-A)/(h-A)))},r.ab2ij=function(M){return[r.a2i(M[0]),r.b2j(M[1])]},r.i2c=function(M,E){return r.evalxy([],M,E)},r.ab2xy=function(M,E,A){if(!A&&(Ma[o-1]|En[i-1]))return[!1,!1];var h=r.a2i(M),p=r.b2j(E),k=r.evalxy([],h,p);if(A){var w=0,R=0,O=[],N,V,H,F;Ma[o-1]?(N=o-2,V=1,w=(M-a[o-1])/(a[o-1]-a[o-2])):(N=Math.max(0,Math.min(o-2,Math.floor(h))),V=h-N),En[i-1]?(H=i-2,F=1,R=(E-n[i-1])/(n[i-1]-n[i-2])):(H=Math.max(0,Math.min(i-2,Math.floor(p))),F=p-H),w&&(r.dxydi(O,N,H,V,F),k[0]+=O[0]*w,k[1]+=O[1]*w),R&&(r.dxydj(O,N,H,V,F),k[0]+=O[0]*R,k[1]+=O[1]*R)}return k},r.c2p=function(M,E,A){return[E.c2p(M[0]),A.c2p(M[1])]},r.p2x=function(M,E,A){return[E.p2c(M[0]),A.p2c(M[1])]},r.dadi=function(M){var E=Math.max(0,Math.min(a.length-2,M));return a[E+1]-a[E]},r.dbdj=function(M){var E=Math.max(0,Math.min(n.length-2,M));return n[E+1]-n[E]},r.dxyda=function(M,E,A,h){var p=r.dxydi(null,M,E,A,h),k=r.dadi(M,A);return[p[0]/k,p[1]/k]},r.dxydb=function(M,E,A,h){var p=r.dxydj(null,M,E,A,h),k=r.dbdj(E,h);return[p[0]/k,p[1]/k]},r.dxyda_rough=function(M,E,A){var h=u*(A||.1),p=r.ab2xy(M+h,E,!0),k=r.ab2xy(M-h,E,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dxydb_rough=function(M,E,A){var h=b*(A||.1),p=r.ab2xy(M,E+h,!0),k=r.ab2xy(M,E-h,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dpdx=function(M){return M._m},r.dpdy=function(M){return M._m}}}),jq=Ft((Q,$)=>{var c=Ls(),g=_n().isArray1D,P=Sq(),S=Eq(),t=Cq(),e=Lq(),r=Pq(),a=B6(),n=zq(),o=R6(),i=Nq();$.exports=function(s,f){var x=c.getFromId(s,f.xaxis),y=c.getFromId(s,f.yaxis),v=f.aaxis,T=f.baxis,u=f.x,b=f.y,_=[];u&&g(u)&&_.push("x"),b&&g(b)&&_.push("y"),_.length&&o(f,v,T,"a","b",_);var C=f._a=f._a||f.a,M=f._b=f._b||f.b;u=f._x||f.x,b=f._y||f.y;var E={};if(f._cheater){var A=v.cheatertype==="index"?C.length:C,h=T.cheatertype==="index"?M.length:M;u=P(A,h,f.cheaterslope)}f._x=u=a(u),f._y=b=a(b),n(u,C,M),n(b,C,M),i(f),f.setScale();var p=S(u),k=S(b),w=.5*(p[1]-p[0]),R=.5*(p[1]+p[0]),O=.5*(k[1]-k[0]),N=.5*(k[1]+k[0]),V=1.3;return p=[R-w*V,R+w*V],k=[N-O*V,N+O*V],f._extremes[x._id]=c.findExtremes(x,p,{padded:!0}),f._extremes[y._id]=c.findExtremes(y,k,{padded:!0}),t(f,"a","b"),t(f,"b","a"),e(f,v),e(f,T),E.clipsegments=r(f._xctrl,f._yctrl,v,T),E.x=u,E.y=b,E.a=C,E.b=M,[E]}}),Uq=Ft((Q,$)=>{$.exports={attributes:_T(),supplyDefaults:Tq(),plot:Mq(),calc:jq(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Ef(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}),Vq=Ft((Q,$)=>{$.exports=Uq()}),OE=Ft((Q,$)=>{var c=D0(),g=tf(),P=Yo(),{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=$u(),r=Ac(),a=ya().extendFlat,n=g.marker,o=g.line,i=n.line;$.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:a({},g.mode,{dflt:"markers"}),text:a({},g.text,{}),texttemplate:t({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:a({},g.hovertext,{}),line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:a({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:g.connectgaps,fill:a({},g.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:c(),marker:a({symbol:n.symbol,opacity:n.opacity,maxdisplayed:n.maxdisplayed,angle:n.angle,angleref:n.angleref,standoff:n.standoff,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:a({width:i.width,editType:"calc"},r("marker.line")),gradient:n.gradient,editType:"calc"},r("marker")),textfont:g.textfont,textposition:g.textposition,selected:g.selected,unselected:g.unselected,hoverinfo:a({},P.hoverinfo,{flags:["a","b","text","name"]}),hoveron:g.hoveron,hovertemplate:S(),hovertemplatefallback:e(),zorder:g.zorder}}),Hq=Ft((Q,$)=>{var c=_n(),g=_m(),P=Mc(),S=c0(),t=F0(),e=xv(),r=b0(),a=R0(),n=OE();$.exports=function(o,i,s,f){function x(C,M){return c.coerce(o,i,n,C,M)}x("carpet"),i.xaxis="x",i.yaxis="y";var y=x("a"),v=x("b"),T=Math.min(y.length,v.length);if(!T){i.visible=!1;return}i._length=T,x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext");var u=T{$.exports=function(c,g){var P={},S=g._carpet,t=S.ab2ij([c.a,c.b]),e=Math.floor(t[0]),r=t[0]-e,a=Math.floor(t[1]),n=t[1]-a,o=S.evalxy([],e,a,r,n);return P.yLabel=o[1].toFixed(3),P}}),bT=Ft((Q,$)=>{$.exports=function(c,g){for(var P=c._fullData.length,S,t=0;t{var c=ia(),g=N0(),P=ct(),S=Bt(),t=me().calcMarkerSize,e=bT();$.exports=function(r,a){var n=a._carpetTrace=e(r,a);if(!(!n||!n.visible||n.visible==="legendonly")){var o;a.xaxis=n.xaxis,a.yaxis=n.yaxis;var i=a._length,s=new Array(i),f,x,y=!1;for(o=0;o{var c=Ya(),g=Ls(),P=Vs();$.exports=function(S,t,e,r){var a,n,o,i=e[0][0].carpet,s=g.getFromId(S,i.xaxis||"x"),f=g.getFromId(S,i.yaxis||"y"),x={xaxis:s,yaxis:f,plot:t.plot};for(a=0;a{var c=Pd(),g=_n().fillText;$.exports=function(P,S,t,e){var r=c(P,S,t,e);if(!r||r[0].index===!1)return;var a=r[0];if(a.index===void 0){var n=1-a.y0/P.ya._length,o=P.xa._length,i=o*n/2,s=o-i;return a.x0=Math.max(Math.min(a.x0,s),i),a.x1=Math.max(Math.min(a.x1,s),i),r}var f=a.cd[a.index];a.a=f.a,a.b=f.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var x=a.trace,y=x._carpet,v=x._module.formatLabels(f,x);a.yLabel=v.yLabel,delete a.text;var T=[];function u(C,M){var E;C.labelprefix&&C.labelprefix.length>0?E=C.labelprefix.replace(/ = $/,""):E=C._hovertitle,T.push(E+": "+M.toFixed(3)+C.labelsuffix)}if(!x.hovertemplate){var b=f.hi||x.hoverinfo,_=b.split("+");_.indexOf("all")!==-1&&(_=["a","b","text"]),_.indexOf("a")!==-1&&u(y.aaxis,f.a),_.indexOf("b")!==-1&&u(y.baxis,f.b),T.push("y: "+a.yLabel),_.indexOf("text")!==-1&&g(f,x,T),a.extraText=T.join("
")}return r}}),Gq=Ft((Q,$)=>{$.exports=function(c,g,P,S,t){var e=S[t];return c.a=e.a,c.b=e.b,c.y=e.y,c}}),Yq=Ft((Q,$)=>{$.exports={attributes:OE(),supplyDefaults:Hq(),colorbar:yo(),formatLabels:Wq(),calc:qq(),plot:Zq(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:$q(),selectPoints:jf(),eventData:Gq(),moduleType:"trace",name:"scattercarpet",basePlotModule:Ef(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}),Kq=Ft((Q,$)=>{$.exports=Yq()}),DE=Ft((Q,$)=>{var c=nb(),g=Ww(),P=Ac(),S=ya().extendFlat,t=g.contours;$.exports=S({carpet:{valType:"string",editType:"calc"},z:c.z,a:c.x,a0:c.x0,da:c.dx,b:c.y,b0:c.y0,db:c.dy,text:c.text,hovertext:c.hovertext,transpose:c.transpose,atype:c.xtype,btype:c.ytype,fillcolor:g.fillcolor,autocontour:g.autocontour,ncontours:g.ncontours,contours:{type:t.type,start:t.start,end:t.end,size:t.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:t.showlines,showlabels:t.showlabels,labelfont:t.labelfont,labelformat:t.labelformat,operation:t.operation,value:t.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:g.line.color,width:g.line.width,dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},zorder:g.zorder},P("",{cLetter:"z",autoColorDflt:!1}))}),FE=Ft((Q,$)=>{var c=_n(),g=F6(),P=DE(),S=s7(),t=K6(),e=X6();$.exports=function(r,a,n,o){function i(y,v){return c.coerce(r,a,P,y,v)}function s(y){return c.coerce2(r,a,P,y)}if(i("carpet"),r.a&&r.b){var f=g(r,a,i,o,"a","b");if(!f){a.visible=!1;return}i("text");var x=i("contours.type")==="constraint";x?S(r,a,i,o,n,{hasHover:!1}):(t(r,a,i,s),e(r,a,i,o,{hasHover:!1}))}else a._defaultColor=n,a._length=null;i("zorder")}}),Xq=Ft((Q,$)=>{var c=ep(),g=_n(),P=R6(),S=B6(),t=N6(),e=j6(),r=qM(),a=FE(),n=bT(),o=JM();$.exports=function(s,f){var x=f._carpetTrace=n(s,f);if(!(!x||!x.visible||x.visible==="legendonly")){if(!f.a||!f.b){var y=s.data[x.index],v=s.data[f.index];v.a||(v.a=y.a),v.b||(v.b=y.b),a(v,f,f._defaultColor,s._fullLayout)}var T=i(s,f);return o(f,f._z),T}};function i(s,f){var x=f._carpetTrace,y=x.aaxis,v=x.baxis,T,u,b,_,C,M,E;y._minDtick=0,v._minDtick=0,g.isArray1D(f.z)&&P(f,y,v,"a","b",["z"]),T=f._a=f._a||f.a,_=f._b=f._b||f.b,T=T?y.makeCalcdata(f,"_a"):[],_=_?v.makeCalcdata(f,"_b"):[],u=f.a0||0,b=f.da||1,C=f.b0||0,M=f.db||1,E=f._z=S(f._z||f.z,f.transpose),f._emptypoints=e(E),t(E,f._emptypoints);var A=g.maxRowLength(E),h=f.xtype==="scaled"?"":T,p=r(f,h,u,b,A,y),k=f.ytype==="scaled"?"":_,w=r(f,k,C,M,E.length,v),R={a:p,b:w,z:E};return f.contours.type==="levels"&&f.contours.coloring!=="none"&&c(s,f,{vals:E,containerStr:"",cLetter:"z"}),[R]}}),Jq=Ft((Q,$)=>{var c=_n().isArrayOrTypedArray;$.exports=function(g,P,S,t){var e,r,a,n,o,i,s,f,x,y,v,T,u,b=c(S)?"a":"b",_=b==="a"?g.aaxis:g.baxis,C=_.smoothing,M=b==="a"?g.a2i:g.b2j,E=b==="a"?S:t,A=b==="a"?t:S,h=b==="a"?P.a.length:P.b.length,p=b==="a"?P.b.length:P.a.length,k=Math.floor(b==="a"?g.b2j(A):g.a2i(A)),w=b==="a"?function(yt){return g.evalxy([],yt,k)}:function(yt){return g.evalxy([],k,yt)};C&&(a=Math.max(0,Math.min(p-2,k)),n=k-a,r=b==="a"?function(yt,pt){return g.dxydi([],yt,a,pt,n)}:function(yt,pt){return g.dxydj([],a,yt,n,pt)});var R=M(E[0]),O=M(E[1]),N=R0?Math.floor:Math.ceil,F=N>0?Math.ceil:Math.floor,U=N>0?Math.min:Math.max,W=N>0?Math.max:Math.min,q=H(R+V),X=F(O-V);s=w(R);var lt=[[s]];for(e=q;e*N{var c=En(),g=zE(),P=IE(),S=Vs(),t=_n(),e=t7(),r=e7(),a=J6(),n=Zw(),o=n7(),i=r7(),s=i7(),f=bT(),x=Jq();$.exports=function(A,h,p,k){var w=h.xaxis,R=h.yaxis;t.makeTraceGroups(k,p,"contour").each(function(O){var N=c.select(this),V=O[0],H=V.trace,F=H._carpetTrace=f(A,H),U=A.calcdata[F.index][0];if(!F.visible||F.visible==="legendonly")return;var W=V.a,q=V.b,X=H.contours,lt=i(X,h,V),yt=X.type==="constraint",pt=X._operation,st=yt?pt==="="?"lines":"fill":X.coloring;function tt(Pt){var Wt=F.ab2xy(Pt[0],Pt[1],!0);return[w.c2p(Wt[0]),R.c2p(Wt[1])]}var dt=[[W[0],q[q.length-1]],[W[W.length-1],q[q.length-1]],[W[W.length-1],q[0]],[W[0],q[0]]];e(lt);var rt=(W[W.length-1]-W[0])*1e-8,at=(q[q.length-1]-q[0])*1e-8;r(lt,rt,at);var vt=lt;X.type==="constraint"&&(vt=o(lt,pt)),y(lt,tt);var it,Y,ft,ut,wt=[];for(ut=U.clipsegments.length-1;ut>=0;ut--)it=U.clipsegments[ut],Y=g([],it.x,w.c2p),ft=g([],it.y,R.c2p),Y.reverse(),ft.reverse(),wt.push(P(Y,ft,it.bicubic));var zt="M"+wt.join("L")+"Z";C(N,U.clipsegments,w,R,yt,st),M(H,N,w,R,vt,dt,tt,F,U,st,zt),v(N,lt,A,V,X,h,F),S.setClipUrl(N,F._clipPathId,A)})};function y(A,h){var p,k,w,R,O,N,V,H,F;for(p=0;pyt&&(k.max=yt),k.len=k.max-k.min}function u(A,h,p){var k=A.getPointAtLength(h),w=A.getPointAtLength(p),R=w.x-k.x,O=w.y-k.y,N=Math.sqrt(R*R+O*O);return[R/N,O/N]}function b(A){var h=Math.sqrt(A[0]*A[0]+A[1]*A[1]);return[A[0]/h,A[1]/h]}function _(A,h){var p=Math.abs(A[0]*h[0]+A[1]*h[1]),k=Math.sqrt(1-p*p);return k/p}function C(A,h,p,k,w,R){var O,N,V,H,F=t.ensureSingle(A,"g","contourbg"),U=F.selectAll("path").data(R==="fill"&&!w?[0]:[]);U.enter().append("path"),U.exit().remove();var W=[];for(H=0;H=0&&(q=ft,lt=yt):Math.abs(W[1]-q[1])=0&&(q=ft,lt=yt):t.log("endpt to newendpt is not vert. or horz.",W,q,ft)}if(lt>=0)break;H+=it(W,q),W=q}if(lt===h.edgepaths.length){t.log("unclosed perimeter path");break}V=lt,U=F.indexOf(V)===-1,U&&(V=F[0],H+=it(W,q)+"Z",W=null)}for(V=0;V{$.exports={attributes:DE(),supplyDefaults:FE(),colorbar:tk(),calc:Xq(),plot:Qq(),style:Q6(),moduleType:"trace",name:"contourcarpet",basePlotModule:Ef(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}),eZ=Ft((Q,$)=>{$.exports=tZ()}),wT=Ft((Q,$)=>{var c=_n().extendFlat,g=tf(),P=dh().axisHoverFormat,S=Ed().dash,t=Ss(),e=ib(),r=e.INCREASING.COLOR,a=e.DECREASING.COLOR,n=g.line;function o(i){return{line:{color:c({},n.color,{dflt:i}),width:n.width,dash:S,editType:"style"},editType:"style"}}$.exports={xperiod:g.xperiod,xperiod0:g.xperiod0,xperiodalignment:g.xperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:c({},n.width,{}),dash:c({},S,{}),editType:"style"},increasing:o(r),decreasing:o(a),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:c({},t.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:g.zorder}}),RE=Ft((Q,$)=>{var c=Qo(),g=_n();$.exports=function(P,S,t,e){var r=t("x"),a=t("open"),n=t("high"),o=t("low"),i=t("close");t("hoverlabel.split");var s=c.getComponentMethod("calendars","handleTraceDefaults");if(s(P,S,["x"],e),!!(a&&n&&o&&i)){var f=Math.min(a.length,n.length,o.length,i.length);return r&&(f=Math.min(f,g.minRowLength(r))),S._length=f,f}}}),rZ=Ft((Q,$)=>{var c=_n(),g=RE(),P=jp(),S=wT();$.exports=function(e,r,a,n){function o(s,f){return c.coerce(e,r,S,s,f)}var i=g(e,r,o,n);if(!i){r.visible=!1;return}P(e,r,n,o,{x:!0}),o("xhoverformat"),o("yhoverformat"),o("line.width"),o("line.dash"),t(e,r,o,"increasing"),t(e,r,o,"decreasing"),o("text"),o("hovertext"),o("tickwidth"),n._requestRangeslider[r.xaxis]=!0,o("zorder")};function t(e,r,a,n){a(n+".line.color"),a(n+".line.width",r.line.width),a(n+".line.dash",r.line.dash)}}),BE=Ft((Q,$)=>{var c=_n(),g=c._,P=Ls(),S=B0(),t=Ua().BADNUM;function e(o,i){var s=P.getFromId(o,i.xaxis),f=P.getFromId(o,i.yaxis),x=n(o,s,i),y=i._minDiff;i._minDiff=null;var v=i._origX;i._origX=null;var T=i._xcalc;i._xcalc=null;var u=a(o,i,v,T,f,r);return i._extremes[s._id]=P.findExtremes(s,T,{vpad:y/2}),u.length?(c.extendFlat(u[0].t,{wHover:y/2,tickLen:x}),u):[{t:{empty:!0}}]}function r(o,i,s,f){return{o,h:i,l:s,c:f}}function a(o,i,s,f,x,y){for(var v=x.makeCalcdata(i,"open"),T=x.makeCalcdata(i,"high"),u=x.makeCalcdata(i,"low"),b=x.makeCalcdata(i,"close"),_=c.isArrayOrTypedArray(i.text),C=c.isArrayOrTypedArray(i.hovertext),M=!0,E=null,A=!!i.xperiodalignment,h=[],p=0;pE):M=N>w,E=N;var V=y(w,R,O,N);V.pos=k,V.yc=(w+N)/2,V.i=p,V.dir=M?"increasing":"decreasing",V.x=V.pos,V.y=[O,R],A&&(V.orig_p=s[p]),_&&(V.tx=i.text[p]),C&&(V.htx=i.hovertext[p]),h.push(V)}else h.push({pos:k,empty:!0})}return i._extremes[x._id]=P.findExtremes(x,c.concat(u,T),{padded:!0}),h.length&&(h[0].t={labels:{open:g(o,"open:")+" ",high:g(o,"high:")+" ",low:g(o,"low:")+" ",close:g(o,"close:")+" "}}),h}function n(o,i,s){var f=s._minDiff;if(!f){var x=o._fullData,y=[];f=1/0;var v;for(v=0;v{var c=En(),g=_n();$.exports=function(P,S,t,e){var r=S.yaxis,a=S.xaxis,n=!!a.rangebreaks;g.makeTraceGroups(e,t,"trace ohlc").each(function(o){var i=c.select(this),s=o[0],f=s.t,x=s.trace;if(x.visible!==!0||f.empty){i.remove();return}var y=f.tickLen,v=i.selectAll("path").data(g.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(T){if(T.empty)return"M0,0Z";var u=a.c2p(T.pos-y,!0),b=a.c2p(T.pos+y,!0),_=n?(u+b)/2:a.c2p(T.pos,!0),C=r.c2p(T.o,!0),M=r.c2p(T.h,!0),E=r.c2p(T.l,!0),A=r.c2p(T.c,!0);return"M"+u+","+C+"H"+_+"M"+_+","+M+"V"+E+"M"+b+","+A+"H"+_})})}}),iZ=Ft((Q,$)=>{var c=En(),g=Vs(),P=ui();$.exports=function(S,t,e){var r=e||c.select(S).selectAll("g.ohlclayer").selectAll("g.trace");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var n=a[0].trace;c.select(this).selectAll("path").each(function(o){if(!o.empty){var i=n[o.dir].line;c.select(this).style("fill","none").call(P.stroke,i.color).call(g.dashLine,i.dash,i.width).style("opacity",n.selectedpoints&&!o.selected?.3:1)}})})}}),NE=Ft((Q,$)=>{var c=Ls(),g=_n(),P=Qh(),S=ui(),t=_n().fillText,e=ib(),r={increasing:e.INCREASING.SYMBOL,decreasing:e.DECREASING.SYMBOL};function a(s,f,x,y){var v=s.cd,T=v[0].trace;return T.hoverlabel.split?o(s,f,x,y):i(s,f,x,y)}function n(s,f,x,y){var v=s.cd,T=s.xa,u=v[0].trace,b=v[0].t,_=u.type,C=_==="ohlc"?"l":"min",M=_==="ohlc"?"h":"max",E,A,h=b.bPos||0,p=function(X){return X.pos+h-f},k=b.bdPos||b.tickLen,w=b.wHover,R=Math.min(1,k/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));E=s.maxHoverDistance-R,A=s.maxSpikeDistance-R;function O(X){var lt=p(X);return P.inbox(lt-w,lt+w,E)}function N(X){var lt=X[C],yt=X[M];return lt===yt||P.inbox(lt-x,yt-x,E)}function V(X){return(O(X)+N(X))/2}var H=P.getDistanceFunction(y,O,N,V);if(P.getClosest(v,H,s),s.index===!1)return null;var F=v[s.index];if(F.empty)return null;var U=F.dir,W=u[U],q=W.line.color;return S.opacity(q)&&W.line.width?s.color=q:s.color=W.fillcolor,s.x0=T.c2p(F.pos+h-k,!0),s.x1=T.c2p(F.pos+h+k,!0),s.xLabelVal=F.orig_p!==void 0?F.orig_p:F.pos,s.spikeDistance=V(F)*A/E,s.xSpike=T.c2p(F.pos,!0),s}function o(s,f,x,y){var v=s.cd,T=s.ya,u=v[0].trace,b=v[0].t,_=[],C=n(s,f,x,y);if(!C)return[];var M=C.index,E=v[M],A=E.hi||u.hoverinfo,h=A.split("+"),p=A==="all",k=p||h.indexOf("y")!==-1;if(!k)return[];for(var w=["high","open","close","low"],R={},O=0;O"+b.labels[N]+c.hoverLabelText(T,V,u.yhoverformat)):(F=g.extendFlat({},C),F.y0=F.y1=H,F.yLabelVal=V,F.yLabel=b.labels[N]+c.hoverLabelText(T,V,u.yhoverformat),F.name="",_.push(F),R[V]=F)}return _}function i(s,f,x,y){var v=s.cd,T=s.ya,u=v[0].trace,b=v[0].t,_=n(s,f,x,y);if(!_)return[];var C=_.index,M=v[C],E=_.index=M.i,A=M.dir;function h(V){return b.labels[V]+c.hoverLabelText(T,u[V][E],u.yhoverformat)}var p=M.hi||u.hoverinfo,k=p.split("+"),w=p==="all",R=w||k.indexOf("y")!==-1,O=w||k.indexOf("text")!==-1,N=R?[h("open"),h("high"),h("low"),h("close")+" "+r[A]]:[];return O&&t(M,u,N),_.extraText=N.join("
"),_.y0=_.y1=T.c2p(M.yc,!0),[_]}$.exports={hoverPoints:a,hoverSplit:o,hoverOnPoints:i}}),jE=Ft((Q,$)=>{$.exports=function(c,g){var P=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a=P[0].t.bPos||0;if(g===!1)for(r=0;r{$.exports={moduleType:"trace",name:"ohlc",basePlotModule:Ef(),categories:["cartesian","svg","showLegend"],meta:{},attributes:wT(),supplyDefaults:rZ(),calc:BE().calc,plot:nZ(),style:iZ(),hoverPoints:NE().hoverPoints,selectPoints:jE()}}),oZ=Ft((Q,$)=>{$.exports=aZ()}),UE=Ft((Q,$)=>{var c=_n().extendFlat,g=dh().axisHoverFormat,P=wT(),S=jw();function t(e){return{line:{color:c({},S.line.color,{dflt:e}),width:S.line.width,editType:"style"},fillcolor:S.fillcolor,editType:"style"}}$.exports={xperiod:P.xperiod,xperiod0:P.xperiod0,xperiodalignment:P.xperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),x:P.x,open:P.open,high:P.high,low:P.low,close:P.close,line:{width:c({},S.line.width,{}),editType:"style"},increasing:t(P.increasing.line.color.dflt),decreasing:t(P.decreasing.line.color.dflt),text:P.text,hovertext:P.hovertext,whiskerwidth:c({},S.whiskerwidth,{dflt:0}),hoverlabel:P.hoverlabel,zorder:S.zorder}}),sZ=Ft((Q,$)=>{var c=_n(),g=ui(),P=RE(),S=jp(),t=UE();$.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,t,f,x)}var s=P(r,a,i,o);if(!s){a.visible=!1;return}S(r,a,o,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),e(r,a,i,"increasing"),e(r,a,i,"decreasing"),i("text"),i("hovertext"),i("whiskerwidth"),o._requestRangeslider[a.xaxis]=!0,i("zorder")};function e(r,a,n,o){var i=n(o+".line.color");n(o+".line.width",a.line.width),n(o+".fillcolor",g.addOpacity(i,.5))}}),lZ=Ft((Q,$)=>{var c=_n(),g=Ls(),P=B0(),S=BE().calcCommon;$.exports=function(e,r){var a=e._fullLayout,n=g.getFromId(e,r.xaxis),o=g.getFromId(e,r.yaxis),i=n.makeCalcdata(r,"x"),s=P(r,n,"x",i).vals,f=S(e,r,i,s,o,t);return f.length?(c.extendFlat(f[0].t,{num:a._numBoxes,dPos:c.distinctVals(s).minDiff/2,posLetter:"x",valLetter:"y"}),a._numBoxes++,f):[{t:{empty:!0}}]};function t(e,r,a,n){return{min:a,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:r}}}),uZ=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"candlestick",basePlotModule:Ef(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:UE(),layoutAttributes:Uw(),supplyLayoutDefaults:z6().supplyLayoutDefaults,crossTraceCalc:I6().crossTraceCalc,supplyDefaults:sZ(),calc:lZ(),plot:O6().plot,layerName:"boxlayer",style:D6().style,hoverPoints:NE().hoverPoints,selectPoints:jE()}}),cZ=Ft((Q,$)=>{$.exports=uZ()}),VE=Ft((Q,$)=>{var c=_n(),g=s0(),P=c.deg2rad,S=c.rad2deg;$.exports=function(n,o,i){switch(g(n,i),n._id){case"x":case"radialaxis":t(n,o);break;case"angularaxis":a(n,o);break}};function t(n,o){var i=o._subplot;n.setGeometry=function(){var s=n._rl[0],f=n._rl[1],x=i.innerRadius,y=(i.radius-x)/(f-s),v=x/y,T=s>f?function(u){return u<=0}:function(u){return u>=0};n.c2g=function(u){var b=n.c2l(u)-s;return(T(b)?b:0)+v},n.g2c=function(u){return n.l2c(u+s-v)},n.g2p=function(u){return u*y},n.c2p=function(u){return n.g2p(n.c2g(u))}}}function e(n,o){return o==="degrees"?P(n):n}function r(n,o){return o==="degrees"?S(n):n}function a(n,o){var i=n.type;if(i==="linear"){var s=n.d2c,f=n.c2d;n.d2c=function(x,y){return e(s(x),y)},n.c2d=function(x,y){return f(r(x,y))}}n.makeCalcdata=function(x,y){var v=x[y],T=x._length,u,b,_=function(h){return n.d2c(h,x.thetaunit)};if(v)for(u=new Array(T),b=0;b{$.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}}),TT=Ft((Q,$)=>{var c=_n(),g=ym().tester,P=c.findIndexOfMin,S=c.isAngleInsideSector,t=c.angleDelta,e=c.angleDist;function r(b,_,C,M,E){if(!S(_,M))return!1;var A,h;C[0]0?h:1/0},M=P(_,C),E=c.mod(M+1,_.length);return[_[M],_[E]]}function y(b){return Math.abs(b)>1e-10?b:0}function v(b,_,C){_=_||0,C=C||0;for(var M=b.length,E=new Array(M),A=0;A{function c(r){return r<0?-1:r>0?1:0}function g(r){var a=r[0],n=r[1];if(!isFinite(a)||!isFinite(n))return[1,0];var o=(a+1)*(a+1)+n*n;return[(a*a+n*n-1)/o,2*n/o]}function P(r,a){var n=a[0],o=a[1];return[n*r.radius+r.cx,-o*r.radius+r.cy]}function S(r,a){return a*r.radius}function t(r,a,n,o){var i=P(r,g([n,a])),s=i[0],f=i[1],x=P(r,g([o,a])),y=x[0],v=x[1];if(a===0)return["M"+s+","+f,"L"+y+","+v].join(" ");var T=S(r,1/Math.abs(a));return["M"+s+","+f,"A"+T+","+T+" 0 0,"+(a<0?1:0)+" "+y+","+v].join(" ")}function e(r,a,n,o){var i=S(r,1/(a+1)),s=P(r,g([a,n])),f=s[0],x=s[1],y=P(r,g([a,o])),v=y[0],T=y[1];if(c(n)!==c(o)){var u=P(r,g([a,0])),b=u[0],_=u[1];return["M"+f+","+x,"A"+i+","+i+" 0 0,"+(0{var c=En(),g=eo(),P=Qo(),S=_n(),t=S.strRotate,e=S.strTranslate,r=ui(),a=Vs(),n=Kc(),o=Ls(),i=s0(),s=VE(),f=J0().doAutoRange,x=C1(),y=hp(),v=Qh(),T=cp(),u=yf().prepSelect,b=yf().selectOnClick,_=yf().clearOutline,C=O0(),M=mv(),E=_0().redrawReglTraces,A=Sf().MID_SHIFT,h=kT(),p=TT(),k=HE(),w=k.smith,R=k.reactanceArc,O=k.resistanceArc,N=k.smithTransform,V=S._,H=S.mod,F=S.deg2rad,U=S.rad2deg;function W(st,tt,dt){this.isSmith=dt||!1,this.id=tt,this.gd=st,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var rt=st._fullLayout,at="clip"+rt._uid+tt;this.clipIds.forTraces=at+"-for-traces",this.clipPaths.forTraces=rt._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=rt["_"+(dt?"smith":"polar")+"layer"].append("g").attr("class",tt),this.getHole=function(vt){return this.isSmith?0:vt.hole},this.getSector=function(vt){return this.isSmith?[0,360]:vt.sector},this.getRadial=function(vt){return this.isSmith?vt.realaxis:vt.radialaxis},this.getAngular=function(vt){return this.isSmith?vt.imaginaryaxis:vt.angularaxis},dt||(this.radialTickLayout=null,this.angularTickLayout=null)}var q=W.prototype;$.exports=function(st,tt,dt){return new W(st,tt,dt)},q.plot=function(st,tt){for(var dt=this,rt=tt[dt.id],at=!1,vt=0;vtge?(he=ut,de=ut*ge,Lt=(wt-de)/at.h/2,se=[Y[0],Y[1]],Tt=[ft[0]+Lt,ft[1]-Lt]):(he=wt/ge,de=wt,Lt=(ut-he)/at.w/2,se=[Y[0]+Lt,Y[1]-Lt],Tt=[ft[0],ft[1]]),dt.xLength2=he,dt.yLength2=de,dt.xDomain2=se,dt.yDomain2=Tt;var Mt=dt.xOffset2=at.l+at.w*se[0],te=dt.yOffset2=at.t+at.h*(1-Tt[1]),ve=dt.radius=he/Wt,oe=dt.innerRadius=dt.getHole(tt)*ve,Te=dt.cx=Mt-ve*Pt[0],He=dt.cy=te+ve*Pt[3],Ge=dt.cxx=Te-Mt,cr=dt.cyy=He-te,ur=vt.side,jr;ur==="counterclockwise"?(jr=ur,ur="top"):ur==="clockwise"&&(jr=ur,ur="bottom"),dt.radialAxis=dt.mockAxis(st,tt,vt,{_id:"x",side:ur,_trueSide:jr,domain:[oe/at.w,ve/at.w]}),dt.angularAxis=dt.mockAxis(st,tt,it,{side:"right",domain:[0,Math.PI],autorange:!1}),dt.doAutoRange(st,tt),dt.updateAngularAxis(st,tt),dt.updateRadialAxis(st,tt),dt.updateRadialAxisTitle(st,tt),dt.xaxis=dt.mockCartesianAxis(st,tt,{_id:"x",domain:se}),dt.yaxis=dt.mockCartesianAxis(st,tt,{_id:"y",domain:Tt});var Hr=dt.pathSubplot();dt.clipPaths.forTraces.select("path").attr("d",Hr).attr("transform",e(Ge,cr)),rt.frontplot.attr("transform",e(Mt,te)).call(a.setClipUrl,dt._hasClipOnAxisFalse?null:dt.clipIds.forTraces,dt.gd),rt.bg.attr("d",Hr).attr("transform",e(Te,He)).call(r.fill,tt.bgcolor)},q.mockAxis=function(st,tt,dt,rt){var at=S.extendFlat({},dt,rt);return s(at,tt,st),at},q.mockCartesianAxis=function(st,tt,dt){var rt=this,at=rt.isSmith,vt=dt._id,it=S.extendFlat({type:"linear"},dt);i(it,st);var Y={x:[0,2],y:[1,3]};return it.setRange=function(){var ft=rt.sectorBBox,ut=Y[vt],wt=rt.radialAxis._rl,zt=(wt[1]-wt[0])/(1-rt.getHole(tt));it.range=[ft[ut[0]]*zt,ft[ut[1]]*zt]},it.isPtWithinRange=vt==="x"&&!at?function(ft){return rt.isPtInside(ft)}:function(){return!0},it.setRange(),it.setScale(),it},q.doAutoRange=function(st,tt){var dt=this,rt=dt.gd,at=dt.radialAxis,vt=dt.getRadial(tt);f(rt,at);var it=at.range;if(vt.range=it.slice(),vt._input.range=it.slice(),at._rl=[at.r2l(it[0],null,"gregorian"),at.r2l(it[1],null,"gregorian")],at.minallowed!==void 0){var Y=at.r2l(at.minallowed);at._rl[0]>at._rl[1]?at._rl[1]=Math.max(at._rl[1],Y):at._rl[0]=Math.max(at._rl[0],Y)}if(at.maxallowed!==void 0){var ft=at.r2l(at.maxallowed);at._rl[0]90&&wt<=270&&(zt.tickangle=180);var Ht=Wt?function(ve){var oe=N(dt,w([ve.x,0]));return e(oe[0]-Y,oe[1]-ft)}:function(ve){return e(zt.l2p(ve.x)+it,0)},Jt=Wt?function(ve){return O(dt,ve.x,-1/0,1/0)}:function(ve){return dt.pathArc(zt.r2p(ve.x)+it)},ge=X(ut);if(dt.radialTickLayout!==ge&&(at["radial-axis"].selectAll(".xtick").remove(),dt.radialTickLayout=ge),Pt){zt.setScale();var he=0,de=Wt?(zt.tickvals||[]).filter(function(ve){return ve>=0}).map(function(ve){return o.tickText(zt,ve,!0,!1)}):o.calcTicks(zt),se=Wt?de:o.clipEnds(zt,de),Tt=o.getTickSigns(zt)[2];Wt&&((zt.ticks==="top"&&zt.side==="bottom"||zt.ticks==="bottom"&&zt.side==="top")&&(Tt=-Tt),zt.ticks==="top"&&zt.side==="top"&&(he=-zt.ticklen),zt.ticks==="bottom"&&zt.side==="bottom"&&(he=zt.ticklen)),o.drawTicks(rt,zt,{vals:de,layer:at["radial-axis"],path:o.makeTickPath(zt,0,Tt),transFn:Ht,crisp:!1}),o.drawGrid(rt,zt,{vals:se,layer:at["radial-grid"],path:Jt,transFn:S.noop,crisp:!1}),o.drawLabels(rt,zt,{vals:de,layer:at["radial-axis"],transFn:Ht,labelFns:o.makeLabelFns(zt,he)})}var Lt=dt.radialAxisAngle=dt.vangles?U(yt(F(ut.angle),dt.vangles)):ut.angle,Mt=e(Y,ft),te=Mt+t(-Lt);pt(at["radial-axis"],Pt&&(ut.showticklabels||ut.ticks),{transform:te}),pt(at["radial-grid"],Pt&&ut.showgrid,{transform:Wt?"":Mt}),pt(at["radial-line"].select("line"),Pt&&ut.showline,{x1:Wt?-vt:it,y1:0,x2:vt,y2:0,transform:te}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateRadialAxisTitle=function(st,tt,dt){if(!this.isSmith){var rt=this,at=rt.gd,vt=rt.radius,it=rt.cx,Y=rt.cy,ft=rt.getRadial(tt),ut=rt.id+"title",wt=0;if(ft.title){var zt=a.bBox(rt.layers["radial-axis"].node()).height,Pt=ft.title.font.size,Wt=ft.side;wt=Wt==="top"?Pt:Wt==="counterclockwise"?-(zt+Pt*.4):zt+Pt*.8}var Ht=dt!==void 0?dt:rt.radialAxisAngle,Jt=F(Ht),ge=Math.cos(Jt),he=Math.sin(Jt),de=it+vt/2*ge+wt*he,se=Y-vt/2*he+wt*ge;rt.layers["radial-axis-title"]=T.draw(at,ut,{propContainer:ft,propName:rt.id+".radialaxis.title.text",placeholder:V(at,"Click to enter radial axis title"),attributes:{x:de,y:se,"text-anchor":"middle"},transform:{rotate:-Ht}})}},q.updateAngularAxis=function(st,tt){var dt=this,rt=dt.gd,at=dt.layers,vt=dt.radius,it=dt.innerRadius,Y=dt.cx,ft=dt.cy,ut=dt.getAngular(tt),wt=dt.angularAxis,zt=dt.isSmith;zt||(dt.fillViewInitialKey("angularaxis.rotation",ut.rotation),wt.setGeometry(),wt.setScale());var Pt=zt?function(oe){var Te=N(dt,w([0,oe.x]));return Math.atan2(Te[0]-Y,Te[1]-ft)-Math.PI/2}:function(oe){return wt.t2g(oe.x)};wt.type==="linear"&&wt.thetaunit==="radians"&&(wt.tick0=U(wt.tick0),wt.dtick=U(wt.dtick));var Wt=function(oe){return e(Y+vt*Math.cos(oe),ft-vt*Math.sin(oe))},Ht=zt?function(oe){var Te=N(dt,w([0,oe.x]));return e(Te[0],Te[1])}:function(oe){return Wt(Pt(oe))},Jt=zt?function(oe){var Te=N(dt,w([0,oe.x])),He=Math.atan2(Te[0]-Y,Te[1]-ft)-Math.PI/2;return e(Te[0],Te[1])+t(-U(He))}:function(oe){var Te=Pt(oe);return Wt(Te)+t(-U(Te))},ge=zt?function(oe){return R(dt,oe.x,0,1/0)}:function(oe){var Te=Pt(oe),He=Math.cos(Te),Ge=Math.sin(Te);return"M"+[Y+it*He,ft-it*Ge]+"L"+[Y+vt*He,ft-vt*Ge]},he=o.makeLabelFns(wt,0),de=he.labelStandoff,se={};se.xFn=function(oe){var Te=Pt(oe);return Math.cos(Te)*de},se.yFn=function(oe){var Te=Pt(oe),He=Math.sin(Te)>0?.2:1;return-Math.sin(Te)*(de+oe.fontSize*He)+Math.abs(Math.cos(Te))*(oe.fontSize*A)},se.anchorFn=function(oe){var Te=Pt(oe),He=Math.cos(Te);return Math.abs(He)<.1?"middle":He>0?"start":"end"},se.heightFn=function(oe,Te,He){var Ge=Pt(oe);return-.5*(1+Math.sin(Ge))*He};var Tt=X(ut);dt.angularTickLayout!==Tt&&(at["angular-axis"].selectAll("."+wt._id+"tick").remove(),dt.angularTickLayout=Tt);var Lt=zt?[1/0].concat(wt.tickvals||[]).map(function(oe){return o.tickText(wt,oe,!0,!1)}):o.calcTicks(wt);zt&&(Lt[0].text="∞",Lt[0].fontSize*=1.75);var Mt;if(tt.gridshape==="linear"?(Mt=Lt.map(Pt),S.angleDelta(Mt[0],Mt[1])<0&&(Mt=Mt.slice().reverse())):Mt=null,dt.vangles=Mt,wt.type==="category"&&(Lt=Lt.filter(function(oe){return S.isAngleInsideSector(Pt(oe),dt.sectorInRad)})),wt.visible){var te=wt.ticks==="inside"?-1:1,ve=(wt.linewidth||1)/2;o.drawTicks(rt,wt,{vals:Lt,layer:at["angular-axis"],path:"M"+te*ve+",0h"+te*wt.ticklen,transFn:Jt,crisp:!1}),o.drawGrid(rt,wt,{vals:Lt,layer:at["angular-grid"],path:ge,transFn:S.noop,crisp:!1}),o.drawLabels(rt,wt,{vals:Lt,layer:at["angular-axis"],repositionOnUpdate:!0,transFn:Ht,labelFns:se})}pt(at["angular-line"].select("path"),ut.showline,{d:dt.pathSubplot(),transform:e(Y,ft)}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateFx=function(st,tt){if(!this.gd._context.staticPlot){var dt=!this.isSmith;dt&&(this.updateAngularDrag(st),this.updateRadialDrag(st,tt,0),this.updateRadialDrag(st,tt,1)),this.updateHoverAndMainDrag(st)}},q.updateHoverAndMainDrag=function(st){var tt=this,dt=tt.isSmith,rt=tt.gd,at=tt.layers,vt=st._zoomlayer,it=h.MINZOOM,Y=h.OFFEDGE,ft=tt.radius,ut=tt.innerRadius,wt=tt.cx,zt=tt.cy,Pt=tt.cxx,Wt=tt.cyy,Ht=tt.sectorInRad,Jt=tt.vangles,ge=tt.radialAxis,he=p.clampTiny,de=p.findXYatLength,se=p.findEnclosingVertexAngles,Tt=h.cornerHalfWidth,Lt=h.cornerLen/2,Mt,te,ve=x.makeDragger(at,"path","maindrag",st.dragmode===!1?"none":"crosshair");c.select(ve).attr("d",tt.pathSubplot()).attr("transform",e(wt,zt)),ve.onmousemove=function(Tr){v.hover(rt,Tr,tt.id),rt._fullLayout._lasthover=ve,rt._fullLayout._hoversubplot=tt.id},ve.onmouseout=function(Tr){rt._dragging||y.unhover(rt,Tr)};var oe={element:ve,gd:rt,subplot:tt.id,plotinfo:{id:tt.id,xaxis:tt.xaxis,yaxis:tt.yaxis},xaxes:[tt.xaxis],yaxes:[tt.yaxis]},Te,He,Ge,cr,ur,jr,Hr,br,Kr;function rn(Tr,pr){return Math.sqrt(Tr*Tr+pr*pr)}function Ce(Tr,pr){return rn(Tr-Pt,pr-Wt)}function Gt(Tr,pr){return Math.atan2(Wt-pr,Tr-Pt)}function ne(Tr,pr){return[Tr*Math.cos(pr),Tr*Math.sin(-pr)]}function Ct(Tr,pr){if(Tr===0)return tt.pathSector(2*Tt);var Jr=Lt/Tr,Vn=pr-Jr,Hn=pr+Jr,Kn=Math.max(0,Math.min(Tr,ft)),Ci=Kn-Tt,ii=Kn+Tt;return"M"+ne(Ci,Vn)+"A"+[Ci,Ci]+" 0,0,0 "+ne(Ci,Hn)+"L"+ne(ii,Hn)+"A"+[ii,ii]+" 0,0,1 "+ne(ii,Vn)+"Z"}function gt(Tr,pr,Jr){if(Tr===0)return tt.pathSector(2*Tt);var Vn=ne(Tr,pr),Hn=ne(Tr,Jr),Kn=he((Vn[0]+Hn[0])/2),Ci=he((Vn[1]+Hn[1])/2),ii,qn;if(Kn&&Ci){var aa=Ci/Kn,Vi=-1/aa,We=de(Tt,aa,Kn,Ci);ii=de(Lt,Vi,We[0][0],We[0][1]),qn=de(Lt,Vi,We[1][0],We[1][1])}else{var rr,fr;Ci?(rr=Lt,fr=Tt):(rr=Tt,fr=Lt),ii=[[Kn-rr,Ci-fr],[Kn+rr,Ci-fr]],qn=[[Kn-rr,Ci+fr],[Kn+rr,Ci+fr]]}return"M"+ii.join("L")+"L"+qn.reverse().join("L")+"Z"}function St(){Ge=null,cr=null,ur=tt.pathSubplot(),jr=!1;var Tr=rt._fullLayout[tt.id];Hr=g(Tr.bgcolor).getLuminance(),br=x.makeZoombox(vt,Hr,wt,zt,ur),br.attr("fill-rule","evenodd"),Kr=x.makeCorners(vt,wt,zt),_(rt)}function Nt(Tr,pr){return pr=Math.max(Math.min(pr,ft),ut),Trit?(Tr-1&&Tr===1&&b(pr,rt,[tt.xaxis],[tt.yaxis],tt.id,oe),Jr.indexOf("event")>-1&&v.click(rt,pr,tt.id)}oe.prepFn=function(Tr,pr,Jr){var Vn=rt._fullLayout.dragmode,Hn=ve.getBoundingClientRect();rt._fullLayout._calcInverseTransform(rt);var Kn=rt._fullLayout._invTransform;Mt=rt._fullLayout._invScaleX,te=rt._fullLayout._invScaleY;var Ci=S.apply3DTransform(Kn)(pr-Hn.left,Jr-Hn.top);if(Te=Ci[0],He=Ci[1],Jt){var ii=p.findPolygonOffset(ft,Ht[0],Ht[1],Jt);Te+=Pt+ii[0],He+=Wt+ii[1]}switch(Vn){case"zoom":oe.clickFn=Ar,dt||(Jt?oe.moveFn=Ue:oe.moveFn=le,oe.doneFn=qe,St());break;case"select":case"lasso":u(Tr,pr,Jr,oe,Vn);break}},y.init(oe)},q.updateRadialDrag=function(st,tt,dt){var rt=this,at=rt.gd,vt=rt.layers,it=rt.radius,Y=rt.innerRadius,ft=rt.cx,ut=rt.cy,wt=rt.radialAxis,zt=h.radialDragBoxSize,Pt=zt/2;if(!wt.visible)return;var Wt=F(rt.radialAxisAngle),Ht=wt._rl,Jt=Ht[0],ge=Ht[1],he=Ht[dt],de=.75*(Ht[1]-Ht[0])/(1-rt.getHole(tt))/it,se,Tt,Lt;dt?(se=ft+(it+Pt)*Math.cos(Wt),Tt=ut-(it+Pt)*Math.sin(Wt),Lt="radialdrag"):(se=ft+(Y-Pt)*Math.cos(Wt),Tt=ut-(Y-Pt)*Math.sin(Wt),Lt="radialdrag-inner");var Mt=x.makeRectDragger(vt,Lt,"crosshair",-Pt,-Pt,zt,zt),te={element:Mt,gd:at};st.dragmode===!1&&(te.dragmode=!1),pt(c.select(Mt),wt.visible&&Y0!=(dt?Te>Jt:Te=90||at>90&&vt>=450?Wt=1:Y<=0&&ut<=0?Wt=0:Wt=Math.max(Y,ut),at<=180&&vt>=180||at>180&&vt>=540?wt=-1:it>=0&&ft>=0?wt=0:wt=Math.min(it,ft),at<=270&&vt>=270||at>270&&vt>=630?zt=-1:Y>=0&&ut>=0?zt=0:zt=Math.min(Y,ut),vt>=360?Pt=1:it<=0&&ft<=0?Pt=0:Pt=Math.max(it,ft),[wt,zt,Pt,Wt]}function yt(st,tt){var dt=function(at){return S.angleDist(st,at)},rt=S.findIndexOfMin(tt,dt);return tt[rt]}function pt(st,tt,dt){return tt?(st.attr("display",null),st.attr(dt)):st&&st.attr("display","none"),st}}),qE=Ft((Q,$)=>{var c=yi(),g=Cd(),P=jh().attributes,S=_n().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,minorloglabels:g.minorloglabels,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickfont:g.tickfont,tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,layer:g.layer},"plot","from-root"),a={visible:S({},g.visible,{dflt:!0}),type:S({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},autorange:S({},g.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:S({},g.minallowed,{editType:"plot"}),maxallowed:S({},g.maxallowed,{editType:"plot"}),range:S({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:g.categoryorder,categoryarray:g.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:g.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:S({},g.title.text,{editType:"plot",dflt:""}),font:S({},g.title.font,{editType:"plot"}),editType:"plot"},hoverformat:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(a,e,r);var n={visible:S({},g.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:g.autotypenumbers,categoryorder:g.categoryorder,categoryarray:g.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(n,e,r),$.exports={domain:P({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:c.background},radialaxis:a,angularaxis:n,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}),hZ=Ft((Q,$)=>{var c=_n(),g=ui(),P=mu(),S=I1(),t=dd().getSubplotData,e=yg(),r=xg(),a=o0(),n=gm(),o=Vm(),i=Jy(),s=yw(),f=dv(),x=qE(),y=VE(),v=kT(),T=v.axisNames;function u(_,C,M,E){var A=M("bgcolor");E.bgColor=g.combine(A,E.paper_bgcolor);var h=M("sector");M("hole");var p=t(E.fullData,v.name,E.id),k=E.layoutOut,w;function R(zt,Pt){return M(w+"."+zt,Pt)}for(var O=0;O{var c=dd().getSubplotCalcData,g=_n().counterRegex,P=WE(),S=kT(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var s=i._fullLayout,f=i.calcdata,x=s._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=ya().extendFlat,t=D0(),e=tf(),r=Yo(),a=e.line;$.exports={mode:e.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:e.text,texttemplate:g({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:P(),selected:e.selected,unselected:e.unselected}}),MT=Ft((Q,$)=>{var c=_n(),g=Mc(),P=c0(),S=F0(),t=xv(),e=b0(),r=R0(),a=_m().PTS_LINESONLY,n=L3();function o(s,f,x,y){function v(b,_){return c.coerce(s,f,n,b,_)}var T=i(s,f,y,v);if(!T){f.visible=!1;return}v("thetaunit"),v("mode",T{var c=_n(),g=Ls();$.exports=function(P,S,t){var e={},r=t[S.subplot]._subplot,a,n;r?(a=r.radialAxis,n=r.angularAxis):(r=t[S.subplot],a=r.radialaxis,n=r.angularaxis);var o=a.c2l(P.r);e.rLabel=g.tickText(a,o,!0).text;var i=n.thetaunit==="degrees"?c.rad2deg(P.theta):P.theta;return e.thetaLabel=g.tickText(n,i,!0).text,e}}),fZ=Ft((Q,$)=>{var c=ia(),g=Ua().BADNUM,P=Ls(),S=N0(),t=ct(),e=Bt(),r=me().calcMarkerSize;$.exports=function(a,n){for(var o=a._fullLayout,i=n.subplot,s=o[i].radialaxis,f=o[i].angularaxis,x=s.makeCalcdata(n,"r"),y=f.makeCalcdata(n,"theta"),v=n._length,T=new Array(v),u=0;u{var c=Ya(),g=Ua().BADNUM;$.exports=function(P,S,t){for(var e=S.layers.frontplot.select("g.scatterlayer"),r=S.xaxis,a=S.yaxis,n={xaxis:r,yaxis:a,plot:S.framework,layerClipId:S._hasClipOnAxisFalse?S.clipIds.forTraces:null},o=S.radialAxis,i=S.angularAxis,s=0;s{var c=Pd();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],s=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,P(i,s,o,n),n.hovertemplate=s.hovertemplate,a}}function P(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="r",n._hovertitle="θ";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.rLabel=i.rLabel,r.thetaLabel=i.thetaLabel;var s=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=s.split("+");y.indexOf("all")!==-1&&(y=["r","theta","text"]),y.indexOf("r")!==-1&&x(a,r.rLabel),y.indexOf("theta")!==-1&&x(n,r.thetaLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}$.exports={hoverPoints:g,makeHoverPointText:P}}),pZ=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:AT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:L3(),supplyDefaults:MT().supplyDefaults,colorbar:yo(),formatLabels:ST(),calc:fZ(),plot:dZ(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:ET().hoverPoints,selectPoints:jf(),meta:{}}}),mZ=Ft((Q,$)=>{$.exports=pZ()}),ZE=Ft((Q,$)=>{var c=L3(),{cliponaxis:g,hoveron:P}=c,S=Wr(c,["cliponaxis","hoveron"]),{connectgaps:t,line:{color:e,dash:r,width:a},fill:n,fillcolor:o,marker:i,textfont:s,textposition:f}=b3();$.exports=Pr(Ir({},S),{connectgaps:t,fill:n,fillcolor:o,line:{color:e,dash:r,editType:"calc",width:a},marker:i,textfont:s,textposition:f})}),gZ=Ft((Q,$)=>{var c=_n(),g=Mc(),P=MT().handleRThetaDefaults,S=c0(),t=F0(),e=b0(),r=R0(),a=_m().PTS_LINESONLY,n=ZE();$.exports=function(o,i,s,f){function x(v,T){return c.coerce(o,i,n,v,T)}var y=P(o,i,f,x);if(!y){i.visible=!1;return}x("thetaunit"),x("mode",y{var c=ST();$.exports=function(g,P,S){var t=g.i;return"r"in g||(g.r=P._r[t]),"theta"in g||(g.theta=P._theta[t]),c(g,P,S)}}),yZ=Ft((Q,$)=>{var c=N0(),g=me().calcMarkerSize,P=xx(),S=Ls(),t=q1().TOO_MANY_POINTS;$.exports=function(e,r){var a=e._fullLayout,n=r.subplot,o=a[n].radialaxis,i=a[n].angularaxis,s=r._r=o.makeCalcdata(r,"r"),f=r._theta=i.makeCalcdata(r,"theta"),x=r._length,y={};x{var c=rT(),g=ET().makeHoverPointText;function P(S,t,e,r){var a=S.cd,n=a[0].t,o=n.r,i=n.theta,s=c.hoverPoints(S,t,e,r);if(!(!s||s[0].index===!1)){var f=s[0];if(f.index===void 0)return s;var x=S.subplot,y=f.cd[f.index],v=f.trace;if(y.r=o[f.index],y.theta=i[f.index],!!x.isPtInside(y))return f.xLabelVal=void 0,f.yLabelVal=void 0,g(y,v,x,f),s}}$.exports={hoverPoints:P}}),_Z=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:AT(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:ZE(),supplyDefaults:gZ(),colorbar:yo(),formatLabels:vZ(),calc:yZ(),hoverPoints:xZ().hoverPoints,selectPoints:SS(),meta:{}}}),bZ=Ft((Q,$)=>{var c=iT(),g=ia(),P=XS(),S=AS(),t=xx(),e=_n(),r=q1().TOO_MANY_POINTS,a={};$.exports=function(n,o,i){if(i.length){var s=o.radialAxis,f=o.angularAxis,x=S(n,o);return i.forEach(function(y){if(!(!y||!y[0]||!y[0].trace)){var v=y[0],T=v.trace,u=v.t,b=T._length,_=u.r,C=u.theta,M=u.opts,E,A=_.slice(),h=C.slice();for(E=0;E<_.length;E++)o.isPtInside({r:_[E],theta:C[E]})||(A[E]=NaN,h[E]=NaN);var p=new Array(b*2),k=Array(b),w=Array(b);for(E=0;E=r&&(M.marker.cluster=u.tree),M.marker&&(M.markerSel.positions=M.markerUnsel.positions=M.marker.positions=p),M.line&&p.length>1&&e.extendFlat(M.line,t.linePositions(n,T,p)),M.text&&(e.extendFlat(M.text,{positions:p},t.textPosition(n,T,M.text,M.marker)),e.extendFlat(M.textSel,{positions:p},t.textPosition(n,T,M.text,M.markerSel)),e.extendFlat(M.textUnsel,{positions:p},t.textPosition(n,T,M.text,M.markerUnsel))),M.fill&&!x.fill2d&&(x.fill2d=!0),M.marker&&!x.scatter2d&&(x.scatter2d=!0),M.line&&!x.line2d&&(x.line2d=!0),M.text&&!x.glText&&(x.glText=!0),x.lineOptions.push(M.line),x.fillOptions.push(M.fill),x.markerOptions.push(M.marker),x.markerSelectedOptions.push(M.markerSel),x.markerUnselectedOptions.push(M.markerUnsel),x.textOptions.push(M.text),x.textSelectedOptions.push(M.textSel),x.textUnselectedOptions.push(M.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),u.x=k,u.y=w,u.rawx=k,u.rawy=w,u.r=_,u.theta=C,u.positions=p,u._scene=x,u.index=x.count,x.count++}}),P(n,o,i)}},$.exports.reglPrecompiled=a}),wZ=Ft((Q,$)=>{var c=_Z();c.plot=bZ(),$.exports=c}),kZ=Ft((Q,$)=>{$.exports=wZ()}),$E=Ft((Q,$)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=$u(),P=ya().extendFlat,S=L3(),t=Lg();$.exports={r:S.r,theta:S.theta,r0:S.r0,dr:S.dr,theta0:S.theta0,dtheta:S.dtheta,thetaunit:S.thetaunit,base:P({},t.base,{}),offset:P({},t.offset,{}),width:P({},t.width,{}),text:P({},t.text,{}),hovertext:P({},t.hovertext,{}),marker:e(),hoverinfo:S.hoverinfo,hovertemplate:c(),hovertemplatefallback:g(),selected:t.selected,unselected:t.unselected};function e(){var r=P({},t.marker);return delete r.cornerradius,r}}),GE=Ft((Q,$)=>{$.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}),TZ=Ft((Q,$)=>{var c=_n(),g=MT().handleRThetaDefaults,P=L6(),S=$E();$.exports=function(t,e,r,a){function n(i,s){return c.coerce(t,e,S,i,s)}var o=g(t,e,a,n);if(!o){e.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),P(t,e,n,r,a),c.coerceSelectionMarkerOpacity(e,n)}}),AZ=Ft((Q,$)=>{var c=_n(),g=GE();$.exports=function(P,S,t){var e={},r;function a(i,s){return c.coerce(P[r]||{},S[r],g,i,s)}for(var n=0;n{var c=Zd().hasColorscale,g=ep(),P=_n().isArrayOrTypedArray,S=Nw(),t=zr().setGroupPositions,e=Bt(),r=Qo().traceIs,a=_n().extendFlat;function n(i,s){for(var f=i._fullLayout,x=s.subplot,y=f[x].radialaxis,v=f[x].angularaxis,T=y.makeCalcdata(s,"r"),u=v.makeCalcdata(s,"theta"),b=s._length,_=new Array(b),C=T,M=u,E=0;E{var c=En(),g=ia(),P=_n(),S=Vs(),t=TT();$.exports=function(r,a,n){var o=r._context.staticPlot,i=a.xaxis,s=a.yaxis,f=a.radialAxis,x=a.angularAxis,y=e(a),v=a.layers.frontplot.select("g.barlayer");P.makeTraceGroups(v,n,"trace bars").each(function(){var T=c.select(this),u=P.ensureSingle(T,"g","points"),b=u.selectAll("g.point").data(P.identity);b.enter().append("g").style("vector-effect",o?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),b.exit().remove(),b.each(function(_){var C=c.select(this),M=_.rp0=f.c2p(_.s0),E=_.rp1=f.c2p(_.s1),A=_.thetag0=x.c2g(_.p0),h=_.thetag1=x.c2g(_.p1),p;if(!g(M)||!g(E)||!g(A)||!g(h)||M===E||A===h)p="M0,0Z";else{var k=f.c2g(_.s1),w=(A+h)/2;_.ct=[i.c2p(k*Math.cos(w)),s.c2p(k*Math.sin(w))],p=y(M,E,A,h)}P.ensureSingle(C,"path").attr("d",p)}),S.setClipUrl(T,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,r)})};function e(r){var a=r.cxx,n=r.cyy;return r.vangles?function(o,i,s,f){var x,y;P.angleDelta(s,f)>0?(x=s,y=f):(x=f,y=s);var v=t.findEnclosingVertexAngles(x,r.vangles)[0],T=t.findEnclosingVertexAngles(y,r.vangles)[1],u=[v,(x+y)/2,T];return t.pathPolygonAnnulus(o,i,x,y,u,a,n)}:function(o,i,s,f){return P.pathAnnulus(o,i,s,f,a,n)}}}),SZ=Ft((Q,$)=>{var c=Qh(),g=_n(),P=eb().getTraceColor,S=g.fillText,t=ET().makeHoverPointText,e=TT().isPtInsidePolygon;$.exports=function(r,a,n){var o=r.cd,i=o[0].trace,s=r.subplot,f=s.radialAxis,x=s.angularAxis,y=s.vangles,v=y?e:g.isPtInsideSector,T=r.maxHoverDistance,u=x._period||2*Math.PI,b=Math.abs(f.g2p(Math.sqrt(a*a+n*n))),_=Math.atan2(n,a);f.range[0]>f.range[1]&&(_+=Math.PI);var C=function(h){return v(b,_,[h.rp0,h.rp1],[h.thetag0,h.thetag1],y)?T+Math.min(1,Math.abs(h.thetag1-h.thetag0)/u)-1+(h.rp1-b)/(h.rp1-h.rp0)-1:1/0};if(c.getClosest(o,C,r),r.index!==!1){var M=r.index,E=o[M];r.x0=r.x1=E.ct[0],r.y0=r.y1=E.ct[1];var A=g.extendFlat({},E,{r:E.s,theta:E.p});return S(E,i,r),t(A,i,s,r),r.hovertemplate=i.hovertemplate,r.color=P(i,E),r.xLabelVal=r.yLabelVal=void 0,E.s<0&&(r.idealAlign="left"),[r]}}}),EZ=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"barpolar",basePlotModule:AT(),categories:["polar","bar","showLegend"],attributes:$E(),layoutAttributes:GE(),supplyDefaults:TZ(),supplyLayoutDefaults:AZ(),calc:YE().calc,crossTraceCalc:YE().crossTraceCalc,plot:MZ(),colorbar:yo(),formatLabels:ST(),style:wm().style,styleOnSelect:wm().styleOnSelect,hoverPoints:SZ(),selectPoints:rb(),meta:{}}}),CZ=Ft((Q,$)=>{$.exports=EZ()}),KE=Ft((Q,$)=>{$.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}),XE=Ft((Q,$)=>{var c=yi(),g=Cd(),P=jh().attributes,S=_n().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({ticklen:g.ticklen,tickwidth:S({},g.tickwidth,{dflt:2}),tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,tickfont:g.tickfont,tickformat:g.tickformat,hoverformat:g.hoverformat,layer:g.layer},"plot","from-root"),a=S({visible:S({},g.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:S({},g.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,r),n=S({visible:S({},g.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:g.ticks,editType:"calc"},e,r);$.exports={domain:P({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:c.background},realaxis:a,imaginaryaxis:n,editType:"calc"}}),LZ=Ft((Q,$)=>{var c=_n(),g=ui(),P=mu(),S=I1(),t=dd().getSubplotData,e=gm(),r=o0(),a=Jy(),n=s0(),o=XE(),i=KE(),s=i.axisNames,f=y(function(v){return c.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(T){return-T}).concat([0]).concat(v)},String);function x(v,T,u,b){var _=u("bgcolor");b.bgColor=g.combine(_,b.paper_bgcolor);var C=t(b.fullData,i.name,b.id),M=b.layoutOut,E;function A(q,X){return u(E+"."+q,X)}for(var h=0;h{var c=dd().getSubplotCalcData,g=_n().counterRegex,P=WE(),S=KE(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var s=i._fullLayout,f=i.calcdata,x=s._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:P}=$u(),S=ya().extendFlat,t=D0(),e=tf(),r=Yo(),a=e.line;$.exports={mode:e.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:e.text,texttemplate:g({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:P({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:P(),selected:e.selected,unselected:e.unselected}}),zZ=Ft((Q,$)=>{var c=_n(),g=Mc(),P=c0(),S=F0(),t=xv(),e=b0(),r=R0(),a=_m().PTS_LINESONLY,n=JE();$.exports=function(i,s,f,x){function y(u,b){return c.coerce(i,s,n,u,b)}var v=o(i,s,x,y);if(!v){s.visible=!1;return}y("mode",v{var c=Ls();$.exports=function(g,P,S){var t={},e=S[P.subplot]._subplot;return t.realLabel=c.tickText(e.radialAxis,g.real,!0).text,t.imagLabel=c.tickText(e.angularAxis,g.imag,!0).text,t}}),OZ=Ft((Q,$)=>{var c=ia(),g=Ua().BADNUM,P=N0(),S=ct(),t=Bt(),e=me().calcMarkerSize;$.exports=function(r,a){for(var n=r._fullLayout,o=a.subplot,i=n[o].realaxis,s=n[o].imaginaryaxis,f=i.makeCalcdata(a,"real"),x=s.makeCalcdata(a,"imag"),y=a._length,v=new Array(y),T=0;T{var c=Ya(),g=Ua().BADNUM,P=HE(),S=P.smith;$.exports=function(t,e,r){for(var a=e.layers.frontplot.select("g.scatterlayer"),n=e.xaxis,o=e.yaxis,i={xaxis:n,yaxis:o,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=0;s{var c=Pd();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],s=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,P(i,s,o,n),n.hovertemplate=s.hovertemplate,a}}function P(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="real",n._hovertitle="imag";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.realLabel=i.realLabel,r.imagLabel=i.imagLabel;var s=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=s.split("+");y.indexOf("all")!==-1&&(y=["real","imag","text"]),y.indexOf("real")!==-1&&x(a,r.realLabel),y.indexOf("imag")!==-1&&x(n,r.imagLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}$.exports={hoverPoints:g,makeHoverPointText:P}}),RZ=Ft((Q,$)=>{$.exports={moduleType:"trace",name:"scattersmith",basePlotModule:PZ(),categories:["smith","symbols","showLegend","scatter-like"],attributes:JE(),supplyDefaults:zZ(),colorbar:yo(),formatLabels:IZ(),calc:OZ(),plot:DZ(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:FZ().hoverPoints,selectPoints:jf(),meta:{}}}),BZ=Ft((Q,$)=>{$.exports=RZ()}),Vp=Ft((Q,$)=>{var c=zd();function g(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}c(g.prototype,{instance:function(a,n){a=(a||"gregorian").toLowerCase(),n=n||"";var o=this._localCals[a+"-"+n];if(!o&&this.calendars[a]&&(o=new this.calendars[a](n),this._localCals[a+"-"+n]=o),!o)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,a);return o},newDate:function(a,n,o,i,s){return i=(a!=null&&a.year?a.calendar():typeof i=="string"?this.instance(i,s):i)||this.instance(),i.newDate(a,n,o)},substituteDigits:function(a){return function(n){return(n+"").replace(/[0-9]/g,function(o){return a[o]})}},substituteChineseDigits:function(a,n){return function(o){for(var i="",s=0;o>0;){var f=o%10;i=(f===0?"":a[f]+n[s])+i,s++,o=Math.floor(o/10)}return i.indexOf(a[1]+n[1])===0&&(i=i.substr(1)),i||a[0]}}});function P(a,n,o,i){if(this._calendar=a,this._year=n,this._month=o,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(a,n){return a=""+a,"000000".substring(0,n-a.length)+a}c(P.prototype,{newDate:function(a,n,o){return this._calendar.newDate(a??this,n,o)},year:function(a){return arguments.length===0?this._year:this.set(a,"y")},month:function(a){return arguments.length===0?this._month:this.set(a,"m")},day:function(a){return arguments.length===0?this._day:this.set(a,"d")},date:function(a,n,o){if(!this._calendar.isValid(a,n,o))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=a,this._month=n,this._day=o,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(a,n){return this._calendar.add(this,a,n)},set:function(a,n){return this._calendar.set(this,a,n)},compareTo:function(a){if(this._calendar.name!==a._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name);var n=this._year!==a._year?this._year-a._year:this._month!==a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day;return n===0?0:n<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function t(){this.shortYearCutoff="+10"}c(t.prototype,{_validateLevel:0,newDate:function(a,n,o){return a==null?this.today():(a.year&&(this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),o=a.day(),n=a.month(),a=a.year()),new P(this,a,n,o))},today:function(){return this.fromJSDate(new Date)},epoch:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return n.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(n.year()<0?"-":"")+S(Math.abs(n.year()),4)},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(a,n){var o=this._validate(a,n,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(o.month()+this.monthsInYear(o)-this.firstMonth)%this.monthsInYear(o)+this.minMonth},fromMonthOfYear:function(a,n){var o=(n+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;return this._validate(a,o,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),o},daysInYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(n)?366:365},dayOfYear:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(a,n,o){return this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(a,n,o){return this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(a,this._add(a,n,o),n,o)},_add:function(a,n,o){if(this._validateLevel++,o==="d"||o==="w"){var i=a.toJD()+n*(o==="w"?this.daysInWeek():1),s=a.calendar().fromJD(i);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var f=a.year()+(o==="y"?n:0),x=a.monthOfYear()+(o==="m"?n:0),s=a.day(),y=function(u){for(;xb-1+u.minMonth;)f++,x-=b,b=u.monthsInYear(f)};o==="y"?(a.month()!==this.fromMonthOfYear(f,x)&&(x=this.newDate(f,a.month(),this.minDay).monthOfYear()),x=Math.min(x,this.monthsInYear(f)),s=Math.min(s,this.daysInMonth(f,this.fromMonthOfYear(f,x)))):o==="m"&&(y(this),s=Math.min(s,this.daysInMonth(f,this.fromMonthOfYear(f,x))));var v=[f,this.fromMonthOfYear(f,x),s];return this._validateLevel--,v}catch(T){throw this._validateLevel--,T}},_correctAdd:function(a,n,o,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(n[0]===0||a.year()>0!=n[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],f=o<0?-1:1;n=this._add(a,o*s[0]+f*s[1],s[2])}return a.date(n[0],n[1],n[2])},set:function(a,n,o){this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var i=o==="y"?n:a.year(),s=o==="m"?n:a.month(),f=o==="d"?n:a.day();return(o==="y"||o==="m")&&(f=Math.min(f,this.daysInMonth(i,s))),a.date(i,s,f)},isValid:function(a,n,o){this._validateLevel++;var i=this.hasYearZero||a!==0;if(i){var s=this.newDate(a,n,this.minDay);i=n>=this.minMonth&&n-this.minMonth=this.minDay&&o-this.minDay13.5?13:1),T=s-(v>2.5?4716:4715);return T<=0&&T--,this.newDate(T,v,y)},toJSDate:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(i.year(),i.month()-1,i.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});var r=$.exports=new g;r.cdate=P,r.baseCalendar=t,r.calendars.gregorian=e}),NZ=Ft(()=>{var Q=zd(),$=Vp();Q($.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),$.local=$.regionalOptions[""],Q($.cdate.prototype,{formatDate:function(c,g){return typeof c!="string"&&(g=c,c=""),this._calendar.formatDate(c||"",this,g)}}),Q($.baseCalendar.prototype,{UNIX_EPOCH:$.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:$.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(c,g,P){if(typeof c!="string"&&(P=g,g=c,c=""),!g)return"";if(g.calendar()!==this)throw $.local.invalidFormat||$.regionalOptions[""].invalidFormat;c=c||this.local.dateFormat,P=P||{};for(var S=P.dayNamesShort||this.local.dayNamesShort,t=P.dayNames||this.local.dayNames,e=P.monthNumbers||this.local.monthNumbers,r=P.monthNamesShort||this.local.monthNamesShort,a=P.monthNames||this.local.monthNames,n=P.calculateWeek||this.local.calculateWeek,o=function(C,M){for(var E=1;_+E1},i=function(C,M,E,A){var h=""+M;if(o(C,A))for(;h.length1},b=function(R,O){var N=u(R,O),V=[2,3,N?4:2,N?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],H=new RegExp("^-?\\d{1,"+V+"}"),F=g.substring(h).match(H);if(!F)throw($.local.missingNumberAt||$.regionalOptions[""].missingNumberAt).replace(/\{0\}/,h);return h+=F[0].length,parseInt(F[0],10)},_=this,C=function(){if(typeof a=="function"){u("m");var R=a.call(_,g.substring(h));return h+=R.length,R}return b("m")},M=function(R,O,N,V){for(var H=u(R,V)?N:O,F=0;F-1){f=1,x=y;for(var w=this.daysInMonth(s,f);x>w;w=this.daysInMonth(s,f))f++,x-=w}return i>-1?this.fromJD(i):this.newDate(s,f,x)},determineDate:function(c,g,P,S,t){P&&typeof P!="object"&&(t=S,S=P,P=null),typeof S!="string"&&(t=S,S="");var e=this,r=function(a){try{return e.parseDate(S,a,t)}catch{}a=a.toLowerCase();for(var n=(a.match(/^c/)&&P?P.newDate():null)||e.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=o.exec(a);i;)n.add(parseInt(i[1],10),i[2]||"d"),i=o.exec(a);return n};return g=g?g.newDate():null,c=c==null?g:typeof c=="string"?r(c):typeof c=="number"?isNaN(c)||c===1/0||c===-1/0?g:e.today().add(c,"d"):e.newDate(c),c}})}),jZ=Ft(()=>{var Q=Vp(),$=zd(),c=Q.instance();function g(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,$(g.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,s){if(typeof i=="string"){var f=i.match(S);return f?f[0]:""}var x=this._validateYear(i),y=i.month(),v=""+this.toChineseMonth(x,y);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(x,y)&&(v+="i"),v},monthNames:function(i){if(typeof i=="string"){var s=i.match(t);return s?s[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},monthNamesShort:function(i){if(typeof i=="string"){var s=i.match(e);return s?s[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一","二","三","四","五","六","七","八","九","十","十一","十二"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},parseMonth:function(i,s){i=this._validateYear(i);var f=parseInt(s),x;if(isNaN(f))s[0]==="闰"&&(x=!0,s=s.substring(1)),s[s.length-1]==="月"&&(s=s.substring(0,s.length-1)),f=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(s);else{var y=s[s.length-1];x=y==="i"||y==="I"}var v=this.toMonthIndex(i,f,x);return v},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(i,s){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw s.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,s,f){var x=this.intercalaryMonth(i),y=f&&s!==x;if(y||s<1||s>12)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return x?!f&&s<=x?v=s-1:v=s:v=s-1,v},toChineseMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var f=this.intercalaryMonth(i),x=f?12:11;if(s<0||s>x)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var y;return f?s>13;return f},isIntercalaryMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var f=this.intercalaryMonth(i);return!!f&&f===s},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,s,f){var x=this._validateYear(i,Q.local.invalidyear),y=a[x-a[0]],v=y>>9&4095,T=y>>5&15,u=y&31,b;b=c.newDate(v,T,u),b.add(4-(b.dayOfWeek()||7),"d");var _=this.toJD(i,s,f)-b.toJD();return 1+Math.floor(_/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,s){i.year&&(s=i.month(),i=i.year()),i=this._validateYear(i);var f=r[i-r[0]],x=f>>13,y=x?12:11;if(s>y)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=f&1<<12-s?30:29;return v},weekDay:function(i,s,f){return(this.dayOfWeek(i,s,f)||7)<6},toJD:function(i,s,f){var x=this._validate(i,v,f,Q.local.invalidDate);i=this._validateYear(x.year()),s=x.month(),f=x.day();var y=this.isIntercalaryMonth(i,s),v=this.toChineseMonth(i,s),T=o(i,v,f,y);return c.toJD(T.year,T.month,T.day)},fromJD:function(i){var s=c.fromJD(i),f=n(s.year(),s.month(),s.day()),x=this.toMonthIndex(f.year,f.month,f.isIntercalary);return this.newDate(f.year,x,f.day)},fromString:function(i){var s=i.match(P),f=this._validateYear(+s[1]),x=+s[2],y=!!s[3],v=this.toMonthIndex(f,x,y),T=+s[4];return this.newDate(f,v,T)},add:function(i,s,f){var x=i.year(),y=i.month(),v=this.isIntercalaryMonth(x,y),T=this.toChineseMonth(x,y),u=Object.getPrototypeOf(g.prototype).add.call(this,i,s,f);if(f==="y"){var b=u.year(),_=u.month(),C=this.isIntercalaryMonth(b,T),M=v&&C?this.toMonthIndex(b,T,!0):this.toMonthIndex(b,T,!1);M!==_&&u.month(M)}return u}});var P=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,S=/^\d?\d[iI]?/m,t=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;Q.calendars.chinese=g;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function n(i,s,f,x){var y,v;if(typeof i=="object")y=i,v=s||{};else{var T=typeof i=="number"&&i>=1888&&i<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var u=typeof s=="number"&&s>=1&&s<=12;if(!u)throw new Error("Solar month outside range 1 - 12");var b=typeof f=="number"&&f>=1&&f<=31;if(!b)throw new Error("Solar day outside range 1 - 31");y={year:i,month:s,day:f},v={}}var _=a[y.year-a[0]],C=y.year<<9|y.month<<5|y.day;v.year=C>=_?y.year:y.year-1,_=a[v.year-a[0]];var M=_>>9&4095,E=_>>5&15,A=_&31,h,p=new Date(M,E-1,A),k=new Date(y.year,y.month-1,y.day);h=Math.round((k-p)/(24*3600*1e3));var w=r[v.year-r[0]],R;for(R=0;R<13;R++){var O=w&1<<12-R?30:29;if(h>13;return!N||R=1888&&i<=2111;if(!u)throw new Error("Lunar year outside range 1888-2111");var b=typeof s=="number"&&s>=1&&s<=12;if(!b)throw new Error("Lunar month outside range 1 - 12");var _=typeof f=="number"&&f>=1&&f<=30;if(!_)throw new Error("Lunar day outside range 1 - 30");var C;typeof x=="object"?(C=!1,v=x):(C=!!x,v={}),T={year:i,month:s,day:f,isIntercalary:C}}var M;M=T.day-1;var E=r[T.year-r[0]],A=E>>13,h;A&&(T.month>A||T.isIntercalary)?h=T.month:h=T.month-1;for(var p=0;p>9&4095,O=w>>5&15,N=w&31,V=new Date(R,O-1,N+M);return v.year=V.getFullYear(),v.month=1+V.getMonth(),v.day=V.getDate(),v}}),UZ=Ft(()=>{var Q=Vp(),$=zd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var P=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=P.year()+(P.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,P){var S=this._validate(g,P,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,P,S){return(this.dayOfWeek(g,P,S)||7)<6},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var P=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((P-Math.floor((P+366)/1461))/365)+1;S<=0&&S--,P=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(P/30)+1,e=P-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.coptic=c}),VZ=Ft(()=>{var Q=Vp(),$=zd();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(P){return this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear),!1},monthsInYear:function(P){return this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear),13},daysInYear:function(P){return this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear),400},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);return(e.day()+1)%8},weekDay:function(P,S,t){var e=this.dayOfWeek(P,S,t);return e>=2&&e<=6},extraInfo:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);return{century:g[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);return P=e.year()+(e.year()<0?1:0),S=e.month(),t=e.day(),t+(S>1?16:0)+(S>2?(S-2)*32:0)+(P-1)*400+this.jdEpoch-1},fromJD:function(P){P=Math.floor(P+.5)-Math.floor(this.jdEpoch)-1;var S=Math.floor(P/400)+1;P-=(S-1)*400,P+=P>15?16:0;var t=Math.floor(P/32)+1,e=P-(t-1)*32+1;return this.newDate(S<=0?S-1:S,t,e)}});var g={20:"Fruitbat",21:"Anchovy"};Q.calendars.discworld=c}),HZ=Ft(()=>{var Q=Vp(),$=zd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var P=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=P.year()+(P.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,P){var S=this._validate(g,P,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,P,S){return(this.dayOfWeek(g,P,S)||7)<6},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var P=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((P-Math.floor((P+366)/1461))/365)+1;S<=0&&S--,P=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(P/30)+1,e=P-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.ethiopian=c}),WZ=Ft(()=>{var Q=Vp(),$=zd();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear);return this._leapYear(S.year())},_leapYear:function(P){return P=P<0?P+1:P,g(P*7+1,19)<7},monthsInYear:function(P){return this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear),this._leapYear(P.year?P.year():P)?13:12},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear);return P=S.year(),this.toJD(P===-1?1:P+1,7,1)-this.toJD(P,7,1)},daysInMonth:function(P,S){return P.year&&(S=P.month(),P=P.year()),this._validate(P,S,this.minDay,Q.local.invalidMonth),S===12&&this.leapYear(P)||S===8&&g(this.daysInYear(P),10)===5?30:S===9&&g(this.daysInYear(P),10)===3?29:this.daysPerMonth[S-1]},weekDay:function(P,S,t){return this.dayOfWeek(P,S,t)!==6},extraInfo:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);P=e.year(),S=e.month(),t=e.day();var r=P<=0?P+1:P,a=this.jdEpoch+this._delay1(r)+this._delay2(r)+t+1;if(S<7){for(var n=7;n<=this.monthsInYear(P);n++)a+=this.daysInMonth(P,n);for(var n=1;n=this.toJD(S===-1?1:S+1,7,1);)S++;for(var t=Pthis.toJD(S,t,this.daysInMonth(S,t));)t++;var e=P-this.toJD(S,t,1)+1;return this.newDate(S,t,e)}});function g(P,S){return P-S*Math.floor(P/S)}Q.calendars.hebrew=c}),qZ=Ft(()=>{var Q=Vp(),$=zd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(g){var P=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);return(P.year()*11+14)%30<11},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){return this.leapYear(g)?355:354},daysInMonth:function(g,P){var S=this._validate(g,P,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===12&&this.leapYear(S.year())?1:0)},weekDay:function(g,P,S){return this.dayOfWeek(g,P,S)!==5},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);return g=t.year(),P=t.month(),S=t.day(),g=g<=0?g+1:g,S+Math.ceil(29.5*(P-1))+(g-1)*354+Math.floor((3+11*g)/30)+this.jdEpoch-1},fromJD:function(g){g=Math.floor(g)+.5;var P=Math.floor((30*(g-this.jdEpoch)+10646)/10631);P=P<=0?P-1:P;var S=Math.min(12,Math.ceil((g-29-this.toJD(P,1,1))/29.5)+1),t=g-this.toJD(P,S,1)+1;return this.newDate(P,S,t)}}),Q.calendars.islamic=c}),ZZ=Ft(()=>{var Q=Vp(),$=zd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var P=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=P.year()<0?P.year()+1:P.year();return S%4===0},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(4-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,P){var S=this._validate(g,P,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===2&&this.leapYear(S.year())?1:0)},weekDay:function(g,P,S){return(this.dayOfWeek(g,P,S)||7)<6},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);return g=t.year(),P=t.month(),S=t.day(),g<0&&g++,P<=2&&(g--,P+=12),Math.floor(365.25*(g+4716))+Math.floor(30.6001*(P+1))+S-1524.5},fromJD:function(g){var P=Math.floor(g+.5),S=P+1524,t=Math.floor((S-122.1)/365.25),e=Math.floor(365.25*t),r=Math.floor((S-e)/30.6001),a=r-Math.floor(r<14?1:13),n=t-Math.floor(a>2?4716:4715),o=S-e-Math.floor(30.6001*r);return n<=0&&n--,this.newDate(n,a,o)}}),Q.calendars.julian=c}),$Z=Ft(()=>{var Q=Vp(),$=zd();function c(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),!1},formatYear:function(S){var t=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear);S=t.year();var e=Math.floor(S/400);S=S%400,S+=S<0?400:0;var r=Math.floor(S/20);return e+"."+r+"."+S%20},forYear:function(S){if(S=S.split("."),S.length<3)throw"Invalid Mayan year";for(var t=0,e=0;e19||e>0&&r<0)throw"Invalid Mayan year";t=t*20+r}return t},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),18},weekOfYear:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),0},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),360},daysInMonth:function(S,t){return this._validate(S,t,this.minDay,Q.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()},weekDay:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),!0},extraInfo:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate),a=r.toJD(),n=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(S){S-=this.jdEpoch;var t=g(S+8+340,365);return[Math.floor(t/20)+1,g(t,20)]},_toTzolkin:function(S){return S-=this.jdEpoch,[P(S+20,20),P(S+4,13)]},toJD:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(S){S=Math.floor(S)+.5-this.jdEpoch;var t=Math.floor(S/360);S=S%360,S+=S<0?360:0;var e=Math.floor(S/20),r=S%20;return this.newDate(t,e,r)}});function g(S,t){return S-t*Math.floor(S/t)}function P(S,t){return g(S-1,t)+1}Q.calendars.mayan=c}),GZ=Ft(()=>{var Q=Vp(),$=zd();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar;var g=Q.instance("gregorian");$(c.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear);return g.leapYear(S.year()+(S.year()<1?1:0)+1469)},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(P,S,t){return(this.dayOfWeek(P,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidMonth),r=e.year();r<0&&r++;for(var a=e.day(),n=1;n=this.toJD(S+1,1,1);)S++;for(var t=P-Math.floor(this.toJD(S,1,1)+.5)+1,e=1;t>this.daysInMonth(S,e);)t-=this.daysInMonth(S,e),e++;return this.newDate(S,e,t)}}),Q.calendars.nanakshahi=c}),YZ=Ft(()=>{var Q=Vp(),$=zd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(g){return this.daysInYear(g)!==this.daysPerYear},weekOfYear:function(g,P,S){var t=this.newDate(g,P,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){var P=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);if(g=P.year(),typeof this.NEPALI_CALENDAR_DATA[g]>"u")return this.daysPerYear;for(var S=0,t=this.minMonth;t<=12;t++)S+=this.NEPALI_CALENDAR_DATA[g][t];return S},daysInMonth:function(g,P){return g.year&&(P=g.month(),g=g.year()),this._validate(g,P,this.minDay,Q.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[g]>"u"?this.daysPerMonth[P-1]:this.NEPALI_CALENDAR_DATA[g][P]},weekDay:function(g,P,S){return this.dayOfWeek(g,P,S)!==6},toJD:function(g,P,S){var t=this._validate(g,P,S,Q.local.invalidDate);g=t.year(),P=t.month(),S=t.day();var e=Q.instance(),r=0,a=P,n=g;this._createMissingCalendarData(g);var o=g-(a>9||a===9&&S>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(P!==9&&(r=S,a--);a!==9;)a<=0&&(a=12,n--),r+=this.NEPALI_CALENDAR_DATA[n][a],a--;return P===9?(r+=S-this.NEPALI_CALENDAR_DATA[n][0],r<0&&(r+=e.daysInYear(o))):r+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],e.newDate(o,1,1).add(r,"d").toJD()},fromJD:function(g){var P=Q.instance(),S=P.fromJD(g),t=S.year(),e=S.dayOfYear(),r=t+56;this._createMissingCalendarData(r);for(var a=9,n=this.NEPALI_CALENDAR_DATA[r][0],o=this.NEPALI_CALENDAR_DATA[r][a]-n+1;e>o;)a++,a>12&&(a=1,r++),o+=this.NEPALI_CALENDAR_DATA[r][a];var i=this.NEPALI_CALENDAR_DATA[r][a]-(o-e);return this.newDate(r,a,i)},_createMissingCalendarData:function(g){var P=this.daysPerMonth.slice(0);P.unshift(17);for(var S=g-1;S"u"&&(this.NEPALI_CALENDAR_DATA[S]=P)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),Q.calendars.nepali=c}),KZ=Ft(()=>{var Q=Vp(),$=zd();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}function g(P){var S=P-475;P<0&&S++;var t=.242197,e=t*S,r=t*(S+1),a=e-Math.floor(e),n=r-Math.floor(r);return a>n}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear);return g(S.year())},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(P,S,t){return this.dayOfWeek(P,S,t)!==5},toJD:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate);P=e.year(),S=e.month(),t=e.day();var r=0;if(P>0)for(var a=1;a0?P-1:P)*365+r+this.jdEpoch-1},fromJD:function(P){P=Math.floor(P)+.5;var S=475+(P-this.toJD(475,1,1))/365.242197,t=Math.floor(S);t<=0&&t--,P>this.toJD(t,12,g(t)?30:29)&&(t++,t===0&&t++);var e=P-this.toJD(t,1,1)+1,r=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),a=P-this.toJD(t,r,1)+1;return this.newDate(t,r,a)}}),Q.calendars.persian=c,Q.calendars.jalali=c}),XZ=Ft(()=>{var Q=Vp(),$=zd(),c=Q.instance();function g(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,$(g.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(P,S,t){return(this.dayOfWeek(P,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(P){var S=c.fromJD(P),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(P){return P+this.yearsOffset+(P>=-this.yearsOffset&&P<=-1?1:0)},_g2tYear:function(P){return P-this.yearsOffset-(P>=1&&P<=this.yearsOffset?1:0)}}),Q.calendars.taiwan=g}),JZ=Ft(()=>{var Q=Vp(),$=zd(),c=Q.instance();function g(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,$(g.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(P,S){var t=this._validate(P,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(P,S,t){return(this.dayOfWeek(P,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(P){var S=c.fromJD(P),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(P){return P-this.yearsOffset-(P>=1&&P<=this.yearsOffset?1:0)},_g2tYear:function(P){return P+this.yearsOffset+(P>=-this.yearsOffset&&P<=-1?1:0)}}),Q.calendars.thai=g}),QZ=Ft(()=>{var Q=Vp(),$=zd();function c(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,$(c.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(P){var S=this._validate(P,this.minMonth,this.minDay,Q.local.invalidYear);return this.daysInYear(S.year())===355},weekOfYear:function(P,S,t){var e=this.newDate(P,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(P){for(var S=0,t=1;t<=12;t++)S+=this.daysInMonth(P,t);return S},daysInMonth:function(P,S){for(var t=this._validate(P,S,this.minDay,Q.local.invalidMonth),e=t.toJD()-24e5+.5,r=0,a=0;ae)return g[r]-g[r-1];r++}return 30},weekDay:function(P,S,t){return this.dayOfWeek(P,S,t)!==5},toJD:function(P,S,t){var e=this._validate(P,S,t,Q.local.invalidDate),r=12*(e.year()-1)+e.month()-15292,a=e.day()+g[r-1]-1;return a+24e5-.5},fromJD:function(P){for(var S=P-24e5+.5,t=0,e=0;eS);e++)t++;var r=t+15292,a=Math.floor((r-1)/12),n=a+1,o=r-12*a,i=S-g[t-1]+1;return this.newDate(n,o,i)},isValid:function(P,S,t){var e=Q.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(P=P.year!=null?P.year:P,e=P>=1276&&P<=1500),e},_validate:function(P,S,t,e){var r=Q.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw e.replace(/\{0\}/,this.local.name);return r}}),Q.calendars.ummalqura=c;var g=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}),t$=Ft((Q,$)=>{$.exports=Vp(),NZ(),jZ(),UZ(),VZ(),HZ(),WZ(),qZ(),ZZ(),$Z(),GZ(),YZ(),KZ(),XZ(),JZ(),QZ()}),e$=Ft((Q,$)=>{var c=t$(),g=_n(),P=Ua(),S=P.EPOCHJD,t=P.ONEDAY,e={valType:"enumerated",values:g.sortObjectKeys(c.calendars),editType:"calc",dflt:"gregorian"},r=function(E,A,h,p){var k={};return k[h]=e,g.coerce(E,A,k,h,p)},a=function(E,A,h,p){for(var k=0;k{$.exports=e$()}),n$=Ft((Q,$)=>{var c=OF();c.register([BF(),UF(),qF(),KF(),tR(),iR(),sR(),yR(),SR(),BR(),GR(),pN(),_N(),oj(),mj(),kj(),Lj(),$j(),Xj(),Qj(),nU(),lU(),dU(),vU(),zU(),DU(),yH(),IH(),ZH(),JH(),lW(),fW(),_W(),IW(),RW(),qW(),oq(),fq(),xq(),Vq(),Kq(),eZ(),oZ(),cZ(),mZ(),kZ(),CZ(),BZ(),r$()]),$.exports=c});return n$()})();/*! +`}),staticAttributes:Et,staticUniforms:ke}}class dr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(z,ht,Et,zt,Ht,ke,Fe,Ke,vr){this.context=z;let Dr=this.boundPaintVertexBuffers.length!==zt.length;for(let Fr=0;!Dr&&Fr({u_matrix:$t,u_texture:0,u_ele_delta:z,u_fog_matrix:ht,u_fog_color:Et?Et.properties.get("fog-color"):e.aM.white,u_fog_ground_blend:Et?Et.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Et?Et.calculateFogBlendOpacity(zt):0,u_horizon_color:Et?Et.properties.get("horizon-color"):e.aM.white,u_horizon_fog_blend:Et?Et.properties.get("horizon-fog-blend"):1});function _n($t){let z=[];for(let ht=0;ht<$t.length;ht++){if($t[ht]===null)continue;let Et=$t[ht].split(" ");z.push(Et.pop())}return z}class Fn{constructor(z,ht,Et,zt,Ht,ke){let Fe=z.gl;this.program=Fe.createProgram();let Ke=_n(ht.staticAttributes),vr=Et?Et.getBinderAttributes():[],Dr=Ke.concat(vr),Fr=on.prelude.staticUniforms?_n(on.prelude.staticUniforms):[],un=ht.staticUniforms?_n(ht.staticUniforms):[],Sn=Et?Et.getBinderUniforms():[],Xt=Fr.concat(un).concat(Sn),ae=[];for(let Or of Xt)ae.indexOf(Or)<0&&ae.push(Or);let xe=Et?Et.defines():[];Ht&&xe.push("#define OVERDRAW_INSPECTOR;"),ke&&xe.push("#define TERRAIN3D;");let Ae=xe.concat(on.prelude.fragmentSource,ht.fragmentSource).join(` +`),je=xe.concat(on.prelude.vertexSource,ht.vertexSource).join(` +`),Oe=Fe.createShader(Fe.FRAGMENT_SHADER);if(Fe.isContextLost())return void(this.failedToCreate=!0);if(Fe.shaderSource(Oe,Ae),Fe.compileShader(Oe),!Fe.getShaderParameter(Oe,Fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Fe.getShaderInfoLog(Oe)}`);Fe.attachShader(this.program,Oe);let $e=Fe.createShader(Fe.VERTEX_SHADER);if(Fe.isContextLost())return void(this.failedToCreate=!0);if(Fe.shaderSource($e,je),Fe.compileShader($e),!Fe.getShaderParameter($e,Fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Fe.getShaderInfoLog($e)}`);Fe.attachShader(this.program,$e),this.attributes={};let wr={};this.numAttributes=Dr.length;for(let Or=0;Or({u_depth:new e.aH(Or,Nr.u_depth),u_terrain:new e.aH(Or,Nr.u_terrain),u_terrain_dim:new e.aI(Or,Nr.u_terrain_dim),u_terrain_matrix:new e.aJ(Or,Nr.u_terrain_matrix),u_terrain_unpack:new e.aK(Or,Nr.u_terrain_unpack),u_terrain_exaggeration:new e.aI(Or,Nr.u_terrain_exaggeration)}))(z,wr),this.binderUniforms=Et?Et.getUniforms(z,wr):[]}draw(z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn,Xt,ae,xe,Ae,je){let Oe=z.gl;if(this.failedToCreate)return;if(z.program.set(this.program),z.setDepthMode(Et),z.setStencilMode(zt),z.setColorMode(Ht),z.setCullFace(ke),Ke){z.activeTexture.set(Oe.TEXTURE2),Oe.bindTexture(Oe.TEXTURE_2D,Ke.depthTexture),z.activeTexture.set(Oe.TEXTURE3),Oe.bindTexture(Oe.TEXTURE_2D,Ke.texture);for(let wr in this.terrainUniforms)this.terrainUniforms[wr].set(Ke[wr])}for(let wr in this.fixedUniforms)this.fixedUniforms[wr].set(Fe[wr]);ae&&ae.setUniforms(z,this.binderUniforms,Sn,{zoom:Xt});let $e=0;switch(ht){case Oe.LINES:$e=2;break;case Oe.TRIANGLES:$e=3;break;case Oe.LINE_STRIP:$e=1}for(let wr of un.get()){let Or=wr.vaos||(wr.vaos={});(Or[vr]||(Or[vr]=new dr)).bind(z,this,Dr,ae?ae.getPaintVertexBuffers():[],Fr,wr.vertexOffset,xe,Ae,je),Oe.drawElements(ht,wr.primitiveLength*$e,Oe.UNSIGNED_SHORT,wr.primitiveOffset*$e*2)}}}function Qn($t,z,ht){let Et=1/Wn(ht,1,z.transform.tileZoom),zt=Math.pow(2,ht.tileID.overscaledZ),Ht=ht.tileSize*Math.pow(2,z.transform.tileZoom)/zt,ke=Ht*(ht.tileID.canonical.x+ht.tileID.wrap*zt),Fe=Ht*ht.tileID.canonical.y;return{u_image:0,u_texsize:ht.imageAtlasTexture.size,u_scale:[Et,$t.fromScale,$t.toScale],u_fade:$t.t,u_pixel_coord_upper:[ke>>16,Fe>>16],u_pixel_coord_lower:[65535&ke,65535&Fe]}}let Pn=($t,z,ht,Et)=>{let zt=z.style.light,Ht=zt.properties.get("position"),ke=[Ht.x,Ht.y,Ht.z],Fe=function(){var vr=new e.A(9);return e.A!=Float32Array&&(vr[1]=0,vr[2]=0,vr[3]=0,vr[5]=0,vr[6]=0,vr[7]=0),vr[0]=1,vr[4]=1,vr[8]=1,vr}();zt.properties.get("anchor")==="viewport"&&function(vr,Dr){var Fr=Math.sin(Dr),un=Math.cos(Dr);vr[0]=un,vr[1]=Fr,vr[2]=0,vr[3]=-Fr,vr[4]=un,vr[5]=0,vr[6]=0,vr[7]=0,vr[8]=1}(Fe,-z.transform.angle),function(vr,Dr,Fr){var un=Dr[0],Sn=Dr[1],Xt=Dr[2];vr[0]=un*Fr[0]+Sn*Fr[3]+Xt*Fr[6],vr[1]=un*Fr[1]+Sn*Fr[4]+Xt*Fr[7],vr[2]=un*Fr[2]+Sn*Fr[5]+Xt*Fr[8]}(ke,ke,Fe);let Ke=zt.properties.get("color");return{u_matrix:$t,u_lightpos:ke,u_lightintensity:zt.properties.get("intensity"),u_lightcolor:[Ke.r,Ke.g,Ke.b],u_vertical_gradient:+ht,u_opacity:Et}},En=($t,z,ht,Et,zt,Ht,ke)=>e.e(Pn($t,z,ht,Et),Qn(Ht,z,ke),{u_height_factor:-Math.pow(2,zt.overscaledZ)/ke.tileSize/8}),Zn=$t=>({u_matrix:$t}),La=($t,z,ht,Et)=>e.e(Zn($t),Qn(ht,z,Et)),Vi=($t,z)=>({u_matrix:$t,u_world:z}),Qa=($t,z,ht,Et,zt)=>e.e(La($t,z,ht,Et),{u_world:zt}),Ja=($t,z,ht,Et)=>{let zt=$t.transform,Ht,ke;if(Et.paint.get("circle-pitch-alignment")==="map"){let Fe=Wn(ht,1,zt.zoom);Ht=!0,ke=[Fe,Fe]}else Ht=!1,ke=zt.pixelsToGLUnits;return{u_camera_to_center_distance:zt.cameraToCenterDistance,u_scale_with_map:+(Et.paint.get("circle-pitch-scale")==="map"),u_matrix:$t.translatePosMatrix(z.posMatrix,ht,Et.paint.get("circle-translate"),Et.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ht,u_device_pixel_ratio:$t.pixelRatio,u_extrude_scale:ke}},Do=($t,z,ht)=>({u_matrix:$t,u_inv_matrix:z,u_camera_to_center_distance:ht.cameraToCenterDistance,u_viewport_size:[ht.width,ht.height]}),yo=($t,z,ht=1)=>({u_matrix:$t,u_color:z,u_overlay:0,u_overlay_scale:ht}),Fo=$t=>({u_matrix:$t}),Da=($t,z,ht,Et)=>({u_matrix:$t,u_extrude_scale:Wn(z,1,ht),u_intensity:Et}),ys=($t,z,ht,Et)=>{let zt=e.H();e.aP(zt,0,$t.width,$t.height,0,0,1);let Ht=$t.context.gl;return{u_matrix:zt,u_world:[Ht.drawingBufferWidth,Ht.drawingBufferHeight],u_image:ht,u_color_ramp:Et,u_opacity:z.paint.get("heatmap-opacity")}};function os($t,z){let ht=Math.pow(2,z.canonical.z),Et=z.canonical.y;return[new e.Z(0,Et/ht).toLngLat().lat,new e.Z(0,(Et+1)/ht).toLngLat().lat]}let ul=($t,z,ht,Et)=>{let zt=$t.transform;return{u_matrix:Qs($t,z,ht,Et),u_ratio:1/Wn(z,1,zt.zoom),u_device_pixel_ratio:$t.pixelRatio,u_units_to_pixels:[1/zt.pixelsToGLUnits[0],1/zt.pixelsToGLUnits[1]]}},Zo=($t,z,ht,Et,zt)=>e.e(ul($t,z,ht,zt),{u_image:0,u_image_height:Et}),Ks=($t,z,ht,Et,zt)=>{let Ht=$t.transform,ke=cl(z,Ht);return{u_matrix:Qs($t,z,ht,zt),u_texsize:z.imageAtlasTexture.size,u_ratio:1/Wn(z,1,Ht.zoom),u_device_pixel_ratio:$t.pixelRatio,u_image:0,u_scale:[ke,Et.fromScale,Et.toScale],u_fade:Et.t,u_units_to_pixels:[1/Ht.pixelsToGLUnits[0],1/Ht.pixelsToGLUnits[1]]}},ss=($t,z,ht,Et,zt,Ht)=>{let ke=$t.lineAtlas,Fe=cl(z,$t.transform),Ke=ht.layout.get("line-cap")==="round",vr=ke.getDash(Et.from,Ke),Dr=ke.getDash(Et.to,Ke),Fr=vr.width*zt.fromScale,un=Dr.width*zt.toScale;return e.e(ul($t,z,ht,Ht),{u_patternscale_a:[Fe/Fr,-vr.height/2],u_patternscale_b:[Fe/un,-Dr.height/2],u_sdfgamma:ke.width/(256*Math.min(Fr,un)*$t.pixelRatio)/2,u_image:0,u_tex_y_a:vr.y,u_tex_y_b:Dr.y,u_mix:zt.t})};function cl($t,z){return 1/Wn($t,1,z.tileZoom)}function Qs($t,z,ht,Et){return $t.translatePosMatrix(Et?Et.posMatrix:z.tileID.posMatrix,z,ht.paint.get("line-translate"),ht.paint.get("line-translate-anchor"))}let Nl=($t,z,ht,Et,zt)=>{return{u_matrix:$t,u_tl_parent:z,u_scale_parent:ht,u_buffer_scale:1,u_fade_t:Et.mix,u_opacity:Et.opacity*zt.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:zt.paint.get("raster-brightness-min"),u_brightness_high:zt.paint.get("raster-brightness-max"),u_saturation_factor:(ke=zt.paint.get("raster-saturation"),ke>0?1-1/(1.001-ke):-ke),u_contrast_factor:(Ht=zt.paint.get("raster-contrast"),Ht>0?1/(1-Ht):1+Ht),u_spin_weights:cs(zt.paint.get("raster-hue-rotate"))};var Ht,ke};function cs($t){$t*=Math.PI/180;let z=Math.sin($t),ht=Math.cos($t);return[(2*ht+1)/3,(-Math.sqrt(3)*z-ht+1)/3,(Math.sqrt(3)*z-ht+1)/3]}let Ps=($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn)=>{let Xt=ke.transform;return{u_is_size_zoom_constant:+($t==="constant"||$t==="source"),u_is_size_feature_constant:+($t==="constant"||$t==="camera"),u_size_t:z?z.uSizeT:0,u_size:z?z.uSize:0,u_camera_to_center_distance:Xt.cameraToCenterDistance,u_pitch:Xt.pitch/360*2*Math.PI,u_rotate_symbol:+ht,u_aspect_ratio:Xt.width/Xt.height,u_fade_change:ke.options.fadeDuration?ke.symbolFadeChange:1,u_matrix:Fe,u_label_plane_matrix:Ke,u_coord_matrix:vr,u_is_text:+Fr,u_pitch_with_map:+Et,u_is_along_line:zt,u_is_variable_anchor:Ht,u_texsize:un,u_texture:0,u_translation:Dr,u_pitched_scale:Sn}},Lo=($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn,Xt)=>{let ae=ke.transform;return e.e(Ps($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Xt),{u_gamma_scale:Et?Math.cos(ae._pitch)*ae.cameraToCenterDistance:1,u_device_pixel_ratio:ke.pixelRatio,u_is_halo:1})},As=($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,Fr,un,Sn)=>e.e(Lo($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr,Dr,!0,Fr,!0,Sn),{u_texsize_icon:un,u_texture_icon:1}),kl=($t,z,ht)=>({u_matrix:$t,u_opacity:z,u_color:ht}),ql=($t,z,ht,Et,zt,Ht)=>e.e(function(ke,Fe,Ke,vr){let Dr=Ke.imageManager.getPattern(ke.from.toString()),Fr=Ke.imageManager.getPattern(ke.to.toString()),{width:un,height:Sn}=Ke.imageManager.getPixelSize(),Xt=Math.pow(2,vr.tileID.overscaledZ),ae=vr.tileSize*Math.pow(2,Ke.transform.tileZoom)/Xt,xe=ae*(vr.tileID.canonical.x+vr.tileID.wrap*Xt),Ae=ae*vr.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Dr.tl,u_pattern_br_a:Dr.br,u_pattern_tl_b:Fr.tl,u_pattern_br_b:Fr.br,u_texsize:[un,Sn],u_mix:Fe.t,u_pattern_size_a:Dr.displaySize,u_pattern_size_b:Fr.displaySize,u_scale_a:Fe.fromScale,u_scale_b:Fe.toScale,u_tile_units_to_pixels:1/Wn(vr,1,Ke.transform.tileZoom),u_pixel_coord_upper:[xe>>16,Ae>>16],u_pixel_coord_lower:[65535&xe,65535&Ae]}}(Et,Ht,ht,zt),{u_matrix:$t,u_opacity:z}),Jl={fillExtrusion:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_lightpos:new e.aN($t,z.u_lightpos),u_lightintensity:new e.aI($t,z.u_lightintensity),u_lightcolor:new e.aN($t,z.u_lightcolor),u_vertical_gradient:new e.aI($t,z.u_vertical_gradient),u_opacity:new e.aI($t,z.u_opacity)}),fillExtrusionPattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_lightpos:new e.aN($t,z.u_lightpos),u_lightintensity:new e.aI($t,z.u_lightintensity),u_lightcolor:new e.aN($t,z.u_lightcolor),u_vertical_gradient:new e.aI($t,z.u_vertical_gradient),u_height_factor:new e.aI($t,z.u_height_factor),u_image:new e.aH($t,z.u_image),u_texsize:new e.aO($t,z.u_texsize),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade),u_opacity:new e.aI($t,z.u_opacity)}),fill:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix)}),fillPattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_image:new e.aH($t,z.u_image),u_texsize:new e.aO($t,z.u_texsize),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade)}),fillOutline:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_world:new e.aO($t,z.u_world)}),fillOutlinePattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_world:new e.aO($t,z.u_world),u_image:new e.aH($t,z.u_image),u_texsize:new e.aO($t,z.u_texsize),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade)}),circle:($t,z)=>({u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_scale_with_map:new e.aH($t,z.u_scale_with_map),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_extrude_scale:new e.aO($t,z.u_extrude_scale),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_matrix:new e.aJ($t,z.u_matrix)}),collisionBox:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_pixel_extrude_scale:new e.aO($t,z.u_pixel_extrude_scale)}),collisionCircle:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_inv_matrix:new e.aJ($t,z.u_inv_matrix),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_viewport_size:new e.aO($t,z.u_viewport_size)}),debug:($t,z)=>({u_color:new e.aL($t,z.u_color),u_matrix:new e.aJ($t,z.u_matrix),u_overlay:new e.aH($t,z.u_overlay),u_overlay_scale:new e.aI($t,z.u_overlay_scale)}),clippingMask:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix)}),heatmap:($t,z)=>({u_extrude_scale:new e.aI($t,z.u_extrude_scale),u_intensity:new e.aI($t,z.u_intensity),u_matrix:new e.aJ($t,z.u_matrix)}),heatmapTexture:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_world:new e.aO($t,z.u_world),u_image:new e.aH($t,z.u_image),u_color_ramp:new e.aH($t,z.u_color_ramp),u_opacity:new e.aI($t,z.u_opacity)}),hillshade:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_image:new e.aH($t,z.u_image),u_latrange:new e.aO($t,z.u_latrange),u_light:new e.aO($t,z.u_light),u_shadow:new e.aL($t,z.u_shadow),u_highlight:new e.aL($t,z.u_highlight),u_accent:new e.aL($t,z.u_accent)}),hillshadePrepare:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_image:new e.aH($t,z.u_image),u_dimension:new e.aO($t,z.u_dimension),u_zoom:new e.aI($t,z.u_zoom),u_unpack:new e.aK($t,z.u_unpack)}),line:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels)}),lineGradient:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels),u_image:new e.aH($t,z.u_image),u_image_height:new e.aI($t,z.u_image_height)}),linePattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_texsize:new e.aO($t,z.u_texsize),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_image:new e.aH($t,z.u_image),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels),u_scale:new e.aN($t,z.u_scale),u_fade:new e.aI($t,z.u_fade)}),lineSDF:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ratio:new e.aI($t,z.u_ratio),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_units_to_pixels:new e.aO($t,z.u_units_to_pixels),u_patternscale_a:new e.aO($t,z.u_patternscale_a),u_patternscale_b:new e.aO($t,z.u_patternscale_b),u_sdfgamma:new e.aI($t,z.u_sdfgamma),u_image:new e.aH($t,z.u_image),u_tex_y_a:new e.aI($t,z.u_tex_y_a),u_tex_y_b:new e.aI($t,z.u_tex_y_b),u_mix:new e.aI($t,z.u_mix)}),raster:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_tl_parent:new e.aO($t,z.u_tl_parent),u_scale_parent:new e.aI($t,z.u_scale_parent),u_buffer_scale:new e.aI($t,z.u_buffer_scale),u_fade_t:new e.aI($t,z.u_fade_t),u_opacity:new e.aI($t,z.u_opacity),u_image0:new e.aH($t,z.u_image0),u_image1:new e.aH($t,z.u_image1),u_brightness_low:new e.aI($t,z.u_brightness_low),u_brightness_high:new e.aI($t,z.u_brightness_high),u_saturation_factor:new e.aI($t,z.u_saturation_factor),u_contrast_factor:new e.aI($t,z.u_contrast_factor),u_spin_weights:new e.aN($t,z.u_spin_weights)}),symbolIcon:($t,z)=>({u_is_size_zoom_constant:new e.aH($t,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH($t,z.u_is_size_feature_constant),u_size_t:new e.aI($t,z.u_size_t),u_size:new e.aI($t,z.u_size),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_pitch:new e.aI($t,z.u_pitch),u_rotate_symbol:new e.aH($t,z.u_rotate_symbol),u_aspect_ratio:new e.aI($t,z.u_aspect_ratio),u_fade_change:new e.aI($t,z.u_fade_change),u_matrix:new e.aJ($t,z.u_matrix),u_label_plane_matrix:new e.aJ($t,z.u_label_plane_matrix),u_coord_matrix:new e.aJ($t,z.u_coord_matrix),u_is_text:new e.aH($t,z.u_is_text),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_is_along_line:new e.aH($t,z.u_is_along_line),u_is_variable_anchor:new e.aH($t,z.u_is_variable_anchor),u_texsize:new e.aO($t,z.u_texsize),u_texture:new e.aH($t,z.u_texture),u_translation:new e.aO($t,z.u_translation),u_pitched_scale:new e.aI($t,z.u_pitched_scale)}),symbolSDF:($t,z)=>({u_is_size_zoom_constant:new e.aH($t,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH($t,z.u_is_size_feature_constant),u_size_t:new e.aI($t,z.u_size_t),u_size:new e.aI($t,z.u_size),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_pitch:new e.aI($t,z.u_pitch),u_rotate_symbol:new e.aH($t,z.u_rotate_symbol),u_aspect_ratio:new e.aI($t,z.u_aspect_ratio),u_fade_change:new e.aI($t,z.u_fade_change),u_matrix:new e.aJ($t,z.u_matrix),u_label_plane_matrix:new e.aJ($t,z.u_label_plane_matrix),u_coord_matrix:new e.aJ($t,z.u_coord_matrix),u_is_text:new e.aH($t,z.u_is_text),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_is_along_line:new e.aH($t,z.u_is_along_line),u_is_variable_anchor:new e.aH($t,z.u_is_variable_anchor),u_texsize:new e.aO($t,z.u_texsize),u_texture:new e.aH($t,z.u_texture),u_gamma_scale:new e.aI($t,z.u_gamma_scale),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_is_halo:new e.aH($t,z.u_is_halo),u_translation:new e.aO($t,z.u_translation),u_pitched_scale:new e.aI($t,z.u_pitched_scale)}),symbolTextAndIcon:($t,z)=>({u_is_size_zoom_constant:new e.aH($t,z.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH($t,z.u_is_size_feature_constant),u_size_t:new e.aI($t,z.u_size_t),u_size:new e.aI($t,z.u_size),u_camera_to_center_distance:new e.aI($t,z.u_camera_to_center_distance),u_pitch:new e.aI($t,z.u_pitch),u_rotate_symbol:new e.aH($t,z.u_rotate_symbol),u_aspect_ratio:new e.aI($t,z.u_aspect_ratio),u_fade_change:new e.aI($t,z.u_fade_change),u_matrix:new e.aJ($t,z.u_matrix),u_label_plane_matrix:new e.aJ($t,z.u_label_plane_matrix),u_coord_matrix:new e.aJ($t,z.u_coord_matrix),u_is_text:new e.aH($t,z.u_is_text),u_pitch_with_map:new e.aH($t,z.u_pitch_with_map),u_is_along_line:new e.aH($t,z.u_is_along_line),u_is_variable_anchor:new e.aH($t,z.u_is_variable_anchor),u_texsize:new e.aO($t,z.u_texsize),u_texsize_icon:new e.aO($t,z.u_texsize_icon),u_texture:new e.aH($t,z.u_texture),u_texture_icon:new e.aH($t,z.u_texture_icon),u_gamma_scale:new e.aI($t,z.u_gamma_scale),u_device_pixel_ratio:new e.aI($t,z.u_device_pixel_ratio),u_is_halo:new e.aH($t,z.u_is_halo),u_translation:new e.aO($t,z.u_translation),u_pitched_scale:new e.aI($t,z.u_pitched_scale)}),background:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_opacity:new e.aI($t,z.u_opacity),u_color:new e.aL($t,z.u_color)}),backgroundPattern:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_opacity:new e.aI($t,z.u_opacity),u_image:new e.aH($t,z.u_image),u_pattern_tl_a:new e.aO($t,z.u_pattern_tl_a),u_pattern_br_a:new e.aO($t,z.u_pattern_br_a),u_pattern_tl_b:new e.aO($t,z.u_pattern_tl_b),u_pattern_br_b:new e.aO($t,z.u_pattern_br_b),u_texsize:new e.aO($t,z.u_texsize),u_mix:new e.aI($t,z.u_mix),u_pattern_size_a:new e.aO($t,z.u_pattern_size_a),u_pattern_size_b:new e.aO($t,z.u_pattern_size_b),u_scale_a:new e.aI($t,z.u_scale_a),u_scale_b:new e.aI($t,z.u_scale_b),u_pixel_coord_upper:new e.aO($t,z.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO($t,z.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aI($t,z.u_tile_units_to_pixels)}),terrain:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_texture:new e.aH($t,z.u_texture),u_ele_delta:new e.aI($t,z.u_ele_delta),u_fog_matrix:new e.aJ($t,z.u_fog_matrix),u_fog_color:new e.aL($t,z.u_fog_color),u_fog_ground_blend:new e.aI($t,z.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.aI($t,z.u_fog_ground_blend_opacity),u_horizon_color:new e.aL($t,z.u_horizon_color),u_horizon_fog_blend:new e.aI($t,z.u_horizon_fog_blend)}),terrainDepth:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_ele_delta:new e.aI($t,z.u_ele_delta)}),terrainCoords:($t,z)=>({u_matrix:new e.aJ($t,z.u_matrix),u_texture:new e.aH($t,z.u_texture),u_terrain_coords_id:new e.aI($t,z.u_terrain_coords_id),u_ele_delta:new e.aI($t,z.u_ele_delta)}),sky:($t,z)=>({u_sky_color:new e.aL($t,z.u_sky_color),u_horizon_color:new e.aL($t,z.u_horizon_color),u_horizon:new e.aI($t,z.u_horizon),u_sky_horizon_blend:new e.aI($t,z.u_sky_horizon_blend)})};class Us{constructor(z,ht,Et){this.context=z;let zt=z.gl;this.buffer=zt.createBuffer(),this.dynamicDraw=!!Et,this.context.unbindVAO(),z.bindElementBuffer.set(this.buffer),zt.bufferData(zt.ELEMENT_ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?zt.DYNAMIC_DRAW:zt.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(z){let ht=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ht.bufferSubData(ht.ELEMENT_ARRAY_BUFFER,0,z.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Pa={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class fo{constructor(z,ht,Et,zt){this.length=ht.length,this.attributes=Et,this.itemSize=ht.bytesPerElement,this.dynamicDraw=zt,this.context=z;let Ht=z.gl;this.buffer=Ht.createBuffer(),z.bindVertexBuffer.set(this.buffer),Ht.bufferData(Ht.ARRAY_BUFFER,ht.arrayBuffer,this.dynamicDraw?Ht.DYNAMIC_DRAW:Ht.STATIC_DRAW),this.dynamicDraw||delete ht.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(z){if(z.length!==this.length)throw new Error(`Length of new data is ${z.length}, which doesn't match current length of ${this.length}`);let ht=this.context.gl;this.bind(),ht.bufferSubData(ht.ARRAY_BUFFER,0,z.arrayBuffer)}enableAttributes(z,ht){for(let Et=0;Et0){let Or=e.H();e.aQ(Or,Oe.placementInvProjMatrix,$t.transform.glCoordMatrix),e.aQ(Or,Or,Oe.placementViewportMatrix),Ke.push({circleArray:wr,circleOffset:Dr,transform:je.posMatrix,invTransform:Or,coord:je}),vr+=wr.length/4,Dr=vr}$e&&Fe.draw(Ht,ke.LINES,tl.disabled,Ll.disabled,$t.colorModeForRenderPass(),Qo.disabled,{u_matrix:je.posMatrix,u_pixel_extrude_scale:[1/(Fr=$t.transform).width,1/Fr.height]},$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(je),ht.id,$e.layoutVertexBuffer,$e.indexBuffer,$e.segments,null,$t.transform.zoom,null,null,$e.collisionVertexBuffer)}var Fr;if(!zt||!Ke.length)return;let un=$t.useProgram("collisionCircle"),Sn=new e.aR;Sn.resize(4*vr),Sn._trim();let Xt=0;for(let Ae of Ke)for(let je=0;je=0&&(Ae[Oe.associatedIconIndex]={shiftedAnchor:so,angle:Bo})}else Ar(Oe.numGlyphs,ae)}if(vr){xe.clear();let je=$t.icon.placedSymbolArray;for(let Oe=0;Oe$t.style.map.terrain.getElevation(Nn,On,Hi):null,zn=ht.layout.get("text-rotation-alignment")==="map";Ct(Ui,Nn.posMatrix,$t,zt,dc,At,Ae,vr,zn,ae,Nn.toUnwrapped(),Xt.width,Xt.height,Ut,xn)}let Pe=Nn.posMatrix,Ne=zt&&en||Me,sr=je||Ne?rc:dc,ar=$c,Er=Ta&&ht.paint.get(zt?"text-halo-width":"icon-halo-width").constantOr(1)!==0,rn;rn=Ta?Ui.iconsInText?As(so.kind,ds,Oe,Ae,je,Ne,$t,Pe,sr,ar,Ut,vl,gu,In):Lo(so.kind,ds,Oe,Ae,je,Ne,$t,Pe,sr,ar,Ut,zt,vl,!0,In):Ps(so.kind,ds,Oe,Ae,je,Ne,$t,Pe,sr,ar,Ut,zt,vl,In);let Jr={program:So,buffers:pa,uniformValues:rn,atlasTexture:Ds,atlasTextureIcon:$s,atlasInterpolation:wl,atlasInterpolationIcon:Eu,isSDF:Ta,hasHalo:Er};if(wr&&Ui.canOverlap){Or=!0;let xn=pa.segments.get();for(let zn of xn)vn.push({segments:new e.a0([zn]),sortKey:zn.sortKey,state:Jr,terrainData:fl})}else vn.push({segments:pa.segments,sortKey:0,state:Jr,terrainData:fl})}Or&&vn.sort((Nn,ii)=>Nn.sortKey-ii.sortKey);for(let Nn of vn){let ii=Nn.state;if(un.activeTexture.set(Sn.TEXTURE0),ii.atlasTexture.bind(ii.atlasInterpolation,Sn.CLAMP_TO_EDGE),ii.atlasTextureIcon&&(un.activeTexture.set(Sn.TEXTURE1),ii.atlasTextureIcon&&ii.atlasTextureIcon.bind(ii.atlasInterpolationIcon,Sn.CLAMP_TO_EDGE)),ii.isSDF){let Ui=ii.uniformValues;ii.hasHalo&&(Ui.u_is_halo=1,Zf(ii.buffers,Nn.segments,ht,$t,ii.program,Nr,Dr,Fr,Ui,Nn.terrainData)),Ui.u_is_halo=0}Zf(ii.buffers,Nn.segments,ht,$t,ii.program,Nr,Dr,Fr,ii.uniformValues,Nn.terrainData)}}function Zf($t,z,ht,Et,zt,Ht,ke,Fe,Ke,vr){let Dr=Et.context;zt.draw(Dr,Dr.gl.TRIANGLES,Ht,ke,Fe,Qo.disabled,Ke,vr,ht.id,$t.layoutVertexBuffer,$t.indexBuffer,z,ht.paint,Et.transform.zoom,$t.programConfigurations.get(ht.id),$t.dynamicLayoutVertexBuffer,$t.opacityVertexBuffer)}function xf($t,z,ht,Et){let zt=$t.context,Ht=zt.gl,ke=Ll.disabled,Fe=new _u([Ht.ONE,Ht.ONE],e.aM.transparent,[!0,!0,!0,!0]),Ke=z.getBucket(ht);if(!Ke)return;let vr=Et.key,Dr=ht.heatmapFbos.get(vr);Dr||(Dr=Uf(zt,z.tileSize,z.tileSize),ht.heatmapFbos.set(vr,Dr)),zt.bindFramebuffer.set(Dr.framebuffer),zt.viewport.set([0,0,z.tileSize,z.tileSize]),zt.clear({color:e.aM.transparent});let Fr=Ke.programConfigurations.get(ht.id),un=$t.useProgram("heatmap",Fr),Sn=$t.style.map.terrain.getTerrainData(Et);un.draw(zt,Ht.TRIANGLES,tl.disabled,ke,Fe,Qo.disabled,Da(Et.posMatrix,z,$t.transform.zoom,ht.paint.get("heatmap-intensity")),Sn,ht.id,Ke.layoutVertexBuffer,Ke.indexBuffer,Ke.segments,ht.paint,$t.transform.zoom,Fr)}function Hh($t,z,ht){let Et=$t.context,zt=Et.gl;Et.setColorMode($t.colorModeForRenderPass());let Ht=Vf(Et,z),ke=ht.key,Fe=z.heatmapFbos.get(ke);Fe&&(Et.activeTexture.set(zt.TEXTURE0),zt.bindTexture(zt.TEXTURE_2D,Fe.colorAttachment.get()),Et.activeTexture.set(zt.TEXTURE1),Ht.bind(zt.LINEAR,zt.CLAMP_TO_EDGE),$t.useProgram("heatmapTexture").draw(Et,zt.TRIANGLES,tl.disabled,Ll.disabled,$t.colorModeForRenderPass(),Qo.disabled,ys($t,z,0,1),null,z.id,$t.rasterBoundsBuffer,$t.quadTriangleIndexBuffer,$t.rasterBoundsSegments,z.paint,$t.transform.zoom),Fe.destroy(),z.heatmapFbos.delete(ke))}function Uf($t,z,ht){var Et,zt;let Ht=$t.gl,ke=Ht.createTexture();Ht.bindTexture(Ht.TEXTURE_2D,ke),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_S,Ht.CLAMP_TO_EDGE),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_WRAP_T,Ht.CLAMP_TO_EDGE),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MIN_FILTER,Ht.LINEAR),Ht.texParameteri(Ht.TEXTURE_2D,Ht.TEXTURE_MAG_FILTER,Ht.LINEAR);let Fe=(Et=$t.HALF_FLOAT)!==null&&Et!==void 0?Et:Ht.UNSIGNED_BYTE,Ke=(zt=$t.RGBA16F)!==null&&zt!==void 0?zt:Ht.RGBA;Ht.texImage2D(Ht.TEXTURE_2D,0,Ke,z,ht,0,Ht.RGBA,Fe,null);let vr=$t.createFramebuffer(z,ht,!1,!1);return vr.colorAttachment.set(ke),vr}function Vf($t,z){return z.colorRampTexture||(z.colorRampTexture=new p($t,z.colorRamp,$t.gl.RGBA)),z.colorRampTexture}function lh($t,z,ht,Et,zt){if(!ht||!Et||!Et.imageAtlas)return;let Ht=Et.imageAtlas.patternPositions,ke=Ht[ht.to.toString()],Fe=Ht[ht.from.toString()];if(!ke&&Fe&&(ke=Fe),!Fe&&ke&&(Fe=ke),!ke||!Fe){let Ke=zt.getPaintProperty(z);ke=Ht[Ke],Fe=Ht[Ke]}ke&&Fe&&$t.setConstantPatternPositions(ke,Fe)}function Gf($t,z,ht,Et,zt,Ht,ke){let Fe=$t.context.gl,Ke="fill-pattern",vr=ht.paint.get(Ke),Dr=vr&&vr.constantOr(1),Fr=ht.getCrossfadeParameters(),un,Sn,Xt,ae,xe;ke?(Sn=Dr&&!ht.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",un=Fe.LINES):(Sn=Dr?"fillPattern":"fill",un=Fe.TRIANGLES);let Ae=vr.constantOr(null);for(let je of Et){let Oe=z.getTile(je);if(Dr&&!Oe.patternsLoaded())continue;let $e=Oe.getBucket(ht);if(!$e)continue;let wr=$e.programConfigurations.get(ht.id),Or=$t.useProgram(Sn,wr),Nr=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(je);Dr&&($t.context.activeTexture.set(Fe.TEXTURE0),Oe.imageAtlasTexture.bind(Fe.LINEAR,Fe.CLAMP_TO_EDGE),wr.updatePaintBuffers(Fr)),lh(wr,Ke,Ae,Oe,ht);let en=Nr?je:null,vn=$t.translatePosMatrix(en?en.posMatrix:je.posMatrix,Oe,ht.paint.get("fill-translate"),ht.paint.get("fill-translate-anchor"));if(ke){ae=$e.indexBuffer2,xe=$e.segments2;let In=[Fe.drawingBufferWidth,Fe.drawingBufferHeight];Xt=Sn==="fillOutlinePattern"&&Dr?Qa(vn,$t,Fr,Oe,In):Vi(vn,In)}else ae=$e.indexBuffer,xe=$e.segments,Xt=Dr?La(vn,$t,Fr,Oe):Zn(vn);Or.draw($t.context,un,zt,$t.stencilModeForClipping(je),Ht,Qo.disabled,Xt,Nr,ht.id,$e.layoutVertexBuffer,ae,xe,ht.paint,$t.transform.zoom,wr)}}function Eh($t,z,ht,Et,zt,Ht,ke){let Fe=$t.context,Ke=Fe.gl,vr="fill-extrusion-pattern",Dr=ht.paint.get(vr),Fr=Dr.constantOr(1),un=ht.getCrossfadeParameters(),Sn=ht.paint.get("fill-extrusion-opacity"),Xt=Dr.constantOr(null);for(let ae of Et){let xe=z.getTile(ae),Ae=xe.getBucket(ht);if(!Ae)continue;let je=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(ae),Oe=Ae.programConfigurations.get(ht.id),$e=$t.useProgram(Fr?"fillExtrusionPattern":"fillExtrusion",Oe);Fr&&($t.context.activeTexture.set(Ke.TEXTURE0),xe.imageAtlasTexture.bind(Ke.LINEAR,Ke.CLAMP_TO_EDGE),Oe.updatePaintBuffers(un)),lh(Oe,vr,Xt,xe,ht);let wr=$t.translatePosMatrix(ae.posMatrix,xe,ht.paint.get("fill-extrusion-translate"),ht.paint.get("fill-extrusion-translate-anchor")),Or=ht.paint.get("fill-extrusion-vertical-gradient"),Nr=Fr?En(wr,$t,Or,Sn,ae,un,xe):Pn(wr,$t,Or,Sn);$e.draw(Fe,Fe.gl.TRIANGLES,zt,Ht,ke,Qo.backCCW,Nr,je,ht.id,Ae.layoutVertexBuffer,Ae.indexBuffer,Ae.segments,ht.paint,$t.transform.zoom,Oe,$t.style.map.terrain&&Ae.centroidVertexBuffer)}}function gh($t,z,ht,Et,zt,Ht,ke){let Fe=$t.context,Ke=Fe.gl,vr=ht.fbo;if(!vr)return;let Dr=$t.useProgram("hillshade"),Fr=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(z);Fe.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,vr.colorAttachment.get()),Dr.draw(Fe,Ke.TRIANGLES,zt,Ht,ke,Qo.disabled,((un,Sn,Xt,ae)=>{let xe=Xt.paint.get("hillshade-shadow-color"),Ae=Xt.paint.get("hillshade-highlight-color"),je=Xt.paint.get("hillshade-accent-color"),Oe=Xt.paint.get("hillshade-illumination-direction")*(Math.PI/180);Xt.paint.get("hillshade-illumination-anchor")==="viewport"&&(Oe-=un.transform.angle);let $e=!un.options.moving;return{u_matrix:ae?ae.posMatrix:un.transform.calculatePosMatrix(Sn.tileID.toUnwrapped(),$e),u_image:0,u_latrange:os(0,Sn.tileID),u_light:[Xt.paint.get("hillshade-exaggeration"),Oe],u_shadow:xe,u_highlight:Ae,u_accent:je}})($t,ht,Et,Fr?z:null),Fr,Et.id,$t.rasterBoundsBuffer,$t.quadTriangleIndexBuffer,$t.rasterBoundsSegments)}function uc($t,z,ht,Et,zt,Ht){let ke=$t.context,Fe=ke.gl,Ke=z.dem;if(Ke&&Ke.data){let vr=Ke.dim,Dr=Ke.stride,Fr=Ke.getPixels();if(ke.activeTexture.set(Fe.TEXTURE1),ke.pixelStoreUnpackPremultiplyAlpha.set(!1),z.demTexture=z.demTexture||$t.getTileTexture(Dr),z.demTexture){let Sn=z.demTexture;Sn.update(Fr,{premultiply:!1}),Sn.bind(Fe.NEAREST,Fe.CLAMP_TO_EDGE)}else z.demTexture=new p(ke,Fr,Fe.RGBA,{premultiply:!1}),z.demTexture.bind(Fe.NEAREST,Fe.CLAMP_TO_EDGE);ke.activeTexture.set(Fe.TEXTURE0);let un=z.fbo;if(!un){let Sn=new p(ke,{width:vr,height:vr,data:null},Fe.RGBA);Sn.bind(Fe.LINEAR,Fe.CLAMP_TO_EDGE),un=z.fbo=ke.createFramebuffer(vr,vr,!0,!1),un.colorAttachment.set(Sn.texture)}ke.bindFramebuffer.set(un.framebuffer),ke.viewport.set([0,0,vr,vr]),$t.useProgram("hillshadePrepare").draw(ke,Fe.TRIANGLES,Et,zt,Ht,Qo.disabled,((Sn,Xt)=>{let ae=Xt.stride,xe=e.H();return e.aP(xe,0,e.X,-e.X,0,0,1),e.J(xe,xe,[0,-e.X,0]),{u_matrix:xe,u_image:1,u_dimension:[ae,ae],u_zoom:Sn.overscaledZ,u_unpack:Xt.getUnpackVector()}})(z.tileID,Ke),null,ht.id,$t.rasterBoundsBuffer,$t.quadTriangleIndexBuffer,$t.rasterBoundsSegments),z.needsHillshadePrepare=!1}}function rf($t,z,ht,Et,zt,Ht){let ke=Et.paint.get("raster-fade-duration");if(!Ht&&ke>0){let Fe=o.now(),Ke=(Fe-$t.timeAdded)/ke,vr=z?(Fe-z.timeAdded)/ke:-1,Dr=ht.getSource(),Fr=zt.coveringZoomLevel({tileSize:Dr.tileSize,roundZoom:Dr.roundZoom}),un=!z||Math.abs(z.tileID.overscaledZ-Fr)>Math.abs($t.tileID.overscaledZ-Fr),Sn=un&&$t.refreshedUponExpiration?1:e.ac(un?Ke:1-vr,0,1);return $t.refreshedUponExpiration&&Ke>=1&&($t.refreshedUponExpiration=!1),z?{opacity:1,mix:1-Sn}:{opacity:Sn,mix:0}}return{opacity:1,mix:0}}let Hf=new e.aM(1,0,0,1),eu=new e.aM(0,1,0,1),Ef=new e.aM(0,0,1,1),Cd=new e.aM(1,0,1,1),Yf=new e.aM(0,1,1,1);function _f($t,z,ht,Et){Nc($t,0,z+ht/2,$t.transform.width,ht,Et)}function Kf($t,z,ht,Et){Nc($t,z-ht/2,0,ht,$t.transform.height,Et)}function Nc($t,z,ht,Et,zt,Ht){let ke=$t.context,Fe=ke.gl;Fe.enable(Fe.SCISSOR_TEST),Fe.scissor(z*$t.pixelRatio,ht*$t.pixelRatio,Et*$t.pixelRatio,zt*$t.pixelRatio),ke.clear({color:Ht}),Fe.disable(Fe.SCISSOR_TEST)}function Xf($t,z,ht){let Et=$t.context,zt=Et.gl,Ht=ht.posMatrix,ke=$t.useProgram("debug"),Fe=tl.disabled,Ke=Ll.disabled,vr=$t.colorModeForRenderPass(),Dr="$debug",Fr=$t.style.map.terrain&&$t.style.map.terrain.getTerrainData(ht);Et.activeTexture.set(zt.TEXTURE0);let un=z.getTileByID(ht.key).latestRawTileData,Sn=Math.floor((un&&un.byteLength||0)/1024),Xt=z.getTile(ht).tileSize,ae=512/Math.min(Xt,512)*(ht.overscaledZ/$t.transform.zoom)*.5,xe=ht.canonical.toString();ht.overscaledZ!==ht.canonical.z&&(xe+=` => ${ht.overscaledZ}`),function(Ae,je){Ae.initDebugOverlayCanvas();let Oe=Ae.debugOverlayCanvas,$e=Ae.context.gl,wr=Ae.debugOverlayCanvas.getContext("2d");wr.clearRect(0,0,Oe.width,Oe.height),wr.shadowColor="white",wr.shadowBlur=2,wr.lineWidth=1.5,wr.strokeStyle="white",wr.textBaseline="top",wr.font="bold 36px Open Sans, sans-serif",wr.fillText(je,5,5),wr.strokeText(je,5,5),Ae.debugOverlayTexture.update(Oe),Ae.debugOverlayTexture.bind($e.LINEAR,$e.CLAMP_TO_EDGE)}($t,`${xe} ${Sn}kB`),ke.draw(Et,zt.TRIANGLES,Fe,Ke,_u.alphaBlended,Qo.disabled,yo(Ht,e.aM.transparent,ae),null,Dr,$t.debugBuffer,$t.quadTriangleIndexBuffer,$t.debugSegments),ke.draw(Et,zt.LINE_STRIP,Fe,Ke,vr,Qo.disabled,yo(Ht,e.aM.red),Fr,Dr,$t.debugBuffer,$t.tileBorderIndexBuffer,$t.debugSegments)}function Ou($t,z,ht){let Et=$t.context,zt=Et.gl,Ht=$t.colorModeForRenderPass(),ke=new tl(zt.LEQUAL,tl.ReadWrite,$t.depthRangeFor3D),Fe=$t.useProgram("terrain"),Ke=z.getTerrainMesh();Et.bindFramebuffer.set(null),Et.viewport.set([0,0,$t.width,$t.height]);for(let vr of ht){let Dr=$t.renderToTexture.getTexture(vr),Fr=z.getTerrainData(vr.tileID);Et.activeTexture.set(zt.TEXTURE0),zt.bindTexture(zt.TEXTURE_2D,Dr.texture);let un=$t.transform.calculatePosMatrix(vr.tileID.toUnwrapped()),Sn=z.getMeshFrameDelta($t.transform.zoom),Xt=$t.transform.calculateFogMatrix(vr.tileID.toUnwrapped()),ae=Hr(un,Sn,Xt,$t.style.sky,$t.transform.pitch);Fe.draw(Et,zt.TRIANGLES,ke,Ll.disabled,Ht,Qo.backCCW,ae,Fr,"terrain",Ke.vertexBuffer,Ke.indexBuffer,Ke.segments)}}class jc{constructor(z,ht,Et){this.vertexBuffer=z,this.indexBuffer=ht,this.segments=Et}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Wh{constructor(z,ht){this.context=new Ed(z),this.transform=ht,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ge.maxUnderzooming+Ge.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $r}resize(z,ht,Et){if(this.width=Math.floor(z*Et),this.height=Math.floor(ht*Et),this.pixelRatio=Et,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let zt of this.style._order)this.style._layers[zt].resize()}setup(){let z=this.context,ht=new e.aX;ht.emplaceBack(0,0),ht.emplaceBack(e.X,0),ht.emplaceBack(0,e.X),ht.emplaceBack(e.X,e.X),this.tileExtentBuffer=z.createVertexBuffer(ht,pn.members),this.tileExtentSegments=e.a0.simpleSegment(0,0,4,2);let Et=new e.aX;Et.emplaceBack(0,0),Et.emplaceBack(e.X,0),Et.emplaceBack(0,e.X),Et.emplaceBack(e.X,e.X),this.debugBuffer=z.createVertexBuffer(Et,pn.members),this.debugSegments=e.a0.simpleSegment(0,0,4,5);let zt=new e.$;zt.emplaceBack(0,0,0,0),zt.emplaceBack(e.X,0,e.X,0),zt.emplaceBack(0,e.X,0,e.X),zt.emplaceBack(e.X,e.X,e.X,e.X),this.rasterBoundsBuffer=z.createVertexBuffer(zt,Jt.members),this.rasterBoundsSegments=e.a0.simpleSegment(0,0,4,2);let Ht=new e.aX;Ht.emplaceBack(0,0),Ht.emplaceBack(1,0),Ht.emplaceBack(0,1),Ht.emplaceBack(1,1),this.viewportBuffer=z.createVertexBuffer(Ht,pn.members),this.viewportSegments=e.a0.simpleSegment(0,0,4,2);let ke=new e.aZ;ke.emplaceBack(0),ke.emplaceBack(1),ke.emplaceBack(3),ke.emplaceBack(2),ke.emplaceBack(0),this.tileBorderIndexBuffer=z.createIndexBuffer(ke);let Fe=new e.aY;Fe.emplaceBack(0,1,2),Fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=z.createIndexBuffer(Fe);let Ke=this.context.gl;this.stencilClearMode=new Ll({func:Ke.ALWAYS,mask:0},0,255,Ke.ZERO,Ke.ZERO,Ke.ZERO)}clearStencil(){let z=this.context,ht=z.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Et=e.H();e.aP(Et,0,this.width,this.height,0,0,1),e.K(Et,Et,[ht.drawingBufferWidth,ht.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(z,ht.TRIANGLES,tl.disabled,this.stencilClearMode,_u.disabled,Qo.disabled,Fo(Et),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(z,ht){if(this.currentStencilSource===z.source||!z.isTileClipped()||!ht||!ht.length)return;this.currentStencilSource=z.source;let Et=this.context,zt=Et.gl;this.nextStencilID+ht.length>256&&this.clearStencil(),Et.setColorMode(_u.disabled),Et.setDepthMode(tl.disabled);let Ht=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ke of ht){let Fe=this._tileClippingMaskIDs[ke.key]=this.nextStencilID++,Ke=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ke);Ht.draw(Et,zt.TRIANGLES,tl.disabled,new Ll({func:zt.ALWAYS,mask:0},Fe,255,zt.KEEP,zt.KEEP,zt.REPLACE),_u.disabled,Qo.disabled,Fo(ke.posMatrix),Ke,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let z=this.nextStencilID++,ht=this.context.gl;return new Ll({func:ht.NOTEQUAL,mask:255},z,255,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilModeForClipping(z){let ht=this.context.gl;return new Ll({func:ht.EQUAL,mask:255},this._tileClippingMaskIDs[z.key],0,ht.KEEP,ht.KEEP,ht.REPLACE)}stencilConfigForOverlap(z){let ht=this.context.gl,Et=z.sort((ke,Fe)=>Fe.overscaledZ-ke.overscaledZ),zt=Et[Et.length-1].overscaledZ,Ht=Et[0].overscaledZ-zt+1;if(Ht>1){this.currentStencilSource=void 0,this.nextStencilID+Ht>256&&this.clearStencil();let ke={};for(let Fe=0;Fe({u_sky_color:Ae.properties.get("sky-color"),u_horizon_color:Ae.properties.get("horizon-color"),u_horizon:(je.height/2+je.getHorizon())*Oe,u_sky_horizon_blend:Ae.properties.get("sky-horizon-blend")*je.height/2*Oe}))(vr,Ke.style.map.transform,Ke.pixelRatio),Sn=new tl(Fr.LEQUAL,tl.ReadWrite,[0,1]),Xt=Ll.disabled,ae=Ke.colorModeForRenderPass(),xe=Ke.useProgram("sky");if(!vr.mesh){let Ae=new e.aX;Ae.emplaceBack(-1,-1),Ae.emplaceBack(1,-1),Ae.emplaceBack(1,1),Ae.emplaceBack(-1,1);let je=new e.aY;je.emplaceBack(0,1,2),je.emplaceBack(0,2,3),vr.mesh=new jc(Dr.createVertexBuffer(Ae,pn.members),Dr.createIndexBuffer(je),e.a0.simpleSegment(0,0,Ae.length,je.length))}xe.draw(Dr,Fr.TRIANGLES,Sn,Xt,ae,Qo.disabled,un,void 0,"sky",vr.mesh.vertexBuffer,vr.mesh.indexBuffer,vr.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ht.showOverdrawInspector,this.depthRangeFor3D=[0,1-(z._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Et.length-1;this.currentLayer>=0;this.currentLayer--){let Ke=this.style._layers[Et[this.currentLayer]],vr=zt[Ke.source],Dr=Ht[Ke.source];this._renderTileClippingMasks(Ke,Dr),this.renderLayer(this,vr,Ke,Dr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerxe.source&&!xe.isHidden(Dr)?[vr.sourceCaches[xe.source]]:[]),Sn=un.filter(xe=>xe.getSource().type==="vector"),Xt=un.filter(xe=>xe.getSource().type!=="vector"),ae=xe=>{(!Fr||Fr.getSource().maxzoomae(xe)),Fr||Xt.forEach(xe=>ae(xe)),Fr}(this.style,this.transform.zoom);Ke&&function(vr,Dr,Fr){for(let un=0;un0),zt&&(e.b0(ht,Et),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Ht,ke){let Fe=Ht.context,Ke=Fe.gl,vr=_u.unblended,Dr=new tl(Ke.LEQUAL,tl.ReadWrite,[0,1]),Fr=ke.getTerrainMesh(),un=ke.sourceCache.getRenderableTiles(),Sn=Ht.useProgram("terrainDepth");Fe.bindFramebuffer.set(ke.getFramebuffer("depth").framebuffer),Fe.viewport.set([0,0,Ht.width/devicePixelRatio,Ht.height/devicePixelRatio]),Fe.clear({color:e.aM.transparent,depth:1});for(let Xt of un){let ae=ke.getTerrainData(Xt.tileID),xe={u_matrix:Ht.transform.calculatePosMatrix(Xt.tileID.toUnwrapped()),u_ele_delta:ke.getMeshFrameDelta(Ht.transform.zoom)};Sn.draw(Fe,Ke.TRIANGLES,Dr,Ll.disabled,vr,Qo.backCCW,xe,ae,"terrain",Fr.vertexBuffer,Fr.indexBuffer,Fr.segments)}Fe.bindFramebuffer.set(null),Fe.viewport.set([0,0,Ht.width,Ht.height])}(this,this.style.map.terrain),function(Ht,ke){let Fe=Ht.context,Ke=Fe.gl,vr=_u.unblended,Dr=new tl(Ke.LEQUAL,tl.ReadWrite,[0,1]),Fr=ke.getTerrainMesh(),un=ke.getCoordsTexture(),Sn=ke.sourceCache.getRenderableTiles(),Xt=Ht.useProgram("terrainCoords");Fe.bindFramebuffer.set(ke.getFramebuffer("coords").framebuffer),Fe.viewport.set([0,0,Ht.width/devicePixelRatio,Ht.height/devicePixelRatio]),Fe.clear({color:e.aM.transparent,depth:1}),ke.coordsIndex=[];for(let ae of Sn){let xe=ke.getTerrainData(ae.tileID);Fe.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,un.texture);let Ae={u_matrix:Ht.transform.calculatePosMatrix(ae.tileID.toUnwrapped()),u_terrain_coords_id:(255-ke.coordsIndex.length)/255,u_texture:0,u_ele_delta:ke.getMeshFrameDelta(Ht.transform.zoom)};Xt.draw(Fe,Ke.TRIANGLES,Dr,Ll.disabled,vr,Qo.backCCW,Ae,xe,"terrain",Fr.vertexBuffer,Fr.indexBuffer,Fr.segments),ke.coordsIndex.push(ae.tileID.key)}Fe.bindFramebuffer.set(null),Fe.viewport.set([0,0,Ht.width,Ht.height])}(this,this.style.map.terrain))}renderLayer(z,ht,Et,zt){if(!Et.isHidden(this.transform.zoom)&&(Et.type==="background"||Et.type==="custom"||(zt||[]).length))switch(this.id=Et.id,Et.type){case"symbol":(function(Ht,ke,Fe,Ke,vr){if(Ht.renderPass!=="translucent")return;let Dr=Ll.disabled,Fr=Ht.colorModeForRenderPass();(Fe._unevaluatedLayout.hasValue("text-variable-anchor")||Fe._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(un,Sn,Xt,ae,xe,Ae,je,Oe,$e){let wr=Sn.transform,Or=Xi(),Nr=xe==="map",en=Ae==="map";for(let vn of un){let In=ae.getTile(vn),Nn=In.getBucket(Xt);if(!Nn||!Nn.text||!Nn.text.segments.get().length)continue;let ii=e.ag(Nn.textSizeData,wr.zoom),Ui=Wn(In,1,Sn.transform.zoom),pa=Xr(vn.posMatrix,en,Nr,Sn.transform,Ui),fa=Xt.layout.get("icon-text-fit")!=="none"&&Nn.hasIconData();if(ii){let Ta=Math.pow(2,wr.zoom-In.tileID.overscaledZ),so=Sn.style.map.terrain?(So,ds)=>Sn.style.map.terrain.getElevation(vn,So,ds):null,Bo=Or.translatePosition(wr,In,je,Oe);yf(Nn,Nr,en,$e,wr,pa,vn.posMatrix,Ta,ii,fa,Or,Bo,vn.toUnwrapped(),so)}}}(Ke,Ht,Fe,ke,Fe.layout.get("text-rotation-alignment"),Fe.layout.get("text-pitch-alignment"),Fe.paint.get("text-translate"),Fe.paint.get("text-translate-anchor"),vr),Fe.paint.get("icon-opacity").constantOr(1)!==0&&hd(Ht,ke,Fe,Ke,!1,Fe.paint.get("icon-translate"),Fe.paint.get("icon-translate-anchor"),Fe.layout.get("icon-rotation-alignment"),Fe.layout.get("icon-pitch-alignment"),Fe.layout.get("icon-keep-upright"),Dr,Fr),Fe.paint.get("text-opacity").constantOr(1)!==0&&hd(Ht,ke,Fe,Ke,!0,Fe.paint.get("text-translate"),Fe.paint.get("text-translate-anchor"),Fe.layout.get("text-rotation-alignment"),Fe.layout.get("text-pitch-alignment"),Fe.layout.get("text-keep-upright"),Dr,Fr),ke.map.showCollisionBoxes&&(sh(Ht,ke,Fe,Ke,!0),sh(Ht,ke,Fe,Ke,!1))})(z,ht,Et,zt,this.style.placement.variableOffsets);break;case"circle":(function(Ht,ke,Fe,Ke){if(Ht.renderPass!=="translucent")return;let vr=Fe.paint.get("circle-opacity"),Dr=Fe.paint.get("circle-stroke-width"),Fr=Fe.paint.get("circle-stroke-opacity"),un=!Fe.layout.get("circle-sort-key").isConstant();if(vr.constantOr(1)===0&&(Dr.constantOr(1)===0||Fr.constantOr(1)===0))return;let Sn=Ht.context,Xt=Sn.gl,ae=Ht.depthModeForSublayer(0,tl.ReadOnly),xe=Ll.disabled,Ae=Ht.colorModeForRenderPass(),je=[];for(let Oe=0;OeOe.sortKey-$e.sortKey);for(let Oe of je){let{programConfiguration:$e,program:wr,layoutVertexBuffer:Or,indexBuffer:Nr,uniformValues:en,terrainData:vn}=Oe.state;wr.draw(Sn,Xt.TRIANGLES,ae,xe,Ae,Qo.disabled,en,vn,Fe.id,Or,Nr,Oe.segments,Fe.paint,Ht.transform.zoom,$e)}})(z,ht,Et,zt);break;case"heatmap":(function(Ht,ke,Fe,Ke){if(Fe.paint.get("heatmap-opacity")===0)return;let vr=Ht.context;if(Ht.style.map.terrain){for(let Dr of Ke){let Fr=ke.getTile(Dr);ke.hasRenderableParent(Dr)||(Ht.renderPass==="offscreen"?xf(Ht,Fr,Fe,Dr):Ht.renderPass==="translucent"&&Hh(Ht,Fe,Dr))}vr.viewport.set([0,0,Ht.width,Ht.height])}else Ht.renderPass==="offscreen"?function(Dr,Fr,un,Sn){let Xt=Dr.context,ae=Xt.gl,xe=Ll.disabled,Ae=new _u([ae.ONE,ae.ONE],e.aM.transparent,[!0,!0,!0,!0]);(function(je,Oe,$e){let wr=je.gl;je.activeTexture.set(wr.TEXTURE1),je.viewport.set([0,0,Oe.width/4,Oe.height/4]);let Or=$e.heatmapFbos.get(e.aU);Or?(wr.bindTexture(wr.TEXTURE_2D,Or.colorAttachment.get()),je.bindFramebuffer.set(Or.framebuffer)):(Or=Uf(je,Oe.width/4,Oe.height/4),$e.heatmapFbos.set(e.aU,Or))})(Xt,Dr,un),Xt.clear({color:e.aM.transparent});for(let je=0;je20&&Dr.texParameterf(Dr.TEXTURE_2D,vr.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,vr.extTextureFilterAnisotropicMax);let Nn=Ht.style.map.terrain&&Ht.style.map.terrain.getTerrainData(je),ii=Nn?je:null,Ui=ii?ii.posMatrix:Ht.transform.calculatePosMatrix(je.toUnwrapped(),Ae),pa=Nl(Ui,vn||[0,0],en||1,Nr,Fe);Fr instanceof ge?un.draw(vr,Dr.TRIANGLES,Oe,Ll.disabled,Sn,Qo.disabled,pa,Nn,Fe.id,Fr.boundsBuffer,Ht.quadTriangleIndexBuffer,Fr.boundsSegments):un.draw(vr,Dr.TRIANGLES,Oe,Xt[je.overscaledZ],Sn,Qo.disabled,pa,Nn,Fe.id,Ht.rasterBoundsBuffer,Ht.quadTriangleIndexBuffer,Ht.rasterBoundsSegments)}})(z,ht,Et,zt);break;case"background":(function(Ht,ke,Fe,Ke){let vr=Fe.paint.get("background-color"),Dr=Fe.paint.get("background-opacity");if(Dr===0)return;let Fr=Ht.context,un=Fr.gl,Sn=Ht.transform,Xt=Sn.tileSize,ae=Fe.paint.get("background-pattern");if(Ht.isPatternMissing(ae))return;let xe=!ae&&vr.a===1&&Dr===1&&Ht.opaquePassEnabledForLayer()?"opaque":"translucent";if(Ht.renderPass!==xe)return;let Ae=Ll.disabled,je=Ht.depthModeForSublayer(0,xe==="opaque"?tl.ReadWrite:tl.ReadOnly),Oe=Ht.colorModeForRenderPass(),$e=Ht.useProgram(ae?"backgroundPattern":"background"),wr=Ke||Sn.coveringTiles({tileSize:Xt,terrain:Ht.style.map.terrain});ae&&(Fr.activeTexture.set(un.TEXTURE0),Ht.imageManager.bind(Ht.context));let Or=Fe.getCrossfadeParameters();for(let Nr of wr){let en=Ke?Nr.posMatrix:Ht.transform.calculatePosMatrix(Nr.toUnwrapped()),vn=ae?ql(en,Dr,Ht,ae,{tileID:Nr,tileSize:Xt},Or):kl(en,Dr,vr),In=Ht.style.map.terrain&&Ht.style.map.terrain.getTerrainData(Nr);$e.draw(Fr,un.TRIANGLES,je,Ae,Oe,Qo.disabled,vn,In,Fe.id,Ht.tileExtentBuffer,Ht.quadTriangleIndexBuffer,Ht.tileExtentSegments)}})(z,0,Et,zt);break;case"custom":(function(Ht,ke,Fe){let Ke=Ht.context,vr=Fe.implementation;if(Ht.renderPass==="offscreen"){let Dr=vr.prerender;Dr&&(Ht.setCustomLayerDefaults(),Ke.setColorMode(Ht.colorModeForRenderPass()),Dr.call(vr,Ke.gl,Ht.transform.customLayerMatrix()),Ke.setDirty(),Ht.setBaseState())}else if(Ht.renderPass==="translucent"){Ht.setCustomLayerDefaults(),Ke.setColorMode(Ht.colorModeForRenderPass()),Ke.setStencilMode(Ll.disabled);let Dr=vr.renderingMode==="3d"?new tl(Ht.context.gl.LEQUAL,tl.ReadWrite,Ht.depthRangeFor3D):Ht.depthModeForSublayer(0,tl.ReadOnly);Ke.setDepthMode(Dr),vr.render(Ke.gl,Ht.transform.customLayerMatrix(),{farZ:Ht.transform.farZ,nearZ:Ht.transform.nearZ,fov:Ht.transform._fov,modelViewProjectionMatrix:Ht.transform.modelViewProjectionMatrix,projectionMatrix:Ht.transform.projectionMatrix}),Ke.setDirty(),Ht.setBaseState(),Ke.bindFramebuffer.set(null)}})(z,0,Et)}}translatePosMatrix(z,ht,Et,zt,Ht){if(!Et[0]&&!Et[1])return z;let ke=Ht?zt==="map"?this.transform.angle:0:zt==="viewport"?-this.transform.angle:0;if(ke){let vr=Math.sin(ke),Dr=Math.cos(ke);Et=[Et[0]*Dr-Et[1]*vr,Et[0]*vr+Et[1]*Dr]}let Fe=[Ht?Et[0]:Wn(ht,Et[0],this.transform.zoom),Ht?Et[1]:Wn(ht,Et[1],this.transform.zoom),0],Ke=new Float32Array(16);return e.J(Ke,z,Fe),Ke}saveTileTexture(z){let ht=this._tileTextures[z.size[0]];ht?ht.push(z):this._tileTextures[z.size[0]]=[z]}getTileTexture(z){let ht=this._tileTextures[z];return ht&&ht.length>0?ht.pop():null}isPatternMissing(z){if(!z)return!1;if(!z.from||!z.to)return!0;let ht=this.imageManager.getPattern(z.from.toString()),Et=this.imageManager.getPattern(z.to.toString());return!ht||!Et}useProgram(z,ht){this.cache=this.cache||{};let Et=z+(ht?ht.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Et]||(this.cache[Et]=new Fn(this.context,on[z],ht,Jl[z],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Et]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let z=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(z.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new p(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:z,drawingBufferHeight:ht}=this.context.gl;return this.width!==z||this.height!==ht}}class hu{constructor(z,ht){this.points=z,this.planes=ht}static fromInvProjectionMatrix(z,ht,Et){let zt=Math.pow(2,Et),Ht=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Fe=>{let Ke=1/(Fe=e.af([],Fe,z))[3]/ht*zt;return e.b1(Fe,Fe,[Ke,Ke,1/Fe[3],Ke])}),ke=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Fe=>{let Ke=function(un,Sn){var Xt=Sn[0],ae=Sn[1],xe=Sn[2],Ae=Xt*Xt+ae*ae+xe*xe;return Ae>0&&(Ae=1/Math.sqrt(Ae)),un[0]=Sn[0]*Ae,un[1]=Sn[1]*Ae,un[2]=Sn[2]*Ae,un}([],function(un,Sn,Xt){var ae=Sn[0],xe=Sn[1],Ae=Sn[2],je=Xt[0],Oe=Xt[1],$e=Xt[2];return un[0]=xe*$e-Ae*Oe,un[1]=Ae*je-ae*$e,un[2]=ae*Oe-xe*je,un}([],M([],Ht[Fe[0]],Ht[Fe[1]]),M([],Ht[Fe[2]],Ht[Fe[1]]))),vr=-((Dr=Ke)[0]*(Fr=Ht[Fe[1]])[0]+Dr[1]*Fr[1]+Dr[2]*Fr[2]);var Dr,Fr;return Ke.concat(vr)});return new hu(Ht,ke)}}class Ch{constructor(z,ht){this.min=z,this.max=ht,this.center=function(Et,zt,Ht){return Et[0]=.5*zt[0],Et[1]=.5*zt[1],Et[2]=.5*zt[2],Et}([],function(Et,zt,Ht){return Et[0]=zt[0]+Ht[0],Et[1]=zt[1]+Ht[1],Et[2]=zt[2]+Ht[2],Et}([],this.min,this.max))}quadrant(z){let ht=[z%2==0,z<2],Et=_(this.min),zt=_(this.max);for(let Ht=0;Ht=0&&ke++;if(ke===0)return 0;ke!==ht.length&&(Et=!1)}if(Et)return 2;for(let zt=0;zt<3;zt++){let Ht=Number.MAX_VALUE,ke=-Number.MAX_VALUE;for(let Fe=0;Fethis.max[zt]-this.min[zt])return 0}return 1}}class Mc{constructor(z=0,ht=0,Et=0,zt=0){if(isNaN(z)||z<0||isNaN(ht)||ht<0||isNaN(Et)||Et<0||isNaN(zt)||zt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=z,this.bottom=ht,this.left=Et,this.right=zt}interpolate(z,ht,Et){return ht.top!=null&&z.top!=null&&(this.top=e.y.number(z.top,ht.top,Et)),ht.bottom!=null&&z.bottom!=null&&(this.bottom=e.y.number(z.bottom,ht.bottom,Et)),ht.left!=null&&z.left!=null&&(this.left=e.y.number(z.left,ht.left,Et)),ht.right!=null&&z.right!=null&&(this.right=e.y.number(z.right,ht.right,Et)),this}getCenter(z,ht){let Et=e.ac((this.left+z-this.right)/2,0,z),zt=e.ac((this.top+ht-this.bottom)/2,0,ht);return new e.P(Et,zt)}equals(z){return this.top===z.top&&this.bottom===z.bottom&&this.left===z.left&&this.right===z.right}clone(){return new Mc(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Uc=85.051129;class bu{constructor(z,ht,Et,zt,Ht){this.tileSize=512,this._renderWorldCopies=Ht===void 0||!!Ht,this._minZoom=z||0,this._maxZoom=ht||22,this._minPitch=Et??0,this._maxPitch=zt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Mc,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let z=new bu(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return z.apply(this),z}apply(z){this.tileSize=z.tileSize,this.latRange=z.latRange,this.lngRange=z.lngRange,this.width=z.width,this.height=z.height,this._center=z._center,this._elevation=z._elevation,this.minElevationForCurrentTile=z.minElevationForCurrentTile,this.zoom=z.zoom,this.angle=z.angle,this._fov=z._fov,this._pitch=z._pitch,this._unmodified=z._unmodified,this._edgeInsets=z._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(z){this._minZoom!==z&&(this._minZoom=z,this.zoom=Math.max(this.zoom,z))}get maxZoom(){return this._maxZoom}set maxZoom(z){this._maxZoom!==z&&(this._maxZoom=z,this.zoom=Math.min(this.zoom,z))}get minPitch(){return this._minPitch}set minPitch(z){this._minPitch!==z&&(this._minPitch=z,this.pitch=Math.max(this.pitch,z))}get maxPitch(){return this._maxPitch}set maxPitch(z){this._maxPitch!==z&&(this._maxPitch=z,this.pitch=Math.min(this.pitch,z))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(z){z===void 0?z=!0:z===null&&(z=!1),this._renderWorldCopies=z}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(z){let ht=-e.b3(z,-180,180)*Math.PI/180;this.angle!==ht&&(this._unmodified=!1,this.angle=ht,this._calcMatrices(),this.rotationMatrix=function(){var Et=new e.A(4);return e.A!=Float32Array&&(Et[1]=0,Et[2]=0),Et[0]=1,Et[3]=1,Et}(),function(Et,zt,Ht){var ke=zt[0],Fe=zt[1],Ke=zt[2],vr=zt[3],Dr=Math.sin(Ht),Fr=Math.cos(Ht);Et[0]=ke*Fr+Ke*Dr,Et[1]=Fe*Fr+vr*Dr,Et[2]=ke*-Dr+Ke*Fr,Et[3]=Fe*-Dr+vr*Fr}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(z){let ht=e.ac(z,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ht&&(this._unmodified=!1,this._pitch=ht,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(z){z=Math.max(.01,Math.min(60,z)),this._fov!==z&&(this._unmodified=!1,this._fov=z/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(z){let ht=Math.min(Math.max(z,this.minZoom),this.maxZoom);this._zoom!==ht&&(this._unmodified=!1,this._zoom=ht,this.tileZoom=Math.max(0,Math.floor(ht)),this.scale=this.zoomScale(ht),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(z){z.lat===this._center.lat&&z.lng===this._center.lng||(this._unmodified=!1,this._center=z,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(z){z!==this._elevation&&(this._elevation=z,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(z){this._edgeInsets.equals(z)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,z,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(z){return this._edgeInsets.equals(z)}interpolatePadding(z,ht,Et){this._unmodified=!1,this._edgeInsets.interpolate(z,ht,Et),this._constrain(),this._calcMatrices()}coveringZoomLevel(z){let ht=(z.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/z.tileSize));return Math.max(0,ht)}getVisibleUnwrappedCoordinates(z){let ht=[new e.b4(0,z)];if(this._renderWorldCopies){let Et=this.pointCoordinate(new e.P(0,0)),zt=this.pointCoordinate(new e.P(this.width,0)),Ht=this.pointCoordinate(new e.P(this.width,this.height)),ke=this.pointCoordinate(new e.P(0,this.height)),Fe=Math.floor(Math.min(Et.x,zt.x,Ht.x,ke.x)),Ke=Math.floor(Math.max(Et.x,zt.x,Ht.x,ke.x)),vr=1;for(let Dr=Fe-vr;Dr<=Ke+vr;Dr++)Dr!==0&&ht.push(new e.b4(Dr,z))}return ht}coveringTiles(z){var ht,Et;let zt=this.coveringZoomLevel(z),Ht=zt;if(z.minzoom!==void 0&&ztz.maxzoom&&(zt=z.maxzoom);let ke=this.pointCoordinate(this.getCameraPoint()),Fe=e.Z.fromLngLat(this.center),Ke=Math.pow(2,zt),vr=[Ke*ke.x,Ke*ke.y,0],Dr=[Ke*Fe.x,Ke*Fe.y,0],Fr=hu.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,zt),un=z.minzoom||0;!z.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(un=zt);let Sn=z.terrain?2/Math.min(this.tileSize,z.tileSize)*this.tileSize:3,Xt=Oe=>({aabb:new Ch([Oe*Ke,0,0],[(Oe+1)*Ke,Ke,0]),zoom:0,x:0,y:0,wrap:Oe,fullyVisible:!1}),ae=[],xe=[],Ae=zt,je=z.reparseOverscaled?Ht:zt;if(this._renderWorldCopies)for(let Oe=1;Oe<=3;Oe++)ae.push(Xt(-Oe)),ae.push(Xt(Oe));for(ae.push(Xt(0));ae.length>0;){let Oe=ae.pop(),$e=Oe.x,wr=Oe.y,Or=Oe.fullyVisible;if(!Or){let Nn=Oe.aabb.intersects(Fr);if(Nn===0)continue;Or=Nn===2}let Nr=z.terrain?vr:Dr,en=Oe.aabb.distanceX(Nr),vn=Oe.aabb.distanceY(Nr),In=Math.max(Math.abs(en),Math.abs(vn));if(Oe.zoom===Ae||In>Sn+(1<=un){let Nn=Ae-Oe.zoom,ii=vr[0]-.5-($e<>1),pa=Oe.zoom+1,fa=Oe.aabb.quadrant(Nn);if(z.terrain){let Ta=new e.S(pa,Oe.wrap,pa,ii,Ui),so=z.terrain.getMinMaxElevation(Ta),Bo=(ht=so.minElevation)!==null&&ht!==void 0?ht:this.elevation,So=(Et=so.maxElevation)!==null&&Et!==void 0?Et:this.elevation;fa=new Ch([fa.min[0],fa.min[1],Bo],[fa.max[0],fa.max[1],So])}ae.push({aabb:fa,zoom:pa,x:ii,y:Ui,wrap:Oe.wrap,fullyVisible:Or})}}return xe.sort((Oe,$e)=>Oe.distanceSq-$e.distanceSq).map(Oe=>Oe.tileID)}resize(z,ht){this.width=z,this.height=ht,this.pixelsToGLUnits=[2/z,-2/ht],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(z){return Math.pow(2,z)}scaleZoom(z){return Math.log(z)/Math.LN2}project(z){let ht=e.ac(z.lat,-85.051129,Uc);return new e.P(e.O(z.lng)*this.worldSize,e.Q(ht)*this.worldSize)}unproject(z){return new e.Z(z.x/this.worldSize,z.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(z){let ht=this.elevation,Et=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,zt=this.pointLocation(this.centerPoint,z),Ht=z.getElevationForLngLatZoom(zt,this.tileZoom);if(!(this.elevation-Ht))return;let ke=Et+ht-Ht,Fe=Math.cos(this._pitch)*this.cameraToCenterDistance/ke/e.b5(1,zt.lat),Ke=this.scaleZoom(Fe/this.tileSize);this._elevation=Ht,this._center=zt,this.zoom=Ke}setLocationAtPoint(z,ht){let Et=this.pointCoordinate(ht),zt=this.pointCoordinate(this.centerPoint),Ht=this.locationCoordinate(z),ke=new e.Z(Ht.x-(Et.x-zt.x),Ht.y-(Et.y-zt.y));this.center=this.coordinateLocation(ke),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(z,ht){return ht?this.coordinatePoint(this.locationCoordinate(z),ht.getElevationForLngLatZoom(z,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(z))}pointLocation(z,ht){return this.coordinateLocation(this.pointCoordinate(z,ht))}locationCoordinate(z){return e.Z.fromLngLat(z)}coordinateLocation(z){return z&&z.toLngLat()}pointCoordinate(z,ht){if(ht){let un=ht.pointCoordinate(z);if(un!=null)return un}let Et=[z.x,z.y,0,1],zt=[z.x,z.y,1,1];e.af(Et,Et,this.pixelMatrixInverse),e.af(zt,zt,this.pixelMatrixInverse);let Ht=Et[3],ke=zt[3],Fe=Et[1]/Ht,Ke=zt[1]/ke,vr=Et[2]/Ht,Dr=zt[2]/ke,Fr=vr===Dr?0:(0-vr)/(Dr-vr);return new e.Z(e.y.number(Et[0]/Ht,zt[0]/ke,Fr)/this.worldSize,e.y.number(Fe,Ke,Fr)/this.worldSize)}coordinatePoint(z,ht=0,Et=this.pixelMatrix){let zt=[z.x*this.worldSize,z.y*this.worldSize,ht,1];return e.af(zt,zt,Et),new e.P(zt[0]/zt[3],zt[1]/zt[3])}getBounds(){let z=Math.max(0,this.height/2-this.getHorizon());return new ut().extend(this.pointLocation(new e.P(0,z))).extend(this.pointLocation(new e.P(this.width,z))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ut([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(z){z?(this.lngRange=[z.getWest(),z.getEast()],this.latRange=[z.getSouth(),z.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Uc])}calculateTileMatrix(z){let ht=z.canonical,Et=this.worldSize/this.zoomScale(ht.z),zt=ht.x+Math.pow(2,ht.z)*z.wrap,Ht=e.an(new Float64Array(16));return e.J(Ht,Ht,[zt*Et,ht.y*Et,0]),e.K(Ht,Ht,[Et/e.X,Et/e.X,1]),Ht}calculatePosMatrix(z,ht=!1){let Et=z.key,zt=ht?this._alignedPosMatrixCache:this._posMatrixCache;if(zt[Et])return zt[Et];let Ht=this.calculateTileMatrix(z);return e.L(Ht,ht?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Ht),zt[Et]=new Float32Array(Ht),zt[Et]}calculateFogMatrix(z){let ht=z.key,Et=this._fogMatrixCache;if(Et[ht])return Et[ht];let zt=this.calculateTileMatrix(z);return e.L(zt,this.fogMatrix,zt),Et[ht]=new Float32Array(zt),Et[ht]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(z,ht){ht=e.ac(+ht,this.minZoom,this.maxZoom);let Et={center:new e.N(z.lng,z.lat),zoom:ht},zt=this.lngRange;if(!this._renderWorldCopies&&zt===null){let Oe=179.9999999999;zt=[-Oe,Oe]}let Ht=this.tileSize*this.zoomScale(Et.zoom),ke=0,Fe=Ht,Ke=0,vr=Ht,Dr=0,Fr=0,{x:un,y:Sn}=this.size;if(this.latRange){let Oe=this.latRange;ke=e.Q(Oe[1])*Ht,Fe=e.Q(Oe[0])*Ht,Fe-keFe&&(Ae=Fe-Oe)}if(zt){let Oe=(Ke+vr)/2,$e=Xt;this._renderWorldCopies&&($e=e.b3(Xt,Oe-Ht/2,Oe+Ht/2));let wr=un/2;$e-wrvr&&(xe=vr-wr)}if(xe!==void 0||Ae!==void 0){let Oe=new e.P(xe??Xt,Ae??ae);Et.center=this.unproject.call({worldSize:Ht},Oe).wrap()}return Et}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let z=this._unmodified,{center:ht,zoom:Et}=this.getConstrained(this.center,this.zoom);this.center=ht,this.zoom=Et,this._unmodified=z,this._constraining=!1}_calcMatrices(){if(!this.height)return;let z=this.centerOffset,ht=this.point.x,Et=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=e.b5(1,this.center.lat)*this.worldSize;let zt=e.an(new Float64Array(16));e.K(zt,zt,[this.width/2,-this.height/2,1]),e.J(zt,zt,[1,-1,0]),this.labelPlaneMatrix=zt,zt=e.an(new Float64Array(16)),e.K(zt,zt,[1,-1,1]),e.J(zt,zt,[-1,-1,0]),e.K(zt,zt,[2/this.width,2/this.height,1]),this.glCoordMatrix=zt;let Ht=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ke=Math.min(this.elevation,this.minElevationForCurrentTile),Fe=Ht-ke*this._pixelPerMeter/Math.cos(this._pitch),Ke=ke<0?Fe:Ht,vr=Math.PI/2+this._pitch,Dr=this._fov*(.5+z.y/this.height),Fr=Math.sin(Dr)*Ke/Math.sin(e.ac(Math.PI-vr-Dr,.01,Math.PI-.01)),un=this.getHorizon(),Sn=2*Math.atan(un/this.cameraToCenterDistance)*(.5+z.y/(2*un)),Xt=Math.sin(Sn)*Ke/Math.sin(e.ac(Math.PI-vr-Sn,.01,Math.PI-.01)),ae=Math.min(Fr,Xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ae+Ke),this.nearZ=this.height/50,zt=new Float64Array(16),e.b6(zt,this._fov,this.width/this.height,this.nearZ,this.farZ),zt[8]=2*-z.x/this.width,zt[9]=2*z.y/this.height,this.projectionMatrix=e.ae(zt),e.K(zt,zt,[1,-1,1]),e.J(zt,zt,[0,0,-this.cameraToCenterDistance]),e.b7(zt,zt,this._pitch),e.ad(zt,zt,this.angle),e.J(zt,zt,[-ht,-Et,0]),this.mercatorMatrix=e.K([],zt,[this.worldSize,this.worldSize,this.worldSize]),e.K(zt,zt,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.L(new Float64Array(16),this.labelPlaneMatrix,zt),e.J(zt,zt,[0,0,-this.elevation]),this.modelViewProjectionMatrix=zt,this.invModelViewProjectionMatrix=e.as([],zt),this.fogMatrix=new Float64Array(16),e.b6(this.fogMatrix,this._fov,this.width/this.height,Ht,this.farZ),this.fogMatrix[8]=2*-z.x/this.width,this.fogMatrix[9]=2*z.y/this.height,e.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),e.b7(this.fogMatrix,this.fogMatrix,this._pitch),e.ad(this.fogMatrix,this.fogMatrix,this.angle),e.J(this.fogMatrix,this.fogMatrix,[-ht,-Et,0]),e.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=e.L(new Float64Array(16),this.labelPlaneMatrix,zt);let xe=this.width%2/2,Ae=this.height%2/2,je=Math.cos(this.angle),Oe=Math.sin(this.angle),$e=ht-Math.round(ht)+je*xe+Oe*Ae,wr=Et-Math.round(Et)+je*Ae+Oe*xe,Or=new Float64Array(zt);if(e.J(Or,Or,[$e>.5?$e-1:$e,wr>.5?wr-1:wr,0]),this.alignedModelViewProjectionMatrix=Or,zt=e.as(new Float64Array(16),this.pixelMatrix),!zt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=zt,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let z=this.pointCoordinate(new e.P(0,0)),ht=[z.x*this.worldSize,z.y*this.worldSize,0,1];return e.af(ht,ht,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let z=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,z))}getCameraQueryGeometry(z){let ht=this.getCameraPoint();if(z.length===1)return[z[0],ht];{let Et=ht.x,zt=ht.y,Ht=ht.x,ke=ht.y;for(let Fe of z)Et=Math.min(Et,Fe.x),zt=Math.min(zt,Fe.y),Ht=Math.max(Ht,Fe.x),ke=Math.max(ke,Fe.y);return[new e.P(Et,zt),new e.P(Ht,zt),new e.P(Ht,ke),new e.P(Et,ke),new e.P(Et,zt)]}}lngLatToCameraDepth(z,ht){let Et=this.locationCoordinate(z),zt=[Et.x*this.worldSize,Et.y*this.worldSize,ht,1];return e.af(zt,zt,this.modelViewProjectionMatrix),zt[2]/zt[3]}}function uf($t,z){let ht,Et=!1,zt=null,Ht=null,ke=()=>{zt=null,Et&&($t.apply(Ht,ht),zt=setTimeout(ke,z),Et=!1)};return(...Fe)=>(Et=!0,Ht=this,ht=Fe,zt||ke(),zt)}class vh{constructor(z){this._getCurrentHash=()=>{let ht=window.location.hash.replace("#","");if(this._hashName){let Et;return ht.split("&").map(zt=>zt.split("=")).forEach(zt=>{zt[0]===this._hashName&&(Et=zt)}),(Et&&Et[1]||"").split("/")}return ht.split("/")},this._onHashChange=()=>{let ht=this._getCurrentHash();if(ht.length>=3&&!ht.some(Et=>isNaN(Et))){let Et=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ht[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ht[2],+ht[1]],zoom:+ht[0],bearing:Et,pitch:+(ht[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ht=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ht)},this._removeHash=()=>{let ht=this._getCurrentHash();if(ht.length===0)return;let Et=ht.join("/"),zt=Et;zt.split("&").length>0&&(zt=zt.split("&")[0]),this._hashName&&(zt=`${this._hashName}=${Et}`);let Ht=window.location.hash.replace(zt,"");Ht.startsWith("#&")?Ht=Ht.slice(0,1)+Ht.slice(2):Ht==="#"&&(Ht="");let ke=window.location.href.replace(/(#.+)?$/,Ht);ke=ke.replace("&&","&"),window.history.replaceState(window.history.state,null,ke)},this._updateHash=uf(this._updateHashUnthrottled,300),this._hashName=z&&encodeURIComponent(z)}addTo(z){return this._map=z,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(z){let ht=this._map.getCenter(),Et=Math.round(100*this._map.getZoom())/100,zt=Math.ceil((Et*Math.LN2+Math.log(512/360/.5))/Math.LN10),Ht=Math.pow(10,zt),ke=Math.round(ht.lng*Ht)/Ht,Fe=Math.round(ht.lat*Ht)/Ht,Ke=this._map.getBearing(),vr=this._map.getPitch(),Dr="";if(Dr+=z?`/${ke}/${Fe}/${Et}`:`${Et}/${Fe}/${ke}`,(Ke||vr)&&(Dr+="/"+Math.round(10*Ke)/10),vr&&(Dr+=`/${Math.round(vr)}`),this._hashName){let Fr=this._hashName,un=!1,Sn=window.location.hash.slice(1).split("&").map(Xt=>{let ae=Xt.split("=")[0];return ae===Fr?(un=!0,`${ae}=${Dr}`):Xt}).filter(Xt=>Xt);return un||Sn.push(`${Fr}=${Dr}`),`#${Sn.join("&")}`}return`#${Dr}`}}let qh={linearity:.3,easing:e.b8(0,0,.3,1)},Cf=e.e({deceleration:2500,maxSpeed:1400},qh),Ld=e.e({deceleration:20,maxSpeed:1400},qh),Jd=e.e({deceleration:1e3,maxSpeed:360},qh),cf=e.e({deceleration:1e3,maxSpeed:90},qh);class Lf{constructor(z){this._map=z,this.clear()}clear(){this._inertiaBuffer=[]}record(z){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.now(),settings:z})}_drainInertiaBuffer(){let z=this._inertiaBuffer,ht=o.now();for(;z.length>0&&ht-z[0].time>160;)z.shift()}_onMoveEnd(z){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ht={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Ht}of this._inertiaBuffer)ht.zoom+=Ht.zoomDelta||0,ht.bearing+=Ht.bearingDelta||0,ht.pitch+=Ht.pitchDelta||0,Ht.panDelta&&ht.pan._add(Ht.panDelta),Ht.around&&(ht.around=Ht.around),Ht.pinchAround&&(ht.pinchAround=Ht.pinchAround);let Et=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,zt={};if(ht.pan.mag()){let Ht=hf(ht.pan.mag(),Et,e.e({},Cf,z||{}));zt.offset=ht.pan.mult(Ht.amount/ht.pan.mag()),zt.center=this._map.transform.center,wc(zt,Ht)}if(ht.zoom){let Ht=hf(ht.zoom,Et,Ld);zt.zoom=this._map.transform.zoom+Ht.amount,wc(zt,Ht)}if(ht.bearing){let Ht=hf(ht.bearing,Et,Jd);zt.bearing=this._map.transform.bearing+e.ac(Ht.amount,-179,179),wc(zt,Ht)}if(ht.pitch){let Ht=hf(ht.pitch,Et,cf);zt.pitch=this._map.transform.pitch+Ht.amount,wc(zt,Ht)}if(zt.zoom||zt.bearing){let Ht=ht.pinchAround===void 0?ht.around:ht.pinchAround;zt.around=Ht?this._map.unproject(Ht):this._map.getCenter()}return this.clear(),e.e(zt,{noMoveStart:!0})}}function wc($t,z){(!$t.duration||$t.durationht.unproject(Ke)),Fe=Ht.reduce((Ke,vr,Dr,Fr)=>Ke.add(vr.div(Fr.length)),new e.P(0,0));super(z,{points:Ht,point:Fe,lngLats:ke,lngLat:ht.unproject(Fe),originalEvent:Et}),this._defaultPrevented=!1}}class Pf extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(z,ht,Et){super(z,{originalEvent:Et}),this._defaultPrevented=!1}}class yh{constructor(z,ht){this._map=z,this._clickTolerance=ht.clickTolerance}reset(){delete this._mousedownPos}wheel(z){return this._firePreventable(new Pf(z.type,this._map,z))}mousedown(z,ht){return this._mousedownPos=ht,this._firePreventable(new Qc(z.type,this._map,z))}mouseup(z){this._map.fire(new Qc(z.type,this._map,z))}click(z,ht){this._mousedownPos&&this._mousedownPos.dist(ht)>=this._clickTolerance||this._map.fire(new Qc(z.type,this._map,z))}dblclick(z){return this._firePreventable(new Qc(z.type,this._map,z))}mouseover(z){this._map.fire(new Qc(z.type,this._map,z))}mouseout(z){this._map.fire(new Qc(z.type,this._map,z))}touchstart(z){return this._firePreventable(new ff(z.type,this._map,z))}touchmove(z){this._map.fire(new ff(z.type,this._map,z))}touchend(z){this._map.fire(new ff(z.type,this._map,z))}touchcancel(z){this._map.fire(new ff(z.type,this._map,z))}_firePreventable(z){if(this._map.fire(z),z.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class wu{constructor(z){this._map=z}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(z){this._map.fire(new Qc(z.type,this._map,z))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qc("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(z){this._delayContextMenu?this._contextMenuEvent=z:this._ignoreContextMenu||this._map.fire(new Qc(z.type,this._map,z)),this._map.listens("contextmenu")&&z.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Lh{constructor(z){this._map=z}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(z){return this.transform.pointLocation(e.P.convert(z),this._map.terrain)}}class Vc{constructor(z,ht){this._map=z,this._tr=new Lh(z),this._el=z.getCanvasContainer(),this._container=z.getContainer(),this._clickTolerance=ht.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(z,ht){this.isEnabled()&&z.shiftKey&&z.button===0&&(i.disableDrag(),this._startPos=this._lastPos=ht,this._active=!0)}mousemoveWindow(z,ht){if(!this._active)return;let Et=ht;if(this._lastPos.equals(Et)||!this._box&&Et.dist(this._startPos)Ht.fitScreenCoordinates(Et,zt,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",z)}keydown(z){this._active&&z.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",z))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(z,ht){return this._map.fire(new e.k(z,{originalEvent:ht}))}}function fd($t,z){if($t.length!==z.length)throw new Error(`The number of touches and points are not equal - touches ${$t.length}, points ${z.length}`);let ht={};for(let Et=0;Et<$t.length;Et++)ht[$t[Et].identifier]=z[Et];return ht}class yu{constructor(z){this.reset(),this.numTouches=z.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(z,ht,Et){(this.centroid||Et.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=z.timeStamp),Et.length===this.numTouches&&(this.centroid=function(zt){let Ht=new e.P(0,0);for(let ke of zt)Ht._add(ke);return Ht.div(zt.length)}(ht),this.touches=fd(Et,ht)))}touchmove(z,ht,Et){if(this.aborted||!this.centroid)return;let zt=fd(Et,ht);for(let Ht in this.touches){let ke=zt[Ht];(!ke||ke.dist(this.touches[Ht])>30)&&(this.aborted=!0)}}touchend(z,ht,Et){if((!this.centroid||z.timeStamp-this.startTime>500)&&(this.aborted=!0),Et.length===0){let zt=!this.aborted&&this.centroid;if(this.reset(),zt)return zt}}}class bf{constructor(z){this.singleTap=new yu(z),this.numTaps=z.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(z,ht,Et){this.singleTap.touchstart(z,ht,Et)}touchmove(z,ht,Et){this.singleTap.touchmove(z,ht,Et)}touchend(z,ht,Et){let zt=this.singleTap.touchend(z,ht,Et);if(zt){let Ht=z.timeStamp-this.lastTime<500,ke=!this.lastTap||this.lastTap.dist(zt)<30;if(Ht&&ke||this.reset(),this.count++,this.lastTime=z.timeStamp,this.lastTap=zt,this.count===this.numTaps)return this.reset(),zt}}}class $h{constructor(z){this._tr=new Lh(z),this._zoomIn=new bf({numTouches:1,numTaps:2}),this._zoomOut=new bf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(z,ht,Et){this._zoomIn.touchstart(z,ht,Et),this._zoomOut.touchstart(z,ht,Et)}touchmove(z,ht,Et){this._zoomIn.touchmove(z,ht,Et),this._zoomOut.touchmove(z,ht,Et)}touchend(z,ht,Et){let zt=this._zoomIn.touchend(z,ht,Et),Ht=this._zoomOut.touchend(z,ht,Et),ke=this._tr;return zt?(this._active=!0,z.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Fe=>Fe.easeTo({duration:300,zoom:ke.zoom+1,around:ke.unproject(zt)},{originalEvent:z})}):Ht?(this._active=!0,z.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Fe=>Fe.easeTo({duration:300,zoom:ke.zoom-1,around:ke.unproject(Ht)},{originalEvent:z})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class th{constructor(z){this._enabled=!!z.enable,this._moveStateManager=z.moveStateManager,this._clickTolerance=z.clickTolerance||1,this._moveFunction=z.move,this._activateOnStart=!!z.activateOnStart,z.assignEvents(this),this.reset()}reset(z){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(z)}_move(...z){let ht=this._moveFunction(...z);if(ht.bearingDelta||ht.pitchDelta||ht.around||ht.panDelta)return this._active=!0,ht}dragStart(z,ht){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(z)&&(this._moveStateManager.startMove(z),this._lastPoint=ht.length?ht[0]:ht,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(z,ht){if(!this.isEnabled())return;let Et=this._lastPoint;if(!Et)return;if(z.preventDefault(),!this._moveStateManager.isValidMoveEvent(z))return void this.reset(z);let zt=ht.length?ht[0]:ht;return!this._moved&&zt.dist(Et){$t.mousedown=$t.dragStart,$t.mousemoveWindow=$t.dragMove,$t.mouseup=$t.dragEnd,$t.contextmenu=z=>{z.preventDefault()}},gc=({enable:$t,clickTolerance:z,bearingDegreesPerPixelMoved:ht=.8})=>{let Et=new Zh({checkCorrectEvent:zt=>i.mouseButton(zt)===0&&zt.ctrlKey||i.mouseButton(zt)===2});return new th({clickTolerance:z,move:(zt,Ht)=>({bearingDelta:(Ht.x-zt.x)*ht}),moveStateManager:Et,enable:$t,assignEvents:Pd})},Jf=({enable:$t,clickTolerance:z,pitchDegreesPerPixelMoved:ht=-.5})=>{let Et=new Zh({checkCorrectEvent:zt=>i.mouseButton(zt)===0&&zt.ctrlKey||i.mouseButton(zt)===2});return new th({clickTolerance:z,move:(zt,Ht)=>({pitchDelta:(Ht.y-zt.y)*ht}),moveStateManager:Et,enable:$t,assignEvents:Pd})};class eh{constructor(z,ht){this._clickTolerance=z.clickTolerance||1,this._map=ht,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(z){return z<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(z,ht,Et){return this._calculateTransform(z,ht,Et)}touchmove(z,ht,Et){if(this._active){if(!this._shouldBePrevented(Et.length))return z.preventDefault(),this._calculateTransform(z,ht,Et);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",z)}}touchend(z,ht,Et){this._calculateTransform(z,ht,Et),this._active&&this._shouldBePrevented(Et.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(z,ht,Et){Et.length>0&&(this._active=!0);let zt=fd(Et,ht),Ht=new e.P(0,0),ke=new e.P(0,0),Fe=0;for(let vr in zt){let Dr=zt[vr],Fr=this._touches[vr];Fr&&(Ht._add(Dr),ke._add(Dr.sub(Fr)),Fe++,zt[vr]=Dr)}if(this._touches=zt,this._shouldBePrevented(Fe)||!ke.mag())return;let Ke=ke.div(Fe);return this._sum._add(Ke),this._sum.mag()Math.abs($t.x)}class Wf extends Ph{constructor(z){super(),this._currentTouchCount=0,this._map=z}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(z,ht,Et){super.touchstart(z,ht,Et),this._currentTouchCount=Et.length}_start(z){this._lastPoints=z,bh(z[0].sub(z[1]))&&(this._valid=!1)}_move(z,ht,Et){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let zt=z[0].sub(this._lastPoints[0]),Ht=z[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(zt,Ht,Et.timeStamp),this._valid?(this._lastPoints=z,this._active=!0,{pitchDelta:(zt.y+Ht.y)/2*-.5}):void 0}gestureBeginsVertically(z,ht,Et){if(this._valid!==void 0)return this._valid;let zt=z.mag()>=2,Ht=ht.mag()>=2;if(!zt&&!Ht)return;if(!zt||!Ht)return this._firstMove===void 0&&(this._firstMove=Et),Et-this._firstMove<100&&void 0;let ke=z.y>0==ht.y>0;return bh(z)&&bh(ht)&&ke}}let gr={panStep:100,bearingStep:15,pitchStep:10};class Ur{constructor(z){this._tr=new Lh(z);let ht=gr;this._panStep=ht.panStep,this._bearingStep=ht.bearingStep,this._pitchStep=ht.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(z){if(z.altKey||z.ctrlKey||z.metaKey)return;let ht=0,Et=0,zt=0,Ht=0,ke=0;switch(z.keyCode){case 61:case 107:case 171:case 187:ht=1;break;case 189:case 109:case 173:ht=-1;break;case 37:z.shiftKey?Et=-1:(z.preventDefault(),Ht=-1);break;case 39:z.shiftKey?Et=1:(z.preventDefault(),Ht=1);break;case 38:z.shiftKey?zt=1:(z.preventDefault(),ke=-1);break;case 40:z.shiftKey?zt=-1:(z.preventDefault(),ke=1);break;default:return}return this._rotationDisabled&&(Et=0,zt=0),{cameraAnimation:Fe=>{let Ke=this._tr;Fe.easeTo({duration:300,easeId:"keyboardHandler",easing:wn,zoom:ht?Math.round(Ke.zoom)+ht*(z.shiftKey?2:1):Ke.zoom,bearing:Ke.bearing+Et*this._bearingStep,pitch:Ke.pitch+zt*this._pitchStep,offset:[-Ht*this._panStep,-ke*this._panStep],center:Ke.center},{originalEvent:z})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function wn($t){return $t*(2-$t)}let hn=4.000244140625;class qn{constructor(z,ht){this._onTimeout=Et=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Et)},this._map=z,this._tr=new Lh(z),this._triggerRenderFrame=ht,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(z){this._defaultZoomRate=z}setWheelZoomRate(z){this._wheelZoomRate=z}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(z){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!z&&z.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(z){return!!this._map.cooperativeGestures.isEnabled()&&!(z.ctrlKey||this._map.cooperativeGestures.isBypassed(z))}wheel(z){if(!this.isEnabled())return;if(this._shouldBePrevented(z))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",z);let ht=z.deltaMode===WheelEvent.DOM_DELTA_LINE?40*z.deltaY:z.deltaY,Et=o.now(),zt=Et-(this._lastWheelEventTime||0);this._lastWheelEventTime=Et,ht!==0&&ht%hn==0?this._type="wheel":ht!==0&&Math.abs(ht)<4?this._type="trackpad":zt>400?(this._type=null,this._lastValue=ht,this._timeout=setTimeout(this._onTimeout,40,z)):this._type||(this._type=Math.abs(zt*ht)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ht+=this._lastValue)),z.shiftKey&&ht&&(ht/=4),this._type&&(this._lastWheelEvent=z,this._delta-=ht,this._active||this._start(z)),z.preventDefault()}_start(z){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let ht=i.mousePos(this._map.getCanvas(),z),Et=this._tr;this._around=ht.y>Et.transform.height/2-Et.transform.getHorizon()?e.N.convert(this._aroundCenter?Et.center:Et.unproject(ht)):e.N.convert(Et.center),this._aroundPoint=Et.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let z=this._tr.transform;if(this._delta!==0){let Ke=this._type==="wheel"&&Math.abs(this._delta)>hn?this._wheelZoomRate:this._defaultZoomRate,vr=2/(1+Math.exp(-Math.abs(this._delta*Ke)));this._delta<0&&vr!==0&&(vr=1/vr);let Dr=typeof this._targetZoom=="number"?z.zoomScale(this._targetZoom):z.scale;this._targetZoom=Math.min(z.maxZoom,Math.max(z.minZoom,z.scaleZoom(Dr*vr))),this._type==="wheel"&&(this._startZoom=z.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ht=typeof this._targetZoom=="number"?this._targetZoom:z.zoom,Et=this._startZoom,zt=this._easing,Ht,ke=!1,Fe=o.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Et&&zt&&Fe){let Ke=Math.min(Fe/200,1),vr=zt(Ke);Ht=e.y.number(Et,ht,vr),Ke<1?this._frameId||(this._frameId=!0):ke=!0}else Ht=ht,ke=!0;return this._active=!0,ke&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ke,zoomDelta:Ht-z.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(z){let ht=e.b9;if(this._prevEase){let Et=this._prevEase,zt=(o.now()-Et.start)/Et.duration,Ht=Et.easing(zt+.01)-Et.easing(zt),ke=.27/Math.sqrt(Ht*Ht+1e-4)*.01,Fe=Math.sqrt(.0729-ke*ke);ht=e.b8(ke,Fe,.25,1)}return this._prevEase={start:o.now(),duration:z,easing:ht},ht}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class di{constructor(z,ht){this._clickZoom=z,this._tapZoom=ht}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class aa{constructor(z){this._tr=new Lh(z),this.reset()}reset(){this._active=!1}dblclick(z,ht){return z.preventDefault(),{cameraAnimation:Et=>{Et.easeTo({duration:300,zoom:this._tr.zoom+(z.shiftKey?-1:1),around:this._tr.unproject(ht)},{originalEvent:z})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class va{constructor(){this._tap=new bf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(z,ht,Et){if(!this._swipePoint)if(this._tapTime){let zt=ht[0],Ht=z.timeStamp-this._tapTime<500,ke=this._tapPoint.dist(zt)<30;Ht&&ke?Et.length>0&&(this._swipePoint=zt,this._swipeTouch=Et[0].identifier):this.reset()}else this._tap.touchstart(z,ht,Et)}touchmove(z,ht,Et){if(this._tapTime){if(this._swipePoint){if(Et[0].identifier!==this._swipeTouch)return;let zt=ht[0],Ht=zt.y-this._swipePoint.y;return this._swipePoint=zt,z.preventDefault(),this._active=!0,{zoomDelta:Ht/128}}}else this._tap.touchmove(z,ht,Et)}touchend(z,ht,Et){if(this._tapTime)this._swipePoint&&Et.length===0&&this.reset();else{let zt=this._tap.touchend(z,ht,Et);zt&&(this._tapTime=z.timeStamp,this._tapPoint=zt)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ba{constructor(z,ht,Et){this._el=z,this._mousePan=ht,this._touchPan=Et}enable(z){this._inertiaOptions=z||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Za{constructor(z,ht,Et){this._pitchWithRotate=z.pitchWithRotate,this._mouseRotate=ht,this._mousePitch=Et}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class ca{constructor(z,ht,Et,zt){this._el=z,this._touchZoom=ht,this._touchRotate=Et,this._tapDragZoom=zt,this._rotationDisabled=!1,this._enabled=!0}enable(z){this._touchZoom.enable(z),this._rotationDisabled||this._touchRotate.enable(z),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Oa{constructor(z,ht){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=z,this._options=ht,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let z=this._map.getCanvasContainer();z.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",z);let ht=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ht=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Et=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),zt=document.createElement("div");zt.className="maplibregl-desktop-message",zt.textContent=ht,this._container.appendChild(zt);let Ht=document.createElement("div");Ht.className="maplibregl-mobile-message",Ht.textContent=Et,this._container.appendChild(Ht),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(z){return z[this._bypassKey]}notifyGestureBlocked(z,ht){this._enabled&&(this._map.fire(new e.k("cooperativegestureprevented",{gestureType:z,originalEvent:ht})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let ka=$t=>$t.zoom||$t.drag||$t.pitch||$t.rotate;class na extends e.k{}function io($t){return $t.panDelta&&$t.panDelta.mag()||$t.zoomDelta||$t.bearingDelta||$t.pitchDelta}class ns{constructor(z,ht){this.handleWindowEvent=zt=>{this.handleEvent(zt,`${zt.type}Window`)},this.handleEvent=(zt,Ht)=>{if(zt.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ke=zt.type==="renderFrame"?void 0:zt,Fe={needsRenderFrame:!1},Ke={},vr={},Dr=zt.touches,Fr=Dr?this._getMapTouches(Dr):void 0,un=Fr?i.touchPos(this._map.getCanvas(),Fr):i.mousePos(this._map.getCanvas(),zt);for(let{handlerName:ae,handler:xe,allowed:Ae}of this._handlers){if(!xe.isEnabled())continue;let je;this._blockedByActive(vr,Ae,ae)?xe.reset():xe[Ht||zt.type]&&(je=xe[Ht||zt.type](zt,un,Fr),this.mergeHandlerResult(Fe,Ke,je,ae,ke),je&&je.needsRenderFrame&&this._triggerRenderFrame()),(je||xe.isActive())&&(vr[ae]=xe)}let Sn={};for(let ae in this._previousActiveHandlers)vr[ae]||(Sn[ae]=ke);this._previousActiveHandlers=vr,(Object.keys(Sn).length||io(Fe))&&(this._changes.push([Fe,Ke,Sn]),this._triggerRenderFrame()),(Object.keys(vr).length||io(Fe))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Xt}=Fe;Xt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Xt(this._map))},this._map=z,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Lf(z),this._bearingSnap=ht.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ht);let Et=this._el;this._listeners=[[Et,"touchstart",{passive:!0}],[Et,"touchmove",{passive:!1}],[Et,"touchend",void 0],[Et,"touchcancel",void 0],[Et,"mousedown",void 0],[Et,"mousemove",void 0],[Et,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Et,"mouseover",void 0],[Et,"mouseout",void 0],[Et,"dblclick",void 0],[Et,"click",void 0],[Et,"keydown",{capture:!1}],[Et,"keyup",void 0],[Et,"wheel",{passive:!1}],[Et,"contextmenu",void 0],[window,"blur",void 0]];for(let[zt,Ht,ke]of this._listeners)i.addEventListener(zt,Ht,zt===document?this.handleWindowEvent:this.handleEvent,ke)}destroy(){for(let[z,ht,Et]of this._listeners)i.removeEventListener(z,ht,z===document?this.handleWindowEvent:this.handleEvent,Et)}_addDefaultHandlers(z){let ht=this._map,Et=ht.getCanvasContainer();this._add("mapEvent",new yh(ht,z));let zt=ht.boxZoom=new Vc(ht,z);this._add("boxZoom",zt),z.interactive&&z.boxZoom&&zt.enable();let Ht=ht.cooperativeGestures=new Oa(ht,z.cooperativeGestures);this._add("cooperativeGestures",Ht),z.cooperativeGestures&&Ht.enable();let ke=new $h(ht),Fe=new aa(ht);ht.doubleClickZoom=new di(Fe,ke),this._add("tapZoom",ke),this._add("clickZoom",Fe),z.interactive&&z.doubleClickZoom&&ht.doubleClickZoom.enable();let Ke=new va;this._add("tapDragZoom",Ke);let vr=ht.touchPitch=new Wf(ht);this._add("touchPitch",vr),z.interactive&&z.touchPitch&&ht.touchPitch.enable(z.touchPitch);let Dr=gc(z),Fr=Jf(z);ht.dragRotate=new Za(z,Dr,Fr),this._add("mouseRotate",Dr,["mousePitch"]),this._add("mousePitch",Fr,["mouseRotate"]),z.interactive&&z.dragRotate&&ht.dragRotate.enable();let un=(({enable:je,clickTolerance:Oe})=>{let $e=new Zh({checkCorrectEvent:wr=>i.mouseButton(wr)===0&&!wr.ctrlKey});return new th({clickTolerance:Oe,move:(wr,Or)=>({around:Or,panDelta:Or.sub(wr)}),activateOnStart:!0,moveStateManager:$e,enable:je,assignEvents:Pd})})(z),Sn=new eh(z,ht);ht.dragPan=new Ba(Et,un,Sn),this._add("mousePan",un),this._add("touchPan",Sn,["touchZoom","touchRotate"]),z.interactive&&z.dragPan&&ht.dragPan.enable(z.dragPan);let Xt=new df,ae=new iu;ht.touchZoomRotate=new ca(Et,ae,Xt,Ke),this._add("touchRotate",Xt,["touchPan","touchZoom"]),this._add("touchZoom",ae,["touchPan","touchRotate"]),z.interactive&&z.touchZoomRotate&&ht.touchZoomRotate.enable(z.touchZoomRotate);let xe=ht.scrollZoom=new qn(ht,()=>this._triggerRenderFrame());this._add("scrollZoom",xe,["mousePan"]),z.interactive&&z.scrollZoom&&ht.scrollZoom.enable(z.scrollZoom);let Ae=ht.keyboard=new Ur(ht);this._add("keyboard",Ae),z.interactive&&z.keyboard&&ht.keyboard.enable(),this._add("blockableMapEvent",new wu(ht))}_add(z,ht,Et){this._handlers.push({handlerName:z,handler:ht,allowed:Et}),this._handlersById[z]=ht}stop(z){if(!this._updatingCamera){for(let{handler:ht}of this._handlers)ht.reset();this._inertia.clear(),this._fireEvents({},{},z),this._changes=[]}}isActive(){for(let{handler:z}of this._handlers)if(z.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!ka(this._eventsInProgress)||this.isZooming()}_blockedByActive(z,ht,Et){for(let zt in z)if(zt!==Et&&(!ht||ht.indexOf(zt)<0))return!0;return!1}_getMapTouches(z){let ht=[];for(let Et of z)this._el.contains(Et.target)&&ht.push(Et);return ht}mergeHandlerResult(z,ht,Et,zt,Ht){if(!Et)return;e.e(z,Et);let ke={handlerName:zt,originalEvent:Et.originalEvent||Ht};Et.zoomDelta!==void 0&&(ht.zoom=ke),Et.panDelta!==void 0&&(ht.drag=ke),Et.pitchDelta!==void 0&&(ht.pitch=ke),Et.bearingDelta!==void 0&&(ht.rotate=ke)}_applyChanges(){let z={},ht={},Et={};for(let[zt,Ht,ke]of this._changes)zt.panDelta&&(z.panDelta=(z.panDelta||new e.P(0,0))._add(zt.panDelta)),zt.zoomDelta&&(z.zoomDelta=(z.zoomDelta||0)+zt.zoomDelta),zt.bearingDelta&&(z.bearingDelta=(z.bearingDelta||0)+zt.bearingDelta),zt.pitchDelta&&(z.pitchDelta=(z.pitchDelta||0)+zt.pitchDelta),zt.around!==void 0&&(z.around=zt.around),zt.pinchAround!==void 0&&(z.pinchAround=zt.pinchAround),zt.noInertia&&(z.noInertia=zt.noInertia),e.e(ht,Ht),e.e(Et,ke);this._updateMapTransform(z,ht,Et),this._changes=[]}_updateMapTransform(z,ht,Et){let zt=this._map,Ht=zt._getTransformForUpdate(),ke=zt.terrain;if(!(io(z)||ke&&this._terrainMovement))return this._fireEvents(ht,Et,!0);let{panDelta:Fe,zoomDelta:Ke,bearingDelta:vr,pitchDelta:Dr,around:Fr,pinchAround:un}=z;un!==void 0&&(Fr=un),zt._stop(!0),Fr=Fr||zt.transform.centerPoint;let Sn=Ht.pointLocation(Fe?Fr.sub(Fe):Fr);vr&&(Ht.bearing+=vr),Dr&&(Ht.pitch+=Dr),Ke&&(Ht.zoom+=Ke),ke?this._terrainMovement||!ht.drag&&!ht.zoom?ht.drag&&this._terrainMovement?Ht.center=Ht.pointLocation(Ht.centerPoint.sub(Fe)):Ht.setLocationAtPoint(Sn,Fr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Ht.setLocationAtPoint(Sn,Fr)):Ht.setLocationAtPoint(Sn,Fr),zt._applyUpdatedTransform(Ht),this._map._update(),z.noInertia||this._inertia.record(z),this._fireEvents(ht,Et,!0)}_fireEvents(z,ht,Et){let zt=ka(this._eventsInProgress),Ht=ka(z),ke={};for(let Fr in z){let{originalEvent:un}=z[Fr];this._eventsInProgress[Fr]||(ke[`${Fr}start`]=un),this._eventsInProgress[Fr]=z[Fr]}!zt&&Ht&&this._fireEvent("movestart",Ht.originalEvent);for(let Fr in ke)this._fireEvent(Fr,ke[Fr]);Ht&&this._fireEvent("move",Ht.originalEvent);for(let Fr in z){let{originalEvent:un}=z[Fr];this._fireEvent(Fr,un)}let Fe={},Ke;for(let Fr in this._eventsInProgress){let{handlerName:un,originalEvent:Sn}=this._eventsInProgress[Fr];this._handlersById[un].isActive()||(delete this._eventsInProgress[Fr],Ke=ht[un]||Sn,Fe[`${Fr}end`]=Ke)}for(let Fr in Fe)this._fireEvent(Fr,Fe[Fr]);let vr=ka(this._eventsInProgress),Dr=(zt||Ht)&&!vr;if(Dr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Fr=this._map._getTransformForUpdate();Fr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Fr)}if(Et&&Dr){this._updatingCamera=!0;let Fr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),un=Sn=>Sn!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new na("renderFrame",{timeStamp:z})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ko extends e.E{constructor(z,ht){super(),this._renderFrameCallback=()=>{let Et=Math.min((o.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Et)),Et<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=z,this._bearingSnap=ht.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.N(this.transform.center.lng,this.transform.center.lat)}setCenter(z,ht){return this.jumpTo({center:z},ht)}panBy(z,ht,Et){return z=e.P.convert(z).mult(-1),this.panTo(this.transform.center,e.e({offset:z},ht),Et)}panTo(z,ht,Et){return this.easeTo(e.e({center:z},ht),Et)}getZoom(){return this.transform.zoom}setZoom(z,ht){return this.jumpTo({zoom:z},ht),this}zoomTo(z,ht,Et){return this.easeTo(e.e({zoom:z},ht),Et)}zoomIn(z,ht){return this.zoomTo(this.getZoom()+1,z,ht),this}zoomOut(z,ht){return this.zoomTo(this.getZoom()-1,z,ht),this}getBearing(){return this.transform.bearing}setBearing(z,ht){return this.jumpTo({bearing:z},ht),this}getPadding(){return this.transform.padding}setPadding(z,ht){return this.jumpTo({padding:z},ht),this}rotateTo(z,ht,Et){return this.easeTo(e.e({bearing:z},ht),Et)}resetNorth(z,ht){return this.rotateTo(0,e.e({duration:1e3},z),ht),this}resetNorthPitch(z,ht){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},z),ht),this}snapToNorth(z,ht){return Math.abs(this.getBearing()){if(this._zooming&&(zt.zoom=e.y.number(Ht,xe,Nr)),this._rotating&&(zt.bearing=e.y.number(ke,vr,Nr)),this._pitching&&(zt.pitch=e.y.number(Fe,Dr,Nr)),this._padding&&(zt.interpolatePadding(Ke,Fr,Nr),Sn=zt.centerPoint.add(un)),this.terrain&&!z.freezeElevation&&this._updateElevation(Nr),$e)zt.setLocationAtPoint($e,wr);else{let en=zt.zoomScale(zt.zoom-Ht),vn=xe>Ht?Math.min(2,Oe):Math.max(.5,Oe),In=Math.pow(vn,1-Nr),Nn=zt.unproject(Ae.add(je.mult(Nr*In)).mult(en));zt.setLocationAtPoint(zt.renderWorldCopies?Nn.wrap():Nn,Sn)}this._applyUpdatedTransform(zt),this._fireMoveEvents(ht)},Nr=>{this.terrain&&z.freezeElevation&&this._finalizeElevation(),this._afterEase(ht,Nr)},z),this}_prepareEase(z,ht,Et={}){this._moving=!0,ht||Et.moving||this.fire(new e.k("movestart",z)),this._zooming&&!Et.zooming&&this.fire(new e.k("zoomstart",z)),this._rotating&&!Et.rotating&&this.fire(new e.k("rotatestart",z)),this._pitching&&!Et.pitching&&this.fire(new e.k("pitchstart",z))}_prepareElevation(z){this._elevationCenter=z,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(z,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(z){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ht=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(z<1&&ht!==this._elevationTarget){let Et=this._elevationTarget-this._elevationStart;this._elevationStart+=z*(Et-(ht-(Et*z+this._elevationStart))/(1-z)),this._elevationTarget=ht}this.transform.elevation=e.y.number(this._elevationStart,this._elevationTarget,z)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(z){let ht=z.getCameraPosition(),Et=this.terrain.getElevationForLngLatZoom(ht.lngLat,z.zoom);if(ht.altitudethis._elevateCameraIfInsideTerrain(zt)),this.transformCameraUpdate&&ht.push(zt=>this.transformCameraUpdate(zt)),!ht.length)return;let Et=z.clone();for(let zt of ht){let Ht=Et.clone(),{center:ke,zoom:Fe,pitch:Ke,bearing:vr,elevation:Dr}=zt(Ht);ke&&(Ht.center=ke),Fe!==void 0&&(Ht.zoom=Fe),Ke!==void 0&&(Ht.pitch=Ke),vr!==void 0&&(Ht.bearing=vr),Dr!==void 0&&(Ht.elevation=Dr),Et.apply(Ht)}this.transform.apply(Et)}_fireMoveEvents(z){this.fire(new e.k("move",z)),this._zooming&&this.fire(new e.k("zoom",z)),this._rotating&&this.fire(new e.k("rotate",z)),this._pitching&&this.fire(new e.k("pitch",z))}_afterEase(z,ht){if(this._easeId&&ht&&this._easeId===ht)return;delete this._easeId;let Et=this._zooming,zt=this._rotating,Ht=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Et&&this.fire(new e.k("zoomend",z)),zt&&this.fire(new e.k("rotateend",z)),Ht&&this.fire(new e.k("pitchend",z)),this.fire(new e.k("moveend",z))}flyTo(z,ht){var Et;if(!z.essential&&o.prefersReducedMotion){let Ta=e.M(z,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ta,ht)}this.stop(),z=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.b9},z);let zt=this._getTransformForUpdate(),Ht=zt.zoom,ke=zt.bearing,Fe=zt.pitch,Ke=zt.padding,vr="bearing"in z?this._normalizeBearing(z.bearing,ke):ke,Dr="pitch"in z?+z.pitch:Fe,Fr="padding"in z?z.padding:zt.padding,un=e.P.convert(z.offset),Sn=zt.centerPoint.add(un),Xt=zt.pointLocation(Sn),{center:ae,zoom:xe}=zt.getConstrained(e.N.convert(z.center||Xt),(Et=z.zoom)!==null&&Et!==void 0?Et:Ht);this._normalizeCenter(ae,zt);let Ae=zt.zoomScale(xe-Ht),je=zt.project(Xt),Oe=zt.project(ae).sub(je),$e=z.curve,wr=Math.max(zt.width,zt.height),Or=wr/Ae,Nr=Oe.mag();if("minZoom"in z){let Ta=e.ac(Math.min(z.minZoom,Ht,xe),zt.minZoom,zt.maxZoom),so=wr/zt.zoomScale(Ta-Ht);$e=Math.sqrt(so/Nr*2)}let en=$e*$e;function vn(Ta){let so=(Or*Or-wr*wr+(Ta?-1:1)*en*en*Nr*Nr)/(2*(Ta?Or:wr)*en*Nr);return Math.log(Math.sqrt(so*so+1)-so)}function In(Ta){return(Math.exp(Ta)-Math.exp(-Ta))/2}function Nn(Ta){return(Math.exp(Ta)+Math.exp(-Ta))/2}let ii=vn(!1),Ui=function(Ta){return Nn(ii)/Nn(ii+$e*Ta)},pa=function(Ta){return wr*((Nn(ii)*(In(so=ii+$e*Ta)/Nn(so))-In(ii))/en)/Nr;var so},fa=(vn(!0)-ii)/$e;if(Math.abs(Nr)<1e-6||!isFinite(fa)){if(Math.abs(wr-Or)<1e-6)return this.easeTo(z,ht);let Ta=Or0,Ui=so=>Math.exp(Ta*$e*so)}return z.duration="duration"in z?+z.duration:1e3*fa/("screenSpeed"in z?+z.screenSpeed/$e:+z.speed),z.maxDuration&&z.duration>z.maxDuration&&(z.duration=0),this._zooming=!0,this._rotating=ke!==vr,this._pitching=Dr!==Fe,this._padding=!zt.isPaddingEqual(Fr),this._prepareEase(ht,!1),this.terrain&&this._prepareElevation(ae),this._ease(Ta=>{let so=Ta*fa,Bo=1/Ui(so);zt.zoom=Ta===1?xe:Ht+zt.scaleZoom(Bo),this._rotating&&(zt.bearing=e.y.number(ke,vr,Ta)),this._pitching&&(zt.pitch=e.y.number(Fe,Dr,Ta)),this._padding&&(zt.interpolatePadding(Ke,Fr,Ta),Sn=zt.centerPoint.add(un)),this.terrain&&!z.freezeElevation&&this._updateElevation(Ta);let So=Ta===1?ae:zt.unproject(je.add(Oe.mult(pa(so))).mult(Bo));zt.setLocationAtPoint(zt.renderWorldCopies?So.wrap():So,Sn),this._applyUpdatedTransform(zt),this._fireMoveEvents(ht)},()=>{this.terrain&&z.freezeElevation&&this._finalizeElevation(),this._afterEase(ht)},z),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(z,ht){var Et;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let zt=this._onEaseEnd;delete this._onEaseEnd,zt.call(this,ht)}return z||(Et=this.handlers)===null||Et===void 0||Et.stop(!1),this}_ease(z,ht,Et){Et.animate===!1||Et.duration===0?(z(1),ht()):(this._easeStart=o.now(),this._easeOptions=Et,this._onEaseFrame=z,this._onEaseEnd=ht,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(z,ht){z=e.b3(z,-180,180);let Et=Math.abs(z-ht);return Math.abs(z-360-ht)180?-360:Et<-180?360:0}queryTerrainElevation(z){return this.terrain?this.terrain.getElevationForLngLatZoom(e.N.convert(z),this.transform.tileZoom)-this.transform.elevation:null}}let ls={compact:!0,customAttribution:'
MapLibre'};class ps{constructor(z=ls){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=ht=>{!ht||ht.sourceDataType!=="metadata"&&ht.sourceDataType!=="visibility"&&ht.dataType!=="style"&&ht.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=z}getDefaultPosition(){return"bottom-right"}onAdd(z){return this._map=z,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(z,ht){let Et=this._map._getUIString(`AttributionControl.${ht}`);z.title=Et,z.setAttribute("aria-label",Et)}_updateAttributions(){if(!this._map.style)return;let z=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?z=z.concat(this.options.customAttribution.map(zt=>typeof zt!="string"?"":zt)):typeof this.options.customAttribution=="string"&&z.push(this.options.customAttribution)),this._map.style.stylesheet){let zt=this._map.style.stylesheet;this.styleOwner=zt.owner,this.styleId=zt.id}let ht=this._map.style.sourceCaches;for(let zt in ht){let Ht=ht[zt];if(Ht.used||Ht.usedForTerrain){let ke=Ht.getSource();ke.attribution&&z.indexOf(ke.attribution)<0&&z.push(ke.attribution)}}z=z.filter(zt=>String(zt).trim()),z.sort((zt,Ht)=>zt.length-Ht.length),z=z.filter((zt,Ht)=>{for(let ke=Ht+1;ke=0)return!1;return!0});let Et=z.join(" | ");Et!==this._attribHTML&&(this._attribHTML=Et,z.length?(this._innerContainer.innerHTML=Et,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class oo{constructor(z={}){this._updateCompact=()=>{let ht=this._container.children;if(ht.length){let Et=ht[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Et.classList.add("maplibregl-compact"):Et.classList.remove("maplibregl-compact")}},this.options=z}getDefaultPosition(){return"bottom-left"}onAdd(z){this._map=z,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let ht=i.create("a","maplibregl-ctrl-logo");return ht.target="_blank",ht.rel="noopener nofollow",ht.href="https://maplibre.org/",ht.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ht.setAttribute("rel","noopener nofollow"),this._container.appendChild(ht),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class qa{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(z){let ht=++this._id;return this._queue.push({callback:z,id:ht,cancelled:!1}),ht}remove(z){let ht=this._currentlyRunning,Et=ht?this._queue.concat(ht):this._queue;for(let zt of Et)if(zt.id===z)return void(zt.cancelled=!0)}run(z=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ht=this._currentlyRunning=this._queue;this._queue=[];for(let Et of ht)if(!Et.cancelled&&(Et.callback(z),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var gs=e.Y([{name:"a_pos3d",type:"Int16",components:3}]);class el extends e.E{constructor(z){super(),this.sourceCache=z,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,z.usedForTerrain=!0,z.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(z,ht){this.sourceCache.update(z,ht),this._renderableTilesKeys=[];let Et={};for(let zt of z.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ht}))Et[zt.key]=!0,this._renderableTilesKeys.push(zt.key),this._tiles[zt.key]||(zt.posMatrix=new Float64Array(16),e.aP(zt.posMatrix,0,e.X,0,e.X,0,1),this._tiles[zt.key]=new oe(zt,this.tileSize));for(let zt in this._tiles)Et[zt]||delete this._tiles[zt]}freeRtt(z){for(let ht in this._tiles){let Et=this._tiles[ht];(!z||Et.tileID.equals(z)||Et.tileID.isChildOf(z)||z.isChildOf(Et.tileID))&&(Et.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(z=>this.getTileByID(z))}getTileByID(z){return this._tiles[z]}getTerrainCoords(z){let ht={};for(let Et of this._renderableTilesKeys){let zt=this._tiles[Et].tileID;if(zt.canonical.equals(z.canonical)){let Ht=z.clone();Ht.posMatrix=new Float64Array(16),e.aP(Ht.posMatrix,0,e.X,0,e.X,0,1),ht[Et]=Ht}else if(zt.canonical.isChildOf(z.canonical)){let Ht=z.clone();Ht.posMatrix=new Float64Array(16);let ke=zt.canonical.z-z.canonical.z,Fe=zt.canonical.x-(zt.canonical.x>>ke<>ke<>ke;e.aP(Ht.posMatrix,0,vr,0,vr,0,1),e.J(Ht.posMatrix,Ht.posMatrix,[-Fe*vr,-Ke*vr,0]),ht[Et]=Ht}else if(z.canonical.isChildOf(zt.canonical)){let Ht=z.clone();Ht.posMatrix=new Float64Array(16);let ke=z.canonical.z-zt.canonical.z,Fe=z.canonical.x-(z.canonical.x>>ke<>ke<>ke;e.aP(Ht.posMatrix,0,e.X,0,e.X,0,1),e.J(Ht.posMatrix,Ht.posMatrix,[Fe*vr,Ke*vr,0]),e.K(Ht.posMatrix,Ht.posMatrix,[1/2**ke,1/2**ke,0]),ht[Et]=Ht}}return ht}getSourceTile(z,ht){let Et=this.sourceCache._source,zt=z.overscaledZ-this.deltaZoom;if(zt>Et.maxzoom&&(zt=Et.maxzoom),zt=Et.minzoom&&(!Ht||!Ht.dem);)Ht=this.sourceCache.getTileByID(z.scaledTo(zt--).key);return Ht}tilesAfterTime(z=Date.now()){return Object.values(this._tiles).filter(ht=>ht.timeAdded>=z)}}class Pl{constructor(z,ht,Et){this.painter=z,this.sourceCache=new el(ht),this.options=Et,this.exaggeration=typeof Et.exaggeration=="number"?Et.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(z,ht,Et,zt=e.X){var Ht;if(!(ht>=0&&ht=0&&Etz.canonical.z&&(z.canonical.z>=zt?Ht=z.canonical.z-zt:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ke=z.canonical.x-(z.canonical.x>>Ht<>Ht<>8<<4|Ht>>8,ht[ke+3]=0;let Et=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ht.buffer)),zt=new p(z,Et,z.gl.RGBA,{premultiply:!1});return zt.bind(z.gl.NEAREST,z.gl.CLAMP_TO_EDGE),this._coordsTexture=zt,zt}pointCoordinate(z){this.painter.maybeDrawDepthAndCoords(!0);let ht=new Uint8Array(4),Et=this.painter.context,zt=Et.gl,Ht=Math.round(z.x*this.painter.pixelRatio/devicePixelRatio),ke=Math.round(z.y*this.painter.pixelRatio/devicePixelRatio),Fe=Math.round(this.painter.height/devicePixelRatio);Et.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),zt.readPixels(Ht,Fe-ke-1,1,1,zt.RGBA,zt.UNSIGNED_BYTE,ht),Et.bindFramebuffer.set(null);let Ke=ht[0]+(ht[2]>>4<<8),vr=ht[1]+((15&ht[2])<<8),Dr=this.coordsIndex[255-ht[3]],Fr=Dr&&this.sourceCache.getTileByID(Dr);if(!Fr)return null;let un=this._coordsTextureSize,Sn=(1<z.id!==ht),this._recentlyUsed.push(z.id)}stampObject(z){z.stamp=++this._stamp}getOrCreateFreeObject(){for(let ht of this._recentlyUsed)if(!this._objects[ht].inUse)return this._objects[ht];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let z=this._createObject(this._objects.length);return this._objects.push(z),z}freeObject(z){z.inUse=!1}freeAllObjects(){for(let z of this._objects)this.freeObject(z)}isFull(){return!(this._objects.length!z.inUse)===!1}}let $l={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class lu{constructor(z,ht){this.painter=z,this.terrain=ht,this.pool=new su(z.context,30,ht.sourceCache.tileSize*ht.qualityFactor)}destruct(){this.pool.destruct()}getTexture(z){return this.pool.getObjectForId(z.rtt[this._stacks.length-1].id).texture}prepareForRender(z,ht){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=z._order.filter(Et=>!z._layers[Et].isHidden(ht)),this._coordsDescendingInv={};for(let Et in z.sourceCaches){this._coordsDescendingInv[Et]={};let zt=z.sourceCaches[Et].getVisibleCoordinates();for(let Ht of zt){let ke=this.terrain.sourceCache.getTerrainCoords(Ht);for(let Fe in ke)this._coordsDescendingInv[Et][Fe]||(this._coordsDescendingInv[Et][Fe]=[]),this._coordsDescendingInv[Et][Fe].push(ke[Fe])}}this._coordsDescendingInvStr={};for(let Et of z._order){let zt=z._layers[Et],Ht=zt.source;if($l[zt.type]&&!this._coordsDescendingInvStr[Ht]){this._coordsDescendingInvStr[Ht]={};for(let ke in this._coordsDescendingInv[Ht])this._coordsDescendingInvStr[Ht][ke]=this._coordsDescendingInv[Ht][ke].map(Fe=>Fe.key).sort().join()}}for(let Et of this._renderableTiles)for(let zt in this._coordsDescendingInvStr){let Ht=this._coordsDescendingInvStr[zt][Et.tileID.key];Ht&&Ht!==Et.rttCoords[zt]&&(Et.rtt=[])}}renderLayer(z){if(z.isHidden(this.painter.transform.zoom))return!1;let ht=z.type,Et=this.painter,zt=this._renderableLayerIds[this._renderableLayerIds.length-1]===z.id;if($l[ht]&&(this._prevType&&$l[this._prevType]||this._stacks.push([]),this._prevType=ht,this._stacks[this._stacks.length-1].push(z.id),!zt))return!0;if($l[this._prevType]||$l[ht]&&zt){this._prevType=ht;let Ht=this._stacks.length-1,ke=this._stacks[Ht]||[];for(let Fe of this._renderableTiles){if(this.pool.isFull()&&(Ou(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Fe),Fe.rtt[Ht]){let vr=this.pool.getObjectForId(Fe.rtt[Ht].id);if(vr.stamp===Fe.rtt[Ht].stamp){this.pool.useObject(vr);continue}}let Ke=this.pool.getOrCreateFreeObject();this.pool.useObject(Ke),this.pool.stampObject(Ke),Fe.rtt[Ht]={id:Ke.id,stamp:Ke.stamp},Et.context.bindFramebuffer.set(Ke.fbo.framebuffer),Et.context.clear({color:e.aM.transparent,stencil:0}),Et.currentStencilSource=void 0;for(let vr=0;vr{$t.touchstart=$t.dragStart,$t.touchmoveWindow=$t.dragMove,$t.touchend=$t.dragEnd},Oo={showCompass:!0,showZoom:!0,visualizePitch:!1};class Es{constructor(z,ht,Et=!1){this.mousedown=ke=>{this.startMouse(e.e({},ke,{ctrlKey:!0,preventDefault:()=>ke.preventDefault()}),i.mousePos(this.element,ke)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ke=>{this.moveMouse(ke,i.mousePos(this.element,ke))},this.mouseup=ke=>{this.mouseRotate.dragEnd(ke),this.mousePitch&&this.mousePitch.dragEnd(ke),this.offTemp()},this.touchstart=ke=>{ke.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,ke.targetTouches)[0],this.startTouch(ke,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=ke=>{ke.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,ke.targetTouches)[0],this.moveTouch(ke,this._lastPos))},this.touchend=ke=>{ke.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let zt=z.dragRotate._mouseRotate.getClickTolerance(),Ht=z.dragRotate._mousePitch.getClickTolerance();this.element=ht,this.mouseRotate=gc({clickTolerance:zt,enable:!0}),this.touchRotate=(({enable:ke,clickTolerance:Fe,bearingDegreesPerPixelMoved:Ke=.8})=>{let vr=new wf;return new th({clickTolerance:Fe,move:(Dr,Fr)=>({bearingDelta:(Fr.x-Dr.x)*Ke}),moveStateManager:vr,enable:ke,assignEvents:fu})})({clickTolerance:zt,enable:!0}),this.map=z,Et&&(this.mousePitch=Jf({clickTolerance:Ht,enable:!0}),this.touchPitch=(({enable:ke,clickTolerance:Fe,pitchDegreesPerPixelMoved:Ke=-.5})=>{let vr=new wf;return new th({clickTolerance:Fe,move:(Dr,Fr)=>({pitchDelta:(Fr.y-Dr.y)*Ke}),moveStateManager:vr,enable:ke,assignEvents:fu})})({clickTolerance:Ht,enable:!0})),i.addEventListener(ht,"mousedown",this.mousedown),i.addEventListener(ht,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(ht,"touchcancel",this.reset)}startMouse(z,ht){this.mouseRotate.dragStart(z,ht),this.mousePitch&&this.mousePitch.dragStart(z,ht),i.disableDrag()}startTouch(z,ht){this.touchRotate.dragStart(z,ht),this.touchPitch&&this.touchPitch.dragStart(z,ht),i.disableDrag()}moveMouse(z,ht){let Et=this.map,{bearingDelta:zt}=this.mouseRotate.dragMove(z,ht)||{};if(zt&&Et.setBearing(Et.getBearing()+zt),this.mousePitch){let{pitchDelta:Ht}=this.mousePitch.dragMove(z,ht)||{};Ht&&Et.setPitch(Et.getPitch()+Ht)}}moveTouch(z,ht){let Et=this.map,{bearingDelta:zt}=this.touchRotate.dragMove(z,ht)||{};if(zt&&Et.setBearing(Et.getBearing()+zt),this.touchPitch){let{pitchDelta:Ht}=this.touchPitch.dragMove(z,ht)||{};Ht&&Et.setPitch(Et.getPitch()+Ht)}}off(){let z=this.element;i.removeEventListener(z,"mousedown",this.mousedown),i.removeEventListener(z,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(z,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let Kl;function Rl($t,z,ht){let Et=new e.N($t.lng,$t.lat);if($t=new e.N($t.lng,$t.lat),z){let zt=new e.N($t.lng-360,$t.lat),Ht=new e.N($t.lng+360,$t.lat),ke=ht.locationPoint($t).distSqr(z);ht.locationPoint(zt).distSqr(z)180;){let zt=ht.locationPoint($t);if(zt.x>=0&&zt.y>=0&&zt.x<=ht.width&&zt.y<=ht.height)break;$t.lng>ht.center.lng?$t.lng-=360:$t.lng+=360}return $t.lng!==Et.lng&&ht.locationPoint($t).y>ht.height/2-ht.getHorizon()?$t:Et}let vc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Hc($t,z,ht){let Et=$t.classList;for(let zt in vc)Et.remove(`maplibregl-${ht}-anchor-${zt}`);Et.add(`maplibregl-${ht}-anchor-${z}`)}class Lc extends e.E{constructor(z){if(super(),this._onKeyPress=ht=>{let Et=ht.code,zt=ht.charCode||ht.keyCode;Et!=="Space"&&Et!=="Enter"&&zt!==32&&zt!==13||this.togglePopup()},this._onMapClick=ht=>{let Et=ht.originalEvent.target,zt=this._element;this._popup&&(Et===zt||zt.contains(Et))&&this.togglePopup()},this._update=ht=>{var Et;if(!this._map)return;let zt=this._map.loaded()&&!this._map.isMoving();(ht?.type==="terrain"||ht?.type==="render"&&!zt)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Rl(this._lngLat,this._flatPos,this._map.transform):(Et=this._lngLat)===null||Et===void 0?void 0:Et.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Ht="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Ht=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Ht=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ke="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ke="rotateX(0deg)":this._pitchAlignment==="map"&&(ke=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ht&&ht.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${vc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ke} ${Ht}`),o.frameAsync(new AbortController).then(()=>{this._updateOpacity(ht&&ht.type==="moveend")}).catch(()=>{})},this._onMove=ht=>{if(!this._isDragging){let Et=this._clickTolerance||this._map._clickTolerance;this._isDragging=ht.point.dist(this._pointerdownPos)>=Et}this._isDragging&&(this._pos=ht.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.k("dragend")),this._state="inactive"},this._addDragHandler=ht=>{this._element.contains(ht.originalEvent.target)&&(ht.preventDefault(),this._positionDelta=ht.point.sub(this._pos).add(this._offset),this._pointerdownPos=ht.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=z&&z.anchor||"center",this._color=z&&z.color||"#3FB1CE",this._scale=z&&z.scale||1,this._draggable=z&&z.draggable||!1,this._clickTolerance=z&&z.clickTolerance||0,this._subpixelPositioning=z&&z.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=z&&z.rotation||0,this._rotationAlignment=z&&z.rotationAlignment||"auto",this._pitchAlignment=z&&z.pitchAlignment&&z.pitchAlignment!=="auto"?z.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(z?.opacity,z?.opacityWhenCovered),z&&z.element)this._element=z.element,this._offset=e.P.convert(z&&z.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let ht=i.createNS("http://www.w3.org/2000/svg","svg"),Et=41,zt=27;ht.setAttributeNS(null,"display","block"),ht.setAttributeNS(null,"height",`${Et}px`),ht.setAttributeNS(null,"width",`${zt}px`),ht.setAttributeNS(null,"viewBox",`0 0 ${zt} ${Et}`);let Ht=i.createNS("http://www.w3.org/2000/svg","g");Ht.setAttributeNS(null,"stroke","none"),Ht.setAttributeNS(null,"stroke-width","1"),Ht.setAttributeNS(null,"fill","none"),Ht.setAttributeNS(null,"fill-rule","evenodd");let ke=i.createNS("http://www.w3.org/2000/svg","g");ke.setAttributeNS(null,"fill-rule","nonzero");let Fe=i.createNS("http://www.w3.org/2000/svg","g");Fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Fe.setAttributeNS(null,"fill","#000000");let Ke=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let Ae of Ke){let je=i.createNS("http://www.w3.org/2000/svg","ellipse");je.setAttributeNS(null,"opacity","0.04"),je.setAttributeNS(null,"cx","10.5"),je.setAttributeNS(null,"cy","5.80029008"),je.setAttributeNS(null,"rx",Ae.rx),je.setAttributeNS(null,"ry",Ae.ry),Fe.appendChild(je)}let vr=i.createNS("http://www.w3.org/2000/svg","g");vr.setAttributeNS(null,"fill",this._color);let Dr=i.createNS("http://www.w3.org/2000/svg","path");Dr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),vr.appendChild(Dr);let Fr=i.createNS("http://www.w3.org/2000/svg","g");Fr.setAttributeNS(null,"opacity","0.25"),Fr.setAttributeNS(null,"fill","#000000");let un=i.createNS("http://www.w3.org/2000/svg","path");un.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Fr.appendChild(un);let Sn=i.createNS("http://www.w3.org/2000/svg","g");Sn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Sn.setAttributeNS(null,"fill","#FFFFFF");let Xt=i.createNS("http://www.w3.org/2000/svg","g");Xt.setAttributeNS(null,"transform","translate(8.0, 8.0)");let ae=i.createNS("http://www.w3.org/2000/svg","circle");ae.setAttributeNS(null,"fill","#000000"),ae.setAttributeNS(null,"opacity","0.25"),ae.setAttributeNS(null,"cx","5.5"),ae.setAttributeNS(null,"cy","5.5"),ae.setAttributeNS(null,"r","5.4999962");let xe=i.createNS("http://www.w3.org/2000/svg","circle");xe.setAttributeNS(null,"fill","#FFFFFF"),xe.setAttributeNS(null,"cx","5.5"),xe.setAttributeNS(null,"cy","5.5"),xe.setAttributeNS(null,"r","5.4999962"),Xt.appendChild(ae),Xt.appendChild(xe),ke.appendChild(Fe),ke.appendChild(vr),ke.appendChild(Fr),ke.appendChild(Sn),ke.appendChild(Xt),ht.appendChild(ke),ht.setAttributeNS(null,"height",Et*this._scale+"px"),ht.setAttributeNS(null,"width",zt*this._scale+"px"),this._element.appendChild(ht),this._offset=e.P.convert(z&&z.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ht=>{ht.preventDefault()}),this._element.addEventListener("mousedown",ht=>{ht.preventDefault()}),Hc(this._element,this._anchor,"marker"),z&&z.className)for(let ht of z.className.split(" "))this._element.classList.add(ht);this._popup=null}addTo(z){return this.remove(),this._map=z,this._element.setAttribute("aria-label",z._getUIString("Marker.Title")),z.getCanvasContainer().appendChild(this._element),z.on("move",this._update),z.on("moveend",this._update),z.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(z){return this._lngLat=e.N.convert(z),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(z){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),z){if(!("offset"in z.options)){let ht=Math.abs(13.5)/Math.SQRT2;z.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ht,-1*(38.1-13.5+ht)],"bottom-right":[-ht,-1*(38.1-13.5+ht)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=z,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(z){return this._subpixelPositioning=z,this}getPopup(){return this._popup}togglePopup(){let z=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:z?(z.isOpen()?z.remove():(z.setLngLat(this._lngLat),z.addTo(this._map)),this):this}_updateOpacity(z=!1){var ht,Et;if(!(!((ht=this._map)===null||ht===void 0)&&ht.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(z)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let zt=this._map,Ht=zt.terrain.depthAtPoint(this._pos),ke=zt.terrain.getElevationForLngLatZoom(this._lngLat,zt.transform.tileZoom);if(zt.transform.lngLatToCameraDepth(this._lngLat,ke)-Ht<.006)return void(this._element.style.opacity=this._opacity);let Fe=-this._offset.y/zt.transform._pixelPerMeter,Ke=Math.sin(zt.getPitch()*Math.PI/180)*Fe,vr=zt.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Dr=zt.transform.lngLatToCameraDepth(this._lngLat,ke+Ke)-vr>.006;!((Et=this._popup)===null||Et===void 0)&&Et.isOpen()&&Dr&&this._popup.remove(),this._element.style.opacity=Dr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(z){return this._offset=e.P.convert(z),this._update(),this}addClassName(z){this._element.classList.add(z)}removeClassName(z){this._element.classList.remove(z)}toggleClassName(z){return this._element.classList.toggle(z)}setDraggable(z){return this._draggable=!!z,this._map&&(z?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(z){return this._rotation=z||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(z){return this._rotationAlignment=z||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(z){return this._pitchAlignment=z&&z!=="auto"?z:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(z,ht){return z===void 0&&ht===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),z!==void 0&&(this._opacity=z),ht!==void 0&&(this._opacityWhenCovered=ht),this._map&&this._updateOpacity(!0),this}}let Ih={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wc=0,zh=!1,Du={maxWidth:100,unit:"metric"};function Oh($t,z,ht){let Et=ht&&ht.maxWidth||100,zt=$t._container.clientHeight/2,Ht=$t.unproject([0,zt]),ke=$t.unproject([Et,zt]),Fe=Ht.distanceTo(ke);if(ht&&ht.unit==="imperial"){let Ke=3.2808*Fe;Ke>5280?rs(z,Et,Ke/5280,$t._getUIString("ScaleControl.Miles")):rs(z,Et,Ke,$t._getUIString("ScaleControl.Feet"))}else ht&&ht.unit==="nautical"?rs(z,Et,Fe/1852,$t._getUIString("ScaleControl.NauticalMiles")):Fe>=1e3?rs(z,Et,Fe/1e3,$t._getUIString("ScaleControl.Kilometers")):rs(z,Et,Fe,$t._getUIString("ScaleControl.Meters"))}function rs($t,z,ht,Et){let zt=function(Ht){let ke=Math.pow(10,`${Math.floor(Ht)}`.length-1),Fe=Ht/ke;return Fe=Fe>=10?10:Fe>=5?5:Fe>=3?3:Fe>=2?2:Fe>=1?1:function(Ke){let vr=Math.pow(10,Math.ceil(-Math.log(Ke)/Math.LN10));return Math.round(Ke*vr)/vr}(Fe),ke*Fe}(ht);$t.style.width=z*(zt/ht)+"px",$t.innerHTML=`${zt} ${Et}`}let zs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},qc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function $u($t){if($t){if(typeof $t=="number"){let z=Math.round(Math.abs($t)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,$t),"top-left":new e.P(z,z),"top-right":new e.P(-z,z),bottom:new e.P(0,-$t),"bottom-left":new e.P(z,-z),"bottom-right":new e.P(-z,-z),left:new e.P($t,0),right:new e.P(-$t,0)}}if($t instanceof e.P||Array.isArray($t)){let z=e.P.convert($t);return{center:z,top:z,"top-left":z,"top-right":z,bottom:z,"bottom-left":z,"bottom-right":z,left:z,right:z}}return{center:e.P.convert($t.center||[0,0]),top:e.P.convert($t.top||[0,0]),"top-left":e.P.convert($t["top-left"]||[0,0]),"top-right":e.P.convert($t["top-right"]||[0,0]),bottom:e.P.convert($t.bottom||[0,0]),"bottom-left":e.P.convert($t["bottom-left"]||[0,0]),"bottom-right":e.P.convert($t["bottom-right"]||[0,0]),left:e.P.convert($t.left||[0,0]),right:e.P.convert($t.right||[0,0])}}return $u(new e.P(0,0))}let qf=r;t.AJAXError=e.bh,t.Evented=e.E,t.LngLat=e.N,t.MercatorCoordinate=e.Z,t.Point=e.P,t.addProtocol=e.bi,t.config=e.a,t.removeProtocol=e.bj,t.AttributionControl=ps,t.BoxZoomHandler=Vc,t.CanvasSource=pe,t.CooperativeGesturesHandler=Oa,t.DoubleClickZoomHandler=di,t.DragPanHandler=Ba,t.DragRotateHandler=Za,t.EdgeInsets=Mc,t.FullscreenControl=class extends e.E{constructor($t={}){super(),this._onFullscreenChange=()=>{var z;let ht=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((z=ht?.shadowRoot)===null||z===void 0)&&z.fullscreenElement;)ht=ht.shadowRoot.fullscreenElement;ht===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,$t&&$t.container&&($t.container instanceof HTMLElement?this._container=$t.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd($t){return this._map=$t,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let $t=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",$t).setAttribute("aria-hidden","true"),$t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let $t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",$t),this._fullscreenButton.title=$t}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},t.GeoJSONSource=Wt,t.GeolocateControl=class extends e.E{constructor($t){super(),this._onSuccess=z=>{if(this._map){if(this._isOutOfMapMaxBounds(z))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",z)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=z,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(z),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(z),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",z)),this._finish()}},this._updateCamera=z=>{let ht=new e.N(z.coords.longitude,z.coords.latitude),Et=z.coords.accuracy,zt=this._map.getBearing(),Ht=e.e({bearing:zt},this.options.fitBoundsOptions),ke=ut.fromLngLat(ht,Et);this._map.fitBounds(ke,Ht,{geolocateSource:!0})},this._updateMarker=z=>{if(z){let ht=new e.N(z.coords.longitude,z.coords.latitude);this._accuracyCircleMarker.setLngLat(ht).addTo(this._map),this._userLocationDotMarker.setLngLat(ht).addTo(this._map),this._accuracy=z.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=z=>{if(this._map){if(this.options.trackUserLocation)if(z.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(z.code===3&&zh)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",z)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",z=>z.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=z=>{if(this._map){if(z===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ht=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}else{let ht=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ht,this._geolocateButton.setAttribute("aria-label",ht)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Lc({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Lc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ht=>{ht.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ht.originalEvent&&ht.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")),this.fire(new e.k("userlocationlostfocus")))})}},this.options=e.e({},Ih,$t)}onAdd($t){return this._map=$t,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(z=!1){if(Kl!==void 0&&!z)return Kl;if(window.navigator.permissions===void 0)return Kl=!!window.navigator.geolocation,Kl;try{Kl=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Kl=!!window.navigator.geolocation}return Kl})}().then(z=>this._finishSetupUI(z)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Wc=0,zh=!1}_isOutOfMapMaxBounds($t){let z=this._map.getMaxBounds(),ht=$t.coords;return z&&(ht.longitudez.getEast()||ht.latitudez.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let $t=this._map.getBounds(),z=$t.getSouthEast(),ht=$t.getNorthEast(),Et=z.distanceTo(ht),zt=Math.ceil(this._accuracy/(Et/this._map._container.clientHeight)*2);this._circleElement.style.width=`${zt}px`,this._circleElement.style.height=`${zt}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wc--,zh=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.k("trackuserlocationstart")),this.fire(new e.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let $t;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Wc++,Wc>1?($t={maximumAge:6e5,timeout:0},zh=!0):($t=this.options.positionOptions,zh=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,$t)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},t.Hash=vh,t.ImageSource=ge,t.KeyboardHandler=Ur,t.LngLatBounds=ut,t.LogoControl=oo,t.Map=class extends Ko{constructor($t){e.bf.mark(e.bg.create);let z=Object.assign(Object.assign({},Iu),$t);if(z.minZoom!=null&&z.maxZoom!=null&&z.minZoom>z.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(z.minPitch!=null&&z.maxPitch!=null&&z.minPitch>z.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(z.minPitch!=null&&z.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(z.maxPitch!=null&&z.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new bu(z.minZoom,z.maxZoom,z.minPitch,z.maxPitch,z.renderWorldCopies),{bearingSnap:z.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new qa,this._controls=[],this._mapId=e.a4(),this._contextLost=ht=>{ht.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new e.k("webglcontextlost",{originalEvent:ht}))},this._contextRestored=ht=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:ht}))},this._onMapScroll=ht=>{if(ht.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=z.interactive,this._maxTileCacheSize=z.maxTileCacheSize,this._maxTileCacheZoomLevels=z.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=z.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=z.preserveDrawingBuffer===!0,this._antialias=z.antialias===!0,this._trackResize=z.trackResize===!0,this._bearingSnap=z.bearingSnap,this._refreshExpiredTiles=z.refreshExpiredTiles===!0,this._fadeDuration=z.fadeDuration,this._crossSourceCollisions=z.crossSourceCollisions===!0,this._collectResourceTiming=z.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ml),z.locale),this._clickTolerance=z.clickTolerance,this._overridePixelRatio=z.pixelRatio,this._maxCanvasSize=z.maxCanvasSize,this.transformCameraUpdate=z.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=z.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=u.addThrottleControl(()=>this.isMoving()),this._requestManager=new b(z.transformRequest),typeof z.container=="string"){if(this._container=document.getElementById(z.container),!this._container)throw new Error(`Container '${z.container}' not found.`)}else{if(!(z.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=z.container}if(z.maxBounds&&this.setMaxBounds(z.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ht=!1,Et=uf(zt=>{this._trackResize&&!this._removed&&(this.resize(zt),this.redraw())},50);this._resizeObserver=new ResizeObserver(zt=>{ht?Et(zt):ht=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ns(this,z),this._hash=z.hash&&new vh(typeof z.hash=="string"&&z.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:z.center,zoom:z.zoom,bearing:z.bearing,pitch:z.pitch}),z.bounds&&(this.resize(),this.fitBounds(z.bounds,e.e({},z.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=z.localIdeographFontFamily,this._validateStyle=z.validateStyle,z.style&&this.setStyle(z.style,{localIdeographFontFamily:z.localIdeographFontFamily}),z.attributionControl&&this.addControl(new ps(typeof z.attributionControl=="boolean"?void 0:z.attributionControl)),z.maplibreLogo&&this.addControl(new oo,z.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ht=>{this._update(ht.dataType==="style"),this.fire(new e.k(`${ht.dataType}data`,ht))}),this.on("dataloading",ht=>{this.fire(new e.k(`${ht.dataType}dataloading`,ht))}),this.on("dataabort",ht=>{this.fire(new e.k("sourcedataabort",ht))})}_getMapId(){return this._mapId}addControl($t,z){if(z===void 0&&(z=$t.getDefaultPosition?$t.getDefaultPosition():"top-right"),!$t||!$t.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let ht=$t.onAdd(this);this._controls.push($t);let Et=this._controlPositions[z];return z.indexOf("bottom")!==-1?Et.insertBefore(ht,Et.firstChild):Et.appendChild(ht),this}removeControl($t){if(!$t||!$t.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let z=this._controls.indexOf($t);return z>-1&&this._controls.splice(z,1),$t.onRemove(this),this}hasControl($t){return this._controls.indexOf($t)>-1}calculateCameraOptionsFromTo($t,z,ht,Et){return Et==null&&this.terrain&&(Et=this.terrain.getElevationForLngLatZoom(ht,this.transform.tileZoom)),super.calculateCameraOptionsFromTo($t,z,ht,Et)}resize($t){var z;let ht=this._containerDimensions(),Et=ht[0],zt=ht[1],Ht=this._getClampedPixelRatio(Et,zt);if(this._resizeCanvas(Et,zt,Ht),this.painter.resize(Et,zt,Ht),this.painter.overLimit()){let Fe=this.painter.context.gl;this._maxCanvasSize=[Fe.drawingBufferWidth,Fe.drawingBufferHeight];let Ke=this._getClampedPixelRatio(Et,zt);this._resizeCanvas(Et,zt,Ke),this.painter.resize(Et,zt,Ke)}this.transform.resize(Et,zt),(z=this._requestedCameraState)===null||z===void 0||z.resize(Et,zt);let ke=!this._moving;return ke&&(this.stop(),this.fire(new e.k("movestart",$t)).fire(new e.k("move",$t))),this.fire(new e.k("resize",$t)),ke&&this.fire(new e.k("moveend",$t)),this}_getClampedPixelRatio($t,z){let{0:ht,1:Et}=this._maxCanvasSize,zt=this.getPixelRatio(),Ht=$t*zt,ke=z*zt;return Math.min(Ht>ht?ht/Ht:1,ke>Et?Et/ke:1)*zt}getPixelRatio(){var $t;return($t=this._overridePixelRatio)!==null&&$t!==void 0?$t:devicePixelRatio}setPixelRatio($t){this._overridePixelRatio=$t,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds($t){return this.transform.setMaxBounds(ut.convert($t)),this._update()}setMinZoom($t){if(($t=$t??-2)>=-2&&$t<=this.transform.maxZoom)return this.transform.minZoom=$t,this._update(),this.getZoom()<$t&&this.setZoom($t),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom($t){if(($t=$t??22)>=this.transform.minZoom)return this.transform.maxZoom=$t,this._update(),this.getZoom()>$t&&this.setZoom($t),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch($t){if(($t=$t??0)<0)throw new Error("minPitch must be greater than or equal to 0");if($t>=0&&$t<=this.transform.maxPitch)return this.transform.minPitch=$t,this._update(),this.getPitch()<$t&&this.setPitch($t),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch($t){if(($t=$t??60)>85)throw new Error("maxPitch must be less than or equal to 85");if($t>=this.transform.minPitch)return this.transform.maxPitch=$t,this._update(),this.getPitch()>$t&&this.setPitch($t),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies($t){return this.transform.renderWorldCopies=$t,this._update()}project($t){return this.transform.locationPoint(e.N.convert($t),this.style&&this.terrain)}unproject($t){return this.transform.pointLocation(e.P.convert($t),this.terrain)}isMoving(){var $t;return this._moving||(($t=this.handlers)===null||$t===void 0?void 0:$t.isMoving())}isZooming(){var $t;return this._zooming||(($t=this.handlers)===null||$t===void 0?void 0:$t.isZooming())}isRotating(){var $t;return this._rotating||(($t=this.handlers)===null||$t===void 0?void 0:$t.isRotating())}_createDelegatedListener($t,z,ht){if($t==="mouseenter"||$t==="mouseover"){let Et=!1;return{layers:z,listener:ht,delegates:{mousemove:zt=>{let Ht=z.filter(Fe=>this.getLayer(Fe)),ke=Ht.length!==0?this.queryRenderedFeatures(zt.point,{layers:Ht}):[];ke.length?Et||(Et=!0,ht.call(this,new Qc($t,this,zt.originalEvent,{features:ke}))):Et=!1},mouseout:()=>{Et=!1}}}}if($t==="mouseleave"||$t==="mouseout"){let Et=!1;return{layers:z,listener:ht,delegates:{mousemove:zt=>{let Ht=z.filter(ke=>this.getLayer(ke));(Ht.length!==0?this.queryRenderedFeatures(zt.point,{layers:Ht}):[]).length?Et=!0:Et&&(Et=!1,ht.call(this,new Qc($t,this,zt.originalEvent)))},mouseout:zt=>{Et&&(Et=!1,ht.call(this,new Qc($t,this,zt.originalEvent)))}}}}{let Et=zt=>{let Ht=z.filter(Fe=>this.getLayer(Fe)),ke=Ht.length!==0?this.queryRenderedFeatures(zt.point,{layers:Ht}):[];ke.length&&(zt.features=ke,ht.call(this,zt),delete zt.features)};return{layers:z,listener:ht,delegates:{[$t]:Et}}}}_saveDelegatedListener($t,z){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[$t]=this._delegatedListeners[$t]||[],this._delegatedListeners[$t].push(z)}_removeDelegatedListener($t,z,ht){if(!this._delegatedListeners||!this._delegatedListeners[$t])return;let Et=this._delegatedListeners[$t];for(let zt=0;ztz.includes(ke))){for(let ke in Ht.delegates)this.off(ke,Ht.delegates[ke]);return void Et.splice(zt,1)}}}on($t,z,ht){if(ht===void 0)return super.on($t,z);let Et=this._createDelegatedListener($t,typeof z=="string"?[z]:z,ht);this._saveDelegatedListener($t,Et);for(let zt in Et.delegates)this.on(zt,Et.delegates[zt]);return this}once($t,z,ht){if(ht===void 0)return super.once($t,z);let Et=typeof z=="string"?[z]:z,zt=this._createDelegatedListener($t,Et,ht);for(let Ht in zt.delegates){let ke=zt.delegates[Ht];zt.delegates[Ht]=(...Fe)=>{this._removeDelegatedListener($t,Et,ht),ke(...Fe)}}this._saveDelegatedListener($t,zt);for(let Ht in zt.delegates)this.once(Ht,zt.delegates[Ht]);return this}off($t,z,ht){return ht===void 0?super.off($t,z):(this._removeDelegatedListener($t,typeof z=="string"?[z]:z,ht),this)}queryRenderedFeatures($t,z){if(!this.style)return[];let ht,Et=$t instanceof e.P||Array.isArray($t),zt=Et?$t:[[0,0],[this.transform.width,this.transform.height]];if(z=z||(Et?{}:$t)||{},zt instanceof e.P||typeof zt[0]=="number")ht=[e.P.convert(zt)];else{let Ht=e.P.convert(zt[0]),ke=e.P.convert(zt[1]);ht=[Ht,new e.P(ke.x,Ht.y),ke,new e.P(Ht.x,ke.y),Ht]}return this.style.queryRenderedFeatures(ht,z,this.transform)}querySourceFeatures($t,z){return this.style.querySourceFeatures($t,z)}setStyle($t,z){return(z=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},z)).diff!==!1&&z.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&$t?(this._diffStyle($t,z),this):(this._localIdeographFontFamily=z.localIdeographFontFamily,this._updateStyle($t,z))}setTransformRequest($t){return this._requestManager.setTransformRequest($t),this}_getUIString($t){let z=this._locale[$t];if(z==null)throw new Error(`Missing UI string '${$t}'`);return z}_updateStyle($t,z){if(z.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle($t,z));let ht=this.style&&z.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!$t)),$t?(this.style=new Yr(this,z||{}),this.style.setEventedParent(this,{style:this.style}),typeof $t=="string"?this.style.loadURL($t,z,ht):this.style.loadJSON($t,z,ht),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Yr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle($t,z){if(typeof $t=="string"){let ht=this._requestManager.transformRequest($t,"Style");e.h(ht,new AbortController).then(Et=>{this._updateDiff(Et.data,z)}).catch(Et=>{Et&&this.fire(new e.j(Et))})}else typeof $t=="object"&&this._updateDiff($t,z)}_updateDiff($t,z){try{this.style.setState($t,z)&&this._update(!0)}catch(ht){e.w(`Unable to perform style diff: ${ht.message||ht.error||ht}. Rebuilding the style from scratch.`),this._updateStyle($t,z)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource($t,z){return this._lazyInitEmptyStyle(),this.style.addSource($t,z),this._update(!0)}isSourceLoaded($t){let z=this.style&&this.style.sourceCaches[$t];if(z!==void 0)return z.loaded();this.fire(new e.j(new Error(`There is no source with ID '${$t}'`)))}setTerrain($t){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),$t){let z=this.style.sourceCaches[$t.source];if(!z)throw new Error(`cannot load terrain, because there exists no source with ID: ${$t.source}`);this.terrain===null&&z.reload();for(let ht in this.style._layers){let Et=this.style._layers[ht];Et.type==="hillshade"&&Et.source===$t.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Pl(this.painter,z,$t),this.painter.renderToTexture=new lu(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ht=>{ht.dataType==="style"?this.terrain.sourceCache.freeRtt():ht.dataType==="source"&&ht.tile&&(ht.sourceId!==$t.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ht.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:$t})),this}getTerrain(){var $t,z;return(z=($t=this.terrain)===null||$t===void 0?void 0:$t.options)!==null&&z!==void 0?z:null}areTilesLoaded(){let $t=this.style&&this.style.sourceCaches;for(let z in $t){let ht=$t[z]._tiles;for(let Et in ht){let zt=ht[Et];if(zt.state!=="loaded"&&zt.state!=="errored")return!1}}return!0}removeSource($t){return this.style.removeSource($t),this._update(!0)}getSource($t){return this.style.getSource($t)}addImage($t,z,ht={}){let{pixelRatio:Et=1,sdf:zt=!1,stretchX:Ht,stretchY:ke,content:Fe,textFitWidth:Ke,textFitHeight:vr}=ht;if(this._lazyInitEmptyStyle(),!(z instanceof HTMLImageElement||e.b(z))){if(z.width===void 0||z.height===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Dr,height:Fr,data:un}=z,Sn=z;return this.style.addImage($t,{data:new e.R({width:Dr,height:Fr},new Uint8Array(un)),pixelRatio:Et,stretchX:Ht,stretchY:ke,content:Fe,textFitWidth:Ke,textFitHeight:vr,sdf:zt,version:0,userImage:Sn}),Sn.onAdd&&Sn.onAdd(this,$t),this}}{let{width:Dr,height:Fr,data:un}=o.getImageData(z);this.style.addImage($t,{data:new e.R({width:Dr,height:Fr},un),pixelRatio:Et,stretchX:Ht,stretchY:ke,content:Fe,textFitWidth:Ke,textFitHeight:vr,sdf:zt,version:0})}}updateImage($t,z){let ht=this.style.getImage($t);if(!ht)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Et=z instanceof HTMLImageElement||e.b(z)?o.getImageData(z):z,{width:zt,height:Ht,data:ke}=Et;if(zt===void 0||Ht===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(zt!==ht.data.width||Ht!==ht.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Fe=!(z instanceof HTMLImageElement||e.b(z));return ht.data.replace(ke,Fe),this.style.updateImage($t,ht),this}getImage($t){return this.style.getImage($t)}hasImage($t){return $t?!!this.style.getImage($t):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage($t){this.style.removeImage($t)}loadImage($t){return u.getImage(this._requestManager.transformRequest($t,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer($t,z){return this._lazyInitEmptyStyle(),this.style.addLayer($t,z),this._update(!0)}moveLayer($t,z){return this.style.moveLayer($t,z),this._update(!0)}removeLayer($t){return this.style.removeLayer($t),this._update(!0)}getLayer($t){return this.style.getLayer($t)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange($t,z,ht){return this.style.setLayerZoomRange($t,z,ht),this._update(!0)}setFilter($t,z,ht={}){return this.style.setFilter($t,z,ht),this._update(!0)}getFilter($t){return this.style.getFilter($t)}setPaintProperty($t,z,ht,Et={}){return this.style.setPaintProperty($t,z,ht,Et),this._update(!0)}getPaintProperty($t,z){return this.style.getPaintProperty($t,z)}setLayoutProperty($t,z,ht,Et={}){return this.style.setLayoutProperty($t,z,ht,Et),this._update(!0)}getLayoutProperty($t,z){return this.style.getLayoutProperty($t,z)}setGlyphs($t,z={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs($t,z),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite($t,z,ht={}){return this._lazyInitEmptyStyle(),this.style.addSprite($t,z,ht,Et=>{Et||this._update(!0)}),this}removeSprite($t){return this._lazyInitEmptyStyle(),this.style.removeSprite($t),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite($t,z={}){return this._lazyInitEmptyStyle(),this.style.setSprite($t,z,ht=>{ht||this._update(!0)}),this}setLight($t,z={}){return this._lazyInitEmptyStyle(),this.style.setLight($t,z),this._update(!0)}getLight(){return this.style.getLight()}setSky($t){return this._lazyInitEmptyStyle(),this.style.setSky($t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState($t,z){return this.style.setFeatureState($t,z),this._update()}removeFeatureState($t,z){return this.style.removeFeatureState($t,z),this._update()}getFeatureState($t){return this.style.getFeatureState($t)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let $t=0,z=0;return this._container&&($t=this._container.clientWidth||400,z=this._container.clientHeight||300),[$t,z]}_setupContainer(){let $t=this._container;$t.classList.add("maplibregl-map");let z=this._canvasContainer=i.create("div","maplibregl-canvas-container",$t);this._interactive&&z.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",z),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let ht=this._containerDimensions(),Et=this._getClampedPixelRatio(ht[0],ht[1]);this._resizeCanvas(ht[0],ht[1],Et);let zt=this._controlContainer=i.create("div","maplibregl-control-container",$t),Ht=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ke=>{Ht[ke]=i.create("div",`maplibregl-ctrl-${ke} `,zt)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas($t,z,ht){this._canvas.width=Math.floor(ht*$t),this._canvas.height=Math.floor(ht*z),this._canvas.style.width=`${$t}px`,this._canvas.style.height=`${z}px`}_setupPainter(){let $t={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},z=null;this._canvas.addEventListener("webglcontextcreationerror",Et=>{z={requestedAttributes:$t},Et&&(z.statusMessage=Et.statusMessage,z.type=Et.type)},{once:!0});let ht=this._canvas.getContext("webgl2",$t)||this._canvas.getContext("webgl",$t);if(!ht){let Et="Failed to initialize WebGL";throw z?(z.message=Et,new Error(JSON.stringify(z))):new Error(Et)}this.painter=new Wh(ht,this.transform),l.testSupport(ht)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update($t){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||$t,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame($t){return this._update(),this._renderTaskQueue.add($t)}_cancelRenderFrame($t){this._renderTaskQueue.remove($t)}_render($t){let z=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run($t),this._removed)return;let ht=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let zt=this.transform.zoom,Ht=o.now();this.style.zoomHistory.update(zt,Ht);let ke=new e.z(zt,{now:Ht,fadeDuration:z,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Fe=ke.crossFadingFactor();Fe===1&&Fe===this._crossFadingFactor||(ht=!0,this._crossFadingFactor=Fe),this.style.update(ke)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,z,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:z,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.bf.mark(e.bg.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||ht)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Et=this._sourcesDirty||this._styleDirty||this._placementDirty;return Et||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||Et||(this._fullyLoaded=!0,e.bf.mark(e.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var $t;this._hash&&this._hash.remove();for(let ht of this._controls)ht.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),u.removeThrottleControl(this._imageQueueHandle),($t=this._resizeObserver)===null||$t===void 0||$t.disconnect();let z=this.painter.context.gl.getExtension("WEBGL_lose_context");z!=null&&z.loseContext&&z.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),e.bf.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,o.frameAsync(this._frameRequest).then($t=>{e.bf.frame($t),this._frameRequest=null,this._render($t)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries($t){this._showTileBoundaries!==$t&&(this._showTileBoundaries=$t,this._update())}get showPadding(){return!!this._showPadding}set showPadding($t){this._showPadding!==$t&&(this._showPadding=$t,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes($t){this._showCollisionBoxes!==$t&&(this._showCollisionBoxes=$t,$t?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector($t){this._showOverdrawInspector!==$t&&(this._showOverdrawInspector=$t,this._update())}get repaint(){return!!this._repaint}set repaint($t){this._repaint!==$t&&(this._repaint=$t,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices($t){this._vertices=$t,this._update()}get version(){return qu}getCameraTargetElevation(){return this.transform.elevation}},t.MapMouseEvent=Qc,t.MapTouchEvent=ff,t.MapWheelEvent=Pf,t.Marker=Lc,t.NavigationControl=class{constructor($t){this._updateZoomButtons=()=>{let z=this._map.getZoom(),ht=z===this._map.getMaxZoom(),Et=z===this._map.getMinZoom();this._zoomInButton.disabled=ht,this._zoomOutButton.disabled=Et,this._zoomInButton.setAttribute("aria-disabled",ht.toString()),this._zoomOutButton.setAttribute("aria-disabled",Et.toString())},this._rotateCompassArrow=()=>{let z=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=z},this._setButtonTitle=(z,ht)=>{let Et=this._map._getUIString(`NavigationControl.${ht}`);z.title=Et,z.setAttribute("aria-label",Et)},this.options=e.e({},Oo,$t),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",z=>z.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",z=>this._map.zoomIn({},{originalEvent:z})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",z=>this._map.zoomOut({},{originalEvent:z})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",z=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:z}):this._map.resetNorth({},{originalEvent:z})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd($t){return this._map=$t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Es(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton($t,z){let ht=i.create("button",$t,this._container);return ht.type="button",ht.addEventListener("click",z),ht}},t.Popup=class extends e.E{constructor($t){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.k("close"))),this),this._onMouseUp=z=>{this._update(z.point)},this._onMouseMove=z=>{this._update(z.point)},this._onDrag=z=>{this._update(z.point)},this._update=z=>{var ht;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Fe of this.options.className.split(" "))this._container.classList.add(Fe);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Rl(this._lngLat,this._flatPos,this._map.transform):(ht=this._lngLat)===null||ht===void 0?void 0:ht.wrap(),this._trackPointer&&!z)return;let Et=this._flatPos=this._pos=this._trackPointer&&z?z:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&z?z:this._map.transform.locationPoint(this._lngLat));let zt=this.options.anchor,Ht=$u(this.options.offset);if(!zt){let Fe=this._container.offsetWidth,Ke=this._container.offsetHeight,vr;vr=Et.y+Ht.bottom.ythis._map.transform.height-Ke?["bottom"]:[],Et.xthis._map.transform.width-Fe/2&&vr.push("right"),zt=vr.length===0?"bottom":vr.join("-")}let ke=Et.add(Ht[zt]);this.options.subpixelPositioning||(ke=ke.round()),i.setTransform(this._container,`${vc[zt]} translate(${ke.x}px,${ke.y}px)`),Hc(this._container,zt,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(zs),$t)}addTo($t){return this._map&&this.remove(),this._map=$t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat($t){return this._lngLat=e.N.convert($t),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText($t){return this.setDOMContent(document.createTextNode($t))}setHTML($t){let z=document.createDocumentFragment(),ht=document.createElement("body"),Et;for(ht.innerHTML=$t;Et=ht.firstChild,Et;)z.appendChild(Et);return this.setDOMContent(z)}getMaxWidth(){var $t;return($t=this._container)===null||$t===void 0?void 0:$t.style.maxWidth}setMaxWidth($t){return this.options.maxWidth=$t,this._update(),this}setDOMContent($t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild($t),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName($t){return this._container&&this._container.classList.add($t),this}removeClassName($t){return this._container&&this._container.classList.remove($t),this}setOffset($t){return this.options.offset=$t,this._update(),this}toggleClassName($t){if(this._container)return this._container.classList.toggle($t)}setSubpixelPositioning($t){this.options.subpixelPositioning=$t}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let $t=this._container.querySelector(qc);$t&&$t.focus()}},t.RasterDEMTileSource=qt,t.RasterTileSource=Pt,t.ScaleControl=class{constructor($t){this._onMove=()=>{Oh(this._map,this._container,this.options)},this.setUnit=z=>{this.options.unit=z,Oh(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Du),$t)}getDefaultPosition(){return"bottom-left"}onAdd($t){return this._map=$t,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",$t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},t.ScrollZoomHandler=qn,t.Style=Yr,t.TerrainControl=class{constructor($t){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=$t}onAdd($t){return this._map=$t,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},t.TwoFingersTouchPitchHandler=Wf,t.TwoFingersTouchRotateHandler=df,t.TwoFingersTouchZoomHandler=iu,t.TwoFingersTouchZoomRotateHandler=ca,t.VectorTileSource=It,t.VideoSource=fe,t.addSourceType=($t,z)=>e._(void 0,void 0,void 0,function*(){if(Tt($t))throw new Error(`A source type called "${$t}" already exists.`);((ht,Et)=>{se[ht]=Et})($t,z)}),t.clearPrewarmedResources=function(){let $t=st;$t&&($t.isPreloaded()&&$t.numActive()===1?($t.release(lt),st=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},t.getMaxParallelImageRequests=function(){return e.a.MAX_PARALLEL_IMAGE_REQUESTS},t.getRTLTextPluginStatus=function(){return ve().getRTLTextPluginStatus()},t.getVersion=function(){return qf},t.getWorkerCount=function(){return yt.workerCount},t.getWorkerUrl=function(){return e.a.WORKER_URL},t.importScriptInWorkers=function($t){return at().broadcast("IS",$t)},t.prewarm=function(){dt().acquire(lt)},t.setMaxParallelImageRequests=function($t){e.a.MAX_PARALLEL_IMAGE_REQUESTS=$t},t.setRTLTextPlugin=function($t,z){return ve().setRTLTextPlugin($t,z)},t.setWorkerCount=function($t){yt.workerCount=$t},t.setWorkerUrl=function($t){e.a.WORKER_URL=$t}});var S=c;return S})}),JW=Dt((Q,Z)=>{var c=kn(),g=ec().sanitizeHTML,I=LE(),S=G1();function t(o,i){this.subplot=o,this.uid=o.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=t.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=r(o)},e.needsNewImage=function(o){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&o.sourcetype==="image"&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},e.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},e.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(o){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var l=this.findFollowingMapLayerId(this.lookupBelow());l!==null&&this.subplot.map.moveLayer(this.idLayer,l)},e.updateSource=function(o){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,!!r(o)){var l=n(o);i.addSource(this.idSource,l)}},e.findFollowingMapLayerId=function(o){if(o==="traces")for(var i=this.subplot.getMapLayers(),l=0;l0){for(var l=0;l0}function a(o){var i={},l={};switch(o.type){case"circle":c.extendFlat(l,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":c.extendFlat(l,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":c.extendFlat(l,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var f=o.symbol,x=I(f.textposition,f.iconsize);c.extendFlat(i,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":x.anchor,"text-offset":x.offset,"symbol-placement":f.placement}),c.extendFlat(l,{"icon-color":o.color,"text-color":f.textfont.color,"text-opacity":o.opacity});break;case"raster":c.extendFlat(l,{"raster-fade-duration":0,"raster-opacity":o.opacity});break}return{layout:i,paint:l}}function n(o){var i=o.sourcetype,l=o.source,f={type:i},x;return i==="geojson"?x="data":i==="vector"?x=typeof l=="string"?"url":"tiles":i==="raster"?(x="tiles",f.tileSize=256):i==="image"&&(x="url",f.coordinates=o.coordinates),f[x]=l,o.sourceattribution&&(f.attribution=g(o.sourceattribution)),f}Z.exports=function(o,i,l){var f=new t(o,i);return f.update(l),f}}),QW=Dt((Q,Z)=>{var c=XW(),g=kn(),I=W1(),S=Jo(),t=Ls(),e=up(),r=tf(),a=v0(),n=a.drawMode,o=a.selectMode,i=vf().prepSelect,l=vf().clearOutline,f=vf().clearSelectionsCache,x=vf().selectOnClick,y=G1(),v=JW();function T(C,A){this.id=A,this.gd=C;var h=C._fullLayout,p=C._context;this.container=h._glcontainer.node(),this.isStatic=p.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=T.prototype;u.plot=function(C,A,h){var p=this,k;p.map?k=new Promise(function(w,R){p.updateMap(C,A,w,R)}):k=new Promise(function(w,R){p.createMap(C,A,w,R)}),h.push(k)},u.createMap=function(C,A,h,p){var k=this,w=A[k.id],R=k.styleObj=_(w.style),O=w.bounds,j=O?[[O.west,O.south],[O.east,O.north]]:null,V=k.map=new c.Map({container:k.div,style:R.style,center:M(w.center),zoom:w.zoom,bearing:w.bearing,pitch:w.pitch,maxBounds:j,interactive:!k.isStatic,preserveDrawingBuffer:k.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new c.AttributionControl({compact:!0})),H={};V.on("styleimagemissing",function(U){var W=U.id;if(!H[W]&&W.includes("-15")){H[W]=!0;var q=new Image(15,15);q.onload=function(){V.addImage(W,q)},q.crossOrigin="Anonymous",q.src="https://unpkg.com/maki@2.1.0/icons/"+W+".svg"}}),V.setTransformRequest(function(U){return U=U.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),U=U.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:U}}),V._canvas.style.left="0px",V._canvas.style.top="0px",k.rejectOnError(p),k.isStatic||k.initFx(C,A);var F=[];F.push(new Promise(function(U){V.once("load",U)})),F=F.concat(I.fetchTraceGeoData(C)),Promise.all(F).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.updateMap=function(C,A,h,p){var k=this,w=k.map,R=A[this.id];k.rejectOnError(p);var O=[],j=_(R.style);JSON.stringify(k.styleObj)!==JSON.stringify(j)&&(k.styleObj=j,w.setStyle(j.style),k.traceHash={},O.push(new Promise(function(V){w.once("styledata",V)}))),O=O.concat(I.fetchTraceGeoData(C)),Promise.all(O).then(function(){k.fillBelowLookup(C,A),k.updateData(C),k.updateLayout(A),k.resolveOnRender(h)}).catch(p)},u.fillBelowLookup=function(C,A){var h=A[this.id],p=h.layers,k,w,R=this.belowLookup={},O=!1;for(k=0;k1)for(k=0;k-1&&x(j.originalEvent,p,[h.xaxis],[h.yaxis],h.id,O),V.indexOf("event")>-1&&r.click(p,j.originalEvent)}}},u.updateFx=function(C){var A=this,h=A.map,p=A.gd;if(A.isStatic)return;function k(j){var V=A.map.unproject(j);return[V.lng,V.lat]}var w=C.dragmode,R;R=function(j,V){if(V.isRect){var H=j.range={};H[A.id]=[k([V.xmin,V.ymin]),k([V.xmax,V.ymax])]}else{var F=j.lassoPoints={};F[A.id]=V.map(k)}};var O=A.dragOptions;A.dragOptions=g.extendDeep(O||{},{dragmode:C.dragmode,element:A.div,gd:p,plotinfo:{id:A.id,domain:C[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:R},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),h.off("click",A.onClickInPanHandler),o(w)||n(w)?(h.dragPan.disable(),h.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(j,V,H){i(j,V,H,A.dragOptions,w)},e.init(A.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),h.on("click",A.onClickInPanHandler))},u.updateFramework=function(C){var A=C[this.id].domain,h=C._size,p=this.div.style;p.width=h.w*(A.x[1]-A.x[0])+"px",p.height=h.h*(A.y[1]-A.y[0])+"px",p.left=h.l+A.x[0]*h.w+"px",p.top=h.t+(1-A.y[1])*h.h+"px",this.xaxis._offset=h.l+A.x[0]*h.w,this.xaxis._length=h.w*(A.x[1]-A.x[0]),this.yaxis._offset=h.t+(1-A.y[1])*h.h,this.yaxis._length=h.h*(A.y[1]-A.y[0])},u.updateLayers=function(C){var A=C[this.id],h=A.layers,p=this.layerList,k;if(h.length!==p.length){for(k=0;k{var c=kn(),g=z1(),I=Ad(),S=I3();Z.exports=function(r,a,n){g(r,a,n,{type:"map",attributes:S,handleDefaults:t,partition:"y"})};function t(r,a,n){n("style"),n("center.lon"),n("center.lat"),n("zoom"),n("bearing"),n("pitch");var o=n("bounds.west"),i=n("bounds.east"),l=n("bounds.south"),f=n("bounds.north");(o===void 0||i===void 0||l===void 0||f===void 0)&&delete a.bounds,I(r,a,{name:"layers",handleItemDefaults:e}),a._input=r}function e(r,a){function n(y,v){return c.coerce(r,a,S.layers,y,v)}var o=n("visible");if(o){var i=n("sourcetype"),l=i==="raster"||i==="image";n("source"),n("sourceattribution"),i==="vector"&&n("sourcelayer"),i==="image"&&n("coordinates");var f;l&&(f="raster");var x=n("type",f);l&&x!=="raster"&&(x=a.type="raster",c.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),x==="circle"&&n("circle.radius"),x==="line"&&(n("line.width"),n("line.dash")),x==="fill"&&n("fill.outlinecolor"),x==="symbol"&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),c.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}}),AT=Dt(Q=>{var Z=kn(),c=Z.strTranslate,g=Z.strScale,I=ud().getSubplotCalcData,S=Dp(),t=qr(),e=Vs(),r=ec(),a=QW(),n="map";Q.name=n,Q.attr="subplot",Q.idRoot=n,Q.idRegex=Q.attrRegex=Z.counterRegex(n),Q.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Q.layoutAttributes=I3(),Q.supplyLayoutDefaults=tq(),Q.plot=function(o){for(var i=o._fullLayout,l=o.calcdata,f=i._subplots[n],x=0;xh/2){var p=P.split("|").join("
");C.text(p).attr("data-unformatted",p).call(r.convertToTspans,o),A=e.bBox(C.node())}C.attr("transform",c(-3,-A.height+8)),M.insert("rect",".static-attribution").attr({x:-A.width-6,y:-A.height-3,width:A.width+6,height:A.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;A.width+6>h&&(k=h/(A.width+6));var w=[f.l+f.w*v.x[1],f.t+f.h*(1-v.y[0])];M.attr("transform",c(w[0],w[1])+g(k))}},Q.updateFx=function(o){for(var i=o._fullLayout,l=i._subplots[n],f=0;f{Z.exports={attributes:kT(),supplyDefaults:$W(),colorbar:xo(),formatLabels:CE(),calc:tT(),plot:GW(),hoverPoints:TT().hoverPoints,eventData:YW(),selectPoints:KW(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.update(g)}},moduleType:"trace",name:"scattermap",basePlotModule:AT(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}),rq=Dt((Q,Z)=>{Z.exports=eq()}),PE=Dt((Q,Z)=>{var c=gb(),g=kc(),{hovertemplateAttrs:I,templatefallbackAttrs:S}=Zu(),t=Ho(),e=Ia().extendFlat;Z.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},c.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c.text,hovertext:c.hovertext,marker:{line:{color:e({},c.marker.line.color,{editType:"plot"}),width:e({},c.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},c.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},c.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},c.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c.hoverinfo,hovertemplate:I({},{keys:["properties"]}),hovertemplatefallback:S(),showlegend:e({},t.showlegend,{dflt:!1})},g("",{cLetter:"z",editTypeOverride:"calc"}))}),nq=Dt((Q,Z)=>{var c=kn(),g=mc(),I=PE();Z.exports=function(S,t,e,r){function a(f,x){return c.coerce(S,t,I,f,x)}var n=a("locations"),o=a("z"),i=a("geojson");if(!c.isArrayOrTypedArray(n)||!n.length||!c.isArrayOrTypedArray(o)||!o.length||!(typeof i=="string"&&i!==""||c.isPlainObject(i))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(n.length,o.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),g(S,t,r,a,{prefix:"",cLetter:"z"}),c.coerceSelectionMarkerOpacity(t,a)}}),IE=Dt((Q,Z)=>{var c=Yi(),g=kn(),I=Xc(),S=Vs(),t=H1().makeBlank,e=W1();function r(n){var o=n[0].trace,i=o.visible===!0&&o._length!==0,l={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},x=o._opts={fill:l,line:f,geojson:t()};if(!i)return x;var y=e.extractTraceFeature(n);if(!y)return x;var v=I.makeColorScaleFuncFromTrace(o),T=o.marker,u=T.line||{},b;g.isArrayOrTypedArray(T.opacity)&&(b=function(k){var w=k.mo;return c(w)?+g.constrain(w,0,1):0});var _;g.isArrayOrTypedArray(u.color)&&(_=function(k){return k.mlc});var P;g.isArrayOrTypedArray(u.width)&&(P=function(k){return k.mlw});for(var M=0;M{var c=IE().convert,g=IE().convertOnSelect,I=G1().traceLayerPrefix;function S(e,r){this.type="choroplethmap",this.subplot=e,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",I+r+"-fill"],["line",I+r+"-line"]],this.below=null}var t=S.prototype;t.update=function(e){this._update(c(e)),e[0].trace._glTrace=this},t.updateOnSelect=function(e){this._update(g(e))},t._update=function(e){var r=this.subplot,a=this.layerList,n=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var o=0;o=0;a--)e.removeLayer(r[a][1])},t.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},Z.exports=function(e,r){var a=r[0].trace,n=new S(e,a.uid),o=n.sourceId,i=c(r),l=n.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(o,{type:"geojson",data:i.geojson}),n._addLayers(i,l),r[0].trace._glTrace=n,n}}),aq=Dt((Q,Z)=>{Z.exports={attributes:PE(),supplyDefaults:nq(),colorbar:I1(),calc:iT(),plot:iq(),hoverPoints:oT(),eventData:sT(),selectPoints:lT(),styleOnSelect:function(c,g){if(g){var I=g[0].trace;I._glTrace.updateOnSelect(g)}},getBelow:function(c,g){for(var I=g.getMapLayers(),S=I.length-2;S>=0;S--){var t=I[S].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var e=S+1;e{Z.exports=aq()}),zE=Dt((Q,Z)=>{var c=kc(),{hovertemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ho(),t=kT(),e=Ia().extendFlat;Z.exports=e({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:e({},S.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:g(),hovertemplatefallback:I(),showlegend:e({},S.showlegend,{dflt:!1})},c("",{cLetter:"z",editTypeOverride:"calc"}))}),sq=Dt((Q,Z)=>{var c=kn(),g=mc(),I=zE();Z.exports=function(S,t,e,r){function a(l,f){return c.coerce(S,t,I,l,f)}var n=a("lon")||[],o=a("lat")||[],i=Math.min(n.length,o.length);if(!i){t.visible=!1;return}t._length=i,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),g(S,t,r,a,{prefix:"",cLetter:"z"})}}),lq=Dt((Q,Z)=>{var c=Yi(),g=kn().isArrayOrTypedArray,I=Ca().BADNUM,S=Xd(),t=kn()._;Z.exports=function(e,r){for(var a=r._length,n=new Array(a),o=r.z,i=g(o)&&o.length,l=0;l{var c=Yi(),g=kn(),I=hi(),S=Xc(),t=Ca().BADNUM,e=H1().makeBlank;Z.exports=function(r){var a=r[0].trace,n=a.visible===!0&&a._length!==0,o={layout:{visibility:"none"},paint:{}},i=a._opts={heatmap:o,geojson:e()};if(!n)return i;var l=[],f,x=a.z,y=a.radius,v=g.isArrayOrTypedArray(x)&&x.length,T=g.isArrayOrTypedArray(y);for(f=0;f0?+y[f]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:_})}}var M=S.extractOpts(a),C=M.reversescale?S.flipScale(M.colorscale):M.colorscale,A=C[0][1],h=I.opacity(A)<1?A:I.addOpacity(A,0),p=["interpolate",["linear"],["heatmap-density"],0,h];for(f=1;f{var c=uq(),g=G1().traceLayerPrefix;function I(t,e){this.type="densitymap",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",g+e+"-heatmap"]],this.below=null}var S=I.prototype;S.update=function(t){var e=this.subplot,r=this.layerList,a=c(t),n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(a.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(a,n),this.below=n);for(var o=0;o=0;r--)t.removeLayer(e[r][1])},S.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(t,e){var r=e[0].trace,a=new I(t,r.uid),n=a.sourceId,o=c(e),i=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(n,{type:"geojson",data:o.geojson}),a._addLayers(o,i),a}}),hq=Dt((Q,Z)=>{var c=Ls(),g=TT().hoverPoints,I=TT().getExtraText;Z.exports=function(S,t,e){var r=g(S,t,e);if(r){var a=r[0],n=a.cd,o=n[0].trace,i=n[a.index];if(delete a.color,"z"in i){var l=a.subplot.mockAxis;a.z=i.z,a.zLabel=c.tickText(l,l.c2l(i.z),"hover").text}return a.extraText=I(o,i,n[0].t.labels),[a]}}}),fq=Dt((Q,Z)=>{Z.exports=function(c,g){return c.lon=g.lon,c.lat=g.lat,c.z=g.z,c}}),dq=Dt((Q,Z)=>{Z.exports={attributes:zE(),supplyDefaults:sq(),colorbar:I1(),formatLabels:CE(),calc:lq(),plot:cq(),hoverPoints:hq(),eventData:fq(),getBelow:function(c,g){for(var I=g.getMapLayers(),S=0;S{Z.exports=dq()}),OE=Dt((Q,Z)=>{var c=da(),g=Ho(),I=wi(),S=us(),t=jh().attributes,{hovertemplateAttrs:e,templatefallbackAttrs:r}=Zu(),a=kc(),n=mu().templatedArray,o=dh().descriptionOnlyNumbers,i=Ia().extendFlat,l=Yc().overrideAll;Z.exports=l({hoverinfo:i({},g.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:S.hoverlabel,domain:t({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:o("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:c({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:I.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:I.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:S.hoverlabel,hovertemplate:e({},{keys:["value","label"]}),hovertemplatefallback:r(),colorscales:n("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:i(a().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}),mq=Dt((Q,Z)=>{var c=kn(),g=OE(),I=hi(),S=ro(),t=jh().defaults,e=Tg(),r=mu(),a=Ad();Z.exports=function(o,i,l,f){function x(R,O){return c.coerce(o,i,g,R,O)}var y=c.extendDeep(f.hoverlabel,o.hoverlabel),v=o.node,T=r.newContainer(i,"node");function u(R,O){return c.coerce(v,T,g.node,R,O)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",o.hoverinfo),e(v,T,u,y),u("hovertemplate"),u("align");var b=f.colorway,_=function(R){return b[R%b.length]};u("color",T.label.map(function(R,O){return I.addOpacity(_(O),.8)})),u("customdata");var P=o.link||{},M=r.newContainer(i,"link");function C(R,O){return c.coerce(P,M,g.link,R,O)}C("label"),C("arrowlen"),C("source"),C("target"),C("value"),C("line.color"),C("line.width"),C("hoverinfo",o.hoverinfo),e(P,M,C,y),C("hovertemplate");var A=S(f.paper_bgcolor).getLuminance()<.333,h=A?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=C("color",h);function k(R){var O=S(R);if(!O.isValid())return R;var j=O.getAlpha();return j<=.8?O.setAlpha(j+.2):O=A?O.brighten():O.darken(),O.toRgbString()}C("hovercolor",Array.isArray(p)?p.map(k):k(p)),C("customdata"),a(P,M,{name:"colorscales",handleItemDefaults:n}),t(i,f,x),x("orientation"),x("valueformat"),x("valuesuffix");var w;T.x.length&&T.y.length&&(w="freeform"),x("arrangement",w),c.coerceFont(x,"textfont",f.font,{autoShadowDflt:!0}),i._length=null};function n(o,i){function l(f,x){return c.coerce(o,i,g.link.colorscales,f,x)}l("label"),l("cmin"),l("cmax"),l("colorscale")}}),DE=Dt((Q,Z)=>{Z.exports=c;function c(g){for(var I=g.length,S=new Array(I),t=new Array(I),e=new Array(I),r=new Array(I),a=new Array(I),n=new Array(I),o=0;o0;){u=_[_.length-1];var P=g[u];if(r[u]=0&&n[u].push(a[C])}r[u]=M}else{if(t[u]===S[u]){for(var A=[],h=[],p=0,M=b.length-1;M>=0;--M){var k=b[M];if(e[k]=!1,A.push(k),h.push(n[k]),p+=n[k].length,a[k]=l.length,k===u){b.length=M;break}}l.push(A);for(var w=new Array(p),M=0;M{var c=DE(),g=kn(),I=zg().wrap,S=g.isArrayOrTypedArray,t=g.isIndex,e=Xc();function r(n){var o=n.node,i=n.link,l=[],f=S(i.color),x=S(i.hovercolor),y=S(i.customdata),v={},T={},u=i.colorscales.length,b;for(b=0;bC&&(C=i.source[b]),i.target[b]>C&&(C=i.target[b]);var A=C+1;n.node._count=A;var h,p=n.node.groups,k={};for(b=0;b0&&t(H,A)&&t(F,A)&&!(k.hasOwnProperty(H)&&k.hasOwnProperty(F)&&k[H]===k[F])){k.hasOwnProperty(F)&&(F=k[F]),k.hasOwnProperty(H)&&(H=k[H]),H=+H,F=+F,v[H]=v[F]=!0;var U="";i.label&&i.label[b]&&(U=i.label[b]);var W=null;U&&T.hasOwnProperty(U)&&(W=T[U]),l.push({pointNumber:b,label:U,color:f?i.color[b]:i.color,hovercolor:x?i.hovercolor[b]:i.hovercolor,customdata:y?i.customdata[b]:i.customdata,concentrationscale:W,source:H,target:F,value:+V}),j.source.push(H),j.target.push(F)}}var q=A+p.length,J=S(o.color),lt=S(o.customdata),yt=[];for(b=0;bA-1,childrenNodes:[],pointNumber:b,label:mt,color:J?o.color[b]:o.color,customdata:lt?o.customdata[b]:o.customdata})}var st=!1;return a(q,j.source,j.target)&&(st=!0),{circular:st,links:l,nodes:yt,groups:p,groupLookup:k}}function a(n,o,i){for(var l=g.init2dArray(n,0),f=0;f1})}Z.exports=function(n,o){var i=r(o);return I({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}}),vq=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){function g(A){var h=+this._x.call(null,A),p=+this._y.call(null,A);return I(this.cover(h,p),h,p,A)}function I(A,h,p,k){if(isNaN(h)||isNaN(p))return A;var w,R=A._root,O={data:k},j=A._x0,V=A._y0,H=A._x1,F=A._y1,U,W,q,J,lt,yt,mt,st;if(!R)return A._root=O,A;for(;R.length;)if((lt=h>=(U=(j+H)/2))?j=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W,w=R,!(R=R[mt=yt<<1|lt]))return w[mt]=O,A;if(q=+A._x.call(null,R.data),J=+A._y.call(null,R.data),h===q&&p===J)return O.next=R,w?w[mt]=O:A._root=O,A;do w=w?w[mt]=new Array(4):A._root=new Array(4),(lt=h>=(U=(j+H)/2))?j=U:H=U,(yt=p>=(W=(V+F)/2))?V=W:F=W;while((mt=yt<<1|lt)===(st=(J>=W)<<1|q>=U));return w[st]=R,w[mt]=O,A}function S(A){var h,p,k=A.length,w,R,O=new Array(k),j=new Array(k),V=1/0,H=1/0,F=-1/0,U=-1/0;for(p=0;pF&&(F=w),RU&&(U=R));if(V>F||H>U)return this;for(this.cover(V,H).cover(F,U),p=0;pA||A>=w||k>h||h>=R;)switch(H=(hF||(j=J.y0)>U||(V=J.x1)=mt)<<1|A>=yt)&&(J=W[W.length-1],W[W.length-1]=W[W.length-1-lt],W[W.length-1-lt]=J)}else{var st=A-+this._x.call(null,q.data),tt=h-+this._y.call(null,q.data),dt=st*st+tt*tt;if(dt=(W=(O+V)/2))?O=W:V=W,(lt=U>=(q=(j+H)/2))?j=q:H=q,h=p,!(p=p[yt=lt<<1|J]))return this;if(!p.length)break;(h[yt+1&3]||h[yt+2&3]||h[yt+3&3])&&(k=h,mt=yt)}for(;p.data!==A;)if(w=p,!(p=p.next))return this;return(R=p.next)&&delete p.next,w?(R?w.next=R:delete w.next,this):h?(R?h[yt]=R:delete h[yt],(p=h[0]||h[1]||h[2]||h[3])&&p===(h[3]||h[2]||h[1]||h[0])&&!p.length&&(k?k[mt]=p:this._root=p),this):(this._root=R,this)}function i(A){for(var h=0,p=A.length;h{(function(c,g){g(typeof Q=="object"&&typeof Z<"u"?Q:c.d3=c.d3||{})})(Q,function(c){var g="$";function I(){}I.prototype=S.prototype={constructor:I,has:function(v){return g+v in this},get:function(v){return this[g+v]},set:function(v,T){return this[g+v]=T,this},remove:function(v){var T=g+v;return T in this&&delete this[T]},clear:function(){for(var v in this)v[0]===g&&delete this[v]},keys:function(){var v=[];for(var T in this)T[0]===g&&v.push(T.slice(1));return v},values:function(){var v=[];for(var T in this)T[0]===g&&v.push(this[T]);return v},entries:function(){var v=[];for(var T in this)T[0]===g&&v.push({key:T.slice(1),value:this[T]});return v},size:function(){var v=0;for(var T in this)T[0]===g&&++v;return v},empty:function(){for(var v in this)if(v[0]===g)return!1;return!0},each:function(v){for(var T in this)T[0]===g&&v(this[T],T.slice(1),this)}};function S(v,T){var u=new I;if(v instanceof I)v.each(function(C,A){u.set(A,C)});else if(Array.isArray(v)){var b=-1,_=v.length,P;if(T==null)for(;++b<_;)u.set(b,v[b]);else for(;++b<_;)u.set(T(P=v[b],b,v),P)}else if(v)for(var M in v)u.set(M,v[M]);return u}function t(){var v=[],T=[],u,b,_;function P(C,A,h,p){if(A>=v.length)return u!=null&&C.sort(u),b!=null?b(C):C;for(var k=-1,w=C.length,R=v[A++],O,j,V=S(),H,F=h();++kv.length)return C;var h,p=T[A-1];return b!=null&&A>=v.length?h=C.entries():(h=[],C.each(function(k,w){h.push({key:w,values:M(k,A)})})),p!=null?h.sort(function(k,w){return p(k.key,w.key)}):h}return _={object:function(C){return P(C,0,e,r)},map:function(C){return P(C,0,a,n)},entries:function(C){return M(P(C,0,a,n),0)},key:function(C){return v.push(C),_},sortKeys:function(C){return T[v.length-1]=C,_},sortValues:function(C){return u=C,_},rollup:function(C){return b=C,_}}}function e(){return{}}function r(v,T,u){v[T]=u}function a(){return S()}function n(v,T,u){v.set(T,u)}function o(){}var i=S.prototype;o.prototype=l.prototype={constructor:o,has:i.has,add:function(v){return v+="",this[g+v]=v,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function l(v,T){var u=new o;if(v instanceof o)v.each(function(P){u.add(P)});else if(v){var b=-1,_=v.length;if(T==null)for(;++b<_;)u.add(v[b]);else for(;++b<_;)u.add(T(v[b],b,v))}return u}function f(v){var T=[];for(var u in v)T.push(u);return T}function x(v){var T=[];for(var u in v)T.push(v[u]);return T}function y(v){var T=[];for(var u in v)T.push({key:u,value:v[u]});return T}c.nest=t,c.set=l,c.map=S,c.keys=f,c.values=x,c.entries=y,Object.defineProperty(c,"__esModule",{value:!0})})}),yq=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g={value:function(){}};function I(){for(var a=0,n=arguments.length,o={},i;a=0&&(i=o.slice(l+1),o=o.slice(0,l)),o&&!n.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:i}})}S.prototype=I.prototype={constructor:S,on:function(a,n){var o=this._,i=t(a+"",o),l,f=-1,x=i.length;if(arguments.length<2){for(;++f0)for(var o=new Array(l),i=0,l,f;i{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=0,I=0,S=0,t=1e3,e,r,a=0,n=0,o=0,i=typeof performance=="object"&&performance.now?performance:Date,l=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function f(){return n||(l(x),n=i.now()+o)}function x(){n=0}function y(){this._call=this._time=this._next=null}y.prototype=v.prototype={constructor:y,restart:function(A,h,p){if(typeof A!="function")throw new TypeError("callback is not a function");p=(p==null?f():+p)+(h==null?0:+h),!this._next&&r!==this&&(r?r._next=this:e=this,r=this),this._call=A,this._time=p,P()},stop:function(){this._call&&(this._call=null,this._time=1/0,P())}};function v(A,h,p){var k=new y;return k.restart(A,h,p),k}function T(){f(),++g;for(var A=e,h;A;)(h=n-A._time)>=0&&A._call.call(null,h),A=A._next;--g}function u(){n=(a=i.now())+o,g=I=0;try{T()}finally{g=0,_(),n=0}}function b(){var A=i.now(),h=A-a;h>t&&(o-=h,a=A)}function _(){for(var A,h=e,p,k=1/0;h;)h._call?(k>h._time&&(k=h._time),A=h,h=h._next):(p=h._next,h._next=null,h=A?A._next=p:e=p);r=A,P(k)}function P(A){if(!g){I&&(I=clearTimeout(I));var h=A-n;h>24?(A<1/0&&(I=setTimeout(u,A-i.now()-o)),S&&(S=clearInterval(S))):(S||(a=i.now(),S=setInterval(b,t)),g=1,l(u))}}function M(A,h,p){var k=new y;return h=h==null?0:+h,k.restart(function(w){k.stop(),A(w+h)},h,p),k}function C(A,h,p){var k=new y,w=h;return h==null?(k.restart(A,h,p),k):(h=+h,p=p==null?f():+p,k.restart(function R(O){O+=w,k.restart(R,w+=h,p),A(O)},h,p),k)}c.interval=C,c.now=f,c.timeout=M,c.timer=v,c.timerFlush=T,Object.defineProperty(c,"__esModule",{value:!0})})}),_q=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,vq(),MT(),yq(),xq()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,c.d3)})(Q,function(c,g,I,S,t){function e(A,h){var p;A==null&&(A=0),h==null&&(h=0);function k(){var w,R=p.length,O,j=0,V=0;for(w=0;wU.index){var ft=W-vt.x-vt.vx,ut=q-vt.y-vt.vy,kt=ft*ft+ut*ut;ktW+Y||rtq+Y||atV.r&&(V.r=V[H].r)}function j(){if(h){var V,H=h.length,F;for(p=new Array(H),V=0;V1?(lt==null?j.remove(J):j.set(J,q(lt)),h):j.get(J)},find:function(J,lt,yt){var mt=0,st=A.length,tt,dt,rt,at,vt;for(yt==null?yt=1/0:yt*=yt,mt=0;mt1?(H.on(J,lt),h):H.on(J)}}}function _(){var A,h,p,k=r(-30),w,R=1,O=1/0,j=.81;function V(W){var q,J=A.length,lt=g.quadtree(A,y,v).visitAfter(F);for(p=W,q=0;q=O)){(W.data!==h||W.next)&&(yt===0&&(yt=a(),tt+=yt*yt),mt===0&&(mt=a(),tt+=mt*mt),tt{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q):(c=c||self,g(c.d3=c.d3||{}))})(Q,function(c){var g=Math.PI,I=2*g,S=1e-6,t=I-S;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new e}e.prototype=r.prototype={constructor:e,moveTo:function(a,n){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(a,n){this._+="L"+(this._x1=+a)+","+(this._y1=+n)},quadraticCurveTo:function(a,n,o,i){this._+="Q"+ +a+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},bezierCurveTo:function(a,n,o,i,l,f){this._+="C"+ +a+","+ +n+","+ +o+","+ +i+","+(this._x1=+l)+","+(this._y1=+f)},arcTo:function(a,n,o,i,l){a=+a,n=+n,o=+o,i=+i,l=+l;var f=this._x1,x=this._y1,y=o-a,v=i-n,T=f-a,u=x-n,b=T*T+u*u;if(l<0)throw new Error("negative radius: "+l);if(this._x1===null)this._+="M"+(this._x1=a)+","+(this._y1=n);else if(b>S)if(!(Math.abs(u*y-v*T)>S)||!l)this._+="L"+(this._x1=a)+","+(this._y1=n);else{var _=o-f,P=i-x,M=y*y+v*v,C=_*_+P*P,A=Math.sqrt(M),h=Math.sqrt(b),p=l*Math.tan((g-Math.acos((M+b-C)/(2*A*h)))/2),k=p/h,w=p/A;Math.abs(k-1)>S&&(this._+="L"+(a+k*T)+","+(n+k*u)),this._+="A"+l+","+l+",0,0,"+ +(u*_>T*P)+","+(this._x1=a+w*y)+","+(this._y1=n+w*v)}},arc:function(a,n,o,i,l,f){a=+a,n=+n,o=+o,f=!!f;var x=o*Math.cos(i),y=o*Math.sin(i),v=a+x,T=n+y,u=1^f,b=f?i-l:l-i;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+v+","+T:(Math.abs(this._x1-v)>S||Math.abs(this._y1-T)>S)&&(this._+="L"+v+","+T),o&&(b<0&&(b=b%I+I),b>t?this._+="A"+o+","+o+",0,1,"+u+","+(a-x)+","+(n-y)+"A"+o+","+o+",0,1,"+u+","+(this._x1=v)+","+(this._y1=T):b>S&&(this._+="A"+o+","+o+",0,"+ +(b>=g)+","+u+","+(this._x1=a+o*Math.cos(l))+","+(this._y1=n+o*Math.sin(l))))},rect:function(a,n,o,i){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+n)+"h"+ +o+"v"+ +i+"h"+-o+"Z"},toString:function(){return this._}},c.path=r,Object.defineProperty(c,"__esModule",{value:!0})})}),FE=Dt((Q,Z)=>{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,bq()):(c=c||self,g(c.d3=c.d3||{},c.d3))})(Q,function(c,g){function I(Ce){return function(){return Ce}}var S=Math.abs,t=Math.atan2,e=Math.cos,r=Math.max,a=Math.min,n=Math.sin,o=Math.sqrt,i=1e-12,l=Math.PI,f=l/2,x=2*l;function y(Ce){return Ce>1?0:Ce<-1?l:Math.acos(Ce)}function v(Ce){return Ce>=1?f:Ce<=-1?-f:Math.asin(Ce)}function T(Ce){return Ce.innerRadius}function u(Ce){return Ce.outerRadius}function b(Ce){return Ce.startAngle}function _(Ce){return Ce.endAngle}function P(Ce){return Ce&&Ce.padAngle}function M(Ce,dr,Hr,_n,Fn,Qn,Pn,En){var Zn=Hr-Ce,La=_n-dr,Vi=Pn-Fn,Qa=En-Qn,Ja=Qa*Zn-Vi*La;if(!(Ja*Jakl*kl+ql*ql&&(Qs=cs,Nl=Ps),{cx:Qs,cy:Nl,x01:-Vi,y01:-Qa,x11:Qs*(Fn/Ks-1),y11:Nl*(Fn/Ks-1)}}function A(){var Ce=T,dr=u,Hr=I(0),_n=null,Fn=b,Qn=_,Pn=P,En=null;function Zn(){var La,Vi,Qa=+Ce.apply(this,arguments),Ja=+dr.apply(this,arguments),Do=Fn.apply(this,arguments)-f,yo=Qn.apply(this,arguments)-f,Fo=S(yo-Do),Da=yo>Do;if(En||(En=La=g.path()),Jai))En.moveTo(0,0);else if(Fo>x-i)En.moveTo(Ja*e(Do),Ja*n(Do)),En.arc(0,0,Ja,Do,yo,!Da),Qa>i&&(En.moveTo(Qa*e(yo),Qa*n(yo)),En.arc(0,0,Qa,yo,Do,Da));else{var ys=Do,os=yo,ul=Do,Zo=yo,Ks=Fo,ss=Fo,cl=Pn.apply(this,arguments)/2,Qs=cl>i&&(_n?+_n.apply(this,arguments):o(Qa*Qa+Ja*Ja)),Nl=a(S(Ja-Qa)/2,+Hr.apply(this,arguments)),cs=Nl,Ps=Nl,Lo,As;if(Qs>i){var kl=v(Qs/Qa*n(cl)),ql=v(Qs/Ja*n(cl));(Ks-=kl*2)>i?(kl*=Da?1:-1,ul+=kl,Zo-=kl):(Ks=0,ul=Zo=(Do+yo)/2),(ss-=ql*2)>i?(ql*=Da?1:-1,ys+=ql,os-=ql):(ss=0,ys=os=(Do+yo)/2)}var Jl=Ja*e(ys),Us=Ja*n(ys),Pa=Qa*e(Zo),fo=Qa*n(Zo);if(Nl>i){var qs=Ja*e(os),Ql=Ja*n(os),Xo=Qa*e(ul),Gl=Qa*n(ul),al;if(Foi?Ps>i?(Lo=C(Xo,Gl,Jl,Us,Ja,Ps,Da),As=C(qs,Ql,Pa,fo,Ja,Ps,Da),En.moveTo(Lo.cx+Lo.x01,Lo.cy+Lo.y01),Psi)||!(Ks>i)?En.lineTo(Pa,fo):cs>i?(Lo=C(Pa,fo,qs,Ql,Qa,-cs,Da),As=C(Jl,Us,Xo,Gl,Qa,-cs,Da),En.lineTo(Lo.cx+Lo.x01,Lo.cy+Lo.y01),cs=Ja;--Do)En.point(os[Do],ul[Do]);En.lineEnd(),En.areaEnd()}Da&&(os[Qa]=+Ce(Fo,Qa,Vi),ul[Qa]=+Hr(Fo,Qa,Vi),En.point(dr?+dr(Fo,Qa,Vi):os[Qa],_n?+_n(Fo,Qa,Vi):ul[Qa]))}if(ys)return En=null,ys+""||null}function La(){return R().defined(Fn).curve(Pn).context(Qn)}return Zn.x=function(Vi){return arguments.length?(Ce=typeof Vi=="function"?Vi:I(+Vi),dr=null,Zn):Ce},Zn.x0=function(Vi){return arguments.length?(Ce=typeof Vi=="function"?Vi:I(+Vi),Zn):Ce},Zn.x1=function(Vi){return arguments.length?(dr=Vi==null?null:typeof Vi=="function"?Vi:I(+Vi),Zn):dr},Zn.y=function(Vi){return arguments.length?(Hr=typeof Vi=="function"?Vi:I(+Vi),_n=null,Zn):Hr},Zn.y0=function(Vi){return arguments.length?(Hr=typeof Vi=="function"?Vi:I(+Vi),Zn):Hr},Zn.y1=function(Vi){return arguments.length?(_n=Vi==null?null:typeof Vi=="function"?Vi:I(+Vi),Zn):_n},Zn.lineX0=Zn.lineY0=function(){return La().x(Ce).y(Hr)},Zn.lineY1=function(){return La().x(Ce).y(_n)},Zn.lineX1=function(){return La().x(dr).y(Hr)},Zn.defined=function(Vi){return arguments.length?(Fn=typeof Vi=="function"?Vi:I(!!Vi),Zn):Fn},Zn.curve=function(Vi){return arguments.length?(Pn=Vi,Qn!=null&&(En=Pn(Qn)),Zn):Pn},Zn.context=function(Vi){return arguments.length?(Vi==null?Qn=En=null:En=Pn(Qn=Vi),Zn):Qn},Zn}function j(Ce,dr){return drCe?1:dr>=Ce?0:NaN}function V(Ce){return Ce}function H(){var Ce=V,dr=j,Hr=null,_n=I(0),Fn=I(x),Qn=I(0);function Pn(En){var Zn,La=En.length,Vi,Qa,Ja=0,Do=new Array(La),yo=new Array(La),Fo=+_n.apply(this,arguments),Da=Math.min(x,Math.max(-x,Fn.apply(this,arguments)-Fo)),ys,os=Math.min(Math.abs(Da)/La,Qn.apply(this,arguments)),ul=os*(Da<0?-1:1),Zo;for(Zn=0;Zn0&&(Ja+=Zo);for(dr!=null?Do.sort(function(Ks,ss){return dr(yo[Ks],yo[ss])}):Hr!=null&&Do.sort(function(Ks,ss){return Hr(En[Ks],En[ss])}),Zn=0,Qa=Ja?(Da-La*ul)/Ja:0;Zn0?Zo*Qa:0)+ul,yo[Vi]={data:En[Vi],index:Zn,value:Zo,startAngle:Fo,endAngle:ys,padAngle:os};return yo}return Pn.value=function(En){return arguments.length?(Ce=typeof En=="function"?En:I(+En),Pn):Ce},Pn.sortValues=function(En){return arguments.length?(dr=En,Hr=null,Pn):dr},Pn.sort=function(En){return arguments.length?(Hr=En,dr=null,Pn):Hr},Pn.startAngle=function(En){return arguments.length?(_n=typeof En=="function"?En:I(+En),Pn):_n},Pn.endAngle=function(En){return arguments.length?(Fn=typeof En=="function"?En:I(+En),Pn):Fn},Pn.padAngle=function(En){return arguments.length?(Qn=typeof En=="function"?En:I(+En),Pn):Qn},Pn}var F=W(p);function U(Ce){this._curve=Ce}U.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Ce,dr){this._curve.point(dr*Math.sin(Ce),dr*-Math.cos(Ce))}};function W(Ce){function dr(Hr){return new U(Ce(Hr))}return dr._curve=Ce,dr}function q(Ce){var dr=Ce.curve;return Ce.angle=Ce.x,delete Ce.x,Ce.radius=Ce.y,delete Ce.y,Ce.curve=function(Hr){return arguments.length?dr(W(Hr)):dr()._curve},Ce}function J(){return q(R().curve(F))}function lt(){var Ce=O().curve(F),dr=Ce.curve,Hr=Ce.lineX0,_n=Ce.lineX1,Fn=Ce.lineY0,Qn=Ce.lineY1;return Ce.angle=Ce.x,delete Ce.x,Ce.startAngle=Ce.x0,delete Ce.x0,Ce.endAngle=Ce.x1,delete Ce.x1,Ce.radius=Ce.y,delete Ce.y,Ce.innerRadius=Ce.y0,delete Ce.y0,Ce.outerRadius=Ce.y1,delete Ce.y1,Ce.lineStartAngle=function(){return q(Hr())},delete Ce.lineX0,Ce.lineEndAngle=function(){return q(_n())},delete Ce.lineX1,Ce.lineInnerRadius=function(){return q(Fn())},delete Ce.lineY0,Ce.lineOuterRadius=function(){return q(Qn())},delete Ce.lineY1,Ce.curve=function(Pn){return arguments.length?dr(W(Pn)):dr()._curve},Ce}function yt(Ce,dr){return[(dr=+dr)*Math.cos(Ce-=Math.PI/2),dr*Math.sin(Ce)]}var mt=Array.prototype.slice;function st(Ce){return Ce.source}function tt(Ce){return Ce.target}function dt(Ce){var dr=st,Hr=tt,_n=k,Fn=w,Qn=null;function Pn(){var En,Zn=mt.call(arguments),La=dr.apply(this,Zn),Vi=Hr.apply(this,Zn);if(Qn||(Qn=En=g.path()),Ce(Qn,+_n.apply(this,(Zn[0]=La,Zn)),+Fn.apply(this,Zn),+_n.apply(this,(Zn[0]=Vi,Zn)),+Fn.apply(this,Zn)),En)return Qn=null,En+""||null}return Pn.source=function(En){return arguments.length?(dr=En,Pn):dr},Pn.target=function(En){return arguments.length?(Hr=En,Pn):Hr},Pn.x=function(En){return arguments.length?(_n=typeof En=="function"?En:I(+En),Pn):_n},Pn.y=function(En){return arguments.length?(Fn=typeof En=="function"?En:I(+En),Pn):Fn},Pn.context=function(En){return arguments.length?(Qn=En??null,Pn):Qn},Pn}function rt(Ce,dr,Hr,_n,Fn){Ce.moveTo(dr,Hr),Ce.bezierCurveTo(dr=(dr+_n)/2,Hr,dr,Fn,_n,Fn)}function at(Ce,dr,Hr,_n,Fn){Ce.moveTo(dr,Hr),Ce.bezierCurveTo(dr,Hr=(Hr+Fn)/2,_n,Hr,_n,Fn)}function vt(Ce,dr,Hr,_n,Fn){var Qn=yt(dr,Hr),Pn=yt(dr,Hr=(Hr+Fn)/2),En=yt(_n,Hr),Zn=yt(_n,Fn);Ce.moveTo(Qn[0],Qn[1]),Ce.bezierCurveTo(Pn[0],Pn[1],En[0],En[1],Zn[0],Zn[1])}function it(){return dt(rt)}function Y(){return dt(at)}function ft(){var Ce=dt(vt);return Ce.angle=Ce.x,delete Ce.x,Ce.radius=Ce.y,delete Ce.y,Ce}var ut={draw:function(Ce,dr){var Hr=Math.sqrt(dr/l);Ce.moveTo(Hr,0),Ce.arc(0,0,Hr,0,x)}},kt={draw:function(Ce,dr){var Hr=Math.sqrt(dr/5)/2;Ce.moveTo(-3*Hr,-Hr),Ce.lineTo(-Hr,-Hr),Ce.lineTo(-Hr,-3*Hr),Ce.lineTo(Hr,-3*Hr),Ce.lineTo(Hr,-Hr),Ce.lineTo(3*Hr,-Hr),Ce.lineTo(3*Hr,Hr),Ce.lineTo(Hr,Hr),Ce.lineTo(Hr,3*Hr),Ce.lineTo(-Hr,3*Hr),Ce.lineTo(-Hr,Hr),Ce.lineTo(-3*Hr,Hr),Ce.closePath()}},It=Math.sqrt(1/3),Pt=It*2,qt={draw:function(Ce,dr){var Hr=Math.sqrt(dr/Pt),_n=Hr*It;Ce.moveTo(0,-Hr),Ce.lineTo(_n,0),Ce.lineTo(0,Hr),Ce.lineTo(-_n,0),Ce.closePath()}},Wt=.8908130915292852,Jt=Math.sin(l/10)/Math.sin(7*l/10),ge=Math.sin(x/10)*Jt,fe=-Math.cos(x/10)*Jt,pe={draw:function(Ce,dr){var Hr=Math.sqrt(dr*Wt),_n=ge*Hr,Fn=fe*Hr;Ce.moveTo(0,-Hr),Ce.lineTo(_n,Fn);for(var Qn=1;Qn<5;++Qn){var Pn=x*Qn/5,En=Math.cos(Pn),Zn=Math.sin(Pn);Ce.lineTo(Zn*Hr,-En*Hr),Ce.lineTo(En*_n-Zn*Fn,Zn*_n+En*Fn)}Ce.closePath()}},se={draw:function(Ce,dr){var Hr=Math.sqrt(dr),_n=-Hr/2;Ce.rect(_n,_n,Hr,Hr)}},Tt=Math.sqrt(3),Lt={draw:function(Ce,dr){var Hr=-Math.sqrt(dr/(Tt*3));Ce.moveTo(0,Hr*2),Ce.lineTo(-Tt*Hr,-Hr),Ce.lineTo(Tt*Hr,-Hr),Ce.closePath()}},Mt=-.5,ee=Math.sqrt(3)/2,ve=1/Math.sqrt(12),oe=(ve/2+1)*3,Te={draw:function(Ce,dr){var Hr=Math.sqrt(dr/oe),_n=Hr/2,Fn=Hr*ve,Qn=_n,Pn=Hr*ve+Hr,En=-Qn,Zn=Pn;Ce.moveTo(_n,Fn),Ce.lineTo(Qn,Pn),Ce.lineTo(En,Zn),Ce.lineTo(Mt*_n-ee*Fn,ee*_n+Mt*Fn),Ce.lineTo(Mt*Qn-ee*Pn,ee*Qn+Mt*Pn),Ce.lineTo(Mt*En-ee*Zn,ee*En+Mt*Zn),Ce.lineTo(Mt*_n+ee*Fn,Mt*Fn-ee*_n),Ce.lineTo(Mt*Qn+ee*Pn,Mt*Pn-ee*Qn),Ce.lineTo(Mt*En+ee*Zn,Mt*Zn-ee*En),Ce.closePath()}},He=[ut,kt,qt,se,pe,Lt,Te];function Ge(){var Ce=I(ut),dr=I(64),Hr=null;function _n(){var Fn;if(Hr||(Hr=Fn=g.path()),Ce.apply(this,arguments).draw(Hr,+dr.apply(this,arguments)),Fn)return Hr=null,Fn+""||null}return _n.type=function(Fn){return arguments.length?(Ce=typeof Fn=="function"?Fn:I(Fn),_n):Ce},_n.size=function(Fn){return arguments.length?(dr=typeof Fn=="function"?Fn:I(+Fn),_n):dr},_n.context=function(Fn){return arguments.length?(Hr=Fn??null,_n):Hr},_n}function cr(){}function ur(Ce,dr,Hr){Ce._context.bezierCurveTo((2*Ce._x0+Ce._x1)/3,(2*Ce._y0+Ce._y1)/3,(Ce._x0+2*Ce._x1)/3,(Ce._y0+2*Ce._y1)/3,(Ce._x0+4*Ce._x1+dr)/6,(Ce._y0+4*Ce._y1+Hr)/6)}function jr(Ce){this._context=Ce}jr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ur(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ur(this,Ce,dr);break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=dr}};function Wr(Ce){return new jr(Ce)}function br(Ce){this._context=Ce}br.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._x2=Ce,this._y2=dr;break;case 1:this._point=2,this._x3=Ce,this._y3=dr;break;case 2:this._point=3,this._x4=Ce,this._y4=dr,this._context.moveTo((this._x0+4*this._x1+Ce)/6,(this._y0+4*this._y1+dr)/6);break;default:ur(this,Ce,dr);break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=dr}};function Xr(Ce){return new br(Ce)}function nn(Ce){this._context=Ce}nn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Hr=(this._x0+4*this._x1+Ce)/6,_n=(this._y0+4*this._y1+dr)/6;this._line?this._context.lineTo(Hr,_n):this._context.moveTo(Hr,_n);break;case 3:this._point=4;default:ur(this,Ce,dr);break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=dr}};function Le(Ce){return new nn(Ce)}function Gt(Ce,dr){this._basis=new jr(Ce),this._beta=dr}Gt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Ce=this._x,dr=this._y,Hr=Ce.length-1;if(Hr>0)for(var _n=Ce[0],Fn=dr[0],Qn=Ce[Hr]-_n,Pn=dr[Hr]-Fn,En=-1,Zn;++En<=Hr;)Zn=En/Hr,this._basis.point(this._beta*Ce[En]+(1-this._beta)*(_n+Zn*Qn),this._beta*dr[En]+(1-this._beta)*(Fn+Zn*Pn));this._x=this._y=null,this._basis.lineEnd()},point:function(Ce,dr){this._x.push(+Ce),this._y.push(+dr)}};var ne=function Ce(dr){function Hr(_n){return dr===1?new jr(_n):new Gt(_n,dr)}return Hr.beta=function(_n){return Ce(+_n)},Hr}(.85);function Ct(Ce,dr,Hr){Ce._context.bezierCurveTo(Ce._x1+Ce._k*(Ce._x2-Ce._x0),Ce._y1+Ce._k*(Ce._y2-Ce._y0),Ce._x2+Ce._k*(Ce._x1-dr),Ce._y2+Ce._k*(Ce._y1-Hr),Ce._x2,Ce._y2)}function gt(Ce,dr){this._context=Ce,this._k=(1-dr)/6}gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ct(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);break;case 1:this._point=2,this._x1=Ce,this._y1=dr;break;case 2:this._point=3;default:Ct(this,Ce,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var St=function Ce(dr){function Hr(_n){return new gt(_n,dr)}return Hr.tension=function(_n){return Ce(+_n)},Hr}(0);function Nt(Ce,dr){this._context=Ce,this._k=(1-dr)/6}Nt.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._x3=Ce,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ce,this._y4=dr);break;case 2:this._point=3,this._x5=Ce,this._y5=dr;break;default:Ct(this,Ce,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var re=function Ce(dr){function Hr(_n){return new Nt(_n,dr)}return Hr.tension=function(_n){return Ce(+_n)},Hr}(0);function le(Ce,dr){this._context=Ce,this._k=(1-dr)/6}le.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,Ce,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var we=function Ce(dr){function Hr(_n){return new le(_n,dr)}return Hr.tension=function(_n){return Ce(+_n)},Hr}(0);function Ue(Ce,dr,Hr){var _n=Ce._x1,Fn=Ce._y1,Qn=Ce._x2,Pn=Ce._y2;if(Ce._l01_a>i){var En=2*Ce._l01_2a+3*Ce._l01_a*Ce._l12_a+Ce._l12_2a,Zn=3*Ce._l01_a*(Ce._l01_a+Ce._l12_a);_n=(_n*En-Ce._x0*Ce._l12_2a+Ce._x2*Ce._l01_2a)/Zn,Fn=(Fn*En-Ce._y0*Ce._l12_2a+Ce._y2*Ce._l01_2a)/Zn}if(Ce._l23_a>i){var La=2*Ce._l23_2a+3*Ce._l23_a*Ce._l12_a+Ce._l12_2a,Vi=3*Ce._l23_a*(Ce._l23_a+Ce._l12_a);Qn=(Qn*La+Ce._x1*Ce._l23_2a-dr*Ce._l12_2a)/Vi,Pn=(Pn*La+Ce._y1*Ce._l23_2a-Hr*Ce._l12_2a)/Vi}Ce._context.bezierCurveTo(_n,Fn,Qn,Pn,Ce._x2,Ce._y2)}function qe(Ce,dr){this._context=Ce,this._alpha=dr}qe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){if(Ce=+Ce,dr=+dr,this._point){var Hr=this._x2-Ce,_n=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+_n*_n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);break;case 1:this._point=2;break;case 2:this._point=3;default:Ue(this,Ce,dr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var or=function Ce(dr){function Hr(_n){return dr?new qe(_n,dr):new gt(_n,0)}return Hr.alpha=function(_n){return Ce(+_n)},Hr}(.5);function Sr(Ce,dr){this._context=Ce,this._alpha=dr}Sr.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ce,dr){if(Ce=+Ce,dr=+dr,this._point){var Hr=this._x2-Ce,_n=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+_n*_n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Ce,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ce,this._y4=dr);break;case 2:this._point=3,this._x5=Ce,this._y5=dr;break;default:Ue(this,Ce,dr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Ar=function Ce(dr){function Hr(_n){return dr?new Sr(_n,dr):new Nt(_n,0)}return Hr.alpha=function(_n){return Ce(+_n)},Hr}(.5);function mr(Ce,dr){this._context=Ce,this._alpha=dr}mr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){if(Ce=+Ce,dr=+dr,this._point){var Hr=this._x2-Ce,_n=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+_n*_n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ue(this,Ce,dr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ce,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Qr=function Ce(dr){function Hr(_n){return dr?new mr(_n,dr):new le(_n,0)}return Hr.alpha=function(_n){return Ce(+_n)},Hr}(.5);function Hn(Ce){this._context=Ce}Hn.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Ce,dr){Ce=+Ce,dr=+dr,this._point?this._context.lineTo(Ce,dr):(this._point=1,this._context.moveTo(Ce,dr))}};function Wn(Ce){return new Hn(Ce)}function Xn(Ce){return Ce<0?-1:1}function Ii(Ce,dr,Hr){var _n=Ce._x1-Ce._x0,Fn=dr-Ce._x1,Qn=(Ce._y1-Ce._y0)/(_n||Fn<0&&-0),Pn=(Hr-Ce._y1)/(Fn||_n<0&&-0),En=(Qn*Fn+Pn*_n)/(_n+Fn);return(Xn(Qn)+Xn(Pn))*Math.min(Math.abs(Qn),Math.abs(Pn),.5*Math.abs(En))||0}function oi(Ce,dr){var Hr=Ce._x1-Ce._x0;return Hr?(3*(Ce._y1-Ce._y0)/Hr-dr)/2:dr}function $n(Ce,dr,Hr){var _n=Ce._x0,Fn=Ce._y0,Qn=Ce._x1,Pn=Ce._y1,En=(Qn-_n)/3;Ce._context.bezierCurveTo(_n+En,Fn+En*dr,Qn-En,Pn-En*Hr,Qn,Pn)}function sa(Ce){this._context=Ce}sa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:$n(this,this._t0,oi(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ce,dr){var Hr=NaN;if(Ce=+Ce,dr=+dr,!(Ce===this._x1&&dr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);break;case 1:this._point=2;break;case 2:this._point=3,$n(this,oi(this,Hr=Ii(this,Ce,dr)),Hr);break;default:$n(this,this._t0,Hr=Ii(this,Ce,dr));break}this._x0=this._x1,this._x1=Ce,this._y0=this._y1,this._y1=dr,this._t0=Hr}}};function Zi(Ce){this._context=new We(Ce)}(Zi.prototype=Object.create(sa.prototype)).point=function(Ce,dr){sa.prototype.point.call(this,dr,Ce)};function We(Ce){this._context=Ce}We.prototype={moveTo:function(Ce,dr){this._context.moveTo(dr,Ce)},closePath:function(){this._context.closePath()},lineTo:function(Ce,dr){this._context.lineTo(dr,Ce)},bezierCurveTo:function(Ce,dr,Hr,_n,Fn,Qn){this._context.bezierCurveTo(dr,Ce,_n,Hr,Qn,Fn)}};function nr(Ce){return new sa(Ce)}function fr(Ce){return new Zi(Ce)}function _r(Ce){this._context=Ce}_r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Ce=this._x,dr=this._y,Hr=Ce.length;if(Hr)if(this._line?this._context.lineTo(Ce[0],dr[0]):this._context.moveTo(Ce[0],dr[0]),Hr===2)this._context.lineTo(Ce[1],dr[1]);else for(var _n=tn(Ce),Fn=tn(dr),Qn=0,Pn=1;Pn=0;--dr)Fn[dr]=(Pn[dr]-Fn[dr+1])/Qn[dr];for(Qn[Hr-1]=(Ce[Hr]+Fn[Hr-1])/2,dr=0;dr=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Ce,dr){switch(Ce=+Ce,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ce,dr):this._context.moveTo(Ce,dr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,dr),this._context.lineTo(Ce,dr);else{var Hr=this._x*(1-this._t)+Ce*this._t;this._context.lineTo(Hr,this._y),this._context.lineTo(Hr,dr)}break}}this._x=Ce,this._y=dr}};function Mn(Ce){return new Tn(Ce,.5)}function fi(Ce){return new Tn(Ce,0)}function ki(Ce){return new Tn(Ce,1)}function Oi(Ce,dr){if((Pn=Ce.length)>1)for(var Hr=1,_n,Fn,Qn=Ce[dr[0]],Pn,En=Qn.length;Hr=0;)Hr[dr]=dr;return Hr}function Xi(Ce,dr){return Ce[dr]}function ci(){var Ce=I([]),dr=ji,Hr=Oi,_n=Xi;function Fn(Qn){var Pn=Ce.apply(this,arguments),En,Zn=Qn.length,La=Pn.length,Vi=new Array(La),Qa;for(En=0;En0){for(var Hr,_n,Fn=0,Qn=Ce[0].length,Pn;Fn0)for(var Hr,_n=0,Fn,Qn,Pn,En,Zn,La=Ce[dr[0]].length;_n0?(Fn[0]=Pn,Fn[1]=Pn+=Qn):Qn<0?(Fn[1]=En,Fn[0]=En+=Qn):(Fn[0]=0,Fn[1]=Qn)}function ze(Ce,dr){if((Fn=Ce.length)>0){for(var Hr=0,_n=Ce[dr[0]],Fn,Qn=_n.length;Hr0)||!((Qn=(Fn=Ce[dr[0]]).length)>0))){for(var Hr=0,_n=1,Fn,Qn,Pn;_nQn&&(Qn=Fn,Hr=dr);return Hr}function Gr(Ce){var dr=Ce.map(Br);return ji(Ce).sort(function(Hr,_n){return dr[Hr]-dr[_n]})}function Br(Ce){for(var dr=0,Hr=-1,_n=Ce.length,Fn;++Hr<_n;)(Fn=+Ce[Hr][1])&&(dr+=Fn);return dr}function Yr(Ce){return Gr(Ce).reverse()}function pn(Ce){var dr=Ce.length,Hr,_n,Fn=Ce.map(Br),Qn=Rr(Ce),Pn=0,En=0,Zn=[],La=[];for(Hr=0;Hr{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,k3(),MT(),FE()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3)})(Q,function(c,g,I,S){function t(p){return p.target.depth}function e(p){return p.depth}function r(p,k){return k-1-p.height}function a(p,k){return p.sourceLinks.length?p.depth:k-1}function n(p){return p.targetLinks.length?p.depth:p.sourceLinks.length?g.min(p.sourceLinks,t)-1:0}function o(p){return function(){return p}}function i(p,k){return f(p.source,k.source)||p.index-k.index}function l(p,k){return f(p.target,k.target)||p.index-k.index}function f(p,k){return p.y0-k.y0}function x(p){return p.value}function y(p){return(p.y0+p.y1)/2}function v(p){return y(p.source)*p.value}function T(p){return y(p.target)*p.value}function u(p){return p.index}function b(p){return p.nodes}function _(p){return p.links}function P(p,k){var w=p.get(k);if(!w)throw new Error("missing: "+k);return w}var M=function(){var p=0,k=0,w=1,R=1,O=24,j=8,V=u,H=a,F=b,U=_,W=32,q=2/3;function J(){var dt={nodes:F.apply(null,arguments),links:U.apply(null,arguments)};return lt(dt),yt(dt),mt(dt),st(dt),tt(dt),dt}J.update=function(dt){return tt(dt),dt},J.nodeId=function(dt){return arguments.length?(V=typeof dt=="function"?dt:o(dt),J):V},J.nodeAlign=function(dt){return arguments.length?(H=typeof dt=="function"?dt:o(dt),J):H},J.nodeWidth=function(dt){return arguments.length?(O=+dt,J):O},J.nodePadding=function(dt){return arguments.length?(j=+dt,J):j},J.nodes=function(dt){return arguments.length?(F=typeof dt=="function"?dt:o(dt),J):F},J.links=function(dt){return arguments.length?(U=typeof dt=="function"?dt:o(dt),J):U},J.size=function(dt){return arguments.length?(p=k=0,w=+dt[0],R=+dt[1],J):[w-p,R-k]},J.extent=function(dt){return arguments.length?(p=+dt[0][0],w=+dt[1][0],k=+dt[0][1],R=+dt[1][1],J):[[p,k],[w,R]]},J.iterations=function(dt){return arguments.length?(W=+dt,J):W};function lt(dt){dt.nodes.forEach(function(at,vt){at.index=vt,at.sourceLinks=[],at.targetLinks=[]});var rt=I.map(dt.nodes,V);dt.links.forEach(function(at,vt){at.index=vt;var it=at.source,Y=at.target;typeof it!="object"&&(it=at.source=P(rt,it)),typeof Y!="object"&&(Y=at.target=P(rt,Y)),it.sourceLinks.push(at),Y.targetLinks.push(at)})}function yt(dt){dt.nodes.forEach(function(rt){rt.value=Math.max(g.sum(rt.sourceLinks,x),g.sum(rt.targetLinks,x))})}function mt(dt){var rt,at,vt;for(rt=dt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(Y){Y.depth=vt,Y.sourceLinks.forEach(function(ft){at.indexOf(ft.target)<0&&at.push(ft.target)})});for(rt=dt.nodes,at=[],vt=0;rt.length;++vt,rt=at,at=[])rt.forEach(function(Y){Y.height=vt,Y.targetLinks.forEach(function(ft){at.indexOf(ft.source)<0&&at.push(ft.source)})});var it=(w-p-O)/(vt-1);dt.nodes.forEach(function(Y){Y.x1=(Y.x0=p+Math.max(0,Math.min(vt-1,Math.floor(H.call(null,Y,vt))))*it)+O})}function st(dt){var rt=I.nest().key(function(kt){return kt.x0}).sortKeys(g.ascending).entries(dt.nodes).map(function(kt){return kt.values});it(),ut();for(var at=1,vt=W;vt>0;--vt)ft(at*=.99),ut(),Y(at),ut();function it(){var kt=g.max(rt,function(qt){return qt.length}),It=q*(R-k)/(kt-1);j>It&&(j=It);var Pt=g.min(rt,function(qt){return(R-k-(qt.length-1)*j)/g.sum(qt,x)});rt.forEach(function(qt){qt.forEach(function(Wt,Jt){Wt.y1=(Wt.y0=Jt)+Wt.value*Pt})}),dt.links.forEach(function(qt){qt.width=qt.value*Pt})}function Y(kt){rt.forEach(function(It){It.forEach(function(Pt){if(Pt.targetLinks.length){var qt=(g.sum(Pt.targetLinks,v)/g.sum(Pt.targetLinks,x)-y(Pt))*kt;Pt.y0+=qt,Pt.y1+=qt}})})}function ft(kt){rt.slice().reverse().forEach(function(It){It.forEach(function(Pt){if(Pt.sourceLinks.length){var qt=(g.sum(Pt.sourceLinks,T)/g.sum(Pt.sourceLinks,x)-y(Pt))*kt;Pt.y0+=qt,Pt.y1+=qt}})})}function ut(){rt.forEach(function(kt){var It,Pt,qt=k,Wt=kt.length,Jt;for(kt.sort(f),Jt=0;Jt0&&(It.y0+=Pt,It.y1+=Pt),qt=It.y1+j;if(Pt=qt-j-R,Pt>0)for(qt=It.y0-=Pt,It.y1-=Pt,Jt=Wt-2;Jt>=0;--Jt)It=kt[Jt],Pt=It.y1+j-qt,Pt>0&&(It.y0-=Pt,It.y1-=Pt),qt=It.y0})}}function tt(dt){dt.nodes.forEach(function(rt){rt.sourceLinks.sort(l),rt.targetLinks.sort(i)}),dt.nodes.forEach(function(rt){var at=rt.y0,vt=at;rt.sourceLinks.forEach(function(it){it.y0=at+it.width/2,at+=it.width}),rt.targetLinks.forEach(function(it){it.y1=vt+it.width/2,vt+=it.width})})}return J};function C(p){return[p.source.x1,p.y0]}function A(p){return[p.target.x0,p.y1]}var h=function(){return S.linkHorizontal().source(C).target(A)};c.sankey=M,c.sankeyCenter=n,c.sankeyLeft=e,c.sankeyRight=r,c.sankeyJustify=a,c.sankeyLinkHorizontal=h,Object.defineProperty(c,"__esModule",{value:!0})})}),kq=Dt((Q,Z)=>{var c=DE();Z.exports=function(g,I){var S=[],t=[],e=[],r={},a=[],n;function o(_){e[_]=!1,r.hasOwnProperty(_)&&Object.keys(r[_]).forEach(function(P){delete r[_][P],e[P]&&o(P)})}function i(_){var P=!1;t.push(_),e[_]=!0;var M,C;for(M=0;M=_})}function x(_){f(_);for(var P=g,M=c(P),C=M.components.filter(function(O){return O.length>1}),A=1/0,h,p=0;p{(function(c,g){typeof Q=="object"&&typeof Z<"u"?g(Q,k3(),MT(),FE(),kq()):g(c.d3=c.d3||{},c.d3,c.d3,c.d3,null)})(Q,function(c,g,I,S,t){t=t&&t.hasOwnProperty("default")?t.default:t;function e(Wt){return Wt.target.depth}function r(Wt){return Wt.depth}function a(Wt,Jt){return Jt-1-Wt.height}function n(Wt,Jt){return Wt.sourceLinks.length?Wt.depth:Jt-1}function o(Wt){return Wt.targetLinks.length?Wt.depth:Wt.sourceLinks.length?g.min(Wt.sourceLinks,e)-1:0}function i(Wt){return function(){return Wt}}var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Wt){return typeof Wt}:function(Wt){return Wt&&typeof Symbol=="function"&&Wt.constructor===Symbol&&Wt!==Symbol.prototype?"symbol":typeof Wt};function f(Wt,Jt){return y(Wt.source,Jt.source)||Wt.index-Jt.index}function x(Wt,Jt){return y(Wt.target,Jt.target)||Wt.index-Jt.index}function y(Wt,Jt){return Wt.partOfCycle===Jt.partOfCycle?Wt.y0-Jt.y0:Wt.circularLinkType==="top"||Jt.circularLinkType==="bottom"?-1:1}function v(Wt){return Wt.value}function T(Wt){return(Wt.y0+Wt.y1)/2}function u(Wt){return T(Wt.source)}function b(Wt){return T(Wt.target)}function _(Wt){return Wt.index}function P(Wt){return Wt.nodes}function M(Wt){return Wt.links}function C(Wt,Jt){var ge=Wt.get(Jt);if(!ge)throw new Error("missing: "+Jt);return ge}function A(Wt,Jt){return Jt(Wt)}var h=25,p=10,k=.3;function w(){var Wt=0,Jt=0,ge=1,fe=1,pe=24,se,Tt=_,Lt=n,Mt=P,ee=M,ve=32,oe=2,Te,He=null;function Ge(){var Le={nodes:Mt.apply(null,arguments),links:ee.apply(null,arguments)};cr(Le),R(Le,Tt,He),ur(Le),br(Le),O(Le,Tt),Xr(Le,ve,Tt),nn(Le);for(var Gt=4,ne=0;ne"u"?"undefined":l(gt))!=="object"&&(gt=ne.source=C(Gt,gt)),(typeof St>"u"?"undefined":l(St))!=="object"&&(St=ne.target=C(Gt,St)),gt.sourceLinks.push(ne),St.targetLinks.push(ne)}),Le}function ur(Le){Le.nodes.forEach(function(Gt){Gt.partOfCycle=!1,Gt.value=Math.max(g.sum(Gt.sourceLinks,v),g.sum(Gt.targetLinks,v)),Gt.sourceLinks.forEach(function(ne){ne.circular&&(Gt.partOfCycle=!0,Gt.circularLinkType=ne.circularLinkType)}),Gt.targetLinks.forEach(function(ne){ne.circular&&(Gt.partOfCycle=!0,Gt.circularLinkType=ne.circularLinkType)})})}function jr(Le){var Gt=0,ne=0,Ct=0,gt=0,St=g.max(Le.nodes,function(Nt){return Nt.column});return Le.links.forEach(function(Nt){Nt.circular&&(Nt.circularLinkType=="top"?Gt=Gt+Nt.width:ne=ne+Nt.width,Nt.target.column==0&&(gt=gt+Nt.width),Nt.source.column==St&&(Ct=Ct+Nt.width))}),Gt=Gt>0?Gt+h+p:Gt,ne=ne>0?ne+h+p:ne,Ct=Ct>0?Ct+h+p:Ct,gt=gt>0?gt+h+p:gt,{top:Gt,bottom:ne,left:gt,right:Ct}}function Wr(Le,Gt){var ne=g.max(Le.nodes,function(we){return we.column}),Ct=ge-Wt,gt=fe-Jt,St=Ct+Gt.right+Gt.left,Nt=gt+Gt.top+Gt.bottom,re=Ct/St,le=gt/Nt;return Wt=Wt*re+Gt.left,ge=Gt.right==0?ge:ge*re,Jt=Jt*le+Gt.top,fe=fe*le,Le.nodes.forEach(function(we){we.x0=Wt+we.column*((ge-Wt-pe)/ne),we.x1=we.x0+pe}),le}function br(Le){var Gt,ne,Ct;for(Gt=Le.nodes,ne=[],Ct=0;Gt.length;++Ct,Gt=ne,ne=[])Gt.forEach(function(gt){gt.depth=Ct,gt.sourceLinks.forEach(function(St){ne.indexOf(St.target)<0&&!St.circular&&ne.push(St.target)})});for(Gt=Le.nodes,ne=[],Ct=0;Gt.length;++Ct,Gt=ne,ne=[])Gt.forEach(function(gt){gt.height=Ct,gt.targetLinks.forEach(function(St){ne.indexOf(St.source)<0&&!St.circular&&ne.push(St.source)})});Le.nodes.forEach(function(gt){gt.column=Math.floor(Lt.call(null,gt,Ct))})}function Xr(Le,Gt,ne){var Ct=I.nest().key(function(we){return we.column}).sortKeys(g.ascending).entries(Le.nodes).map(function(we){return we.values});Nt(ne),le();for(var gt=1,St=Gt;St>0;--St)re(gt*=.99,ne),le();function Nt(we){if(Te){var Ue=1/0;Ct.forEach(function(Ar){var mr=fe*Te/(Ar.length+1);Ue=mr0))if(Ar==0&&Sr==1)Qr=mr.y1-mr.y0,mr.y0=fe/2-Qr/2,mr.y1=fe/2+Qr/2;else if(Ar==qe-1&&Sr==1)Qr=mr.y1-mr.y0,mr.y0=fe/2-Qr/2,mr.y1=fe/2+Qr/2;else{var Hn=0,Wn=g.mean(mr.sourceLinks,b),Xn=g.mean(mr.targetLinks,u);Wn&&Xn?Hn=(Wn+Xn)/2:Hn=Wn||Xn;var Ii=(Hn-T(mr))*we;mr.y0+=Ii,mr.y1+=Ii}})})}function le(){Ct.forEach(function(we){var Ue,qe,or=Jt,Sr=we.length,Ar;for(we.sort(y),Ar=0;Ar0&&(Ue.y0+=qe,Ue.y1+=qe),or=Ue.y1+se;if(qe=or-se-fe,qe>0)for(or=Ue.y0-=qe,Ue.y1-=qe,Ar=Sr-2;Ar>=0;--Ar)Ue=we[Ar],qe=Ue.y1+se-or,qe>0&&(Ue.y0-=qe,Ue.y1-=qe),or=Ue.y0})}}function nn(Le){Le.nodes.forEach(function(Gt){Gt.sourceLinks.sort(x),Gt.targetLinks.sort(f)}),Le.nodes.forEach(function(Gt){var ne=Gt.y0,Ct=ne,gt=Gt.y1,St=gt;Gt.sourceLinks.forEach(function(Nt){Nt.circular?(Nt.y0=gt-Nt.width/2,gt=gt-Nt.width):(Nt.y0=ne+Nt.width/2,ne+=Nt.width)}),Gt.targetLinks.forEach(function(Nt){Nt.circular?(Nt.y1=St-Nt.width/2,St=St-Nt.width):(Nt.y1=Ct+Nt.width/2,Ct+=Nt.width)})})}return Ge}function R(Wt,Jt,ge){var fe=0;if(ge===null){for(var pe=[],se=0;seJt.source.column)}function H(Wt,Jt){var ge=0;Wt.sourceLinks.forEach(function(pe){ge=pe.circular&&!Pt(pe,Jt)?ge+1:ge});var fe=0;return Wt.targetLinks.forEach(function(pe){fe=pe.circular&&!Pt(pe,Jt)?fe+1:fe}),ge+fe}function F(Wt){var Jt=Wt.source.sourceLinks,ge=0;Jt.forEach(function(se){ge=se.circular?ge+1:ge});var fe=Wt.target.targetLinks,pe=0;return fe.forEach(function(se){pe=se.circular?pe+1:pe}),!(ge>1||pe>1)}function U(Wt,Jt,ge){return Wt.sort(J),Wt.forEach(function(fe,pe){var se=0;if(Pt(fe,ge)&&F(fe))fe.circularPathData.verticalBuffer=se+fe.width/2;else{var Tt=0;for(Tt;Ttse?Lt:se}fe.circularPathData.verticalBuffer=se+fe.width/2}}),Wt}function W(Wt,Jt,ge,fe){var pe=5,se=g.min(Wt.links,function(Mt){return Mt.source.y0});Wt.links.forEach(function(Mt){Mt.circular&&(Mt.circularPathData={})});var Tt=Wt.links.filter(function(Mt){return Mt.circularLinkType=="top"});U(Tt,Jt,fe);var Lt=Wt.links.filter(function(Mt){return Mt.circularLinkType=="bottom"});U(Lt,Jt,fe),Wt.links.forEach(function(Mt){if(Mt.circular){if(Mt.circularPathData.arcRadius=Mt.width+p,Mt.circularPathData.leftNodeBuffer=pe,Mt.circularPathData.rightNodeBuffer=pe,Mt.circularPathData.sourceWidth=Mt.source.x1-Mt.source.x0,Mt.circularPathData.sourceX=Mt.source.x0+Mt.circularPathData.sourceWidth,Mt.circularPathData.targetX=Mt.target.x0,Mt.circularPathData.sourceY=Mt.y0,Mt.circularPathData.targetY=Mt.y1,Pt(Mt,fe)&&F(Mt))Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2,Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2,Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Mt.source.y1+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=Mt.source.y0-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius);else{var ee=Mt.source.column,ve=Mt.circularLinkType,oe=Wt.links.filter(function(Ge){return Ge.source.column==ee&&Ge.circularLinkType==ve});Mt.circularLinkType=="bottom"?oe.sort(yt):oe.sort(lt);var Te=0;oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.leftSmallArcRadius=p+Mt.width/2+Te,Mt.circularPathData.leftLargeArcRadius=p+Mt.width/2+cr*Jt+Te),Te=Te+Ge.width}),ee=Mt.target.column,oe=Wt.links.filter(function(Ge){return Ge.target.column==ee&&Ge.circularLinkType==ve}),Mt.circularLinkType=="bottom"?oe.sort(st):oe.sort(mt),Te=0,oe.forEach(function(Ge,cr){Ge.circularLinkID==Mt.circularLinkID&&(Mt.circularPathData.rightSmallArcRadius=p+Mt.width/2+Te,Mt.circularPathData.rightLargeArcRadius=p+Mt.width/2+cr*Jt+Te),Te=Te+Ge.width}),Mt.circularLinkType=="bottom"?(Mt.circularPathData.verticalFullExtent=Math.max(ge,Mt.source.y1,Mt.target.y1)+h+Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent-Mt.circularPathData.rightLargeArcRadius):(Mt.circularPathData.verticalFullExtent=se-h-Mt.circularPathData.verticalBuffer,Mt.circularPathData.verticalLeftInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.leftLargeArcRadius,Mt.circularPathData.verticalRightInnerExtent=Mt.circularPathData.verticalFullExtent+Mt.circularPathData.rightLargeArcRadius)}Mt.circularPathData.leftInnerExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightInnerExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightNodeBuffer,Mt.circularPathData.leftFullExtent=Mt.circularPathData.sourceX+Mt.circularPathData.leftLargeArcRadius+Mt.circularPathData.leftNodeBuffer,Mt.circularPathData.rightFullExtent=Mt.circularPathData.targetX-Mt.circularPathData.rightLargeArcRadius-Mt.circularPathData.rightNodeBuffer}if(Mt.circular)Mt.path=q(Mt);else{var He=S.linkHorizontal().source(function(Ge){var cr=Ge.source.x0+(Ge.source.x1-Ge.source.x0),ur=Ge.y0;return[cr,ur]}).target(function(Ge){var cr=Ge.target.x0,ur=Ge.y1;return[cr,ur]});Mt.path=He(Mt)}})}function q(Wt){var Jt="";return Wt.circularLinkType=="top"?Jt="M"+Wt.circularPathData.sourceX+" "+Wt.circularPathData.sourceY+" L"+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.sourceY+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftSmallArcRadius+" 0 0 0 "+Wt.circularPathData.leftFullExtent+" "+(Wt.circularPathData.sourceY-Wt.circularPathData.leftSmallArcRadius)+" L"+Wt.circularPathData.leftFullExtent+" "+Wt.circularPathData.verticalLeftInnerExtent+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftLargeArcRadius+" 0 0 0 "+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" L"+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightLargeArcRadius+" 0 0 0 "+Wt.circularPathData.rightFullExtent+" "+Wt.circularPathData.verticalRightInnerExtent+" L"+Wt.circularPathData.rightFullExtent+" "+(Wt.circularPathData.targetY-Wt.circularPathData.rightSmallArcRadius)+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightSmallArcRadius+" 0 0 0 "+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.targetY+" L"+Wt.circularPathData.targetX+" "+Wt.circularPathData.targetY:Jt="M"+Wt.circularPathData.sourceX+" "+Wt.circularPathData.sourceY+" L"+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.sourceY+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftSmallArcRadius+" 0 0 1 "+Wt.circularPathData.leftFullExtent+" "+(Wt.circularPathData.sourceY+Wt.circularPathData.leftSmallArcRadius)+" L"+Wt.circularPathData.leftFullExtent+" "+Wt.circularPathData.verticalLeftInnerExtent+" A"+Wt.circularPathData.leftLargeArcRadius+" "+Wt.circularPathData.leftLargeArcRadius+" 0 0 1 "+Wt.circularPathData.leftInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" L"+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.verticalFullExtent+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightLargeArcRadius+" 0 0 1 "+Wt.circularPathData.rightFullExtent+" "+Wt.circularPathData.verticalRightInnerExtent+" L"+Wt.circularPathData.rightFullExtent+" "+(Wt.circularPathData.targetY+Wt.circularPathData.rightSmallArcRadius)+" A"+Wt.circularPathData.rightLargeArcRadius+" "+Wt.circularPathData.rightSmallArcRadius+" 0 0 1 "+Wt.circularPathData.rightInnerExtent+" "+Wt.circularPathData.targetY+" L"+Wt.circularPathData.targetX+" "+Wt.circularPathData.targetY,Jt}function J(Wt,Jt){return tt(Wt)==tt(Jt)?Wt.circularLinkType=="bottom"?yt(Wt,Jt):lt(Wt,Jt):tt(Jt)-tt(Wt)}function lt(Wt,Jt){return Wt.y0-Jt.y0}function yt(Wt,Jt){return Jt.y0-Wt.y0}function mt(Wt,Jt){return Wt.y1-Jt.y1}function st(Wt,Jt){return Jt.y1-Wt.y1}function tt(Wt){return Wt.target.column-Wt.source.column}function dt(Wt){return Wt.target.x0-Wt.source.x1}function rt(Wt,Jt){var ge=j(Wt),fe=dt(Jt)/Math.tan(ge),pe=It(Wt)=="up"?Wt.y1+fe:Wt.y1-fe;return pe}function at(Wt,Jt){var ge=j(Wt),fe=dt(Jt)/Math.tan(ge),pe=It(Wt)=="up"?Wt.y1-fe:Wt.y1+fe;return pe}function vt(Wt,Jt,ge,fe){Wt.links.forEach(function(pe){if(!pe.circular&&pe.target.column-pe.source.column>1){var se=pe.source.column+1,Tt=pe.target.column-1,Lt=1,Mt=Tt-se+1;for(Lt=1;se<=Tt;se++,Lt++)Wt.nodes.forEach(function(ee){if(ee.column==se){var ve=Lt/(Mt+1),oe=Math.pow(1-ve,3),Te=3*ve*Math.pow(1-ve,2),He=3*Math.pow(ve,2)*(1-ve),Ge=Math.pow(ve,3),cr=oe*pe.y0+Te*pe.y0+He*pe.y1+Ge*pe.y1,ur=cr-pe.width/2,jr=cr+pe.width/2,Wr;ur>ee.y0&&uree.y0&&jree.y1&&Y(br,Wr,Jt,ge)})):uree.y1&&(Wr=jr-ee.y0+10,ee=Y(ee,Wr,Jt,ge),Wt.nodes.forEach(function(br){A(br,fe)==A(ee,fe)||br.column!=ee.column||br.y0ee.y1&&Y(br,Wr,Jt,ge)}))}})}})}function it(Wt,Jt){return Wt.y0>Jt.y0&&Wt.y0Jt.y0&&Wt.y1Jt.y1}function Y(Wt,Jt,ge,fe){return Wt.y0+Jt>=ge&&Wt.y1+Jt<=fe&&(Wt.y0=Wt.y0+Jt,Wt.y1=Wt.y1+Jt,Wt.targetLinks.forEach(function(pe){pe.y1=pe.y1+Jt}),Wt.sourceLinks.forEach(function(pe){pe.y0=pe.y0+Jt})),Wt}function ft(Wt,Jt,ge,fe){Wt.nodes.forEach(function(pe){fe&&pe.y+(pe.y1-pe.y0)>Jt&&(pe.y=pe.y-(pe.y+(pe.y1-pe.y0)-Jt));var se=Wt.links.filter(function(Mt){return A(Mt.source,ge)==A(pe,ge)}),Tt=se.length;Tt>1&&se.sort(function(Mt,ee){if(!Mt.circular&&!ee.circular){if(Mt.target.column==ee.target.column)return Mt.y1-ee.y1;if(kt(Mt,ee)){if(Mt.target.column>ee.target.column){var ve=at(ee,Mt);return Mt.y1-ve}if(ee.target.column>Mt.target.column){var oe=at(Mt,ee);return oe-ee.y1}}else return Mt.y1-ee.y1}if(Mt.circular&&!ee.circular)return Mt.circularLinkType=="top"?-1:1;if(ee.circular&&!Mt.circular)return ee.circularLinkType=="top"?1:-1;if(Mt.circular&&ee.circular)return Mt.circularLinkType===ee.circularLinkType&&Mt.circularLinkType=="top"?Mt.target.column===ee.target.column?Mt.target.y1-ee.target.y1:ee.target.column-Mt.target.column:Mt.circularLinkType===ee.circularLinkType&&Mt.circularLinkType=="bottom"?Mt.target.column===ee.target.column?ee.target.y1-Mt.target.y1:Mt.target.column-ee.target.column:Mt.circularLinkType=="top"?-1:1});var Lt=pe.y0;se.forEach(function(Mt){Mt.y0=Lt+Mt.width/2,Lt=Lt+Mt.width}),se.forEach(function(Mt,ee){if(Mt.circularLinkType=="bottom"){var ve=ee+1,oe=0;for(ve;ve1&&pe.sort(function(Lt,Mt){if(!Lt.circular&&!Mt.circular){if(Lt.source.column==Mt.source.column)return Lt.y0-Mt.y0;if(kt(Lt,Mt)){if(Mt.source.column0?"up":"down"}function Pt(Wt,Jt){return A(Wt.source,Jt)==A(Wt.target,Jt)}function qt(Wt,Jt,ge){var fe=Wt.nodes,pe=Wt.links,se=!1,Tt=!1;if(pe.forEach(function(Te){Te.circularLinkType=="top"?se=!0:Te.circularLinkType=="bottom"&&(Tt=!0)}),se==!1||Tt==!1){var Lt=g.min(fe,function(Te){return Te.y0}),Mt=g.max(fe,function(Te){return Te.y1}),ee=Mt-Lt,ve=ge-Jt,oe=ve/ee;fe.forEach(function(Te){var He=(Te.y1-Te.y0)*oe;Te.y0=(Te.y0-Lt)*oe,Te.y1=Te.y0+He}),pe.forEach(function(Te){Te.y0=(Te.y0-Lt)*oe,Te.y1=(Te.y1-Lt)*oe,Te.width=Te.width*oe})}}c.sankeyCircular=w,c.sankeyCenter=o,c.sankeyLeft=r,c.sankeyRight=a,c.sankeyJustify=n,Object.defineProperty(c,"__esModule",{value:!0})})}),RE=Dt((Q,Z)=>{Z.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}),Aq=Dt((Q,Z)=>{var c=_q(),g=(mx(),ni(j1)).interpolateNumber,I=qr(),S=wq(),t=Tq(),e=RE(),r=ro(),a=hi(),n=Vs(),o=kn(),i=o.strTranslate,l=o.strRotate,f=zg(),x=f.keyFun,y=f.repeat,v=f.unwrap,T=ec(),u=Jo(),b=Af(),_=b.CAP_SHIFT,P=b.LINE_SPACING,M=3;function C(rt,at,vt){var it=v(at),Y=it.trace,ft=Y.domain,ut=Y.orientation==="h",kt=Y.node.pad,It=Y.node.thickness,Pt={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[Y.node.align],qt=rt.width*(ft.x[1]-ft.x[0]),Wt=rt.height*(ft.y[1]-ft.y[0]),Jt=it._nodes,ge=it._links,fe=it.circular,pe;fe?pe=t.sankeyCircular().circularLinkGap(0):pe=S.sankey(),pe.iterations(e.sankeyIterations).size(ut?[qt,Wt]:[Wt,qt]).nodeWidth(It).nodePadding(kt).nodeId(function(br){return br.pointNumber}).nodeAlign(Pt).nodes(Jt).links(ge);var se=pe();pe.nodePadding()=Gt||(Le=Gt-nn.y0,Le>1e-6&&(nn.y0+=Le,nn.y1+=Le)),Gt=nn.y1+kt})}function cr(br){var Xr=br.map(function(St,Nt){return{x0:St.x0,index:Nt}}).sort(function(St,Nt){return St.x0-Nt.x0}),nn=[],Le=-1,Gt,ne=-1/0,Ct;for(Tt=0;Ttne+It&&(Le+=1,Gt=gt.x0),ne=gt.x0,nn[Le]||(nn[Le]=[]),nn[Le].push(gt),Ct=Gt-gt.x0,gt.x0+=Ct,gt.x1+=Ct}return nn}if(Y.node.x.length&&Y.node.y.length){for(Tt=0;Tt0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"):(vt="M "+(Y.targetX-at)+" "+(Y.targetY-it)+" L "+(Y.rightInnerExtent-at)+" "+(Y.targetY-it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightSmallArcRadius+it)+" 0 0 0 "+(Y.rightFullExtent-it-at)+" "+(Y.targetY+Y.rightSmallArcRadius)+" L "+(Y.rightFullExtent-it-at)+" "+Y.verticalRightInnerExtent,ft&&ut?vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightInnerExtent-it-at)+" "+(Y.verticalFullExtent+it)+" L "+(Y.rightFullExtent+it-at-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent+it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent:ft?vt+=" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent-at-it-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" L "+(Y.leftFullExtent+it+(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent:vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightInnerExtent-at)+" "+(Y.verticalFullExtent+it)+" L "+Y.leftInnerExtent+" "+(Y.verticalFullExtent+it)+" A "+(Y.leftLargeArcRadius+it)+" "+(Y.leftLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+Y.verticalLeftInnerExtent,vt+=" L "+(Y.leftFullExtent+it)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" A "+(Y.leftLargeArcRadius+it)+" "+(Y.leftSmallArcRadius+it)+" 0 0 0 "+Y.leftInnerExtent+" "+(Y.sourceY-it)+" L "+Y.sourceX+" "+(Y.sourceY-it)+" L "+Y.sourceX+" "+(Y.sourceY+it)+" L "+Y.leftInnerExtent+" "+(Y.sourceY+it)+" A "+(Y.leftLargeArcRadius-it)+" "+(Y.leftSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent-it)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" L "+(Y.leftFullExtent-it)+" "+Y.verticalLeftInnerExtent,ft&&ut?vt+=" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.leftFullExtent-it-(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" L "+(Y.rightFullExtent+it-at+(Y.rightLargeArcRadius-it))+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent:ft?vt+=" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.leftFullExtent+it)+" "+(Y.verticalFullExtent+it)+" L "+(Y.rightFullExtent-at-it)+" "+(Y.verticalFullExtent+it)+" A "+(Y.rightLargeArcRadius+it)+" "+(Y.rightLargeArcRadius+it)+" 0 0 0 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent:vt+=" A "+(Y.leftLargeArcRadius-it)+" "+(Y.leftLargeArcRadius-it)+" 0 0 1 "+Y.leftInnerExtent+" "+(Y.verticalFullExtent-it)+" L "+(Y.rightInnerExtent-at)+" "+(Y.verticalFullExtent-it)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightLargeArcRadius-it)+" 0 0 1 "+(Y.rightFullExtent+it-at)+" "+Y.verticalRightInnerExtent,vt+=" L "+(Y.rightFullExtent+it-at)+" "+(Y.targetY+Y.rightSmallArcRadius)+" A "+(Y.rightLargeArcRadius-it)+" "+(Y.rightSmallArcRadius-it)+" 0 0 1 "+(Y.rightInnerExtent-at)+" "+(Y.targetY+it)+" L "+(Y.targetX-at)+" "+(Y.targetY+it)+(at>0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"),vt}function p(){var rt=.5;function at(vt){var it=vt.linkArrowLength;if(vt.link.circular)return h(vt.link,it);var Y=Math.abs((vt.link.target.x0-vt.link.source.x1)/2);it>Y&&(it=Y);var ft=vt.link.source.x1,ut=vt.link.target.x0-it,kt=g(ft,ut),It=kt(rt),Pt=kt(1-rt),qt=vt.link.y0-vt.link.width/2,Wt=vt.link.y0+vt.link.width/2,Jt=vt.link.y1-vt.link.width/2,ge=vt.link.y1+vt.link.width/2,fe="M"+ft+","+qt,pe="C"+It+","+qt+" "+Pt+","+Jt+" "+ut+","+Jt,se="C"+Pt+","+ge+" "+It+","+Wt+" "+ft+","+Wt,Tt=it>0?"L"+(ut+it)+","+(Jt+vt.link.width/2):"";return Tt+="L"+ut+","+ge,fe+pe+Tt+se+"Z"}return at}function k(rt,at){var vt=r(at.color),it=e.nodePadAcross,Y=rt.nodePad/2;at.dx=at.x1-at.x0,at.dy=at.y1-at.y0;var ft=at.dx,ut=Math.max(.5,at.dy),kt="node_"+at.pointNumber;return at.group&&(kt=o.randstr()),at.trace=rt.trace,at.curveNumber=rt.trace.index,{index:at.pointNumber,key:kt,partOfGroup:at.partOfGroup||!1,group:at.group,traceId:rt.key,trace:rt.trace,node:at,nodePad:rt.nodePad,nodeLineColor:rt.nodeLineColor,nodeLineWidth:rt.nodeLineWidth,textFont:rt.textFont,size:rt.horizontal?rt.height:rt.width,visibleWidth:Math.ceil(ft),visibleHeight:ut,zoneX:-it,zoneY:-Y,zoneWidth:ft+2*it,zoneHeight:ut+2*Y,labelY:rt.horizontal?at.dy/2+1:at.dx/2+1,left:at.originalLayer===1,sizeAcross:rt.width,forceLayouts:rt.forceLayouts,horizontal:rt.horizontal,darkBackground:vt.getBrightness()<=128,tinyColorHue:a.tinyRGB(vt),tinyColorAlpha:vt.getAlpha(),valueFormat:rt.valueFormat,valueSuffix:rt.valueSuffix,sankey:rt.sankey,graph:rt.graph,arrangement:rt.arrangement,uniqueNodeLabelPathId:[rt.guid,rt.key,kt].join("_"),interactionState:rt.interactionState,figure:rt}}function w(rt){rt.attr("transform",function(at){return i(at.node.x0.toFixed(3),at.node.y0.toFixed(3))})}function R(rt){rt.call(w)}function O(rt,at){rt.call(R),at.attr("d",p())}function j(rt){rt.attr("width",function(at){return at.node.x1-at.node.x0}).attr("height",function(at){return at.visibleHeight})}function V(rt){return rt.link.width>1||rt.linkLineWidth>0}function H(rt){var at=i(rt.translateX,rt.translateY);return at+(rt.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function F(rt,at,vt){rt.on(".basic",null).on("mouseover.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.hover(this,it,at),it.interactionState.hovered=[this,it])}).on("mousemove.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.follow(this,it),it.interactionState.hovered=[this,it])}).on("mouseout.basic",function(it){!it.interactionState.dragInProgress&&!it.partOfGroup&&(vt.unhover(this,it,at),it.interactionState.hovered=!1)}).on("click.basic",function(it){it.interactionState.hovered&&(vt.unhover(this,it,at),it.interactionState.hovered=!1),!it.interactionState.dragInProgress&&!it.partOfGroup&&vt.select(this,it,at)})}function U(rt,at,vt,it){var Y=I.behavior.drag().origin(function(ft){return{x:ft.node.x0+ft.visibleWidth/2,y:ft.node.y0+ft.visibleHeight/2}}).on("dragstart",function(ft){if(ft.arrangement!=="fixed"&&(o.ensureSingle(it._fullLayout._infolayer,"g","dragcover",function(kt){it._fullLayout._dragCover=kt}),o.raiseToTop(this),ft.interactionState.dragInProgress=ft.node,mt(ft.node),ft.interactionState.hovered&&(vt.nodeEvents.unhover.apply(0,ft.interactionState.hovered),ft.interactionState.hovered=!1),ft.arrangement==="snap")){var ut=ft.traceId+"|"+ft.key;ft.forceLayouts[ut]?ft.forceLayouts[ut].alpha(1):W(rt,ut,ft),q(rt,at,ft,ut,it)}}).on("drag",function(ft){if(ft.arrangement!=="fixed"){var ut=I.event.x,kt=I.event.y;ft.arrangement==="snap"?(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2,ft.node.y0=kt-ft.visibleHeight/2,ft.node.y1=kt+ft.visibleHeight/2):(ft.arrangement==="freeform"&&(ft.node.x0=ut-ft.visibleWidth/2,ft.node.x1=ut+ft.visibleWidth/2),kt=Math.max(0,Math.min(ft.size-ft.visibleHeight/2,kt)),ft.node.y0=kt-ft.visibleHeight/2,ft.node.y1=kt+ft.visibleHeight/2),mt(ft.node),ft.arrangement!=="snap"&&(ft.sankey.update(ft.graph),O(rt.filter(st(ft)),at))}}).on("dragend",function(ft){if(ft.arrangement!=="fixed"){ft.interactionState.dragInProgress=!1;for(var ut=0;ut0)window.requestAnimationFrame(ft);else{var It=vt.node.originalX;vt.node.x0=It-vt.visibleWidth/2,vt.node.x1=It+vt.visibleWidth/2,lt(vt,Y)}})}function J(rt,at,vt,it){return function(){for(var Y=0,ft=0;ft0&&it.forceLayouts[at].alpha(0)}}function lt(rt,at){for(var vt=[],it=[],Y=0;Y{var c=qr(),g=kn(),I=g.numberFormat,S=Aq(),t=tf(),e=hi(),r=RE().cn,a=g._;function n(_){return _!==""}function o(_,P){return _.filter(function(M){return M.key===P.traceId})}function i(_,P){c.select(_).select("path").style("fill-opacity",P),c.select(_).select("rect").style("fill-opacity",P)}function l(_){c.select(_).select("text.name").style("fill","black")}function f(_){return function(P){return _.node.sourceLinks.indexOf(P.link)!==-1||_.node.targetLinks.indexOf(P.link)!==-1}}function x(_){return function(P){return P.node.sourceLinks.indexOf(_.link)!==-1||P.node.targetLinks.indexOf(_.link)!==-1}}function y(_,P,M){P&&M&&o(M,P).selectAll("."+r.sankeyLink).filter(f(P)).call(T.bind(0,P,M,!1))}function v(_,P,M){P&&M&&o(M,P).selectAll("."+r.sankeyLink).filter(f(P)).call(u.bind(0,P,M,!1))}function T(_,P,M,C){C.style("fill",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverHue}).style("fill-opacity",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverAlpha}),C.each(function(A){var h=A.link.label;h!==""&&o(P,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverHue}).style("fill-opacity",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverAlpha})}),M&&o(P,_).selectAll("."+r.sankeyNode).filter(x(_)).call(y)}function u(_,P,M,C){C.style("fill",function(A){return A.tinyColorHue}).style("fill-opacity",function(A){return A.tinyColorAlpha}),C.each(function(A){var h=A.link.label;h!==""&&o(P,_).selectAll("."+r.sankeyLink).filter(function(p){return p.link.label===h}).style("fill",function(p){return p.tinyColorHue}).style("fill-opacity",function(p){return p.tinyColorAlpha})}),M&&o(P,_).selectAll(r.sankeyNode).filter(x(_)).call(v)}function b(_,P){var M=_.hoverlabel||{},C=g.nestedProperty(M,P).get();return Array.isArray(C)?!1:C}Z.exports=function(_,P){for(var M=_._fullLayout,C=M._paper,A=M._size,h=0;h<_._fullData.length;h++)if(_._fullData[h].visible&&_._fullData[h].type===r.sankey&&!_._fullData[h]._viewInitial){var p=_._fullData[h].node;_._fullData[h]._viewInitial={node:{groups:p.groups.slice(),x:p.x.slice(),y:p.y.slice()}}}var k=function(yt,mt){var st=mt.link;st.originalEvent=c.event,_._hoverdata=[st],t.click(_,{target:!0})},w=function(yt,mt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(T.bind(0,mt,st,!0)),mt.link.trace.link.hoverinfo!=="skip"&&(mt.link.fullData=mt.link.trace,_.emit("plotly_hover",{event:c.event,points:[mt.link]})))},R=a(_,"source:")+" ",O=a(_,"target:")+" ",j=a(_,"concentration:")+" ",V=a(_,"incoming flow count:")+" ",H=a(_,"outgoing flow count:")+" ",F=function(yt,mt){if(_._fullLayout.hovermode===!1)return;var st=mt.link.trace.link;if(st.hoverinfo==="none"||st.hoverinfo==="skip")return;var tt=[];function dt(ut){var kt,It;ut.circular?(kt=(ut.circularPathData.leftInnerExtent+ut.circularPathData.rightInnerExtent)/2,It=ut.circularPathData.verticalFullExtent):(kt=(ut.source.x1+ut.target.x0)/2,It=(ut.y0+ut.y1)/2);var Pt=[kt,It];return ut.trace.orientation==="v"&&Pt.reverse(),Pt[0]+=mt.parent.translateX,Pt[1]+=mt.parent.translateY,Pt}for(var rt=0,at=0;at"),color:b(st,"bgcolor")||e.addOpacity(vt.color,1),borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:c.event.x"),color:b(st,"bgcolor")||mt.tinyColorHue,borderColor:b(st,"bordercolor"),fontFamily:b(st,"font.family"),fontSize:b(st,"font.size"),fontColor:b(st,"font.color"),fontWeight:b(st,"font.weight"),fontStyle:b(st,"font.style"),fontVariant:b(st,"font.variant"),fontTextcase:b(st,"font.textcase"),fontLineposition:b(st,"font.lineposition"),fontShadow:b(st,"font.shadow"),nameLength:b(st,"namelength"),textAlign:b(st,"align"),idealAlign:"left",hovertemplate:st.hovertemplate,hovertemplateLabels:Y,eventData:[mt.node]},{container:M._hoverlayer.node(),outerContainer:M._paper.node(),gd:_});i(kt,.85),l(kt)}}},lt=function(yt,mt,st){_._fullLayout.hovermode!==!1&&(c.select(yt).call(v,mt,st),mt.node.trace.node.hoverinfo!=="skip"&&(mt.node.fullData=mt.node.trace,_.emit("plotly_unhover",{event:c.event,points:[mt.node]})),t.loneUnhover(M._hoverlayer.node()))};S(_,C,P,{width:A.w,height:A.h,margin:{t:A.t,r:A.r,b:A.b,l:A.l}},{linkEvents:{hover:w,follow:F,unhover:U,select:k},nodeEvents:{hover:q,follow:J,unhover:lt,select:W}})}}),Mq=Dt(Q=>{var Z=Yc().overrideAll,c=ud().getModuleCalcData,g=BE(),I=po(),S=P0(),t=up(),e=vf().prepSelect,r=kn(),a=Jo(),n="sankey";Q.name=n,Q.baseLayoutAttrOverrides=Z({hoverlabel:I.hoverlabel},"plot","nested"),Q.plot=function(i){var l=c(i.calcdata,n)[0];g(i,l),Q.updateFx(i)},Q.clean=function(i,l,f,x){var y=x._has&&x._has(n),v=l._has&&l._has(n);y&&!v&&(x._paperdiv.selectAll(".sankey").remove(),x._paperdiv.selectAll(".bgsankey").remove())},Q.updateFx=function(i){for(var l=0;l{Z.exports=function(c,g){for(var I=c.cd,S=[],t=I[0].trace,e=t._sankey.graph.nodes,r=0;r{Z.exports={attributes:OE(),supplyDefaults:mq(),calc:gq(),plot:BE(),moduleType:"trace",name:"sankey",basePlotModule:Mq(),selectPoints:Sq(),categories:["noOpacity"],meta:{}}}),Cq=Dt((Q,Z)=>{Z.exports=Eq()}),Lq=Dt(Q=>{var Z=Kc();Q.name="indicator",Q.plot=function(c,g,I,S){Z.plotBasePlot(Q.name,c,g,I,S)},Q.clean=function(c,g,I,S){Z.cleanBasePlot(Q.name,c,g,I,S)}}),NE=Dt((Q,Z)=>{var c=Ia().extendFlat,g=Ia().extendDeep,I=Yc().overrideAll,S=da(),t=wi(),e=jh().attributes,r=Td(),a=mu().templatedArray,n=rb(),o=dh().descriptionOnlyNumbers,i=S({editType:"plot",colorEditType:"plot"}),l={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:t.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},f={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},x=a("step",g({},l,{range:f}));Z.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:e({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:c({},i,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:o("value")},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:o("value")},increasing:{symbol:{valType:"string",dflt:n.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:n.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:n.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:c({},i,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:g({},l,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:t.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:I({range:f,visible:c({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:c({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:S({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:x,threshold:{line:{color:c({},l.line.color,{}),width:c({},l.line.width,{dflt:1}),editType:"plot"},thickness:c({},l.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}),jE=Dt((Q,Z)=>{Z.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}),Pq=Dt((Q,Z)=>{var c=kn(),g=NE(),I=jh().defaults,S=mu(),t=Ad(),e=jE(),r=yg(),a=xg(),n=n0(),o=dm();function i(f,x,y,v){function T(U,W){return c.coerce(f,x,g,U,W)}I(x,v,T),T("mode"),x._hasNumber=x.mode.indexOf("number")!==-1,x._hasDelta=x.mode.indexOf("delta")!==-1,x._hasGauge=x.mode.indexOf("gauge")!==-1;var u=T("value");x._range=[0,typeof u=="number"?1.5*u:1];var b=new Array(2),_;if(x._hasNumber){T("number.valueformat");var P=c.extendFlat({},v.font);P.size=void 0,c.coerceFont(T,"number.font",P),x.number.font.size===void 0&&(x.number.font.size=e.defaultNumberFontSize,b[0]=!0),T("number.prefix"),T("number.suffix"),_=x.number.font.size}var M;if(x._hasDelta){var C=c.extendFlat({},v.font);C.size=void 0,c.coerceFont(T,"delta.font",C),x.delta.font.size===void 0&&(x.delta.font.size=(x._hasNumber?.5:1)*(_||e.defaultNumberFontSize),b[1]=!0),T("delta.reference",x.value),T("delta.relative"),T("delta.valueformat",x.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),M=x.delta.font.size}x._scaleNumbers=(!x._hasNumber||b[0])&&(!x._hasDelta||b[1])||!1;var A=c.extendFlat({},v.font);A.size=.25*(_||M||e.defaultNumberFontSize),c.coerceFont(T,"title.font",A),T("title.text");var h,p,k,w;function R(U,W){return c.coerce(h,p,g.gauge,U,W)}function O(U,W){return c.coerce(k,w,g.gauge.axis,U,W)}if(x._hasGauge){h=f.gauge,h||(h={}),p=S.newContainer(x,"gauge"),R("shape");var j=x._isBullet=x.gauge.shape==="bullet";j||T("title.align","center");var V=x._isAngular=x.gauge.shape==="angular";V||T("align","center"),R("bgcolor",v.paper_bgcolor),R("borderwidth"),R("bordercolor"),R("bar.color"),R("bar.line.color"),R("bar.line.width");var H=e.valueThickness*(x.gauge.shape==="bullet"?.5:1);R("bar.thickness",H),t(h,p,{name:"steps",handleItemDefaults:l}),R("threshold.value"),R("threshold.thickness"),R("threshold.line.width"),R("threshold.line.color"),k={},h&&(k=h.axis||{}),w=S.newContainer(p,"axis"),O("visible"),x._range=O("range",x._range);var F={font:v.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(k,w,O,"linear"),o(k,w,O,"linear",F),n(k,w,O,"linear",F),a(k,w,O,F)}else T("title.align","center"),T("align","center"),x._isAngular=x._isBullet=!1;x._length=null}function l(f,x){function y(v,T){return c.coerce(f,x,g.gauge.steps,v,T)}y("color"),y("line.color"),y("line.width"),y("range"),y("thickness")}Z.exports={supplyDefaults:i}}),Iq=Dt((Q,Z)=>{function c(g,I){var S=[],t=I.value;typeof I._lastValue!="number"&&(I._lastValue=I.value);var e=I._lastValue,r=e;return I._hasDelta&&typeof I.delta.reference=="number"&&(r=I.delta.reference),S[0]={y:t,lastY:e,delta:t-r,relativeDelta:(t-r)/r},S}Z.exports={calc:c}}),zq=Dt((Q,Z)=>{var c=qr(),g=(mx(),ni(j1)).interpolate,I=(mx(),ni(j1)).interpolateNumber,S=kn(),t=S.strScale,e=S.strTranslate,r=S.rad2deg,a=Af().MID_SHIFT,n=Vs(),o=jE(),i=ec(),l=Ls(),f=tx(),x=K_(),y=Td(),v=hi(),T={left:"start",center:"middle",right:"end"},u={left:0,center:.5,right:1},b=/[yzafpnµmkMGTPEZY]/;function _(j){return j&&j.duration>0}Z.exports=function(j,V,H,F){var U=j._fullLayout,W;_(H)&&F&&(W=F()),S.makeTraceGroups(U._indicatorlayer,V,"trace").each(function(q){var J=q[0],lt=J.trace,yt=c.select(this),mt=lt._hasGauge,st=lt._isAngular,tt=lt._isBullet,dt=lt.domain,rt={w:U._size.w*(dt.x[1]-dt.x[0]),h:U._size.h*(dt.y[1]-dt.y[0]),l:U._size.l+U._size.w*dt.x[0],r:U._size.r+U._size.w*(1-dt.x[1]),t:U._size.t+U._size.h*(1-dt.y[1]),b:U._size.b+U._size.h*dt.y[0]},at=rt.l+rt.w/2,vt=rt.t+rt.h/2,it=Math.min(rt.w/2,rt.h),Y=o.innerRadius*it,ft,ut,kt,It=lt.align||"center";if(ut=vt,!mt)ft=rt.l+u[It]*rt.w,kt=function(Lt){return k(Lt,rt.w,rt.h)};else if(st&&(ft=at,ut=vt+it/2,kt=function(Lt){return w(Lt,.9*Y)}),tt){var Pt=o.bulletPadding,qt=1-o.bulletNumberDomainSize+Pt;ft=rt.l+(qt+(1-qt)*u[It])*rt.w,kt=function(Lt){return k(Lt,(o.bulletNumberDomainSize-Pt)*rt.w,rt.h)}}C(j,yt,q,{numbersX:ft,numbersY:ut,numbersScaler:kt,transitionOpts:H,onComplete:W});var Wt,Jt;mt&&(Wt={range:lt.gauge.axis.range,color:lt.gauge.bgcolor,line:{color:lt.gauge.bordercolor,width:0},thickness:1},Jt={range:lt.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:lt.gauge.bordercolor,width:lt.gauge.borderwidth},thickness:1});var ge=yt.selectAll("g.angular").data(st?q:[]);ge.exit().remove();var fe=yt.selectAll("g.angularaxis").data(st?q:[]);fe.exit().remove(),st&&M(j,yt,q,{radius:it,innerRadius:Y,gauge:ge,layer:fe,size:rt,gaugeBg:Wt,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var pe=yt.selectAll("g.bullet").data(tt?q:[]);pe.exit().remove();var se=yt.selectAll("g.bulletaxis").data(tt?q:[]);se.exit().remove(),tt&&P(j,yt,q,{gauge:pe,layer:se,size:rt,gaugeBg:Wt,gaugeOutline:Jt,transitionOpts:H,onComplete:W});var Tt=yt.selectAll("text.title").data(q);Tt.exit().remove(),Tt.enter().append("text").classed("title",!0),Tt.attr("text-anchor",function(){return tt?T.right:T[lt.title.align]}).text(lt.title.text).call(n.font,lt.title.font).call(i.convertToTspans,j),Tt.attr("transform",function(){var Lt=rt.l+rt.w*u[lt.title.align],Mt,ee=o.titlePadding,ve=n.bBox(Tt.node());if(mt){if(st)if(lt.gauge.axis.visible){var oe=n.bBox(fe.node());Mt=oe.top-ee-ve.bottom}else Mt=rt.t+rt.h/2-it/2-ve.bottom-ee;tt&&(Mt=ut-(ve.top+ve.bottom)/2,Lt=rt.l-o.bulletPadding*rt.w)}else Mt=lt._numbersTop-ee-ve.bottom;return e(Lt,Mt)})})};function P(j,V,H,F){var U=H[0].trace,W=F.gauge,q=F.layer,J=F.gaugeBg,lt=F.gaugeOutline,yt=F.size,mt=U.domain,st=F.transitionOpts,tt=F.onComplete,dt,rt,at,vt,it;W.enter().append("g").classed("bullet",!0),W.attr("transform",e(yt.l,yt.t)),q.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),q.selectAll("g.xbulletaxistick,path,text").remove();var Y=yt.h,ft=U.gauge.bar.thickness*Y,ut=mt.x[0],kt=mt.x[0]+(mt.x[1]-mt.x[0])*(U._hasNumber||U._hasDelta?1-o.bulletNumberDomainSize:1);dt=p(j,U.gauge.axis),dt._id="xbulletaxis",dt.domain=[ut,kt],dt.setScale(),rt=l.calcTicks(dt),at=l.makeTransTickFn(dt),vt=l.getTickSigns(dt)[2],it=yt.t+yt.h,dt.visible&&(l.drawTicks(j,dt,{vals:dt.ticks==="inside"?l.clipEnds(dt,rt):rt,layer:q,path:l.makeTickPath(dt,it,vt),transFn:at}),l.drawLabels(j,dt,{vals:rt,layer:q,transFn:at,labelFns:l.makeLabelFns(dt,it)}));function It(pe){pe.attr("width",function(se){return Math.max(0,dt.c2p(se.range[1])-dt.c2p(se.range[0]))}).attr("x",function(se){return dt.c2p(se.range[0])}).attr("y",function(se){return .5*(1-se.thickness)*Y}).attr("height",function(se){return se.thickness*Y})}var Pt=[J].concat(U.gauge.steps),qt=W.selectAll("g.bg-bullet").data(Pt);qt.enter().append("g").classed("bg-bullet",!0).append("rect"),qt.select("rect").call(It).call(A),qt.exit().remove();var Wt=W.selectAll("g.value-bullet").data([U.gauge.bar]);Wt.enter().append("g").classed("value-bullet",!0).append("rect"),Wt.select("rect").attr("height",ft).attr("y",(Y-ft)/2).call(A),_(st)?Wt.select("rect").transition().duration(st.duration).ease(st.easing).each("end",function(){tt&&tt()}).each("interrupt",function(){tt&&tt()}).attr("width",Math.max(0,dt.c2p(Math.min(U.gauge.axis.range[1],H[0].y)))):Wt.select("rect").attr("width",typeof H[0].y=="number"?Math.max(0,dt.c2p(Math.min(U.gauge.axis.range[1],H[0].y))):0),Wt.exit().remove();var Jt=H.filter(function(){return U.gauge.threshold.value||U.gauge.threshold.value===0}),ge=W.selectAll("g.threshold-bullet").data(Jt);ge.enter().append("g").classed("threshold-bullet",!0).append("line"),ge.select("line").attr("x1",dt.c2p(U.gauge.threshold.value)).attr("x2",dt.c2p(U.gauge.threshold.value)).attr("y1",(1-U.gauge.threshold.thickness)/2*Y).attr("y2",(1-(1-U.gauge.threshold.thickness)/2)*Y).call(v.stroke,U.gauge.threshold.line.color).style("stroke-width",U.gauge.threshold.line.width),ge.exit().remove();var fe=W.selectAll("g.gauge-outline").data([lt]);fe.enter().append("g").classed("gauge-outline",!0).append("rect"),fe.select("rect").call(It).call(A),fe.exit().remove()}function M(j,V,H,F){var U=H[0].trace,W=F.size,q=F.radius,J=F.innerRadius,lt=F.gaugeBg,yt=F.gaugeOutline,mt=[W.l+W.w/2,W.t+W.h/2+q/2],st=F.gauge,tt=F.layer,dt=F.transitionOpts,rt=F.onComplete,at=Math.PI/2;function vt(He){var Ge=U.gauge.axis.range[0],cr=U.gauge.axis.range[1],ur=(He-Ge)/(cr-Ge)*Math.PI-at;return ur<-at?-at:ur>at?at:ur}function it(He){return c.svg.arc().innerRadius((J+q)/2-He/2*(q-J)).outerRadius((J+q)/2+He/2*(q-J)).startAngle(-at)}function Y(He){He.attr("d",function(Ge){return it(Ge.thickness).startAngle(vt(Ge.range[0])).endAngle(vt(Ge.range[1]))()})}var ft,ut,kt,It;st.enter().append("g").classed("angular",!0),st.attr("transform",e(mt[0],mt[1])),tt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),tt.selectAll("g.xangularaxistick,path,text").remove(),ft=p(j,U.gauge.axis),ft.type="linear",ft.range=U.gauge.axis.range,ft._id="xangularaxis",ft.ticklabeloverflow="allow",ft.setScale();var Pt=function(He){return(ft.range[0]-He.x)/(ft.range[1]-ft.range[0])*Math.PI+Math.PI},qt={},Wt=l.makeLabelFns(ft,0),Jt=Wt.labelStandoff;qt.xFn=function(He){var Ge=Pt(He);return Math.cos(Ge)*Jt},qt.yFn=function(He){var Ge=Pt(He),cr=Math.sin(Ge)>0?.2:1;return-Math.sin(Ge)*(Jt+He.fontSize*cr)+Math.abs(Math.cos(Ge))*(He.fontSize*a)},qt.anchorFn=function(He){var Ge=Pt(He),cr=Math.cos(Ge);return Math.abs(cr)<.1?"middle":cr>0?"start":"end"},qt.heightFn=function(He,Ge,cr){var ur=Pt(He);return-.5*(1+Math.sin(ur))*cr};var ge=function(He){return e(mt[0]+q*Math.cos(He),mt[1]-q*Math.sin(He))};kt=function(He){return ge(Pt(He))};var fe=function(He){var Ge=Pt(He);return ge(Ge)+"rotate("+-r(Ge)+")"};if(ut=l.calcTicks(ft),It=l.getTickSigns(ft)[2],ft.visible){It=ft.ticks==="inside"?-1:1;var pe=(ft.linewidth||1)/2;l.drawTicks(j,ft,{vals:ut,layer:tt,path:"M"+It*pe+",0h"+It*ft.ticklen,transFn:fe}),l.drawLabels(j,ft,{vals:ut,layer:tt,transFn:kt,labelFns:qt})}var se=[lt].concat(U.gauge.steps),Tt=st.selectAll("g.bg-arc").data(se);Tt.enter().append("g").classed("bg-arc",!0).append("path"),Tt.select("path").call(Y).call(A),Tt.exit().remove();var Lt=it(U.gauge.bar.thickness),Mt=st.selectAll("g.value-arc").data([U.gauge.bar]);Mt.enter().append("g").classed("value-arc",!0).append("path");var ee=Mt.select("path");_(dt)?(ee.transition().duration(dt.duration).ease(dt.easing).each("end",function(){rt&&rt()}).each("interrupt",function(){rt&&rt()}).attrTween("d",h(Lt,vt(H[0].lastY),vt(H[0].y))),U._lastValue=H[0].y):ee.attr("d",typeof H[0].y=="number"?Lt.endAngle(vt(H[0].y)):"M0,0Z"),ee.call(A),Mt.exit().remove(),se=[];var ve=U.gauge.threshold.value;(ve||ve===0)&&se.push({range:[ve,ve],color:U.gauge.threshold.color,line:{color:U.gauge.threshold.line.color,width:U.gauge.threshold.line.width},thickness:U.gauge.threshold.thickness});var oe=st.selectAll("g.threshold-arc").data(se);oe.enter().append("g").classed("threshold-arc",!0).append("path"),oe.select("path").call(Y).call(A),oe.exit().remove();var Te=st.selectAll("g.gauge-outline").data([yt]);Te.enter().append("g").classed("gauge-outline",!0).append("path"),Te.select("path").call(Y).call(A),Te.exit().remove()}function C(j,V,H,F){var U=H[0].trace,W=F.numbersX,q=F.numbersY,J=U.align||"center",lt=T[J],yt=F.transitionOpts,mt=F.onComplete,st=S.ensureSingle(V,"g","numbers"),tt,dt,rt,at=[];U._hasNumber&&at.push("number"),U._hasDelta&&(at.push("delta"),U.delta.position==="left"&&at.reverse());var vt=st.selectAll("text").data(at);vt.enter().append("text"),vt.attr("text-anchor",function(){return lt}).attr("class",function(ge){return ge}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),vt.exit().remove();function it(ge,fe,pe,se){if(ge.match("s")&&pe>=0!=se>=0&&!fe(pe).slice(-1).match(b)&&!fe(se).slice(-1).match(b)){var Tt=ge.slice().replace("s","f").replace(/\d+/,function(Mt){return parseInt(Mt)-1}),Lt=p(j,{tickformat:Tt});return function(Mt){return Math.abs(Mt)<1?l.tickText(Lt,Mt).text:fe(Mt)}}else return fe}function Y(){var ge=p(j,{tickformat:U.number.valueformat},U._range);ge.setScale(),l.prepTicks(ge);var fe=function(Mt){return l.tickText(ge,Mt).text},pe=U.number.suffix,se=U.number.prefix,Tt=st.select("text.number");function Lt(){var Mt=typeof H[0].y=="number"?se+fe(H[0].y)+pe:"-";Tt.text(Mt).call(n.font,U.number.font).call(i.convertToTspans,j)}return _(yt)?Tt.transition().duration(yt.duration).ease(yt.easing).each("end",function(){Lt(),mt&&mt()}).each("interrupt",function(){Lt(),mt&&mt()}).attrTween("text",function(){var Mt=c.select(this),ee=I(H[0].lastY,H[0].y);U._lastValue=H[0].y;var ve=it(U.number.valueformat,fe,H[0].lastY,H[0].y);return function(oe){Mt.text(se+ve(ee(oe))+pe)}}):Lt(),tt=R(se+fe(H[0].y)+pe,U.number.font,lt,j),Tt}function ft(){var ge=p(j,{tickformat:U.delta.valueformat},U._range);ge.setScale(),l.prepTicks(ge);var fe=function(oe){return l.tickText(ge,oe).text},pe=U.delta.suffix,se=U.delta.prefix,Tt=function(oe){var Te=U.delta.relative?oe.relativeDelta:oe.delta;return Te},Lt=function(oe,Te){return oe===0||typeof oe!="number"||isNaN(oe)?"-":(oe>0?U.delta.increasing.symbol:U.delta.decreasing.symbol)+se+Te(oe)+pe},Mt=function(oe){return oe.delta>=0?U.delta.increasing.color:U.delta.decreasing.color};U._deltaLastValue===void 0&&(U._deltaLastValue=Tt(H[0]));var ee=st.select("text.delta");ee.call(n.font,U.delta.font).call(v.fill,Mt({delta:U._deltaLastValue}));function ve(){ee.text(Lt(Tt(H[0]),fe)).call(v.fill,Mt(H[0])).call(i.convertToTspans,j)}return _(yt)?ee.transition().duration(yt.duration).ease(yt.easing).tween("text",function(){var oe=c.select(this),Te=Tt(H[0]),He=U._deltaLastValue,Ge=it(U.delta.valueformat,fe,He,Te),cr=I(He,Te);return U._deltaLastValue=Te,function(ur){oe.text(Lt(cr(ur),Ge)),oe.call(v.fill,Mt({delta:cr(ur)}))}}).each("end",function(){ve(),mt&&mt()}).each("interrupt",function(){ve(),mt&&mt()}):ve(),dt=R(Lt(Tt(H[0]),fe),U.delta.font,lt,j),ee}var ut=U.mode+U.align,kt;if(U._hasDelta&&(kt=ft(),ut+=U.delta.position+U.delta.font.size+U.delta.font.family+U.delta.valueformat,ut+=U.delta.increasing.symbol+U.delta.decreasing.symbol,rt=dt),U._hasNumber&&(Y(),ut+=U.number.font.size+U.number.font.family+U.number.valueformat+U.number.suffix+U.number.prefix,rt=tt),U._hasDelta&&U._hasNumber){var It=[(tt.left+tt.right)/2,(tt.top+tt.bottom)/2],Pt=[(dt.left+dt.right)/2,(dt.top+dt.bottom)/2],qt,Wt,Jt=.75*U.delta.font.size;U.delta.position==="left"&&(qt=O(U,"deltaPos",0,-1*(tt.width*u[U.align]+dt.width*(1-u[U.align])+Jt),ut,Math.min),Wt=It[1]-Pt[1],rt={width:tt.width+dt.width+Jt,height:Math.max(tt.height,dt.height),left:dt.left+qt,right:tt.right,top:Math.min(tt.top,dt.top+Wt),bottom:Math.max(tt.bottom,dt.bottom+Wt)}),U.delta.position==="right"&&(qt=O(U,"deltaPos",0,tt.width*(1-u[U.align])+dt.width*u[U.align]+Jt,ut,Math.max),Wt=It[1]-Pt[1],rt={width:tt.width+dt.width+Jt,height:Math.max(tt.height,dt.height),left:tt.left,right:dt.right+qt,top:Math.min(tt.top,dt.top+Wt),bottom:Math.max(tt.bottom,dt.bottom+Wt)}),U.delta.position==="bottom"&&(qt=null,Wt=dt.height,rt={width:Math.max(tt.width,dt.width),height:tt.height+dt.height,left:Math.min(tt.left,dt.left),right:Math.max(tt.right,dt.right),top:tt.bottom-tt.height,bottom:tt.bottom+dt.height}),U.delta.position==="top"&&(qt=null,Wt=tt.top,rt={width:Math.max(tt.width,dt.width),height:tt.height+dt.height,left:Math.min(tt.left,dt.left),right:Math.max(tt.right,dt.right),top:tt.bottom-tt.height-dt.height,bottom:tt.bottom}),kt.attr({dx:qt,dy:Wt})}(U._hasNumber||U._hasDelta)&&st.attr("transform",function(){var ge=F.numbersScaler(rt);ut+=ge[2];var fe=O(U,"numbersScale",1,ge[0],ut,Math.min),pe;U._scaleNumbers||(fe=1),U._isAngular?pe=q-fe*rt.bottom:pe=q-fe*(rt.top+rt.bottom)/2,U._numbersTop=fe*rt.top+pe;var se=rt[J];J==="center"&&(se=(rt.left+rt.right)/2);var Tt=W-fe*se;return Tt=O(U,"numbersTranslate",0,Tt,ut,Math.max),e(Tt,pe)+t(fe)})}function A(j){j.each(function(V){v.stroke(c.select(this),V.line.color)}).each(function(V){v.fill(c.select(this),V.color)}).style("stroke-width",function(V){return V.line.width})}function h(j,V,H){return function(){var F=g(V,H);return function(U){return j.endAngle(F(U))()}}}function p(j,V,H){var F=j._fullLayout,U=S.extendFlat({type:"linear",ticks:"outside",range:H,showline:!0},V),W={type:"linear",_id:"x"+V._id},q={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function J(lt,yt){return S.coerce(U,W,y,lt,yt)}return f(U,W,J,q,F),x(U,W,J,q),W}function k(j,V,H){var F=Math.min(V/j.width,H/j.height);return[F,j,V+"x"+H]}function w(j,V){var H=Math.sqrt(j.width/2*(j.width/2)+j.height*j.height),F=V/H;return[F,j,V]}function R(j,V,H,F){var U=document.createElementNS("http://www.w3.org/2000/svg","text"),W=c.select(U);return W.text(j).attr("x",0).attr("y",0).attr("text-anchor",H).attr("data-unformatted",j).call(i.convertToTspans,F).call(n.font,V),n.bBox(W.node())}function O(j,V,H,F,U,W){var q="_cache"+V;j[q]&&j[q].key===U||(j[q]={key:U,value:H});var J=S.aggNums(W,null,[j[q].value,F],2);return j[q].value=J,J}}),Oq=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"indicator",basePlotModule:Lq(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:NE(),supplyDefaults:Pq().supplyDefaults,calc:Iq().calc,plot:zq(),meta:{}}}),Dq=Dt((Q,Z)=>{Z.exports=Oq()}),UE=Dt((Q,Z)=>{var c=gm(),g=Ia().extendFlat,I=Yc().overrideAll,S=da(),t=jh().attributes,e=dh().descriptionOnlyNumbers;Z.exports=I({domain:t({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:g({},c.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:g({},S({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:g({},c.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:g({},S({arrayOk:!0}))}},"calc","from-root")}),Fq=Dt((Q,Z)=>{var c=kn(),g=UE(),I=jh().defaults;function S(t,e){for(var r=t.columnorder||[],a=t.header.values.length,n=r.slice(0,a),o=n.slice().sort(function(f,x){return f-x}),i=n.map(function(f){return o.indexOf(f)}),l=i.length;l{var c=zg().wrap;Z.exports=function(){return c({})}}),VE=Dt((Q,Z)=>{Z.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}),Bq=Dt((Q,Z)=>{var c=VE(),g=Ia().extendFlat,I=Yi(),S=Ma().isTypedArray,t=Ma().isArrayOrTypedArray;Z.exports=function(x,y){var v=a(y.cells.values),T=function(J){return J.slice(y.header.values.length,J.length)},u=a(y.header.values);u.length&&!u[0].length&&(u[0]=[""],u=a(u));var b=u.concat(T(v).map(function(){return n((u[0]||[""]).length)})),_=y.domain,P=Math.floor(x._fullLayout._size.w*(_.x[1]-_.x[0])),M=Math.floor(x._fullLayout._size.h*(_.y[1]-_.y[0])),C=y.header.values.length?b[0].map(function(){return y.header.height}):[c.emptyHeaderHeight],A=v.length?v[0].map(function(){return y.cells.height}):[],h=C.reduce(r,0),p=M-h,k=p+c.uplift,w=l(A,k),R=l(C,h),O=i(R,[]),j=i(w,O),V={},H=y._fullInput.columnorder;t(H)&&(H=Array.from(H)),H=H.concat(T(v.map(function(J,lt){return lt})));var F=b.map(function(J,lt){var yt=t(y.columnwidth)?y.columnwidth[Math.min(lt,y.columnwidth.length-1)]:y.columnwidth;return I(yt)?Number(yt):1}),U=F.reduce(r,0);F=F.map(function(J){return J/U*P});var W=Math.max(e(y.header.line.width),e(y.cells.line.width)),q={key:y.uid+x._context.staticPlot,translateX:_.x[0]*x._fullLayout._size.w,translateY:x._fullLayout._size.h*(1-_.y[1]),size:x._fullLayout._size,width:P,maxLineWidth:W,height:M,columnOrder:H,groupHeight:M,rowBlocks:j,headerRowBlocks:O,scrollY:0,cells:g({},y.cells,{values:v}),headerCells:g({},y.header,{values:b}),gdColumns:b.map(function(J){return J[0]}),gdColumnsOriginalOrder:b.map(function(J){return J[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:b.map(function(J,lt){var yt=V[J];V[J]=(yt||0)+1;var mt=J+"__"+V[J];return{key:mt,label:J,specIndex:lt,xIndex:H[lt],xScale:o,x:void 0,calcdata:void 0,columnWidth:F[lt]}})};return q.columns.forEach(function(J){J.calcdata=q,J.x=o(J)}),q};function e(x){if(t(x)){for(var y=0,v=0;v=y||C===x.length-1)&&(v[u]=_,_.key=M++,_.firstRowIndex=P,_.lastRowIndex=C,_=f(),u+=b,P=C+1,b=0);return v}function f(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}),Nq=Dt(Q=>{var Z=Ia().extendFlat;Q.splitToPanels=function(g){var I=[0,0],S=Z({},g,{key:"header",type:"header",page:0,prevPages:I,currentRepaint:[null,null],dragHandle:!0,values:g.calcdata.headerCells.values[g.specIndex],rowBlocks:g.calcdata.headerRowBlocks,calcdata:Z({},g.calcdata,{cells:g.calcdata.headerCells})}),t=Z({},g,{key:"cells1",type:"cells",page:0,prevPages:I,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks}),e=Z({},g,{key:"cells2",type:"cells",page:1,prevPages:I,currentRepaint:[null,null],dragHandle:!1,values:g.calcdata.cells.values[g.specIndex],rowBlocks:g.calcdata.rowBlocks});return[t,e,S]},Q.splitToCells=function(g){var I=c(g);return(g.values||[]).slice(I[0],I[1]).map(function(S,t){var e=typeof S=="string"&&S.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:t+e,key:I[0]+t,column:g,calcdata:g.calcdata,page:g.page,rowBlocks:g.rowBlocks,value:S}})};function c(g){var I=g.rowBlocks[g.page],S=I?I.rows[0].rowIndex:0,t=I?S+I.rows.length:0;return[S,t]}}),HE=Dt((Q,Z)=>{var c=VE(),g=qr(),I=kn(),S=I.numberFormat,t=zg(),e=Vs(),r=ec(),a=kn().raiseToTop,n=kn().strTranslate,o=kn().cancelTransition,i=Bq(),l=Nq(),f=hi();Z.exports=function(ft,ut){var kt=!ft._context.staticPlot,It=ft._fullLayout._paper.selectAll("."+c.cn.table).data(ut.map(function(oe){var Te=t.unwrap(oe),He=Te.trace;return i(ft,He)}),t.keyFun);It.exit().remove(),It.enter().append("g").classed(c.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),It.attr("width",function(oe){return oe.width+oe.size.l+oe.size.r}).attr("height",function(oe){return oe.height+oe.size.t+oe.size.b}).attr("transform",function(oe){return n(oe.translateX,oe.translateY)});var Pt=It.selectAll("."+c.cn.tableControlView).data(t.repeat,t.keyFun),qt=Pt.enter().append("g").classed(c.cn.tableControlView,!0).style("box-sizing","content-box");if(kt){var Wt="onwheel"in document?"wheel":"mousewheel";qt.on("mousemove",function(oe){Pt.filter(function(Te){return oe===Te}).call(u,ft)}).on(Wt,function(oe){if(!oe.scrollbarState.wheeling){oe.scrollbarState.wheeling=!0;var Te=oe.scrollY+g.event.deltaY,He=lt(ft,Pt,null,Te)(oe);He||(g.event.stopPropagation(),g.event.preventDefault()),oe.scrollbarState.wheeling=!1}}).call(u,ft,!0)}Pt.attr("transform",function(oe){return n(oe.size.l,oe.size.t)});var Jt=Pt.selectAll("."+c.cn.scrollBackground).data(t.repeat,t.keyFun);Jt.enter().append("rect").classed(c.cn.scrollBackground,!0).attr("fill","none"),Jt.attr("width",function(oe){return oe.width}).attr("height",function(oe){return oe.height}),Pt.each(function(oe){e.setClipUrl(g.select(this),y(ft,oe),ft)});var ge=Pt.selectAll("."+c.cn.yColumn).data(function(oe){return oe.columns},t.keyFun);ge.enter().append("g").classed(c.cn.yColumn,!0),ge.exit().remove(),ge.attr("transform",function(oe){return n(oe.x,0)}),kt&&ge.call(g.behavior.drag().origin(function(oe){var Te=g.select(this);return H(Te,oe,-c.uplift),a(this),oe.calcdata.columnDragInProgress=!0,u(Pt.filter(function(He){return oe.calcdata.key===He.key}),ft),oe}).on("drag",function(oe){var Te=g.select(this),He=function(ur){return(oe===ur?g.event.x:ur.x)+ur.columnWidth/2};oe.x=Math.max(-c.overdrag,Math.min(oe.calcdata.width+c.overdrag-oe.columnWidth,g.event.x));var Ge=T(ge).filter(function(ur){return ur.calcdata.key===oe.calcdata.key}),cr=Ge.sort(function(ur,jr){return He(ur)-He(jr)});cr.forEach(function(ur,jr){ur.xIndex=jr,ur.x=oe===ur?ur.x:ur.xScale(ur)}),ge.filter(function(ur){return oe!==ur}).transition().ease(c.transitionEase).duration(c.transitionDuration).attr("transform",function(ur){return n(ur.x,0)}),Te.call(o).attr("transform",n(oe.x,-c.uplift))}).on("dragend",function(oe){var Te=g.select(this),He=oe.calcdata;oe.x=oe.xScale(oe),oe.calcdata.columnDragInProgress=!1,H(Te,oe,0),j(ft,He,He.columns.map(function(Ge){return Ge.xIndex}))})),ge.each(function(oe){e.setClipUrl(g.select(this),v(ft,oe),ft)});var fe=ge.selectAll("."+c.cn.columnBlock).data(l.splitToPanels,t.keyFun);fe.enter().append("g").classed(c.cn.columnBlock,!0).attr("id",function(oe){return oe.key}),fe.style("cursor",function(oe){return oe.dragHandle?"ew-resize":oe.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var pe=fe.filter(U),se=fe.filter(F);kt&&se.call(g.behavior.drag().origin(function(oe){return g.event.stopPropagation(),oe}).on("drag",lt(ft,Pt,-1)).on("dragend",function(){})),b(ft,Pt,pe,fe),b(ft,Pt,se,fe);var Tt=Pt.selectAll("."+c.cn.scrollAreaClip).data(t.repeat,t.keyFun);Tt.enter().append("clipPath").classed(c.cn.scrollAreaClip,!0).attr("id",function(oe){return y(ft,oe)});var Lt=Tt.selectAll("."+c.cn.scrollAreaClipRect).data(t.repeat,t.keyFun);Lt.enter().append("rect").classed(c.cn.scrollAreaClipRect,!0).attr("x",-c.overdrag).attr("y",-c.uplift).attr("fill","none"),Lt.attr("width",function(oe){return oe.width+2*c.overdrag}).attr("height",function(oe){return oe.height+c.uplift});var Mt=ge.selectAll("."+c.cn.columnBoundary).data(t.repeat,t.keyFun);Mt.enter().append("g").classed(c.cn.columnBoundary,!0);var ee=ge.selectAll("."+c.cn.columnBoundaryClippath).data(t.repeat,t.keyFun);ee.enter().append("clipPath").classed(c.cn.columnBoundaryClippath,!0),ee.attr("id",function(oe){return v(ft,oe)});var ve=ee.selectAll("."+c.cn.columnBoundaryRect).data(t.repeat,t.keyFun);ve.enter().append("rect").classed(c.cn.columnBoundaryRect,!0).attr("fill","none"),ve.attr("width",function(oe){return oe.columnWidth+2*x(oe)}).attr("height",function(oe){return oe.calcdata.height+2*x(oe)+c.uplift}).attr("x",function(oe){return-x(oe)}).attr("y",function(oe){return-x(oe)}),J(null,se,Pt)};function x(ft){return Math.ceil(ft.calcdata.maxLineWidth/2)}function y(ft,ut){return"clip"+ft._fullLayout._uid+"_scrollAreaBottomClip_"+ut.key}function v(ft,ut){return"clip"+ft._fullLayout._uid+"_columnBoundaryClippath_"+ut.calcdata.key+"_"+ut.specIndex}function T(ft){return[].concat.apply([],ft.map(function(ut){return ut})).map(function(ut){return ut.__data__})}function u(ft,ut,kt){function It(fe){var pe=fe.rowBlocks;return rt(pe,pe.length-1)+(pe.length?at(pe[pe.length-1],1/0):1)}var Pt=ft.selectAll("."+c.cn.scrollbarKit).data(t.repeat,t.keyFun);Pt.enter().append("g").classed(c.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Pt.each(function(fe){var pe=fe.scrollbarState;pe.totalHeight=It(fe),pe.scrollableAreaHeight=fe.groupHeight-W(fe),pe.currentlyVisibleHeight=Math.min(pe.totalHeight,pe.scrollableAreaHeight),pe.ratio=pe.currentlyVisibleHeight/pe.totalHeight,pe.barLength=Math.max(pe.ratio*pe.currentlyVisibleHeight,c.goldenRatio*c.scrollbarWidth),pe.barWiggleRoom=pe.currentlyVisibleHeight-pe.barLength,pe.wiggleRoom=Math.max(0,pe.totalHeight-pe.scrollableAreaHeight),pe.topY=pe.barWiggleRoom===0?0:fe.scrollY/pe.wiggleRoom*pe.barWiggleRoom,pe.bottomY=pe.topY+pe.barLength,pe.dragMultiplier=pe.wiggleRoom/pe.barWiggleRoom}).attr("transform",function(fe){var pe=fe.width+c.scrollbarWidth/2+c.scrollbarOffset;return n(pe,W(fe))});var qt=Pt.selectAll("."+c.cn.scrollbar).data(t.repeat,t.keyFun);qt.enter().append("g").classed(c.cn.scrollbar,!0);var Wt=qt.selectAll("."+c.cn.scrollbarSlider).data(t.repeat,t.keyFun);Wt.enter().append("g").classed(c.cn.scrollbarSlider,!0),Wt.attr("transform",function(fe){return n(0,fe.scrollbarState.topY||0)});var Jt=Wt.selectAll("."+c.cn.scrollbarGlyph).data(t.repeat,t.keyFun);Jt.enter().append("line").classed(c.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",c.scrollbarWidth).attr("stroke-linecap","round").attr("y1",c.scrollbarWidth/2),Jt.attr("y2",function(fe){return fe.scrollbarState.barLength-c.scrollbarWidth/2}).attr("stroke-opacity",function(fe){return fe.columnDragInProgress||!fe.scrollbarState.barWiggleRoom||kt?0:.4}),Jt.transition().delay(0).duration(0),Jt.transition().delay(c.scrollbarHideDelay).duration(c.scrollbarHideDuration).attr("stroke-opacity",0);var ge=qt.selectAll("."+c.cn.scrollbarCaptureZone).data(t.repeat,t.keyFun);ge.enter().append("line").classed(c.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",c.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(fe){var pe=g.event.y,se=this.getBoundingClientRect(),Tt=fe.scrollbarState,Lt=pe-se.top,Mt=g.scale.linear().domain([0,Tt.scrollableAreaHeight]).range([0,Tt.totalHeight]).clamp(!0);Tt.topY<=Lt&&Lt<=Tt.bottomY||lt(ut,ft,null,Mt(Lt-Tt.barLength/2))(fe)}).call(g.behavior.drag().origin(function(fe){return g.event.stopPropagation(),fe.scrollbarState.scrollbarScrollInProgress=!0,fe}).on("drag",lt(ut,ft)).on("dragend",function(){})),ge.attr("y2",function(fe){return fe.scrollbarState.scrollableAreaHeight}),ut._context.staticPlot&&(Jt.remove(),ge.remove())}function b(ft,ut,kt,It){var Pt=_(kt),qt=P(Pt);h(qt);var Wt=M(qt);k(Wt);var Jt=A(qt),ge=C(Jt);p(ge),w(ge,ut,It,ft),dt(qt)}function _(ft){var ut=ft.selectAll("."+c.cn.columnCells).data(t.repeat,t.keyFun);return ut.enter().append("g").classed(c.cn.columnCells,!0),ut.exit().remove(),ut}function P(ft){var ut=ft.selectAll("."+c.cn.columnCell).data(l.splitToCells,function(kt){return kt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.columnCell,!0),ut.exit().remove(),ut}function M(ft){var ut=ft.selectAll("."+c.cn.cellRect).data(t.repeat,function(kt){return kt.keyWithinBlock});return ut.enter().append("rect").classed(c.cn.cellRect,!0),ut}function C(ft){var ut=ft.selectAll("."+c.cn.cellText).data(t.repeat,function(kt){return kt.keyWithinBlock});return ut.enter().append("text").classed(c.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){g.event.stopPropagation()}),ut}function A(ft){var ut=ft.selectAll("."+c.cn.cellTextHolder).data(t.repeat,function(kt){return kt.keyWithinBlock});return ut.enter().append("g").classed(c.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ut}function h(ft){ft.each(function(ut,kt){var It=ut.calcdata.cells.font,Pt=ut.column.specIndex,qt={size:V(It.size,Pt,kt),color:V(It.color,Pt,kt),family:V(It.family,Pt,kt),weight:V(It.weight,Pt,kt),style:V(It.style,Pt,kt),variant:V(It.variant,Pt,kt),textcase:V(It.textcase,Pt,kt),lineposition:V(It.lineposition,Pt,kt),shadow:V(It.shadow,Pt,kt)};ut.rowNumber=ut.key,ut.align=V(ut.calcdata.cells.align,Pt,kt),ut.cellBorderWidth=V(ut.calcdata.cells.line.width,Pt,kt),ut.font=qt})}function p(ft){ft.each(function(ut){e.font(g.select(this),ut.font)})}function k(ft){ft.attr("width",function(ut){return ut.column.columnWidth}).attr("stroke-width",function(ut){return ut.cellBorderWidth}).each(function(ut){var kt=g.select(this);f.stroke(kt,V(ut.calcdata.cells.line.color,ut.column.specIndex,ut.rowNumber)),f.fill(kt,V(ut.calcdata.cells.fill.color,ut.column.specIndex,ut.rowNumber))})}function w(ft,ut,kt,It){ft.text(function(Pt){var qt=Pt.column.specIndex,Wt=Pt.rowNumber,Jt=Pt.value,ge=typeof Jt=="string",fe=ge&&Jt.match(/
/i),pe=!ge||fe;Pt.mayHaveMarkup=ge&&Jt.match(/[<&>]/);var se=R(Jt);Pt.latex=se;var Tt=se?"":V(Pt.calcdata.cells.prefix,qt,Wt)||"",Lt=se?"":V(Pt.calcdata.cells.suffix,qt,Wt)||"",Mt=se?null:V(Pt.calcdata.cells.format,qt,Wt)||null,ee=Tt+(Mt?S(Mt)(Pt.value):Pt.value)+Lt,ve;Pt.wrappingNeeded=!Pt.wrapped&&!pe&&!se&&(ve=O(ee)),Pt.cellHeightMayIncrease=fe||se||Pt.mayHaveMarkup||(ve===void 0?O(ee):ve),Pt.needsConvertToTspans=Pt.mayHaveMarkup||Pt.wrappingNeeded||Pt.latex;var oe;if(Pt.wrappingNeeded){var Te=c.wrapSplitCharacter===" "?ee.replace(/Pt&&It.push(qt),Pt+=ge}return It}function J(ft,ut,kt){var It=T(ut)[0];if(It!==void 0){var Pt=It.rowBlocks,qt=It.calcdata,Wt=rt(Pt,Pt.length),Jt=It.calcdata.groupHeight-W(It),ge=qt.scrollY=Math.max(0,Math.min(Wt-Jt,qt.scrollY)),fe=q(Pt,ge,Jt);fe.length===1&&(fe[0]===Pt.length-1?fe.unshift(fe[0]-1):fe.push(fe[0]+1)),fe[0]%2&&fe.reverse(),ut.each(function(pe,se){pe.page=fe[se],pe.scrollY=ge}),ut.attr("transform",function(pe){var se=rt(pe.rowBlocks,pe.page)-pe.scrollY;return n(0,se)}),ft&&(yt(ft,kt,ut,fe,It.prevPages,It,0),yt(ft,kt,ut,fe,It.prevPages,It,1),u(kt,ft))}}function lt(ft,ut,kt,It){return function(Pt){var qt=Pt.calcdata?Pt.calcdata:Pt,Wt=ut.filter(function(pe){return qt.key===pe.key}),Jt=kt||qt.scrollbarState.dragMultiplier,ge=qt.scrollY;qt.scrollY=It===void 0?qt.scrollY+Jt*g.event.dy:It;var fe=Wt.selectAll("."+c.cn.yColumn).selectAll("."+c.cn.columnBlock).filter(F);return J(ft,fe,Wt),qt.scrollY===ge}}function yt(ft,ut,kt,It,Pt,qt,Wt){var Jt=It[Wt]!==Pt[Wt];Jt&&(clearTimeout(qt.currentRepaint[Wt]),qt.currentRepaint[Wt]=setTimeout(function(){var ge=kt.filter(function(fe,pe){return pe===Wt&&It[pe]!==Pt[pe]});b(ft,ut,ge,kt),Pt[Wt]=It[Wt]}))}function mt(ft,ut,kt,It){return function(){var Pt=g.select(ut.parentNode);Pt.each(function(qt){var Wt=qt.fragments;Pt.selectAll("tspan.line").each(function(Mt,ee){Wt[ee].width=this.getComputedTextLength()});var Jt=Wt[Wt.length-1].width,ge=Wt.slice(0,-1),fe=[],pe,se,Tt=0,Lt=qt.column.columnWidth-2*c.cellPad;for(qt.value="";ge.length;)pe=ge.shift(),se=pe.width+Jt,Tt+se>Lt&&(qt.value+=fe.join(c.wrapSpacer)+c.lineBreaker,fe=[],Tt=0),fe.push(pe.text),Tt+=se;Tt&&(qt.value+=fe.join(c.wrapSpacer)),qt.wrapped=!0}),Pt.selectAll("tspan.line").remove(),w(Pt.select("."+c.cn.cellText),kt,ft,It),g.select(ut.parentNode.parentNode).call(dt)}}function st(ft,ut,kt,It,Pt){return function(){if(!Pt.settledY){var qt=g.select(ut.parentNode),Wt=it(Pt),Jt=Pt.key-Wt.firstRowIndex,ge=Wt.rows[Jt].rowHeight,fe=Pt.cellHeightMayIncrease?ut.parentNode.getBoundingClientRect().height+2*c.cellPad:ge,pe=Math.max(fe,ge),se=pe-Wt.rows[Jt].rowHeight;se&&(Wt.rows[Jt].rowHeight=pe,ft.selectAll("."+c.cn.columnCell).call(dt),J(null,ft.filter(F),0),u(kt,It,!0)),qt.attr("transform",function(){var Tt=this,Lt=Tt.parentNode,Mt=Lt.getBoundingClientRect(),ee=g.select(Tt.parentNode).select("."+c.cn.cellRect).node().getBoundingClientRect(),ve=Tt.transform.baseVal.consolidate(),oe=ee.top-Mt.top+(ve?ve.matrix.f:c.cellPad);return n(tt(Pt,g.select(Tt.parentNode).select("."+c.cn.cellTextHolder).node().getBoundingClientRect().width),oe)}),Pt.settledY=!0}}}function tt(ft,ut){switch(ft.align){case"left":return c.cellPad;case"right":return ft.column.columnWidth-(ut||0)-c.cellPad;case"center":return(ft.column.columnWidth-(ut||0))/2;default:return c.cellPad}}function dt(ft){ft.attr("transform",function(ut){var kt=ut.rowBlocks[0].auxiliaryBlocks.reduce(function(Wt,Jt){return Wt+at(Jt,1/0)},0),It=it(ut),Pt=at(It,ut.key),qt=Pt+kt;return n(0,qt)}).selectAll("."+c.cn.cellRect).attr("height",function(ut){return Y(it(ut),ut.key).rowHeight})}function rt(ft,ut){for(var kt=0,It=ut-1;It>=0;It--)kt+=vt(ft[It]);return kt}function at(ft,ut){for(var kt=0,It=0;It{var Z=ud().getModuleCalcData,c=HE(),g="table";Q.name=g,Q.plot=function(I){var S=Z(I.calcdata,g)[0];S.length&&c(I,S)},Q.clean=function(I,S,t,e){var r=e._has&&e._has(g),a=S._has&&S._has(g);r&&!a&&e._paperdiv.selectAll(".table").remove()}}),Uq=Dt((Q,Z)=>{Z.exports={attributes:UE(),supplyDefaults:Fq(),calc:Rq(),plot:HE(),moduleType:"trace",name:"table",basePlotModule:jq(),categories:["noOpacity"],meta:{}}}),Vq=Dt((Q,Z)=>{Z.exports=Uq()}),Hq=Dt((Q,Z)=>{var c=da(),g=wi(),I=Td(),S=dh().descriptionWithDates,t=Yc().overrideAll,e=kd().dash,r=Ia().extendFlat;Z.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:c({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:I.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:r({},I.labelalias,{editType:"calc"}),tickfont:c({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:S("tick label")},tickformatstops:t(I.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:g.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:r({},e,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:r({},e,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:g.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}}),ST=Dt((Q,Z)=>{var c=da(),g=Hq(),I=wi(),S=c({editType:"calc"}),t=ef().zorder;S.family.dflt='"Open Sans", verdana, arial, sans-serif',S.size.dflt=12,S.color.dflt=I.defaultLine,Z.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:g,baxis:g,font:S,color:{valType:"color",dflt:I.defaultLine,editType:"plot"},zorder:t}}),Wq=Dt((Q,Z)=>{var c=kn().isArray1D;Z.exports=function(g,I,S){var t=S("x"),e=t&&t.length,r=S("y"),a=r&&r.length;if(!e&&!a)return!1;if(I._cheater=!t,(!e||c(t))&&(!a||c(r))){var n=e?t.length:1/0;a&&(n=Math.min(n,r.length)),I.a&&I.a.length&&(n=Math.min(n,I.a.length)),I.b&&I.b.length&&(n=Math.min(n,I.b.length)),I._length=n}else I._length=null;return!0}}),qq=Dt((Q,Z)=>{var c=ST(),g=hi().addOpacity,I=Jo(),S=kn(),t=yg(),e=n0(),r=dm(),a=Wm(),n=i0(),o=dv();Z.exports=function(l,f,x){var y=x.letter,v=x.font||{},T=c[y+"axis"];function u(W,q){return S.coerce(l,f,T,W,q)}function b(W,q){return S.coerce2(l,f,T,W,q)}x.name&&(f._name=x.name,f._id=x.name),u("autotypenumbers",x.autotypenumbersDflt);var _=u("type");if(_==="-"&&(x.data&&i(f,x.data),f.type==="-"?f.type="linear":_=l.type=f.type),u("smoothing"),u("cheatertype"),u("showticklabels"),u("labelprefix",y+" = "),u("labelsuffix"),u("showtickprefix"),u("showticksuffix"),u("separatethousands"),u("tickformat"),u("exponentformat"),u("minexponent"),u("showexponent"),u("categoryorder"),u("tickmode"),u("tickvals"),u("ticktext"),u("tick0"),u("dtick"),f.tickmode==="array"&&(u("arraytick0"),u("arraydtick")),u("labelpadding"),f._hovertitle=y,_==="date"){var P=I.getComponentMethod("calendars","handleDefaults");P(l,f,"calendar",x.calendar)}n(f,x.fullLayout),f.c2p=S.identity;var M=u("color",x.dfltColor),C=M===l.color?M:v.color,A=u("title.text");A&&(S.coerceFont(u,"title.font",v,{overrideDflt:{size:S.bigFont(v.size),color:C}}),u("title.offset")),u("tickangle");var h=u("autorange",!f.isValidRange(l.range));h&&u("rangemode"),u("range"),f.cleanRange(),u("fixedrange"),t(l,f,u,_),r(l,f,u,_,x),e(l,f,u,_,x),a(l,f,u,{data:x.data,dataAttr:y});var p=b("gridcolor",g(M,.3)),k=b("gridwidth"),w=b("griddash"),R=u("showgrid");R||(delete f.gridcolor,delete f.gridwidth,delete f.griddash);var O=b("startlinecolor",M),j=b("startlinewidth",k),V=u("startline",f.showgrid||!!O||!!j);V||(delete f.startlinecolor,delete f.startlinewidth);var H=b("endlinecolor",M),F=b("endlinewidth",k),U=u("endline",f.showgrid||!!H||!!F);return U||(delete f.endlinecolor,delete f.endlinewidth),R?(u("minorgridcount"),u("minorgridwidth",k),u("minorgriddash",w),u("minorgridcolor",g(p,.06)),f.minorgridcount||(delete f.minorgridwidth,delete f.minorgriddash,delete f.minorgridcolor)):(delete f.gridcolor,delete f.gridwidth,delete f.griddash),f.showticklabels==="none"&&(delete f.tickfont,delete f.tickangle,delete f.showexponent,delete f.exponentformat,delete f.minexponent,delete f.tickformat,delete f.showticksuffix,delete f.showtickprefix),f.showticksuffix||delete f.ticksuffix,f.showtickprefix||delete f.tickprefix,u("tickmode"),f};function i(l,f){if(l.type==="-"){var x=l._id,y=x.charAt(0),v=y+"calendar",T=l[v];l.type=o(f,T,{autotypenumbers:l.autotypenumbers})}}}),$q=Dt((Q,Z)=>{var c=qq(),g=mu();Z.exports=function(S,t,e,r,a){var n=r("a");n||(r("da"),r("a0"));var o=r("b");o||(r("db"),r("b0")),I(S,t,e,a)};function I(S,t,e,r){var a=["aaxis","baxis"];a.forEach(function(n){var o=n.charAt(0),i=S[n]||{},l=g.newContainer(t,n),f={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:n,data:S[o],calendar:t.calendar,dfltColor:r,bgColor:e.paper_bgcolor,autotypenumbersDflt:e.autotypenumbers,fullLayout:e};c(i,l,f),l._categories=l._categories||[],!S[n]&&i.type!=="-"&&(S[n]={type:i.type})})}}),Zq=Dt((Q,Z)=>{var c=kn(),g=Wq(),I=$q(),S=ST(),t=wi();Z.exports=function(e,r,a,n){function o(f,x){return c.coerce(e,r,S,f,x)}r._clipPathId="clip"+r.uid+"carpet";var i=o("color",t.defaultLine);if(c.coerceFont(o,"font",n.font),o("carpet"),I(e,r,n,o,i),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var l=g(e,r,o);l||(r.visible=!1),r._cheater&&o("cheaterslope"),o("zorder")}}),WE=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray;Z.exports=function(g,I,S){var t;for(c(g)?g.length>I.length&&(g=g.slice(0,I.length)):g=[],t=0;t{Z.exports=function(c,g,I){if(c.length===0)return"";var S,t=[],e=I?3:1;for(S=0;S{Z.exports=function(c,g,I,S,t,e){var r=t[0]*c.dpdx(g),a=t[1]*c.dpdy(I),n=1,o=1;if(e){var i=Math.sqrt(t[0]*t[0]+t[1]*t[1]),l=Math.sqrt(e[0]*e[0]+e[1]*e[1]),f=(t[0]*e[0]+t[1]*e[1])/i/l;o=Math.max(0,f)}var x=Math.atan2(a,r)*180/Math.PI;return x<-90?(x+=180,n=-n):x>90&&(x-=180,n=-n),{angle:x,flip:n,p:c.c2p(S,g,I),offsetMultplier:o}}}),Yq=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=WE(),S=qE(),t=Gq(),e=ec(),r=kn(),a=r.strRotate,n=r.strTranslate,o=Af();Z.exports=function(u,b,_,P){var M=u._context.staticPlot,C=b.xaxis,A=b.yaxis,h=u._fullLayout,p=h._clips;r.makeTraceGroups(P,_,"trace").each(function(k){var w=c.select(this),R=k[0],O=R.trace,j=O.aaxis,V=O.baxis,H=r.ensureSingle(w,"g","minorlayer"),F=r.ensureSingle(w,"g","majorlayer"),U=r.ensureSingle(w,"g","boundarylayer"),W=r.ensureSingle(w,"g","labellayer");w.style("opacity",O.opacity),l(C,A,F,j,"a",j._gridlines,!0),l(C,A,F,V,"b",V._gridlines,!0),l(C,A,H,j,"a",j._minorgridlines,!0),l(C,A,H,V,"b",V._minorgridlines,!0),l(C,A,U,j,"a-boundary",j._boundarylines,M),l(C,A,U,V,"b-boundary",V._boundarylines,M);var q=f(u,C,A,O,R,W,j._labels,"a-label"),J=f(u,C,A,O,R,W,V._labels,"b-label");x(u,W,O,R,C,A,q,J),i(O,R,p,C,A)})};function i(u,b,_,P,M){var C,A,h,p,k=_.select("#"+u._clipPathId);k.size()||(k=_.append("clipPath").classed("carpetclip",!0));var w=r.ensureSingle(k,"path","carpetboundary"),R=b.clipsegments,O=[];for(p=0;p0?"start":"end","data-notex":1}).call(g.font,R.font).text(R.text).call(e.convertToTspans,u),U=g.bBox(this);F.attr("transform",n(j.p[0],j.p[1])+a(j.angle)+n(R.axis.labelpadding*H,U.height*.3)),k=Math.max(k,U.width+R.axis.labelpadding)}),p.exit().remove(),w.maxExtent=k,w}function x(u,b,_,P,M,C,A,h){var p,k,w,R,O=r.aggNums(Math.min,null,_.a),j=r.aggNums(Math.max,null,_.a),V=r.aggNums(Math.min,null,_.b),H=r.aggNums(Math.max,null,_.b);p=.5*(O+j),k=V,w=_.ab2xy(p,k,!0),R=_.dxyda_rough(p,k),A.angle===void 0&&r.extendFlat(A,t(_,M,C,w,_.dxydb_rough(p,k))),T(u,b,_,P,w,R,_.aaxis,M,C,A,"a-title"),p=O,k=.5*(V+H),w=_.ab2xy(p,k,!0),R=_.dxydb_rough(p,k),h.angle===void 0&&r.extendFlat(h,t(_,M,C,w,_.dxyda_rough(p,k))),T(u,b,_,P,w,R,_.baxis,M,C,h,"b-title")}var y=o.LINE_SPACING,v=(1-o.MID_SHIFT)/y+1;function T(u,b,_,P,M,C,A,h,p,k,w){var R=[];A.title.text&&R.push(A.title.text);var O=b.selectAll("text."+w).data(R),j=k.maxExtent;O.enter().append("text").classed(w,!0),O.each(function(){var V=t(_,h,p,M,C);["start","both"].indexOf(A.showticklabels)===-1&&(j=0);var H=A.title.font.size;j+=H+A.title.offset;var F=k.angle+(k.flip<0?180:0),U=(F-V.angle+450)%360,W=U>90&&U<270,q=c.select(this);q.text(A.title.text).call(e.convertToTspans,u),W&&(j=(-e.lineCount(q)+v)*y*H-j),q.attr("transform",n(V.p[0],V.p[1])+a(V.angle)+n(0,j)).attr("text-anchor","middle").call(g.font,A.title.font)}),O.exit().remove()}}),Kq=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray;Z.exports=function(g,I,S){var t,e,r,a,n,o,i=[],l=c(g)?g.length:g,f=c(I)?I.length:I,x=c(g)?g:null,y=c(I)?I:null;x&&(r=(x.length-1)/(x[x.length-1]-x[0])/(l-1)),y&&(a=(y.length-1)/(y[y.length-1]-y[0])/(f-1));var v,T=1/0,u=-1/0;for(e=0;e{var c=kn().isArrayOrTypedArray;Z.exports=function(I){return g(I,0)};function g(I,S){if(!c(I)||S>=10)return null;for(var t=1/0,e=-1/0,r=I.length,a=0;a{var c=Ls(),g=Ia().extendFlat;Z.exports=function(I,S,t){var e,r,a,n,o,i,l,f,x,y,v,T,u,b,_=I["_"+S],P=I[S+"axis"],M=P._gridlines=[],C=P._minorgridlines=[],A=P._boundarylines=[],h=I["_"+t],p=I[t+"axis"];P.tickmode==="array"&&(P.tickvals=_.slice());var k=I._xctrl,w=I._yctrl,R=k[0].length,O=k.length,j=I._a.length,V=I._b.length;c.prepTicks(P),P.tickmode==="array"&&delete P.tickvals;var H=P.smoothing?3:1;function F(W){var q,J,lt,yt,mt,st,tt,dt,rt,at,vt,it,Y=[],ft=[],ut={};if(S==="b")for(J=I.b2j(W),lt=Math.floor(Math.max(0,Math.min(V-2,J))),yt=J-lt,ut.length=V,ut.crossLength=j,ut.xy=function(kt){return I.evalxy([],kt,J)},ut.dxy=function(kt,It){return I.dxydi([],kt,lt,It,yt)},q=0;q0&&(rt=I.dxydi([],q-1,lt,0,yt),Y.push(mt[0]+rt[0]/3),ft.push(mt[1]+rt[1]/3),at=I.dxydi([],q-1,lt,1,yt),Y.push(dt[0]-at[0]/3),ft.push(dt[1]-at[1]/3)),Y.push(dt[0]),ft.push(dt[1]),mt=dt;else for(q=I.a2i(W),st=Math.floor(Math.max(0,Math.min(j-2,q))),tt=q-st,ut.length=j,ut.crossLength=V,ut.xy=function(kt){return I.evalxy([],q,kt)},ut.dxy=function(kt,It){return I.dxydj([],st,kt,tt,It)},J=0;J0&&(vt=I.dxydj([],st,J-1,tt,0),Y.push(mt[0]+vt[0]/3),ft.push(mt[1]+vt[1]/3),it=I.dxydj([],st,J-1,tt,1),Y.push(dt[0]-it[0]/3),ft.push(dt[1]-it[1]/3)),Y.push(dt[0]),ft.push(dt[1]),mt=dt;return ut.axisLetter=S,ut.axis=P,ut.crossAxis=p,ut.value=W,ut.constvar=t,ut.index=f,ut.x=Y,ut.y=ft,ut.smoothing=p.smoothing,ut}function U(W){var q,J,lt,yt,mt,st=[],tt=[],dt={};if(dt.length=_.length,dt.crossLength=h.length,S==="b")for(lt=Math.max(0,Math.min(V-2,W)),mt=Math.min(1,Math.max(0,W-lt)),dt.xy=function(rt){return I.evalxy([],rt,W)},dt.dxy=function(rt,at){return I.dxydi([],rt,lt,at,mt)},q=0;q_.length-1)&&M.push(g(U(r),{color:P.gridcolor,width:P.gridwidth,dash:P.griddash}));for(f=i;f_.length-1)&&!(v<0||v>_.length-1))for(T=_[a],u=_[v],e=0;e_[_.length-1])&&C.push(g(F(y),{color:P.minorgridcolor,width:P.minorgridwidth,dash:P.minorgriddash})));P.startline&&A.push(g(U(0),{color:P.startlinecolor,width:P.startlinewidth})),P.endline&&A.push(g(U(_.length-1),{color:P.endlinecolor,width:P.endlinewidth}))}else{for(n=5e-15,o=[Math.floor((_[_.length-1]-P.tick0)/P.dtick*(1+n)),Math.ceil((_[0]-P.tick0)/P.dtick/(1+n))].sort(function(W,q){return W-q}),i=o[0],l=o[1],f=i;f<=l;f++)x=P.tick0+P.dtick*f,M.push(g(F(x),{color:P.gridcolor,width:P.gridwidth,dash:P.griddash}));for(f=i-1;f_[_.length-1])&&C.push(g(F(y),{color:P.minorgridcolor,width:P.minorgridwidth,dash:P.minorgriddash}));P.startline&&A.push(g(F(_[0]),{color:P.startlinecolor,width:P.startlinewidth})),P.endline&&A.push(g(F(_[_.length-1]),{color:P.endlinecolor,width:P.endlinewidth}))}}}),Qq=Dt((Q,Z)=>{var c=Ls(),g=Ia().extendFlat;Z.exports=function(I,S){var t,e,r,a,n,o=S._labels=[],i=S._gridlines;for(t=0;t{Z.exports=function(c,g,I,S){var t,e,r,a=[],n=!!I.smoothing,o=!!S.smoothing,i=c[0].length-1,l=c.length-1;for(t=0,e=[],r=[];t<=i;t++)e[t]=c[0][t],r[t]=g[0][t];for(a.push({x:e,y:r,bicubic:n}),t=0,e=[],r=[];t<=l;t++)e[t]=c[t][i],r[t]=g[t][i];for(a.push({x:e,y:r,bicubic:o}),t=i,e=[],r=[];t>=0;t--)e[i-t]=c[l][t],r[i-t]=g[l][t];for(a.push({x:e,y:r,bicubic:n}),t=l,e=[],r=[];t>=0;t--)e[l-t]=c[t][0],r[l-t]=g[t][0];return a.push({x:e,y:r,bicubic:o}),a}}),e$=Dt((Q,Z)=>{var c=kn();Z.exports=function(g,I,S){var t,e,r,a=[],n=[],o=g[0].length,i=g.length;function l(J,lt){var yt=0,mt,st=0;return J>0&&(mt=g[lt][J-1])!==void 0&&(st++,yt+=mt),J0&&(mt=g[lt-1][J])!==void 0&&(st++,yt+=mt),lt0&&e0&&th);return c.log("Smoother converged to",p,"after",w,"iterations"),g}}),r$=Dt((Q,Z)=>{Z.exports={RELATIVE_CULL_TOLERANCE:1e-6}}),n$=Dt((Q,Z)=>{var c=.5;Z.exports=function(g,I,S,t){var e=g[0]-I[0],r=g[1]-I[1],a=S[0]-I[0],n=S[1]-I[1],o=Math.pow(e*e+r*r,c/2),i=Math.pow(a*a+n*n,c/2),l=(i*i*e-o*o*a)*t,f=(i*i*r-o*o*n)*t,x=i*(o+i)*3,y=o*(o+i)*3;return[[I[0]+(x&&l/x),I[1]+(x&&f/x)],[I[0]-(y&&l/y),I[1]-(y&&f/y)]]}}),i$=Dt((Q,Z)=>{var c=n$(),g=kn().ensureArray;function I(S,t,e){var r=-.5*e[0]+1.5*t[0],a=-.5*e[1]+1.5*t[1];return[(2*r+S[0])/3,(2*a+S[1])/3]}Z.exports=function(S,t,e,r,a,n){var o,i,l,f,x,y,v,T,u,b,_=e[0].length,P=e.length,M=a?3*_-2:_,C=n?3*P-2:P;for(S=g(S,C),t=g(t,C),l=0;l{Z.exports=function(c,g,I,S,t){var e=g-2,r=I-2;return S&&t?function(a,n,o){a||(a=[]);var i,l,f,x,y,v,T=Math.max(0,Math.min(Math.floor(n),e)),u=Math.max(0,Math.min(Math.floor(o),r)),b=Math.max(0,Math.min(1,n-T)),_=Math.max(0,Math.min(1,o-u));T*=3,u*=3;var P=b*b,M=P*b,C=1-b,A=C*C,h=A*C,p=_*_,k=p*_,w=1-_,R=w*w,O=R*w;for(v=0;v{Z.exports=function(c,g,I){return g&&I?function(S,t,e,r,a){S||(S=[]);var n,o,i,l,f,x;t*=3,e*=3;var y=r*r,v=1-r,T=v*v,u=v*r*2,b=-3*T,_=3*(T-u),P=3*(u-y),M=3*y,C=a*a,A=C*a,h=1-a,p=h*h,k=p*h;for(x=0;x{Z.exports=function(c,g,I){return g&&I?function(S,t,e,r,a){S||(S=[]);var n,o,i,l,f,x;t*=3,e*=3;var y=r*r,v=y*r,T=1-r,u=T*T,b=u*T,_=a*a,P=1-a,M=P*P,C=P*a*2,A=-3*M,h=3*(M-C),p=3*(C-_),k=3*_;for(x=0;x{var c=r$(),g=E_().findBin,I=i$(),S=a$(),t=o$(),e=s$();Z.exports=function(r){var a=r._a,n=r._b,o=a.length,i=n.length,l=r.aaxis,f=r.baxis,x=a[0],y=a[o-1],v=n[0],T=n[i-1],u=a[a.length-1]-a[0],b=n[n.length-1]-n[0],_=u*c.RELATIVE_CULL_TOLERANCE,P=b*c.RELATIVE_CULL_TOLERANCE;x-=_,y+=_,v-=P,T+=P,r.isVisible=function(M,C){return M>x&&Mv&&Cy||CT},r.setScale=function(){var M=r._x,C=r._y,A=I(r._xctrl,r._yctrl,M,C,l.smoothing,f.smoothing);r._xctrl=A[0],r._yctrl=A[1],r.evalxy=S([r._xctrl,r._yctrl],o,i,l.smoothing,f.smoothing),r.dxydi=t([r._xctrl,r._yctrl],l.smoothing,f.smoothing),r.dxydj=e([r._xctrl,r._yctrl],l.smoothing,f.smoothing)},r.i2a=function(M){var C=Math.max(0,Math.floor(M[0]),o-2),A=M[0]-C;return(1-A)*a[C]+A*a[C+1]},r.j2b=function(M){var C=Math.max(0,Math.floor(M[1]),o-2),A=M[1]-C;return(1-A)*n[C]+A*n[C+1]},r.ij2ab=function(M){return[r.i2a(M[0]),r.j2b(M[1])]},r.a2i=function(M){var C=Math.max(0,Math.min(g(M,a),o-2)),A=a[C],h=a[C+1];return Math.max(0,Math.min(o-1,C+(M-A)/(h-A)))},r.b2j=function(M){var C=Math.max(0,Math.min(g(M,n),i-2)),A=n[C],h=n[C+1];return Math.max(0,Math.min(i-1,C+(M-A)/(h-A)))},r.ab2ij=function(M){return[r.a2i(M[0]),r.b2j(M[1])]},r.i2c=function(M,C){return r.evalxy([],M,C)},r.ab2xy=function(M,C,A){if(!A&&(Ma[o-1]|Cn[i-1]))return[!1,!1];var h=r.a2i(M),p=r.b2j(C),k=r.evalxy([],h,p);if(A){var w=0,R=0,O=[],j,V,H,F;Ma[o-1]?(j=o-2,V=1,w=(M-a[o-1])/(a[o-1]-a[o-2])):(j=Math.max(0,Math.min(o-2,Math.floor(h))),V=h-j),Cn[i-1]?(H=i-2,F=1,R=(C-n[i-1])/(n[i-1]-n[i-2])):(H=Math.max(0,Math.min(i-2,Math.floor(p))),F=p-H),w&&(r.dxydi(O,j,H,V,F),k[0]+=O[0]*w,k[1]+=O[1]*w),R&&(r.dxydj(O,j,H,V,F),k[0]+=O[0]*R,k[1]+=O[1]*R)}return k},r.c2p=function(M,C,A){return[C.c2p(M[0]),A.c2p(M[1])]},r.p2x=function(M,C,A){return[C.p2c(M[0]),A.p2c(M[1])]},r.dadi=function(M){var C=Math.max(0,Math.min(a.length-2,M));return a[C+1]-a[C]},r.dbdj=function(M){var C=Math.max(0,Math.min(n.length-2,M));return n[C+1]-n[C]},r.dxyda=function(M,C,A,h){var p=r.dxydi(null,M,C,A,h),k=r.dadi(M,A);return[p[0]/k,p[1]/k]},r.dxydb=function(M,C,A,h){var p=r.dxydj(null,M,C,A,h),k=r.dbdj(C,h);return[p[0]/k,p[1]/k]},r.dxyda_rough=function(M,C,A){var h=u*(A||.1),p=r.ab2xy(M+h,C,!0),k=r.ab2xy(M-h,C,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dxydb_rough=function(M,C,A){var h=b*(A||.1),p=r.ab2xy(M,C+h,!0),k=r.ab2xy(M,C-h,!0);return[(p[0]-k[0])*.5/h,(p[1]-k[1])*.5/h]},r.dpdx=function(M){return M._m},r.dpdy=function(M){return M._m}}}),u$=Dt((Q,Z)=>{var c=Ls(),g=kn().isArray1D,I=Kq(),S=Xq(),t=Jq(),e=Qq(),r=t$(),a=q6(),n=e$(),o=W6(),i=l$();Z.exports=function(l,f){var x=c.getFromId(l,f.xaxis),y=c.getFromId(l,f.yaxis),v=f.aaxis,T=f.baxis,u=f.x,b=f.y,_=[];u&&g(u)&&_.push("x"),b&&g(b)&&_.push("y"),_.length&&o(f,v,T,"a","b",_);var P=f._a=f._a||f.a,M=f._b=f._b||f.b;u=f._x||f.x,b=f._y||f.y;var C={};if(f._cheater){var A=v.cheatertype==="index"?P.length:P,h=T.cheatertype==="index"?M.length:M;u=I(A,h,f.cheaterslope)}f._x=u=a(u),f._y=b=a(b),n(u,P,M),n(b,P,M),i(f),f.setScale();var p=S(u),k=S(b),w=.5*(p[1]-p[0]),R=.5*(p[1]+p[0]),O=.5*(k[1]-k[0]),j=.5*(k[1]+k[0]),V=1.3;return p=[R-w*V,R+w*V],k=[j-O*V,j+O*V],f._extremes[x._id]=c.findExtremes(x,p,{padded:!0}),f._extremes[y._id]=c.findExtremes(y,k,{padded:!0}),t(f,"a","b"),t(f,"b","a"),e(f,v),e(f,T),C.clipsegments=r(f._xctrl,f._yctrl,v,T),C.x=u,C.y=b,C.a=P,C.b=M,[C]}}),c$=Dt((Q,Z)=>{Z.exports={attributes:ST(),supplyDefaults:Zq(),plot:Yq(),calc:u$(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Mf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}),h$=Dt((Q,Z)=>{Z.exports=c$()}),$E=Dt((Q,Z)=>{var c=I0(),g=ef(),I=Ho(),{hovertemplateAttrs:S,texttemplateAttrs:t,templatefallbackAttrs:e}=Zu(),r=kc(),a=Ia().extendFlat,n=g.marker,o=g.line,i=n.line;Z.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:a({},g.mode,{dflt:"markers"}),text:a({},g.text,{}),texttemplate:t({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:a({},g.hovertext,{}),line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:a({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:g.connectgaps,fill:a({},g.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:c(),marker:a({symbol:n.symbol,opacity:n.opacity,maxdisplayed:n.maxdisplayed,angle:n.angle,angleref:n.angleref,standoff:n.standoff,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:a({width:i.width,editType:"calc"},r("marker.line")),gradient:n.gradient,editType:"calc"},r("marker")),textfont:g.textfont,textposition:g.textposition,selected:g.selected,unselected:g.unselected,hoverinfo:a({},I.hoverinfo,{flags:["a","b","text","name"]}),hoveron:g.hoveron,hovertemplate:S(),hovertemplatefallback:e(),zorder:g.zorder}}),f$=Dt((Q,Z)=>{var c=kn(),g=vm(),I=Tc(),S=s0(),t=z0(),e=xv(),r=x0(),a=O0(),n=$E();Z.exports=function(o,i,l,f){function x(P,M){return c.coerce(o,i,n,P,M)}x("carpet"),i.xaxis="x",i.yaxis="y";var y=x("a"),v=x("b"),T=Math.min(y.length,v.length);if(!T){i.visible=!1;return}i._length=T,x("text"),x("texttemplate"),x("texttemplatefallback"),x("hovertext");var u=T{Z.exports=function(c,g){var I={},S=g._carpet,t=S.ab2ij([c.a,c.b]),e=Math.floor(t[0]),r=t[0]-e,a=Math.floor(t[1]),n=t[1]-a,o=S.evalxy([],e,a,r,n);return I.yLabel=o[1].toFixed(3),I}}),ET=Dt((Q,Z)=>{Z.exports=function(c,g){for(var I=c._fullData.length,S,t=0;t{var c=Yi(),g=F0(),I=ct(),S=Bt(),t=me().calcMarkerSize,e=ET();Z.exports=function(r,a){var n=a._carpetTrace=e(r,a);if(!(!n||!n.visible||n.visible==="legendonly")){var o;a.xaxis=n.xaxis,a.yaxis=n.yaxis;var i=a._length,l=new Array(i),f,x,y=!1;for(o=0;o{var c=Ka(),g=Ls(),I=Vs();Z.exports=function(S,t,e,r){var a,n,o,i=e[0][0].carpet,l=g.getFromId(S,i.xaxis||"x"),f=g.getFromId(S,i.yaxis||"y"),x={xaxis:l,yaxis:f,plot:t.plot};for(a=0;a{var c=Md(),g=kn().fillText;Z.exports=function(I,S,t,e){var r=c(I,S,t,e);if(!r||r[0].index===!1)return;var a=r[0];if(a.index===void 0){var n=1-a.y0/I.ya._length,o=I.xa._length,i=o*n/2,l=o-i;return a.x0=Math.max(Math.min(a.x0,l),i),a.x1=Math.max(Math.min(a.x1,l),i),r}var f=a.cd[a.index];a.a=f.a,a.b=f.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var x=a.trace,y=x._carpet,v=x._module.formatLabels(f,x);a.yLabel=v.yLabel,delete a.text;var T=[];function u(P,M){var C;P.labelprefix&&P.labelprefix.length>0?C=P.labelprefix.replace(/ = $/,""):C=P._hovertitle,T.push(C+": "+M.toFixed(3)+P.labelsuffix)}if(!x.hovertemplate){var b=f.hi||x.hoverinfo,_=b.split("+");_.indexOf("all")!==-1&&(_=["a","b","text"]),_.indexOf("a")!==-1&&u(y.aaxis,f.a),_.indexOf("b")!==-1&&u(y.baxis,f.b),T.push("y: "+a.yLabel),_.indexOf("text")!==-1&&g(f,x,T),a.extraText=T.join("
")}return r}}),v$=Dt((Q,Z)=>{Z.exports=function(c,g,I,S,t){var e=S[t];return c.a=e.a,c.b=e.b,c.y=e.y,c}}),y$=Dt((Q,Z)=>{Z.exports={attributes:$E(),supplyDefaults:f$(),colorbar:xo(),formatLabels:d$(),calc:p$(),plot:m$(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:g$(),selectPoints:Rf(),eventData:v$(),moduleType:"trace",name:"scattercarpet",basePlotModule:Mf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}),x$=Dt((Q,Z)=>{Z.exports=y$()}),ZE=Dt((Q,Z)=>{var c=eb(),g=Zw(),I=kc(),S=Ia().extendFlat,t=g.contours;Z.exports=S({carpet:{valType:"string",editType:"calc"},z:c.z,a:c.x,a0:c.x0,da:c.dx,b:c.y,b0:c.y0,db:c.dy,text:c.text,hovertext:c.hovertext,transpose:c.transpose,atype:c.xtype,btype:c.ytype,fillcolor:g.fillcolor,autocontour:g.autocontour,ncontours:g.ncontours,contours:{type:t.type,start:t.start,end:t.end,size:t.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:t.showlines,showlabels:t.showlabels,labelfont:t.labelfont,labelformat:t.labelformat,operation:t.operation,value:t.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:g.line.color,width:g.line.width,dash:g.line.dash,smoothing:g.line.smoothing,editType:"plot"},zorder:g.zorder},I("",{cLetter:"z",autoColorDflt:!1}))}),GE=Dt((Q,Z)=>{var c=kn(),g=H6(),I=ZE(),S=x7(),t=nk(),e=ik();Z.exports=function(r,a,n,o){function i(y,v){return c.coerce(r,a,I,y,v)}function l(y){return c.coerce2(r,a,I,y)}if(i("carpet"),r.a&&r.b){var f=g(r,a,i,o,"a","b");if(!f){a.visible=!1;return}i("text");var x=i("contours.type")==="constraint";x?S(r,a,i,o,n,{hasHover:!1}):(t(r,a,i,l),e(r,a,i,o,{hasHover:!1}))}else a._defaultColor=n,a._length=null;i("zorder")}}),_$=Dt((Q,Z)=>{var c=Xd(),g=kn(),I=W6(),S=q6(),t=$6(),e=Z6(),r=n7(),a=GE(),n=ET(),o=c7();Z.exports=function(l,f){var x=f._carpetTrace=n(l,f);if(!(!x||!x.visible||x.visible==="legendonly")){if(!f.a||!f.b){var y=l.data[x.index],v=l.data[f.index];v.a||(v.a=y.a),v.b||(v.b=y.b),a(v,f,f._defaultColor,l._fullLayout)}var T=i(l,f);return o(f,f._z),T}};function i(l,f){var x=f._carpetTrace,y=x.aaxis,v=x.baxis,T,u,b,_,P,M,C;y._minDtick=0,v._minDtick=0,g.isArray1D(f.z)&&I(f,y,v,"a","b",["z"]),T=f._a=f._a||f.a,_=f._b=f._b||f.b,T=T?y.makeCalcdata(f,"_a"):[],_=_?v.makeCalcdata(f,"_b"):[],u=f.a0||0,b=f.da||1,P=f.b0||0,M=f.db||1,C=f._z=S(f._z||f.z,f.transpose),f._emptypoints=e(C),t(C,f._emptypoints);var A=g.maxRowLength(C),h=f.xtype==="scaled"?"":T,p=r(f,h,u,b,A,y),k=f.ytype==="scaled"?"":_,w=r(f,k,P,M,C.length,v),R={a:p,b:w,z:C};return f.contours.type==="levels"&&f.contours.coloring!=="none"&&c(l,f,{vals:C,containerStr:"",cLetter:"z"}),[R]}}),b$=Dt((Q,Z)=>{var c=kn().isArrayOrTypedArray;Z.exports=function(g,I,S,t){var e,r,a,n,o,i,l,f,x,y,v,T,u,b=c(S)?"a":"b",_=b==="a"?g.aaxis:g.baxis,P=_.smoothing,M=b==="a"?g.a2i:g.b2j,C=b==="a"?S:t,A=b==="a"?t:S,h=b==="a"?I.a.length:I.b.length,p=b==="a"?I.b.length:I.a.length,k=Math.floor(b==="a"?g.b2j(A):g.a2i(A)),w=b==="a"?function(yt){return g.evalxy([],yt,k)}:function(yt){return g.evalxy([],k,yt)};P&&(a=Math.max(0,Math.min(p-2,k)),n=k-a,r=b==="a"?function(yt,mt){return g.dxydi([],yt,a,mt,n)}:function(yt,mt){return g.dxydj([],a,yt,n,mt)});var R=M(C[0]),O=M(C[1]),j=R0?Math.floor:Math.ceil,F=j>0?Math.ceil:Math.floor,U=j>0?Math.min:Math.max,W=j>0?Math.max:Math.min,q=H(R+V),J=F(O-V);l=w(R);var lt=[[l]];for(e=q;e*j{var c=qr(),g=WE(),I=qE(),S=Vs(),t=kn(),e=f7(),r=d7(),a=ak(),n=Yw(),o=m7(),i=p7(),l=g7(),f=ET(),x=b$();Z.exports=function(A,h,p,k){var w=h.xaxis,R=h.yaxis;t.makeTraceGroups(k,p,"contour").each(function(O){var j=c.select(this),V=O[0],H=V.trace,F=H._carpetTrace=f(A,H),U=A.calcdata[F.index][0];if(!F.visible||F.visible==="legendonly")return;var W=V.a,q=V.b,J=H.contours,lt=i(J,h,V),yt=J.type==="constraint",mt=J._operation,st=yt?mt==="="?"lines":"fill":J.coloring;function tt(Pt){var qt=F.ab2xy(Pt[0],Pt[1],!0);return[w.c2p(qt[0]),R.c2p(qt[1])]}var dt=[[W[0],q[q.length-1]],[W[W.length-1],q[q.length-1]],[W[W.length-1],q[0]],[W[0],q[0]]];e(lt);var rt=(W[W.length-1]-W[0])*1e-8,at=(q[q.length-1]-q[0])*1e-8;r(lt,rt,at);var vt=lt;J.type==="constraint"&&(vt=o(lt,mt)),y(lt,tt);var it,Y,ft,ut,kt=[];for(ut=U.clipsegments.length-1;ut>=0;ut--)it=U.clipsegments[ut],Y=g([],it.x,w.c2p),ft=g([],it.y,R.c2p),Y.reverse(),ft.reverse(),kt.push(I(Y,ft,it.bicubic));var It="M"+kt.join("L")+"Z";P(j,U.clipsegments,w,R,yt,st),M(H,j,w,R,vt,dt,tt,F,U,st,It),v(j,lt,A,V,J,h,F),S.setClipUrl(j,F._clipPathId,A)})};function y(A,h){var p,k,w,R,O,j,V,H,F;for(p=0;pyt&&(k.max=yt),k.len=k.max-k.min}function u(A,h,p){var k=A.getPointAtLength(h),w=A.getPointAtLength(p),R=w.x-k.x,O=w.y-k.y,j=Math.sqrt(R*R+O*O);return[R/j,O/j]}function b(A){var h=Math.sqrt(A[0]*A[0]+A[1]*A[1]);return[A[0]/h,A[1]/h]}function _(A,h){var p=Math.abs(A[0]*h[0]+A[1]*h[1]),k=Math.sqrt(1-p*p);return k/p}function P(A,h,p,k,w,R){var O,j,V,H,F=t.ensureSingle(A,"g","contourbg"),U=F.selectAll("path").data(R==="fill"&&!w?[0]:[]);U.enter().append("path"),U.exit().remove();var W=[];for(H=0;H=0&&(q=ft,lt=yt):Math.abs(W[1]-q[1])=0&&(q=ft,lt=yt):t.log("endpt to newendpt is not vert. or horz.",W,q,ft)}if(lt>=0)break;H+=it(W,q),W=q}if(lt===h.edgepaths.length){t.log("unclosed perimeter path");break}V=lt,U=F.indexOf(V)===-1,U&&(V=F[0],H+=it(W,q)+"Z",W=null)}for(V=0;V{Z.exports={attributes:ZE(),supplyDefaults:GE(),colorbar:sk(),calc:_$(),plot:w$(),style:ok(),moduleType:"trace",name:"contourcarpet",basePlotModule:Mf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}),T$=Dt((Q,Z)=>{Z.exports=k$()}),CT=Dt((Q,Z)=>{var c=kn().extendFlat,g=ef(),I=dh().axisHoverFormat,S=kd().dash,t=us(),e=rb(),r=e.INCREASING.COLOR,a=e.DECREASING.COLOR,n=g.line;function o(i){return{line:{color:c({},n.color,{dflt:i}),width:n.width,dash:S,editType:"style"},editType:"style"}}Z.exports={xperiod:g.xperiod,xperiod0:g.xperiod0,xperiodalignment:g.xperiodalignment,xhoverformat:I("x"),yhoverformat:I("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:c({},n.width,{}),dash:c({},S,{}),editType:"style"},increasing:o(r),decreasing:o(a),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:c({},t.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:g.zorder}}),YE=Dt((Q,Z)=>{var c=Jo(),g=kn();Z.exports=function(I,S,t,e){var r=t("x"),a=t("open"),n=t("high"),o=t("low"),i=t("close");t("hoverlabel.split");var l=c.getComponentMethod("calendars","handleTraceDefaults");if(l(I,S,["x"],e),!!(a&&n&&o&&i)){var f=Math.min(a.length,n.length,o.length,i.length);return r&&(f=Math.min(f,g.minRowLength(r))),S._length=f,f}}}),A$=Dt((Q,Z)=>{var c=kn(),g=YE(),I=Rp(),S=CT();Z.exports=function(e,r,a,n){function o(l,f){return c.coerce(e,r,S,l,f)}var i=g(e,r,o,n);if(!i){r.visible=!1;return}I(e,r,n,o,{x:!0}),o("xhoverformat"),o("yhoverformat"),o("line.width"),o("line.dash"),t(e,r,o,"increasing"),t(e,r,o,"decreasing"),o("text"),o("hovertext"),o("tickwidth"),n._requestRangeslider[r.xaxis]=!0,o("zorder")};function t(e,r,a,n){a(n+".line.color"),a(n+".line.width",r.line.width),a(n+".line.dash",r.line.dash)}}),KE=Dt((Q,Z)=>{var c=kn(),g=c._,I=Ls(),S=D0(),t=Ca().BADNUM;function e(o,i){var l=I.getFromId(o,i.xaxis),f=I.getFromId(o,i.yaxis),x=n(o,l,i),y=i._minDiff;i._minDiff=null;var v=i._origX;i._origX=null;var T=i._xcalc;i._xcalc=null;var u=a(o,i,v,T,f,r);return i._extremes[l._id]=I.findExtremes(l,T,{vpad:y/2}),u.length?(c.extendFlat(u[0].t,{wHover:y/2,tickLen:x}),u):[{t:{empty:!0}}]}function r(o,i,l,f){return{o,h:i,l,c:f}}function a(o,i,l,f,x,y){for(var v=x.makeCalcdata(i,"open"),T=x.makeCalcdata(i,"high"),u=x.makeCalcdata(i,"low"),b=x.makeCalcdata(i,"close"),_=c.isArrayOrTypedArray(i.text),P=c.isArrayOrTypedArray(i.hovertext),M=!0,C=null,A=!!i.xperiodalignment,h=[],p=0;pC):M=j>w,C=j;var V=y(w,R,O,j);V.pos=k,V.yc=(w+j)/2,V.i=p,V.dir=M?"increasing":"decreasing",V.x=V.pos,V.y=[O,R],A&&(V.orig_p=l[p]),_&&(V.tx=i.text[p]),P&&(V.htx=i.hovertext[p]),h.push(V)}else h.push({pos:k,empty:!0})}return i._extremes[x._id]=I.findExtremes(x,c.concat(u,T),{padded:!0}),h.length&&(h[0].t={labels:{open:g(o,"open:")+" ",high:g(o,"high:")+" ",low:g(o,"low:")+" ",close:g(o,"close:")+" "}}),h}function n(o,i,l){var f=l._minDiff;if(!f){var x=o._fullData,y=[];f=1/0;var v;for(v=0;v{var c=qr(),g=kn();Z.exports=function(I,S,t,e){var r=S.yaxis,a=S.xaxis,n=!!a.rangebreaks;g.makeTraceGroups(e,t,"trace ohlc").each(function(o){var i=c.select(this),l=o[0],f=l.t,x=l.trace;if(x.visible!==!0||f.empty){i.remove();return}var y=f.tickLen,v=i.selectAll("path").data(g.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(T){if(T.empty)return"M0,0Z";var u=a.c2p(T.pos-y,!0),b=a.c2p(T.pos+y,!0),_=n?(u+b)/2:a.c2p(T.pos,!0),P=r.c2p(T.o,!0),M=r.c2p(T.h,!0),C=r.c2p(T.l,!0),A=r.c2p(T.c,!0);return"M"+u+","+P+"H"+_+"M"+_+","+M+"V"+C+"M"+b+","+A+"H"+_})})}}),S$=Dt((Q,Z)=>{var c=qr(),g=Vs(),I=hi();Z.exports=function(S,t,e){var r=e||c.select(S).selectAll("g.ohlclayer").selectAll("g.trace");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var n=a[0].trace;c.select(this).selectAll("path").each(function(o){if(!o.empty){var i=n[o.dir].line;c.select(this).style("fill","none").call(I.stroke,i.color).call(g.dashLine,i.dash,i.width).style("opacity",n.selectedpoints&&!o.selected?.3:1)}})})}}),XE=Dt((Q,Z)=>{var c=Ls(),g=kn(),I=tf(),S=hi(),t=kn().fillText,e=rb(),r={increasing:e.INCREASING.SYMBOL,decreasing:e.DECREASING.SYMBOL};function a(l,f,x,y){var v=l.cd,T=v[0].trace;return T.hoverlabel.split?o(l,f,x,y):i(l,f,x,y)}function n(l,f,x,y){var v=l.cd,T=l.xa,u=v[0].trace,b=v[0].t,_=u.type,P=_==="ohlc"?"l":"min",M=_==="ohlc"?"h":"max",C,A,h=b.bPos||0,p=function(J){return J.pos+h-f},k=b.bdPos||b.tickLen,w=b.wHover,R=Math.min(1,k/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));C=l.maxHoverDistance-R,A=l.maxSpikeDistance-R;function O(J){var lt=p(J);return I.inbox(lt-w,lt+w,C)}function j(J){var lt=J[P],yt=J[M];return lt===yt||I.inbox(lt-x,yt-x,C)}function V(J){return(O(J)+j(J))/2}var H=I.getDistanceFunction(y,O,j,V);if(I.getClosest(v,H,l),l.index===!1)return null;var F=v[l.index];if(F.empty)return null;var U=F.dir,W=u[U],q=W.line.color;return S.opacity(q)&&W.line.width?l.color=q:l.color=W.fillcolor,l.x0=T.c2p(F.pos+h-k,!0),l.x1=T.c2p(F.pos+h+k,!0),l.xLabelVal=F.orig_p!==void 0?F.orig_p:F.pos,l.spikeDistance=V(F)*A/C,l.xSpike=T.c2p(F.pos,!0),l}function o(l,f,x,y){var v=l.cd,T=l.ya,u=v[0].trace,b=v[0].t,_=[],P=n(l,f,x,y);if(!P)return[];var M=P.index,C=v[M],A=C.hi||u.hoverinfo,h=A.split("+"),p=A==="all",k=p||h.indexOf("y")!==-1;if(!k)return[];for(var w=["high","open","close","low"],R={},O=0;O"+b.labels[j]+c.hoverLabelText(T,V,u.yhoverformat)):(F=g.extendFlat({},P),F.y0=F.y1=H,F.yLabelVal=V,F.yLabel=b.labels[j]+c.hoverLabelText(T,V,u.yhoverformat),F.name="",_.push(F),R[V]=F)}return _}function i(l,f,x,y){var v=l.cd,T=l.ya,u=v[0].trace,b=v[0].t,_=n(l,f,x,y);if(!_)return[];var P=_.index,M=v[P],C=_.index=M.i,A=M.dir;function h(V){return b.labels[V]+c.hoverLabelText(T,u[V][C],u.yhoverformat)}var p=M.hi||u.hoverinfo,k=p.split("+"),w=p==="all",R=w||k.indexOf("y")!==-1,O=w||k.indexOf("text")!==-1,j=R?[h("open"),h("high"),h("low"),h("close")+" "+r[A]]:[];return O&&t(M,u,j),_.extraText=j.join("
"),_.y0=_.y1=T.c2p(M.yc,!0),[_]}Z.exports={hoverPoints:a,hoverSplit:o,hoverOnPoints:i}}),JE=Dt((Q,Z)=>{Z.exports=function(c,g){var I=c.cd,S=c.xaxis,t=c.yaxis,e=[],r,a=I[0].t.bPos||0;if(g===!1)for(r=0;r{Z.exports={moduleType:"trace",name:"ohlc",basePlotModule:Mf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:CT(),supplyDefaults:A$(),calc:KE().calc,plot:M$(),style:S$(),hoverPoints:XE().hoverPoints,selectPoints:JE()}}),C$=Dt((Q,Z)=>{Z.exports=E$()}),QE=Dt((Q,Z)=>{var c=kn().extendFlat,g=dh().axisHoverFormat,I=CT(),S=Hw();function t(e){return{line:{color:c({},S.line.color,{dflt:e}),width:S.line.width,editType:"style"},fillcolor:S.fillcolor,editType:"style"}}Z.exports={xperiod:I.xperiod,xperiod0:I.xperiod0,xperiodalignment:I.xperiodalignment,xhoverformat:g("x"),yhoverformat:g("y"),x:I.x,open:I.open,high:I.high,low:I.low,close:I.close,line:{width:c({},S.line.width,{}),editType:"style"},increasing:t(I.increasing.line.color.dflt),decreasing:t(I.decreasing.line.color.dflt),text:I.text,hovertext:I.hovertext,whiskerwidth:c({},S.whiskerwidth,{dflt:0}),hoverlabel:I.hoverlabel,zorder:S.zorder}}),L$=Dt((Q,Z)=>{var c=kn(),g=hi(),I=YE(),S=Rp(),t=QE();Z.exports=function(r,a,n,o){function i(f,x){return c.coerce(r,a,t,f,x)}var l=I(r,a,i,o);if(!l){a.visible=!1;return}S(r,a,o,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),e(r,a,i,"increasing"),e(r,a,i,"decreasing"),i("text"),i("hovertext"),i("whiskerwidth"),o._requestRangeslider[a.xaxis]=!0,i("zorder")};function e(r,a,n,o){var i=n(o+".line.color");n(o+".line.width",a.line.width),n(o+".fillcolor",g.addOpacity(i,.5))}}),P$=Dt((Q,Z)=>{var c=kn(),g=Ls(),I=D0(),S=KE().calcCommon;Z.exports=function(e,r){var a=e._fullLayout,n=g.getFromId(e,r.xaxis),o=g.getFromId(e,r.yaxis),i=n.makeCalcdata(r,"x"),l=I(r,n,"x",i).vals,f=S(e,r,i,l,o,t);return f.length?(c.extendFlat(f[0].t,{num:a._numBoxes,dPos:c.distinctVals(l).minDiff/2,posLetter:"x",valLetter:"y"}),a._numBoxes++,f):[{t:{empty:!0}}]};function t(e,r,a,n){return{min:a,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:r}}}),I$=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"candlestick",basePlotModule:Mf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:QE(),layoutAttributes:Ww(),supplyLayoutDefaults:N6().supplyLayoutDefaults,crossTraceCalc:j6().crossTraceCalc,supplyDefaults:L$(),calc:P$(),plot:U6().plot,layerName:"boxlayer",style:V6().style,hoverPoints:XE().hoverPoints,selectPoints:JE()}}),z$=Dt((Q,Z)=>{Z.exports=I$()}),tC=Dt((Q,Z)=>{var c=kn(),g=i0(),I=c.deg2rad,S=c.rad2deg;Z.exports=function(n,o,i){switch(g(n,i),n._id){case"x":case"radialaxis":t(n,o);break;case"angularaxis":a(n,o);break}};function t(n,o){var i=o._subplot;n.setGeometry=function(){var l=n._rl[0],f=n._rl[1],x=i.innerRadius,y=(i.radius-x)/(f-l),v=x/y,T=l>f?function(u){return u<=0}:function(u){return u>=0};n.c2g=function(u){var b=n.c2l(u)-l;return(T(b)?b:0)+v},n.g2c=function(u){return n.l2c(u+l-v)},n.g2p=function(u){return u*y},n.c2p=function(u){return n.g2p(n.c2g(u))}}}function e(n,o){return o==="degrees"?I(n):n}function r(n,o){return o==="degrees"?S(n):n}function a(n,o){var i=n.type;if(i==="linear"){var l=n.d2c,f=n.c2d;n.d2c=function(x,y){return e(l(x),y)},n.c2d=function(x,y){return f(r(x,y))}}n.makeCalcdata=function(x,y){var v=x[y],T=x._length,u,b,_=function(h){return n.d2c(h,x.thetaunit)};if(v)for(u=new Array(T),b=0;b{Z.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}}),PT=Dt((Q,Z)=>{var c=kn(),g=mm().tester,I=c.findIndexOfMin,S=c.isAngleInsideSector,t=c.angleDelta,e=c.angleDist;function r(b,_,P,M,C){if(!S(_,M))return!1;var A,h;P[0]0?h:1/0},M=I(_,P),C=c.mod(M+1,_.length);return[_[M],_[C]]}function y(b){return Math.abs(b)>1e-10?b:0}function v(b,_,P){_=_||0,P=P||0;for(var M=b.length,C=new Array(M),A=0;A{function c(r){return r<0?-1:r>0?1:0}function g(r){var a=r[0],n=r[1];if(!isFinite(a)||!isFinite(n))return[1,0];var o=(a+1)*(a+1)+n*n;return[(a*a+n*n-1)/o,2*n/o]}function I(r,a){var n=a[0],o=a[1];return[n*r.radius+r.cx,-o*r.radius+r.cy]}function S(r,a){return a*r.radius}function t(r,a,n,o){var i=I(r,g([n,a])),l=i[0],f=i[1],x=I(r,g([o,a])),y=x[0],v=x[1];if(a===0)return["M"+l+","+f,"L"+y+","+v].join(" ");var T=S(r,1/Math.abs(a));return["M"+l+","+f,"A"+T+","+T+" 0 0,"+(a<0?1:0)+" "+y+","+v].join(" ")}function e(r,a,n,o){var i=S(r,1/(a+1)),l=I(r,g([a,n])),f=l[0],x=l[1],y=I(r,g([a,o])),v=y[0],T=y[1];if(c(n)!==c(o)){var u=I(r,g([a,0])),b=u[0],_=u[1];return["M"+f+","+x,"A"+i+","+i+" 0 0,"+(0{var c=qr(),g=ro(),I=Jo(),S=kn(),t=S.strRotate,e=S.strTranslate,r=hi(),a=Vs(),n=Kc(),o=Ls(),i=i0(),l=tC(),f=Y0().doAutoRange,x=C1(),y=up(),v=tf(),T=lp(),u=vf().prepSelect,b=vf().selectOnClick,_=vf().clearOutline,P=P0(),M=mv(),C=y0().redrawReglTraces,A=Af().MID_SHIFT,h=LT(),p=PT(),k=eC(),w=k.smith,R=k.reactanceArc,O=k.resistanceArc,j=k.smithTransform,V=S._,H=S.mod,F=S.deg2rad,U=S.rad2deg;function W(st,tt,dt){this.isSmith=dt||!1,this.id=tt,this.gd=st,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var rt=st._fullLayout,at="clip"+rt._uid+tt;this.clipIds.forTraces=at+"-for-traces",this.clipPaths.forTraces=rt._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=rt["_"+(dt?"smith":"polar")+"layer"].append("g").attr("class",tt),this.getHole=function(vt){return this.isSmith?0:vt.hole},this.getSector=function(vt){return this.isSmith?[0,360]:vt.sector},this.getRadial=function(vt){return this.isSmith?vt.realaxis:vt.radialaxis},this.getAngular=function(vt){return this.isSmith?vt.imaginaryaxis:vt.angularaxis},dt||(this.radialTickLayout=null,this.angularTickLayout=null)}var q=W.prototype;Z.exports=function(st,tt,dt){return new W(st,tt,dt)},q.plot=function(st,tt){for(var dt=this,rt=tt[dt.id],at=!1,vt=0;vtge?(fe=ut,pe=ut*ge,Lt=(kt-pe)/at.h/2,se=[Y[0],Y[1]],Tt=[ft[0]+Lt,ft[1]-Lt]):(fe=kt/ge,pe=kt,Lt=(ut-fe)/at.w/2,se=[Y[0]+Lt,Y[1]-Lt],Tt=[ft[0],ft[1]]),dt.xLength2=fe,dt.yLength2=pe,dt.xDomain2=se,dt.yDomain2=Tt;var Mt=dt.xOffset2=at.l+at.w*se[0],ee=dt.yOffset2=at.t+at.h*(1-Tt[1]),ve=dt.radius=fe/qt,oe=dt.innerRadius=dt.getHole(tt)*ve,Te=dt.cx=Mt-ve*Pt[0],He=dt.cy=ee+ve*Pt[3],Ge=dt.cxx=Te-Mt,cr=dt.cyy=He-ee,ur=vt.side,jr;ur==="counterclockwise"?(jr=ur,ur="top"):ur==="clockwise"&&(jr=ur,ur="bottom"),dt.radialAxis=dt.mockAxis(st,tt,vt,{_id:"x",side:ur,_trueSide:jr,domain:[oe/at.w,ve/at.w]}),dt.angularAxis=dt.mockAxis(st,tt,it,{side:"right",domain:[0,Math.PI],autorange:!1}),dt.doAutoRange(st,tt),dt.updateAngularAxis(st,tt),dt.updateRadialAxis(st,tt),dt.updateRadialAxisTitle(st,tt),dt.xaxis=dt.mockCartesianAxis(st,tt,{_id:"x",domain:se}),dt.yaxis=dt.mockCartesianAxis(st,tt,{_id:"y",domain:Tt});var Wr=dt.pathSubplot();dt.clipPaths.forTraces.select("path").attr("d",Wr).attr("transform",e(Ge,cr)),rt.frontplot.attr("transform",e(Mt,ee)).call(a.setClipUrl,dt._hasClipOnAxisFalse?null:dt.clipIds.forTraces,dt.gd),rt.bg.attr("d",Wr).attr("transform",e(Te,He)).call(r.fill,tt.bgcolor)},q.mockAxis=function(st,tt,dt,rt){var at=S.extendFlat({},dt,rt);return l(at,tt,st),at},q.mockCartesianAxis=function(st,tt,dt){var rt=this,at=rt.isSmith,vt=dt._id,it=S.extendFlat({type:"linear"},dt);i(it,st);var Y={x:[0,2],y:[1,3]};return it.setRange=function(){var ft=rt.sectorBBox,ut=Y[vt],kt=rt.radialAxis._rl,It=(kt[1]-kt[0])/(1-rt.getHole(tt));it.range=[ft[ut[0]]*It,ft[ut[1]]*It]},it.isPtWithinRange=vt==="x"&&!at?function(ft){return rt.isPtInside(ft)}:function(){return!0},it.setRange(),it.setScale(),it},q.doAutoRange=function(st,tt){var dt=this,rt=dt.gd,at=dt.radialAxis,vt=dt.getRadial(tt);f(rt,at);var it=at.range;if(vt.range=it.slice(),vt._input.range=it.slice(),at._rl=[at.r2l(it[0],null,"gregorian"),at.r2l(it[1],null,"gregorian")],at.minallowed!==void 0){var Y=at.r2l(at.minallowed);at._rl[0]>at._rl[1]?at._rl[1]=Math.max(at._rl[1],Y):at._rl[0]=Math.max(at._rl[0],Y)}if(at.maxallowed!==void 0){var ft=at.r2l(at.maxallowed);at._rl[0]90&&kt<=270&&(It.tickangle=180);var Wt=qt?function(ve){var oe=j(dt,w([ve.x,0]));return e(oe[0]-Y,oe[1]-ft)}:function(ve){return e(It.l2p(ve.x)+it,0)},Jt=qt?function(ve){return O(dt,ve.x,-1/0,1/0)}:function(ve){return dt.pathArc(It.r2p(ve.x)+it)},ge=J(ut);if(dt.radialTickLayout!==ge&&(at["radial-axis"].selectAll(".xtick").remove(),dt.radialTickLayout=ge),Pt){It.setScale();var fe=0,pe=qt?(It.tickvals||[]).filter(function(ve){return ve>=0}).map(function(ve){return o.tickText(It,ve,!0,!1)}):o.calcTicks(It),se=qt?pe:o.clipEnds(It,pe),Tt=o.getTickSigns(It)[2];qt&&((It.ticks==="top"&&It.side==="bottom"||It.ticks==="bottom"&&It.side==="top")&&(Tt=-Tt),It.ticks==="top"&&It.side==="top"&&(fe=-It.ticklen),It.ticks==="bottom"&&It.side==="bottom"&&(fe=It.ticklen)),o.drawTicks(rt,It,{vals:pe,layer:at["radial-axis"],path:o.makeTickPath(It,0,Tt),transFn:Wt,crisp:!1}),o.drawGrid(rt,It,{vals:se,layer:at["radial-grid"],path:Jt,transFn:S.noop,crisp:!1}),o.drawLabels(rt,It,{vals:pe,layer:at["radial-axis"],transFn:Wt,labelFns:o.makeLabelFns(It,fe)})}var Lt=dt.radialAxisAngle=dt.vangles?U(yt(F(ut.angle),dt.vangles)):ut.angle,Mt=e(Y,ft),ee=Mt+t(-Lt);mt(at["radial-axis"],Pt&&(ut.showticklabels||ut.ticks),{transform:ee}),mt(at["radial-grid"],Pt&&ut.showgrid,{transform:qt?"":Mt}),mt(at["radial-line"].select("line"),Pt&&ut.showline,{x1:qt?-vt:it,y1:0,x2:vt,y2:0,transform:ee}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateRadialAxisTitle=function(st,tt,dt){if(!this.isSmith){var rt=this,at=rt.gd,vt=rt.radius,it=rt.cx,Y=rt.cy,ft=rt.getRadial(tt),ut=rt.id+"title",kt=0;if(ft.title){var It=a.bBox(rt.layers["radial-axis"].node()).height,Pt=ft.title.font.size,qt=ft.side;kt=qt==="top"?Pt:qt==="counterclockwise"?-(It+Pt*.4):It+Pt*.8}var Wt=dt!==void 0?dt:rt.radialAxisAngle,Jt=F(Wt),ge=Math.cos(Jt),fe=Math.sin(Jt),pe=it+vt/2*ge+kt*fe,se=Y-vt/2*fe+kt*ge;rt.layers["radial-axis-title"]=T.draw(at,ut,{propContainer:ft,propName:rt.id+".radialaxis.title.text",placeholder:V(at,"Click to enter radial axis title"),attributes:{x:pe,y:se,"text-anchor":"middle"},transform:{rotate:-Wt}})}},q.updateAngularAxis=function(st,tt){var dt=this,rt=dt.gd,at=dt.layers,vt=dt.radius,it=dt.innerRadius,Y=dt.cx,ft=dt.cy,ut=dt.getAngular(tt),kt=dt.angularAxis,It=dt.isSmith;It||(dt.fillViewInitialKey("angularaxis.rotation",ut.rotation),kt.setGeometry(),kt.setScale());var Pt=It?function(oe){var Te=j(dt,w([0,oe.x]));return Math.atan2(Te[0]-Y,Te[1]-ft)-Math.PI/2}:function(oe){return kt.t2g(oe.x)};kt.type==="linear"&&kt.thetaunit==="radians"&&(kt.tick0=U(kt.tick0),kt.dtick=U(kt.dtick));var qt=function(oe){return e(Y+vt*Math.cos(oe),ft-vt*Math.sin(oe))},Wt=It?function(oe){var Te=j(dt,w([0,oe.x]));return e(Te[0],Te[1])}:function(oe){return qt(Pt(oe))},Jt=It?function(oe){var Te=j(dt,w([0,oe.x])),He=Math.atan2(Te[0]-Y,Te[1]-ft)-Math.PI/2;return e(Te[0],Te[1])+t(-U(He))}:function(oe){var Te=Pt(oe);return qt(Te)+t(-U(Te))},ge=It?function(oe){return R(dt,oe.x,0,1/0)}:function(oe){var Te=Pt(oe),He=Math.cos(Te),Ge=Math.sin(Te);return"M"+[Y+it*He,ft-it*Ge]+"L"+[Y+vt*He,ft-vt*Ge]},fe=o.makeLabelFns(kt,0),pe=fe.labelStandoff,se={};se.xFn=function(oe){var Te=Pt(oe);return Math.cos(Te)*pe},se.yFn=function(oe){var Te=Pt(oe),He=Math.sin(Te)>0?.2:1;return-Math.sin(Te)*(pe+oe.fontSize*He)+Math.abs(Math.cos(Te))*(oe.fontSize*A)},se.anchorFn=function(oe){var Te=Pt(oe),He=Math.cos(Te);return Math.abs(He)<.1?"middle":He>0?"start":"end"},se.heightFn=function(oe,Te,He){var Ge=Pt(oe);return-.5*(1+Math.sin(Ge))*He};var Tt=J(ut);dt.angularTickLayout!==Tt&&(at["angular-axis"].selectAll("."+kt._id+"tick").remove(),dt.angularTickLayout=Tt);var Lt=It?[1/0].concat(kt.tickvals||[]).map(function(oe){return o.tickText(kt,oe,!0,!1)}):o.calcTicks(kt);It&&(Lt[0].text="∞",Lt[0].fontSize*=1.75);var Mt;if(tt.gridshape==="linear"?(Mt=Lt.map(Pt),S.angleDelta(Mt[0],Mt[1])<0&&(Mt=Mt.slice().reverse())):Mt=null,dt.vangles=Mt,kt.type==="category"&&(Lt=Lt.filter(function(oe){return S.isAngleInsideSector(Pt(oe),dt.sectorInRad)})),kt.visible){var ee=kt.ticks==="inside"?-1:1,ve=(kt.linewidth||1)/2;o.drawTicks(rt,kt,{vals:Lt,layer:at["angular-axis"],path:"M"+ee*ve+",0h"+ee*kt.ticklen,transFn:Jt,crisp:!1}),o.drawGrid(rt,kt,{vals:Lt,layer:at["angular-grid"],path:ge,transFn:S.noop,crisp:!1}),o.drawLabels(rt,kt,{vals:Lt,layer:at["angular-axis"],repositionOnUpdate:!0,transFn:Wt,labelFns:se})}mt(at["angular-line"].select("path"),ut.showline,{d:dt.pathSubplot(),transform:e(Y,ft)}).attr("stroke-width",ut.linewidth).call(r.stroke,ut.linecolor)},q.updateFx=function(st,tt){if(!this.gd._context.staticPlot){var dt=!this.isSmith;dt&&(this.updateAngularDrag(st),this.updateRadialDrag(st,tt,0),this.updateRadialDrag(st,tt,1)),this.updateHoverAndMainDrag(st)}},q.updateHoverAndMainDrag=function(st){var tt=this,dt=tt.isSmith,rt=tt.gd,at=tt.layers,vt=st._zoomlayer,it=h.MINZOOM,Y=h.OFFEDGE,ft=tt.radius,ut=tt.innerRadius,kt=tt.cx,It=tt.cy,Pt=tt.cxx,qt=tt.cyy,Wt=tt.sectorInRad,Jt=tt.vangles,ge=tt.radialAxis,fe=p.clampTiny,pe=p.findXYatLength,se=p.findEnclosingVertexAngles,Tt=h.cornerHalfWidth,Lt=h.cornerLen/2,Mt,ee,ve=x.makeDragger(at,"path","maindrag",st.dragmode===!1?"none":"crosshair");c.select(ve).attr("d",tt.pathSubplot()).attr("transform",e(kt,It)),ve.onmousemove=function(Ar){v.hover(rt,Ar,tt.id),rt._fullLayout._lasthover=ve,rt._fullLayout._hoversubplot=tt.id},ve.onmouseout=function(Ar){rt._dragging||y.unhover(rt,Ar)};var oe={element:ve,gd:rt,subplot:tt.id,plotinfo:{id:tt.id,xaxis:tt.xaxis,yaxis:tt.yaxis},xaxes:[tt.xaxis],yaxes:[tt.yaxis]},Te,He,Ge,cr,ur,jr,Wr,br,Xr;function nn(Ar,mr){return Math.sqrt(Ar*Ar+mr*mr)}function Le(Ar,mr){return nn(Ar-Pt,mr-qt)}function Gt(Ar,mr){return Math.atan2(qt-mr,Ar-Pt)}function ne(Ar,mr){return[Ar*Math.cos(mr),Ar*Math.sin(-mr)]}function Ct(Ar,mr){if(Ar===0)return tt.pathSector(2*Tt);var Qr=Lt/Ar,Hn=mr-Qr,Wn=mr+Qr,Xn=Math.max(0,Math.min(Ar,ft)),Ii=Xn-Tt,oi=Xn+Tt;return"M"+ne(Ii,Hn)+"A"+[Ii,Ii]+" 0,0,0 "+ne(Ii,Wn)+"L"+ne(oi,Wn)+"A"+[oi,oi]+" 0,0,1 "+ne(oi,Hn)+"Z"}function gt(Ar,mr,Qr){if(Ar===0)return tt.pathSector(2*Tt);var Hn=ne(Ar,mr),Wn=ne(Ar,Qr),Xn=fe((Hn[0]+Wn[0])/2),Ii=fe((Hn[1]+Wn[1])/2),oi,$n;if(Xn&&Ii){var sa=Ii/Xn,Zi=-1/sa,We=pe(Tt,sa,Xn,Ii);oi=pe(Lt,Zi,We[0][0],We[0][1]),$n=pe(Lt,Zi,We[1][0],We[1][1])}else{var nr,fr;Ii?(nr=Lt,fr=Tt):(nr=Tt,fr=Lt),oi=[[Xn-nr,Ii-fr],[Xn+nr,Ii-fr]],$n=[[Xn-nr,Ii+fr],[Xn+nr,Ii+fr]]}return"M"+oi.join("L")+"L"+$n.reverse().join("L")+"Z"}function St(){Ge=null,cr=null,ur=tt.pathSubplot(),jr=!1;var Ar=rt._fullLayout[tt.id];Wr=g(Ar.bgcolor).getLuminance(),br=x.makeZoombox(vt,Wr,kt,It,ur),br.attr("fill-rule","evenodd"),Xr=x.makeCorners(vt,kt,It),_(rt)}function Nt(Ar,mr){return mr=Math.max(Math.min(mr,ft),ut),Arit?(Ar-1&&Ar===1&&b(mr,rt,[tt.xaxis],[tt.yaxis],tt.id,oe),Qr.indexOf("event")>-1&&v.click(rt,mr,tt.id)}oe.prepFn=function(Ar,mr,Qr){var Hn=rt._fullLayout.dragmode,Wn=ve.getBoundingClientRect();rt._fullLayout._calcInverseTransform(rt);var Xn=rt._fullLayout._invTransform;Mt=rt._fullLayout._invScaleX,ee=rt._fullLayout._invScaleY;var Ii=S.apply3DTransform(Xn)(mr-Wn.left,Qr-Wn.top);if(Te=Ii[0],He=Ii[1],Jt){var oi=p.findPolygonOffset(ft,Wt[0],Wt[1],Jt);Te+=Pt+oi[0],He+=qt+oi[1]}switch(Hn){case"zoom":oe.clickFn=Sr,dt||(Jt?oe.moveFn=Ue:oe.moveFn=le,oe.doneFn=qe,St());break;case"select":case"lasso":u(Ar,mr,Qr,oe,Hn);break}},y.init(oe)},q.updateRadialDrag=function(st,tt,dt){var rt=this,at=rt.gd,vt=rt.layers,it=rt.radius,Y=rt.innerRadius,ft=rt.cx,ut=rt.cy,kt=rt.radialAxis,It=h.radialDragBoxSize,Pt=It/2;if(!kt.visible)return;var qt=F(rt.radialAxisAngle),Wt=kt._rl,Jt=Wt[0],ge=Wt[1],fe=Wt[dt],pe=.75*(Wt[1]-Wt[0])/(1-rt.getHole(tt))/it,se,Tt,Lt;dt?(se=ft+(it+Pt)*Math.cos(qt),Tt=ut-(it+Pt)*Math.sin(qt),Lt="radialdrag"):(se=ft+(Y-Pt)*Math.cos(qt),Tt=ut-(Y-Pt)*Math.sin(qt),Lt="radialdrag-inner");var Mt=x.makeRectDragger(vt,Lt,"crosshair",-Pt,-Pt,It,It),ee={element:Mt,gd:at};st.dragmode===!1&&(ee.dragmode=!1),mt(c.select(Mt),kt.visible&&Y0!=(dt?Te>Jt:Te=90||at>90&&vt>=450?qt=1:Y<=0&&ut<=0?qt=0:qt=Math.max(Y,ut),at<=180&&vt>=180||at>180&&vt>=540?kt=-1:it>=0&&ft>=0?kt=0:kt=Math.min(it,ft),at<=270&&vt>=270||at>270&&vt>=630?It=-1:Y>=0&&ut>=0?It=0:It=Math.min(Y,ut),vt>=360?Pt=1:it<=0&&ft<=0?Pt=0:Pt=Math.max(it,ft),[kt,It,Pt,qt]}function yt(st,tt){var dt=function(at){return S.angleDist(st,at)},rt=S.findIndexOfMin(tt,dt);return tt[rt]}function mt(st,tt,dt){return tt?(st.attr("display",null),st.attr(dt)):st&&st.attr("display","none"),st}}),nC=Dt((Q,Z)=>{var c=wi(),g=Td(),I=jh().attributes,S=kn().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:g.ticks,ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,minorloglabels:g.minorloglabels,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,showexponent:g.showexponent,exponentformat:g.exponentformat,minexponent:g.minexponent,separatethousands:g.separatethousands,tickfont:g.tickfont,tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,layer:g.layer},"plot","from-root"),a={visible:S({},g.visible,{dflt:!0}),type:S({},g.type,{values:["-","linear","log","date","category"]}),autotypenumbers:g.autotypenumbers,autorangeoptions:{minallowed:g.autorangeoptions.minallowed,maxallowed:g.autorangeoptions.maxallowed,clipmin:g.autorangeoptions.clipmin,clipmax:g.autorangeoptions.clipmax,include:g.autorangeoptions.include,editType:"plot"},autorange:S({},g.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:S({},g.minallowed,{editType:"plot"}),maxallowed:S({},g.maxallowed,{editType:"plot"}),range:S({},g.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:g.categoryorder,categoryarray:g.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:g.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:S({},g.title.text,{editType:"plot",dflt:""}),font:S({},g.title.font,{editType:"plot"}),editType:"plot"},hoverformat:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(a,e,r);var n={visible:S({},g.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:g.autotypenumbers,categoryorder:g.categoryorder,categoryarray:g.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:g.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(n,e,r),Z.exports={domain:I({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:c.background},radialaxis:a,angularaxis:n,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}),O$=Dt((Q,Z)=>{var c=kn(),g=hi(),I=mu(),S=z1(),t=ud().getSubplotData,e=yg(),r=xg(),a=n0(),n=dm(),o=Wm(),i=Qy(),l=bw(),f=dv(),x=nC(),y=tC(),v=LT(),T=v.axisNames;function u(_,P,M,C){var A=M("bgcolor");C.bgColor=g.combine(A,C.paper_bgcolor);var h=M("sector");M("hole");var p=t(C.fullData,v.name,C.id),k=C.layoutOut,w;function R(It,Pt){return M(w+"."+It,Pt)}for(var O=0;O{var c=ud().getSubplotCalcData,g=kn().counterRegex,I=rC(),S=LT(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var l=i._fullLayout,f=i.calcdata,x=l._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ia().extendFlat,t=I0(),e=ef(),r=Ho(),a=e.line;Z.exports={mode:e.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:e.text,texttemplate:g({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:I(),selected:e.selected,unselected:e.unselected}}),zT=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=xv(),e=x0(),r=O0(),a=vm().PTS_LINESONLY,n=z3();function o(l,f,x,y){function v(b,_){return c.coerce(l,f,n,b,_)}var T=i(l,f,y,v);if(!T){f.visible=!1;return}v("thetaunit"),v("mode",T{var c=kn(),g=Ls();Z.exports=function(I,S,t){var e={},r=t[S.subplot]._subplot,a,n;r?(a=r.radialAxis,n=r.angularAxis):(r=t[S.subplot],a=r.radialaxis,n=r.angularaxis);var o=a.c2l(I.r);e.rLabel=g.tickText(a,o,!0).text;var i=n.thetaunit==="degrees"?c.rad2deg(I.theta):I.theta;return e.thetaLabel=g.tickText(n,i,!0).text,e}}),D$=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=Ls(),S=F0(),t=ct(),e=Bt(),r=me().calcMarkerSize;Z.exports=function(a,n){for(var o=a._fullLayout,i=n.subplot,l=o[i].radialaxis,f=o[i].angularaxis,x=l.makeCalcdata(n,"r"),y=f.makeCalcdata(n,"theta"),v=n._length,T=new Array(v),u=0;u{var c=Ka(),g=Ca().BADNUM;Z.exports=function(I,S,t){for(var e=S.layers.frontplot.select("g.scatterlayer"),r=S.xaxis,a=S.yaxis,n={xaxis:r,yaxis:a,plot:S.framework,layerClipId:S._hasClipOnAxisFalse?S.clipIds.forTraces:null},o=S.radialAxis,i=S.angularAxis,l=0;l{var c=Md();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],l=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,I(i,l,o,n),n.hovertemplate=l.hovertemplate,a}}function I(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="r",n._hovertitle="θ";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.rLabel=i.rLabel,r.thetaLabel=i.thetaLabel;var l=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=l.split("+");y.indexOf("all")!==-1&&(y=["r","theta","text"]),y.indexOf("r")!==-1&&x(a,r.rLabel),y.indexOf("theta")!==-1&&x(n,r.thetaLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}Z.exports={hoverPoints:g,makeHoverPointText:I}}),R$=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:IT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:z3(),supplyDefaults:zT().supplyDefaults,colorbar:xo(),formatLabels:OT(),calc:D$(),plot:F$(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:DT().hoverPoints,selectPoints:Rf(),meta:{}}}),B$=Dt((Q,Z)=>{Z.exports=R$()}),iC=Dt((Q,Z)=>{var c=z3(),{cliponaxis:g,hoveron:I}=c,S=Vr(c,["cliponaxis","hoveron"]),{connectgaps:t,line:{color:e,dash:r,width:a},fill:n,fillcolor:o,marker:i,textfont:l,textposition:f}=T3();Z.exports=Tr(Mr({},S),{connectgaps:t,fill:n,fillcolor:o,line:{color:e,dash:r,editType:"calc",width:a},marker:i,textfont:l,textposition:f})}),N$=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=zT().handleRThetaDefaults,S=s0(),t=z0(),e=x0(),r=O0(),a=vm().PTS_LINESONLY,n=iC();Z.exports=function(o,i,l,f){function x(v,T){return c.coerce(o,i,n,v,T)}var y=I(o,i,f,x);if(!y){i.visible=!1;return}x("thetaunit"),x("mode",y{var c=OT();Z.exports=function(g,I,S){var t=g.i;return"r"in g||(g.r=I._r[t]),"theta"in g||(g.theta=I._theta[t]),c(g,I,S)}}),U$=Dt((Q,Z)=>{var c=F0(),g=me().calcMarkerSize,I=_x(),S=Ls(),t=q1().TOO_MANY_POINTS;Z.exports=function(e,r){var a=e._fullLayout,n=r.subplot,o=a[n].radialaxis,i=a[n].angularaxis,l=r._r=o.makeCalcdata(r,"r"),f=r._theta=i.makeCalcdata(r,"theta"),x=r._length,y={};x{var c=uT(),g=DT().makeHoverPointText;function I(S,t,e,r){var a=S.cd,n=a[0].t,o=n.r,i=n.theta,l=c.hoverPoints(S,t,e,r);if(!(!l||l[0].index===!1)){var f=l[0];if(f.index===void 0)return l;var x=S.subplot,y=f.cd[f.index],v=f.trace;if(y.r=o[f.index],y.theta=i[f.index],!!x.isPtInside(y))return f.xLabelVal=void 0,f.yLabelVal=void 0,g(y,v,x,f),l}}Z.exports={hoverPoints:I}}),H$=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:IT(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:iC(),supplyDefaults:N$(),colorbar:xo(),formatLabels:j$(),calc:U$(),hoverPoints:V$().hoverPoints,selectPoints:NS(),meta:{}}}),W$=Dt((Q,Z)=>{var c=hT(),g=Yi(),I=uE(),S=RS(),t=_x(),e=kn(),r=q1().TOO_MANY_POINTS,a={};Z.exports=function(n,o,i){if(i.length){var l=o.radialAxis,f=o.angularAxis,x=S(n,o);return i.forEach(function(y){if(!(!y||!y[0]||!y[0].trace)){var v=y[0],T=v.trace,u=v.t,b=T._length,_=u.r,P=u.theta,M=u.opts,C,A=_.slice(),h=P.slice();for(C=0;C<_.length;C++)o.isPtInside({r:_[C],theta:P[C]})||(A[C]=NaN,h[C]=NaN);var p=new Array(b*2),k=Array(b),w=Array(b);for(C=0;C=r&&(M.marker.cluster=u.tree),M.marker&&(M.markerSel.positions=M.markerUnsel.positions=M.marker.positions=p),M.line&&p.length>1&&e.extendFlat(M.line,t.linePositions(n,T,p)),M.text&&(e.extendFlat(M.text,{positions:p},t.textPosition(n,T,M.text,M.marker)),e.extendFlat(M.textSel,{positions:p},t.textPosition(n,T,M.text,M.markerSel)),e.extendFlat(M.textUnsel,{positions:p},t.textPosition(n,T,M.text,M.markerUnsel))),M.fill&&!x.fill2d&&(x.fill2d=!0),M.marker&&!x.scatter2d&&(x.scatter2d=!0),M.line&&!x.line2d&&(x.line2d=!0),M.text&&!x.glText&&(x.glText=!0),x.lineOptions.push(M.line),x.fillOptions.push(M.fill),x.markerOptions.push(M.marker),x.markerSelectedOptions.push(M.markerSel),x.markerUnselectedOptions.push(M.markerUnsel),x.textOptions.push(M.text),x.textSelectedOptions.push(M.textSel),x.textUnselectedOptions.push(M.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),u.x=k,u.y=w,u.rawx=k,u.rawy=w,u.r=_,u.theta=P,u.positions=p,u._scene=x,u.index=x.count,x.count++}}),I(n,o,i)}},Z.exports.reglPrecompiled=a}),q$=Dt((Q,Z)=>{var c=H$();c.plot=W$(),Z.exports=c}),$$=Dt((Q,Z)=>{Z.exports=q$()}),aC=Dt((Q,Z)=>{var{hovertemplateAttrs:c,templatefallbackAttrs:g}=Zu(),I=Ia().extendFlat,S=z3(),t=Lg();Z.exports={r:S.r,theta:S.theta,r0:S.r0,dr:S.dr,theta0:S.theta0,dtheta:S.dtheta,thetaunit:S.thetaunit,base:I({},t.base,{}),offset:I({},t.offset,{}),width:I({},t.width,{}),text:I({},t.text,{}),hovertext:I({},t.hovertext,{}),marker:e(),hoverinfo:S.hoverinfo,hovertemplate:c(),hovertemplatefallback:g(),selected:t.selected,unselected:t.unselected};function e(){var r=I({},t.marker);return delete r.cornerradius,r}}),oC=Dt((Q,Z)=>{Z.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}),Z$=Dt((Q,Z)=>{var c=kn(),g=zT().handleRThetaDefaults,I=R6(),S=aC();Z.exports=function(t,e,r,a){function n(i,l){return c.coerce(t,e,S,i,l)}var o=g(t,e,a,n);if(!o){e.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),I(t,e,n,r,a),c.coerceSelectionMarkerOpacity(e,n)}}),G$=Dt((Q,Z)=>{var c=kn(),g=oC();Z.exports=function(I,S,t){var e={},r;function a(i,l){return c.coerce(I[r]||{},S[r],g,i,l)}for(var n=0;n{var c=Ud().hasColorscale,g=Xd(),I=kn().isArrayOrTypedArray,S=Vw(),t=zr().setGroupPositions,e=Bt(),r=Jo().traceIs,a=kn().extendFlat;function n(i,l){for(var f=i._fullLayout,x=l.subplot,y=f[x].radialaxis,v=f[x].angularaxis,T=y.makeCalcdata(l,"r"),u=v.makeCalcdata(l,"theta"),b=l._length,_=new Array(b),P=T,M=u,C=0;C{var c=qr(),g=Yi(),I=kn(),S=Vs(),t=PT();Z.exports=function(r,a,n){var o=r._context.staticPlot,i=a.xaxis,l=a.yaxis,f=a.radialAxis,x=a.angularAxis,y=e(a),v=a.layers.frontplot.select("g.barlayer");I.makeTraceGroups(v,n,"trace bars").each(function(){var T=c.select(this),u=I.ensureSingle(T,"g","points"),b=u.selectAll("g.point").data(I.identity);b.enter().append("g").style("vector-effect",o?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),b.exit().remove(),b.each(function(_){var P=c.select(this),M=_.rp0=f.c2p(_.s0),C=_.rp1=f.c2p(_.s1),A=_.thetag0=x.c2g(_.p0),h=_.thetag1=x.c2g(_.p1),p;if(!g(M)||!g(C)||!g(A)||!g(h)||M===C||A===h)p="M0,0Z";else{var k=f.c2g(_.s1),w=(A+h)/2;_.ct=[i.c2p(k*Math.cos(w)),l.c2p(k*Math.sin(w))],p=y(M,C,A,h)}I.ensureSingle(P,"path").attr("d",p)}),S.setClipUrl(T,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,r)})};function e(r){var a=r.cxx,n=r.cyy;return r.vangles?function(o,i,l,f){var x,y;I.angleDelta(l,f)>0?(x=l,y=f):(x=f,y=l);var v=t.findEnclosingVertexAngles(x,r.vangles)[0],T=t.findEnclosingVertexAngles(y,r.vangles)[1],u=[v,(x+y)/2,T];return t.pathPolygonAnnulus(o,i,x,y,u,a,n)}:function(o,i,l,f){return I.pathAnnulus(o,i,l,f,a,n)}}}),K$=Dt((Q,Z)=>{var c=tf(),g=kn(),I=Q_().getTraceColor,S=g.fillText,t=DT().makeHoverPointText,e=PT().isPtInsidePolygon;Z.exports=function(r,a,n){var o=r.cd,i=o[0].trace,l=r.subplot,f=l.radialAxis,x=l.angularAxis,y=l.vangles,v=y?e:g.isPtInsideSector,T=r.maxHoverDistance,u=x._period||2*Math.PI,b=Math.abs(f.g2p(Math.sqrt(a*a+n*n))),_=Math.atan2(n,a);f.range[0]>f.range[1]&&(_+=Math.PI);var P=function(h){return v(b,_,[h.rp0,h.rp1],[h.thetag0,h.thetag1],y)?T+Math.min(1,Math.abs(h.thetag1-h.thetag0)/u)-1+(h.rp1-b)/(h.rp1-h.rp0)-1:1/0};if(c.getClosest(o,P,r),r.index!==!1){var M=r.index,C=o[M];r.x0=r.x1=C.ct[0],r.y0=r.y1=C.ct[1];var A=g.extendFlat({},C,{r:C.s,theta:C.p});return S(C,i,r),t(A,i,l,r),r.hovertemplate=i.hovertemplate,r.color=I(i,C),r.xLabelVal=r.yLabelVal=void 0,C.s<0&&(r.idealAlign="left"),[r]}}}),X$=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"barpolar",basePlotModule:IT(),categories:["polar","bar","showLegend"],attributes:aC(),layoutAttributes:oC(),supplyDefaults:Z$(),supplyLayoutDefaults:G$(),calc:sC().calc,crossTraceCalc:sC().crossTraceCalc,plot:Y$(),colorbar:xo(),formatLabels:OT(),style:xm().style,styleOnSelect:xm().styleOnSelect,hoverPoints:K$(),selectPoints:tb(),meta:{}}}),J$=Dt((Q,Z)=>{Z.exports=X$()}),lC=Dt((Q,Z)=>{Z.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}),uC=Dt((Q,Z)=>{var c=wi(),g=Td(),I=jh().attributes,S=kn().extendFlat,t=Yc().overrideAll,e=t({color:g.color,showline:S({},g.showline,{dflt:!0}),linecolor:g.linecolor,linewidth:g.linewidth,showgrid:S({},g.showgrid,{dflt:!0}),gridcolor:g.gridcolor,gridwidth:g.gridwidth,griddash:g.griddash},"plot","from-root"),r=t({ticklen:g.ticklen,tickwidth:S({},g.tickwidth,{dflt:2}),tickcolor:g.tickcolor,showticklabels:g.showticklabels,labelalias:g.labelalias,showtickprefix:g.showtickprefix,tickprefix:g.tickprefix,showticksuffix:g.showticksuffix,ticksuffix:g.ticksuffix,tickfont:g.tickfont,tickformat:g.tickformat,hoverformat:g.hoverformat,layer:g.layer},"plot","from-root"),a=S({visible:S({},g.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:S({},g.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,r),n=S({visible:S({},g.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:g.ticks,editType:"calc"},e,r);Z.exports={domain:I({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:c.background},realaxis:a,imaginaryaxis:n,editType:"calc"}}),Q$=Dt((Q,Z)=>{var c=kn(),g=hi(),I=mu(),S=z1(),t=ud().getSubplotData,e=dm(),r=n0(),a=Qy(),n=i0(),o=uC(),i=lC(),l=i.axisNames,f=y(function(v){return c.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(T){return-T}).concat([0]).concat(v)},String);function x(v,T,u,b){var _=u("bgcolor");b.bgColor=g.combine(_,b.paper_bgcolor);var P=t(b.fullData,i.name,b.id),M=b.layoutOut,C;function A(q,J){return u(C+"."+q,J)}for(var h=0;h{var c=ud().getSubplotCalcData,g=kn().counterRegex,I=rC(),S=lC(),t=S.attr,e=S.name,r=g(e),a={};a[t]={valType:"subplotid",dflt:e,editType:"calc"};function n(i){for(var l=i._fullLayout,f=i.calcdata,x=l._subplots[e],y=0;y{var{hovertemplateAttrs:c,texttemplateAttrs:g,templatefallbackAttrs:I}=Zu(),S=Ia().extendFlat,t=I0(),e=ef(),r=Ho(),a=e.line;Z.exports={mode:e.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:e.text,texttemplate:g({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:I({editType:"plot"}),hovertext:e.hovertext,line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:S({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:S({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:S({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:S({},r.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:e.hoveron,hovertemplate:c(),hovertemplatefallback:I(),selected:e.selected,unselected:e.unselected}}),eZ=Dt((Q,Z)=>{var c=kn(),g=Tc(),I=s0(),S=z0(),t=xv(),e=x0(),r=O0(),a=vm().PTS_LINESONLY,n=cC();Z.exports=function(i,l,f,x){function y(u,b){return c.coerce(i,l,n,u,b)}var v=o(i,l,x,y);if(!v){l.visible=!1;return}y("mode",v{var c=Ls();Z.exports=function(g,I,S){var t={},e=S[I.subplot]._subplot;return t.realLabel=c.tickText(e.radialAxis,g.real,!0).text,t.imagLabel=c.tickText(e.angularAxis,g.imag,!0).text,t}}),nZ=Dt((Q,Z)=>{var c=Yi(),g=Ca().BADNUM,I=F0(),S=ct(),t=Bt(),e=me().calcMarkerSize;Z.exports=function(r,a){for(var n=r._fullLayout,o=a.subplot,i=n[o].realaxis,l=n[o].imaginaryaxis,f=i.makeCalcdata(a,"real"),x=l.makeCalcdata(a,"imag"),y=a._length,v=new Array(y),T=0;T{var c=Ka(),g=Ca().BADNUM,I=eC(),S=I.smith;Z.exports=function(t,e,r){for(var a=e.layers.frontplot.select("g.scatterlayer"),n=e.xaxis,o=e.yaxis,i={xaxis:n,yaxis:o,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},l=0;l{var c=Md();function g(S,t,e,r){var a=c(S,t,e,r);if(!(!a||a[0].index===!1)){var n=a[0];if(n.index===void 0)return a;var o=S.subplot,i=n.cd[n.index],l=n.trace;if(o.isPtInside(i))return n.xLabelVal=void 0,n.yLabelVal=void 0,I(i,l,o,n),n.hovertemplate=l.hovertemplate,a}}function I(S,t,e,r){var a=e.radialAxis,n=e.angularAxis;a._hovertitle="real",n._hovertitle="imag";var o={};o[t.subplot]={_subplot:e};var i=t._module.formatLabels(S,t,o);r.realLabel=i.realLabel,r.imagLabel=i.imagLabel;var l=S.hi||t.hoverinfo,f=[];function x(v,T){f.push(v._hovertitle+": "+T)}if(!t.hovertemplate){var y=l.split("+");y.indexOf("all")!==-1&&(y=["real","imag","text"]),y.indexOf("real")!==-1&&x(a,r.realLabel),y.indexOf("imag")!==-1&&x(n,r.imagLabel),y.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("
")}}Z.exports={hoverPoints:g,makeHoverPointText:I}}),oZ=Dt((Q,Z)=>{Z.exports={moduleType:"trace",name:"scattersmith",basePlotModule:tZ(),categories:["smith","symbols","showLegend","scatter-like"],attributes:cC(),supplyDefaults:eZ(),colorbar:xo(),formatLabels:rZ(),calc:nZ(),plot:iZ(),style:_l().style,styleOnSelect:_l().styleOnSelect,hoverPoints:aZ().hoverPoints,selectPoints:Rf(),meta:{}}}),sZ=Dt((Q,Z)=>{Z.exports=oZ()}),Np=Dt((Q,Z)=>{var c=Sd();function g(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}c(g.prototype,{instance:function(a,n){a=(a||"gregorian").toLowerCase(),n=n||"";var o=this._localCals[a+"-"+n];if(!o&&this.calendars[a]&&(o=new this.calendars[a](n),this._localCals[a+"-"+n]=o),!o)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,a);return o},newDate:function(a,n,o,i,l){return i=(a!=null&&a.year?a.calendar():typeof i=="string"?this.instance(i,l):i)||this.instance(),i.newDate(a,n,o)},substituteDigits:function(a){return function(n){return(n+"").replace(/[0-9]/g,function(o){return a[o]})}},substituteChineseDigits:function(a,n){return function(o){for(var i="",l=0;o>0;){var f=o%10;i=(f===0?"":a[f]+n[l])+i,l++,o=Math.floor(o/10)}return i.indexOf(a[1]+n[1])===0&&(i=i.substr(1)),i||a[0]}}});function I(a,n,o,i){if(this._calendar=a,this._year=n,this._month=o,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(a,n){return a=""+a,"000000".substring(0,n-a.length)+a}c(I.prototype,{newDate:function(a,n,o){return this._calendar.newDate(a??this,n,o)},year:function(a){return arguments.length===0?this._year:this.set(a,"y")},month:function(a){return arguments.length===0?this._month:this.set(a,"m")},day:function(a){return arguments.length===0?this._day:this.set(a,"d")},date:function(a,n,o){if(!this._calendar.isValid(a,n,o))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=a,this._month=n,this._day=o,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(a,n){return this._calendar.add(this,a,n)},set:function(a,n){return this._calendar.set(this,a,n)},compareTo:function(a){if(this._calendar.name!==a._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name);var n=this._year!==a._year?this._year-a._year:this._month!==a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day;return n===0?0:n<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function t(){this.shortYearCutoff="+10"}c(t.prototype,{_validateLevel:0,newDate:function(a,n,o){return a==null?this.today():(a.year&&(this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),o=a.day(),n=a.month(),a=a.year()),new I(this,a,n,o))},today:function(){return this.fromJSDate(new Date)},epoch:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return n.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(n.year()<0?"-":"")+S(Math.abs(n.year()),4)},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(a,n){var o=this._validate(a,n,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(o.month()+this.monthsInYear(o)-this.firstMonth)%this.monthsInYear(o)+this.minMonth},fromMonthOfYear:function(a,n){var o=(n+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;return this._validate(a,o,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),o},daysInYear:function(a){var n=this._validate(a,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(n)?366:365},dayOfYear:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(a,n,o){return this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(a,n,o){return this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(a,this._add(a,n,o),n,o)},_add:function(a,n,o){if(this._validateLevel++,o==="d"||o==="w"){var i=a.toJD()+n*(o==="w"?this.daysInWeek():1),l=a.calendar().fromJD(i);return this._validateLevel--,[l.year(),l.month(),l.day()]}try{var f=a.year()+(o==="y"?n:0),x=a.monthOfYear()+(o==="m"?n:0),l=a.day(),y=function(u){for(;xb-1+u.minMonth;)f++,x-=b,b=u.monthsInYear(f)};o==="y"?(a.month()!==this.fromMonthOfYear(f,x)&&(x=this.newDate(f,a.month(),this.minDay).monthOfYear()),x=Math.min(x,this.monthsInYear(f)),l=Math.min(l,this.daysInMonth(f,this.fromMonthOfYear(f,x)))):o==="m"&&(y(this),l=Math.min(l,this.daysInMonth(f,this.fromMonthOfYear(f,x))));var v=[f,this.fromMonthOfYear(f,x),l];return this._validateLevel--,v}catch(T){throw this._validateLevel--,T}},_correctAdd:function(a,n,o,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(n[0]===0||a.year()>0!=n[0]>0)){var l={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],f=o<0?-1:1;n=this._add(a,o*l[0]+f*l[1],l[2])}return a.date(n[0],n[1],n[2])},set:function(a,n,o){this._validate(a,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var i=o==="y"?n:a.year(),l=o==="m"?n:a.month(),f=o==="d"?n:a.day();return(o==="y"||o==="m")&&(f=Math.min(f,this.daysInMonth(i,l))),a.date(i,l,f)},isValid:function(a,n,o){this._validateLevel++;var i=this.hasYearZero||a!==0;if(i){var l=this.newDate(a,n,this.minDay);i=n>=this.minMonth&&n-this.minMonth=this.minDay&&o-this.minDay13.5?13:1),T=l-(v>2.5?4716:4715);return T<=0&&T--,this.newDate(T,v,y)},toJSDate:function(a,n,o){var i=this._validate(a,n,o,r.local.invalidDate||r.regionalOptions[""].invalidDate),l=new Date(i.year(),i.month()-1,i.day());return l.setHours(0),l.setMinutes(0),l.setSeconds(0),l.setMilliseconds(0),l.setHours(l.getHours()>12?l.getHours()+2:0),l},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});var r=Z.exports=new g;r.cdate=I,r.baseCalendar=t,r.calendars.gregorian=e}),lZ=Dt(()=>{var Q=Sd(),Z=Np();Q(Z.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),Z.local=Z.regionalOptions[""],Q(Z.cdate.prototype,{formatDate:function(c,g){return typeof c!="string"&&(g=c,c=""),this._calendar.formatDate(c||"",this,g)}}),Q(Z.baseCalendar.prototype,{UNIX_EPOCH:Z.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:Z.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(c,g,I){if(typeof c!="string"&&(I=g,g=c,c=""),!g)return"";if(g.calendar()!==this)throw Z.local.invalidFormat||Z.regionalOptions[""].invalidFormat;c=c||this.local.dateFormat,I=I||{};for(var S=I.dayNamesShort||this.local.dayNamesShort,t=I.dayNames||this.local.dayNames,e=I.monthNumbers||this.local.monthNumbers,r=I.monthNamesShort||this.local.monthNamesShort,a=I.monthNames||this.local.monthNames,n=I.calculateWeek||this.local.calculateWeek,o=function(P,M){for(var C=1;_+C1},i=function(P,M,C,A){var h=""+M;if(o(P,A))for(;h.length1},b=function(R,O){var j=u(R,O),V=[2,3,j?4:2,j?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],H=new RegExp("^-?\\d{1,"+V+"}"),F=g.substring(h).match(H);if(!F)throw(Z.local.missingNumberAt||Z.regionalOptions[""].missingNumberAt).replace(/\{0\}/,h);return h+=F[0].length,parseInt(F[0],10)},_=this,P=function(){if(typeof a=="function"){u("m");var R=a.call(_,g.substring(h));return h+=R.length,R}return b("m")},M=function(R,O,j,V){for(var H=u(R,V)?j:O,F=0;F-1){f=1,x=y;for(var w=this.daysInMonth(l,f);x>w;w=this.daysInMonth(l,f))f++,x-=w}return i>-1?this.fromJD(i):this.newDate(l,f,x)},determineDate:function(c,g,I,S,t){I&&typeof I!="object"&&(t=S,S=I,I=null),typeof S!="string"&&(t=S,S="");var e=this,r=function(a){try{return e.parseDate(S,a,t)}catch{}a=a.toLowerCase();for(var n=(a.match(/^c/)&&I?I.newDate():null)||e.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=o.exec(a);i;)n.add(parseInt(i[1],10),i[2]||"d"),i=o.exec(a);return n};return g=g?g.newDate():null,c=c==null?g:typeof c=="string"?r(c):typeof c=="number"?isNaN(c)||c===1/0||c===-1/0?g:e.today().add(c,"d"):e.newDate(c),c}})}),uZ=Dt(()=>{var Q=Np(),Z=Sd(),c=Q.instance();function g(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,Z(g.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,l){if(typeof i=="string"){var f=i.match(S);return f?f[0]:""}var x=this._validateYear(i),y=i.month(),v=""+this.toChineseMonth(x,y);return l&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(x,y)&&(v+="i"),v},monthNames:function(i){if(typeof i=="string"){var l=i.match(t);return l?l[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},monthNamesShort:function(i){if(typeof i=="string"){var l=i.match(e);return l?l[0]:""}var f=this._validateYear(i),x=i.month(),y=this.toChineseMonth(f,x),v=["一","二","三","四","五","六","七","八","九","十","十一","十二"][y-1];return this.isIntercalaryMonth(f,x)&&(v="闰"+v),v},parseMonth:function(i,l){i=this._validateYear(i);var f=parseInt(l),x;if(isNaN(f))l[0]==="闰"&&(x=!0,l=l.substring(1)),l[l.length-1]==="月"&&(l=l.substring(0,l.length-1)),f=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(l);else{var y=l[l.length-1];x=y==="i"||y==="I"}var v=this.toMonthIndex(i,f,x);return v},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(i,l){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw l.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,l,f){var x=this.intercalaryMonth(i),y=f&&l!==x;if(y||l<1||l>12)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return x?!f&&l<=x?v=l-1:v=l:v=l-1,v},toChineseMonth:function(i,l){i.year&&(i=i.year(),l=i.month());var f=this.intercalaryMonth(i),x=f?12:11;if(l<0||l>x)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var y;return f?l>13;return f},isIntercalaryMonth:function(i,l){i.year&&(i=i.year(),l=i.month());var f=this.intercalaryMonth(i);return!!f&&f===l},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,l,f){var x=this._validateYear(i,Q.local.invalidyear),y=a[x-a[0]],v=y>>9&4095,T=y>>5&15,u=y&31,b;b=c.newDate(v,T,u),b.add(4-(b.dayOfWeek()||7),"d");var _=this.toJD(i,l,f)-b.toJD();return 1+Math.floor(_/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,l){i.year&&(l=i.month(),i=i.year()),i=this._validateYear(i);var f=r[i-r[0]],x=f>>13,y=x?12:11;if(l>y)throw Q.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=f&1<<12-l?30:29;return v},weekDay:function(i,l,f){return(this.dayOfWeek(i,l,f)||7)<6},toJD:function(i,l,f){var x=this._validate(i,v,f,Q.local.invalidDate);i=this._validateYear(x.year()),l=x.month(),f=x.day();var y=this.isIntercalaryMonth(i,l),v=this.toChineseMonth(i,l),T=o(i,v,f,y);return c.toJD(T.year,T.month,T.day)},fromJD:function(i){var l=c.fromJD(i),f=n(l.year(),l.month(),l.day()),x=this.toMonthIndex(f.year,f.month,f.isIntercalary);return this.newDate(f.year,x,f.day)},fromString:function(i){var l=i.match(I),f=this._validateYear(+l[1]),x=+l[2],y=!!l[3],v=this.toMonthIndex(f,x,y),T=+l[4];return this.newDate(f,v,T)},add:function(i,l,f){var x=i.year(),y=i.month(),v=this.isIntercalaryMonth(x,y),T=this.toChineseMonth(x,y),u=Object.getPrototypeOf(g.prototype).add.call(this,i,l,f);if(f==="y"){var b=u.year(),_=u.month(),P=this.isIntercalaryMonth(b,T),M=v&&P?this.toMonthIndex(b,T,!0):this.toMonthIndex(b,T,!1);M!==_&&u.month(M)}return u}});var I=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,S=/^\d?\d[iI]?/m,t=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;Q.calendars.chinese=g;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function n(i,l,f,x){var y,v;if(typeof i=="object")y=i,v=l||{};else{var T=typeof i=="number"&&i>=1888&&i<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var u=typeof l=="number"&&l>=1&&l<=12;if(!u)throw new Error("Solar month outside range 1 - 12");var b=typeof f=="number"&&f>=1&&f<=31;if(!b)throw new Error("Solar day outside range 1 - 31");y={year:i,month:l,day:f},v={}}var _=a[y.year-a[0]],P=y.year<<9|y.month<<5|y.day;v.year=P>=_?y.year:y.year-1,_=a[v.year-a[0]];var M=_>>9&4095,C=_>>5&15,A=_&31,h,p=new Date(M,C-1,A),k=new Date(y.year,y.month-1,y.day);h=Math.round((k-p)/(24*3600*1e3));var w=r[v.year-r[0]],R;for(R=0;R<13;R++){var O=w&1<<12-R?30:29;if(h>13;return!j||R=1888&&i<=2111;if(!u)throw new Error("Lunar year outside range 1888-2111");var b=typeof l=="number"&&l>=1&&l<=12;if(!b)throw new Error("Lunar month outside range 1 - 12");var _=typeof f=="number"&&f>=1&&f<=30;if(!_)throw new Error("Lunar day outside range 1 - 30");var P;typeof x=="object"?(P=!1,v=x):(P=!!x,v={}),T={year:i,month:l,day:f,isIntercalary:P}}var M;M=T.day-1;var C=r[T.year-r[0]],A=C>>13,h;A&&(T.month>A||T.isIntercalary)?h=T.month:h=T.month-1;for(var p=0;p>9&4095,O=w>>5&15,j=w&31,V=new Date(R,O-1,j+M);return v.year=V.getFullYear(),v.month=1+V.getMonth(),v.day=V.getDate(),v}}),cZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var I=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=I.year()+(I.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return(this.dayOfWeek(g,I,S)||7)<6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var I=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((I-Math.floor((I+366)/1461))/365)+1;S<=0&&S--,I=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(I/30)+1,e=I-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.coptic=c}),hZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),!1},monthsInYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),13},daysInYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),400},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return(e.day()+1)%8},weekDay:function(I,S,t){var e=this.dayOfWeek(I,S,t);return e>=2&&e<=6},extraInfo:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return{century:g[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return I=e.year()+(e.year()<0?1:0),S=e.month(),t=e.day(),t+(S>1?16:0)+(S>2?(S-2)*32:0)+(I-1)*400+this.jdEpoch-1},fromJD:function(I){I=Math.floor(I+.5)-Math.floor(this.jdEpoch)-1;var S=Math.floor(I/400)+1;I-=(S-1)*400,I+=I>15?16:0;var t=Math.floor(I/32)+1,e=I-(t-1)*32+1;return this.newDate(S<=0?S-1:S,t,e)}});var g={20:"Fruitbat",21:"Anchovy"};Q.calendars.discworld=c}),fZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var I=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=I.year()+(I.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(g){return this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear),13},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return(this.dayOfWeek(g,I,S)||7)<6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),g<0&&g++,t.day()+(t.month()-1)*30+(g-1)*365+Math.floor(g/4)+this.jdEpoch-1},fromJD:function(g){var I=Math.floor(g)+.5-this.jdEpoch,S=Math.floor((I-Math.floor((I+366)/1461))/365)+1;S<=0&&S--,I=Math.floor(g)+.5-this.newDate(S,1,1).toJD();var t=Math.floor(I/30)+1,e=I-(t-1)*30+1;return this.newDate(S,t,e)}}),Q.calendars.ethiopian=c}),dZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return this._leapYear(S.year())},_leapYear:function(I){return I=I<0?I+1:I,g(I*7+1,19)<7},monthsInYear:function(I){return this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear),this._leapYear(I.year?I.year():I)?13:12},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return I=S.year(),this.toJD(I===-1?1:I+1,7,1)-this.toJD(I,7,1)},daysInMonth:function(I,S){return I.year&&(S=I.month(),I=I.year()),this._validate(I,S,this.minDay,Q.local.invalidMonth),S===12&&this.leapYear(I)||S===8&&g(this.daysInYear(I),10)===5?30:S===9&&g(this.daysInYear(I),10)===3?29:this.daysPerMonth[S-1]},weekDay:function(I,S,t){return this.dayOfWeek(I,S,t)!==6},extraInfo:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);I=e.year(),S=e.month(),t=e.day();var r=I<=0?I+1:I,a=this.jdEpoch+this._delay1(r)+this._delay2(r)+t+1;if(S<7){for(var n=7;n<=this.monthsInYear(I);n++)a+=this.daysInMonth(I,n);for(var n=1;n=this.toJD(S===-1?1:S+1,7,1);)S++;for(var t=Ithis.toJD(S,t,this.daysInMonth(S,t));)t++;var e=I-this.toJD(S,t,1)+1;return this.newDate(S,t,e)}});function g(I,S){return I-S*Math.floor(I/S)}Q.calendars.hebrew=c}),pZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(g){var I=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);return(I.year()*11+14)%30<11},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){return this.leapYear(g)?355:354},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===12&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return this.dayOfWeek(g,I,S)!==5},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),I=t.month(),S=t.day(),g=g<=0?g+1:g,S+Math.ceil(29.5*(I-1))+(g-1)*354+Math.floor((3+11*g)/30)+this.jdEpoch-1},fromJD:function(g){g=Math.floor(g)+.5;var I=Math.floor((30*(g-this.jdEpoch)+10646)/10631);I=I<=0?I-1:I;var S=Math.min(12,Math.ceil((g-29-this.toJD(I,1,1))/29.5)+1),t=g-this.toJD(I,S,1)+1;return this.newDate(I,S,t)}}),Q.calendars.islamic=c}),mZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var I=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),S=I.year()<0?I.year()+1:I.year();return S%4===0},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(4-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(g,I){var S=this._validate(g,I,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===2&&this.leapYear(S.year())?1:0)},weekDay:function(g,I,S){return(this.dayOfWeek(g,I,S)||7)<6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);return g=t.year(),I=t.month(),S=t.day(),g<0&&g++,I<=2&&(g--,I+=12),Math.floor(365.25*(g+4716))+Math.floor(30.6001*(I+1))+S-1524.5},fromJD:function(g){var I=Math.floor(g+.5),S=I+1524,t=Math.floor((S-122.1)/365.25),e=Math.floor(365.25*t),r=Math.floor((S-e)/30.6001),a=r-Math.floor(r<14?1:13),n=t-Math.floor(a>2?4716:4715),o=S-e-Math.floor(30.6001*r);return n<=0&&n--,this.newDate(n,a,o)}}),Q.calendars.julian=c}),gZ=Dt(()=>{var Q=Np(),Z=Sd();function c(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),!1},formatYear:function(S){var t=this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear);S=t.year();var e=Math.floor(S/400);S=S%400,S+=S<0?400:0;var r=Math.floor(S/20);return e+"."+r+"."+S%20},forYear:function(S){if(S=S.split("."),S.length<3)throw"Invalid Mayan year";for(var t=0,e=0;e19||e>0&&r<0)throw"Invalid Mayan year";t=t*20+r}return t},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),18},weekOfYear:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),0},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Q.local.invalidYear),360},daysInMonth:function(S,t){return this._validate(S,t,this.minDay,Q.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()},weekDay:function(S,t,e){return this._validate(S,t,e,Q.local.invalidDate),!0},extraInfo:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate),a=r.toJD(),n=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(S){S-=this.jdEpoch;var t=g(S+8+340,365);return[Math.floor(t/20)+1,g(t,20)]},_toTzolkin:function(S){return S-=this.jdEpoch,[I(S+20,20),I(S+4,13)]},toJD:function(S,t,e){var r=this._validate(S,t,e,Q.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(S){S=Math.floor(S)+.5-this.jdEpoch;var t=Math.floor(S/360);S=S%360,S+=S<0?360:0;var e=Math.floor(S/20),r=S%20;return this.newDate(t,e,r)}});function g(S,t){return S-t*Math.floor(S/t)}function I(S,t){return g(S-1,t)+1}Q.calendars.mayan=c}),vZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar;var g=Q.instance("gregorian");Z(c.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear||Q.regionalOptions[""].invalidYear);return g.leapYear(S.year()+(S.year()<1?1:0)+1469)},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return(this.dayOfWeek(I,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidMonth),r=e.year();r<0&&r++;for(var a=e.day(),n=1;n=this.toJD(S+1,1,1);)S++;for(var t=I-Math.floor(this.toJD(S,1,1)+.5)+1,e=1;t>this.daysInMonth(S,e);)t-=this.daysInMonth(S,e),e++;return this.newDate(S,e,t)}}),Q.calendars.nanakshahi=c}),yZ=Dt(()=>{var Q=Np(),Z=Sd();function c(g){this.local=this.regionalOptions[g||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(g){return this.daysInYear(g)!==this.daysPerYear},weekOfYear:function(g,I,S){var t=this.newDate(g,I,S);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(g){var I=this._validate(g,this.minMonth,this.minDay,Q.local.invalidYear);if(g=I.year(),typeof this.NEPALI_CALENDAR_DATA[g]>"u")return this.daysPerYear;for(var S=0,t=this.minMonth;t<=12;t++)S+=this.NEPALI_CALENDAR_DATA[g][t];return S},daysInMonth:function(g,I){return g.year&&(I=g.month(),g=g.year()),this._validate(g,I,this.minDay,Q.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[g]>"u"?this.daysPerMonth[I-1]:this.NEPALI_CALENDAR_DATA[g][I]},weekDay:function(g,I,S){return this.dayOfWeek(g,I,S)!==6},toJD:function(g,I,S){var t=this._validate(g,I,S,Q.local.invalidDate);g=t.year(),I=t.month(),S=t.day();var e=Q.instance(),r=0,a=I,n=g;this._createMissingCalendarData(g);var o=g-(a>9||a===9&&S>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(I!==9&&(r=S,a--);a!==9;)a<=0&&(a=12,n--),r+=this.NEPALI_CALENDAR_DATA[n][a],a--;return I===9?(r+=S-this.NEPALI_CALENDAR_DATA[n][0],r<0&&(r+=e.daysInYear(o))):r+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],e.newDate(o,1,1).add(r,"d").toJD()},fromJD:function(g){var I=Q.instance(),S=I.fromJD(g),t=S.year(),e=S.dayOfYear(),r=t+56;this._createMissingCalendarData(r);for(var a=9,n=this.NEPALI_CALENDAR_DATA[r][0],o=this.NEPALI_CALENDAR_DATA[r][a]-n+1;e>o;)a++,a>12&&(a=1,r++),o+=this.NEPALI_CALENDAR_DATA[r][a];var i=this.NEPALI_CALENDAR_DATA[r][a]-(o-e);return this.newDate(r,a,i)},_createMissingCalendarData:function(g){var I=this.daysPerMonth.slice(0);I.unshift(17);for(var S=g-1;S"u"&&(this.NEPALI_CALENDAR_DATA[S]=I)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),Q.calendars.nepali=c}),xZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}function g(I){var S=I-475;I<0&&S++;var t=.242197,e=t*S,r=t*(S+1),a=e-Math.floor(e),n=r-Math.floor(r);return a>n}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return g(S.year())},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return this.dayOfWeek(I,S,t)!==5},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate);I=e.year(),S=e.month(),t=e.day();var r=0;if(I>0)for(var a=1;a0?I-1:I)*365+r+this.jdEpoch-1},fromJD:function(I){I=Math.floor(I)+.5;var S=475+(I-this.toJD(475,1,1))/365.242197,t=Math.floor(S);t<=0&&t--,I>this.toJD(t,12,g(t)?30:29)&&(t++,t===0&&t++);var e=I-this.toJD(t,1,1)+1,r=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),a=I-this.toJD(t,r,1)+1;return this.newDate(t,r,a)}}),Q.calendars.persian=c,Q.calendars.jalali=c}),_Z=Dt(()=>{var Q=Np(),Z=Sd(),c=Q.instance();function g(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,Z(g.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return(this.dayOfWeek(I,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(I){var S=c.fromJD(I),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(I){return I+this.yearsOffset+(I>=-this.yearsOffset&&I<=-1?1:0)},_g2tYear:function(I){return I-this.yearsOffset-(I>=1&&I<=this.yearsOffset?1:0)}}),Q.calendars.taiwan=g}),bZ=Dt(()=>{var Q=Np(),Z=Sd(),c=Q.instance();function g(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}g.prototype=new Q.baseCalendar,Z(g.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var S=this._validate(t,this.minMonth,this.minDay,Q.local.invalidYear),t=this._t2gYear(S.year());return c.leapYear(t)},weekOfYear:function(r,S,t){var e=this._validate(r,this.minMonth,this.minDay,Q.local.invalidYear),r=this._t2gYear(e.year());return c.weekOfYear(r,e.month(),e.day())},daysInMonth:function(I,S){var t=this._validate(I,S,this.minDay,Q.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(I,S,t){return(this.dayOfWeek(I,S,t)||7)<6},toJD:function(r,S,t){var e=this._validate(r,S,t,Q.local.invalidDate),r=this._t2gYear(e.year());return c.toJD(r,e.month(),e.day())},fromJD:function(I){var S=c.fromJD(I),t=this._g2tYear(S.year());return this.newDate(t,S.month(),S.day())},_t2gYear:function(I){return I-this.yearsOffset-(I>=1&&I<=this.yearsOffset?1:0)},_g2tYear:function(I){return I+this.yearsOffset+(I>=-this.yearsOffset&&I<=-1?1:0)}}),Q.calendars.thai=g}),wZ=Dt(()=>{var Q=Np(),Z=Sd();function c(I){this.local=this.regionalOptions[I||""]||this.regionalOptions[""]}c.prototype=new Q.baseCalendar,Z(c.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(I){var S=this._validate(I,this.minMonth,this.minDay,Q.local.invalidYear);return this.daysInYear(S.year())===355},weekOfYear:function(I,S,t){var e=this.newDate(I,S,t);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(I){for(var S=0,t=1;t<=12;t++)S+=this.daysInMonth(I,t);return S},daysInMonth:function(I,S){for(var t=this._validate(I,S,this.minDay,Q.local.invalidMonth),e=t.toJD()-24e5+.5,r=0,a=0;ae)return g[r]-g[r-1];r++}return 30},weekDay:function(I,S,t){return this.dayOfWeek(I,S,t)!==5},toJD:function(I,S,t){var e=this._validate(I,S,t,Q.local.invalidDate),r=12*(e.year()-1)+e.month()-15292,a=e.day()+g[r-1]-1;return a+24e5-.5},fromJD:function(I){for(var S=I-24e5+.5,t=0,e=0;eS);e++)t++;var r=t+15292,a=Math.floor((r-1)/12),n=a+1,o=r-12*a,i=S-g[t-1]+1;return this.newDate(n,o,i)},isValid:function(I,S,t){var e=Q.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(I=I.year!=null?I.year:I,e=I>=1276&&I<=1500),e},_validate:function(I,S,t,e){var r=Q.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw e.replace(/\{0\}/,this.local.name);return r}}),Q.calendars.ummalqura=c;var g=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}),kZ=Dt((Q,Z)=>{Z.exports=Np(),lZ(),uZ(),cZ(),hZ(),fZ(),dZ(),pZ(),mZ(),gZ(),vZ(),yZ(),xZ(),_Z(),bZ(),wZ()}),TZ=Dt((Q,Z)=>{var c=kZ(),g=kn(),I=Ca(),S=I.EPOCHJD,t=I.ONEDAY,e={valType:"enumerated",values:g.sortObjectKeys(c.calendars),editType:"calc",dflt:"gregorian"},r=function(C,A,h,p){var k={};return k[h]=e,g.coerce(C,A,k,h,p)},a=function(C,A,h,p){for(var k=0;k{Z.exports=TZ()}),MZ=Dt((Q,Z)=>{var c=nR();c.register([sR(),cR(),pR(),xR(),kR(),SR(),LR(),UR(),KR(),sB(),vB(),RN(),HN(),Cj(),Bj(),$j(),Qj(),gU(),_U(),wU(),MU(),PU(),FU(),jU(),eV(),iV(),UH(),rW(),mW(),bW(),PW(),DW(),HW(),rq(),oq(),pq(),Cq(),Dq(),Vq(),h$(),x$(),T$(),C$(),z$(),B$(),$$(),J$(),sZ(),AZ()]),Z.exports=c});return MZ()})();/*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. @@ -3947,4 +3988,4 @@ maplibre-gl/dist/maplibre-gl.js: * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt *) -*/return window.Plotly=z,z})}(t4)),t4.exports}var Gdt=$dt();const l1=LO(Gdt),Ydt={class:"p-6 space-y-6"},Kdt={class:"flex justify-between items-center"},Xdt={class:"flex items-center gap-3"},Jdt=["value"],Qdt={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},tpt={class:"glass-card rounded-[15px] p-6"},ept={class:"mb-6"},rpt={class:"relative h-48 bg-white/5 rounded-lg p-4"},npt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},ipt={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},apt={class:"mb-6"},opt={class:"relative h-48 bg-white/5 rounded-lg p-4"},spt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},lpt={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},upt={class:"glass-card rounded-[15px] p-6"},cpt={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},hpt={class:"lg:col-span-2"},fpt={class:"relative h-64 bg-white/5 rounded-lg p-4"},dpt={class:"flex flex-col items-center justify-center"},ppt={class:"relative w-48 h-48"},mpt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm rounded-full z-20"},gpt={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 rounded-full z-20"},vpt={key:0,class:"glass-card rounded-[15px] p-8 text-center"},ypt={key:1,class:"glass-card rounded-[15px] p-8 text-center"},xpt={class:"text-white/60 text-sm"},_pt=ah({name:"StatisticsView",__name:"Statistics",setup(d){x2.register(eht,iht,uct,G4,Blt,Dlt,Rlt,Hct,Xct,Uct,Qut,mct,Dct,kA);const l=sw(),z=ro(null),j=ro(!1),J=ro(24),mt=[{value:1,label:"1 Hour"},{value:6,label:"6 Hours"},{value:12,label:"12 Hours"},{value:24,label:"24 Hours"},{value:48,label:"2 Days"},{value:168,label:"1 Week"}],kt=ro(null),Dt=ro(null),$t=ro([]),ee=ro(null),pe=ro([]),Be=ro(!0),ir=ro(null),vr=ro({packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0}),Ir=ro(!1),Pr=ro(!1),Wr=ro(!1),Tn=ro(null),Ft=ro(null),wn=ro(null),ei=ro(null),jn=ro(null),ai=ro(null),Qi=ro(null),Gi=Ko(()=>{const To=l.packetStats;return To?{totalRx:To.total_packets||0,totalTx:To.transmitted_packets||0}:{totalRx:0,totalTx:0}}),En=Ko(()=>{let To=[],eo=[];if(kt.value?.series){const ya=kt.value.series.find(mo=>mo.type==="rx_count"),ka=kt.value.series.find(mo=>mo.type==="tx_count");ya?.data&&(To=ya.data.map(([,mo])=>mo)),ka?.data&&(eo=ka.data.map(([,mo])=>mo))}return{totalPackets:To,transmittedPackets:eo,droppedPackets:[]}}),Fa=async()=>{try{Be.value=!0,ir.value=null,await Promise.all([l.fetchPacketStats({hours:J.value}),l.fetchSystemStats()]),Be.value=!1,Sa()}catch(To){ir.value=To instanceof Error?To.message:"Failed to fetch data",Be.value=!1}},Sa=async()=>{vr.value={packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0};const To=[Ni(),zi(),ia(),Ua()];try{await Promise.allSettled(To),await C0(),!ei.value||!jn.value?setTimeout(()=>{Va()},100):Va()}catch(eo){console.error("Error loading chart data:",eo)}},Ni=async()=>{vr.value.packetRate=!0;try{const To=await Ah.get("/metrics_graph_data",{hours:J.value,resolution:"average",metrics:"rx_count,tx_count"});To?.success&&(kt.value=To.data)}catch{kt.value=null}},zi=async()=>{vr.value.packetType=!0;try{const To=await Ah.get("/packet_type_graph_data",{hours:J.value,resolution:"average",types:"all"});if(To?.success&&To.data){const eo=To.data;$t.value=eo.series||[]}}catch{$t.value=[]}},ia=async()=>{vr.value.routePie=!0;try{const To=await Ah.get("/route_stats",{hours:J.value});To?.success&&To.data&&(ee.value=To.data)}catch{ee.value=null}},Ua=async()=>{try{const To=await Ah.get("/noise_floor_history",{hours:J.value});if(To.success&&To.data){const ya=To.data.history||[];Array.isArray(ya)&&ya.length>0&&(Dt.value={chart_data:ya.map(ka=>({timestamp:ka.timestamp||Date.now()/1e3,noise_floor_dbm:ka.noise_floor_dbm||ka.noise_floor||-120}))},Ei())}}catch{Dt.value={chart_data:[]}}},qi=()=>{us(),Ir.value=!1,Pr.value=!1,Wr.value=!1,Fa()},Ei=()=>{if(pe.value=[],Dt.value?.chart_data&&Dt.value.chart_data.length>0){const To=Dt.value.chart_data,eo=Math.max(1,Math.floor(To.length/100));pe.value=To.filter((ya,ka)=>ka%eo===0).map(ya=>({timestamp:ya.timestamp*1e3,snr:null,rssi:null,noiseFloor:ya.noise_floor_dbm}))}},Va=()=>{if(!j.value){j.value=!0;try{xo(),Mo(),co(),Go(),setTimeout(()=>{vr.value.packetRate&&Tn.value&&(vr.value.packetRate=!1),vr.value.packetType&&Ft.value&&(vr.value.packetType=!1),vr.value.routePie&&Qi.value&&(vr.value.routePie=!1),vr.value.routePie&&Qi.value&&(vr.value.routePie=!1),setTimeout(()=>{const To=Uu(Tn.value),eo=Uu(Ft.value),ya=Uu(wn.value);To&&To.update("none"),eo&&eo.update("none"),ya&&ya.update("none")},50)},100)}catch(To){console.error("Error creating/updating charts:",To),us()}finally{j.value=!1}}},us=()=>{try{Tn.value&&(Tn.value.destroy(),Tn.value=null),Ft.value&&(Ft.value.destroy(),Ft.value=null),wn.value&&(wn.value.destroy(),wn.value=null),Qi.value&&l1.purge(Qi.value)}catch(To){console.error("Error destroying charts:",To)}},xo=()=>{if(!ei.value){vr.value.packetRate=!1;return}const To=ei.value.getContext("2d");if(!To){vr.value.packetRate=!1;return}let eo=[],ya=[];if(kt.value?.series){const ka=kt.value.series.find(vo=>vo.type==="rx_count"),mo=kt.value.series.find(vo=>vo.type==="tx_count");ka?.data&&(eo=ka.data.map(([vo,Ss])=>{let Yo=vo;return vo>1e15?Yo=vo/1e3:vo>1e12?Yo=vo:vo>1e9?Yo=vo*1e3:Yo=Date.now(),{x:Yo,y:Ss}})),mo?.data&&(ya=mo.data.map(([vo,Ss])=>{let Yo=vo;return vo>1e15?Yo=vo/1e3:vo>1e12?Yo=vo:vo>1e9?Yo=vo*1e3:Yo=Date.now(),{x:Yo,y:Ss}}))}if(eo.length===0&&ya.length===0){Ir.value=!0,vr.value.packetRate=!1;return}Ir.value=!1,Tn.value&&(Tn.value.destroy(),Tn.value=null);try{const ka=JSON.parse(JSON.stringify(eo)),mo=JSON.parse(JSON.stringify(ya)),vo=new x2(To,{type:"line",data:{datasets:[{label:"RX/hr",data:ka,borderColor:"#C084FC",backgroundColor:"rgba(192, 132, 252, 0.1)",borderWidth:2,fill:!0,tension:.4},{label:"TX/hr",data:mo,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,fill:!0,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1},title:{display:!1}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{beginAtZero:!1,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",callback:function(Ss){return typeof Ss=="number"?Ss.toFixed(3):Ss},stepSize:.002},min:0,max:.012}}}});Tn.value=Uu(vo),vr.value.packetRate=!1,setTimeout(()=>{vr.value.packetRate&&(vr.value.packetRate=!1)},50)}catch(ka){console.error("Error creating packet rate chart:",ka),Ir.value=!0,vr.value.packetRate=!1}},Mo=()=>{if(!jn.value){vr.value.packetType=!1;return}const To=jn.value.getContext("2d");if(!To){vr.value.packetType=!1;return}const eo=[],ya=[],ka=["#60A5FA","#34D399","#FBBF24","#A78BFA","#F87171","#06B6D4","#84CC16","#F472B6","#10B981"];if($t.value.length>0)$t.value.forEach(mo=>{const vo=mo.data?mo.data.reduce((Ss,Yo)=>Ss+Yo[1],0):0;vo>0&&(eo.push(mo.name.replace(/\([^)]*\)/g,"").trim()),ya.push(vo))});else{Pr.value=!0,vr.value.packetType=!1;return}Pr.value=!1,Ft.value&&(Ft.value.destroy(),Ft.value=null);try{const mo=JSON.parse(JSON.stringify(eo)),vo=JSON.parse(JSON.stringify(ya)),Ss=new x2(To,{type:"bar",data:{labels:mo,datasets:[{data:vo,backgroundColor:ka.slice(0,vo.length),borderRadius:8,borderSkipped:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{color:"rgba(255, 255, 255, 0.7)",font:{size:10}}},y:{beginAtZero:!0,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)"}}}}});Ft.value=Uu(Ss),vr.value.packetType=!1,setTimeout(()=>{vr.value.packetType&&(vr.value.packetType=!1)},50)}catch(mo){console.error("Error creating packet type chart:",mo),Pr.value=!0,vr.value.packetType=!1}},co=()=>{if(!ai.value)return;const To=ai.value.getContext("2d");if(!To)return;const eo=pe.value.map(mo=>({x:mo.timestamp,y:mo.noiseFloor})).filter(mo=>mo.y!==null&&mo.y!==void 0);if(wn.value)try{const mo=Uu(wn.value),vo=JSON.parse(JSON.stringify(eo));mo.data.datasets[0]&&(mo.data.datasets[0].data=vo),mo.update("active");return}catch{wn.value.destroy(),wn.value=null}const ya=JSON.parse(JSON.stringify(eo)),ka=new x2(To,{type:"line",data:{datasets:[{label:"Noise Floor (dBm)",data:ya,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,tension:.3,pointRadius:0,pointHoverRadius:3,fill:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"top",labels:{color:"rgba(255, 255, 255, 0.8)",usePointStyle:!0,padding:20}}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{type:"linear",display:!0,title:{display:!0,text:"Noise Floor (dBm)",color:"rgba(255, 255, 255, 0.8)"},grid:{color:"rgba(245, 158, 11, 0.2)"},ticks:{color:"#F59E0B",stepSize:.5,callback:function(mo){return typeof mo=="number"?mo.toFixed(1):mo}},min:-117,max:-113}}}});wn.value=Uu(ka)},Go=()=>{if(!Qi.value){vr.value.routePie=!1;return}if(!ee.value||!ee.value.route_totals){Wr.value=!0,vr.value.routePie=!1;return}Wr.value=!1;const To=ee.value.route_totals,eo=Object.keys(To),ya=Object.values(To),ka=["#3B82F6","#F87171","#10B981","#F59E0B","#A78BFA"];try{const mo=JSON.parse(JSON.stringify(eo)),vo=JSON.parse(JSON.stringify(ya)),Ss=[{type:"pie",labels:mo,values:vo,marker:{colors:ka.slice(0,vo.length)},hovertemplate:"%{label}
Count: %{value}
Percentage: %{percent}",textinfo:"label+percent",textposition:"auto",pull:.1,hole:.3}],Yo={title:{text:"",font:{color:"rgba(255, 255, 255, 0.8)"}},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",font:{color:"rgba(255, 255, 255, 0.8)",size:11},margin:{t:20,b:20,l:20,r:20},showlegend:!0,legend:{orientation:"h",x:0,y:-.2,font:{color:"rgba(255, 255, 255, 0.8)",size:10}}},vi={responsive:!0,displayModeBar:!1,staticPlot:!1};l1.newPlot(Qi.value,Ss,Yo,vi),vr.value.routePie=!1,setTimeout(()=>{vr.value.routePie&&(vr.value.routePie=!1)},50)}catch(mo){console.error("Error creating 3D route pie chart:",mo),Wr.value=!0,vr.value.routePie=!1}};return i0(async()=>{await C0(),Fa(),z.value=window.setInterval(Fa,3e4),window.addEventListener("resize",()=>{setTimeout(()=>{Uu(Tn.value)?.resize(),Uu(Ft.value)?.resize(),Uu(wn.value)?.resize(),Qi.value&&l1.Plots&&l1.Plots.resize(Qi.value)},100)})}),mg(()=>{z.value&&clearInterval(z.value),Tn.value?.destroy(),Ft.value?.destroy(),wn.value?.destroy(),Qi.value&&l1.purge(Qi.value),window.removeEventListener("resize",()=>{})}),(To,eo)=>(Si(),Fi("div",Ydt,[Oe("div",Kdt,[eo[2]||(eo[2]=Oe("h2",{class:"text-2xl font-bold text-white"},"Statistics",-1)),Oe("div",Xdt,[eo[1]||(eo[1]=Oe("label",{class:"text-white/70 text-sm"},"Time Range:",-1)),Xp(Oe("select",{"onUpdate:modelValue":eo[0]||(eo[0]=ya=>J.value=ya),onChange:qi,class:"bg-white/10 border border-white/20 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-accent-purple/50 transition-colors"},[(Si(),Fi(Ou,null,sf(mt,ya=>Oe("option",{key:ya.value,value:ya.value,class:"bg-gray-800 text-white"},na(ya.label),9,Jdt)),64))],544),[[iA,J.value]])])]),Oe("div",Qdt,[uu(a_,{title:"Total RX",value:Gi.value.totalRx,color:"#AAE8E8",data:En.value.totalPackets},null,8,["value","data"]),uu(a_,{title:"Total TX",value:Gi.value.totalTx,color:"#FFC246",data:En.value.transmittedPackets},null,8,["value","data"])]),Oe("div",tpt,[eo[9]||(eo[9]=Oe("h3",{class:"text-white text-xl font-semibold mb-4"},"Performance Metrics",-1)),Oe("div",ept,[eo[5]||(eo[5]=Af('

Packet Rate (RX/TX PER HOUR)

RX/hr
TX/hr
',2)),Oe("div",rpt,[Oe("canvas",{ref_key:"packetRateCanvasRef",ref:ei,class:"w-full h-full relative z-10"},null,512),vr.value.packetRate?(Si(),Fi("div",npt,eo[3]||(eo[3]=[Oe("div",{class:"text-center"},[Oe("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-purple-400 rounded-full mx-auto mb-2"}),Oe("div",{class:"text-white/50 text-xs"},"Loading packet rate data...")],-1)]))):ps("",!0),Ir.value&&!vr.value.packetRate?(Si(),Fi("div",ipt,eo[4]||(eo[4]=[Oe("div",{class:"text-center"},[Oe("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Oe("div",{class:"text-white/50 text-xs"},"Packet rate data not found")],-1)]))):ps("",!0)])]),Oe("div",apt,[eo[8]||(eo[8]=Oe("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Packet Type Distribution",-1)),Oe("div",opt,[Oe("canvas",{ref_key:"packetTypeCanvasRef",ref:jn,class:"w-full h-full relative z-10"},null,512),vr.value.packetType?(Si(),Fi("div",spt,eo[6]||(eo[6]=[Oe("div",{class:"text-center"},[Oe("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-blue-400 rounded-full mx-auto mb-2"}),Oe("div",{class:"text-white/50 text-xs"},"Loading packet type data...")],-1)]))):ps("",!0),Pr.value&&!vr.value.packetType?(Si(),Fi("div",lpt,eo[7]||(eo[7]=[Oe("div",{class:"text-center"},[Oe("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Oe("div",{class:"text-white/50 text-xs"},"Packet type data not found")],-1)]))):ps("",!0)])])]),Oe("div",upt,[eo[13]||(eo[13]=Oe("h3",{class:"text-white text-xl font-semibold mb-4"},"Noise Floor Over Time",-1)),Oe("div",cpt,[Oe("div",hpt,[Oe("div",fpt,[Oe("canvas",{ref_key:"signalMetricsCanvasRef",ref:ai,class:"w-full h-full"},null,512)])]),Oe("div",dpt,[eo[12]||(eo[12]=Oe("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Route Distribution",-1)),Oe("div",ppt,[Oe("div",{ref_key:"signalPie3DRef",ref:Qi,class:"w-full h-full relative z-10"},null,512),vr.value.routePie?(Si(),Fi("div",mpt,eo[10]||(eo[10]=[Oe("div",{class:"text-center"},[Oe("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-green-400 rounded-full mx-auto mb-2"}),Oe("div",{class:"text-white/50 text-xs"},"Loading route data...")],-1)]))):ps("",!0),Wr.value&&!vr.value.routePie?(Si(),Fi("div",gpt,eo[11]||(eo[11]=[Oe("div",{class:"text-center"},[Oe("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Oe("div",{class:"text-white/50 text-xs"},"Route statistics not found")],-1)]))):ps("",!0)])])])]),Be.value?(Si(),Fi("div",vpt,eo[14]||(eo[14]=[Oe("div",{class:"text-white/70 mb-2"},"Loading statistics...",-1),Oe("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-white/70 rounded-full mx-auto"},null,-1)]))):ps("",!0),ir.value?(Si(),Fi("div",ypt,[eo[15]||(eo[15]=Oe("div",{class:"text-red-400 mb-2"},"Failed to load statistics",-1)),Oe("p",xpt,na(ir.value),1),Oe("button",{onClick:Fa,class:"mt-4 px-4 py-2 bg-accent-purple/20 hover:bg-accent-purple/30 text-white rounded-lg border border-accent-purple/50 transition-colors"}," Retry ")])):ps("",!0)]))}}),bpt=hd(_pt,[["__scopeId","data-v-9766a4d1"]]),wpt={class:"space-y-4"},kpt={class:"bg-white/5 rounded-lg p-4 space-y-3"},Tpt={class:"flex justify-between items-center py-2 border-b border-white/10"},Apt={class:"text-white font-mono"},Mpt={class:"flex justify-between items-center py-2 border-b border-white/10"},Spt={class:"text-white font-mono"},Ept={class:"flex justify-between items-center py-2 border-b border-white/10"},Cpt={class:"text-white font-mono"},Lpt={class:"flex justify-between items-center py-2 border-b border-white/10"},Ppt={class:"text-white font-mono"},zpt={class:"flex justify-between items-center py-2 border-b border-white/10"},Ipt={class:"text-white font-mono"},Opt={class:"flex justify-between items-center py-2"},Dpt={class:"text-white font-mono"},Fpt=ah({__name:"RadioSettings",setup(d){const l=gg(),z=Ko(()=>l.stats?.config?.radio||{}),j=Ko(()=>{const ee=z.value.frequency;return ee?(ee/1e6).toFixed(3)+" MHz":"Not set"}),J=Ko(()=>{const ee=z.value.bandwidth;return ee?(ee/1e3).toFixed(1)+" kHz":"Not set"}),mt=Ko(()=>{const ee=z.value.tx_power;return ee!==void 0?ee+" dBm":"Not set"}),kt=Ko(()=>{const ee=z.value.coding_rate;return ee?"4/"+ee:"Not set"}),Dt=Ko(()=>{const ee=z.value.preamble_length;return ee?ee+" symbols":"Not set"}),$t=Ko(()=>z.value.spreading_factor??"Not set");return(ee,pe)=>(Si(),Fi("div",wpt,[Oe("div",kpt,[Oe("div",Tpt,[pe[0]||(pe[0]=Oe("span",{class:"text-white/70 text-sm"},"Frequency",-1)),Oe("span",Apt,na(j.value),1)]),Oe("div",Mpt,[pe[1]||(pe[1]=Oe("span",{class:"text-white/70 text-sm"},"Spreading Factor",-1)),Oe("span",Spt,na($t.value),1)]),Oe("div",Ept,[pe[2]||(pe[2]=Oe("span",{class:"text-white/70 text-sm"},"Bandwidth",-1)),Oe("span",Cpt,na(J.value),1)]),Oe("div",Lpt,[pe[3]||(pe[3]=Oe("span",{class:"text-white/70 text-sm"},"TX Power",-1)),Oe("span",Ppt,na(mt.value),1)]),Oe("div",zpt,[pe[4]||(pe[4]=Oe("span",{class:"text-white/70 text-sm"},"Coding Rate",-1)),Oe("span",Ipt,na(kt.value),1)]),Oe("div",Opt,[pe[5]||(pe[5]=Oe("span",{class:"text-white/70 text-sm"},"Preamble Length",-1)),Oe("span",Dpt,na(Dt.value),1)])])]))}}),Rpt={class:"space-y-4"},Bpt={class:"bg-white/5 rounded-lg p-4 space-y-3"},Npt={class:"flex justify-between items-center py-2 border-b border-white/10"},jpt={class:"text-white font-mono"},Upt={class:"flex justify-between items-center py-2 border-b border-white/10"},Vpt={class:"text-white font-mono text-xs"},Hpt={class:"flex justify-between items-start py-2 border-b border-white/10"},Wpt={class:"text-white font-mono text-xs text-right break-all max-w-xs"},qpt={class:"flex justify-between items-center py-2 border-b border-white/10"},Zpt={class:"text-white font-mono"},$pt={class:"flex justify-between items-center py-2 border-b border-white/10"},Gpt={class:"text-white font-mono"},Ypt={class:"flex justify-between items-center py-2 border-b border-white/10"},Kpt={class:"text-white font-mono"},Xpt={class:"flex justify-between items-start py-2"},Jpt={class:"text-white font-mono ml-4"},Qpt=ah({__name:"RepeaterSettings",setup(d){const l=gg(),z=Ko(()=>l.stats?.config||{}),j=Ko(()=>z.value.repeater||{}),J=Ko(()=>l.stats),mt=Ko(()=>z.value.node_name||"Not set"),kt=Ko(()=>J.value?.local_hash||"Not available"),Dt=Ko(()=>{const ir=J.value?.public_key;return!ir||ir==="Not set"?"Not set":ir}),$t=Ko(()=>{const ir=j.value.latitude;return ir&&ir!==0?ir.toFixed(6):"Not set"}),ee=Ko(()=>{const ir=j.value.longitude;return ir&&ir!==0?ir.toFixed(6):"Not set"}),pe=Ko(()=>{const ir=j.value.mode;return ir?ir.charAt(0).toUpperCase()+ir.slice(1):"Not set"}),Be=Ko(()=>{const ir=j.value.send_advert_interval_hours;return ir===void 0?"Not set":ir===0?"Disabled":ir+" hour"+(ir!==1?"s":"")});return(ir,vr)=>(Si(),Fi("div",Rpt,[Oe("div",Bpt,[Oe("div",Npt,[vr[0]||(vr[0]=Oe("span",{class:"text-white/70 text-sm"},"Node Name",-1)),Oe("span",jpt,na(mt.value),1)]),Oe("div",Upt,[vr[1]||(vr[1]=Oe("span",{class:"text-white/70 text-sm"},"Local Hash",-1)),Oe("span",Vpt,na(kt.value),1)]),Oe("div",Hpt,[vr[2]||(vr[2]=Oe("span",{class:"text-white/70 text-sm"},"Public Key",-1)),Oe("span",Wpt,na(Dt.value),1)]),Oe("div",qpt,[vr[3]||(vr[3]=Oe("span",{class:"text-white/70 text-sm"},"Latitude",-1)),Oe("span",Zpt,na($t.value),1)]),Oe("div",$pt,[vr[4]||(vr[4]=Oe("span",{class:"text-white/70 text-sm"},"Longitude",-1)),Oe("span",Gpt,na(ee.value),1)]),Oe("div",Ypt,[vr[5]||(vr[5]=Oe("span",{class:"text-white/70 text-sm"},"Mode",-1)),Oe("span",Kpt,na(pe.value),1)]),Oe("div",Xpt,[vr[6]||(vr[6]=Oe("div",{class:"flex flex-col"},[Oe("span",{class:"text-white/70 text-sm"},"Periodic Advertisement Interval"),Oe("span",{class:"text-white/50 text-xs mt-1"},"How often the repeater sends an advertisement packet (0 = disabled)")],-1)),Oe("span",Jpt,na(Be.value),1)])])]))}}),t0t={class:"space-y-4"},e0t={class:"bg-white/5 rounded-lg p-4 space-y-3"},r0t={class:"flex justify-between items-center py-2 border-b border-white/10"},n0t={class:"text-white font-mono"},i0t={class:"flex justify-between items-center py-2"},a0t={class:"text-white font-mono"},o0t=ah({__name:"DutyCycle",setup(d){const l=gg(),z=Ko(()=>l.stats?.config?.duty_cycle||{}),j=Ko(()=>{const mt=z.value.max_airtime_percent;return typeof mt=="number"?mt.toFixed(1)+"%":mt&&typeof mt=="object"&&"parsedValue"in mt?(mt.parsedValue||0).toFixed(1)+"%":"Not set"}),J=Ko(()=>z.value.enforcement_enabled?"Enabled":"Disabled");return(mt,kt)=>(Si(),Fi("div",t0t,[Oe("div",e0t,[Oe("div",r0t,[kt[0]||(kt[0]=Oe("span",{class:"text-white/70 text-sm"},"Max Airtime %",-1)),Oe("span",n0t,na(j.value),1)]),Oe("div",i0t,[kt[1]||(kt[1]=Oe("span",{class:"text-white/70 text-sm"},"Enforcement",-1)),Oe("span",a0t,na(J.value),1)])])]))}}),s0t={class:"space-y-4"},l0t={class:"bg-white/5 rounded-lg p-4 space-y-3"},u0t={class:"flex justify-between items-start py-2 border-b border-white/10"},c0t={class:"text-white font-mono ml-4"},h0t={class:"flex justify-between items-start py-2"},f0t={class:"text-white font-mono ml-4"},d0t=ah({__name:"TransmissionDelays",setup(d){const l=gg(),z=Ko(()=>l.stats?.config?.delays||{}),j=Ko(()=>{const mt=z.value.tx_delay_factor;if(mt&&typeof mt=="object"&&mt!==null&&"parsedValue"in mt){const kt=mt.parsedValue;if(typeof kt=="number")return kt.toFixed(2)+"x"}return"Not set"}),J=Ko(()=>{const mt=z.value.direct_tx_delay_factor;return typeof mt=="number"?mt.toFixed(2)+"s":"Not set"});return(mt,kt)=>(Si(),Fi("div",s0t,[Oe("div",l0t,[Oe("div",u0t,[kt[0]||(kt[0]=Oe("div",{class:"flex flex-col"},[Oe("span",{class:"text-white/70 text-sm"},"Flood TX Delay Factor"),Oe("span",{class:"text-white/50 text-xs mt-1"},"Multiplier for flood packet transmission delays (collision avoidance)")],-1)),Oe("span",c0t,na(j.value),1)]),Oe("div",h0t,[kt[1]||(kt[1]=Oe("div",{class:"flex flex-col"},[Oe("span",{class:"text-white/70 text-sm"},"Direct TX Delay Factor"),Oe("span",{class:"text-white/50 text-xs mt-1"},"Base delay for direct-routed packet transmission (seconds)")],-1)),Oe("span",f0t,na(J.value),1)])])]))}}),WD=YA("treeState",()=>{const d=Ay(new Set),l=Ay({value:null}),z=Dt=>{d.add(Dt)},j=Dt=>{d.delete(Dt)};return{expandedNodes:d,selectedNodeId:l,addExpandedNode:z,removeExpandedNode:j,isNodeExpanded:Dt=>d.has(Dt),setSelectedNode:Dt=>{l.value=Dt},toggleExpanded:Dt=>{d.has(Dt)?j(Dt):z(Dt)}}}),p0t={class:"select-none"},m0t={class:"flex-shrink-0"},g0t={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},v0t={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},y0t={key:0,class:"flex items-center gap-1 ml-2"},x0t={class:"relative group"},_0t=["title"],b0t={key:0,class:"text-xs font-mono text-white/50 bg-white/5 px-1.5 py-0.5 rounded border border-white/10"},w0t={class:"flex justify-between items-start mb-4"},k0t={class:"bg-black/20 border border-white/10 rounded-md p-4 mb-4"},T0t={class:"text-sm font-mono text-white/80 break-all leading-relaxed"},A0t={class:"flex items-center gap-2 ml-auto"},M0t={key:0,class:"flex items-center gap-1"},S0t=["title"],E0t={key:1,class:"flex items-center gap-1"},C0t={key:2,class:"px-2 py-1 bg-white/10 text-white/60 text-xs rounded-full ml-1"},L0t={key:0,class:"space-y-1"},P0t=ah({__name:"TreeNode",props:{node:{},selectedNodeId:{},level:{},disabled:{type:Boolean}},emits:["select"],setup(d,{emit:l}){const z=d,j=l,J=WD(),mt=ro(!1),kt=Ko({get:()=>J.isNodeExpanded(z.node.id),set:Pr=>{Pr?J.addExpandedNode(z.node.id):J.removeExpandedNode(z.node.id)}}),Dt=Ko(()=>z.node.children.length>0);function $t(Pr){if(!Pr)return"Never";const Tn=new Date().getTime()-Pr.getTime(),Ft=Math.floor(Tn/(1e3*60)),wn=Math.floor(Tn/(1e3*60*60)),ei=Math.floor(Tn/(1e3*60*60*24)),jn=Math.floor(ei/365);return Ft<60?`${Ft}m ago`:wn<24?`${wn}h ago`:ei<365?`${ei}d ago`:`${jn}y ago`}function ee(Pr){return Pr?Pr.length<=16?Pr:`${Pr.slice(0,8)}...${Pr.slice(-8)}`:"No key"}function pe(){if(Dt.value){const Pr=!kt.value;kt.value=Pr}}function Be(){j("select",z.node.id)}function ir(Pr){j("select",Pr)}function vr(Pr){Pr.stopPropagation(),mt.value=!mt.value}function Ir(Pr){Pr.stopPropagation(),z.node.transport_key&&window.navigator?.clipboard&&window.navigator.clipboard.writeText(z.node.transport_key)}return(Pr,Wr)=>{const Tn=VA("TreeNode",!0);return Si(),Fi("div",p0t,[Oe("div",{class:Xs(["flex items-center gap-2 py-2 px-3 rounded-lg cursor-pointer transition-all duration-200",z.disabled?"opacity-50 cursor-not-allowed":"hover:bg-white/5",Pr.selectedNodeId===Pr.node.id&&!z.disabled?"bg-primary/20 text-primary":"text-white/80 hover:text-white",`ml-${Pr.level*4}`]),onClick:Wr[3]||(Wr[3]=Ft=>!z.disabled&&Be())},[Oe("div",{class:"flex-shrink-0 w-4 h-4 flex items-center justify-center",onClick:zm(pe,["stop"])},[Dt.value?(Si(),Fi("svg",{key:0,class:Xs(["w-3 h-3 transition-transform duration-200",kt.value?"rotate-90":"rotate-0"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Wr[4]||(Wr[4]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)]),2)):ps("",!0)]),Oe("div",m0t,[z.node.name.startsWith("#")?(Si(),Fi("svg",g0t,Wr[5]||(Wr[5]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(Si(),Fi("svg",v0t,Wr[6]||(Wr[6]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)])))]),Oe("span",{class:Xs(["font-mono text-sm transition-colors duration-200",Pr.selectedNodeId===Pr.node.id?"text-primary font-medium":""])},na(Pr.node.name),3),Pr.node.transport_key?(Si(),Fi("div",y0t,[Oe("div",x0t,[Oe("button",{onClick:vr,class:"p-1 rounded hover:bg-white/10 transition-colors",title:mt.value?"Hide full key":"Show full key"},Wr[7]||(Wr[7]=[Oe("svg",{class:"w-3 h-3 text-white/60 hover:text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)]),8,_0t),mt.value?ps("",!0):(Si(),Fi("span",b0t,na(ee(Pr.node.transport_key)),1)),mt.value?(Si(),Fi("div",{key:1,class:"fixed inset-0 z-[9998] flex items-center justify-center bg-black/70 backdrop-blur-md",onClick:Wr[2]||(Wr[2]=Ft=>mt.value=!1)},[Oe("div",{class:"bg-black/20 border border-white/20 rounded-lg shadow-lg p-6 max-w-2xl w-full mx-4",onClick:Wr[1]||(Wr[1]=zm(()=>{},["stop"]))},[Oe("div",w0t,[Wr[9]||(Wr[9]=Oe("h3",{class:"text-lg font-semibold text-white"},"Transport Key",-1)),Oe("button",{onClick:Wr[0]||(Wr[0]=Ft=>mt.value=!1),class:"text-white/60 hover:text-white transition-colors"},Wr[8]||(Wr[8]=[Oe("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Oe("div",k0t,[Oe("div",T0t,na(Pr.node.transport_key),1)]),Oe("div",{class:"flex justify-end"},[Oe("button",{onClick:Ir,class:"px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green rounded-lg transition-colors flex items-center gap-2",title:"Copy to clipboard"},Wr[10]||(Wr[10]=[Oe("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),nc(" Copy Key ",-1)]))])])])):ps("",!0)])])):ps("",!0),Oe("div",A0t,[Pr.node.last_used?(Si(),Fi("div",M0t,[Wr[11]||(Wr[11]=Oe("svg",{class:"w-3 h-3 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),Oe("span",{class:"text-xs text-white/50",title:Pr.node.last_used.toLocaleString()},na($t(Pr.node.last_used)),9,S0t)])):(Si(),Fi("div",E0t,Wr[12]||(Wr[12]=[Oe("svg",{class:"w-3 h-3 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),Oe("span",{class:"text-xs text-white/30 italic"},"Never",-1)]))),Oe("span",{class:Xs(["px-2 py-0.5 text-xs font-medium rounded-md transition-colors",Pr.node.floodPolicy==="allow"?"bg-accent-green/10 text-accent-green/90 border border-accent-green/20":"bg-accent-red/10 text-accent-red/90 border border-accent-red/20"])},na(Pr.node.floodPolicy==="allow"?"FLOOD ALLOW":"FLOOD DENY"),3),Dt.value?(Si(),Fi("span",C0t,na(Pr.node.children.length),1)):ps("",!0)])],2),uu(LI,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0 overflow-hidden","enter-to-class":"opacity-100 max-h-screen overflow-visible","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 max-h-screen overflow-visible","leave-to-class":"opacity-0 max-h-0 overflow-hidden"},{default:ew(()=>[kt.value&&Pr.node.children.length>0?(Si(),Fi("div",L0t,[(Si(!0),Fi(Ou,null,sf(Pr.node.children,Ft=>(Si(),K0(Tn,{key:Ft.id,node:Ft,"selected-node-id":Pr.selectedNodeId,level:Pr.level+1,disabled:z.disabled,onSelect:ir},null,8,["node","selected-node-id","level","disabled"]))),128))])):ps("",!0)]),_:1})])}}}),z0t=hd(P0t,[["__scopeId","data-v-4afde13e"]]),I0t={class:"flex items-center justify-between mb-6"},O0t={class:"text-white/60 text-sm mt-1"},D0t={key:0},F0t={class:"text-primary font-mono"},R0t={key:1},B0t={for:"keyName",class:"block text-sm font-medium text-white mb-2"},N0t={class:"flex items-center gap-2"},j0t={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},U0t={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},V0t={class:"bg-white/5 border border-white/10 rounded-lg p-4"},H0t={class:"flex items-center gap-3 mb-2"},W0t={class:"flex items-center gap-2"},q0t={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Z0t={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},$0t={class:"text-white/70 text-sm"},G0t={class:"grid grid-cols-2 gap-3"},Y0t={class:"relative cursor-pointer group"},K0t={class:"relative cursor-pointer group"},X0t={class:"flex gap-3 pt-4"},J0t=["disabled"],Q0t=ah({__name:"AddKeyModal",props:{show:{type:Boolean},selectedNodeName:{},selectedNodeId:{}},emits:["close","add"],setup(d,{emit:l}){const z=d,j=l,J=ro(""),mt=ro(""),kt=ro("allow"),Dt=Ko(()=>J.value.startsWith("#")),$t=Ko(()=>({type:Dt.value?"Region":"Private Key",description:Dt.value?"Regional organizational key":"Individual assigned key"}));fm(Dt,vr=>{vr?mt.value="This will create a new region for organizing keys":mt.value="This will create a new private key entry"},{immediate:!0});const ee=Ko(()=>J.value.trim().length>0),pe=()=>{ee.value&&(j("add",{name:J.value.trim(),floodPolicy:kt.value,parentId:z.selectedNodeId}),J.value="",mt.value="",kt.value="allow")},Be=()=>{J.value="",mt.value="",kt.value="allow",j("close")},ir=vr=>{vr.target===vr.currentTarget&&Be()};return(vr,Ir)=>vr.show?(Si(),Fi("div",{key:0,onClick:ir,class:"fixed inset-0 bg-black/40 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Oe("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Ir[3]||(Ir[3]=zm(()=>{},["stop"]))},[Oe("div",I0t,[Oe("div",null,[Ir[5]||(Ir[5]=Oe("h3",{class:"text-xl font-semibold text-white"},"Add New Entry",-1)),Oe("p",O0t,[z.selectedNodeName?(Si(),Fi("span",D0t,[Ir[4]||(Ir[4]=nc(" Add to: ",-1)),Oe("span",F0t,na(z.selectedNodeName),1)])):(Si(),Fi("span",R0t," Add to root level (#uk) "))])]),Oe("button",{onClick:Be,class:"text-white/60 hover:text-white transition-colors"},Ir[6]||(Ir[6]=[Oe("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Oe("form",{onSubmit:zm(pe,["prevent"]),class:"space-y-4"},[Oe("div",null,[Oe("label",B0t,[Oe("div",N0t,[Dt.value?(Si(),Fi("svg",j0t,Ir[7]||(Ir[7]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(Si(),Fi("svg",U0t,Ir[8]||(Ir[8]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))),Ir[9]||(Ir[9]=nc(" Region/Key Name ",-1))])]),Xp(Oe("input",{id:"keyName","onUpdate:modelValue":Ir[0]||(Ir[0]=Pr=>J.value=Pr),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[GA,J.value]])]),Oe("div",V0t,[Oe("div",H0t,[Oe("div",W0t,[Dt.value?(Si(),Fi("svg",q0t,Ir[10]||(Ir[10]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(Si(),Fi("svg",Z0t,Ir[11]||(Ir[11]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1221 9z"},null,-1)]))),Oe("span",{class:Xs([Dt.value?"text-secondary":"text-accent-green","font-medium"])},na($t.value.type),3)]),Oe("div",{class:Xs(["flex-1 h-px",Dt.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),Oe("p",$0t,na($t.value.description),1)]),Oe("div",null,[Ir[14]||(Ir[14]=Oe("label",{class:"block text-sm font-medium text-white mb-3"},[Oe("div",{class:"flex items-center gap-2"},[Oe("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),nc(" Flood Policy ")])],-1)),Oe("div",G0t,[Oe("label",Y0t,[Xp(Oe("input",{type:"radio","onUpdate:modelValue":Ir[1]||(Ir[1]=Pr=>kt.value=Pr),value:"allow",class:"sr-only"},null,512),[[V2,kt.value]]),Ir[12]||(Ir[12]=Af('
Allow

Permit flooding

',1))]),Oe("label",K0t,[Xp(Oe("input",{type:"radio","onUpdate:modelValue":Ir[2]||(Ir[2]=Pr=>kt.value=Pr),value:"deny",class:"sr-only"},null,512),[[V2,kt.value]]),Ir[13]||(Ir[13]=Af('
Deny

Block flooding

',1))])])]),Oe("div",X0t,[Oe("button",{type:"button",onClick:Be,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Oe("button",{type:"submit",disabled:!ee.value,class:Xs(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",ee.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Add "+na($t.value.type),11,J0t)])],32)])])):ps("",!0)}}),tmt={class:"flex bg-black items-center justify-between mb-6"},emt={class:"text-white/60 text-sm mt-1"},rmt={class:"text-primary font-mono"},nmt={for:"keyName",class:"block text-sm font-medium text-white mb-2"},imt={class:"flex items-center gap-2"},amt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},omt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},smt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},lmt={class:"flex items-center gap-3 mb-2"},umt={class:"flex items-center gap-2"},cmt={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},hmt={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},fmt={class:"text-white/70 text-sm"},dmt={key:0,class:"space-y-4"},pmt={key:0,class:"bg-white/5 border border-white/10 rounded-lg p-4"},mmt={class:"bg-black/20 border border-white/10 rounded-md p-3"},gmt={class:"text-xs font-mono text-white/80 break-all"},vmt={key:1,class:"bg-white/5 border border-white/10 rounded-lg p-4"},ymt={class:"flex items-center justify-between"},xmt={class:"text-sm text-white/70"},_mt={class:"text-xs text-white/50"},bmt={class:"grid grid-cols-2 gap-3"},wmt={class:"relative cursor-pointer group"},kmt={class:"relative cursor-pointer group"},Tmt={class:"flex gap-3 pt-4"},Amt=["disabled"],Mmt=ah({__name:"EditKeyModal",props:{show:{type:Boolean},node:{}},emits:["close","save","request-delete"],setup(d,{emit:l}){const z=d,j=l,J=ro(""),mt=ro("allow"),kt=Ko(()=>J.value.startsWith("#")),Dt=Ko(()=>({type:kt.value?"Region":"Private Key",description:kt.value?"Regional organizational key":"Individual assigned key"}));fm(()=>z.node,Pr=>{Pr?(J.value=Pr.name,mt.value=Pr.floodPolicy):(J.value="",mt.value="allow")},{immediate:!0});const $t=Ko(()=>J.value.trim().length>0&&z.node),ee=Pr=>{const Tn=new Date().getTime()-Pr.getTime(),Ft=Math.floor(Tn/(1e3*60)),wn=Math.floor(Tn/(1e3*60*60)),ei=Math.floor(Tn/(1e3*60*60*24)),jn=Math.floor(ei/365);return Ft<60?`${Ft}m ago`:wn<24?`${wn}h ago`:ei<365?`${ei}d ago`:`${jn}y ago`},pe=Pr=>{window.navigator?.clipboard&&window.navigator.clipboard.writeText(Pr)},Be=()=>{!$t.value||!z.node||(j("save",{id:z.node.id,name:J.value.trim(),floodPolicy:mt.value}),vr())},ir=()=>{z.node&&(j("request-delete",z.node),vr())},vr=()=>{j("close")},Ir=Pr=>{Pr.target===Pr.currentTarget&&vr()};return(Pr,Wr)=>Pr.show?(Si(),Fi("div",{key:0,onClick:Ir,class:"fixed inset-0 bg-black/50 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Oe("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Wr[4]||(Wr[4]=zm(()=>{},["stop"]))},[Oe("div",tmt,[Oe("div",null,[Wr[6]||(Wr[6]=Oe("h3",{class:"text-xl font-semibold text-white"},"Edit Entry",-1)),Oe("p",emt,[Wr[5]||(Wr[5]=nc(" Modify ",-1)),Oe("span",rmt,na(Pr.node?.name),1)])]),Oe("button",{onClick:vr,class:"text-white/60 hover:text-white transition-colors"},Wr[7]||(Wr[7]=[Oe("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Oe("form",{onSubmit:zm(Be,["prevent"]),class:"space-y-4"},[Oe("div",null,[Oe("label",nmt,[Oe("div",imt,[kt.value?(Si(),Fi("svg",amt,Wr[8]||(Wr[8]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(Si(),Fi("svg",omt,Wr[9]||(Wr[9]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Wr[10]||(Wr[10]=nc(" Region/Key Name ",-1))])]),Xp(Oe("input",{id:"keyName","onUpdate:modelValue":Wr[0]||(Wr[0]=Tn=>J.value=Tn),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[GA,J.value]])]),Oe("div",smt,[Oe("div",lmt,[Oe("div",umt,[kt.value?(Si(),Fi("svg",cmt,Wr[11]||(Wr[11]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(Si(),Fi("svg",hmt,Wr[12]||(Wr[12]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Oe("span",{class:Xs([kt.value?"text-secondary":"text-accent-green","font-medium"])},na(Dt.value.type),3)]),Oe("div",{class:Xs(["flex-1 h-px",kt.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),Oe("p",fmt,na(Dt.value.description),1)]),Pr.node?(Si(),Fi("div",dmt,[Pr.node.transport_key?(Si(),Fi("div",pmt,[Wr[14]||(Wr[14]=Af('
Transport Key
',1)),Oe("div",mmt,[Oe("div",gmt,na(Pr.node.transport_key),1),Oe("button",{onClick:Wr[1]||(Wr[1]=Tn=>pe(Pr.node.transport_key||"")),class:"mt-2 text-xs text-accent-green hover:text-accent-green/80 flex items-center gap-1",title:"Copy to clipboard"},Wr[13]||(Wr[13]=[Oe("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),nc(" Copy Key ",-1)]))])])):ps("",!0),Pr.node.last_used?(Si(),Fi("div",vmt,[Wr[15]||(Wr[15]=Oe("div",{class:"flex items-center gap-2 mb-3"},[Oe("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})]),Oe("span",{class:"text-sm font-medium text-white"},"Last Used")],-1)),Oe("div",ymt,[Oe("div",xmt,na(Pr.node.last_used.toLocaleDateString())+" at "+na(Pr.node.last_used.toLocaleTimeString()),1),Oe("div",_mt,na(ee(Pr.node.last_used)),1)])])):ps("",!0)])):ps("",!0),Oe("div",null,[Wr[18]||(Wr[18]=Oe("label",{class:"block text-sm font-medium text-white mb-3"},[Oe("div",{class:"flex items-center gap-2"},[Oe("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),nc(" Flood Policy ")])],-1)),Oe("div",bmt,[Oe("label",wmt,[Xp(Oe("input",{type:"radio","onUpdate:modelValue":Wr[2]||(Wr[2]=Tn=>mt.value=Tn),value:"allow",class:"sr-only"},null,512),[[V2,mt.value]]),Wr[16]||(Wr[16]=Af('
Allow

Permit flooding

',1))]),Oe("label",kmt,[Xp(Oe("input",{type:"radio","onUpdate:modelValue":Wr[3]||(Wr[3]=Tn=>mt.value=Tn),value:"deny",class:"sr-only"},null,512),[[V2,mt.value]]),Wr[17]||(Wr[17]=Af('
Deny

Block flooding

',1))])])]),Oe("div",Tmt,[Oe("button",{type:"button",onClick:ir,class:"px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors"}," Delete "),Oe("button",{type:"button",onClick:vr,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Oe("button",{type:"submit",disabled:!$t.value,class:Xs(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",$t.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Save Changes ",10,Amt)])],32)])])):ps("",!0)}}),Smt={class:"flex items-center gap-3 mb-6"},Emt={class:"text-white/60 text-sm mt-1"},Cmt={class:"text-accent-red font-mono"},Lmt={key:0,class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},Pmt={class:"flex items-start gap-3"},zmt={class:"flex-1"},Imt={class:"text-accent-red font-medium text-sm mb-2"},Omt={class:"space-y-1 max-h-32 overflow-y-auto"},Dmt={key:0,class:"w-3 h-3 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Fmt={key:1,class:"w-3 h-3 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Rmt={class:"font-mono"},Bmt={key:0,class:"text-white/60 text-xs"},Nmt={key:1,class:"mb-6"},jmt={class:"mb-3"},Umt={class:"relative"},Vmt={class:"space-y-2 max-h-40 overflow-y-auto border border-white/20 rounded-lg p-3 bg-white/5"},Hmt={key:0,class:"text-center py-4 text-white/60 text-sm"},Wmt={class:"relative"},qmt=["value"],Zmt={class:"flex items-center gap-2 flex-1"},$mt={class:"text-white font-mono text-sm"},Gmt={key:0,class:"ml-auto px-2 py-0.5 bg-white/10 text-white/60 text-xs rounded-full"},Ymt={class:"flex gap-3"},Kmt=ah({__name:"DeleteConfirmModal",props:{show:{type:Boolean},node:{},allNodes:{}},emits:["close","delete-all","move-children"],setup(d,{emit:l}){const z=d,j=l,J=ro(null),mt=ro(""),kt=Ir=>{const Pr=[],Wr=Tn=>{for(const Ft of Tn.children)Pr.push(Ft),Wr(Ft)};return Wr(Ir),Pr},Dt=Ko(()=>z.node?kt(z.node):[]),$t=Ko(()=>{if(!z.node)return[];const Ir=new Set([z.node.id,...Dt.value.map(Wr=>Wr.id)]),Pr=Wr=>{const Tn=[];for(const Ft of Wr)Ft.name.startsWith("#")&&!Ir.has(Ft.id)&&Tn.push(Ft),Ft.children.length>0&&Tn.push(...Pr(Ft.children));return Tn};return Pr(z.allNodes)}),ee=Ko(()=>{if(!mt.value.trim())return $t.value;const Ir=mt.value.toLowerCase();return $t.value.filter(Pr=>Pr.name.toLowerCase().includes(Ir))}),pe=()=>{z.node&&(j("delete-all",z.node.id),ir())},Be=()=>{!z.node||!J.value||(j("move-children",{nodeId:z.node.id,targetParentId:J.value}),ir())},ir=()=>{J.value=null,mt.value="",j("close")},vr=Ir=>{Ir.target===Ir.currentTarget&&ir()};return(Ir,Pr)=>Ir.show&&Ir.node?(Si(),Fi("div",{key:0,onClick:vr,class:"fixed inset-0 bg-black/80 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Oe("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-lg border border-white/10",onClick:Pr[2]||(Pr[2]=zm(()=>{},["stop"]))},[Oe("div",Smt,[Pr[6]||(Pr[6]=Oe("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),Oe("div",null,[Pr[4]||(Pr[4]=Oe("h3",{class:"text-xl font-semibold text-white"},"Confirm Deletion",-1)),Oe("p",Emt,[Pr[3]||(Pr[3]=nc(" Deleting ",-1)),Oe("span",Cmt,na(Ir.node?.name),1)])]),Oe("button",{onClick:ir,class:"ml-auto text-white/60 hover:text-white transition-colors"},Pr[5]||(Pr[5]=[Oe("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Dt.value.length>0?(Si(),Fi("div",Lmt,[Oe("div",Pmt,[Pr[9]||(Pr[9]=Oe("svg",{class:"w-5 h-5 text-accent-red flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),Oe("div",zmt,[Oe("h4",Imt," This will affect "+na(Dt.value.length)+" child "+na(Dt.value.length===1?"entry":"entries")+": ",1),Oe("div",Omt,[(Si(!0),Fi(Ou,null,sf(Dt.value.slice(0,10),Wr=>(Si(),Fi("div",{key:Wr.id,class:"flex items-center gap-2 text-xs text-white/80"},[Wr.name.startsWith("#")?(Si(),Fi("svg",Dmt,Pr[7]||(Pr[7]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(Si(),Fi("svg",Fmt,Pr[8]||(Pr[8]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Oe("span",Rmt,na(Wr.name),1),Oe("span",{class:Xs(["px-1 py-0.5 text-xs rounded",Wr.floodPolicy==="allow"?"bg-accent-green/20 text-accent-green":"bg-accent-red/20 text-accent-red"])},na(Wr.floodPolicy),3)]))),128)),Dt.value.length>10?(Si(),Fi("div",Bmt," ...and "+na(Dt.value.length-10)+" more ",1)):ps("",!0)])])])])):ps("",!0),Dt.value.length>0&&$t.value.length>0?(Si(),Fi("div",Nmt,[Pr[13]||(Pr[13]=Oe("h4",{class:"text-white font-medium text-sm mb-3"},"Move children to another region:",-1)),Oe("div",jmt,[Oe("div",Umt,[Pr[10]||(Pr[10]=Oe("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Xp(Oe("input",{"onUpdate:modelValue":Pr[0]||(Pr[0]=Wr=>mt.value=Wr),type:"text",placeholder:"Search regions...",class:"w-full pl-9 pr-4 py-2 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors text-sm"},null,512),[[GA,mt.value]])])]),Oe("div",Vmt,[ee.value.length===0?(Si(),Fi("div",Hmt,na(mt.value?"No regions match your search":"No available regions"),1)):ps("",!0),(Si(!0),Fi(Ou,null,sf(ee.value,Wr=>(Si(),Fi("label",{key:Wr.id,class:"flex items-center gap-3 p-2 rounded cursor-pointer hover:bg-white/10 transition-colors group"},[Oe("div",Wmt,[Xp(Oe("input",{type:"radio",value:Wr.id,"onUpdate:modelValue":Pr[1]||(Pr[1]=Tn=>J.value=Tn),class:"sr-only peer"},null,8,qmt),[[V2,J.value]]),Pr[11]||(Pr[11]=Oe("div",{class:"w-4 h-4 border-2 border-white/30 rounded-full group-hover:border-white/50 peer-checked:border-primary peer-checked:bg-primary/20 transition-all"},[Oe("div",{class:"w-2 h-2 rounded-full bg-primary scale-0 peer-checked:scale-100 transition-transform absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"})],-1))]),Oe("div",Zmt,[Pr[12]||(Pr[12]=Oe("svg",{class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})],-1)),Oe("span",$mt,na(Wr.name),1),Wr.children.length>0?(Si(),Fi("span",Gmt,na(Wr.children.length),1)):ps("",!0)])]))),128))])])):ps("",!0),Oe("div",Ymt,[Oe("button",{onClick:ir,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Dt.value.length>0&&J.value?(Si(),Fi("button",{key:0,onClick:Be,class:"flex-1 px-4 py-3 bg-primary/20 hover:bg-primary/30 border border-primary/50 text-primary rounded-lg transition-colors"}," Move & Delete ")):ps("",!0),Oe("button",{onClick:pe,class:"flex-1 px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors font-medium"},na(Dt.value.length>0?"Delete All":"Delete"),1)])])])):ps("",!0)}}),Xmt={class:"space-y-6"},Jmt={class:"flex justify-between items-start"},Qmt={class:"flex gap-2"},tgt=["disabled"],egt=["disabled"],rgt=["disabled"],ngt={class:"glass-card rounded-[15px] p-4 border border-white/10 bg-white/5"},igt={class:"flex items-center justify-between"},agt={class:"flex items-center gap-3"},ogt={class:"flex bg-white/5 rounded-lg border border-white/20 p-1"},sgt={class:"glass-card rounded-[15px] p-6 border border-white/10"},lgt={key:0,class:"flex items-center justify-center py-8"},ugt={key:1,class:"text-center py-8"},cgt={class:"text-white/70 text-sm"},hgt={key:2,class:"text-center py-8"},fgt={key:3,class:"space-y-2"},dgt=ah({name:"TransportKeys",__name:"TransportKeys",setup(d){const l=WD(),z=ro(!1),j=ro(!1),J=ro(!1),mt=ro(null),kt=ro(null),Dt=ro("deny"),$t=ro([]),ee=ro(!1),pe=ro(null),Be=Ni=>{const zi=new Map,ia=[];return Ni.forEach(Ua=>{const qi={id:Ua.id,name:Ua.name,floodPolicy:Ua.flood_policy,transport_key:Ua.transport_key,last_used:Ua.last_used?new Date(Ua.last_used*1e3):void 0,parent_id:Ua.parent_id,children:[]};zi.set(Ua.id,qi)}),zi.forEach(Ua=>{Ua.parent_id&&zi.has(Ua.parent_id)?zi.get(Ua.parent_id).children.push(Ua):ia.push(Ua)}),ia},ir=async()=>{try{ee.value=!0,pe.value=null;const Ni=await Ah.getTransportKeys();Ni.success&&Ni.data?$t.value=Be(Ni.data):pe.value=Ni.error||"Failed to load transport keys"}catch(Ni){pe.value=Ni instanceof Error?Ni.message:"Unknown error occurred",console.error("Error loading transport keys:",Ni)}finally{ee.value=!1}};i0(()=>{ir()});function vr(Ni,zi){for(const ia of Ni){if(ia.id===zi)return ia;if(ia.children){const Ua=vr(ia.children,zi);if(Ua)return Ua}}return null}function Ir(){const Ni=l.selectedNodeId.value;return Ni?vr($t.value,Ni)?.name:void 0}function Pr(Ni){Dt.value==="deny"&&l.setSelectedNode(Ni)}function Wr(){Dt.value==="deny"&&(z.value=!0)}function Tn(){if(Dt.value==="deny"&&l.selectedNodeId.value){const Ni=vr($t.value,l.selectedNodeId.value);Ni&&(kt.value=Ni,J.value=!0)}}function Ft(){if(Dt.value==="deny"&&l.selectedNodeId.value){const Ni=vr($t.value,l.selectedNodeId.value);Ni&&(mt.value=Ni,j.value=!0)}}const wn=async Ni=>{try{const zi=await Ah.createTransportKey(Ni.name,Ni.floodPolicy,void 0,Ni.parentId,void 0);zi.success?await ir():(console.error("Failed to add transport key:",zi.error),pe.value=zi.error||"Failed to add transport key")}catch(zi){console.error("Error adding transport key:",zi),pe.value=zi instanceof Error?zi.message:"Unknown error occurred"}finally{z.value=!1}};function ei(){z.value=!1}async function jn(Ni){try{const zi=Ni==="allow",ia=await Ah.updateGlobalFloodPolicy(zi);ia.success?Dt.value=Ni:(console.error("Failed to update global flood policy:",ia.error),pe.value=ia.error||"Failed to update global flood policy")}catch(zi){console.error("Error updating global flood policy:",zi),pe.value=zi instanceof Error?zi.message:"Failed to update global flood policy"}}function ai(){j.value=!1,mt.value=null}async function Qi(Ni){try{const zi=await Ah.updateTransportKey(Ni.id,Ni.name,Ni.floodPolicy);zi.success?await ir():(console.error("Failed to update transport key:",zi.error),pe.value=zi.error||"Failed to update transport key")}catch(zi){console.error("Error updating transport key:",zi),pe.value=zi instanceof Error?zi.message:"Unknown error occurred"}finally{ai()}}function Gi(Ni){j.value=!1,mt.value=null,kt.value=Ni,J.value=!0}function En(){J.value=!1,kt.value=null}async function Fa(Ni){try{const zi=await Ah.deleteTransportKey(Ni);zi.success?(await ir(),l.setSelectedNode(null)):(console.error("Failed to delete transport key:",zi.error),pe.value=zi.error||"Failed to delete transport key")}catch(zi){console.error("Error deleting transport key:",zi),pe.value=zi instanceof Error?zi.message:"Unknown error occurred"}finally{En()}}async function Sa(Ni){try{const zi=await Ah.deleteTransportKey(Ni.nodeId);zi.success?(await ir(),l.setSelectedNode(null)):(console.error("Failed to delete transport key:",zi.error),pe.value=zi.error||"Failed to delete transport key")}catch(zi){console.error("Error deleting transport key:",zi),pe.value=zi instanceof Error?zi.message:"Unknown error occurred"}finally{En()}}return(Ni,zi)=>(Si(),Fi("div",Xmt,[Oe("div",Jmt,[zi[3]||(zi[3]=Oe("div",null,[Oe("h3",{class:"text-lg font-semibold text-white mb-2"},"Regions/Keys"),Oe("p",{class:"text-white/70 text-sm"},"Manage regional key hierarchy")],-1)),Oe("div",Qmt,[Oe("button",{onClick:Wr,disabled:Dt.value==="allow",class:Xs(["flex items-center gap-2 px-3 py-2 rounded-lg border transition-colors text-sm",Dt.value==="allow"?"bg-white/5 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/10 hover:bg-accent-green/20 text-accent-green border-accent-green/30"])},zi[2]||(zi[2]=[Oe("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),nc(" Add ",-1)]),10,tgt),Oe("button",{onClick:Ft,disabled:!Ju(l).selectedNodeId.value||Dt.value==="allow",class:Xs(["px-4 py-2 rounded-lg border transition-colors",!Ju(l).selectedNodeId.value||Dt.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border-accent-green/50"])}," Edit ",10,egt),Oe("button",{onClick:Tn,disabled:!Ju(l).selectedNodeId.value||Dt.value==="allow",class:Xs(["px-4 py-2 rounded-lg border transition-colors",!Ju(l).selectedNodeId.value||Dt.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border-accent-red/50"])}," Delete ",10,rgt)])]),Oe("div",ngt,[Oe("div",igt,[zi[4]||(zi[4]=Oe("div",null,[Oe("h4",{class:"text-sm font-medium text-white mb-1"},"Global Flood Policy (*)"),Oe("p",{class:"text-white/60 text-xs"},"Master control for repeater flooding")],-1)),Oe("div",agt,[Oe("div",ogt,[Oe("button",{onClick:zi[0]||(zi[0]=ia=>jn("deny")),class:Xs(["px-3 py-1 text-xs font-medium rounded transition-colors",Dt.value==="deny"?"bg-accent-red/20 text-accent-red border border-accent-red/50":"text-white/60 hover:text-white/80"])}," DENY ",2),Oe("button",{onClick:zi[1]||(zi[1]=ia=>jn("allow")),class:Xs(["px-3 py-1 text-xs font-medium rounded transition-colors",Dt.value==="allow"?"bg-accent-green/20 text-accent-green border border-accent-green/50":"text-white/60 hover:text-white/80"])}," ALLOW ",2)])])])]),Oe("div",sgt,[ee.value?(Si(),Fi("div",lgt,zi[5]||(zi[5]=[Oe("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-accent-green"},null,-1),Oe("span",{class:"ml-2 text-white/70"},"Loading transport keys...",-1)]))):pe.value?(Si(),Fi("div",ugt,[zi[6]||(zi[6]=Oe("div",{class:"text-accent-red mb-2"},"⚠️ Error loading transport keys",-1)),Oe("div",cgt,na(pe.value),1),Oe("button",{onClick:ir,class:"mt-4 px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded-lg transition-colors"}," Retry ")])):$t.value.length===0?(Si(),Fi("div",hgt,zi[7]||(zi[7]=[Oe("div",{class:"text-white/50 mb-2"},"📝 No transport keys found",-1),Oe("div",{class:"text-white/30 text-sm"},"Add your first transport key to get started",-1)]))):(Si(),Fi("div",fgt,[(Si(!0),Fi(Ou,null,sf($t.value,ia=>(Si(),K0(z0t,{key:ia.id,node:ia,"selected-node-id":Ju(l).selectedNodeId.value,level:0,disabled:Dt.value==="allow",onSelect:Pr},null,8,["node","selected-node-id","disabled"]))),128))]))]),uu(Q0t,{show:z.value,"selected-node-name":Ir(),"selected-node-id":Ju(l).selectedNodeId.value||void 0,onClose:ei,onAdd:wn},null,8,["show","selected-node-name","selected-node-id"]),uu(Mmt,{show:j.value,node:mt.value,onClose:ai,onSave:Qi,onRequestDelete:Gi},null,8,["show","node"]),uu(Kmt,{show:J.value,node:kt.value,"all-nodes":$t.value,onClose:En,onDeleteAll:Fa,onMoveChildren:Sa},null,8,["show","node","all-nodes"])]))}}),pgt={class:"p-6 space-y-6"},mgt={class:"glass-card rounded-[15px] z-10 p-4 border border-primary/30 bg-primary/10"},ggt={class:"text-primary"},vgt={class:"mt-2 text-primary/80"},ygt={class:"glass-card rounded-[15px] p-6"},xgt={class:"flex flex-wrap border-b border-white/10 mb-6"},_gt=["onClick"],bgt={class:"flex items-center gap-2"},wgt={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},kgt={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Tgt={key:2,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Agt={key:3,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Mgt={key:4,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Sgt={class:"min-h-[400px]"},Egt={key:0,class:"flex items-center justify-center py-12"},Cgt={key:1,class:"flex items-center justify-center py-12"},Lgt={class:"text-center"},Pgt={class:"text-white/60 text-sm mb-4"},zgt={key:2},Igt=ah({name:"ConfigurationView",__name:"Configuration",setup(d){const l=gg(),z=ro("radio"),j=ro(!1),J=[{id:"radio",label:"Radio Settings",icon:"radio"},{id:"repeater",label:"Repeater Settings",icon:"repeater"},{id:"duty",label:"Duty Cycle",icon:"duty"},{id:"delays",label:"TX Delays",icon:"delays"},{id:"transport",label:"Regions/Keys",icon:"keys"}];i0(async()=>{try{await l.fetchStats(),j.value=!0}catch(kt){console.error("Failed to load configuration data:",kt),j.value=!0}});function mt(kt){z.value=kt}return(kt,Dt)=>{const $t=VA("router-link");return Si(),Fi("div",pgt,[Dt[11]||(Dt[11]=Oe("div",null,[Oe("h1",{class:"text-2xl font-bold text-white"},"Configuration"),Oe("p",{class:"text-white/70 mt-2"},"System configuration and settings")],-1)),Dt[12]||(Dt[12]=Oe("div",{class:"glass-card rounded-[15px] p-4 border border-blue-500/30 bg-blue-500/10"},[Oe("div",{class:"text-blue-200"},[Oe("strong",null,"Configuration is read-only."),nc(" To modify settings, edit the config file and restart the daemon. ")])],-1)),Oe("div",mgt,[Oe("div",ggt,[Dt[3]||(Dt[3]=Oe("strong",null,"CAD Calibration Tool Available",-1)),Oe("p",vgt,[Dt[2]||(Dt[2]=nc(" Optimize your Channel Activity Detection settings. ",-1)),uu($t,{to:"/cad-calibration",class:"underline hover:text-primary transition-colors"},{default:ew(()=>Dt[1]||(Dt[1]=[nc(" Launch CAD Calibration Tool → ",-1)])),_:1,__:[1]})])])]),Oe("div",ygt,[Oe("div",xgt,[(Si(),Fi(Ou,null,sf(J,ee=>Oe("button",{key:ee.id,onClick:pe=>mt(ee.id),class:Xs(["px-4 py-2 text-sm font-medium transition-colors duration-200 border-b-2 mr-6 mb-2",z.value===ee.id?"text-primary border-primary":"text-white/70 border-transparent hover:text-white hover:border-white/30"])},[Oe("div",bgt,[ee.icon==="radio"?(Si(),Fi("svg",wgt,Dt[4]||(Dt[4]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.822c5.716-5.716 14.976-5.716 20.692 0"},null,-1)]))):ee.icon==="repeater"?(Si(),Fi("svg",kgt,Dt[5]||(Dt[5]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12l4-4m-4 4l4 4"},null,-1)]))):ee.icon==="duty"?(Si(),Fi("svg",Tgt,Dt[6]||(Dt[6]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):ee.icon==="delays"?(Si(),Fi("svg",Agt,Dt[7]||(Dt[7]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"},null,-1)]))):ee.icon==="keys"?(Si(),Fi("svg",Mgt,Dt[8]||(Dt[8]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))):ps("",!0),nc(" "+na(ee.label),1)])],10,_gt)),64))]),Oe("div",Sgt,[!j.value&&Ju(l).isLoading?(Si(),Fi("div",Egt,Dt[9]||(Dt[9]=[Oe("div",{class:"text-center"},[Oe("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-primary rounded-full mx-auto mb-4"}),Oe("div",{class:"text-white/70"},"Loading configuration...")],-1)]))):Ju(l).error&&!j.value?(Si(),Fi("div",Cgt,[Oe("div",Lgt,[Dt[10]||(Dt[10]=Oe("div",{class:"text-red-400 mb-2"},"Failed to load configuration",-1)),Oe("div",Pgt,na(Ju(l).error),1),Oe("button",{onClick:Dt[0]||(Dt[0]=ee=>Ju(l).fetchStats()),class:"px-4 py-2 bg-primary/20 hover:bg-primary/30 text-white rounded-lg border border-primary/50 transition-colors"}," Retry ")])])):(Si(),Fi("div",zgt,[Xp(Oe("div",null,[uu(Fpt,{key:"radio-settings"})],512),[[r2,z.value==="radio"]]),Xp(Oe("div",null,[uu(Qpt,{key:"repeater-settings"})],512),[[r2,z.value==="repeater"]]),Xp(Oe("div",null,[uu(o0t,{key:"duty-cycle"})],512),[[r2,z.value==="duty"]]),Xp(Oe("div",null,[uu(d0t,{key:"transmission-delays"})],512),[[r2,z.value==="delays"]]),Xp(Oe("div",null,[uu(dgt,{key:"transport-keys"})],512),[[r2,z.value==="transport"]])]))])])])}}}),Ogt={class:"p-6 space-y-6"},Dgt={class:"glass-card rounded-[15px] p-6"},Fgt={class:"flex justify-center"},Rgt={class:"flex gap-4"},Bgt=["disabled"],Ngt=["disabled"],jgt={class:"glass-card rounded-[15px] p-6 space-y-4"},Ugt={class:"text-white"},Vgt={key:0,class:"p-4 bg-primary/10 border border-primary/30 rounded-lg"},Hgt={class:"text-primary/90"},Wgt={class:"space-y-2"},qgt={class:"w-full bg-white/10 rounded-full h-2"},Zgt={class:"text-white/70 text-sm"},$gt={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},Ggt={class:"glass-card rounded-[15px] p-4 text-center"},Ygt={class:"text-2xl font-bold text-primary"},Kgt={class:"glass-card rounded-[15px] p-4 text-center"},Xgt={class:"text-2xl font-bold text-primary"},Jgt={class:"glass-card rounded-[15px] p-4 text-center"},Qgt={class:"text-2xl font-bold text-primary"},tvt={class:"glass-card rounded-[15px] p-4 text-center"},evt={class:"text-2xl font-bold text-primary"},rvt={key:0,class:"glass-card rounded-[15px] p-6 space-y-4"},nvt={key:0,class:"p-4 bg-accent-green/10 border border-accent-green/30 rounded-lg"},ivt={class:"text-white/80 mb-4"},avt={key:1,class:"p-4 bg-secondary/20 border border-secondary/40 rounded-lg"},ovt=ah({name:"CADCalibrationView",__name:"CADCalibration",setup(d){const l=gg(),z=ro(!1),j=ro(null),J=ro(null),mt=ro({}),kt=ro(null),Dt=ro([]),$t=ro({}),ee=ro("Ready to start calibration"),pe=ro(0),Be=ro(0),ir=ro(0),vr=ro(0),Ir=ro(0),Pr=ro(0),Wr=ro(null),Tn=ro(!1),Ft=ro(!1),wn=ro(!1),ei=ro(!1);let jn=null;const ai={responsive:!0,displayModeBar:!0,modeBarButtonsToRemove:["pan2d","select2d","lasso2d","autoScale2d"],displaylogo:!1,toImageButtonOptions:{format:"png",filename:"cad-calibration-heatmap",height:600,width:800,scale:2}};function Qi(){const qi=[{x:[],y:[],z:[],mode:"markers",type:"scatter",marker:{size:12,color:[],colorscale:[[0,"rgba(75, 85, 99, 0.4)"],[.1,"rgba(6, 182, 212, 0.3)"],[.5,"rgba(6, 182, 212, 0.6)"],[1,"rgba(16, 185, 129, 0.9)"]],showscale:!0,colorbar:{title:{text:"Detection Rate (%)",font:{color:"#ffffff",size:14}},tickfont:{color:"#ffffff"},bgcolor:"rgba(0,0,0,0)",bordercolor:"rgba(255,255,255,0.2)",borderwidth:1,thickness:15},line:{color:"rgba(255,255,255,0.2)",width:1}},hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
",name:"Test Results"}],Ei={title:{text:'CAD Detection Rate
Channel Activity Detection Calibration',font:{color:"#ffffff",size:18},x:.5},xaxis:{title:{text:"CAD Peak Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},yaxis:{title:{text:"CAD Min Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},plot_bgcolor:"rgba(0, 0, 0, 0)",paper_bgcolor:"rgba(0, 0, 0, 0)",font:{color:"#ffffff",family:"Inter, system-ui, sans-serif"},margin:{l:80,r:80,t:100,b:80},showlegend:!1};l1.newPlot("plotly-chart",qi,Ei,ai)}function Gi(){if(Object.keys(mt.value).length===0)return;const qi=Object.values(mt.value),Ei=[],Va=[],us=[];for(const Mo of qi)Ei.push(Mo.det_peak),Va.push(Mo.det_min),us.push(Mo.detection_rate);const xo={x:[Ei],y:[Va],"marker.color":[us],hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
Status: Tested
"};l1.restyle("plotly-chart",xo,[0])}async function En(){try{const Va=await Ah.post("/cad-calibration-start",{samples:10,delay_ms:50});if(Va.success)z.value=!0,j.value=Date.now(),l.setCadCalibrationRunning(!0),mt.value={},Dt.value=[],$t.value={},kt.value=null,Tn.value=!1,Ft.value=!1,wn.value=!1,ei.value=!1,ir.value=0,vr.value=0,Ir.value=0,Pr.value=0,pe.value=0,Be.value=0,jn=setInterval(()=>{j.value&&(Pr.value=Math.floor((Date.now()-j.value)/1e3))},1e3),Sa();else throw new Error(Va.error||"Failed to start calibration")}catch(Va){ee.value=`Error: ${Va instanceof Error?Va.message:"Unknown error"}`}}async function Fa(){try{(await Ah.post("/cad-calibration-stop")).success&&(z.value=!1,l.setCadCalibrationRunning(!1),J.value&&(J.value.close(),J.value=null),jn&&(clearInterval(jn),jn=null))}catch(qi){console.error("Failed to stop calibration:",qi)}}function Sa(){J.value&&J.value.close(),J.value=new EventSource(`${oQ}/api/cad-calibration-stream`),J.value.onmessage=function(qi){try{const Ei=JSON.parse(qi.data);Ni(Ei)}catch(Ei){console.error("Failed to parse SSE data:",Ei)}},J.value.onerror=function(qi){console.error("SSE connection error:",qi),z.value||J.value&&(J.value.close(),J.value=null)}}function Ni(qi){switch(qi.type){case"status":ee.value=qi.message||"Status update",qi.test_ranges&&(Wr.value=qi.test_ranges,Tn.value=!0);break;case"progress":pe.value=qi.current||0,Be.value=qi.total||0,ir.value=qi.current||0;break;case"result":if(qi.det_peak!==void 0&&qi.det_min!==void 0&&qi.detection_rate!==void 0&&qi.detections!==void 0&&qi.samples!==void 0){const Ei=`${qi.det_peak}_${qi.det_min}`;mt.value[Ei]={det_peak:qi.det_peak,det_min:qi.det_min,detection_rate:qi.detection_rate,detections:qi.detections,samples:qi.samples},Gi(),zi()}break;case"complete":case"completed":z.value=!1,ee.value=qi.message||"Calibration completed",l.setCadCalibrationRunning(!1),ia(),J.value&&(J.value.close(),J.value=null),jn&&(clearInterval(jn),jn=null);break;case"error":ee.value=`Error: ${qi.message}`,l.setCadCalibrationRunning(!1),Fa();break}}function zi(){const qi=Object.values(mt.value).map(Ei=>Ei.detection_rate);qi.length!==0&&(vr.value=Math.max(...qi),Ir.value=qi.reduce((Ei,Va)=>Ei+Va,0)/qi.length)}function ia(){Ft.value=!0;let qi=null,Ei=0;for(const Va of Object.values(mt.value))Va.detection_rate>Ei&&(Ei=Va.detection_rate,qi=Va);kt.value=qi,qi&&Ei>0?(wn.value=!0,ei.value=!1):(wn.value=!1,ei.value=!0)}async function Ua(){if(!kt.value){ee.value="Error: No calibration results to save";return}try{const qi=await Ah.post("/save_cad_settings",{peak:kt.value.det_peak,min_val:kt.value.det_min,detection_rate:kt.value.detection_rate});if(qi.success)ee.value=`Settings saved! Peak=${kt.value.det_peak}, Min=${kt.value.det_min} applied to configuration.`;else throw new Error(qi.error||"Failed to save settings")}catch(qi){ee.value=`Error: Failed to save settings: ${qi instanceof Error?qi.message:"Unknown error"}`}}return i0(()=>{Qi()}),b_(()=>{J.value&&J.value.close(),jn&&clearInterval(jn),l.setCadCalibrationRunning(!1),document.getElementById("plotly-chart")&&l1.purge("plotly-chart")}),(qi,Ei)=>(Si(),Fi("div",Ogt,[Ei[14]||(Ei[14]=Oe("div",null,[Oe("h1",{class:"text-2xl font-bold text-white"},"CAD Calibration Tool"),Oe("p",{class:"text-white/70 mt-2"},"Channel Activity Detection calibration")],-1)),Oe("div",Dgt,[Oe("div",Fgt,[Oe("div",Rgt,[Oe("button",{onClick:En,disabled:z.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-green/10 hover:bg-accent-green/20 disabled:bg-gray-500/10 text-accent-green disabled:text-gray-400 rounded-lg border border-accent-green/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},Ei[0]||(Ei[0]=[Af('
Start Calibration
Begin testing
',2)]),8,Bgt),Oe("button",{onClick:Fa,disabled:!z.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-red/10 hover:bg-accent-red/20 disabled:bg-gray-500/10 text-accent-red disabled:text-gray-400 rounded-lg border border-accent-red/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},Ei[1]||(Ei[1]=[Af('
Stop
Halt calibration
',2)]),8,Ngt)])])]),Oe("div",jgt,[Oe("div",Ugt,na(ee.value),1),Tn.value&&Wr.value?(Si(),Fi("div",Vgt,[Oe("div",Hgt,[Ei[2]||(Ei[2]=Oe("strong",null,"Configuration:",-1)),nc(" SF"+na(Wr.value.spreading_factor)+" | Peak: "+na(Wr.value.peak_min)+" - "+na(Wr.value.peak_max)+" | Min: "+na(Wr.value.min_min)+" - "+na(Wr.value.min_max)+" | "+na((Wr.value.peak_max-Wr.value.peak_min+1)*(Wr.value.min_max-Wr.value.min_min+1))+" tests ",1)])])):ps("",!0),Oe("div",Wgt,[Oe("div",qgt,[Oe("div",{class:"bg-gradient-to-r from-primary to-accent-green h-2 rounded-full transition-all duration-300",style:pg({width:Be.value>0?`${pe.value/Be.value*100}%`:"0%"})},null,4)]),Oe("div",Zgt,na(pe.value)+" / "+na(Be.value)+" tests completed",1)])]),Oe("div",$gt,[Oe("div",Ggt,[Oe("div",Ygt,na(ir.value),1),Ei[3]||(Ei[3]=Oe("div",{class:"text-white/70 text-sm"},"Tests Completed",-1))]),Oe("div",Kgt,[Oe("div",Xgt,na(vr.value.toFixed(1))+"%",1),Ei[4]||(Ei[4]=Oe("div",{class:"text-white/70 text-sm"},"Best Detection Rate",-1))]),Oe("div",Jgt,[Oe("div",Qgt,na(Ir.value.toFixed(1))+"%",1),Ei[5]||(Ei[5]=Oe("div",{class:"text-white/70 text-sm"},"Average Rate",-1))]),Oe("div",tvt,[Oe("div",evt,na(Pr.value)+"s",1),Ei[6]||(Ei[6]=Oe("div",{class:"text-white/70 text-sm"},"Elapsed Time",-1))])]),Ei[15]||(Ei[15]=Oe("div",{class:"glass-card rounded-[15px] p-6"},[Oe("div",{id:"plotly-chart",class:"w-full h-96"})],-1)),Ft.value?(Si(),Fi("div",rvt,[Ei[13]||(Ei[13]=Oe("h3",{class:"text-xl font-bold text-white"},"Calibration Results",-1)),wn.value&&kt.value?(Si(),Fi("div",nvt,[Ei[11]||(Ei[11]=Oe("h4",{class:"font-medium text-accent-green mb-2"},"Optimal Settings Found:",-1)),Oe("p",ivt,[Ei[7]||(Ei[7]=nc(" Peak: ",-1)),Oe("strong",null,na(kt.value.det_peak),1),Ei[8]||(Ei[8]=nc(", Min: ",-1)),Oe("strong",null,na(kt.value.det_min),1),Ei[9]||(Ei[9]=nc(", Rate: ",-1)),Oe("strong",null,na(kt.value.detection_rate.toFixed(1))+"%",1)]),Oe("div",{class:"flex justify-center"},[Oe("button",{onClick:Ua,class:"flex items-center gap-3 px-6 py-3 bg-primary/20 hover:bg-primary/30 text-primary rounded-lg border border-primary/50 transition-colors"},Ei[10]||(Ei[10]=[Af('
Save Settings
Apply to configuration
',2)]))])])):ps("",!0),ei.value?(Si(),Fi("div",avt,Ei[12]||(Ei[12]=[Oe("h4",{class:"font-medium text-secondary mb-2"},"No Optimal Settings Found",-1),Oe("p",{class:"text-white/70"},"All tested combinations showed low detection rates. Consider running calibration again or adjusting test parameters.",-1)]))):ps("",!0)])):ps("",!0)]))}}),svt=hd(ovt,[["__scopeId","data-v-854f5f55"]]),lvt={class:"space-y-6"},uvt={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},cvt={class:"flex items-center justify-between mb-4"},hvt=["disabled"],fvt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},dvt={class:"flex flex-wrap gap-2"},pvt=["onClick"],mvt={key:0,class:"w-px h-6 bg-white/20 mx-2 self-center"},gvt=["onClick"],vvt={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden"},yvt={key:0,class:"p-8 text-center"},xvt={key:1,class:"p-8 text-center"},_vt={class:"text-dark-text mb-4"},bvt={key:2,class:"max-h-[600px] overflow-y-auto"},wvt={key:0,class:"p-8 text-center"},kvt={key:1,class:"divide-y divide-white/5"},Tvt={class:"flex-shrink-0 text-dark-text"},Avt={class:"flex-shrink-0 px-2 py-1 text-xs font-medium rounded bg-blue-500/20 text-blue-400"},Mvt={class:"text-white flex-1 break-all"},Svt=ah({name:"LogsView",__name:"Logs",setup(d){const l=ro([]),z=ro(new Set),j=ro(new Set(["DEBUG","INFO","WARNING","ERROR"])),J=ro(new Set),mt=ro(new Set),kt=ro(!0),Dt=ro(null);let $t=null;const ee=Sa=>{const Ni=Sa.match(/- ([^-]+) - (?:DEBUG|INFO|WARNING|ERROR) -/);return Ni?Ni[1].trim():"Unknown"},pe=Sa=>{const Ni=Sa.match(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} - [^-]+ - (?:DEBUG|INFO|WARNING|ERROR) - (.+)$/);return Ni?Ni[1]:Sa},Be=(Sa,Ni)=>{if(Sa.size!==Ni.size)return!1;for(const zi of Sa)if(!Ni.has(zi))return!1;return!0},ir=async()=>{try{const Sa=await Ah.getLogs();if(Sa.logs&&Sa.logs.length>0){l.value=Sa.logs;const Ni=new Set;l.value.forEach(qi=>{const Ei=ee(qi.message);Ni.add(Ei)});const zi=new Set;l.value.forEach(qi=>{zi.add(qi.level)}),z.value.size===0&&(z.value=new Set(Ni));const ia=!Be(J.value,Ni),Ua=!Be(mt.value,zi);ia&&(J.value=Ni),Ua&&(mt.value=zi),Dt.value=null}}catch(Sa){console.error("Error loading logs:",Sa),Dt.value=Sa instanceof Error?Sa.message:"Failed to load logs"}finally{kt.value=!1}},vr=Ko(()=>l.value.filter(Ni=>{const zi=ee(Ni.message),ia=z.value.has(zi),Ua=j.value.has(Ni.level);return ia&&Ua})),Ir=Ko(()=>Array.from(J.value).sort()),Pr=Ko(()=>{const Sa=["ERROR","WARNING","WARN","INFO","DEBUG"];return Array.from(mt.value).sort((zi,ia)=>{const Ua=Sa.indexOf(zi),qi=Sa.indexOf(ia);return Ua!==-1&&qi!==-1?Ua-qi:zi.localeCompare(ia)})}),Wr=Sa=>{j.value.has(Sa)?j.value.delete(Sa):j.value.add(Sa),j.value=new Set(j.value)},Tn=Sa=>new Date(Sa).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Ft=Sa=>({ERROR:"text-red-400 bg-red-900/20",WARNING:"text-yellow-400 bg-yellow-900/20",WARN:"text-yellow-400 bg-yellow-900/20",INFO:"text-blue-400 bg-blue-900/20",DEBUG:"text-gray-400 bg-gray-900/20"})[Sa]||"text-gray-400 bg-gray-900/20",wn=(Sa,Ni)=>Ni?{ERROR:"bg-red-500/20 text-red-400 border-red-500/50",WARNING:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",WARN:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",INFO:"bg-blue-500/20 text-blue-400 border-blue-500/50",DEBUG:"bg-gray-500/20 text-gray-400 border-gray-500/50"}[Sa]||"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10",ei=Sa=>{z.value.has(Sa)?z.value.delete(Sa):z.value.add(Sa),z.value=new Set(z.value)},jn=()=>{z.value=new Set(J.value)},ai=()=>{z.value=new Set},Qi=()=>{j.value=new Set(mt.value)},Gi=()=>{j.value=new Set},En=()=>{$t&&clearInterval($t),$t=setInterval(ir,5e3)},Fa=()=>{$t&&(clearInterval($t),$t=null)};return i0(()=>{ir(),En()}),mg(()=>{Fa()}),(Sa,Ni)=>(Si(),Fi("div",lvt,[Oe("div",uvt,[Oe("div",cvt,[Ni[1]||(Ni[1]=Oe("div",null,[Oe("h1",{class:"text-white text-2xl font-semibold mb-2"},"System Logs"),Oe("p",{class:"text-dark-text"},"Real-time system events and diagnostics")],-1)),Oe("button",{onClick:ir,disabled:kt.value,class:"flex items-center gap-2 px-4 py-2 bg-primary/20 hover:bg-primary/30 text-primary border border-primary/50 rounded-lg transition-colors disabled:opacity-50"},[(Si(),Fi("svg",{class:Xs(["w-4 h-4",{"animate-spin":kt.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ni[0]||(Ni[0]=[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)]),2)),nc(" "+na(kt.value?"Loading...":"Refresh"),1)],8,hvt)]),Oe("div",fvt,[Oe("div",{class:"flex flex-wrap items-center gap-3 mb-4"},[Ni[2]||(Ni[2]=Oe("span",{class:"text-white font-medium"},"Filters:",-1)),Oe("button",{onClick:jn,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Loggers "),Oe("button",{onClick:ai,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Loggers "),Ni[3]||(Ni[3]=Oe("div",{class:"w-px h-4 bg-white/20 mx-1"},null,-1)),Oe("button",{onClick:Qi,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Levels "),Oe("button",{onClick:Gi,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Levels ")]),Oe("div",dvt,[(Si(!0),Fi(Ou,null,sf(Ir.value,zi=>(Si(),Fi("button",{key:"logger-"+zi,onClick:ia=>ei(zi),class:Xs(["px-3 py-1 text-xs border rounded-full transition-colors",z.value.has(zi)?"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10"])},na(zi),11,pvt))),128)),Ir.value.length>0&&Pr.value.length>0?(Si(),Fi("div",mvt)):ps("",!0),(Si(!0),Fi(Ou,null,sf(Pr.value,zi=>(Si(),Fi("button",{key:"level-"+zi,onClick:ia=>Wr(zi),class:Xs(["px-3 py-1 text-xs border rounded-full transition-colors font-medium",j.value.has(zi)?wn(zi,!0):wn(zi,!1)])},na(zi),11,gvt))),128))])])]),Oe("div",vvt,[kt.value&&l.value.length===0?(Si(),Fi("div",yvt,Ni[4]||(Ni[4]=[Oe("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"},null,-1),Oe("p",{class:"text-dark-text"},"Loading system logs...",-1)]))):Dt.value?(Si(),Fi("div",xvt,[Ni[5]||(Ni[5]=Oe("div",{class:"text-red-400 mb-4"},[Oe("svg",{class:"w-12 h-12 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Oe("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),Ni[6]||(Ni[6]=Oe("h3",{class:"text-white text-lg font-medium mb-2"},"Error Loading Logs",-1)),Oe("p",_vt,na(Dt.value),1),Oe("button",{onClick:ir,class:"px-4 py-2 bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/50 rounded-lg transition-colors"}," Try Again ")])):(Si(),Fi("div",bvt,[vr.value.length===0?(Si(),Fi("div",wvt,Ni[7]||(Ni[7]=[Af('

No Logs to Display

No logs match the current filter criteria.

',3)]))):(Si(),Fi("div",kvt,[(Si(!0),Fi(Ou,null,sf(vr.value,(zi,ia)=>(Si(),Fi("div",{key:ia,class:"flex items-start gap-4 p-4 hover:bg-white/5 transition-colors font-mono text-sm"},[Oe("span",Tvt," ["+na(Tn(zi.timestamp))+"] ",1),Oe("span",Avt,na(ee(zi.message)),1),Oe("span",{class:Xs(["flex-shrink-0 px-2 py-1 text-xs font-medium rounded",Ft(zi.level)])},na(zi.level),3),Oe("span",Mvt,na(pe(zi.message)),1)]))),128))]))]))])]))}}),Evt=ah({name:"HelpView",__name:"Help",setup(d){return(l,z)=>(Si(),Fi("div",null,z[0]||(z[0]=[Af('

Help

Help & Documentation

Find answers to common questions and access user guides.

',1)])))}}),Cvt=SX({history:aX("/"),routes:[{path:"/",name:"dashboard",component:Lat},{path:"/neighbors",name:"neighbors",component:xot},{path:"/statistics",name:"statistics",component:bpt},{path:"/configuration",name:"configuration",component:Igt},{path:"/cad-calibration",name:"cad-calibration",component:svt},{path:"/logs",name:"logs",component:Svt},{path:"/help",name:"help",component:Evt}]}),kM=dK(nrt);kM.use(gK());kM.use(Cvt);kM.mount("#app"); +*/return window.Plotly=E,E})}(a4)),a4.exports}var Wpt=Hpt();const c1=KO(Wpt),qpt={class:"p-6 space-y-6"},$pt={class:"flex justify-between items-center"},Zpt={class:"flex items-center gap-3"},Gpt=["value"],Ypt={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},Kpt={class:"glass-card rounded-[15px] p-6"},Xpt={class:"mb-6"},Jpt={class:"relative h-48 bg-white/5 rounded-lg p-4"},Qpt={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},t0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},e0t={class:"mb-6"},r0t={class:"relative h-48 bg-white/5 rounded-lg p-4"},n0t={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm z-20"},i0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 z-20"},a0t={class:"glass-card rounded-[15px] p-6"},o0t={class:"grid grid-cols-1 lg:grid-cols-3 gap-6"},s0t={class:"lg:col-span-2"},l0t={class:"relative h-64 bg-white/5 rounded-lg p-4"},u0t={class:"flex flex-col items-center justify-center"},c0t={class:"relative w-48 h-48"},h0t={key:0,class:"absolute inset-0 flex items-center justify-center bg-white/5 backdrop-blur-sm rounded-full z-20"},f0t={key:1,class:"absolute inset-0 flex items-center justify-center bg-white/5 rounded-full z-20"},d0t={key:0,class:"glass-card rounded-[15px] p-8 text-center"},p0t={key:1,class:"glass-card rounded-[15px] p-8 text-center"},m0t={class:"text-white/60 text-sm"},g0t=Dc({name:"StatisticsView",__name:"Statistics",setup(d){x2.register(Xht,tft,aht,Q4,Out,Put,zut,Nht,Zht,Rht,Yct,hht,Pht,OA);const s=sw(),E=Ga(null),B=Ga(!1),K=Ga(24),pt=[{value:1,label:"1 Hour"},{value:6,label:"6 Hours"},{value:12,label:"12 Hours"},{value:24,label:"24 Hours"},{value:48,label:"2 Days"},{value:168,label:"1 Week"}],_t=Ga(null),Ot=Ga(null),jt=Ga([]),te=Ga(null),he=Ga([]),De=Ga(!0),er=Ga(null),pr=Ga({packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0}),Mr=Ga(!1),Tr=Ga(!1),Vr=Ga(!1),mn=Ga(null),Dt=Ga(null),cn=Ga(null),Jn=Ga(null),Bn=Ga(null),ni=Ga(null),Wi=Ga(null),Un=$o(()=>{const ko=s.packetStats;return ko?{totalRx:ko.total_packets||0,totalTx:ko.transmitted_packets||0}:{totalRx:0,totalTx:0}}),qr=$o(()=>{let ko=[],ro=[];if(_t.value?.series){const Ia=_t.value.series.find(no=>no.type==="rx_count"),da=_t.value.series.find(no=>no.type==="tx_count");Ia?.data&&(ko=Ia.data.map(([,no])=>no)),da?.data&&(ro=da.data.map(([,no])=>no))}return{totalPackets:ko,transmittedPackets:ro,droppedPackets:[]}}),Di=async()=>{try{De.value=!0,er.value=null,await Promise.all([s.fetchPacketStats({hours:K.value}),s.fetchSystemStats()]),De.value=!1,Fi()}catch(ko){er.value=ko instanceof Error?ko.message:"Failed to fetch data",De.value=!1}},Fi=async()=>{pr.value={packetRate:!0,packetType:!0,noiseFloor:!1,routePie:!0};const ko=[Pi(),bi(),Yi(),Ca()];try{await Promise.allSettled(ko),await om(),!Jn.value||!Bn.value?setTimeout(()=>{Ma()},100):Ma()}catch(ro){console.error("Error loading chart data:",ro)}},Pi=async()=>{pr.value.packetRate=!0;try{const ko=await Ah.get("/metrics_graph_data",{hours:K.value,resolution:"average",metrics:"rx_count,tx_count"});ko?.success&&(_t.value=ko.data)}catch{_t.value=null}},bi=async()=>{pr.value.packetType=!0;try{const ko=await Ah.get("/packet_type_graph_data",{hours:K.value,resolution:"average",types:"all"});if(ko?.success&&ko.data){const ro=ko.data;jt.value=ro.series||[]}}catch{jt.value=[]}},Yi=async()=>{pr.value.routePie=!0;try{const ko=await Ah.get("/route_stats",{hours:K.value});ko?.success&&ko.data&&(te.value=ko.data)}catch{te.value=null}},Ca=async()=>{try{const ko=await Ah.get("/noise_floor_history",{hours:K.value});if(ko.success&&ko.data){const Ia=ko.data.history||[];Array.isArray(Ia)&&Ia.length>0&&(Ot.value={chart_data:Ia.map(da=>({timestamp:da.timestamp||Date.now()/1e3,noise_floor_dbm:da.noise_floor_dbm||da.noise_floor||-120}))},si())}}catch{Ot.value={chart_data:[]}}},Ni=()=>{zo(),Mr.value=!1,Tr.value=!1,Vr.value=!1,Di()},si=()=>{if(he.value=[],Ot.value?.chart_data&&Ot.value.chart_data.length>0){const ko=Ot.value.chart_data,ro=Math.max(1,Math.floor(ko.length/100));he.value=ko.filter((Ia,da)=>da%ro===0).map(Ia=>({timestamp:Ia.timestamp*1e3,snr:null,rssi:null,noiseFloor:Ia.noise_floor_dbm}))}},Ma=()=>{if(!B.value){B.value=!0;try{ho(),mo(),Ts(),xl(),setTimeout(()=>{pr.value.packetRate&&mn.value&&(pr.value.packetRate=!1),pr.value.packetType&&Dt.value&&(pr.value.packetType=!1),pr.value.routePie&&Wi.value&&(pr.value.routePie=!1),pr.value.routePie&&Wi.value&&(pr.value.routePie=!1),setTimeout(()=>{const ko=Uu(mn.value),ro=Uu(Dt.value),Ia=Uu(cn.value);ko&&ko.update("none"),ro&&ro.update("none"),Ia&&Ia.update("none")},50)},100)}catch(ko){console.error("Error creating/updating charts:",ko),zo()}finally{B.value=!1}}},zo=()=>{try{mn.value&&(mn.value.destroy(),mn.value=null),Dt.value&&(Dt.value.destroy(),Dt.value=null),cn.value&&(cn.value.destroy(),cn.value=null),Wi.value&&c1.purge(Wi.value)}catch(ko){console.error("Error destroying charts:",ko)}},ho=()=>{if(!Jn.value){pr.value.packetRate=!1;return}const ko=Jn.value.getContext("2d");if(!ko){pr.value.packetRate=!1;return}let ro=[],Ia=[];if(_t.value?.series){const da=_t.value.series.find(po=>po.type==="rx_count"),no=_t.value.series.find(po=>po.type==="tx_count");da?.data&&(ro=da.data.map(([po,us])=>{let Ho=po;return po>1e15?Ho=po/1e3:po>1e12?Ho=po:po>1e9?Ho=po*1e3:Ho=Date.now(),{x:Ho,y:us}})),no?.data&&(Ia=no.data.map(([po,us])=>{let Ho=po;return po>1e15?Ho=po/1e3:po>1e12?Ho=po:po>1e9?Ho=po*1e3:Ho=Date.now(),{x:Ho,y:us}}))}if(ro.length===0&&Ia.length===0){Mr.value=!0,pr.value.packetRate=!1;return}Mr.value=!1,mn.value&&(mn.value.destroy(),mn.value=null);try{const da=JSON.parse(JSON.stringify(ro)),no=JSON.parse(JSON.stringify(Ia)),po=new x2(ko,{type:"line",data:{datasets:[{label:"RX/hr",data:da,borderColor:"#C084FC",backgroundColor:"rgba(192, 132, 252, 0.1)",borderWidth:2,fill:!0,tension:.4},{label:"TX/hr",data:no,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,fill:!0,tension:.4}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1},title:{display:!1}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{beginAtZero:!1,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",callback:function(us){return typeof us=="number"?us.toFixed(3):us},stepSize:.002},min:0,max:.012}}}});mn.value=Uu(po),pr.value.packetRate=!1,setTimeout(()=>{pr.value.packetRate&&(pr.value.packetRate=!1)},50)}catch(da){console.error("Error creating packet rate chart:",da),Mr.value=!0,pr.value.packetRate=!1}},mo=()=>{if(!Bn.value){pr.value.packetType=!1;return}const ko=Bn.value.getContext("2d");if(!ko){pr.value.packetType=!1;return}const ro=[],Ia=[],da=["#60A5FA","#34D399","#FBBF24","#A78BFA","#F87171","#06B6D4","#84CC16","#F472B6","#10B981"];if(jt.value.length>0)jt.value.forEach(no=>{const po=no.data?no.data.reduce((us,Ho)=>us+Ho[1],0):0;po>0&&(ro.push(no.name.replace(/\([^)]*\)/g,"").trim()),Ia.push(po))});else{Tr.value=!0,pr.value.packetType=!1;return}Tr.value=!1,Dt.value&&(Dt.value.destroy(),Dt.value=null);try{const no=JSON.parse(JSON.stringify(ro)),po=JSON.parse(JSON.stringify(Ia)),us=new x2(ko,{type:"bar",data:{labels:no,datasets:[{data:po,backgroundColor:da.slice(0,po.length),borderRadius:8,borderSkipped:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},plugins:{legend:{display:!1}},scales:{x:{grid:{display:!1},ticks:{color:"rgba(255, 255, 255, 0.7)",font:{size:10}}},y:{beginAtZero:!0,grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)"}}}}});Dt.value=Uu(us),pr.value.packetType=!1,setTimeout(()=>{pr.value.packetType&&(pr.value.packetType=!1)},50)}catch(no){console.error("Error creating packet type chart:",no),Tr.value=!0,pr.value.packetType=!1}},Ts=()=>{if(!ni.value)return;const ko=ni.value.getContext("2d");if(!ko)return;const ro=he.value.map(no=>({x:no.timestamp,y:no.noiseFloor})).filter(no=>no.y!==null&&no.y!==void 0);if(cn.value)try{const no=Uu(cn.value),po=JSON.parse(JSON.stringify(ro));no.data.datasets[0]&&(no.data.datasets[0].data=po),no.update("active");return}catch{cn.value.destroy(),cn.value=null}const Ia=JSON.parse(JSON.stringify(ro)),da=new x2(ko,{type:"line",data:{datasets:[{label:"Noise Floor (dBm)",data:Ia,borderColor:"#F59E0B",backgroundColor:"rgba(245, 158, 11, 0.1)",borderWidth:2,tension:.3,pointRadius:0,pointHoverRadius:3,fill:!1}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0},interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"top",labels:{color:"rgba(255, 255, 255, 0.8)",usePointStyle:!0,padding:20}}},scales:{x:{type:"time",time:{unit:"hour",displayFormats:{hour:"HH:mm"}},grid:{color:"rgba(255, 255, 255, 0.1)"},ticks:{color:"rgba(255, 255, 255, 0.7)",maxTicksLimit:8}},y:{type:"linear",display:!0,title:{display:!0,text:"Noise Floor (dBm)",color:"rgba(255, 255, 255, 0.8)"},grid:{color:"rgba(245, 158, 11, 0.2)"},ticks:{color:"#F59E0B",stepSize:.5,callback:function(no){return typeof no=="number"?no.toFixed(1):no}},min:-117,max:-113}}}});cn.value=Uu(da)},xl=()=>{if(!Wi.value){pr.value.routePie=!1;return}if(!te.value||!te.value.route_totals){Vr.value=!0,pr.value.routePie=!1;return}Vr.value=!1;const ko=te.value.route_totals,ro=Object.keys(ko),Ia=Object.values(ko),da=["#3B82F6","#F87171","#10B981","#F59E0B","#A78BFA"];try{const no=JSON.parse(JSON.stringify(ro)),po=JSON.parse(JSON.stringify(Ia)),us=[{type:"pie",labels:no,values:po,marker:{colors:da.slice(0,po.length)},hovertemplate:"%{label}
Count: %{value}
Percentage: %{percent}",textinfo:"label+percent",textposition:"auto",pull:.1,hole:.3}],Ho={title:{text:"",font:{color:"rgba(255, 255, 255, 0.8)"}},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",font:{color:"rgba(255, 255, 255, 0.8)",size:11},margin:{t:20,b:20,l:20,r:20},showlegend:!0,legend:{orientation:"h",x:0,y:-.2,font:{color:"rgba(255, 255, 255, 0.8)",size:10}}},vi={responsive:!0,displayModeBar:!1,staticPlot:!1};c1.newPlot(Wi.value,us,Ho,vi),pr.value.routePie=!1,setTimeout(()=>{pr.value.routePie&&(pr.value.routePie=!1)},50)}catch(no){console.error("Error creating 3D route pie chart:",no),Vr.value=!0,pr.value.routePie=!1}};return bp(async()=>{await om(),Di(),E.value=window.setInterval(Di,3e4),window.addEventListener("resize",()=>{setTimeout(()=>{Uu(mn.value)?.resize(),Uu(Dt.value)?.resize(),Uu(cn.value)?.resize(),Wi.value&&c1.Plots&&c1.Plots.resize(Wi.value)},100)})}),gg(()=>{E.value&&clearInterval(E.value),mn.value?.destroy(),Dt.value?.destroy(),cn.value?.destroy(),Wi.value&&c1.purge(Wi.value),window.removeEventListener("resize",()=>{})}),(ko,ro)=>(_i(),zi("div",qpt,[Ee("div",$pt,[ro[2]||(ro[2]=Ee("h2",{class:"text-2xl font-bold text-white"},"Statistics",-1)),Ee("div",Zpt,[ro[1]||(ro[1]=Ee("label",{class:"text-white/70 text-sm"},"Time Range:",-1)),Gp(Ee("select",{"onUpdate:modelValue":ro[0]||(ro[0]=Ia=>K.value=Ia),onChange:Ni,class:"bg-white/10 border border-white/20 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-accent-purple/50 transition-colors"},[(_i(),zi(Pu,null,Jh(pt,Ia=>Ee("option",{key:Ia.value,value:Ia.value,class:"bg-gray-800 text-white"},Qi(Ia.label),9,Gpt)),64))],544),[[pA,K.value]])])]),Ee("div",Ypt,[Wl(o_,{title:"Total RX",value:Un.value.totalRx,color:"#AAE8E8",data:qr.value.totalPackets},null,8,["value","data"]),Wl(o_,{title:"Total TX",value:Un.value.totalTx,color:"#FFC246",data:qr.value.transmittedPackets},null,8,["value","data"])]),Ee("div",Kpt,[ro[9]||(ro[9]=Ee("h3",{class:"text-white text-xl font-semibold mb-4"},"Performance Metrics",-1)),Ee("div",Xpt,[ro[5]||(ro[5]=$f('

Packet Rate (RX/TX PER HOUR)

RX/hr
TX/hr
',2)),Ee("div",Jpt,[Ee("canvas",{ref_key:"packetRateCanvasRef",ref:Jn,class:"w-full h-full relative z-10"},null,512),pr.value.packetRate?(_i(),zi("div",Qpt,ro[3]||(ro[3]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-purple-400 rounded-full mx-auto mb-2"}),Ee("div",{class:"text-white/50 text-xs"},"Loading packet rate data...")],-1)]))):is("",!0),Mr.value&&!pr.value.packetRate?(_i(),zi("div",t0t,ro[4]||(ro[4]=[Ee("div",{class:"text-center"},[Ee("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Ee("div",{class:"text-white/50 text-xs"},"Packet rate data not found")],-1)]))):is("",!0)])]),Ee("div",e0t,[ro[8]||(ro[8]=Ee("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Packet Type Distribution",-1)),Ee("div",r0t,[Ee("canvas",{ref_key:"packetTypeCanvasRef",ref:Bn,class:"w-full h-full relative z-10"},null,512),pr.value.packetType?(_i(),zi("div",n0t,ro[6]||(ro[6]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-blue-400 rounded-full mx-auto mb-2"}),Ee("div",{class:"text-white/50 text-xs"},"Loading packet type data...")],-1)]))):is("",!0),Tr.value&&!pr.value.packetType?(_i(),zi("div",i0t,ro[7]||(ro[7]=[Ee("div",{class:"text-center"},[Ee("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Ee("div",{class:"text-white/50 text-xs"},"Packet type data not found")],-1)]))):is("",!0)])])]),Ee("div",a0t,[ro[13]||(ro[13]=Ee("h3",{class:"text-white text-xl font-semibold mb-4"},"Noise Floor Over Time",-1)),Ee("div",o0t,[Ee("div",s0t,[Ee("div",l0t,[Ee("canvas",{ref_key:"signalMetricsCanvasRef",ref:ni,class:"w-full h-full"},null,512)])]),Ee("div",u0t,[ro[12]||(ro[12]=Ee("p",{class:"text-white/70 text-sm uppercase tracking-wide mb-2"},"Route Distribution",-1)),Ee("div",c0t,[Ee("div",{ref_key:"signalPie3DRef",ref:Wi,class:"w-full h-full relative z-10"},null,512),pr.value.routePie?(_i(),zi("div",h0t,ro[10]||(ro[10]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-green-400 rounded-full mx-auto mb-2"}),Ee("div",{class:"text-white/50 text-xs"},"Loading route data...")],-1)]))):is("",!0),Vr.value&&!pr.value.routePie?(_i(),zi("div",f0t,ro[11]||(ro[11]=[Ee("div",{class:"text-center"},[Ee("div",{class:"text-red-400 text-sm mb-1"},"No Data Available"),Ee("div",{class:"text-white/50 text-xs"},"Route statistics not found")],-1)]))):is("",!0)])])])]),De.value?(_i(),zi("div",d0t,ro[14]||(ro[14]=[Ee("div",{class:"text-white/70 mb-2"},"Loading statistics...",-1),Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-white/70 rounded-full mx-auto"},null,-1)]))):is("",!0),er.value?(_i(),zi("div",p0t,[ro[15]||(ro[15]=Ee("div",{class:"text-red-400 mb-2"},"Failed to load statistics",-1)),Ee("p",m0t,Qi(er.value),1),Ee("button",{onClick:Di,class:"mt-4 px-4 py-2 bg-accent-purple/20 hover:bg-accent-purple/30 text-white rounded-lg border border-accent-purple/50 transition-colors"}," Retry ")])):is("",!0)]))}}),v0t=ld(g0t,[["__scopeId","data-v-9766a4d1"]]),y0t={class:"space-y-4"},x0t={class:"bg-white/5 rounded-lg p-4 space-y-3"},_0t={class:"flex justify-between items-center py-2 border-b border-white/10"},b0t={class:"text-white font-mono"},w0t={class:"flex justify-between items-center py-2 border-b border-white/10"},k0t={class:"text-white font-mono"},T0t={class:"flex justify-between items-center py-2 border-b border-white/10"},A0t={class:"text-white font-mono"},M0t={class:"flex justify-between items-center py-2 border-b border-white/10"},S0t={class:"text-white font-mono"},E0t={class:"flex justify-between items-center py-2 border-b border-white/10"},C0t={class:"text-white font-mono"},L0t={class:"flex justify-between items-center py-2"},P0t={class:"text-white font-mono"},I0t=Dc({__name:"RadioSettings",setup(d){const s=Om(),E=$o(()=>s.stats?.config?.radio||{}),B=$o(()=>{const te=E.value.frequency;return te?(te/1e6).toFixed(3)+" MHz":"Not set"}),K=$o(()=>{const te=E.value.bandwidth;return te?(te/1e3).toFixed(1)+" kHz":"Not set"}),pt=$o(()=>{const te=E.value.tx_power;return te!==void 0?te+" dBm":"Not set"}),_t=$o(()=>{const te=E.value.coding_rate;return te?"4/"+te:"Not set"}),Ot=$o(()=>{const te=E.value.preamble_length;return te?te+" symbols":"Not set"}),jt=$o(()=>E.value.spreading_factor??"Not set");return(te,he)=>(_i(),zi("div",y0t,[Ee("div",x0t,[Ee("div",_0t,[he[0]||(he[0]=Ee("span",{class:"text-white/70 text-sm"},"Frequency",-1)),Ee("span",b0t,Qi(B.value),1)]),Ee("div",w0t,[he[1]||(he[1]=Ee("span",{class:"text-white/70 text-sm"},"Spreading Factor",-1)),Ee("span",k0t,Qi(jt.value),1)]),Ee("div",T0t,[he[2]||(he[2]=Ee("span",{class:"text-white/70 text-sm"},"Bandwidth",-1)),Ee("span",A0t,Qi(K.value),1)]),Ee("div",M0t,[he[3]||(he[3]=Ee("span",{class:"text-white/70 text-sm"},"TX Power",-1)),Ee("span",S0t,Qi(pt.value),1)]),Ee("div",E0t,[he[4]||(he[4]=Ee("span",{class:"text-white/70 text-sm"},"Coding Rate",-1)),Ee("span",C0t,Qi(_t.value),1)]),Ee("div",L0t,[he[5]||(he[5]=Ee("span",{class:"text-white/70 text-sm"},"Preamble Length",-1)),Ee("span",P0t,Qi(Ot.value),1)])])]))}}),z0t={class:"space-y-4"},O0t={class:"bg-white/5 rounded-lg p-4 space-y-3"},D0t={class:"flex justify-between items-center py-2 border-b border-white/10"},F0t={class:"text-white font-mono"},R0t={class:"flex justify-between items-center py-2 border-b border-white/10"},B0t={class:"text-white font-mono text-xs"},N0t={class:"flex justify-between items-start py-2 border-b border-white/10"},j0t={class:"text-white font-mono text-xs text-right break-all max-w-xs"},U0t={class:"flex justify-between items-center py-2 border-b border-white/10"},V0t={class:"text-white font-mono"},H0t={class:"flex justify-between items-center py-2 border-b border-white/10"},W0t={class:"text-white font-mono"},q0t={class:"flex justify-between items-center py-2 border-b border-white/10"},$0t={class:"text-white font-mono"},Z0t={class:"flex justify-between items-start py-2"},G0t={class:"text-white font-mono ml-4"},Y0t=Dc({__name:"RepeaterSettings",setup(d){const s=Om(),E=$o(()=>s.stats?.config||{}),B=$o(()=>E.value.repeater||{}),K=$o(()=>s.stats),pt=$o(()=>E.value.node_name||"Not set"),_t=$o(()=>K.value?.local_hash||"Not available"),Ot=$o(()=>{const er=K.value?.public_key;return!er||er==="Not set"?"Not set":er}),jt=$o(()=>{const er=B.value.latitude;return er&&er!==0?er.toFixed(6):"Not set"}),te=$o(()=>{const er=B.value.longitude;return er&&er!==0?er.toFixed(6):"Not set"}),he=$o(()=>{const er=B.value.mode;return er?er.charAt(0).toUpperCase()+er.slice(1):"Not set"}),De=$o(()=>{const er=B.value.send_advert_interval_hours;return er===void 0?"Not set":er===0?"Disabled":er+" hour"+(er!==1?"s":"")});return(er,pr)=>(_i(),zi("div",z0t,[Ee("div",O0t,[Ee("div",D0t,[pr[0]||(pr[0]=Ee("span",{class:"text-white/70 text-sm"},"Node Name",-1)),Ee("span",F0t,Qi(pt.value),1)]),Ee("div",R0t,[pr[1]||(pr[1]=Ee("span",{class:"text-white/70 text-sm"},"Local Hash",-1)),Ee("span",B0t,Qi(_t.value),1)]),Ee("div",N0t,[pr[2]||(pr[2]=Ee("span",{class:"text-white/70 text-sm"},"Public Key",-1)),Ee("span",j0t,Qi(Ot.value),1)]),Ee("div",U0t,[pr[3]||(pr[3]=Ee("span",{class:"text-white/70 text-sm"},"Latitude",-1)),Ee("span",V0t,Qi(jt.value),1)]),Ee("div",H0t,[pr[4]||(pr[4]=Ee("span",{class:"text-white/70 text-sm"},"Longitude",-1)),Ee("span",W0t,Qi(te.value),1)]),Ee("div",q0t,[pr[5]||(pr[5]=Ee("span",{class:"text-white/70 text-sm"},"Mode",-1)),Ee("span",$0t,Qi(he.value),1)]),Ee("div",Z0t,[pr[6]||(pr[6]=Ee("div",{class:"flex flex-col"},[Ee("span",{class:"text-white/70 text-sm"},"Periodic Advertisement Interval"),Ee("span",{class:"text-white/50 text-xs mt-1"},"How often the repeater sends an advertisement packet (0 = disabled)")],-1)),Ee("span",G0t,Qi(De.value),1)])])]))}}),K0t={class:"space-y-4"},X0t={class:"bg-white/5 rounded-lg p-4 space-y-3"},J0t={class:"flex justify-between items-center py-2 border-b border-white/10"},Q0t={class:"text-white font-mono"},tmt={class:"flex justify-between items-center py-2"},emt={class:"text-white font-mono"},rmt=Dc({__name:"DutyCycle",setup(d){const s=Om(),E=$o(()=>s.stats?.config?.duty_cycle||{}),B=$o(()=>{const pt=E.value.max_airtime_percent;return typeof pt=="number"?pt.toFixed(1)+"%":pt&&typeof pt=="object"&&"parsedValue"in pt?(pt.parsedValue||0).toFixed(1)+"%":"Not set"}),K=$o(()=>E.value.enforcement_enabled?"Enabled":"Disabled");return(pt,_t)=>(_i(),zi("div",K0t,[Ee("div",X0t,[Ee("div",J0t,[_t[0]||(_t[0]=Ee("span",{class:"text-white/70 text-sm"},"Max Airtime %",-1)),Ee("span",Q0t,Qi(B.value),1)]),Ee("div",tmt,[_t[1]||(_t[1]=Ee("span",{class:"text-white/70 text-sm"},"Enforcement",-1)),Ee("span",emt,Qi(K.value),1)])])]))}}),nmt={class:"space-y-4"},imt={class:"bg-white/5 rounded-lg p-4 space-y-3"},amt={class:"flex justify-between items-start py-2 border-b border-white/10"},omt={class:"text-white font-mono ml-4"},smt={class:"flex justify-between items-start py-2"},lmt={class:"text-white font-mono ml-4"},umt=Dc({__name:"TransmissionDelays",setup(d){const s=Om(),E=$o(()=>s.stats?.config?.delays||{}),B=$o(()=>{const pt=E.value.tx_delay_factor;if(pt&&typeof pt=="object"&&pt!==null&&"parsedValue"in pt){const _t=pt.parsedValue;if(typeof _t=="number")return _t.toFixed(2)+"x"}return"Not set"}),K=$o(()=>{const pt=E.value.direct_tx_delay_factor;return typeof pt=="number"?pt.toFixed(2)+"s":"Not set"});return(pt,_t)=>(_i(),zi("div",nmt,[Ee("div",imt,[Ee("div",amt,[_t[0]||(_t[0]=Ee("div",{class:"flex flex-col"},[Ee("span",{class:"text-white/70 text-sm"},"Flood TX Delay Factor"),Ee("span",{class:"text-white/50 text-xs mt-1"},"Multiplier for flood packet transmission delays (collision avoidance)")],-1)),Ee("span",omt,Qi(B.value),1)]),Ee("div",smt,[_t[1]||(_t[1]=Ee("div",{class:"flex flex-col"},[Ee("span",{class:"text-white/70 text-sm"},"Direct TX Delay Factor"),Ee("span",{class:"text-white/50 text-xs mt-1"},"Base delay for direct-routed packet transmission (seconds)")],-1)),Ee("span",lmt,Qi(K.value),1)])])]))}}),dF=oM("treeState",()=>{const d=My(new Set),s=My({value:null}),E=Ot=>{d.add(Ot)},B=Ot=>{d.delete(Ot)};return{expandedNodes:d,selectedNodeId:s,addExpandedNode:E,removeExpandedNode:B,isNodeExpanded:Ot=>d.has(Ot),setSelectedNode:Ot=>{s.value=Ot},toggleExpanded:Ot=>{d.has(Ot)?B(Ot):E(Ot)}}}),cmt={class:"select-none"},hmt={class:"flex-shrink-0"},fmt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},dmt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},pmt={key:0,class:"flex items-center gap-1 ml-2"},mmt={class:"relative group"},gmt=["title"],vmt={key:0,class:"text-xs font-mono text-white/50 bg-white/5 px-1.5 py-0.5 rounded border border-white/10"},ymt={class:"flex justify-between items-start mb-4"},xmt={class:"bg-black/20 border border-white/10 rounded-md p-4 mb-4"},_mt={class:"text-sm font-mono text-white/80 break-all leading-relaxed"},bmt={class:"flex items-center gap-2 ml-auto"},wmt={key:0,class:"flex items-center gap-1"},kmt=["title"],Tmt={key:1,class:"flex items-center gap-1"},Amt={key:2,class:"px-2 py-1 bg-white/10 text-white/60 text-xs rounded-full ml-1"},Mmt={key:0,class:"space-y-1"},Smt=Dc({__name:"TreeNode",props:{node:{},selectedNodeId:{},level:{},disabled:{type:Boolean}},emits:["select"],setup(d,{emit:s}){const E=d,B=s,K=dF(),pt=Ga(!1),_t=$o({get:()=>K.isNodeExpanded(E.node.id),set:Tr=>{Tr?K.addExpandedNode(E.node.id):K.removeExpandedNode(E.node.id)}}),Ot=$o(()=>E.node.children.length>0);function jt(Tr){if(!Tr)return"Never";const mn=new Date().getTime()-Tr.getTime(),Dt=Math.floor(mn/(1e3*60)),cn=Math.floor(mn/(1e3*60*60)),Jn=Math.floor(mn/(1e3*60*60*24)),Bn=Math.floor(Jn/365);return Dt<60?`${Dt}m ago`:cn<24?`${cn}h ago`:Jn<365?`${Jn}d ago`:`${Bn}y ago`}function te(Tr){return Tr?Tr.length<=16?Tr:`${Tr.slice(0,8)}...${Tr.slice(-8)}`:"No key"}function he(){if(Ot.value){const Tr=!_t.value;_t.value=Tr}}function De(){B("select",E.node.id)}function er(Tr){B("select",Tr)}function pr(Tr){Tr.stopPropagation(),pt.value=!pt.value}function Mr(Tr){Tr.stopPropagation(),E.node.transport_key&&window.navigator?.clipboard&&window.navigator.clipboard.writeText(E.node.transport_key)}return(Tr,Vr)=>{const mn=QA("TreeNode",!0);return _i(),zi("div",cmt,[Ee("div",{class:jo(["flex items-center gap-2 py-2 px-3 rounded-lg cursor-pointer transition-all duration-200",E.disabled?"opacity-50 cursor-not-allowed":"hover:bg-white/5",Tr.selectedNodeId===Tr.node.id&&!E.disabled?"bg-primary/20 text-primary":"text-white/80 hover:text-white",`ml-${Tr.level*4}`]),onClick:Vr[3]||(Vr[3]=Dt=>!E.disabled&&De())},[Ee("div",{class:"flex-shrink-0 w-4 h-4 flex items-center justify-center",onClick:Pm(he,["stop"])},[Ot.value?(_i(),zi("svg",{key:0,class:jo(["w-3 h-3 transition-transform duration-200",_t.value?"rotate-90":"rotate-0"]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Vr[4]||(Vr[4]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)]),2)):is("",!0)]),Ee("div",hmt,[E.node.name.startsWith("#")?(_i(),zi("svg",fmt,Vr[5]||(Vr[5]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",dmt,Vr[6]||(Vr[6]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)])))]),Ee("span",{class:jo(["font-mono text-sm transition-colors duration-200",Tr.selectedNodeId===Tr.node.id?"text-primary font-medium":""])},Qi(Tr.node.name),3),Tr.node.transport_key?(_i(),zi("div",pmt,[Ee("div",mmt,[Ee("button",{onClick:pr,class:"p-1 rounded hover:bg-white/10 transition-colors",title:pt.value?"Hide full key":"Show full key"},Vr[7]||(Vr[7]=[Ee("svg",{class:"w-3 h-3 text-white/60 hover:text-white/80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)]),8,gmt),pt.value?is("",!0):(_i(),zi("span",vmt,Qi(te(Tr.node.transport_key)),1)),pt.value?(_i(),zi("div",{key:1,class:"fixed inset-0 z-[9998] flex items-center justify-center bg-black/70 backdrop-blur-md",onClick:Vr[2]||(Vr[2]=Dt=>pt.value=!1)},[Ee("div",{class:"bg-black/20 border border-white/20 rounded-lg shadow-lg p-6 max-w-2xl w-full mx-4",onClick:Vr[1]||(Vr[1]=Pm(()=>{},["stop"]))},[Ee("div",ymt,[Vr[9]||(Vr[9]=Ee("h3",{class:"text-lg font-semibold text-white"},"Transport Key",-1)),Ee("button",{onClick:Vr[0]||(Vr[0]=Dt=>pt.value=!1),class:"text-white/60 hover:text-white transition-colors"},Vr[8]||(Vr[8]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("div",xmt,[Ee("div",_mt,Qi(Tr.node.transport_key),1)]),Ee("div",{class:"flex justify-end"},[Ee("button",{onClick:Mr,class:"px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green rounded-lg transition-colors flex items-center gap-2",title:"Copy to clipboard"},Vr[10]||(Vr[10]=[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),Qu(" Copy Key ",-1)]))])])])):is("",!0)])])):is("",!0),Ee("div",bmt,[Tr.node.last_used?(_i(),zi("div",wmt,[Vr[11]||(Vr[11]=Ee("svg",{class:"w-3 h-3 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),Ee("span",{class:"text-xs text-white/50",title:Tr.node.last_used.toLocaleString()},Qi(jt(Tr.node.last_used)),9,kmt)])):(_i(),zi("div",Tmt,Vr[12]||(Vr[12]=[Ee("svg",{class:"w-3 h-3 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),Ee("span",{class:"text-xs text-white/30 italic"},"Never",-1)]))),Ee("span",{class:jo(["px-2 py-0.5 text-xs font-medium rounded-md transition-colors",Tr.node.floodPolicy==="allow"?"bg-accent-green/10 text-accent-green/90 border border-accent-green/20":"bg-accent-red/10 text-accent-red/90 border border-accent-red/20"])},Qi(Tr.node.floodPolicy==="allow"?"FLOOD ALLOW":"FLOOD DENY"),3),Ot.value?(_i(),zi("span",Amt,Qi(Tr.node.children.length),1)):is("",!0)])],2),Wl($z,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0 overflow-hidden","enter-to-class":"opacity-100 max-h-screen overflow-visible","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 max-h-screen overflow-visible","leave-to-class":"opacity-0 max-h-0 overflow-hidden"},{default:ew(()=>[_t.value&&Tr.node.children.length>0?(_i(),zi("div",Mmt,[(_i(!0),zi(Pu,null,Jh(Tr.node.children,Dt=>(_i(),Z0(mn,{key:Dt.id,node:Dt,"selected-node-id":Tr.selectedNodeId,level:Tr.level+1,disabled:E.disabled,onSelect:er},null,8,["node","selected-node-id","level","disabled"]))),128))])):is("",!0)]),_:1})])}}}),Emt=ld(Smt,[["__scopeId","data-v-4afde13e"]]),Cmt={class:"flex items-center justify-between mb-6"},Lmt={class:"text-white/60 text-sm mt-1"},Pmt={key:0},Imt={class:"text-primary font-mono"},zmt={key:1},Omt={for:"keyName",class:"block text-sm font-medium text-white mb-2"},Dmt={class:"flex items-center gap-2"},Fmt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Rmt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Bmt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},Nmt={class:"flex items-center gap-3 mb-2"},jmt={class:"flex items-center gap-2"},Umt={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Vmt={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Hmt={class:"text-white/70 text-sm"},Wmt={class:"grid grid-cols-2 gap-3"},qmt={class:"relative cursor-pointer group"},$mt={class:"relative cursor-pointer group"},Zmt={class:"flex gap-3 pt-4"},Gmt=["disabled"],Ymt=Dc({__name:"AddKeyModal",props:{show:{type:Boolean},selectedNodeName:{},selectedNodeId:{}},emits:["close","add"],setup(d,{emit:s}){const E=d,B=s,K=Ga(""),pt=Ga(""),_t=Ga("allow"),Ot=$o(()=>K.value.startsWith("#")),jt=$o(()=>({type:Ot.value?"Region":"Private Key",description:Ot.value?"Regional organizational key":"Individual assigned key"}));Em(Ot,pr=>{pr?pt.value="This will create a new region for organizing keys":pt.value="This will create a new private key entry"},{immediate:!0});const te=$o(()=>K.value.trim().length>0),he=()=>{te.value&&(B("add",{name:K.value.trim(),floodPolicy:_t.value,parentId:E.selectedNodeId}),K.value="",pt.value="",_t.value="allow")},De=()=>{K.value="",pt.value="",_t.value="allow",B("close")},er=pr=>{pr.target===pr.currentTarget&&De()};return(pr,Mr)=>pr.show?(_i(),zi("div",{key:0,onClick:er,class:"fixed inset-0 bg-black/40 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Ee("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Mr[3]||(Mr[3]=Pm(()=>{},["stop"]))},[Ee("div",Cmt,[Ee("div",null,[Mr[5]||(Mr[5]=Ee("h3",{class:"text-xl font-semibold text-white"},"Add New Entry",-1)),Ee("p",Lmt,[E.selectedNodeName?(_i(),zi("span",Pmt,[Mr[4]||(Mr[4]=Qu(" Add to: ",-1)),Ee("span",Imt,Qi(E.selectedNodeName),1)])):(_i(),zi("span",zmt," Add to root level (#uk) "))])]),Ee("button",{onClick:De,class:"text-white/60 hover:text-white transition-colors"},Mr[6]||(Mr[6]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("form",{onSubmit:Pm(he,["prevent"]),class:"space-y-4"},[Ee("div",null,[Ee("label",Omt,[Ee("div",Dmt,[Ot.value?(_i(),zi("svg",Fmt,Mr[7]||(Mr[7]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",Rmt,Mr[8]||(Mr[8]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))),Mr[9]||(Mr[9]=Qu(" Region/Key Name ",-1))])]),Gp(Ee("input",{id:"keyName","onUpdate:modelValue":Mr[0]||(Mr[0]=Tr=>K.value=Tr),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[aM,K.value]])]),Ee("div",Bmt,[Ee("div",Nmt,[Ee("div",jmt,[Ot.value?(_i(),zi("svg",Umt,Mr[10]||(Mr[10]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",Vmt,Mr[11]||(Mr[11]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1221 9z"},null,-1)]))),Ee("span",{class:jo([Ot.value?"text-secondary":"text-accent-green","font-medium"])},Qi(jt.value.type),3)]),Ee("div",{class:jo(["flex-1 h-px",Ot.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),Ee("p",Hmt,Qi(jt.value.description),1)]),Ee("div",null,[Mr[14]||(Mr[14]=Ee("label",{class:"block text-sm font-medium text-white mb-3"},[Ee("div",{class:"flex items-center gap-2"},[Ee("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),Qu(" Flood Policy ")])],-1)),Ee("div",Wmt,[Ee("label",qmt,[Gp(Ee("input",{type:"radio","onUpdate:modelValue":Mr[1]||(Mr[1]=Tr=>_t.value=Tr),value:"allow",class:"sr-only"},null,512),[[V2,_t.value]]),Mr[12]||(Mr[12]=$f('
Allow

Permit flooding

',1))]),Ee("label",$mt,[Gp(Ee("input",{type:"radio","onUpdate:modelValue":Mr[2]||(Mr[2]=Tr=>_t.value=Tr),value:"deny",class:"sr-only"},null,512),[[V2,_t.value]]),Mr[13]||(Mr[13]=$f('
Deny

Block flooding

',1))])])]),Ee("div",Zmt,[Ee("button",{type:"button",onClick:De,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Ee("button",{type:"submit",disabled:!te.value,class:jo(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",te.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Add "+Qi(jt.value.type),11,Gmt)])],32)])])):is("",!0)}}),Kmt={class:"flex bg-black items-center justify-between mb-6"},Xmt={class:"text-white/60 text-sm mt-1"},Jmt={class:"text-primary font-mono"},Qmt={for:"keyName",class:"block text-sm font-medium text-white mb-2"},tgt={class:"flex items-center gap-2"},egt={key:0,class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},rgt={key:1,class:"w-4 h-4 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ngt={class:"bg-white/5 border border-white/10 rounded-lg p-4"},igt={class:"flex items-center gap-3 mb-2"},agt={class:"flex items-center gap-2"},ogt={key:0,class:"w-5 h-5 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},sgt={key:1,class:"w-5 h-5 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},lgt={class:"text-white/70 text-sm"},ugt={key:0,class:"space-y-4"},cgt={key:0,class:"bg-white/5 border border-white/10 rounded-lg p-4"},hgt={class:"bg-black/20 border border-white/10 rounded-md p-3"},fgt={class:"text-xs font-mono text-white/80 break-all"},dgt={key:1,class:"bg-white/5 border border-white/10 rounded-lg p-4"},pgt={class:"flex items-center justify-between"},mgt={class:"text-sm text-white/70"},ggt={class:"text-xs text-white/50"},vgt={class:"grid grid-cols-2 gap-3"},ygt={class:"relative cursor-pointer group"},xgt={class:"relative cursor-pointer group"},_gt={class:"flex gap-3 pt-4"},bgt=["disabled"],wgt=Dc({__name:"EditKeyModal",props:{show:{type:Boolean},node:{}},emits:["close","save","request-delete"],setup(d,{emit:s}){const E=d,B=s,K=Ga(""),pt=Ga("allow"),_t=$o(()=>K.value.startsWith("#")),Ot=$o(()=>({type:_t.value?"Region":"Private Key",description:_t.value?"Regional organizational key":"Individual assigned key"}));Em(()=>E.node,Tr=>{Tr?(K.value=Tr.name,pt.value=Tr.floodPolicy):(K.value="",pt.value="allow")},{immediate:!0});const jt=$o(()=>K.value.trim().length>0&&E.node),te=Tr=>{const mn=new Date().getTime()-Tr.getTime(),Dt=Math.floor(mn/(1e3*60)),cn=Math.floor(mn/(1e3*60*60)),Jn=Math.floor(mn/(1e3*60*60*24)),Bn=Math.floor(Jn/365);return Dt<60?`${Dt}m ago`:cn<24?`${cn}h ago`:Jn<365?`${Jn}d ago`:`${Bn}y ago`},he=Tr=>{window.navigator?.clipboard&&window.navigator.clipboard.writeText(Tr)},De=()=>{!jt.value||!E.node||(B("save",{id:E.node.id,name:K.value.trim(),floodPolicy:pt.value}),pr())},er=()=>{E.node&&(B("request-delete",E.node),pr())},pr=()=>{B("close")},Mr=Tr=>{Tr.target===Tr.currentTarget&&pr()};return(Tr,Vr)=>Tr.show?(_i(),zi("div",{key:0,onClick:Mr,class:"fixed inset-0 bg-black/50 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Ee("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-md border border-white/10",onClick:Vr[4]||(Vr[4]=Pm(()=>{},["stop"]))},[Ee("div",Kmt,[Ee("div",null,[Vr[6]||(Vr[6]=Ee("h3",{class:"text-xl font-semibold text-white"},"Edit Entry",-1)),Ee("p",Xmt,[Vr[5]||(Vr[5]=Qu(" Modify ",-1)),Ee("span",Jmt,Qi(Tr.node?.name),1)])]),Ee("button",{onClick:pr,class:"text-white/60 hover:text-white transition-colors"},Vr[7]||(Vr[7]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ee("form",{onSubmit:Pm(De,["prevent"]),class:"space-y-4"},[Ee("div",null,[Ee("label",Qmt,[Ee("div",tgt,[_t.value?(_i(),zi("svg",egt,Vr[8]||(Vr[8]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",rgt,Vr[9]||(Vr[9]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Vr[10]||(Vr[10]=Qu(" Region/Key Name ",-1))])]),Gp(Ee("input",{id:"keyName","onUpdate:modelValue":Vr[0]||(Vr[0]=mn=>K.value=mn),type:"text",placeholder:"Enter name (prefix with # for regions)",class:"w-full px-4 py-3 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors",autocomplete:"off"},null,512),[[aM,K.value]])]),Ee("div",ngt,[Ee("div",igt,[Ee("div",agt,[_t.value?(_i(),zi("svg",ogt,Vr[11]||(Vr[11]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",sgt,Vr[12]||(Vr[12]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Ee("span",{class:jo([_t.value?"text-secondary":"text-accent-green","font-medium"])},Qi(Ot.value.type),3)]),Ee("div",{class:jo(["flex-1 h-px",_t.value?"bg-secondary/20":"bg-accent-green/20"])},null,2)]),Ee("p",lgt,Qi(Ot.value.description),1)]),Tr.node?(_i(),zi("div",ugt,[Tr.node.transport_key?(_i(),zi("div",cgt,[Vr[14]||(Vr[14]=$f('
Transport Key
',1)),Ee("div",hgt,[Ee("div",fgt,Qi(Tr.node.transport_key),1),Ee("button",{onClick:Vr[1]||(Vr[1]=mn=>he(Tr.node.transport_key||"")),class:"mt-2 text-xs text-accent-green hover:text-accent-green/80 flex items-center gap-1",title:"Copy to clipboard"},Vr[13]||(Vr[13]=[Ee("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1),Qu(" Copy Key ",-1)]))])])):is("",!0),Tr.node.last_used?(_i(),zi("div",dgt,[Vr[15]||(Vr[15]=Ee("div",{class:"flex items-center gap-2 mb-3"},[Ee("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})]),Ee("span",{class:"text-sm font-medium text-white"},"Last Used")],-1)),Ee("div",pgt,[Ee("div",mgt,Qi(Tr.node.last_used.toLocaleDateString())+" at "+Qi(Tr.node.last_used.toLocaleTimeString()),1),Ee("div",ggt,Qi(te(Tr.node.last_used)),1)])])):is("",!0)])):is("",!0),Ee("div",null,[Vr[18]||(Vr[18]=Ee("label",{class:"block text-sm font-medium text-white mb-3"},[Ee("div",{class:"flex items-center gap-2"},[Ee("svg",{class:"w-4 h-4 text-primary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})]),Qu(" Flood Policy ")])],-1)),Ee("div",vgt,[Ee("label",ygt,[Gp(Ee("input",{type:"radio","onUpdate:modelValue":Vr[2]||(Vr[2]=mn=>pt.value=mn),value:"allow",class:"sr-only"},null,512),[[V2,pt.value]]),Vr[16]||(Vr[16]=$f('
Allow

Permit flooding

',1))]),Ee("label",xgt,[Gp(Ee("input",{type:"radio","onUpdate:modelValue":Vr[3]||(Vr[3]=mn=>pt.value=mn),value:"deny",class:"sr-only"},null,512),[[V2,pt.value]]),Vr[17]||(Vr[17]=$f('
Deny

Block flooding

',1))])])]),Ee("div",_gt,[Ee("button",{type:"button",onClick:er,class:"px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors"}," Delete "),Ee("button",{type:"button",onClick:pr,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Ee("button",{type:"submit",disabled:!jt.value,class:jo(["flex-1 px-4 py-3 rounded-lg transition-colors font-medium",jt.value?"bg-accent-green/20 hover:bg-accent-green/30 border border-accent-green/50 text-accent-green":"bg-white/5 border border-white/20 text-white/40 cursor-not-allowed"])}," Save Changes ",10,bgt)])],32)])])):is("",!0)}}),kgt={class:"flex items-center gap-3 mb-6"},Tgt={class:"text-white/60 text-sm mt-1"},Agt={class:"text-accent-red font-mono"},Mgt={key:0,class:"bg-accent-red/10 border border-accent-red/30 rounded-lg p-4 mb-6"},Sgt={class:"flex items-start gap-3"},Egt={class:"flex-1"},Cgt={class:"text-accent-red font-medium text-sm mb-2"},Lgt={class:"space-y-1 max-h-32 overflow-y-auto"},Pgt={key:0,class:"w-3 h-3 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Igt={key:1,class:"w-3 h-3 text-accent-green",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},zgt={class:"font-mono"},Ogt={key:0,class:"text-white/60 text-xs"},Dgt={key:1,class:"mb-6"},Fgt={class:"mb-3"},Rgt={class:"relative"},Bgt={class:"space-y-2 max-h-40 overflow-y-auto border border-white/20 rounded-lg p-3 bg-white/5"},Ngt={key:0,class:"text-center py-4 text-white/60 text-sm"},jgt={class:"relative"},Ugt=["value"],Vgt={class:"flex items-center gap-2 flex-1"},Hgt={class:"text-white font-mono text-sm"},Wgt={key:0,class:"ml-auto px-2 py-0.5 bg-white/10 text-white/60 text-xs rounded-full"},qgt={class:"flex gap-3"},$gt=Dc({__name:"DeleteConfirmModal",props:{show:{type:Boolean},node:{},allNodes:{}},emits:["close","delete-all","move-children"],setup(d,{emit:s}){const E=d,B=s,K=Ga(null),pt=Ga(""),_t=Mr=>{const Tr=[],Vr=mn=>{for(const Dt of mn.children)Tr.push(Dt),Vr(Dt)};return Vr(Mr),Tr},Ot=$o(()=>E.node?_t(E.node):[]),jt=$o(()=>{if(!E.node)return[];const Mr=new Set([E.node.id,...Ot.value.map(Vr=>Vr.id)]),Tr=Vr=>{const mn=[];for(const Dt of Vr)Dt.name.startsWith("#")&&!Mr.has(Dt.id)&&mn.push(Dt),Dt.children.length>0&&mn.push(...Tr(Dt.children));return mn};return Tr(E.allNodes)}),te=$o(()=>{if(!pt.value.trim())return jt.value;const Mr=pt.value.toLowerCase();return jt.value.filter(Tr=>Tr.name.toLowerCase().includes(Mr))}),he=()=>{E.node&&(B("delete-all",E.node.id),er())},De=()=>{!E.node||!K.value||(B("move-children",{nodeId:E.node.id,targetParentId:K.value}),er())},er=()=>{K.value=null,pt.value="",B("close")},pr=Mr=>{Mr.target===Mr.currentTarget&&er()};return(Mr,Tr)=>Mr.show&&Mr.node?(_i(),zi("div",{key:0,onClick:pr,class:"fixed inset-0 bg-black/80 backdrop-blur-lg z-[99999] flex items-center justify-center p-4",style:{"backdrop-filter":"blur(8px) saturate(180%)",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"}},[Ee("div",{class:"glass-card rounded-[20px] p-6 w-full max-w-lg border border-white/10",onClick:Tr[2]||(Tr[2]=Pm(()=>{},["stop"]))},[Ee("div",kgt,[Tr[6]||(Tr[6]=Ee("svg",{class:"w-6 h-6 text-accent-red",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})],-1)),Ee("div",null,[Tr[4]||(Tr[4]=Ee("h3",{class:"text-xl font-semibold text-white"},"Confirm Deletion",-1)),Ee("p",Tgt,[Tr[3]||(Tr[3]=Qu(" Deleting ",-1)),Ee("span",Agt,Qi(Mr.node?.name),1)])]),Ee("button",{onClick:er,class:"ml-auto text-white/60 hover:text-white transition-colors"},Tr[5]||(Tr[5]=[Ee("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),Ot.value.length>0?(_i(),zi("div",Mgt,[Ee("div",Sgt,[Tr[9]||(Tr[9]=Ee("svg",{class:"w-5 h-5 text-accent-red flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),Ee("div",Egt,[Ee("h4",Cgt," This will affect "+Qi(Ot.value.length)+" child "+Qi(Ot.value.length===1?"entry":"entries")+": ",1),Ee("div",Lgt,[(_i(!0),zi(Pu,null,Jh(Ot.value.slice(0,10),Vr=>(_i(),zi("div",{key:Vr.id,class:"flex items-center gap-2 text-xs text-white/80"},[Vr.name.startsWith("#")?(_i(),zi("svg",Pgt,Tr[7]||(Tr[7]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"},null,-1)]))):(_i(),zi("svg",Igt,Tr[8]||(Tr[8]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1721 9z"},null,-1)]))),Ee("span",zgt,Qi(Vr.name),1),Ee("span",{class:jo(["px-1 py-0.5 text-xs rounded",Vr.floodPolicy==="allow"?"bg-accent-green/20 text-accent-green":"bg-accent-red/20 text-accent-red"])},Qi(Vr.floodPolicy),3)]))),128)),Ot.value.length>10?(_i(),zi("div",Ogt," ...and "+Qi(Ot.value.length-10)+" more ",1)):is("",!0)])])])])):is("",!0),Ot.value.length>0&&jt.value.length>0?(_i(),zi("div",Dgt,[Tr[13]||(Tr[13]=Ee("h4",{class:"text-white font-medium text-sm mb-3"},"Move children to another region:",-1)),Ee("div",Fgt,[Ee("div",Rgt,[Tr[10]||(Tr[10]=Ee("svg",{class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Gp(Ee("input",{"onUpdate:modelValue":Tr[0]||(Tr[0]=Vr=>pt.value=Vr),type:"text",placeholder:"Search regions...",class:"w-full pl-9 pr-4 py-2 bg-white/5 border border-white/20 rounded-lg text-white placeholder-white/50 focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-colors text-sm"},null,512),[[aM,pt.value]])])]),Ee("div",Bgt,[te.value.length===0?(_i(),zi("div",Ngt,Qi(pt.value?"No regions match your search":"No available regions"),1)):is("",!0),(_i(!0),zi(Pu,null,Jh(te.value,Vr=>(_i(),zi("label",{key:Vr.id,class:"flex items-center gap-3 p-2 rounded cursor-pointer hover:bg-white/10 transition-colors group"},[Ee("div",jgt,[Gp(Ee("input",{type:"radio",value:Vr.id,"onUpdate:modelValue":Tr[1]||(Tr[1]=mn=>K.value=mn),class:"sr-only peer"},null,8,Ugt),[[V2,K.value]]),Tr[11]||(Tr[11]=Ee("div",{class:"w-4 h-4 border-2 border-white/30 rounded-full group-hover:border-white/50 peer-checked:border-primary peer-checked:bg-primary/20 transition-all"},[Ee("div",{class:"w-2 h-2 rounded-full bg-primary scale-0 peer-checked:scale-100 transition-transform absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"})],-1))]),Ee("div",Vgt,[Tr[12]||(Tr[12]=Ee("svg",{class:"w-4 h-4 text-secondary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})],-1)),Ee("span",Hgt,Qi(Vr.name),1),Vr.children.length>0?(_i(),zi("span",Wgt,Qi(Vr.children.length),1)):is("",!0)])]))),128))])])):is("",!0),Ee("div",qgt,[Ee("button",{onClick:er,class:"flex-1 px-4 py-3 bg-white/5 hover:bg-white/10 border border-white/20 text-white rounded-lg transition-colors"}," Cancel "),Ot.value.length>0&&K.value?(_i(),zi("button",{key:0,onClick:De,class:"flex-1 px-4 py-3 bg-primary/20 hover:bg-primary/30 border border-primary/50 text-primary rounded-lg transition-colors"}," Move & Delete ")):is("",!0),Ee("button",{onClick:he,class:"flex-1 px-4 py-3 bg-accent-red/20 hover:bg-accent-red/30 border border-accent-red/50 text-accent-red rounded-lg transition-colors font-medium"},Qi(Ot.value.length>0?"Delete All":"Delete"),1)])])])):is("",!0)}}),Zgt={class:"space-y-6"},Ggt={class:"flex justify-between items-start"},Ygt={class:"flex gap-2"},Kgt=["disabled"],Xgt=["disabled"],Jgt=["disabled"],Qgt={class:"glass-card rounded-[15px] p-4 border border-white/10 bg-white/5"},tvt={class:"flex items-center justify-between"},evt={class:"flex items-center gap-3"},rvt={class:"flex bg-white/5 rounded-lg border border-white/20 p-1"},nvt={class:"glass-card rounded-[15px] p-6 border border-white/10"},ivt={key:0,class:"flex items-center justify-center py-8"},avt={key:1,class:"text-center py-8"},ovt={class:"text-white/70 text-sm"},svt={key:2,class:"text-center py-8"},lvt={key:3,class:"space-y-2"},uvt=Dc({name:"TransportKeys",__name:"TransportKeys",setup(d){const s=dF(),E=Ga(!1),B=Ga(!1),K=Ga(!1),pt=Ga(null),_t=Ga(null),Ot=Ga("deny"),jt=Ga([]),te=Ga(!1),he=Ga(null),De=Pi=>{const bi=new Map,Yi=[];return Pi.forEach(Ca=>{const Ni={id:Ca.id,name:Ca.name,floodPolicy:Ca.flood_policy,transport_key:Ca.transport_key,last_used:Ca.last_used?new Date(Ca.last_used*1e3):void 0,parent_id:Ca.parent_id,children:[]};bi.set(Ca.id,Ni)}),bi.forEach(Ca=>{Ca.parent_id&&bi.has(Ca.parent_id)?bi.get(Ca.parent_id).children.push(Ca):Yi.push(Ca)}),Yi},er=async()=>{try{te.value=!0,he.value=null;const Pi=await Ah.getTransportKeys();Pi.success&&Pi.data?jt.value=De(Pi.data):he.value=Pi.error||"Failed to load transport keys"}catch(Pi){he.value=Pi instanceof Error?Pi.message:"Unknown error occurred",console.error("Error loading transport keys:",Pi)}finally{te.value=!1}};bp(()=>{er()});function pr(Pi,bi){for(const Yi of Pi){if(Yi.id===bi)return Yi;if(Yi.children){const Ca=pr(Yi.children,bi);if(Ca)return Ca}}return null}function Mr(){const Pi=s.selectedNodeId.value;return Pi?pr(jt.value,Pi)?.name:void 0}function Tr(Pi){Ot.value==="deny"&&s.setSelectedNode(Pi)}function Vr(){Ot.value==="deny"&&(E.value=!0)}function mn(){if(Ot.value==="deny"&&s.selectedNodeId.value){const Pi=pr(jt.value,s.selectedNodeId.value);Pi&&(_t.value=Pi,K.value=!0)}}function Dt(){if(Ot.value==="deny"&&s.selectedNodeId.value){const Pi=pr(jt.value,s.selectedNodeId.value);Pi&&(pt.value=Pi,B.value=!0)}}const cn=async Pi=>{try{const bi=await Ah.createTransportKey(Pi.name,Pi.floodPolicy,void 0,Pi.parentId,void 0);bi.success?await er():(console.error("Failed to add transport key:",bi.error),he.value=bi.error||"Failed to add transport key")}catch(bi){console.error("Error adding transport key:",bi),he.value=bi instanceof Error?bi.message:"Unknown error occurred"}finally{E.value=!1}};function Jn(){E.value=!1}async function Bn(Pi){try{const bi=Pi==="allow",Yi=await Ah.updateGlobalFloodPolicy(bi);Yi.success?Ot.value=Pi:(console.error("Failed to update global flood policy:",Yi.error),he.value=Yi.error||"Failed to update global flood policy")}catch(bi){console.error("Error updating global flood policy:",bi),he.value=bi instanceof Error?bi.message:"Failed to update global flood policy"}}function ni(){B.value=!1,pt.value=null}async function Wi(Pi){try{const bi=await Ah.updateTransportKey(Pi.id,Pi.name,Pi.floodPolicy);bi.success?await er():(console.error("Failed to update transport key:",bi.error),he.value=bi.error||"Failed to update transport key")}catch(bi){console.error("Error updating transport key:",bi),he.value=bi instanceof Error?bi.message:"Unknown error occurred"}finally{ni()}}function Un(Pi){B.value=!1,pt.value=null,_t.value=Pi,K.value=!0}function qr(){K.value=!1,_t.value=null}async function Di(Pi){try{const bi=await Ah.deleteTransportKey(Pi);bi.success?(await er(),s.setSelectedNode(null)):(console.error("Failed to delete transport key:",bi.error),he.value=bi.error||"Failed to delete transport key")}catch(bi){console.error("Error deleting transport key:",bi),he.value=bi instanceof Error?bi.message:"Unknown error occurred"}finally{qr()}}async function Fi(Pi){try{const bi=await Ah.deleteTransportKey(Pi.nodeId);bi.success?(await er(),s.setSelectedNode(null)):(console.error("Failed to delete transport key:",bi.error),he.value=bi.error||"Failed to delete transport key")}catch(bi){console.error("Error deleting transport key:",bi),he.value=bi instanceof Error?bi.message:"Unknown error occurred"}finally{qr()}}return(Pi,bi)=>(_i(),zi("div",Zgt,[Ee("div",Ggt,[bi[3]||(bi[3]=Ee("div",null,[Ee("h3",{class:"text-lg font-semibold text-white mb-2"},"Regions/Keys"),Ee("p",{class:"text-white/70 text-sm"},"Manage regional key hierarchy")],-1)),Ee("div",Ygt,[Ee("button",{onClick:Vr,disabled:Ot.value==="allow",class:jo(["flex items-center gap-2 px-3 py-2 rounded-lg border transition-colors text-sm",Ot.value==="allow"?"bg-white/5 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/10 hover:bg-accent-green/20 text-accent-green border-accent-green/30"])},bi[2]||(bi[2]=[Ee("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),Qu(" Add ",-1)]),10,Kgt),Ee("button",{onClick:Dt,disabled:!zl(s).selectedNodeId.value||Ot.value==="allow",class:jo(["px-4 py-2 rounded-lg border transition-colors",!zl(s).selectedNodeId.value||Ot.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border-accent-green/50"])}," Edit ",10,Xgt),Ee("button",{onClick:mn,disabled:!zl(s).selectedNodeId.value||Ot.value==="allow",class:jo(["px-4 py-2 rounded-lg border transition-colors",!zl(s).selectedNodeId.value||Ot.value==="allow"?"bg-white/10 text-white/40 border-white/20 cursor-not-allowed":"bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border-accent-red/50"])}," Delete ",10,Jgt)])]),Ee("div",Qgt,[Ee("div",tvt,[bi[4]||(bi[4]=Ee("div",null,[Ee("h4",{class:"text-sm font-medium text-white mb-1"},"Global Flood Policy (*)"),Ee("p",{class:"text-white/60 text-xs"},"Master control for repeater flooding")],-1)),Ee("div",evt,[Ee("div",rvt,[Ee("button",{onClick:bi[0]||(bi[0]=Yi=>Bn("deny")),class:jo(["px-3 py-1 text-xs font-medium rounded transition-colors",Ot.value==="deny"?"bg-accent-red/20 text-accent-red border border-accent-red/50":"text-white/60 hover:text-white/80"])}," DENY ",2),Ee("button",{onClick:bi[1]||(bi[1]=Yi=>Bn("allow")),class:jo(["px-3 py-1 text-xs font-medium rounded transition-colors",Ot.value==="allow"?"bg-accent-green/20 text-accent-green border border-accent-green/50":"text-white/60 hover:text-white/80"])}," ALLOW ",2)])])])]),Ee("div",nvt,[te.value?(_i(),zi("div",ivt,bi[5]||(bi[5]=[Ee("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-accent-green"},null,-1),Ee("span",{class:"ml-2 text-white/70"},"Loading transport keys...",-1)]))):he.value?(_i(),zi("div",avt,[bi[6]||(bi[6]=Ee("div",{class:"text-accent-red mb-2"},"⚠️ Error loading transport keys",-1)),Ee("div",ovt,Qi(he.value),1),Ee("button",{onClick:er,class:"mt-4 px-4 py-2 bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded-lg transition-colors"}," Retry ")])):jt.value.length===0?(_i(),zi("div",svt,bi[7]||(bi[7]=[Ee("div",{class:"text-white/50 mb-2"},"📝 No transport keys found",-1),Ee("div",{class:"text-white/30 text-sm"},"Add your first transport key to get started",-1)]))):(_i(),zi("div",lvt,[(_i(!0),zi(Pu,null,Jh(jt.value,Yi=>(_i(),Z0(Emt,{key:Yi.id,node:Yi,"selected-node-id":zl(s).selectedNodeId.value,level:0,disabled:Ot.value==="allow",onSelect:Tr},null,8,["node","selected-node-id","disabled"]))),128))]))]),Wl(Ymt,{show:E.value,"selected-node-name":Mr(),"selected-node-id":zl(s).selectedNodeId.value||void 0,onClose:Jn,onAdd:cn},null,8,["show","selected-node-name","selected-node-id"]),Wl(wgt,{show:B.value,node:pt.value,onClose:ni,onSave:Wi,onRequestDelete:Un},null,8,["show","node"]),Wl($gt,{show:K.value,node:_t.value,"all-nodes":jt.value,onClose:qr,onDeleteAll:Di,onMoveChildren:Fi},null,8,["show","node","all-nodes"])]))}}),cvt={class:"p-6 space-y-6"},hvt={class:"glass-card rounded-[15px] z-10 p-4 border border-primary/30 bg-primary/10"},fvt={class:"text-primary"},dvt={class:"mt-2 text-primary/80"},pvt={class:"glass-card rounded-[15px] p-6"},mvt={class:"flex flex-wrap border-b border-white/10 mb-6"},gvt=["onClick"],vvt={class:"flex items-center gap-2"},yvt={key:0,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},xvt={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},_vt={key:2,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},bvt={key:3,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},wvt={key:4,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},kvt={class:"min-h-[400px]"},Tvt={key:0,class:"flex items-center justify-center py-12"},Avt={key:1,class:"flex items-center justify-center py-12"},Mvt={class:"text-center"},Svt={class:"text-white/60 text-sm mb-4"},Evt={key:2},Cvt=Dc({name:"ConfigurationView",__name:"Configuration",setup(d){const s=Om(),E=Ga("radio"),B=Ga(!1),K=[{id:"radio",label:"Radio Settings",icon:"radio"},{id:"repeater",label:"Repeater Settings",icon:"repeater"},{id:"duty",label:"Duty Cycle",icon:"duty"},{id:"delays",label:"TX Delays",icon:"delays"},{id:"transport",label:"Regions/Keys",icon:"keys"}];bp(async()=>{try{await s.fetchStats(),B.value=!0}catch(_t){console.error("Failed to load configuration data:",_t),B.value=!0}});function pt(_t){E.value=_t}return(_t,Ot)=>{const jt=QA("router-link");return _i(),zi("div",cvt,[Ot[11]||(Ot[11]=Ee("div",null,[Ee("h1",{class:"text-2xl font-bold text-white"},"Configuration"),Ee("p",{class:"text-white/70 mt-2"},"System configuration and settings")],-1)),Ot[12]||(Ot[12]=Ee("div",{class:"glass-card rounded-[15px] p-4 border border-blue-500/30 bg-blue-500/10"},[Ee("div",{class:"text-blue-200"},[Ee("strong",null,"Configuration is read-only."),Qu(" To modify settings, edit the config file and restart the daemon. ")])],-1)),Ee("div",hvt,[Ee("div",fvt,[Ot[3]||(Ot[3]=Ee("strong",null,"CAD Calibration Tool Available",-1)),Ee("p",dvt,[Ot[2]||(Ot[2]=Qu(" Optimize your Channel Activity Detection settings. ",-1)),Wl(jt,{to:"/cad-calibration",class:"underline hover:text-primary transition-colors"},{default:ew(()=>Ot[1]||(Ot[1]=[Qu(" Launch CAD Calibration Tool → ",-1)])),_:1,__:[1]})])])]),Ee("div",pvt,[Ee("div",mvt,[(_i(),zi(Pu,null,Jh(K,te=>Ee("button",{key:te.id,onClick:he=>pt(te.id),class:jo(["px-4 py-2 text-sm font-medium transition-colors duration-200 border-b-2 mr-6 mb-2",E.value===te.id?"text-primary border-primary":"text-white/70 border-transparent hover:text-white hover:border-white/30"])},[Ee("div",vvt,[te.icon==="radio"?(_i(),zi("svg",yvt,Ot[4]||(Ot[4]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.822c5.716-5.716 14.976-5.716 20.692 0"},null,-1)]))):te.icon==="repeater"?(_i(),zi("svg",xvt,Ot[5]||(Ot[5]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M5 12l4-4m-4 4l4 4"},null,-1)]))):te.icon==="duty"?(_i(),zi("svg",_vt,Ot[6]||(Ot[6]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):te.icon==="delays"?(_i(),zi("svg",bvt,Ot[7]||(Ot[7]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"},null,-1)]))):te.icon==="keys"?(_i(),zi("svg",wvt,Ot[8]||(Ot[8]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},null,-1)]))):is("",!0),Qu(" "+Qi(te.label),1)])],10,gvt)),64))]),Ee("div",kvt,[!B.value&&zl(s).isLoading?(_i(),zi("div",Tvt,Ot[9]||(Ot[9]=[Ee("div",{class:"text-center"},[Ee("div",{class:"animate-spin w-8 h-8 border-2 border-white/20 border-t-primary rounded-full mx-auto mb-4"}),Ee("div",{class:"text-white/70"},"Loading configuration...")],-1)]))):zl(s).error&&!B.value?(_i(),zi("div",Avt,[Ee("div",Mvt,[Ot[10]||(Ot[10]=Ee("div",{class:"text-red-400 mb-2"},"Failed to load configuration",-1)),Ee("div",Svt,Qi(zl(s).error),1),Ee("button",{onClick:Ot[0]||(Ot[0]=te=>zl(s).fetchStats()),class:"px-4 py-2 bg-primary/20 hover:bg-primary/30 text-white rounded-lg border border-primary/50 transition-colors"}," Retry ")])])):(_i(),zi("div",Evt,[Gp(Ee("div",null,[Wl(I0t,{key:"radio-settings"})],512),[[t2,E.value==="radio"]]),Gp(Ee("div",null,[Wl(Y0t,{key:"repeater-settings"})],512),[[t2,E.value==="repeater"]]),Gp(Ee("div",null,[Wl(rmt,{key:"duty-cycle"})],512),[[t2,E.value==="duty"]]),Gp(Ee("div",null,[Wl(umt,{key:"transmission-delays"})],512),[[t2,E.value==="delays"]]),Gp(Ee("div",null,[Wl(uvt,{key:"transport-keys"})],512),[[t2,E.value==="transport"]])]))])])])}}}),Lvt={class:"p-6 space-y-6"},Pvt={class:"glass-card rounded-[15px] p-6"},Ivt={class:"flex justify-center"},zvt={class:"flex gap-4"},Ovt=["disabled"],Dvt=["disabled"],Fvt={class:"glass-card rounded-[15px] p-6 space-y-4"},Rvt={class:"text-white"},Bvt={key:0,class:"p-4 bg-primary/10 border border-primary/30 rounded-lg"},Nvt={class:"text-primary/90"},jvt={class:"space-y-2"},Uvt={class:"w-full bg-white/10 rounded-full h-2"},Vvt={class:"text-white/70 text-sm"},Hvt={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},Wvt={class:"glass-card rounded-[15px] p-4 text-center"},qvt={class:"text-2xl font-bold text-primary"},$vt={class:"glass-card rounded-[15px] p-4 text-center"},Zvt={class:"text-2xl font-bold text-primary"},Gvt={class:"glass-card rounded-[15px] p-4 text-center"},Yvt={class:"text-2xl font-bold text-primary"},Kvt={class:"glass-card rounded-[15px] p-4 text-center"},Xvt={class:"text-2xl font-bold text-primary"},Jvt={key:0,class:"glass-card rounded-[15px] p-6 space-y-4"},Qvt={key:0,class:"p-4 bg-accent-green/10 border border-accent-green/30 rounded-lg"},t1t={class:"text-white/80 mb-4"},e1t={key:1,class:"p-4 bg-secondary/20 border border-secondary/40 rounded-lg"},r1t=Dc({name:"CADCalibrationView",__name:"CADCalibration",setup(d){const s=Om(),E=Ga(!1),B=Ga(null),K=Ga(null),pt=Ga({}),_t=Ga(null),Ot=Ga([]),jt=Ga({}),te=Ga("Ready to start calibration"),he=Ga(0),De=Ga(0),er=Ga(0),pr=Ga(0),Mr=Ga(0),Tr=Ga(0),Vr=Ga(null),mn=Ga(!1),Dt=Ga(!1),cn=Ga(!1),Jn=Ga(!1);let Bn=null;const ni={responsive:!0,displayModeBar:!0,modeBarButtonsToRemove:["pan2d","select2d","lasso2d","autoScale2d"],displaylogo:!1,toImageButtonOptions:{format:"png",filename:"cad-calibration-heatmap",height:600,width:800,scale:2}};function Wi(){const Ni=[{x:[],y:[],z:[],mode:"markers",type:"scatter",marker:{size:12,color:[],colorscale:[[0,"rgba(75, 85, 99, 0.4)"],[.1,"rgba(6, 182, 212, 0.3)"],[.5,"rgba(6, 182, 212, 0.6)"],[1,"rgba(16, 185, 129, 0.9)"]],showscale:!0,colorbar:{title:{text:"Detection Rate (%)",font:{color:"#ffffff",size:14}},tickfont:{color:"#ffffff"},bgcolor:"rgba(0,0,0,0)",bordercolor:"rgba(255,255,255,0.2)",borderwidth:1,thickness:15},line:{color:"rgba(255,255,255,0.2)",width:1}},hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
",name:"Test Results"}],si={title:{text:'CAD Detection Rate
Channel Activity Detection Calibration',font:{color:"#ffffff",size:18},x:.5},xaxis:{title:{text:"CAD Peak Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},yaxis:{title:{text:"CAD Min Threshold",font:{color:"#cbd5e1",size:14}},tickfont:{color:"#cbd5e1"},gridcolor:"rgba(148, 163, 184, 0.1)",zerolinecolor:"rgba(148, 163, 184, 0.2)",linecolor:"rgba(148, 163, 184, 0.3)"},plot_bgcolor:"rgba(0, 0, 0, 0)",paper_bgcolor:"rgba(0, 0, 0, 0)",font:{color:"#ffffff",family:"Inter, system-ui, sans-serif"},margin:{l:80,r:80,t:100,b:80},showlegend:!1};c1.newPlot("plotly-chart",Ni,si,ni)}function Un(){if(Object.keys(pt.value).length===0)return;const Ni=Object.values(pt.value),si=[],Ma=[],zo=[];for(const mo of Ni)si.push(mo.det_peak),Ma.push(mo.det_min),zo.push(mo.detection_rate);const ho={x:[si],y:[Ma],"marker.color":[zo],hovertemplate:"Peak: %{x}
Min: %{y}
Detection Rate: %{marker.color:.1f}%
Status: Tested
"};c1.restyle("plotly-chart",ho,[0])}async function qr(){try{const Ma=await Ah.post("/cad-calibration-start",{samples:10,delay_ms:50});if(Ma.success)E.value=!0,B.value=Date.now(),s.setCadCalibrationRunning(!0),pt.value={},Ot.value=[],jt.value={},_t.value=null,mn.value=!1,Dt.value=!1,cn.value=!1,Jn.value=!1,er.value=0,pr.value=0,Mr.value=0,Tr.value=0,he.value=0,De.value=0,Bn=setInterval(()=>{B.value&&(Tr.value=Math.floor((Date.now()-B.value)/1e3))},1e3),Fi();else throw new Error(Ma.error||"Failed to start calibration")}catch(Ma){te.value=`Error: ${Ma instanceof Error?Ma.message:"Unknown error"}`}}async function Di(){try{(await Ah.post("/cad-calibration-stop")).success&&(E.value=!1,s.setCadCalibrationRunning(!1),K.value&&(K.value.close(),K.value=null),Bn&&(clearInterval(Bn),Bn=null))}catch(Ni){console.error("Failed to stop calibration:",Ni)}}function Fi(){K.value&&K.value.close(),K.value=new EventSource(`${CQ}/api/cad-calibration-stream`),K.value.onmessage=function(Ni){try{const si=JSON.parse(Ni.data);Pi(si)}catch(si){console.error("Failed to parse SSE data:",si)}},K.value.onerror=function(Ni){console.error("SSE connection error:",Ni),E.value||K.value&&(K.value.close(),K.value=null)}}function Pi(Ni){switch(Ni.type){case"status":te.value=Ni.message||"Status update",Ni.test_ranges&&(Vr.value=Ni.test_ranges,mn.value=!0);break;case"progress":he.value=Ni.current||0,De.value=Ni.total||0,er.value=Ni.current||0;break;case"result":if(Ni.det_peak!==void 0&&Ni.det_min!==void 0&&Ni.detection_rate!==void 0&&Ni.detections!==void 0&&Ni.samples!==void 0){const si=`${Ni.det_peak}_${Ni.det_min}`;pt.value[si]={det_peak:Ni.det_peak,det_min:Ni.det_min,detection_rate:Ni.detection_rate,detections:Ni.detections,samples:Ni.samples},Un(),bi()}break;case"complete":case"completed":E.value=!1,te.value=Ni.message||"Calibration completed",s.setCadCalibrationRunning(!1),Yi(),K.value&&(K.value.close(),K.value=null),Bn&&(clearInterval(Bn),Bn=null);break;case"error":te.value=`Error: ${Ni.message}`,s.setCadCalibrationRunning(!1),Di();break}}function bi(){const Ni=Object.values(pt.value).map(si=>si.detection_rate);Ni.length!==0&&(pr.value=Math.max(...Ni),Mr.value=Ni.reduce((si,Ma)=>si+Ma,0)/Ni.length)}function Yi(){Dt.value=!0;let Ni=null,si=0;for(const Ma of Object.values(pt.value))Ma.detection_rate>si&&(si=Ma.detection_rate,Ni=Ma);_t.value=Ni,Ni&&si>0?(cn.value=!0,Jn.value=!1):(cn.value=!1,Jn.value=!0)}async function Ca(){if(!_t.value){te.value="Error: No calibration results to save";return}try{const Ni=await Ah.post("/save_cad_settings",{peak:_t.value.det_peak,min_val:_t.value.det_min,detection_rate:_t.value.detection_rate});if(Ni.success)te.value=`Settings saved! Peak=${_t.value.det_peak}, Min=${_t.value.det_min} applied to configuration.`;else throw new Error(Ni.error||"Failed to save settings")}catch(Ni){te.value=`Error: Failed to save settings: ${Ni instanceof Error?Ni.message:"Unknown error"}`}}return bp(()=>{Wi()}),Iy(()=>{K.value&&K.value.close(),Bn&&clearInterval(Bn),s.setCadCalibrationRunning(!1),document.getElementById("plotly-chart")&&c1.purge("plotly-chart")}),(Ni,si)=>(_i(),zi("div",Lvt,[si[14]||(si[14]=Ee("div",null,[Ee("h1",{class:"text-2xl font-bold text-white"},"CAD Calibration Tool"),Ee("p",{class:"text-white/70 mt-2"},"Channel Activity Detection calibration")],-1)),Ee("div",Pvt,[Ee("div",Ivt,[Ee("div",zvt,[Ee("button",{onClick:qr,disabled:E.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-green/10 hover:bg-accent-green/20 disabled:bg-gray-500/10 text-accent-green disabled:text-gray-400 rounded-lg border border-accent-green/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},si[0]||(si[0]=[$f('
Start Calibration
Begin testing
',2)]),8,Ovt),Ee("button",{onClick:Di,disabled:!E.value,class:"flex items-center gap-3 px-6 py-3 bg-accent-red/10 hover:bg-accent-red/20 disabled:bg-gray-500/10 text-accent-red disabled:text-gray-400 rounded-lg border border-accent-red/30 disabled:border-gray-500/20 transition-colors disabled:cursor-not-allowed"},si[1]||(si[1]=[$f('
Stop
Halt calibration
',2)]),8,Dvt)])])]),Ee("div",Fvt,[Ee("div",Rvt,Qi(te.value),1),mn.value&&Vr.value?(_i(),zi("div",Bvt,[Ee("div",Nvt,[si[2]||(si[2]=Ee("strong",null,"Configuration:",-1)),Qu(" SF"+Qi(Vr.value.spreading_factor)+" | Peak: "+Qi(Vr.value.peak_min)+" - "+Qi(Vr.value.peak_max)+" | Min: "+Qi(Vr.value.min_min)+" - "+Qi(Vr.value.min_max)+" | "+Qi((Vr.value.peak_max-Vr.value.peak_min+1)*(Vr.value.min_max-Vr.value.min_min+1))+" tests ",1)])])):is("",!0),Ee("div",jvt,[Ee("div",Uvt,[Ee("div",{class:"bg-gradient-to-r from-primary to-accent-green h-2 rounded-full transition-all duration-300",style:hm({width:De.value>0?`${he.value/De.value*100}%`:"0%"})},null,4)]),Ee("div",Vvt,Qi(he.value)+" / "+Qi(De.value)+" tests completed",1)])]),Ee("div",Hvt,[Ee("div",Wvt,[Ee("div",qvt,Qi(er.value),1),si[3]||(si[3]=Ee("div",{class:"text-white/70 text-sm"},"Tests Completed",-1))]),Ee("div",$vt,[Ee("div",Zvt,Qi(pr.value.toFixed(1))+"%",1),si[4]||(si[4]=Ee("div",{class:"text-white/70 text-sm"},"Best Detection Rate",-1))]),Ee("div",Gvt,[Ee("div",Yvt,Qi(Mr.value.toFixed(1))+"%",1),si[5]||(si[5]=Ee("div",{class:"text-white/70 text-sm"},"Average Rate",-1))]),Ee("div",Kvt,[Ee("div",Xvt,Qi(Tr.value)+"s",1),si[6]||(si[6]=Ee("div",{class:"text-white/70 text-sm"},"Elapsed Time",-1))])]),si[15]||(si[15]=Ee("div",{class:"glass-card rounded-[15px] p-6"},[Ee("div",{id:"plotly-chart",class:"w-full h-96"})],-1)),Dt.value?(_i(),zi("div",Jvt,[si[13]||(si[13]=Ee("h3",{class:"text-xl font-bold text-white"},"Calibration Results",-1)),cn.value&&_t.value?(_i(),zi("div",Qvt,[si[11]||(si[11]=Ee("h4",{class:"font-medium text-accent-green mb-2"},"Optimal Settings Found:",-1)),Ee("p",t1t,[si[7]||(si[7]=Qu(" Peak: ",-1)),Ee("strong",null,Qi(_t.value.det_peak),1),si[8]||(si[8]=Qu(", Min: ",-1)),Ee("strong",null,Qi(_t.value.det_min),1),si[9]||(si[9]=Qu(", Rate: ",-1)),Ee("strong",null,Qi(_t.value.detection_rate.toFixed(1))+"%",1)]),Ee("div",{class:"flex justify-center"},[Ee("button",{onClick:Ca,class:"flex items-center gap-3 px-6 py-3 bg-primary/20 hover:bg-primary/30 text-primary rounded-lg border border-primary/50 transition-colors"},si[10]||(si[10]=[$f('
Save Settings
Apply to configuration
',2)]))])])):is("",!0),Jn.value?(_i(),zi("div",e1t,si[12]||(si[12]=[Ee("h4",{class:"font-medium text-secondary mb-2"},"No Optimal Settings Found",-1),Ee("p",{class:"text-white/70"},"All tested combinations showed low detection rates. Consider running calibration again or adjusting test parameters.",-1)]))):is("",!0)])):is("",!0)]))}}),n1t=ld(r1t,[["__scopeId","data-v-854f5f55"]]),i1t={class:"space-y-6"},a1t={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] p-6"},o1t={class:"flex items-center justify-between mb-4"},s1t=["disabled"],l1t={class:"bg-white/5 border border-white/10 rounded-lg p-4"},u1t={class:"flex flex-wrap gap-2"},c1t=["onClick"],h1t={key:0,class:"w-px h-6 bg-white/20 mx-2 self-center"},f1t=["onClick"],d1t={class:"bg-dark-card/30 backdrop-blur border border-white/10 rounded-[15px] overflow-hidden"},p1t={key:0,class:"p-8 text-center"},m1t={key:1,class:"p-8 text-center"},g1t={class:"text-dark-text mb-4"},v1t={key:2,class:"max-h-[600px] overflow-y-auto"},y1t={key:0,class:"p-8 text-center"},x1t={key:1,class:"divide-y divide-white/5"},_1t={class:"flex-shrink-0 text-dark-text"},b1t={class:"flex-shrink-0 px-2 py-1 text-xs font-medium rounded bg-blue-500/20 text-blue-400"},w1t={class:"text-white flex-1 break-all"},k1t=Dc({name:"LogsView",__name:"Logs",setup(d){const s=Ga([]),E=Ga(new Set),B=Ga(new Set(["DEBUG","INFO","WARNING","ERROR"])),K=Ga(new Set),pt=Ga(new Set),_t=Ga(!0),Ot=Ga(null);let jt=null;const te=Fi=>{const Pi=Fi.match(/- ([^-]+) - (?:DEBUG|INFO|WARNING|ERROR) -/);return Pi?Pi[1].trim():"Unknown"},he=Fi=>{const Pi=Fi.match(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} - [^-]+ - (?:DEBUG|INFO|WARNING|ERROR) - (.+)$/);return Pi?Pi[1]:Fi},De=(Fi,Pi)=>{if(Fi.size!==Pi.size)return!1;for(const bi of Fi)if(!Pi.has(bi))return!1;return!0},er=async()=>{try{const Fi=await Ah.getLogs();if(Fi.logs&&Fi.logs.length>0){s.value=Fi.logs;const Pi=new Set;s.value.forEach(Ni=>{const si=te(Ni.message);Pi.add(si)});const bi=new Set;s.value.forEach(Ni=>{bi.add(Ni.level)}),E.value.size===0&&(E.value=new Set(Pi));const Yi=!De(K.value,Pi),Ca=!De(pt.value,bi);Yi&&(K.value=Pi),Ca&&(pt.value=bi),Ot.value=null}}catch(Fi){console.error("Error loading logs:",Fi),Ot.value=Fi instanceof Error?Fi.message:"Failed to load logs"}finally{_t.value=!1}},pr=$o(()=>s.value.filter(Pi=>{const bi=te(Pi.message),Yi=E.value.has(bi),Ca=B.value.has(Pi.level);return Yi&&Ca})),Mr=$o(()=>Array.from(K.value).sort()),Tr=$o(()=>{const Fi=["ERROR","WARNING","WARN","INFO","DEBUG"];return Array.from(pt.value).sort((bi,Yi)=>{const Ca=Fi.indexOf(bi),Ni=Fi.indexOf(Yi);return Ca!==-1&&Ni!==-1?Ca-Ni:bi.localeCompare(Yi)})}),Vr=Fi=>{B.value.has(Fi)?B.value.delete(Fi):B.value.add(Fi),B.value=new Set(B.value)},mn=Fi=>new Date(Fi).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Dt=Fi=>({ERROR:"text-red-400 bg-red-900/20",WARNING:"text-yellow-400 bg-yellow-900/20",WARN:"text-yellow-400 bg-yellow-900/20",INFO:"text-blue-400 bg-blue-900/20",DEBUG:"text-gray-400 bg-gray-900/20"})[Fi]||"text-gray-400 bg-gray-900/20",cn=(Fi,Pi)=>Pi?{ERROR:"bg-red-500/20 text-red-400 border-red-500/50",WARNING:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",WARN:"bg-yellow-500/20 text-yellow-400 border-yellow-500/50",INFO:"bg-blue-500/20 text-blue-400 border-blue-500/50",DEBUG:"bg-gray-500/20 text-gray-400 border-gray-500/50"}[Fi]||"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10",Jn=Fi=>{E.value.has(Fi)?E.value.delete(Fi):E.value.add(Fi),E.value=new Set(E.value)},Bn=()=>{E.value=new Set(K.value)},ni=()=>{E.value=new Set},Wi=()=>{B.value=new Set(pt.value)},Un=()=>{B.value=new Set},qr=()=>{jt&&clearInterval(jt),jt=setInterval(er,5e3)},Di=()=>{jt&&(clearInterval(jt),jt=null)};return bp(()=>{er(),qr()}),gg(()=>{Di()}),(Fi,Pi)=>(_i(),zi("div",i1t,[Ee("div",a1t,[Ee("div",o1t,[Pi[1]||(Pi[1]=Ee("div",null,[Ee("h1",{class:"text-white text-2xl font-semibold mb-2"},"System Logs"),Ee("p",{class:"text-dark-text"},"Real-time system events and diagnostics")],-1)),Ee("button",{onClick:er,disabled:_t.value,class:"flex items-center gap-2 px-4 py-2 bg-primary/20 hover:bg-primary/30 text-primary border border-primary/50 rounded-lg transition-colors disabled:opacity-50"},[(_i(),zi("svg",{class:jo(["w-4 h-4",{"animate-spin":_t.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Pi[0]||(Pi[0]=[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)]),2)),Qu(" "+Qi(_t.value?"Loading...":"Refresh"),1)],8,s1t)]),Ee("div",l1t,[Ee("div",{class:"flex flex-wrap items-center gap-3 mb-4"},[Pi[2]||(Pi[2]=Ee("span",{class:"text-white font-medium"},"Filters:",-1)),Ee("button",{onClick:Bn,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Loggers "),Ee("button",{onClick:ni,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Loggers "),Pi[3]||(Pi[3]=Ee("div",{class:"w-px h-4 bg-white/20 mx-1"},null,-1)),Ee("button",{onClick:Wi,class:"px-3 py-1 text-xs bg-accent-green/20 hover:bg-accent-green/30 text-accent-green border border-accent-green/50 rounded transition-colors"}," All Levels "),Ee("button",{onClick:Un,class:"px-3 py-1 text-xs bg-accent-red/20 hover:bg-accent-red/30 text-accent-red border border-accent-red/50 rounded transition-colors"}," Clear Levels ")]),Ee("div",u1t,[(_i(!0),zi(Pu,null,Jh(Mr.value,bi=>(_i(),zi("button",{key:"logger-"+bi,onClick:Yi=>Jn(bi),class:jo(["px-3 py-1 text-xs border rounded-full transition-colors",E.value.has(bi)?"bg-primary/20 text-primary border-primary/50":"bg-white/5 text-white/60 border-white/20 hover:bg-white/10"])},Qi(bi),11,c1t))),128)),Mr.value.length>0&&Tr.value.length>0?(_i(),zi("div",h1t)):is("",!0),(_i(!0),zi(Pu,null,Jh(Tr.value,bi=>(_i(),zi("button",{key:"level-"+bi,onClick:Yi=>Vr(bi),class:jo(["px-3 py-1 text-xs border rounded-full transition-colors font-medium",B.value.has(bi)?cn(bi,!0):cn(bi,!1)])},Qi(bi),11,f1t))),128))])])]),Ee("div",d1t,[_t.value&&s.value.length===0?(_i(),zi("div",p1t,Pi[4]||(Pi[4]=[Ee("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-4"},null,-1),Ee("p",{class:"text-dark-text"},"Loading system logs...",-1)]))):Ot.value?(_i(),zi("div",m1t,[Pi[5]||(Pi[5]=Ee("div",{class:"text-red-400 mb-4"},[Ee("svg",{class:"w-12 h-12 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[Ee("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),Pi[6]||(Pi[6]=Ee("h3",{class:"text-white text-lg font-medium mb-2"},"Error Loading Logs",-1)),Ee("p",g1t,Qi(Ot.value),1),Ee("button",{onClick:er,class:"px-4 py-2 bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/50 rounded-lg transition-colors"}," Try Again ")])):(_i(),zi("div",v1t,[pr.value.length===0?(_i(),zi("div",y1t,Pi[7]||(Pi[7]=[$f('

No Logs to Display

No logs match the current filter criteria.

',3)]))):(_i(),zi("div",x1t,[(_i(!0),zi(Pu,null,Jh(pr.value,(bi,Yi)=>(_i(),zi("div",{key:Yi,class:"flex items-start gap-4 p-4 hover:bg-white/5 transition-colors font-mono text-sm"},[Ee("span",_1t," ["+Qi(mn(bi.timestamp))+"] ",1),Ee("span",b1t,Qi(te(bi.message)),1),Ee("span",{class:jo(["flex-shrink-0 px-2 py-1 text-xs font-medium rounded",Dt(bi.level)])},Qi(bi.level),3),Ee("span",w1t,Qi(he(bi.message)),1)]))),128))]))]))])]))}}),T1t=Dc({name:"HelpView",__name:"Help",setup(d){return(s,E)=>(_i(),zi("div",null,E[0]||(E[0]=[$f('

Help

Help & Documentation

Find answers to common questions and access user guides.

',1)])))}}),A1t=KX({history:EX("/"),routes:[{path:"/",name:"dashboard",component:dot},{path:"/neighbors",name:"neighbors",component:mst},{path:"/statistics",name:"statistics",component:v0t},{path:"/configuration",name:"configuration",component:Cvt},{path:"/cad-calibration",name:"cad-calibration",component:n1t},{path:"/logs",name:"logs",component:k1t},{path:"/help",name:"help",component:T1t}]}),DM=FK(jrt);DM.use(NK());DM.use(A1t);DM.mount("#app"); diff --git a/repeater/web/html/index.html b/repeater/web/html/index.html index a5e4c74..5b8d0f0 100644 --- a/repeater/web/html/index.html +++ b/repeater/web/html/index.html @@ -8,8 +8,8 @@ - - + +